|
From: Emilien K. <cur...@us...> - 2005-08-11 11:03:14
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28941/src Modified Files: Application.cpp Plugin.cpp Log Message: Use new command line options to parse others directories for images caching and features/plugins preloading. Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Application.cpp 11 Aug 2005 09:58:17 -0000 1.26 --- Application.cpp 11 Aug 2005 11:02:47 -0000 1.27 *************** *** 425,437 **** bool Application::DoCahceIcon(wxString strIcon) { wxIconBundle IB; wxString strPathRoot; - strPathRoot << GetConfig().GetDataPath() << wxT("/icons/") << strIcon; - strPathRoot.Replace(wxT("\\"), wxT("/")); - wxArrayString arFiles; ! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT("*.gif"), wxDIR_FILES); ! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT("*.png"), wxDIR_FILES); ! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT(".ico"), wxDIR_FILES); wxBitmap EmptyBitmap(16, 16, 24); --- 425,446 ---- bool Application::DoCahceIcon(wxString strIcon) { + long l; wxIconBundle IB; wxString strPathRoot; wxArrayString arFiles; ! ! l=0; ! while(strPathRoot = GetConfig().GetDataPath(l++),!strPathRoot.IsEmpty()) ! { ! strPathRoot << wxT("/icons/") << strIcon; ! strPathRoot.Replace(wxT("\\"), wxT("/")); ! ! if(wxDir::Exists(strPathRoot)) ! { ! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT("*.gif"), wxDIR_FILES); ! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT("*.png"), wxDIR_FILES); ! wxDir::GetAllFiles(strPathRoot.BeforeLast(wxT('/')), &arFiles, strPathRoot.AfterLast(wxT('/')) + wxT(".ico"), wxDIR_FILES); ! } ! } wxBitmap EmptyBitmap(16, 16, 24); Index: Plugin.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Plugin.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Plugin.cpp 5 Aug 2005 18:59:11 -0000 1.5 --- Plugin.cpp 11 Aug 2005 11:02:47 -0000 1.6 *************** *** 440,470 **** void PluginLoader::PreLoadDescription() { ! wxString str; bool bCont; ! wxDir dir; wxLogDebug("Preload feature descriptions :"); ! if(dir.Open(Application::GetApp().GetConfig().GetFeaturesPath())) ! { ! bCont = dir.GetFirst(&str, wxEmptyString, wxDIR_DIRS); ! while(bCont) ! { ! wxLogDebug(wxT(" -> %s"), str.GetData()); ! PreLoadFeature(str); ! bCont = dir.GetNext(&str); ! } ! } ! wxLogDebug("Preload plugin descriptions :"); ! if(dir.Open(Application::GetApp().GetConfig().GetPluginsPath())) ! { ! bCont = dir.GetFirst(&str, wxEmptyString, wxDIR_DIRS); ! while(bCont) ! { ! wxLogDebug(wxT(" -> %s"), str.GetData()); ! PreLoadPlugin(str); ! bCont = dir.GetNext(&str); ! } ! } } --- 440,480 ---- void PluginLoader::PreLoadDescription() { ! wxString str, strPath; ! long l; bool bCont; ! wxDir dir; wxLogDebug("Preload feature descriptions :"); ! l = 0; ! while(strPath=Application::GetApp().GetConfig().GetFeaturesPath(l++), !strPath.IsEmpty()) ! { ! if(wxDir::Exists(strPath) && dir.Open(strPath)) ! { ! bCont = dir.GetFirst(&str, wxEmptyString, wxDIR_DIRS); ! while(bCont) ! { ! wxLogDebug(wxT(" -> %s"), str.GetData()); ! PreLoadFeature(str); ! bCont = dir.GetNext(&str); ! } ! } ! } ! ! wxLogDebug("Preload plugin descriptions :"); ! l = 0; ! while(strPath=Application::GetApp().GetConfig().GetPluginsPath(l++), !strPath.IsEmpty()) ! { ! if(wxDir::Exists(strPath) && dir.Open(strPath)) ! { ! bCont = dir.GetFirst(&str, wxEmptyString, wxDIR_DIRS); ! while(bCont) ! { ! wxLogDebug(wxT(" -> %s"), str.GetData()); ! PreLoadPlugin(str); ! bCont = dir.GetNext(&str); ! } ! } ! } } |