[Idle-dev] Slow close?

Stephen M. Gava elguavas@users.sourceforge.net
26 Feb 2002 11:37:12 +1100


> I moved
> the 'make sure the relevant window is displayed' code into maybesave()
> since it only applies if we have a window we need a save query on

Even better, not only make sure we are an edit window, don't bother
fiddling with window visibility if we don't have unsaved changes either,
since we won't be asked about saving changes then:

def maybesave(self):
    if self.io:
        if not self.get_saved():
            if self.top.state()!='normal': 
                self.top.deiconify()
            self.top.lower()
            self.top.lift()
        return self.io.maybesave()

Stephen.
-- 
Stephen M. Gava  <elguavas@users.sourceforge.net>
IDLEfork ( http://idlefork.sourceforge.net )  " just like IDLE, only
crunchy "