[Xfce4-commits] <xfce4-appfinder:nick/xfrun4-merge> Properly handle item visibility.
Nick Schermer
noreply at xfce.org
Sun Jun 26 11:42:01 CEST 2011
Updating branch refs/heads/nick/xfrun4-merge
to 8b42d07287a47b32b538e745cdf95adcd26d5f91 (commit)
from 03ac98e27f0aeb88dad30a73eb3312a0058adb7b (commit)
commit 8b42d07287a47b32b538e745cdf95adcd26d5f91
Author: Nick Schermer <nick at xfce.org>
Date: Sun Jun 26 11:39:45 2011 +0200
Properly handle item visibility.
src/appfinder-model.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/appfinder-model.c b/src/appfinder-model.c
index f2232a1..9ee3665 100644
--- a/src/appfinder-model.c
+++ b/src/appfinder-model.c
@@ -731,6 +731,9 @@ xfce_appfinder_model_item_changed (GarconMenuItem *menu_item,
if (G_LIKELY (item->command != NULL))
g_hash_table_insert (model->items_hash, item->command, item);
+ g_signal_connect (G_OBJECT (menu_item), "changed",
+ G_CALLBACK (xfce_appfinder_model_item_changed), model);
+
g_object_unref (G_OBJECT (menu_item));
path = gtk_tree_path_new_from_indices (idx, -1);
@@ -892,9 +895,6 @@ xfce_appfinder_model_collect_items (GarconMenu *menu,
{
if (GARCON_IS_MENU_ITEM (li->data))
{
- if (!garcon_menu_element_get_visible (li->data))
- continue;
-
desktop_id = garcon_menu_item_get_desktop_id (li->data);
item = g_hash_table_lookup (desktop_ids, desktop_id);
if (G_LIKELY (item == NULL))
@@ -1208,6 +1208,9 @@ xfce_appfinder_model_get_visible (XfceAppfinderModel *model,
{
g_return_val_if_fail (GARCON_IS_MENU_ITEM (item->item), FALSE);
+ if (!garcon_menu_element_get_visible (GARCON_MENU_ELEMENT (item->item)))
+ return FALSE;
+
if (category != NULL
&& !xfce_appfinder_model_ptr_array_find (item->categories, category))
return FALSE;
More information about the Xfce4-commits
mailing list