def on_close(self, e=None, exiting=False): ''' Window has been asked to close by the user. (Alt-F4 or the X button on Windows.) ''' log.info('BuddylistFrame.on_close') autohidden = False if not exiting: with traceguard: autohidden = self.maybe_undock() if not autohidden: saveWindowPos(self) # FIXME: It's probably better for us to set wx.App.SetExitOnFrameDelete based on the # setting of this pref. However, for that to work, we need to make sure wx.App.SetTopWindow # refers to this window once the splash screen is gone. if not exiting and pref('buddylist.close_button_exits', False): wx.GetApp().DigsbyCleanupAndQuit() else: self.Show(False) memory_event()
def CloseAndSaveState(self, e): # Confirm multiple tab close tabcount = self.GetTabCount() if e.CanVeto() and tabcount > 1 and pref(WARN_PREF, True): with CloseTabsDialog(self, tabcount, True) as diag: diag.CenterOnParent() res = diag.ShowModal() if not diag.WarnMe: setpref(WARN_PREF, False) if res == wx.ID_CANCEL: return False self.Hide() saveWindowPos(self, uniqueId = self.posId) # Save our window position # Call each IMWin's on_close method. if not config.nativeIMWindow: for page in self.notebook.Pages(): page.Children[0].on_close() memory_event() return True
def on_close(self, e = None): if self.IsShown(): saveWindowPos(self) self.Show(False) if self.standalone: sys.exit()
def on_close(self, e=None): if self.IsShown(): saveWindowPos(self) self.Show(False) if self.standalone: sys.exit()
def on_close(self, e=None, exiting = False): ''' Window has been asked to close by the user. (Alt-F4 or the X button on Windows.) ''' log.info('BuddylistFrame.on_close') autohidden = False if not exiting: with traceguard: autohidden = self.maybe_undock() if not autohidden: saveWindowPos(self) # FIXME: It's probably better for us to set wx.App.SetExitOnFrameDelete based on the # setting of this pref. However, for that to work, we need to make sure wx.App.SetTopWindow # refers to this window once the splash screen is gone. if not exiting and pref('buddylist.close_button_exits', False): wx.GetApp().DigsbyCleanupAndQuit() else: self.Show(False) memory_event()
def CloseAndSaveState(self, e): # Confirm multiple tab close tabcount = self.GetTabCount() if e.CanVeto() and tabcount > 1 and pref(WARN_PREF, True): with CloseTabsDialog(self, tabcount, True) as diag: diag.CenterOnParent() res = diag.ShowModal() if not diag.WarnMe: setpref(WARN_PREF, False) if res == wx.ID_CANCEL: return False self.Hide() saveWindowPos(self, uniqueId=self.posId) # Save our window position # Call each IMWin's on_close method. if not config.nativeIMWindow: for page in self.notebook.Pages(): page.Children[0].on_close() memory_event() return True