diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index c3d50678f..5d83f34be 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -788,9 +788,12 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch { return 0; } - - llassert(max_pixels >= 0.f); - llassert(max_chars >= 0); + + //llassert(max_pixels >= 0.f); + //llassert(max_chars >= 0); + if(max_pixels < 0.f || max_chars < 0) { + return 0; + } BOOL clip = FALSE; F32 cur_x = 0; diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 4ff31ed20..980d705af 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1599,7 +1599,7 @@ void LLLineEditor::draw() std::string text; for (S32 i = 0; i < mText.length(); i++) { - text += '*'; + text += "\xe2\x80\xa2"; } mText = text; } diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 3f8b48b64..3c9fd130a 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -542,7 +542,7 @@ std::string LLDir::getForbiddenFileChars() return "\\/:*?\"<>|"; } -void LLDir::setLindenUserDir(const std::string &first, const std::string &last) +void LLDir::setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last) { // if both first and last aren't set, assume we're grabbing the cached dir if (!first.empty() && !last.empty()) @@ -558,6 +558,14 @@ void LLDir::setLindenUserDir(const std::string &first, const std::string &last) mLindenUserDir += firstlower; mLindenUserDir += "_"; mLindenUserDir += lastlower; + + if (!grid.empty()) + { + std::string gridlower(grid); + LLStringUtil::toLower(gridlower); + mPerAccountChatLogsDir += "@"; + mPerAccountChatLogsDir += gridlower; + } } else { diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 99179567a..4111f4ffa 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -131,7 +131,7 @@ class LLDir virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory. - virtual void setLindenUserDir(const std::string &first, const std::string &last); // Set the linden user dir to this user's dir + virtual void setLindenUserDir(const std::string& grid, const std::string& first, const std::string& last); // Set the linden user dir to this user's dir virtual void setSkinFolder(const std::string &skin_folder); virtual bool setCacheDir(const std::string &path); diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index 999f754dc..1f516c0c5 100755 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -40,6 +40,10 @@ #if defined(LL_DARWIN) #include #elif defined(LL_WINDOWS) + #undef __STDC_CONSTANT_MACROS //Needed, as boost/unordered_map.hpp already defines INT32_C, etc. + #if defined(_MSC_VER) && _MSC_VER >= 1600 + #define _STDINT_H //Visual Studio 2010 includes its own stdint header already + #endif #include "MacTypes.h" #include "QTML.h" #include "Movies.h" diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index 1cc6eca64..7c5044205 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -600,7 +600,14 @@ void HippoGridInfo::initFallback() FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/"); } - +bool HippoGridInfo::supportsInvLinks(){ + if(isSecondLife()) + return true; + else if(mLoginUri.find("avination.")!=std::string::npos) + return true; + else + return false; +} // ******************************************************************** // ******************************************************************** diff --git a/indra/newview/hippogridmanager.h b/indra/newview/hippogridmanager.h index 8429dbaf6..0432c59bf 100644 --- a/indra/newview/hippogridmanager.h +++ b/indra/newview/hippogridmanager.h @@ -85,6 +85,7 @@ public: void setCurrencySymbol(const std::string& sym); void setRealCurrencySymbol(const std::string& sym); void setDirectoryFee(int fee); + bool supportsInvLinks(); bool retrieveGridInfo(); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3f39909fb..5917d402f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -7367,10 +7367,10 @@ void LLAgent::makeNewOutfit( return; } - BOOL fUseLinks = gSavedSettings.getBOOL("UseInventoryLinks") && - gHippoGridManager->getConnectedGrid()->isSecondLife(); + BOOL fUseLinks = !gSavedSettings.getBOOL("UseInventoryLinks") || + !gHippoGridManager->getConnectedGrid()->supportsInvLinks(); BOOL fUseOutfits = gSavedSettings.getBOOL("UseOutfitFolders") && - gHippoGridManager->getConnectedGrid()->isSecondLife(); + gHippoGridManager->getConnectedGrid()->supportsInvLinks(); LLAssetType::EType typeDest = (fUseOutfits) ? LLAssetType::AT_MY_OUTFITS : LLAssetType::AT_CLOTHING; LLAssetType::EType typeFolder = (fUseOutfits) ? LLAssetType::AT_OUTFIT : LLAssetType::AT_NONE; @@ -8483,10 +8483,11 @@ void LLAgent::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_ } const LLInventoryItem* item = obj_item_array.get(i).get(); + bool replace = !gHippoGridManager->getConnectedGrid()->supportsInvLinks(); msg->nextBlockFast(_PREHASH_ObjectData ); msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); - msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD); // Wear at the previous or default attachment point + msg->addU8Fast(_PREHASH_AttachmentPt, replace? 0 : ATTACHMENT_ADD); // Wear at the previous or default attachment point pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); msg->addStringFast(_PREHASH_Name, item->getName()); msg->addStringFast(_PREHASH_Description, item->getDescription()); diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 359c8a19c..337cf1956 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -220,11 +220,11 @@ public: } } - if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) { + if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { childSetEnabled("checkbox_use_links", FALSE); childSetValue("checkbox_use_links", FALSE); childSetEnabled("checkbox_use_outfits", FALSE); - childSetValue("checkbox_use_outfits", FALSE); + childSetValue("checkbox_use_outfits", FALSE); } childSetAction("Save", onSave, this ); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e2e844eaa..fe105e24b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -528,7 +528,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const BOOL LLInvFVBridge::isClipboardPasteableAsLink() const { - if (!gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { return FALSE; } @@ -1382,7 +1382,7 @@ BOOL LLItemBridge::isItemCopyable() const LLViewerInventoryItem* item = getItem(); if (item && !item->getIsLinkType()) { - if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) { + if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { return (item->getPermissions().allowCopyBy(gAgent.getID())); } else { // All items can be copied since you can @@ -2401,7 +2401,7 @@ void LLFolderBridge::folderOptionsMenu() if(!(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments)) { // - if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (gHippoGridManager->getConnectedGrid()->supportsInvLinks()) mItems.push_back(std::string("Add To Outfit")); mItems.push_back(std::string("Wear Items")); mItems.push_back(std::string("Replace Outfit")); @@ -4179,7 +4179,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); - if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (gHippoGridManager->getConnectedGrid()->supportsInvLinks()) items.push_back(std::string("Object Add")); if (!avatarp->canAttachMoreObjects()) { @@ -4668,7 +4668,7 @@ void wear_inventory_category(LLInventoryCategory* category, bool copy, bool appe // *NOTE: hack to get from avatar inventory to avatar void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append, BOOL replace) -{ +{ // Avoid unintentionally overwriting old wearables. We have to do // this up front to avoid having to deal with the case of multiple // wearables being dirty. diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b6922c4ec..8a6a41ff7 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3614,7 +3614,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point) if (0 == attachment_point || get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) { - if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { // If we know the attachment point then we got here by clicking an // "Attach to..." context menu item, so we should add, not replace. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1090faf56..6d938edab 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -807,13 +807,6 @@ bool idle_startup() timeout_count = 0; - // OGPX : Load URL History File for saved user. Needs to happen *before* login panel is displayed. - // Note: it only loads them if it can figure out the saved username. - if (!firstname.empty() && !lastname.empty()) - { - gDirUtilp->setLindenUserDir(firstname, lastname); - LLURLHistory::loadFile("url_history.xml"); - } // *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance(). @@ -972,7 +965,14 @@ bool idle_startup() // create necessary directories // *FIX: these mkdir's should error check - gDirUtilp->setLindenUserDir(firstname, lastname); + if (gHippoGridManager->getCurrentGrid()->isSecondLife()) + { + gDirUtilp->setLindenUserDir(LLStringUtil::null, firstname, lastname); + } + else + { + gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); + } LLFile::mkdir(gDirUtilp->getLindenUserDir()); // Set PerAccountSettingsFile to the default value. @@ -1043,22 +1043,13 @@ bool idle_startup() // END TODO LLPanelLogin::close(); } - //For HTML parsing in text boxes. LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") ); // Load URL History File LLURLHistory::loadFile("url_history.xml"); - // OGPX : Since loading the file wipes the new value that might have gotten added on - // the login panel, let's add it to URL history - // (appendToURLCollection() only adds unique values to list) - // OGPX kind of ugly. TODO: figure out something less hacky - if (!gSavedSettings.getString("CmdLineRegionURI").empty()) - { - LLURLHistory::appendToURLCollection("regionuri",gSavedSettings.getString("CmdLineRegionURI")); - } - + //------------------------------------------------- // Handle startup progress screen //------------------------------------------------- diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index d64ae5eaa..75e0f2a62 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -622,6 +622,7 @@ BOOL LLWearable::isDirty() const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) ); if( avatar_image->getID() != image_id ) { + llwarns << "image ID " << avatar_image->getID() << " was changed." << llendl; return TRUE; } }