mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-07 19:30:12 +00:00
radiobutton: Use dispose instead of destroy
The destroy vfunc is going away.
This commit is contained in:
parent
c60ffeedfa
commit
8baefaf4d8
@ -160,7 +160,7 @@ enum {
|
|||||||
static GParamSpec *radio_button_props[LAST_PROP] = { NULL, };
|
static GParamSpec *radio_button_props[LAST_PROP] = { NULL, };
|
||||||
static guint signals[N_SIGNALS] = { 0 };
|
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,
|
static gboolean gtk_radio_button_focus (GtkWidget *widget,
|
||||||
GtkDirectionType direction);
|
GtkDirectionType direction);
|
||||||
static void gtk_radio_button_clicked (GtkButton *button);
|
static void gtk_radio_button_clicked (GtkButton *button);
|
||||||
@ -186,6 +186,7 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class)
|
|||||||
widget_class = (GtkWidgetClass*) class;
|
widget_class = (GtkWidgetClass*) class;
|
||||||
button_class = (GtkButtonClass*) class;
|
button_class = (GtkButtonClass*) class;
|
||||||
|
|
||||||
|
gobject_class->dispose = gtk_radio_button_dispose;
|
||||||
gobject_class->set_property = gtk_radio_button_set_property;
|
gobject_class->set_property = gtk_radio_button_set_property;
|
||||||
gobject_class->get_property = gtk_radio_button_get_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);
|
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;
|
widget_class->focus = gtk_radio_button_focus;
|
||||||
|
|
||||||
button_class->clicked = gtk_radio_button_clicked;
|
button_class->clicked = gtk_radio_button_clicked;
|
||||||
@ -593,10 +593,10 @@ gtk_radio_button_get_group (GtkRadioButton *radio_button)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_radio_button_destroy (GtkWidget *widget)
|
gtk_radio_button_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
GtkWidget *old_group_singleton = NULL;
|
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);
|
GtkRadioButtonPrivate *priv = gtk_radio_button_get_instance_private (radio_button);
|
||||||
GSList *tmp_list;
|
GSList *tmp_list;
|
||||||
gboolean was_in_group;
|
gboolean was_in_group;
|
||||||
@ -627,7 +627,7 @@ gtk_radio_button_destroy (GtkWidget *widget)
|
|||||||
if (was_in_group)
|
if (was_in_group)
|
||||||
g_signal_emit (radio_button, signals[GROUP_CHANGED], 0);
|
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
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user