diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-09 12:03:11 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-11 12:19:37 -0400 |
commit | 8f9c3ed44a2ea1a2e622d3e5cda923b74b2c0a8e (patch) | |
tree | b44f590a0f5cfc7d7e720304821009dbfae9e200 /demos/gtk-demo/textundo.c | |
parent | 9ce7b16dd8173afb94aaf7c374dfb6b69c98c135 (diff) | |
download | gtk+-8f9c3ed44a2ea1a2e622d3e5cda923b74b2c0a8e.tar.gz |
Stop using gtk_widget_destroyed
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
Diffstat (limited to 'demos/gtk-demo/textundo.c')
-rw-r--r-- | demos/gtk-demo/textundo.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/demos/gtk-demo/textundo.c b/demos/gtk-demo/textundo.c index d7e35e0851..e6b99c202e 100644 --- a/demos/gtk-demo/textundo.c +++ b/demos/gtk-demo/textundo.c @@ -26,11 +26,8 @@ do_textundo (GtkWidget *do_widget) window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); - gtk_window_set_default_size (GTK_WINDOW (window), - 450, 450); - - g_signal_connect (window, "destroy", - G_CALLBACK (gtk_widget_destroyed), &window); + gtk_window_set_default_size (GTK_WINDOW (window), 450, 450); + g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window); gtk_window_set_title (GTK_WINDOW (window), "TextView Undo"); |