mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Hide splash screen after UI init not before
This commit is contained in:
parent
d4d0ccd970
commit
35d62df8a7
@ -207,10 +207,13 @@ class GuiRunner(QObject):
|
|||||||
main = self.main = Main(self.opts, gui_debug=self.gui_debug)
|
main = self.main = Main(self.opts, gui_debug=self.gui_debug)
|
||||||
if self.splash_screen is not None:
|
if self.splash_screen is not None:
|
||||||
self.splash_screen.show_message(_('Initializing user interface...'))
|
self.splash_screen.show_message(_('Initializing user interface...'))
|
||||||
self.splash_screen.finish(main)
|
try:
|
||||||
with gprefs: # Only write gui.json after initialization is complete
|
with gprefs: # Only write gui.json after initialization is complete
|
||||||
main.initialize(self.library_path, db, self.listener, self.actions)
|
main.initialize(self.library_path, db, self.listener, self.actions)
|
||||||
self.splash_screen = None
|
finally:
|
||||||
|
if self.splash_screen is not None:
|
||||||
|
self.splash_screen.finish(main)
|
||||||
|
self.splash_screen = None
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
prints('Started up in %.2f seconds'%(time.time() -
|
prints('Started up in %.2f seconds'%(time.time() -
|
||||||
self.startup_time), 'with', len(db.data), 'books')
|
self.startup_time), 'with', len(db.data), 'books')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user