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 |
18 |
|
19 from E5XML.HighlightingStylesWriter import HighlightingStylesWriter |
|
20 from E5XML.HighlightingStylesReader import HighlightingStylesReader |
|
21 |
18 |
22 import Preferences |
19 import Preferences |
23 |
20 |
24 |
21 |
25 class EditorHighlightingStylesPage(ConfigurationPageBase, |
22 class EditorHighlightingStylesPage(ConfigurationPageBase, |
381 if ex: |
378 if ex: |
382 fn += ex |
379 fn += ex |
383 |
380 |
384 f = QFile(fn) |
381 f = QFile(fn) |
385 if f.open(QIODevice.WriteOnly): |
382 if f.open(QIODevice.WriteOnly): |
|
383 from E5XML.HighlightingStylesWriter import HighlightingStylesWriter |
386 HighlightingStylesWriter(f, lexers).writeXML() |
384 HighlightingStylesWriter(f, lexers).writeXML() |
387 f.close() |
385 f.close() |
388 else: |
386 else: |
389 E5MessageBox.critical(self, |
387 E5MessageBox.critical(self, |
390 self.trUtf8("Export Highlighting Styles"), |
388 self.trUtf8("Export Highlighting Styles"), |