mirror of
https://github.com/lbonn/rofi
synced 2024-11-27 06:10:30 +00:00
Small re-indent
This commit is contained in:
parent
01e32c9c61
commit
3f577f917a
1 changed files with 16 additions and 22 deletions
|
@ -277,29 +277,23 @@ static void read_desktop_file ( DRunModePrivateData *pd, const char *root, const
|
||||||
g_key_file_free ( kf );
|
g_key_file_free ( kf );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
{
|
size_t nl = ( ( pd->cmd_list_length ) + 1 );
|
||||||
size_t nl = ( ( pd->cmd_list_length ) + 1 );
|
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 ) ) );
|
pd->entry_list[pd->cmd_list_length].root = g_strdup ( root );
|
||||||
pd->entry_list[pd->cmd_list_length].root = g_strdup ( root );
|
pd->entry_list[pd->cmd_list_length].path = g_strdup ( path );
|
||||||
pd->entry_list[pd->cmd_list_length].path = g_strdup ( path );
|
gchar *n = g_key_file_get_locale_string ( kf, "Desktop Entry", "Name", NULL, NULL );
|
||||||
pd->entry_list[pd->cmd_list_length].terminal = FALSE;
|
pd->entry_list[pd->cmd_list_length].name = n;
|
||||||
gchar *n = g_key_file_get_locale_string ( kf, "Desktop Entry", "Name", NULL, NULL );
|
gchar *gn = g_key_file_get_locale_string ( kf, "Desktop Entry", "GenericName", NULL, NULL );
|
||||||
pd->entry_list[pd->cmd_list_length].name = n;
|
pd->entry_list[pd->cmd_list_length].generic_name = gn;
|
||||||
gchar *gn = g_key_file_get_locale_string ( kf, "Desktop Entry", "GenericName", NULL, NULL );
|
pd->entry_list[pd->cmd_list_length].exec = g_key_file_get_string ( kf, "Desktop Entry", "Exec", NULL );
|
||||||
pd->entry_list[pd->cmd_list_length].generic_name = gn;
|
// Returns false if not found, if key not found, we don't want run in terminal.
|
||||||
pd->entry_list[pd->cmd_list_length].exec = g_key_file_get_string ( kf, "Desktop Entry", "Exec", NULL );
|
pd->entry_list[pd->cmd_list_length].terminal = g_key_file_get_boolean ( kf, "Desktop Entry", "Terminal", NULL );
|
||||||
if ( g_key_file_has_key ( kf, "Desktop Entry", "Terminal", NULL ) ) {
|
|
||||||
pd->entry_list[pd->cmd_list_length].terminal = g_key_file_get_boolean ( kf, "Desktop Entry", "Terminal", NULL );
|
|
||||||
}
|
|
||||||
|
|
||||||
pd->entry_list[pd->cmd_list_length].exec_path = NULL;
|
// Returns NULL if not found.
|
||||||
if ( g_key_file_has_key ( kf, "Desktop Entry", "Path", NULL ) ) {
|
pd->entry_list[pd->cmd_list_length].exec_path = g_key_file_get_string ( kf, "Desktop Entry", "Path", NULL );
|
||||||
pd->entry_list[pd->cmd_list_length].exec_path = g_key_file_get_string ( kf, "Desktop Entry", "Path", NULL );
|
// We don't want to parse items with this id anymore.
|
||||||
}
|
g_hash_table_add ( pd->disabled_entries, g_strdup ( id ) );
|
||||||
// We don't want to parse items with this id anymore.
|
( pd->cmd_list_length )++;
|
||||||
g_hash_table_add ( pd->disabled_entries, g_strdup ( id ) );
|
|
||||||
( pd->cmd_list_length )++;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_key_file_free ( kf );
|
g_key_file_free ( kf );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue