]> Pileus Git - ~andy/gtk/commitdiff
remove extra reference that gtkcombobox keeps on priv->popup_widget if
authorTim Janik <timj@imendio.com>
Thu, 1 Feb 2007 11:42:38 +0000 (11:42 +0000)
committerTim Janik <timj@src.gnome.org>
Thu, 1 Feb 2007 11:42:38 +0000 (11:42 +0000)
Thu Feb  1 12:22:06 2007  Tim Janik  <timj@imendio.com>

        * 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
gtk/gtkcombobox.c

index 34c3089e107d5ef55a3381759073ba0318c65127..76e33a43e71da4e53830e390d040e113e8659d46 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb  1 12:22:06 2007  Tim Janik  <timj@imendio.com>
+
+       * 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  <chpe@svn.gnome.org>
 
        * gtk/gtkaboutdialog.c: (update_credits_button_visibility),
index 235a320400355723a2f365614d6dcd509560dea2..9fa730efd2d46397cda2f5d81a29029c6794ba13 100644 (file)
@@ -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 */