X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=kernel%2Fsrc%2FbbtkWxGUIScriptingInterface.cxx;h=6e20b0333eb13df2d84c9076dcff3801297b8109;hb=f596ffe4b01d1aa7605c403979c5b61ad54b0cf4;hp=4cb10db79bff0daccd28c7af3ba31cf30e133286;hpb=975161a89341e867c53da1dedd15e2f97cbd4586;p=bbtk.git diff --git a/kernel/src/bbtkWxGUIScriptingInterface.cxx b/kernel/src/bbtkWxGUIScriptingInterface.cxx index 4cb10db..6e20b03 100644 --- a/kernel/src/bbtkWxGUIScriptingInterface.cxx +++ b/kernel/src/bbtkWxGUIScriptingInterface.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $ Language: C++ - Date: $Date: 2009/04/15 15:45:49 $ - Version: $Revision: 1.37 $ + Date: $Date: 2009/11/05 16:47:42 $ + Version: $Revision: 1.39 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -243,8 +243,10 @@ namespace bbtk #endif // parent window of all bbtk windows will be a child of this - Wx::SetTopWindowParent(this); - // Add the method OnWxSignal as a Wx::Signal observer + // Wx::SetTopWindowParent(this); + Wx::SetTopWindow(this); + // Wx::SetAutoDestroyTopWindow(false); + // Add the method OnWxSignal as a Wx::Signal observer //bbtkAddWxSignalObserver(WxGUIPackageBrowser2Window::OnWxSignal); //.PaneBorder(false)); @@ -301,11 +303,29 @@ namespace bbtk //================================================================ WxGUIScriptingInterface::~WxGUIScriptingInterface() { + bbtkDebugMessage("widget",9,"bbStudio::~bbStudio()"<Close(); + } + this->Destroy(); + } + //================================================================ + + //================================================================ void WxGUIScriptingInterface::Open(const std::string& filename) { @@ -485,9 +505,12 @@ namespace bbtk //================================================================ void WxGUIScriptingInterface::OnMenuEditConfig(wxCommandEvent& WXUNUSED(event)) { + std::string configFile = ConfigurationFile::GetInstance().Get_config_xml_full_path(); Open(configFile); + wxMessageDialog ww(NULL,_T("If you change the bbtk_config.xml, you have to reinicialice this appliaction..."), _T("Alert !"), wxOK); + ww.ShowModal(); } //================================================================ @@ -916,6 +939,7 @@ namespace bbtk //================================================================ BEGIN_EVENT_TABLE(WxGUIScriptingInterface, wxFrame) + EVT_CLOSE( WxGUIScriptingInterface::OnClose) EVT_MENU(ID_Menu_Quit, WxGUIScriptingInterface::OnMenuQuit) EVT_MENU(ID_Menu_About, WxGUIScriptingInterface::OnMenuAbout) EVT_MENU(ID_Menu_EditConfig, WxGUIScriptingInterface::OnMenuEditConfig)