コード例 #1
0
 def exim_data(self):
     if isportable:
         return error_dialog(self.gui, _('Cannot export/import'), _(
             'You are running calibre portable, all calibre data is already in the'
             ' calibre portable folder. Export/Import is unavailable.'), show=True)
     if self.gui.job_manager.has_jobs():
         return error_dialog(self.gui, _('Cannot Export/Import'),
                 _('Cannot export/import data while there are running jobs.'), show=True)
     from calibre.gui2.dialogs.exim import EximDialog
     d = EximDialog(parent=self.gui)
     if d.exec_() == d.Accepted:
         if d.restart_needed:
             self.gui.iactions['Restart'].restart()
コード例 #2
0
 def exim_data(self):
     if isportable:
         return error_dialog(
             self.gui,
             _('Cannot export/import'),
             _('You are running calibre portable, all calibre data is already in the'
               ' calibre portable folder. Export/import is unavailable.'),
             show=True)
     if self.gui.job_manager.has_jobs():
         return error_dialog(
             self.gui,
             _('Cannot export/import'),
             _('Cannot export/import data while there are running jobs.'),
             show=True)
     from calibre.gui2.dialogs.exim import EximDialog
     d = EximDialog(parent=self.gui)
     if d.exec_() == QDialog.DialogCode.Accepted:
         if d.restart_needed:
             self.gui.iactions['Restart'].restart()