Commit graph

8276 commits

Author SHA1 Message Date
Daniel Johnson 4146dedc94 Make sure there's error handling for all the signal handler functions.
Also, a few pylintisms.
2023-01-03 15:57:14 -08:00
Daniel Johnson 799b509b93 No, I should have used dict.copy() 2023-01-03 15:57:14 -08:00
Daniel Johnson ef3e353881 Safer InstallerFile wrangling
Since we can back through the install window, we may need to generate
the files twice.

So, instead of updating them in place we
build a list of copies of the objects.
2023-01-03 15:57:14 -08:00
Daniel Johnson 1136b3eff0 Defer creating the game directory until the intall starts
This means the 'Abort' button show up only once you click 'Install';
all changes prior to that are non-revertable anyway.

Also, tweak the handling of the CWD to be more conservative.
It's been crashing my debugger.
2023-01-03 15:57:14 -08:00
Daniel Johnson 080109a54b More blue install buttons! My crayons cannot be denied! 2023-01-03 15:57:14 -08:00
Daniel Johnson 801014b02b Beef up error handling further
Use @watch_errors() to pass exception to the delegate.

Also- when an error occurs with the log visible,
we'll leave the log visible for review.
2023-01-03 15:57:14 -08:00
Daniel Johnson 28a4f8650f Rework close button
So we do the same stuff if you click close or cancel or abort, close the window or hit <escape>.

There's only one close button, but we change the label and tooltip
depending on whether the install has started.

During the install, we call this "Abort" now and light it up in red.
At the end it becomes "Close".
And it is "Cancel" when you have not yet started the install.
2023-01-03 15:57:14 -08:00
Daniel Johnson 6bad131836 Comment;s; beef up error handling for callbacks.
If a callback does not continue execution, it should throw so the installation
does not appear to stall.
2023-01-03 15:57:14 -08:00
Daniel Johnson ccdd5d383c Fixes for the ask-for-disc page 2023-01-03 15:57:14 -08:00
Daniel Johnson 4aad54b6a1 Harden the LutrisInstaller against re-use after an error occurs. 2023-01-03 15:57:14 -08:00
Daniel Johnson dd9a161b90 Style the "Continue" button with 'suggested-action' 2023-01-03 15:57:14 -08:00
Daniel Johnson cde5d876f1 Comments about the button methods 2023-01-03 15:57:14 -08:00
Daniel Johnson 086095eefd Add UI delegate for the script interpreter.
Also fix installation strictly out of cache
2023-01-03 15:57:14 -08:00
Daniel Johnson bf542e9ee0 No cancelling during the pre-initialization!
If you try to click cancel, the click does not go through until the
button has been replaced with 'Continue'. Not cool!
2023-01-03 15:57:14 -08:00
Daniel Johnson bd0ec63a78 Remove 'jump' transition animations
They don't display reliably since Lutris isn't always asynchronous.

