[gnome-commander] Fix for pressing Escape in the warn-delete dialoge
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Fix for pressing Escape in the warn-delete dialoge
- Date: Tue, 9 Mar 2021 21:09:30 +0000 (UTC)
commit 214e79f149248922429bfbaf6f9f4ac25a9fd566
Author: Uwe Scholz <u scholz83 gmx de>
Date: Tue Mar 9 22:01:57 2021 +0100
Fix for pressing Escape in the warn-delete dialoge
src/dialogs/gnome-cmd-delete-dialog.cc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-delete-dialog.cc b/src/dialogs/gnome-cmd-delete-dialog.cc
index 1a8435c6..4907ec61 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.cc
+++ b/src/dialogs/gnome-cmd-delete-dialog.cc
@@ -268,8 +268,8 @@ static GList *remove_items_from_list_to_be_deleted(GList *files)
auto itemsToDelete = g_list_copy(files);
- guint dirCount = 0;
- guint guiResponse = -1;
+ gint dirCount = 0;
+ gint guiResponse = -1;
for (auto file = files; file; file = file->next)
{
auto gnomeCmdFile = (GnomeCmdFile*) file->data;
@@ -305,6 +305,9 @@ static GList *remove_items_from_list_to_be_deleted(GList *files)
dirCount++ == 0 ? _("Delete All") : _("Delete Remaining"),
_("Delete"), nullptr);
+ if (guiResponse != 1 && guiResponse != 2 && guiResponse != 3)
+ guiResponse = 0; // Set to zero for the case the user presses ESCAPE in the warning
dialog)
+
g_free(fname);
g_free(msg);
@@ -328,7 +331,7 @@ static GList *remove_items_from_list_to_be_deleted(GList *files)
}
}
}
- if (guiResponse != 1 && guiResponse != 2 && guiResponse != 3) // Cancel or Escape
+ if (guiResponse == 0) // Cancel
{
g_list_free(itemsToDelete);
return nullptr;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]