From: Daniel Gonzalez Date: Wed, 2 Jan 2013 13:01:49 +0000 (+0100) Subject: Bug #1878 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=bbtkGEditor.git;a=commitdiff_plain;h=0f60379c0e899055754c8a0be01a2649cc438bc8 Bug #1878 Plug package doesn't work with new Creatis Copyright headers Now skipping comments before reading packages --- diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index ca7bb43..9359662 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -1164,7 +1164,12 @@ void wxGUIEditorGraphicBBS::OnPlugPackage(wxCommandEvent& event) if(userResponse==wxID_OK) { std::string path = wx2std (FD->GetPath()) ; + #ifdef WIN32 + std::string fname = path + "\\bbtkPackage"; + #else std::string fname = path + "/bbtkPackage"; + #endif + std::cout << "Path chosen = \"" << FD->GetPath() << "\"" << std::endl; if ( Utilities::FileExists( fname ) ) { @@ -1172,6 +1177,11 @@ void wxGUIEditorGraphicBBS::OnPlugPackage(wxCommandEvent& event) f.open(fname.c_str()); std::string pname; f >> pname; + while(pname[0] == '#') + { + getline(f, pname, '\n'); + f >> pname; + } f.close(); bbtk::ConfigurationFile::GetInstance().AddPackagePathsAndWrite( path );