diff frontends/src/wix/main_window.py @ 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 59c9a7ff903d
children 6246eb6d64a0
line wrap: on
line diff
--- a/frontends/src/wix/main_window.py	Mon Oct 28 19:04:49 2013 +0100
+++ b/frontends/src/wix/main_window.py	Tue Oct 29 16:26:55 2013 +0100
@@ -339,10 +339,10 @@
 
     def onContactActivated(self, jid):
         debug (_("onContactActivated: %s"), jid)
-        if self.chat_wins[jid.short].IsShown():
-            self.chat_wins[jid.short].Hide()
+        if self.chat_wins[jid.bare].IsShown():
+            self.chat_wins[jid.bare].Hide()
         else:
-            self.chat_wins[jid.short].Show()
+            self.chat_wins[jid.bare].Show()
 
     def onConnectRequest(self, e):
         self.bridge.connect(self.profile)
@@ -394,7 +394,7 @@
         if dlg.ShowModal() == wx.ID_OK:
             jid=JID(dlg.GetValue())
             if jid.is_valid():
-                self.bridge.addContact(jid.short, profile_key=self.profile)
+                self.bridge.addContact(jid.bare, profile_key=self.profile)
             else:
                 error (_("'%s' is an invalid JID !"), jid)
                 #TODO: notice the user
@@ -413,14 +413,14 @@
             dlg.Destroy()
             return
 
-        dlg = wx.MessageDialog(self, _("Are you sure you want to delete %s from your roster list ?") % target.short,
+        dlg = wx.MessageDialog(self, _("Are you sure you want to delete %s from your roster list ?") % target.bare,
                                _('Contact suppression'),
                                wx.YES_NO | wx.ICON_QUESTION
                               )
 
         if dlg.ShowModal() == wx.ID_YES:
-            info(_("Unsubscribing %s presence"), target.short)
-            self.bridge.delContact(target.short, profile_key=self.profile)
+            info(_("Unsubscribing %s presence"), target.bare)
+            self.bridge.delContact(target.bare, profile_key=self.profile)
 
         dlg.Destroy()
 
@@ -435,7 +435,7 @@
             dlg.ShowModal()
             dlg.Destroy()
             return
-        _id = self.bridge.getCard(target.short, profile_key=self.profile)
+        _id = self.bridge.getCard(target.bare, profile_key=self.profile)
         self.current_action_ids.add(_id)
         self.current_action_ids_cb[_id] = self.onProfileReceived