Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

bugreport: use HTML and monospace

Changeset e6cd0f3920fe

Parent 48d5f1121787

by Steve Borho

Changes to one file · Browse files at e6cd0f3920fe Showing diff from parent 48d5f1121787 Diff from another changeset...

 
14
15
16
 
17
18
19
 
24
25
26
27
28
29
30
31
 
 
 
 
 
 
 
32
33
34
 
40
41
42
43
 
44
45
46
 
14
15
16
17
18
19
20
 
25
26
27
 
 
 
 
 
28
29
30
31
32
33
34
35
36
37
 
43
44
45
 
46
47
48
49
@@ -14,6 +14,7 @@
 from mercurial import extensions  from tortoisehg.util import hglib, version  from tortoisehg.util.i18n import _ +from tortoisehg.hgqt import qtlib    class BugReport(QtGui.QDialog):   @@ -24,11 +25,13 @@
    layout = QtGui.QVBoxLayout()   - te = QtGui.QTextEdit() - te.setPlainText(self.text) - te.setReadOnly(True) - te.setWordWrapMode(QtGui.QTextOption.NoWrap) - layout.addWidget(te) + tb = QtGui.QTextBrowser() + tb.document().setDefaultStyleSheet(qtlib.thgstylesheet) + msg = hglib.tounicode(self.text) + msg = QtCore.Qt.escape(msg) + tb.setHtml('<font>' + msg + '</font>') + tb.setWordWrapMode(QtGui.QTextOption.NoWrap) + layout.addWidget(tb)     # dialog buttons   BB = QtGui.QDialogButtonBox @@ -40,7 +43,7 @@
    self.setLayout(layout)   self.setWindowTitle(_('TortoiseHg Bug Report')) - self.resize(550, 400) + self.resize(650, 400)     def gettext(self, opts):   text = '{{{\n#!python\n' # Wrap in Bitbucket wiki preformat markers