From b71d9736f32b447eaaad1e97b60a7f81d1467c7e Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 19 Mar 2009 15:32:53 +0000 Subject: [PATCH] Always synchronize the location bar button with the pathbar mode. Patch by MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2009-03-19 Cosimo Cecchi * src/nautilus-navigation-window.c: (always_use_location_entry_changed), (nautilus_navigation_window_set_bar_mode): Always synchronize the location bar button with the pathbar mode. Patch by Paweł Paprota (#416891). svn path=/trunk/; revision=15140 --- ChangeLog | 8 ++++++++ src/nautilus-navigation-window.c | 23 +++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f4f7e9f1..aa5c85f62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-03-19 Cosimo Cecchi + + * src/nautilus-navigation-window.c: + (always_use_location_entry_changed), + (nautilus_navigation_window_set_bar_mode): + Always synchronize the location bar button with the pathbar + mode. Patch by Paweł Paprota (#416891). + 2009-03-19 Alexander Larsson diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index d0505d28c..8bec553df 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -531,14 +531,6 @@ always_use_location_entry_changed (gpointer callback_data) } else { nautilus_navigation_window_set_bar_mode (window, NAUTILUS_BAR_PATH); } - - g_signal_handlers_block_by_func (window->details->location_button, - G_CALLBACK (location_button_toggled_cb), - window); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (window->details->location_button), use_entry); - g_signal_handlers_unblock_by_func (window->details->location_button, - G_CALLBACK (location_button_toggled_cb), - window); } static void @@ -1644,6 +1636,8 @@ static void nautilus_navigation_window_set_bar_mode (NautilusNavigationWindow *window, NautilusBarMode mode) { + gboolean use_entry; + switch (mode) { case NAUTILUS_BAR_PATH: @@ -1664,6 +1658,19 @@ nautilus_navigation_window_set_bar_mode (NautilusNavigationWindow *window, gtk_widget_hide (window->navigation_bar); break; } + + if (mode == NAUTILUS_BAR_NAVIGATION || mode == NAUTILUS_BAR_PATH) { + use_entry = (mode == NAUTILUS_BAR_NAVIGATION); + + g_signal_handlers_block_by_func (window->details->location_button, + G_CALLBACK (location_button_toggled_cb), + window); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (window->details->location_button), + use_entry); + g_signal_handlers_unblock_by_func (window->details->location_button, + G_CALLBACK (location_button_toggled_cb), + window); + } } gboolean -- GitLab