def save(self): """Saves all shortcuts to shortcut file.""" data = dict() for key, val in self._shortcuts.items(): # Only save shortcuts with names in supported list if key not in self._names: continue data[key] = val.toString() if isinstance(val, QKeySequence) else val util.save_config_yaml("shortcuts.yaml", data)
def save(self): util.save_config_yaml(self._filename, self._prefs)
def save_path_prefix_replacement(old_prefix: str, new_prefix: str): data = util.get_config_yaml("path_prefixes.yaml") or dict() data[old_prefix] = new_prefix util.save_config_yaml("path_prefixes.yaml", data)
def reset_to_default(self): """Reset preferences to default.""" util.save_config_yaml(self._filename, self._defaults) self.load()
def save(self): """Save preferences to file.""" util.save_config_yaml(self._filename, self._prefs)