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's avatarFederico Mena Quintero <federico@gnome.org>
parent 3b2185cd
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment