comparison frontends/wix/chat.py @ 75:7322a41f8a8e

Basic user joined/left management - plugin XEP-0045: user joined./left signal is sended - wix: user are adder/removed when these signals are catched
author Goffi <goffi@goffi.org>
date Mon, 29 Mar 2010 16:54:53 +1100
parents f271fff3a713
children 8becde8a967c
comparison
equal deleted inserted replaced
74:6e3a06b4dd36 75:7322a41f8a8e
95 if self.type != "group": 95 if self.type != "group":
96 error (_("[INTERNAL] trying to set presents nicks for a non group chat window")) 96 error (_("[INTERNAL] trying to set presents nicks for a non group chat window"))
97 return 97 return
98 for nick in nicks: 98 for nick in nicks:
99 self.present_panel.presents.replace(nick) 99 self.present_panel.presents.replace(nick)
100
101
102 def replaceUser(self, nick):
103 """Add user if it is not in the group list"""
104 debug (_("Replacing user %s") % nick)
105 if self.type != "group":
106 error (_("[INTERNAL] trying to replace user for a non group chat window"))
107 return
108 self.present_panel.presents.replace(nick)
109
110 def removeUser(self, nick):
111 """Remove a user from the group list"""
112 debug(_("Removing user %s") % nick)
113 if self.type != "group":
114 error (_("[INTERNAL] trying to remove user for a non group chat window"))
115 return
116 self.present_panel.presents.remove(nick)
117
118
100 119
101 def createMenus(self): 120 def createMenus(self):
102 info("Creating menus") 121 info("Creating menus")
103 actionMenu = wx.Menu() 122 actionMenu = wx.Menu()
104 actionMenu.Append(idSEND, _("&SendFile CTRL-s"),_(" Send a file to contact")) 123 actionMenu.Append(idSEND, _("&SendFile CTRL-s"),_(" Send a file to contact"))