1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

[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

View file

@ -154,6 +154,13 @@ static void get_apps_dir ( DRunModePrivateData *pd, const char *bp )
continue; 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 ) ) { if ( g_key_file_has_key ( kf, "Desktop Entry", "Exec", NULL ) ) {
size_t nl = ( ( pd->cmd_list_length ) + 2 ); size_t nl = ( ( pd->cmd_list_length ) + 2 );
pd->entry_list = g_realloc ( pd->entry_list, nl * sizeof ( *( pd->entry_list ) ) ); pd->entry_list = g_realloc ( pd->entry_list, nl * sizeof ( *( pd->entry_list ) ) );