chgksuite_qt 0.0.4__tar.gz → 0.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/PKG-INFO +1 -1
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt/gui.py +19 -10
- chgksuite_qt-0.0.5/chgksuite_qt/version.py +1 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt.egg-info/PKG-INFO +1 -1
- chgksuite_qt-0.0.4/chgksuite_qt/version.py +0 -1
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/LICENSE.txt +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt/__main__.py +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt.egg-info/SOURCES.txt +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt.egg-info/dependency_links.txt +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt.egg-info/entry_points.txt +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt.egg-info/requires.txt +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/chgksuite_qt.egg-info/top_level.txt +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/pyproject.toml +0 -0
- {chgksuite_qt-0.0.4 → chgksuite_qt-0.0.5}/setup.cfg +0 -0
|
@@ -14,7 +14,7 @@ import urllib.request
|
|
|
14
14
|
|
|
15
15
|
try:
|
|
16
16
|
from PyQt6 import QtWidgets, QtGui
|
|
17
|
-
from PyQt6.QtCore import QTimer, pyqtSignal, QObject
|
|
17
|
+
from PyQt6.QtCore import QTimer, pyqtSignal, QObject, QThread
|
|
18
18
|
|
|
19
19
|
PYQT = True
|
|
20
20
|
except ImportError:
|
|
@@ -87,6 +87,16 @@ def check_for_updates():
|
|
|
87
87
|
return False, current, None
|
|
88
88
|
|
|
89
89
|
|
|
90
|
+
class UpdateChecker(QObject):
|
|
91
|
+
"""Worker to check for updates in background thread."""
|
|
92
|
+
|
|
93
|
+
finished = pyqtSignal(object, object, object) # has_update, details, error
|
|
94
|
+
|
|
95
|
+
def run(self):
|
|
96
|
+
has_update, details, error = check_for_updates()
|
|
97
|
+
self.finished.emit(has_update, details, error)
|
|
98
|
+
|
|
99
|
+
|
|
90
100
|
LANGS = ["by", "by_tar", "en", "kz_cyr", "ru", "sr", "ua", "uz", "uz_cyr"] + ["custom"]
|
|
91
101
|
|
|
92
102
|
debug = False
|
|
@@ -312,15 +322,14 @@ class ParserWrapper(object):
|
|
|
312
322
|
self.update_button.setEnabled(False)
|
|
313
323
|
self.update_button.setText("Проверка обновлений...")
|
|
314
324
|
|
|
315
|
-
# Check for updates in a
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
threading.Thread(target=check_thread, daemon=True).start()
|
|
325
|
+
# Check for updates in a QThread to safely update UI
|
|
326
|
+
self._update_thread = QThread()
|
|
327
|
+
self._update_checker = UpdateChecker()
|
|
328
|
+
self._update_checker.moveToThread(self._update_thread)
|
|
329
|
+
self._update_thread.started.connect(self._update_checker.run)
|
|
330
|
+
self._update_checker.finished.connect(self._handle_update_check)
|
|
331
|
+
self._update_checker.finished.connect(self._update_thread.quit)
|
|
332
|
+
self._update_thread.start()
|
|
324
333
|
|
|
325
334
|
def _handle_update_check(self, has_update, details, error):
|
|
326
335
|
"""Handle update check result on main thread."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.5"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|