Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

stable statusbar: do not apply idle text assignments between begin() and end()

Fixes "Running..." text not appearing on Refresh if a patch was applied.

Fixed by introducing a state 'self.started', which is set to True when
begin() is called and reset to False on end().

If set_idle_text is called after begin() but before end(), the
msg is not applied (only saved).

Changeset 0c590019e833

Parent e0e9b8dd92e7

by Adrian Buehlmann

Changes to one file · Browse files at 0c590019e833 Showing diff from parent e0e9b8dd92e7 Diff from another changeset...

 
15
16
17
 
18
19
20
 
45
46
47
 
48
49
50
 
51
52
53
 
67
68
69
70
 
71
72
73
 
15
16
17
18
19
20
21
 
46
47
48
49
50
51
52
53
54
55
56
 
70
71
72
 
73
74
75
76
@@ -15,6 +15,7 @@
  def __init__(self, extra=None):   gtk.HBox.__init__(self)   self.idle_text = None + self.started = False     self.pbar = gtk.ProgressBar()   self.sttext = gtk.Label("") @@ -45,9 +46,11 @@
  self.pbox.set_child_visible(True)   self.pbox.map()   self.set_status_text(msg) + self.started = True   self._timeout_event = gobject.timeout_add(timeout, self._pulse_timer)     def end(self, msg=None, unmap=True): + self.started = False   gobject.source_remove(self._timeout_event)     t = '' @@ -67,7 +70,7 @@
    def set_idle_text(self, msg):   self.idle_text = msg - if msg: + if msg and not self.started:   self.set_status_text(msg)     def set_right1_text(self, msg):