[nautilus] navigation-window-pane: cleanup header
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] navigation-window-pane: cleanup header
- Date: Thu, 17 Feb 2011 16:31:09 +0000 (UTC)
commit 3a27963142a0ef942631f88f2576f8bc29076898
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Feb 15 19:56:19 2011 -0500
navigation-window-pane: cleanup header
src/nautilus-navigation-window-pane.c | 63 +++++++++++++++------------------
src/nautilus-navigation-window-pane.h | 5 ---
2 files changed, 29 insertions(+), 39 deletions(-)
---
diff --git a/src/nautilus-navigation-window-pane.c b/src/nautilus-navigation-window-pane.c
index 7b5d859..bbbf2fa 100644
--- a/src/nautilus-navigation-window-pane.c
+++ b/src/nautilus-navigation-window-pane.c
@@ -138,6 +138,35 @@ search_bar_activate_callback (NautilusSearchBar *bar,
}
static void
+nautilus_navigation_window_pane_hide_temporary_bars (NautilusNavigationWindowPane *pane)
+{
+ NautilusWindowSlot *slot;
+ NautilusDirectory *directory;
+
+ g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_PANE (pane));
+
+ slot = NAUTILUS_WINDOW_PANE (pane)->active_slot;
+
+ if (pane->temporary_navigation_bar) {
+ directory = nautilus_directory_get (slot->location);
+
+ pane->temporary_navigation_bar = FALSE;
+
+ /* if we're in a search directory, hide the main bar, and show the search
+ * bar again; otherwise, just hide the whole toolbar.
+ */
+ if (NAUTILUS_IS_SEARCH_DIRECTORY (directory)) {
+ nautilus_toolbar_set_show_main_bar (NAUTILUS_TOOLBAR (pane->tool_bar), FALSE);
+ nautilus_toolbar_set_show_search_bar (NAUTILUS_TOOLBAR (pane->tool_bar), TRUE);
+ } else {
+ gtk_widget_hide (pane->tool_bar);
+ }
+
+ nautilus_directory_unref (directory);
+ }
+}
+
+static void
search_bar_cancel_callback (GtkWidget *widget,
NautilusNavigationWindowPane *pane)
{
@@ -581,40 +610,6 @@ nautilus_navigation_window_pane_hide_search_bar (NautilusNavigationWindowPane *p
}
}
-gboolean
-nautilus_navigation_window_pane_hide_temporary_bars (NautilusNavigationWindowPane *pane)
-{
- NautilusWindowSlot *slot;
- NautilusDirectory *directory;
- gboolean success;
-
- g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_PANE (pane));
-
- slot = NAUTILUS_WINDOW_PANE (pane)->active_slot;
- success = FALSE;
-
- if (pane->temporary_navigation_bar) {
- directory = nautilus_directory_get (slot->location);
-
- pane->temporary_navigation_bar = FALSE;
- success = TRUE;
-
- /* if we're in a search directory, hide the main bar, and show the search
- * bar again; otherwise, just hide the whole toolbar.
- */
- if (NAUTILUS_IS_SEARCH_DIRECTORY (directory)) {
- nautilus_toolbar_set_show_main_bar (NAUTILUS_TOOLBAR (pane->tool_bar), FALSE);
- nautilus_toolbar_set_show_search_bar (NAUTILUS_TOOLBAR (pane->tool_bar), TRUE);
- } else {
- gtk_widget_hide (pane->tool_bar);
- }
-
- nautilus_directory_unref (directory);
- }
-
- return success;
-}
-
void
nautilus_navigation_window_pane_setup (NautilusNavigationWindowPane *pane)
{
diff --git a/src/nautilus-navigation-window-pane.h b/src/nautilus-navigation-window-pane.h
index f77e89d..3451d37 100644
--- a/src/nautilus-navigation-window-pane.h
+++ b/src/nautilus-navigation-window-pane.h
@@ -78,11 +78,6 @@ void nautilus_navigation_window_pane_ensure_location_bar (NautilusNavigation
void nautilus_navigation_window_pane_ensure_search_bar (NautilusNavigationWindowPane *pane);
void nautilus_navigation_window_pane_hide_search_bar (NautilusNavigationWindowPane *pane);
-void nautilus_navigation_window_pane_hide_path_bar (NautilusNavigationWindowPane *pane);
-void nautilus_navigation_window_pane_show_path_bar (NautilusNavigationWindowPane *pane);
-gboolean nautilus_navigation_window_pane_path_bar_showing (NautilusNavigationWindowPane *pane);
-gboolean nautilus_navigation_window_pane_search_bar_showing (NautilusNavigationWindowPane *pane);
-gboolean nautilus_navigation_window_pane_hide_temporary_bars (NautilusNavigationWindowPane *pane);
/* notebook */
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]