Commit d06a1542 authored by Victor Ananjevsky's avatar Victor Ananjevsky

fix parsing desktop files for icons dialog

parent a1a25e72
...@@ -328,16 +328,19 @@ parse_desktop_file (gchar * filename) ...@@ -328,16 +328,19 @@ parse_desktop_file (gchar * filename)
if (type == TYPE_APP) if (type == TYPE_APP)
{ {
ent->command = g_key_file_get_string (kf, "Desktop Entry", "Exec", NULL); ent->command = g_key_file_get_string (kf, "Desktop Entry", "Exec", NULL);
/* remove possible arguments patterns */ if (ent->command)
for (i = strlen (ent->command); i > 0; i--)
{ {
if (ent->command[i] == '%') /* remove possible arguments patterns */
for (i = strlen (ent->command); i > 0; i--)
{ {
ent->command[i] = '\0'; if (ent->command[i] == '%')
break; {
ent->command[i] = '\0';
break;
}
} }
ent->in_term = g_key_file_get_boolean (kf, "Desktop Entry", "Terminal", NULL);
} }
ent->in_term = g_key_file_get_boolean (kf, "Desktop Entry", "Terminal", NULL);
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment