sharkwouter / minigalaxy

A simple GOG client for Linux
https://sharkwouter.github.io/minigalaxy/
GNU General Public License v3.0
1.09k stars 70 forks source link

Show loading screen on startup #581

Open orende opened 10 months ago

orende commented 10 months ago

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

sharkwouter commented 9 months ago

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 commented 9 months ago

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

orende commented 9 months ago

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 commented 9 months ago

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.

sharkwouter commented 8 months ago

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.