From 9d573d5f694cd4d13bd60afb5e2ef09742ad6971 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 1 Feb 2007 11:42:38 +0000 Subject: [PATCH] remove extra reference that gtkcombobox keeps on priv->popup_widget if Thu Feb 1 12:22:06 2007 Tim Janik * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): remove extra reference that gtkcombobox keeps on priv->popup_widget if it's a tree view. svn path=/trunk/; revision=17246 --- ChangeLog | 5 +++++ gtk/gtkcombobox.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34c3089e10..76e33a43e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 1 12:22:06 2007 Tim Janik + + * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): remove extra reference + that gtkcombobox keeps on priv->popup_widget if it's a tree view. + 2007-01-31 Christian Persch * gtk/gtkaboutdialog.c: (update_credits_button_visibility), diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 235a320400..9fa730efd2 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1479,7 +1479,6 @@ gtk_combo_box_list_position (GtkComboBox *combo_box, gint *width, gint *height) { - GtkWidget *sample; GdkScreen *screen; gint monitor_num; GdkRectangle monitor; @@ -1488,7 +1487,7 @@ gtk_combo_box_list_position (GtkComboBox *combo_box, /* under windows, the drop down list is as wide as the combo box itself. see bug #340204 */ - sample = combo_box; + GtkWidget *sample = GTK_WIDGET (combo_box); gdk_window_get_origin (sample->window, x, y); @@ -3570,7 +3569,11 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box) gtk_widget_destroy (combo_box->priv->tree_view); combo_box->priv->tree_view = NULL; - combo_box->priv->popup_widget = NULL; + if (combo_box->priv->popup_widget) + { + g_object_unref (combo_box->priv->popup_widget); + combo_box->priv->popup_widget = NULL; + } } /* callbacks */