Ejemplo n.º 1
0
 def reject(self):
     self.save_state()
     if self.was_data_edited and not confirm(
             title=_('Are you sure?'), name='confirm-cancel-edit-single-metadata', msg=_(
                 'You will lose all unsaved changes, are you sure?'), parent=self):
         return
     QDialog.reject(self)
Ejemplo n.º 2
0
 def reject(self):
     self.prefs_for_persistence.set(self.name + '-geometry',
                                    bytearray(self.saveGeometry()))
     if hasattr(self, 'splitter'):
         self.prefs_for_persistence.set(
             self.name + '-splitter-state',
             bytearray(self.splitter.saveState()))
     QDialog.reject(self)
Ejemplo n.º 3
0
 def reject(self):
     QDialog.reject(self)
     if self.dialog_is_st_editor:
         parent = self.parent()
         while True:
             if hasattr(parent, 'reject'):
                 parent.reject()
                 break
             parent = parent.parent()
             if parent is None:
                 break
Ejemplo n.º 4
0
 def finish_processing(self):
     if self.abort.is_set():
         return QDialog.reject(self)
     if self.tb is not None:
         error_dialog(self, _('Failed'), self.err_msg + ' ' + _('Click "Show Details" for more information.'),
                         det_msg=self.tb, show=True)
     self.accept()
Ejemplo n.º 5
0
 def accept(self):
     if not str(self.key_ledit.text()) or str(self.key_ledit.text()).isspace():
         errmsg = "Key name field cannot be empty!"
         return error_dialog(None, "{0} {1}".format(PLUGIN_NAME, PLUGIN_VERSION),
                                 _(errmsg), show=True, show_copy_button=False)
     if len(self.key_ledit.text()) < 4:
         errmsg = "Key name must be at <i>least</i> 4 characters long!"
         return error_dialog(None, "{0} {1}".format(PLUGIN_NAME, PLUGIN_VERSION),
                                 _(errmsg), show=True, show_copy_button=False)
     if uStrCmp(self.key_ledit.text(), self.parent.listy.currentItem().text()):
             # Same exact name ... do nothing.
             return QDialog.reject(self)
     for k in self.parent.plugin_keys.keys():
         if (uStrCmp(self.key_ledit.text(), k, True) and
                     not uStrCmp(k, self.parent.listy.currentItem().text(), True)):
             errmsg = "The key name <strong>{0}</strong> is already being used.".format(self.key_ledit.text())
             return error_dialog(None, "{0} {1}".format(PLUGIN_NAME, PLUGIN_VERSION),
                                 _(errmsg), show=True, show_copy_button=False)
     QDialog.accept(self)
Ejemplo n.º 6
0
 def accept(self):
     if not unicode(self.key_ledit.text()) or unicode(self.key_ledit.text()).isspace():
         errmsg = u"Key name field cannot be empty!"
         return error_dialog(None, "{0} {1}".format(PLUGIN_NAME, PLUGIN_VERSION),
                                 _(errmsg), show=True, show_copy_button=False)
     if len(self.key_ledit.text()) < 4:
         errmsg = u"Key name must be at <i>least</i> 4 characters long!"
         return error_dialog(None, "{0} {1}".format(PLUGIN_NAME, PLUGIN_VERSION),
                                 _(errmsg), show=True, show_copy_button=False)
     if uStrCmp(self.key_ledit.text(), self.parent.listy.currentItem().text()):
             # Same exact name ... do nothing.
             return QDialog.reject(self)
     for k in self.parent.plugin_keys.keys():
         if (uStrCmp(self.key_ledit.text(), k, True) and
                     not uStrCmp(k, self.parent.listy.currentItem().text(), True)):
             errmsg = u"The key name <strong>{0}</strong> is already being used.".format(self.key_ledit.text())
             return error_dialog(None, "{0} {1}".format(PLUGIN_NAME, PLUGIN_VERSION),
                                 _(errmsg), show=True, show_copy_button=False)
     QDialog.accept(self)
Ejemplo n.º 7
0
 def reject(self):
     self.save_geometry()
     self.select_none()
     QDialog.reject(self)
Ejemplo n.º 8
0
 def reject(self):
     if not self.cancelable:
         return
     QDialog.reject(self)
Ejemplo n.º 9
0
 def reject(self):
     self.close()
     QDialog.reject(self)
Ejemplo n.º 10
0
 def reject(self):
     self.cleanup()
     QDialog.reject(self)
Ejemplo n.º 11
0
 def reject(self):
     self.rejected = True
     self.restorer.progress_callback = lambda x, y: x
     QDialog.reject(self)
Ejemplo n.º 12
0
 def reject(self):
     self.prefs_for_persistence.set(self.name + '-geometry', bytearray(self.saveGeometry()))
     if hasattr(self, 'splitter'):
         self.prefs_for_persistence.set(self.name + '-splitter-state', bytearray(self.splitter.saveState()))
     QDialog.reject(self)
Ejemplo n.º 13
0
 def reject(self):
     dynamic.set('catalog_window_geom', bytearray(self.saveGeometry()))
     QDialog.reject(self)
Ejemplo n.º 14
0
 def reject(self, *args, **kwargs):
     return QDialog.reject(self, *args, **kwargs)
Ejemplo n.º 15
0
 def reject(self):
     return QDialog.reject(self)
Ejemplo n.º 16
0
 def reject(self):
     self.prefs_for_persistence.set(self.name + "-geometry", bytearray(self.saveGeometry()))
     if hasattr(self, "splitter"):
         self.prefs_for_persistence.set(self.name + "-splitter-state", bytearray(self.splitter.saveState()))
     QDialog.reject(self)
Ejemplo n.º 17
0
 def reject(self):
     self.save_geometry()
     self.select_none()
     QDialog.reject(self)
Ejemplo n.º 18
0
 def reject(self):
     self.break_cycles()
     QDialog.reject(self)
Ejemplo n.º 19
0
 def reject(self):
     tprefs.set('preferences_geom', bytearray(self.saveGeometry()))
     QDialog.reject(self)
Ejemplo n.º 20
0
 def reject(self):
     self.canceled = True
     QDialog.reject(self)
Ejemplo n.º 21
0
 def reject(self):
     QDialog.reject(self)
Ejemplo n.º 22
0
 def reject(self):
     self.break_cycles()
     QDialog.reject(self)
Ejemplo n.º 23
0
 def reject(self):
     self.rejected = True
     QDialog.reject(self)
Ejemplo n.º 24
0
 def reject(self):
     self.cleanup()
     QDialog.reject(self)
Ejemplo n.º 25
0
 def reject(self):
     if self.is_pane:
         self.gui.quickview_splitter.hide_quickview_widget()
     self.gui.library_view.setFocus(Qt.ActiveWindowFocusReason)
     self._close()
     QDialog.reject(self)
Ejemplo n.º 26
0
 def reject(self):
     if self.stack.currentIndex() == 0 or self.close_after_initial:
         self.on_shutdown()
         return QDialog.reject(self)
     self.hide_plugin()
Ejemplo n.º 27
0
 def reject(self):
     self.save_state()
     return QDialog.reject(self)
Ejemplo n.º 28
0
 def reject(self):
     self.save_state()
     QDialog.reject(self)
Ejemplo n.º 29
0
 def reject(self):
     self.save_settings()
     return QDialog.reject(self)
Ejemplo n.º 30
0
 def reject(self):
     if self.sync.maybe_cancel():
         QDialog.reject(self)
Ejemplo n.º 31
0
 def reject(self):
     self.save_geometry()
     QDialog.reject(self)
Ejemplo n.º 32
0
 def reject(self):
     self.rejected = True
     self.restorer.progress_callback = lambda x, y: x
     QDialog.reject(self)
Ejemplo n.º 33
0
 def reject(self):
     QDialog.reject(self)
Ejemplo n.º 34
0
 def reject(self):
     gprefs['metadata_single_gui_geom'] = bytearray(self.saveGeometry())
     self.identify_widget.cancel()
     self.covers_widget.cancel()
     return QDialog.reject(self)
Ejemplo n.º 35
0
 def reject(self):
     self.save_geometry()
     QDialog.reject(self)
Ejemplo n.º 36
0
 def reject(self):
     gprefs.set('single-cover-fetch-dialog-geometry', bytearray(self.saveGeometry()))
     self.covers_widget.cancel()
     return QDialog.reject(self)
Ejemplo n.º 37
0
 def reject(self):
     self.close()
     QDialog.reject(self)
Ejemplo n.º 38
0
 def reject(self):
     self._save_settings()
     QDialog.reject(self)
Ejemplo n.º 39
0
 def reject(self):
     if self.stack.currentIndex() == 0 or self.close_after_initial:
         self.on_shutdown()
         return QDialog.reject(self)
     self.hide_plugin()
Ejemplo n.º 40
0
 def reject(self):
     gprefs['metadata_single_gui_geom'] = bytearray(self.saveGeometry())
     self.identify_widget.cancel()
     self.covers_widget.cancel()
     return QDialog.reject(self)
Ejemplo n.º 41
0
 def reject(self):
     dynamic.set('catalog_window_geom', bytearray(self.saveGeometry()))
     QDialog.reject(self)
Ejemplo n.º 42
0
 def reject(self):
     gprefs.set('single-cover-fetch-dialog-geometry',
                bytearray(self.saveGeometry()))
     self.covers_widget.cancel()
     return QDialog.reject(self)
Ejemplo n.º 43
0
 def reject(self):
     self._save_settings()
     QDialog.reject(self)
Ejemplo n.º 44
0
 def reject(self):
     self.canceled = True
     QDialog.reject(self)
Ejemplo n.º 45
0
 def reject(self):
     self.rejected = True
     return QDialog.reject(self)
Ejemplo n.º 46
0
 def reject(self):
     self.save_state()
     QDialog.reject(self)
Ejemplo n.º 47
0
 def reject(self):
     self.save_state()
     return QDialog.reject(self)
Ejemplo n.º 48
0
 def reject(self):
     tprefs.set('preferences_geom', bytearray(self.saveGeometry()))
     QDialog.reject(self)
Ejemplo n.º 49
0
 def _reject(self):
     if self.is_pane:
         self.gui.quickview_splitter.hide_quickview_widget()
     self.gui.library_view.setFocus(Qt.ActiveWindowFocusReason)
     self._close()
     QDialog.reject(self)
Ejemplo n.º 50
0
 def reject(self):
     self.save_settings()
     return QDialog.reject(self)