mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Changed config type of the FeedReader. There was a conflict with general config.
Added warning in p3ConfigMgr::addConfiguration when a config type is used twice. Removed checkbox for "Experimental Features" in general page without function. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6027 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fc78f6c7ac
commit
13ac670eec
4 changed files with 28 additions and 27 deletions
|
@ -615,6 +615,14 @@ void p3ConfigMgr::addConfiguration(std::string file, pqiConfig *conf)
|
|||
filename += file;
|
||||
|
||||
conf->setFilename(filename);
|
||||
|
||||
std::map<uint32_t, pqiConfig *>::iterator cit = configs.find(conf->Type());
|
||||
if (cit != configs.end())
|
||||
{
|
||||
std::cerr << "p3Config::addConfiguration() WARNING: type " << conf->Type();
|
||||
std::cerr << " with filename " << filename;
|
||||
std::cerr << " already added with filename " << cit->second->Filename() << std::endl;
|
||||
}
|
||||
configs[conf->Type()] = conf;
|
||||
}
|
||||
|
||||
|
@ -1174,7 +1182,7 @@ p3GeneralConfig::p3GeneralConfig()
|
|||
}
|
||||
|
||||
// General Configuration System
|
||||
std::string p3GeneralConfig::getSetting(std::string opt)
|
||||
std::string p3GeneralConfig::getSetting(const std::string &opt)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG
|
||||
std::cerr << "p3GeneralConfig::getSetting(" << opt << ")";
|
||||
|
@ -1192,29 +1200,29 @@ std::string p3GeneralConfig::getSetting(std::string opt)
|
|||
return it->second;
|
||||
}
|
||||
|
||||
void p3GeneralConfig::setSetting(std::string opt, std::string val)
|
||||
void p3GeneralConfig::setSetting(const std::string &opt, const std::string &val)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG
|
||||
std::cerr << "p3GeneralConfig::setSetting(" << opt << " = " << val << ")";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
{
|
||||
RsStackMutex stack(cfgMtx); /***** LOCK STACK MUTEX ****/
|
||||
|
||||
/* extract from config */
|
||||
std::map<std::string, std::string>::iterator it;
|
||||
if (settings.end() != (it = settings.find(opt)))
|
||||
{
|
||||
if (it->second == val)
|
||||
{
|
||||
/* no change */
|
||||
return;
|
||||
}
|
||||
}
|
||||
RsStackMutex stack(cfgMtx); /***** LOCK STACK MUTEX ****/
|
||||
|
||||
settings[opt] = val;
|
||||
}
|
||||
/* outside mutex */
|
||||
/* extract from config */
|
||||
std::map<std::string, std::string>::iterator it;
|
||||
if (settings.end() != (it = settings.find(opt)))
|
||||
{
|
||||
if (it->second == val)
|
||||
{
|
||||
/* no change */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
settings[opt] = val;
|
||||
}
|
||||
/* outside mutex */
|
||||
IndicateConfigChanged();
|
||||
|
||||
return;
|
||||
|
|
|
@ -382,8 +382,8 @@ class p3GeneralConfig: public p3Config
|
|||
p3GeneralConfig();
|
||||
|
||||
// General Configuration System
|
||||
std::string getSetting(std::string opt);
|
||||
void setSetting(std::string opt, std::string val);
|
||||
std::string getSetting(const std::string &opt);
|
||||
void setSetting(const std::string &opt, const std::string &val);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue