[nautilus] actions: remove unused GtkActions



commit 56e6bb2d73ea14d62002992b84a1815c34a7f45f
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Aug 26 15:02:06 2014 -0700

    actions: remove unused GtkActions
    
    We can now remove all the GtkActions that were only used as a proxy
    towards the GAction, since we don't expose them anywhere in the UI.
    
    NAUTILUS_ACTION_EDIT_BOOKMARKS is still used for media keys, so keep it
    for now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735488

 src/nautilus-actions.h      |    6 --
 src/nautilus-window-menus.c |  131 -------------------------------------------
 2 files changed, 0 insertions(+), 137 deletions(-)
---
diff --git a/src/nautilus-actions.h b/src/nautilus-actions.h
index e89bd37..c5d5a68 100644
--- a/src/nautilus-actions.h
+++ b/src/nautilus-actions.h
@@ -43,16 +43,11 @@
 #define NAUTILUS_ACTION_ZOOM_NORMAL "Zoom Normal"
 #define NAUTILUS_ACTION_SHOW_HIDDEN_FILES "Show Hidden Files"
 #define NAUTILUS_ACTION_CLOSE "Close"
-#define NAUTILUS_ACTION_CLOSE_ALL_WINDOWS "Close All Windows"
 #define NAUTILUS_ACTION_SEARCH "Search"
 #define NAUTILUS_ACTION_VIEW_LIST "View List"
 #define NAUTILUS_ACTION_VIEW_GRID "View Grid"
 #define NAUTILUS_ACTION_FOLDER_WINDOW "Folder Window"
 #define NAUTILUS_ACTION_NEW_TAB "New Tab"
-#define NAUTILUS_ACTION_NEW_WINDOW "New Window"
-#define NAUTILUS_ACTION_PREFERENCES "Preferences"
-#define NAUTILUS_ACTION_ABOUT "About Nautilus"
-#define NAUTILUS_ACTION_HELP "NautilusHelp"
 
 #define NAUTILUS_ACTION_OPEN "Open"
 #define NAUTILUS_ACTION_OPEN_ITEM_LOCATION "OpenItemLocation"
@@ -96,7 +91,6 @@
 #define NAUTILUS_ACTION_UNDO "Undo"
 #define NAUTILUS_ACTION_REDO "Redo"
 #define NAUTILUS_ACTION_RESET_TO_DEFAULTS "Reset to Defaults"
-#define NAUTILUS_ACTION_CONNECT_TO_SERVER "Connect to Server"
 #define NAUTILUS_ACTION_MOUNT_VOLUME "Mount Volume"
 #define NAUTILUS_ACTION_UNMOUNT_VOLUME "Unmount Volume"
 #define NAUTILUS_ACTION_EJECT_VOLUME "Eject Volume"
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index b0d640b..999d163 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -79,14 +79,6 @@ action_close_window_slot_callback (GtkAction *action,
 }
 
 static void
