[Xfce4-commits] <garcon:jannis/global-monitoring> Add method garcon_menu_item_pool_clear().
Jannis Pohlmann
noreply at xfce.org
Wed Mar 10 21:02:03 CET 2010
Updating branch refs/heads/jannis/global-monitoring
to 32e3f0914eeb5f1766e66e4d1490134c53162b14 (commit)
from 91c43b124d66a3e36a4dd28d8fe21969a7090fc3 (commit)
commit 32e3f0914eeb5f1766e66e4d1490134c53162b14
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