'everything' apps plugin: skip .desktops with same exec line

SVN revision: 47184
This commit is contained in:
Hannes Janetzek 2010-03-13 20:37:24 +00:00
parent c353c9224e
commit 2f45f4ce6e
1 changed files with 11 additions and 8 deletions

View File

@ -259,18 +259,21 @@ _item_add(Plugin *p, Efreet_Desktop *desktop, char *file, int match)
if (!exe) return NULL; if (!exe) return NULL;
if ((app = eina_hash_find(p->added, exe)) && if (app = eina_hash_find(p->added, exe))
(!desktop || (desktop == app->desktop)))
{ {
if (!eina_list_data_find_list(EVRY_PLUGIN(p)->items, app)) if (!desktop || (!app->desktop) ||
(desktop == app->desktop) ||
(!strcmp(desktop->exec, app->desktop->exec)))
{ {
EVRY_ITEM(app)->fuzzy_match = match; if (!eina_list_data_find_list(EVRY_PLUGIN(p)->items, app))
EVRY_ITEM(app)->plugin = EVRY_PLUGIN(p); {
EVRY_PLUGIN_ITEM_APPEND(p, app); EVRY_ITEM(app)->fuzzy_match = match;
EVRY_ITEM(app)->plugin = EVRY_PLUGIN(p);
EVRY_PLUGIN_ITEM_APPEND(p, app);
}
return app;
} }
return app;
} }
if (desktop && !already_refd) if (desktop && !already_refd)
efreet_desktop_ref(desktop); efreet_desktop_ref(desktop);