From 186f2ee69c29e5d2bc8e652d4bf2cd681c4e90e5 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sun, 24 Dec 2023 11:53:55 +0000 Subject: [PATCH] Fix the "flash" when starting on windows (at least). This differs from the patch I sent. I moved the "show()" to happen before the plugin initialization_complete() methods are called, just in case they use something like isVisible(). The view_manager plugin now works correctly, which it didn't in 7.2. Tested with small and large libraries. --- src/calibre/gui2/ui.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 213866bb2e..78af71cc34 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -399,9 +399,6 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ setattr(self, '__systray_minimized', True) if do_hide_windows: self.hide_windows() - if show_gui: - timed_print('GUI main window shown') - self.show() self.layout_container.relayout() QTimer.singleShot(0, self.post_initialize_actions) self.read_settings() @@ -410,6 +407,10 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ self.bars_manager.start_animation() self.set_window_title() + if show_gui: + timed_print('GUI main window shown') + self.show() + for ac in self.iactions.values(): try: ac.initialization_complete()