summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2011-07-26 16:04:14 -0500
committerFederico Mena Quintero <federico@gnome.org>2011-07-27 18:46:26 -0500
commit6a00a965c52fcaa646f42993190e87b07ba38413 (patch)
tree9f0e0de97d78873d1fddef98934520f7e372533d
parent3b2185cd8e3745f293f4c5a26266569fde48d8e3 (diff)
downloadgtk+-6a00a965c52fcaa646f42993190e87b07ba38413.tar.gz
Remove duplicated code from *_switch_to_browse_mode()
That code indeed lives in operation_mode_stop(), so use it instead of having inlined duplicates. Signed-off-by: Federico Mena Quintero <federico@gnome.org>
-rw-r--r--gtk/gtkfilechooserdefault.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index d8420fb0db..fbd0f6b82d 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -8991,12 +8991,7 @@ search_switch_to_browse_mode (GtkFileChooserDefault *impl)
{
g_assert (impl->operation_mode != OPERATION_MODE_BROWSE);
- search_stop_searching (impl, FALSE);
- search_clear_model (impl, TRUE);
-
- gtk_widget_destroy (impl->search_hbox);
- impl->search_hbox = NULL;
- impl->search_entry = NULL;
+ operation_mode_stop (impl, impl->operation_mode);
impl->operation_mode = OPERATION_MODE_BROWSE;
path_bar_update (impl);
@@ -9279,8 +9274,7 @@ recent_switch_to_browse_mode (GtkFileChooserDefault *impl)
{
g_assert (impl->operation_mode != OPERATION_MODE_BROWSE);
- recent_stop_loading (impl);
- recent_clear_model (impl, TRUE);
+ operation_mode_stop (impl, impl->operation_mode);
impl->operation_mode = OPERATION_MODE_BROWSE;
path_bar_update (impl);