We'll animate only for 'Continue' and 'Back' actions.
2023-01-03 15:57:14 -08:00
Daniel Johnson 7c30fd082b Enable the Cancel button most of the time, and correct back button logic some more. 2023-01-03 15:57:14 -08:00
Daniel Johnson 2757d70efe Remove direct button access from the interpreter
The InstallerWindow should handle its buttons.
2023-01-03 15:57:14 -08:00
Daniel Johnson dd01483a3e Replace navigation_reset()
This save/restore page stuff should work for things like the eject page.
2023-01-03 15:57:14 -08:00
Daniel Johnson 3afabd5f3f A bunch of comments on the pages 2023-01-03 15:57:14 -08:00
Daniel Johnson 19523722d0 Correct signal handler name
It's the handler for the Close button, not a destroy event.
2023-01-03 15:57:14 -08:00
Daniel Johnson 24a9f68d99 Remove 'Launch' button
Instead, use the 'Continue' button but with a custom label.
2023-01-03 15:57:14 -08:00
Daniel Johnson ea34f5975b Missed one more signal handler! 2023-01-03 15:57:14 -08:00
Daniel Johnson cc65f0b8f6 Don't show the cancel-confirm dialog until we actually start doing some installation.
This actually happens when exiting the 'location' page;
at this point the game directory is created.
2023-01-03 15:57:14 -08:00
Daniel Johnson 84f6809419 Simplify the action button creation code.
We don't need nested boxes here.
2023-01-03 15:57:14 -08:00
Daniel Johnson a431569174 Use the base clas 'action_buttons' so we don't have two of them
This way we avoid a bit of extra spacing at the bottom
2023-01-03 15:57:14 -08:00
Daniel Johnson f89fc95da9 Much the commenting! 2023-01-03 15:57:14 -08:00
Daniel Johnson 3198df33e4 Fix back button availability when there are no extras. 2023-01-03 15:57:14 -08:00
Daniel Johnson 24934f53b3 Reduce use of big lambdas; fix error handling bugs. 2023-01-03 15:57:14 -08:00
Daniel Johnson af39cca02d Add more relevant status messages 2023-01-03 15:57:14 -08:00
Daniel Johnson 6269edd0ee Consolidate page load methods, use consistent naming 2023-01-03 15:57:14 -08:00
Daniel Johnson 6ace32b701 Remove 'Install' button- just use 'Continue' for everything, but change the label sometimes. 2023-01-03 15:57:14 -08:00
Daniel Johnson 5e5e4e68a1 Make sure 'Back' is disabled when you are looking at install progress. 2023-01-03 15:57:14 -08:00
Daniel Johnson 13e538c1b7 Missed a view functions!
Also, try to debug the back button a bit
2023-01-03 15:57:14 -08:00
Daniel Johnson f1821aef8d Re-organize InstallerWindow
Group the code by the page that it implements
2023-01-03 15:57:14 -08:00
Daniel Johnson 6f32a8b8ae Separate out page creation functions
It's unsafe to capture parameters into these, so separating them
will discourage that usage.
2023-01-03 15:57:14 -08:00
Daniel Johnson f853fd8c91 Split out a separate 'downloading' page,
using the same actual InstallerFilesBox as before.

This way we only stop downloads if we have tried to start them,
2023-01-03 15:57:14 -08:00
Daniel Johnson a7a7e1f8d8 Consistent naming is important!
The present_X_page methods are just the ones that are given to the stack
to change the current page.
2023-01-03 15:57:14 -08:00
Daniel Johnson d698c81dd9 When you back out of the file download page, this stops the downloads at once. 2023-01-03 15:57:14 -08:00
Daniel Johnson 1a5f575acf Tighten up the 'back' logic
In particular, going back to the file downloads is okay; they do not
redownload unless you go back one further than that.
2023-01-03 15:57:14 -08:00
Daniel Johnson ee9c8d1e6b First attempt a a 'Back' button
This keeps a stack of previously visited 'presenters' which are functions
to call to present a page.
2023-01-03 15:57:14 -08:00
Daniel Johnson bd0c1a75f9 Separate out page presentation from page init
Also, move it to the bottom and sort by the order-of-execution.
2023-01-03 15:57:14 -08:00
Daniel Johnson dadd8a9e8f Resolve pylint complaints
We'll pre-create some controls so those fields are consistently available.
2023-01-03 15:57:14 -08:00
Daniel Johnson 923256e14b Try to keep the status and log straight as they are updated by the installation 2023-01-03 15:57:14 -08:00
Daniel Johnson 1b0f2d5a9d Consolidate button visibilty code too 2023-01-03 15:57:14 -08:00
Daniel Johnson 80dd3e6aaa Tidy up some implementation and impost consistent method names for presenting pages. 2023-01-03 15:57:14 -08:00
Daniel Johnson dd6abfb70f Slap a GtkStack into the installer window with duct tape. 2023-01-03 15:57:14 -08:00
Rob Loach a40d5d7300 Remove ResidualVM, as it was merged into ScummVM
We no longer need ResidualVM as it was merged into ScummVM.
2023-01-03 15:22:25 -08:00
Mathieu Comandon 2ae94812dc Add option to force updates 2023-01-03 12:44:41 -08:00
Unrud fbbbf47a4f Search devices recursively 2023-01-03 14:12:25 +01:00
Unrud 5e5ce006d6 Use mount points provided by lsblk 2023-01-03 14:12:22 +01:00