Preferences/ConfigurationPages/EditorHighlightingStylesPage.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3020
542e97d4ecb3
child 3060
5883ce99ee12
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
398 if f.open(QIODevice.WriteOnly): 398 if f.open(QIODevice.WriteOnly):
399 from E5XML.HighlightingStylesWriter import HighlightingStylesWriter 399 from E5XML.HighlightingStylesWriter import HighlightingStylesWriter
400 HighlightingStylesWriter(f, lexers).writeXML() 400 HighlightingStylesWriter(f, lexers).writeXML()
401 f.close() 401 f.close()
402 else: 402 else:
403 E5MessageBox.critical(self, 403 E5MessageBox.critical(
404 self,
404 self.trUtf8("Export Highlighting Styles"), 405 self.trUtf8("Export Highlighting Styles"),
405 self.trUtf8( 406 self.trUtf8(
406 """<p>The highlighting styles could not be exported""" 407 """<p>The highlighting styles could not be exported"""
407 """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ 408 """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""")\
408 .format(fn, f.errorString()) 409 .format(fn, f.errorString())
429 from E5XML.HighlightingStylesReader import HighlightingStylesReader 430 from E5XML.HighlightingStylesReader import HighlightingStylesReader
430 reader = HighlightingStylesReader(f, lexers) 431 reader = HighlightingStylesReader(f, lexers)
431 reader.readXML() 432 reader.readXML()
432 f.close() 433 f.close()
433 else: 434 else:
434 E5MessageBox.critical(self, 435 E5MessageBox.critical(
436 self,
435 self.trUtf8("Import Highlighting Styles"), 437 self.trUtf8("Import Highlighting Styles"),
436 self.trUtf8( 438 self.trUtf8(
437 """<p>The highlighting styles could not be read""" 439 """<p>The highlighting styles could not be read"""
438 """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ 440 """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")\
439 .format(fn, f.errorString()) 441 .format(fn, f.errorString())

eric ide

mercurial