|
From: Emilien K. <cur...@us...> - 2005-08-10 03:56:32
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20113/src/unix Modified Files: Config.cpp Log Message: Use stack to store multi path for config. Index: Config.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/unix/Config.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Config.cpp 6 Aug 2005 16:12:37 -0000 1.8 --- Config.cpp 8 Aug 2005 19:14:00 -0000 1.9 *************** *** 56,64 **** m_strInstallPath = ReadConfig(WXDC_CONF_KEYNAME_INSTALLDIR , wxT(wxDC_INSTALL_TARGET)); ! m_strDataPath = ReadConfig(WXDC_CONF_KEYNAME_DATADIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/data")); ! m_strFeaturesPath = ReadConfig(WXDC_CONF_KEYNAME_FEATURESDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/lib/")) + WXDC_SETUP_APPIDENT + wxT("/features")); ! m_strPluginsPath = ReadConfig(WXDC_CONF_KEYNAME_PLUGINSDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/lib/")) + WXDC_SETUP_APPIDENT + wxT("/plugins")); ! m_strConfPath = ReadConfig(WXDC_CONF_KEYNAME_CONFDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/conf")); ! m_strUserConfPath = ReadConfig(WXDC_CONF_KEYNAME_USERCONFDIR , wxGetHomeDir() + wxT("/.") + WXDC_SETUP_APPIDENT + wxT("/conf")); } --- 56,64 ---- m_strInstallPath = ReadConfig(WXDC_CONF_KEYNAME_INSTALLDIR , wxT(wxDC_INSTALL_TARGET)); ! m_strDataPath.Add( ReadConfig(WXDC_CONF_KEYNAME_DATADIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/data"))); ! m_strFeaturesPath.Add( ReadConfig(WXDC_CONF_KEYNAME_FEATURESDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/lib/")) + WXDC_SETUP_APPIDENT + wxT("/features"))); ! m_strPluginsPath.Add( ReadConfig(WXDC_CONF_KEYNAME_PLUGINSDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/lib/")) + WXDC_SETUP_APPIDENT + wxT("/plugins"))); ! m_strConfPath.Add( ReadConfig(WXDC_CONF_KEYNAME_CONFDIR , wxString(wxDC_INSTALL_TARGET) + wxString(wxT("/share/")) + WXDC_SETUP_APPIDENT + wxT("/conf"))); ! m_strUserConfPath.Add( ReadConfig(WXDC_CONF_KEYNAME_USERCONFDIR , wxGetHomeDir() + wxT("/.") + WXDC_SETUP_APPIDENT + wxT("/conf"))); } *************** *** 113,143 **** // Retourne le chemin racine des données (images, icones, etc). ! wxString ConfigUnix::GetDataPath() { ! return m_strDataPath; } // Retourne le chemin racine des fonctionnalités. ! wxString ConfigUnix::GetFeaturesPath() { ! return m_strFeaturesPath; } // Retourne le chemin racine des pluggins. ! wxString ConfigUnix::GetPluginsPath() { ! return m_strPluginsPath; } // Retourne le chemin racine de la configuration globale. ! wxString ConfigUnix::GetGlobalConfPath() { ! return m_strConfPath; } // Retourne le chemin racine de la configuration utilisateur. ! wxString ConfigUnix::GetUserConfPath() { ! return m_strUserConfPath; } --- 113,158 ---- // Retourne le chemin racine des données (images, icones, etc). ! wxString ConfigUnix::GetDataPath(long lStackIndex) { ! if(lStackIndex>=0l && lStackIndex<(long)m_strDataPath.GetCount()) ! return m_strDataPath[lStackIndex]; ! else ! return wxT(""); } // Retourne le chemin racine des fonctionnalités. ! wxString ConfigUnix::GetFeaturesPath(long lStackIndex) { ! if(lStackIndex>=0l && lStackIndex<(long)m_strFeaturesPath.GetCount()) ! return m_strFeaturesPath[lStackIndex]; ! else ! return wxT(""); } // Retourne le chemin racine des pluggins. ! wxString ConfigUnix::GetPluginsPath(long lStackIndex) { ! if(lStackIndex>=0l && lStackIndex<(long)m_strPluginsPath.GetCount()) ! return m_strPluginsPath[lStackIndex]; ! else ! return wxT(""); } // Retourne le chemin racine de la configuration globale. ! wxString ConfigUnix::GetGlobalConfPath(long lStackIndex) { ! if(lStackIndex>=0l && lStackIndex<(long)m_strConfPath.GetCount()) ! return m_strConfPath[lStackIndex]; ! else ! return wxT(""); } // Retourne le chemin racine de la configuration utilisateur. ! wxString ConfigUnix::GetUserConfPath(long lStackIndex) { ! if(lStackIndex>=0l && lStackIndex<(long)m_strUserConfPath.GetCount()) ! return m_strUserConfPath[lStackIndex]; ! else ! return wxT(""); } |