352 self.sampleText.setFont(newFont) |
352 self.sampleText.setFont(newFont) |
353 else: |
353 else: |
354 self.sampleText.setFont(font) |
354 self.sampleText.setFont(font) |
355 |
355 |
356 style, substyle = self.__currentStyles() |
356 style, substyle = self.__currentStyles() |
357 if self.monospacedButton.isChecked(): |
357 options = ( |
358 options = MonospacedFontsOption |
358 MonospacedFontsOption |
359 else: |
359 if self.monospacedButton.isChecked() else |
360 options = NoFontsOption |
360 NoFontsOption |
|
361 ) |
361 font, ok = QFontDialog.getFont(self.lexer.font(style, substyle), self, |
362 font, ok = QFontDialog.getFont(self.lexer.font(style, substyle), self, |
362 "", options) |
363 "", options) |
363 if ok: |
364 if ok: |
364 setSampleFont(font, familyOnly, sizeOnly) |
365 setSampleFont(font, familyOnly, sizeOnly) |
365 if doAll: |
366 if doAll: |
563 if not ext: |
564 if not ext: |
564 ex = selectedFilter.split("(*")[1].split(")")[0] |
565 ex = selectedFilter.split("(*")[1].split(")")[0] |
565 if ex: |
566 if ex: |
566 fn += ex |
567 fn += ex |
567 |
568 |
568 if os.path.exists(fn): |
569 ok = ( |
569 ok = E5MessageBox.yesNo( |
570 E5MessageBox.yesNo( |
570 self, |
571 self, |
571 self.tr("Export Highlighting Styles"), |
572 self.tr("Export Highlighting Styles"), |
572 self.tr("""<p>The highlighting styles file <b>{0}</b> exists""" |
573 self.tr("""<p>The highlighting styles file <b>{0}</b> exists""" |
573 """ already. Overwrite it?</p>""").format(fn)) |
574 """ already. Overwrite it?</p>""").format(fn)) |
574 else: |
575 if os.path.exists(fn) else |
575 ok = True |
576 True |
|
577 ) |
576 |
578 |
577 if ok: |
579 if ok: |
578 if fn.endswith(".ehj"): |
580 if fn.endswith(".ehj"): |
579 from Preferences.HighlightingStylesFile import ( |
581 from Preferences.HighlightingStylesFile import ( |
580 HighlightingStylesFile |
582 HighlightingStylesFile |