44 self.extsep = os.extsep |
44 self.extsep = os.extsep |
45 self.extras = ["-----------", self.tr("Alternative")] |
45 self.extras = ["-----------", self.tr("Alternative")] |
46 |
46 |
47 self.editorLexerCombo.addItem("") |
47 self.editorLexerCombo.addItem("") |
48 self.editorLexerCombo.addItem(EricPixmapCache.getIcon("fileText"), "Text") |
48 self.editorLexerCombo.addItem(EricPixmapCache.getIcon("fileText"), "Text") |
49 for lang in sorted(Lexers.getSupportedLanguages().keys()): |
49 for lang in sorted(Lexers.getSupportedLanguages()): |
50 self.editorLexerCombo.addItem(Lexers.getLanguageIcon(lang, False), lang) |
50 self.editorLexerCombo.addItem(Lexers.getLanguageIcon(lang, False), lang) |
51 self.editorLexerCombo.addItems(self.extras) |
51 self.editorLexerCombo.addItems(self.extras) |
52 |
52 |
53 pygmentsLexers = [""] + sorted(lex[0] for lex in get_all_lexers()) |
53 pygmentsLexers = [""] + sorted(lex[0] for lex in get_all_lexers()) |
54 self.pygmentsLexerCombo.addItems(pygmentsLexers) |
54 self.pygmentsLexerCombo.addItems(pygmentsLexers) |
55 |
55 |
56 # set initial values |
56 # set initial values |
57 self.project = project |
57 self.project = project |
58 for ext, lexer in list( |
58 for ext, lexer in self.project.getProjectData(dataKey="LEXERASSOCS").items(): |
59 self.project.getProjectData(dataKey="LEXERASSOCS").items() |
|
60 ): |
|
61 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
59 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
62 self.editorLexerList.sortByColumn(0, Qt.SortOrder.AscendingOrder) |
60 self.editorLexerList.sortByColumn(0, Qt.SortOrder.AscendingOrder) |
63 |
61 |
64 @pyqtSlot() |
62 @pyqtSlot() |
65 def on_addLexerButton_clicked(self): |
63 def on_addLexerButton_clicked(self): |