-action_connect_to_server_callback (GtkAction *action, 
-                                  gpointer user_data)
-{
-       g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()),
-                                       "connect-to-server", NULL);
-}
-
-static void
 action_bookmarks_callback (GtkAction *action, 
                           gpointer user_data)
 {
@@ -186,22 +178,6 @@ action_zoom_normal_callback (GtkAction *action,
 }
 
 static void
-action_preferences_callback (GtkAction *action, 
-                            gpointer user_data)
-{
-       g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()),
-                                       "preferences", NULL);
-}
-
-static void
-action_about_nautilus_callback (GtkAction *action,
-                               gpointer user_data)
-{
-       g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()),
-                                       "about", NULL);
-}
-
-static void
 action_up_callback (GtkAction *action, 
                     gpointer user_data) 
 {
@@ -212,67 +188,9 @@ action_up_callback (GtkAction *action,
        nautilus_window_slot_go_up (slot, nautilus_event_get_window_open_flags ());
 }
 
-static void
-action_nautilus_manual_callback (GtkAction *action, 
-                                gpointer user_data)
-{
-       NautilusWindow *window;
-       GError *error;
-       GtkWidget *dialog;
-       const char* helpuri;
-       const char* name = gtk_action_get_name (action);
-
-       error = NULL;
-       window = NAUTILUS_WINDOW (user_data);
-
-       if (g_str_equal (name, "NautilusHelpSearch")) {
-               helpuri = "help:gnome-help/files-search";
-       } else if (g_str_equal (name,"NautilusHelpSort")) {
-               helpuri = "help:gnome-help/files-sort";
-       } else if (g_str_equal (name, "NautilusHelpLost")) {
-               helpuri = "help:gnome-help/files-lost";
-       } else if (g_str_equal (name, "NautilusHelpShare")) {
-               helpuri = "help:gnome-help/files-share";
-       } else {
-               helpuri = "help:gnome-help/files";
-       }
-
-       if (NAUTILUS_IS_DESKTOP_WINDOW (window)) {
-               nautilus_launch_application_from_command (gtk_window_get_screen (GTK_WINDOW (window)), 
"gnome-help", FALSE, NULL);
-       } else {
-               gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (window)),
-                             helpuri,
-                             gtk_get_current_event_time (), &error);
-       }
-
-       if (error) {
-               dialog = gtk_message_dialog_new (GTK_WINDOW (window),
-                                                GTK_DIALOG_MODAL,
-                                                GTK_MESSAGE_ERROR,
-                                                GTK_BUTTONS_OK,
-                                                _("There was an error displaying help: \n%s"),
-                                                error->message);
-               g_signal_connect (G_OBJECT (dialog), "response",
-                                 G_CALLBACK (gtk_widget_destroy),
-                                 NULL);
-
-               gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-               gtk_widget_show (dialog);
-               g_error_free (error);
-       }
-}
-
 #define MENU_ITEM_MAX_WIDTH_CHARS 32
 
 static void
