eric7/Project/LexerAssociationDialog.py

branch
eric7
changeset 8507
2a22d0880d21
parent 8324
83084f088655
child 8881
54e42bc2437a
diff -r c64ee71cf27b -r 2a22d0880d21 eric7/Project/LexerAssociationDialog.py
--- a/eric7/Project/LexerAssociationDialog.py	Wed Aug 04 15:35:49 2021 +0200
+++ b/eric7/Project/LexerAssociationDialog.py	Tue Aug 10 21:07:19 2021 +0200
@@ -14,6 +14,10 @@
 
 from .Ui_LexerAssociationDialog import Ui_LexerAssociationDialog
 
+import QScintilla.Lexers
+
+import UI.PixmapCache
+
 
 class LexerAssociationDialog(QDialog, Ui_LexerAssociationDialog):
     """
@@ -42,16 +46,16 @@
         
         self.extras = ["-----------", self.tr("Alternative")]
         
-        import QScintilla.Lexers
-        languages = (
-            [''] +
-            sorted(QScintilla.Lexers.getSupportedLanguages().keys()) +
-            self.extras
+        self.editorLexerCombo.addItem("")
+        self.editorLexerCombo.addItem(
+            UI.PixmapCache.getIcon("fileText"),
+            "Text"
         )
-        for lang in languages:
+        for lang in sorted(QScintilla.Lexers.getSupportedLanguages().keys()):
             self.editorLexerCombo.addItem(
                 QScintilla.Lexers.getLanguageIcon(lang, False),
                 lang)
+        self.editorLexerCombo.addItems(self.extras)
         
         from pygments.lexers import get_all_lexers
         pygmentsLexers = [''] + sorted(lex[0] for lex in get_all_lexers())

eric ide

mercurial