[gedit] FileChooserOpenAdapter: modal dialog



commit c7e57c265ac67b86b0833e6d370202c8474877a4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Jun 7 00:13:10 2020 +0200

    FileChooserOpenAdapter: modal dialog
    
    GeditFileChooserOpen is also modal, so reduce the delta between the two,
    it will permit to simplify the code in gedit-commands-file.c.

 gedit/gedit-file-chooser-open-adapter.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/gedit/gedit-file-chooser-open-adapter.c b/gedit/gedit-file-chooser-open-adapter.c
index 3e3480339..6a835aa05 100644
--- a/gedit/gedit-file-chooser-open-adapter.c
+++ b/gedit/gedit-file-chooser-open-adapter.c
@@ -112,6 +112,13 @@ create_dialog (GeditFileChooserOpen *chooser,
                                                                  _("_Open"),
                                                                  _("_Cancel"));
 
+       /* No need to manually add the dialog window to the GtkWindowGroup of
+        * the parent, setting the parent above is enough.
+        * (but not tested on macOS).
+        */
+
+       gedit_file_chooser_dialog_set_modal (chooser->priv->dialog, TRUE);
+
        g_signal_connect (chooser->priv->dialog,
                          "response",
                          G_CALLBACK (dialog_response_cb),


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