diff options
author | Andreas Obergrusberger <tradiaz@yahoo.de> | 2006-08-06 09:15:42 +0000 |
---|---|---|
committer | Andreas Obergrusberger <tradiaz@yahoo.de> | 2006-08-06 09:15:42 +0000 |
commit | db9a25c6ce2c475cb8b1e1e4d210e0c5793e0047 (patch) | |
tree | ae7754b9d39bb5e665eedb93cfa0af7f884109fc /src | |
parent | dc65f5efcde822072b38909aa409d92ef17c291b (diff) | |
download | mpd-db9a25c6ce2c475cb8b1e1e4d210e0c5793e0047.tar.gz mpd-db9a25c6ce2c475cb8b1e1e4d210e0c5793e0047.tar.xz mpd-db9a25c6ce2c475cb8b1e1e4d210e0c5793e0047.zip |
fix bug in lyrics screen
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4572 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/screen_lyrics.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index c068a43ed..598fb0d21 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -310,9 +310,12 @@ gpointer get_lyr(void *c) strfsong(artist, MAX_SONGNAME_LENGTH, "%artist%", cur); strfsong(title, MAX_SONGNAME_LENGTH, "%title%", cur); + //write header.. formed_text_init(&lyr_text); add_text_line(&lyr_text, artist, 0); add_text_line(&lyr_text, title, 0); + add_text_line(&lyr_text, "", 0); + add_text_line(&lyr_text, "", 0); //if(get_lyr_hd(artist, title) == 0) return &lyr_text; @@ -370,20 +373,20 @@ list_callback(int index, int *highlight, void *data) int linelen; //i think i'ts fine to write it into the 1st line... - if((index == lyr_text.lines->len && lyr_text.lines->len != 2)|| + if((index == lyr_text.lines->len && lyr_text.lines->len != 3)|| ((lyr_text.lines->len == 0 - ||lyr_text.lines->len == 2) && index == 0)) + ||lyr_text.lines->len == 4) && index == 0)) { *highlight=3; return CREDITS; } - if(index < 2 && lyr_text.lines->len > 2) *highlight=3; - else if(index >= lyr_text.lines->len || index == 2) + if(index < 2 && lyr_text.lines->len > 4) *highlight=3; + else if(index >= lyr_text.lines->len) { return ""; } - if(index >1) index--; + //if(index >1) index--; get_text_line(&lyr_text, index, buf, 512); return buf; } @@ -417,7 +420,7 @@ lyrics_exit(void) static char * lyrics_title(char *str, size_t size) { - if(lyr_text.lines->len == 2){ + if(lyr_text.lines->len == 4){ if(lock == 1 && !(result & 2)) return _("Lyrics [No connection]"); if(lock == 1 && !(result & 4)) return _("Lyrics [Not found]"); if(lock == 2) return _("Lyrics [retrieving]"); |