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
This commit is contained in:
Goffi 2010-08-18 22:34:35 +08:00
commit 991d367f85

View file

@ -41,12 +41,13 @@ import constants
idCONNECT,\
idDISCONNECT,\
idEXIT,\
idABOUT,\
idPARAM,\
idADD_CONTACT,\
idREMOVE_CONTACT,\
idSHOW_PROFILE,\
idJOIN_ROOM,\
idFIND_GATEWAYS = range(9)
idFIND_GATEWAYS = range(10)
class ChatList(QuickChatList):
"""This class manage the list of chat windows"""
@ -132,6 +133,7 @@ class MainWindow(wx.Frame, QuickApp):
connectMenu.Append(idDISCONNECT, _("&Disconnect CTRL-d"),_(" Disconnect from the server"))
connectMenu.Append(idPARAM,_("&Parameters"),_(" Configure the program"))
connectMenu.AppendSeparator()
connectMenu.Append(idABOUT,_("A&bout"),_(" About %s") % APP_NAME)
connectMenu.Append(idEXIT,_("E&xit"),_(" Terminate the program"))
contactMenu = wx.Menu()
contactMenu.Append(idADD_CONTACT, _("&Add contact"),_(" Add a contact to your list"))
@ -176,6 +178,7 @@ class MainWindow(wx.Frame, QuickApp):
wx.EVT_MENU(self, idCONNECT, self.onConnectRequest)
wx.EVT_MENU(self, idDISCONNECT, self.onDisconnectRequest)
wx.EVT_MENU(self, idPARAM, self.onParam)
wx.EVT_MENU(self, idABOUT, self.onAbout)
wx.EVT_MENU(self, idEXIT, self.onExit)
wx.EVT_MENU(self, idADD_CONTACT, self.onAddContact)
wx.EVT_MENU(self, idREMOVE_CONTACT, self.onRemoveContact)
@ -372,6 +375,23 @@ class MainWindow(wx.Frame, QuickApp):
#XMLUI(self, xml_data = xmlui)
param=Param(self)
def onAbout(self, e):
about = wx.AboutDialogInfo()
about.SetName(APP_NAME)
about.SetVersion (unicode(self.bridge.getVersion()))
about.SetCopyright(u"(C) 2009,2010 Jérôme Poisson aka Goffi")
about.SetDescription( _(u"%(name)s is a SàT (Salut à Toi) frontend\n"+
u"%(name)s is based on WxPython, and is the standard graphic interface of SàT") % {'name':APP_NAME})
about.SetWebSite(("http://www.goffi.org", "Goffi's non-hebdo (french)"))
about.SetDevelopers([ "Goffi (Jérôme Poisson)"])
try:
with open(LICENCE_PATH,"r") as licence:
about.SetLicence(''.join(licence.readlines()))
except:
pass
wx.AboutBox(about)
def onExit(self, e):
self.Close()