[gnome-builder/wip/gtk4-port: 705/736] libide/gtk: add widget destroyed helper
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 705/736] libide/gtk: add widget destroyed helper
- Date: Tue, 26 Apr 2022 01:46:36 +0000 (UTC)
commit ca67aa3971446d8d1c110067f2eb78e95cada6f9
Author: Christian Hergert <chergert redhat com>
Date: Thu Apr 21 10:42:49 2022 -0700
libide/gtk: add widget destroyed helper
Since this is not in GTK anymore, but we can still use it, just make a
copy of it ourselves to simplify porting for now.
src/libide/gtk/ide-gtk.c | 8 ++++++++
src/libide/gtk/ide-gtk.h | 2 ++
2 files changed, 10 insertions(+)
---
diff --git a/src/libide/gtk/ide-gtk.c b/src/libide/gtk/ide-gtk.c
index a83367693..75e2fd1bb 100644
--- a/src/libide/gtk/ide-gtk.c
+++ b/src/libide/gtk/ide-gtk.c
@@ -373,3 +373,11 @@ ide_gtk_list_store_insert_sorted (GtkListStore *store,
else
gtk_list_store_insert_after (store, iter, &middle);
}
+
+void
+ide_gtk_widget_destroyed (GtkWidget *widget,
+ GtkWidget **location)
+{
+ if (location != NULL)
+ *location = NULL;
+}
diff --git a/src/libide/gtk/ide-gtk.h b/src/libide/gtk/ide-gtk.h
index 843cda571..b625410c2 100644
--- a/src/libide/gtk/ide-gtk.h
+++ b/src/libide/gtk/ide-gtk.h
@@ -52,5 +52,7 @@ void ide_gtk_list_store_insert_sorted (GtkListStore *store,
guint compare_column,
GCompareDataFunc compare_func,
gpointer compare_data);
+void ide_gtk_widget_destroyed (GtkWidget *widget,
+ GtkWidget **location);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]