summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRazvan Chitu <razvan.ch95@gmail.com>2015-12-21 15:38:04 +0200
committerCarlos Soriano <csoriano@gnome.org>2015-12-21 18:41:39 +0100
commit1c6e94d38995a37727b17da14fd3dbc2edca6163 (patch)
treedd4922c6433982f0428d8b2116e6ebf87a6ef654
parentb72f7c75e224db410ce52e9d05b28d0e6db042a7 (diff)
downloadnautilus-1c6e94d38995a37727b17da14fd3dbc2edca6163.tar.gz
preferences: add UI preference dialog option for enabling "Delete Permanently"
A gsetting was previously added for enabling the "Delete Permanently" option in the menu. Add a checkbox to the preferences dialog that allows users to change the value of the gsetting. https://bugzilla.gnome.org/show_bug.cgi?id=759712
-rw-r--r--src/nautilus-preferences-dialog.c5
-rw-r--r--src/resources/ui/nautilus-preferences-dialog.ui16
2 files changed, 21 insertions, 0 deletions
diff --git a/src/nautilus-preferences-dialog.c b/src/nautilus-preferences-dialog.c
index 24c22e4ce..8b10e7c8b 100644
--- a/src/nautilus-preferences-dialog.c
+++ b/src/nautilus-preferences-dialog.c
@@ -51,6 +51,8 @@
/* bool preferences */
#define NAUTILUS_PREFERENCES_DIALOG_FOLDERS_FIRST_WIDGET \
"sort_folders_first_checkbutton"
+#define NAUTILUS_PREFERENCES_DIALOG_DELETE_PERMANENTLY_WIDGET \
+ "show_delete_permanently_checkbutton"
#define NAUTILUS_PREFERENCES_DIALOG_LIST_VIEW_USE_TREE_WIDGET \
"use_tree_view_checkbutton"
#define NAUTILUS_PREFERENCES_DIALOG_TRASH_CONFIRM_WIDGET \
@@ -483,6 +485,9 @@ static void nautilus_preferences_dialog_setup(GtkBuilder *builder,
bind_builder_bool(builder, nautilus_list_view_preferences,
NAUTILUS_PREFERENCES_DIALOG_LIST_VIEW_USE_TREE_WIDGET,
NAUTILUS_PREFERENCES_LIST_VIEW_USE_TREE);
+ bind_builder_bool(builder, nautilus_preferences,
+ NAUTILUS_PREFERENCES_DIALOG_DELETE_PERMANENTLY_WIDGET,
+ NAUTILUS_PREFERENCES_SHOW_DELETE_PERMANENTLY);
bind_builder_enum(builder, nautilus_preferences,
NAUTILUS_PREFERENCES_DIALOG_SORT_ORDER_WIDGET,
diff --git a/src/resources/ui/nautilus-preferences-dialog.ui b/src/resources/ui/nautilus-preferences-dialog.ui
index b7b88a362..27ed13637 100644
--- a/src/resources/ui/nautilus-preferences-dialog.ui
+++ b/src/resources/ui/nautilus-preferences-dialog.ui
@@ -135,6 +135,22 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="show_delete_permanently_checkbutton">
+ <property name="label" translatable="yes">Show context menu item to delete files permanently</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
</child>
</object>