Example #1
0
 def __update(self):
     uri = self.__editor.uri
     if not uri: return False
     from Metadata import get_value
     lines = get_value(str(uri))
     if not lines: return False
     self.__manager.emit("bookmark-lines", lines)
     return False
Example #2
0
	def __update(self):
		uri = self.__editor.uri
		if not uri: return False
		from Metadata import get_value
		lines = get_value(str(uri))
		if not lines: return False
		self.__manager.emit("bookmark-lines", lines)
		return False
Example #3
0
	def __switch(self):
		from Metadata import get_value
		uri = get_value()
		uris = [instance.uri for instance in self.__editor.instances]
		if self.__editor.uri: uris.remove(self.__editor.uri)
		if uri in uris:
			self.__editor.focus_file(uri)
		else:
			_id = self.__get_last_id()
			self.__editor.focus_by_id(_id)
		return False
Example #4
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 #5
0
 def activate(self):
     from Metadata import get_value
     enable_word_completion = not get_value()
     self.emit("update-database", enable_word_completion)
     # This looks very ugly. Fix later. Yeah right.
     from gettext import gettext as _
     ENABLE_MESSAGE = _("Enabled automatic word completion")
     DISABLE_MESSAGE = _("Disabled automatic word completion")
     feedback = self.__editor.update_message
     feedback(ENABLE_MESSAGE, "yes",
              7) if enable_word_completion else feedback(
                  DISABLE_MESSAGE, "no")
     return False
Example #6
0
 def __read(self):
     from Metadata import get_value
     self.__manager.emit("enable-word-completion", get_value())
     return False
Example #7
0
 def __update(self):
     from Metadata import get_value
     self.__manager.emit("dictionary", get_value())
     return False
Example #8
0
 def __remove(self, key):
     from Metadata import set_value, get_value
     dictionary = get_value()
     del dictionary[key]
     set_value(dictionary)
     return False
Example #9
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 #10
0
 def __read(self):
     from Metadata import get_value
     self.__manager.emit("output-mode", get_value())
     return False
Example #11
0
	def __get_dictionary(self):
		from Metadata import get_value
		return get_value()
Example #12
0
	def __update(self):
		from Metadata import get_value
		self.__manager.emit("dictionary", get_value())
		return False
Example #13
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 #14
0
 def __read(self):
     from Metadata import get_value
     self.__manager.emit("error-check-type", get_value())
     return False
Example #15
0
	def __write(self):
		from Metadata import get_value, set_value
		set_value(not get_value())
		return False
Example #16
0
 def __read(self):
     from Metadata import get_value
     self.__manager.emit("theme-from-database", get_value())
     return False
Example #17
0
	def __emit_new_dictionary_signal(self):
		from Metadata import get_value
		self.__dictionary = get_value()
		self.__manager.emit("templates-dictionary", self.__dictionary)
		return False
Example #18
0
	def __remove(self, key):
		from Metadata import set_value, get_value
		dictionary = get_value()
		del dictionary[key]
		set_value(dictionary)
		return False
Example #19
0
	def __read(self):
		from Metadata import get_value
		self.__manager.emit("output-mode", get_value())
		return False
Example #20
0
	def __read(self):
		from Metadata import get_value
		self.__manager.emit("enable-word-completion", get_value())
		return False
Example #21
0
	def __read(self):
		from Metadata import get_value
		self.__manager.emit("show-whitespaces", get_value())
		return False
Example #22
0
 def __write(self):
     from Metadata import get_value, set_value
     set_value(not get_value())
     return False
Example #23
0
 def __get_dictionary(self):
     from Metadata import get_value
     return get_value()