[tepl] File loading: destroy dialog when main window is closed



commit a49c8016f3ce67532ab0e20271888607a3d254c9
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Oct 14 16:45:33 2017 +0200

    File loading: destroy dialog when main window is closed

 tepl/tepl-application-window.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tepl/tepl-application-window.c b/tepl/tepl-application-window.c
index e8c775b..133c36b 100644
--- a/tepl/tepl-application-window.c
+++ b/tepl/tepl-application-window.c
@@ -184,6 +184,11 @@ open_cb (GSimpleAction *open_action,
        gtk_dialog_set_default_response (GTK_DIALOG (file_chooser_dialog), GTK_RESPONSE_ACCEPT);
        gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (file_chooser_dialog), FALSE);
 
+       /* Do not set it modal, it's not absolutely required. But in that case
+        * it's better to destroy the dialog when the main window is closed.
+        */
+       gtk_window_set_destroy_with_parent (GTK_WINDOW (file_chooser_dialog), TRUE);
+
        window_group = tepl_application_window_get_window_group (tepl_window);
        gtk_window_group_add_window (window_group, GTK_WINDOW (file_chooser_dialog));
 


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