Mercurial > ~mikael > mcabber > hg
diff mcabber/src/screen.c @ 889:ae93e69aaaaf
Fix up pending message flag for the status special buffer
It's still disabled (because it isn't useful as is).
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 30 May 2006 23:22:37 +0200 |
parents | 578d2034e971 |
children | 78f4971578dd |
line wrap: on
line diff
--- a/mcabber/src/screen.c Tue May 30 20:36:44 2006 +0200 +++ b/mcabber/src/screen.c Tue May 30 23:22:37 2006 +0200 @@ -603,11 +603,10 @@ top_panel(win_entry->panel); currentWindow = win_entry; chatmode = TRUE; - if (!special) { - if (!win_entry->lock) - roster_msg_setflag(winId, FALSE); + if (!win_entry->lock) + roster_msg_setflag(winId, special, FALSE); + if (!special) roster_setflags(winId, ROSTER_FLAG_LOCK, TRUE); - } update_roster = TRUE; // Refresh the window @@ -736,7 +735,9 @@ setmsgflg = TRUE; } if (setmsgflg && !special) { - roster_msg_setflag(winId, TRUE); + if (special && !winId) + winId = SPECIAL_BUFFER_STATUS_ID; + roster_msg_setflag(winId, special, TRUE); update_roster = TRUE; } } @@ -1431,7 +1432,6 @@ { gpointer unread_ptr; gpointer refbuddata; - gpointer ngroup; GList *nbuddy; if (!current_buddy) return; @@ -1442,11 +1442,14 @@ unread_ptr = unread_msg(refbuddata); if (!unread_ptr) return; - // If buddy is in a folded group, we need to expand it - ngroup = buddy_getgroup(unread_ptr); - if (buddy_getflags(ngroup) & ROSTER_FLAG_HIDE) { - buddy_setflags(ngroup, ROSTER_FLAG_HIDE, FALSE); - buddylist_build(); + if (!(buddy_gettype(unread_ptr) & ROSTER_TYPE_SPECIAL)) { + gpointer ngroup; + // If buddy is in a folded group, we need to expand it + ngroup = buddy_getgroup(unread_ptr); + if (buddy_getflags(ngroup) & ROSTER_FLAG_HIDE) { + buddy_setflags(ngroup, ROSTER_FLAG_HIDE, FALSE); + buddylist_build(); + } } nbuddy = g_list_find(buddylist, unread_ptr); @@ -1771,12 +1774,12 @@ { const char *current_jid; bool iscurrentlocked = FALSE; + guint isspe = FALSE; if (!jid) return; if (current_buddy) { - guint isspe; isspe = buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_SPECIAL; current_jid = buddy_getjid(BUDDATA(current_buddy)); if (current_jid) { @@ -1788,7 +1791,7 @@ current_jid = NULL; } if (!chatmode || !current_jid || strcmp(jid, current_jid) || iscurrentlocked) - roster_msg_setflag(jid, TRUE); + roster_msg_setflag(jid, isspe, TRUE); } // scr_set_multimode()