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
parent 480f19dc
......@@ -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"
......
......@@ -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
......
......@@ -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>
......
......@@ -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);
......
......@@ -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>
......
......@@ -165,11 +165,6 @@
<attribute name="action">view.delete-from-trash</attribute>
<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>
......
......@@ -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");
......@@ -7529,9 +7526,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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment