From 7726276fe9c21f2a70ff3f556d2232f7d2d5fb7f Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 26 Jul 2011 16:04:14 -0500 Subject: [PATCH] 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 --- gtk/gtkfilechooserdefault.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 67aca9d801..1dafc5fc58 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -9001,12 +9001,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); @@ -9289,8 +9284,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);