[gtk+/wip/matthiasc/kill-event-signals: 50/123] applicationwindow: Stop connecting to ::delete-event



commit b4a223009a91eb60a86ad1a23f5de4465339fb05
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Dec 31 11:41:09 2017 -0500

    applicationwindow: Stop connecting to ::delete-event
    
    We can just use GtkWindow::hide-on-close.

 gtk/gtkapplicationwindow.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 2a33ceb..6ac9752 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -970,12 +970,10 @@ gtk_application_window_set_help_overlay (GtkApplicationWindow *window,
     return;
 
   gtk_window_set_modal (GTK_WINDOW (help_overlay), TRUE);
+  gtk_window_set_hide_on_close (GTK_WINDOW (help_overlay), TRUE);
   gtk_window_set_transient_for (GTK_WINDOW (help_overlay), GTK_WINDOW (window));
   gtk_shortcuts_window_set_window (help_overlay, GTK_WINDOW (window));
 
-  g_signal_connect (help_overlay, "delete-event",
-                    G_CALLBACK (gtk_widget_hide_on_delete), NULL);
-
   if (!g_action_map_lookup_action (G_ACTION_MAP (window->priv->actions), "show-help-overlay"))
     {
       GSimpleAction *action;


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