mirror of https://github.com/python/cpython.git
Fixed progressbar cleanup
This commit is contained in:
parent
a0ca4c402d
commit
30fe363fd8
|
@ -144,19 +144,17 @@ def _update(self, value):
|
||||||
Qd.BackColor(QuickDraw.whiteColor)
|
Qd.BackColor(QuickDraw.whiteColor)
|
||||||
|
|
||||||
# Test for cancel button
|
# Test for cancel button
|
||||||
if ModalDialog(self._filterfunc) == 1:
|
if ModalDialog(_ProgressBar_filterfunc) == 1:
|
||||||
raise KeyboardInterrupt
|
raise KeyboardInterrupt
|
||||||
|
|
||||||
def _filterfunc(self, d, e, *more):
|
|
||||||
return 2 # XXXX For now, this disables the cancel button
|
|
||||||
|
|
||||||
def set(self, value):
|
def set(self, value):
|
||||||
if value < 0: value = 0
|
if value < 0: value = 0
|
||||||
if value > self.maxval: value = self.maxval
|
if value > self.maxval: value = self.maxval
|
||||||
self._update(value)
|
self._update(value)
|
||||||
|
|
||||||
|
def _ProgressBar_filterfunc(*args):
|
||||||
|
return 2 # Disabled, for now.
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
Message("Testing EasyDialogs.")
|
Message("Testing EasyDialogs.")
|
||||||
ok = AskYesNoCancel("Do you want to proceed?")
|
ok = AskYesNoCancel("Do you want to proceed?")
|
||||||
|
|
Loading…
Reference in New Issue