mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-02 14:03:39 +00:00
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.
8af45e55fc
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
This commit is contained in:
parent
6af38c29d2
commit
d6365371d8
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue