aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-04-05 08:56:50 +0000
committerKalle Wallin <kaw@linux.se>2004-04-05 08:56:50 +0000
commitcc10008d7908ddfe9379c94ae0930b182f078046 (patch)
tree6f6e3bc4c41802b3c313c7658c07d523b19572c9 /conf.c
parentabf8689484dfd459dbac86fc5a623c854ab2a377 (diff)
downloadmpd-cc10008d7908ddfe9379c94ae0930b182f078046.tar.gz
mpd-cc10008d7908ddfe9379c94ae0930b182f078046.tar.xz
mpd-cc10008d7908ddfe9379c94ae0930b182f078046.zip
Added support for (auto) center/focus playlists.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@604 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/conf.c b/conf.c
index 5969c85ba..6def7b638 100644
--- a/conf.c
+++ b/conf.c
@@ -28,6 +28,9 @@
/* configuration field names */
#define CONF_ENABLE_COLORS "enable_colors"
+#define CONF_AUTO_CENTER "auto_center"
+
+/* configuration field names - colors */
#define CONF_COLOR_BACKGROUND "background_color"
#define CONF_COLOR_TITLE "title_color"
#define CONF_COLOR_LINE "line_color"
@@ -65,24 +68,6 @@ str2color(char *str)
return COLOR_CYAN;
else if( !strcasecmp(str,"white") )
return COLOR_WHITE;
-#if 0
- else if( !strcasecmp(str,"grey") )
- return COLOR_BLACK | A_BOLD;
- else if( !strcasecmp(str,"brightred") )
- return COLOR_RED | A_BOLD;
- else if( !strcasecmp(str,"brightgreen") )
- return COLOR_GREEN | A_BOLD;
- else if( !strcasecmp(str,"brightyellow") )
- return COLOR_YELLOW | A_BOLD;
- else if( !strcasecmp(str,"brightblue") )
- return COLOR_BLUE | A_BOLD;
- else if( !strcasecmp(str,"brightmagenta") )
- return COLOR_MAGENTA | A_BOLD;
- else if( !strcasecmp(str,"brightcyan") )
- return COLOR_CYAN | A_BOLD;
- else if( !strcasecmp(str,"brightwhite") )
- return COLOR_WHITE | A_BOLD;
-#endif
fprintf(stderr,"Warning: unknown color %s\n", str);
return -1;
}
@@ -181,6 +166,12 @@ read_rc_file(char *filename, options_t *options)
options->enable_colors = str2bool(value);
match_found = 1;
}
+ /* auto center */
+ else if( !strcasecmp(CONF_AUTO_CENTER, name) )
+ {
+ options->auto_center = str2bool(value);
+ match_found = 1;
+ }
/* background color */
else if( !strcasecmp(CONF_COLOR_BACKGROUND, name) )
{