[gtk+: 3/14] Rename stop_operation() to operation_mode_stop()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+: 3/14] Rename stop_operation() to operation_mode_stop()
- Date: Wed, 27 Jul 2011 23:57:06 +0000 (UTC)
commit 9e6e6575de6525a2a2329022a0fe26e701e43cec
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jul 26 16:00:35 2011 -0500
Rename stop_operation() to operation_mode_stop()
We'll now prefix functions to change the impl->operation_mode with 'operation_mode',
for clarity.
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkfilechooserdefault.c | 59 ++++++++++++++++++++++--------------------
1 files changed, 31 insertions(+), 28 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 4fef165..67aca9d 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -5227,6 +5227,35 @@ path_bar_update (GtkFileChooserDefault *impl)
path_bar_set_mode (impl, mode);
}
+/* Stops running operations like populating the browse model, searches, and the recent-files model */
+static void
+operation_mode_stop (GtkFileChooserDefault *impl, OperationMode mode)
+{
+ switch (mode)
+ {
+ case OPERATION_MODE_BROWSE:
+ stop_loading_and_clear_list_model (impl, TRUE);
+ break;
+
+ case OPERATION_MODE_SEARCH:
+ search_stop_searching (impl, FALSE);
+ search_clear_model (impl, TRUE);
+
+ gtk_widget_destroy (impl->search_hbox);
+ impl->search_hbox = NULL;
+ impl->search_entry = NULL;
+ break;
+
+ case OPERATION_MODE_RECENT:
+ recent_stop_loading (impl);
+ recent_clear_model (impl, TRUE);
+ break;
+
+ default:
+ g_assert_not_reached ();
+ }
+}
+
/* This function is basically a do_all function.
*
* It sets the visibility on all the widgets based on the current state, and
@@ -9173,32 +9202,6 @@ search_setup_widgets (GtkFileChooserDefault *impl)
/* FMQ: hide the filter combo? */
}
-/* Stops running operations like populating the browse model, searches, and the recent-files model */
-static void
-stop_operation (GtkFileChooserDefault *impl, OperationMode mode)
-{
- switch (mode)
- {
- case OPERATION_MODE_BROWSE:
- stop_loading_and_clear_list_model (impl, TRUE);
- break;
-
- case OPERATION_MODE_SEARCH:
- search_stop_searching (impl, FALSE);
- search_clear_model (impl, TRUE);
-
- gtk_widget_destroy (impl->search_hbox);
- impl->search_hbox = NULL;
- impl->search_entry = NULL;
- break;
-
- case OPERATION_MODE_RECENT:
- recent_stop_loading (impl);
- recent_clear_model (impl, TRUE);
- break;
- }
-}
-
/* Sometimes we need to frob the selection in the shortcuts list manually */
static void
shortcuts_select_item_without_activating (GtkFileChooserDefault *impl, int pos)
@@ -9236,7 +9239,7 @@ search_activate (GtkFileChooserDefault *impl)
shortcuts_select_item_without_activating (impl, shortcuts_get_index (impl, SHORTCUTS_SEARCH));
- stop_operation (impl, previous_mode);
+ operation_mode_stop (impl, previous_mode);
g_assert (impl->search_hbox == NULL);
g_assert (impl->search_entry == NULL);
@@ -9570,7 +9573,7 @@ recent_activate (GtkFileChooserDefault *impl)
shortcuts_select_item_without_activating (impl, shortcuts_get_index (impl, SHORTCUTS_RECENT));
- stop_operation (impl, previous_mode);
+ operation_mode_stop (impl, previous_mode);
recent_hide_entry (impl);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]