[gtksourceview/wip/chergert/gsv-gtk4: 95/131] completion: use gtk_window_set_hide_on_close()



commit 0e23db342c175c0d65b6ce2b66884aa412709ff7
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 15 14:12:32 2020 -0800

    completion: use gtk_window_set_hide_on_close()
    
    Use GtkWindow:hide-on-close instead of ::delete-event.

 gtksourceview/gtksourcecompletion.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 3c8f2ddc..af95aae6 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2178,10 +2178,8 @@ init_main_window (GtkSourceCompletion *completion,
                                  G_CALLBACK (update_window_position),
                                  completion);
 
-       g_signal_connect (completion->main_window,
-                         "delete-event",
-                         G_CALLBACK (gtk_widget_hide_on_delete),
-                         NULL);
+       gtk_window_set_hide_on_close (GTK_WINDOW (completion->main_window),
+                                     TRUE);
 
        g_signal_connect (completion->main_window,
                          "notify::transient-for",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]