diff frontends/sortilege_old/sortilege @ 688:f7878ad3c846

tools: renamed tools.jid.JID attribute "short" to "bare"
author souliane <souliane@mailoo.org>
date Tue, 29 Oct 2013 16:26:55 +0100
parents 952322b1d490
children
line wrap: on
line diff
--- a/frontends/sortilege_old/sortilege	Mon Oct 28 19:04:49 2013 +0100
+++ b/frontends/sortilege_old/sortilege	Tue Oct 29 16:26:55 2013 +0100
@@ -110,7 +110,7 @@
     def replace(self, jid, groups=None):
         """add a contact to the list"""
         name = self.CM.getAttr(jid,'name')
-        self.jid_list.append(jid.short)
+        self.jid_list.append(jid.bare)
         self.update()
 
     def indexUp(self):
@@ -131,7 +131,7 @@
 
     def remove(self, jid):
         """remove a contact from the list"""
-        self.jid_list.remove(jid.short)
+        self.jid_list.remove(jid.bare)
         if self.__index >= len(self.jid_list) and self.__index > 0:  #if select index is out of border, we put it on the last contact
             self.__index = len(self.jid_list)-1
         self.update()
@@ -264,8 +264,8 @@
         """Called when a contact is selected in contact list."""
         jid=JID(jid_txt)
         debug (_("contact choosed: %s"), jid)
-        self.showChat(jid.short)
-        self.statusBar.remove_item(jid.short)
+        self.showChat(jid.bare)
+        self.statusBar.remove_item(jid.bare)
         if len(self.statusBar)==0:
             self.statusBar.hide()
             self.sizer.update()
@@ -298,14 +298,14 @@
         QuickApp.newMessage(self, from_jid, msg, type, to_jid, profile)
         sender=JID(from_jid)
         addr=JID(to_jid)
-        win = addr if sender.short == self.whoami.short else sender  #FIXME: duplicate code with QuickApp
+        win = addr if sender.bare == self.whoami.bare else sender  #FIXME: duplicate code with QuickApp
         if (self.currentChat==None):
-            self.currentChat=win.short
-            self.showChat(win.short)
+            self.currentChat=win.bare
+            self.showChat(win.bare)
 
         # we show the window in the status bar
-        if not self.currentChat == win.short:
-            self.statusBar.add_item(win.short)
+        if not self.currentChat == win.bare:
+            self.statusBar.add_item(win.bare)
             self.statusBar.show()
         self.sizer.update()
         self.statusBar.update()