[glib/wip/menus: 41/61] GMenuProxy: apply changes even if inactive



commit f6297dcf1c3680f2d8e0a1d9dd820bcd12dceca1
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Oct 22 15:17:52 2011 -0400

    GMenuProxy: apply changes even if inactive
    
    If we are told that the underlying menu has changed then we should apply
    the changes even if we are inactive.  When we become active in the
    future, we will need to have the proper contents of the menu.
    
    Just don't emit the signal...

 gio/gmenuproxy.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gio/gmenuproxy.c b/gio/gmenuproxy.c
index 8f3e56d..3ea8c8d 100644
--- a/gio/gmenuproxy.c
+++ b/gio/gmenuproxy.c
@@ -793,12 +793,9 @@ g_menu_proxy_changed (GMenuProxy *proxy,
                       gint        removed,
                       gint        added)
 {
-  if (!proxy->active)
-    return;
-
   proxy->items = items;
 
-  if (removed || added)
+  if (proxy->active && (removed || added))
     g_menu_model_items_changed (G_MENU_MODEL (proxy), position, removed, added);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]