From bec98698c425fa158b808e239e1b4bcaafcd1057 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 13 Jan 2016 09:42:28 +0530 Subject: [PATCH] Fix splash screen getting stuck on OSX when restarting calibre in debug mode --- src/calibre/gui2/ui.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index f2bfb3bc02..fc48434741 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -420,16 +420,19 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ gc.collect() if show_gui and self.gui_debug is not None: - info_dialog(self, _('Debug mode'), '

' + - _('You have started calibre in debug mode. After you ' - 'quit calibre, the debug log will be available in ' - 'the file: %s

The ' - 'log will be displayed automatically.')%self.gui_debug, show=True) + QTimer.singleShot(10, self.show_gui_debug_msg) self.iactions['Connect Share'].check_smartdevice_menus() QTimer.singleShot(1, self.start_smartdevice) QTimer.singleShot(100, self.update_toggle_to_tray_action) + def show_gui_debug_msg(self): + info_dialog(self, _('Debug mode'), '

' + + _('You have started calibre in debug mode. After you ' + 'quit calibre, the debug log will be available in ' + 'the file: %s

The ' + 'log will be displayed automatically.')%self.gui_debug, show=True) + def esc(self, *args): self.clear_button.click()