[nautilus] file-operations: Mark certain buttons as destructive actions
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: Mark certain buttons as destructive actions
- Date: Mon, 9 Mar 2020 14:01:36 +0000 (UTC)
commit 471a9893af493a9c25d3fa1b2fe702bac21942b3
Author: Alexey Chernyshov <eiden127 gmail com>
Date: Mon Nov 18 21:27:16 2019 +0200
file-operations: Mark certain buttons as destructive actions
Marks 'Empty Trash' and 'Delete All' buttons as destructive actions
which have special appearance making them consistent with other
destructive actions.
Fixes #969
src/nautilus-file-operations.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index a90706e2e..a9266c336 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -227,6 +227,7 @@ typedef struct
#define MERGE _("_Merge")
#define MERGE_ALL _("Merge _All")
#define COPY_FORCE _("Copy _Anyway")
+#define EMPTY_TRASH _("Empty _Trash")
static gboolean
is_all_button_text (const char *button_text)
@@ -1229,7 +1230,9 @@ do_run_simple_dialog (gpointer _data)
button = gtk_dialog_add_button (GTK_DIALOG (dialog), button_title, response_id);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), response_id);
- if (g_strcmp0 (button_title, DELETE) == 0)
+ if (g_strcmp0 (button_title, DELETE) == 0 ||
+ g_strcmp0 (button_title, EMPTY_TRASH) == 0 ||
+ g_strcmp0 (button_title, DELETE_ALL) == 0)
{
gtk_style_context_add_class (gtk_widget_get_style_context (button),
"destructive-action");
@@ -1585,7 +1588,7 @@ confirm_empty_trash (CommonJob *job)
g_strdup (_("All items in the Trash will be permanently deleted.")),
NULL,
FALSE,
- CANCEL, _("Empty _Trash"),
+ CANCEL, EMPTY_TRASH,
NULL);
return (response == 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]