add version with commit hash to 'About' dialogs for Beremiz IDE and PLCOpenEditor
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 01 Nov 2016 14:03:14 +0300
changeset 1560 4ce8492159ab
parent 1559 91129212e9a6
child 1561 f53ece47e18d
add version with commit hash to 'About' dialogs for Beremiz IDE and PLCOpenEditor
.hgignore
Beremiz.py
PLCOpenEditor.py
--- a/.hgignore	Mon Oct 31 13:59:56 2016 +0300
+++ b/.hgignore	Tue Nov 01 14:03:14 2016 +0300
@@ -11,4 +11,5 @@
 ^.*\.swp$
 
 bug_report.*\.txt
-i18n/.*.new$
\ No newline at end of file
+i18n/.*.new$
+revision
--- a/Beremiz.py	Mon Oct 31 13:59:56 2016 +0300
+++ b/Beremiz.py	Tue Nov 01 14:03:14 2016 +0300
@@ -31,6 +31,7 @@
 import shutil
 import random
 import time
+import version
 from types import ListType
 
 beremiz_dir = os.path.dirname(os.path.realpath(__file__))
@@ -1012,7 +1013,8 @@
         self.Close()
 
     def OnAboutMenu(self, event):
-        OpenHtmlFrame(self,_("About Beremiz"), Bpath("doc", _("about.html")), wx.Size(550, 550))
+        title=_("About Beremiz") + " " + version.app_version
+        OpenHtmlFrame(self, title, Bpath("doc", _("about.html")), wx.Size(550, 550))
 
     def OnProjectTreeItemBeginEdit(self, event):
         selected = event.GetItem()
@@ -1263,7 +1265,7 @@
 
 if __name__ == '__main__':
     # Install a exception handle for bug reports
-    AddExceptHook(os.getcwd(),updateinfo_url)
+    AddExceptHook(os.getcwd(),version.app_version)
 
     frame = Beremiz(None, projectOpen, buildpath)
     if splash:
--- a/PLCOpenEditor.py	Mon Oct 31 13:59:56 2016 +0300
+++ b/PLCOpenEditor.py	Tue Nov 01 14:03:14 2016 +0300
@@ -24,6 +24,7 @@
 
 import wx
 import os, sys, platform, time, traceback, getopt
+import version
 
 beremiz_dir = os.path.dirname(os.path.realpath(__file__))
 
@@ -348,7 +349,8 @@
         open_pdf(os.path.join(beremiz_dir, "plcopen", "TC6_XML_V101.pdf"))
 
     def OnAboutMenu(self, event):
-        OpenHtmlFrame(self,_("About PLCOpenEditor"), os.path.join(beremiz_dir, "doc", _("plcopen_about.html")), wx.Size(350, 350))
+        title= _("About PLCOpenEditor") + " " + version.app_version        
+        OpenHtmlFrame(self, title, os.path.join(beremiz_dir, "doc", _("plcopen_about.html")), wx.Size(350, 350))
 
     def SaveProject(self):
         result = self.Controler.SaveXMLFile()
@@ -481,7 +483,7 @@
         wx.InitAllImageHandlers()
 
     # Install a exception handle for bug reports
-    AddExceptHook(os.getcwd(),__version__)
+    AddExceptHook(os.getcwd(), version.app_version)
 
     frame = PLCOpenEditor(None, fileOpen=fileOpen)