Mercurial > libervia-backend
comparison frontends/wix/main_window.py @ 191:1438a1337732
About added/updated for Wix & Jp
- Jp version now follow the one of core SàT
- Wix has now an about box, and its version follow the one of core SàT
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 18 Aug 2010 22:34:35 +0800 |
parents | fd2db62ea5eb |
children | b2e1a13ed596 |
comparison
equal
deleted
inserted
replaced
190:31632472e857 | 191:1438a1337732 |
---|---|
39 import constants | 39 import constants |
40 | 40 |
41 idCONNECT,\ | 41 idCONNECT,\ |
42 idDISCONNECT,\ | 42 idDISCONNECT,\ |
43 idEXIT,\ | 43 idEXIT,\ |
44 idABOUT,\ | |
44 idPARAM,\ | 45 idPARAM,\ |
45 idADD_CONTACT,\ | 46 idADD_CONTACT,\ |
46 idREMOVE_CONTACT,\ | 47 idREMOVE_CONTACT,\ |
47 idSHOW_PROFILE,\ | 48 idSHOW_PROFILE,\ |
48 idJOIN_ROOM,\ | 49 idJOIN_ROOM,\ |
49 idFIND_GATEWAYS = range(9) | 50 idFIND_GATEWAYS = range(10) |
50 | 51 |
51 class ChatList(QuickChatList): | 52 class ChatList(QuickChatList): |
52 """This class manage the list of chat windows""" | 53 """This class manage the list of chat windows""" |
53 | 54 |
54 def __init__(self, host): | 55 def __init__(self, host): |
130 connectMenu = wx.Menu() | 131 connectMenu = wx.Menu() |
131 connectMenu.Append(idCONNECT, _("&Connect CTRL-c"),_(" Connect to the server")) | 132 connectMenu.Append(idCONNECT, _("&Connect CTRL-c"),_(" Connect to the server")) |
132 connectMenu.Append(idDISCONNECT, _("&Disconnect CTRL-d"),_(" Disconnect from the server")) | 133 connectMenu.Append(idDISCONNECT, _("&Disconnect CTRL-d"),_(" Disconnect from the server")) |
133 connectMenu.Append(idPARAM,_("&Parameters"),_(" Configure the program")) | 134 connectMenu.Append(idPARAM,_("&Parameters"),_(" Configure the program")) |
134 connectMenu.AppendSeparator() | 135 connectMenu.AppendSeparator() |
136 connectMenu.Append(idABOUT,_("A&bout"),_(" About %s") % APP_NAME) | |
135 connectMenu.Append(idEXIT,_("E&xit"),_(" Terminate the program")) | 137 connectMenu.Append(idEXIT,_("E&xit"),_(" Terminate the program")) |
136 contactMenu = wx.Menu() | 138 contactMenu = wx.Menu() |
137 contactMenu.Append(idADD_CONTACT, _("&Add contact"),_(" Add a contact to your list")) | 139 contactMenu.Append(idADD_CONTACT, _("&Add contact"),_(" Add a contact to your list")) |
138 contactMenu.Append(idREMOVE_CONTACT, _("&Remove contact"),_(" Remove the selected contact from your list")) | 140 contactMenu.Append(idREMOVE_CONTACT, _("&Remove contact"),_(" Remove the selected contact from your list")) |
139 contactMenu.AppendSeparator() | 141 contactMenu.AppendSeparator() |
174 | 176 |
175 #events | 177 #events |
176 wx.EVT_MENU(self, idCONNECT, self.onConnectRequest) | 178 wx.EVT_MENU(self, idCONNECT, self.onConnectRequest) |
177 wx.EVT_MENU(self, idDISCONNECT, self.onDisconnectRequest) | 179 wx.EVT_MENU(self, idDISCONNECT, self.onDisconnectRequest) |
178 wx.EVT_MENU(self, idPARAM, self.onParam) | 180 wx.EVT_MENU(self, idPARAM, self.onParam) |
181 wx.EVT_MENU(self, idABOUT, self.onAbout) | |
179 wx.EVT_MENU(self, idEXIT, self.onExit) | 182 wx.EVT_MENU(self, idEXIT, self.onExit) |
180 wx.EVT_MENU(self, idADD_CONTACT, self.onAddContact) | 183 wx.EVT_MENU(self, idADD_CONTACT, self.onAddContact) |
181 wx.EVT_MENU(self, idREMOVE_CONTACT, self.onRemoveContact) | 184 wx.EVT_MENU(self, idREMOVE_CONTACT, self.onRemoveContact) |
182 wx.EVT_MENU(self, idSHOW_PROFILE, self.onShowProfile) | 185 wx.EVT_MENU(self, idSHOW_PROFILE, self.onShowProfile) |
183 wx.EVT_MENU(self, idJOIN_ROOM, self.onJoinRoom) | 186 wx.EVT_MENU(self, idJOIN_ROOM, self.onJoinRoom) |
370 debug(_("Param request")) | 373 debug(_("Param request")) |
371 #xmlui = self.bridge.getParamsUI(self.profile) | 374 #xmlui = self.bridge.getParamsUI(self.profile) |
372 #XMLUI(self, xml_data = xmlui) | 375 #XMLUI(self, xml_data = xmlui) |
373 param=Param(self) | 376 param=Param(self) |
374 | 377 |
378 def onAbout(self, e): | |
379 about = wx.AboutDialogInfo() | |
380 about.SetName(APP_NAME) | |
381 about.SetVersion (unicode(self.bridge.getVersion())) | |
382 about.SetCopyright(u"(C) 2009,2010 Jérôme Poisson aka Goffi") | |
383 about.SetDescription( _(u"%(name)s is a SàT (Salut à Toi) frontend\n"+ | |
384 u"%(name)s is based on WxPython, and is the standard graphic interface of SàT") % {'name':APP_NAME}) | |
385 about.SetWebSite(("http://www.goffi.org", "Goffi's non-hebdo (french)")) | |
386 about.SetDevelopers([ "Goffi (Jérôme Poisson)"]) | |
387 try: | |
388 with open(LICENCE_PATH,"r") as licence: | |
389 about.SetLicence(''.join(licence.readlines())) | |
390 except: | |
391 pass | |
392 | |
393 wx.AboutBox(about) | |
394 | |
375 def onExit(self, e): | 395 def onExit(self, e): |
376 self.Close() | 396 self.Close() |
377 | 397 |
378 def onAddContact(self, e): | 398 def onAddContact(self, e): |
379 debug(_("Add contact request")) | 399 debug(_("Add contact request")) |