From: Max Kellermann Date: Mon, 20 Mar 2017 15:47:59 +0000 (+0100) Subject: status_bar: remove the status bar clock (option "display-time") X-Git-Tag: v0.27~43 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3af5c3a185fc23b8fb9d528a9c0a14f70093ac70;p=ncmpc.git status_bar: remove the status bar clock (option "display-time") This is a pretty useless feature which is only available when not playing something - a state in which ncmpc isn't useful either. What the clock does is require a timer which wakes up ncmpc every second, when it should better be completely idle (and swapped out). --- diff --git a/NEWS b/NEWS index 5aad8b5..2e36c8a 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ncmpc 0.27 - not yet released +* remove the status bar clock (option "display-time") ncmpc 0.26 - (2017-03-20) * require libmpdclient 2.9 diff --git a/doc/config.sample b/doc/config.sample index 1b40092..499754e 100644 --- a/doc/config.sample +++ b/doc/config.sample @@ -88,9 +88,6 @@ ## The time, in seconds, for which status messages will be displayed. #status-message-time = 3 -## Display the time in the status bar when idle. -#display-time = yes - ## Sets whether to display remaining or elapsed time in ## the status window. Default is elapsed. #timedisplay-type = elapsed diff --git a/src/conf.c b/src/conf.c index 652628c..814a13b 100644 --- a/src/conf.c +++ b/src/conf.c @@ -501,11 +501,8 @@ parse_line(char *line) g_free(options.scroll_sep); options.scroll_sep = get_format(value); } else if (!strcasecmp(CONF_DISPLAY_TIME, name)) -#ifdef NCMPC_MINI + /* obsolete, ignore */ {} -#else - options.display_time = str2bool(value); -#endif else if (!strcasecmp(CONF_JUMP_PREFIX_ONLY, name)) #ifdef NCMPC_MINI {} diff --git a/src/main.c b/src/main.c index 8bfa03a..0729610 100644 --- a/src/main.c +++ b/src/main.c @@ -114,11 +114,7 @@ disable_update_timer(void) static bool should_enable_update_timer(void) { - return mpd->playing -#ifndef NCMPC_MINI - || options.display_time -#endif - ; + return mpd->playing; } static void diff --git a/src/options.h b/src/options.h index aa31a9f..de7c24c 100644 --- a/src/options.h +++ b/src/options.h @@ -81,7 +81,6 @@ typedef struct { bool scroll; bool visible_bitrate; bool welcome_screen_list; - bool display_time; bool jump_prefix_only; bool second_column; #endif diff --git a/src/status_bar.c b/src/status_bar.c index ef25707..74f91de 100644 --- a/src/status_bar.c +++ b/src/status_bar.c @@ -178,15 +178,7 @@ status_bar_paint(struct status_bar *p, const struct mpd_status *status, #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 */