src/eric7/Preferences/ConfigurationPages/EditorHighlightersPage.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9412:45e7bb09c120 9413:80c06d472826
15 from PyQt6.QtWidgets import QHeaderView, QTreeWidgetItem 15 from PyQt6.QtWidgets import QHeaderView, QTreeWidgetItem
16 16
17 from .ConfigurationPageBase import ConfigurationPageBase 17 from .ConfigurationPageBase import ConfigurationPageBase
18 from .Ui_EditorHighlightersPage import Ui_EditorHighlightersPage 18 from .Ui_EditorHighlightersPage import Ui_EditorHighlightersPage
19 19
20 import Preferences 20 from eric7 import Preferences
21 import UI.PixmapCache 21 from eric7.EricGui import EricPixmapCache
22 22
23 23
24 class EditorHighlightersPage(ConfigurationPageBase, Ui_EditorHighlightersPage): 24 class EditorHighlightersPage(ConfigurationPageBase, Ui_EditorHighlightersPage):
25 """ 25 """
26 Class implementing the Editor Highlighter Associations configuration page. 26 Class implementing the Editor Highlighter Associations configuration page.
46 try: 46 try:
47 self.extsep = os.extsep 47 self.extsep = os.extsep
48 except AttributeError: 48 except AttributeError:
49 self.extsep = "." 49 self.extsep = "."
50 50
51 import QScintilla.Lexers 51 from eric7.QScintilla import Lexers
52 52
53 self.extras = ["-----------", self.tr("Alternative")] 53 self.extras = ["-----------", self.tr("Alternative")]
54 self.editorLexerCombo.addItem("") 54 self.editorLexerCombo.addItem("")
55 self.editorLexerCombo.addItem(UI.PixmapCache.getIcon("fileText"), "Text") 55 self.editorLexerCombo.addItem(EricPixmapCache.getIcon("fileText"), "Text")
56 for lang in sorted(lexers.keys()): 56 for lang in sorted(lexers.keys()):
57 self.editorLexerCombo.addItem( 57 self.editorLexerCombo.addItem(Lexers.getLanguageIcon(lang, False), lang)
58 QScintilla.Lexers.getLanguageIcon(lang, False), lang
59 )
60 self.editorLexerCombo.addItems(self.extras) 58 self.editorLexerCombo.addItems(self.extras)
61 59
62 pygmentsLexers = [""] + sorted(lex[0] for lex in get_all_lexers()) 60 pygmentsLexers = [""] + sorted(lex[0] for lex in get_all_lexers())
63 self.pygmentsLexerCombo.addItems(pygmentsLexers) 61 self.pygmentsLexerCombo.addItems(pygmentsLexers)
64 62

eric ide

mercurial