# HG changeset patch # User Mikael Berthe # Date 1269180864 -3600 # Node ID 35a1250c111af676599c67271c17a83941fff522 # Parent 7d3060070d1065f6a385efdcfde7c885b1464dd2 Display urgent/attention sign in the roster UI diff -r 7d3060070d10 -r 35a1250c111a mcabber/mcabber/screen.c --- a/mcabber/mcabber/screen.c Sun Mar 21 15:13:48 2010 +0100 +++ b/mcabber/mcabber/screen.c Sun Mar 21 15:14:24 2010 +0100 @@ -73,6 +73,10 @@ static unsigned short int Log_Win_Height; static unsigned short int Roster_Width; +// Default attention sign trigger levels +static guint ui_attn_sign_prio_level_muc = ROSTER_UI_PRIO_MUC_HL_MESSAGE; +static guint ui_attn_sign_prio_level = ROSTER_UI_PRIO_ATTENTION_MESSAGE; + static inline void check_offset(int); static void scr_cancel_current_completion(void); static void scr_end_current_completion(void); @@ -1911,7 +1915,9 @@ rOffset = offset; for (i=0; i 0) { rOffset--; @@ -1977,10 +1984,10 @@ int color = get_color(COLOR_ROSTER); if ((!isspe) && (!isgrp)) { // Look for color rules GSList *head; - const char *jid = buddy_getjid(BUDDATA(buddy)); + 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, jid) && + if (g_pattern_match_string(rc->compiled, bjid) && (!strcmp("*", rc->status) || strchr(rc->status, status))) { color = compose_color(rc->color); break; @@ -1996,6 +2003,13 @@ 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;