summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-02-09 15:57:01 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-02-09 15:57:01 (GMT)
commit784c61105343c2d4180128c382b65f48028dd8a3 (patch)
tree23864dde10e0436091783ee295a29bd58d82e242 /Mac
parentdef0d8da5a75dddad61071de93ee72e5d4d57a7b (diff)
downloadcpython-784c61105343c2d4180128c382b65f48028dd8a3.zip
cpython-784c61105343c2d4180128c382b65f48028dd8a3.tar.gz
cpython-784c61105343c2d4180128c382b65f48028dd8a3.tar.bz2
Dialogs and there windows were still confused in some spots. Fixed.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/EasyDialogs.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py
index cfd55a1..3f88fb5 100644
--- a/Mac/Lib/EasyDialogs.py
+++ b/Mac/Lib/EasyDialogs.py
@@ -220,27 +220,28 @@ class ProgressBar:
self.maxval = maxval
self.curval = -1
self.d = GetNewDialog(id, -1)
+ self.w = self.d.GetDialogWindow()
self.label(label)
self._update(0)
self.d.AutoSizeDialog()
self.title(title)
- self.d.GetDialogWindow().ShowWindow()
+ self.w.ShowWindow()
self.d.DrawDialog()
def __del__( self ):
- self.d.BringToFront()
- self.d.HideWindow()
+ self.w.BringToFront()
+ self.w.HideWindow()
+ del self.w
del self.d
def title(self, newstr=""):
"""title(text) - Set title of progress window"""
- w = self.d.GetDialogWindow()
- w.BringToFront()
- w.SetWTitle(newstr)
+ self.w.BringToFront()
+ self.w.SetWTitle(newstr)
def label( self, *newstr ):
"""label(text) - Set text in progress box"""
- self.d.GetDialogWindow().BringToFront()
+ self.w.BringToFront()
if newstr:
self._label = lf2cr(newstr[0])
text_h = self.d.GetDialogItemAsControl(2)