9 |
9 |
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot, QFileInfo, QFile, QIODevice |
12 from PyQt4.QtCore import pyqtSlot, QFileInfo, QFile, QIODevice |
13 from PyQt4.QtGui import QPalette, QColorDialog, QFontDialog, \ |
13 from PyQt4.QtGui import QPalette, QColorDialog, QFontDialog, \ |
14 QInputDialog, QFont, QMenu |
14 QInputDialog, QFont, QMenu |
15 |
15 |
16 from .ConfigurationPageBase import ConfigurationPageBase |
16 from .ConfigurationPageBase import ConfigurationPageBase |
17 from .Ui_EditorHighlightingStylesPage import Ui_EditorHighlightingStylesPage |
17 from .Ui_EditorHighlightingStylesPage import Ui_EditorHighlightingStylesPage |
18 |
18 |
19 from E5Gui import E5MessageBox, E5FileDialog |
19 from E5Gui import E5MessageBox, E5FileDialog |
403 E5MessageBox.critical( |
403 E5MessageBox.critical( |
404 self, |
404 self, |
405 self.trUtf8("Export Highlighting Styles"), |
405 self.trUtf8("Export Highlighting Styles"), |
406 self.trUtf8( |
406 self.trUtf8( |
407 """<p>The highlighting styles could not be exported""" |
407 """<p>The highlighting styles could not be exported""" |
408 """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ |
408 """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""") |
409 .format(fn, f.errorString()) |
409 .format(fn, f.errorString()) |
410 ) |
410 ) |
411 |
411 |
412 def __importStyles(self, lexers): |
412 def __importStyles(self, lexers): |
413 """ |
413 """ |
414 Private method to import the styles of the given lexers. |
414 Private method to import the styles of the given lexers. |
435 E5MessageBox.critical( |
435 E5MessageBox.critical( |
436 self, |
436 self, |
437 self.trUtf8("Import Highlighting Styles"), |
437 self.trUtf8("Import Highlighting Styles"), |
438 self.trUtf8( |
438 self.trUtf8( |
439 """<p>The highlighting styles could not be read""" |
439 """<p>The highlighting styles could not be read""" |
440 """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ |
440 """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""") |
441 .format(fn, f.errorString()) |
441 .format(fn, f.errorString()) |
442 ) |
442 ) |
443 return |
443 return |
444 |
444 |
445 if self.lexer: |
445 if self.lexer: |
446 colour = self.lexer.color(self.style) |
446 colour = self.lexer.color(self.style) |