changeset 824:37ef269330f0

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.
author Mikael Berthe <mikael@lilotux.net>
date Tue, 25 Apr 2006 07:13:43 +0200
parents 19c615fd071e
children 3ecfaa6111e2
files mcabber/src/screen.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);