[nautilus-actions] Only update items if preferences actually change
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Only update items if preferences actually change
- Date: Wed, 19 Jan 2011 21:49:38 +0000 (UTC)
commit a923170f35409e92053747b45eddbf22a47c9e36
Author: Pierre Wieser <pwieser trychlos org>
Date: Sat Jan 8 19:57:45 2011 +0100
Only update items if preferences actually change
src/plugin-menu/nautilus-actions.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/plugin-menu/nautilus-actions.c b/src/plugin-menu/nautilus-actions.c
index 172b1c2..dde30b3 100644
--- a/src/plugin-menu/nautilus-actions.c
+++ b/src/plugin-menu/nautilus-actions.c
@@ -1009,23 +1009,33 @@ on_items_list_changed( const gchar *key, gpointer newvalue, NautilusActions *plu
static void
on_items_add_about_item_changed( const gchar *key, gpointer newvalue, NautilusActions *plugin )
{
+ gboolean newbool;
+
g_return_if_fail( NAUTILUS_IS_ACTIONS( plugin ));
if( !plugin->private->dispose_has_run ){
- plugin->private->items_add_about_item = ( gboolean ) GPOINTER_TO_UINT( newvalue );
- nautilus_menu_provider_emit_items_updated_signal( NAUTILUS_MENU_PROVIDER( plugin ));
+ newbool = ( gboolean ) GPOINTER_TO_UINT( newvalue );
+ if( newbool != plugin->private->items_add_about_item ){
+ plugin->private->items_add_about_item = newbool;
+ nautilus_menu_provider_emit_items_updated_signal( NAUTILUS_MENU_PROVIDER( plugin ));
+ }
}
}
static void
on_items_create_root_menu_changed( const gchar *key, gpointer newvalue, NautilusActions *plugin )
{
+ gboolean newbool;
+
g_return_if_fail( NAUTILUS_IS_ACTIONS( plugin ));
if( !plugin->private->dispose_has_run ){
- plugin->private->items_create_root_menu = ( gboolean ) GPOINTER_TO_UINT( newvalue );
- nautilus_menu_provider_emit_items_updated_signal( NAUTILUS_MENU_PROVIDER( plugin ));
+ newbool = ( gboolean ) GPOINTER_TO_UINT( newvalue );
+ if( newbool != plugin->private->plugin->private->items_create_root_menu ){
+ plugin->private->items_create_root_menu = newbool;
+ nautilus_menu_provider_emit_items_updated_signal( NAUTILUS_MENU_PROVIDER( plugin ));
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]