[nautilus/wip/gaction_reordered: 13/17] nautilus-view: Drop empty trash on view



commit f1a73f5b3705737b774d2a2fdf83826c9f8b292f
Author: Carlos Soriano <carlos sorian89 gmail com>
Date:   Mon Jan 5 15:58:34 2015 +0100

    nautilus-view: Drop empty trash on view

 src/nautilus-actions.h             |    1 -
 src/nautilus-directory-view-ui.xml |    3 ---
 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 aa98d79..3a3c727 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 75d1578..3b22f56 100644
--- a/src/nautilus-directory-view-ui.xml
+++ b/src/nautilus-directory-view-ui.xml
@@ -15,9 +15,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 cb2eef5..4e975c5 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -1380,15 +1380,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;
@@ -6655,10 +6646,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"),
@@ -6997,12 +6984,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;
@@ -7976,14 +7957,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));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]