mirror of https://github.com/davatorium/rofi.git
DRUN: Make name key required even when hidden. (#453)
This commit is contained in:
parent
21b35b3e3e
commit
56cc94195c
|
@ -264,6 +264,14 @@ static void read_desktop_file ( DRunModePrivateData *pd, const char *root, const
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
g_free ( key );
|
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.
|
// Skip hidden entries.
|
||||||
if ( g_key_file_get_boolean ( kf, "Desktop Entry", "Hidden", NULL ) ) {
|
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 );
|
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++;
|
pd->disabled_entries_length++;
|
||||||
return;
|
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
|
// We need Exec, don't support DBusActivatable
|
||||||
if ( !g_key_file_has_key ( kf, "Desktop Entry", "Exec", NULL ) ) {
|
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 );
|
g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Unsupported DesktopFile: '%s', no 'Exec' key present.\n", path );
|
||||||
|
|
Loading…
Reference in New Issue