diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -659,6 +659,13 @@ gtk_box_insert(GtkBox *box, GtkWidget *child, gboolean expand, gboolean fill, gi gtk_box_pack_start(box, child, expand, fill, padding); gtk_box_reorder_child(box, child, position); } +void +gtk_widget_remove_from_parent(GtkWidget *widget) { + g_object_ref(widget); + GtkWidget *parent = gtk_widget_get_parent(widget); + gtk_container_remove(GTK_CONTAINER(parent), widget); +} + char * util_strcasestr(const char *haystack, const char *needle) { if (needle == NULL || ! *needle ) |