[Xfce4-commits] [xfce/garcon] 01/04: Decrement allocation counter on item unref (#12700)

noreply at xfce.org noreply at xfce.org
Sun Nov 18 20:29:12 CET 2018


This is an automated email from the git hooks/post-receive script.

s   k   u   n   n   y   k       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/garcon.

commit 5df804aedbb44c42d050e3865f1af9eac77b89a2
Author: Yegor Timoshenko <yegortimoshenko at gmail.com>
Date:   Thu Dec 14 21:13:02 2017 +0000

    Decrement allocation counter on item unref (#12700)
---
 garcon/garcon-menu-item-pool.c | 7 ++++++-
 garcon/garcon-menu-item.c      | 6 ++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/garcon/garcon-menu-item-pool.c b/garcon/garcon-menu-item-pool.c
index 2017180..355e520 100644
--- a/garcon/garcon-menu-item-pool.c
+++ b/garcon/garcon-menu-item-pool.c
@@ -191,7 +191,12 @@ garcon_menu_item_pool_filter_exclude (const gchar    *desktop_id,
   g_return_val_if_fail (GARCON_IS_MENU_ITEM (item), FALSE);
   g_return_val_if_fail (node != NULL, FALSE);
 
-  return garcon_menu_node_tree_rule_matches (node, item);
+  gboolean matches = garcon_menu_node_tree_rule_matches (node, item);
+
+  if (matches)
+    garcon_menu_item_increment_allocated (item);
+
+  return matches;
 }
 
 
diff --git a/garcon/garcon-menu-item.c b/garcon/garcon-menu-item.c
index a69f228..04ff2a0 100644
--- a/garcon/garcon-menu-item.c
+++ b/garcon/garcon-menu-item.c
@@ -1720,7 +1720,7 @@ garcon_menu_item_get_actions (GarconMenuItem *item)
   GarconMenuItemAction *action;
 
   g_return_val_if_fail (GARCON_IS_MENU_ITEM (item), NULL);
-  
+
   for (iter = item->priv->actions; iter != NULL ; iter = g_list_next (iter))
     {
       action = GARCON_MENU_ITEM_ACTION (iter->data);
@@ -1767,7 +1767,7 @@ garcon_menu_item_set_action (GarconMenuItem       *item,
 
   g_return_if_fail (GARCON_IS_MENU_ITEM (item));
   g_return_if_fail (GARCON_IS_MENU_ITEM_ACTION (action));
-  
+
   /* If action name is found in list, then insert new action into the list and
    * remove old action */
   for (iter = item->priv->actions; !found && iter != NULL; iter = g_list_next (iter))
@@ -1908,6 +1908,8 @@ garcon_menu_item_unref (GarconMenuItem *item)
 {
   g_return_if_fail (GARCON_IS_MENU_ITEM (item));
 
+  garcon_menu_item_decrement_allocated (item);
+
   /* Decrement the reference counter */
   g_object_unref (G_OBJECT (item));
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list