Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

stable cmdui, sync, commit: hide prompt while operation is in progress

Changeset aed4b26a4818

Parent e1aa63b113fd

by David Golub

Changes to 6 files · Browse files at aed4b26a4818 Showing diff from parent e1aa63b113fd Diff from another changeset...

 
512
513
514
 
515
516
517
 
566
567
568
569
 
 
570
571
572
 
626
627
628
 
 
629
630
631
 
 
 
 
 
632
633
634
 
512
513
514
515
516
517
518
 
567
568
569
 
570
571
572
573
574
 
628
629
630
631
632
633
634
 
635
636
637
638
639
640
641
642
@@ -512,6 +512,7 @@
  self.setFocusProxy(self._logwidget)   self.setRepository(None)   self.openPrompt() + self.suppressPrompt = False     def _initlogwidget(self):   self._logwidget = _LogWidgetForConsole(self) @@ -566,7 +567,8 @@
  try:   self._logwidget.appendLog(msg, label)   finally: - self.openPrompt() + if not self.suppressPrompt: + self.openPrompt()     @pyqtSlot(object)   def setRepository(self, repo): @@ -626,9 +628,15 @@
    @_cmdtable   def _cmd_hg(self, args): + self.suppressPrompt = True + self.closePrompt()   if self._repo:   args = ['--cwd', self._repo.root] + args - self._cmdcore.run(args) + try: + self._cmdcore.run(args) + finally: + self.suppressPrompt = False + self.openPrompt()     @_cmdtable   def _cmd_thg(self, args):
 
38
39
40
 
 
41
42
43
 
70
71
72
 
 
73
74
75
 
38
39
40
41
42
43
44
45
 
72
73
74
75
76
77
78
79
@@ -38,6 +38,8 @@
  progress = pyqtSignal(QString, object, QString, QString, object)   output = pyqtSignal(QString, QString)   makeLogVisible = pyqtSignal(bool) + beginSuppressPrompt = pyqtSignal() + endSuppressPrompt = pyqtSignal()     def __init__(self, repo, pats, opts, embedded=False, parent=None, rev=None):   QWidget.__init__(self, parent=parent) @@ -70,6 +72,8 @@
  self.runner.output.connect(self.output)   self.runner.progress.connect(self.progress)   self.runner.makeLogVisible.connect(self.makeLogVisible) + self.runner.commandStarted.connect(self.beginSuppressPrompt) + self.runner.commandFinished.connect(self.endSuppressPrompt)   self.runner.commandFinished.connect(self.commandFinished)     layout = QVBoxLayout()
 
41
42
43
 
 
 
 
 
 
 
 
 
44
45
46
 
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@@ -41,6 +41,15 @@
  def output(self, msg, label):   self.logte.appendLog(msg, label)   + @pyqtSlot() + def beginSuppressPrompt(self): + self.logte.suppressPrompt = True + + @pyqtSlot() + def endSuppressPrompt(self): + self.logte.suppressPrompt = False + self.logte.openPrompt() +   def showEvent(self, event):   self.visibilityChanged.emit(True)  
 
44
45
46
 
 
47
48
49
 
343
344
345
 
 
346
347
348
 
367
368
369
 
 
370
371
372
 
44
45
46
47
48
49
50
51
 
345
346
347
348
349
350
351
352
 
371
372
373
374
375
376
377
378
@@ -44,6 +44,8 @@
  output = pyqtSignal(QString, QString)   progress = pyqtSignal(QString, object, QString, QString, object)   makeLogVisible = pyqtSignal(bool) + beginSuppressPrompt = pyqtSignal() + endSuppressPrompt = pyqtSignal()     repoChanged = pyqtSignal(QString)   @@ -343,6 +345,8 @@
  cw.output.connect(self.output)   cw.progress.connect(self.progress)   cw.makeLogVisible.connect(self.makeLogVisible) + cw.beginSuppressPrompt.connect(self.beginSuppressPrompt) + cw.endSuppressPrompt.connect(self.endSuppressPrompt)   cw.linkActivated.connect(self._openLink)   cw.showMessage.connect(self.showMessage)   QTimer.singleShot(0, cw.reload) @@ -367,6 +371,8 @@
  sw.output.connect(self._showOutputOnInfoBar)   sw.progress.connect(self.progress)   sw.makeLogVisible.connect(self.makeLogVisible) + sw.beginSuppressPrompt.connect(self.beginSuppressPrompt) + sw.endSuppressPrompt.connect(self.endSuppressPrompt)   sw.syncStarted.connect(self.clearInfoBar)   sw.outgoingNodes.connect(self.setOutgoingNodes)   sw.showMessage.connect(self.showMessage)
 
61
62
63
 
 
64
65
66
 
288
289
290
 
291
 
292
293
294
 
61
62
63
64
65
66
67
68
 
290
291
292
293
294
295
296
297
298
@@ -61,6 +61,8 @@
  output = pyqtSignal(QString, QString)   progress = pyqtSignal(QString, object, QString, QString, object)   makeLogVisible = pyqtSignal(bool) + beginSuppressPrompt = pyqtSignal() + endSuppressPrompt = pyqtSignal()   showBusyIcon = pyqtSignal(QString)   hideBusyIcon = pyqtSignal(QString)   @@ -288,7 +290,9 @@
  self.optionsbutton.pressed.connect(self.editOptions)     cmd = cmdui.Widget(not self.embedded, True, self) + cmd.commandStarted.connect(self.beginSuppressPrompt)   cmd.commandStarted.connect(self.commandStarted) + cmd.commandFinished.connect(self.endSuppressPrompt)   cmd.commandFinished.connect(self.commandFinished)   cmd.makeLogVisible.connect(self.makeLogVisible)   cmd.output.connect(self.output)
 
644
645
646
 
 
647
648
649
 
644
645
646
647
648
649
650
651
@@ -644,6 +644,8 @@
  self.statusbar.progress(tp, p, i, u, tl, repo.root))   rw.output.connect(self.log.output)   rw.makeLogVisible.connect(self.log.setShown) + rw.beginSuppressPrompt.connect(self.log.beginSuppressPrompt) + rw.endSuppressPrompt.connect(self.log.endSuppressPrompt)   rw.revisionSelected.connect(self.updateHistoryActions)   rw.repoLinkClicked.connect(self.openLinkedRepo)   rw.taskTabsWidget.currentChanged.connect(self.updateTaskViewMenu)