Пример #1
0
 def accept(self):
     recs = GuiRecommendations()
     for w in self._groups_model.widgets:
         if not w.pre_commit_check():
             return
         x = w.commit(save_defaults=False)
         recs.update(x)
     self._recommendations = recs
     ResizableDialog.accept(self)
Пример #2
0
 def accept(self):
     recs = GuiRecommendations()
     for w in self._groups_model.widgets:
         if not w.pre_commit_check():
             return
         x = w.commit(save_defaults=False)
         recs.update(x)
     self._recommendations = recs
     ResizableDialog.accept(self)
Пример #3
0
 def accept(self):
     recs = GuiRecommendations()
     for w in self._groups_model.widgets:
         if not w.pre_commit_check():
             return
         x = w.commit(save_defaults=False)
         recs.update(x)
     self.opf_file, self.cover_file = self.mw.opf_file, self.mw.cover_file
     self._recommendations = recs
     if self.db is not None:
         recs['gui_preferred_input_format'] = self.input_format
         save_specifics(self.db, self.book_id, recs)
     self.break_cycles()
     ResizableDialog.accept(self)
Пример #4
0
 def accept(self):
     recs = GuiRecommendations()
     for w in self._groups_model.widgets:
         if not w.pre_commit_check():
             return
         x = w.commit(save_defaults=False)
         recs.update(x)
     self.opf_file, self.cover_file = self.mw.opf_file, self.mw.cover_file
     self._recommendations = recs
     if self.db is not None:
         recs['gui_preferred_input_format'] = self.input_format
         save_specifics(self.db, self.book_id, recs)
     self.break_cycles()
     ResizableDialog.accept(self)
Пример #5
0
 def accept(self):
     self.save_state()
     if not self.apply_changes():
         return
     if self.editing_multiple and self.current_row != len(self.row_list) - 1:
         num = len(self.row_list) - 1 - self.current_row
         from calibre.gui2 import question_dialog
         if not question_dialog(
                 self, _('Are you sure?'),
                 _('There are still %d more books to edit in this set.'
                   ' Are you sure you want to stop? Use the Next button'
                   ' instead of the OK button to move through books in the set.') % num,
                 yes_text=_('&Stop editing'), no_text=_('&Continue editing'),
                 yes_icon='dot_red.png', no_icon='dot_green.png',
                 default_yes=False, skip_dialog_name='edit-metadata-single-confirm-ok-on-multiple'):
             return self.do_one(delta=1, apply_changes=False)
     ResizableDialog.accept(self)
Пример #6
0
 def accept(self):
     self.save_state()
     if not self.apply_changes():
         return
     if self.editing_multiple and self.current_row != len(self.row_list) - 1:
         num = len(self.row_list) - 1 - self.current_row
         from calibre.gui2 import question_dialog
         if not question_dialog(
                 self, _('Are you sure?'),
                 _('There are still %d more books to edit in this set.'
                   ' Are you sure you want to stop? Use the Next button'
                   ' instead of the OK button to move through books in the set.') % num,
                 yes_text=_('&Stop editing'), no_text=_('&Continue editing'),
                 yes_icon='dot_red.png', no_icon='dot_green.png',
                 default_yes=False, skip_dialog_name='edit-metadata-single-confirm-ok-on-multiple'):
             return self.do_one(delta=1, apply_changes=False)
     ResizableDialog.accept(self)
Пример #7
0
 def accept(self):
     self.save_state()
     if not self.apply_changes():
         return
     ResizableDialog.accept(self)
Пример #8
0
 def accept(self):
     self.save_state()
     if not self.apply_changes():
         return
     ResizableDialog.accept(self)
Пример #9
0
 def accept(self):
     self.save_catalog_settings()
     return ResizableDialog.accept(self)
Пример #10
0
 def accept(self):
     self.save_catalog_settings()
     return ResizableDialog.accept(self)