Preferences/ConfigurationPages/EditorHighlightingStylesPage.py

changeset 3038
7fe9a53280bd
parent 3034
7ce719013078
child 3060
5883ce99ee12
child 3103
451f60e70434
equal deleted inserted replaced
3037:a417a0670a36 3038:7fe9a53280bd
7 Module implementing the Editor Highlighting Styles configuration page. 7 Module implementing the Editor Highlighting Styles configuration page.
8 """ 8 """
9 9
10 from PyQt4.QtCore import pyqtSlot, QFileInfo, QFile, QIODevice 10 from PyQt4.QtCore import pyqtSlot, QFileInfo, QFile, QIODevice
11 from PyQt4.QtGui import QPalette, QColorDialog, QFontDialog, \ 11 from PyQt4.QtGui import QPalette, QColorDialog, QFontDialog, \
12 QInputDialog, QFont, QMenu 12 QInputDialog, QFont, QMenu
13 13
14 from .ConfigurationPageBase import ConfigurationPageBase 14 from .ConfigurationPageBase import ConfigurationPageBase
15 from .Ui_EditorHighlightingStylesPage import Ui_EditorHighlightingStylesPage 15 from .Ui_EditorHighlightingStylesPage import Ui_EditorHighlightingStylesPage
16 16
17 from E5Gui import E5MessageBox, E5FileDialog 17 from E5Gui import E5MessageBox, E5FileDialog
402 self, 402 self,
403 self.trUtf8("Export Highlighting Styles"), 403 self.trUtf8("Export Highlighting Styles"),
404 self.trUtf8( 404 self.trUtf8(
405 """<p>The highlighting styles could not be exported""" 405 """<p>The highlighting styles could not be exported"""
406 """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""") 406 """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""")
407 .format(fn, f.errorString()) 407 .format(fn, f.errorString())
408 ) 408 )
409 409
410 def __importStyles(self, lexers): 410 def __importStyles(self, lexers):
411 """ 411 """
412 Private method to import the styles of the given lexers. 412 Private method to import the styles of the given lexers.
434 self, 434 self,
435 self.trUtf8("Import Highlighting Styles"), 435 self.trUtf8("Import Highlighting Styles"),
436 self.trUtf8( 436 self.trUtf8(
437 """<p>The highlighting styles could not be read""" 437 """<p>The highlighting styles could not be read"""
438 """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""") 438 """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")
439 .format(fn, f.errorString()) 439 .format(fn, f.errorString())
440 ) 440 )
441 return 441 return
442 442
443 if self.lexer: 443 if self.lexer:
444 colour = self.lexer.color(self.style) 444 colour = self.lexer.color(self.style)

eric ide

mercurial