Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Drake Arconis
2012-02-19 16:16:34 -05:00
4 changed files with 21 additions and 16 deletions

View File

@@ -199,11 +199,15 @@ void HippoGridInfo::setPlatform(const std::string& platform)
void HippoGridInfo::setGridName(const std::string& gridName) void HippoGridInfo::setGridName(const std::string& gridName)
{ {
HippoGridManager::GridIterator it = gHippoGridManager->mGridInfo.find(mGridName); HippoGridManager::GridIterator it;
if(it != gHippoGridManager->endGrid()) for(it = gHippoGridManager->beginGrid(); it != gHippoGridManager->endGrid(); ++it)
{ {
gHippoGridManager->mGridInfo.erase(it); if (it->second == this)
gHippoGridManager->mGridInfo[gridName] = this; {
gHippoGridManager->mGridInfo.erase(it);
gHippoGridManager->mGridInfo[gridName] = this;
break;
}
} }
mGridName = gridName; mGridName = gridName;
/*if(mGridNick.empty() && !gridName.empty()) /*if(mGridNick.empty() && !gridName.empty())
@@ -568,14 +572,16 @@ std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick)
} }
const std::string& HippoGridInfo::getGridNick() std::string HippoGridInfo::getGridNick()
{ {
if(mGridNick.empty()) if(!mGridNick.empty())
{ {
mGridNick = sanitizeGridNick(mGridName); return mGridNick;
}
else
{
return sanitizeGridNick(mGridName);
} }
return mGridNick;
} }
// ******************************************************************** // ********************************************************************
@@ -843,7 +849,7 @@ void HippoGridManager::loadFromFile()
// load user grid info // load user grid info
parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg1.xml"), false); parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg1.xml"), false);
// merge default grid info, if newer. Force load, if list of grids is empty. // merge default grid info, if newer. Force load, if list of grids is empty.
parseFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml"), true); parseFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml"), !mGridInfo.empty());
// merge grid info from web site, if newer. Force load, if list of grids is empty. // merge grid info from web site, if newer. Force load, if list of grids is empty.
if (gSavedSettings.getBOOL("CheckForGridUpdates")) if (gSavedSettings.getBOOL("CheckForGridUpdates"))
parseUrl(gSavedSettings.getString("GridUpdateList"), !mGridInfo.empty()); parseUrl(gSavedSettings.getString("GridUpdateList"), !mGridInfo.empty());
@@ -951,7 +957,7 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
} }
bool newGrid = (it == mGridInfo.end()); bool newGrid = (it == mGridInfo.end());
if (newGrid) if (newGrid || !it->second)
{ {
if(gridname.empty()) if(gridname.empty())
{ {

View File

@@ -39,7 +39,6 @@ public:
Platform getPlatform(); Platform getPlatform();
bool isOpenSimulator() const; bool isOpenSimulator() const;
bool isSecondLife() const; bool isSecondLife() const;
const std::string& getGridNick();
const std::string& getGridName() const; const std::string& getGridName() const;
const std::string& getGridOwner() const; const std::string& getGridOwner() const;
const std::string& getLoginUri() const; const std::string& getLoginUri() const;
@@ -55,6 +54,7 @@ public:
const std::string& getVoiceConnector() const { return mVoiceConnector; } const std::string& getVoiceConnector() const { return mVoiceConnector; }
std::string getSearchUrl(SearchType ty, bool is_web) const; std::string getSearchUrl(SearchType ty, bool is_web) const;
bool isRenderCompat() const; bool isRenderCompat() const;
std::string getGridNick();
int getMaxAgentGroups() const { return mMaxAgentGroups; } int getMaxAgentGroups() const { return mMaxAgentGroups; }
const std::string& getCurrencySymbol() const; const std::string& getCurrencySymbol() const;

View File

@@ -1,7 +1,7 @@
<llsd> <llsd>
<map> <map>
<key>skin_name</key> <key>skin_name</key>
<string>Default</string> <string>Classic</string>
<key>author_name</key> <key>author_name</key>
<string>Linden Lab</string> <string>Linden Lab</string>
<key>additional_author_names</key> <key>additional_author_names</key>

View File

@@ -99,7 +99,7 @@
<!-- NOTIFICATION POP-UPS --> <!-- NOTIFICATION POP-UPS -->
<NotifyBoxColor value="70, 170, 255, 255" /> <NotifyBoxColor value="70, 170, 255, 255" />
<NotifyTextColor value="0, 0, 0, 255" /> <NotifyTextColor value="0, 0, 0, 255" />
<NotifyCautionBoxColor value="0, 0, 0, 255" /> <!-- the background color of caution permissions prompts --> <NotifyCautionBoxColor value="254, 209, 118, 255" /> <!-- the background color of caution permissions prompts -->
<NotifyCautionWarnColor value="0, 0, 0, 255" /> <!-- the foreground color of the special title text in caution permissions prompts --> <NotifyCautionWarnColor value="0, 0, 0, 255" /> <!-- the foreground color of the special title text in caution permissions prompts -->
<GroupNotifyBoxColor value="70, 170, 255, 255" /> <GroupNotifyBoxColor value="70, 170, 255, 255" />
<GroupNotifyTextColor value="0, 30, 60, 255" /> <GroupNotifyTextColor value="0, 30, 60, 255" />
@@ -195,12 +195,11 @@
<ConsoleBackground value="0, 0, 0, 255" /> <ConsoleBackground value="0, 0, 0, 255" />
<FolderViewLoadingMessageTextColor value="240, 165, 90, 255"/> <!-- "loading..." in the inv --> <FolderViewLoadingMessageTextColor value="240, 165, 90, 255"/> <!-- "loading..." in the inv -->
<InventoryBackgroundColor value="62, 62, 62, 80"/> <InventoryBackgroundColor value="62, 62, 62, 80"/>
<SHMediaTickerOscillatorColor value ="0, 0, 0, 191"/>
<!-- Alert box colors --> <!-- Alert box colors -->
<AlertBoxColor value="62, 62, 62, 255" /> <!-- Warnings floaters, like when returning objects --> <AlertBoxColor value="62, 62, 62, 255" /> <!-- Warnings floaters, like when returning objects -->
<AlertTextColor value="147, 169, 213, 255" /> <AlertTextColor value="147, 169, 213, 255" />
<AlertCautionBoxColor value="0, 0, 0, 255" /> <!-- Background color of caution alerts --> <AlertCautionBoxColor value="254, 209, 118, 255" /> <!-- Background color of caution alerts -->
<AlertCautionTextColor value="0, 0, 0, 255" /> <!-- Foreground color of the special title text in caution alerts --> <AlertCautionTextColor value="0, 0, 0, 255" /> <!-- Foreground color of the special title text in caution alerts -->
<!-- Multi sliders, as in the sky animation setting --> <!-- Multi sliders, as in the sky animation setting -->