|
From: Emilien K. <cur...@us...> - 2005-02-23 11:44:05
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27182/src Modified Files: Config.cpp Log Message: Configuration unix. Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/Config.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Config.cpp 13 Feb 2005 15:19:51 -0000 1.4 --- Config.cpp 23 Feb 2005 11:43:56 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- #include <wx/fileconf.h> + #include <wx/filefn.h> using namespace wxDevCenter; *************** *** 76,83 **** { wxFileConfig* pFC; ! wxString str; ! str << WXDC_SETUP_APPIDENT << wxT("/") << strSubConfName; ! pFC = new wxFileConfig(str, WXDC_SETUP_VENDOR, GetUserConfPath() + wxT("/") + strSubConfName + wxT(".conf"), GetGlobalConfPath() + wxT("/") + strSubConfName + wxT(".conf")); --- 77,97 ---- { wxFileConfig* pFC; ! wxString strAppName, strDir; ! strAppName << WXDC_SETUP_APPIDENT << wxT("/") << strSubConfName; ! // Création du répertoire de config global ! strDir = GetGlobalConfPath() + wxT("/") + strSubConfName; ! strDir.Replace(wxT("\\"), wxT("/")); ! strDir = strDir.BeforeLast(wxT('/')); ! if(!wxDirExists(strDir)) ! wxMkDir(strDir); ! // Création du répertoire de config utilisateur ! strDir = GetUserConfPath() + wxT("/") + strSubConfName; ! strDir.Replace(wxT("\\"), wxT("/")); ! strDir = strDir.BeforeLast(wxT('/')); ! if(!wxDirExists(strDir)) ! wxMkDir(strDir); ! ! pFC = new wxFileConfig(strAppName, WXDC_SETUP_VENDOR, GetUserConfPath() + wxT("/") + strSubConfName + wxT(".conf"), GetGlobalConfPath() + wxT("/") + strSubConfName + wxT(".conf")); |