mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Fix #1355488 [(Enhancement) Add a restart button to Configuration Warning](https://bugs.launchpad.net/calibre/+bug/1355488)
This commit is contained in:
parent
ba816b8fe2
commit
66b506abce
@ -11,7 +11,7 @@ from PyQt5.Qt import QIcon, Qt
|
||||
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.gui2.preferences.main import Preferences
|
||||
from calibre.gui2 import error_dialog
|
||||
from calibre.gui2 import error_dialog, show_restart_warning
|
||||
from calibre.constants import DEBUG, isosx
|
||||
|
||||
class PreferencesAction(InterfaceAction):
|
||||
@ -56,9 +56,9 @@ class PreferencesAction(InterfaceAction):
|
||||
d.exec_()
|
||||
return
|
||||
if self.gui.must_restart_before_config:
|
||||
d = error_dialog(self.gui, _('Cannot configure'),
|
||||
_('Cannot configure before calibre is restarted.'))
|
||||
d.exec_()
|
||||
do_restart = show_restart_warning(_('Cannot configure before calibre is restarted.'))
|
||||
if do_restart:
|
||||
self.gui.quit(restart=True)
|
||||
return
|
||||
d = Preferences(self.gui, initial_plugin=initial_plugin,
|
||||
close_after_initial=close_after_initial)
|
||||
|
Loading…
x
Reference in New Issue
Block a user