From e99e8b57520974fef73646343afaa7bbfa8b800e Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Nov 2010 13:47:32 -0700 Subject: Fixed missing UseLocalChatWithBubbles control introduced in af6877fb (#685), patch by Nicky Perian --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 91ed5c2..ccee513 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -1183,6 +1183,17 @@ Value 0 + UseLocalChatWithBubbles + + Comment + Should local chat still appear even when using chat bubbles? + Persist + 1 + Type + Boolean + Value + 1 + UseUTCTime Comment -- cgit v1.1 From 65bab486030247ee84d67b20df89e0d34c52691d Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Nov 2010 13:59:16 -0700 Subject: Applied patch by Nicky Perian for #680: commented out unused references to gstreamer post-webkit_plugins in viewer_manifest.py --- linden/indra/newview/viewer_manifest.py | 109 ++++++++++++++++---------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index f1892fc..e0f08b2 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -339,63 +339,64 @@ class WindowsManifest(ViewerManifest): self.path("ortp.dll") self.end_prefix() - +# Gstreamer is not used in webkit_plugins. The librries are never delivered/extracted to +# ../../libraries/i686-win32/lib/release . Commented out until decision made to use or drop. # Gstreamer plugins - if self.prefix(src="lib/gstreamer-plugins", dst=""): - self.path("*.dll", dst="lib/gstreamer-plugins/*.dll") - self.end_prefix() + #if self.prefix(src="lib/gstreamer-plugins", dst=""): + # self.path("*.dll", dst="lib/gstreamer-plugins/*.dll") + # self.end_prefix() # Gstreamer libs - if (not self.standalone()) and self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): - self.path("iconv.dll") - self.path("libxml2.dll") - self.path("libcairo-2.dll") - self.path("libgio-2.0-0.dll") - self.path("libglib-2.0-0.dll") - self.path("libgmodule-2.0-0.dll") - self.path("libgobject-2.0-0.dll") - self.path("libgthread-2.0-0.dll") - self.path("charset.dll") - self.path("intl.dll") - self.path("libgcrypt-11.dll") - self.path("libgnutls-26.dll") - self.path("libgpg-error-0.dll") - self.path("libgstapp.dll") - self.path("libgstaudio.dll") - self.path("libgstbase-0.10.dll") - self.path("libgstcdda.dll") - self.path("libgstcontroller-0.10.dll") - self.path("libgstdataprotocol-0.10.dll") - self.path("libgstdshow.dll") - self.path("libgstfft.dll") - self.path("libgstinterfaces.dll") - self.path("libgstnet-0.10.dll") - self.path("libgstnetbuffer.dll") - self.path("libgstpbutils.dll") - self.path("libgstreamer-0.10.dll") - self.path("libgstriff.dll") - self.path("libgstrtp.dll") - self.path("libgstrtsp.dll") - self.path("libgstsdp.dll") - self.path("libgsttag.dll") - self.path("libgstvideo.dll") - self.path("libjpeg.dll") - self.path("libmp3lame-0.dll") - self.path("libneon-27.dll") - self.path("libogg-0.dll") - self.path("liboil-0.3-0.dll") - self.path("libopenjpeg-2.dll") - self.path("libpng12-0.dll") - self.path("libschroedinger-1.0-0.dll") - self.path("libspeex-1.dll") - self.path("libtheora-0.dll") - self.path("libvorbis-0.dll") - self.path("libvorbisenc-2.dll") - self.path("libxml2-2.dll") - self.path("glew32.dll") - self.path("xvidcore.dll") - self.path("zlib1.dll") - self.end_prefix() + #if (not self.standalone()) and self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): + # self.path("iconv.dll") + # self.path("libxml2.dll") + # self.path("libcairo-2.dll") + # self.path("libgio-2.0-0.dll") + # self.path("libglib-2.0-0.dll") + # self.path("libgmodule-2.0-0.dll") + # self.path("libgobject-2.0-0.dll") + # self.path("libgthread-2.0-0.dll") + # self.path("charset.dll") + # self.path("intl.dll") + # self.path("libgcrypt-11.dll") + # self.path("libgnutls-26.dll") + # self.path("libgpg-error-0.dll") + # self.path("libgstapp.dll") + # self.path("libgstaudio.dll") + # self.path("libgstbase-0.10.dll") + # self.path("libgstcdda.dll") + # self.path("libgstcontroller-0.10.dll") + # self.path("libgstdataprotocol-0.10.dll") + # self.path("libgstdshow.dll") + # self.path("libgstfft.dll") + # self.path("libgstinterfaces.dll") + # self.path("libgstnet-0.10.dll") + # self.path("libgstnetbuffer.dll") + # self.path("libgstpbutils.dll") + # self.path("libgstreamer-0.10.dll") + # self.path("libgstriff.dll") + # self.path("libgstrtp.dll") + # self.path("libgstrtsp.dll") + # self.path("libgstsdp.dll") + # self.path("libgsttag.dll") + # self.path("libgstvideo.dll") + # self.path("libjpeg.dll") + # self.path("libmp3lame-0.dll") + # self.path("libneon-27.dll") + # self.path("libogg-0.dll") + # self.path("liboil-0.3-0.dll") + # self.path("libopenjpeg-2.dll") + # self.path("libpng12-0.dll") + # self.path("libschroedinger-1.0-0.dll") + # self.path("libspeex-1.dll") + # self.path("libtheora-0.dll") + # self.path("libvorbis-0.dll") + # self.path("libvorbisenc-2.dll") + # self.path("libxml2-2.dll") + # self.path("glew32.dll") + # self.path("xvidcore.dll") + # self.path("zlib1.dll") + # self.end_prefix() # # pull in the crash logger and updater from other projects # self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter -- cgit v1.1 From d13d991d2d29bd3d0cc9a0d4e5480a0705681d06 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Nov 2010 14:01:50 -0700 Subject: Applied patch by Ansariel Hiller for #675: Keywords update to reflect changes to llSensor LSL function --- linden/indra/newview/app_settings/dictionaries/en_sl.dic | 2 ++ linden/indra/newview/app_settings/keywords.ini | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/linden/indra/newview/app_settings/dictionaries/en_sl.dic b/linden/indra/newview/app_settings/dictionaries/en_sl.dic index f37b60d..09076f7 100644 --- a/linden/indra/newview/app_settings/dictionaries/en_sl.dic +++ b/linden/indra/newview/app_settings/dictionaries/en_sl.dic @@ -1098,6 +1098,8 @@ STATUS_DIE_AT_EDGE STATUS_RETURN_AT_EDGE STATUS_CAST_SHADOWS AGENT +AGENT_BY_USERNAME +AGENT_BY_LEGACY_NAME ACTIVE PASSIVE SCRIPTED diff --git a/linden/indra/newview/app_settings/keywords.ini b/linden/indra/newview/app_settings/keywords.ini index 8e303dc..36a4cdc 100644 --- a/linden/indra/newview/app_settings/keywords.ini +++ b/linden/indra/newview/app_settings/keywords.ini @@ -66,7 +66,9 @@ STATUS_BLOCK_GRAB Passed in the llSetStatus library function. If TRUE, object c STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects -AGENT Passed in llSensor library function to look for other Agents +AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME +AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username +AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name ACTIVE Passed in llSensor library function to look for moving objects PASSIVE Passed in llSensor library function to look for objects that aren't moving SCRIPTED Passed in llSensor library function to look for scripted objects -- cgit v1.1 From 10394290949522474a483e97688a04088fec3baf Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 3 Nov 2010 17:53:55 +0100 Subject: Rename hippo* files to lower case (PART 1 OF 2) There was a problem with #include "hippolimits.h" because the file is called hippoLimits.h (with an uppercase L). After some discussion on IRC it was reluctantly decided that filenames should be lowercase, as is done for every Linden file. Moreover, hippolimits.h is about the class HippoLimits, with uppercase H, so even that doesn't match. Of course, then we immediately rename all hippo* files to lowercase. This patch ONLY renames the file, with no other changes. This is done in order to make sure that git won't get confused ;). All other necessary changes will be in the next commit. --- linden/indra/newview/hippoGridManager.cpp | 970 ------------------------------ linden/indra/newview/hippoGridManager.h | 183 ------ linden/indra/newview/hippoLimits.cpp | 224 ------- linden/indra/newview/hippoLimits.h | 72 --- linden/indra/newview/hippoRestRequest.cpp | 352 ----------- linden/indra/newview/hippoRestRequest.h | 104 ---- linden/indra/newview/hippoUpdate.cpp | 92 --- linden/indra/newview/hippoUpdate.h | 12 - linden/indra/newview/hippogridmanager.cpp | 970 ++++++++++++++++++++++++++++++ linden/indra/newview/hippogridmanager.h | 183 ++++++ linden/indra/newview/hippolimits.cpp | 224 +++++++ linden/indra/newview/hippolimits.h | 72 +++ linden/indra/newview/hipporestrequest.cpp | 352 +++++++++++ linden/indra/newview/hipporestrequest.h | 104 ++++ linden/indra/newview/hippoupdate.cpp | 92 +++ linden/indra/newview/hippoupdate.h | 12 + 16 files changed, 2009 insertions(+), 2009 deletions(-) delete mode 100644 linden/indra/newview/hippoGridManager.cpp delete mode 100644 linden/indra/newview/hippoGridManager.h delete mode 100644 linden/indra/newview/hippoLimits.cpp delete mode 100644 linden/indra/newview/hippoLimits.h delete mode 100644 linden/indra/newview/hippoRestRequest.cpp delete mode 100644 linden/indra/newview/hippoRestRequest.h delete mode 100644 linden/indra/newview/hippoUpdate.cpp delete mode 100644 linden/indra/newview/hippoUpdate.h create mode 100644 linden/indra/newview/hippogridmanager.cpp create mode 100644 linden/indra/newview/hippogridmanager.h create mode 100644 linden/indra/newview/hippolimits.cpp create mode 100644 linden/indra/newview/hippolimits.h create mode 100644 linden/indra/newview/hipporestrequest.cpp create mode 100644 linden/indra/newview/hipporestrequest.h create mode 100644 linden/indra/newview/hippoupdate.cpp create mode 100644 linden/indra/newview/hippoupdate.h diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp deleted file mode 100644 index dd0fa35..0000000 --- a/linden/indra/newview/hippoGridManager.cpp +++ /dev/null @@ -1,970 +0,0 @@ -// Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli - -#include "llviewerprecompiledheaders.h" - -#include "hippoGridManager.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include "lltrans.h" -#include "llviewercontrol.h" -#include "llweb.h" - -#include "hippoRestRequest.h" - - -// ******************************************************************** -// Global Variables - -HippoGridManager* gHippoGridManager = 0; - -HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO(""); - - - -// ******************************************************************** -// ******************************************************************** -// HippoGridInfo -// ******************************************************************** -// ******************************************************************** - - -// ******************************************************************** -// Initialize - -HippoGridInfo::HippoGridInfo(const std::string& gridNick) : - mPlatform(PLATFORM_OPENSIM), - mGridNick(gridNick), - mGridName(LLStringUtil::null), - mLoginUri(LLStringUtil::null), - mLoginPage(LLStringUtil::null), - mHelperUri(LLStringUtil::null), - mWebSite(LLStringUtil::null), - mSupportUrl(LLStringUtil::null), - mRegisterUrl(LLStringUtil::null), - mPasswordUrl(LLStringUtil::null), - mSearchUrl(LLStringUtil::null), - mFirstName(LLStringUtil::null), - mLastName(LLStringUtil::null), - mAvatarPassword(LLStringUtil::null), - mXmlState(XML_VOID), - mVoiceConnector("SLVoice"), - mRenderCompat(true), - mMaxAgentGroups(-1), - mCurrencySymbol("OS$"), - mRealCurrencySymbol("US$"), - mDirectoryFee(30) -{ - std::string nick = gridNick; - mGridNick = sanitizeGridNick( nick ); -} - - -// ******************************************************************** -// Getters - -HippoGridInfo::Platform HippoGridInfo::getPlatform() -{ - return mPlatform; -} - -bool HippoGridInfo::isOpenSimulator() const -{ - return (mPlatform == HippoGridInfo::PLATFORM_OPENSIM); -} - -bool HippoGridInfo::isSecondLife() const -{ - return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE); -} - -const std::string& HippoGridInfo::getGridNick() const -{ - return mGridNick; -} - -const std::string& HippoGridInfo::getGridName() const -{ - return mGridName; -} - -const std::string& HippoGridInfo::getLoginUri() const -{ - return mLoginUri; -} - -const std::string& HippoGridInfo::getLoginPage() const -{ - return mLoginPage; -} - -const std::string& HippoGridInfo::getHelperUri() const -{ - return mHelperUri; -} - -const std::string& HippoGridInfo::getWebSite() const -{ - return mWebSite; -} - -const std::string& HippoGridInfo::getSupportUrl() const -{ - return mSupportUrl; -} - -const std::string& HippoGridInfo::getRegisterUrl() const -{ - return mRegisterUrl; -} - -const std::string& HippoGridInfo::getPasswordUrl() const -{ - return mPasswordUrl; -} - -const std::string& HippoGridInfo::getSearchUrl() const -{ - return mSearchUrl; -} - -const std::string& HippoGridInfo::getFirstName() const -{ - return mFirstName; -} - -const std::string& HippoGridInfo::getLastName() const -{ - return mLastName; -} - -const std::string& HippoGridInfo::getAvatarPassword() const -{ - return mAvatarPassword; -} - -bool HippoGridInfo::isRenderCompat() const -{ - return mRenderCompat; -} - -const std::string& HippoGridInfo::getCurrencySymbol() const -{ - return mCurrencySymbol; -} - -const std::string& HippoGridInfo::getRealCurrencySymbol() const -{ - return mRealCurrencySymbol; -} - - - -// ******************************************************************** -// Setters - -void HippoGridInfo::setPlatform(Platform platform) -{ - mPlatform = platform; - if (mPlatform == PLATFORM_SECONDLIFE) - { - mCurrencySymbol = "L$"; - } -} - - -void HippoGridInfo::setPlatform(const std::string& platform) -{ - std::string tmp = platform; - for (unsigned i=0; imXmlState = XML_GRIDNICK; - else if (strcasecmp(name, "gridname") == 0) - self->mXmlState = XML_GRIDNAME; - else if (strcasecmp(name, "platform") == 0) - self->mXmlState = XML_PLATFORM; - else if ((strcasecmp(name, "login") == 0) || (strcasecmp(name, "loginuri") == 0)) - self->mXmlState = XML_LOGINURI; - else if ((strcasecmp(name, "welcome") == 0) || (strcasecmp(name, "loginpage") == 0)) - self->mXmlState = XML_LOGINPAGE; - else if ((strcasecmp(name, "economy") == 0) || (strcasecmp(name, "helperuri") == 0)) - self->mXmlState = XML_HELPERURI; - else if ((strcasecmp(name, "about") == 0) || (strcasecmp(name, "website") == 0)) - self->mXmlState = XML_WEBSITE; - else if ((strcasecmp(name, "help") == 0) || (strcasecmp(name, "support") == 0)) - self->mXmlState = XML_SUPPORT; - else if ((strcasecmp(name, "register") == 0) || (strcasecmp(name, "account") == 0)) - self->mXmlState = XML_REGISTER; - else if (strcasecmp(name, "password") == 0) - self->mXmlState = XML_PASSWORD; - else if (strcasecmp(name, "search") == 0) - self->mXmlState = XML_SEARCH; -} - -//static -void HippoGridInfo::onXmlElementEnd(void* userData, const XML_Char* name) -{ - HippoGridInfo* self = (HippoGridInfo*)userData; - self->mXmlState = XML_VOID; -} - -//static -void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int len) -{ - HippoGridInfo* self = (HippoGridInfo*)userData; - switch (self->mXmlState) - { - case XML_GRIDNICK: - { - if (self->mGridNick == "") self->mGridNick.assign(s, len); - self->mGridNick = sanitizeGridNick(self->mGridNick); - break; - } - - case XML_PLATFORM: - { - std::string platform(s, len); - self->setPlatform(platform); - break; - } - - case XML_LOGINURI: - { - std::string loginuri(s, len); - self->mLoginUri = sanitizeUri( loginuri ); - break; - } - - case XML_HELPERURI: - { - std::string helperuri(s, len); - self->mHelperUri = sanitizeUri( helperuri ); - break; - } - - case XML_SEARCH: - { - self->mSearchUrl.assign(s, len); - //sanitizeQueryUrl(mSearchUrl); - break; - } - - case XML_GRIDNAME: self->mGridName.assign(s, len); break; - case XML_LOGINPAGE: self->mLoginPage.assign(s, len); break; - case XML_WEBSITE: self->mWebSite.assign(s, len); break; - case XML_SUPPORT: self->mSupportUrl.assign(s, len); break; - case XML_REGISTER: self->mRegisterUrl.assign(s, len); break; - case XML_PASSWORD: self->mPasswordUrl.assign(s, len); break; - - case XML_VOID: break; - } -} - - -bool HippoGridInfo::retrieveGridInfo() -{ - if (mLoginUri == "") return false; - - // If last character in uri is not "/" - std::string uri = mLoginUri; - if (uri.compare(uri.length()-1, 1, "/") != 0) - { - uri += '/'; - } - std::string reply; - int result = HippoRestRequest::getBlocking(uri + "get_grid_info", &reply); - if (result != 200) return false; - - llinfos << "Received: " << reply << llendl; - - bool success = true; - XML_Parser parser = XML_ParserCreate(0); - XML_SetUserData(parser, this); - XML_SetElementHandler(parser, onXmlElementStart, onXmlElementEnd); - XML_SetCharacterDataHandler(parser, onXmlCharacterData); - mXmlState = XML_VOID; - if (!XML_Parse(parser, reply.data(), reply.size(), TRUE)) - { - llwarns << "XML Parse Error: " << XML_ErrorString(XML_GetErrorCode(parser)) << llendl; - success = false; - } - XML_ParserFree(parser); - - return success; -} - - -std::string HippoGridInfo::getUploadFee() const -{ - std::string fee; - formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(), true); - return fee; -} - -std::string HippoGridInfo::getGroupCreationFee() const -{ - std::string fee; - formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceGroupCreate(), false); - return fee; -} - -std::string HippoGridInfo::getDirectoryFee() const -{ - std::string fee; - formatFee(fee, mDirectoryFee, true); - if (fee != LLTrans::getString("hippo_label_free")) fee += "/" + LLTrans::getString("hippo_label_week"); - return fee; -} - -void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const -{ - if (showFree && (cost == 0)) - { - fee = LLTrans::getString("hippo_label_free"); - } - else - { - fee = llformat("%s%d", getCurrencySymbol().c_str(), cost); - } -} - - -// ******************************************************************** -// Static Helpers - -// static -const char* HippoGridInfo::getPlatformString(Platform platform) -{ - static const char* platformStrings[PLATFORM_LAST] = - { - "Other", "OpenSim", "SecondLife" - }; - - if ((platform < PLATFORM_OTHER) || (platform >= PLATFORM_LAST)) - platform = PLATFORM_OTHER; - return platformStrings[platform]; -} - - -// static -std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick) -{ - std::string tmp; - int size = gridnick.size(); - for (int i=0; i::iterator it, end = mGridInfo.end(); - for (it=mGridInfo.begin(); it != end; ++it) - { - delete it->second; - } - mGridInfo.clear(); -} - - -void HippoGridManager::init() -{ - HippoGridInfo::initFallback(); - loadFromFile(); - - // !!!### gSavedSettings.getControl("CmdLineLoginURI"); - // !!!### gSavedSettings.getString("CmdLineLoginPage"); - // !!!### gSavedSettings.getString("CmdLineHelperURI"); - // !!!### LLString::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name.c_str())) -} - - -void HippoGridManager::discardAndReload() -{ - cleanup(); - loadFromFile(); -} - - -// ******************************************************************** -// Public Access - -HippoGridInfo* HippoGridManager::getGrid(const std::string& grid) const -{ - std::map::const_iterator it; - it = mGridInfo.find(grid); - if (it != mGridInfo.end()) - { - return it->second; - } - else - { - return 0; - } -} - - -HippoGridInfo* HippoGridManager::getConnectedGrid() const -{ - return (mConnectedGrid)? mConnectedGrid: getCurrentGrid(); -} - - -HippoGridInfo* HippoGridManager::getCurrentGrid() const -{ - HippoGridInfo* grid = getGrid(mCurrentGrid); - if (grid) - { - return grid; - } - else - { - return &HippoGridInfo::FALLBACK_GRIDINFO; - } -} - -const std::string& HippoGridManager::getDefaultGridNick() const -{ - return mDefaultGrid; -} - -const std::string& HippoGridManager::getCurrentGridNick() const -{ - if (mCurrentGrid.empty()) - { - return mDefaultGrid; - } - return mCurrentGrid; -} - -void HippoGridManager::setCurrentGridAsConnected() -{ - mConnectedGrid = getCurrentGrid(); -} - - -void HippoGridManager::addGrid(HippoGridInfo* grid) -{ - if (!grid) return; - const std::string& nick = grid->getGridNick(); - if (nick == "") - { - llwarns << "Ignoring to try adding grid with empty nick." << llendl; - delete grid; - return; - } - if (mGridInfo.find(nick) != mGridInfo.end()) - { - llwarns << "Ignoring to try adding existing grid " << nick << '.' << llendl; - delete grid; - return; - } - mGridInfo[nick] = grid; -} - - -void HippoGridManager::deleteGrid(const std::string& grid) -{ - GridIterator it = mGridInfo.find(grid); - if (it == mGridInfo.end()) { - llwarns << "Trying to delete non-existing grid " << grid << '.' << llendl; - return; - } - mGridInfo.erase(it); - llinfos << "Number of grids now: " << mGridInfo.size() << llendl; - if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl; - if (grid == mDefaultGrid) - setDefaultGrid(LLStringUtil::null); // sets first grid, if map not empty - if (grid == mCurrentGrid) - mCurrentGrid = mDefaultGrid; -} - - -void HippoGridManager::setDefaultGrid(const std::string& grid) -{ - GridIterator it = mGridInfo.find(grid); - if (it != mGridInfo.end()) - { - mDefaultGrid = grid; - } - else if (mGridInfo.find("secondlife") != mGridInfo.end()) - { - mDefaultGrid = "secondlife"; - } - else if (!mGridInfo.empty()) - { - mDefaultGrid = mGridInfo.begin()->first; - } - else - { - mDefaultGrid = ""; - } -} - - -void HippoGridManager::setCurrentGrid(const std::string& grid) -{ - GridIterator it = mGridInfo.find(grid); - if (it != mGridInfo.end()) - { - mCurrentGrid = grid; - } - else if (!mGridInfo.empty()) - { - llwarns << "Unknown grid '" << grid << "'. Setting to default grid." << llendl; - mCurrentGrid = mDefaultGrid; - } -} - - -// ******************************************************************** -// Persistent Store - -void HippoGridManager::loadFromFile() -{ - mDefaultGridsVersion = 0; - // load user grid info - parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grid_info.xml"), false); - // merge default grid info, if newer. Force load, if list of grids is empty. - 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. - if (gSavedSettings.getBOOL("CheckForGridUpdates")) - parseUrl(gSavedSettings.getString("GridUpdateList"), !mGridInfo.empty()); - - std::string last_grid = gSavedSettings.getString("LastSelectedGrid"); - if (last_grid.empty()) last_grid = gSavedSettings.getString("DefaultGrid"); - setDefaultGrid(last_grid); - setCurrentGrid(last_grid); -} - - -void HippoGridManager::parseUrl(const std::string url, bool mergeIfNewer) -{ - llinfos << "Loading grid info from '" << url << "'." << llendl; - - // query update server - std::string escaped_url = LLWeb::escapeURL(url); - LLSD response = LLHTTPClient::blockingGet(url); - - // check response, return on error - S32 status = response["status"].asInteger(); - if ((status != 200) || !response["body"].isArray()) - { - llinfos << "GridInfo Update failed (" << status << "): " - << (response["body"].isString()? response["body"].asString(): "") - << llendl; - return; - } - - LLSD gridInfo = response["body"]; - parseData(gridInfo, mergeIfNewer); -} - -void HippoGridManager::parseFile(const std::string& fileName, bool mergeIfNewer) -{ - llifstream infile; - infile.open(fileName.c_str()); - if (!infile.is_open()) - { - llwarns << "Cannot find grid info file " << fileName << " to load." << llendl; - return; - } - - LLSD gridInfo; - if (LLSDSerialize::fromXML(gridInfo, infile) <= 0) - { - llwarns << "Unable to parse grid info file " << fileName << '.' << llendl; - return; - } - - llinfos << "Loading grid info file " << fileName << '.' << llendl; - parseData(gridInfo, mergeIfNewer); -} - - -void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer) -{ - if (mergeIfNewer) - { - LLSD::array_const_iterator it, end = gridInfo.endArray(); - for (it = gridInfo.beginArray(); it != end; ++it) - { - LLSD gridMap = *it; - if (gridMap.has("default_grids_version")) - { - int version = gridMap["default_grids_version"]; - if (version <= mDefaultGridsVersion) return; - else break; - } - } - if (it == end) - { - llwarns << "Grid data has no version number." << llendl; - return; - } - } - - llinfos << "Loading grid data." << llendl; - - LLSD::array_const_iterator it, end = gridInfo.endArray(); - for (it = gridInfo.beginArray(); it != end; ++it) - { - LLSD gridMap = *it; - if (gridMap.has("default_grids_version")) - { - mDefaultGridsVersion = gridMap["default_grids_version"]; - } - else if (gridMap.has("gridnick") && gridMap.has("loginuri")) - { - std::string gridnick = gridMap["gridnick"]; - HippoGridInfo* grid; - GridIterator it = mGridInfo.find(gridnick); - bool newGrid = (it == mGridInfo.end()); - if (newGrid) - { - // create new grid info - grid = new HippoGridInfo(gridnick); - } - else - { - // update existing grid info - grid = it->second; - } - grid->setLoginUri(gridMap["loginuri"]); - if (gridMap.has("platform")) grid->setPlatform(gridMap["platform"]); - if (gridMap.has("gridname")) grid->setGridName(gridMap["gridname"]); - if (gridMap.has("loginpage")) grid->setLoginPage(gridMap["loginpage"]); - if (gridMap.has("helperuri")) grid->setHelperUri(gridMap["helperuri"]); - if (gridMap.has("website")) grid->setWebSite(gridMap["website"]); - if (gridMap.has("support")) grid->setSupportUrl(gridMap["support"]); - if (gridMap.has("register")) grid->setRegisterUrl(gridMap["register"]); - if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]); - if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]); - if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]); - // if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); - // if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); - // if (gridMap.has("avatarpassword")) grid->setAvatarPassword(gridMap["avatarpassword"]); - if (newGrid) addGrid(grid); - } - } -} - - -void HippoGridManager::saveFile() -{ - // save default grid to client settings - gSavedSettings.setString("DefaultGrid", mDefaultGrid); - - // build LLSD - LLSD gridInfo; - gridInfo[0]["default_grids_version"] = mDefaultGridsVersion; - - // add grids - S32 i = 1; - GridIterator it, end = mGridInfo.end(); - for (it = mGridInfo.begin(); it != end; ++it, i++) - { - HippoGridInfo* grid = it->second; - gridInfo[i]["gridnick"] = grid->getGridNick(); - gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform()); - gridInfo[i]["gridname"] = grid->getGridName(); - gridInfo[i]["loginuri"] = grid->getLoginUri(); - gridInfo[i]["loginpage"] = grid->getLoginPage(); - gridInfo[i]["helperuri"] = grid->getHelperUri(); - gridInfo[i]["website"] = grid->getWebSite(); - gridInfo[i]["support"] = grid->getSupportUrl(); - gridInfo[i]["register"] = grid->getRegisterUrl(); - gridInfo[i]["password"] = grid->getPasswordUrl(); - // gridInfo[i]["firstname"] = grid->getFirstName(); - // gridInfo[i]["lastname"] = grid->getLastName(); - // gridInfo[i]["avatarpassword"] = grid->getAvatarPassword(); - - gridInfo[i]["search"] = grid->getSearchUrl(); - gridInfo[i]["render_compat"] = grid->isRenderCompat(); - } - - // write client grid info file - std::string fileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grid_info.xml"); - llofstream file; - file.open(fileName.c_str()); - if (file.is_open()) - { - LLSDSerialize::toPrettyXML(gridInfo, file); - file.close(); - llinfos << "Saved grids to " << fileName << llendl; - } - else - { - llerrs << "Unable to open grid info file: " << fileName << llendl; - } -} diff --git a/linden/indra/newview/hippoGridManager.h b/linden/indra/newview/hippoGridManager.h deleted file mode 100644 index 8429dba..0000000 --- a/linden/indra/newview/hippoGridManager.h +++ /dev/null @@ -1,183 +0,0 @@ -#ifndef __HIPPO_GRID_MANAGER_H__ -#define __HIPPO_GRID_MANAGER_H__ - - -#include -#include - -#ifndef XML_STATIC -#define XML_STATIC -#endif - -#ifdef LL_STANDALONE -#include -#else -#include "expat/expat.h" -#endif - -class LLSD; - - -class HippoGridInfo -{ -public: - enum Platform { - PLATFORM_OTHER = 0, - PLATFORM_OPENSIM, - PLATFORM_SECONDLIFE, - PLATFORM_LAST - }; - enum SearchType { - SEARCH_ALL_EMPTY, - SEARCH_ALL_QUERY, - SEARCH_ALL_TEMPLATE - }; - - explicit HippoGridInfo(const std::string& gridNick); - - Platform getPlatform(); - bool isOpenSimulator() const; - bool isSecondLife() const; - const std::string& getGridNick() const; - const std::string& getGridName() const; - const std::string& getLoginUri() const; - const std::string& getLoginPage() const; - const std::string& getHelperUri() const; - const std::string& getWebSite() const; - const std::string& getSupportUrl() const; - const std::string& getRegisterUrl() const; - const std::string& getPasswordUrl() const; - // Returns the url base used for the Web Search tab - const std::string& getSearchUrl() const; - const std::string& getFirstName() const; - const std::string& getLastName() const; - const std::string& getAvatarPassword() const; - const std::string& getVoiceConnector() const { return mVoiceConnector; } - std::string getSearchUrl(SearchType ty, bool is_web) const; - bool isRenderCompat() const; - int getMaxAgentGroups() const { return mMaxAgentGroups; } - - const std::string& getCurrencySymbol() const; - const std::string& getRealCurrencySymbol() const; - std::string getUploadFee() const; - std::string getGroupCreationFee() const; - std::string getDirectoryFee() const; - - void setPlatform (const std::string& platform); - void setPlatform (Platform platform); - void setGridName (const std::string& gridName); - void setLoginUri (const std::string& loginUri); - void setLoginPage(const std::string& loginPage); - void setHelperUri(const std::string& helperUri); - void setWebSite (const std::string& website); - void setSupportUrl(const std::string& url); - void setRegisterUrl(const std::string& url); - void setPasswordUrl(const std::string& url); - // sets the url base used for the Web Search tab - void setSearchUrl(const std::string& url); - void setRenderCompat(bool compat); - void setMaxAgentGroups(int max) { mMaxAgentGroups = max; } - void setFirstName(const std::string& firstName); - void setLastName(const std::string& lastName); - void setAvatarPassword(const std::string& avatarPassword); - void setVoiceConnector(const std::string& vc) { mVoiceConnector = vc; } - - void setCurrencySymbol(const std::string& sym); - void setRealCurrencySymbol(const std::string& sym); - void setDirectoryFee(int fee); - - bool retrieveGridInfo(); - - static const char* getPlatformString(Platform platform); - static std::string sanitizeGridNick(std::string &gridnick); - - static HippoGridInfo FALLBACK_GRIDINFO; - static void initFallback(); - -private: - Platform mPlatform; - std::string mGridNick; - std::string mGridName; - std::string mLoginUri; - std::string mLoginPage; - std::string mHelperUri; - std::string mWebSite; - std::string mSupportUrl; - std::string mRegisterUrl; - std::string mPasswordUrl; - std::string mSearchUrl; - std::string mVoiceConnector; - std::string mFirstName; - std::string mLastName; - std::string mAvatarPassword; - bool mRenderCompat; - int mMaxAgentGroups; - - std::string mCurrencySymbol; - std::string mRealCurrencySymbol; - int mDirectoryFee; - - // for parsing grid info XML - enum XmlState - { - XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME, - XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI, - XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH - }; - XmlState mXmlState; - - static std::string sanitizeUri(std::string &uri); - void formatFee(std::string &fee, int cost, bool showFree) const; - - static void onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts); - static void onXmlElementEnd(void* userData, const XML_Char* name); - static void onXmlCharacterData(void* userData, const XML_Char* s, int len); -}; - - -class HippoGridManager -{ -public: - HippoGridManager(); - ~HippoGridManager(); - - void init(); - void saveFile(); - void discardAndReload(); - - HippoGridInfo* getGrid(const std::string& grid) const; - HippoGridInfo* getConnectedGrid() const; - HippoGridInfo* getCurrentGrid() const; - const std::string& getDefaultGridNick() const; - const std::string& getCurrentGridNick() const; - - void setDefaultGrid(const std::string& grid); - void setCurrentGrid(const std::string& grid); - void setCurrentGridAsConnected(); - - void addGrid(HippoGridInfo* grid); - void deleteGrid(const std::string& grid); - - typedef std::map::iterator GridIterator; - GridIterator beginGrid() { return mGridInfo.begin(); } - GridIterator endGrid() { return mGridInfo.end(); } - -private: - std::map mGridInfo; - std::string mDefaultGrid; - std::string mCurrentGrid; - HippoGridInfo* mConnectedGrid; - int mDefaultGridsVersion; - - void cleanup(); - void loadFromFile(); - void parseFile(const std::string& fileName, bool mergeIfNewer); - void parseUrl(const std::string url, bool mergeIfNewer); - void parseData(LLSD &gridInfo, bool mergeIfNewer); -}; - - -extern HippoGridManager* gHippoGridManager; - - -#endif diff --git a/linden/indra/newview/hippoLimits.cpp b/linden/indra/newview/hippoLimits.cpp deleted file mode 100644 index a5d6ee6..0000000 --- a/linden/indra/newview/hippoLimits.cpp +++ /dev/null @@ -1,224 +0,0 @@ - - -#include "llviewerprecompiledheaders.h" - -#include "hippoLimits.h" - -#include "hippoGridManager.h" -#include "llviewercontrol.h" - -#include - - -HippoLimits *gHippoLimits = 0; - - -HippoLimits::HippoLimits() -: - mMaxAgentGroups(100), - mMaxHeight(10000.0f), - mMinHoleSize(0.05f), - mMaxHollow(0.95f), - mMinPrimScale(0.001f), - mMaxPrimScale(256.0f), - mMaxLinkedPrims(-1) -{ - setLimits(); -} - - -void HippoLimits::setLimits() -{ - if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) - { - setSecondLifeLimits(); - } - else - { - setOpenSimLimits(); - } -} - - -void HippoLimits::setOpenSimLimits() -{ - mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups(); - - if (mMaxAgentGroups < 0) - mMaxAgentGroups = 50; - - mMaxPrimScale = 256.0f; - mMinPrimScale = 0.001f; - mMinPrimXPos = 0; - mMinPrimYPos = 0; - mMinPrimZPos = 0; - mMaxPrimXPos = F32_MAX; - mMaxPrimYPos = F32_MAX; - mMaxPrimZPos = F32_MAX; - mMaxHeight = 10000.0f; - mMaxLinkedPrims = -1; - mMaxPhysLinkedPrims = -1; - mAllowParcelWindLight = TRUE; - mAllowMinimap = TRUE; - mMaxInventoryItemsTransfer = -1; - mRenderName = 2; - mAllowPhysicalPrims = TRUE; - skyUseClassicClouds = TRUE; - mEnableTeenMode = FALSE; - mEnforceMaxBuild = FALSE; - mRenderWater = TRUE; - - if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { - llinfos << "Using rendering compatible OpenSim limits" << llendl; - mMinHoleSize = 0.05f; - mMaxHollow = 0.95f; - } - else - { - llinfos << "Using Hippo OpenSim limits" << llendl; - mMinHoleSize = 0.01f; - mMaxHollow = 0.99f; - } -} - -void HippoLimits::setSecondLifeLimits() -{ - llinfos << "Using Second Life limits" << llendl; - mMaxAgentGroups = 25; - mMaxPrimScale = 10.0f; - mMinPrimScale = 0.01f; - mMaxHeight = 4096.0f; - mMinHoleSize = 0.05f; - mMaxHollow = 0.95f; - mMaxLinkedPrims = 255; - mMaxPhysLinkedPrims = 32; - mMinPrimXPos = 0; - mMinPrimYPos = 0; - mMinPrimZPos = 0; - mMaxPrimXPos = 256; - mMaxPrimYPos = 256; - mMaxPrimZPos = 4096; - mAllowParcelWindLight = FALSE; - mAllowMinimap = TRUE; - mMaxInventoryItemsTransfer = 42; - mRenderName = 2; - mAllowPhysicalPrims = TRUE; - skyUseClassicClouds = TRUE; - mEnableTeenMode = FALSE; - mEnforceMaxBuild = FALSE; - mRenderWater = TRUE; -} - -F32 HippoLimits::getMaxPrimScale() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return FLT_MAX; - } - else - { - return mMaxPrimScale; - } -} - -F32 HippoLimits::getMinPrimScale() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return 0; - } - else - { - return mMinPrimScale; - } -} - -F32 HippoLimits::getMaxPrimXPos() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return FLT_MAX; - } - else - { - return mMaxPrimXPos; - } -} - -F32 HippoLimits::getMaxPrimYPos() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return FLT_MAX; - } - else - { - return mMaxPrimYPos; - } -} - -F32 HippoLimits::getMaxPrimZPos() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return FLT_MAX; - } - else - { - return mMaxPrimZPos; - } -} - -F32 HippoLimits::getMinPrimXPos() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return FLT_MIN; - } - else - { - return mMinPrimXPos; - } -} - -F32 HippoLimits::getMinPrimYPos() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return FLT_MIN; - } - else - { - return mMinPrimYPos; - } -} - -F32 HippoLimits::getMinPrimZPos() const -{ - if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) - { - return FLT_MIN; - } - else - { - return mMinPrimZPos; - } -} - -F32 HippoLimits::getMaxDragDistance() const -{ - if (mMaxDragDistance == 0) - { - return FLT_MAX; - } - else - { - F32 max_drag_distance = gSavedSettings.getBOOL("LimitDragDistance") ? gSavedSettings.getF32("MaxDragDistance") : FLT_MAX; - - if(max_drag_distance > mMaxDragDistance) //Chose the more restrictive - { - max_drag_distance = mMaxDragDistance; - } - return max_drag_distance; - } -} \ No newline at end of file diff --git a/linden/indra/newview/hippoLimits.h b/linden/indra/newview/hippoLimits.h deleted file mode 100644 index 7792a2c..0000000 --- a/linden/indra/newview/hippoLimits.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef __HIPPO_LIMITS_H__ -#define __HIPPO_LIMITS_H__ - - -class HippoLimits -{ -public: - HippoLimits(); - - const S32& getMaxAgentGroups() const { return mMaxAgentGroups; } - const F32& getMaxHeight() const { return mMaxHeight; } - const F32& getMinHoleSize() const { return mMinHoleSize; } - const F32& getMaxHollow() const { return mMaxHollow; } - const S32& getMaxLinkedPrims() const { return mMaxLinkedPrims; } - const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; } - const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; } - - - // Returns the max prim size we can use on a grid - F32 getMinPrimScale() const; - F32 getMaxPrimScale() const; - - F32 getMaxDragDistance() const; - - F32 getMinPrimXPos() const; - F32 getMinPrimYPos() const; - F32 getMinPrimZPos() const; - F32 getMaxPrimXPos() const; - F32 getMaxPrimYPos() const; - F32 getMaxPrimZPos() const; - - void setLimits(); - - S32 mMaxAgentGroups; - - F32 mMaxHeight; - F32 mMinHoleSize; - F32 mMaxHollow; - F32 mMaxPrimScale; - F32 mMinPrimScale; - S32 mMaxLinkedPrims; - S32 mMaxPhysLinkedPrims; - F32 mMaxPrimXPos; - F32 mMaxPrimYPos; - F32 mMaxPrimZPos; - F32 mMinPrimXPos; - F32 mMinPrimYPos; - F32 mMinPrimZPos; - - S32 mRenderName; - - F32 mMaxInventoryItemsTransfer; - F32 mMaxDragDistance; - - BOOL skyUseClassicClouds; - BOOL mAllowParcelWindLight; - BOOL mAllowMinimap; - BOOL mAllowPhysicalPrims; - BOOL mEnableTeenMode; - BOOL mEnforceMaxBuild; - BOOL mRenderWater; - -private: - void setOpenSimLimits(); - void setSecondLifeLimits(); -}; - - -extern HippoLimits* gHippoLimits; - - -#endif diff --git a/linden/indra/newview/hippoRestRequest.cpp b/linden/indra/newview/hippoRestRequest.cpp deleted file mode 100644 index ed15907..0000000 --- a/linden/indra/newview/hippoRestRequest.cpp +++ /dev/null @@ -1,352 +0,0 @@ - - -#include "llviewerprecompiledheaders.h" - -#include "hippoRestRequest.h" - -#ifndef CURL_STATICLIB -#define CURL_STATICLIB 1 -#endif -#include - -#include -#include -#include -#include -#include -#include - - -// ******************************************************************** - - -class HippoRestComplete : public LLURLRequestComplete -{ - public: - HippoRestComplete(HippoRestHandler *handler) : - mHandler(handler), - mStatus(499), - mReason("Request completed w/o status") - { - } - - ~HippoRestComplete() - { - delete mHandler; - } - - // Called once for each header received, prior to httpStatus - void header(const std::string& header, const std::string& value) - { - mHandler->addHeader(header, value); - } - - // Always called on request completion, prior to complete - void httpStatus(U32 status, const std::string& reason) - { - LLURLRequestComplete::httpStatus(status, reason); - mStatus = status; - mReason = reason; - } - - void complete(const LLChannelDescriptors &channels, const buffer_ptr_t &buffer) - { - mHandler->handle(mStatus, mReason, channels, buffer); - } - - private: - HippoRestHandler *mHandler; - int mStatus; - std::string mReason; -}; - - -// ******************************************************************** - - -static std::string gEmptyString; - -void HippoRestHandler::addHeader(const std::string &header, const std::string &content) -{ - mHeaders[header] = content; -} - -bool HippoRestHandler::hasHeader(const std::string &header) const -{ - return (mHeaders.find(header) != mHeaders.end()); -} - -const std::string &HippoRestHandler::getHeader(const std::string &header) const -{ - std::map::const_iterator it; - it = mHeaders.find(header); - if (it != mHeaders.end()) { - return it->second; - } else { - return gEmptyString; - } -} - - -// ******************************************************************** - - -void HippoRestHandlerRaw::handle(int status, const std::string &reason, - const LLChannelDescriptors &channels, - const boost::shared_ptr &body) -{ - if (status == 200) { - std::string data; - LLBufferArray *buffer = body.get(); - LLBufferArray::segment_iterator_t it, end = buffer->endSegment(); - for (it=buffer->beginSegment(); it!=end; ++it) - if (it->isOnChannel(channels.in())) - data.append((char*)it->data(), it->size()); - result(data); - } else { - llwarns << "Rest request error " << status << ": " << reason << llendl; - } -} - -void HippoRestHandlerXml::handle(int status, const std::string &reason, - const LLChannelDescriptors &channels, - const boost::shared_ptr &body) -{ - if (status == 200) { - LLXmlTree *tree = new LLXmlTree(); - bool success = tree->parseBufferStart(); - LLBufferArray *buffer = body.get(); - LLBufferArray::segment_iterator_t it, end = buffer->endSegment(); - for (it=buffer->beginSegment(); success && (it!=end); ++it) - if (it->isOnChannel(channels.in())) - success = success && tree->parseBuffer((char*)it->data(), it->size()); - success = success && tree->parseBufferFinalize(); - if (success) result(tree); - delete tree; - } else { - llwarns << "Rest request error " << status << ": " << reason << llendl; - } -} - - -// ******************************************************************** - - -class BodyData : public LLIOPipe -{ - public: - virtual ~BodyData() { } - virtual const char *getContentMimeType() const = 0; -}; - -class BodyDataRaw : public BodyData -{ - public: - explicit BodyDataRaw(const std::string &data) : - mData(data) - { - } - virtual ~BodyDataRaw() { } - - const char *getContentMimeType() const { return "application/octet-stream"; } - - EStatus process_impl(const LLChannelDescriptors &channels, - buffer_ptr_t &buffer, bool &eos, - LLSD &context, LLPumpIO *pump) - { - LLBufferStream ostream(channels, buffer.get()); - ostream.write(mData.data(), mData.size()); - eos = true; - return STATUS_DONE; - } - - private: - std::string mData; -}; - -class BodyDataXml : public BodyData -{ - public: - explicit BodyDataXml(const LLXmlTree *tree) : - mTree(tree) - { - } - - virtual ~BodyDataXml() - { - if (mTree) delete mTree; - } - - const char *getContentMimeType() const { return "application/xml"; } - - EStatus process_impl(const LLChannelDescriptors &channels, - buffer_ptr_t &buffer, bool &eos, - LLSD &context, LLPumpIO *pump) - { - std::string data; - mTree->write(data); - LLBufferStream ostream(channels, buffer.get()); - ostream.write(data.data(), data.size()); - eos = true; - return STATUS_DONE; - } - - private: - const LLXmlTree *mTree; -}; - - -// ******************************************************************** - - -static void request(const std::string &url, - LLURLRequest::ERequestAction method, - BodyData *body, - HippoRestHandler *handler, float timeout); - - -// static -void HippoRestRequest::get(const std::string &url, - HippoRestHandler *handler, float timeout) -{ - request(url, LLURLRequest::HTTP_GET, 0, handler, timeout); -} - -// static -void HippoRestRequest::put(const std::string &url, const std::string &body, - HippoRestHandler *handler, float timeout) -{ - request(url, LLURLRequest::HTTP_PUT, new BodyDataRaw(body), handler, timeout); -} - -// static -void HippoRestRequest::put(const std::string &url, const LLXmlTree *body, - HippoRestHandler *handler, float timeout) -{ - request(url, LLURLRequest::HTTP_PUT, new BodyDataXml(body), handler, timeout); -} - -// static -void HippoRestRequest::post(const std::string &url, const std::string &body, - HippoRestHandler *handler, float timeout) -{ - request(url, LLURLRequest::HTTP_POST, new BodyDataRaw(body), handler, timeout); -} - -// static -void HippoRestRequest::post(const std::string &url, const LLXmlTree *body, - HippoRestHandler *handler, float timeout) -{ - request(url, LLURLRequest::HTTP_POST, new BodyDataXml(body), handler, timeout); -} - - -// ******************************************************************** - - -static void request(const std::string &url, - LLURLRequest::ERequestAction method, - BodyData *body, - HippoRestHandler *handler, float timeout) -{ - if (!LLHTTPClient::hasPump()) - { - // !!! responder->completed(U32_MAX, "No pump", LLSD()); - return; - } - LLPumpIO::chain_t chain; - - LLURLRequest *req = new LLURLRequest(method, url); - req->checkRootCertificate(true); - - /* - // Insert custom headers if the caller sent any - if (headers.isMap()) - { - LLSD::map_const_iterator iter = headers.beginMap(); - LLSD::map_const_iterator end = headers.endMap(); - - for (; iter != end; ++iter) - { - std::ostringstream header; - //if the header is "Pragma" with no value - //the caller intends to force libcurl to drop - //the Pragma header it so gratuitously inserts - //Before inserting the header, force libcurl - //to not use the proxy (read: llurlrequest.cpp) - static const std::string PRAGMA("Pragma"); - if ((iter->first == PRAGMA) && (iter->second.asString().empty())) - { - req->useProxy(false); - } - header << iter->first << ": " << iter->second.asString() ; - lldebugs << "header = " << header.str() << llendl; - req->addHeader(header.str().c_str()); - } - } - */ - - if ((method != LLURLRequest::HTTP_PUT) && (method != LLURLRequest::HTTP_POST)) { - std::string accept = "Accept: "; - accept += handler->getAcceptMimeType(); - req->addHeader(accept.c_str()); - } - - req->setCallback(new HippoRestComplete(handler)); - - if ((method == LLURLRequest::HTTP_PUT) || (method == LLURLRequest::HTTP_POST)) { - std::string content = "Content-Type: "; - content += body->getContentMimeType(); - req->addHeader(content.c_str()); - chain.push_back(LLIOPipe::ptr_t(body)); - } - - chain.push_back(LLIOPipe::ptr_t(req)); - LLHTTPClient::getPump().addChain(chain, timeout); -} - - -// ******************************************************************** - - -static size_t curlWrite(void *ptr, size_t size, size_t nmemb, void *userData) -{ - std::string *result = (std::string*)userData; - size_t bytes = (size * nmemb); - result->append((char*)ptr, bytes); - return nmemb; -} - - -// static -int HippoRestRequest::getBlocking(const std::string &url, std::string *result) -{ - llinfos << "Requesting: " << url << llendl; - - char curlErrorBuffer[CURL_ERROR_SIZE]; - CURL* curlp = curl_easy_init(); - - curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts - curl_easy_setopt(curlp, CURLOPT_TIMEOUT, 5); // seconds - - curl_easy_setopt(curlp, CURLOPT_WRITEFUNCTION, curlWrite); - curl_easy_setopt(curlp, CURLOPT_WRITEDATA, result); - curl_easy_setopt(curlp, CURLOPT_URL, url.c_str()); - curl_easy_setopt(curlp, CURLOPT_ERRORBUFFER, curlErrorBuffer); - curl_easy_setopt(curlp, CURLOPT_FAILONERROR, 1); - - *result = ""; - S32 curlSuccess = curl_easy_perform(curlp); - S32 httpStatus = 499; - curl_easy_getinfo(curlp, CURLINFO_RESPONSE_CODE, &httpStatus); - - if (curlSuccess != 0) { - llwarns << "CURL ERROR (HTTP Status " << httpStatus << "): " << curlErrorBuffer << llendl; - } else if (httpStatus != 200) { - llwarns << "HTTP Error " << httpStatus << ", but no Curl error." << llendl; - } - - curl_easy_cleanup(curlp); - return httpStatus; -} - diff --git a/linden/indra/newview/hippoRestRequest.h b/linden/indra/newview/hippoRestRequest.h deleted file mode 100644 index 727dbf7..0000000 --- a/linden/indra/newview/hippoRestRequest.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef __HIPPO_REST_REQUEST_H__ -#define __HIPPO_REST_REQUEST_H__ - - -#include -#include - -#include - -class LLBufferArray; -class LLChannelDescriptors; -class LLXmlTree; - - -#define HIPPO_REST_TIMEOUT 60.f - - -// ******************************************************************** - - -class HippoRestHandler -{ - public: - virtual ~HippoRestHandler() { } - - virtual const char *getAcceptMimeType() const = 0; - - bool hasHeader(const std::string &header) const; - const std::string &getHeader(const std::string &header) const; - - private: - // These functions are called by the request engine - void addHeader(const std::string &header, const std::string &content); - virtual void handle(int status, const std::string &reason, - const LLChannelDescriptors &channels, - const boost::shared_ptr &body) = 0; - - std::map mHeaders; - - friend class HippoRestComplete; -}; - - -class HippoRestHandlerRaw : public HippoRestHandler -{ - public: - virtual ~HippoRestHandlerRaw() { } - - const char *getAcceptMimeType() const { return "application/octet-stream"; } - - private: - // This function must be implemented to receive the content - // it is executed on (status == 200) only - virtual void result(const std::string &content) = 0; - - // This function is called by the request engine - void handle(int status, const std::string &reason, - const LLChannelDescriptors &channels, - const boost::shared_ptr &body); -}; - - -class HippoRestHandlerXml : public HippoRestHandler -{ - public: - virtual ~HippoRestHandlerXml() { } - - const char *getAcceptMimeType() const { return "application/xml"; } - - private: - // This function must be implemented to receive the content - virtual void result(LLXmlTree *content) = 0; - - // This function is called by the request engine - void handle(int status, const std::string &reason, - const LLChannelDescriptors &channels, - const boost::shared_ptr &body); -}; - - -// ******************************************************************** - - -class HippoRestRequest -{ - public: - // asynchronous interface - static void get(const std::string &url, - HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); - static void put(const std::string &url, const std::string &body, - HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); - static void put(const std::string &url, const LLXmlTree *body, - HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); - static void post(const std::string &url, const std::string &body, - HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); - static void post(const std::string &url, const LLXmlTree *body, - HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); - - // synchronous interface - static int getBlocking(const std::string &url, std::string *result); -}; - - -#endif diff --git a/linden/indra/newview/hippoUpdate.cpp b/linden/indra/newview/hippoUpdate.cpp deleted file mode 100644 index f6947ad..0000000 --- a/linden/indra/newview/hippoUpdate.cpp +++ /dev/null @@ -1,92 +0,0 @@ - -#include "hippoUpdate.h" - -#include -#include -#include - -#include -#include -#include -//#include -#include "llviewercontrol.h" -#include "llviewernetwork.h" -#include "llweb.h" -#include - - -std::string gHippoChannel; - - -// static -bool HippoUpdate::checkUpdate() -{ - llinfos << "Hippo Update Check..." << llendl; - - // get channel name - gHippoChannel = gSavedSettings.getString("ChannelName"); - - // get mac address - char macAddress[18]; - sprintf(macAddress, "%02x:%02x:%02x:%02x:%02x:%02x", - gMACAddress[0], gMACAddress[1], gMACAddress[2], gMACAddress[3], gMACAddress[4], gMACAddress[5]); - - // build URL for update check - char url[1000]; - snprintf(url, 1000, -/* "http://update.mjm.game-host.org/os/viewer.php?" - "product=%s&channel=%s&" - "version_major=%d&version_minor=%d&version_patch=%d&version_base=%s&" - "platform=%s&mac=%s", - LL_PRODUCT, LL_CHANNEL_CSTR, - LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BASE, - LL_PLATFORM*/"", macAddress); - - // query update server - std::string escaped_url = LLWeb::escapeURL(url); - LLSD response = LLHTTPClient::blockingGet(escaped_url.c_str()); - - // check response, return on error - S32 status = response["status"].asInteger(); - if ((status != 200) || !response["body"].isMap()) { - llinfos << "Hippo Update failed (" << status << "): " - << (response["body"].isString()? response["body"].asString(): "") - << llendl; - return true; - } - - // get data from response - LLSD data = response["body"]; - std::string webpage = (data.has("webpage") && data["webpage"].isString())? data["webpage"].asString(): ""; - std::string message = (data.has("message") && data["message"].isString())? data["message"].asString(): ""; - std::string yourVersion = (data.has("yourVersion") && data["yourVersion"].isString())? data["yourVersion"].asString(): ""; - std::string curVersion = (data.has("curVersion") && data["curVersion"].isString())? data["curVersion"].asString(): ""; - bool update = (data.has("update") && data["update"].isBoolean())? data["update"].asBoolean(): false; - bool mandatory = (data.has("mandatory") && data["mandatory"].isBoolean())? data["mandatory"].asBoolean(): false; - - // log and return, if no update available - llinfos << "Your version is " << yourVersion << ", current version is " << curVersion << '.' << llendl; - if (!update) return true; - llinfos << "Update is " << (mandatory? "mandatory.": "optional.") << llendl; - - // show update dialog - char msg[1000]; - snprintf(msg, 1000, - "There is a new viewer version available.\n" - "\n" - "Your version: %s\n" - "Current version: %s\n" - "%s\n" - "Do you want to visit the web site?", - yourVersion.c_str(), curVersion.c_str(), - mandatory? "\nThis is a mandatory update.\n": ""); - S32 button = OSMessageBox(msg, "Hippo OpenSim Viewer Update", OSMB_YESNO); - if (button == OSBTN_YES) { - llinfos << "Taking user to " << webpage << llendl; - LLWeb::loadURLExternal(webpage); - // exit the viewer - return false; - } - - return !mandatory; -} diff --git a/linden/indra/newview/hippoUpdate.h b/linden/indra/newview/hippoUpdate.h deleted file mode 100644 index 559c8b3..0000000 --- a/linden/indra/newview/hippoUpdate.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __HIPPO_UPDATE_H__ -#define __HIPPO_UPDATE_H__ - - -class HippoUpdate -{ - public: - static bool checkUpdate(); -}; - - -#endif diff --git a/linden/indra/newview/hippogridmanager.cpp b/linden/indra/newview/hippogridmanager.cpp new file mode 100644 index 0000000..dd0fa35 --- /dev/null +++ b/linden/indra/newview/hippogridmanager.cpp @@ -0,0 +1,970 @@ +// Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli + +#include "llviewerprecompiledheaders.h" + +#include "hippoGridManager.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include "lltrans.h" +#include "llviewercontrol.h" +#include "llweb.h" + +#include "hippoRestRequest.h" + + +// ******************************************************************** +// Global Variables + +HippoGridManager* gHippoGridManager = 0; + +HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO(""); + + + +// ******************************************************************** +// ******************************************************************** +// HippoGridInfo +// ******************************************************************** +// ******************************************************************** + + +// ******************************************************************** +// Initialize + +HippoGridInfo::HippoGridInfo(const std::string& gridNick) : + mPlatform(PLATFORM_OPENSIM), + mGridNick(gridNick), + mGridName(LLStringUtil::null), + mLoginUri(LLStringUtil::null), + mLoginPage(LLStringUtil::null), + mHelperUri(LLStringUtil::null), + mWebSite(LLStringUtil::null), + mSupportUrl(LLStringUtil::null), + mRegisterUrl(LLStringUtil::null), + mPasswordUrl(LLStringUtil::null), + mSearchUrl(LLStringUtil::null), + mFirstName(LLStringUtil::null), + mLastName(LLStringUtil::null), + mAvatarPassword(LLStringUtil::null), + mXmlState(XML_VOID), + mVoiceConnector("SLVoice"), + mRenderCompat(true), + mMaxAgentGroups(-1), + mCurrencySymbol("OS$"), + mRealCurrencySymbol("US$"), + mDirectoryFee(30) +{ + std::string nick = gridNick; + mGridNick = sanitizeGridNick( nick ); +} + + +// ******************************************************************** +// Getters + +HippoGridInfo::Platform HippoGridInfo::getPlatform() +{ + return mPlatform; +} + +bool HippoGridInfo::isOpenSimulator() const +{ + return (mPlatform == HippoGridInfo::PLATFORM_OPENSIM); +} + +bool HippoGridInfo::isSecondLife() const +{ + return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE); +} + +const std::string& HippoGridInfo::getGridNick() const +{ + return mGridNick; +} + +const std::string& HippoGridInfo::getGridName() const +{ + return mGridName; +} + +const std::string& HippoGridInfo::getLoginUri() const +{ + return mLoginUri; +} + +const std::string& HippoGridInfo::getLoginPage() const +{ + return mLoginPage; +} + +const std::string& HippoGridInfo::getHelperUri() const +{ + return mHelperUri; +} + +const std::string& HippoGridInfo::getWebSite() const +{ + return mWebSite; +} + +const std::string& HippoGridInfo::getSupportUrl() const +{ + return mSupportUrl; +} + +const std::string& HippoGridInfo::getRegisterUrl() const +{ + return mRegisterUrl; +} + +const std::string& HippoGridInfo::getPasswordUrl() const +{ + return mPasswordUrl; +} + +const std::string& HippoGridInfo::getSearchUrl() const +{ + return mSearchUrl; +} + +const std::string& HippoGridInfo::getFirstName() const +{ + return mFirstName; +} + +const std::string& HippoGridInfo::getLastName() const +{ + return mLastName; +} + +const std::string& HippoGridInfo::getAvatarPassword() const +{ + return mAvatarPassword; +} + +bool HippoGridInfo::isRenderCompat() const +{ + return mRenderCompat; +} + +const std::string& HippoGridInfo::getCurrencySymbol() const +{ + return mCurrencySymbol; +} + +const std::string& HippoGridInfo::getRealCurrencySymbol() const +{ + return mRealCurrencySymbol; +} + + + +// ******************************************************************** +// Setters + +void HippoGridInfo::setPlatform(Platform platform) +{ + mPlatform = platform; + if (mPlatform == PLATFORM_SECONDLIFE) + { + mCurrencySymbol = "L$"; + } +} + + +void HippoGridInfo::setPlatform(const std::string& platform) +{ + std::string tmp = platform; + for (unsigned i=0; imXmlState = XML_GRIDNICK; + else if (strcasecmp(name, "gridname") == 0) + self->mXmlState = XML_GRIDNAME; + else if (strcasecmp(name, "platform") == 0) + self->mXmlState = XML_PLATFORM; + else if ((strcasecmp(name, "login") == 0) || (strcasecmp(name, "loginuri") == 0)) + self->mXmlState = XML_LOGINURI; + else if ((strcasecmp(name, "welcome") == 0) || (strcasecmp(name, "loginpage") == 0)) + self->mXmlState = XML_LOGINPAGE; + else if ((strcasecmp(name, "economy") == 0) || (strcasecmp(name, "helperuri") == 0)) + self->mXmlState = XML_HELPERURI; + else if ((strcasecmp(name, "about") == 0) || (strcasecmp(name, "website") == 0)) + self->mXmlState = XML_WEBSITE; + else if ((strcasecmp(name, "help") == 0) || (strcasecmp(name, "support") == 0)) + self->mXmlState = XML_SUPPORT; + else if ((strcasecmp(name, "register") == 0) || (strcasecmp(name, "account") == 0)) + self->mXmlState = XML_REGISTER; + else if (strcasecmp(name, "password") == 0) + self->mXmlState = XML_PASSWORD; + else if (strcasecmp(name, "search") == 0) + self->mXmlState = XML_SEARCH; +} + +//static +void HippoGridInfo::onXmlElementEnd(void* userData, const XML_Char* name) +{ + HippoGridInfo* self = (HippoGridInfo*)userData; + self->mXmlState = XML_VOID; +} + +//static +void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int len) +{ + HippoGridInfo* self = (HippoGridInfo*)userData; + switch (self->mXmlState) + { + case XML_GRIDNICK: + { + if (self->mGridNick == "") self->mGridNick.assign(s, len); + self->mGridNick = sanitizeGridNick(self->mGridNick); + break; + } + + case XML_PLATFORM: + { + std::string platform(s, len); + self->setPlatform(platform); + break; + } + + case XML_LOGINURI: + { + std::string loginuri(s, len); + self->mLoginUri = sanitizeUri( loginuri ); + break; + } + + case XML_HELPERURI: + { + std::string helperuri(s, len); + self->mHelperUri = sanitizeUri( helperuri ); + break; + } + + case XML_SEARCH: + { + self->mSearchUrl.assign(s, len); + //sanitizeQueryUrl(mSearchUrl); + break; + } + + case XML_GRIDNAME: self->mGridName.assign(s, len); break; + case XML_LOGINPAGE: self->mLoginPage.assign(s, len); break; + case XML_WEBSITE: self->mWebSite.assign(s, len); break; + case XML_SUPPORT: self->mSupportUrl.assign(s, len); break; + case XML_REGISTER: self->mRegisterUrl.assign(s, len); break; + case XML_PASSWORD: self->mPasswordUrl.assign(s, len); break; + + case XML_VOID: break; + } +} + + +bool HippoGridInfo::retrieveGridInfo() +{ + if (mLoginUri == "") return false; + + // If last character in uri is not "/" + std::string uri = mLoginUri; + if (uri.compare(uri.length()-1, 1, "/") != 0) + { + uri += '/'; + } + std::string reply; + int result = HippoRestRequest::getBlocking(uri + "get_grid_info", &reply); + if (result != 200) return false; + + llinfos << "Received: " << reply << llendl; + + bool success = true; + XML_Parser parser = XML_ParserCreate(0); + XML_SetUserData(parser, this); + XML_SetElementHandler(parser, onXmlElementStart, onXmlElementEnd); + XML_SetCharacterDataHandler(parser, onXmlCharacterData); + mXmlState = XML_VOID; + if (!XML_Parse(parser, reply.data(), reply.size(), TRUE)) + { + llwarns << "XML Parse Error: " << XML_ErrorString(XML_GetErrorCode(parser)) << llendl; + success = false; + } + XML_ParserFree(parser); + + return success; +} + + +std::string HippoGridInfo::getUploadFee() const +{ + std::string fee; + formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(), true); + return fee; +} + +std::string HippoGridInfo::getGroupCreationFee() const +{ + std::string fee; + formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceGroupCreate(), false); + return fee; +} + +std::string HippoGridInfo::getDirectoryFee() const +{ + std::string fee; + formatFee(fee, mDirectoryFee, true); + if (fee != LLTrans::getString("hippo_label_free")) fee += "/" + LLTrans::getString("hippo_label_week"); + return fee; +} + +void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const +{ + if (showFree && (cost == 0)) + { + fee = LLTrans::getString("hippo_label_free"); + } + else + { + fee = llformat("%s%d", getCurrencySymbol().c_str(), cost); + } +} + + +// ******************************************************************** +// Static Helpers + +// static +const char* HippoGridInfo::getPlatformString(Platform platform) +{ + static const char* platformStrings[PLATFORM_LAST] = + { + "Other", "OpenSim", "SecondLife" + }; + + if ((platform < PLATFORM_OTHER) || (platform >= PLATFORM_LAST)) + platform = PLATFORM_OTHER; + return platformStrings[platform]; +} + + +// static +std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick) +{ + std::string tmp; + int size = gridnick.size(); + for (int i=0; i::iterator it, end = mGridInfo.end(); + for (it=mGridInfo.begin(); it != end; ++it) + { + delete it->second; + } + mGridInfo.clear(); +} + + +void HippoGridManager::init() +{ + HippoGridInfo::initFallback(); + loadFromFile(); + + // !!!### gSavedSettings.getControl("CmdLineLoginURI"); + // !!!### gSavedSettings.getString("CmdLineLoginPage"); + // !!!### gSavedSettings.getString("CmdLineHelperURI"); + // !!!### LLString::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name.c_str())) +} + + +void HippoGridManager::discardAndReload() +{ + cleanup(); + loadFromFile(); +} + + +// ******************************************************************** +// Public Access + +HippoGridInfo* HippoGridManager::getGrid(const std::string& grid) const +{ + std::map::const_iterator it; + it = mGridInfo.find(grid); + if (it != mGridInfo.end()) + { + return it->second; + } + else + { + return 0; + } +} + + +HippoGridInfo* HippoGridManager::getConnectedGrid() const +{ + return (mConnectedGrid)? mConnectedGrid: getCurrentGrid(); +} + + +HippoGridInfo* HippoGridManager::getCurrentGrid() const +{ + HippoGridInfo* grid = getGrid(mCurrentGrid); + if (grid) + { + return grid; + } + else + { + return &HippoGridInfo::FALLBACK_GRIDINFO; + } +} + +const std::string& HippoGridManager::getDefaultGridNick() const +{ + return mDefaultGrid; +} + +const std::string& HippoGridManager::getCurrentGridNick() const +{ + if (mCurrentGrid.empty()) + { + return mDefaultGrid; + } + return mCurrentGrid; +} + +void HippoGridManager::setCurrentGridAsConnected() +{ + mConnectedGrid = getCurrentGrid(); +} + + +void HippoGridManager::addGrid(HippoGridInfo* grid) +{ + if (!grid) return; + const std::string& nick = grid->getGridNick(); + if (nick == "") + { + llwarns << "Ignoring to try adding grid with empty nick." << llendl; + delete grid; + return; + } + if (mGridInfo.find(nick) != mGridInfo.end()) + { + llwarns << "Ignoring to try adding existing grid " << nick << '.' << llendl; + delete grid; + return; + } + mGridInfo[nick] = grid; +} + + +void HippoGridManager::deleteGrid(const std::string& grid) +{ + GridIterator it = mGridInfo.find(grid); + if (it == mGridInfo.end()) { + llwarns << "Trying to delete non-existing grid " << grid << '.' << llendl; + return; + } + mGridInfo.erase(it); + llinfos << "Number of grids now: " << mGridInfo.size() << llendl; + if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl; + if (grid == mDefaultGrid) + setDefaultGrid(LLStringUtil::null); // sets first grid, if map not empty + if (grid == mCurrentGrid) + mCurrentGrid = mDefaultGrid; +} + + +void HippoGridManager::setDefaultGrid(const std::string& grid) +{ + GridIterator it = mGridInfo.find(grid); + if (it != mGridInfo.end()) + { + mDefaultGrid = grid; + } + else if (mGridInfo.find("secondlife") != mGridInfo.end()) + { + mDefaultGrid = "secondlife"; + } + else if (!mGridInfo.empty()) + { + mDefaultGrid = mGridInfo.begin()->first; + } + else + { + mDefaultGrid = ""; + } +} + + +void HippoGridManager::setCurrentGrid(const std::string& grid) +{ + GridIterator it = mGridInfo.find(grid); + if (it != mGridInfo.end()) + { + mCurrentGrid = grid; + } + else if (!mGridInfo.empty()) + { + llwarns << "Unknown grid '" << grid << "'. Setting to default grid." << llendl; + mCurrentGrid = mDefaultGrid; + } +} + + +// ******************************************************************** +// Persistent Store + +void HippoGridManager::loadFromFile() +{ + mDefaultGridsVersion = 0; + // load user grid info + parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grid_info.xml"), false); + // merge default grid info, if newer. Force load, if list of grids is empty. + 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. + if (gSavedSettings.getBOOL("CheckForGridUpdates")) + parseUrl(gSavedSettings.getString("GridUpdateList"), !mGridInfo.empty()); + + std::string last_grid = gSavedSettings.getString("LastSelectedGrid"); + if (last_grid.empty()) last_grid = gSavedSettings.getString("DefaultGrid"); + setDefaultGrid(last_grid); + setCurrentGrid(last_grid); +} + + +void HippoGridManager::parseUrl(const std::string url, bool mergeIfNewer) +{ + llinfos << "Loading grid info from '" << url << "'." << llendl; + + // query update server + std::string escaped_url = LLWeb::escapeURL(url); + LLSD response = LLHTTPClient::blockingGet(url); + + // check response, return on error + S32 status = response["status"].asInteger(); + if ((status != 200) || !response["body"].isArray()) + { + llinfos << "GridInfo Update failed (" << status << "): " + << (response["body"].isString()? response["body"].asString(): "") + << llendl; + return; + } + + LLSD gridInfo = response["body"]; + parseData(gridInfo, mergeIfNewer); +} + +void HippoGridManager::parseFile(const std::string& fileName, bool mergeIfNewer) +{ + llifstream infile; + infile.open(fileName.c_str()); + if (!infile.is_open()) + { + llwarns << "Cannot find grid info file " << fileName << " to load." << llendl; + return; + } + + LLSD gridInfo; + if (LLSDSerialize::fromXML(gridInfo, infile) <= 0) + { + llwarns << "Unable to parse grid info file " << fileName << '.' << llendl; + return; + } + + llinfos << "Loading grid info file " << fileName << '.' << llendl; + parseData(gridInfo, mergeIfNewer); +} + + +void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer) +{ + if (mergeIfNewer) + { + LLSD::array_const_iterator it, end = gridInfo.endArray(); + for (it = gridInfo.beginArray(); it != end; ++it) + { + LLSD gridMap = *it; + if (gridMap.has("default_grids_version")) + { + int version = gridMap["default_grids_version"]; + if (version <= mDefaultGridsVersion) return; + else break; + } + } + if (it == end) + { + llwarns << "Grid data has no version number." << llendl; + return; + } + } + + llinfos << "Loading grid data." << llendl; + + LLSD::array_const_iterator it, end = gridInfo.endArray(); + for (it = gridInfo.beginArray(); it != end; ++it) + { + LLSD gridMap = *it; + if (gridMap.has("default_grids_version")) + { + mDefaultGridsVersion = gridMap["default_grids_version"]; + } + else if (gridMap.has("gridnick") && gridMap.has("loginuri")) + { + std::string gridnick = gridMap["gridnick"]; + HippoGridInfo* grid; + GridIterator it = mGridInfo.find(gridnick); + bool newGrid = (it == mGridInfo.end()); + if (newGrid) + { + // create new grid info + grid = new HippoGridInfo(gridnick); + } + else + { + // update existing grid info + grid = it->second; + } + grid->setLoginUri(gridMap["loginuri"]); + if (gridMap.has("platform")) grid->setPlatform(gridMap["platform"]); + if (gridMap.has("gridname")) grid->setGridName(gridMap["gridname"]); + if (gridMap.has("loginpage")) grid->setLoginPage(gridMap["loginpage"]); + if (gridMap.has("helperuri")) grid->setHelperUri(gridMap["helperuri"]); + if (gridMap.has("website")) grid->setWebSite(gridMap["website"]); + if (gridMap.has("support")) grid->setSupportUrl(gridMap["support"]); + if (gridMap.has("register")) grid->setRegisterUrl(gridMap["register"]); + if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]); + if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]); + if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]); + // if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); + // if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); + // if (gridMap.has("avatarpassword")) grid->setAvatarPassword(gridMap["avatarpassword"]); + if (newGrid) addGrid(grid); + } + } +} + + +void HippoGridManager::saveFile() +{ + // save default grid to client settings + gSavedSettings.setString("DefaultGrid", mDefaultGrid); + + // build LLSD + LLSD gridInfo; + gridInfo[0]["default_grids_version"] = mDefaultGridsVersion; + + // add grids + S32 i = 1; + GridIterator it, end = mGridInfo.end(); + for (it = mGridInfo.begin(); it != end; ++it, i++) + { + HippoGridInfo* grid = it->second; + gridInfo[i]["gridnick"] = grid->getGridNick(); + gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform()); + gridInfo[i]["gridname"] = grid->getGridName(); + gridInfo[i]["loginuri"] = grid->getLoginUri(); + gridInfo[i]["loginpage"] = grid->getLoginPage(); + gridInfo[i]["helperuri"] = grid->getHelperUri(); + gridInfo[i]["website"] = grid->getWebSite(); + gridInfo[i]["support"] = grid->getSupportUrl(); + gridInfo[i]["register"] = grid->getRegisterUrl(); + gridInfo[i]["password"] = grid->getPasswordUrl(); + // gridInfo[i]["firstname"] = grid->getFirstName(); + // gridInfo[i]["lastname"] = grid->getLastName(); + // gridInfo[i]["avatarpassword"] = grid->getAvatarPassword(); + + gridInfo[i]["search"] = grid->getSearchUrl(); + gridInfo[i]["render_compat"] = grid->isRenderCompat(); + } + + // write client grid info file + std::string fileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grid_info.xml"); + llofstream file; + file.open(fileName.c_str()); + if (file.is_open()) + { + LLSDSerialize::toPrettyXML(gridInfo, file); + file.close(); + llinfos << "Saved grids to " << fileName << llendl; + } + else + { + llerrs << "Unable to open grid info file: " << fileName << llendl; + } +} diff --git a/linden/indra/newview/hippogridmanager.h b/linden/indra/newview/hippogridmanager.h new file mode 100644 index 0000000..8429dba --- /dev/null +++ b/linden/indra/newview/hippogridmanager.h @@ -0,0 +1,183 @@ +#ifndef __HIPPO_GRID_MANAGER_H__ +#define __HIPPO_GRID_MANAGER_H__ + + +#include +#include + +#ifndef XML_STATIC +#define XML_STATIC +#endif + +#ifdef LL_STANDALONE +#include +#else +#include "expat/expat.h" +#endif + +class LLSD; + + +class HippoGridInfo +{ +public: + enum Platform { + PLATFORM_OTHER = 0, + PLATFORM_OPENSIM, + PLATFORM_SECONDLIFE, + PLATFORM_LAST + }; + enum SearchType { + SEARCH_ALL_EMPTY, + SEARCH_ALL_QUERY, + SEARCH_ALL_TEMPLATE + }; + + explicit HippoGridInfo(const std::string& gridNick); + + Platform getPlatform(); + bool isOpenSimulator() const; + bool isSecondLife() const; + const std::string& getGridNick() const; + const std::string& getGridName() const; + const std::string& getLoginUri() const; + const std::string& getLoginPage() const; + const std::string& getHelperUri() const; + const std::string& getWebSite() const; + const std::string& getSupportUrl() const; + const std::string& getRegisterUrl() const; + const std::string& getPasswordUrl() const; + // Returns the url base used for the Web Search tab + const std::string& getSearchUrl() const; + const std::string& getFirstName() const; + const std::string& getLastName() const; + const std::string& getAvatarPassword() const; + const std::string& getVoiceConnector() const { return mVoiceConnector; } + std::string getSearchUrl(SearchType ty, bool is_web) const; + bool isRenderCompat() const; + int getMaxAgentGroups() const { return mMaxAgentGroups; } + + const std::string& getCurrencySymbol() const; + const std::string& getRealCurrencySymbol() const; + std::string getUploadFee() const; + std::string getGroupCreationFee() const; + std::string getDirectoryFee() const; + + void setPlatform (const std::string& platform); + void setPlatform (Platform platform); + void setGridName (const std::string& gridName); + void setLoginUri (const std::string& loginUri); + void setLoginPage(const std::string& loginPage); + void setHelperUri(const std::string& helperUri); + void setWebSite (const std::string& website); + void setSupportUrl(const std::string& url); + void setRegisterUrl(const std::string& url); + void setPasswordUrl(const std::string& url); + // sets the url base used for the Web Search tab + void setSearchUrl(const std::string& url); + void setRenderCompat(bool compat); + void setMaxAgentGroups(int max) { mMaxAgentGroups = max; } + void setFirstName(const std::string& firstName); + void setLastName(const std::string& lastName); + void setAvatarPassword(const std::string& avatarPassword); + void setVoiceConnector(const std::string& vc) { mVoiceConnector = vc; } + + void setCurrencySymbol(const std::string& sym); + void setRealCurrencySymbol(const std::string& sym); + void setDirectoryFee(int fee); + + bool retrieveGridInfo(); + + static const char* getPlatformString(Platform platform); + static std::string sanitizeGridNick(std::string &gridnick); + + static HippoGridInfo FALLBACK_GRIDINFO; + static void initFallback(); + +private: + Platform mPlatform; + std::string mGridNick; + std::string mGridName; + std::string mLoginUri; + std::string mLoginPage; + std::string mHelperUri; + std::string mWebSite; + std::string mSupportUrl; + std::string mRegisterUrl; + std::string mPasswordUrl; + std::string mSearchUrl; + std::string mVoiceConnector; + std::string mFirstName; + std::string mLastName; + std::string mAvatarPassword; + bool mRenderCompat; + int mMaxAgentGroups; + + std::string mCurrencySymbol; + std::string mRealCurrencySymbol; + int mDirectoryFee; + + // for parsing grid info XML + enum XmlState + { + XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME, + XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI, + XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH + }; + XmlState mXmlState; + + static std::string sanitizeUri(std::string &uri); + void formatFee(std::string &fee, int cost, bool showFree) const; + + static void onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts); + static void onXmlElementEnd(void* userData, const XML_Char* name); + static void onXmlCharacterData(void* userData, const XML_Char* s, int len); +}; + + +class HippoGridManager +{ +public: + HippoGridManager(); + ~HippoGridManager(); + + void init(); + void saveFile(); + void discardAndReload(); + + HippoGridInfo* getGrid(const std::string& grid) const; + HippoGridInfo* getConnectedGrid() const; + HippoGridInfo* getCurrentGrid() const; + const std::string& getDefaultGridNick() const; + const std::string& getCurrentGridNick() const; + + void setDefaultGrid(const std::string& grid); + void setCurrentGrid(const std::string& grid); + void setCurrentGridAsConnected(); + + void addGrid(HippoGridInfo* grid); + void deleteGrid(const std::string& grid); + + typedef std::map::iterator GridIterator; + GridIterator beginGrid() { return mGridInfo.begin(); } + GridIterator endGrid() { return mGridInfo.end(); } + +private: + std::map mGridInfo; + std::string mDefaultGrid; + std::string mCurrentGrid; + HippoGridInfo* mConnectedGrid; + int mDefaultGridsVersion; + + void cleanup(); + void loadFromFile(); + void parseFile(const std::string& fileName, bool mergeIfNewer); + void parseUrl(const std::string url, bool mergeIfNewer); + void parseData(LLSD &gridInfo, bool mergeIfNewer); +}; + + +extern HippoGridManager* gHippoGridManager; + + +#endif diff --git a/linden/indra/newview/hippolimits.cpp b/linden/indra/newview/hippolimits.cpp new file mode 100644 index 0000000..a5d6ee6 --- /dev/null +++ b/linden/indra/newview/hippolimits.cpp @@ -0,0 +1,224 @@ + + +#include "llviewerprecompiledheaders.h" + +#include "hippoLimits.h" + +#include "hippoGridManager.h" +#include "llviewercontrol.h" + +#include + + +HippoLimits *gHippoLimits = 0; + + +HippoLimits::HippoLimits() +: + mMaxAgentGroups(100), + mMaxHeight(10000.0f), + mMinHoleSize(0.05f), + mMaxHollow(0.95f), + mMinPrimScale(0.001f), + mMaxPrimScale(256.0f), + mMaxLinkedPrims(-1) +{ + setLimits(); +} + + +void HippoLimits::setLimits() +{ + if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) + { + setSecondLifeLimits(); + } + else + { + setOpenSimLimits(); + } +} + + +void HippoLimits::setOpenSimLimits() +{ + mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups(); + + if (mMaxAgentGroups < 0) + mMaxAgentGroups = 50; + + mMaxPrimScale = 256.0f; + mMinPrimScale = 0.001f; + mMinPrimXPos = 0; + mMinPrimYPos = 0; + mMinPrimZPos = 0; + mMaxPrimXPos = F32_MAX; + mMaxPrimYPos = F32_MAX; + mMaxPrimZPos = F32_MAX; + mMaxHeight = 10000.0f; + mMaxLinkedPrims = -1; + mMaxPhysLinkedPrims = -1; + mAllowParcelWindLight = TRUE; + mAllowMinimap = TRUE; + mMaxInventoryItemsTransfer = -1; + mRenderName = 2; + mAllowPhysicalPrims = TRUE; + skyUseClassicClouds = TRUE; + mEnableTeenMode = FALSE; + mEnforceMaxBuild = FALSE; + mRenderWater = TRUE; + + if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { + llinfos << "Using rendering compatible OpenSim limits" << llendl; + mMinHoleSize = 0.05f; + mMaxHollow = 0.95f; + } + else + { + llinfos << "Using Hippo OpenSim limits" << llendl; + mMinHoleSize = 0.01f; + mMaxHollow = 0.99f; + } +} + +void HippoLimits::setSecondLifeLimits() +{ + llinfos << "Using Second Life limits" << llendl; + mMaxAgentGroups = 25; + mMaxPrimScale = 10.0f; + mMinPrimScale = 0.01f; + mMaxHeight = 4096.0f; + mMinHoleSize = 0.05f; + mMaxHollow = 0.95f; + mMaxLinkedPrims = 255; + mMaxPhysLinkedPrims = 32; + mMinPrimXPos = 0; + mMinPrimYPos = 0; + mMinPrimZPos = 0; + mMaxPrimXPos = 256; + mMaxPrimYPos = 256; + mMaxPrimZPos = 4096; + mAllowParcelWindLight = FALSE; + mAllowMinimap = TRUE; + mMaxInventoryItemsTransfer = 42; + mRenderName = 2; + mAllowPhysicalPrims = TRUE; + skyUseClassicClouds = TRUE; + mEnableTeenMode = FALSE; + mEnforceMaxBuild = FALSE; + mRenderWater = TRUE; +} + +F32 HippoLimits::getMaxPrimScale() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return FLT_MAX; + } + else + { + return mMaxPrimScale; + } +} + +F32 HippoLimits::getMinPrimScale() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return 0; + } + else + { + return mMinPrimScale; + } +} + +F32 HippoLimits::getMaxPrimXPos() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return FLT_MAX; + } + else + { + return mMaxPrimXPos; + } +} + +F32 HippoLimits::getMaxPrimYPos() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return FLT_MAX; + } + else + { + return mMaxPrimYPos; + } +} + +F32 HippoLimits::getMaxPrimZPos() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return FLT_MAX; + } + else + { + return mMaxPrimZPos; + } +} + +F32 HippoLimits::getMinPrimXPos() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return FLT_MIN; + } + else + { + return mMinPrimXPos; + } +} + +F32 HippoLimits::getMinPrimYPos() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return FLT_MIN; + } + else + { + return mMinPrimYPos; + } +} + +F32 HippoLimits::getMinPrimZPos() const +{ + if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) + { + return FLT_MIN; + } + else + { + return mMinPrimZPos; + } +} + +F32 HippoLimits::getMaxDragDistance() const +{ + if (mMaxDragDistance == 0) + { + return FLT_MAX; + } + else + { + F32 max_drag_distance = gSavedSettings.getBOOL("LimitDragDistance") ? gSavedSettings.getF32("MaxDragDistance") : FLT_MAX; + + if(max_drag_distance > mMaxDragDistance) //Chose the more restrictive + { + max_drag_distance = mMaxDragDistance; + } + return max_drag_distance; + } +} \ No newline at end of file diff --git a/linden/indra/newview/hippolimits.h b/linden/indra/newview/hippolimits.h new file mode 100644 index 0000000..7792a2c --- /dev/null +++ b/linden/indra/newview/hippolimits.h @@ -0,0 +1,72 @@ +#ifndef __HIPPO_LIMITS_H__ +#define __HIPPO_LIMITS_H__ + + +class HippoLimits +{ +public: + HippoLimits(); + + const S32& getMaxAgentGroups() const { return mMaxAgentGroups; } + const F32& getMaxHeight() const { return mMaxHeight; } + const F32& getMinHoleSize() const { return mMinHoleSize; } + const F32& getMaxHollow() const { return mMaxHollow; } + const S32& getMaxLinkedPrims() const { return mMaxLinkedPrims; } + const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; } + const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; } + + + // Returns the max prim size we can use on a grid + F32 getMinPrimScale() const; + F32 getMaxPrimScale() const; + + F32 getMaxDragDistance() const; + + F32 getMinPrimXPos() const; + F32 getMinPrimYPos() const; + F32 getMinPrimZPos() const; + F32 getMaxPrimXPos() const; + F32 getMaxPrimYPos() const; + F32 getMaxPrimZPos() const; + + void setLimits(); + + S32 mMaxAgentGroups; + + F32 mMaxHeight; + F32 mMinHoleSize; + F32 mMaxHollow; + F32 mMaxPrimScale; + F32 mMinPrimScale; + S32 mMaxLinkedPrims; + S32 mMaxPhysLinkedPrims; + F32 mMaxPrimXPos; + F32 mMaxPrimYPos; + F32 mMaxPrimZPos; + F32 mMinPrimXPos; + F32 mMinPrimYPos; + F32 mMinPrimZPos; + + S32 mRenderName; + + F32 mMaxInventoryItemsTransfer; + F32 mMaxDragDistance; + + BOOL skyUseClassicClouds; + BOOL mAllowParcelWindLight; + BOOL mAllowMinimap; + BOOL mAllowPhysicalPrims; + BOOL mEnableTeenMode; + BOOL mEnforceMaxBuild; + BOOL mRenderWater; + +private: + void setOpenSimLimits(); + void setSecondLifeLimits(); +}; + + +extern HippoLimits* gHippoLimits; + + +#endif diff --git a/linden/indra/newview/hipporestrequest.cpp b/linden/indra/newview/hipporestrequest.cpp new file mode 100644 index 0000000..ed15907 --- /dev/null +++ b/linden/indra/newview/hipporestrequest.cpp @@ -0,0 +1,352 @@ + + +#include "llviewerprecompiledheaders.h" + +#include "hippoRestRequest.h" + +#ifndef CURL_STATICLIB +#define CURL_STATICLIB 1 +#endif +#include + +#include +#include +#include +#include +#include +#include + + +// ******************************************************************** + + +class HippoRestComplete : public LLURLRequestComplete +{ + public: + HippoRestComplete(HippoRestHandler *handler) : + mHandler(handler), + mStatus(499), + mReason("Request completed w/o status") + { + } + + ~HippoRestComplete() + { + delete mHandler; + } + + // Called once for each header received, prior to httpStatus + void header(const std::string& header, const std::string& value) + { + mHandler->addHeader(header, value); + } + + // Always called on request completion, prior to complete + void httpStatus(U32 status, const std::string& reason) + { + LLURLRequestComplete::httpStatus(status, reason); + mStatus = status; + mReason = reason; + } + + void complete(const LLChannelDescriptors &channels, const buffer_ptr_t &buffer) + { + mHandler->handle(mStatus, mReason, channels, buffer); + } + + private: + HippoRestHandler *mHandler; + int mStatus; + std::string mReason; +}; + + +// ******************************************************************** + + +static std::string gEmptyString; + +void HippoRestHandler::addHeader(const std::string &header, const std::string &content) +{ + mHeaders[header] = content; +} + +bool HippoRestHandler::hasHeader(const std::string &header) const +{ + return (mHeaders.find(header) != mHeaders.end()); +} + +const std::string &HippoRestHandler::getHeader(const std::string &header) const +{ + std::map::const_iterator it; + it = mHeaders.find(header); + if (it != mHeaders.end()) { + return it->second; + } else { + return gEmptyString; + } +} + + +// ******************************************************************** + + +void HippoRestHandlerRaw::handle(int status, const std::string &reason, + const LLChannelDescriptors &channels, + const boost::shared_ptr &body) +{ + if (status == 200) { + std::string data; + LLBufferArray *buffer = body.get(); + LLBufferArray::segment_iterator_t it, end = buffer->endSegment(); + for (it=buffer->beginSegment(); it!=end; ++it) + if (it->isOnChannel(channels.in())) + data.append((char*)it->data(), it->size()); + result(data); + } else { + llwarns << "Rest request error " << status << ": " << reason << llendl; + } +} + +void HippoRestHandlerXml::handle(int status, const std::string &reason, + const LLChannelDescriptors &channels, + const boost::shared_ptr &body) +{ + if (status == 200) { + LLXmlTree *tree = new LLXmlTree(); + bool success = tree->parseBufferStart(); + LLBufferArray *buffer = body.get(); + LLBufferArray::segment_iterator_t it, end = buffer->endSegment(); + for (it=buffer->beginSegment(); success && (it!=end); ++it) + if (it->isOnChannel(channels.in())) + success = success && tree->parseBuffer((char*)it->data(), it->size()); + success = success && tree->parseBufferFinalize(); + if (success) result(tree); + delete tree; + } else { + llwarns << "Rest request error " << status << ": " << reason << llendl; + } +} + + +// ******************************************************************** + + +class BodyData : public LLIOPipe +{ + public: + virtual ~BodyData() { } + virtual const char *getContentMimeType() const = 0; +}; + +class BodyDataRaw : public BodyData +{ + public: + explicit BodyDataRaw(const std::string &data) : + mData(data) + { + } + virtual ~BodyDataRaw() { } + + const char *getContentMimeType() const { return "application/octet-stream"; } + + EStatus process_impl(const LLChannelDescriptors &channels, + buffer_ptr_t &buffer, bool &eos, + LLSD &context, LLPumpIO *pump) + { + LLBufferStream ostream(channels, buffer.get()); + ostream.write(mData.data(), mData.size()); + eos = true; + return STATUS_DONE; + } + + private: + std::string mData; +}; + +class BodyDataXml : public BodyData +{ + public: + explicit BodyDataXml(const LLXmlTree *tree) : + mTree(tree) + { + } + + virtual ~BodyDataXml() + { + if (mTree) delete mTree; + } + + const char *getContentMimeType() const { return "application/xml"; } + + EStatus process_impl(const LLChannelDescriptors &channels, + buffer_ptr_t &buffer, bool &eos, + LLSD &context, LLPumpIO *pump) + { + std::string data; + mTree->write(data); + LLBufferStream ostream(channels, buffer.get()); + ostream.write(data.data(), data.size()); + eos = true; + return STATUS_DONE; + } + + private: + const LLXmlTree *mTree; +}; + + +// ******************************************************************** + + +static void request(const std::string &url, + LLURLRequest::ERequestAction method, + BodyData *body, + HippoRestHandler *handler, float timeout); + + +// static +void HippoRestRequest::get(const std::string &url, + HippoRestHandler *handler, float timeout) +{ + request(url, LLURLRequest::HTTP_GET, 0, handler, timeout); +} + +// static +void HippoRestRequest::put(const std::string &url, const std::string &body, + HippoRestHandler *handler, float timeout) +{ + request(url, LLURLRequest::HTTP_PUT, new BodyDataRaw(body), handler, timeout); +} + +// static +void HippoRestRequest::put(const std::string &url, const LLXmlTree *body, + HippoRestHandler *handler, float timeout) +{ + request(url, LLURLRequest::HTTP_PUT, new BodyDataXml(body), handler, timeout); +} + +// static +void HippoRestRequest::post(const std::string &url, const std::string &body, + HippoRestHandler *handler, float timeout) +{ + request(url, LLURLRequest::HTTP_POST, new BodyDataRaw(body), handler, timeout); +} + +// static +void HippoRestRequest::post(const std::string &url, const LLXmlTree *body, + HippoRestHandler *handler, float timeout) +{ + request(url, LLURLRequest::HTTP_POST, new BodyDataXml(body), handler, timeout); +} + + +// ******************************************************************** + + +static void request(const std::string &url, + LLURLRequest::ERequestAction method, + BodyData *body, + HippoRestHandler *handler, float timeout) +{ + if (!LLHTTPClient::hasPump()) + { + // !!! responder->completed(U32_MAX, "No pump", LLSD()); + return; + } + LLPumpIO::chain_t chain; + + LLURLRequest *req = new LLURLRequest(method, url); + req->checkRootCertificate(true); + + /* + // Insert custom headers if the caller sent any + if (headers.isMap()) + { + LLSD::map_const_iterator iter = headers.beginMap(); + LLSD::map_const_iterator end = headers.endMap(); + + for (; iter != end; ++iter) + { + std::ostringstream header; + //if the header is "Pragma" with no value + //the caller intends to force libcurl to drop + //the Pragma header it so gratuitously inserts + //Before inserting the header, force libcurl + //to not use the proxy (read: llurlrequest.cpp) + static const std::string PRAGMA("Pragma"); + if ((iter->first == PRAGMA) && (iter->second.asString().empty())) + { + req->useProxy(false); + } + header << iter->first << ": " << iter->second.asString() ; + lldebugs << "header = " << header.str() << llendl; + req->addHeader(header.str().c_str()); + } + } + */ + + if ((method != LLURLRequest::HTTP_PUT) && (method != LLURLRequest::HTTP_POST)) { + std::string accept = "Accept: "; + accept += handler->getAcceptMimeType(); + req->addHeader(accept.c_str()); + } + + req->setCallback(new HippoRestComplete(handler)); + + if ((method == LLURLRequest::HTTP_PUT) || (method == LLURLRequest::HTTP_POST)) { + std::string content = "Content-Type: "; + content += body->getContentMimeType(); + req->addHeader(content.c_str()); + chain.push_back(LLIOPipe::ptr_t(body)); + } + + chain.push_back(LLIOPipe::ptr_t(req)); + LLHTTPClient::getPump().addChain(chain, timeout); +} + + +// ******************************************************************** + + +static size_t curlWrite(void *ptr, size_t size, size_t nmemb, void *userData) +{ + std::string *result = (std::string*)userData; + size_t bytes = (size * nmemb); + result->append((char*)ptr, bytes); + return nmemb; +} + + +// static +int HippoRestRequest::getBlocking(const std::string &url, std::string *result) +{ + llinfos << "Requesting: " << url << llendl; + + char curlErrorBuffer[CURL_ERROR_SIZE]; + CURL* curlp = curl_easy_init(); + + curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts + curl_easy_setopt(curlp, CURLOPT_TIMEOUT, 5); // seconds + + curl_easy_setopt(curlp, CURLOPT_WRITEFUNCTION, curlWrite); + curl_easy_setopt(curlp, CURLOPT_WRITEDATA, result); + curl_easy_setopt(curlp, CURLOPT_URL, url.c_str()); + curl_easy_setopt(curlp, CURLOPT_ERRORBUFFER, curlErrorBuffer); + curl_easy_setopt(curlp, CURLOPT_FAILONERROR, 1); + + *result = ""; + S32 curlSuccess = curl_easy_perform(curlp); + S32 httpStatus = 499; + curl_easy_getinfo(curlp, CURLINFO_RESPONSE_CODE, &httpStatus); + + if (curlSuccess != 0) { + llwarns << "CURL ERROR (HTTP Status " << httpStatus << "): " << curlErrorBuffer << llendl; + } else if (httpStatus != 200) { + llwarns << "HTTP Error " << httpStatus << ", but no Curl error." << llendl; + } + + curl_easy_cleanup(curlp); + return httpStatus; +} + diff --git a/linden/indra/newview/hipporestrequest.h b/linden/indra/newview/hipporestrequest.h new file mode 100644 index 0000000..727dbf7 --- /dev/null +++ b/linden/indra/newview/hipporestrequest.h @@ -0,0 +1,104 @@ +#ifndef __HIPPO_REST_REQUEST_H__ +#define __HIPPO_REST_REQUEST_H__ + + +#include +#include + +#include + +class LLBufferArray; +class LLChannelDescriptors; +class LLXmlTree; + + +#define HIPPO_REST_TIMEOUT 60.f + + +// ******************************************************************** + + +class HippoRestHandler +{ + public: + virtual ~HippoRestHandler() { } + + virtual const char *getAcceptMimeType() const = 0; + + bool hasHeader(const std::string &header) const; + const std::string &getHeader(const std::string &header) const; + + private: + // These functions are called by the request engine + void addHeader(const std::string &header, const std::string &content); + virtual void handle(int status, const std::string &reason, + const LLChannelDescriptors &channels, + const boost::shared_ptr &body) = 0; + + std::map mHeaders; + + friend class HippoRestComplete; +}; + + +class HippoRestHandlerRaw : public HippoRestHandler +{ + public: + virtual ~HippoRestHandlerRaw() { } + + const char *getAcceptMimeType() const { return "application/octet-stream"; } + + private: + // This function must be implemented to receive the content + // it is executed on (status == 200) only + virtual void result(const std::string &content) = 0; + + // This function is called by the request engine + void handle(int status, const std::string &reason, + const LLChannelDescriptors &channels, + const boost::shared_ptr &body); +}; + + +class HippoRestHandlerXml : public HippoRestHandler +{ + public: + virtual ~HippoRestHandlerXml() { } + + const char *getAcceptMimeType() const { return "application/xml"; } + + private: + // This function must be implemented to receive the content + virtual void result(LLXmlTree *content) = 0; + + // This function is called by the request engine + void handle(int status, const std::string &reason, + const LLChannelDescriptors &channels, + const boost::shared_ptr &body); +}; + + +// ******************************************************************** + + +class HippoRestRequest +{ + public: + // asynchronous interface + static void get(const std::string &url, + HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); + static void put(const std::string &url, const std::string &body, + HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); + static void put(const std::string &url, const LLXmlTree *body, + HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); + static void post(const std::string &url, const std::string &body, + HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); + static void post(const std::string &url, const LLXmlTree *body, + HippoRestHandler *handler, float timeout=HIPPO_REST_TIMEOUT); + + // synchronous interface + static int getBlocking(const std::string &url, std::string *result); +}; + + +#endif diff --git a/linden/indra/newview/hippoupdate.cpp b/linden/indra/newview/hippoupdate.cpp new file mode 100644 index 0000000..f6947ad --- /dev/null +++ b/linden/indra/newview/hippoupdate.cpp @@ -0,0 +1,92 @@ + +#include "hippoUpdate.h" + +#include +#include +#include + +#include +#include +#include +//#include +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llweb.h" +#include + + +std::string gHippoChannel; + + +// static +bool HippoUpdate::checkUpdate() +{ + llinfos << "Hippo Update Check..." << llendl; + + // get channel name + gHippoChannel = gSavedSettings.getString("ChannelName"); + + // get mac address + char macAddress[18]; + sprintf(macAddress, "%02x:%02x:%02x:%02x:%02x:%02x", + gMACAddress[0], gMACAddress[1], gMACAddress[2], gMACAddress[3], gMACAddress[4], gMACAddress[5]); + + // build URL for update check + char url[1000]; + snprintf(url, 1000, +/* "http://update.mjm.game-host.org/os/viewer.php?" + "product=%s&channel=%s&" + "version_major=%d&version_minor=%d&version_patch=%d&version_base=%s&" + "platform=%s&mac=%s", + LL_PRODUCT, LL_CHANNEL_CSTR, + LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BASE, + LL_PLATFORM*/"", macAddress); + + // query update server + std::string escaped_url = LLWeb::escapeURL(url); + LLSD response = LLHTTPClient::blockingGet(escaped_url.c_str()); + + // check response, return on error + S32 status = response["status"].asInteger(); + if ((status != 200) || !response["body"].isMap()) { + llinfos << "Hippo Update failed (" << status << "): " + << (response["body"].isString()? response["body"].asString(): "") + << llendl; + return true; + } + + // get data from response + LLSD data = response["body"]; + std::string webpage = (data.has("webpage") && data["webpage"].isString())? data["webpage"].asString(): ""; + std::string message = (data.has("message") && data["message"].isString())? data["message"].asString(): ""; + std::string yourVersion = (data.has("yourVersion") && data["yourVersion"].isString())? data["yourVersion"].asString(): ""; + std::string curVersion = (data.has("curVersion") && data["curVersion"].isString())? data["curVersion"].asString(): ""; + bool update = (data.has("update") && data["update"].isBoolean())? data["update"].asBoolean(): false; + bool mandatory = (data.has("mandatory") && data["mandatory"].isBoolean())? data["mandatory"].asBoolean(): false; + + // log and return, if no update available + llinfos << "Your version is " << yourVersion << ", current version is " << curVersion << '.' << llendl; + if (!update) return true; + llinfos << "Update is " << (mandatory? "mandatory.": "optional.") << llendl; + + // show update dialog + char msg[1000]; + snprintf(msg, 1000, + "There is a new viewer version available.\n" + "\n" + "Your version: %s\n" + "Current version: %s\n" + "%s\n" + "Do you want to visit the web site?", + yourVersion.c_str(), curVersion.c_str(), + mandatory? "\nThis is a mandatory update.\n": ""); + S32 button = OSMessageBox(msg, "Hippo OpenSim Viewer Update", OSMB_YESNO); + if (button == OSBTN_YES) { + llinfos << "Taking user to " << webpage << llendl; + LLWeb::loadURLExternal(webpage); + // exit the viewer + return false; + } + + return !mandatory; +} diff --git a/linden/indra/newview/hippoupdate.h b/linden/indra/newview/hippoupdate.h new file mode 100644 index 0000000..559c8b3 --- /dev/null +++ b/linden/indra/newview/hippoupdate.h @@ -0,0 +1,12 @@ +#ifndef __HIPPO_UPDATE_H__ +#define __HIPPO_UPDATE_H__ + + +class HippoUpdate +{ + public: + static bool checkUpdate(); +}; + + +#endif -- cgit v1.1 From b0446b980cc30d01644ef16f3775372109b612e3 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 3 Nov 2010 17:58:09 +0100 Subject: Rename hippo* files to lower case (PART 2 OF 2) There was a problem with #include "hippolimits.h" because the file is called hippoLimits.h (with an uppercase L). After some discussion on IRC it was reluctantly decided that filenames should be lowercase, as is done for every Linden file. This is part 2 or 2 (the first part just renamed the files). This part changes all files to make the viewer compile again after the renaming. --- linden/indra/llinventory/lltransactionflags.cpp | 2 +- linden/indra/llui/llnotifications.cpp | 2 +- linden/indra/newview/CMakeLists.txt | 12 ++++++------ linden/indra/newview/chatbar_as_cmdline.cpp | 2 +- linden/indra/newview/floatercommandline.cpp | 2 +- linden/indra/newview/floatergriddefault.cpp | 2 +- linden/indra/newview/floatergridmanager.cpp | 2 +- linden/indra/newview/floaterlocalassetbrowse.cpp | 2 +- linden/indra/newview/hippogridmanager.cpp | 4 ++-- linden/indra/newview/hippolimits.cpp | 4 ++-- linden/indra/newview/hipporestrequest.cpp | 2 +- linden/indra/newview/hippoupdate.cpp | 2 +- linden/indra/newview/kowopenregionsettings.cpp | 2 +- linden/indra/newview/llappviewer.cpp | 6 +++--- linden/indra/newview/llassetuploadresponders.cpp | 2 +- linden/indra/newview/llcurrencyuimanager.cpp | 2 +- linden/indra/newview/llfirstuse.cpp | 2 +- linden/indra/newview/llfloaterabout.cpp | 2 +- linden/indra/newview/llfloateranimpreview.cpp | 2 +- linden/indra/newview/llfloaterbuy.cpp | 2 +- linden/indra/newview/llfloaterbuycontents.cpp | 2 +- linden/indra/newview/llfloaterbuycurrency.cpp | 2 +- linden/indra/newview/llfloaterbuyland.cpp | 2 +- linden/indra/newview/llfloatergodtools.cpp | 2 +- linden/indra/newview/llfloatergroups.cpp | 2 +- linden/indra/newview/llfloaterhtmlhelp.cpp | 2 +- linden/indra/newview/llfloaterimagepreview.cpp | 2 +- linden/indra/newview/llfloaterland.cpp | 2 +- linden/indra/newview/llfloatermap.cpp | 2 +- linden/indra/newview/llfloaternamedesc.cpp | 2 +- linden/indra/newview/llfloaterpostcard.cpp | 2 +- linden/indra/newview/llfloaterproperties.cpp | 2 +- linden/indra/newview/llfloaterregioninfo.cpp | 2 +- linden/indra/newview/llfloatersellland.cpp | 2 +- linden/indra/newview/llfloatersnapshot.cpp | 2 +- linden/indra/newview/llfloatertools.cpp | 2 +- linden/indra/newview/llfloatertos.cpp | 2 +- linden/indra/newview/llfloaterworldmap.cpp | 2 +- linden/indra/newview/llgivemoney.cpp | 2 +- linden/indra/newview/llhoverview.cpp | 2 +- linden/indra/newview/llmanipscale.cpp | 2 +- linden/indra/newview/llmaniptranslate.cpp | 2 +- linden/indra/newview/llnetmap.cpp | 2 +- linden/indra/newview/llnotify.cpp | 2 +- linden/indra/newview/llpanelaudioprefs.cpp | 2 +- linden/indra/newview/llpanelclassified.cpp | 2 +- linden/indra/newview/llpaneldirfind.cpp | 2 +- linden/indra/newview/llpaneldirland.cpp | 2 +- linden/indra/newview/llpanelgroupgeneral.cpp | 2 +- linden/indra/newview/llpanelgrouplandmoney.cpp | 2 +- linden/indra/newview/llpanelinventory.cpp | 2 +- linden/indra/newview/llpanelland.cpp | 2 +- linden/indra/newview/llpanellandmedia.cpp | 2 +- linden/indra/newview/llpanellogin.cpp | 4 ++-- linden/indra/newview/llpanelmsgs.cpp | 2 +- linden/indra/newview/llpanelobject.cpp | 2 +- linden/indra/newview/llpanelpermissions.cpp | 2 +- linden/indra/newview/llpanelplace.cpp | 2 +- linden/indra/newview/llpanelweb.cpp | 2 +- linden/indra/newview/llprefsim.cpp | 2 +- linden/indra/newview/llstartup.cpp | 4 ++-- linden/indra/newview/llstatusbar.cpp | 2 +- linden/indra/newview/lltexturefetch.cpp | 2 +- linden/indra/newview/lltooldraganddrop.cpp | 2 +- linden/indra/newview/lltoolgrab.cpp | 2 +- linden/indra/newview/llviewerdisplay.cpp | 2 +- linden/indra/newview/llviewermenu.cpp | 4 ++-- linden/indra/newview/llviewermessage.cpp | 4 ++-- linden/indra/newview/llviewernetwork.cpp | 2 +- linden/indra/newview/llviewerparcelmgr.cpp | 2 +- linden/indra/newview/llvoavatar.cpp | 2 +- linden/indra/newview/llworld.cpp | 2 +- linden/indra/newview/llworldmap.cpp | 2 +- linden/indra/newview/llxmlrpctransaction.cpp | 2 +- linden/indra/newview/primbackup.cpp | 2 +- linden/indra/newview/windlightsettingsupdate.cpp | 2 +- linden/indra/newview/wlfloatermanager.cpp | 2 +- linden/indra/newview/wlfloaterwindlightsend.cpp | 2 +- linden/indra/newview/wlretrievesettings.cpp | 2 +- linden/indra/newview/wlsettingsmanager.cpp | 2 +- 80 files changed, 93 insertions(+), 93 deletions(-) diff --git a/linden/indra/llinventory/lltransactionflags.cpp b/linden/indra/llinventory/lltransactionflags.cpp index aaea161..fda8cad 100644 --- a/linden/indra/llinventory/lltransactionflags.cpp +++ b/linden/indra/llinventory/lltransactionflags.cpp @@ -37,7 +37,7 @@ #include "lltransactionflags.h" #include "lltransactiontypes.h" -#include "../newview/hippoGridManager.h" +#include "../newview/hippogridmanager.h" const U8 TRANSACTION_FLAGS_NONE = 0; const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1; diff --git a/linden/indra/llui/llnotifications.cpp b/linden/indra/llui/llnotifications.cpp index 4d3ff46..77f2ff7 100644 --- a/linden/indra/llui/llnotifications.cpp +++ b/linden/indra/llui/llnotifications.cpp @@ -40,7 +40,7 @@ #include #include -#include "../newview/hippoGridManager.h" +#include "../newview/hippogridmanager.h" const std::string NOTIFICATION_PERSIST_VERSION = "0.93"; diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 58c89eb..e3a1745 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -82,9 +82,9 @@ set(viewer_SOURCE_FILES floaterlocalassetbrowse.cpp floatervoicelicense.cpp hbfloatergrouptitles.cpp - hippoGridManager.cpp - hippoLimits.cpp - hippoRestRequest.cpp + hippogridmanager.cpp + hippolimits.cpp + hipporestrequest.cpp impprefsfonts.cpp jcfloater_animation_list.cpp jcfloaterareasearch.cpp @@ -534,9 +534,9 @@ set(viewer_HEADER_FILES floaterlocalassetbrowse.h floatervoicelicense.h hbfloatergrouptitles.h - hippoGridManager.h - hippoLimits.h - hippoRestRequest.h + hippogridmanager.h + hippolimits.h + hipporestrequest.h impprefsfonts.h jcfloater_animation_list.h jcfloaterareasearch.h diff --git a/linden/indra/newview/chatbar_as_cmdline.cpp b/linden/indra/newview/chatbar_as_cmdline.cpp index 96787ad..0593091 100644 --- a/linden/indra/newview/chatbar_as_cmdline.cpp +++ b/linden/indra/newview/chatbar_as_cmdline.cpp @@ -43,7 +43,7 @@ #include "lluuid.h" #include "llviewercontrol.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "material_codes.h" #include "llvolume.h" #include "object_flags.h" diff --git a/linden/indra/newview/floatercommandline.cpp b/linden/indra/newview/floatercommandline.cpp index c093a58..6889696 100644 --- a/linden/indra/newview/floatercommandline.cpp +++ b/linden/indra/newview/floatercommandline.cpp @@ -32,7 +32,7 @@ #include "floatercommandline.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "lluictrlfactory.h" #include "llviewercontrol.h" diff --git a/linden/indra/newview/floatergriddefault.cpp b/linden/indra/newview/floatergriddefault.cpp index 2c31fb6..6a2526d 100644 --- a/linden/indra/newview/floatergriddefault.cpp +++ b/linden/indra/newview/floatergriddefault.cpp @@ -32,7 +32,7 @@ #include "floatergriddefault.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "llpanellogin.h" #include "llscrolllistctrl.h" #include "lluictrlfactory.h" diff --git a/linden/indra/newview/floatergridmanager.cpp b/linden/indra/newview/floatergridmanager.cpp index 3d4b17f..298fe35 100644 --- a/linden/indra/newview/floatergridmanager.cpp +++ b/linden/indra/newview/floatergridmanager.cpp @@ -17,7 +17,7 @@ #include "llmd5.h" #include "llurlsimstring.h" #include "lluictrlfactory.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "llviewernetwork.h" #include "llpanellogin.h" diff --git a/linden/indra/newview/floaterlocalassetbrowse.cpp b/linden/indra/newview/floaterlocalassetbrowse.cpp index 991d2fd..8ea13cc 100644 --- a/linden/indra/newview/floaterlocalassetbrowse.cpp +++ b/linden/indra/newview/floaterlocalassetbrowse.cpp @@ -53,7 +53,7 @@ this feature is still a work in progress. /* misc headers */ #include #include -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "llviewerimagelist.h" #include "llviewerobjectlist.h" #include "llfilepicker.h" diff --git a/linden/indra/newview/hippogridmanager.cpp b/linden/indra/newview/hippogridmanager.cpp index dd0fa35..d56214c 100644 --- a/linden/indra/newview/hippogridmanager.cpp +++ b/linden/indra/newview/hippogridmanager.cpp @@ -2,7 +2,7 @@ #include "llviewerprecompiledheaders.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include @@ -17,7 +17,7 @@ #include "llviewercontrol.h" #include "llweb.h" -#include "hippoRestRequest.h" +#include "hipporestrequest.h" // ******************************************************************** diff --git a/linden/indra/newview/hippolimits.cpp b/linden/indra/newview/hippolimits.cpp index a5d6ee6..851e191 100644 --- a/linden/indra/newview/hippolimits.cpp +++ b/linden/indra/newview/hippolimits.cpp @@ -2,9 +2,9 @@ #include "llviewerprecompiledheaders.h" -#include "hippoLimits.h" +#include "hippolimits.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "llviewercontrol.h" #include diff --git a/linden/indra/newview/hipporestrequest.cpp b/linden/indra/newview/hipporestrequest.cpp index ed15907..9d24aed 100644 --- a/linden/indra/newview/hipporestrequest.cpp +++ b/linden/indra/newview/hipporestrequest.cpp @@ -2,7 +2,7 @@ #include "llviewerprecompiledheaders.h" -#include "hippoRestRequest.h" +#include "hipporestrequest.h" #ifndef CURL_STATICLIB #define CURL_STATICLIB 1 diff --git a/linden/indra/newview/hippoupdate.cpp b/linden/indra/newview/hippoupdate.cpp index f6947ad..192e3d7 100644 --- a/linden/indra/newview/hippoupdate.cpp +++ b/linden/indra/newview/hippoupdate.cpp @@ -1,5 +1,5 @@ -#include "hippoUpdate.h" +#include "hippoupdate.h" #include #include diff --git a/linden/indra/newview/kowopenregionsettings.cpp b/linden/indra/newview/kowopenregionsettings.cpp index 86a426c..8aac87c 100644 --- a/linden/indra/newview/kowopenregionsettings.cpp +++ b/linden/indra/newview/kowopenregionsettings.cpp @@ -27,7 +27,7 @@ #include "llviewerprecompiledheaders.h" #include "llhttpnode.h" -#include "hippoLimits.h" +#include "hippolimits.h" #include "llfloatertools.h" #include "llviewercontrol.h" #include "llagent.h" diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 3d8be5f..38985d3 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -176,9 +176,9 @@ #include "llcommandlineparser.h" -#include "hippoGridManager.h" -#include "hippoLimits.h" -#include "hippoUpdate.h" +#include "hippogridmanager.h" +#include "hippolimits.h" +#include "hippoupdate.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llassetuploadresponders.cpp b/linden/indra/newview/llassetuploadresponders.cpp index b9ec9a0..d4a75f7 100644 --- a/linden/indra/newview/llassetuploadresponders.cpp +++ b/linden/indra/newview/llassetuploadresponders.cpp @@ -63,7 +63,7 @@ #include "llscrolllistctrl.h" #include "llsdserialize.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // When uploading multiple files, don't display any of them when uploading more than this number. static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5; diff --git a/linden/indra/newview/llcurrencyuimanager.cpp b/linden/indra/newview/llcurrencyuimanager.cpp index 99d0430..07b1287 100644 --- a/linden/indra/newview/llcurrencyuimanager.cpp +++ b/linden/indra/newview/llcurrencyuimanager.cpp @@ -47,7 +47,7 @@ #include "llxmlrpctransaction.h" #include "llviewernetwork.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" const F64 CURRENCY_ESTIMATE_FREQUENCY = 2.0; // how long of a pause in typing a currency buy amount before an diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index 0b777ea..18efa9e 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -47,7 +47,7 @@ #include "floatergriddefault.h" #include "floatervoicelicense.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "llstartup.h" #include "llvoavatar.h" diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 4be83b6..5c037d6 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -44,7 +44,7 @@ #include "llimagej2c.h" #include "llaudioengine.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "llviewertexteditor.h" #include "llviewercontrol.h" #include "llagent.h" diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index 09d3b2c..232530c 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp @@ -68,7 +68,7 @@ #include "pipeline.h" #include "lluictrlfactory.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" S32 LLFloaterAnimPreview::sUploadAmount = 10; diff --git a/linden/indra/newview/llfloaterbuy.cpp b/linden/indra/newview/llfloaterbuy.cpp index 86cab43..99c9fed 100644 --- a/linden/indra/newview/llfloaterbuy.cpp +++ b/linden/indra/newview/llfloaterbuy.cpp @@ -50,7 +50,7 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" LLFloaterBuy* LLFloaterBuy::sInstance = NULL; diff --git a/linden/indra/newview/llfloaterbuycontents.cpp b/linden/indra/newview/llfloaterbuycontents.cpp index 498d6ac..e16f98d 100644 --- a/linden/indra/newview/llfloaterbuycontents.cpp +++ b/linden/indra/newview/llfloaterbuycontents.cpp @@ -54,7 +54,7 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" LLFloaterBuyContents* LLFloaterBuyContents::sInstance = NULL; diff --git a/linden/indra/newview/llfloaterbuycurrency.cpp b/linden/indra/newview/llfloaterbuycurrency.cpp index 5096495..6a0dd68 100644 --- a/linden/indra/newview/llfloaterbuycurrency.cpp +++ b/linden/indra/newview/llfloaterbuycurrency.cpp @@ -46,7 +46,7 @@ #include "llwindow.h" #include "llappviewer.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" static const S32 STANDARD_BUY_AMOUNT = 2000; static const S32 MINIMUM_BALANCE_AMOUNT = 0; diff --git a/linden/indra/newview/llfloaterbuyland.cpp b/linden/indra/newview/llfloaterbuyland.cpp index 75630b2..8288c58 100644 --- a/linden/indra/newview/llfloaterbuyland.cpp +++ b/linden/indra/newview/llfloaterbuyland.cpp @@ -66,7 +66,7 @@ #include "llviewernetwork.h" #include "roles_constants.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // NOTE: This is duplicated in lldatamoney.cpp ... const F32 GROUP_LAND_BONUS_FACTOR = 1.1f; diff --git a/linden/indra/newview/llfloatergodtools.cpp b/linden/indra/newview/llfloatergodtools.cpp index 461dfe2..f918e8a 100644 --- a/linden/indra/newview/llfloatergodtools.cpp +++ b/linden/indra/newview/llfloatergodtools.cpp @@ -77,7 +77,7 @@ #include "lltransfertargetfile.h" #include "lltransfersourcefile.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" const F32 SECONDS_BETWEEN_UPDATE_REQUESTS = 5.0f; diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp index 79e9e31..f735923 100644 --- a/linden/indra/newview/llfloatergroups.cpp +++ b/linden/indra/newview/llfloatergroups.cpp @@ -59,7 +59,7 @@ #include "llviewerwindow.h" #include "llimview.h" -#include "hippoLimits.h" +#include "hippolimits.h" // static std::map LLFloaterGroupPicker::sInstances; diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index 1ec964b..c89c2e2 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp @@ -54,7 +54,7 @@ #include "llviewerparcelmedia.h" #include "llcombobox.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& media_data) { diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 8142869..aa8a94f 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp @@ -60,7 +60,7 @@ #include "llstring.h" #include "llviewercontrol.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #ifdef LL_DARWIN #include "llwindowmacosx-objc.h" diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp index 42bc41c..cc3e385 100644 --- a/linden/indra/newview/llfloaterland.cpp +++ b/linden/indra/newview/llfloaterland.cpp @@ -77,7 +77,7 @@ #include "llviewercontrol.h" #include "roles_constants.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 34b8dde..e63ea4b 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -44,7 +44,7 @@ #include "lluictrlfactory.h" #include "llfirstuse.h" #include "panelradar.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] diff --git a/linden/indra/newview/llfloaternamedesc.cpp b/linden/indra/newview/llfloaternamedesc.cpp index 9413611..9e8e94b 100644 --- a/linden/indra/newview/llfloaternamedesc.cpp +++ b/linden/indra/newview/llfloaternamedesc.cpp @@ -55,7 +55,7 @@ #include "llassetstorage.h" #include "llinventorytype.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" const S32 PREVIEW_LINE_HEIGHT = 19; const S32 PREVIEW_CLOSE_BOX_SIZE = 16; diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp index aa9b2fb..8cd552e 100644 --- a/linden/indra/newview/llfloaterpostcard.cpp +++ b/linden/indra/newview/llfloaterpostcard.cpp @@ -66,7 +66,7 @@ #include //boost.regex lib -#include "hippoGridManager.h" +#include "hippogridmanager.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs diff --git a/linden/indra/newview/llfloaterproperties.cpp b/linden/indra/newview/llfloaterproperties.cpp index 40b293a..96e1642 100644 --- a/linden/indra/newview/llfloaterproperties.cpp +++ b/linden/indra/newview/llfloaterproperties.cpp @@ -59,7 +59,7 @@ #include "lluictrlfactory.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 9e6f323..8ae3fa2 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp @@ -80,7 +80,7 @@ #include "llviewertexteditor.h" #include "llviewerwindow.h" #include "llvlcomposition.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llfloatersellland.cpp b/linden/indra/newview/llfloatersellland.cpp index bf4a4c3..9b25708 100644 --- a/linden/indra/newview/llfloatersellland.cpp +++ b/linden/indra/newview/llfloatersellland.cpp @@ -46,7 +46,7 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // defined in llfloaterland.cpp void send_parcel_select_objects(S32 parcel_local_id, S32 return_type, diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index a58120d..e007680 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp @@ -77,7 +77,7 @@ #include "llvfile.h" #include "llvfs.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 2f02f1e..683ebd4 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp @@ -85,7 +85,7 @@ #include "llvotree.h" #include "lluictrlfactory.h" #include "qtoolalign.h" -#include "hippoLimits.h" +#include "hippolimits.h" // Globals LLFloaterTools *gFloaterTools = NULL; diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp index f3a124a..ac4a06b 100644 --- a/linden/indra/newview/llfloatertos.cpp +++ b/linden/indra/newview/llfloatertos.cpp @@ -52,7 +52,7 @@ #include "lluictrlfactory.h" #include "llvfile.h" #include "message.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // static diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index 0a01ca7..47f3361 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp @@ -70,7 +70,7 @@ #include "llglheaders.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llgivemoney.cpp b/linden/indra/newview/llgivemoney.cpp index 6c69334..ee2bf63 100644 --- a/linden/indra/newview/llgivemoney.cpp +++ b/linden/indra/newview/llgivemoney.cpp @@ -52,7 +52,7 @@ #include "lltransactiontypes.h" #include "lluictrlfactory.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp index c7136bc..10d27cd 100644 --- a/linden/indra/newview/llhoverview.cpp +++ b/linden/indra/newview/llhoverview.cpp @@ -73,7 +73,7 @@ #include "llhudmanager.h" // For testing effects #include "llhudeffect.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp index fa7e85f..268e431 100644 --- a/linden/indra/newview/llmanipscale.cpp +++ b/linden/indra/newview/llmanipscale.cpp @@ -63,7 +63,7 @@ #include "v2math.h" #include "llvoavatar.h" -#include "hippoLimits.h" +#include "hippolimits.h" const F32 MAX_MANIP_SELECT_DISTANCE_SQUARED = 11.f * 11.f; diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index cc14b27..8484c4e 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp @@ -66,7 +66,7 @@ #include "llui.h" #include "pipeline.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index dc4456a..b9dc482 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -71,7 +71,7 @@ #include "llglheaders.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index b0f5f91..891707b 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp @@ -55,7 +55,7 @@ #include "lloverlaybar.h" // for gOverlayBar #include "lluictrlfactory.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] - Version: 1.23.4 #include "rlvhandler.h" diff --git a/linden/indra/newview/llpanelaudioprefs.cpp b/linden/indra/newview/llpanelaudioprefs.cpp index d4c8e9f..1acfcbb 100644 --- a/linden/indra/newview/llpanelaudioprefs.cpp +++ b/linden/indra/newview/llpanelaudioprefs.cpp @@ -62,7 +62,7 @@ #include "llviewerwindow.h" #include "llviewercontrol.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // // Static functions diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index d3230c8..99b6cf6 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp @@ -70,7 +70,7 @@ #include "llviewerwindow.h" // for window width, height #include "llappviewer.h" // abortQuit() -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index 14c4a90..342ffec 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp @@ -73,7 +73,7 @@ #include "boost/lexical_cast.hpp" #endif -#include "hippoGridManager.h" +#include "hippogridmanager.h" //--------------------------------------------------------------------------- // LLPanelDirFindAll - Google search appliance based search diff --git a/linden/indra/newview/llpaneldirland.cpp b/linden/indra/newview/llpaneldirland.cpp index c702931..3fdf37e 100644 --- a/linden/indra/newview/llpaneldirland.cpp +++ b/linden/indra/newview/llpaneldirland.cpp @@ -52,7 +52,7 @@ #include "llviewercontrol.h" #include "llviewermessage.h" #include "llnotify.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" //----------------------------------------------------------------------------- // Constants diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index e0d6376..6878f84 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp @@ -34,7 +34,7 @@ #include "llpanelgroupgeneral.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "lluictrlfactory.h" #include "llagent.h" diff --git a/linden/indra/newview/llpanelgrouplandmoney.cpp b/linden/indra/newview/llpanelgrouplandmoney.cpp index bded59c..3f128fe 100644 --- a/linden/indra/newview/llpanelgrouplandmoney.cpp +++ b/linden/indra/newview/llpanelgrouplandmoney.cpp @@ -55,7 +55,7 @@ #include "llfloaterworldmap.h" #include "llviewermessage.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" //////////////////////////////////////////////////////////////////////////// diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 41ba513..9cd2759 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp @@ -82,7 +82,7 @@ #include "llviewerwindow.h" #include "llwearable.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llpanelland.cpp b/linden/indra/newview/llpanelland.cpp index ea6a557..d1eee80 100644 --- a/linden/indra/newview/llpanelland.cpp +++ b/linden/indra/newview/llpanelland.cpp @@ -49,7 +49,7 @@ #include "lluictrlfactory.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp index 11f491c..b7df164 100644 --- a/linden/indra/newview/llpanellandmedia.cpp +++ b/linden/indra/newview/llpanellandmedia.cpp @@ -55,7 +55,7 @@ #include "lltexturectrl.h" #include "roles_constants.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" //--------------------------------------------------------------------------- // LLPanelLandMedia diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 2a8c20f..6464f0b 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -36,8 +36,8 @@ #include "llpanelgeneral.h" -#include "hippoGridManager.h" -#include "hippoLimits.h" +#include "hippogridmanager.h" +#include "hippolimits.h" #include "floatergridmanager.h" #include "indra_constants.h" // for key and mask constants diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp index 3ea7aa5..9e04070 100644 --- a/linden/indra/newview/llpanelmsgs.cpp +++ b/linden/indra/newview/llpanelmsgs.cpp @@ -40,7 +40,7 @@ #include "lluictrlfactory.h" #include "llfirstuse.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" //----------------------------------------------------------------------------- LLPanelMsgs::LLPanelMsgs() : diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index 706f98e..cc89e24 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -76,7 +76,7 @@ #include "lldrawpool.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index 5131d2c..6b7bc1b 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp @@ -68,7 +68,7 @@ #include "lluictrlfactory.h" #include "roles_constants.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llpanelplace.cpp b/linden/indra/newview/llpanelplace.cpp index eb3d17d..fe88c13 100644 --- a/linden/indra/newview/llpanelplace.cpp +++ b/linden/indra/newview/llpanelplace.cpp @@ -58,7 +58,7 @@ #include "llweb.h" #include "llsdutil.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" //static std::list LLPanelPlace::sAllPanels; diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp index 14df239..6f9bd7a 100644 --- a/linden/indra/newview/llpanelweb.cpp +++ b/linden/indra/newview/llpanelweb.cpp @@ -37,7 +37,7 @@ // project includes #include "llcheckboxctrl.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "lluictrlfactory.h" #include "llviewercontrol.h" #include "llviewermedia.h" diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index e915bd2..9e86cd3 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -49,7 +49,7 @@ #include "lldirpicker.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 49446c7..b744961 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -210,8 +210,8 @@ #include "floaterao.h" -#include "hippoGridManager.h" -#include "hippoLimits.h" +#include "hippogridmanager.h" +#include "hippolimits.h" #include "lggautocorrect.h" // diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index 4579100..3370f7f 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp @@ -83,7 +83,7 @@ #include "llstring.h" #include "message.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "viewertime.h" // diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index f63deb8..f93a574 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -2275,7 +2275,7 @@ void LLTextureFetch::dump() // // *TODO: This is a *HACK and may not work if the grid is heterogenous. // Remove it once OpenSim versions in the wild are > 0.7.0.2! -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include //static bool LLTextureFetch::hasBuggyHTTPRange() diff --git a/linden/indra/newview/lltooldraganddrop.cpp b/linden/indra/newview/lltooldraganddrop.cpp index 4e133de..18c4917 100644 --- a/linden/indra/newview/lltooldraganddrop.cpp +++ b/linden/indra/newview/lltooldraganddrop.cpp @@ -75,7 +75,7 @@ // [RLVa:KB] #include "rlvhandler.h" // [/RLVa:KB] -#include "hippoLimits.h" +#include "hippolimits.h" // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES // or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp index 9b6d6f7..10b0431 100644 --- a/linden/indra/newview/lltoolgrab.cpp +++ b/linden/indra/newview/lltoolgrab.cpp @@ -64,7 +64,7 @@ #include "llvoavatar.h" #include "llworld.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index 4167464..59a87d5 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp @@ -82,7 +82,7 @@ #include "llwlparammanager.h" #include "llwaterparammanager.h" #include "llpostprocess.h" -#include "hippoLimits.h" +#include "hippolimits.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index ace0bcb..a663e60 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -228,8 +228,8 @@ #include "jcfloater_animation_list.h" #include "llfloaterassetbrowser.h" -#include "hippoGridManager.h" -#include "hippoLimits.h" +#include "hippogridmanager.h" +#include "hippolimits.h" #include "llfloaterteleporthistory.h" diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 743e0d9..5f333e9 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -150,8 +150,8 @@ #include #include // Boost Reg Expresions -#include "hippoGridManager.h" -#include "hippoLimits.h" +#include "hippogridmanager.h" +#include "hippolimits.h" #include "wlsettingsmanager.h" #if LL_WINDOWS // For Windows specific error handler diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index c1d5013..1cfe665 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp @@ -37,7 +37,7 @@ #include "llviewercontrol.h" #include "llstartup.h" - #include "hippoGridManager.h" + #include "hippogridmanager.h" unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp index 5326049..b589f2e 100644 --- a/linden/indra/newview/llviewerparcelmgr.cpp +++ b/linden/indra/newview/llviewerparcelmgr.cpp @@ -70,7 +70,7 @@ #include "roles_constants.h" #include "llweb.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" const F32 PARCEL_COLLISION_DRAW_SECS = 1.f; diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index c4a4dee..54aed54 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -94,7 +94,7 @@ #else #include "boost/lexical_cast.hpp" #endif -#include "hippoLimits.h"// getMaxPrimScale +#include "hippolimits.h"// getMaxPrimScale #include "llstartup.h" // [RLVa:KB] #include "rlvhandler.h" diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index c484462..7866bf8 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -60,7 +60,7 @@ #include "pipeline.h" #include "llappviewer.h" // for do_disconnect() -#include "hippoLimits.h" +#include "hippolimits.h" #include #include diff --git a/linden/indra/newview/llworldmap.cpp b/linden/indra/newview/llworldmap.cpp index 43d7426..3ada36f 100644 --- a/linden/indra/newview/llworldmap.cpp +++ b/linden/indra/newview/llworldmap.cpp @@ -47,7 +47,7 @@ #include "llviewerimagelist.h" #include "llviewerregion.h" #include "llregionflags.h" - #include "hippoGridManager.h" + #include "hippogridmanager.h" bool LLWorldMap::sGotMapURL = false; const F32 REQUEST_ITEMS_TIMER = 10.f * 60.f; // 10 minutes diff --git a/linden/indra/newview/llxmlrpctransaction.cpp b/linden/indra/newview/llxmlrpctransaction.cpp index b993c99..058946e 100644 --- a/linden/indra/newview/llxmlrpctransaction.cpp +++ b/linden/indra/newview/llxmlrpctransaction.cpp @@ -35,7 +35,7 @@ #include "llxmlrpctransaction.h" #include "llcurl.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "llviewercontrol.h" // Have to include these last to avoid queue redefinition! diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp index 63043f0..7f050a0 100644 --- a/linden/indra/newview/primbackup.cpp +++ b/linden/indra/newview/primbackup.cpp @@ -54,7 +54,7 @@ #include "llappviewer.h" #include "lltransactiontypes.h" -#include "hippoGridManager.h" +#include "hippogridmanager.h" #include "primbackup.h" diff --git a/linden/indra/newview/windlightsettingsupdate.cpp b/linden/indra/newview/windlightsettingsupdate.cpp index a5f9cb7..ad6e7c9 100644 --- a/linden/indra/newview/windlightsettingsupdate.cpp +++ b/linden/indra/newview/windlightsettingsupdate.cpp @@ -27,7 +27,7 @@ #include "llviewerprecompiledheaders.h" #include "llhttpnode.h" -#include "hippoLimits.h" +#include "hippolimits.h" #include "llfloatertools.h" #include "llviewercontrol.h" #include "llagent.h" diff --git a/linden/indra/newview/wlfloatermanager.cpp b/linden/indra/newview/wlfloatermanager.cpp index 1946807..63abe14 100644 --- a/linden/indra/newview/wlfloatermanager.cpp +++ b/linden/indra/newview/wlfloatermanager.cpp @@ -64,7 +64,7 @@ #include "llwlparammanager.h" #include "llwaterparammanager.h" #include "llpostprocess.h" -#include "hippoLimits.h" +#include "hippolimits.h" #include "wlfloatermanager.h" #include "llviewerregion.h" #include "llviewerparcelmgr.h" diff --git a/linden/indra/newview/wlfloaterwindlightsend.cpp b/linden/indra/newview/wlfloaterwindlightsend.cpp index 5244bcd..e6148ed 100644 --- a/linden/indra/newview/wlfloaterwindlightsend.cpp +++ b/linden/indra/newview/wlfloaterwindlightsend.cpp @@ -64,7 +64,7 @@ #include "llwlparammanager.h" #include "llwaterparammanager.h" #include "llpostprocess.h" -#include "hippoLimits.h" +#include "hippolimits.h" #include "wlfloaterwindlightsend.h" #include "llviewerregion.h" diff --git a/linden/indra/newview/wlretrievesettings.cpp b/linden/indra/newview/wlretrievesettings.cpp index ca91ba2..afa84f2 100644 --- a/linden/indra/newview/wlretrievesettings.cpp +++ b/linden/indra/newview/wlretrievesettings.cpp @@ -64,7 +64,7 @@ #include "llwlparammanager.h" #include "llwaterparammanager.h" #include "llpostprocess.h" -#include "hippoLimits.h" +#include "hippolimits.h" #include "wlfloaterwindlightsend.h" #include "llviewerregion.h" #include "wlsettingsmanager.h" diff --git a/linden/indra/newview/wlsettingsmanager.cpp b/linden/indra/newview/wlsettingsmanager.cpp index 853d14f..c0a07e1 100644 --- a/linden/indra/newview/wlsettingsmanager.cpp +++ b/linden/indra/newview/wlsettingsmanager.cpp @@ -64,7 +64,7 @@ #include "llwlparammanager.h" #include "llwaterparammanager.h" #include "llpostprocess.h" -#include "hippoLimits.h" +#include "hippolimits.h" #include "wlfloaterwindlightsend.h" #include "llviewerregion.h" #include "wlsettingsmanager.h" -- cgit v1.1 From 58a00b0ed40ea430a97b263cfe5611b0cf76f08f Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 3 Nov 2010 21:32:14 +0100 Subject: Center the "loading..." text on the login page. The loading.html page is no longer used. Instead embedded html found in panel_login.xml is used. I couldn't get it to show an image, but at least the "loading..." text is now centralized and I changed the background color from black to imprudence-purple. --- .../skins/default/html/en-us/loading/loading.html | 9 ------- .../skins/default/xui/en-us/panel_login.xml | 28 ++++++++++++++++------ 2 files changed, 21 insertions(+), 16 deletions(-) delete mode 100644 linden/indra/newview/skins/default/html/en-us/loading/loading.html diff --git a/linden/indra/newview/skins/default/html/en-us/loading/loading.html b/linden/indra/newview/skins/default/html/en-us/loading/loading.html deleted file mode 100644 index 97174b0..0000000 --- a/linden/indra/newview/skins/default/html/en-us/loading/loading.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -
-
   loading... -
- diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml index 96f3f77..048005d 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml @@ -1,13 +1,27 @@ - - + bottom="0" left="0" height="600" width="800" + follows="left|top|right|bottom" mouse_opaque="true" > + + http://secondlife.com/app/login/ -- cgit v1.1 From 77444695c7eef38826a85aff5fb9f0fb97b8f9ce Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 5 Nov 2010 14:33:52 +0100 Subject: IMP-592: Extend login screen menu bar till the top of the window. Basically, this Linden code is just horribly broken. I spend already too much time on this (two days) for dead code, so I settled for a minimal fix for this particular case that works, instead of fixing their code properly. The problem is that without specifying "bottom" the code adds 4 pixels (VPAD) between whatever widget that is added and it's parents top (in LLView::createRect). In order to be sure that bottom is exactly minus the height, I had to specify the height too; hopefully this value is the same for everyone cause theorectically it depends on the font size (4 + fontheight + 4). The default height of the Linden code is only 4 + fontheight (they leave off the VPAD). --- linden/doc/contributions.txt | 1 + linden/indra/newview/skins/default/xui/en-us/menu_login.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index f518911..a54424c 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -80,6 +80,7 @@ Aleric Inglewood IMP-578 IMP-579 IMP-581 + IMP-592 IMP-595 IMP-660 IMP-661 diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml index d9a9c4c..18fb8e6 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml @@ -1,5 +1,5 @@ - + -- cgit v1.1 From adbffe79b6b2794e647f6259132f5d64e1e93ea0 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Nov 2010 17:10:28 -0700 Subject: Created new preferences panel to handle chat colors and name highlighting (removes the 'Extras' panel from Prefs > Advanced and moves the color options from 'Text Chat') --- linden/indra/newview/CMakeLists.txt | 2 + linden/indra/newview/llfloaterpreference.cpp | 14 +- linden/indra/newview/llfloaterpreference.h | 2 + linden/indra/newview/llprefsadvanced.cpp | 27 --- linden/indra/newview/llprefschat.cpp | 51 ----- linden/indra/newview/llprefscolors.cpp | 180 +++++++++++++++ linden/indra/newview/llprefscolors.h | 67 ++++++ .../xui/en-us/panel_preferences_advanced.xml | 51 ----- .../default/xui/en-us/panel_preferences_chat.xml | 246 +++++++++------------ .../default/xui/en-us/panel_preferences_colors.xml | 115 ++++++++++ 10 files changed, 478 insertions(+), 277 deletions(-) create mode 100644 linden/indra/newview/llprefscolors.cpp create mode 100644 linden/indra/newview/llprefscolors.h create mode 100644 linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index e3a1745..a4d99f2 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -333,6 +333,7 @@ set(viewer_SOURCE_FILES llpolymorph.cpp llprefsadvanced.cpp llprefschat.cpp + llprefscolors.cpp llprefsim.cpp llprefsvoice.cpp llpreviewanim.cpp @@ -790,6 +791,7 @@ set(viewer_HEADER_FILES llpolymorph.h llprefsadvanced.h llprefschat.h + llprefscolors.h llprefsim.h llprefsvoice.h llpreview.h diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp index b740725..906cf11 100644 --- a/linden/indra/newview/llfloaterpreference.cpp +++ b/linden/indra/newview/llfloaterpreference.cpp @@ -64,6 +64,7 @@ #include "llpanelskins.h" #include "llprefsadvanced.h" #include "llprefschat.h" +#include "llprefscolors.h" #include "llprefsvoice.h" #include "llprefsim.h" #include "llresizehandle.h" @@ -133,6 +134,7 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mAudioPanel(NULL), mMsgPanel(NULL), mSkinsPanel(NULL), + mPrefsColors(NULL), mLCDPanel(NULL), mPrefsFonts(NULL), mPrefsAdvanced(NULL) @@ -190,6 +192,10 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mMsgPanel = new LLPanelMsgs(); mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mMsgPanel->setDefaultBtn(default_btn); + + mPrefsColors = new LLPrefsColors(); + mTabContainer->addTabPanel(mPrefsColors, mPrefsColors->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsColors->setDefaultBtn(default_btn); mSkinsPanel = new LLPanelSkins(); mTabContainer->addTabPanel(mSkinsPanel, mSkinsPanel->getLabel(), FALSE, onTabChanged, mTabContainer); @@ -272,7 +278,11 @@ LLPreferenceCore::~LLPreferenceCore() delete mPrefsFonts; mPrefsFonts = NULL; } - + if (mPrefsColors) + { + delete mPrefsColors; + mPrefsColors = NULL; + } } @@ -290,6 +300,7 @@ void LLPreferenceCore::apply() mSkinsPanel->apply(); mPrefsAdvanced->apply(); mPrefsFonts->apply(); + mPrefsColors->apply(); // hardware menu apply LLFloaterHardwareSettings::instance()->apply(); @@ -320,6 +331,7 @@ void LLPreferenceCore::cancel() mSkinsPanel->cancel(); mPrefsAdvanced->cancel(); mPrefsFonts->cancel(); + mPrefsColors->cancel(); // cancel hardware menu LLFloaterHardwareSettings::instance()->cancel(); diff --git a/linden/indra/newview/llfloaterpreference.h b/linden/indra/newview/llfloaterpreference.h index e98c45c..c52f541 100644 --- a/linden/indra/newview/llfloaterpreference.h +++ b/linden/indra/newview/llfloaterpreference.h @@ -57,6 +57,7 @@ class LLPanelMsgs; class LLPanelSkins; class LLPrefsAdvanced; class ImpPrefsFonts; +class LLPrefsColors; class LLScrollListCtrl; class LLPreferenceCore @@ -94,6 +95,7 @@ private: LLPanelMsgs *mMsgPanel; LLPanelLCD *mLCDPanel; LLPrefsAdvanced *mPrefsAdvanced; + LLPrefsColors *mPrefsColors; ImpPrefsFonts* mPrefsFonts; }; diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index aa62b34..99bc4fd 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp @@ -116,15 +116,6 @@ BOOL LLPrefsAdvanced::postBuild() initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); - childSetValue("HighlightOwnNameInIM", gSavedSettings.getBOOL("HighlightOwnNameInIM")); - childSetValue("HighlightFriendsChat", gSavedSettings.getBOOL("HighlightFriendsChat")); - getChild("FriendsChatColor")->set(gSavedSettings.getColor4("FriendsChatColor")); - childSetValue("HighlightOwnNameInChat", gSavedSettings.getBOOL("HighlightOwnNameInChat")); - getChild("OwnNameChatColor")->set(gSavedSettings.getColor4("OwnNameChatColor")); - childSetValue("nick01", gSavedSettings.getString("nick01")); - childSetValue("nick02", gSavedSettings.getString("nick02")); - childSetValue("nick03", gSavedSettings.getString("nick03")); - refresh(); return TRUE; @@ -147,24 +138,6 @@ void LLPrefsAdvanced::apply() gSavedSettings.setU32("LightShareAllowed", (U32)childGetValue("lightshare_combo").asInteger()); - gSavedSettings.setBOOL("HighlightOwnNameInIM", childGetValue("HighlightOwnNameInIM")); - gSavedSettings.setBOOL("HighlightFriendsChat", childGetValue("HighlightFriendsChat")); - gSavedSettings.setColor4("FriendsChatColor", getChild("FriendsChatColor")->get()); - gSavedSettings.setBOOL("HighlightOwnNameInChat", childGetValue("HighlightOwnNameInChat")); - gSavedSettings.setColor4("OwnNameChatColor", getChild("OwnNameChatColor")->get()); - - std::string nick01 = childGetValue("nick01"); - boost::trim(nick01); - gSavedSettings.setString("nick01", nick01); - - std::string nick02 = childGetValue("nick02"); - boost::trim(nick02); - gSavedSettings.setString("nick02", nick02); - - std::string nick03 = childGetValue("nick03"); - boost::trim(nick03); - gSavedSettings.setString("nick03", nick03); - // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC if (gSavedSettings.getBOOL("ShowMyClientTagToOthers") != (BOOL)childGetValue("client_name_tag_broadcast_check")) { diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index 8d704d5..5f74a25 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp @@ -36,10 +36,8 @@ #include "llchatbar.h" #include "llfloaterchat.h" #include "llprefschat.h" -#include "lltexteditor.h" #include "llviewercontrol.h" #include "lluictrlfactory.h" -#include "llcolorswatch.h" #include "llradiogroup.h" #include "llstylemap.h" @@ -57,15 +55,6 @@ private: S32 mChatSize; F32 mChatPersist; S32 mChatMaxLines; - LLColor4 mSystemChatColor; - LLColor4 mUserChatColor; - LLColor4 mAgentChatColor; - LLColor4 mIMChatColor; - LLColor4 mObjectChatColor; - LLColor4 mOwnerSayChatColor; - LLColor4 mBGChatColor; - LLColor4 mScriptErrorColor; - LLColor4 mHTMLLinkColor; BOOL mChatFullWidth; BOOL mCloseChatOnReturn; BOOL mArrowKeysMoveAvatar; @@ -92,16 +81,6 @@ LLPrefsChatImpl::LLPrefsChatImpl() childSetValue("fade_chat_time", gSavedSettings.getF32("ChatPersistTime")); childSetValue("max_chat_count", gSavedSettings.getS32("ConsoleMaxLines")); - getChild("system")->set(gSavedSettings.getColor4("SystemChatColor")); - getChild("user")->set(gSavedSettings.getColor4("UserChatColor")); - getChild("agent")->set(gSavedSettings.getColor4("AgentChatColor")); - getChild("im")->set(gSavedSettings.getColor4("IMChatColor")); - getChild("script_error")->set(gSavedSettings.getColor4("ScriptErrorColor")); - getChild("objects")->set(gSavedSettings.getColor4("ObjectChatColor")); - getChild("owner")->set(gSavedSettings.getColor4("llOwnerSayChatColor")); - getChild("background")->set(gSavedSettings.getColor4("BackgroundChatColor")); - getChild("links")->set(gSavedSettings.getColor4("HTMLLinkColor")); - childSetValue("arrow_keys_move_avatar_check", gSavedSettings.getBOOL("ArrowKeysMoveAvatar")); childSetValue("show_timestamps_check", gSavedSettings.getBOOL("ChatShowTimestamps")); childSetValue("script_errors_as_chat", gSavedSettings.getBOOL("ScriptErrorsAsChat")); @@ -124,15 +103,6 @@ void LLPrefsChatImpl::refreshValues() mChatSize = gSavedSettings.getS32("ChatFontSize"); mChatPersist = gSavedSettings.getF32("ChatPersistTime"); mChatMaxLines = gSavedSettings.getS32("ConsoleMaxLines"); - mSystemChatColor = gSavedSettings.getColor4("SystemChatColor"); - mUserChatColor = gSavedSettings.getColor4("UserChatColor"); - mAgentChatColor = gSavedSettings.getColor4("AgentChatColor"); - mIMChatColor = gSavedSettings.getColor4("IMChatColor"); - mObjectChatColor = gSavedSettings.getColor4("ObjectChatColor"); - mOwnerSayChatColor = gSavedSettings.getColor4("llOwnerSayChatColor"); - mBGChatColor = gSavedSettings.getColor4("BackgroundChatColor"); - mScriptErrorColor = gSavedSettings.getColor4("ScriptErrorColor"); - mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); mArrowKeysMoveAvatar = gSavedSettings.getBOOL("ArrowKeysMoveAvatar"); mShowTimestamps = gSavedSettings.getBOOL("ChatShowTimestamps"); mScriptErrorAsChat = gSavedSettings.getBOOL("ScriptErrorsAsChat"); @@ -154,15 +124,6 @@ void LLPrefsChatImpl::cancel() gSavedSettings.setS32("ChatFontSize", mChatSize); gSavedSettings.setF32("ChatPersistTime", mChatPersist); gSavedSettings.setS32("ConsoleMaxLines", mChatMaxLines); - gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); - gSavedSettings.setColor4("UserChatColor", mUserChatColor); - gSavedSettings.setColor4("AgentChatColor", mAgentChatColor); - gSavedSettings.setColor4("IMChatColor", mIMChatColor); - gSavedSettings.setColor4("ObjectChatColor", mObjectChatColor); - gSavedSettings.setColor4("llOwnerSayChatColor", mOwnerSayChatColor); - gSavedSettings.setColor4("BackgroundChatColor", mBGChatColor); - gSavedSettings.setColor4("ScriptErrorColor", mScriptErrorColor); - gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); gSavedSettings.setBOOL("ArrowKeysMoveAvatar", mArrowKeysMoveAvatar); gSavedSettings.setBOOL("ChatShowTimestamps", mShowTimestamps); gSavedSettings.setBOOL("ScriptErrorsAsChat", mScriptErrorAsChat); @@ -184,18 +145,6 @@ void LLPrefsChatImpl::apply() gSavedSettings.setF32("ChatPersistTime", childGetValue("fade_chat_time").asReal()); gSavedSettings.setS32("ConsoleMaxLines", childGetValue("max_chat_count")); - gSavedSettings.setColor4("SystemChatColor", childGetValue("system")); - gSavedSettings.setColor4("UserChatColor", childGetValue("user")); - gSavedSettings.setColor4("AgentChatColor", childGetValue("agent")); - gSavedSettings.setColor4("IMChatColor", childGetValue("im")); - gSavedSettings.setColor4("ScriptErrorColor", childGetValue("script_error")); - gSavedSettings.setColor4("ObjectChatColor", childGetValue("objects")); - gSavedSettings.setColor4("llOwnerSayChatColor", childGetValue("owner")); - gSavedSettings.setColor4("BackgroundChatColor", childGetValue("background")); - - gSavedSettings.setColor4("HTMLLinkColor", childGetValue("links")); - LLTextEditor::setLinkColor(childGetValue("links")); - gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check")); gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check")); gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat")); diff --git a/linden/indra/newview/llprefscolors.cpp b/linden/indra/newview/llprefscolors.cpp new file mode 100644 index 0000000..9a30fcd --- /dev/null +++ b/linden/indra/newview/llprefscolors.cpp @@ -0,0 +1,180 @@ +/** +* @file llprefscolors.cpp +* @brief Color-specific preferences for Imprudence +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2010, McCabe Maxsted +* +* Imprudence Viewer Source Code +* The source code in this file ("Source Code") is provided to you +* under the terms of the GNU General Public License, version 2.0 +* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in +* this distribution, or online at +* http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" + +#include "llprefscolors.h" +#include "lltexteditor.h" +#include "llviewercontrol.h" + +#include "lluictrlfactory.h" +#include "llcolorswatch.h" + +#include "boost/algorithm/string.hpp" + +LLPrefsColors::LLPrefsColors() +{ + refreshColors(); // initialize member data from saved settings + + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_colors.xml"); +} + +LLPrefsColors::~LLPrefsColors() +{ + // Children all cleaned up by default view destructor. +} + +BOOL LLPrefsColors::postBuild() +{ + getChild("system")->set(gSavedSettings.getColor4("SystemChatColor")); + getChild("user")->set(gSavedSettings.getColor4("UserChatColor")); + getChild("agent")->set(gSavedSettings.getColor4("AgentChatColor")); + getChild("im")->set(gSavedSettings.getColor4("IMChatColor")); + getChild("script_error")->set(gSavedSettings.getColor4("ScriptErrorColor")); + getChild("objects")->set(gSavedSettings.getColor4("ObjectChatColor")); + getChild("owner")->set(gSavedSettings.getColor4("llOwnerSayChatColor")); + getChild("background")->set(gSavedSettings.getColor4("BackgroundChatColor")); + getChild("links")->set(gSavedSettings.getColor4("HTMLLinkColor")); + getChild("FriendsChatColor")->set(gSavedSettings.getColor4("FriendsChatColor")); + getChild("OwnNameChatColor")->set(gSavedSettings.getColor4("OwnNameChatColor")); + + childSetValue("HighlightOwnNameInIM", gSavedSettings.getBOOL("HighlightOwnNameInIM")); + childSetValue("HighlightFriendsChat", gSavedSettings.getBOOL("HighlightFriendsChat")); + childSetValue("HighlightOwnNameInChat", gSavedSettings.getBOOL("HighlightOwnNameInChat")); + updateSelfCheck(); + updateFriendsCheck(); + + childSetValue("nick01", gSavedSettings.getString("nick01")); + childSetValue("nick02", gSavedSettings.getString("nick02")); + childSetValue("nick03", gSavedSettings.getString("nick03")); + + childSetCommitCallback("HighlightOwnNameInIM", onCommitCheckSelfName, this); + childSetCommitCallback("HighlightOwnNameInChat", onCommitCheckSelfName, this); + childSetCommitCallback("HighlightFriendsChat", onCommitCheckFriends, this); + + return TRUE; +} + +void LLPrefsColors::refreshColors() +{ + mSystemChatColor = gSavedSettings.getColor4("SystemChatColor"); + mUserChatColor = gSavedSettings.getColor4("UserChatColor"); + mAgentChatColor = gSavedSettings.getColor4("AgentChatColor"); + mIMChatColor = gSavedSettings.getColor4("IMChatColor"); + mObjectChatColor = gSavedSettings.getColor4("ObjectChatColor"); + mOwnerSayChatColor = gSavedSettings.getColor4("llOwnerSayChatColor"); + mBGChatColor = gSavedSettings.getColor4("BackgroundChatColor"); + mScriptErrorColor = gSavedSettings.getColor4("ScriptErrorColor"); + mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); + mFriendsChatColor = gSavedSettings.getColor4("FriendsChatColor"); + mOwnNameChatColor = gSavedSettings.getColor4("OwnNameChatColor"); +} + +// static +void LLPrefsColors::onCommitCheckSelfName(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsColors* self = (LLPrefsColors*)userdata; + self->updateSelfCheck(); +} + +void LLPrefsColors::updateSelfCheck() +{ + bool highlight_names_enabled = (childGetValue("HighlightOwnNameInIM") || childGetValue("HighlightOwnNameInChat")); + + getChild("OwnNameChatColor")->setEnabled(highlight_names_enabled); + childSetEnabled("nick01", highlight_names_enabled); + childSetEnabled("nick02", highlight_names_enabled); + childSetEnabled("nick03", highlight_names_enabled); + childSetEnabled("nick01_text", highlight_names_enabled); + childSetEnabled("nick02_text", highlight_names_enabled); + childSetEnabled("nick03_text", highlight_names_enabled); +} + +// static +void LLPrefsColors::onCommitCheckFriends(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsColors* self = (LLPrefsColors*)userdata; + self->updateFriendsCheck(); +} + +void LLPrefsColors::updateFriendsCheck() +{ + getChild("FriendsChatColor")->setEnabled(childGetValue("HighlightFriendsChat")); +} + +void LLPrefsColors::cancel() +{ + gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); + gSavedSettings.setColor4("UserChatColor", mUserChatColor); + gSavedSettings.setColor4("AgentChatColor", mAgentChatColor); + gSavedSettings.setColor4("IMChatColor", mIMChatColor); + gSavedSettings.setColor4("ObjectChatColor", mObjectChatColor); + gSavedSettings.setColor4("llOwnerSayChatColor", mOwnerSayChatColor); + gSavedSettings.setColor4("BackgroundChatColor", mBGChatColor); + gSavedSettings.setColor4("ScriptErrorColor", mScriptErrorColor); + gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); + gSavedSettings.setColor4("FriendsChatColor", mFriendsChatColor); + gSavedSettings.setColor4("OwnNameChatColor", mOwnNameChatColor); +} + +void LLPrefsColors::apply() +{ + gSavedSettings.setColor4("SystemChatColor", childGetValue("system")); + gSavedSettings.setColor4("UserChatColor", childGetValue("user")); + gSavedSettings.setColor4("AgentChatColor", childGetValue("agent")); + gSavedSettings.setColor4("IMChatColor", childGetValue("im")); + gSavedSettings.setColor4("ScriptErrorColor", childGetValue("script_error")); + gSavedSettings.setColor4("ObjectChatColor", childGetValue("objects")); + gSavedSettings.setColor4("llOwnerSayChatColor", childGetValue("owner")); + gSavedSettings.setColor4("BackgroundChatColor", childGetValue("background")); + + gSavedSettings.setColor4("HTMLLinkColor", childGetValue("links")); + LLTextEditor::setLinkColor(childGetValue("links")); + + gSavedSettings.setBOOL("HighlightOwnNameInIM", childGetValue("HighlightOwnNameInIM")); + gSavedSettings.setBOOL("HighlightFriendsChat", childGetValue("HighlightFriendsChat")); + gSavedSettings.setColor4("FriendsChatColor", getChild("FriendsChatColor")->get()); + gSavedSettings.setBOOL("HighlightOwnNameInChat", childGetValue("HighlightOwnNameInChat")); + gSavedSettings.setColor4("OwnNameChatColor", getChild("OwnNameChatColor")->get()); + + std::string nick01 = childGetValue("nick01"); + boost::trim(nick01); + gSavedSettings.setString("nick01", nick01); + + std::string nick02 = childGetValue("nick02"); + boost::trim(nick02); + gSavedSettings.setString("nick02", nick02); + + std::string nick03 = childGetValue("nick03"); + boost::trim(nick03); + gSavedSettings.setString("nick03", nick03); + + refreshColors(); // member values become the official values and cancel becomes a no-op. +} diff --git a/linden/indra/newview/llprefscolors.h b/linden/indra/newview/llprefscolors.h new file mode 100644 index 0000000..70bda89 --- /dev/null +++ b/linden/indra/newview/llprefscolors.h @@ -0,0 +1,67 @@ +/** +* @file llprefscolors.h +* @brief Advanced preferences options for Imprudence +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2010, McCabe Maxsted +* +* Imprudence Viewer Source Code +* The source code in this file ("Source Code") is provided to you +* under the terms of the GNU General Public License, version 2.0 +* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in +* this distribution, or online at +* http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#ifndef LLPREFSCOLORS_H +#define LLPREFSCOLORS_H + +#include "llpanel.h" + +class LLPrefsColors : public LLPanel +{ +public: + LLPrefsColors(); + ~LLPrefsColors(); + + BOOL postBuild(); + + void apply(); + void cancel(); + +private: + static void onCommitCheckSelfName(LLUICtrl* ctrl, void* userdata); + static void onCommitCheckFriends(LLUICtrl* ctrl, void* userdata); + void refreshColors(); + void updateFriendsCheck(); + void updateSelfCheck(); + + LLColor4 mSystemChatColor; + LLColor4 mUserChatColor; + LLColor4 mAgentChatColor; + LLColor4 mIMChatColor; + LLColor4 mObjectChatColor; + LLColor4 mOwnerSayChatColor; + LLColor4 mBGChatColor; + LLColor4 mScriptErrorColor; + LLColor4 mHTMLLinkColor; + LLColor4 mFriendsChatColor; + LLColor4 mOwnNameChatColor; +}; + +#endif //LLPREFSCOLORS_H diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml index 0f2181b..1b771b5 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml @@ -179,57 +179,6 @@ To use spellcheck, right-click a misspelled word tool_tip="Modify the AutoCorrect word list and settings" left="12" bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> - - - - - - - - - - - - - - - Nick 1 - - - - Nick 2 - - - - Nick 3 - - diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml index fe60203..27d3fa4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml @@ -24,60 +24,84 @@ Large + + + Translate Chat: + + + + Translate into this language: + + + + System Default + + + English + + + + + + Dansk (Danish) + + + Deutsch (German) + + + Español (Spanish) + + + Français (French) + + + Italiano (Italian) + + + Magyar (Hungarian) + + + Nederlands (Dutch) + + + Polski (Polish) + + + Portugués (Portuguese) + + + Русский (Russian) + + + Türkçe (Turkish) + + + Українська (Ukrainian) + + + 中文 (简体) (Chinese) + + + 日本語 (Japanese) + + + 한국어 (Korean) + + + - Color: - - - - - - - - - - - - Chat Console: @@ -115,8 +139,29 @@ label="Use full screen width (requires restart)" left="148" mouse_opaque="true" name="chat_full_width_check" radio_style="false" width="239" /> + + + Chat Bubbles: + + + + + Miscellaneous: @@ -147,98 +192,5 @@ font="SansSerifSmall" height="16" initial_value="false" label="Show custom chat channel" left="148" mouse_opaque="true" name="toggle_channel_control" radio_style="false" width="237" /> - - Chat Bubbles: - - - - - - Translate Chat: - - - - Translate into this language: - - - - System Default - - - English - - - - - - Dansk (Danish) - - - Deutsch (German) - - - Español (Spanish) - - - Français (French) - - - Italiano (Italian) - - - Magyar (Hungarian) - - - Nederlands (Dutch) - - - Polski (Polish) - - - Portugués (Portuguese) - - - Русский (Russian) - - - Türkçe (Turkish) - - - Українська (Ukrainian) - - - 中文 (简体) (Chinese) - - - 日本語 (Japanese) - - - 한국어 (Korean) - - diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml new file mode 100644 index 0000000..11810d2 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml @@ -0,0 +1,115 @@ + + + + Chat Colors: + + + + + + + + + + + + + + Line Highlighting: + + + + + + + + + + + Highlight nickname 1: + + + + + Highlight nickname 2: + + + + + Highlight nickname 3: + + + + -- cgit v1.1 From 9a72dc956425d74faacfd077c92198694a8f6e65 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Nov 2010 17:13:51 -0700 Subject: Renamed several preferences panels: * Text Chat -> Chat * Voice Chat -> Voice * Communication -> IMs & Logging * Colors -> Chat Colors --- linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml | 2 +- .../indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml | 2 +- linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml | 2 +- .../indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml index 27d3fa4..9ead3bf 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml @@ -1,6 +1,6 @@ addTabPanel(mPrefsChat->getPanel(), mPrefsChat->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer); mPrefsChat->getPanel()->setDefaultBtn(default_btn); - mPrefsVoice = new LLPrefsVoice(); - mTabContainer->addTabPanel(mPrefsVoice, mPrefsVoice->getLabel(), FALSE, onTabChanged, mTabContainer); - mPrefsVoice->setDefaultBtn(default_btn); + mPrefsColors = new LLPrefsColors(); + mTabContainer->addTabPanel(mPrefsColors, mPrefsColors->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsColors->setDefaultBtn(default_btn); mPrefsIM = new LLPrefsIM(); mTabContainer->addTabPanel(mPrefsIM->getPanel(), mPrefsIM->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer); mPrefsIM->getPanel()->setDefaultBtn(default_btn); + + mPrefsVoice = new LLPrefsVoice(); + mTabContainer->addTabPanel(mPrefsVoice, mPrefsVoice->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsVoice->setDefaultBtn(default_btn); + #if LL_LCD_COMPILE @@ -192,10 +197,6 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mMsgPanel = new LLPanelMsgs(); mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mMsgPanel->setDefaultBtn(default_btn); - - mPrefsColors = new LLPrefsColors(); - mTabContainer->addTabPanel(mPrefsColors, mPrefsColors->getLabel(), FALSE, onTabChanged, mTabContainer); - mPrefsColors->setDefaultBtn(default_btn); mSkinsPanel = new LLPanelSkins(); mTabContainer->addTabPanel(mSkinsPanel, mSkinsPanel->getLabel(), FALSE, onTabChanged, mTabContainer); -- cgit v1.1 From 1d56536c7e479fb4a2fe5e52b2877bda80274a7c Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Nov 2010 17:22:42 -0700 Subject: Rebranded 'Help' button in preferences to 'Support' and made it point to the Imprudence support page --- .../indra/newview/skins/default/xui/en-us/floater_preferences.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml b/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml index 5b42e9f..939a877 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_preferences.xml @@ -16,9 +16,9 @@ width="90" />