diff options
author | Kalle Wallin <kaw@linux.se> | 2006-03-28 08:40:56 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2006-03-28 08:40:56 +0000 |
commit | e36572093917e163e608195b559017e7bbe09347 (patch) | |
tree | 34df0adbe9c5ab68cf73d242101340b3c6ec23a2 /src/screen.c | |
parent | 1525d2bba9555fee56de49eac583c129363f5407 (diff) | |
download | mpd-e36572093917e163e608195b559017e7bbe09347.tar.gz mpd-e36572093917e163e608195b559017e7bbe09347.tar.xz mpd-e36572093917e163e608195b559017e7bbe09347.zip |
unicode fixes from Dmitry Baryshkov/René van Bevern
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3960 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/screen.c b/src/screen.c index 72bdaff36..0a3b2f721 100644 --- a/src/screen.c +++ b/src/screen.c @@ -187,9 +187,9 @@ paint_top_window(char *header, mpdclient_t *c, int clear) static int prev_header_len = -1; WINDOW *w = screen->top_window.w; - if(prev_header_len!=strlen(header)) + if(prev_header_len!=my_strlen(header)) { - prev_header_len = strlen(header); + prev_header_len = my_strlen(header); clear = 1; } @@ -244,7 +244,7 @@ paint_top_window(char *header, mpdclient_t *c, int clear) g_snprintf(buf, 32, _(" Volume %d%%"), c->status->volume); } colors_use(w, COLOR_TITLE); - mvwaddstr(w, 0, screen->top_window.cols-strlen(buf), buf); + mvwaddstr(w, 0, screen->top_window.cols-my_strlen(buf), buf); flags[0] = 0; if( c->status->repeat ) @@ -334,7 +334,7 @@ paint_status_window(mpdclient_t *c) if( str ) { waddstr(w, str); - x += strlen(str)+1; + x += my_strlen(str)+1; } /* create time string */ @@ -381,7 +381,7 @@ paint_status_window(mpdclient_t *c) if( (IS_PLAYING(status->state) || IS_PAUSED(status->state)) ) { char songname[MAX_SONGNAME_LENGTH]; - int width = COLS-x-strlen(screen->buf); + int width = COLS-x-my_strlen(screen->buf); if( song ) strfsong(songname, MAX_SONGNAME_LENGTH, STATUS_FORMAT, song); @@ -390,7 +390,7 @@ paint_status_window(mpdclient_t *c) colors_use(w, COLOR_STATUS); /* scroll if the song name is to long */ - if( strlen(songname) > width ) + if( my_strlen(songname) > width ) { static scroll_state_t st = { 0, 0 }; char *tmp = strscroll(songname, " *** ", width, &st); @@ -398,7 +398,8 @@ paint_status_window(mpdclient_t *c) g_strlcpy(songname, tmp, MAX_SONGNAME_LENGTH); g_free(tmp); } - mvwaddnstr(w, 0, x, songname, width); + //mvwaddnstr(w, 0, x, songname, width); + mvwaddnstr(w, 0, x, songname); } /* display time string */ |