Project/LexerAssociationDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3190
a9a94491c4fd
child 3656
441956d8fce5
equal deleted inserted replaced
3456:96232974dcdb 3484:645c12de6b0c
43 try: 43 try:
44 self.extsep = os.extsep 44 self.extsep = os.extsep
45 except AttributeError: 45 except AttributeError:
46 self.extsep = "." 46 self.extsep = "."
47 47
48 self.extras = ["-----------", self.trUtf8("Alternative")] 48 self.extras = ["-----------", self.tr("Alternative")]
49 49
50 import QScintilla.Lexers 50 import QScintilla.Lexers
51 languages = [''] + \ 51 languages = [''] + \
52 sorted(QScintilla.Lexers.getSupportedLanguages().keys()) + \ 52 sorted(QScintilla.Lexers.getSupportedLanguages().keys()) + \
53 self.extras 53 self.extras
126 self.editorFileExtEdit.setText(itm.text(0)) 126 self.editorFileExtEdit.setText(itm.text(0))
127 lexer = itm.text(1) 127 lexer = itm.text(1)
128 if lexer.startswith("Pygments|"): 128 if lexer.startswith("Pygments|"):
129 pygmentsLexer = lexer.split("|")[1] 129 pygmentsLexer = lexer.split("|")[1]
130 pygmentsIndex = self.pygmentsLexerCombo.findText(pygmentsLexer) 130 pygmentsIndex = self.pygmentsLexerCombo.findText(pygmentsLexer)
131 lexer = self.trUtf8("Alternative") 131 lexer = self.tr("Alternative")
132 else: 132 else:
133 pygmentsIndex = 0 133 pygmentsIndex = 0
134 index = self.editorLexerCombo.findText(lexer) 134 index = self.editorLexerCombo.findText(lexer)
135 self.editorLexerCombo.setCurrentIndex(index) 135 self.editorLexerCombo.setCurrentIndex(index)
136 self.pygmentsLexerCombo.setCurrentIndex(pygmentsIndex) 136 self.pygmentsLexerCombo.setCurrentIndex(pygmentsIndex)

eric ide

mercurial