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

commit: add an embedded commit button to CommitWidget

Changeset 66571d52d60e

Parent 4f718b4a75af

by Adrian Buehlmann

Changes to one file · Browse files at 66571d52d60e Showing diff from parent 4f718b4a75af Diff from another changeset...

 
42
43
44
45
 
46
47
48
 
76
77
78
 
 
 
 
 
 
 
 
 
 
 
 
79
80
81
 
82
83
84
 
393
394
395
396
 
397
398
399
 
42
43
44
 
45
46
47
48
 
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 
93
94
95
96
 
405
406
407
 
408
409
410
411
@@ -42,7 +42,7 @@
  errorMessage = pyqtSignal(QString)   commitComplete = pyqtSignal()   - def __init__(self, pats, opts, root=None, parent=None): + def __init__(self, pats, opts, root=None, parent=None, hidebutton=False):   QWidget.__init__(self, parent)     self.opts = opts # user, date @@ -76,9 +76,21 @@
  except util.Abort:   pass   + b = QPushButton(_('Commit')) + if hidebutton: + b.hide() + w = QWidget() + l = QHBoxLayout() + l.setMargin(0) + w.setLayout(l) + l.addWidget(QLabel(_('Working Copy'))) + l.addStretch(1) + l.addWidget(b) + b.clicked.connect(self.commit) +   def addrow(s, w):   form.addRow("<b>%s</b>" % s, w) - addrow(('Changeset:'), QLabel(_('Working Copy'))) + addrow(('Changeset:'), w)   for ctx in repo.parents():   desc = format_desc(ctx.description(), 80)   fmt = "<span style='font-family:Courier'>%s(%s)</span> %s" @@ -393,7 +405,7 @@
  layout = QVBoxLayout()   self.setLayout(layout)   - commit = CommitWidget(pats, opts, None, self) + commit = CommitWidget(pats, opts, None, self, hidebutton=True)   layout.addWidget(commit, 1)   layout.setContentsMargins(0, 6, 0, 0)