aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorAndreas Obergrusberger <tradiaz@yahoo.de>2006-08-04 08:48:26 +0000
committerAndreas Obergrusberger <tradiaz@yahoo.de>2006-08-04 08:48:26 +0000
commite2a6f80bc6c71cfe6a68f419b2561d6d32252a88 (patch)
treeefbfdabfda29a9f097e7324d44689129d60b7b89 /src/screen.c
parent22f156f5f87705a9b8cda9958179939d8b3fbdc9 (diff)
downloadmpd-e2a6f80bc6c71cfe6a68f419b2561d6d32252a88.tar.gz
mpd-e2a6f80bc6c71cfe6a68f419b2561d6d32252a88.tar.xz
mpd-e2a6f80bc6c71cfe6a68f419b2561d6d32252a88.zip
the updated sources
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4543 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/screen.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/screen.c b/src/screen.c
index 73092073e..d30573917 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -40,7 +40,6 @@
#include "screen.h"
#include "screen_utils.h"
-#define MAX_SONGNAME_LENGTH 512
#define SCREEN_PLAYLIST_ID 0
#define SCREEN_BROWSE_ID 1
@@ -49,6 +48,7 @@
#define SCREEN_KEYDEF_ID 101
#define SCREEN_CLOCK_ID 102
#define SCREEN_SEARCH_ID 103
+#define SCREEN_LYRICS_ID 104
@@ -60,6 +60,7 @@ extern screen_functions_t *get_screen_search(void);
extern screen_functions_t *get_screen_artist(void);
extern screen_functions_t *get_screen_keydef(void);
extern screen_functions_t *get_screen_clock(void);
+extern screen_functions_t *get_screen_lyrics(void);
typedef screen_functions_t * (*screen_get_mode_functions_fn_t) (void);
@@ -87,6 +88,9 @@ static screen_mode_info_t screens[] = {
#ifdef ENABLE_CLOCK_SCREEN
{ SCREEN_CLOCK_ID, "clock", get_screen_clock },
#endif
+ #ifdef ENABLE_LYRICS_SCREEN
+ { SCREEN_LYRICS_ID, "lyrics", get_screen_lyrics },
+#endif
{ G_MAXINT, NULL, NULL }
};
@@ -124,6 +128,10 @@ lookup_mode(gint id)
return -1;
}
+gint get_cur_mode_id()
+{
+ return screens[screen->mode].id;
+}
static void
switch_screen_mode(gint id, mpdclient_t *c)
{
@@ -234,6 +242,12 @@ paint_top_window(char *header, mpdclient_t *c, int clear)
colors_use(w, COLOR_TITLE);
waddstr(w, _(":Search "));
#endif
+#ifdef ENABLE_LYRICS_SCREEN
+ colors_use(w, COLOR_TITLE_BOLD);
+ waddstr(w, get_key_names(CMD_SCREEN_LYRICS, FALSE));
+ colors_use(w, COLOR_TITLE);
+ waddstr(w, _(":Lyrics "));
+#endif
}
if( c->status->volume==MPD_STATUS_NO_VOLUME )
{
@@ -965,12 +979,12 @@ screen_cmd(mpdclient_t *c, command_t cmd)
case CMD_SCREEN_CLOCK:
switch_screen_mode(SCREEN_CLOCK_ID, c);
break;
+ case CMD_SCREEN_LYRICS:
+ switch_screen_mode(SCREEN_LYRICS_ID, c);
+ break;
case CMD_QUIT:
exit(EXIT_SUCCESS);
default:
break;
}
}
-
-
-