[nautilus/cherry-pick-4e250241] mime-actions: Close broken link message dialog




commit c43a00cd246b3723a082f93b985b560ffbfa464a
Author: António Fernandes <antoniojpfernandes gmail com>
Date:   Sun May 15 21:31:21 2022 +0000

    mime-actions: Close broken link message dialog
    
    When we ported away from gtk_dialog_run(), a rogue `goto` was left by oversight,
    such that the ::response signal wasn't connected and, as a result, the dialog didn't
    close on response.
    
    Close https://gitlab.gnome.org/GNOME/nautilus/-/issues/2265
    
    (cherry picked from commit 4e25024157e124a13c32ef8ac8297b9163222022)

 src/nautilus-mime-actions.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 4c2fede9a..be95125bb 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -613,16 +613,17 @@ report_broken_symbolic_link (GtkWindow    *parent_window,
                                     "“%s” doesn’t exist."), target_path);
     }
 
-    if (!can_trash)
+    if (can_trash)
+    {
+        dialog = eel_show_yes_no_dialog (prompt, detail, _("Mo_ve to Trash"), _("_Cancel"),
+                                         parent_window);
+    }
+    else
     {
         dialog = eel_show_simple_dialog (GTK_WIDGET (parent_window), GTK_MESSAGE_WARNING,
                                          prompt, detail, _("_Cancel"), NULL);
-        goto out;
     }
 
-    dialog = eel_show_yes_no_dialog (prompt, detail, _("Mo_ve to Trash"), _("_Cancel"),
-                                     parent_window);
-
     gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
 
     /* Make this modal to avoid problems with reffing the view & file
@@ -643,7 +644,6 @@ report_broken_symbolic_link (GtkWindow    *parent_window,
                       G_CALLBACK (trash_symbolic_link_cb),
                       data);
 
-out:
     g_free (prompt);
     g_free (target_path);
     g_free (detail);


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