1
0
Fork 0
mirror of synced 2024-06-27 18:51:06 +12:00
Commit graph

1539 commits

Author SHA1 Message Date
loathingKernel 8a1dd6c948
RareCore: Sync back the results from OriginWineResolver into the main thread 2023-03-10 21:28:37 +02:00
loathingKernel f83342aa14
UI: Fix over-layouting in SyncWidget 2023-03-10 18:23:26 +02:00
loathingKernel 81ec9bf772
RareCore: Fetch **ALL** saves during launch
To save time and requests, bulk get saves for all games and
load them into each respective RareGame.

Co-authored-by: Dummerle <44114474+dummerle@users.noreply.github.com>
2023-03-10 17:01:00 +02:00
loathingKernel f6189772d0
WineResolver: Move common wine operations to rare/utils/wine
`rare.utils.misc.get_raw_save_path` has been removed in favor of the
equivalent `RareGame` property.
2023-03-10 17:00:55 +02:00
loathingKernel 3adabda1ba
ImageManager: Add OfferImageTall to the set of image types to look for
Seems like Epic are changing their API again, and some image types have been renamed. This made the list of updates to be empty after filtering it for image types we could handle. This also had the side effect of an infinite recursion when downloading images, as the resulting pixmap would be null.

To fix this situation, the new image type has been added, and the image loading in RareGame has become two methods, one for loading and one for setting it.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-10 10:35:31 +02:00
lennard 901f339415
Only auto sync in launch helper if enabled
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 22:29:53 +02:00
lennard 45ecaa39f3
Add sync worker to launch helper
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 22:27:02 +02:00
lennard 63e4223a96
Move slim RareGame to different file, to avoid circular import
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 22:14:19 +02:00
lennard d42a631713
Add dry run argument to launch helper 2023-03-08 21:33:58 +02:00
lennard b4586c9272
Delete unused classes GameUtils and CloudSaveUtils and move cloud save dialog to dialogs
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 21:33:24 +02:00
lennard 4ec1f39109
Update cloud widget, when state changed
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 21:22:38 +02:00
lennard 4b85ed8223
Cache all saves in a dict in api_results
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 19:15:32 +02:00
lennard 70960c73c4
Some ui improvements for cloud saves
- Show text on widget if save is not up-to-date
- Fix text in game info -> cloud saves

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 18:54:27 +02:00
lennard 189167f4f7
Add upload and download function to RareGame
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 18:34:26 +02:00
lennard a66600efa3
Move cloud save ui to a new tab in game_info
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 17:46:26 +02:00
loathingKernel 92346e11d0
OriginWineWorker: Execute during launch and properly resolve paths for Wine 2023-03-07 23:43:42 +02:00
lennard d399382afd
Fix origin stuff on windows
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:23 +02:00
lennard efc07e4645
Add install size for origin games and move it to thread on windows
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:23 +02:00
lennard 32de2c21a1
Move registry reader for origin games to a worker
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
lennard eec3dfeb1e
Fix some rebase errors
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
lennard 1938bd7084
Fix is_foreign()
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
lennard 2258d87c83
Cache registry files for performance
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
lennard 1ac1fd89f8
Show install path for origin games in game info
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
lennard b926dd112c
Enable origin install check on linux and add some performance improvements for linux
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:21 +02:00
lennard 9733e119c9
Show install path for origin games in game info
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:21 +02:00
loathingKernel 91a7247573
RareCore: Remove Win32Worker and MacOSWorker
They weren't required as the asset information are already fetched in
`GamesWorker`. They were a remnants of `ApiResults`.
2023-03-07 17:11:21 +02:00
loathingKernel 5748d0e6ee
RareCore: Manage initialization in RareCore instead of LaunchDialog
This is the last change of the `backend_refactor` branch. This makes
`RareCore` the centerpiece of Rare by moving initialization before the UI
is brought up. RareCore is now in control of creating and querying `RareGame`
objects, re-introducing the ability (incomplete) to refresh the games library.
As a result, ApiResults has been removed.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:21 +02:00
loathingKernel 9d4e0995fd
RareAppException: Create exception handler that can show a dialog
The reason is that `sys.excepthook` is a global attribute which we
have to unset for threads because we show a Qt dialog in it and we
can't do that from threads. Before this change, we used to unset
it in threads, but since it is a global attr, that was unsetting it
for the whole application. We cannot reliably reset it because we
can have multiple threads executing and there will be race conditions.

To fix this situation, `RareAppException` implements a callback to
be patched into `sys.excepthook` which emits a signal to be serviced
by the the `RareAppException` instance in the main thread.
`RareAppException` can be subclassed to implement the
`RareAppException._handler` method for domain specific handling.

