Ejemplo n.º 1
0
 def do_config(self, checked=False, initial_plugin=None,
         close_after_initial=False):
     if self.gui.job_manager.has_jobs():
         d = error_dialog(self.gui, _('Cannot configure'),
                 _('Cannot configure while there are running jobs.'))
         d.exec_()
         return
     if self.gui.must_restart_before_config:
         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)
     d.show()
     d.run_wizard_requested.connect(self.gui.run_wizard,
             type=Qt.QueuedConnection)
Ejemplo n.º 2
0
 def show_template_editor(self, *args):
     d = Preferences(self.gui, initial_plugin=('Advanced', 'TemplateFunctions'),
             close_after_initial=True)
     d.exec()