示例#1
0
 def save(self):
     if not self.ui.enable_cleanup.checkState() == QtCore.Qt.CheckState.Checked:
         return
     to_remove = set(self.selected_options())
     if to_remove and QtWidgets.QMessageBox.question(
         self,
         _('Confirm Remove'),
         _("Are you sure you want to remove the selected option settings?"),
     ) == QtWidgets.QMessageBox.StandardButton.Yes:
         config = get_config()
         for item in to_remove:
             Option.add_if_missing('setting', item, None)
             log.warning("Removing option setting '%s' from the INI file.", item)
             config.setting.remove(item)
示例#2
0
文件: __init__.py 项目: ruipin/picard
 def __init__(self):
     Option.add_if_missing("persist", self.opt_name(), QtCore.QByteArray())
     Option.add_if_missing("persist", self.splitters_name(), {})
     if getattr(self, 'finished', None):
         self.finished.connect(self.save_geometry)