|
From: Emilien K. <cur...@us...> - 2005-09-15 09:54:44
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16672/src Modified Files: Application.cpp Document.cpp Project.cpp FileSystem.cpp ArtProvider.cpp FileSystemTreeCtrl.cpp Plugin.cpp Log Message: Modularize FileSystemManager. Use FileSystemManager::GetManager to retreive the unique manager object. Index: ArtProvider.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/ArtProvider.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ArtProvider.cpp 14 Sep 2005 20:01:53 -0000 1.2 --- ArtProvider.cpp 15 Sep 2005 09:54:25 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- #include <wxDevCenter/Config.h> + #include <wx/dir.h> // Utilisation du namespace Index: FileSystem.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystem.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FileSystem.cpp 17 Aug 2005 16:33:17 -0000 1.8 --- FileSystem.cpp 15 Sep 2005 09:54:25 -0000 1.9 *************** *** 153,156 **** --- 153,157 ---- ////////////////////////////////////////////////////////////////////// + FileSystemManager FileSystemManager::s_FileSystemManager; FileSystemManager::FileSystemManager(): Index: Plugin.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Plugin.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Plugin.cpp 12 Aug 2005 15:49:23 -0000 1.9 --- Plugin.cpp 15 Sep 2005 09:54:25 -0000 1.10 *************** *** 29,33 **** using namespace plugins; ! /** --- 29,33 ---- using namespace plugins; ! #include <wx/dir.h> /** Index: FileSystemTreeCtrl.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/FileSystemTreeCtrl.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileSystemTreeCtrl.cpp 17 Aug 2005 15:01:06 -0000 1.2 --- FileSystemTreeCtrl.cpp 15 Sep 2005 09:54:25 -0000 1.3 *************** *** 22,26 **** #include <wxDevCenter.h> #include <wxDevCenter/FileSystemTreeCtrl.h> - #include <wxDevCenter/FileSystem.h> using namespace wxDevCenter; --- 22,25 ---- Index: Application.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Application.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Application.cpp 14 Sep 2005 20:01:53 -0000 1.34 --- Application.cpp 15 Sep 2005 09:54:25 -0000 1.35 *************** *** 97,101 **** // Initialise le gestionnaire de systèmes de fichiers m_pStandardFileSystem = new FileSystemStandard; ! m_FileSystemManager.Register(m_pStandardFileSystem, true); // Initialise les menus par défaut. --- 97,101 ---- // Initialise le gestionnaire de systèmes de fichiers m_pStandardFileSystem = new FileSystemStandard; ! FileSystemManager::GetManager().Register(m_pStandardFileSystem, true); // Initialise les menus par défaut. *************** *** 178,182 **** FileSystemDialog FD(NULL, -1, WXDC_PROJECT_QUERY_OPEN, WXDC_SYSTEM_DEFAULT_PATH); ! FD.AttachFileSystems(&m_FileSystemManager); FD.SetWildcard(m_ProjectManager.GetAllWildcard()); if(FD.ShowModal()==wxID_OK) --- 178,182 ---- FileSystemDialog FD(NULL, -1, WXDC_PROJECT_QUERY_OPEN, WXDC_SYSTEM_DEFAULT_PATH); ! FD.AttachFileSystems(&FileSystemManager::GetManager()); FD.SetWildcard(m_ProjectManager.GetAllWildcard()); if(FD.ShowModal()==wxID_OK) *************** *** 342,346 **** { FileSystemDialog FD(NULL, -1, WXDC_DOCUMENT_REQUEST_OPEN, WXDC_SYSTEM_DEFAULT_PATH); ! FD.AttachFileSystems(&m_FileSystemManager); FD.SetWildcard(m_DocManager.GetAllWildcard()); if(FD.ShowModal()==wxID_OK) --- 342,346 ---- { FileSystemDialog FD(NULL, -1, WXDC_DOCUMENT_REQUEST_OPEN, WXDC_SYSTEM_DEFAULT_PATH); ! FD.AttachFileSystems(&FileSystemManager::GetManager()); FD.SetWildcard(m_DocManager.GetAllWildcard()); if(FD.ShowModal()==wxID_OK) *************** *** 372,376 **** { FileSystemDialog FD(NULL, -1, WXDC_DOCUMENT_REQUEST_SAVE, WXDC_SYSTEM_DEFAULT_PATH, path); ! FD.AttachFileSystems(&m_FileSystemManager); FD.SetWildcard(pDoc->GetDocTemplate()->GetDocWildcard(true)); if(FD.ShowModal()==wxID_OK) --- 372,376 ---- { FileSystemDialog FD(NULL, -1, WXDC_DOCUMENT_REQUEST_SAVE, WXDC_SYSTEM_DEFAULT_PATH, path); ! FD.AttachFileSystems(&FileSystemManager::GetManager()); FD.SetWildcard(pDoc->GetDocTemplate()->GetDocWildcard(true)); if(FD.ShowModal()==wxID_OK) Index: Project.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Project.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Project.cpp 17 Aug 2005 16:33:17 -0000 1.8 --- Project.cpp 15 Sep 2005 09:54:25 -0000 1.9 *************** *** 26,29 **** --- 26,31 ---- #include <wxDevCenter/Project.h> + #include <wxDevCenter/FileSystem.h> + #include <wx/tokenzr.h> #include <wx/stream.h> *************** *** 203,207 **** { // Appelle de le chargement du projet. ! wxInputStream* pIn = Application::GetApp().GetInputStream(strFile); if(pIn!=NULL) { --- 205,209 ---- { // Appelle de le chargement du projet. ! wxInputStream* pIn = FileSystemManager::GetManager().GetInputStream(strFile); if(pIn!=NULL) { *************** *** 224,228 **** // Appelle de le chargement du projet. FilePath path = GetProject().GetPath(); ! wxOutputStream* pOut = Application::GetApp().GetOutputStream(path); if(pOut!=NULL) { --- 226,230 ---- // Appelle de le chargement du projet. FilePath path = GetProject().GetPath(); ! wxOutputStream* pOut = FileSystemManager::GetManager().GetOutputStream(path); if(pOut!=NULL) { Index: Document.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Document.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Document.cpp 17 Aug 2005 16:33:17 -0000 1.14 --- Document.cpp 15 Sep 2005 09:54:25 -0000 1.15 *************** *** 189,193 **** SetDocumentPath(strDocumentPath); ! wxInputStream* pIn = Application::GetApp().GetInputStream(strDocumentPath); if(pIn==NULL) { --- 189,193 ---- SetDocumentPath(strDocumentPath); ! wxInputStream* pIn = FileSystemManager::GetManager().GetInputStream(strDocumentPath); if(pIn==NULL) { *************** *** 208,212 **** SetDocumentPath(strDocumentPath); ! wxOutputStream* pOut = Application::GetApp().GetOutputStream(strDocumentPath); if(pOut==NULL) { --- 208,212 ---- SetDocumentPath(strDocumentPath); ! wxOutputStream* pOut = FileSystemManager::GetManager().GetOutputStream(strDocumentPath); if(pOut==NULL) { |