Commit Graph

3 Commits

Author SHA1 Message Date
Daniel Johnson
a18cfd2f6a Fix test failures in PR #6525 cloud sync tests
- Replace object.__new__() with CloudSyncProgressDialog.__new__() to
  fix Python 3.13+ compatibility (object.__new__ rejects classes whose
  __init__ takes extra parameters)
- Gzip-compress mock response data in download_file tests to match the
  actual gzip.decompress() call in the implementation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 07:13:39 -04:00
Mathieu Comandon
0cfbbec530 feat: replace pulsing loader with progress bar in cloud sync dialog
Thread a progress callback from the sync dialog through the GOG cloud
hooks into the sync engine so per-file progress is reported. The dialog
now shows a real progress bar (e.g. "3 / 10") with the current filename
(middle-ellipsized to prevent dialog resizing).
2026-03-08 01:02:32 -08:00
e88z4
c6d8ff6d65 feat: add cloud sync progress dialog to prevent UI freeze
Replace blocking cloud sync calls during game launch and quit with a
non-blocking progress dialog (CloudSyncProgressDialog). The sync work
runs on a background thread while a pulsing progress bar keeps the GTK
main loop alive, preventing the window manager from flagging Lutris as
'not responding'.

Changes:
- New: lutris/gui/dialogs/cloud_sync_progress.py
  Modal-style dialog with pulsing progress bar, status labels, and
  a 'Skip Sync' button for users who want to launch immediately.
- Modified: lutris/game.py
  Pre-launch sync (configure_game) and post-quit sync (on_game_quit)
  now use the progress dialog for GOG games instead of blocking calls.
- New: tests/test_cloud_sync_progress.py
  14 unit tests covering dialog construction, callbacks, cancel/skip
  behaviour, pulse lifecycle, and sync completion handling.

Passes ruff and mypy static analysis.
2026-03-07 22:59:38 -08:00