diff --git a/ChangeLog b/ChangeLog index 9f4f7e9f15c07499fe02a3753b01989835f4059d..aa5c85f62fe9a2ec377b49cea3ea4853a067cef8 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 d0505d28c5fe54690aedfc86eac64cf19e7f950c..8bec553dfaef862e60124ae3fafd37383300bb70 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