diff frontends/quick_frontend/quick_chat.py @ 120:1ca5f254ce41

primitivus group chat & misc primitivus: new widget: SurroundedText (text with a character repeated around it) primitivus: new decorator LabelLine (like lineBox, but with a label on the top line) wix & primitivus & quick_app: group chat method move to quick_chat wix: when new message, window is not raised anymore, but RequestUserAttention is called instead
author Goffi <goffi@goffi.org>
date Thu, 08 Jul 2010 14:12:18 +0800
parents fc7583282d40
children a86607e5cf38
line wrap: on
line diff
--- a/frontends/quick_frontend/quick_chat.py	Mon Jul 05 19:13:36 2010 +0800
+++ b/frontends/quick_frontend/quick_chat.py	Thu Jul 08 14:12:18 2010 +0800
@@ -40,10 +40,40 @@
         """
         self.type = type
 
+    def setPresents(self, nicks):
+        """Set the users presents in the contact list for a group chat
+        @param nicks: list of nicknames
+        """
+        debug (_("Adding users %s to room") % nicks)
+        if self.type != "group":
+            error (_("[INTERNAL] trying to set presents nicks for a non group chat window"))
+            raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here
+    
+    def replaceUser(self, nick):
+        """Add user if it is not in the group list"""
+        debug (_("Replacing user %s") % nick)
+        if self.type != "group":
+            error (_("[INTERNAL] trying to replace user for a non group chat window"))
+            raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here
+    
     def setUserNick(self, nick):
         """Set the nick of the user, usefull for e.g. change the color of the user"""
         self.nick = nick
 
+    def removeUser(self, nick):
+        """Remove a user from the group list"""
+        debug(_("Removing user %s") % nick)
+        if self.type != "group":
+            error (_("[INTERNAL] trying to remove user for a non group chat window"))
+            raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here
+
+    def setSubject(self, subject):
+        """Set title for a group chat"""
+        debug(_("Setting subject to %s") % subject)
+        if self.type != "group":
+            error (_("[INTERNAL] trying to set subject for a non group chat window"))
+            raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here
+
     def historyPrint(self, size=20, keep_last=False, profile='@NONE@'):
         """Print the initial history"""
         debug (_("now we print history"))