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

DRUN: Make name key required even when hidden. (#453)

This commit is contained in:
Dave Davenport 2016-08-31 09:39:00 +02:00
parent 21b35b3e3e
commit 56cc94195c

View file

@ -264,6 +264,14 @@ static void read_desktop_file ( DRunModePrivateData *pd, const char *root, const
return;
}
g_free ( key );
// Name key is required.
if ( !g_key_file_has_key ( kf, "Desktop Entry", "Name", NULL ) ) {
g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Invalid DesktopFile: '%s', no 'Name' key present.\n", path );
g_key_file_free ( kf );
return;
}
// Skip hidden entries.
if ( g_key_file_get_boolean ( kf, "Desktop Entry", "Hidden", NULL ) ) {
g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Adding desktop file: %s to disabled list because: Hdden", path );
@ -284,12 +292,6 @@ static void read_desktop_file ( DRunModePrivateData *pd, const char *root, const
pd->disabled_entries_length++;
return;
}
// Name key is required.
if ( !g_key_file_has_key ( kf, "Desktop Entry", "Name", NULL ) ) {
g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Invalid DesktopFile: '%s', no 'Name' key present.\n", path );
g_key_file_free ( kf );
return;
}
// We need Exec, don't support DBusActivatable
if ( !g_key_file_has_key ( kf, "Desktop Entry", "Exec", NULL ) ) {
g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Unsupported DesktopFile: '%s', no 'Exec' key present.\n", path );