summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 9410e0c9..d736952c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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 )