[gtk+/gtk-2-24: 2/15] Remove duplicated code from *_switch_to_browse_mode()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24: 2/15] Remove duplicated code from *_switch_to_browse_mode()
- Date: Thu, 1 Sep 2011 16:27:14 +0000 (UTC)
commit cb4b82e370c94fcb4efcc1ec6eeb6a36636bbeb2
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jul 26 16:04:14 2011 -0500
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>
gtk/gtkfilechooserdefault.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index f97542d..a48c9a9 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -8969,12 +8969,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);
@@ -9257,8 +9252,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]