Code

Fixed colours for status-flags (previously documented but not a feature)
authorJames McGlashan (DarkFox) <mpd@darkfox.id.au>
Wed, 8 Jan 2014 00:36:00 +0000 (11:36 +1100)
committerJames McGlashan (DarkFox) <mpd@darkfox.id.au>
Wed, 8 Jan 2014 00:36:00 +0000 (11:36 +1100)
NEWS
src/colors.c
src/colors.h
src/title_bar.c

diff --git a/NEWS b/NEWS
index 9b45ad128e74dbc91f98c7c224ba2159fa2ce79f..a9b594449689ade614296504c43ff760482f6c0b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ ncmpc 0.22 - not yet released
 * rename "playlist" to "queue"
 * remove useless "Connected to ..." message
 * require libmpdclient 2.3, MPD 0.16
+* patched color line-flags
 
 
 ncmpc 0.21 - (2013-04-11)
index 449d372777686d5ee38acb34634ad99de77b4340..0e78cadc83f37fc25eadc734d91dcfc882cf0492 100644 (file)
@@ -53,6 +53,7 @@ static color_entry_t colors[COLOR_END] = {
        [COLOR_TITLE_BOLD]   = {"title-bold",        COLOR_YELLOW | A_BOLD, A_BOLD  },
        [COLOR_LINE]         = {"line",              COLOR_WHITE,           A_NORMAL},
        [COLOR_LINE_BOLD]    = {"line-bold",         COLOR_WHITE  | A_BOLD, A_BOLD  },
+       [COLOR_LINE_FLAGS]   = {"line-flags",        COLOR_YELLOW,          A_NORMAL},
        [COLOR_LIST]         = {"list",              COLOR_GREEN,           A_NORMAL},
        [COLOR_LIST_BOLD]    = {"list-bold",         COLOR_GREEN  | A_BOLD, A_BOLD  },
        [COLOR_PROGRESSBAR]  = {"progressbar",       COLOR_WHITE,           A_NORMAL},
index 4d8e876d1d24f04e8ec2b93e715c13742dd1e145..f7e256cbad30e3d422e4b7ca8b6cd0edad13537b 100644 (file)
@@ -29,6 +29,7 @@ enum color {
        COLOR_TITLE_BOLD,
        COLOR_LINE,
        COLOR_LINE_BOLD,
+       COLOR_LINE_FLAGS,
        COLOR_LIST,
        COLOR_LIST_BOLD,
        COLOR_PROGRESSBAR,
index e8b913804a984a9761fe0ce9f97087df79ff6030..1a19e022a571808d00b78136d6d1714e4aa8e009 100644 (file)
@@ -125,7 +125,7 @@ title_bar_paint(const struct title_bar *p, const char *title,
        if (flags[0]) {
                wmove(w, 1, p->window.cols - strlen(flags) - 3);
                waddch(w, '[');
-               colors_use(w, COLOR_LINE_BOLD);
+               colors_use(w, COLOR_LINE_FLAGS);
                waddstr(w, flags);
                colors_use(w, COLOR_LINE);
                waddch(w, ']');