comparison frontends/wix/main_window.py @ 52:6455fb62ff83

Connection/disconnection signals - wix, sortilege: management of this new signals /!\ sortilege is bugged, the contact list window is not updated correctly
author Goffi <goffi@goffi.org>
date Thu, 07 Jan 2010 01:55:30 +1100
parents 8c67ea98ab91
children 6dfe5bb10008
comparison
equal deleted inserted replaced
51:8c67ea98ab91 52:6455fb62ff83
124 show_html, 124 show_html,
125 escape(status)) 125 escape(status))
126 126
127 return html 127 return html
128 128
129 def clear_contacts(self):
130 """Clear all the contact list"""
131 self.Clear()
132
129 def add(self, jid): 133 def add(self, jid):
130 """add a contact to the list""" 134 """add a contact to the list"""
131 debug ("adding %s",jid) 135 debug ("adding %s",jid)
132 idx = self.Append(self.__presentItem(jid)) 136 idx = self.Append(self.__presentItem(jid))
133 137
169 #Frame elements 173 #Frame elements
170 self.contactList = ContactList(self, self.CM) 174 self.contactList = ContactList(self, self.CM)
171 self.contactList.registerActivatedCB(self.onContactActivated) 175 self.contactList.registerActivatedCB(self.onContactActivated)
172 self.chat_wins=ChatList(self) 176 self.chat_wins=ChatList(self)
173 self.CreateStatusBar() 177 self.CreateStatusBar()
174 self.SetStatusText(msgOFFLINE)
175 self.createMenus() 178 self.createMenus()
176 179
177 #ToolBar 180 #ToolBar
178 self.tools=self.CreateToolBar() 181 self.tools=self.CreateToolBar()
179 self.statusBox = wx.ComboBox(self.tools, -1, "Online", choices=[status[1] for status in const_STATUS], 182 self.statusBox = wx.ComboBox(self.tools, -1, "Online", choices=[status[1] for status in const_STATUS],
195 198
196 #events 199 #events
197 self.Bind(wx.EVT_CLOSE, self.onClose, self) 200 self.Bind(wx.EVT_CLOSE, self.onClose, self)
198 201
199 QuickApp.__init__(self) 202 QuickApp.__init__(self)
200 203
201 self.Show() 204 self.Show()
202 205
203 def createMenus(self): 206 def createMenus(self):
204 info("Creating menus") 207 info("Creating menus")
205 connectMenu = wx.Menu() 208 connectMenu = wx.Menu()