diff --git a/src/status_bar.c b/src/status_bar.c
index b1b301fd3df15524cbe4c4a60f29c9affe09e8bc..74f91de3a67a75baa121960e8f928484c9934714 100644 (file)
--- a/src/status_bar.c
+++ b/src/status_bar.c
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2010 The Music Player Daemon Project
+ * (c) 2004-2017 The Music Player Daemon Project
* Project homepage: http://musicpd.org
*
* This program is free software; you can redistribute it and/or modify
const struct mpd_song *song)
{
WINDOW *w = p->window.w;
- enum mpd_state state;
- const char *str = NULL;
- int x = 0;
char buffer[p->window.cols * 4 + 1];
#ifndef NCMPC_MINI
wclrtoeol(w);
colors_use(w, COLOR_STATUS_BOLD);
- state = status == NULL ? MPD_STATE_UNKNOWN
+ enum mpd_state state = status == NULL ? MPD_STATE_UNKNOWN
: mpd_status_get_state(status);
+ const char *str = NULL;
switch (state) {
case MPD_STATE_PLAY:
str = _("Playing:");
break;
}
+ int x = 0;
if (str) {
waddstr(w, str);
x += utf8_width(str) + 1;
#endif
}
} else {
-#ifndef NCMPC_MINI
- if (options.display_time) {
- time_t timep;
-
- time(&timep);
- strftime(buffer, sizeof(buffer), "%X ",localtime(&timep));
- } else
-#endif
- buffer[0] = 0;
+ buffer[0] = 0;
}
/* display song */