diff --git a/cutelog/about_dialog.py b/cutelog/about_dialog.py index e5d629a0ba8770f56c86562c951e4d1e32079801..5bba0948ba84a6ee7fba823b3f59a62061fe640b 100644 --- a/cutelog/about_dialog.py +++ b/cutelog/about_dialog.py @@ -15,3 +15,4 @@ class AboutDialog(*AboutDialogBase): def setupUi(self): super().setupUi(self) + self.nameLabel.setText(CONFIG.full_name) diff --git a/cutelog/config.py b/cutelog/config.py index 7812d8260e934ffff18b7df80c3c2e1b6a6e6a97..50adf4a1cb1e03fe830b0176b9c1055ee742b1ea 100644 --- a/cutelog/config.py +++ b/cutelog/config.py @@ -1,7 +1,7 @@ import os import sys import logging -from pkg_resources import resource_filename +from pkg_resources import resource_filename, get_distribution from collections import namedtuple from PyQt5 import QtCore from PyQt5.QtCore import QCoreApplication, QObject, pyqtSignal @@ -66,6 +66,8 @@ class Config(QObject): self.options = None self.option_spec = self.load_option_spec() self.options = self.load_options() + self.full_name = f"{QCoreApplication.applicationName()} "\ + f"{QCoreApplication.applicationVersion()}" # options that need fast access are also definded as attributes, which # are updated by calling update_attributes() @@ -231,7 +233,8 @@ def init_qt_info(): QCoreApplication.setOrganizationName('busimus') QCoreApplication.setOrganizationDomain('busz.me') QCoreApplication.setApplicationName('cutelog') - QCoreApplication.setApplicationVersion('1.0.2') + version = get_distribution(QCoreApplication.applicationName()).version + QCoreApplication.setApplicationVersion(version) def init_logging(): diff --git a/cutelog/resources/ui/about_dialog.ui b/cutelog/resources/ui/about_dialog.ui index 29476731a0c24000eada300fb0833ad6993e8ae7..97dd9924ce2d857bb3d345c068c6e9a5fa7a7b2a 100644 --- a/cutelog/resources/ui/about_dialog.ui +++ b/cutelog/resources/ui/about_dialog.ui @@ -31,7 +31,7 @@ </font> </property> <property name="text"> - <string>cutelog 1.0.2</string> + <string>cutelog</string> </property> </widget> </item> diff --git a/setup.py b/setup.py index ac4d69d02129f67ff6b619a6487c4740a3d465a5..221ea03cfb3c1b144651fb616a7cbb5ca53b20fe 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from os.path import dirname, join from setuptools import setup -VERSION = '1.0.2' +VERSION = '1.0.3' # def build_qt_resources(): @@ -42,7 +42,7 @@ setup( "Topic :: System :: Logging", "Topic :: System :: Monitoring", ], - download_url="https://github.com/busimus/cutelog/archive/cutelog-{}.zip".format(VERSION), + download_url="https://github.com/Busimus/cutelog/archive/{}.zip".format(VERSION), entry_points={'console_scripts': 'cutelog=cutelog.__main__:main'}, include_package_data=True, install_requires=['PyQt5;platform_system=="Darwin"', # it's better to use distro-supplied