diff -r ac5fed257211 -r 78238d26911a roster-state-colors.diff --- a/roster-state-colors.diff Wed May 15 13:32:42 2013 +0300 +++ b/roster-state-colors.diff Wed Nov 12 23:04:36 2014 +0200 @@ -1,8 +1,8 @@ Change roster item colors on chatstate change -diff -r 7718e7f796d4 mcabber/contrib/themes/light.txt ---- a/mcabber/contrib/themes/light.txt Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/contrib/themes/light.txt Wed May 15 12:53:55 2013 +0300 +diff -r f17324b6c882 mcabber/contrib/themes/light.txt +--- a/mcabber/contrib/themes/light.txt Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/contrib/themes/light.txt Tue Nov 11 22:35:16 2014 +0200 @@ -14,7 +14,6 @@ set color_bgrostersel = green set color_rostersel = yellow @@ -11,9 +11,9 @@ set color_readmark = red # vim:set ft=conf: -diff -r 7718e7f796d4 mcabber/contrib/themes/light2.txt ---- a/mcabber/contrib/themes/light2.txt Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/contrib/themes/light2.txt Wed May 15 12:53:55 2013 +0300 +diff -r f17324b6c882 mcabber/contrib/themes/light2.txt +--- a/mcabber/contrib/themes/light2.txt Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/contrib/themes/light2.txt Tue Nov 11 22:35:16 2014 +0200 @@ -14,7 +14,6 @@ set color_bgrostersel = black set color_rostersel = brightgreen @@ -22,9 +22,9 @@ set color_readmark = red # vim:set ft=conf: -diff -r 7718e7f796d4 mcabber/contrib/themes/oliver.txt ---- a/mcabber/contrib/themes/oliver.txt Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/contrib/themes/oliver.txt Wed May 15 12:53:55 2013 +0300 +diff -r f17324b6c882 mcabber/contrib/themes/oliver.txt +--- a/mcabber/contrib/themes/oliver.txt Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/contrib/themes/oliver.txt Tue Nov 11 22:35:16 2014 +0200 @@ -14,7 +14,6 @@ set color_bgrostersel = yellow set color_rostersel = blue @@ -33,9 +33,9 @@ set color_readmark = red # vim:set ft=conf: -diff -r 7718e7f796d4 mcabber/doc/help/en/hlp_color.txt ---- a/mcabber/doc/help/en/hlp_color.txt Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/doc/help/en/hlp_color.txt Wed May 15 12:53:55 2013 +0300 +diff -r f17324b6c882 mcabber/doc/help/en/hlp_color.txt +--- a/mcabber/doc/help/en/hlp_color.txt Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/doc/help/en/hlp_color.txt Tue Nov 11 22:35:16 2014 +0200 @@ -11,6 +11,7 @@ Set a color rule (or overwrite, if it already exists). The status is string containing all statuses the roster item can have for the rule to match, or * if any status is OK. Wildcard is the file-matching wildcard that will be applied to JID. Color is the wanted color. If color is -, the rule is removed. @@ -44,9 +44,9 @@ /color mucnick nick (color|-) Marks the nick to be colored by given color. If a MUC has colored nicks, this one will be used. If color is -, the color is marked as chosen automatically, which means it will not be used in 'preset' coloring mode, but will stay the same in 'on' coloring mode. /color muc (jid|.|*) [on|preset|off|-] -diff -r 7718e7f796d4 mcabber/doc/help/uk/hlp_color.txt ---- a/mcabber/doc/help/uk/hlp_color.txt Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/doc/help/uk/hlp_color.txt Wed May 15 12:53:55 2013 +0300 +diff -r f17324b6c882 mcabber/doc/help/uk/hlp_color.txt +--- a/mcabber/doc/help/uk/hlp_color.txt Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/doc/help/uk/hlp_color.txt Tue Nov 11 22:35:16 2014 +0200 @@ -11,6 +11,7 @@ Додає нове чи змінює існуюче правило кольору. "Статус" складений з літер статусу, до яких докладається це правило (наприклад "n_d?"). Зірочка ("*") відповідає будь-якому статусу. "Маска" подібна до файлової маски й докладається до jid. Правило встановлює колір контактів, що йому відповідають. Щоб вилучити правило, вкажіть колір "-". @@ -55,10 +55,19 @@ /color muc (jid|.|*) [on|preset|off|-] Встановлює режим забарвлення прізвиськ у чаті. Якщо замість jid вказано * режим докладається до всіх чатів, для яких не визначено особистого правила (з вказанням jid). У режимі on забарвлюються усі прізвиська, у режимі preset - лише ті, для яких колір встановлено командою /color mucnick, а режим off вимикає забарвлення прізвиськ. Режим - прибирає з вказаних jid особисті режими забарвлення. Тоді до них докладається глобальний. Глобальний режим прибрати не можна. -diff -r 7718e7f796d4 mcabber/mcabber/screen.c ---- a/mcabber/mcabber/screen.c Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/mcabber/screen.c Wed May 15 12:53:55 2013 +0300 -@@ -440,7 +440,7 @@ +diff -r f17324b6c882 mcabber/mcabber/screen.c +--- a/mcabber/mcabber/screen.c Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/mcabber/screen.c Tue Nov 11 22:35:16 2014 +0200 +@@ -222,6 +222,8 @@ + + /* Functions */ + ++static unsigned int attention_sign(void); ++ + static int find_color(const char *name) + { + int result; +@@ -445,7 +447,7 @@ "roster", "rostersel", "rosterselmsg", @@ -67,7 +76,7 @@ "info", "msgin", "readmark", -@@ -513,10 +513,6 @@ +@@ -519,10 +521,6 @@ init_pair(i+1, ((color) ? find_color(color) : COLOR_RED), find_color(backselected)); break; @@ -78,40 +87,43 @@ case COLOR_INFO: init_pair(i+1, ((color) ? find_color(color) : COLOR_WHITE), find_color(background)); -@@ -815,6 +811,21 @@ - settings_set_guard("color_rosterselmsg", scr_color_guard); +@@ -826,6 +824,24 @@ settings_set_guard("color_rosternewmsg", scr_color_guard); + settings_set_guard("color_timestamp", scr_color_guard); + { // Add default rule only if user has not defined one already + GSList *rel; + gboolean found = FALSE; + for (rel = rostercolrules; rel; rel = rel->next) { + rostercolor *rule = rel->data; -+ if ((strchr(rule->status, '#') || strchr(rule->status, '!')) ++ if ((strchr(rule->status, '#') || strchr(rule->status, attention_sign())) + && (!strcmp(rule->wildcard, "*"))) { + found = TRUE; + break; + } + } -+ if (!found) -+ scr_roster_color("#!", "*", "red"); ++ if (!found) { ++ char statuses[3] = "#!"; ++ statuses[1] = attention_sign(); ++ scr_roster_color(statuses, "*", "red"); ++ } + } + getmaxyx(stdscr, maxY, maxX); Log_Win_Height = DEFAULT_LOG_WIN_HEIGHT; // Note scr_draw_main_window() should be called early after scr_init_curses() -@@ -2082,6 +2093,10 @@ +@@ -2168,6 +2184,10 @@ // for unfolded groups. if (ismsg && (!isgrp || ishid)) { pending = '#'; + // Attention sign? + if ((ismuc && isurg >= ui_attn_sign_prio_level_muc) || + (!ismuc && isurg >= ui_attn_sign_prio_level)) -+ pending = '!'; ++ pending = attention_sign(); } if (ismuc) { -@@ -2105,24 +2120,22 @@ +@@ -2191,24 +2211,22 @@ for (n = 0; n < maxx; n++) waddch(rosterWnd, ' '); } else { @@ -149,7 +161,7 @@ } if (Roster_Width > prefix_length) -@@ -2130,13 +2143,6 @@ +@@ -2216,13 +2234,6 @@ else name[0] = 0; @@ -157,15 +169,15 @@ - // Attention sign? - if ((ismuc && isurg >= ui_attn_sign_prio_level_muc) || - (!ismuc && isurg >= ui_attn_sign_prio_level)) -- pending = '!'; +- pending = attention_sign(); - } - if (isgrp) { if (ishid) { int group_count = 0; -diff -r 7718e7f796d4 mcabber/mcabber/screen.h ---- a/mcabber/mcabber/screen.h Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/mcabber/screen.h Wed May 15 12:53:55 2013 +0300 +diff -r f17324b6c882 mcabber/mcabber/screen.h +--- a/mcabber/mcabber/screen.h Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/mcabber/screen.h Tue Nov 11 22:35:16 2014 +0200 @@ -47,7 +47,7 @@ COLOR_ROSTER, COLOR_ROSTERSEL, @@ -175,15 +187,16 @@ COLOR_INFO, COLOR_MSGIN, COLOR_READMARK, -diff -r 7718e7f796d4 mcabber/mcabberrc.example ---- a/mcabber/mcabberrc.example Wed May 15 12:53:03 2013 +0300 -+++ b/mcabber/mcabberrc.example Wed May 15 12:53:55 2013 +0300 -@@ -423,15 +423,24 @@ +diff -r f17324b6c882 mcabber/mcabberrc.example +--- a/mcabber/mcabberrc.example Tue Nov 11 21:21:09 2014 +0200 ++++ b/mcabber/mcabberrc.example Tue Nov 11 22:35:16 2014 +0200 +@@ -429,16 +429,25 @@ #set color_bgrostersel = cyan #set color_rostersel = blue #set color_rosterselmsg = red -#set color_rosternewmsg = red #set color_readmark = red + #set color_timestamp = brightblue -# You can color roster items by their status and JID. For example, to have -# all roster items white, just all contacts from jabber.org that are away,