Merge branch '1700_space_in_color_name'

* 1700_space_in_color_name:
  Ticket #1700: fixed skin color parser.
This commit is contained in:
Slava Zanko 2009-10-13 12:03:00 +03:00
commit c492abe28c

View File

@ -153,13 +153,13 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const
} }
break; break;
case 1: case 1:
mc_skin_color->fgcolor = (values[0]) ? g_strdup (values[0]) : NULL; mc_skin_color->fgcolor = (values[0]) ? g_strstrip (g_strdup (values[0])) : NULL;
tmp = mc_skin_color_get_with_defaults (group, "_default_"); tmp = mc_skin_color_get_with_defaults (group, "_default_");
mc_skin_color->bgcolor = (tmp != NULL) ? g_strdup (tmp->bgcolor) : NULL; mc_skin_color->bgcolor = (tmp != NULL) ? g_strdup (tmp->bgcolor) : NULL;
break; break;
case 2: case 2:
mc_skin_color->fgcolor = (values[0]) ? g_strdup (values[0]) : NULL; mc_skin_color->fgcolor = (values[0]) ? g_strstrip (g_strdup (values[0])) : NULL;
mc_skin_color->bgcolor = (values[1]) ? g_strdup (values[1]) : NULL; mc_skin_color->bgcolor = (values[1]) ? g_strstrip (g_strdup (values[1])) : NULL;
break; break;
} }
g_strfreev (values); g_strfreev (values);