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

changeset: change superclass of RevDisplay to QWidget

introduce new member variable '_details' for the QTextBrowser

Changeset 5e36d189311c

Parent d3960278281b

by Adrian Buehlmann

Changes to one file · Browse files at 5e36d189311c Showing diff from parent d3960278281b Diff from another changeset...

 
26
27
28
29
 
30
31
32
33
34
 
 
 
 
 
 
 
 
35
36
 
 
37
38
39
 
177
178
179
180
 
 
26
27
28
 
29
30
31
32
33
 
34
35
36
37
38
39
40
41
42
 
43
44
45
46
47
 
185
186
187
 
188
@@ -26,14 +26,22 @@
 from tortoisehg.hgqt.config import HgConfig     -class RevDisplay(QtGui.QTextBrowser): +class RevDisplay(QtGui.QWidget):   """   Display metadata for one revision (rev, author, description, etc.)   """   def __init__(self, parent=None): - QtGui.QTextBrowser.__init__(self, parent) + QtGui.QWidget.__init__(self, parent) + + self._details = QtGui.QTextBrowser() + vb = QtGui.QVBoxLayout() + vb.setMargin(0) + vb.addWidget(self._details) + self.setLayout(vb) +   self.descwidth = 60 # number of chars displayed for parent/child descriptions - connect(self, + + connect(self._details,   SIGNAL('anchorClicked(const QUrl &)'),   self.anchorClicked)   @@ -177,4 +185,4 @@
  desc = xml_escape(unicode(ctx.description(), 'utf-8', 'replace'))   desc = desc.replace('\n', '<br/>\n')   buf += '<div class="diff_desc"><p>%s</p></div>\n' % desc - self.setHtml(buf) + self._details.setHtml(buf)