diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-01-22 16:43:09 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-01-22 16:45:17 +0100 |
commit | e156e39e07276a4de8414bfdb82340f8762060b4 (patch) | |
tree | e10f34ba01eccfcbef88cb584f9f152b57f7be38 | |
parent | c9d59901003f635221299ca90887b830f3c0a3fa (diff) | |
download | nautilus-e156e39e07276a4de8414bfdb82340f8762060b4.tar.gz |
Remove tabs menu
I don't think this menu is much use, and it clutters up the menus even for
users who don't use tabs, which is against our policy of having the more
advanced features affect users not using them as little as possible.
Also, remove the setting to disable tabs althoughter, as with the menu
removed the tabs feature is very minimal when not in use.
-rw-r--r-- | libnautilus-private/apps_nautilus_preferences.schemas.in | 15 | ||||
-rw-r--r-- | libnautilus-private/nautilus-global-preferences.c | 4 | ||||
-rw-r--r-- | libnautilus-private/nautilus-global-preferences.h | 1 | ||||
-rw-r--r-- | libnautilus-private/nautilus-mime-actions.c | 3 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 11 | ||||
-rw-r--r-- | src/file-manager/fm-icon-view.c | 2 | ||||
-rw-r--r-- | src/file-manager/fm-list-view.c | 2 | ||||
-rw-r--r-- | src/file-manager/fm-tree-view.c | 7 | ||||
-rw-r--r-- | src/nautilus-actions.h | 1 | ||||
-rw-r--r-- | src/nautilus-navigation-window-menus.c | 239 | ||||
-rw-r--r-- | src/nautilus-navigation-window-pane.c | 11 | ||||
-rw-r--r-- | src/nautilus-navigation-window-pane.h | 4 | ||||
-rw-r--r-- | src/nautilus-navigation-window-ui.xml | 16 | ||||
-rw-r--r-- | src/nautilus-navigation-window.c | 19 | ||||
-rw-r--r-- | src/nautilus-places-sidebar.c | 27 | ||||
-rw-r--r-- | src/nautilus-window-private.h | 4 |
16 files changed, 11 insertions, 355 deletions
diff --git a/libnautilus-private/apps_nautilus_preferences.schemas.in b/libnautilus-private/apps_nautilus_preferences.schemas.in index e9b9bdb40..d6e8cf806 100644 --- a/libnautilus-private/apps_nautilus_preferences.schemas.in +++ b/libnautilus-private/apps_nautilus_preferences.schemas.in @@ -86,21 +86,6 @@ </schema> <schema> - <key>/schemas/desktop/gnome/file_views/tabs_enable</key> - <applyto>/desktop/gnome/file_views/tabs_enable</applyto> - <owner>nautilus</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short>Whether to enable tabs in Nautilus browser windows</short> - <long> - If set to true, then multiple views can be opened in one browser window, - each in a separate tab. - </long> - </locale> - </schema> - - <schema> <key>/schemas/desktop/gnome/file_views/tabs_open_position</key> <applyto>/desktop/gnome/file_views/tabs_open_position</applyto> <owner>nautilus</owner> diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c index a538e0de8..5bad7e378 100644 --- a/libnautilus-private/nautilus-global-preferences.c +++ b/libnautilus-private/nautilus-global-preferences.c @@ -347,10 +347,6 @@ static const PreferenceDefault preference_defaults[] = { PREFERENCE_BOOLEAN, GINT_TO_POINTER (TRUE) }, - { NAUTILUS_PREFERENCES_ENABLE_TABS, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, { NAUTILUS_PREFERENCES_NEW_TAB_POSITION, PREFERENCE_STRING, "after_current_tab", diff --git a/libnautilus-private/nautilus-global-preferences.h b/libnautilus-private/nautilus-global-preferences.h index 53db6ee1d..dab57411d 100644 --- a/libnautilus-private/nautilus-global-preferences.h +++ b/libnautilus-private/nautilus-global-preferences.h @@ -106,7 +106,6 @@ typedef enum /* Spatial or browser mode */ #define NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER "preferences/always_use_browser" -#define NAUTILUS_PREFERENCES_ENABLE_TABS "/desktop/gnome/file_views/tabs_enable" #define NAUTILUS_PREFERENCES_NEW_TAB_POSITION "preferences/tabs_open_position" /* Which views should be displayed for new windows */ diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c index ec063e8a6..77d933a02 100644 --- a/libnautilus-private/nautilus-mime-actions.c +++ b/libnautilus-private/nautilus-mime-actions.c @@ -1813,8 +1813,7 @@ activate_files (ActivateParameters *parameters) flags = parameters->flags; if (count > 1) { - if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS) && - (parameters->flags & NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW) == 0) { + if ((parameters->flags & NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW) == 0) { flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB; } else { flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW; diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index d20aa19b2..a4dfead07 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -815,10 +815,6 @@ action_open_new_tab_callback (GtkAction *action, GList *selection; GtkWindow *window; - if (!eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { - return; - } - view = FM_DIRECTORY_VIEW (callback_data); selection = fm_directory_view_get_selection (view); @@ -8459,9 +8455,7 @@ real_update_location_menu (FMDirectoryView *view) show_open_folder_window = TRUE; } - if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { - show_open_in_new_tab = TRUE; - } + show_open_in_new_tab = TRUE; } else { label = g_strdup (ngettext ("_Browse Folder", "_Browse Folders", 1)); @@ -8796,8 +8790,7 @@ real_update_menus (FMDirectoryView *view) gtk_action_set_visible (action, show_open_alternate); /* Open in New Tab action */ - if (nautilus_window_info_get_window_type (view->details->window) == NAUTILUS_WINDOW_NAVIGATION && - eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { + if (nautilus_window_info_get_window_type (view->details->window) == NAUTILUS_WINDOW_NAVIGATION) { if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER)) { if (selection_count == 0 || selection_count == 1) { diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 60ab3c5cf..a77737491 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -1842,7 +1842,7 @@ icon_container_activate_alternate_callback (NautilusIconContainer *container, } flags = NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND; - if (open_in_tab && eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { + if (open_in_tab) { flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB; } else { flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW; diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index db9d3bb87..dda571e65 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -239,7 +239,7 @@ activate_selected_items_alternate (FMListView *view, flags = NAUTILUS_WINDOW_OPEN_FLAG_CLOSE_BEHIND; - if (open_in_tab && eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { + if (open_in_tab) { flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB; } else { flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW; diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c index 03a13632f..45ef18bf3 100644 --- a/src/file-manager/fm-tree-view.c +++ b/src/file-manager/fm-tree-view.c @@ -799,13 +799,6 @@ fm_tree_view_activate_file (FMTreeView *view, cancel_activation (view); - if (view->details->activation_flags & NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB && - !eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { - view->details->activation_flags &= ~NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB; - view->details->activation_flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW; - } - - view->details->activation_file = nautilus_file_ref (file); view->details->activation_flags = flags; diff --git a/src/nautilus-actions.h b/src/nautilus-actions.h index 202c6529b..31a0ef6b1 100644 --- a/src/nautilus-actions.h +++ b/src/nautilus-actions.h @@ -51,7 +51,6 @@ #define NAUTILUS_ACTION_CLOSE "Close" #define NAUTILUS_ACTION_SEARCH "Search" #define NAUTILUS_ACTION_FOLDER_WINDOW "Folder Window" -#define NAUTILUS_ACTION_TABS "Tabs" #define NAUTILUS_ACTION_NEW_TAB "New Tab" #endif /* NAUTILUS_ACTIONS_H */ diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c index 0351dfeeb..eb7afe940 100644 --- a/src/nautilus-navigation-window-menus.c +++ b/src/nautilus-navigation-window-menus.c @@ -59,7 +59,6 @@ #include <libnautilus-private/nautilus-signaller.h> #define MENU_PATH_HISTORY_PLACEHOLDER "/MenuBar/Other Menus/Go/History Placeholder" -#define MENU_PATH_TABS_PLACEHOLDER "/MenuBar/Other Menus/Tabs/TabsOpen" #define RESPONSE_FORGET 1000 #define MENU_ITEM_MAX_WIDTH_CHARS 32 @@ -316,23 +315,6 @@ nautilus_navigation_window_update_spatial_menu_item (NautilusNavigationWindow *w !eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER)); } -void -nautilus_navigation_window_update_tab_menu_item_visibility (NautilusNavigationWindow *window) -{ - GtkAction *action; - - action = gtk_action_group_get_action (window->details->navigation_action_group, - NAUTILUS_ACTION_TABS); - gtk_action_set_visible (action, - eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)); - - action = gtk_action_group_get_action (window->details->navigation_action_group, - NAUTILUS_ACTION_NEW_TAB); - gtk_action_set_visible (action, - eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)); - -} - static void action_add_bookmark_callback (GtkAction *action, gpointer user_data) @@ -575,216 +557,6 @@ nautilus_navigation_window_update_split_view_actions_sensitivity (NautilusNaviga } static void -update_tab_action_sensitivity (NautilusNavigationWindowPane *pane) -{ - GtkActionGroup *action_group; - GtkAction *action; - NautilusNotebook *notebook; - gboolean sensitive; - int tab_num; - NautilusNavigationWindow *window; - - g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_PANE (pane)); - - window = NAUTILUS_NAVIGATION_WINDOW (NAUTILUS_WINDOW_PANE (pane)->window); - - notebook = NAUTILUS_NOTEBOOK (pane->notebook); - action_group = window->details->navigation_action_group; - - action = gtk_action_group_get_action (action_group, "TabsPrevious"); - sensitive = nautilus_notebook_can_set_current_page_relative (notebook, -1); - g_object_set (action, "sensitive", sensitive, NULL); - - action = gtk_action_group_get_action (action_group, "TabsNext"); - sensitive = nautilus_notebook_can_set_current_page_relative (notebook, 1); - g_object_set (action, "sensitive", sensitive, NULL); - - action = gtk_action_group_get_action (action_group, "TabsMoveLeft"); - sensitive = nautilus_notebook_can_reorder_current_child_relative (notebook, -1); - g_object_set (action, "sensitive", sensitive, NULL); - - action = gtk_action_group_get_action (action_group, "TabsMoveRight"); - sensitive = nautilus_notebook_can_reorder_current_child_relative (notebook, 1); - g_object_set (action, "sensitive", sensitive, NULL); - - action_group = pane->tabs_menu_action_group; - tab_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); - action = gtk_action_group_get_action (action_group, "Tab0"); - if (tab_num >= 0 && action != NULL) { - gtk_radio_action_set_current_value (GTK_RADIO_ACTION (action), tab_num); - } -} - -static void -tab_menu_action_activate_callback (GtkAction *action, - gpointer user_data) -{ - int num; - GtkWidget *notebook; - NautilusNavigationWindowPane *pane; - - pane = NAUTILUS_NAVIGATION_WINDOW_PANE (user_data); - notebook = pane->notebook; - - num = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action)); - - gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), num); -} - -static void -reload_tab_menu (NautilusNavigationWindowPane *pane) -{ - GtkRadioAction *action; - GtkUIManager *ui_manager; - int i; - gchar action_name[80]; - gchar *action_label; - gchar accelerator[80]; - GSList *radio_group; - NautilusWindowSlot *slot; - GtkNotebook *notebook; - NautilusWindow *window; - NautilusNavigationWindow *nav_window; - - g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_PANE (pane)); - - window = NAUTILUS_WINDOW_PANE (pane)->window; - nav_window = NAUTILUS_NAVIGATION_WINDOW (window); - - /* Remove old tab menu items */ - ui_manager = nautilus_window_get_ui_manager (window); - if (pane->tabs_menu_merge_id != 0) { - gtk_ui_manager_remove_ui (ui_manager, - pane->tabs_menu_merge_id); - pane->tabs_menu_merge_id = 0; - } - if (pane->tabs_menu_action_group != NULL) { - gtk_ui_manager_remove_action_group (ui_manager, - pane->tabs_menu_action_group); - pane->tabs_menu_action_group = NULL; - } - - /* Don't add anything if not active */ - if (!NAUTILUS_WINDOW_PANE (pane)->is_active) { - return; - } - - /* Add new tab menu items */ - pane->tabs_menu_merge_id = gtk_ui_manager_new_merge_id (ui_manager); - pane->tabs_menu_action_group = gtk_action_group_new ("TabsMenuGroup"); - - g_signal_connect (pane->tabs_menu_action_group, "connect-proxy", - G_CALLBACK (connect_proxy_cb), NULL); - - gtk_ui_manager_insert_action_group (ui_manager, - pane->tabs_menu_action_group, - -1); - g_object_unref (pane->tabs_menu_action_group); - - notebook = GTK_NOTEBOOK (pane->notebook); - radio_group = NULL; - for (i = 0; i < gtk_notebook_get_n_pages (notebook); i++) { - - snprintf(action_name, sizeof (action_name), "Tab%d", i); - - slot = nautilus_window_pane_get_slot_for_content_box (NAUTILUS_WINDOW_PANE (pane), - gtk_notebook_get_nth_page (notebook, i)); - if (slot) { - action_label = g_strdup (slot->title); - } else { - /* Give the action a generic label. This should only happen when the tab is created - * and the slot has not yet be created, so if all goes to plan then the action label - * will be updated when the slot is created. */ - action_label = g_strdup_printf ("Tab %d", i); - } - - action = gtk_radio_action_new (action_name, action_label, NULL, NULL, i); - - g_free (action_label); - action_label = NULL; - - gtk_radio_action_set_group (action, radio_group); - radio_group = gtk_radio_action_get_group (action); - - g_signal_connect (action, "activate", - G_CALLBACK (tab_menu_action_activate_callback), - pane); - - /* Use Alt+(Number) keyboard accelerators for first 10 tabs */ - if (i < 10) { - snprintf(accelerator, sizeof (accelerator), "<Alt>%d", (i+1)%10); - } else { - accelerator[0] = '\0'; - } - gtk_action_group_add_action_with_accel (pane->tabs_menu_action_group, - GTK_ACTION (action), - accelerator); - - g_object_unref (action); - - gtk_ui_manager_add_ui (ui_manager, - pane->tabs_menu_merge_id, - MENU_PATH_TABS_PLACEHOLDER, - action_name, - action_name, - GTK_UI_MANAGER_MENUITEM, - FALSE); - } - - update_tab_action_sensitivity (pane); -} - -void -nautilus_navigation_window_pane_initialize_tabs_menu (NautilusNavigationWindowPane *pane) -{ - g_signal_connect_object (pane->notebook, "page-added", - G_CALLBACK (reload_tab_menu), pane, G_CONNECT_SWAPPED); - g_signal_connect_object (pane->notebook, "page-removed", - G_CALLBACK (reload_tab_menu), pane, G_CONNECT_SWAPPED); - g_signal_connect_object (pane->notebook, "page-reordered", - G_CALLBACK (reload_tab_menu), pane, G_CONNECT_SWAPPED); - g_signal_connect_object (pane->notebook, "switch-page", - G_CALLBACK (update_tab_action_sensitivity), pane, - G_CONNECT_SWAPPED | G_CONNECT_AFTER); - - reload_tab_menu (pane); -} - -/* Update the label displayed in the "Tabs" menu. This is called when the title of - * a slot changes. */ -void -nautilus_navigation_window_pane_sync_tab_menu_title (NautilusNavigationWindowPane *pane, - NautilusWindowSlot *slot) -{ - int tab_num; - GtkNotebook *notebook; - GtkAction *action; - GtkActionGroup *action_group; - char action_name[80]; - - notebook = GTK_NOTEBOOK (pane->notebook); - - /* Find the tab number for that slot. It should (almost?) always be the current - * tab, so check that first in order to avoid searching through the entire tab - * list. */ - tab_num = gtk_notebook_get_current_page (notebook); - if (slot->content_box != gtk_notebook_get_nth_page (notebook, tab_num)) { - tab_num = gtk_notebook_page_num (notebook, slot->content_box); - } - - g_return_if_fail (tab_num >= 0); - - /* Find the action associated with that tab */ - action_group = pane->tabs_menu_action_group; - snprintf (action_name, sizeof (action_name), "Tab%d", tab_num); - action = gtk_action_group_get_action (action_group, action_name); - - /* Update the label */ - g_return_if_fail (action); - g_object_set (action, "label", slot->title, NULL); -} - -static void action_new_window_callback (GtkAction *action, gpointer user_data) { @@ -811,10 +583,6 @@ action_new_tab_callback (GtkAction *action, int new_slot_position; char *scheme; - if (!eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { - return; - } - window = NAUTILUS_WINDOW (user_data); current_slot = window->details->active_pane->active_slot; location = nautilus_window_slot_get_location (current_slot); @@ -1023,7 +791,6 @@ static const GtkActionEntry navigation_entries[] = { /* name, stock id, label */ { "Edit Bookmarks", NULL, N_("_Edit Bookmarks..."), "<control>b", N_("Display a window that allows editing the bookmarks in this menu"), G_CALLBACK (action_edit_bookmarks_callback) }, - { "TabsPrevious", NULL, N_("_Previous Tab"), "<control>Page_Up", N_("Activate previous tab"), G_CALLBACK (action_tabs_previous_callback) }, @@ -1177,7 +944,6 @@ nautilus_navigation_window_initialize_menus (NautilusNavigationWindow *window) { GtkUIManager *ui_manager; const char *ui; - GList *walk; ui_manager = nautilus_window_get_ui_manager (NAUTILUS_WINDOW (window)); @@ -1186,11 +952,6 @@ nautilus_navigation_window_initialize_menus (NautilusNavigationWindow *window) nautilus_navigation_window_update_show_hide_menu_items (window); nautilus_navigation_window_update_spatial_menu_item (window); - nautilus_navigation_window_update_tab_menu_item_visibility (window); nautilus_navigation_window_initialize_go_menu (window); - - for (walk = NAUTILUS_WINDOW(window)->details->panes; walk; walk = walk->next) { - nautilus_navigation_window_pane_initialize_tabs_menu (walk->data); - } } diff --git a/src/nautilus-navigation-window-pane.c b/src/nautilus-navigation-window-pane.c index 4d13ec4cc..bc49cb526 100644 --- a/src/nautilus-navigation-window-pane.c +++ b/src/nautilus-navigation-window-pane.c @@ -63,11 +63,6 @@ real_set_active (NautilusWindowPane *pane, gboolean is_active) /* navigation bar (manual entry) */ nautilus_location_bar_set_active (NAUTILUS_LOCATION_BAR (nav_pane->navigation_bar), is_active); - - /* if actions/menus exist, update those as well */ - if (NAUTILUS_NAVIGATION_WINDOW (pane->window)->details->navigation_action_group) { - nautilus_navigation_window_pane_initialize_tabs_menu (nav_pane); - } } static gboolean @@ -263,11 +258,7 @@ path_bar_button_released_callback (GtkWidget *widget, location = nautilus_path_bar_get_path_for_button (NAUTILUS_PATH_BAR (pane->path_bar), widget); if (event->button == 2 && mask == 0) { - if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { - flags = NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB; - } else { - flags = NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW; - } + flags = NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB; } else if (event->button == 1 && mask == GDK_CONTROL_MASK) { flags = NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW; } diff --git a/src/nautilus-navigation-window-pane.h b/src/nautilus-navigation-window-pane.h index 7600f41df..d87066553 100644 --- a/src/nautilus-navigation-window-pane.h +++ b/src/nautilus-navigation-window-pane.h @@ -60,10 +60,6 @@ struct _NautilusNavigationWindowPane { /* notebook */ GtkWidget *notebook; - /* tab menu */ - GtkActionGroup *tabs_menu_action_group; - guint tabs_menu_merge_id; - /* split view */ GtkWidget *split_view_hpane; }; diff --git a/src/nautilus-navigation-window-ui.xml b/src/nautilus-navigation-window-ui.xml index d9c179ef3..76b34cb82 100644 --- a/src/nautilus-navigation-window-ui.xml +++ b/src/nautilus-navigation-window-ui.xml @@ -1,6 +1,10 @@ <ui> <accelerator action="ShowSearch"/> <accelerator action="SplitViewNextPane"/> +<accelerator action="TabsPrevious"/> +<accelerator action="TabsNext"/> +<accelerator action="TabsMoveLeft"/> +<accelerator action="TabsMoveRight"/> <menubar name="MenuBar"> <menu action="File"> <placeholder name="New Items Placeholder"> @@ -50,18 +54,6 @@ <separator/> <placeholder name="Bookmarks Placeholder"/> </menu> - <menu action="Tabs"> - <menuitem name="TabsPreviousMenu" action="TabsPrevious"/> - <menuitem name="TabsNextMenu" action="TabsNext"/> - <separator name="TabsSep1"/> - <placeholder name="TabsMoveGroup"> - <menuitem name="TabsMoveLeftMenu" action="TabsMoveLeft"/> - <menuitem name="TabsMoveRightMenu" action="TabsMoveRight"/> - </placeholder> - <placeholder name="TabsOpen"> - <separator name="TabsSep2"/> - </placeholder> - </menu> </placeholder> </menubar> <toolbar name="Toolbar"> diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index 2d37bb5d6..2d5700a17 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -101,7 +101,6 @@ static void side_panel_image_changed_callback (NautilusSidebar * gpointer callback_data); static void always_use_location_entry_changed (gpointer callback_data); static void always_use_browser_changed (gpointer callback_data); -static void enable_tabs_changed (gpointer callback_data); static void mouse_back_button_changed (gpointer callback_data); static void mouse_forward_button_changed (gpointer callback_data); static void use_extra_mouse_buttons_changed (gpointer callback_data); @@ -206,10 +205,6 @@ nautilus_navigation_window_init (NautilusNavigationWindow *window) eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER, always_use_browser_changed, window, G_OBJECT (window)); - - eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_ENABLE_TABS, - enable_tabs_changed, - window, G_OBJECT (window)); } static void @@ -238,16 +233,6 @@ always_use_browser_changed (gpointer callback_data) nautilus_navigation_window_update_spatial_menu_item (window); } -static void -enable_tabs_changed (gpointer callback_data) -{ - NautilusNavigationWindow *window; - - window = NAUTILUS_NAVIGATION_WINDOW (callback_data); - - nautilus_navigation_window_update_tab_menu_item_visibility (window); -} - /* Sanity check: highest mouse button value I could find was 14. 5 is our * lower threshold (well-documented to be the one of the button events for the * scrollwheel), so it's hardcoded in the functions below. However, if you have @@ -758,10 +743,6 @@ real_sync_title (NautilusWindow *window, pane = NAUTILUS_NAVIGATION_WINDOW_PANE (slot->pane); notebook = NAUTILUS_NOTEBOOK (pane->notebook); nautilus_notebook_sync_tab_label (notebook, slot); - - if (slot->pane->is_active) { - nautilus_navigation_window_pane_sync_tab_menu_title (pane, slot); - } } static NautilusIconInfo * diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c index 5055ecb64..de5bb9c49 100644 --- a/src/nautilus-places-sidebar.c +++ b/src/nautilus-places-sidebar.c @@ -718,16 +718,6 @@ desktop_location_changed_callback (gpointer user_data) } static void -enable_tabs_changed_callback (gpointer user_data) -{ - NautilusPlacesSidebar *sidebar; - - sidebar = NAUTILUS_PLACES_SIDEBAR (user_data); - - bookmarks_check_popup_sensitivity (sidebar); -} - -static void loading_uri_callback (NautilusWindowInfo *window, char *location, NautilusPlacesSidebar *sidebar) @@ -1408,11 +1398,7 @@ bookmarks_check_popup_sensitivity (NautilusPlacesSidebar *sidebar) -1); } - if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { - gtk_widget_show (sidebar->popup_menu_open_in_new_tab_item); - } else { - gtk_widget_hide (sidebar->popup_menu_open_in_new_tab_item); - } + gtk_widget_show (sidebar->popup_menu_open_in_new_tab_item); gtk_widget_set_sensitive (sidebar->popup_menu_remove_item, (type == PLACES_BOOKMARK)); gtk_widget_set_sensitive (sidebar->popup_menu_rename_item, (type == PLACES_BOOKMARK)); @@ -1565,12 +1551,6 @@ open_selected_bookmark (NautilusPlacesSidebar *sidebar, return; } - if (flags & NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB && - !eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ENABLE_TABS)) { - flags &= ~NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB; - flags |= NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW; - } - gtk_tree_model_get (model, &iter, PLACES_SIDEBAR_COLUMN_URI, &uri, -1); if (uri != NULL) { @@ -2573,11 +2553,6 @@ nautilus_places_sidebar_init (NautilusPlacesSidebar *sidebar) sidebar, G_OBJECT (sidebar)); - eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_ENABLE_TABS, - enable_tabs_changed_callback, - sidebar, - G_OBJECT (sidebar)); - g_signal_connect_object (nautilus_trash_monitor_get (), "trash_state_changed", G_CALLBACK (trash_state_changed_cb), diff --git a/src/nautilus-window-private.h b/src/nautilus-window-private.h index 4580afce7..941b8ddd5 100644 --- a/src/nautilus-window-private.h +++ b/src/nautilus-window-private.h @@ -161,7 +161,6 @@ void nautilus_window_set_status (Nautil void nautilus_window_load_view_as_menus (NautilusWindow *window); void nautilus_window_load_extension_menus (NautilusWindow *window); void nautilus_window_initialize_menus (NautilusWindow *window); -void nautilus_navigation_window_pane_initialize_tabs_menu (struct _NautilusNavigationWindowPane *pane); void nautilus_window_remove_trash_monitor_callback (NautilusWindow *window); NautilusWindowPane *nautilus_window_get_next_pane (NautilusWindow *window); void nautilus_menus_append_bookmark_to_menu (NautilusWindow *window, @@ -229,9 +228,6 @@ void nautilus_navigation_window_remove_bookmarks_menu_callback void nautilus_navigation_window_remove_bookmarks_menu_items (NautilusNavigationWindow *window); void nautilus_navigation_window_update_show_hide_menu_items (NautilusNavigationWindow *window); void nautilus_navigation_window_update_spatial_menu_item (NautilusNavigationWindow *window); -void nautilus_navigation_window_update_tab_menu_item_visibility (NautilusNavigationWindow *window); -void nautilus_navigation_window_pane_sync_tab_menu_title (struct _NautilusNavigationWindowPane *pane, - NautilusWindowSlot *slot); void nautilus_navigation_window_remove_go_menu_callback (NautilusNavigationWindow *window); void nautilus_navigation_window_remove_go_menu_items (NautilusNavigationWindow *window); |