[refresh] Add round-high-priority.diff, refresh => API 41-42
* add round-high-priority.diff
* refresh patches according to changes in upstream
* API version bump - 41-42
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
@@ -14,7 +14,6 @@
set color_bgrostersel = green
set color_rostersel = yellow
set color_rosterselmsg = red
-set color_rosternewmsg = red
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
@@ -14,7 +14,6 @@
set color_bgrostersel = black
set color_rostersel = brightgreen
set color_rosterselmsg = red
-set color_rosternewmsg = red
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
@@ -14,7 +14,6 @@
set color_bgrostersel = yellow
set color_rostersel = blue
set color_rosterselmsg = red
-set color_rosternewmsg = red
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
@@ -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.
If more than one rule matches, the color from the last created (not overwritten) is used.
+ Also mask can contain symbols '!', '#', '+' and '.', that represent buddies with urgent condition, with new messages, that are typing and that have ceased typing. These symbols have higher priority than status ones.
/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
@@ -11,6 +11,7 @@
Додає нове чи змінює існуюче правило кольору. "Статус" складений з літер статусу, до яких докладається це правило (наприклад "n_d?"). Зірочка ("*") відповідає будь-якому статусу. "Маска" подібна до файлової маски й докладається до jid. Правило встановлює колір контактів, що йому відповідають.
Щоб вилучити правило, вкажіть колір "-".
Коли є декілька правил, що відповідають контакту, спрацьовує останнє додане (_не_ змінене).
+ Також рядок статусів може містити символи '!', '#', '+' та '.', що відповідають користувачам, які відповідно мають негайні події, нові повідомлення, друкують та друкували але спинилися. Ці символи мають більший пріоритет ніж символи статусів.
/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 @@
"roster",
"rostersel",
"rosterselmsg",
- "rosternewmsg",
+ "rosternewmsg", /* not removing this to not break binary compatibility with mainstream */
"info",
"msgin",
"readmark",
@@ -513,10 +513,6 @@
init_pair(i+1, ((color) ? find_color(color) : COLOR_RED),
find_color(backselected));
break;
- case COLOR_ROSTERNMSG:
- init_pair(i+1, ((color) ? find_color(color) : COLOR_RED),
- find_color(background));
- break;
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);
settings_set_guard("color_rosternewmsg", 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, '!'))
+ && (!strcmp(rule->wildcard, "*"))) {
+ found = TRUE;
+ break;
+ }
+ }
+ if (!found)
+ scr_roster_color("#!", "*", "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 @@
// 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 = '!';
}
if (ismuc) {
@@ -2105,24 +2120,22 @@
for (n = 0; n < maxx; n++)
waddch(rosterWnd, ' ');
} else {
- if (pending == '#')
- wattrset(rosterWnd, get_color(COLOR_ROSTERNMSG));
- else {
- int color = get_color(COLOR_ROSTER);
- if ((!isspe) && (!isgrp)) { // Look for color rules
- GSList *head;
- const char *bjid = buddy_getjid(BUDDATA(buddy));
- for (head = rostercolrules; head; head = g_slist_next(head)) {
- rostercolor *rc = head->data;
- if (g_pattern_match_string(rc->compiled, bjid) &&
- (!strcmp("*", rc->status) || strchr(rc->status, status))) {
- color = compose_color(rc->color);
- break;
- }
+ int color = get_color(COLOR_ROSTER);
+ if ((!isspe) && (!isgrp)) { // Look for color rules
+ GSList *head;
+ const char *jid = buddy_getjid(BUDDATA(buddy));
+ for (head = rostercolrules; head; head = g_slist_next(head)) {
+ rostercolor *rc = head->data;
+ if (g_pattern_match_string(rc->compiled, jid) &&
+ (!strcmp("*", rc->status) ||
+ strchr(rc->status, pending) ||
+ strchr(rc->status, status))) {
+ color = compose_color(rc->color);
+ break;
}
}
- wattrset(rosterWnd, color);
}
+ wattrset(rosterWnd, color);
}
if (Roster_Width > prefix_length)
@@ -2130,13 +2143,6 @@
else
name[0] = 0;
- if (pending == '#') {
- // Attention sign?
- if ((ismuc && isurg >= ui_attn_sign_prio_level_muc) ||
- (!ismuc && isurg >= ui_attn_sign_prio_level))
- pending = '!';
- }
-
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
@@ -47,7 +47,7 @@
COLOR_ROSTER,
COLOR_ROSTERSEL,
COLOR_ROSTERSELNMSG,
- COLOR_ROSTERNMSG,
+ COLOR_ROSTERNMSG, /* not removing this to not break binary compatibility with mainstream */
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 @@
#set color_bgrostersel = cyan
#set color_rostersel = blue
#set color_rosterselmsg = red
-#set color_rosternewmsg = red
#set color_readmark = red
-# 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,
-# not available or do not disturb yellow, you do this:
+# You can color roster items by their status, state and JID. For example,
+# to have all roster items white, just all contacts from jabber.org that
+# are away, not available or do not disturb yellow, you do this:
#
#color roster * * white
#color roster adn *@jabber.org yellow
+#
+# You can specify '!', '#', '+' and '.' in status mask, they will take
+# precedence over status letters and will select buddies accordingly with
+# urgent condition, with new messages, that are typing and that ceased
+# typing. By default there exists one rule:
+#
+#color roster !# * red
+#
+# However, if you define a rule with either '!' or '#', this default rule
+# will not be added.
# You can let mcabber color nicks in MUC.
# These colors will by used automatically: