def _replace_done(self, ret, tb): if tb is not None: error_dialog(self, _('Replace failed'), _( 'Failed to replace external resources, click "Show details" for more information.'), det_msg=tb, show=True) Dialog.reject(self) else: self.wait.setCurrentIndex(3) self.state = 3 self.bb.clear() self.resources_replaced = True self.bb.setStandardButtons(QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Close) b = self.bb.button(QDialogButtonBox.StandardButton.Ok) b.setText(_('See what &changed')) b.setIcon(QIcon(I('diff.png'))) connect_lambda(b.clicked, self, lambda self: setattr(self, 'show_diff', True)) self.bb.setVisible(True)
def _replace_done(self, ret, tb): if tb is not None: error_dialog(self, _('Replace failed'), _( 'Failed to replace external resources, click "Show Details" for more information.'), det_msg=tb, show=True) Dialog.reject(self) else: self.wait.setCurrentIndex(3) self.state = 3 self.bb.clear() self.resources_replaced = True self.bb.setStandardButtons(self.bb.Ok | self.bb.Close) b = self.bb.button(self.bb.Ok) b.setText(_('See what &changed')) b.setIcon(QIcon(I('diff.png'))) b.clicked.connect(lambda : setattr(self, 'show_diff', True)) self.bb.setVisible(True)
def reject(self): if self.state == 2: return self.wait.stop() return Dialog.reject(self)
def reject(self): if self.stack.currentIndex() > 0: self.stack.setCurrentIndex(0) return return Dialog.reject(self)
def reject(self): self.keep_going = False self.bb.button(self.bb.Cancel).setEnabled(False) Dialog.reject(self)
def reject(self): self.keep_going = False self.bb.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(False) Dialog.reject(self)
def reject(self): self.reports.save() Dialog.reject(self)
def reject(self): tprefs['spell-check-table-state'] = bytearray(self.words_view.horizontalHeader().saveState()) Dialog.reject(self)