summaryrefslogtreecommitdiff
path: root/gtk/gtklistbox.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-04-07 19:02:35 +0200
committerTimm Bäder <mail@baedert.org>2017-04-25 20:29:02 +0200
commit5d94ee85842ed91007ebf6bdf6a1f54237987536 (patch)
tree86f82ff2ae2d750fe62503897172b2a496d5f83b /gtk/gtklistbox.c
parent4945e28f08a759bbd5f6b3b217b5815882d31ed6 (diff)
downloadgtk+-5d94ee85842ed91007ebf6bdf6a1f54237987536.tar.gz
listbox: Properly remove placeholders
Diffstat (limited to 'gtk/gtklistbox.c')
-rw-r--r--gtk/gtklistbox.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 31cfc45d81..e8fd95ac77 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2484,6 +2484,16 @@ gtk_list_box_remove (GtkContainer *container,
was_visible = gtk_widget_get_visible (child);
+ if (child == priv->placeholder)
+ {
+ gtk_widget_unparent (child);
+ priv->placeholder = NULL;
+ if (was_visible && gtk_widget_get_visible (widget))
+ gtk_widget_queue_resize (widget);
+
+ return;
+ }
+
if (!GTK_IS_LIST_BOX_ROW (child))
{
row = g_hash_table_lookup (priv->header_hash, child);
@@ -2565,7 +2575,7 @@ gtk_list_box_forall (GtkContainer *container,
GSequenceIter *iter;
GtkListBoxRow *row;
- if (priv->placeholder != NULL && include_internals)
+ if (priv->placeholder != NULL)
callback (priv->placeholder, callback_target);
iter = g_sequence_get_begin_iter (priv->children);