[tepl] File loading: add dialog window to GtkWindowGroup



commit c3ed4311b23dbf5a9ffaeec13ced5bc7c2ec4f95
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Oct 14 16:01:35 2017 +0200

    File loading: add dialog window to GtkWindowGroup

 tepl/tepl-application-window.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/tepl/tepl-application-window.c b/tepl/tepl-application-window.c
index df463cb..32584f2 100644
--- a/tepl/tepl-application-window.c
+++ b/tepl/tepl-application-window.c
@@ -164,6 +164,7 @@ open_cb (GSimpleAction *open_action,
 {
        TeplApplicationWindow *tepl_window = TEPL_APPLICATION_WINDOW (user_data);
        GtkWidget *file_chooser_dialog;
+       GtkWindowGroup *window_group;
 
        /* Create a GtkFileChooserDialog, not a GtkFileChooserNative, because
         * with GtkFileChooserNative the GFile that we obtain (in flatpak)
@@ -184,6 +185,9 @@ 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);
 
+       window_group = tepl_application_window_get_window_group (tepl_window);
+       gtk_window_group_add_window (window_group, GTK_WINDOW (file_chooser_dialog));
+
        g_signal_connect_object (file_chooser_dialog,
                                 "response",
                                 G_CALLBACK (open_file_chooser_response_cb),


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