1
0
Fork 0
mirror of synced 2024-06-03 03:04:42 +12:00
Commit graph

1610 commits

Author SHA1 Message Date
loathingKernel c0d9e5c845 ImageSize.Preset: Add equality test 2023-02-08 17:09:24 +02:00
loathingKernel 31757840f0 Paths: Use common dictionary for suffixes 2023-02-08 16:47:46 +02:00
loathingKernel 71aa440e0b GameWidget: Use __slots__ to satisfy forward ui declaration
This way `ui` won't get any typing but this is internal and we can
take care of it until a better method is found to satisfy both.
2023-02-08 15:14:50 +02:00
loathingKernel f2490f065b RareGame: Create common base class for RareGame and RareEosOverlay.
It contains some common methods as well as the `State` enumeration
and the `Signals` class.
2023-02-08 15:13:02 +02:00
loathingKernel b36dfdd2c6 ImageManager: Generate shortcut icons when fetching cover images. 2023-02-08 15:08:55 +02:00
loathingKernel 97adb6e1c2 UninstallWorker: Use new shortcut functions to delete shortcuts in uninstall_game 2023-02-08 01:50:00 +02:00
loathingKernel 359157fac3 RareGame: Add property to get the unprocessed save path 2023-02-07 16:02:04 +02:00
loathingKernel 1721677e33 GameWidget: Implement reactive and interactive labels
The `status_label` displays what is currently going on with the game.
It reflects the current operation running on it or if it requires special
attention (update, needs verification etc)

The `tooltip_label` displays hover information such as what happens
if a part of the widget is clicked or in the case of the launch button if
the game can run (without version check, offline etc)

The context menu on the widgets will be updated and populated according
to the installation state of the game. Since the context menu was revised
the shortcut creation code was revised too to make it more compact.

the `create_desktop_link` and `get_rare_executable` functions are moved
from `rare.utils.misc` to `rare.utils.paths` to avoid cyclical imports and
better grouping. Two functions are added, `desktop_link_path` to uniformly
calculate the path of the shortcut and `desktop_links_supported` which
checks if Rare supports creating shortcuts on the current platform.
`desktop_links_supported` should be used as safeguard before `desktop_link_path`.

Desktop links are currently untested on Windows but if `shortcut.Description`
works as expected, it should be good to go.
2023-02-07 13:41:59 +02:00
loathingKernel 2903c19667 Code cleanup 2023-02-07 13:06:08 +02:00
loathingKernel 34a13ea3b2 ApiResults: Mirror the way RareCore from refactor_backend handles non asset items
`LegendaryCore.get_non_asset_library_items()` returns the same tuple
for `game_list, dlc_dict` as for regular games with assets, so
keep the result for API completeness, since `RareGame` can handle those
games properly.
2023-02-07 13:04:33 +02:00
loathingKernel c83ee69914 GamesTab: Populate RareGame.saves at creation based on ApiResults
Remove unused attributes and clean layout code.
2023-02-06 09:45:30 +02:00
loathingKernel 59f5370bef LaunchDialog: Retrieve entitlements in a worker 2023-02-06 09:20:25 +02:00
loathingKernel 211f92d2d6 MainTabWidget: Use returned indices instead of hard-coding disabled tabs
Parent the tabs properly for consistency
2023-02-06 09:19:31 +02:00
loathingKernel 34839d469e Update/QueueGroups: Initialize with hidden container. 2023-02-05 19:41:08 +02:00
loathingKernel 15b80ce72f GamesTab: Move installed and uninstalled signal connection inside LibraryController 2023-02-05 19:14:51 +02:00
loathingKernel ac4060d804 RareGame: Set state before emitting the widget.update signal 2023-02-05 19:13:38 +02:00
loathingKernel 1bbba07c24 RareCore: Mangle _instance class attribute 2023-02-05 19:12:50 +02:00
loathingKernel f9b5385513 DownloadsTab: Paint the background of the active download stats with the image of the game
The Qt Designer UI file for the downloads tab was removed since
the tab is simple enough to be implemented in code now.
2023-02-05 19:12:14 +02:00
loathingKernel 6ee6ce5255 UI: Remove unused store UI files 2023-02-05 19:00:01 +02:00
loathingKernel c0b98978f1 QueueGroup: Also update movement arrows when a widget is deleted 2023-02-04 17:38:07 +02:00
loathingKernel f2745a9551 RareGame: Disable erroneous pylint errors 2023-02-04 17:38:07 +02:00
loathingKernel 09b909cc32 MoveWorker: Fix Undefined variable 'logger' 2023-02-04 17:38:07 +02:00
loathingKernel a46413c8a9 Workflows: Don't force astroid version 2023-02-04 17:38:07 +02:00
loathingKernel b2b3598a0b MainWindow: Add worker queue to the statusbar 2023-02-04 17:38:07 +02:00
loathingKernel 6b3a841378 Refine QueueWorker and implement worker_info for VerifyWorker and MoveWorker 2023-02-04 17:38:07 +02:00
loathingKernel 38710a0af1 DownloadsTab: Use is_idle 2023-02-04 17:38:07 +02:00
loathingKernel 6800b7e9ab Workers: Implement wrapper QueueWorker class prototype for queueable workers
RareCore: Impelement base worker queue
2023-02-04 17:38:07 +02:00
loathingKernel 07ef43b13e Workers: Use a wrapper class that deletes the signals QObject before exiting 2023-02-04 17:38:07 +02:00
loathingKernel 28e68cad97 MoveWorker: Move worker into rare/shared/workers 2023-02-04 17:38:07 +02:00
loathingKernel f0b81c7038 RareGame: Add state property and emit the widget.update signal on change 2023-02-04 17:38:07 +02:00
loathingKernel 683b33da10 DownloadsTab: Refuse to start download if the game's state is not idle 2023-02-04 17:38:07 +02:00
loathingKernel e7a47a48e1 Add typing to the custom layouts and fix stacked widet page naming 2023-02-04 17:38:07 +02:00
loathingKernel 25def92a41 TabWidget: Don' add store and download shortcuts when offline 2023-02-04 17:38:07 +02:00
loathingKernel f80c628995 ImageWidget: Clear widget if a null pixmap is set 2023-02-04 17:38:07 +02:00
loathingKernel a8bc418e42 Reference tabs by their returned indices instead of hardcoded numbers 2023-02-04 17:38:07 +02:00
loathingKernel 96c833be64 GameInfo: Fix list to boolean conversion
SideTabBar: Add padding option
2023-02-04 17:38:07 +02:00
loathingKernel ac1bda2cb9 ImageSize: Add wide 16/9 size preset 2023-02-04 17:38:07 +02:00
loathingKernel de273cbe20 WrapperSettings: Move class variables into instance variables 2023-02-04 17:38:07 +02:00
loathingKernel 406c018f29 GameInfo: Enable DLC tab only when the game is installed 2023-02-04 17:38:07 +02:00
loathingKernel 5752fefb77 RareStyle: Add border around install/uninstall buttons 2023-02-04 17:38:07 +02:00
loathingKernel 2ef70b8eb4 InstallQueueItemModel: Refactor to add an expiration date to the download
While not sure if it is required, add an expiration date to the prepared
download 30 minutes after it was prepared. If a download has been in the
queue for more than 30 minutes, the download will be prepared again silently
before starting.

