summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Burgmeier <armin@openismus.com>2007-05-03 16:22:38 +0000
committerArmin Burgmeier <arminb@src.gnome.org>2007-05-03 16:22:38 +0000
commit1f5902ec2597b3ea491f8070159545a4c389c4f7 (patch)
tree0d785bd21d9df7e361cd9299f189cb29d22de585
parenteda414c03b12bf867137123e73abf12cc725579d (diff)
downloadgdk-pixbuf-1f5902ec2597b3ea491f8070159545a4c389c4f7.tar.gz
Merge from trunk:
2007-05-02 Armin Burgmeier <armin@openismus.com> Merge from trunk: * gtk/gtkcombobox.c: Destroy the menu in dispose instead of finalize, because the menu might unparent itself from its parent and cause a signal emission on a finalized object. (#430746) svn path=/branches/gtk-2-10/; revision=17787
-rw-r--r--ChangeLog8
-rw-r--r--gtk/gtkcombobox.c16
2 files changed, 21 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0da04aba3..eaebb269f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-05-02 Armin Burgmeier <armin@openismus.com>
+
+ Merge from trunk:
+
+ * gtk/gtkcombobox.c: Destroy the menu in dispose instead of
+ finalize, because the menu might unparent itself from its parent and
+ cause a signal emission on a finalized object. (#430746)
+
2007-05-02 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 8cf10603f..53e99c4d8 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -212,6 +212,7 @@ static guint combo_box_signals[LAST_SIGNAL] = {0,};
static void gtk_combo_box_cell_layout_init (GtkCellLayoutIface *iface);
static void gtk_combo_box_cell_editable_init (GtkCellEditableIface *iface);
+static void gtk_combo_box_dispose (GObject *object);
static void gtk_combo_box_finalize (GObject *object);
static void gtk_combo_box_destroy (GtkObject *object);
@@ -478,6 +479,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
gtk_object_class->destroy = gtk_combo_box_destroy;
object_class = (GObjectClass *)klass;
+ object_class->dispose = gtk_combo_box_dispose;
object_class->finalize = gtk_combo_box_finalize;
object_class->set_property = gtk_combo_box_set_property;
object_class->get_property = gtk_combo_box_get_property;
@@ -5001,17 +5003,25 @@ gtk_combo_box_destroy (GtkObject *object)
}
static void
-gtk_combo_box_finalize (GObject *object)
+gtk_combo_box_dispose(GObject* object)
{
GtkComboBox *combo_box = GTK_COMBO_BOX (object);
- GSList *i;
-
+
if (GTK_IS_MENU (combo_box->priv->popup_widget))
{
gtk_combo_box_menu_destroy (combo_box);
gtk_menu_detach (GTK_MENU (combo_box->priv->popup_widget));
combo_box->priv->popup_widget = NULL;
}
+
+ G_OBJECT_CLASS (gtk_combo_box_parent_class)->dispose (object);
+}
+
+static void
+gtk_combo_box_finalize (GObject *object)
+{
+ GtkComboBox *combo_box = GTK_COMBO_BOX (object);
+ GSList *i;
if (GTK_IS_TREE_VIEW (combo_box->priv->tree_view))
gtk_combo_box_list_destroy (combo_box);