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

cmdui: fill up progress bar if command finished successfully

It only affects a progress bar of "busy indicator" type.

Changeset 1c0eb332323b

Parent ffe6246a3859

by Yuya Nishihara

Changes to one file · Browse files at 1c0eb332323b Showing diff from parent ffe6246a3859 Diff from another changeset...

 
55
56
57
 
 
 
 
 
58
59
60
 
123
124
125
126
 
127
 
 
 
 
 
128
129
130
 
55
56
57
58
59
60
61
62
63
64
65
 
128
129
130
 
131
132
133
134
135
136
137
138
139
140
@@ -55,6 +55,11 @@
  self.prog_label.setText('')   self.inprogress = False   + def fillup_progress(self): + """stick progress to full""" + self.clear_progress() + self.pbar.setValue(self.pbar.maximum()) +   def unknown_progress(self):   self.pbar.setMinimum(0)   self.pbar.setMaximum(0) @@ -123,8 +128,13 @@
  def command_finished(self, wrapper):   if hasattr(self, 'pmon'):   ret = wrapper.data - if ret is None or self.pmon.pbar.maximum() == 0: + if ret is None:   self.pmon.clear_progress() + if self.pmon.pbar.maximum() == 0: # busy indicator + if ret == 0: # finished successfully + self.pmon.fillup_progress() + else: + self.pmon.clear_progress()   if ret is None:   if self.thread.abortbyuser:   status = _('Terminated by user')