minigalaxy icon indicating copy to clipboard operation
minigalaxy copied to clipboard

Show loading screen on startup

Open orende opened this issue 1 year ago • 5 comments

Description

Adds a loading screen (splash screen) that is shown during application startup so that the application does not appear unresponsive if e.g. the network is slow. I moved most of the heavy initialization work from the Window class constructor to the library.initialize() method. In order to get the splash screen to work, some changes to initialization order had to be done in the minigalaxy file, and the initialization in the Library class had to be moved to a thread so that the GTK initialization was not blocked.

Additionally, the related unit tests were updated, an AI-generated splash screen image was added and two additional useless game ids were added to the constants.py file.

This PR solves #575 .

Checklist

  • [x] CHANGELOG.md was updated (format: - Change made (thanks to github_username))

orende avatar Sep 07 '23 08:09 orende

I was testing this on Ubuntu 22.04. Just so you know. When I tested this on Debian earlier, it was working. It's a bit odd.

sharkwouter avatar Oct 05 '23 09:10 sharkwouter

Sorry it took this long to review this. I really appreciate the work! Thanks!

sharkwouter avatar Oct 05 '23 09:10 sharkwouter

Thanks for the review! I suspect there could be a race condition where the GTK work is sometimes done on the main thread (and working as expected) and sometimes done on a separate thread (and crashing). I will do another pass through the code and use GTK.idle_add where necessary.

I will also replace the image.

On Thu, 5 Oct 2023, 11:26 Wouter Wijsman, @.***> wrote:

I was testing this on Ubuntu 20.04. Just so you know. When I tested this on Debian earlier, it was working. It's a bit odd.

— Reply to this email directly, view it on GitHub https://github.com/sharkwouter/minigalaxy/pull/581#issuecomment-1748473395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOGO5KANTCEQVUWML27LATX5Z4MZAVCNFSM6AAAAAA4OQFWF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBYGQ3TGMZZGU . You are receiving this because you authored the thread.Message ID: @.***>

orende avatar Oct 05 '23 14:10 orende

After moving the GUI-related function calls in library.initialize() to GLib.idle_add, I started having trouble with credentials not being shared across threads. Still investigating that, but haven't had much time to spend on it lately.

orende avatar Oct 18 '23 18:10 orende

Thanks for the update! I appreciate the work you put in this. I'm sorry for not getting back to you earlier, I had quite the situation in my private life. Now I'll be able to support you again, though, so let me know if I can do anything.

sharkwouter avatar Nov 27 '23 09:11 sharkwouter