InstallDialog uses that property so RareEosOverlay should have it too.
Also calculate the base_path for the overlay case instead of passing it as
argument
* 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
Because there are two dialogs for editing optional downloads, refactor
the separate implementations to select them into a common reusable widget
and use it in SelectiveDialog and InstallDialog.
To keep dialogs in a common format and allow them to share the same
properties, three classes of dialogs have been implemented inheriting from
each other.
The classes are `BaseDialog` -> `ButtonDialog` -> `ActionDialog`
* Basedialog: is the basis of all dialogs and is responsible for
rejecting close requests from the window manager and the keyboard.
It also restricts access to `exec()` and `exec_()` because they are harmful.
It serves as the basis of Launch and Login dialogs
* ButtonDialog: is offering buttons for accepting or rejecting the presented
option. It implements its own buttons and exposes abstract methods to
implement handling in them. It restricts access to `close()` because these
dialogs should always product a result.
It is the basis of Uninstall, Selective dialogs.
* ActionDialog: in addition to the ButtonDialog, it offers an action buttom
with to validate the form or to make the dialog unable to close. It serves
as the basis of Install and Move dialogs.
This property reports the default platform to use for a game based
on legendary's configuration and if they platform is available in the
game's assets.
Using that property we can make better choices on what platform to operate
on without user intervention. Currently we use it to infer the platform
in when installing, importing, and calculating game versions.
* Infer the displayed to reflect where the affected directory is
If base_path is set outside of InstallDialog, display that.
If the game is already installed, show the installation directory
If neither of the above is true, use legendary's inference based on
the default platform if the game supports it. Fallback to Windows.
* Disable irrelevant and potentially harmful options when the game is
already installed, such as the installation path, the platform selection
and creating a shortcut.
* Infer the correct platform based on the existing installation. If it
is not installed, use the default platform if the game supports it and
fallback to windows.
* Move the horrible lambda used to populate the error box when the
platform was unsupported into a separate method.
* Properly find row to insert sid_edit into
* Use lazy evaluation for logging
* Clean the login forms by using separate layouts for the interactive fields
The forms were updated to be more informative and easier to read.
NOTE: The reason the form is bigger than the contents is because the
QLabels have word-wrapping enabled and as such they substitute width
for height (`hasHeightforWidth`)
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.
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.