1
0
Fork 0
mirror of synced 2024-06-26 18:20:50 +12:00
Commit graph

66 commits

Author SHA1 Message Date
loathingKernel 97def45a7e Cleanup: Remove some unused imports 2023-02-18 17:27:18 +02:00
loathingKernel e9cbdb22bc RareCore: add dequeue_worker() method to RareCore
It will "properly" remove a worker and update the connected widgets.
2023-02-16 17:07:02 +02:00
loathingKernel b405ff615e RareCore: Return a list instead of an iterator to freely use remove() 2023-02-16 16:42:32 +02:00
loathingKernel e40cfaafac MainWindow: Implement worker queue in status bar
The active workers are placed in a static container on the left side.
The queued workers are placed in a scrollarea on the right side of the
status bar. The scrollbars are disabled but dragging works.

Exiting with active workers will pop up a message for confirmation. Rare
will clean the queued workers but the active ones will be waited on until
they finish.
2023-02-16 10:52:13 +02:00
loathingKernel abba86e10b RareGame: Create intermediate class RareGameSlim between RareGameBase and RareGame
The `RareGameSlim` class is useful mostly in the Launcher as it doesn't
depend on `ImageManager`. I should hold anything required by the Launcher.
2023-02-09 01:37:53 +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 1bbba07c24 RareCore: Mangle _instance class attribute 2023-02-05 19:12:50 +02:00
loathingKernel 6b3a841378 Refine QueueWorker and implement worker_info for VerifyWorker and MoveWorker 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 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 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 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 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
loathingKernel 599db2629f TrayIcon: Update the list of recent games after a game has exited
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel ab596139af RareCore: Add RareGames to a data structure in RareCore
This merges a few of the internal features of RareCore such us
RareGame filtering and thus game grouping based on attributes.

This is required to properly connect a single signal from RareCore to
the downloads tab for game installation. This also includes filtering
games based on updates and other attributes.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 1ebd0b18d8 Introduce a very basic RareCore to handle signletons and their cleanup. 2022-09-04 20:39:03 +03:00