diff options
author | Kalle Wallin <kaw@linux.se> | 2004-06-06 21:03:03 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-06-06 21:03:03 +0000 |
commit | 77c69999a63e6b999814cb39c35bb4d30646c145 (patch) | |
tree | d939ef3500210ed88e81e0a68104703e2dc049ef /src/screen.c | |
parent | c16d1982e4d05edc07c60ed5935dbd7456a5f1c3 (diff) | |
download | mpd-77c69999a63e6b999814cb39c35bb4d30646c145.tar.gz mpd-77c69999a63e6b999814cb39c35bb4d30646c145.tar.xz mpd-77c69999a63e6b999814cb39c35bb4d30646c145.zip |
Added an optional clock screen :)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1360 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/screen.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c index 7522ad227..d77faf269 100644 --- a/src/screen.c +++ b/src/screen.c @@ -53,6 +53,10 @@ #ifdef ENABLE_KEYDEF_SCREEN extern screen_functions_t *get_screen_keydef(void); #endif +#ifdef ENABLE_CLOCK_SCREEN +extern screen_functions_t *get_screen_clock(void); +#endif + static screen_t *screen = NULL; static screen_functions_t *mode_fn = NULL; @@ -84,6 +88,12 @@ switch_screen_mode(screen_mode_t new_mode, mpd_client_t *c) mode_fn = get_screen_keydef(); break; #endif +#ifdef ENABLE_CLOCK_SCREEN + case SCREEN_CLOCK_WINDOW: + mode_fn = get_screen_clock(); + break; +#endif + default: break; } @@ -578,6 +588,10 @@ screen_init(void) screen->screen_list = g_list_append(screen->screen_list, (gpointer) get_screen_keydef()); #endif +#ifdef ENABLE_CLOCK_SCREEN + screen->screen_list = g_list_append(screen->screen_list, + (gpointer) get_screen_clock()); +#endif list = screen->screen_list; while( list ) @@ -596,6 +610,7 @@ screen_init(void) /* initialize wreadln */ wrln_resize_callback = screen_resize; + wrln_max_history_length = 16; return 0; } @@ -886,12 +901,16 @@ screen_cmd(mpd_client_t *c, command_t cmd) switch_screen_mode(SCREEN_KEYDEF_WINDOW, c); break; #endif +#ifdef ENABLE_CLOCK_SCREEN + case CMD_SCREEN_CLOCK: + switch_screen_mode(SCREEN_CLOCK_WINDOW, c); + break; +#endif case CMD_QUIT: exit(EXIT_SUCCESS); default: break; } - } |