Show incomplete subscriptions in the roster
When the "from" subscription is missing, curly braces are used.
When the "to" subscription is missing, the status is replaced by '?'.
Thanks to pmw for the suggestion.
--- a/mcabber/src/screen.c Tue Apr 25 07:05:50 2006 +0200
+++ b/mcabber/src/screen.c Tue Apr 25 07:13:43 2006 +0200
@@ -1050,7 +1050,20 @@
sep = "---";
snprintf(rline, Roster_Width, " %c%s %s", pending, sep, name);
} else {
- snprintf(rline, Roster_Width, " %c[%c] %s", pending, status, name);
+ char sepleft = '[';
+ char sepright = ']';
+ if (btype & ROSTER_TYPE_USER) {
+ guint subtype = buddy_getsubscription(BUDDATA(buddy));
+ if (!(subtype & sub_to))
+ status = '?';
+ if (!(subtype & sub_from)) {
+ sepleft = '{';
+ sepright = '}';
+ }
+ }
+
+ snprintf(rline, Roster_Width,
+ " %c%c%c%c %s", pending, sepleft, status, sepright, name);
}
rline_locale = from_utf8(rline);