aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-05-03 11:44:22 +0000
committerKalle Wallin <kaw@linux.se>2004-05-03 11:44:22 +0000
commitb4983deb8e8efac613d4d1ec4c73235b35b5139b (patch)
tree4be814b4f081188d09fbb59d3f5486f18e47cc78 /conf.c
parent0239f0db2a0ec84a86e2aadbcd581caa6191e4e8 (diff)
downloadmpd-b4983deb8e8efac613d4d1ec4c73235b35b5139b.tar.gz
mpd-b4983deb8e8efac613d4d1ec4c73235b35b5139b.tar.xz
mpd-b4983deb8e8efac613d4d1ec4c73235b35b5139b.zip
The background color can now be assigned to 'none' (use the current color).
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@898 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index 0c0448ed4..1205af5ec 100644
--- a/conf.c
+++ b/conf.c
@@ -97,8 +97,10 @@ str2color(char *str)
return COLOR_CYAN;
else if( !strcasecmp(str,"white") )
return COLOR_WHITE;
+ else if( !strcasecmp(str,"default") || !strcasecmp(str,"none") )
+ return -1;
fprintf(stderr,"Warning: unknown color %s\n", str);
- return -1;
+ return -2;
}
static int
@@ -330,7 +332,7 @@ read_rc_file(char *filename, options_t *options)
/* background color */
else if( !strcasecmp(CONF_COLOR_BACKGROUND, name) )
{
- if( (color=str2color(value)) >= 0 )
+ if( (color=str2color(value)) >= -1 )
options->bg_color = color;
}
/* color - top (title) window */