mainly whitespace, but also some generic qol improvements
This commit is contained in:
1 parent
2a5e3f5606
commit
3a8ffbdf70
26 files changed
+1871
-1224
No files matched your search
+12
-12
@@ -37,7 +37,7 @@ class UpdateDownloadThread(QThread):
|
||||
download_url (str): URL of the update zip file to download.
|
||||
latest_version (str): Version string of the latest update.
|
||||
"""
|
||||
|
||||
|
||||
update_ready = Signal(str, str)
|
||||
error_occurred = Signal(str)
|
||||
|
||||
@@ -48,7 +48,7 @@ class UpdateDownloadThread(QThread):
|
||||
platform_name: str,
|
||||
app_name: str,
|
||||
) -> None:
|
||||
|
||||
|
||||
super().__init__()
|
||||
self.download_url = download_url
|
||||
self.latest_version = latest_version
|
||||
@@ -124,7 +124,7 @@ class UpdateCheckThread(QThread):
|
||||
platform_name: str,
|
||||
app_name: str,
|
||||
) -> None:
|
||||
|
||||
|
||||
super().__init__()
|
||||
self.api_url = api_url
|
||||
self.api_url_sec = api_url_sec
|
||||
@@ -171,7 +171,7 @@ class UpdateCheckThread(QThread):
|
||||
|
||||
if not latest:
|
||||
continue
|
||||
|
||||
|
||||
tag = latest["tag_name"].lstrip("v")
|
||||
|
||||
for asset in latest.get("assets", []):
|
||||
@@ -203,7 +203,7 @@ class LocalPendingUpdateCheckThread(QThread):
|
||||
platform_name: str,
|
||||
app_name: str,
|
||||
) -> None:
|
||||
|
||||
|
||||
super().__init__()
|
||||
self.current_version = current_version
|
||||
self.platform_suffix = platform_suffix
|
||||
@@ -237,7 +237,7 @@ class LocalPendingUpdateCheckThread(QThread):
|
||||
break
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
if not found:
|
||||
self.no_pending_update.emit()
|
||||
|
||||
@@ -247,7 +247,7 @@ class UpdateManager(QObject):
|
||||
Orchestrates the update process.
|
||||
Main apps should instantiate this and call check_for_updates().
|
||||
"""
|
||||
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
main_window: QMainWindow,
|
||||
@@ -258,7 +258,7 @@ class UpdateManager(QObject):
|
||||
platform_suffix: str,
|
||||
app_name: str,
|
||||
) -> None:
|
||||
|
||||
|
||||
super().__init__(main_window)
|
||||
self.main_window: QMainWindow = main_window
|
||||
self.api_url = api_url
|
||||
@@ -267,7 +267,7 @@ class UpdateManager(QObject):
|
||||
self.platform_name = platform_name
|
||||
self.platform_suffix = platform_suffix
|
||||
self.app_name = app_name
|
||||
|
||||
|
||||
self.pending_update_version: Optional[str] = None
|
||||
self.pending_update_path: Optional[str] = None
|
||||
|
||||
@@ -331,7 +331,7 @@ class UpdateManager(QObject):
|
||||
except Exception as e:
|
||||
if self.main_window.statusBar():
|
||||
self.main_window.statusBar().showMessage(f"Failed to delete old update folder: {e}")
|
||||
|
||||
|
||||
# Clear pending update info so new download proceeds
|
||||
self.pending_update_version = None
|
||||
self.pending_update_path = None
|
||||
@@ -471,7 +471,7 @@ def finish_update_if_needed(platform_name: str, app_name: str, cfg_path: str, fi
|
||||
return
|
||||
|
||||
print("Finishing update...")
|
||||
|
||||
|
||||
# 1. Reset welcome dialog config flag
|
||||
update_cfg = configparser.ConfigParser()
|
||||
try:
|
||||
@@ -480,7 +480,7 @@ def finish_update_if_needed(platform_name: str, app_name: str, cfg_path: str, fi
|
||||
if not update_cfg.has_section("Options"):
|
||||
update_cfg.add_section("Options")
|
||||
update_cfg.set("Options", "show_welcome_dialog", "true")
|
||||
|
||||
|
||||
with open(cfg_path, "w") as f:
|
||||
update_cfg.write(f)
|
||||
print("Welcome dialog flag successfully reset to 'true' for next run.")
|
||||
|
||||
Reference in new issue
Block a user