]> granicus.if.org Git - python/commitdiff
Dialogs and there windows were still confused in some spots. Fixed.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 9 Feb 2001 15:57:01 +0000 (15:57 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 9 Feb 2001 15:57:01 +0000 (15:57 +0000)
Mac/Lib/EasyDialogs.py

index cfd55a16cbb4a7d0a64063706c4b3f363bf598a7..3f88fb549b154eeecd3d3f5e67ab34fe794176c6 100644 (file)
@@ -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)