comparison frontends/wix/chat.py @ 183:9ee4a1d0d7fb

Added auto(dis)connect params + misc - parameters,xmlui: "bool" type is now managed - parameters,xmlui: categories now use label in addition of name - QuickFrontend: auto(dis)connection management - plugin XEP-0045: an error dialog is now show in frontend if room cannot be joined - Wix: fixed unproper close event management
author Goffi <goffi@goffi.org>
date Wed, 18 Aug 2010 15:57:26 +0800
parents a86607e5cf38
children 31632472e857
comparison
equal deleted inserted replaced
182:556c2bd7c344 183:9ee4a1d0d7fb
186 wx.Frame.__del__(self) 186 wx.Frame.__del__(self)
187 187
188 def onClose(self, event): 188 def onClose(self, event):
189 """Close event: we only hide the frame.""" 189 """Close event: we only hide the frame."""
190 event.Veto() 190 event.Veto()
191 self.Show() ## this is a workaround to a wxpython bug:
192 ## with Raise on hidden frame, Hide doesn't work anymore
193 ## TODO: check this and repport bug to wxpython devs
194 self.Hide() 191 self.Hide()
195 192
196 def onEnterPressed(self, event): 193 def onEnterPressed(self, event):
197 """Behaviour when enter pressed in send line.""" 194 """Behaviour when enter pressed in send line."""
198 self.host.bridge.sendMessage(self.target.short if self.type=='group' else self.target, 195 self.host.bridge.sendMessage(self.target.short if self.type=='group' else self.target,
220 self.chatWindow.AppendText("[%s] " % nick) 217 self.chatWindow.AppendText("[%s] " % nick)
221 self.chatWindow.SetDefaultStyle(wx.TextAttr("BLACK", font=_font_italic)) 218 self.chatWindow.SetDefaultStyle(wx.TextAttr("BLACK", font=_font_italic))
222 self.chatWindow.AppendText("%s\n" % msg) 219 self.chatWindow.AppendText("%s\n" % msg)
223 if not mymess: 220 if not mymess:
224 #TODO: use notification system 221 #TODO: use notification system
225 self.RequestUserAttention() #FIXME: do this only if in background. 222 if not self.IsActive():
226 self.Show() #gof: FIXME: to check 223 self.RequestUserAttention()
227 #self.Raise() #FIXME: too intrusive 224 if not self.IsShown():
225 self.Show()
228 226
229 ### events ### 227 ### events ###
230 228
231 def onSendFile(self, e): 229 def onSendFile(self, e):
232 debug(_("Send File")) 230 debug(_("Send File"))