summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-07-29 22:25:52 +0200
committerBenjamin Otte <otte@redhat.com>2015-07-31 04:03:44 +0200
commitbbd9c5983211244ec5bc8fb0ecc0e67d9f8345a6 (patch)
tree9f4625246d18bbdc8c984fe40156c7231c891f13
parent1261ec985bc856bc9efde4aec7cc68b72ede12d6 (diff)
downloadgtk+-bbd9c5983211244ec5bc8fb0ecc0e67d9f8345a6.tar.gz
combobox: Handle NULLing the cellview on remove simpler
-rw-r--r--gtk/gtkcombobox.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 3c79f912e7..0f77a2dd41 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1556,18 +1556,12 @@ gtk_combo_box_add (GtkContainer *container,
gtk_widget_unparent (priv->cell_view);
_gtk_bin_set_child (GTK_BIN (container), NULL);
gtk_widget_queue_resize (GTK_WIDGET (container));
+ priv->cell_view = NULL;
}
gtk_widget_set_parent (widget, GTK_WIDGET (container));
_gtk_bin_set_child (GTK_BIN (container), widget);
- if (priv->cell_view &&
- widget != priv->cell_view)
- {
- /* since the cell_view was unparented, it's gone now */
- priv->cell_view = NULL;
- }
-
if (priv->has_entry)
{
/* this flag is a hack to tell the entry to fill its allocation.