diff options
author | Carlos Soriano <carlos.sorian89@gmail.com> | 2015-01-05 15:58:34 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-01-13 15:06:15 +0100 |
commit | 85299920243c7c8ed397e136cc09f1ae257c42a6 (patch) | |
tree | 264c5ad561cca76c4078a961699c0e267ef0e6eb | |
parent | c567c6fa7baf46be61d90b9b8cbbf6928b368f23 (diff) | |
download | nautilus-85299920243c7c8ed397e136cc09f1ae257c42a6.tar.gz |
nautilus-view: drop empty trash on view
When the user is in the trash, there's already a inapp dialog that shows
a button to empty the trash. On the other hand the sidebar also shows
this item.
Since it's not expected the user to see the trash directly as a folder,
drop this item from the menus.
-rw-r--r-- | src/nautilus-actions.h | 1 | ||||
-rw-r--r-- | src/nautilus-directory-view-ui.xml | 3 | ||||
-rw-r--r-- | src/nautilus-view.c | 27 |
3 files changed, 0 insertions, 31 deletions
diff --git a/src/nautilus-actions.h b/src/nautilus-actions.h index be9386c99..599f7368c 100644 --- a/src/nautilus-actions.h +++ b/src/nautilus-actions.h @@ -61,7 +61,6 @@ #define NAUTILUS_ACTION_PROPERTIES "Properties" #define NAUTILUS_ACTION_PROPERTIES_ACCEL "PropertiesAccel" #define NAUTILUS_ACTION_LOCATION_PROPERTIES "LocationProperties" -#define NAUTILUS_ACTION_EMPTY_TRASH "Empty Trash" #define NAUTILUS_ACTION_CUT "Cut" #define NAUTILUS_ACTION_LOCATION_CUT "LocationCut" #define NAUTILUS_ACTION_COPY "Copy" diff --git a/src/nautilus-directory-view-ui.xml b/src/nautilus-directory-view-ui.xml index 58080bffd..2565d4e7e 100644 --- a/src/nautilus-directory-view-ui.xml +++ b/src/nautilus-directory-view-ui.xml @@ -16,9 +16,6 @@ <placeholder name="New Documents Placeholder"/> </menu> </placeholder> - <placeholder name="Global File Items Placeholder"> - <menuitem name="Empty Trash" action="Empty Trash"/> - </placeholder> <placeholder name="Edit Actions"> <placeholder name="Undostack Actions"> <menuitem name="Undo" action="Undo"/> diff --git a/src/nautilus-view.c b/src/nautilus-view.c index 00eb61049..0701a7466 100644 --- a/src/nautilus-view.c +++ b/src/nautilus-view.c @@ -1398,15 +1398,6 @@ action_select_pattern_callback (GtkAction *action, select_pattern(callback_data); } -static void -action_empty_trash_callback (GtkAction *action, - gpointer callback_data) -{ - g_assert (NAUTILUS_IS_VIEW (callback_data)); - - nautilus_file_operations_empty_trash (GTK_WIDGET (callback_data)); -} - typedef struct { NautilusView *view; NautilusFile *new_file; @@ -6673,10 +6664,6 @@ static const GtkActionEntry directory_view_entries[] = { /* label, accelerator */ N_("_Open Scripts Folder"), NULL, /* tooltip */ N_("Show the folder containing the scripts that appear in this menu"), G_CALLBACK (action_open_scripts_folder_callback) }, - /* name, stock id */ { NAUTILUS_ACTION_EMPTY_TRASH, NULL, - /* label, accelerator */ N_("E_mpty Trash"), NULL, - /* tooltip */ N_("Delete all items in the Trash"), - G_CALLBACK (action_empty_trash_callback) }, /* name, stock id */ { NAUTILUS_ACTION_CUT, NULL, /* label, accelerator */ N_("Cu_t"), "<control>X", /* tooltip */ N_("Prepare the selected files to be moved with a Paste command"), @@ -7020,12 +7007,6 @@ clipboard_targets_received (GtkClipboard *clipboard, } static gboolean -should_show_empty_trash (NautilusView *view) -{ - return (showing_trash_directory (view)); -} - -static gboolean file_list_all_are_folders (GList *file_list) { GList *l; @@ -7999,14 +7980,6 @@ real_update_menus (NautilusView *view) gtk_action_set_visible (action, show_properties); action = gtk_action_group_get_action (view->details->dir_action_group, - NAUTILUS_ACTION_EMPTY_TRASH); - g_object_set (action, - "label", _("E_mpty Trash"), - NULL); - gtk_action_set_sensitive (action, !nautilus_trash_monitor_is_empty ()); - gtk_action_set_visible (action, should_show_empty_trash (view)); - - action = gtk_action_group_get_action (view->details->dir_action_group, NAUTILUS_ACTION_SELECT_ALL); gtk_action_set_sensitive (action, !nautilus_view_is_empty (view)); |