[Xfce4-commits] <xfce4-appfinder:master> Properly handle item visibility.
Nick Schermer
noreply at xfce.org
Sat Jul 9 16:18:15 CEST 2011
Updating branch refs/heads/master
to db76704f8547f1ec6efafa591341e35049faa131 (commit)
from 3d9d106241fe5b73c6259b266a19919927bfa921 (commit)
commit db76704f8547f1ec6efafa591341e35049faa131
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