[nautilus] Move location from toolbar to pane widget
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus] Move location from toolbar to pane widget
- Date: Thu, 10 Dec 2009 17:15:03 +0000 (UTC)
commit 6fc12915c7e3b8e92696630117afb5d5f5aaf60c
Author: Alexander Larsson <alexl redhat com>
Date: Thu Dec 10 11:38:06 2009 +0100
Move location from toolbar to pane widget
src/nautilus-navigation-window-menus.c | 22 ++--
src/nautilus-navigation-window-pane.c | 168 +++++++++++++++-----------------
src/nautilus-navigation-window-pane.h | 43 ++++----
src/nautilus-navigation-window-slot.c | 4 +-
src/nautilus-navigation-window.c | 36 +++-----
src/nautilus-window-manage-views.c | 28 +++---
src/nautilus-window-pane.c | 6 +-
src/nautilus-window-pane.h | 2 +-
src/nautilus-window.c | 10 +-
9 files changed, 151 insertions(+), 168 deletions(-)
---
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index f78eab0..2a7871b 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -234,7 +234,7 @@ nautilus_navigation_window_update_show_hide_menu_items (NautilusNavigationWindow
action = gtk_action_group_get_action (window->details->navigation_action_group,
NAUTILUS_ACTION_SHOW_HIDE_LOCATION_BAR);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
- nautilus_navigation_window_pane_location_bar_showing (NAUTILUS_NAVIGATION_WINDOW_PANE (NAUTILUS_WINDOW (window)->details->active_pane)));
+ nautilus_navigation_window_pane_location_bar_showing (NAUTILUS_NAVIGATION_WINDOW_PANE (NAUTILUS_WINDOW (window)->details->active_pane)));
action = gtk_action_group_get_action (window->details->navigation_action_group,
NAUTILUS_ACTION_SHOW_HIDE_STATUSBAR);
@@ -468,12 +468,12 @@ update_tab_action_sensitivity (NautilusNavigationWindowPane *pane)
NautilusNotebook *notebook;
gboolean sensitive;
int tab_num;
- NautilusNavigationWindow *window;
+ NautilusNavigationWindow *window;
g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_PANE (pane));
- window = NAUTILUS_NAVIGATION_WINDOW (NAUTILUS_WINDOW_PANE (pane)->window);
-
+ window = NAUTILUS_NAVIGATION_WINDOW (NAUTILUS_WINDOW_PANE (pane)->window);
+
notebook = NAUTILUS_NOTEBOOK (pane->notebook);
action_group = window->details->navigation_action_group;
@@ -1021,8 +1021,8 @@ nautilus_navigation_window_initialize_actions (NautilusNavigationWindow *window)
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
g_object_unref (action_group); /* owned by ui_manager */
-
- /* hhb: updates for split view needed here */
+
+ /* hhb: updates for split view needed here */
}
@@ -1037,7 +1037,7 @@ nautilus_navigation_window_initialize_menus (NautilusNavigationWindow *window)
{
GtkUIManager *ui_manager;
const char *ui;
- GList *walk;
+ GList *walk;
ui_manager = nautilus_window_get_ui_manager (NAUTILUS_WINDOW (window));
@@ -1048,9 +1048,9 @@ nautilus_navigation_window_initialize_menus (NautilusNavigationWindow *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);
+ 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);
- }
+ 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 b3edc8a..a46f730 100644
--- a/src/nautilus-navigation-window-pane.c
+++ b/src/nautilus-navigation-window-pane.c
@@ -1,24 +1,24 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-navigation-window-pane.c: Nautilus navigation window pane
-
+
Copyright (C) 2008 Free Software Foundation, Inc.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
+
Author: Holger Berndt <berndth gmx de>
*/
@@ -42,8 +42,8 @@ static void nautilus_navigation_window_pane_class_init (NautilusNavigationWindow
static void nautilus_navigation_window_pane_dispose (GObject *object);
G_DEFINE_TYPE (NautilusNavigationWindowPane,
- nautilus_navigation_window_pane,
- NAUTILUS_TYPE_WINDOW_PANE)
+ nautilus_navigation_window_pane,
+ NAUTILUS_TYPE_WINDOW_PANE)
#define parent_class nautilus_navigation_window_pane_parent_class
@@ -57,7 +57,7 @@ nautilus_navigation_window_pane_set_active (NautilusNavigationWindowPane *pane,
/* location button */
gtk_widget_set_sensitive (gtk_bin_get_child (GTK_BIN (pane->location_button)), is_active);
-
+
/* hhb: TODO: deal with path bar */
/* hhb: TODO: deal with navigation bar (manual entry) */
@@ -109,9 +109,9 @@ search_bar_activate_callback (NautilusSearchBar *bar,
uri = nautilus_search_directory_generate_new_uri ();
location = g_file_new_for_uri (uri);
g_free (uri);
-
+
directory = nautilus_directory_get (location);
-
+
g_assert (NAUTILUS_IS_SEARCH_DIRECTORY (directory));
search_directory = NAUTILUS_SEARCH_DIRECTORY (directory);
@@ -127,9 +127,9 @@ search_bar_activate_callback (NautilusSearchBar *bar,
nautilus_search_directory_set_query (search_directory, query);
g_object_unref (query);
}
-
+
nautilus_window_slot_go_to (NAUTILUS_WINDOW_PANE (pane)->active_slot, location, FALSE);
-
+
nautilus_directory_unref (directory);
g_object_unref (location);
}
@@ -158,7 +158,7 @@ navigation_bar_location_changed_callback (GtkWidget *widget,
NautilusNavigationWindowPane *pane)
{
GFile *location;
-
+
if (nautilus_navigation_window_pane_hide_temporary_bars (pane)) {
nautilus_navigation_window_restore_focus_widget (NAUTILUS_NAVIGATION_WINDOW (NAUTILUS_WINDOW_PANE (pane)->window));
}
@@ -186,7 +186,7 @@ location_button_toggled_cb (GtkToggleButton *toggle,
if (is_active) {
nautilus_navigation_bar_activate (NAUTILUS_NAVIGATION_BAR (pane->navigation_bar));
}
-
+
nautilus_window_set_active_pane (NAUTILUS_WINDOW_PANE (pane)->window, NAUTILUS_WINDOW_PANE (pane));
}
@@ -225,7 +225,7 @@ path_bar_location_changed_callback (GtkWidget *widget,
g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_PANE (pane));
win_pane = NAUTILUS_WINDOW_PANE(pane);
-
+
slot = NAUTILUS_NAVIGATION_WINDOW_SLOT (win_pane->active_slot);
/* check whether we already visited the target location */
@@ -343,7 +343,7 @@ path_bar_path_set_callback (GtkWidget *widget,
if (!g_signal_handler_find (child,
G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
- 0, 0, NULL,
+ 0, 0, NULL,
path_bar_button_pressed_callback,
pane)) {
g_signal_connect (child, "button-press-event",
@@ -365,7 +365,7 @@ static void
notebook_popup_menu_move_left_cb (GtkMenuItem *menuitem,
gpointer user_data)
{
- NautilusNavigationWindowPane *pane;
+ NautilusNavigationWindowPane *pane;
pane = NAUTILUS_NAVIGATION_WINDOW_PANE (user_data);
nautilus_notebook_reorder_current_child_relative (NAUTILUS_NOTEBOOK (pane->notebook), -1);
@@ -375,7 +375,7 @@ static void
notebook_popup_menu_move_right_cb (GtkMenuItem *menuitem,
gpointer user_data)
{
- NautilusNavigationWindowPane *pane;
+ NautilusNavigationWindowPane *pane;
pane = NAUTILUS_NAVIGATION_WINDOW_PANE (user_data);
nautilus_notebook_reorder_current_child_relative (NAUTILUS_NOTEBOOK (pane->notebook), 1);
@@ -385,7 +385,7 @@ static void
notebook_popup_menu_close_cb (GtkMenuItem *menuitem,
gpointer user_data)
{
- NautilusWindowPane *pane;
+ NautilusWindowPane *pane;
NautilusWindowSlot *slot;
pane = NAUTILUS_WINDOW_PANE (user_data);
@@ -403,7 +403,7 @@ notebook_popup_menu_show (NautilusNavigationWindowPane *pane,
int button, event_time;
gboolean can_move_left, can_move_right;
NautilusNotebook *notebook;
-
+
notebook = NAUTILUS_NOTEBOOK (pane->notebook);
can_move_left = nautilus_notebook_can_reorder_current_child_relative (notebook, -1);
@@ -412,19 +412,19 @@ notebook_popup_menu_show (NautilusNavigationWindowPane *pane,
popup = gtk_menu_new();
item = gtk_menu_item_new_with_mnemonic (_("Move Tab _Left"));
- g_signal_connect (item, "activate",
- G_CALLBACK (notebook_popup_menu_move_left_cb),
+ g_signal_connect (item, "activate",
+ G_CALLBACK (notebook_popup_menu_move_left_cb),
pane);
- gtk_menu_shell_append (GTK_MENU_SHELL (popup),
- item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (popup),
+ item);
gtk_widget_set_sensitive (item, can_move_left);
item = gtk_menu_item_new_with_mnemonic (_("Move Tab _Right"));
- g_signal_connect (item, "activate",
- G_CALLBACK (notebook_popup_menu_move_right_cb),
+ g_signal_connect (item, "activate",
+ G_CALLBACK (notebook_popup_menu_move_right_cb),
pane);
- gtk_menu_shell_append (GTK_MENU_SHELL (popup),
- item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (popup),
+ item);
gtk_widget_set_sensitive (item, can_move_right);
gtk_menu_shell_append (GTK_MENU_SHELL (popup),
@@ -433,10 +433,10 @@ notebook_popup_menu_show (NautilusNavigationWindowPane *pane,
item = gtk_image_menu_item_new_with_mnemonic (_("_Close Tab"));
image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
- g_signal_connect (item, "activate",
+ g_signal_connect (item, "activate",
G_CALLBACK (notebook_popup_menu_close_cb), pane);
- gtk_menu_shell_append (GTK_MENU_SHELL (popup),
- item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (popup),
+ item);
gtk_widget_show_all (popup);
@@ -447,13 +447,13 @@ notebook_popup_menu_show (NautilusNavigationWindowPane *pane,
button = 0;
event_time = gtk_get_current_event_time ();
}
-
+
/* TODO is this correct? */
- gtk_menu_attach_to_widget (GTK_MENU (popup),
- pane->notebook,
- NULL);
+ gtk_menu_attach_to_widget (GTK_MENU (popup),
+ pane->notebook,
+ NULL);
- gtk_menu_popup (GTK_MENU (popup), NULL, NULL, NULL, NULL,
+ gtk_menu_popup (GTK_MENU (popup), NULL, NULL, NULL, NULL,
button, event_time);
}
@@ -515,31 +515,6 @@ notebook_switch_page_cb (GtkNotebook *notebook,
}
void
-nautilus_navigation_window_pane_setup_notebook (NautilusNavigationWindowPane *pane)
-{
- pane->notebook = g_object_new (NAUTILUS_TYPE_NOTEBOOK, NULL);
- g_signal_connect (pane->notebook,
- "tab-close-request",
- G_CALLBACK (notebook_tab_close_requested),
- pane);
- g_signal_connect_after (pane->notebook,
- "button_press_event",
- G_CALLBACK (notebook_button_press_cb),
- pane);
- g_signal_connect (pane->notebook, "popup-menu",
- G_CALLBACK (notebook_popup_menu_cb),
- pane);
- g_signal_connect (pane->notebook,
- "switch-page",
- G_CALLBACK (notebook_switch_page_cb),
- pane);
-
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (pane->notebook), FALSE);
- gtk_notebook_set_show_border (GTK_NOTEBOOK (pane->notebook), FALSE);
- gtk_widget_show (pane->notebook);
-}
-
-void
nautilus_navigation_window_pane_remove_page (NautilusNavigationWindowPane *pane, int page_num)
{
GtkNotebook *notebook;
@@ -554,11 +529,11 @@ nautilus_navigation_window_pane_remove_page (NautilusNavigationWindowPane *pane,
pane);
}
-void
+void
nautilus_navigation_window_pane_add_slot_in_tab (NautilusNavigationWindowPane *pane, NautilusWindowSlot *slot, NautilusWindowOpenSlotFlags flags)
{
NautilusNotebook *notebook;
-
+
notebook = NAUTILUS_NOTEBOOK (pane->notebook);
g_signal_handlers_block_by_func (notebook,
G_CALLBACK (notebook_switch_page_cb),
@@ -584,13 +559,13 @@ nautilus_navigation_window_pane_sync_location_widgets (NautilusNavigationWindowP
/* Change the location bar and path bar to match the current location. */
if (slot->location != NULL) {
char *uri;
-
+
/* this may be NULL if we just created the slot */
uri = nautilus_window_slot_get_location_uri (slot);
nautilus_navigation_bar_set_location (NAUTILUS_NAVIGATION_BAR (pane->navigation_bar),uri);
g_free (uri);
nautilus_path_bar_set_path (NAUTILUS_PATH_BAR (pane->path_bar),slot->location);
- }
+ }
}
gboolean
@@ -604,7 +579,7 @@ nautilus_navigation_window_pane_hide_temporary_bars (NautilusNavigationWindowPan
slot = NAUTILUS_WINDOW_PANE(pane)->active_slot;
success = FALSE;
-
+
if (pane->temporary_location_bar) {
if (nautilus_navigation_window_pane_location_bar_showing (pane)) {
nautilus_navigation_window_pane_hide_location_bar (pane, FALSE);
@@ -637,7 +612,7 @@ nautilus_navigation_window_pane_hide_temporary_bars (NautilusNavigationWindowPan
success = TRUE;
}
- return success;
+ return success;
}
void
@@ -648,7 +623,7 @@ nautilus_navigation_window_pane_always_use_location_entry (NautilusNavigationWin
} else {
nautilus_navigation_window_pane_set_bar_mode (pane, NAUTILUS_BAR_PATH);
}
-
+
g_signal_handlers_block_by_func (pane->location_button,
G_CALLBACK (location_button_toggled_cb),
pane);
@@ -659,27 +634,20 @@ nautilus_navigation_window_pane_always_use_location_entry (NautilusNavigationWin
}
void
-nautilus_navigation_window_pane_setup_location_bar (NautilusNavigationWindowPane *pane)
+nautilus_navigation_window_pane_setup (NautilusNavigationWindowPane *pane)
{
- GtkWidget *location_bar;
GtkWidget *hbox;
- GtkToolItem *item;
NautilusEntry *entry;
- location_bar = gtk_toolbar_new ();
- pane->location_bar = location_bar;
-
+ pane->widget = gtk_vbox_new (FALSE, 0);
+
hbox = gtk_hbox_new (FALSE, 12);
+ pane->location_bar = hbox;
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
+ gtk_box_pack_start (GTK_BOX (pane->widget), hbox,
+ FALSE, FALSE, 0);
gtk_widget_show (hbox);
- item = gtk_tool_item_new ();
- gtk_container_set_border_width (GTK_CONTAINER (item), 4);
- gtk_widget_show (GTK_WIDGET (item));
- gtk_tool_item_set_expand (item, TRUE);
- gtk_container_add (GTK_CONTAINER (item), hbox);
- gtk_toolbar_insert (GTK_TOOLBAR (location_bar),
- item, -1);
-
pane->navigation_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
gtk_size_group_set_ignore_hidden (pane->navigation_group, FALSE);
@@ -691,12 +659,12 @@ nautilus_navigation_window_pane_setup_location_bar (NautilusNavigationWindowPane
pane->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
gtk_size_group_add_widget (pane->navigation_group, pane->path_bar);
gtk_widget_show (pane->path_bar);
-
+
g_signal_connect_object (pane->path_bar, "path_clicked",
G_CALLBACK (path_bar_location_changed_callback), pane, 0);
g_signal_connect_object (pane->path_bar, "path_set",
G_CALLBACK (path_bar_path_set_callback), pane, 0);
-
+
gtk_box_pack_start (GTK_BOX (hbox),
pane->path_bar,
TRUE, TRUE, 0);
@@ -724,8 +692,32 @@ nautilus_navigation_window_pane_setup_location_bar (NautilusNavigationWindowPane
gtk_box_pack_start (GTK_BOX (hbox),
pane->search_bar,
TRUE, TRUE, 0);
+
+ pane->notebook = g_object_new (NAUTILUS_TYPE_NOTEBOOK, NULL);
+ gtk_box_pack_start (GTK_BOX (pane->widget), pane->notebook,
+ TRUE, TRUE, 0);
+ g_signal_connect (pane->notebook,
+ "tab-close-request",
+ G_CALLBACK (notebook_tab_close_requested),
+ pane);
+ g_signal_connect_after (pane->notebook,
+ "button_press_event",
+ G_CALLBACK (notebook_button_press_cb),
+ pane);
+ g_signal_connect (pane->notebook, "popup-menu",
+ G_CALLBACK (notebook_popup_menu_cb),
+ pane);
+ g_signal_connect (pane->notebook,
+ "switch-page",
+ G_CALLBACK (notebook_switch_page_cb),
+ pane);
+
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (pane->notebook), FALSE);
+ gtk_notebook_set_show_border (GTK_NOTEBOOK (pane->notebook), FALSE);
+ gtk_widget_show (pane->notebook);
}
+
void
nautilus_navigation_window_pane_show_location_bar_temporarily (NautilusNavigationWindowPane *pane)
{
@@ -743,7 +735,7 @@ nautilus_navigation_window_pane_show_navigation_bar_temporarily (NautilusNavigat
nautilus_navigation_window_pane_set_bar_mode (pane, NAUTILUS_BAR_NAVIGATION);
pane->temporary_navigation_bar = TRUE;
}
- nautilus_navigation_bar_activate
+ nautilus_navigation_bar_activate
(NAUTILUS_NAVIGATION_BAR (pane->navigation_bar));
}
@@ -762,7 +754,7 @@ nautilus_navigation_window_pane_set_bar_mode (NautilusNavigationWindowPane *pane
NautilusBarMode mode)
{
gboolean use_entry;
-
+
switch (mode) {
case NAUTILUS_BAR_PATH:
@@ -783,7 +775,7 @@ nautilus_navigation_window_pane_set_bar_mode (NautilusNavigationWindowPane *pane
gtk_widget_hide (pane->navigation_bar);
break;
}
-
+
if (mode == NAUTILUS_BAR_NAVIGATION || mode == NAUTILUS_BAR_PATH) {
use_entry = (mode == NAUTILUS_BAR_NAVIGATION);
@@ -795,7 +787,7 @@ nautilus_navigation_window_pane_set_bar_mode (NautilusNavigationWindowPane *pane
g_signal_handlers_unblock_by_func (pane->location_button,
G_CALLBACK (location_button_toggled_cb),
pane);
- }
+ }
}
gboolean
diff --git a/src/nautilus-navigation-window-pane.h b/src/nautilus-navigation-window-pane.h
index e5f4f29..7618084 100644
--- a/src/nautilus-navigation-window-pane.h
+++ b/src/nautilus-navigation-window-pane.h
@@ -39,30 +39,32 @@ typedef struct _NautilusNavigationWindowPaneClass NautilusNavigationWindowPaneCl
typedef struct _NautilusNavigationWindowPane NautilusNavigationWindowPane;
struct _NautilusNavigationWindowPaneClass {
- NautilusWindowPaneClass parent_class;
+ NautilusWindowPaneClass parent_class;
};
struct _NautilusNavigationWindowPane {
- NautilusWindowPane parent;
-
- /* location bar */
- GtkWidget *location_bar;
- GtkWidget *location_button;
- GtkSizeGroup *navigation_group;
- GtkWidget *navigation_bar;
- GtkWidget *path_bar;
- GtkWidget *search_bar;
-
- gboolean temporary_navigation_bar;
- gboolean temporary_location_bar;
- gboolean temporary_search_bar;
-
- /* notebook */
- GtkWidget *notebook;
-
+ NautilusWindowPane parent;
+
+ GtkWidget *widget;
+
+ /* location bar */
+ GtkWidget *location_bar;
+ GtkWidget *location_button;
+ GtkSizeGroup *navigation_group;
+ GtkWidget *navigation_bar;
+ GtkWidget *path_bar;
+ GtkWidget *search_bar;
+
+ gboolean temporary_navigation_bar;
+ gboolean temporary_location_bar;
+ gboolean temporary_search_bar;
+
+ /* notebook */
+ GtkWidget *notebook;
+
/* tab menu */
GtkActionGroup *tabs_menu_action_group;
- guint tabs_menu_merge_id;
+ guint tabs_menu_merge_id;
};
GType nautilus_navigation_window_pane_get_type (void);
@@ -70,7 +72,7 @@ GType nautilus_navigation_window_pane_get_type (void);
NautilusNavigationWindowPane* nautilus_navigation_window_pane_new (NautilusWindow *window);
/* location bar */
-void nautilus_navigation_window_pane_setup_location_bar (NautilusNavigationWindowPane *pane);
+void nautilus_navigation_window_pane_setup (NautilusNavigationWindowPane *pane);
void nautilus_navigation_window_pane_hide_location_bar (NautilusNavigationWindowPane *pane, gboolean save_preference);
void nautilus_navigation_window_pane_show_location_bar (NautilusNavigationWindowPane *pane, gboolean save_preference);
@@ -87,7 +89,6 @@ gboolean nautilus_navigation_window_pane_hide_temporary_bars (NautilusNavigation
void nautilus_navigation_window_pane_sync_location_widgets (NautilusNavigationWindowPane *pane);
void nautilus_navigation_window_pane_set_active (NautilusNavigationWindowPane *pane, gboolean is_active);
/* notebook */
-void nautilus_navigation_window_pane_setup_notebook (NautilusNavigationWindowPane *pane);
void nautilus_navigation_window_pane_add_slot_in_tab (NautilusNavigationWindowPane *pane, NautilusWindowSlot *slot, NautilusWindowOpenSlotFlags flags);
void nautilus_navigation_window_pane_remove_page (NautilusNavigationWindowPane *pane, int page_num);
diff --git a/src/nautilus-navigation-window-slot.c b/src/nautilus-navigation-window-slot.c
index 65bcfb5..237c3ff 100644
--- a/src/nautilus-navigation-window-slot.c
+++ b/src/nautilus-navigation-window-slot.c
@@ -173,11 +173,11 @@ nautilus_navigation_window_slot_active (NautilusWindowSlot *slot)
{
NautilusNavigationWindow *window;
NautilusNavigationWindowSlot *navigation_slot;
- NautilusNavigationWindowPane *pane;
+ NautilusNavigationWindowPane *pane;
int page_num;
navigation_slot = NAUTILUS_NAVIGATION_WINDOW_SLOT (slot);
- pane = NAUTILUS_NAVIGATION_WINDOW_PANE (slot->pane);
+ pane = NAUTILUS_NAVIGATION_WINDOW_PANE (slot->pane);
window = NAUTILUS_NAVIGATION_WINDOW (slot->pane->window);
page_num = gtk_notebook_page_num (GTK_NOTEBOOK (pane->notebook),
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index f0f3a7f..bbb1030 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -157,25 +157,15 @@ nautilus_navigation_window_init (NautilusNavigationWindow *window)
0, 0);
gtk_widget_show (window->details->content_paned);
- nautilus_navigation_window_pane_setup_notebook (pane);
-
- nautilus_horizontal_splitter_pack2 (
- NAUTILUS_HORIZONTAL_SPLITTER (window->details->content_paned),
- pane->notebook);
-
- nautilus_navigation_window_pane_setup_location_bar(pane);
- gtk_widget_show (pane->location_bar);
+ nautilus_navigation_window_pane_setup (pane);
- gtk_table_attach (GTK_TABLE (NAUTILUS_WINDOW (window)->details->table),
- pane->location_bar,
- /* X direction */ /* Y direction */
- 0, 1, 2, 3,
- GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0,
- 0, 0);
+ nautilus_horizontal_splitter_pack2 (NAUTILUS_HORIZONTAL_SPLITTER (window->details->content_paned),
+ pane->widget);
+ gtk_widget_show (pane->widget);
/* this has to be done after the location bar has been set up,
* but before menu stuff is being called */
- nautilus_window_set_active_pane (win, NAUTILUS_WINDOW_PANE (pane));
+ nautilus_window_set_active_pane (win, NAUTILUS_WINDOW_PANE (pane));
nautilus_navigation_window_initialize_actions (window);
nautilus_navigation_window_initialize_menus (window);
@@ -216,7 +206,7 @@ static void
always_use_location_entry_changed (gpointer callback_data)
{
NautilusNavigationWindow *window;
- GList *walk;
+ GList *walk;
gboolean use_entry;
window = NAUTILUS_NAVIGATION_WINDOW (callback_data);
@@ -777,12 +767,12 @@ real_sync_allow_stop (NautilusWindow *window,
static void
real_prompt_for_location (NautilusWindow *window, const char *initial)
{
- NautilusNavigationWindowPane *pane;
-
+ NautilusNavigationWindowPane *pane;
+
remember_focus_widget (NAUTILUS_NAVIGATION_WINDOW (window));
- pane = NAUTILUS_NAVIGATION_WINDOW_PANE (window->details->active_pane);
-
+ pane = NAUTILUS_NAVIGATION_WINDOW_PANE (window->details->active_pane);
+
nautilus_navigation_window_pane_show_location_bar_temporarily (pane);
nautilus_navigation_window_pane_show_navigation_bar_temporarily (pane);
@@ -836,13 +826,13 @@ static void
real_sync_search_widgets (NautilusWindow *window)
{
NautilusNavigationWindow *navigation_window;
- NautilusNavigationWindowPane *pane;
+ NautilusNavigationWindowPane *pane;
NautilusWindowSlot *slot;
NautilusDirectory *directory;
NautilusSearchDirectory *search_directory;
navigation_window = NAUTILUS_NAVIGATION_WINDOW (window);
- pane = NAUTILUS_NAVIGATION_WINDOW_PANE (window->details->active_pane);
+ pane = NAUTILUS_NAVIGATION_WINDOW_PANE (window->details->active_pane);
slot = window->details->active_pane->active_slot;
search_directory = NULL;
@@ -1200,7 +1190,7 @@ real_close_slot (NautilusWindowPane *pane,
page_num = gtk_notebook_page_num (notebook, slot->content_box);
g_assert (page_num >= 0);
-
+
nautilus_navigation_window_pane_remove_page (NAUTILUS_NAVIGATION_WINDOW_PANE (pane), page_num);
gtk_notebook_set_show_tabs (notebook,
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 03efe07..19d525c 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -298,22 +298,22 @@ handle_go_elsewhere (NautilusWindowSlot *slot, GFile *location)
void
nautilus_window_update_up_button (NautilusWindow *window)
{
- NautilusWindowSlot *slot;
- gboolean allowed;
- GFile *parent;
-
- slot = window->details->active_pane->active_slot;
-
- allowed = FALSE;
- if (slot->location != NULL) {
- parent = g_file_get_parent (slot->location);
- allowed = parent != NULL;
- if (parent != NULL) {
- g_object_unref (parent);
+ NautilusWindowSlot *slot;
+ gboolean allowed;
+ GFile *parent;
+
+ slot = window->details->active_pane->active_slot;
+
+ allowed = FALSE;
+ if (slot->location != NULL) {
+ parent = g_file_get_parent (slot->location);
+ allowed = parent != NULL;
+ if (parent != NULL) {
+ g_object_unref (parent);
}
- }
+ }
- nautilus_window_allow_up (window, allowed);
+ nautilus_window_allow_up (window, allowed);
}
static void
diff --git a/src/nautilus-window-pane.c b/src/nautilus-window-pane.c
index e853906..371fede 100644
--- a/src/nautilus-window-pane.c
+++ b/src/nautilus-window-pane.c
@@ -148,10 +148,10 @@ nautilus_window_pane_sync_location_widgets (NautilusWindowPane *pane)
{
if (NAUTILUS_IS_NAVIGATION_WINDOW_PANE (pane)) {
NautilusNavigationWindowSlot *navigation_slot;
-
+
nautilus_navigation_window_pane_sync_location_widgets (NAUTILUS_NAVIGATION_WINDOW_PANE (pane));
nautilus_window_update_up_button (pane->window);
-
+
/* Check if the back and forward buttons need enabling or disabling. */
navigation_slot = NAUTILUS_NAVIGATION_WINDOW_SLOT (pane->window->details->active_pane->active_slot);
nautilus_navigation_window_allow_back (NAUTILUS_NAVIGATION_WINDOW (pane->window),
@@ -177,7 +177,7 @@ nautilus_window_pane_init (NautilusWindowPane *pane)
pane->slots = NULL;
pane->active_slots = NULL;
pane->active_slot = NULL;
- pane->is_active = FALSE;
+ pane->is_active = FALSE;
}
void
diff --git a/src/nautilus-window-pane.h b/src/nautilus-window-pane.h
index 7c72b3d..7eb70ab 100644
--- a/src/nautilus-window-pane.h
+++ b/src/nautilus-window-pane.h
@@ -63,7 +63,7 @@ struct _NautilusWindowPane {
NautilusWindowSlot *active_slot;
/* whether or not this pane is active */
- gboolean is_active;
+ gboolean is_active;
};
GType nautilus_window_pane_get_type (void);
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index ce2bf84..d29c89c 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -744,14 +744,14 @@ void
nautilus_window_close_slot (NautilusWindowSlot *slot)
{
NautilusWindowPane *pane;
-
+
g_assert (NAUTILUS_IS_WINDOW_SLOT (slot));
g_assert (NAUTILUS_IS_WINDOW_PANE(slot->pane));
g_assert (g_list_find (slot->pane->slots, slot) != NULL);
/* save pane because slot is not valid anymore after this call */
pane = slot->pane;
-
+
EEL_CALL_METHOD (NAUTILUS_WINDOW_CLASS, slot->pane->window,
close_slot, (slot->pane, slot));
@@ -839,7 +839,7 @@ nautilus_window_set_active_slot (NautilusWindow *window, NautilusWindowSlot *new
if (old_slot->content_view != NULL) {
nautilus_window_slot_disconnect_content_view (old_slot, old_slot->content_view);
}
-
+
/* inform slot & view */
g_signal_emit_by_name (old_slot, "inactive");
}
@@ -858,7 +858,7 @@ nautilus_window_set_active_slot (NautilusWindow *window, NautilusWindowSlot *new
g_list_remove (window->details->active_pane->active_slots, new_slot);
window->details->active_pane->active_slots =
g_list_prepend (window->details->active_pane->active_slots, new_slot);
-
+
/* inform sidebar panels */
nautilus_window_report_location_change (window);
/* TODO decide whether "selection-changed" should be emitted */
@@ -1797,7 +1797,7 @@ NautilusWindowPane*
nautilus_window_get_pane_from_slot (NautilusWindow *window, NautilusWindowSlot *slot)
{
GList *walk, *wSlot;
-
+
/* check active slot on active pane first */
if (slot == window->details->active_pane->active_slot) {
return window->details->active_pane;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]