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

csinfo: support hyperlink feature

Changeset 0f057c6337e2

Parent 0077badedc5f

by Yuki KODAMA

Changes to one file · Browse files at 0f057c6337e2 Showing diff from parent 0077badedc5f Diff from another changeset...

 
9
10
11
12
 
13
14
15
 
466
467
468
 
 
469
470
471
 
488
489
490
 
 
491
492
493
 
502
503
504
505
506
507
508
 
 
 
 
 
 
509
510
511
 
9
10
11
 
12
13
14
15
 
466
467
468
469
470
471
472
473
 
490
491
492
493
494
495
496
497
 
506
507
508
 
 
 
 
509
510
511
512
513
514
515
516
517
@@ -9,7 +9,7 @@
 import os  import binascii   -from PyQt4.QtCore import Qt, QSize +from PyQt4.QtCore import Qt, QSize, QString, pyqtSignal  from PyQt4.QtGui import QWidget, QLabel, QHBoxLayout, QPushButton    from mercurial import patch, util, error @@ -466,6 +466,8 @@
   class SummaryPanel(SummaryBase, QWidget):   + linkActivated = pyqtSignal(QString) +   def __init__(self, target, style, custom, repo, info):   SummaryBase.__init__(self, target, custom, repo, info)   QWidget.__init__(self) @@ -488,6 +490,8 @@
    if self.revlabel is None:   self.revlabel = QLabel() + self.revlabel.linkActivated.connect( + lambda s: self.linkActivated.emit(s))   self.layout().addWidget(self.revlabel, alignment=Qt.AlignTop)     if 'expandable' in self.csstyle and self.csstyle['expandable']: @@ -502,10 +506,12 @@
  elif self.expand_btn is not None:   self.expand_btn.setHidden(True)   - if 'selectable' in self.csstyle: - sel = self.csstyle['selectable'] - val = sel and Qt.TextSelectableByMouse or Qt.TextBrowserInteraction - self.revlabel.setTextInteractionFlags(val) + interact = Qt.LinksAccessibleByMouse + + if 'selectable' in self.csstyle and self.csstyle['selectable']: + interact |= Qt.TextBrowserInteraction + + self.revlabel.setTextInteractionFlags(interact)     # build info   contents = self.csstyle.get('contents', ())