--- a/eric6/QScintilla/Lexers/__init__.py Mon Sep 02 18:50:38 2019 +0200 +++ b/eric6/QScintilla/Lexers/__init__.py Mon Sep 02 18:51:38 2019 +0200 @@ -157,18 +157,12 @@ "lexerXML.png"], "YAML": [QCoreApplication.translate('Lexers', "YAML"), 'dummy.yml', "lexerYAML.png"], + "Gettext": [QCoreApplication.translate('Lexers', "Gettext"), + 'dummy.po', "lexerGettext.png"], + "CoffeeScript": [QCoreApplication.translate('Lexers', "CoffeeScript"), + 'dummy.coffee', "lexerCoffeeScript.png"], } - if QSCINTILLA_VERSION() >= 0x020802: - supportedLanguages["Gettext"] = \ - [QCoreApplication.translate('Lexers', "Gettext"), 'dummy.po', - "lexerGettext.png"] - - if QSCINTILLA_VERSION() >= 0x020803: - supportedLanguages["CoffeeScript"] = \ - [QCoreApplication.translate('Lexers', "CoffeeScript"), - 'dummy.coffee', "lexerCoffeeScript.png"] - if QSCINTILLA_VERSION() >= 0x020a00: supportedLanguages["JSON"] = \ [QCoreApplication.translate('Lexers', "JSON"), @@ -507,22 +501,14 @@ QCoreApplication.translate( 'Lexers', 'Octave Files (*.m *.m.octave)'), + QCoreApplication.translate( + 'Lexers', + 'Gettext Files (*.po)'), + QCoreApplication.translate( + 'Lexers', + 'CoffeeScript Files (*.coffee)'), ] - if QSCINTILLA_VERSION() >= 0x020802: - openFileFiltersList.append( - QCoreApplication.translate( - 'Lexers', - 'Gettext Files (*.po)'), - ) - - if QSCINTILLA_VERSION() >= 0x020803: - openFileFiltersList.append( - QCoreApplication.translate( - 'Lexers', - 'CoffeeScript Files (*.coffee)'), - ) - if QSCINTILLA_VERSION() >= 0x020a00: openFileFiltersList.append( QCoreApplication.translate( @@ -729,22 +715,14 @@ QCoreApplication.translate( 'Lexers', 'Octave Files (*.m.octave)'), + QCoreApplication.translate( + 'Lexers', + 'Gettext Files (*.po)'), + QCoreApplication.translate( + 'Lexers', + 'CoffeeScript Files (*.coffee)'), ] - if QSCINTILLA_VERSION() >= 0x020802: - saveFileFiltersList.append( - QCoreApplication.translate( - 'Lexers', - 'Gettext Files (*.po)'), - ) - - if QSCINTILLA_VERSION() >= 0x020803: - saveFileFiltersList.append( - QCoreApplication.translate( - 'Lexers', - 'CoffeeScript Files (*.coffee)'), - ) - if QSCINTILLA_VERSION() >= 0x020a00: saveFileFiltersList.append( QCoreApplication.translate( @@ -907,14 +885,10 @@ '*.e6s': "XML", '*.e6t': "XML", '*.proto': "Protocol", + '*.po': "Gettext", + '*.coffee': "CoffeeScript", } - if QSCINTILLA_VERSION() >= 0x020802: - assocs['*.po'] = "Gettext" - - if QSCINTILLA_VERSION() >= 0x020803: - assocs['*.coffee'] = "CoffeeScript" - if QSCINTILLA_VERSION() >= 0x020a00: assocs['*.json'] = "JSON" assocs['*.md'] = "Markdown"