[DRun] Skip entries that have NoDisplay set.

Closes issue #283
This commit is contained in:
Dave Davenport 2015-11-23 09:47:29 +01:00
parent 611c2c4302
commit b974b10c96
1 changed files with 7 additions and 0 deletions

View File

@ -154,6 +154,13 @@ static void get_apps_dir ( DRunModePrivateData *pd, const char *bp )
continue;
}
}
// Skip entries that have NoDisplay set.
if ( g_key_file_has_key ( kf, "Desktop Entry", "NoDisplay", NULL ) ) {
if ( g_key_file_get_boolean ( kf, "Desktop Entry", "NoDisplay", NULL ) ) {
g_key_file_free ( kf );
continue;
}
}
if ( g_key_file_has_key ( kf, "Desktop Entry", "Exec", NULL ) ) {
size_t nl = ( ( pd->cmd_list_length ) + 2 );
pd->entry_list = g_realloc ( pd->entry_list, nl * sizeof ( *( pd->entry_list ) ) );