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

workbench: rewire showMessage from repowidgets

Changeset 29221dfaf52f

Parent 5fa2a92b7c51

by Adrian Buehlmann

Changes to 2 files · Browse files at 29221dfaf52f Showing diff from parent 5fa2a92b7c51 Diff from another changeset...

 
44
45
46
 
 
 
47
48
49
 
56
57
58
 
 
59
60
61
 
83
84
85
86
87
 
 
 
 
 
 
 
88
89
90
 
44
45
46
47
48
49
50
51
52
 
59
60
61
62
63
64
65
66
 
88
89
90
 
 
91
92
93
94
95
96
97
98
99
100
@@ -44,6 +44,9 @@
   class RepoWidget(QtGui.QWidget, WidgetMixin):   _uifile = 'repowidget.ui' + + showMessageSignal = QtCore.pyqtSignal(str) +   def __init__(self, repo, fromhead=None):   self.repo = repo   self._closed_branch_supp = has_closed_branch_support(self.repo) @@ -56,6 +59,8 @@
    QtGui.QWidget.__init__(self)   WidgetMixin.__init__(self) + + self.currentMessage = ''     self.createActions()   @@ -83,8 +88,13 @@
  self._watchrepotimer = self.startTimer(500)     def showMessage(self, msg): - print "repowidget.showMessage(%s) called" % msg - # TODO: wire this higher up in the hierarchy + self.currentMessage = msg + if self.isVisible(): + self.showMessageSignal.emit(msg) + + def showEvent(self, event): + QtGui.QWidget.showEvent(self, event) + self.showMessageSignal.emit(self.currentMessage)     def commit(self):   args = ['commit']
 
137
138
139
 
140
141
142
143
 
 
 
144
145
146
 
137
138
139
140
141
142
143
144
145
146
147
148
149
150
@@ -137,10 +137,14 @@
  '''opens the given repo in a new tab'''   reponame = os.path.basename(repo.root)   rw = RepoWidget(repo, fromhead) + rw.showMessageSignal.connect(self.showMessage)   tw = self.repoTabsWidget   index = self.repoTabsWidget.addTab(rw, reponame)   tw.setCurrentIndex(index)   + def showMessage(self, msg): + self.statusBar().showMessage(msg) +   def setupBranchCombo(self, *args):   w = self.repoTabsWidget.currentWidget()   if not w: