diff mcabber/src/screen.c @ 986:ed697234bd39

Chat states receival (Alexis Hildebrandt) Patch from Alexis Hildebrandt, slightly modified (mostly coding style updates).
author Mikael Berthe <mikael@lilotux.net>
date Sun, 29 Oct 2006 11:43:00 +0100
parents 553b8ecf901f
children f47e312560af
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sat Oct 28 18:14:22 2006 +0200
+++ b/mcabber/src/screen.c	Sun Oct 29 11:43:00 2006 +0100
@@ -1168,6 +1168,7 @@
   for (i=0; i<maxy && buddy; buddy = g_list_next(buddy)) {
     unsigned short bflags, btype, ismsg, isgrp, ismuc, ishid, isspe;
     gchar *rline_locale;
+    GSList *resources;
 
     bflags = buddy_getflags(BUDDATA(buddy));
     btype = buddy_gettype(BUDDATA(buddy));
@@ -1186,6 +1187,21 @@
     status = '?';
     pending = ' ';
 
+    resources = buddy_getresources(BUDDATA(buddy));
+    for ( ; resources ; resources = g_slist_next(resources) ) {
+      guint events = buddy_resource_getevents(BUDDATA(buddy),
+                                              resources ? resources->data : "");
+      if (events) {
+        if (events & ROSTER_EVENT_MSG && false) { // FIXME: not yet.
+          pending = '#';
+          break;
+        } else if (events & ROSTER_EVENT_COMPOSING) {
+          pending = '+';
+          break;
+        }
+      }
+    }
+
     // Display message notice if there is a message flag, but not
     // for unfolded groups.
     if (ismsg && (!isgrp || ishid)) {