[Xfce4-commits] <garcon:jannis/global-monitoring> Add method garcon_menu_item_pool_clear().
Jannis Pohlmann
noreply at xfce.org
Sat Mar 20 13:22:04 CET 2010
Updating branch refs/heads/jannis/global-monitoring
to 7363e873f0ed8f91f27d9c2eb795ef73eed632b2 (commit)
from bc96ebcaf312aee5aee8f5af2acba094b2828a59 (commit)
commit 7363e873f0ed8f91f27d9c2eb795ef73eed632b2
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Mon Mar 8 21:38:19 2010 +0100
Add method garcon_menu_item_pool_clear().
This method removes all items from the item pool hash table.
garcon/garcon-menu-item-pool.c | 9 +++++++++
garcon/garcon-menu-item-pool.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/garcon/garcon-menu-item-pool.c b/garcon/garcon-menu-item-pool.c
index 999b0f9..49ec005 100644
--- a/garcon/garcon-menu-item-pool.c
+++ b/garcon/garcon-menu-item-pool.c
@@ -178,3 +178,12 @@ garcon_menu_item_pool_get_empty (GarconMenuItemPool *pool)
g_return_val_if_fail (GARCON_IS_MENU_ITEM_POOL (pool), TRUE);
return (g_hash_table_size (pool->priv->items) == 0);
}
+
+
+
+void
+garcon_menu_item_pool_clear (GarconMenuItemPool *pool)
+{
+ g_return_if_fail (GARCON_IS_MENU_ITEM_POOL (pool));
+ g_hash_table_remove_all (pool->priv->items);
+}
diff --git a/garcon/garcon-menu-item-pool.h b/garcon/garcon-menu-item-pool.h
index b75a13a..9e127ae 100644
--- a/garcon/garcon-menu-item-pool.h
+++ b/garcon/garcon-menu-item-pool.h
@@ -55,6 +55,7 @@ void garcon_menu_item_pool_foreach (GarconMenuItemPool
void garcon_menu_item_pool_apply_exclude_rule (GarconMenuItemPool *pool,
GNode *node);
gboolean garcon_menu_item_pool_get_empty (GarconMenuItemPool *pool);
+void garcon_menu_item_pool_clear (GarconMenuItemPool *pool);
G_END_DECLS
More information about the Xfce4-commits
mailing list