is unavailable (for example running in a gamescope session)
* Do not show the launch window while instantiating the application. This
probably was causing numerous issues because it was running outside of
the applications event loop. This also fixes the exit button on the login
dialog requiring `sys.exit()` to quit Rare. Now it goes through the
proper cleanup procedures.
* Make slot and signal names more uniform
* Fix a problem with RareCore connecting RareGames to the same signals
multiple times when the library was refreshed.
* Uninstalling the Overlay now goes through the same procedure as
uninstalling any other game.
* The available prefixes are now listed instead of hiding them inside
a combo box.
* Each listing works indepedently to enable/disable the Overlay for the prefix
After the PathEdit change that stopped it from emitting the
textChanged signal when instatiated, the available space
calculation wouldn't take place, so do it when the dialog
becomes visible.
This allows to complete from relative paths, such use exe override
Fix constructor argument names to follow Qt's types.
Set the same filters as the dialog for the completer.
Use the completer's icon provider for the dialog.
Force Rare to use Qt's file dialog instead of the native one.
This specifically helps with games that have selectable downloads.
If we import a game with SDLs without any `install_tags` in the config
we will verify against the full game, meaning that files missing will
cause the verification to fail despite the game being correct. Since the
game is correct, resolving the download will result in a 0 size update.
This change will allow the InstallDialog to finish through the Install
button successfully despite having nothing to install.
On the `lgndr` side things are more complicated. Due to minor oversights
in legendary, the `install_tags` in the above example wouldn't be written
to the configuration file, causing a verification loop because the file
list wouldn't be filtered. To fix that, we also save legendary's config
file at the end of cleaning after a 0 size download.
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>
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.
Execute the edit callback function in a thread. By executing it in a thread
we don't have to wait for longer validation procedures to finish to
continue updating the UI. This is most notable in the MoveGamePopUp
which is heavy on disk IO.
Because we cannot use special text formatting in a thread, the
indicator messages have been reworked while also becoming extensible.
A dictionary of extended reasons can be specified through the
`IndicatorLineEdit.extend_reasons()` method.
The dictionary has to follow the following format
```
python
{
MyIndicatorReasons.REASON: self.tr("Reason message")
MyIndicatorReasons.OTHER_REASON: self.tr("Other reason message")
}
```
In the above example `MyIndicatorReasons` is a subclass of `IndicatorReasons`
which should be specified as follows
```
python
MyIndicatorReasons(IndicatorReasons):
REASON = auto()
OTHER_REASON = auto()
```
There are DLCs (for example KingletAztec) which are essentially
entitlements, a single file the allows access to already downloaded
content. Updates for such DLCs only change the metadata version number
without any actual new data. These DLCs are handled correctly by the
DLM, but our dialog would refuse to allow installing them due to 0 download
size. This change allows them to pass through the InstallDialog.
The other issue, which I don't know if it was only a result of our faulty
validation at startup or could occur in legendary too, is that a DLC might
be marked with needing verification. Currently we don't have a way of
verifying DLCs, so when verifying the game, we will also set the same
state for any installed DLCs. In effect verifying the game successfully
will also mark any DLCs as correct.
`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.
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.`
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
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>
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>
Removed `rare.utils.legendary_utils`, the `uninstall_game` function
was moved to `rare.shared.game_utils` for now
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
This change makes it more inline with how QScrollArea operates on a central widget.
Other changes include using a QFrame instead of a QWidget as a base and
adding a QLabel for the title instead of the horizontal line.
The advanced options were split into their own separate widget. Right now
their class operates only as a container with the logic remaining in the
InstallDialog.
Do not hide irrelevant options, show them as disabled instea.
This like the install directory are still informational despite
not being editable.
Also homogenize variable and widget naming.