From 1e608044af85e7b97a85e82154c78a0a490306c2 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 10 Oct 2009 09:35:37 +0400 Subject: [PATCH] Ticket #1700: fixed skin color parser. Strip leading and trailing spaces in color names read from skin ini file. Signed-off-by: Andrew Borodin Signed-off-by: Slava Zanko --- src/skin/colors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/skin/colors.c b/src/skin/colors.c index 638fb1f94..2ba54d933 100644 --- a/src/skin/colors.c +++ b/src/skin/colors.c @@ -153,13 +153,13 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const } break; 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_"); mc_skin_color->bgcolor = (tmp != NULL) ? g_strdup (tmp->bgcolor) : NULL; break; case 2: - mc_skin_color->fgcolor = (values[0]) ? g_strdup (values[0]) : NULL; - mc_skin_color->bgcolor = (values[1]) ? g_strdup (values[1]) : NULL; + mc_skin_color->fgcolor = (values[0]) ? g_strstrip (g_strdup (values[0])) : NULL; + mc_skin_color->bgcolor = (values[1]) ? g_strstrip (g_strdup (values[1])) : NULL; break; } g_strfreev (values);