From adcf2fd3f3fa1cfb375ad0e15a429849745973a0 Mon Sep 17 00:00:00 2001 From: Jan Arne Petersen Date: Sat, 24 May 2008 18:59:56 +0000 Subject: [PATCH] Don't try to toggle the visibility of the location entry field in search 2008-05-24 Jan Arne Petersen * gtk/gtkfilechooserdefault.c: (location_toggle_popup_handler): Don't try to toggle the visibility of the location entry field in search and recent mode (#526422) svn path=/trunk/; revision=20138 --- ChangeLog | 6 ++++++ gtk/gtkfilechooserdefault.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 11e77b7ce0..59ee0a90aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-24 Jan Arne Petersen + + * gtk/gtkfilechooserdefault.c: (location_toggle_popup_handler): Don't + try to toggle the visibility of the location entry field in search and + recent mode (#526422) + 2008-05-24 Jan Arne Petersen * gtk/gtkfilechooserdefault.c: (shortcuts_query_tooltip_cb), diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index fbd0295bd3..ecb01d53ef 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -5216,6 +5216,14 @@ location_mode_set (GtkFileChooserDefault *impl, static void location_toggle_popup_handler (GtkFileChooserDefault *impl) { + /* when in search or recent files mode, we are not showing the + * location_entry_box container, so there's no point in switching + * to it. + */ + if (impl->operation_mode == OPERATION_MODE_SEARCH || + impl->operation_mode == OPERATION_MODE_RECENT) + return; + /* If the file entry is not visible, show it. * If it is visible, turn it off only if it is focused. Otherwise, switch to the entry. */