bool wxSTEditorFrame::Destroy() { SetSendSTEEvents(false); if (GetToolBar() && (GetToolBar() == GetOptions().GetToolBar())) // remove for safety GetOptions().SetToolBar(NULL); if (GetMenuBar() && (GetMenuBar() == GetOptions().GetMenuBar())) // remove for file history GetOptions().SetMenuBar(NULL); if (GetStatusBar() && (GetStatusBar() == GetOptions().GetStatusBar())) GetOptions().SetStatusBar(NULL); return wxFrame::Destroy(); }
wxSTEditorFrame::~wxSTEditorFrame() { SetSendSTEEvents(false); if (GetToolBar() && (GetToolBar() == GetOptions().GetToolBar())) // remove for safety GetOptions().SetToolBar(NULL); if (GetMenuBar() && (GetMenuBar() == GetOptions().GetMenuBar())) // remove for file history GetOptions().SetMenuBar(NULL); if (GetStatusBar() && (GetStatusBar() == GetOptions().GetStatusBar())) GetOptions().SetStatusBar(NULL); // This stuff always gets saved when the frame closes wxConfigBase *config = GetConfigBase(); if (config && GetOptions().HasConfigOption(STE_CONFIG_FILEHISTORY)) GetOptions().SaveFileConfig(*config); if (config && GetOptions().HasConfigOption(STE_CONFIG_FINDREPLACE) && GetOptions().GetFindReplaceData()) GetOptions().GetFindReplaceData()->SaveConfig(*config, GetOptions().GetConfigPath(STE_OPTION_CFGPATH_FINDREPLACE)); }
void wxSTEditorFrame::OnClose( wxCloseEvent &event ) { int style = event.CanVeto() ? wxYES_NO|wxCANCEL : wxYES_NO; if (GetEditorNotebook()) { if (!GetEditorNotebook()->QuerySaveIfModified(style)) { event.Veto(true); return; } } else if (GetEditor() && (GetEditor()->QuerySaveIfModified(true, style) == wxCANCEL)) { event.Veto(true); return; } // **** Shutdown so that the focus event doesn't crash the editors **** SetSendSTEEvents(false); event.Skip(); }
bool wxSTEditorNotebook::Destroy() { SetSendSTEEvents(false); return wxNotebook::Destroy(); }
wxSTEditorNotebook::~wxSTEditorNotebook() { SetSendSTEEvents(false); }