Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions src/accessiweather/ui/dialogs/settings_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,12 @@ def _on_check_updates(self, event):

# Skip update checks when running from source
if not getattr(sys, "frozen", False):
self._controls["update_status"].SetLabel("Running from source — use git pull to update")
wx.MessageBox(
"Update checking is only available in installed builds.\n"
"You're running from source — use git pull to update.",
"Running from Source",
wx.OK | wx.ICON_INFORMATION,
)
return

self._controls["update_status"].SetLabel("Checking for updates...")
Expand Down Expand Up @@ -1429,20 +1434,25 @@ async def check():
if update_info is None:
# Provide context-aware message
if current_nightly_date and channel == "stable":
# Running nightly, checked stable - explain the situation
status_msg = (
f"You're on nightly ({current_nightly_date}). "
f"No newer stable release available."
f"You're on nightly ({current_nightly_date}).\n"
"No newer stable release available."
)
elif current_nightly_date:
status_msg = f"You're on the latest nightly ({current_nightly_date})"
status_msg = f"You're on the latest nightly ({current_nightly_date})."
else:
status_msg = f"You're up to date ({current_version})"
status_msg = f"You're up to date ({current_version})."

wx.CallAfter(
self._controls["update_status"].SetLabel,
status_msg,
)
wx.CallAfter(
wx.MessageBox,
status_msg,
"No Updates Available",
wx.OK | wx.ICON_INFORMATION,
)
return

# Update available - ask user if they want to download
Expand Down Expand Up @@ -1473,6 +1483,12 @@ def prompt_download():
self._controls["update_status"].SetLabel,
"Could not check for updates",
)
wx.CallAfter(
wx.MessageBox,
f"Failed to check for updates:\n{e}",
"Update Check Failed",
wx.OK | wx.ICON_ERROR,
)

# Run update check in background thread
import threading
Expand Down
Loading