Updating branch refs/heads/jannis/global-monitoring to da1d09ffea117bc91408a9e7a1bf35355d4a8175 (commit) from 7d42e955c11060646e17d3e1f67a601ba3d6a503 (commit)
commit da1d09ffea117bc91408a9e7a1bf35355d4a8175 Author: Jannis Pohlmann <jan...@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 _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits