radiobutton: Use dispose instead of destroy

The destroy vfunc is going away.
This commit is contained in:
Matthias Clasen 2020-05-05 16:49:48 -04:00
parent c60ffeedfa
commit 8baefaf4d8

View File

@ -160,7 +160,7 @@ enum {
static GParamSpec *radio_button_props[LAST_PROP] = { NULL, };
static guint signals[N_SIGNALS] = { 0 };
static void gtk_radio_button_destroy (GtkWidget *widget);
static void gtk_radio_button_dispose (GObject *object);
static gboolean gtk_radio_button_focus (GtkWidget *widget,
GtkDirectionType direction);
static void gtk_radio_button_clicked (GtkButton *button);
@ -186,6 +186,7 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class)
widget_class = (GtkWidgetClass*) class;
button_class = (GtkButtonClass*) class;
gobject_class->dispose = gtk_radio_button_dispose;
gobject_class->set_property = gtk_radio_button_set_property;
gobject_class->get_property = gtk_radio_button_get_property;
@ -203,7 +204,6 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class)
g_object_class_install_properties (gobject_class, LAST_PROP, radio_button_props);
widget_class->destroy = gtk_radio_button_destroy;
widget_class->focus = gtk_radio_button_focus;
button_class->clicked = gtk_radio_button_clicked;
@ -593,10 +593,10 @@ gtk_radio_button_get_group (GtkRadioButton *radio_button)
static void
gtk_radio_button_destroy (GtkWidget *widget)
gtk_radio_button_dispose (GObject *object)
{
GtkWidget *old_group_singleton = NULL;
GtkRadioButton *radio_button = GTK_RADIO_BUTTON (widget);
GtkRadioButton *radio_button = GTK_RADIO_BUTTON (object);
GtkRadioButtonPrivate *priv = gtk_radio_button_get_instance_private (radio_button);
GSList *tmp_list;
gboolean was_in_group;
@ -627,7 +627,7 @@ gtk_radio_button_destroy (GtkWidget *widget)
if (was_in_group)
g_signal_emit (radio_button, signals[GROUP_CHANGED], 0);
GTK_WIDGET_CLASS (gtk_radio_button_parent_class)->destroy (widget);
G_OBJECT_CLASS (gtk_radio_button_parent_class)->dispose (object);
}
static gboolean