Skip to content

Commit 4722a21

Browse files
committed
CbTweetListBox: Re-implement remove_all
1 parent dbbe043 commit 4722a21

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/CbTweetListBox.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,14 @@ cb_tweet_list_box_get_placeholder (CbTweetListBox *self)
225225
void
226226
cb_tweet_list_box_remove_all (CbTweetListBox *self)
227227
{
228+
GList *children = gtk_container_get_children (GTK_CONTAINER (self));
229+
GList *l;
228230

231+
for (l = children; l; l = l->next)
232+
{
233+
if (GTK_WIDGET (l->data) != self->placeholder)
234+
gtk_container_remove ((GtkContainer *)self, l->data);
235+
}
236+
237+
g_list_free (children);
229238
}

0 commit comments

Comments
 (0)