128 titleFullPath = Preferences.getEditorExporter( |
128 titleFullPath = Preferences.getEditorExporter( |
129 "TeX/FullPathAsTitle") |
129 "TeX/FullPathAsTitle") |
130 |
130 |
131 lex = self.editor.getLexer() |
131 lex = self.editor.getLexer() |
132 self.defaultPaper = lex and \ |
132 self.defaultPaper = lex and \ |
133 lex.paper(QsciScintilla.STYLE_DEFAULT) or \ |
133 lex.paper(QsciScintilla.STYLE_DEFAULT) or \ |
134 self.editor.paper().name() |
134 self.editor.paper().name() |
135 self.defaultColor = lex and \ |
135 self.defaultColor = lex and \ |
136 lex.color(QsciScintilla.STYLE_DEFAULT) or \ |
136 lex.color(QsciScintilla.STYLE_DEFAULT) or \ |
137 self.editor.color().name() |
137 self.editor.color().name() |
138 self.defaultFont = lex and \ |
138 self.defaultFont = lex and \ |
139 lex.color(QsciScintilla.STYLE_DEFAULT) or \ |
139 lex.color(QsciScintilla.STYLE_DEFAULT) or \ |
140 Preferences.getEditorOtherFonts("DefaultFont") |
140 Preferences.getEditorOtherFonts("DefaultFont") |
141 |
141 |
142 lengthDoc = self.editor.length() |
142 lengthDoc = self.editor.length() |
143 styleIsUsed = {} |
143 styleIsUsed = {} |
144 if onlyStylesUsed: |
144 if onlyStylesUsed: |
145 for index in range(QsciScintilla.STYLE_MAX + 1): |
145 for index in range(QsciScintilla.STYLE_MAX + 1): |
271 self.editor, |
271 self.editor, |
272 self.trUtf8("Export source"), |
272 self.trUtf8("Export source"), |
273 self.trUtf8( |
273 self.trUtf8( |
274 """<p>The source could not be exported to""" |
274 """<p>The source could not be exported to""" |
275 """ <b>{0}</b>.</p><p>Reason: {1}</p>""") |
275 """ <b>{0}</b>.</p><p>Reason: {1}</p>""") |
276 .format(filename, str(err))) |
276 .format(filename, str(err))) |
277 finally: |
277 finally: |
278 QApplication.restoreOverrideCursor() |
278 QApplication.restoreOverrideCursor() |