Only list applications that can be ran
This commit is contained in:
parent
8b2f86384a
commit
f8c36879dd
|
@ -244,15 +244,17 @@ static void _applications_on_refresh_loop_path(DesktopHandler * handler,
|
||||||
fprintf(stderr, "DEBUG: %s() name=\"%s\" path=\"%s\"\n",
|
fprintf(stderr, "DEBUG: %s() name=\"%s\" path=\"%s\"\n",
|
||||||
__func__, name, path);
|
__func__, name, path);
|
||||||
#endif
|
#endif
|
||||||
if((mime = mimehandler_new_load(name)) == NULL
|
if((mime = mimehandler_new_load(name)) == NULL)
|
||||||
|| mimehandler_can_display(mime) == 0)
|
|
||||||
{
|
{
|
||||||
if(mime != NULL)
|
|
||||||
mimehandler_delete(mime);
|
|
||||||
else
|
|
||||||
desktop_serror(NULL, NULL, 1);
|
desktop_serror(NULL, NULL, 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(mimehandler_can_display(mime) == 0
|
||||||
|
|| mimehandler_can_execute(handler) == 0)
|
||||||
|
{
|
||||||
|
mimehandler_delete(mime);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
handler->u.applications.apps = g_slist_insert_sorted(
|
handler->u.applications.apps = g_slist_insert_sorted(
|
||||||
handler->u.applications.apps, mime,
|
handler->u.applications.apps, mime,
|
||||||
_applications_apps_compare);
|
_applications_apps_compare);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user