From afa82fb0a5574fe91d0340dbbc0e043de3fc1c04 Mon Sep 17 00:00:00 2001 From: Swiftkill Date: Sun, 12 May 2013 21:56:02 +0400 Subject: [PATCH 01/15] updated secondlife:///app/group and secondlife:///app/agent namespaces to 2.0 --- indra/newview/llfloateravatarinfo.cpp | 66 ++++++++++++++++++++++++++- indra/newview/llfloatergroupinfo.cpp | 2 +- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloateravatarinfo.cpp b/indra/newview/llfloateravatarinfo.cpp index c9e5ba9cc..aab654dac 100644 --- a/indra/newview/llfloateravatarinfo.cpp +++ b/indra/newview/llfloateravatarinfo.cpp @@ -60,6 +60,37 @@ const LLRect FAI_RECT(0, 530, 420, 0); class LLAgentHandler : public LLCommandHandler { public: + void verbCallback(const std::string& verb, LLUUID agent_id, const LLAvatarName& avatar_name) + { + if (verb == "im") + { + gIMMgr->setFloaterOpen(TRUE); + gIMMgr->addSession( avatar_name.getCompleteName(), IM_NOTHING_SPECIAL, agent_id); + return; + } + + if (verb == "requestfriend") + { + LLPanelFriends::requestFriendshipDialog( agent_id, avatar_name.getCompleteName() ); + return; + } + + if (verb == "mute") + { + LLFloaterMute::getInstance()->open(); + LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT); + LLMuteList::getInstance()->add(mute); + return; + } + + if (verb == "unmute") + { + LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT); + LLMuteList::getInstance()->remove(mute); + return; + } + } + // requires trusted browser to trigger LLAgentHandler() : LLCommandHandler("agent", true) { } @@ -73,11 +104,44 @@ public: return false; } - if (params[1].asString() == "about") { LLFloaterAvatarInfo::show(agent_id); return true; } + + if (verb == "pay") + { + handle_pay_by_id(agent_id); + return true; + } + + if (verb == "offerteleport") + { + handle_lure(agent_id); + return true; + } + + if ((verb == "im") || (verb == "requestfriend") || (verb == "unmute")) + { + LLAvatarNameCache::get(agent_id, boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2)); + return true; + } + + if (verb == "mute") + { + if (LLMuteList::getInstance()->isMuted(agent_id)) + { + LLFloaterMute::getInstance()->open(); + LLFloaterMute::getInstance()->selectMute(agent_id); + } + else + { + LLAvatarNameCache::get(agent_id, boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2)); + } + return true; + } + + return false; } }; diff --git a/indra/newview/llfloatergroupinfo.cpp b/indra/newview/llfloatergroupinfo.cpp index 67e2ebe05..1020efcd2 100644 --- a/indra/newview/llfloatergroupinfo.cpp +++ b/indra/newview/llfloatergroupinfo.cpp @@ -97,7 +97,7 @@ public: return false; } - if (tokens[1].asString() == "about") + if ((tokens[1].asString() == "about") || (tokens[1].asString() == "inspect")) { LLFloaterGroupInfo::showFromUUID(group_id); return true; From 3af2c13cd321453fd39c5704acb39694b2f4346a Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 25 May 2013 03:19:33 +0200 Subject: [PATCH 02/15] Compile fix for libcwd. --- indra/libpathing/llpathinglib.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/libpathing/llpathinglib.cpp b/indra/libpathing/llpathinglib.cpp index 041311de9..19c0bff0f 100644 --- a/indra/libpathing/llpathinglib.cpp +++ b/indra/libpathing/llpathinglib.cpp @@ -1,3 +1,4 @@ +#include "sys.h" #include "llpathinglib.h" void LLPathingLib::initSystem() From b1be8802ca9b5288d579b9182b5fd58585bc91dd Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 25 May 2013 03:20:14 +0200 Subject: [PATCH 03/15] Fix URL to correct section for store creation. --- indra/newview/skins/default/xui/en-us/strings.xml | 2 +- indra/newview/skins/default/xui/es/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index dfffb2a22..48df70e60 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -3001,7 +3001,7 @@ Where tag = tag string to match. Removes bot's matching the tag. No matching items found in inventory. https://marketplace.[MARKETPLACE_DOMAIN_NAME]/ - http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.4 + http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.3 https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/dashboard https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/imports https://marketplace.[MARKETPLACE_DOMAIN_NAME]/learn_more diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 3e3af36bf..fc68d392f 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -2953,7 +2953,7 @@ Where tag = tag string to match. Removes bot's matching the tag. Elementos no hallados en el inventario. https://marketplace.[MARKETPLACE_DOMAIN_NAME]/ - http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.4 + http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.3 https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/dashboard https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/imports https://marketplace.[MARKETPLACE_DOMAIN_NAME]/learn_more From 326008c55398341e840c5445a7f4274adb915bac Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 25 May 2013 05:36:11 +0200 Subject: [PATCH 04/15] Correct curreny display in "serverside is now viewerside" currency dialogs on OpenSim --- indra/newview/llstartup.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 455cf3820..28b9b9840 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -4380,9 +4380,17 @@ bool process_login_success_response(std::string& password) tmp = response["search"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchUrl(tmp); tmp = response["currency"].asString(); - if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); + if (!tmp.empty()) + { + LLTrans::setDefaultArg("[CURRENCY]", tmp); + gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); + } tmp = response["currency_text"].asString(); - if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencyText(tmp); + if (!tmp.empty()) + { + LLTrans::setDefaultArg("[CURRENCY_TEXT]", tmp); + gHippoGridManager->getConnectedGrid()->setCurrencyText(tmp); + } tmp = response["real_currency"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRealCurrencySymbol(tmp); tmp = response["directory_fee"].asString(); From a8880983c402350477be38f86a003106d2f72e77 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 25 May 2013 22:07:50 +0200 Subject: [PATCH 05/15] Fix WARNING: addData: Type mismatch in LLMsgVarData::addData for Set --- indra/llinventory/llpermissionsflags.h | 4 ++++ indra/newview/importtracker.cpp | 8 ++++---- indra/newview/llselectmgr.cpp | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/indra/llinventory/llpermissionsflags.h b/indra/llinventory/llpermissionsflags.h index 02224d0c8..925976242 100644 --- a/indra/llinventory/llpermissionsflags.h +++ b/indra/llinventory/llpermissionsflags.h @@ -89,6 +89,10 @@ const U8 PERM_GROUP = 0x04; const U8 PERM_EVERYONE = 0x08; const U8 PERM_NEXT_OWNER = 0x10; +// Boolean values for "Set". +const U8 PERM_SET_TRUE = 0x1; +const U8 PERM_SET_FALSE = 0x0; + // This is just a quickie debugging key // no modify: PERM_ALL & ~PERM_MODIFY = 0x7fffbfff // no copy: PERM_ALL & ~PERM_COPY = 0x7fff7fff diff --git a/indra/newview/importtracker.cpp b/indra/newview/importtracker.cpp index 68a75796a..e88081969 100644 --- a/indra/newview/importtracker.cpp +++ b/indra/newview/importtracker.cpp @@ -236,7 +236,7 @@ void ImportTracker::get_update(S32 newid, BOOL justCreated, BOOL createSelected) msg->nextBlockFast(_PREHASH_ObjectData); msg->addU32Fast(_PREHASH_ObjectLocalID, (U32)newid); msg->addU8Fast(_PREHASH_Field, PERM_NEXT_OWNER); - msg->addBOOLFast(_PREHASH_Set, PERM_ITEM_UNRESTRICTED); + msg->addU8Fast(_PREHASH_Set, PERM_SET_TRUE); U32 flags = 0; if ( gSavedSettings.getBOOL("NextOwnerCopy") ) { @@ -718,7 +718,7 @@ void ImportTracker::send_properties(LLSD& prim, int counter) msg->nextBlockFast(_PREHASH_ObjectData); msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger()); msg->addU8Fast(_PREHASH_Field, PERM_NEXT_OWNER); - msg->addBOOLFast(_PREHASH_Set, PERM_ITEM_UNRESTRICTED); + msg->addU8Fast(_PREHASH_Set, PERM_SET_TRUE); msg->addU32Fast(_PREHASH_Mask, U32(atoi(prim["next_owner_mask"].asString().c_str()))); *//*msg->sendReliable(gAgent.getRegion()->getHost()); @@ -732,7 +732,7 @@ void ImportTracker::send_properties(LLSD& prim, int counter) msg->nextBlockFast(_PREHASH_ObjectData); msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger()); msg->addU8Fast(_PREHASH_Field, PERM_GROUP); - msg->addBOOLFast(_PREHASH_Set, PERM_ITEM_UNRESTRICTED); + msg->addU8Fast(_PREHASH_Set, PERM_SET_TRUE); msg->addU32Fast(_PREHASH_Mask, U32(atoi(prim["group_mask"].asString().c_str()))); *//*msg->sendReliable(gAgent.getRegion()->getHost()); @@ -746,7 +746,7 @@ void ImportTracker::send_properties(LLSD& prim, int counter) msg->nextBlockFast(_PREHASH_ObjectData); msg->addU32Fast(_PREHASH_ObjectLocalID, prim["LocalID"].asInteger()); msg->addU8Fast(_PREHASH_Field, PERM_EVERYONE); - msg->addBOOLFast(_PREHASH_Set, PERM_ITEM_UNRESTRICTED); + msg->addU8Fast(_PREHASH_Set, PERM_SET_TRUE); msg->addU32Fast(_PREHASH_Mask, U32(atoi(prim["everyone_mask"].asString().c_str()))); msg->sendReliable(gAgent.getRegion()->getHost()); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index bee8211c4..300330cb6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4740,7 +4740,7 @@ void LLSelectMgr::packPermissions(LLSelectNode* node, void *user_data) gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, node->getObject()->getLocalID()); gMessageSystem->addU8Fast(_PREHASH_Field, data->mField); - gMessageSystem->addBOOLFast(_PREHASH_Set, data->mSet); + gMessageSystem->addU8Fast(_PREHASH_Set, data->mSet ? PERM_SET_TRUE : PERM_SET_FALSE); gMessageSystem->addU32Fast(_PREHASH_Mask, data->mMask); } From bc145c95fb0ac84950dc2fc5181a9dee269a4b58 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 26 May 2013 05:43:28 +0200 Subject: [PATCH 06/15] Silence VC10 warnings --- indra/llmessage/aicurlthread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llmessage/aicurlthread.cpp b/indra/llmessage/aicurlthread.cpp index 2611ef7bf..d27e755c6 100644 --- a/indra/llmessage/aicurlthread.cpp +++ b/indra/llmessage/aicurlthread.cpp @@ -2673,21 +2673,21 @@ AIPerService::Approvement* AIPerService::approveHTTPRequestFor(AIPerServicePtr c PerService_wat per_service_w(*per_service); CapabilityType& ct(per_service_w->mCapabilityType[capability_type]); S32 const pipelined_requests_per_capability_type = ct.pipelined_requests(); - reject = pipelined_requests_per_capability_type >= ct.mMaxPipelinedRequests; + reject = pipelined_requests_per_capability_type >= (S32)ct.mMaxPipelinedRequests; equal = pipelined_requests_per_capability_type == ct.mMaxPipelinedRequests; increment_threshold = ct.mFlags & ctf_starvation; decrement_threshold = (ct.mFlags & (ctf_empty | ctf_full)) == ctf_full; ct.mFlags = 0; if (decrement_threshold) { - if (ct.mMaxPipelinedRequests > per_service_w->mConcurrectConnections) + if ((int)ct.mMaxPipelinedRequests > per_service_w->mConcurrectConnections) { ct.mMaxPipelinedRequests--; } } else if (increment_threshold && reject) { - if (ct.mMaxPipelinedRequests < 2 * per_service_w->mConcurrectConnections) + if ((int)ct.mMaxPipelinedRequests < 2 * per_service_w->mConcurrectConnections) { ct.mMaxPipelinedRequests++; // Immediately take the new threshold into account. From d4251e3f698e36999a214c10cba88edbfb90eaa5 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 26 May 2013 05:45:00 +0200 Subject: [PATCH 07/15] This should fix bridge detach and crash, thx Ansariel --- indra/newview/llappearancemgr.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 31088df5c..a20b24d2b 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3922,13 +3922,14 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { const LLInventoryItem* linked_item = gInventory.getLinkedItem(*it); - if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) ) + if ( linked_item && (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) ) { continue; } fUpdateAppearance = true; - removeCOFItemLinks(linked_item->getUUID()); + const LLUUID& linked_item_id = gInventory.getLinkedItemID(*it); + removeCOFItemLinks(linked_item_id); } if (fUpdateAppearance) @@ -3949,17 +3950,14 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) { // [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8) const LLInventoryItem* linked_item = gInventory.getLinkedItem(id_to_remove); - if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) ) + if ( linked_item && (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) ) { return; } - - removeCOFItemLinks(linked_item->getUUID()); - updateAppearanceFromCOF(); // [/RLVA:KB] -// LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove); -// removeCOFItemLinks(linked_item_id); -// updateAppearanceFromCOF(); + LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove); + removeCOFItemLinks(linked_item_id); + updateAppearanceFromCOF(); } bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_body) From 89e7decc12ccbe3b030d3efa5059bb809288529e Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 26 May 2013 14:34:19 +0200 Subject: [PATCH 08/15] Bring chat focus behaviour closer to Phoenix by default, and an option --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/ascentprefschat.cpp | 2 ++ indra/newview/ascentprefschat.h | 1 + indra/newview/llimview.cpp | 10 ++++++++-- .../xui/en-us/panel_preferences_ascent_chat.xml | 1 + 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 98336d37a..166f4b902 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9,6 +9,17 @@ settings_rlv.xml + PhoenixIMAnnounceStealFocus + + Comment + Open a new IM tab when another person begins typing to you and announce that they are doing so. + Persist + 1 + Type + Boolean + Value + 0 + UseNewTargetOmegaCode Comment diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index bc0a0f5ee..cf60bb715 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -328,6 +328,7 @@ void LLPrefsAscentChat::refreshValues() //Chat UI ----------------------------------------------------------------------------- mWoLfVerticalIMTabs = gSavedSettings.getBOOL("WoLfVerticalIMTabs"); mOtherChatsTornOff = gSavedSettings.getBOOL("OtherChatsTornOff"); + mIMAnnounceStealFocus = gSavedSettings.getBOOL("PhoenixIMAnnounceStealFocus"); mShowLocalChatFloaterBar = gSavedSettings.getBOOL("ShowLocalChatFloaterBar"); mHorizButt = gSavedSettings.getBOOL("ContactsUseHorizontalButtons"); mOneLineIMButt = gSavedSettings.getBOOL("UseConciseIMButtons"); @@ -561,6 +562,7 @@ void LLPrefsAscentChat::cancel() //Chat UI ----------------------------------------------------------------------------- gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs); gSavedSettings.setBOOL("OtherChatsTornOff", mOtherChatsTornOff); + gSavedSettings.setBOOL("PhoenixIMAnnounceStealFocus", mIMAnnounceStealFocus); gSavedSettings.setBOOL("ShowLocalChatFloaterBar", mShowLocalChatFloaterBar); gSavedSettings.setBOOL("ContactsUseHorizontalButtons", mHorizButt); gSavedSettings.setBOOL("UseConciseIMButtons", mOneLineIMButt); diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index 700800941..aa0b91d9d 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -80,6 +80,7 @@ protected: //Chat UI ----------------------------------------------------------------------------- bool mWoLfVerticalIMTabs; bool mOtherChatsTornOff; + bool mIMAnnounceStealFocus; bool mShowLocalChatFloaterBar; bool mHorizButt; bool mOneLineIMButt; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 64be462f7..b04a2cd18 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -766,7 +766,10 @@ LLUUID LLIMMgr::addSession( floater->open(); } //mTabContainer->selectTabPanel(panel); - floater->setInputFocus(TRUE); + if(gSavedSettings.getBOOL("PhoenixIMAnnounceStealFocus")) + { + floater->setInputFocus(TRUE); + } return floater->getSessionID(); } @@ -816,7 +819,10 @@ LLUUID LLIMMgr::addSession( floater->open(); } //mTabContainer->selectTabPanel(panel); - floater->setInputFocus(TRUE); + if(gSavedSettings.getBOOL("PhoenixIMAnnounceStealFocus")) + { + floater->setInputFocus(TRUE); + } return floater->getSessionID(); } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml index 4e53b9bd6..f5a8d8ca4 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml @@ -52,6 +52,7 @@ + From c61415d7858ecc118a6dcbe27f5b14eb592656a6 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 26 May 2013 15:56:22 +0200 Subject: [PATCH 09/15] Canonicalize detach crash fix to RLVa --- indra/newview/llappearancemgr.cpp | 10 ++++------ indra/newview/rlvcommon.cpp | 11 ++++++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a20b24d2b..66d8b81ba 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3921,14 +3921,13 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) bool fUpdateAppearance = false; for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { - const LLInventoryItem* linked_item = gInventory.getLinkedItem(*it); - if ( linked_item && (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) ) + const LLUUID& linked_item_id = gInventory.getLinkedItemID(*it); + if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(gInventory.getItem(linked_item_id))) ) { continue; } fUpdateAppearance = true; - const LLUUID& linked_item_id = gInventory.getLinkedItemID(*it); removeCOFItemLinks(linked_item_id); } @@ -3949,13 +3948,12 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) { // [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8) - const LLInventoryItem* linked_item = gInventory.getLinkedItem(id_to_remove); - if ( linked_item && (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(linked_item)) ) + LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove); + if ( (rlv_handler_t::isEnabled()) && (!rlvPredCanRemoveItem(gInventory.getItem(linked_item_id))) ) { return; } // [/RLVA:KB] - LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove); removeCOFItemLinks(linked_item_id); updateAppearanceFromCOF(); } diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index e2f3403f9..a4c8ad281 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -153,10 +153,13 @@ void RlvSettings::initClass() } #endif // RLV_EXTENSION_STARTLOCATION -// Checked: 2010-10-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e +// Checked: 2013-04-17 (RLVa-1.4.8) bool RlvSettings::onChangedAvatarOffset(const LLSD& sdValue) { - gAgent.sendAgentSetAppearance(); + if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isUsingServerBakes()) ) + { + gAgentAvatarp->computeBodySize(); + } return true; } // Checked: 2011-08-16 (RLVa-1.4.0b) | Added: RLVa-1.4.0b @@ -704,7 +707,9 @@ bool rlvPredCanRemoveItem(const LLInventoryItem* pItem) RLV_ASSERT(false); } } - return false; + // HACK-RLVa: Until LL supports temporary attachment detection assume that no inventory item means a temporary + // attachment which are always removeable + return true; } // Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a From 4abe27f7f58ba7fe2e2ddfb17953ad8db6c0726a Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 26 May 2013 17:10:23 +0200 Subject: [PATCH 10/15] Move the octopus so the swirlies will not happen when CCS is attached in SL --- indra/newview/llviewermessage.cpp | 145 +++++++++++++++--------------- 1 file changed, 73 insertions(+), 72 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6ca69fd0f..78e514a75 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3458,12 +3458,85 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLMuteList::getInstance()->isLinden(from_name); BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); + + static std::map sChatObjectAuth; + // // because I moved it to above //chatter = gObjectList.findObject(from_id); // if (chatter) { + if ((source_temp == CHAT_SOURCE_OBJECT) && (type_temp == CHAT_TYPE_OWNER) && + (mesg.substr(0, 3) == "># ")) + { + if (mesg.substr(mesg.size()-3, 3) == " #<"){ + // hello from object + if (from_id.isNull()) return; + char buf[200]; + snprintf(buf, 200, "%s v%d.%d.%d", gVersionChannel, gVersionMajor, gVersionMinor, gVersionPatch); + send_chat_from_viewer(buf, CHAT_TYPE_WHISPER, 427169570); + sChatObjectAuth[from_id] = 1; + return; + } + else if (from_id.isNull() || sChatObjectAuth.find(from_id) != sChatObjectAuth.end()) + { + LLUUID key; + if (key.set(mesg.substr(3, 36),false)) + { + // object command found + if (key.isNull() && (mesg.size() == 39)) + { + // clear all nameplates + for (int i=0; i(obj)) + { + avatar->clearNameFromChat(); + } + } + } + else + { + if (key.isNull()) + { + llwarns << "Nameplate from chat on NULL avatar (ignored)" << llendl; + return; + } + LLVOAvatar *avatar = gObjectList.findAvatar(key); + if (!avatar) + { + llwarns << "Nameplate from chat on invalid avatar (ignored)" << llendl; + return; + } + if (mesg.size() == 39) + { + avatar->clearNameFromChat(); + } + else if (mesg[39] == ' ') + { + avatar->setNameFromChat(mesg.substr(40)); + } + } + return; + } + else if (mesg.substr(2, 9) == " floater ") + { + HippoFloaterXml::execute(mesg.substr(11)); + return; + } + else if (mesg.substr(2, 6) == " auth ") + { + std::string authUrl = mesg.substr(8); + authUrl += (authUrl.find('?') != std::string::npos)? "&auth=": "?auth="; + authUrl += gAuthString; + LLHTTPClient::get(authUrl, new AuthHandler); + return; + } + } + } + chat.mPosAgent = chatter->getPositionAgent(); // Make swirly things only for talking objects. (not script debug messages, though) @@ -3554,78 +3627,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) } // NaCl End - static std::map sChatObjectAuth; - - if ((source_temp == CHAT_SOURCE_OBJECT) && (type_temp == CHAT_TYPE_OWNER) && - (mesg.substr(0, 3) == "># ")) - { - if (mesg.substr(mesg.size()-3, 3) == " #<"){ - // hello from object - if (from_id.isNull()) return; - char buf[200]; - snprintf(buf, 200, "%s v%d.%d.%d", gVersionChannel, gVersionMajor, gVersionMinor, gVersionPatch); - send_chat_from_viewer(buf, CHAT_TYPE_WHISPER, 427169570); - sChatObjectAuth[from_id] = 1; - return; - } - else if (from_id.isNull() || sChatObjectAuth.find(from_id) != sChatObjectAuth.end()) - { - LLUUID key; - if (key.set(mesg.substr(3, 36),false)) - { - // object command found - if (key.isNull() && (mesg.size() == 39)) - { - // clear all nameplates - for (int i=0; i(obj)) - { - avatar->clearNameFromChat(); - } - } - } - else - { - if (key.isNull()) - { - llwarns << "Nameplate from chat on NULL avatar (ignored)" << llendl; - return; - } - LLVOAvatar *avatar = gObjectList.findAvatar(key); - if (!avatar) - { - llwarns << "Nameplate from chat on invalid avatar (ignored)" << llendl; - return; - } - if (mesg.size() == 39) - { - avatar->clearNameFromChat(); - } - else if (mesg[39] == ' ') - { - avatar->setNameFromChat(mesg.substr(40)); - } - } - return; - } - else if (mesg.substr(2, 9) == " floater ") - { - HippoFloaterXml::execute(mesg.substr(11)); - return; - } - else if (mesg.substr(2, 6) == " auth ") - { - std::string authUrl = mesg.substr(8); - authUrl += (authUrl.find('?') != std::string::npos)? "&auth=": "?auth="; - authUrl += gAuthString; - LLHTTPClient::get(authUrl, new AuthHandler); - return; - } - } - } - if (chatter && chatter->isAvatar()) { if (LLAvatarNameCache::getPNSName(from_id, from_name)) From b6f6dfbe9917ee894ba9ab3a7c8cfa180bee3fcd Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 27 May 2013 02:15:28 +0200 Subject: [PATCH 11/15] Fix french assert. Fixes a possible ASSERT(!(need_new_run && !mYieldEngine && sub_state_r->run_state == run_state)). When over all multiplex_impl functions and this is the only case that I found where it could return without changing the state and without calling either idle() or yield(). --- indra/aistatemachine/aistatemachinethread.cpp | 3 +++ indra/newview/statemachine/aifilepicker.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/indra/aistatemachine/aistatemachinethread.cpp b/indra/aistatemachine/aistatemachinethread.cpp index f45d1e845..caeddea5c 100644 --- a/indra/aistatemachine/aistatemachinethread.cpp +++ b/indra/aistatemachine/aistatemachinethread.cpp @@ -101,7 +101,10 @@ void AIStateMachineThreadBase::multiplex_impl(state_type run_state) break; case wait_stopped: if (!mThread->isStopped()) + { + yield(); break; + } // We're done! // // We can only get here when AIThreadImpl::done called cont(), (very diff --git a/indra/newview/statemachine/aifilepicker.cpp b/indra/newview/statemachine/aifilepicker.cpp index 418d83955..3cc3ccbcd 100644 --- a/indra/newview/statemachine/aifilepicker.cpp +++ b/indra/newview/statemachine/aifilepicker.cpp @@ -420,6 +420,7 @@ void AIFilePicker::multiplex_impl(state_type run_state) // Store folder of first filename as context. AIFilePicker::store_folder(mContext, getFolder()); finish(); + break; } } } From 3cd16c84ef1f3d3241db5efa8c7341379c7c55f6 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 27 May 2013 06:46:35 +0200 Subject: [PATCH 12/15] Dirty patch Intel HD4000 shader-confusion --- indra/llrender/llrender2dutils.cpp | 1 + .../class1/interface/solidcolorIntelV.glsl | 42 +++++++++++++++++++ indra/newview/llviewershadermgr.cpp | 5 +++ 3 files changed, 48 insertions(+) create mode 100644 indra/newview/app_settings/shaders/class1/interface/solidcolorIntelV.glsl diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 044931fa1..5215202a6 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -451,6 +451,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex gGL.getTexUnit(0)->bind(image, true); gGL.color4fv(color.mV); + gGL.diffuseColor4fv(color.mV); //workaround: Intel HD 4000 const S32 NUM_VERTICES = 9 * 4; // 9 quads LLVector2 uv[NUM_VERTICES]; diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorIntelV.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorIntelV.glsl new file mode 100644 index 000000000..cdafbd3e3 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorIntelV.glsl @@ -0,0 +1,42 @@ +/** + * @file solidcolorV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2007, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +uniform mat4 modelview_projection_matrix; + +uniform vec4 color; + +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; + +void main() +{ + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vertex_color = color; + vary_texcoord0 = texcoord0; +} + diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 76b3298ec..b39fb6e1f 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -2565,6 +2565,11 @@ BOOL LLViewerShaderMgr::loadShadersInterface() { gSolidColorProgram.mName = "Solid Color Shader"; gSolidColorProgram.mShaderFiles.clear(); +#if LL_WINDOWS + if(gGLManager.mIsIntel && gGLManager.mGLVersion >= 4.f) + gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorIntelV.glsl", GL_VERTEX_SHADER_ARB)); + else +#endif gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorV.glsl", GL_VERTEX_SHADER_ARB)); gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorF.glsl", GL_FRAGMENT_SHADER_ARB)); gSolidColorProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE]; From 772f5e0e5d818b50aff742d656d093287217e8b7 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 27 May 2013 08:12:39 +0200 Subject: [PATCH 13/15] Somebody just won the prize for the least working contributed code. Just made it compile and look like it does something sane, don't have time to test it at the moment. --- indra/newview/llfloateravatarinfo.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloateravatarinfo.cpp b/indra/newview/llfloateravatarinfo.cpp index aab654dac..cd0cbbc3c 100644 --- a/indra/newview/llfloateravatarinfo.cpp +++ b/indra/newview/llfloateravatarinfo.cpp @@ -40,7 +40,12 @@ // viewer project includes #include "llagentdata.h" #include "llcommandhandler.h" +#include "llimview.h" +#include "llfloaterfriends.h" +#include "llfloatermute.h" +#include "llmenucommands.h" #include "llpanelavatar.h" +#include "llviewermessage.h" #include "lluictrlfactory.h" #include "llweb.h" @@ -97,13 +102,18 @@ public: bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) { - if (params.size() < 2) return false; + if (params.size() < 2) + { + return false; + } LLUUID agent_id; if (!agent_id.set(params[0], FALSE)) { return false; } + const std::string verb = params[1].asString(); + if (verb == "about") { LLFloaterAvatarInfo::show(agent_id); return true; @@ -141,7 +151,6 @@ public: return true; } - return false; } }; From 8b085bd03da0cb9a11e868076edb3d6648213e1b Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 27 May 2013 08:35:07 +0200 Subject: [PATCH 14/15] Matching movement rebuild code with V3 again --- indra/newview/lldrawable.cpp | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 81cc087cc..8d0f3e971 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -546,16 +546,31 @@ F32 LLDrawable::updateXform(BOOL undamped) } } - if ((mCurrentScale != target_scale) || - (!isRoot() && - (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED || - !mVObjp->getAngularVelocity().isExactlyZero() || - target_pos != mXform.getPosition() || - target_rot != mXform.getRotation()))) - { //child prim moving or scale change requires immediate rebuild + LLVector3 vec = mCurrentScale-target_scale; + + if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED) + { //scale change requires immediate rebuild mCurrentScale = target_scale; gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); } + else if (!isRoot() && + (!mVObjp->getAngularVelocity().isExactlyZero() || + dist_squared > 0.f)) + { //child prim moving relative to parent, tag as needing to be rendered atomically and rebuild + dist_squared = 1.f; //keep this object on the move list + if (!isState(LLDrawable::ANIMATED_CHILD)) + { + setState(LLDrawable::ANIMATED_CHILD); + gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE); + mVObjp->dirtySpatialGroup(); + } + } + else if (!isRoot() && ( + dist_vec_squared(old_pos, target_pos) > 0.f + || old_rot != target_rot )) + { //fix for BUG-860, MAINT-2275, MAINT-1742, MAINT-2247 + gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); + } else if (!getVOVolume() && !isAvatar()) { movePartition(); From 6fca791632b4d629a788cf2f36d1fbbcbacc4db2 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 27 May 2013 08:48:45 +0200 Subject: [PATCH 15/15] Fortify on release doesn't work and throws warnings on F18 --- indra/cmake/00-Common.cmake | 27 ++++++--------------------- indra/newview/llagent.cpp | 5 ----- indra/newview/llagent.h | 2 +- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 1a0356a83..e8ce73f7d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -103,10 +103,12 @@ if (LINUX) -pthread ) - # Don't catch SIGCHLD in our base application class for the viewer - # some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! - # The viewer doesn't need to catch SIGCHLD anyway. - add_definitions(-DLL_IGNORE_SIGCHLD) + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -D_FORTIFY_SOURCE=2 ") + + # Don't catch SIGCHLD in our base application class for the viewer + # some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! + # The viewer doesn't need to catch SIGCHLD anyway. + add_definitions(-DLL_IGNORE_SIGCHLD) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") find_program(GXX g++) @@ -136,16 +138,6 @@ if (LINUX) OUTPUT_VARIABLE CXX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) - # Here's a giant hack for Fedora 8, where we can't use - # _FORTIFY_SOURCE if we're using a compiler older than gcc 4.1. - if (${GXX_VERSION} STREQUAL ${CXX_VERSION}) - add_definitions(-D_FORTIFY_SOURCE=2) - else (${GXX_VERSION} STREQUAL ${CXX_VERSION}) - if (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat") - add_definitions(-D_FORTIFY_SOURCE=2) - endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat") - endif (${GXX_VERSION} STREQUAL ${CXX_VERSION}) - #Lets actually get a numerical version of gxx's version STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION ${CXX_VERSION}) @@ -190,10 +182,6 @@ if (LINUX) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse,387 -msse2 ${GCC_EXTRA_OPTIMIZATIONS}") endif (${ARCH} STREQUAL "x86_64") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - add_definitions( - -D_FORTIFY_SOURCE=2 - ) - if (NOT STANDALONE) # this stops us requiring a really recent glibc at runtime add_definitions(-fno-stack-protector) @@ -206,9 +194,6 @@ if (LINUX) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -msse2") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") - add_definitions( - -D_FORTIFY_SOURCE=2 - ) if (NOT STANDALONE) # this stops us requiring a really recent glibc at runtime diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 794f4c952..b3e0eb56d 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -885,11 +885,6 @@ void LLAgent::setRegion(LLViewerRegion *regionp) //----------------------------------------------------------------------------- // getRegion() //----------------------------------------------------------------------------- -LLViewerRegion *LLAgent::getRegion() const -{ - return mRegionp; -} - const LLHost& LLAgent::getRegionHost() const { diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 6ae193677..bcc469f5e 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -242,7 +242,7 @@ private: //-------------------------------------------------------------------- public: void setRegion(LLViewerRegion *regionp); - LLViewerRegion *getRegion() const; + LLViewerRegion *getRegion() const { return mRegionp; } const LLHost& getRegionHost() const; BOOL inPrelude(); std::string getSLURL() const; //Return uri for current region