Index: libxfce4menu/xfce-menu-item-cache.c =================================================================== --- libxfce4menu/xfce-menu-item-cache.c (revision 29518) +++ libxfce4menu/xfce-menu-item-cache.c (working copy) @@ -61,7 +61,7 @@ static void xfce_menu_item_cache_class_init (XfceMenuItemCacheClass *klass); static void xfce_menu_item_cache_init (XfceMenuItemCache *cache); static void xfce_menu_item_cache_finalize (GObject *object); -#if 1 /* ITEM CACHE DEACTIVATED FOR NOW */ +#if 0 /* ITEM CACHE DEACTIVATED FOR NOW */ static XfceMenuItem *xfce_menu_item_cache_fetch_item (XfceMenuItemCache *cache, const gchar *filename); static void xfce_menu_item_cache_store_item (XfceMenuItemCache *cache, @@ -178,7 +178,9 @@ static void xfce_menu_item_cache_init (XfceMenuItemCache *cache) { +#if 0 /* ITEM CACHE DEACTIVATED FOR NOW */ gchar *path; +#endif cache->priv = XFCE_MENU_ITEM_CACHE_GET_PRIVATE (cache); @@ -188,6 +190,7 @@ /* Create empty hash table */ cache->priv->items = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) xfce_menu_item_unref); +#if 0 /* ITEM CACHE DEACTIVATED FOR NOW */ /* Determine path to the item cache file */ path = xfce_resource_save_location (XFCE_RESOURCE_CACHE, "libxfce4menu/items.tdb", TRUE); @@ -209,6 +212,7 @@ /* Release the path */ g_free (path); +#endif } @@ -261,7 +265,6 @@ * item cache */ g_mutex_lock (cache->priv->lock); -#if 1 /* Search filename in the hash table */ item = g_hash_table_lookup (cache->priv->items, filename); @@ -273,8 +276,10 @@ /* TODO Check OnlyShowIn / NotShowIn values */ +#if 0 /* Store updated item in cache */ xfce_menu_item_cache_store_item (cache, filename, item); +#endif /* Release item cache lock */ g_mutex_unlock (cache->priv->lock); @@ -282,6 +287,7 @@ return item; } +#if 0 /* Otherwise, search in the item cache */ if (G_LIKELY (cache->priv->context != NULL)) { @@ -323,16 +329,21 @@ /* Update desktop id */ xfce_menu_item_set_desktop_id (item, desktop_id); -#if 1 /* ITEM CACHE DEACTIVATED FOR NOW */ +#if 0 /* ITEM CACHE DEACTIVATED FOR NOW */ /* Store updated item in cache */ xfce_menu_item_cache_store_item (cache, filename, item); +#endif /* The file has been loaded, add the item to the hash table */ g_hash_table_replace (cache->priv->items, g_strdup (filename), item); -#endif /* Grab a reference on it but don't increase the allocation counter */ -#if 1 + /* We do _not_ want to increase the reference count here, since the + * menu item was just created, and already comes with a reference + * count of 1. Whenever it will be stored again (i.e. in the pool), + * then its reference count will be increased again at the time + * of that event. */ +#if 0 g_object_ref (G_OBJECT (item)); #endif } @@ -363,7 +374,7 @@ -#if 1 /* ITEM CACHE DEACTIVATED FOR NOW */ +#if 0 /* ITEM CACHE DEACTIVATED FOR NOW */ static XfceMenuItem* xfce_menu_item_cache_fetch_item (XfceMenuItemCache *cache, const gchar *filename) Index: libxfce4menu/xfce-menu.c =================================================================== --- libxfce4menu/xfce-menu.c (revision 29518) +++ libxfce4menu/xfce-menu.c (working copy) @@ -509,7 +509,7 @@ * Whether this menu should be ignored. **/ g_object_class_install_property (gobject_class, - PROP_ONLY_UNALLOCATED, + PROP_DELETED, g_param_spec_boolean ("deleted", "Deleted", "Whether this menu should be ignored",