aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shakaryan <omp@gentoo.org>2008-09-22 05:59:56 +0200
committerMax Kellermann <max@duempel.org>2008-09-22 08:05:45 +0200
commit4f7c3f48d7dd37fa870a1a40f391520a2ad66c6a (patch)
tree6695106bfc0552d1e3483ed7cb19a1037e6db91a
parent063648606de65ce668c3357ec7b08792ae055219 (diff)
downloadmpd-4f7c3f48d7dd37fa870a1a40f391520a2ad66c6a.tar.gz
mpd-4f7c3f48d7dd37fa870a1a40f391520a2ad66c6a.tar.xz
mpd-4f7c3f48d7dd37fa870a1a40f391520a2ad66c6a.zip
added option "welcome-screen-list"
"welcome-screen-list" shows the screen list in the top row shortly after startup, and is enabled by default.
-rw-r--r--src/conf.c5
-rw-r--r--src/options.c1
-rw-r--r--src/options.h1
-rw-r--r--src/screen.c3
4 files changed, 9 insertions, 1 deletions
diff --git a/src/conf.c b/src/conf.c
index ac48e9cdb..c02df52cf 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -71,6 +71,7 @@
#define CONF_SCROLL "scroll"
#define CONF_SCROLL_SEP "scroll-sep"
#define CONF_VISIBLE_BITRATE "visible-bitrate"
+#define CONF_WELCOME_SCREEN_LIST "welcome-screen-list"
typedef enum {
KEY_PARSER_UNKNOWN,
@@ -463,6 +464,10 @@ read_rc_file(char *filename, options_t *options)
{
options->wide_cursor = str2bool(value);
}
+ /* welcome screen list */
+ else if (!strcasecmp(CONF_WELCOME_SCREEN_LIST, name)) {
+ options->welcome_screen_list = str2bool(value);
+ }
/* visible bitrate */
else if (!strcasecmp(CONF_VISIBLE_BITRATE, name)) {
options->visible_bitrate = str2bool(value);
diff --git a/src/options.c b/src/options.c
index 34772460f..1ac319531 100644
--- a/src/options.c
+++ b/src/options.c
@@ -341,6 +341,7 @@ options_init( void )
options.reconnect = TRUE;
options.find_wrap = TRUE;
options.wide_cursor = TRUE;
+ options.welcome_screen_list = TRUE;
options.audible_bell = TRUE;
options.crossfade_time = DEFAULT_CROSSFADE_TIME;
options.seek_time = 1;
diff --git a/src/options.h b/src/options.h
index 58eaff130..f29014cbd 100644
--- a/src/options.h
+++ b/src/options.h
@@ -38,6 +38,7 @@ typedef struct {
gboolean enable_mouse;
gboolean scroll;
gboolean visible_bitrate;
+ gboolean welcome_screen_list;
} options_t;
#ifndef NO_GLOBAL_OPTIONS
diff --git a/src/screen.c b/src/screen.c
index c526e66cc..2999b598e 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -724,7 +724,8 @@ screen_update(mpdclient_t *c)
}
/* update title/header window */
- if (welcome && screen.last_cmd==CMD_NONE &&
+ if (welcome && options.welcome_screen_list &&
+ screen.last_cmd==CMD_NONE &&
time(NULL)-screen.start_timestamp <= SCREEN_WELCOME_TIME)
paint_top_window("", c, 0);
else if (mode_fn->get_title != NULL) {