Get rid of grid nicks, and just use the Grid Name everywhere (its cleaner, and one less thing to fill out).
This commit is contained in:
committed by
Siana Gearz
parent
8fc875cee8
commit
b8cd305f89
@@ -39,10 +39,9 @@ HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO("");
|
|||||||
// ********************************************************************
|
// ********************************************************************
|
||||||
// Initialize
|
// Initialize
|
||||||
|
|
||||||
HippoGridInfo::HippoGridInfo(const std::string& gridNick) :
|
HippoGridInfo::HippoGridInfo(const std::string& gridName) :
|
||||||
mPlatform(PLATFORM_OPENSIM),
|
mPlatform(PLATFORM_AURORA),
|
||||||
mGridNick(gridNick),
|
mGridName(gridName),
|
||||||
mGridName(LLStringUtil::null),
|
|
||||||
mLoginUri(LLStringUtil::null),
|
mLoginUri(LLStringUtil::null),
|
||||||
mLoginPage(LLStringUtil::null),
|
mLoginPage(LLStringUtil::null),
|
||||||
mHelperUri(LLStringUtil::null),
|
mHelperUri(LLStringUtil::null),
|
||||||
@@ -64,8 +63,6 @@ HippoGridInfo::HippoGridInfo(const std::string& gridNick) :
|
|||||||
mRealCurrencySymbol("US$"),
|
mRealCurrencySymbol("US$"),
|
||||||
mDirectoryFee(30)
|
mDirectoryFee(30)
|
||||||
{
|
{
|
||||||
std::string nick = gridNick;
|
|
||||||
mGridNick = sanitizeGridNick( nick );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -87,11 +84,6 @@ bool HippoGridInfo::isSecondLife() const
|
|||||||
return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE);
|
return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& HippoGridInfo::getGridNick() const
|
|
||||||
{
|
|
||||||
return mGridNick;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string& HippoGridInfo::getGridName() const
|
const std::string& HippoGridInfo::getGridName() const
|
||||||
{
|
{
|
||||||
return mGridName;
|
return mGridName;
|
||||||
@@ -270,7 +262,7 @@ void HippoGridInfo::setSearchUrl(const std::string& url)
|
|||||||
|
|
||||||
void HippoGridInfo::setGridMessage(const std::string& message)
|
void HippoGridInfo::setGridMessage(const std::string& message)
|
||||||
{
|
{
|
||||||
mGridMessage = url;
|
mGridMessage = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HippoGridInfo::setFirstName(const std::string& firstName)
|
void HippoGridInfo::setFirstName(const std::string& firstName)
|
||||||
@@ -410,9 +402,7 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const
|
|||||||
void HippoGridInfo::onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts)
|
void HippoGridInfo::onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts)
|
||||||
{
|
{
|
||||||
HippoGridInfo* self = (HippoGridInfo*)userData;
|
HippoGridInfo* self = (HippoGridInfo*)userData;
|
||||||
if (strcasecmp(name, "gridnick") == 0)
|
if (strcasecmp(name, "gridname") == 0)
|
||||||
self->mXmlState = XML_GRIDNICK;
|
|
||||||
else if (strcasecmp(name, "gridname") == 0)
|
|
||||||
self->mXmlState = XML_GRIDNAME;
|
self->mXmlState = XML_GRIDNAME;
|
||||||
else if (strcasecmp(name, "platform") == 0)
|
else if (strcasecmp(name, "platform") == 0)
|
||||||
self->mXmlState = XML_PLATFORM;
|
self->mXmlState = XML_PLATFORM;
|
||||||
@@ -449,13 +439,6 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le
|
|||||||
HippoGridInfo* self = (HippoGridInfo*)userData;
|
HippoGridInfo* self = (HippoGridInfo*)userData;
|
||||||
switch (self->mXmlState)
|
switch (self->mXmlState)
|
||||||
{
|
{
|
||||||
case XML_GRIDNICK:
|
|
||||||
{
|
|
||||||
if (self->mGridNick == "") self->mGridNick.assign(s, len);
|
|
||||||
self->mGridNick = sanitizeGridNick(self->mGridNick);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case XML_PLATFORM:
|
case XML_PLATFORM:
|
||||||
{
|
{
|
||||||
std::string platform(s, len);
|
std::string platform(s, len);
|
||||||
@@ -581,27 +564,6 @@ const char* HippoGridInfo::getPlatformString(Platform platform)
|
|||||||
return platformStrings[platform];
|
return platformStrings[platform];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
|
||||||
std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick)
|
|
||||||
{
|
|
||||||
std::string tmp;
|
|
||||||
int size = gridnick.size();
|
|
||||||
for (int i=0; i<size; i++)
|
|
||||||
{
|
|
||||||
char c = gridnick[i];
|
|
||||||
if ((c == '_') || isalnum(c))
|
|
||||||
{
|
|
||||||
tmp += tolower(c);
|
|
||||||
}
|
|
||||||
else if (isspace(c))
|
|
||||||
{
|
|
||||||
tmp += "_";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
std::string HippoGridInfo::sanitizeUri(std::string &uri)
|
std::string HippoGridInfo::sanitizeUri(std::string &uri)
|
||||||
{
|
{
|
||||||
@@ -621,7 +583,6 @@ std::string HippoGridInfo::sanitizeUri(std::string &uri)
|
|||||||
|
|
||||||
void HippoGridInfo::initFallback()
|
void HippoGridInfo::initFallback()
|
||||||
{
|
{
|
||||||
FALLBACK_GRIDINFO.mGridNick = "localhost";
|
|
||||||
FALLBACK_GRIDINFO.setPlatform(PLATFORM_OPENSIM);
|
FALLBACK_GRIDINFO.setPlatform(PLATFORM_OPENSIM);
|
||||||
FALLBACK_GRIDINFO.setGridName("Local Host");
|
FALLBACK_GRIDINFO.setGridName("Local Host");
|
||||||
FALLBACK_GRIDINFO.setLoginUri("http://127.0.0.1:9000/");
|
FALLBACK_GRIDINFO.setLoginUri("http://127.0.0.1:9000/");
|
||||||
@@ -656,8 +617,8 @@ void HippoGridInfo::setSupportsInvLinks(bool b) {
|
|||||||
HippoGridManager::HippoGridManager() :
|
HippoGridManager::HippoGridManager() :
|
||||||
mConnectedGrid(0),
|
mConnectedGrid(0),
|
||||||
mDefaultGridsVersion(0),
|
mDefaultGridsVersion(0),
|
||||||
mCurrentGrid("osgrid"),
|
mCurrentGrid("Local Host"),
|
||||||
mDefaultGrid("osgrid")
|
mDefaultGrid("Local Host")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -757,7 +718,7 @@ void HippoGridManager::setCurrentGridAsConnected()
|
|||||||
void HippoGridManager::addGrid(HippoGridInfo* grid)
|
void HippoGridManager::addGrid(HippoGridInfo* grid)
|
||||||
{
|
{
|
||||||
if (!grid) return;
|
if (!grid) return;
|
||||||
const std::string& nick = grid->getGridNick();
|
const std::string& nick = grid->getGridName();
|
||||||
if (nick == "")
|
if (nick == "")
|
||||||
{
|
{
|
||||||
llwarns << "Ignoring to try adding grid with empty nick." << llendl;
|
llwarns << "Ignoring to try adding grid with empty nick." << llendl;
|
||||||
@@ -925,16 +886,16 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
|
|||||||
{
|
{
|
||||||
mDefaultGridsVersion = gridMap["default_grids_version"];
|
mDefaultGridsVersion = gridMap["default_grids_version"];
|
||||||
}
|
}
|
||||||
else if (gridMap.has("gridnick") && gridMap.has("loginuri"))
|
else if (gridMap.has("gridname") && gridMap.has("loginuri"))
|
||||||
{
|
{
|
||||||
std::string gridnick = gridMap["gridnick"];
|
std::string gridname = gridMap["gridname"];
|
||||||
HippoGridInfo* grid;
|
HippoGridInfo* grid;
|
||||||
GridIterator it = mGridInfo.find(gridnick);
|
GridIterator it = mGridInfo.find(gridname);
|
||||||
bool newGrid = (it == mGridInfo.end());
|
bool newGrid = (it == mGridInfo.end());
|
||||||
if (newGrid)
|
if (newGrid)
|
||||||
{
|
{
|
||||||
// create new grid info
|
// create new grid info
|
||||||
grid = new HippoGridInfo(gridnick);
|
grid = new HippoGridInfo(gridname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -977,7 +938,6 @@ void HippoGridManager::saveFile()
|
|||||||
for (it = mGridInfo.begin(); it != end; ++it, i++)
|
for (it = mGridInfo.begin(); it != end; ++it, i++)
|
||||||
{
|
{
|
||||||
HippoGridInfo* grid = it->second;
|
HippoGridInfo* grid = it->second;
|
||||||
gridInfo[i]["gridnick"] = grid->getGridNick();
|
|
||||||
gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform());
|
gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform());
|
||||||
gridInfo[i]["gridname"] = grid->getGridName();
|
gridInfo[i]["gridname"] = grid->getGridName();
|
||||||
gridInfo[i]["loginuri"] = grid->getLoginUri();
|
gridInfo[i]["loginuri"] = grid->getLoginUri();
|
||||||
|
|||||||
@@ -34,12 +34,11 @@ public:
|
|||||||
SEARCH_ALL_TEMPLATE
|
SEARCH_ALL_TEMPLATE
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit HippoGridInfo(const std::string& gridNick);
|
explicit HippoGridInfo(const std::string& gridName);
|
||||||
|
|
||||||
Platform getPlatform();
|
Platform getPlatform();
|
||||||
bool isOpenSimulator() const;
|
bool isOpenSimulator() const;
|
||||||
bool isSecondLife() const;
|
bool isSecondLife() const;
|
||||||
const std::string& getGridNick() const;
|
|
||||||
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;
|
||||||
@@ -95,14 +94,12 @@ public:
|
|||||||
bool retrieveGridInfo();
|
bool retrieveGridInfo();
|
||||||
|
|
||||||
static const char* getPlatformString(Platform platform);
|
static const char* getPlatformString(Platform platform);
|
||||||
static std::string sanitizeGridNick(std::string &gridnick);
|
|
||||||
|
|
||||||
static HippoGridInfo FALLBACK_GRIDINFO;
|
static HippoGridInfo FALLBACK_GRIDINFO;
|
||||||
static void initFallback();
|
static void initFallback();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Platform mPlatform;
|
Platform mPlatform;
|
||||||
std::string mGridNick;
|
|
||||||
std::string mGridName;
|
std::string mGridName;
|
||||||
std::string mLoginUri;
|
std::string mLoginUri;
|
||||||
std::string mLoginPage;
|
std::string mLoginPage;
|
||||||
@@ -128,7 +125,7 @@ private:
|
|||||||
// for parsing grid info XML
|
// for parsing grid info XML
|
||||||
enum XmlState
|
enum XmlState
|
||||||
{
|
{
|
||||||
XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME,
|
XML_VOID, XML_PLATFORM, XML_GRIDNAME,
|
||||||
XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI,
|
XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI,
|
||||||
XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH, XML_MESSAGE
|
XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH, XML_MESSAGE
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ HippoPanelGridsImpl::~HippoPanelGridsImpl()
|
|||||||
BOOL HippoPanelGridsImpl::postBuild()
|
BOOL HippoPanelGridsImpl::postBuild()
|
||||||
{
|
{
|
||||||
requires<LLComboBox>("grid_selector");
|
requires<LLComboBox>("grid_selector");
|
||||||
requires<LLLineEditor>("gridnick");
|
|
||||||
requires<LLComboBox>("platform");
|
requires<LLComboBox>("platform");
|
||||||
requires<LLLineEditor>("gridname");
|
requires<LLLineEditor>("gridname");
|
||||||
requires<LLLineEditor>("loginuri");
|
requires<LLLineEditor>("loginuri");
|
||||||
@@ -176,7 +175,7 @@ void HippoPanelGridsImpl::refresh()
|
|||||||
}
|
}
|
||||||
HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid();
|
HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid();
|
||||||
for (it = gHippoGridManager->beginGrid(); it != end; ++it) {
|
for (it = gHippoGridManager->beginGrid(); it != end; ++it) {
|
||||||
const std::string &grid = it->second->getGridNick();
|
const std::string &grid = it->second->getGridName();
|
||||||
if (grid != defaultGrid) {
|
if (grid != defaultGrid) {
|
||||||
grids->add(grid);
|
grids->add(grid);
|
||||||
if (grid == mCurGrid) selectIndex = i;
|
if (grid == mCurGrid) selectIndex = i;
|
||||||
@@ -198,13 +197,13 @@ void HippoPanelGridsImpl::refresh()
|
|||||||
childSetEnabled("btn_delete", (selectIndex >= 0));
|
childSetEnabled("btn_delete", (selectIndex >= 0));
|
||||||
childSetEnabled("btn_copy", (mState == NORMAL) && (selectIndex >= 0));
|
childSetEnabled("btn_copy", (mState == NORMAL) && (selectIndex >= 0));
|
||||||
childSetEnabled("btn_default", (mState == NORMAL) && (selectIndex > 0));
|
childSetEnabled("btn_default", (mState == NORMAL) && (selectIndex > 0));
|
||||||
childSetEnabled("gridnick", (mState == ADD_NEW) || (mState == ADD_COPY));
|
childSetEnabled("gridname", (mState == ADD_NEW) || (mState == ADD_COPY));
|
||||||
|
|
||||||
if (childGetValue("platform").asString() == "SecondLife") {
|
if (childGetValue("platform").asString() == "SecondLife") {
|
||||||
// disable platform selector, if logged into the grid edited and it is SL
|
// disable platform selector, if logged into the grid edited and it is SL
|
||||||
// so object export restrictions cannot be circumvented by changing the platform
|
// so object export restrictions cannot be circumvented by changing the platform
|
||||||
bool enablePlatform = (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) ||
|
bool enablePlatform = (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) ||
|
||||||
(mCurGrid != gHippoGridManager->getConnectedGrid()->getGridNick());
|
(mCurGrid != gHippoGridManager->getConnectedGrid()->getGridName());
|
||||||
childSetEnabled("platform", enablePlatform);
|
childSetEnabled("platform", enablePlatform);
|
||||||
childSetEnabled("search", false);
|
childSetEnabled("search", false);
|
||||||
childSetText("search", LLStringExplicit(""));
|
childSetText("search", LLStringExplicit(""));
|
||||||
@@ -232,7 +231,7 @@ void HippoPanelGridsImpl::apply()
|
|||||||
gHippoGridManager->saveFile();
|
gHippoGridManager->saveFile();
|
||||||
refresh();
|
refresh();
|
||||||
// update render compatibility
|
// update render compatibility
|
||||||
if (mCurGrid == gHippoGridManager->getConnectedGrid()->getGridNick())
|
if (mCurGrid == gHippoGridManager->getConnectedGrid()->getGridName())
|
||||||
gHippoLimits->setLimits();
|
gHippoLimits->setLimits();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +249,6 @@ void HippoPanelGridsImpl::loadCurGrid()
|
|||||||
{
|
{
|
||||||
HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid);
|
HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid);
|
||||||
if (gridInfo && (mState != ADD_NEW)) {
|
if (gridInfo && (mState != ADD_NEW)) {
|
||||||
childSetText("gridnick", gridInfo->getGridNick());
|
|
||||||
LLComboBox *platform = getChild<LLComboBox>("platform");
|
LLComboBox *platform = getChild<LLComboBox>("platform");
|
||||||
if (platform) platform->setCurrentByIndex(gridInfo->getPlatform());
|
if (platform) platform->setCurrentByIndex(gridInfo->getPlatform());
|
||||||
childSetText("gridname", gridInfo->getGridName());
|
childSetText("gridname", gridInfo->getGridName());
|
||||||
@@ -264,7 +262,6 @@ void HippoPanelGridsImpl::loadCurGrid()
|
|||||||
childSetValue("render_compat", gridInfo->isRenderCompat());
|
childSetValue("render_compat", gridInfo->isRenderCompat());
|
||||||
} else {
|
} else {
|
||||||
std::string empty = "";
|
std::string empty = "";
|
||||||
childSetText("gridnick", empty);
|
|
||||||
LLComboBox *platform = getChild<LLComboBox>("platform");
|
LLComboBox *platform = getChild<LLComboBox>("platform");
|
||||||
if (platform) platform->setCurrentByIndex(HippoGridInfo::PLATFORM_OTHER);
|
if (platform) platform->setCurrentByIndex(HippoGridInfo::PLATFORM_OTHER);
|
||||||
childSetText("gridname", empty);
|
childSetText("gridname", empty);
|
||||||
@@ -281,10 +278,10 @@ void HippoPanelGridsImpl::loadCurGrid()
|
|||||||
|
|
||||||
if (mState == ADD_NEW) {
|
if (mState == ADD_NEW) {
|
||||||
std::string required = "<required>";
|
std::string required = "<required>";
|
||||||
childSetText("gridnick", required);
|
childSetText("gridname", required);
|
||||||
childSetText("loginuri", required);
|
childSetText("loginuri", required);
|
||||||
} else if (mState == ADD_COPY) {
|
} else if (mState == ADD_COPY) {
|
||||||
childSetText("gridnick", std::string("<required>"));
|
childSetText("gridname", std::string("<required>"));
|
||||||
} else if (mState != NORMAL) {
|
} else if (mState != NORMAL) {
|
||||||
llwarns << "Illegal state " << mState << '.' << llendl;
|
llwarns << "Illegal state " << mState << '.' << llendl;
|
||||||
}
|
}
|
||||||
@@ -300,21 +297,21 @@ bool HippoPanelGridsImpl::saveCurGrid()
|
|||||||
if (mState == NORMAL) {
|
if (mState == NORMAL) {
|
||||||
|
|
||||||
gridInfo = gHippoGridManager->getGrid(mCurGrid);
|
gridInfo = gHippoGridManager->getGrid(mCurGrid);
|
||||||
|
gridInfo->retrieveGridInfo();
|
||||||
|
refresh();
|
||||||
} else if ((mState == ADD_NEW) || (mState == ADD_COPY)) {
|
} else if ((mState == ADD_NEW) || (mState == ADD_COPY)) {
|
||||||
|
|
||||||
// check nickname
|
// check nickname
|
||||||
std::string gridnick = childGetValue("gridnick");
|
std::string gridname = childGetValue("gridname");
|
||||||
if (gridnick == "<required>") gridnick = "";
|
if (gridname == "<required>") gridname = "";
|
||||||
HippoGridInfo::sanitizeGridNick(gridnick);
|
childSetValue("gridname", (gridname != "")? gridname: "<required>");
|
||||||
childSetValue("gridnick", (gridnick != "")? gridnick: "<required>");
|
if (gridname == "") {
|
||||||
if (gridnick == "") {
|
|
||||||
LLNotifications::instance().add("GridsNoNick");
|
LLNotifications::instance().add("GridsNoNick");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (gHippoGridManager->getGrid(gridnick)) {
|
if (gHippoGridManager->getGrid(gridname)) {
|
||||||
LLSD args;
|
LLSD args;
|
||||||
args["NAME"] = gridnick;
|
args["NAME"] = gridname;
|
||||||
LLNotifications::instance().add("GridExists", args);
|
LLNotifications::instance().add("GridExists", args);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -323,18 +320,16 @@ bool HippoPanelGridsImpl::saveCurGrid()
|
|||||||
std::string loginuri = childGetValue("loginuri");
|
std::string loginuri = childGetValue("loginuri");
|
||||||
if ((loginuri == "") || (loginuri == "<required>")) {
|
if ((loginuri == "") || (loginuri == "<required>")) {
|
||||||
LLSD args;
|
LLSD args;
|
||||||
args["NAME"] = gridnick;
|
args["NAME"] = gridname;
|
||||||
LLNotifications::instance().add("GridsNoLoginUri", args);
|
LLNotifications::instance().add("GridsNoLoginUri", args);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mState = NORMAL;
|
mState = NORMAL;
|
||||||
mCurGrid = gridnick;
|
mCurGrid = gridname;
|
||||||
gridInfo = new HippoGridInfo(gridnick);
|
gridInfo = new HippoGridInfo(gridname);
|
||||||
gHippoGridManager->addGrid(gridInfo);
|
gHippoGridManager->addGrid(gridInfo);
|
||||||
gridInfo->retrieveGridInfo();
|
gridInfo->retrieveGridInfo();
|
||||||
refresh();
|
|
||||||
return true;
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
llwarns << "Illegal state " << mState << '.' << llendl;
|
llwarns << "Illegal state " << mState << '.' << llendl;
|
||||||
@@ -346,12 +341,7 @@ bool HippoPanelGridsImpl::saveCurGrid()
|
|||||||
llwarns << "Grid not found, ignoring changes." << llendl;
|
llwarns << "Grid not found, ignoring changes." << llendl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gridInfo->getGridNick() != childGetValue("gridnick").asString()) {
|
|
||||||
llwarns << "Grid nickname mismatch, ignoring changes." << llendl;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
gridInfo->setPlatform(childGetValue("platform"));
|
gridInfo->setPlatform(childGetValue("platform"));
|
||||||
gridInfo->setGridName(childGetValue("gridname"));
|
gridInfo->setGridName(childGetValue("gridname"));
|
||||||
gridInfo->setLoginUri(childGetValue("loginuri"));
|
gridInfo->setLoginUri(childGetValue("loginuri"));
|
||||||
@@ -406,7 +396,6 @@ void HippoPanelGridsImpl::retrieveGridInfo()
|
|||||||
|
|
||||||
grid->setLoginUri(loginuri);
|
grid->setLoginUri(loginuri);
|
||||||
if (grid->retrieveGridInfo()) {
|
if (grid->retrieveGridInfo()) {
|
||||||
if (grid->getGridNick() != "") childSetText("gridnick", grid->getGridNick());
|
|
||||||
if (grid->getPlatform() != HippoGridInfo::PLATFORM_OTHER)
|
if (grid->getPlatform() != HippoGridInfo::PLATFORM_OTHER)
|
||||||
getChild<LLComboBox>("platform")->setCurrentByIndex(grid->getPlatform());
|
getChild<LLComboBox>("platform")->setCurrentByIndex(grid->getPlatform());
|
||||||
if (grid->getGridName() != "") childSetText("gridname", grid->getGridName());
|
if (grid->getGridName() != "") childSetText("gridname", grid->getGridName());
|
||||||
@@ -418,6 +407,7 @@ void HippoPanelGridsImpl::retrieveGridInfo()
|
|||||||
if (grid->getRegisterUrl() != "") childSetText("register", grid->getRegisterUrl());
|
if (grid->getRegisterUrl() != "") childSetText("register", grid->getRegisterUrl());
|
||||||
if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl());
|
if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl());
|
||||||
if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl());
|
if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl());
|
||||||
|
if (grid->getGridMessage() != "") childSetText("gridmessage", grid->getGridMessage());
|
||||||
} else {
|
} else {
|
||||||
LLNotifications::instance().add("GridInfoError");
|
LLNotifications::instance().add("GridInfoError");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,8 +145,7 @@ LLFloaterAbout::LLFloaterAbout()
|
|||||||
|
|
||||||
std::string support;
|
std::string support;
|
||||||
support.append("\n\n");
|
support.append("\n\n");
|
||||||
support.append("Grid: " + gHippoGridManager->getConnectedGrid()->getGridName()
|
support.append("Grid: " + gHippoGridManager->getConnectedGrid()->getGridName() + "\n\n");
|
||||||
+ " (" + gHippoGridManager->getConnectedGrid()->getGridNick() + ")\n\n");
|
|
||||||
|
|
||||||
#if LL_MSVC
|
#if LL_MSVC
|
||||||
support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER));
|
support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER));
|
||||||
|
|||||||
@@ -860,7 +860,7 @@ void LLPanelLogin::updateGridCombo()
|
|||||||
}
|
}
|
||||||
HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid();
|
HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid();
|
||||||
for (it = gHippoGridManager->beginGrid(); it != end; ++it) {
|
for (it = gHippoGridManager->beginGrid(); it != end; ++it) {
|
||||||
const std::string &grid = it->second->getGridNick();
|
const std::string &grid = it->second->getGridName();
|
||||||
if (grid != defaultGrid) {
|
if (grid != defaultGrid) {
|
||||||
grids->add(grid);
|
grids->add(grid);
|
||||||
if (grid == currentGrid) selectIndex = i;
|
if (grid == currentGrid) selectIndex = i;
|
||||||
|
|||||||
@@ -1588,7 +1588,7 @@ bool idle_startup()
|
|||||||
std::string history_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg2.xml");
|
std::string history_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg2.xml");
|
||||||
|
|
||||||
LLSavedLogins history_data = LLSavedLogins::loadFile(history_file);
|
LLSavedLogins history_data = LLSavedLogins::loadFile(history_file);
|
||||||
std::string grid_nick = gHippoGridManager->getConnectedGrid()->getGridNick();
|
std::string grid_nick = gHippoGridManager->getConnectedGrid()->getGridName();
|
||||||
history_data.deleteEntry(firstname, lastname, grid_nick);
|
history_data.deleteEntry(firstname, lastname, grid_nick);
|
||||||
if (gSavedSettings.getBOOL("RememberLogin"))
|
if (gSavedSettings.getBOOL("RememberLogin"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const
|
|||||||
|
|
||||||
const std::string &LLViewerLogin::getGridLabel() const
|
const std::string &LLViewerLogin::getGridLabel() const
|
||||||
{
|
{
|
||||||
return gHippoGridManager->getConnectedGrid()->getGridNick();
|
return gHippoGridManager->getConnectedGrid()->getGridName();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string &LLViewerLogin::getLoginPage() const
|
const std::string &LLViewerLogin::getLoginPage() const
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ void LLXMLRPCTransaction::Impl::setStatus(Status status,
|
|||||||
mStatusMessage =
|
mStatusMessage =
|
||||||
"Despite our best efforts, something unexpected has gone wrong. \n"
|
"Despite our best efforts, something unexpected has gone wrong. \n"
|
||||||
" \n"
|
" \n"
|
||||||
"Please check " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s status \n"
|
"Please check " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s status \n"
|
||||||
"to see if there is a known problem with the service.";
|
"to see if there is a known problem with the service.";
|
||||||
|
|
||||||
//mStatusURI = "http://secondlife.com/status/";
|
//mStatusURI = "http://secondlife.com/status/";
|
||||||
@@ -449,7 +449,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
|
|||||||
case CURLE_COULDNT_RESOLVE_HOST:
|
case CURLE_COULDNT_RESOLVE_HOST:
|
||||||
message =
|
message =
|
||||||
"DNS could not resolve the host name.\n"
|
"DNS could not resolve the host name.\n"
|
||||||
"Please verify that you can connect to " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s\n"
|
"Please verify that you can connect to " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s\n"
|
||||||
"web site. If you can, but continue to receive this error,\n"
|
"web site. If you can, but continue to receive this error,\n"
|
||||||
"please go to the support section and report this problem.";
|
"please go to the support section and report this problem.";
|
||||||
break;
|
break;
|
||||||
@@ -458,7 +458,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
|
|||||||
message =
|
message =
|
||||||
"The login server couldn't verify itself via SSL.\n"
|
"The login server couldn't verify itself via SSL.\n"
|
||||||
"If you continue to receive this error, please go\n"
|
"If you continue to receive this error, please go\n"
|
||||||
"to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s web site\n"
|
"to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s web site\n"
|
||||||
"and report the problem.";
|
"and report the problem.";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -470,7 +470,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
|
|||||||
"are set correctly.\n"
|
"are set correctly.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If you continue to receive this error, please go\n"
|
"If you continue to receive this error, please go\n"
|
||||||
"to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s web site\n"
|
"to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s web site\n"
|
||||||
"and report the problem.";
|
"and report the problem.";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -82,22 +82,6 @@
|
|||||||
<combo_box max_chars="20" allow_text_entry="false" name="platform"
|
<combo_box max_chars="20" allow_text_entry="false" name="platform"
|
||||||
height="18" width="200" left="120" bottom_delta="-4"
|
height="18" width="200" left="120" bottom_delta="-4"
|
||||||
follows="left|top" mouse_opaque="true" />
|
follows="left|top" mouse_opaque="true" />
|
||||||
<!-- Grid Nickname -->
|
|
||||||
<text type="string" length="1" enabled="true" name="gridnick_label"
|
|
||||||
height="10" width="100" left="12" bottom_delta="-22"
|
|
||||||
h_pad="0" v_pad="0" halign="left"
|
|
||||||
font="SansSerifSmall"
|
|
||||||
follows="left|top" bg_visible="false" border_visible="false" mouse_opaque="true"
|
|
||||||
drop_shadow_visible="true" border_drop_shadow_visible="false">
|
|
||||||
Grid Nickname:
|
|
||||||
</text>
|
|
||||||
<line_editor max_length="25" enabled="false" name="gridnick"
|
|
||||||
handle_edit_keys_directly="true"
|
|
||||||
height="18" width="175" left="120" bottom_delta="-4"
|
|
||||||
halign="right"
|
|
||||||
font="SansSerifSmall"
|
|
||||||
follows="left|top" border_visible="false" mouse_opaque="false"
|
|
||||||
drop_shadow_visible="true" border_drop_shadow_visible="false" />
|
|
||||||
<!-- Grid Name -->
|
<!-- Grid Name -->
|
||||||
<text type="string" length="1" enabled="true" name="gridname_label"
|
<text type="string" length="1" enabled="true" name="gridname_label"
|
||||||
height="10" width="100" left="12" bottom_delta="-20"
|
height="10" width="100" left="12" bottom_delta="-20"
|
||||||
|
|||||||
Reference in New Issue
Block a user