diff options
author | Pavel Cisler <pavel@eazel.com> | 2000-10-10 21:29:00 +0000 |
---|---|---|
committer | Pavel Cisler <pce@src.gnome.org> | 2000-10-10 21:29:00 +0000 |
commit | 42066487963e7a0997a2d3dab75de4255e86e128 (patch) | |
tree | d0a35d6a6c1d6375b7a1e9cfdad5bad1a9e66433 /src/nautilus-window.c | |
parent | 394eda6ba04eef930df321a6daf8820b56167a5c (diff) | |
download | nautilus-42066487963e7a0997a2d3dab75de4255e86e128.tar.gz |
Fix an uninitialized variable warning.
2000-10-10 Pavel Cisler <pavel@eazel.com>
* src/nautilus-window.c: (navigation_bar_mode_changed_callback):
Fix an uninitialized variable warning.
Diffstat (limited to 'src/nautilus-window.c')
-rw-r--r-- | src/nautilus-window.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 4e5f900b1..5325f070d 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -215,28 +215,19 @@ navigation_bar_mode_changed_callback (GtkWidget *widget, NautilusSwitchableNavigationBarMode mode, NautilusWindow *window) { - gboolean new_toggle_state; - nautilus_window_update_find_menu_item (window); window->details->updating_bonobo_state = TRUE; - switch (mode) { - case NAUTILUS_SWITCHABLE_NAVIGATION_BAR_MODE_LOCATION: - new_toggle_state = FALSE; - break; - case NAUTILUS_SWITCHABLE_NAVIGATION_BAR_MODE_SEARCH: - new_toggle_state = TRUE; - break; - default: - g_assert_not_reached (); - } + g_assert (mode == NAUTILUS_SWITCHABLE_NAVIGATION_BAR_MODE_LOCATION + || mode == NAUTILUS_SWITCHABLE_NAVIGATION_BAR_MODE_SEARCH); + /* FIXME: bugzilla.eazel.com 3590: * We shouldn't need a separate command for the toggle button and menu item. * This is a Bonobo design flaw, explained in the bug report. */ nautilus_bonobo_set_toggle_state (window->details->shell_ui, NAUTILUS_COMMAND_TOGGLE_FIND_MODE_WITH_STATE, - new_toggle_state); + mode == NAUTILUS_SWITCHABLE_NAVIGATION_BAR_MODE_SEARCH); window->details->updating_bonobo_state = FALSE; } |