summaryrefslogtreecommitdiff
path: root/src/nautilus-navigation-window.c
diff options
context:
space:
mode:
authorMartin Wehner <martin.wehner@gmail.com>2007-07-18 22:07:07 +0000
committerMartin Wehner <mwehner@src.gnome.org>2007-07-18 22:07:07 +0000
commit031f0600a686b7d0ce8948a92e78431f79d40292 (patch)
treeb6863124a2e82c85b20a0d92b3768908db065f9e /src/nautilus-navigation-window.c
parentf04ae5372bdffc6c6d932849dca116a013d35fab (diff)
downloadnautilus-031f0600a686b7d0ce8948a92e78431f79d40292.tar.gz
Handle the fact that the gtk+ 2.11.x combobox emits the changed signal on
2007-07-18 Martin Wehner <martin.wehner@gmail.com> * src/nautilus-navigation-window.c: (view_as_menu_switch_views_callback): Handle the fact that the gtk+ 2.11.x combobox emits the changed signal on removing the active entry without crash. svn path=/trunk/; revision=13002
Diffstat (limited to 'src/nautilus-navigation-window.c')
-rw-r--r--src/nautilus-navigation-window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 8890f0dca..42e7f81a4 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -854,8 +854,10 @@ view_as_menu_switch_views_callback (GtkComboBox *combo_box, NautilusWindow *wind
g_assert (NAUTILUS_IS_WINDOW (window));
active = gtk_combo_box_get_active (combo_box);
-
- if (active < GPOINTER_TO_INT (g_object_get_data (G_OBJECT (combo_box), "num viewers")) ) {
+
+ if (active < 0) {
+ return;
+ } else if (active < GPOINTER_TO_INT (g_object_get_data (G_OBJECT (combo_box), "num viewers"))) {
activate_nth_short_list_item (window, active);
} else {
activate_extra_viewer (window);