-action_close_all_windows_callback (GtkAction *action, 
-                                  gpointer user_data)
-{
-       g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()),
-                                       "quit", NULL);
-}
-
-static void
 action_back_callback (GtkAction *action, 
                      gpointer user_data) 
 {
@@ -334,14 +252,6 @@ connect_proxy_cb (GtkActionGroup *action_group,
 }
 
 static void
-action_new_window_callback (GtkAction *action,
-                           gpointer user_data)
-{
-       g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()),
-                                       "new-window", NULL);
-}
-
-static void
 action_new_tab_callback (GtkAction *action,
                         gpointer user_data)
 {
@@ -465,15 +375,10 @@ action_view_radio_changed (GtkRadioAction *action,
 }
 
 static const GtkActionEntry main_entries[] = {
-  /* name, stock id, label */  { "Help", NULL, N_("_Help") },
   /* name, stock id */         { NAUTILUS_ACTION_CLOSE, NULL,
   /* label, accelerator */       N_("_Close"), "<control>W",
   /* tooltip */                  N_("Close this folder"),
                                  G_CALLBACK (action_close_window_slot_callback) },
-                               { NAUTILUS_ACTION_PREFERENCES, NULL,
-                                 N_("Prefere_nces"),               
-                                 NULL, N_("Edit Nautilus preferences"),
-                                 G_CALLBACK (action_preferences_callback) },
   /* name, stock id */         { NAUTILUS_ACTION_UP, NULL,
   /* label, accelerator */      N_("Open _Parent"), "<alt>Up",
                                 N_("Open the parent folder"),
@@ -490,30 +395,6 @@ static const GtkActionEntry main_entries[] = {
   /* label, accelerator */       "ReloadAccel", "F5",
   /* tooltip */                  NULL,
                                  G_CALLBACK (action_reload_callback) },
-  /* name, stock id */         { NAUTILUS_ACTION_HELP, NULL,
-  /* label, accelerator */       N_("_All Topics"), "F1",
-  /* tooltip */                  N_("Display Nautilus help"),
-                                 G_CALLBACK (action_nautilus_manual_callback) },
-  /* name, stock id */         { "NautilusHelpSearch", NULL,
-  /* label, accelerator */       N_("Search for files"), NULL,
-  /* tooltip */                  N_("Locate files based on file name and type. Save your searches for later 
use."),
-                                 G_CALLBACK (action_nautilus_manual_callback) },
-  /* name, stock id */         { "NautilusHelpSort", NULL,
-  /* label, accelerator */       N_("Sort files and folders"), NULL,
-  /* tooltip */                  N_("Arrange files by name, size, type, or when they were changed."),
-                                 G_CALLBACK (action_nautilus_manual_callback) },
-  /* name, stock id */         { "NautilusHelpLost", NULL,
-  /* label, accelerator */       N_("Find a lost file"), NULL,
-  /* tooltip */                  N_("Follow these tips if you can't find a file you created or downloaded."),
-                                 G_CALLBACK (action_nautilus_manual_callback) },
-  /* name, stock id */         { "NautilusHelpShare", NULL,
-  /* label, accelerator */       N_("Share and transfer files"), NULL,
-  /* tooltip */                  N_("Easily transfer files to your contacts and devices from the file 
manager."),
-                                 G_CALLBACK (action_nautilus_manual_callback) },
-  /* name, stock id */         { NAUTILUS_ACTION_ABOUT, NULL,
-  /* label, accelerator */       N_("_About"), NULL,
-  /* tooltip */                  N_("Display credits for the creators of Nautilus"),
-                                 G_CALLBACK (action_about_nautilus_callback) },
   /* name, stock id */         { NAUTILUS_ACTION_ZOOM_IN, NULL,
   /* label, accelerator */       N_("Zoom _In"), "<control>plus",
   /* tooltip */                  N_("Increase the view size"),
@@ -538,26 +419,14 @@ static const GtkActionEntry main_entries[] = {
   /* label, accelerator */       N_("Normal Si_ze"), "<control>0",
   /* tooltip */                  N_("Use the normal view size"),
                                  G_CALLBACK (action_zoom_normal_callback) },
-  /* name, stock id */         { NAUTILUS_ACTION_CONNECT_TO_SERVER, NULL, 
-  /* label, accelerator */       N_("Connect to _Server…"), NULL,
-  /* tooltip */                  N_("Connect to a remote computer or shared disk"),
-                                 G_CALLBACK (action_connect_to_server_callback) },
   /* name, stock id */         { NAUTILUS_ACTION_GO_HOME, NAUTILUS_ICON_HOME,
   /* label, accelerator */       N_("_Home"), "<alt>Home",
   /* tooltip */                  N_("Open your personal folder"),
                                  G_CALLBACK (action_home_callback) },
-  /* name, stock id */         { NAUTILUS_ACTION_NEW_WINDOW, "window-new",
-                                N_("New _Window"), "<control>N",
-                                N_("Open another Nautilus window for the displayed location"),
-                                 G_CALLBACK (action_new_window_callback) },
   /* name, stock id */         { NAUTILUS_ACTION_NEW_TAB, "tab-new",
                                 N_("New _Tab"), "<control>T",
                                 N_("Open another tab for the displayed location"),
                                  G_CALLBACK (action_new_tab_callback) },
-  /* name, stock id */         { NAUTILUS_ACTION_CLOSE_ALL_WINDOWS, NULL,
-                                N_("Close _All Windows"), "<control>Q",
-                                N_("Close all Navigation windows"),
-                                 G_CALLBACK (action_close_all_windows_callback) },
   /* name, stock id */         { NAUTILUS_ACTION_BACK, "go-previous-symbolic",
                                 N_("_Back"), "<alt>Left",
                                 N_("Go to the previous visited location"),


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