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

1539 commits

Author SHA1 Message Date
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
loathingKernel 9e077f74ed Stylesheets: Refactor css widget selectors based on objectName()
The `objectName()` of onstall and uninstall buttons should be set
to `InstallButton` and `UninstallButton` respectively for them to
pick up their special CSS properties.

Make QToolBox tab text bold

Clean-up deprecated widget object names in the CSS
2023-02-04 17:38:07 +02:00
loathingKernel 020d225f97 InstallDialog: Make as modal when not silent to block input 2023-02-04 17:38:07 +02:00
loathingKernel c523fa9210 UpdateGroup: Keep updates' app_names in a list too.
Because `deleteLater()` doesn't delete the widget immediately (duh!)
`count()` and `contains()` can report false results while the widget
is queued for deletion.

Hide container and list/queue by name mangling.

Remove test code.
2023-02-04 17:38:07 +02:00
loathingKernel 65c56bd366 ImportGroup: Handle each imported game as soon as it ready
Emit and handle the each imported game with the progress signal.
The result signal still handles showing the summary of the
process to the user
2023-02-04 17:38:07 +02:00
loathingKernel 1959516b3f GameWidget: Toggle buttons on widget update
ElidedLabel: Use `sizeHint()` for width

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel fc7e45a43a UninstallDialog: Implement it to work similarly to InstallDialog
Similarly to the installation procedure, when an uninstall is
requested, an `UninstallOptionsModel` is emitted by the `RareGame`.
`DownloadsTab` handles the signal and spawns the `UninstallDialog`.
After the `UninstallDialog` is closed, a worker thread handles
uninstalling the application to avoid UI lock-ups when a large
number of files is deleted.

Allows for uninstall actions to be spawned from anything having
access to the `RareGame` instance.

LaunchDialog: Don't check health on DLCs, they always will require
verification if they don't specify an executable.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel b02483eb80 GameInfo: Refactor the move game stack to re-use the existing widgets
instead of adding them again to the layout. Move game should still
switch to RareGame, similar to the way it works for verifing.

Also add non-functional "Import Game" button
2023-02-04 17:38:07 +02:00
loathingKernel 915c41309d GameWidgets: Remove GameUtils from GameWidgets
Also remove attributes tracking the state of each application, those
are handled by `RareGame`

Temporarily disable save syncing related code, pending the move to
the game launcher process
2023-02-04 17:38:07 +02:00
loathingKernel b9e9ed8088 EnvVars: Use monospace fonts for keys and values 2023-02-04 17:38:07 +02:00
loathingKernel 620e8f721c ImportGroup: Adjust for RareGame 2023-02-04 17:38:07 +02:00
loathingKernel 56876227dd GameInfo: Move uninstall_game from GameUtils to GameInfo
When `Uninstall` is used from the widgets, it will take the user to
the `GameInfo` page similar to how `Install` works.

`GameInfo` is not connected to the `RareGame` instance's `installed`
and `uninstalled` signals to refresh the contents of the page based
on the related functionality.
2023-02-04 17:38:07 +02:00
loathingKernel 95df85419b GameLaunchHelper: Enumerate valid actions and states from 1 instead of 0
Fixes potential boolean checks on the relevant attributes
2023-02-04 17:38:07 +02:00
loathingKernel 6ccbeb12dc DownloadsTab: Use elided text from version numbers 2023-02-04 17:38:07 +02:00
loathingKernel 91ef4ca944 LaunchDialog: Do case-insensitive search for the games executable 2023-02-04 17:38:07 +02:00
loathingKernel 4063195b4d DownloadsTab: Refactor downloads tab
When updates are queued, they are removed from the update's list. An exceptions is made
when the queued item comes from repairing (without updating), in which case the update is
disabled for the runtime.

A queued item can be either removed (if it is an update it will be added back to the
updates groups) or forced to be updated now. If a queued item is forced, the currently
running item will be added to the front of the queue. Downloads will be queued if
there is no active download but there is a queue already.

The download thread is now responsible for emitting the progress to `RareGame`

InstallDialog: Pass `RareGame` and `InstallOptionsModel` only as arguments.
The `update`, `repair` and `silent` arguments are already part of `InstallOptionsModel`
`RareGame` is used to query information about the game.

InstallInfoWorker: Pass only `InstallOptionsModel` as argument
Emit `InstallQueueItemModel` as result, to re-use the worker when queuing stopped games

RareGame: Query and store metadata property about entitlement grant date
RareGame: Add `RareEosOverlay` class that imitates `RareGame` to handle the overlay

LibraryWidgetController: Remove dead signal routing code, these signals are handled by `RareGame`
Directly parent library widgets instead of reparenting them

GameWidgets: Remove unused signals

EOSGroup: Set install location based on preferences and use EOSOverlayApp from legendary

GamesTab: Connect the `progress` signals of dlcs to the base game's signals
GamesTab: Remove dead code

GlobalSignals: Remove `ProgresSignals`

RareCore: Mangle internal signleton's names

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel 1470aa9eb3 DownloadsTab: Add UI files for new widgets 2023-02-04 17:38:07 +02:00
loathingKernel d3bee28443 Ui: Delete QtCore.QMetaObject.connectSlotsByName from UI python files
Since pyuic5 doesn't handle `connectSlotByName=False` in ui files
use sed in `misc/ui2py.sh` to remove those lines

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel 8004230e19 GameProcess: Use legendary's Game instead of RareGame as it isn't necessary
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel 1e1a3c01dc LibraryLayout: Add reverse keyword to sort()
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel 8dd58dc5e9 EGLSync: Subclass EGLSyncListGroup and EGLSyncListItem
Subclass `EGLSyncListGroup` and `EGLSyncListItem` into import/export
specific classes. This way we don't have to specify the type of
operation at instatiation and improves code clarity and intention.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel 0d4b75d399 GameProcess: Make it a persistent member of RareGame
The `GameProcess` class now acts as a persistent member of `RareGame`
that can be re-used for launching games. Its signals are handled and
repeated by `RareGame`.

Implements launching directly into `RareGame`

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00