changeset 246:15e47bbb192c

about: show full version of SàT
author Goffi <goffi@goffi.org>
date Fri, 04 Jan 2019 13:20:29 +0100
parents d535446fdf45
children cf61a011f731
files cagou/core/cagou_main.py cagou/core/menu.py
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/core/cagou_main.py	Thu Jan 03 20:44:07 2019 +0100
+++ b/cagou/core/cagou_main.py	Fri Jan 04 13:20:29 2019 +0100
@@ -389,6 +389,7 @@
         self._plg_wids_transfer = []  # transfer widgets plugins
         self._import_plugins()
         self._visible_widgets = {}  # visible widgets by classes
+        self.version = C.APP_VERSION  # will be replaced by getVersion()
 
     @property
     def visible_widgets(self):
@@ -428,8 +429,12 @@
         else:
             sat_instance.stopService()
 
+    def _getVersionCb(self, version):
+        self.version = version
+
     def onBackendReady(self):
         self.app.showWidget()
+        self.bridge.getVersion(callback=self._getVersionCb)
         self.postInit()
 
     def postInit(self, dummy=None):
--- a/cagou/core/menu.py	Thu Jan 03 20:44:07 2019 +0100
+++ b/cagou/core/menu.py	Fri Jan 04 13:20:29 2019 +0100
@@ -45,7 +45,7 @@
 
 Cagou is part of the "Salut à Toi" project
 more informations at [color=5500ff][ref=website]salut-a-toi.org[/ref][/color]
-""").format(version=C.APP_VERSION)
+""")
 
 
 class AboutContent(Label):
@@ -164,7 +164,8 @@
     def onAbout(self):
         about = AboutPopup()
         about.title = ABOUT_TITLE
-        about.content = AboutContent(text=ABOUT_CONTENT, markup=True)
+        about.content = AboutContent(text=ABOUT_CONTENT.format(version=G.host.version),
+                                     markup=True)
         about.open()