The `RareApp` base class instantiates its own `RareAppException`
instance for early basic handling. `RareAppException` is subclassed
into `RareException` and `RareLauncherExcpetion` in `Rare` and `RareLauncher`
respectively to implement the aforemention domain specific handling.
Each of these classes deletes the previous instance and replace it
with their specialized handlers.
2023-03-07 17:11:21 +02:00
loathingKernel dea01ae24b
RareGame: Origin games should be able to launch despite not being installed 2023-03-07 17:11:20 +02:00
loathingKernel 786fa2c59f
WaitingSpinner: center contents 2023-03-06 00:39:23 +02:00
loathingKernel e55c40448c
Misc: rename get_size to format_size 2023-03-06 00:39:23 +02:00
loathingKernel 958de1b3b5
Console: handle Esc key through closeEvent() 2023-03-06 00:39:23 +02:00
loathingKernel ca9bf7c1e8 StaticStylesheet: Share common properties by setting common object names 2023-03-03 16:51:26 +02:00
loathingKernel 76a616615b Resources: Move some more stylesheets into the static CSS 2023-03-03 14:16:04 +02:00
loathingKernel 372b276157 [Icon/List]Widget: Disable focus on buttons
When the button gets clicked on, it receives keyboard focus. Disabling the button
afterwards leads to `focusNextChild` getting called. This makes the scrollarea
trying to ensure that `nextChild` is visible, essentially scrolling to a random widget
2023-03-02 19:57:31 +02:00
loathingKernel 1dd8856a29 Resources: Add static stylesheet for widgets that need special handling irregardless of theme
The static stylesheet properties are always applied. If there is a theme
stylesheet to be applied, they are appended in the end of the theme
stylesheet.

This removes stylesheet properties from the library widgets, some special
buttons and the queue worker labels.

To update the static stylesheet first edit `rare/resources/static_css/stylesheet.py`
and then execute it as a script.
2023-03-02 15:36:45 +02:00
loathingKernel 46664f3577 Fix a few minor errors 2023-03-02 01:05:53 +02:00
loathingKernel 0e161eb4d2 Use Worker base class for runnables in legendary settings and ubisoft widget.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-27 23:49:44 +02:00
loathingKernel 1842ec138e App: Rename rare_core attr to rcore
Makes it equal to the rest of the application

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-27 23:47:24 +02:00
loathingKernel ecee2e24e5 QueueInfoWidget: Set ellipsis text even without an old InstalledGame 2023-02-22 21:43:00 +02:00
loathingKernel 5ba368a5bf SideTabContainer: Use a signal to update the title instead of monkeypatching setTitle method into the widget
Widgets that need to implement a title should be of a dual subclass
of any `QWidget` subclass and the `SideTabContents` class which provides
the signal.
2023-02-21 15:27:52 +02:00
loathingKernel a3d09ae288 Code cleanup: Use pass instead of ellipsis (...) for abstractmethods
Fix a few other issues pointed out by MultisampledNight

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-20 15:31:04 +02:00
loathingKernel 7a04f7b5be DownloadsTab: Replace n/a with ellipsis 2023-02-20 14:58:22 +02:00
loathingKernel 00a0b36e75 LaunchDialog: better layout name 2023-02-20 14:58:01 +02:00
loathingKernel c2da5bceb8 QueueWidgets: Re-text Update now to Download now
Also rename the widget classes and files for clarity
2023-02-20 14:52:45 +02:00
loathingKernel 3e827f4ece ElideLabel: Enable word-wrapping for elided labels.
Word wrapping allows ElideLabel to resize first inside flexible sized
areas such as the contents widget of a scrollarea. This allows the contents
widget to properly resize itself to avoid horizontal scrolling.

Word-wrapping also enables the widget to resize vertically. To avoid that
ElideLabel is set to a fixed height based on font metrics. An overloaded
method `setFixedHeight` has been added to disable it when desired.

EglSyncGroup: Replace estimated path label with a ElideLabel because
the displayed message was expanding the scrollarea.
2023-02-20 14:26:14 +02:00
loathingKernel 76068014b8 Misc: Remove connectSlotByName() in single file invocation 2023-02-20 14:16:45 +02:00
Stelios Tsampas 05e538ca5c
Update rare/components/tabs/downloads/groups.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:32:48 +02:00
Stelios Tsampas ca3a2893f9
Update rare/components/tabs/downloads/__init__.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:32:28 +02:00
Stelios Tsampas e748468078
Update rare/components/tabs/games/game_info/move_game.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:31:03 +02:00