Mercurial > libervia-desktop-kivy
diff cagou/core/cagou_main.py @ 302:f55b60659ec1
core (about): improved "about" popup:
- added some style
- backend version and Cagou version are shown
- host.version is now Cagou version, while host.backend_version is the one of the backend
fix 312
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Jun 2019 13:02:11 +0200 |
parents | 318a46e78ff6 |
children | 772c170b47a9 |
line wrap: on
line diff
--- a/cagou/core/cagou_main.py Fri Jun 28 12:30:18 2019 +0200 +++ b/cagou/core/cagou_main.py Fri Jun 28 13:02:11 2019 +0200 @@ -33,6 +33,7 @@ from sat_frontends.quick_frontend import quick_chat from sat_frontends.quick_frontend import quick_utils from sat_frontends.tools import jid +from sat.tools import utils as sat_utils from sat.tools import config from sat.tools.common import dynamic_import import kivy @@ -69,6 +70,8 @@ from . import menu from . import dialog from importlib import import_module +import sat +import cagou import cagou.plugins import cagou.kv try: @@ -437,7 +440,14 @@ 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() + self.backend_version = sat.__version__ # will be replaced by getVersion() + if C.APP_VERSION.endswith('D'): + self.version = "{} {}".format( + C.APP_VERSION, + sat_utils.getRepositoryData(cagou) + ) + else: + self.version = C.APP_VERSION self.tls_validation = not C.bool(config.getConfig(main_config, C.CONFIG_SECTION, @@ -502,7 +512,7 @@ sat_instance.stopService() def _getVersionCb(self, version): - self.version = version + self.backend_version = version def onBackendReady(self): self.app.showWidget()