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

stable cmdui: show red error message if command fails

This was especially an issue when using the email option under synchronize. If
the user typed their password incorrectly, the program would simply display the
message "Finished" without any indication that it had failed unless the user
then clicked the details button.

Changeset 91ecbd9f547e

Parent 8aa1d4fab57c

by David Golub

Changes to one file · Browse files at 91ecbd9f547e Showing diff from parent 8aa1d4fab57c Diff from another changeset...

 
80
81
82
83
 
84
 
 
 
 
85
86
87
 
298
299
300
 
301
302
303
304
305
306
 
 
307
308
309
 
 
 
310
311
312
 
80
81
82
 
83
84
85
86
87
88
89
90
91
 
302
303
304
305
306
307
308
309
310
311
312
313
314
 
 
315
316
317
318
319
320
@@ -80,8 +80,12 @@
  self.setStyleSheet('QStatusBar::item { border: none }')     @pyqtSlot(unicode) - def showMessage(self, ustr): + def showMessage(self, ustr, error=False):   self.lbl.setText(ustr) + if error: + self.lbl.setStyleSheet('QLabel { color: red }') + else: + self.lbl.setStyleSheet('')     def clear(self):   keys = self.topics.keys() @@ -298,15 +302,19 @@
  @pyqtSlot(int)   def onThreadFinished(self, ret):   if self.stbar: + error = False   if ret is None:   self.stbar.clear()   if self.thread.abortbyuser:   status = _('Terminated by user')   else:   status = _('Terminated') + elif ret == 0: + status = _('Finished')   else: - status = _('Finished') - self.stbar.showMessage(status) + status = _('Failed!') + error = True + self.stbar.showMessage(status, error)     self.display = None   if ret == 0 and self.runNext():