diff 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
line wrap: on
line diff
--- a/frontends/wix/main_window.py	Wed Aug 18 21:42:30 2010 +0800
+++ b/frontends/wix/main_window.py	Wed Aug 18 22:34:35 2010 +0800
@@ -41,12 +41,13 @@
 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 @@
         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 @@
         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 @@
         #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()