diff options
author | Juan Pablo Ugarte <jpu@src.gnome.org> | 2007-05-02 19:11:18 +0000 |
---|---|---|
committer | Juan Pablo Ugarte <jpu@src.gnome.org> | 2007-05-02 19:11:18 +0000 |
commit | bcb595ee96abdf19a5ae2dfb5f4a32643825ad38 (patch) | |
tree | 03189c25c28f7a513299ed0ddc31c841020a156c | |
parent | 28201e6a69b80d4333079819de0319c19d55b60d (diff) | |
download | glade-bcb595ee96abdf19a5ae2dfb5f4a32643825ad38.tar.gz |
- diabled "has-separator" property in GtkColorSelectionDialog,
* plugins/gtk+/gtk+.xml.in:
- diabled "has-separator" property in GtkColorSelectionDialog,
GtkFontSelectionDialog and GtkInputDialog to avoid a gtk warning.
- GtkComboBox "model" property disabled.
* plugins/gtk+/glade-gtk.c:
- Make every GtkInputDialog's internal GtkOptionMenu insensitive.
This is a workaround for bug #433975
- Warning fixed in glade_gtk_paned_set_child_property() and
glade_gtk_text_view_post_create()
svn path=/branches/gnome-2-18/; revision=1297
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | plugins/gtk+/glade-gtk.c | 56 | ||||
-rw-r--r-- | plugins/gtk+/gtk+.xml.in | 23 |
3 files changed, 75 insertions, 19 deletions
@@ -1,3 +1,18 @@ +2007-05-02 Juan Pablo Ugarte <juanpablougarte@gmail.com> + + * plugins/gtk+/gtk+.xml.in: + - diabled "has-separator" property in GtkColorSelectionDialog, + GtkFontSelectionDialog and GtkInputDialog to avoid a gtk warning. + + - GtkComboBox "model" property disabled. + + * plugins/gtk+/glade-gtk.c: + - Make every GtkInputDialog's internal GtkOptionMenu insensitive. + This is a workaround for bug #433975 + + - Warning fixed in glade_gtk_paned_set_child_property() and + glade_gtk_text_view_post_create() + 2007-05-02 Jeff Westerinen <jeff.westerinen@palmsource.com> * gladeui/glade-utils.[ch]: Added glade_util_ascii_strtoll() diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c index cd1b9e33..1b831dd5 100644 --- a/plugins/gtk+/glade-gtk.c +++ b/plugins/gtk+/glade-gtk.c @@ -239,6 +239,12 @@ empty (GObject *container, GladeCreateReason reason) { } +/* This function is used to stop default handlers */ +static void +glade_gtk_stop_emission_POINTER (gpointer instance, gpointer dummy, gpointer data) +{ + g_signal_stop_emission (instance, GPOINTER_TO_UINT (data) , 0); +} /* ----------------------------- GtkWidget ------------------------------ */ void GLADEGTK_API @@ -2716,11 +2722,14 @@ glade_gtk_paned_set_child_property (GladeWidgetAdaptor *adaptor, g_object_unref (child); /* Ensure placeholders */ - if ((place = gtk_paned_get_child1 (paned)) == NULL) - gtk_paned_add1 (paned, glade_placeholder_new ()); + if (glade_util_object_is_loading (child) == FALSE) + { + if ((place = gtk_paned_get_child1 (paned)) == NULL) + gtk_paned_add1 (paned, glade_placeholder_new ()); - if ((place = gtk_paned_get_child2 (paned)) == NULL) - gtk_paned_add2 (paned, glade_placeholder_new ()); + if ((place = gtk_paned_get_child2 (paned)) == NULL) + gtk_paned_add2 (paned, glade_placeholder_new ()); + } } else /* Chain Up */ @@ -2969,12 +2978,6 @@ glade_gtk_window_post_create (GladeWidgetAdaptor *adaptor, /* ----------------------------- GtkDialog(s) ------------------------------ */ static void -glade_gtk_stop_emission_POINTER (gpointer instance, gpointer dummy, gpointer data) -{ - g_signal_stop_emission (instance, GPOINTER_TO_UINT (data) , 0); -} - -static void glade_gtk_file_chooser_default_forall (GtkWidget *widget, gpointer data) { static gpointer hierarchy = NULL, screen; @@ -3016,6 +3019,18 @@ glade_gtk_file_chooser_forall (GtkWidget *widget, gpointer data) NULL); } +static void +glade_gtk_input_dialog_forall (GtkWidget *widget, gpointer data) +{ + /* Make every option menu insensitive, yes it use a deprecated widget */ + if (GTK_IS_OPTION_MENU (widget)) + gtk_widget_set_sensitive (widget, FALSE); + else if (GTK_IS_CONTAINER (widget)) + gtk_container_forall (GTK_CONTAINER (widget), + glade_gtk_input_dialog_forall, + NULL); +} + void GLADEGTK_API glade_gtk_dialog_post_create (GladeWidgetAdaptor *adaptor, GObject *object, @@ -3044,14 +3059,24 @@ glade_gtk_dialog_post_create (GladeWidgetAdaptor *adaptor, if (GTK_IS_INPUT_DIALOG (object)) { + GtkInputDialog *id = GTK_INPUT_DIALOG (dialog); + save_button = glade_widget_adaptor_create_internal - (widget, G_OBJECT (GTK_INPUT_DIALOG (dialog)->save_button), + (widget, G_OBJECT (id->save_button), "save_button", "inputdialog", FALSE, reason); - close_button = glade_widget_adaptor_create_internal - (widget, G_OBJECT (GTK_INPUT_DIALOG (dialog)->close_button), + (widget, G_OBJECT (id->close_button), "close_button", "inputdialog", FALSE, reason); - + /* + On device and mode menu items "activate" signal handlers + GtkInputDialog call gtk_widget_get_toplevel() and assume that + the toplevel returned is the GtkInputDialog but since the + dialog is embed inside glade the returned pointer is not what + expected and this gives a segfault :S + */ + gtk_container_forall (GTK_CONTAINER (dialog), + glade_gtk_input_dialog_forall, + NULL); } else if (GTK_IS_FILE_SELECTION (object)) { @@ -5257,6 +5282,9 @@ glade_gtk_text_view_post_create (GladeWidgetAdaptor *adaptor, gtext = glade_widget_get_from_gobject (object); g_return_if_fail (GLADE_IS_WIDGET (gtext)); + /* This makes gtk_text_view_set_buffer() stop complaing */ + gtk_drag_dest_set (GTK_WIDGET (object), 0, NULL, 0, 0); + gtk_text_view_set_buffer (GTK_TEXT_VIEW (object), buffy); g_signal_connect (buffy, "changed", G_CALLBACK (glade_gtk_text_view_changed), diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in index b7233967..079024e6 100644 --- a/plugins/gtk+/gtk+.xml.in +++ b/plugins/gtk+/gtk+.xml.in @@ -723,6 +723,7 @@ embedded in another object</_tooltip> <post-create-function>glade_gtk_combo_box_post_create</post-create-function> <set-property-function>glade_gtk_combo_box_set_property</set-property-function> <properties> + <property id="model" disabled="True"/> <property id="active" ignore="True"/> <property id="column-span-column" ignore="True"/> <property id="row-span-column" ignore="True"/> @@ -1199,8 +1200,12 @@ embedded in another object</_tooltip> </properties> </glade-widget-class> - <glade-widget-class name="GtkColorSelectionDialog" generic-name="colorselectiondialog" _title="Color Selection Dialog"/> - + <glade-widget-class name="GtkColorSelectionDialog" generic-name="colorselectiondialog" _title="Color Selection Dialog"> + <properties> + <property id="has-separator" disabled="True"/> + </properties> + </glade-widget-class> + <glade-widget-class name="GtkFileChooserDialog" generic-name="filechooserdialog" _title="File Chooser Dialog"> <properties> <property id="action"> @@ -1217,9 +1222,17 @@ embedded in another object</_tooltip> </properties> </glade-widget-class> - <glade-widget-class name="GtkFontSelectionDialog" generic-name="fontselectiondialog" _title="Font Selection Dialog"/> - - <glade-widget-class name="GtkInputDialog" generic-name="inputdialog" _title="Input Dialog"/> + <glade-widget-class name="GtkFontSelectionDialog" generic-name="fontselectiondialog" _title="Font Selection Dialog"> + <properties> + <property id="has-separator" disabled="True"/> + </properties> + </glade-widget-class> + + <glade-widget-class name="GtkInputDialog" generic-name="inputdialog" _title="Input Dialog"> + <properties> + <property id="has-separator" disabled="True"/> + </properties> + </glade-widget-class> <glade-widget-class name="GtkMessageDialog" generic-name="messagedialog" _title="Message Dialog" default-width="400" default-height="115"> <properties> |