[nautilus] nautilus-view: always allow to permanently delete
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus-view: always allow to permanently delete
- Date: Sat, 28 Feb 2015 20:21:17 +0000 (UTC)
commit 655e415e3a5ead27d98b03db14155d61943715ef
Author: Carlos Soriano <csoriano gnome org>
Date: Sat Feb 28 21:10:29 2015 +0100
nautilus-view: always allow to permanently delete
Before 3.15 we had a setting for adding a menu item for permanent
deletion of files. But the shortcut was always enabled no matter the
state of the setting, which seems inconsistent.
Then with the GAction port we changed that behavior to be consistent,
but people that were unaware of the setting were complaining that
the shortcut for permanent deletion was not working.
Given that we show a dialog if we hit that shortcut, and the setting
itself is confusing, just enable always the shortcut but remove the
setting and the menu item for it.
https://bugzilla.gnome.org/show_bug.cgi?id=745321
libnautilus-private/nautilus-global-preferences.h | 1 -
libnautilus-private/nautilus.convert | 1 -
.../org.gnome.nautilus.gschema.xml.in | 5 -----
src/nautilus-file-management-properties.c | 4 ----
src/nautilus-file-management-properties.ui | 16 ----------------
src/nautilus-view-context-menus.xml | 5 -----
src/nautilus-view.c | 8 +-------
7 files changed, 1 insertions(+), 39 deletions(-)
---
diff --git a/libnautilus-private/nautilus-global-preferences.h
b/libnautilus-private/nautilus-global-preferences.h
index d4272b7..f7238b6 100644
--- a/libnautilus-private/nautilus-global-preferences.h
+++ b/libnautilus-private/nautilus-global-preferences.h
@@ -32,7 +32,6 @@ G_BEGIN_DECLS
/* Trash options */
#define NAUTILUS_PREFERENCES_CONFIRM_TRASH "confirm-trash"
-#define NAUTILUS_PREFERENCES_ENABLE_DELETE "enable-delete"
/* Display */
#define NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES "show-hidden"
diff --git a/libnautilus-private/nautilus.convert b/libnautilus-private/nautilus.convert
index c329e6b..4784f79 100644
--- a/libnautilus-private/nautilus.convert
+++ b/libnautilus-private/nautilus.convert
@@ -2,7 +2,6 @@
tabs-open-position = /desktop/gnome/file_views/tabs_open_position
always-use-location-entry = /apps/nautilus/preferences/always_use_location_entry
confirm-trash = /apps/nautilus/preferences/confirm_trash
-enable-delete = /apps/nautilus/preferences/enable_delete
show-directory-item-counts = /apps/nautilus/preferences/show_directory_item_counts
click-policy = /apps/nautilus/preferences/click_policy
executable-text-activation = /apps/nautilus/preferences/executable_text_activation
diff --git a/libnautilus-private/org.gnome.nautilus.gschema.xml.in
b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
index 8cbe272..4e92792 100644
--- a/libnautilus-private/org.gnome.nautilus.gschema.xml.in
+++ b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
@@ -75,11 +75,6 @@
<_summary>Whether to ask for confirmation when deleting files, or emptying Trash</_summary>
<_description>If set to true, then Nautilus will ask for confirmation when you attempt to delete
files, or empty the Trash.</_description>
</key>
- <key name="enable-delete" type="b">
- <default>false</default>
- <_summary>Whether to enable immediate deletion</_summary>
- <_description>If set to true, then Nautilus will have a feature allowing you to delete a file
immediately and in-place, instead of moving it to the trash. This feature can be dangerous, so use
caution.</_description>
- </key>
<key name="show-directory-item-counts" enum="org.gnome.nautilus.SpeedTradeoff">
<aliases><alias value='local_only' target='local-only'/></aliases>
<default>'local-only'</default>
diff --git a/src/nautilus-file-management-properties.c b/src/nautilus-file-management-properties.c
index 80ac0d9..2b8a158 100644
--- a/src/nautilus-file-management-properties.c
+++ b/src/nautilus-file-management-properties.c
@@ -51,7 +51,6 @@
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_FOLDERS_FIRST_WIDGET "sort_folders_first_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_USE_TREE_WIDGET "use_tree_view_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_CONFIRM_WIDGET "trash_confirm_checkbutton"
-#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_DELETE_WIDGET "trash_delete_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SHOW_HIDDEN_WIDGET "hidden_files_checkbutton"
/* int enums */
@@ -611,9 +610,6 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
bind_builder_bool (builder, nautilus_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_CONFIRM_WIDGET,
NAUTILUS_PREFERENCES_CONFIRM_TRASH);
- bind_builder_bool (builder, nautilus_preferences,
- NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_DELETE_WIDGET,
- NAUTILUS_PREFERENCES_ENABLE_DELETE);
bind_builder_bool (builder, gtk_filechooser_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SHOW_HIDDEN_WIDGET,
NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES);
diff --git a/src/nautilus-file-management-properties.ui b/src/nautilus-file-management-properties.ui
index 31fb39e..a4f68eb 100644
--- a/src/nautilus-file-management-properties.ui
+++ b/src/nautilus-file-management-properties.ui
@@ -652,22 +652,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="trash_delete_checkbutton">
- <property name="label" translatable="yes">I_nclude a Delete command that
bypasses Trash</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">1</property>
- </packing>
- </child>
</object>
</child>
</object>
diff --git a/src/nautilus-view-context-menus.xml b/src/nautilus-view-context-menus.xml
index 45a521d..a219d2c 100644
--- a/src/nautilus-view-context-menus.xml
+++ b/src/nautilus-view-context-menus.xml
@@ -166,11 +166,6 @@
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
- <attribute name="label" translatable="yes">D_elete Permanently</attribute>
- <attribute name="action">view.delete-permanently</attribute>
- <attribute name="hidden-when">action-disabled</attribute>
- </item>
- <item>
<attribute name="label" translatable="yes">Empty Trash</attribute>
<attribute name="action">view.empty-trash</attribute>
<attribute name="hidden-when">action-disabled</attribute>
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 70c99d8..1faba74 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -6014,11 +6014,8 @@ real_update_actions_state (NautilusView *view)
action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
"delete-permanently");
- /* Only show it in trash folder or if the setting to include a delete
- * menu item is enabled */
- show_separate_delete_command = g_settings_get_boolean (nautilus_preferences,
NAUTILUS_PREFERENCES_ENABLE_DELETE);
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
- can_delete_files && show_separate_delete_command);
+ can_delete_files);
action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
"cut");
@@ -7530,9 +7527,6 @@ nautilus_view_init (NautilusView *view)
gtk_widget_show (GTK_WIDGET (view));
g_signal_connect_swapped (nautilus_preferences,
- "changed::" NAUTILUS_PREFERENCES_ENABLE_DELETE,
- G_CALLBACK (schedule_update_context_menus), view);
- g_signal_connect_swapped (nautilus_preferences,
"changed::" NAUTILUS_PREFERENCES_CLICK_POLICY,
G_CALLBACK (click_policy_changed_callback),
view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]