+2007-05-02 Armin Burgmeier <armin@openismus.com>
+
+ * 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 Dom Lachowicz <domlachowicz@gmail.com>
* modules/engines/ms-windows/msw_style.c: MS-Windows Theme top tabs
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);
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;
}
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);