Return only the `InstallOptionsModel` in the result of the download thread
to avoid the potential mistake of re-using it. This required for the tray
notification signal to operate on the `app_name` instead of the `app_title`.
As a result, the notification slot was moved into the TrayIcon class for
better encapsulation.
2023-02-04 17:38:07 +02:00
loathingKernel 90021e34f2 RareGame: Add enqueue and dequeue signals
They are used to insert and remove updates from downloads when
the installation of a game changes through `RareGame.set_installed`.
They piggy-back the signals with the same names in `GlobalSignals`

When importing a game from EGL, also check
2023-02-04 17:38:07 +02:00
loathingKernel 523391d166 QueueWidget: Prepare requeued downloads after adding it.
By preparing the download inside the widget, the delay after stopping
the running download and visual feedback of adding the widget is
reduced. The widget will now appear containing the basic information
and will be populated with the information about the download
when it is ready. The widget is disabled in the meantime.

Move `InstallInfoWorker` to `rare.shared.workers` module and
revert it to emitting a `InstallDownloadItem` model only
instead of a `InstallQueueItemModel.`
2023-02-04 17:38:07 +02:00
loathingKernel 0830c17ee5 ImportGroup: Add progress reporting in the form 2023-02-04 17:38:07 +02:00
loathingKernel a96a51f110 DowloadsTab: Emit a signal from each group on widget deletion to avoid counting to-be-deleted widgets 2023-02-04 17:38:07 +02:00
loathingKernel c219f347d1 ImportGroup: Fix missing text due to ElideLabel change 2023-02-04 17:38:07 +02:00
loathingKernel 304ad0388e GameDlc: Re-write the form to use a QToolBox instead of two separate QGroupBoxes.
By using a QToolBox, we can better utilize the available space for
long lists of DLCs. `GameDlcWidget` is now responsible for handling
installing and uninstalling the DLC based on RareGame's functionality.

Since `GameUtils` is not used for uninstalling any more, remove it the
arguments of `GameInfoTabs` completely.
2023-02-04 17:38:07 +02:00
loathingKernel 84694a68a8 UpdateGroup/QueueGroup: Use the QObject's destroyed signal to toggle visibility of labels and containers
The widgets are not destroyed immediately so toggling based on
counting children in containers didn't work while in the same function.
Using the `destroyed` signal makes it clear when the change should happen.
2023-02-04 17:38:07 +02:00
loathingKernel cf5332004a Add name inference based on type in widget_object_name 2023-02-04 17:38:07 +02:00
loathingKernel a26b977bda Fix a few issues around refactoring the stylesheets.
Properly set object names for install and uninstall buttons in dialogs
Change margins on widgets that are put into scrollareas
Add top margin only on checkable QGroupBox
Remove padding from QToolBox
2023-02-04 17:38:07 +02:00