def __add_template_to_database(self, template_data): old_key, new_key, description, template = template_data if old_key: del self.__dictionary[old_key] self.__dictionary[new_key] = description, template from Metadata import set_value set_value(self.__dictionary) return False
def __activate_cb(self, *args): from Metadata import get_value, set_value value = False if get_value() else True set_value(value) if value: icon = "yes" message = "Showing whitespace" else: icon = "no" message = "Hiding whitespace" self.__editor.update_message(message, icon, 10) return
def __add(self, key, value): from Metadata import set_value, get_value dictionary = get_value() dictionary[key] = value set_value(dictionary) return False
def __remove(self, key): from Metadata import set_value, get_value dictionary = get_value() del dictionary[key] set_value(dictionary) return False
def __update(self, lines): uri = self.__editor.uri if not uri: return False from Metadata import set_value set_value(str(uri), lines) return False
def __write(self, output): from Metadata import set_value set_value(output) return False
def __write(self): from Metadata import get_value, set_value set_value(not get_value()) return False
def __write(self, enable_word_completion): from Metadata import set_value set_value(enable_word_completion) return False
def __remove(self, data): for key in data: del self.__dictionary[key] from Metadata import set_value set_value(self.__dictionary) return False
def __add_new_templates(self, templates_data): for data in templates_data: self.__dictionary[data[0]] = data[1], data[2] from Metadata import set_value set_value(self.__dictionary) return False
def __write(self): if not self.__editor.uri: return False from Metadata import set_value set_value(self.__editor.uri) return False
def __update(self, theme): from Metadata import set_value set_value(theme) return False
def __set(self, indentation): from Metadata import set_value set_value(indentation) return False