diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-07-29 13:43:26 -0300 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-07-31 12:09:05 -0300 |
commit | 844e793246f4f0b31ee3dcebc64fffc058c576e1 (patch) | |
tree | 50d04001b9160b3602592ce96efed40958590884 /gtk/gtkmenubutton.c | |
parent | b936666b52bc07bb7ad9349f10f6849744ffb59d (diff) | |
download | gtk+-844e793246f4f0b31ee3dcebc64fffc058c576e1.tar.gz |
menubutton: Clear references in dispose, not finalize
We need to do this here so that an explicit gtk_widget_destroy
on either the widget or a container that holds it will kill the
reference to the menu or model.
https://bugzilla.gnome.org/show_bug.cgi?id=680803
Diffstat (limited to 'gtk/gtkmenubutton.c')
-rw-r--r-- | gtk/gtkmenubutton.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index 6aaada36b0..8a76361f21 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -64,7 +64,7 @@ enum G_DEFINE_TYPE(GtkMenuButton, gtk_menu_button, GTK_TYPE_TOGGLE_BUTTON) -static void gtk_menu_button_finalize (GObject *object); +static void gtk_menu_button_dispose (GObject *object); static void gtk_menu_button_set_property (GObject *object, @@ -367,7 +367,7 @@ gtk_menu_button_class_init (GtkMenuButtonClass *klass) gobject_class->set_property = gtk_menu_button_set_property; gobject_class->get_property = gtk_menu_button_get_property; - gobject_class->finalize = gtk_menu_button_finalize; + gobject_class->dispose = gtk_menu_button_dispose; widget_class->state_flags_changed = gtk_menu_button_state_flags_changed; widget_class->button_press_event = gtk_menu_button_button_press_event; @@ -772,7 +772,7 @@ gtk_menu_button_get_direction (GtkMenuButton *menu_button) } static void -gtk_menu_button_finalize (GObject *object) +gtk_menu_button_dispose (GObject *object) { GtkMenuButtonPrivate *priv = GTK_MENU_BUTTON (object)->priv; @@ -786,5 +786,5 @@ gtk_menu_button_finalize (GObject *object) g_clear_object (&priv->model); - G_OBJECT_CLASS (gtk_menu_button_parent_class)->finalize (object); + G_OBJECT_CLASS (gtk_menu_button_parent_class)->dispose (object); } |