[nautilus] mime-actions: Close broken link message dialog
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] mime-actions: Close broken link message dialog
- Date: Sat, 21 May 2022 16:20:30 +0000 (UTC)
commit d6365371d8c37713d06fd932ae33cf5ae017ee29
Author: António Fernandes <antoniojpfernandes gmail com>
Date: Sat May 21 16:20:30 2022 +0000
mime-actions: Close broken link message dialog
We used to rely on gtk_dialog_run(), which would allow us to block the
execution of the current function.
But it's gone in GTK 4, so we've ported to the ::response signal.
8af45e55fcc347b05c4376128df5f248732d07d8
However, a 'goto` which relied on the blocking behavior was kept 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
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 9adebffc3..3ceb0a953 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]