Show initializing message before constructing Main

This commit is contained in:
Kovid Goyal 2023-12-01 20:20:28 +05:30
parent df695546c1
commit 14a64a239c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -251,9 +251,9 @@ class GuiRunner(QObject):
def start_gui(self, db):
from calibre.gui2.ui import Main
self.timed_print('Constructing main UI...')
main = self.main = Main(self.opts, gui_debug=self.gui_debug)
if self.splash_screen is not None:
self.splash_screen.show_message(_('Initializing user interface...'))
main = self.main = Main(self.opts, gui_debug=self.gui_debug)
try:
with gprefs: # Only write gui.json after initialization is complete
main.initialize(self.library_path, db, self.actions)