Esempio n. 1
0
 def __init__(self, filename, encoding='utf-8'):
     SourceBuffer.__init__(self)
     self.filename = filename
     self.encoding = encoding
     lm = SourceLanguagesManager()
     self.languages_manager = lm
     language = lm.get_language_from_mime_type("text/x-python")
     self.set_highlight(True)
     self.set_language(language)
Esempio n. 2
0
	def __init__(self):
		""" initiats the editorBuffer and sets initial values """

		self.c = config.config()

		SourceBuffer.__init__(self)
		lm = SourceLanguagesManager()
		self.languages_manager = lm
		lang = lm.get_language_from_mime_type("text/x-R")
		self.set_language(lang)

		self.tag = self.create_tag(background="#FFFF78") # value from gedit

		# Honor the users configuration
		value = self.c.get_bool("/editor/syntax_highlighting")
		if value == None: value = True
		self.set_highlight(value)
Esempio n. 3
0
 def __init__(self, filename=None):
     SourceBuffer.__init__(self)
     self.filename=filename
     self.current_line = 0
     self.connect('changed', self.update_cursor_position)