diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-09-18 19:55:42 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-09-26 22:18:18 -0400 |
commit | eac1959d2c843dfc55353ffc89c16b74cb26e9bc (patch) | |
tree | 214f431642a466bcf016a317a3d39e8a95772ca9 /gtk/gtkradiobutton.c | |
parent | 3b8184cfee90f8f4e13ae64919a6a08921f78b8a (diff) | |
download | gtk+-eac1959d2c843dfc55353ffc89c16b74cb26e9bc.tar.gz |
Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
Diffstat (limited to 'gtk/gtkradiobutton.c')
-rw-r--r-- | gtk/gtkradiobutton.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index 9e91add08b..d760d4f920 100644 --- a/gtk/gtkradiobutton.c +++ b/gtk/gtkradiobutton.c @@ -114,7 +114,7 @@ enum { }; -static void gtk_radio_button_destroy (GtkObject *object); +static void gtk_radio_button_destroy (GtkWidget *widget); static gboolean gtk_radio_button_focus (GtkWidget *widget, GtkDirectionType direction); static void gtk_radio_button_clicked (GtkButton *button); @@ -137,13 +137,11 @@ static void gtk_radio_button_class_init (GtkRadioButtonClass *class) { GObjectClass *gobject_class; - GtkObjectClass *object_class; GtkButtonClass *button_class; GtkCheckButtonClass *check_button_class; GtkWidgetClass *widget_class; gobject_class = G_OBJECT_CLASS (class); - object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; button_class = (GtkButtonClass*) class; check_button_class = (GtkCheckButtonClass*) class; @@ -163,8 +161,7 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class) P_("The radio button whose group this widget belongs to."), GTK_TYPE_RADIO_BUTTON, GTK_PARAM_WRITABLE)); - object_class->destroy = gtk_radio_button_destroy; - + widget_class->destroy = gtk_radio_button_destroy; widget_class->focus = gtk_radio_button_focus; button_class->clicked = gtk_radio_button_clicked; @@ -187,7 +184,7 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class) * Since: 2.4 */ group_changed_signal = g_signal_new (I_("group-changed"), - G_OBJECT_CLASS_TYPE (object_class), + G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkRadioButtonClass, group_changed), NULL, NULL, @@ -561,10 +558,10 @@ gtk_radio_button_get_group (GtkRadioButton *radio_button) static void -gtk_radio_button_destroy (GtkObject *object) +gtk_radio_button_destroy (GtkWidget *widget) { GtkWidget *old_group_singleton = NULL; - GtkRadioButton *radio_button = GTK_RADIO_BUTTON (object); + GtkRadioButton *radio_button = GTK_RADIO_BUTTON (widget); GtkRadioButtonPrivate *priv = radio_button->priv; GtkRadioButton *tmp_button; GSList *tmp_list; @@ -594,7 +591,7 @@ gtk_radio_button_destroy (GtkObject *object) if (was_in_group) g_signal_emit (radio_button, group_changed_signal, 0); - GTK_OBJECT_CLASS (gtk_radio_button_parent_class)->destroy (object); + GTK_WIDGET_CLASS (gtk_radio_button_parent_class)->destroy (widget); } static void |