[nautilus] view: consolidate menu update code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] view: consolidate menu update code
- Date: Mon, 2 Jul 2012 16:59:09 +0000 (UTC)
commit 67322ddefe9592bde6b2e146e81878e3638a0163
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Jul 2 12:51:40 2012 -0400
view: consolidate menu update code
Remove an useless callback and ensure all the global changes go trough
the menu update queue.
src/nautilus-view.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index f1e7fa2..aed85b6 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -289,7 +289,6 @@ static void clipboard_changed_callback (NautilusClipboar
static void open_one_in_new_window (gpointer data,
gpointer callback_data);
static void schedule_update_menus (NautilusView *view);
-static void schedule_update_menus_callback (gpointer callback_data);
static void remove_update_menus_timeout_callback (NautilusView *view);
static void schedule_update_status (NautilusView *view);
static void remove_update_status_idle_callback (NautilusView *view);
@@ -2660,13 +2659,13 @@ nautilus_view_init (NautilusView *view)
/* Register to menu provider extension signal managing menu updates */
g_signal_connect_object (nautilus_signaller_get_current (), "popup_menu_changed",
- G_CALLBACK (nautilus_view_update_menus), view, G_CONNECT_SWAPPED);
+ G_CALLBACK (schedule_update_menus), view, G_CONNECT_SWAPPED);
gtk_widget_show (GTK_WIDGET (view));
g_signal_connect_swapped (nautilus_preferences,
"changed::" NAUTILUS_PREFERENCES_ENABLE_DELETE,
- G_CALLBACK (schedule_update_menus_callback), view);
+ G_CALLBACK (schedule_update_menus), view);
g_signal_connect_swapped (nautilus_preferences,
"changed::" NAUTILUS_PREFERENCES_CLICK_POLICY,
G_CALLBACK(click_policy_changed_callback),
@@ -2788,7 +2787,7 @@ nautilus_view_finalize (GObject *object)
view = NAUTILUS_VIEW (object);
g_signal_handlers_disconnect_by_func (nautilus_preferences,
- schedule_update_menus_callback, view);
+ schedule_update_menus, view);
g_signal_handlers_disconnect_by_func (nautilus_preferences,
click_policy_changed_callback, view);
g_signal_handlers_disconnect_by_func (nautilus_preferences,
@@ -9118,12 +9117,6 @@ real_using_manual_layout (NautilusView *view)
return FALSE;
}
-static void
-schedule_update_menus_callback (gpointer callback_data)
-{
- schedule_update_menus (NAUTILUS_VIEW (callback_data));
-}
-
void
nautilus_view_ignore_hidden_file_preferences (NautilusView *view)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]