diff frontends/src/quick_frontend/quick_chat.py @ 587:952322b1d490

Remove trailing whitespaces.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 18 Jan 2013 17:55:34 +0100
parents ca13633d3b6b
children beaf6bec2fcd
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_chat.py	Fri Jan 18 17:55:27 2013 +0100
+++ b/frontends/src/quick_frontend/quick_chat.py	Fri Jan 18 17:55:34 2013 +0100
@@ -25,7 +25,7 @@
 
 
 class QuickChat():
-    
+
     def __init__(self, target, host, type='one2one'):
         self.target = target
         self.host = host
@@ -49,7 +49,7 @@
             error (_("[INTERNAL] trying to set presents nicks for a non group chat window"))
             raise Exception("INTERNAL ERROR") #TODO: raise proper Exception here
         self.occupants.update(nicks)
-    
+
     def replaceUser(self, nick, show_info=True):
         """Add user if it is not in the group list"""
         debug (_("Replacing user %s") % nick)
@@ -77,7 +77,7 @@
 
     def getUserNick(self):
         return unicode(self.nick)
-    
+
     def changeUserNick(self, old_nick, new_nick):
         """Change nick of a user in group list"""
         debug(_("Changing nick of user %(old_nick)s to %(new_nick)s") % {"old_nick": old_nick, "new_nick": new_nick})
@@ -99,13 +99,13 @@
         """Print the initial history"""
         debug (_("now we print history"))
         def onHistory(history):
-            for line in history: 
+            for line in history:
                 timestamp, from_jid, to_jid, message, _type = line
                 if ((self.type == 'group' and _type != 'groupchat') or
                    (self.type == 'one2one' and _type == 'groupchat')):
                     continue
                 self.printMessage(JID(from_jid), message, profile, timestamp)
-                    
+
         def onHistoryError(err):
             error (_("Can't get history"))
 
@@ -123,11 +123,11 @@
             if jid.startswith(const_PRIVATE_PREFIX) or unescaped.short == jid.short:
                 return unescaped.resource
         return jid.resource if self.type == "group" else (self.host.contact_list.getCache(jid,'nick') or self.host.contact_list.getCache(jid,'name') or jid.node)
-    
+
     def printMessage(self, from_jid, msg, profile, timestamp = ''):
         """Print message in chat window. Must be implemented by child class"""
         jid=JID(from_jid)
-        nick = self._get_nick(jid) 
+        nick = self._get_nick(jid)
         mymess = (jid.resource == self.nick) if self.type == "group" else (jid.short == self.host.profiles[profile]['whoami'].short) #mymess = True if message comes from local user
         if msg.startswith('/me '):
             self.printInfo('* %s %s' % (nick, msg[4:]),type='me', timestamp=timestamp)
@@ -143,12 +143,12 @@
         """
         raise NotImplementedError
 
-    
+
     def startGame(self, game_type, referee, players):
         """Configure the chat window to start a game"""
         #No need to raise an error as game are not mandatory
         warning(_('startGame is not implemented in this frontend'))
-    
+
     def getGame(self, game_type):
         """Return class managing the game type"""
         #No need to raise an error as game are not mandatory