summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <carlos.sorian89@gmail.com>2015-01-05 15:58:34 +0100
committerCarlos Soriano <csoriano@gnome.org>2015-01-21 14:16:24 +0100
commit87420da09d674261a2b7af2a00438fffb1d1c995 (patch)
treeb51a8735aa526949967039e2227ce55288133487
parent9a733c69a68e4de44e8d8d1bab8d99ee1c543ca4 (diff)
downloadnautilus-87420da09d674261a2b7af2a00438fffb1d1c995.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.h1
-rw-r--r--src/nautilus-directory-view-ui.xml3
-rw-r--r--src/nautilus-view.c27
3 files changed, 0 insertions, 31 deletions
diff --git a/src/nautilus-actions.h b/src/nautilus-actions.h
index 8b6890aa2..2fe782a18 100644
--- a/src/nautilus-actions.h
+++ b/src/nautilus-actions.h
@@ -63,7 +63,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 f5d05556f..b665f4a2a 100644
--- a/src/nautilus-directory-view-ui.xml
+++ b/src/nautilus-directory-view-ui.xml
@@ -17,9 +17,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 d7f9167f6..b0ab56b13 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -1444,15 +1444,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;
@@ -6743,10 +6734,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"),
@@ -7090,12 +7077,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;
@@ -8080,14 +8061,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));