From 0f60379c0e899055754c8a0be01a2649cc438bc8 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Wed, 2 Jan 2013 14:01:49 +0100 Subject: [PATCH] Bug #1878 Plug package doesn't work with new Creatis Copyright headers Now skipping comments before reading packages --- .../bbtkwxGUIEditorGraphicBBS.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 ); -- 2.47.1