forked from AuroraMiddleware/gtk
_GtkFileChooserButtonPrivate: Added has_title flag so we can remember
2006-04-19 Murray Cumming <murrayc@murrayc.com> * gtk/gtkfilechooserbutton.c: _GtkFileChooserButtonPrivate: Added has_title flag so we can remember whether a title has been set. (gtk_file_chooser_button_constructor): If no title has been set then set it to the default title. This means that the default title will be used if the dialog was instantiated with g_object_new(), without using the gtk_file_chooser_button_new() convenience function. This helps language bindings. (gtk_file_chooser_button_set_property): Set has_title when setting the title.
This commit is contained in:
parent
36c93d25d3
commit
5cb13a7512
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2006-04-19 Murray Cumming <murrayc@murrayc.com>
|
||||
|
||||
* gtk/gtkfilechooserbutton.c: _GtkFileChooserButtonPrivate:
|
||||
Added has_title flag so we can remember whether a title has
|
||||
been set.
|
||||
(gtk_file_chooser_button_constructor): If no title has been
|
||||
set then set it to the default title. This means that the
|
||||
default title will be used if the dialog was instantiated with
|
||||
g_object_new(), without using the gtk_file_chooser_button_new()
|
||||
convenience function. This helps language bindings.
|
||||
(gtk_file_chooser_button_set_property): Set has_title when
|
||||
setting the title.
|
||||
|
||||
2006-04-19 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (handle_special): Map VK_NUMPAD[0-9]
|
||||
|
@ -1,3 +1,16 @@
|
||||
2006-04-19 Murray Cumming <murrayc@murrayc.com>
|
||||
|
||||
* gtk/gtkfilechooserbutton.c: _GtkFileChooserButtonPrivate:
|
||||
Added has_title flag so we can remember whether a title has
|
||||
been set.
|
||||
(gtk_file_chooser_button_constructor): If no title has been
|
||||
set then set it to the default title. This means that the
|
||||
default title will be used if the dialog was instantiated with
|
||||
g_object_new(), without using the gtk_file_chooser_button_new()
|
||||
convenience function. This helps language bindings.
|
||||
(gtk_file_chooser_button_set_property): Set has_title when
|
||||
setting the title.
|
||||
|
||||
2006-04-19 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (handle_special): Map VK_NUMPAD[0-9]
|
||||
|
@ -156,6 +156,9 @@ struct _GtkFileChooserButtonPrivate
|
||||
/* Used for hiding/showing the dialog when the button is hidden */
|
||||
guint8 active : 1;
|
||||
|
||||
/* Used to remember whether a title has been set yet, so we can use the default if it has not been set. */
|
||||
guint8 has_title : 1;
|
||||
|
||||
/* Used to track whether we need to set a default current folder on ::map() */
|
||||
guint8 folder_has_been_set : 1;
|
||||
|
||||
@ -648,6 +651,10 @@ gtk_file_chooser_button_constructor (GType type,
|
||||
-1);
|
||||
}
|
||||
|
||||
/* Set the default title if necessary. We must wait until the dialog has been created to do this. */
|
||||
if (!priv->has_title)
|
||||
gtk_file_chooser_button_set_title (button, _(DEFAULT_TITLE));
|
||||
|
||||
current_folder = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (priv->dialog));
|
||||
if (current_folder != NULL)
|
||||
{
|
||||
@ -786,6 +793,9 @@ gtk_file_chooser_button_set_property (GObject *object,
|
||||
break;
|
||||
|
||||
case PROP_TITLE:
|
||||
/* Remember that a title has been set, so we do no try to set it to the default in _init(). */
|
||||
priv->has_title = TRUE;
|
||||
/* Intentionally fall through instead of breaking here, to actually set the property. */
|
||||
case GTK_FILE_CHOOSER_PROP_FILTER:
|
||||
case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY:
|
||||
case GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET:
|
||||
|
Loading…
Reference in New Issue
Block a user