diff options
author | Juan Pablo Ugarte <jpu@src.gnome.org> | 2007-10-27 05:01:34 +0000 |
---|---|---|
committer | Juan Pablo Ugarte <jpu@src.gnome.org> | 2007-10-27 05:01:34 +0000 |
commit | 509f902fe2aa67030cc377bdd5f73b884759244f (patch) | |
tree | 6244ef8d55aaa67f3213661afeac6edd83dba8f3 | |
parent | 5ebb650cbc89037540401ceca38525a0f8b197f3 (diff) | |
download | glade-509f902fe2aa67030cc377bdd5f73b884759244f.tar.gz |
added glade_gtk_radio_button_set_property() to avoid bogus warning
* plugins/gtk+/glade-gtk.c: added glade_gtk_radio_button_set_property() to avoid bogus warning
* plugins/gtk+/gtk+.xml.in: added GtkRadioButton set-property-function
svn path=/trunk/; revision=1640
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | plugins/gtk+/glade-gtk.c | 25 | ||||
-rw-r--r-- | plugins/gtk+/gtk+.xml.in | 1 |
3 files changed, 32 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2007-10-26 Juan Pablo Ugarte <juanpablougarte@gmail.com> + + * plugins/gtk+/glade-gtk.c: added glade_gtk_radio_button_set_property() to avoid bogus warning + + * plugins/gtk+/gtk+.xml.in: added GtkRadioButton set-property-function + 2007-10-22 Juan Pablo Ugarte <juanpablougarte@gmail.com> * gladeui/glade-widget.c: fixed variable redeclaration in glade_widget_embed() bug #488977 diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c index 4c8daaab..6d4e5682 100644 --- a/plugins/gtk+/glade-gtk.c +++ b/plugins/gtk+/glade-gtk.c @@ -6707,3 +6707,28 @@ glade_gtk_assistant_get_child_property (GladeWidgetAdaptor *adaptor, property_name, value); } + +/*--------------------------- GtkRadioButton ---------------------------------*/ +void +glade_gtk_radio_button_set_property (GladeWidgetAdaptor *adaptor, + GObject *object, + const gchar *property_name, + const GValue *value) +{ + if (strcmp (property_name, "group") == 0) + { + GtkRadioButton *radio = g_value_get_object (value); + /* g_object_set () on this property produces a bogus warning, + * so we better use the API GtkRadioButton provides. + */ + gtk_radio_button_set_group (GTK_RADIO_BUTTON (object), + radio ? gtk_radio_button_get_group (radio) : NULL); + return; + } + + /* Chain Up */ + GWA_GET_CLASS (GTK_TYPE_CHECK_BUTTON)->set_property (adaptor, + object, + property_name, + value); +} diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in index 7e5a7bf9..45c22bd7 100644 --- a/plugins/gtk+/gtk+.xml.in +++ b/plugins/gtk+/gtk+.xml.in @@ -743,6 +743,7 @@ embedded in another object</_tooltip> </glade-widget-class> <glade-widget-class name="GtkRadioButton" generic-name="radiobutton" _title="Radio Button"> + <set-property-function>glade_gtk_radio_button_set_property</set-property-function> <properties> <property id="label" default="radiobutton"/> <property id="draw-indicator" default="True"/> |