class MainWindow(Frame): def __init__(self, parent): Frame.__init__(self, parent) self.parent = parent self.parent.title("GLIDE") self.welcomeScreen = WelcomeScreen(self.parent, self) # can create a StartPopupWindow x = (self.parent.winfo_screenwidth() - DIM_X)/2 y = (self.parent.winfo_screenheight() - DIM_Y)/2 self.parent.geometry('%dx%d+%d+%d' % (DIM_X, DIM_Y, x, y)) self.pack() self.envt = None self.parent.protocol("WM_DELETE_WINDOW", self.exit) self.canQuit = True def createNewEnvt(self, username): self.welcomeScreen.pack_forget() self.envt = Environment(self.parent, self, username) self.envt.pack() def exit(self): if self.canQuit: frame = Frame(bg="") frame.pack() popup = GlideChoose(self, "Are you sure you want to quit?", "Quit GLIDE", True) def kill(self): if self.envt != None: self.envt.setEndStatus(True) self.parent.destroy()