[gnome-commander] noop: Rename some define statements
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] noop: Rename some define statements
- Date: Sun, 11 Jul 2021 21:45:32 +0000 (UTC)
commit b67d914f59876da7d1988837170dabd15bb0ab3c
Author: Uwe Scholz <u scholz83 gmx de>
Date: Mon Jul 5 20:01:35 2021 +0200
noop: Rename some define statements
src/dialogs/gnome-cmd-delete-dialog.cc | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-delete-dialog.cc b/src/dialogs/gnome-cmd-delete-dialog.cc
index be477316..e8e4b777 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.cc
+++ b/src/dialogs/gnome-cmd-delete-dialog.cc
@@ -31,10 +31,10 @@
using namespace std;
-#define CANCEL 0
-#define SKIP 1
-#define DELETEALL 2
-#define DELETE 3
+#define DELETE_NONEMPTY_CANCEL 0
+#define DELETE_NONEMPTY_SKIP 1
+#define DELETE_NONEMPTY_DELETEALL 2
+#define DELETE_NONEMPTY_DELETE 3
struct DeleteData
{
@@ -314,21 +314,24 @@ static GList *remove_items_from_list_to_be_deleted(GList *files)
dirCount++ == 0 ? _("Delete All") : _("Delete Remaining"),
_("Delete"), nullptr);
- if (guiResponse != SKIP && guiResponse != DELETEALL && guiResponse != DELETE)
- guiResponse = CANCEL; // Set to zero for the case the user presses ESCAPE in the warning
dialog)
-
+ if (guiResponse != DELETE_NONEMPTY_SKIP
+ && guiResponse != DELETE_NONEMPTY_DELETEALL
+ && guiResponse != DELETE_NONEMPTY_DELETE)
+ {
+ guiResponse = DELETE_NONEMPTY_CANCEL; // Set to zero for the case the user presses
ESCAPE in the warning dialog)
+ }
g_free(msg);
- if (guiResponse == CANCEL || guiResponse == DELETEALL)
+ if (guiResponse == DELETE_NONEMPTY_CANCEL || guiResponse == DELETE_NONEMPTY_DELETEALL)
{
break;
}
- else if (guiResponse == SKIP)
+ else if (guiResponse == DELETE_NONEMPTY_SKIP)
{
itemsToDelete = g_list_remove(itemsToDelete, file->data);
continue;
}
- else if (guiResponse == DELETE)
+ else if (guiResponse == DELETE_NONEMPTY_DELETE)
{
continue;
}
@@ -339,7 +342,7 @@ static GList *remove_items_from_list_to_be_deleted(GList *files)
}
}
}
- if (guiResponse == CANCEL)
+ if (guiResponse == DELETE_NONEMPTY_CANCEL)
{
g_list_free(itemsToDelete);
return nullptr;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]