Example #1
0
	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
Example #2
0
	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
Example #3
0
	def __add(self, key, value):
		from Metadata import set_value, get_value
		dictionary = get_value()
		dictionary[key] = value
		set_value(dictionary)
		return False
Example #4
0
 def __remove(self, key):
     from Metadata import set_value, get_value
     dictionary = get_value()
     del dictionary[key]
     set_value(dictionary)
     return False
Example #5
0
 def __add(self, key, value):
     from Metadata import set_value, get_value
     dictionary = get_value()
     dictionary[key] = value
     set_value(dictionary)
     return False
Example #6
0
 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
Example #7
0
	def __write(self, output):
		from Metadata import set_value
		set_value(output)
		return False
Example #8
0
 def __write(self):
     from Metadata import get_value, set_value
     set_value(not get_value())
     return False
Example #9
0
	def __write(self, enable_word_completion):
		from Metadata import set_value
		set_value(enable_word_completion)
		return False
Example #10
0
	def __write(self):
		from Metadata import get_value, set_value
		set_value(not get_value())
		return False
Example #11
0
	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
Example #12
0
	def __remove(self, data):
		for key in data: del self.__dictionary[key]
		from Metadata import set_value
		set_value(self.__dictionary)
		return False
Example #13
0
	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
Example #14
0
	def __remove(self, key):
		from Metadata import set_value, get_value
		dictionary = get_value()
		del dictionary[key]
		set_value(dictionary)
		return False
Example #15
0
	def __write(self):
		if not self.__editor.uri: return False
		from Metadata import set_value
		set_value(self.__editor.uri)
		return False
Example #16
0
 def __update(self, theme):
     from Metadata import set_value
     set_value(theme)
     return False
Example #17
0
 def __write(self, output):
     from Metadata import set_value
     set_value(output)
     return False
Example #18
0
 def __write(self, enable_word_completion):
     from Metadata import set_value
     set_value(enable_word_completion)
     return False
Example #19
0
	def __set(self, indentation):
		from Metadata import set_value
		set_value(indentation)
		return False