[gimp] app: hide the export file dialog when showing the plug-in dialog.



commit c0972eebb5f1865b0e2a4f6197266b3c6c51d5b1
Author: Jehan <jehan girinstud io>
Date:   Thu Dec 17 18:23:12 2020 +0100

    app: hide the export file dialog when showing the plug-in dialog.
    
    We are piling up the export dialog, then the specific plug-in dialog,
    then possibly more dialog (cf. upcoming commits for metadata handling).
    It's just too much and we end up in a mess of dialogs.
    Of course, if the export fails or it is canceled, we are back to the
    file dialog, which gets shown again, whereas if it succeeds, the file
    dialog is destroyed (just as it already used to be).
    
    Also anyway the file dialog is completely deactivated while the export
    dialog is displayed, so it's just useless. Finally some export support
    have features where looking at the canvas is useful, for instance JPEG
    preview feature. With all these dialogs, it's nearly impossible to look
    at the canvas (with a single display at least).

 app/dialogs/file-save-dialog.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c
index 37714cd502..b0c1478335 100644
--- a/app/dialogs/file-save-dialog.c
+++ b/app/dialogs/file-save-dialog.c
@@ -188,6 +188,13 @@ file_save_dialog_response (GtkWidget *dialog,
             xcf_compression = GIMP_SAVE_DIALOG (dialog)->compression;
           }
 
+        /* Hide the file dialog while exporting, avoid dialogs piling
+         * up, even more as some formats have preview features, so the
+         * file dialog is just blocking the view.
+         */
+        if  (GIMP_IS_EXPORT_DIALOG (dialog))
+          gtk_widget_hide (dialog);
+
         if (file_save_dialog_save_image (GIMP_PROGRESS (dialog),
                                          gimp,
                                          file_dialog->image,
@@ -242,6 +249,10 @@ file_save_dialog_response (GtkWidget *dialog,
 
             gtk_widget_destroy (dialog);
           }
+        else
+          {
+            gtk_widget_show (dialog);
+          }
 
         g_object_unref (file);
         g_free (basename);


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