From 29b544bde609eec4b4859bf915f0b8657f3d0d1f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 7 Apr 2016 11:28:37 +0300 Subject: [PATCH 001/134] MAINT-6294 FIXED Cursor became invisible after typing in any input field (OS X) --- indra/llwindow/llwindowmacosx.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index c6bf93507a..754306b5d2 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1459,10 +1459,9 @@ void LLWindowMacOSX::updateCursor() if(mCurrentCursor == mNextCursor) { - if(mCursorHidden && isCGCursorVisible()) + if(mCursorHidden && mHideCursorPermanent && isCGCursorVisible()) { - hideNSCursor(); - mHideCursorPermanent = TRUE; + hideNSCursor(); adjustCursorDecouple(); } return; From 8c973c812b956bda1f1afa1d6be4b5fb9ffd7ce6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 7 Apr 2016 14:52:20 +0300 Subject: [PATCH 002/134] MAINT-5692 FIXED In OS X El Capitan, when you run the viewer you won't see readable Japanese fonts. --- indra/newview/skins/default/xui/en/fonts.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml index 170b7177fb..5d05ecf127 100755 --- a/indra/newview/skins/default/xui/en/fonts.xml +++ b/indra/newview/skins/default/xui/en/fonts.xml @@ -12,6 +12,7 @@ ヒラギノ角ゴ Pro W3.otf ヒラギノ角ゴ ProN W3.otf + ヒラギノ明朝 ProN W3.ttc AppleGothic.dfont AppleGothic.ttf AppleSDGothicNeo-Regular.otf From f5c21ce1aef74bd79cbcb8c7a6cd4f9f4891c993 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 8 Apr 2016 18:23:35 +0300 Subject: [PATCH 003/134] MAINT-6320 Snapshot floater is stuck in 'Saving to Inventory' state. --- indra/newview/llviewerassetupload.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index f0dafec240..497ff4d2bf 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -837,5 +837,12 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res } } + // Let the Snapshot floater know we have failed uploading. + LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot"); + if (uploadInfo->getAssetType() == LLAssetType::AT_TEXTURE && floater_snapshot) + { + floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "inventory"))); + } + } From 1a2d326c2b7b24139c85dc10f63ecfd37db7eca4 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 11 Apr 2016 14:25:08 +0300 Subject: [PATCH 004/134] MAINT-6273 "Freeze" and "Eject" menu items are added to Nearby context menu. --- indra/newview/llavataractions.cpp | 122 +++++++++++++++++- indra/newview/llavataractions.h | 5 + indra/newview/llpanelpeoplemenus.cpp | 88 +++++++++++++ indra/newview/llpanelpeoplemenus.h | 2 + .../default/xui/en/menu_people_nearby.xml | 16 +++ 5 files changed, 231 insertions(+), 2 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 00bc8ebe87..a6e745448a 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -475,6 +475,57 @@ void LLAvatarActions::kick(const LLUUID& id) LLNotifications::instance().add("KickUser", LLSD(), payload, handleKick); } +// static +void LLAvatarActions::freezeAvatar(const LLUUID& id) +{ + std::string fullname; + gCacheName->getFullName(id, fullname); + LLSD payload; + payload["avatar_id"] = id; + + if (!fullname.empty()) + { + LLSD args; + args["AVATAR_NAME"] = fullname; + LLNotificationsUtil::add("FreezeAvatarFullname", args, payload, handleFreezeAvatar); + } + else + { + LLNotificationsUtil::add("FreezeAvatar", LLSD(), payload, handleFreezeAvatar); + } +} + +// static +void LLAvatarActions::ejectAvatar(const LLUUID& id, bool ban_enabled) +{ + std::string fullname; + gCacheName->getFullName(id, fullname); + LLSD payload; + payload["avatar_id"] = id; + payload["ban_enabled"] = ban_enabled; + LLSD args; + if (!fullname.empty()) + { + args["AVATAR_NAME"] = fullname; + } + + if (ban_enabled) + { + LLNotificationsUtil::add("EjectAvatarFullname", args, payload, handleEjectAvatar); + } + else + { + if (!fullname.empty()) + { + LLNotificationsUtil::add("EjectAvatarFullnameNoBan", args, payload, handleEjectAvatar); + } + else + { + LLNotificationsUtil::add("EjectAvatarNoBan", LLSD(), payload, handleEjectAvatar); + } + } +} + // static void LLAvatarActions::freeze(const LLUUID& id) { @@ -482,7 +533,6 @@ void LLAvatarActions::freeze(const LLUUID& id) payload["avatar_id"] = id; LLNotifications::instance().add("FreezeUser", LLSD(), payload, handleFreeze); } - // static void LLAvatarActions::unfreeze(const LLUUID& id) { @@ -1133,10 +1183,77 @@ bool LLAvatarActions::handleKick(const LLSD& notification, const LLSD& response) } return false; } -bool LLAvatarActions::handleFreeze(const LLSD& notification, const LLSD& response) + +bool LLAvatarActions::handleFreezeAvatar(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); + if (0 == option || 1 == option) + { + U32 flags = 0x0; + if (1 == option) + { + // unfreeze + flags |= 0x1; + } + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + LLMessageSystem* msg = gMessageSystem; + + msg->newMessage("FreezeUser"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID()); + msg->addUUID("SessionID", gAgent.getSessionID()); + msg->nextBlock("Data"); + msg->addUUID("TargetID", avatar_id ); + msg->addU32("Flags", flags ); + gAgent.sendReliableMessage(); + } + return false; +} + +bool LLAvatarActions::handleEjectAvatar(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (2 == option) + { + return false; + } + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + bool ban_enabled = notification["payload"]["ban_enabled"].asBoolean(); + + if (0 == option) + { + LLMessageSystem* msg = gMessageSystem; + U32 flags = 0x0; + msg->newMessage("EjectUser"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID() ); + msg->addUUID("SessionID", gAgent.getSessionID() ); + msg->nextBlock("Data"); + msg->addUUID("TargetID", avatar_id ); + msg->addU32("Flags", flags ); + gAgent.sendReliableMessage(); + } + else if (ban_enabled) + { + LLMessageSystem* msg = gMessageSystem; + + U32 flags = 0x1; + msg->newMessage("EjectUser"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID() ); + msg->addUUID("SessionID", gAgent.getSessionID() ); + msg->nextBlock("Data"); + msg->addUUID("TargetID", avatar_id ); + msg->addU32("Flags", flags ); + gAgent.sendReliableMessage(); + } + return false; +} + +bool LLAvatarActions::handleFreeze(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) { LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); @@ -1153,6 +1270,7 @@ bool LLAvatarActions::handleFreeze(const LLSD& notification, const LLSD& respons } return false; } + bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index bd0ac24e93..256d44d820 100755 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -173,6 +173,9 @@ public: */ static void inviteToGroup(const LLUUID& id); + static void freezeAvatar(const LLUUID& id); + + static void ejectAvatar(const LLUUID& id, bool ban_enabled = false); /** * Kick avatar off grid */ @@ -242,6 +245,8 @@ private: static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response); static bool handleRemove(const LLSD& notification, const LLSD& response); static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id); + static bool handleFreezeAvatar(const LLSD& notification, const LLSD& response); + static bool handleEjectAvatar(const LLSD& notification, const LLSD& response); static bool handleKick(const LLSD& notification, const LLSD& response); static bool handleFreeze(const LLSD& notification, const LLSD& response); static bool handleUnfreeze(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index a5f59dbf4a..65769ff526 100755 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -38,9 +38,14 @@ #include "llavataractions.h" #include "llcallingcard.h" // for LLAvatarTracker #include "lllogchat.h" +#include "llparcel.h" #include "llviewermenu.h" // for gMenuHolder #include "llconversationmodel.h" #include "llviewerobjectlist.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" +#include "llvoavatarself.h" +#include "roles_constants.h" namespace LLPanelPeopleMenus { @@ -77,9 +82,13 @@ LLContextMenu* PeopleContextMenu::createMenu() registrar.add("Avatar.InviteToGroup", boost::bind(&LLAvatarActions::inviteToGroup, id)); registrar.add("Avatar.TeleportRequest", boost::bind(&PeopleContextMenu::requestTeleport, this)); registrar.add("Avatar.Calllog", boost::bind(&LLAvatarActions::viewChatHistory, id)); + registrar.add("Avatar.Freeze", boost::bind(&LLAvatarActions::freezeAvatar, id)); + registrar.add("Avatar.Eject", boost::bind(&PeopleContextMenu::eject, this)); + enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2)); enable_registrar.add("Avatar.CheckItem", boost::bind(&PeopleContextMenu::checkContextMenuItem, this, _2)); + enable_registrar.add("Avatar.EnableFreezeEject", boost::bind(&PeopleContextMenu::enableFreezeEject, this, _2)); // create the context menu from the XUI menu = createFromFile("menu_people_nearby.xml"); @@ -258,6 +267,50 @@ bool PeopleContextMenu::checkContextMenuItem(const LLSD& userdata) return false; } +bool PeopleContextMenu::enableFreezeEject(const LLSD& userdata) +{ + if((gAgent.getID() == mUUIDs.front()) || (mUUIDs.size() != 1)) + { + return false; + } + + const LLUUID& id = mUUIDs.front(); + + // Use avatar_id if available, otherwise default to right-click avatar + LLVOAvatar* avatar = NULL; + if (id.notNull()) + { + LLViewerObject* object = gObjectList.findObject(id); + if (object) + { + if( !object->isAvatar() ) + { + object = NULL; + } + avatar = (LLVOAvatar*) object; + } + } + if (!avatar) return false; + + // Gods can always freeze + if (gAgent.isGodlike()) return true; + + // Estate owners / managers can freeze + // Parcel owners can also freeze + const LLVector3& pos = avatar->getPositionRegion(); + const LLVector3d& pos_global = avatar->getPositionGlobal(); + LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos_global)->getParcel(); + LLViewerRegion* region = avatar->getRegion(); + if (!region) return false; + + bool new_value = region->isOwnedSelf(pos); + if (!new_value || region->isOwnedGroup(pos)) + { + new_value = LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_ADMIN); + } + return new_value; +} + void PeopleContextMenu::requestTeleport() { // boost::bind cannot recognize overloaded method LLAvatarActions::teleportRequest(), @@ -272,6 +325,39 @@ void PeopleContextMenu::offerTeleport() LLAvatarActions::offerTeleport(mUUIDs); } +void PeopleContextMenu::eject() +{ + if((gAgent.getID() == mUUIDs.front()) || (mUUIDs.size() != 1)) + { + return; + } + + const LLUUID& id = mUUIDs.front(); + + // Use avatar_id if available, otherwise default to right-click avatar + LLVOAvatar* avatar = NULL; + if (id.notNull()) + { + LLViewerObject* object = gObjectList.findObject(id); + if (object) + { + if( !object->isAvatar() ) + { + object = NULL; + } + avatar = (LLVOAvatar*) object; + } + } + if (!avatar) return; + LLSD payload; + payload["avatar_id"] = avatar->getID(); + std::string fullname = avatar->getFullname(); + + const LLVector3d& pos = avatar->getPositionGlobal(); + LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos)->getParcel(); + LLAvatarActions::ejectAvatar(id ,LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_MANAGE_BANNED)); +} + void PeopleContextMenu::startConference() { uuid_vec_t uuids; @@ -320,6 +406,8 @@ void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) items.push_back(std::string("share")); items.push_back(std::string("pay")); items.push_back(std::string("block_unblock")); + items.push_back(std::string("freeze")); + items.push_back(std::string("eject")); } hide_context_entries(menu, items, disabled_items); diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index 9767bab89f..5ed20e0064 100755 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -46,7 +46,9 @@ protected: private: bool enableContextMenuItem(const LLSD& userdata); bool checkContextMenuItem(const LLSD& userdata); + bool enableFreezeEject(const LLSD& userdata); void offerTeleport(); + void eject(); void startConference(); void requestTeleport(); }; diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index f12226ebeb..c1500d4e7c 100755 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -143,4 +143,20 @@ function="Avatar.EnableItem" parameter="can_block" /> + + + + + + + + From 8f52908994da1788fb68f551758d4a8e143a65ba Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 12 Apr 2016 12:35:04 +0300 Subject: [PATCH 005/134] MAINT-6283 Names that contain 'http:' or 'https:' are transferred to the new line in chat history --- indra/newview/lllogchat.cpp | 40 +++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 4116e38f11..0dfcbfde7b 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -67,7 +67,7 @@ const std::string LL_IM_FROM("from"); const std::string LL_IM_FROM_ID("from_id"); const std::string LL_TRANSCRIPT_FILE_EXTENSION("txt"); -const static std::string IM_SEPARATOR(": "); +const static std::string IM_SEPARATOR("| "); const static std::string NEW_LINE("\n"); const static std::string NEW_LINE_SPACE_PREFIX("\n "); const static std::string TWO_SPACES(" "); @@ -94,7 +94,8 @@ const static boost::regex TIMESTAMP("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\ * Regular expression suitable to match names like * "You", "Second Life", "Igor ProductEngine", "Object", "Mega House" */ -const static boost::regex NAME_AND_TEXT("([^:]+[:]{1})?(\\s*)(.*)"); +const static boost::regex OLD_NAME_AND_TEXT("([^:]+[:]{1})?(\\s*)(.*)"); +const static boost::regex NAME_AND_TEXT("([^\\|]+[\\|]{1})?(\\s*)(.*)"); /** * These are recognizers for matching the names of ad-hoc conferences when generating the log file name @@ -107,7 +108,8 @@ const static boost::regex INBOUND_CONFERENCE("^[a-zA-Z]{1,31} [a-zA-Z]{1,31} Con const static boost::regex OUTBOUND_CONFERENCE("^Ad-hoc Conference hash[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"); //is used to parse complex object names like "Xstreet SL Terminal v2.2.5 st" -const static std::string NAME_TEXT_DIVIDER(": "); +const static std::string OLD_NAME_TEXT_DIVIDER(": "); +const static std::string NAME_TEXT_DIVIDER("| "); // is used for timestamps adjusting const static char* DATE_FORMAT("%Y/%m/%d %H:%M"); @@ -903,13 +905,24 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params //matching a name and a text std::string stuff = matches[IDX_STUFF]; boost::match_results name_and_text; - if (!boost::regex_match(stuff, name_and_text, NAME_AND_TEXT)) return false; - - bool has_name = name_and_text[IDX_NAME].matched; + bool old_name = false; + bool has_name = false; + if (boost::regex_match(stuff, name_and_text, NAME_AND_TEXT)) + { + has_name = name_and_text[IDX_NAME].matched; + } + + if(!has_name) + { + if (!boost::regex_match(stuff, name_and_text, OLD_NAME_AND_TEXT)) return false; + old_name = true; + has_name = name_and_text[IDX_NAME].matched; + } std::string name = name_and_text[IDX_NAME]; //we don't need a name/text separator - if (has_name && name.length() && name[name.length()-1] == ':') + char delim = old_name? ':' : '|'; + if (has_name && name.length() && name[name.length()-1] == delim) { name.erase(name.length()-1, 1); } @@ -924,11 +937,17 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params //possibly a case of complex object names consisting of 3+ words if (!has_name) { - U32 divider_pos = stuff.find(NAME_TEXT_DIVIDER); - if (divider_pos != std::string::npos && divider_pos < (stuff.length() - NAME_TEXT_DIVIDER.length())) + std::string divider = NAME_TEXT_DIVIDER; + U32 divider_pos = stuff.find(divider); + if(divider_pos == std::string::npos) + { + divider = OLD_NAME_TEXT_DIVIDER; + divider_pos = stuff.find(divider); + } + if (divider_pos != std::string::npos && divider_pos < (stuff.length() - divider.length())) { im[LL_IM_FROM] = stuff.substr(0, divider_pos); - im[LL_IM_TEXT] = stuff.substr(divider_pos + NAME_TEXT_DIVIDER.length()); + im[LL_IM_TEXT] = stuff.substr(divider_pos + divider.length()); return true; } } @@ -956,7 +975,6 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params im[LL_IM_FROM] = name; } - im[LL_IM_TEXT] = name_and_text[IDX_TEXT]; return true; //parsed name and message text, maybe have a timestamp too } From e5048ad8b2648fa05f6a02cc39f06ce9ec53ec87 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 14 Apr 2016 13:06:44 +0300 Subject: [PATCH 006/134] MAINT-6302 FIXED Inventory tree indention displays incorrectly when dragging an open folder into another folder --- indra/llui/llfolderviewitem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 3def0386e1..5eb5ca4f82 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -972,6 +972,11 @@ void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder) mIndentation = (getParentFolder()) ? getParentFolder()->getIndentation() + mLocalIndentation : 0; + + if(isOpen() && folder->isOpen()) + { + requestArrange(); + } } static LLTrace::BlockTimerStatHandle FTM_ARRANGE("Arrange"); From c436716d92f3f38686b8d138e8e52a378c044490 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 12 Apr 2016 17:50:05 +0300 Subject: [PATCH 007/134] MAINT-6301 Recent tab sorting changes do not persist between logins --- indra/newview/llpanelmaininventory.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 4229419fce..973e1f7705 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -150,6 +150,7 @@ BOOL LLPanelMainInventory::postBuild() LLInventoryPanel* recent_items_panel = getChild("Recent Items"); if (recent_items_panel) { + // assign default values until we will be sure that we have setting to restore recent_items_panel->setSinceLogoff(TRUE); recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); @@ -181,6 +182,7 @@ BOOL LLPanelMainInventory::postBuild() LLParamSDParser parser; parser.readSD(recent_items, p); recent_items_panel->getFilter().fromParams(p); + recent_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER)); } } @@ -372,7 +374,14 @@ void LLPanelMainInventory::setSortBy(const LLSD& userdata) } getActivePanel()->setSortOrder(sort_order_mask); - gSavedSettings.setU32("InventorySortOrder", sort_order_mask); + if ("Recent Items" == getActivePanel()->getName()) + { + gSavedSettings.setU32("RecentItemsSortOrder", sort_order_mask); + } + else + { + gSavedSettings.setU32("InventorySortOrder", sort_order_mask); + } } // static From af408181c134e08b4b19f173d56b912c9e1f153b Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 14 Apr 2016 02:10:21 +0300 Subject: [PATCH 008/134] MAINT-6248 remove the 'OK' and place a 'Rebake region' button in "pending pathfinding changes" notification toast --- indra/newview/lllocationinputctrl.cpp | 25 +++++++++++++++++++ indra/newview/lllocationinputctrl.h | 1 + .../skins/default/xui/en/notifications.xml | 13 ++++++++++ 3 files changed, 39 insertions(+) diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 8d21fda8f9..53b2ca2b74 100755 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -64,6 +64,9 @@ #include "llurllineeditorctrl.h" #include "llagentui.h" +#include "llmenuoptionpathfindingrebakenavmesh.h" +#include "llpathfindingmanager.h" + //============================================================================ /* * "ADD LANDMARK" BUTTON UPDATING LOGIC @@ -1194,6 +1197,18 @@ bool LLLocationInputCtrl::onLocationContextMenuItemEnabled(const LLSD& userdata) return false; } +void LLLocationInputCtrl::callbackRebakeRegion(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) // OK + { + if (LLPathfindingManager::getInstance() != NULL) + { + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->sendRequestRebakeNavmesh(); + } + } +} + void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon) { switch (icon) @@ -1211,6 +1226,16 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon) LLNotificationsUtil::add("NoBuild"); break; case PATHFINDING_DIRTY_ICON: + if (LLPathfindingManager::getInstance() != NULL) + { + LLMenuOptionPathfindingRebakeNavmesh *rebakeInstance = LLMenuOptionPathfindingRebakeNavmesh::getInstance(); + if (rebakeInstance && rebakeInstance->canRebakeRegion() && (rebakeInstance->getMode() == LLMenuOptionPathfindingRebakeNavmesh::kRebakeNavMesh_Available)) + { + LLNotificationsUtil::add("PathfindingDirtyRebake", LLSD(), LLSD(), + boost::bind(&LLLocationInputCtrl::callbackRebakeRegion, this, _1, _2)); + break; + } + } LLNotificationsUtil::add("PathfindingDirty"); break; case PATHFINDING_DISABLED_ICON: diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index cd6fd24077..da71bab6c1 100755 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -166,6 +166,7 @@ private: // callbacks bool onLocationContextMenuItemEnabled(const LLSD& userdata); void onLocationContextMenuItemClicked(const LLSD& userdata); + void callbackRebakeRegion(const LLSD& notification, const LLSD& response); void onParcelIconClick(EParcelIcon icon); void createNavMeshStatusListenerForCurrentRegion(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f8e346afb9..6b75a2083d 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6907,6 +6907,19 @@ This area has building disabled. You can't build or rez objects here. The region has pending pathfinding changes. If you have build rights, you may rebake the region by clicking on the “Rebake region” button. + + + The region has pending pathfinding changes. If you have build rights, you may rebake the region by clicking on the “Rebake region” button. + + + Date: Thu, 14 Apr 2016 04:26:44 +0300 Subject: [PATCH 009/134] MAINT-6293 Notification toasts UI improvements Align the one-button forms at center; improve the button width calculation --- indra/newview/lltoastnotifypanel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 98ed2f0fc4..1a8ade5b10 100755 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -103,7 +103,7 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_opt p.image_color_disabled(LLUIColorTable::instance().getColor("ButtonCautionImageColor")); } // for the scriptdialog buttons we use fixed button size. This is a limit! - if (!mIsScriptDialog && font->getWidth(form_element["text"].asString()) > BUTTON_WIDTH) + if (!mIsScriptDialog && font->getWidth(form_element["text"].asString()) > (BUTTON_WIDTH-2*HPAD)) { p.rect.width = 1; p.auto_resize = true; @@ -160,7 +160,11 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vectorsecond; LLRect btn_rect(btn->getRect()); - if (left + btn_rect.getWidth() > max_width)// whether there is still some place for button+h_pad in the mControlPanel + if (buttons.size() == 1) // for the one-button forms, center that button + { + left = (max_width - btn_rect.getWidth()) / 2; + } + else if (left + btn_rect.getWidth() > max_width)// whether there is still some place for button+h_pad in the mControlPanel { // looks like we need to add button to the next row left = 0; From 2311d8c2b200574a0fb38c80222a0f09ce984f67 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 15 Apr 2016 15:33:27 +0300 Subject: [PATCH 010/134] MAINT-4220 Raise UIScaleFactor limit --- .../newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 3e96160834..4a5117adac 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -138,7 +138,7 @@ initial_value="1" layout="topleft" left_pad="0" - max_val="1.5" + max_val="2.0" min_val="0.75" name="ui_scale_slider" top_pad="-14" From eec33adf34db3fe0c32600808458e4307ede1bf0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 13 Apr 2016 18:59:00 +0300 Subject: [PATCH 011/134] MAINT-3286 FIXED Fix error message on snapshot save when user has no L$ --- indra/newview/llfloaternamedesc.cpp | 22 ++++++++++++++----- indra/newview/llfloatersnapshot.cpp | 14 ++++++++++++ indra/newview/llfloatersnapshot.h | 1 + indra/newview/llpanelsnapshotinventory.cpp | 17 ++++++++++++-- .../skins/default/xui/en/notifications.xml | 16 ++++++++++++++ 5 files changed, 63 insertions(+), 7 deletions(-) diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 135bbb335e..4a5732aecf 100755 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -42,6 +42,8 @@ #include "llfloaterperms.h" #include "llviewercontrol.h" #include "llviewermenufile.h" // upload_new_resource() +#include "llstatusbar.h" // can_afford_transaction() +#include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "llstring.h" #include "lleconomy.h" @@ -161,12 +163,15 @@ void LLFloaterNameDesc::onBtnOK( ) LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). - void *nruserdata = NULL; - std::string display_name = LLStringUtil::null; - LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( + if (can_afford_transaction(expected_upload_cost)) + { + void *nruserdata = NULL; + std::string display_name = LLStringUtil::null; + + LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( mFilenameAndPath, - getChild("name_form")->getValue().asString(), + getChild("name_form")->getValue().asString(), getChild("description_form")->getValue().asString(), 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, LLFloaterPerms::getNextOwnerPerms("Uploads"), @@ -174,7 +179,14 @@ void LLFloaterNameDesc::onBtnOK( ) LLFloaterPerms::getEveryonePerms("Uploads"), expected_upload_cost)); - upload_new_resource(uploadInfo, callback, nruserdata); + upload_new_resource(uploadInfo, callback, nruserdata); + } + else + { + LLSD args; + args["COST"] = llformat("%d", expected_upload_cost); + LLNotificationsUtil::add("ErrorTextureCannotAfford", args); + } closeFloater(false); } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index afec981d56..b906671c7f 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1417,6 +1417,20 @@ void LLFloaterSnapshot::postPanelSwitch() instance->impl.setStatus(Impl::STATUS_READY); } +// static +void LLFloaterSnapshot::inventorySaveFailed() +{ + LLFloaterSnapshot* instance = findInstance(); + if (!instance) + { + llassert(instance != NULL); + return; + } + + instance->impl.updateControls(instance); + instance->impl.setStatus(Impl::STATUS_FINISHED, false, "inventory"); +} + // static LLPointer LLFloaterSnapshot::getImageData() { diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 0bb9474bb5..eb3a94999b 100755 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -61,6 +61,7 @@ public: static BOOL saveLocal(); static void postSave(); static void postPanelSwitch(); + static void inventorySaveFailed(); static LLPointer getImageData(); static const LLVector3d& getPosTakenGlobal(); static void setAgentEmail(const std::string& email); diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index c55e230b5e..a2d1752c6a 100755 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -34,6 +34,8 @@ #include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model #include "llpanelsnapshot.h" #include "llviewercontrol.h" // gSavedSettings +#include "llstatusbar.h" // can_afford_transaction() +#include "llnotificationsutil.h" /** * The panel provides UI for saving snapshot as an inventory texture. @@ -102,6 +104,17 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) void LLPanelSnapshotInventory::onSend() { - LLFloaterSnapshot::saveTexture(); - LLFloaterSnapshot::postSave(); + S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + if (can_afford_transaction(expected_upload_cost)) + { + LLFloaterSnapshot::saveTexture(); + LLFloaterSnapshot::postSave(); + } + else + { + LLSD args; + args["COST"] = llformat("%d", expected_upload_cost); + LLNotificationsUtil::add("ErrorPhotoCannotAfford", args); + LLFloaterSnapshot::inventorySaveFailed(); + } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6b75a2083d..589c05de99 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1164,6 +1164,22 @@ Error encoding snapshot. fail + + You need L$[COST] to save a photo to your inventory. You may either buy L$ or save the photo to your computer instead. + fail + + + + You need L$[COST] to save a texture to your inventory. You may either buy L$ or save the photo to your computer instead. + fail + + Date: Wed, 20 Apr 2016 19:40:19 +0300 Subject: [PATCH 012/134] MAINT-2129 "Block" button doesn't become disabled in remote object inspector after object has been added to block list --- indra/newview/llchathistory.cpp | 11 +++++++++++ .../newview/skins/default/xui/en/menu_object_icon.xml | 3 +++ 2 files changed, 14 insertions(+) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 4b426081d0..9564951986 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -169,6 +169,16 @@ public: } + bool onObjectIconContextMenuItemEnabled(const LLSD& userdata) + { + std::string level = userdata.asString(); + if (level == "is_blocked") + { + return !LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat); + } + return false; + } + void onAvatarIconContextMenuItemClicked(const LLSD& userdata) { std::string level = userdata.asString(); @@ -275,6 +285,7 @@ public: registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2)); registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2)); registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2)); + registrar_enable.add("ObjectIcon.Enable", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemEnabled, this, _2)); LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandleAvatar = menu->getHandle(); diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index 2d4f1792c2..93093014eb 100755 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -23,6 +23,9 @@ + From bb719baec5b3000d0e9671283f5b5e9f23e780ac Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 21 Apr 2016 16:16:16 +0300 Subject: [PATCH 013/134] MAINT-6352 FIXED Editing marketplace listings before inventory has fully fetched causes listings to be unlisted. --- indra/newview/llinventoryfunctions.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index e3cb4d57ef..d8f019374e 100755 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -287,7 +287,11 @@ void update_marketplace_category(const LLUUID& cur_uuid, bool perform_consistenc LL_INFOS("SLM") << "Unlist and clear version folder as the version folder is not at the right place anymore!!" << LL_ENDL; LLMarketplaceData::instance().setVersionFolder(listing_uuid, LLUUID::null,1); } - else if (version_folder_uuid.notNull() && LLMarketplaceData::instance().getActivationState(version_folder_uuid) && (count_descendants_items(version_folder_uuid) == 0) && !LLMarketplaceData::instance().isUpdating(version_folder_uuid,version_depth)) + else if (version_folder_uuid.notNull() + && gInventory.isCategoryComplete(version_folder_uuid) + && LLMarketplaceData::instance().getActivationState(version_folder_uuid) + && (count_descendants_items(version_folder_uuid) == 0) + && !LLMarketplaceData::instance().isUpdating(version_folder_uuid,version_depth)) { LL_INFOS("SLM") << "Unlist as the version folder is empty of any item!!" << LL_ENDL; LLNotificationsUtil::add("AlertMerchantVersionFolderEmpty"); From e302b6f1f451f8a2388698b3528fb71af9cf41b2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 22 Apr 2016 18:41:45 +0300 Subject: [PATCH 014/134] MAINT-2063 Fixed User had ability to delete Notecards and textures from library --- indra/newview/llpreviewnotecard.cpp | 6 +++-- indra/newview/llpreviewtexture.cpp | 38 ++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 20c43bc432..ba9845ef04 100755 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -94,7 +94,8 @@ BOOL LLPreviewNotecard::postBuild() if (item) { getChild("desc")->setValue(item->getDescription()); - getChildView("Delete")->setEnabled(true); + BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()); + getChildView("Delete")->setEnabled(!source_library); } getChild("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); @@ -219,6 +220,7 @@ void LLPreviewNotecard::loadAsset() BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); BOOL allow_modify = canModify(mObjectUUID, item); + BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID()); if (allow_copy || gAgent.isGodlike()) { @@ -288,7 +290,7 @@ void LLPreviewNotecard::loadAsset() getChildView("lock")->setVisible( TRUE); } - if(allow_modify || is_owner) + if((allow_modify || is_owner) && !source_library) { getChildView("Delete")->setEnabled(TRUE); } diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 2a2c51be40..645a77e42a 100755 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -38,6 +38,7 @@ #include "llimagetga.h" #include "llimagepng.h" #include "llinventory.h" +#include "llinventorymodel.h" #include "llnotificationsutil.h" #include "llresmgr.h" #include "lltrans.h" @@ -120,18 +121,22 @@ BOOL LLPreviewTexture::postBuild() childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); getChildView("save_tex_btn")->setVisible( true); getChildView("save_tex_btn")->setEnabled(canSaveAs()); - - if (!mCopyToInv) - { - const LLInventoryItem* item = getItem(); - - if (item) - { - childSetCommitCallback("desc", LLPreview::onText, this); - getChild("desc")->setValue(item->getDescription()); - getChild("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); - } - } + + const LLInventoryItem* item = getItem(); + if (item) + { + if (!mCopyToInv) + { + childSetCommitCallback("desc", LLPreview::onText, this); + getChild("desc")->setValue(item->getDescription()); + getChild("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); + } + BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()); + if (source_library) + { + getChildView("Discard")->setEnabled(false); + } + } // Fill in ratios list with common aspect ratio values mRatiosList.clear(); @@ -526,6 +531,15 @@ void LLPreviewTexture::loadAsset() // check that we can copy inworld items into inventory getChildView("Keep")->setEnabled(mIsCopyable); } + else + { + // check that we can remove item + BOOL source_library = gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID()); + if (source_library) + { + getChildView("Discard")->setEnabled(false); + } + } } LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus() From 772f0db14ecf721302d4c2a56f66a73a080f7b36 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 25 Apr 2016 13:05:35 +0300 Subject: [PATCH 015/134] MAINT-6283 reverted --- indra/newview/lllogchat.cpp | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 0dfcbfde7b..639641d1c2 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -67,7 +67,7 @@ const std::string LL_IM_FROM("from"); const std::string LL_IM_FROM_ID("from_id"); const std::string LL_TRANSCRIPT_FILE_EXTENSION("txt"); -const static std::string IM_SEPARATOR("| "); +const static std::string IM_SEPARATOR(": "); const static std::string NEW_LINE("\n"); const static std::string NEW_LINE_SPACE_PREFIX("\n "); const static std::string TWO_SPACES(" "); @@ -94,8 +94,7 @@ const static boost::regex TIMESTAMP("^(\\[\\d{4}/\\d{1,2}/\\d{1,2}\\s+\\d{1,2}:\ * Regular expression suitable to match names like * "You", "Second Life", "Igor ProductEngine", "Object", "Mega House" */ -const static boost::regex OLD_NAME_AND_TEXT("([^:]+[:]{1})?(\\s*)(.*)"); -const static boost::regex NAME_AND_TEXT("([^\\|]+[\\|]{1})?(\\s*)(.*)"); +const static boost::regex NAME_AND_TEXT("([^:]+[:]{1})?(\\s*)(.*)"); /** * These are recognizers for matching the names of ad-hoc conferences when generating the log file name @@ -108,8 +107,7 @@ const static boost::regex INBOUND_CONFERENCE("^[a-zA-Z]{1,31} [a-zA-Z]{1,31} Con const static boost::regex OUTBOUND_CONFERENCE("^Ad-hoc Conference hash[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"); //is used to parse complex object names like "Xstreet SL Terminal v2.2.5 st" -const static std::string OLD_NAME_TEXT_DIVIDER(": "); -const static std::string NAME_TEXT_DIVIDER("| "); +const static std::string NAME_TEXT_DIVIDER(": "); // is used for timestamps adjusting const static char* DATE_FORMAT("%Y/%m/%d %H:%M"); @@ -905,24 +903,13 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params //matching a name and a text std::string stuff = matches[IDX_STUFF]; boost::match_results name_and_text; - bool old_name = false; - bool has_name = false; - if (boost::regex_match(stuff, name_and_text, NAME_AND_TEXT)) - { - has_name = name_and_text[IDX_NAME].matched; - } + if (!boost::regex_match(stuff, name_and_text, NAME_AND_TEXT)) return false; - if(!has_name) - { - if (!boost::regex_match(stuff, name_and_text, OLD_NAME_AND_TEXT)) return false; - old_name = true; - has_name = name_and_text[IDX_NAME].matched; - } + bool has_name = name_and_text[IDX_NAME].matched; std::string name = name_and_text[IDX_NAME]; //we don't need a name/text separator - char delim = old_name? ':' : '|'; - if (has_name && name.length() && name[name.length()-1] == delim) + if (has_name && name.length() && name[name.length()-1] == ':') { name.erase(name.length()-1, 1); } @@ -937,17 +924,11 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params //possibly a case of complex object names consisting of 3+ words if (!has_name) { - std::string divider = NAME_TEXT_DIVIDER; - U32 divider_pos = stuff.find(divider); - if(divider_pos == std::string::npos) - { - divider = OLD_NAME_TEXT_DIVIDER; - divider_pos = stuff.find(divider); - } - if (divider_pos != std::string::npos && divider_pos < (stuff.length() - divider.length())) + U32 divider_pos = stuff.find(NAME_TEXT_DIVIDER); + if (divider_pos != std::string::npos && divider_pos < (stuff.length() - NAME_TEXT_DIVIDER.length())) { im[LL_IM_FROM] = stuff.substr(0, divider_pos); - im[LL_IM_TEXT] = stuff.substr(divider_pos + divider.length()); + im[LL_IM_TEXT] = stuff.substr(divider_pos + NAME_TEXT_DIVIDER.length()); return true; } } From 4a94133b072fc9263bf632f85468d2498a9c7eae Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 27 Apr 2016 10:56:38 +0300 Subject: [PATCH 016/134] MAINT-1007 FIXED Context menu in Appearance/Wearing tab should contain "Show original" menu item --- indra/newview/llpanelwearing.cpp | 2 ++ indra/newview/skins/default/xui/en/menu_wearing_tab.xml | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index d86a8b4480..d0353259a5 100755 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -94,6 +94,7 @@ protected: LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("Wearing.Edit", boost::bind(&edit_outfit)); + registrar.add("Wearing.ShowOriginal", boost::bind(show_item_original, mUUIDs.front())); registrar.add("Wearing.TakeOff", boost::bind(&LLAppearanceMgr::removeItemsFromAvatar, LLAppearanceMgr::getInstance(), mUUIDs)); registrar.add("Wearing.Detach", @@ -144,6 +145,7 @@ protected: menu->setItemVisible("take_off", allow_take_off); menu->setItemVisible("detach", allow_detach); menu->setItemVisible("edit_outfit_separator", allow_take_off || allow_detach); + menu->setItemVisible("show_original", mUUIDs.size() == 1); } }; diff --git a/indra/newview/skins/default/xui/en/menu_wearing_tab.xml b/indra/newview/skins/default/xui/en/menu_wearing_tab.xml index 2d54e69601..44b2727671 100755 --- a/indra/newview/skins/default/xui/en/menu_wearing_tab.xml +++ b/indra/newview/skins/default/xui/en/menu_wearing_tab.xml @@ -27,4 +27,11 @@ + + + From c1a56f9fb784b1f64ddae45c6dd5bb9f5ae6eecd Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 27 Apr 2016 10:58:44 +0300 Subject: [PATCH 017/134] MAINT-1057 FIXED Cannot get focus for or close build floater using toolbar button when editing attachments in no-build area --- indra/newview/app_settings/commands.xml | 2 +- indra/newview/lltoolmgr.cpp | 9 +++++++-- indra/newview/lltoolmgr.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 2cd6638042..a0d3dc0f99 100755 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -37,7 +37,7 @@ tooltip_ref="Command_Build_Tooltip" execute_function="Build.Toggle" execute_parameters="build" - is_enabled_function="Build.Enabled" + is_enabled_function="Build.EnabledOrActive" is_enabled_parameters="build" is_running_function="Floater.IsOpen" is_running_parameters="build" diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 2f8e464b71..b0e3b5bf89 100755 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -83,6 +83,7 @@ LLToolMgr::LLToolMgr() // Not a panel, register these callbacks globally. LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this)); + LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.EnabledOrActive", boost::bind(&LLToolMgr::buildEnabledOrActive, this)); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Marketplace.Enabled", boost::bind(&LLToolMgr::canAccessMarketplace, this)); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Marketplace.Toggle", boost::bind(&LLToolMgr::toggleMarketplace, this, _2)); @@ -264,17 +265,21 @@ bool LLToolMgr::canEdit() return LLViewerParcelMgr::getInstance()->allowAgentBuild(); } +bool LLToolMgr::buildEnabledOrActive() +{ + return inEdit() || canEdit(); +} + void LLToolMgr::toggleBuildMode(const LLSD& sdname) { const std::string& param = sdname.asString(); + LLFloaterReg::toggleInstanceOrBringToFront("build"); if (param == "build" && !canEdit()) { return; } - LLFloaterReg::toggleInstanceOrBringToFront("build"); - bool build_visible = LLFloaterReg::instanceVisible("build"); if (build_visible) { diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h index a3c1045aac..e5b45750d9 100755 --- a/indra/newview/lltoolmgr.h +++ b/indra/newview/lltoolmgr.h @@ -54,6 +54,7 @@ public: bool inEdit(); bool canEdit(); + bool buildEnabledOrActive(); bool canAccessMarketplace(); void toggleBuildMode(const LLSD& sdname); void toggleMarketplace(const LLSD& sdname); From 8d9f1ca337bc566511e9f65f82228235857903a8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 26 Apr 2016 18:21:55 +0300 Subject: [PATCH 018/134] MAINT-2022 FIXED "Copy" perform the same operation like "Copy UUID" in Gestures panel --- indra/newview/llfloatergesture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 7da65a9a7c..d842106146 100755 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -528,7 +528,8 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command) LLInventoryItem* item = gInventory.getItem(*it); if(item && item->getInventoryType() == LLInventoryType::IT_GESTURE) { - LLClipboard::instance().addToClipboard(item->getUUID(),LLAssetType::AT_GESTURE); + LLWString item_name = utf8str_to_wstring(item->getName()); + LLClipboard::instance().addToClipboard(item_name, 0, item_name.size()); } } } From b493edd2c32273b767d8bc3177b3b662947a5655 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 27 Apr 2016 18:06:57 +0300 Subject: [PATCH 019/134] MAINT-204 Fixed Top folder is expanded when my inventory filter is changed --- indra/llui/llfolderview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 3282c5f726..8166ef6a07 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1629,9 +1629,9 @@ void LLFolderView::update() if (mNeedsAutoSelect) { LL_RECORD_BLOCK_TIME(FTM_AUTO_SELECT); - // select new item only if a filtered item not currently selected + // select new item only if a filtered item not currently selected and there was a selection LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back(); - if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->getViewModelItem()->potentiallyVisible())) + if (!mAutoSelectOverride && selected_itemp && !selected_itemp->getViewModelItem()->potentiallyVisible()) { // these are named variables to get around gcc not binding non-const references to rvalues // and functor application is inherently non-const to allow for stateful functors From e05c7d70d4bb338426c29728659dd6ef75459e0d Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 28 Apr 2016 13:06:55 +0300 Subject: [PATCH 020/134] MAINT-1639 FIXED map seach clears itself when you are at the first place in map search --- indra/newview/llfloaterworldmap.cpp | 4 ++-- indra/newview/llfloaterworldmap.h | 2 +- indra/newview/lltracker.cpp | 6 +++--- indra/newview/lltracker.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index ece3e10faa..c67feb8158 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -963,10 +963,10 @@ F32 LLFloaterWorldMap::getDistanceToDestination(const LLVector3d &destination, } -void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui) +void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui, BOOL dest_reached) { LLCtrlListInterface *list = mListSearchResults; - if (list) + if (list && (!dest_reached || (list->getItemCount() == 1))) { list->operateOnAll(LLCtrlListInterface::OP_DELETE); } diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 7ce8dae9a9..c5801c8819 100755 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -94,7 +94,7 @@ public: // A z_attenuation of 0.0f collapses the distance into the X-Y plane F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; - void clearLocationSelection(BOOL clear_ui = FALSE); + void clearLocationSelection(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE); void clearAvatarSelection(BOOL clear_ui = FALSE); void clearLandmarkSelection(BOOL clear_ui = FALSE); diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index f611d0503f..b015cde45d 100755 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -183,7 +183,7 @@ void LLTracker::render3D() F32 dist = gFloaterWorldMap->getDistanceToDestination(pos_global, 0.5f); if (dist < DESTINATION_REACHED_RADIUS) { - instance()->stopTrackingLocation(); + instance()->stopTrackingLocation(FALSE,TRUE); } else { @@ -655,13 +655,13 @@ void LLTracker::stopTrackingLandmark(BOOL clear_ui) } -void LLTracker::stopTrackingLocation(BOOL clear_ui) +void LLTracker::stopTrackingLocation(BOOL clear_ui, BOOL dest_reached) { purgeBeaconText(); mTrackedLocationName.assign(""); mIsTrackingLocation = FALSE; mTrackedPositionGlobal.zeroVec(); - gFloaterWorldMap->clearLocationSelection(clear_ui); + gFloaterWorldMap->clearLocationSelection(clear_ui, dest_reached); mTrackingStatus = TRACKING_NOTHING; mTrackingLocationType = LOCATION_NOTHING; } diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h index 218f3430a6..a1c5052c1b 100755 --- a/indra/newview/lltracker.h +++ b/indra/newview/lltracker.h @@ -116,7 +116,7 @@ protected: void stopTrackingAll(BOOL clear_ui = FALSE); void stopTrackingAvatar(BOOL clear_ui = FALSE); - void stopTrackingLocation(BOOL clear_ui = FALSE); + void stopTrackingLocation(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE); void stopTrackingLandmark(BOOL clear_ui = FALSE); void drawMarker(const LLVector3d& pos_global, const LLColor4& color); From 5ec93df56a27af6763ae7fbd84bd6edd4145540b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 27 Apr 2016 20:54:21 +0300 Subject: [PATCH 021/134] MAINT-438 UI/Color Settings opens non-functional "Debug Settings" floater when spawned before login --- indra/newview/skins/default/xui/en/menu_login.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 419ec359a6..dcf2da52f1 100755 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -140,13 +140,6 @@ function="Advanced.ShowDebugSettings" parameter="all" /> - - - Date: Fri, 29 Apr 2016 19:32:20 +0300 Subject: [PATCH 022/134] MAINT-6370 Second Life uninstall does not remove registry keys handling secondlife protocols --- .../installers/windows/installer_template.nsi | 11 +++++++++++ .../newview/installers/windows/lang_en-us.nsi | Bin 8510 -> 9096 bytes 2 files changed, 11 insertions(+) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index b8677fd9e4..89317f2793 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -648,6 +648,7 @@ Function un.ProgramFiles %%DELETE_FILES%% # Optional/obsolete files. Delete won't fail if they don't exist. +Delete "$INSTDIR\autorun.bat" Delete "$INSTDIR\dronesettings.ini" Delete "$INSTDIR\message_template.msg" Delete "$INSTDIR\newview.pdb" @@ -679,6 +680,16 @@ FOLDERFOUND: NOFOLDER: +MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete + +DeleteKeys: + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\x-grid-location-info" + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\secondlife" + DeleteRegKey HKEY_CLASSES_ROOT "x-grid-location-info" + DeleteRegKey HKEY_CLASSES_ROOT "secondlife" + +NoDelete: + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index 343c312ddc5f08bf7009a982ca44688c005a2f3d..aa403a961cbdd0e39122c9273140346bb67a715f 100755 GIT binary patch delta 305 zcmZ{fF$%&!5Ji6@h@h4#F|rXG8^H?*+E`fW4OU&^k{D$bB~>aR{a(ZqcoEEqH z2*V7_pP9FRUyE}2oJIB>j0yvV7#bH`VUR;0p^~!~R1T1=!cR3)hQN{AF(*#na#tW@ zRoMG Date: Wed, 4 May 2016 11:31:00 +0300 Subject: [PATCH 023/134] MAINT-6220 enable searching of the friend list with the classic username of the avatar. --- indra/llmessage/llavatarname.cpp | 23 +++++++++++++++---- indra/llmessage/llavatarname.h | 4 ++-- indra/llui/lltextutil.cpp | 20 ++++++++++++++++ indra/llui/lltextutil.h | 6 +++++ indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++ indra/newview/llavatarlist.cpp | 17 ++++++++++---- indra/newview/llavatarlist.h | 4 ++++ indra/newview/llavatarlistitem.cpp | 22 +++++++++++++++--- indra/newview/llavatarlistitem.h | 4 ++++ indra/newview/llpanelpeople.cpp | 21 +++++++++++++++++ .../xui/en/menu_people_friends_view.xml | 8 +++++++ .../xui/en/menu_people_nearby_view.xml | 8 +++++++ 12 files changed, 146 insertions(+), 13 deletions(-) diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index d12f157910..d2115ee499 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -166,7 +166,7 @@ void LLAvatarName::setExpires(F64 expires) mExpires = LLFrameTimer::getTotalSeconds() + expires; } -std::string LLAvatarName::getCompleteName() const +std::string LLAvatarName::getCompleteName(bool use_parentheses) const { std::string name; if (sUseDisplayNames) @@ -182,7 +182,14 @@ std::string LLAvatarName::getCompleteName() const name = mDisplayName; if(sUseUsernames) { - name += " (" + mUsername + ")"; + if(use_parentheses) + { + name += " (" + mUsername + ")"; + } + else + { + name += " [ " + mUsername + " ]"; + } } } } @@ -220,7 +227,7 @@ std::string LLAvatarName::getDisplayName() const } } -std::string LLAvatarName::getUserName() const +std::string LLAvatarName::getUserName(bool lowercase) const { std::string name; if (mLegacyLastName.empty() || (mLegacyLastName == "Resident")) @@ -238,7 +245,15 @@ std::string LLAvatarName::getUserName() const } else { - name = mLegacyFirstName + " " + mLegacyLastName; + if(lowercase) + { + name = mLegacyFirstName + "." + mLegacyLastName; + LLStringUtil::toLower(name); + } + else + { + name = mLegacyFirstName + " " + mLegacyLastName; + } } return name; } diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 1cb3ae421f..192f43f07c 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -65,7 +65,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getCompleteName() const; + std::string getCompleteName(bool use_parentheses = true) const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting @@ -80,7 +80,7 @@ public: // Returns "James Linden" or "bobsmith123 Resident" // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name // Also used for backwards compatibility with systems like voice and muting - std::string getUserName() const; + std::string getUserName(bool lowercase = false) const; // Returns "james.linden" or the legacy name for very old names std::string getAccountName() const { return mUsername; } diff --git a/indra/llui/lltextutil.cpp b/indra/llui/lltextutil.cpp index fff04b34f2..f6b2ee1dc0 100755 --- a/indra/llui/lltextutil.cpp +++ b/indra/llui/lltextutil.cpp @@ -56,6 +56,26 @@ void LLTextUtil::textboxSetHighlightedVal(LLTextBox *txtbox, const LLStyle::Para txtbox->appendText(text.substr(hl_begin + hl_len), false, normal_style); } +void LLTextUtil::textboxSetGreyedVal(LLTextBox *txtbox, const LLStyle::Params& normal_style, const std::string& text, const std::string& greyed) +{ + static LLUIColor sGreyedTextColor = LLUIColorTable::instance().getColor("Gray", LLColor4::grey); + + size_t greyed_begin = 0, greyed_len = greyed.size(); + + if (greyed_len == 0 || (greyed_begin = text.find(greyed)) == std::string::npos) + { + txtbox->setText(text, normal_style); + return; + } + + LLStyle::Params greyed_style = normal_style; + greyed_style.color = sGreyedTextColor; + txtbox->setText(LLStringUtil::null); // clear text + txtbox->appendText(text.substr(0, greyed_begin), false, normal_style); + txtbox->appendText(text.substr(greyed_begin, greyed_len), false, greyed_style); + txtbox->appendText(text.substr(greyed_begin + greyed_len), false, normal_style); +} + const std::string& LLTextUtil::formatPhoneNumber(const std::string& phone_str) { static const std::string PHONE_SEPARATOR = LLUI::sSettingGroups["config"]->getString("AvalinePhoneSeparator"); diff --git a/indra/llui/lltextutil.h b/indra/llui/lltextutil.h index 1be81ffd62..a9c143e445 100755 --- a/indra/llui/lltextutil.h +++ b/indra/llui/lltextutil.h @@ -52,6 +52,12 @@ namespace LLTextUtil const std::string& text, const std::string& hl); + void textboxSetGreyedVal( + LLTextBox *txtbox, + const LLStyle::Params& normal_style, + const std::string& text, + const std::string& greyed); + /** * Formats passed phone number to be more human readable. * diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 15f6fe5649..de5caad7fa 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11062,6 +11062,28 @@ Value 1 + FriendsListHideUsernames + + Comment + Show both Display name and Username in Friend list + Persist + 1 + Type + Boolean + Value + 0 + + NearbyListHideUsernames + + Comment + Show both Display name and Username in Nearby list + Persist + 1 + Type + Boolean + Value + 0 + NearbyListShowMap Comment diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 8846d1317d..513f25e301 100755 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -140,6 +140,7 @@ LLAvatarList::LLAvatarList(const Params& p) , mShowProfileBtn(p.show_profile_btn) , mShowSpeakingIndicator(p.show_speaking_indicator) , mShowPermissions(p.show_permissions_granted) +, mShowCompleteName(false) { setCommitOnSelectionChange(true); @@ -174,6 +175,11 @@ void LLAvatarList::setShowIcons(std::string param_name) mShowIcons = gSavedSettings.getBOOL(mIconParamName); } +std::string LLAvatarList::getAvatarName(LLAvatarName av_name) +{ + return mShowCompleteName? av_name.getCompleteName(false) : av_name.getDisplayName(); +} + // virtual void LLAvatarList::draw() { @@ -279,7 +285,7 @@ void LLAvatarList::refresh() LLAvatarName av_name; have_names &= LLAvatarNameCache::get(buddy_id, &av_name); - if (!have_filter || findInsensitive(av_name.getDisplayName(), mNameFilter)) + if (!have_filter || findInsensitive(getAvatarName(av_name), mNameFilter)) { if (nadded >= ADD_LIMIT) { @@ -297,7 +303,7 @@ void LLAvatarList::refresh() } else { - std::string display_name = av_name.getDisplayName(); + std::string display_name = getAvatarName(av_name); addNewItem(buddy_id, display_name.empty() ? waiting_str : display_name, LLAvatarTracker::instance().isBuddyOnline(buddy_id)); @@ -327,7 +333,7 @@ void LLAvatarList::refresh() const LLUUID& buddy_id = it->asUUID(); LLAvatarName av_name; have_names &= LLAvatarNameCache::get(buddy_id, &av_name); - if (!findInsensitive(av_name.getDisplayName(), mNameFilter)) + if (!findInsensitive(getAvatarName(av_name), mNameFilter)) { removeItemByUUID(buddy_id); modified = true; @@ -381,6 +387,7 @@ void LLAvatarList::updateAvatarNames() for( std::vector::const_iterator it = items.begin(); it != items.end(); it++) { LLAvatarListItem* item = static_cast(*it); + item->setShowCompleteName(mShowCompleteName); item->updateAvatarName(); } mNeedUpdateNames = false; @@ -400,7 +407,7 @@ bool LLAvatarList::filterHasMatches() // If name has not been loaded yet we consider it as a match. // When the name will be loaded the filter will be applied again(in refresh()). - if (have_name && !findInsensitive(av_name.getDisplayName(), mNameFilter)) + if (have_name && !findInsensitive(getAvatarName(av_name), mNameFilter)) { continue; } @@ -434,6 +441,7 @@ S32 LLAvatarList::notifyParent(const LLSD& info) void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) { LLAvatarListItem* item = new LLAvatarListItem(); + item->setShowCompleteName(mShowCompleteName); // This sets the name as a side effect item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus); item->setOnline(mIgnoreOnlineStatus ? true : is_online); @@ -445,6 +453,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->showSpeakingIndicator(mShowSpeakingIndicator); item->setShowPermissions(mShowPermissions); + item->setDoubleClickCallback(boost::bind(&LLAvatarList::onItemDoubleClicked, this, _1, _2, _3, _4)); addItem(item, id, pos); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 3542577ae3..1a672c279b 100755 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -83,6 +83,7 @@ public: void setShowIcons(std::string param_name); bool getIconsVisible() const { return mShowIcons; } const std::string getIconParamName() const{return mIconParamName;} + std::string getAvatarName(LLAvatarName av_name); virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); @@ -100,6 +101,8 @@ public: void addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name); void handleDisplayNamesOptionChanged(); + void setShowCompleteName(bool show) { mShowCompleteName = show;}; + protected: void refresh(); @@ -126,6 +129,7 @@ private: bool mShowProfileBtn; bool mShowSpeakingIndicator; bool mShowPermissions; + bool mShowCompleteName; LLTimer* mLITUpdateTimer; // last interaction time update timer std::string mIconParamName; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 3e6c817dd6..af3fac91bc 100755 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -77,8 +77,10 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) mShowInfoBtn(true), mShowProfileBtn(true), mShowPermissions(false), + mShowCompleteName(false), mHovered(false), - mAvatarNameCacheConnection() + mAvatarNameCacheConnection(), + mGreyOutUsername("") { if (not_from_ui_factory) { @@ -399,14 +401,28 @@ void LLAvatarListItem::updateAvatarName() void LLAvatarListItem::setNameInternal(const std::string& name, const std::string& highlight) { - LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle, name, highlight); + if(mShowCompleteName && highlight.empty()) + { + LLTextUtil::textboxSetGreyedVal(mAvatarName, mAvatarNameStyle, name, mGreyOutUsername); + } + else + { + LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle, name, highlight); + } } void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { mAvatarNameCacheConnection.disconnect(); - setAvatarName(av_name.getDisplayName()); + mGreyOutUsername = ""; + std::string name_string = mShowCompleteName? av_name.getCompleteName(false) : av_name.getDisplayName(); + if(av_name.getCompleteName() != av_name.getUserName()) + { + mGreyOutUsername = "[ " + av_name.getUserName(true) + " ]"; + LLStringUtil::toLower(mGreyOutUsername); + } + setAvatarName(name_string); setAvatarToolTip(av_name.getUserName()); //requesting the list to resort diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 7ef35a746e..36d18114aa 100755 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -106,6 +106,7 @@ public: void setShowPermissions(bool show) { mShowPermissions = show; }; void showLastInteractionTime(bool show); void setAvatarIconVisible(bool visible); + void setShowCompleteName(bool show) { mShowCompleteName = show;}; const LLUUID& getAvatarId() const; std::string getAvatarName() const; @@ -218,6 +219,9 @@ private: /// true when the mouse pointer is hovering over this item bool mHovered; + bool mShowCompleteName; + std::string mGreyOutUsername; + void fetchAvatarName(); boost::signals2::connection mAvatarNameCacheConnection; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 73b928f014..bc177abc57 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -611,9 +611,11 @@ BOOL LLPanelPeople::postBuild() mOnlineFriendList->setNoItemsCommentText(getString("no_friends_online")); mOnlineFriendList->setShowIcons("FriendsListShowIcons"); mOnlineFriendList->showPermissions("FriendsListShowPermissions"); + mOnlineFriendList->setShowCompleteName(!gSavedSettings.getBOOL("FriendsListHideUsernames")); mAllFriendList->setNoItemsCommentText(getString("no_friends")); mAllFriendList->setShowIcons("FriendsListShowIcons"); mAllFriendList->showPermissions("FriendsListShowPermissions"); + mAllFriendList->setShowCompleteName(!gSavedSettings.getBOOL("FriendsListHideUsernames")); LLPanel* nearby_tab = getChild(NEARBY_TAB_NAME); nearby_tab->setVisibleCallback(boost::bind(&Updater::setActive, mNearbyListUpdater, _2)); @@ -622,6 +624,7 @@ BOOL LLPanelPeople::postBuild() mNearbyList->setNoItemsMsg(getString("no_one_near")); mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near")); mNearbyList->setShowIcons("NearbyListShowIcons"); + mNearbyList->setShowCompleteName(!gSavedSettings.getBOOL("NearbyListHideUsernames")); mMiniMap = (LLNetMap*)getChildView("Net Map",true); mMiniMap->setToolTipMsg(gSavedSettings.getBOOL("DoubleClickTeleport") ? getString("AltMiniMapToolTipMsg") : getString("MiniMapToolTipMsg")); @@ -1342,6 +1345,16 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) mAllFriendList->showPermissions(show_permissions); mOnlineFriendList->showPermissions(show_permissions); } + else if (chosen_item == "view_usernames") + { + bool hide_usernames = !gSavedSettings.getBOOL("FriendsListHideUsernames"); + gSavedSettings.setBOOL("FriendsListHideUsernames", hide_usernames); + + mAllFriendList->setShowCompleteName(!hide_usernames); + mAllFriendList->handleDisplayNamesOptionChanged(); + mOnlineFriendList->setShowCompleteName(!hide_usernames); + mOnlineFriendList->handleDisplayNamesOptionChanged(); + } } void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata) @@ -1374,6 +1387,14 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) { setSortOrder(mNearbyList, E_SORT_BY_DISTANCE); } + else if (chosen_item == "view_usernames") + { + bool hide_usernames = !gSavedSettings.getBOOL("NearbyListHideUsernames"); + gSavedSettings.setBOOL("NearbyListHideUsernames", hide_usernames); + + mNearbyList->setShowCompleteName(!hide_usernames); + mNearbyList->handleDisplayNamesOptionChanged(); + } } bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata) diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml index 8790fde7c5..b5a4b87acd 100755 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml @@ -40,6 +40,14 @@ function="CheckControl" parameter="FriendsListShowPermissions" /> + + + + + + + + From eae82c8e4794e2d8374dd8d70547b00c5ac4f300 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 4 May 2016 14:59:22 +0300 Subject: [PATCH 024/134] MAINT-1513 FIXED Label of new folder doesn't disappear while closing Inventory by hot hey --- indra/llui/llfolderview.h | 3 ++- indra/newview/llpanelmaininventory.cpp | 9 +++++++++ indra/newview/llpanelmaininventory.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 114dd7bd2f..b5deefd653 100755 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -242,6 +242,8 @@ public: bool useLabelSuffix() { return mUseLabelSuffix; } virtual void updateMenu(); + void finishRenamingItem( void ); + // Note: We may eventually have to move that method up the hierarchy to LLFolderViewItem. LLHandle getHandle() const { return getDerivedHandle(); } @@ -255,7 +257,6 @@ protected: void commitRename( const LLSD& data ); void onRenamerLost(); - void finishRenamingItem( void ); void closeRenamer( void ); bool selectFirstItem(); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 973e1f7705..c779ba5cdd 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1152,6 +1152,15 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } } +void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) +{ + if(!new_visibility) + { + mMenuAdd->setVisible(FALSE); + getActivePanel()->getRootFolder()->finishRenamingItem(); + } +} + bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 21f0ca0cae..290e2e5f47 100755 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -72,6 +72,7 @@ public: std::string& tooltip_msg); /*virtual*/ void changed(U32); /*virtual*/ void draw(); + /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); LLInventoryPanel* getPanel() { return mActivePanel; } LLInventoryPanel* getActivePanel() { return mActivePanel; } From 51cf02086a5f172bb49872945aa66e72fd5db561 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 6 May 2016 15:00:19 +0300 Subject: [PATCH 025/134] MAINT-6376 Disable loading surface textures in the wireframe mode --- indra/newview/llviewertexture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c5e07f009f..565e83811f 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1874,7 +1874,8 @@ bool LLViewerFetchedTexture::updateFetch() static LLCachedControl textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled", false); static LLCachedControl sCameraMotionThreshold(gSavedSettings,"TextureCameraMotionThreshold", 0.2); static LLCachedControl sCameraMotionBoost(gSavedSettings,"TextureCameraMotionBoost", 3); - if(textures_decode_disabled) + if(textures_decode_disabled || + (gUseWireframe && mBoostLevel < LLGLTexture::BOOST_AVATAR_BAKED_SELF)) // don't fetch the surface textures in wireframe mode { return false; } From c11bac080e2a4856c6585ba2d5dfa4cefe4f3c75 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 9 May 2016 17:27:39 +0200 Subject: [PATCH 026/134] Reset version number for TPV Havok version --- autobuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild.xml b/autobuild.xml index 855085bde4..2f34f96401 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1820,7 +1820,7 @@ version - 1.0.313563 + 1.0.298370 mesa From 032659bf40e2b765108ec2f114af273e704ca8b5 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 10 May 2016 10:24:21 +0200 Subject: [PATCH 027/134] Updated German translation --- indra/newview/skins/default/xui/de/menu_login.xml | 1 - .../skins/default/xui/de/menu_people_nearby.xml | 2 ++ .../skins/default/xui/de/menu_wearing_tab.xml | 1 + indra/newview/skins/default/xui/de/notifications.xml | 12 ++++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/de/menu_login.xml b/indra/newview/skins/default/xui/de/menu_login.xml index c612731720..bed0dff36d 100755 --- a/indra/newview/skins/default/xui/de/menu_login.xml +++ b/indra/newview/skins/default/xui/de/menu_login.xml @@ -22,7 +22,6 @@ - diff --git a/indra/newview/skins/default/xui/de/menu_people_nearby.xml b/indra/newview/skins/default/xui/de/menu_people_nearby.xml index 2c070b332d..c5ad7ef028 100755 --- a/indra/newview/skins/default/xui/de/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/de/menu_people_nearby.xml @@ -15,4 +15,6 @@ + + diff --git a/indra/newview/skins/default/xui/de/menu_wearing_tab.xml b/indra/newview/skins/default/xui/de/menu_wearing_tab.xml index 4640f91597..b7ee387d19 100755 --- a/indra/newview/skins/default/xui/de/menu_wearing_tab.xml +++ b/indra/newview/skins/default/xui/de/menu_wearing_tab.xml @@ -5,4 +5,5 @@ + diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index e76a3f9c5f..05db128777 100755 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -470,6 +470,12 @@ Um Medien nur auf einer Fläche einzufügen, wählen Sie „Oberfläche auswähl Fehler beim Erstellen des Fotos! + + Sie benötigten [COST] L$ um ein Foto in Ihrem Inventar zu speichern. Sie können entweder L$ kaufen oder das Foto auf Ihrem Computer speichern. + + + Sie benötigten [COST] L$ um eine Textur in Ihrem Inventar zu speichern. Sie können entweder L$ kaufen oder das Foto auf Ihrem Computer speichern. + Ein Foto konnte aus folgendem Grund nicht gesendet werden: [REASON] @@ -2866,6 +2872,12 @@ Fliegen ist hier nicht möglich. yestext="Region neu formen" notext="Schließen"/> + + Diese Region weist ausstehende Pathfinding-Änderungen auf. Wenn Sie Baurechte besitzen, können Sie die Region durch Klicken auf die Schaltfläche „Region neu formen“ neu formen. + + Dynamisches Pathfinding ist in dieser Region nicht aktiviert. Geskriptete Objekte, die Pathfinding-LSL-Aufrufe verwenden, funktionieren in dieser Region u. U. nicht wie erwartet. From d37003a631357b49155d8e5c0bd67029458802d4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 23 May 2016 18:06:16 +0300 Subject: [PATCH 028/134] MAINT-2129 signuls cleanup --- indra/llui/lltextbase.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 3e4680de24..c7d7535f87 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -269,6 +269,8 @@ LLTextBase::~LLTextBase() { mSegments.clear(); delete mURLClickSignal; + delete mIsFriendSignal; + delete mIsObjectBlockedSignal; } void LLTextBase::initFromParams(const LLTextBase::Params& p) From 709c15dc233134370425687cfd429b48d6205afa Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 10 May 2016 19:35:41 +0200 Subject: [PATCH 029/134] Display correct attempt for requesting region capabilities at startup --- indra/newview/llviewerregion.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index cac2ed8585..899ab3a371 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -264,17 +264,18 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) } S32 id = ++mHttpResponderID; - ++mSeedCapAttempts; LLSD capabilityNames = LLSD::emptyArray(); buildCapabilityNames(capabilityNames); LL_INFOS("AppInit", "Capabilities") << "Requesting seed from " << url - << " (attempt #" << mSeedCapAttempts << ")" << LL_ENDL; + << " (attempt #" << mSeedCapAttempts + 1 << ")" << LL_ENDL; regionp = NULL; result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames); + ++mSeedCapAttempts; + regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!regionp) //region was removed { From 54bbf95f26c7412a0febb9279981c820d2a45c3d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 11 May 2016 18:33:50 +0300 Subject: [PATCH 030/134] MAINT-5635 PSYS_SRC_MAX_AGE breaks when replacing a particle system without it --- indra/newview/llviewerpartsource.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 7efa821bbf..814060f4f2 100755 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -441,10 +441,20 @@ LLPointer LLViewerPartSourceScript::unpackPSS(LLViewer return NULL; } + F32 prev_max_age = pssp->mPartSysData.mMaxAge; + F32 prev_start_age = pssp->mPartSysData.mStartAge; if (!pssp->mPartSysData.unpackBlock(block_num)) { return NULL; } + else if (pssp->mPartSysData.mMaxAge + && (prev_max_age != pssp->mPartSysData.mMaxAge || prev_start_age != pssp->mPartSysData.mStartAge)) + { + // reusing existing pss, so reset time to allow particles to start again + pssp->mLastUpdateTime = 0.f; + pssp->mLastPartTime = 0.f; + } + if (pssp->mPartSysData.mTargetUUID.notNull()) { LLViewerObject *target_objp = gObjectList.findObject(pssp->mPartSysData.mTargetUUID); From 5048402da82417f653060ef04cfc36bb67f8cd2f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 12 May 2016 17:46:20 +0300 Subject: [PATCH 031/134] MAINT-5786 FIXED Redundant sibling index suffix on uploaded mesh object names. --- indra/llprimitive/lldaeloader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 720986a411..00bde8dbc3 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -2235,7 +2235,11 @@ std::string LLDAELoader::getElementLabel(daeElement *element) // retrieve index to distinguish items inside same parent size_t ind = 0; parent->getChildren().find(element, ind); - index_string = "_" + boost::lexical_cast(ind); + + if (ind > 0) + { + index_string = "_" + boost::lexical_cast(ind); + } // if parent has a name or ID, use it std::string name = parent->getAttribute("name"); From 87ca1fc3d9ec4650147882f7b8cd85c38c983066 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 13 May 2016 13:33:14 +0300 Subject: [PATCH 032/134] MAINT-6400 Make the region "Object Bonus" setting safer --- indra/newview/llfloaterregioninfo.cpp | 52 ++++++++++++++++++- indra/newview/llfloaterregioninfo.h | 7 +++ .../skins/default/xui/en/notifications.xml | 13 +++++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 4eacd728c3..843dbbf25e 100755 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -412,6 +412,11 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild("object_bonus_spin")->setValue(LLSD(object_bonus_factor) ); panel->getChild("access_combo")->setValue(LLSD(sim_access) ); + LLPanelRegionGeneralInfo* panel_general = LLFloaterRegionInfo::getPanelGeneral(); + if (panel) + { + panel_general->setObjBonusFactor(object_bonus_factor); + } // detect teen grid for maturity @@ -464,6 +469,16 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() return panel; } +// static +LLPanelRegionGeneralInfo* LLFloaterRegionInfo::getPanelGeneral() +{ + LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance("region_info"); + if (!floater) return NULL; + LLTabContainer* tab = floater->getChild("region_panels"); + LLPanelRegionGeneralInfo* panel = (LLPanelRegionGeneralInfo*)tab->getChild("General"); + return panel; +} + // static LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain() { @@ -717,7 +732,42 @@ BOOL LLPanelRegionGeneralInfo::postBuild() childSetAction("im_btn", onClickMessage, this); // childSetAction("manage_telehub_btn", onClickManageTelehub, this); - return LLPanelRegionInfo::postBuild(); + LLUICtrl* apply_btn = findChild("apply_btn"); + if (apply_btn) + { + apply_btn->setCommitCallback(boost::bind(&LLPanelRegionGeneralInfo::onBtnSet, this)); + } + + refresh(); + return TRUE; +} + +void LLPanelRegionGeneralInfo::onBtnSet() +{ + if(mObjBonusFactor == getChild("object_bonus_spin")->getValue().asReal()) + { + if (sendUpdate()) + { + disableButton("apply_btn"); + } + } + else + { + LLNotificationsUtil::add("ChangeObjectBonusFactor", LLSD(), LLSD(), boost::bind(&LLPanelRegionGeneralInfo::onChangeObjectBonus, this, _1, _2)); + } +} + +bool LLPanelRegionGeneralInfo::onChangeObjectBonus(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) + { + if (sendUpdate()) + { + disableButton("apply_btn"); + } + } + return false; } void LLPanelRegionGeneralInfo::onClickKick() diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 46f2b42137..dbb0ad05e9 100755 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -95,6 +95,7 @@ public: static LLPanelEstateCovenant* getPanelCovenant(); static LLPanelRegionTerrainInfo* getPanelRegionTerrain(); static LLPanelRegionExperiences* getPanelExperiences(); + static LLPanelRegionGeneralInfo* getPanelGeneral(); // from LLPanel virtual void refresh(); @@ -183,6 +184,9 @@ public: // LLPanel virtual BOOL postBuild(); + void onBtnSet(); + void setObjBonusFactor(F32 object_bonus_factor) {mObjBonusFactor = object_bonus_factor;} + protected: virtual BOOL sendUpdate(); void onClickKick(); @@ -191,6 +195,9 @@ protected: bool onKickAllCommit(const LLSD& notification, const LLSD& response); static void onClickMessage(void* userdata); bool onMessageCommit(const LLSD& notification, const LLSD& response); + bool onChangeObjectBonus(const LLSD& notification, const LLSD& response); + + F32 mObjBonusFactor; }; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 589c05de99..f9059627db 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3542,6 +3542,19 @@ Teleport all Residents in this region home? yestext="OK"/> + + Lowering the object bonus after builds have been established in a region may cause objects to be returned or deleted. Are you sure you want to change object bonus? + confirm + + + Date: Fri, 13 May 2016 14:16:46 +0300 Subject: [PATCH 033/134] MAINT-6408 FIXED viewer should allow password field entry greater than 16 bytes --- indra/newview/skins/default/xui/en/panel_login.xml | 2 +- indra/newview/skins/default/xui/en/panel_login_first.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 183ae2e824..ae8e78a9d6 100755 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -67,7 +67,7 @@ follows="left|top" height="32" left_pad="-11" - max_length_bytes="16" + max_length_bytes="64" text_pad_left="8" name="password_edit" label="Password" diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml index d1416ece82..dc6e27a1ee 100644 --- a/indra/newview/skins/default/xui/en/panel_login_first.xml +++ b/indra/newview/skins/default/xui/en/panel_login_first.xml @@ -124,7 +124,7 @@ width="200" height="32" left="220" - max_length_bytes="16" + max_length_bytes="64" name="password_edit" label="Password" text_pad_left="8" From b756b47d08d028a40d0a49b11755d31f47efe46d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 13 May 2016 19:42:27 +0300 Subject: [PATCH 034/134] MAINT-6383 SLT timestamp in "About second life" floater --- indra/newview/llappviewer.cpp | 6 ++++++ indra/newview/llstartup.cpp | 8 +++++--- indra/newview/skins/default/xui/en/strings.xml | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 45306dcff4..b6ba200d0d 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3440,6 +3440,12 @@ std::string LLAppViewer::getViewerInfoString() const { support << '\n' << LLTrans::getString("AboutTraffic", args); } + + // SLT timestamp + LLSD substitution; + substitution["datetime"] = (S32)time(NULL);//(S32)time_corrected(); + support << "\n" << LLTrans::getString("AboutTime", substitution); + return support.str(); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 88fbd233b8..723b4992bb 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -687,6 +687,11 @@ bool idle_startup() gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); show_connect_box = TRUE; } + + //setup map of datetime strings to codes and slt & local time offset from utc + // *TODO: Does this need to be here? + LLStringOps::setupDatetimeInfo(false); + // Go to the next startup state LLStartUp::setStartupState( STATE_BROWSER_INIT ); return FALSE; @@ -1139,9 +1144,6 @@ bool idle_startup() LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done); } } - //setup map of datetime strings to codes and slt & local time offset from utc - // *TODO: Does this need to be here? - LLStringOps::setupDatetimeInfo (false); transition_back_to_login_panel(emsg.str()); show_connect_box = true; } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ff98d2f109..1e498024f1 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -54,6 +54,7 @@ LLCEFLib/CEF Version: [LLCEFLIB_VERSION] Voice Server Version: [VOICE_VERSION] Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) + [month, datetime, slt] [day, datetime, slt] [year, datetime, slt] [hour, datetime, slt]:[min, datetime, slt]:[second,datetime,slt] Error fetching server release notes URL. From e3afb1fdbadd3d6cdae7c261e7a975f3bf9faa89 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 16 May 2016 17:50:09 +0300 Subject: [PATCH 035/134] MAINT-5935 server timestamp --- indra/newview/llstartup.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 723b4992bb..a2c8e7772e 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3312,6 +3312,13 @@ bool process_login_success_response() { time_t now = time(NULL); gUTCOffset = (server_utc_time - now); + + // Print server timestamp + LLSD substitution; + substitution["datetime"] = (S32)server_utc_time; + std::string timeStr = "[month, datetime, slt] [day, datetime, slt] [year, datetime, slt] [hour, datetime, slt]:[min, datetime, slt]:[second, datetime, slt]"; + LLStringUtil::format(timeStr, substitution); + LL_INFOS("AppInit") << "Server SLT timestamp: " << timeStr << ". Server-viewer time offset before correction: " << gUTCOffset << "s" << LL_ENDL; } } From 58e9a5919952cbd0a5b2112bf5c72db09c4750ec Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 16 May 2016 14:49:40 -0700 Subject: [PATCH 036/134] fix for maint-6413: add channel to summary.json --- indra/newview/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index bb745bcb43..5b39f622a6 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1310,9 +1310,10 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) # the viewer_version.txt file created here is for passing to viewer_manifest and autobuild # the summary.json file is created for the benefit of the TeamCity builds, where # it is used to provide descriptive information to the build results page +# channel added to summary.json for programmatic access to that by VMP SL-321 add_custom_target(generate_viewer_version ALL COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"}' > ${CMAKE_BINARY_DIR}/summary.json + COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel":"${VIEWER_CHANNEL}"}' > ${CMAKE_BINARY_DIR}/summary.json COMMENT Generating viewer_version.txt for manifest processing ) From 191c2aec49491c74a6ce9b23a813dc89d63f2c6a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 18 May 2016 13:15:01 +0300 Subject: [PATCH 037/134] MAINT-6377 Nearby chat toasts cover the conversation floater. --- .../newview/llfloaterimnearbychathandler.cpp | 25 ++++++++++++++++--- indra/newview/llfloaterimsessiontab.cpp | 6 +++++ indra/newview/llfloaterimsessiontab.h | 2 ++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 1f85c5ac1b..9fd731ed56 100755 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -601,12 +601,31 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, toast_msg = chat_msg.mText; } + bool chat_overlaps = false; + if(nearby_chat->getChatHistory()) + { + LLRect chat_rect = nearby_chat->getChatHistory()->calcScreenRect(); + for (std::list::const_iterator child_iter = gFloaterView->getChildList()->begin(); + child_iter != gFloaterView->getChildList()->end(); ++child_iter) + { + LLView *view = *child_iter; + const LLRect& rect = view->getRect(); + if(view->isInVisibleChain() && (rect.overlaps(chat_rect))) + { + if(!nearby_chat->getChatHistory()->hasAncestor(view)) + { + chat_overlaps = true; + } + break; + } + } + } //Don't show nearby toast, if conversation is visible and selected if ((nearby_chat->hasFocus()) || (LLFloater::isVisible(nearby_chat) && nearby_chat->isTornOff() && !nearby_chat->isMinimized()) || - ((im_box->getSelectedSession().isNull() && - ((LLFloater::isVisible(im_box) && !im_box->isMinimized() && im_box->isFrontmost()) - || (LLFloater::isVisible(nearby_chat) && !nearby_chat->isMinimized() && nearby_chat->isFrontmost()))))) + ((im_box->getSelectedSession().isNull() && !chat_overlaps && + ((LLFloater::isVisible(im_box) && !nearby_chat->isTornOff() && !im_box->isMinimized()) + || (LLFloater::isVisible(nearby_chat) && nearby_chat->isTornOff() && !nearby_chat->isMinimized()))))) { if(nearby_chat->isMessagePaneExpanded()) { diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 357b635594..2cd94c592a 100755 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -1094,6 +1094,12 @@ void LLFloaterIMSessionTab::saveCollapsedState() gSavedPerAccountSettings.setBOOL("NearbyChatIsNotCollapsed", isMessagePaneExpanded()); } } + +LLView* LLFloaterIMSessionTab::getChatHistory() +{ + return mChatHistory; +} + BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) { BOOL handled = FALSE; diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index e7b05a584b..1b4922fd73 100755 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -103,6 +103,8 @@ public: void restoreFloater(); void saveCollapsedState(); + LLView* getChatHistory(); + protected: // callback for click on any items of the visual states menu From e795fee86448970881066af95de7eac8e4847d14 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 17 May 2016 17:05:59 +0300 Subject: [PATCH 038/134] MAINT-6409 texture_list xml file should be in cache. --- indra/newview/llviewertexturelist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5cfd04b4c1..766164ebf8 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -182,7 +182,7 @@ void LLViewerTextureList::doPreloadImages() static std::string get_texture_list_name() { - return gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "texture_list_" + gSavedSettings.getString("LoginLocation") + ".xml"); + return gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "texture_list_" + gSavedSettings.getString("LoginLocation") + "." + gDirUtilp->getUserName() + ".xml"); } void LLViewerTextureList::doPrefetchImages() @@ -287,7 +287,7 @@ void LLViewerTextureList::shutdown() break; } - if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty()) + if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "").empty()) { std::string filename = get_texture_list_name(); llofstream file; From a382dcfb8dbc26fa7e73647bf996e9d166bfce6d Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 17 May 2016 10:52:59 -0700 Subject: [PATCH 039/134] maint-6413: use file write as printf inserts escape chars --- indra/newview/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5b39f622a6..34e1565707 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1310,13 +1310,14 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) # the viewer_version.txt file created here is for passing to viewer_manifest and autobuild # the summary.json file is created for the benefit of the TeamCity builds, where # it is used to provide descriptive information to the build results page -# channel added to summary.json for programmatic access to that by VMP SL-321 add_custom_target(generate_viewer_version ALL COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMAND printf '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel":"${VIEWER_CHANNEL}"}' > ${CMAKE_BINARY_DIR}/summary.json COMMENT Generating viewer_version.txt for manifest processing ) +#Channel added for VMP programmatic access. MAINT-6413/SL-321 +file(WRITE ${CMAKE_BINARY_DIR}/summary.json '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel","${VIEWER_CHANNEL}"}') + set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp PROPERTIES From e8773a72cb63f693b00100de4e02ab073f531b4f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 17 May 2016 16:05:37 -0700 Subject: [PATCH 040/134] maint-6413: use configure_file instead of write(file ...) --- indra/newview/CMakeLists.txt | 20 +++++++++++--------- indra/newview/summary.json.in | 5 +++++ 2 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 indra/newview/summary.json.in diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 34e1565707..c49321e906 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1307,16 +1307,10 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) -# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild -# the summary.json file is created for the benefit of the TeamCity builds, where -# it is used to provide descriptive information to the build results page -add_custom_target(generate_viewer_version ALL - COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMENT Generating viewer_version.txt for manifest processing - ) - #Channel added for VMP programmatic access. MAINT-6413/SL-321 -file(WRITE ${CMAKE_BINARY_DIR}/summary.json '{"Type":"viewer","Version":"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}","Channel","${VIEWER_CHANNEL}"}') +set(SUMMARY_VERSION "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") +set(SUMMARY_CHANNEL "${VIEWER_CHANNEL}") +configure_file(summary.json.in ${CMAKE_BINARY_DIR}/summary.json @ONLY) set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp @@ -1325,6 +1319,14 @@ set_source_files_properties( COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake ) +# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild +# the summary.json file is created for the benefit of the TeamCity builds, where +# it is used to provide descriptive information to the build results page +add_custom_target(generate_viewer_version ALL + COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMENT Generating viewer_version.txt for manifest processing + ) + if (DARWIN) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm) diff --git a/indra/newview/summary.json.in b/indra/newview/summary.json.in new file mode 100644 index 0000000000..e33cc2b7e7 --- /dev/null +++ b/indra/newview/summary.json.in @@ -0,0 +1,5 @@ +{ +"Type":"viewer", +"Version":"@SUMMARY_VERSION@", +"Channel":"@SUMMARY_CHANNEL@" +} From d3de134da047460c68ffd7cc732e592049a1e83d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 18 May 2016 17:17:32 +0300 Subject: [PATCH 041/134] MAINT-6409 invisiprims should be preloaded --- indra/llcommon/indra_constants.cpp | 4 ++++ indra/llcommon/indra_constants.h | 4 ++++ indra/newview/lldrawpoolterrain.cpp | 17 ++--------------- indra/newview/llviewertexturelist.cpp | 17 +++++++++++++++-- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp index f3989ee1d0..b45e3df1d8 100755 --- a/indra/llcommon/indra_constants.cpp +++ b/indra/llcommon/indra_constants.cpp @@ -60,6 +60,10 @@ const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On d const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver +const LLUUID IMG_ALPHA_GRAD ("e97cf410-8e61-7005-ec06-629eba4cd1fb"); // VIEWER +const LLUUID IMG_ALPHA_GRAD_2D ("38b86f85-2575-52a9-a531-23108d8da837"); // VIEWER +const LLUUID IMG_TRANSPARENT ("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); // VIEWER + const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER const LLUUID TERRAIN_GRASS_DETAIL ("63338ede-0037-c4fd-855b-015d77112fc8"); // VIEWER diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index 02f063f5e8..fda84aa5a8 100755 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -197,6 +197,10 @@ LL_COMMON_API extern const LLUUID IMG_SMOKE_POOF; LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_1; LL_COMMON_API extern const LLUUID IMG_BIG_EXPLOSION_2; +LL_COMMON_API extern const LLUUID IMG_ALPHA_GRAD; +LL_COMMON_API extern const LLUUID IMG_ALPHA_GRAD_2D; +LL_COMMON_API extern const LLUUID IMG_TRANSPARENT; + LL_COMMON_API extern const LLUUID IMG_BLOOM1; LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL; LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL; diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 33675bd261..b716a76543 100755 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -62,28 +62,15 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : LLFacePool(POOL_TERRAIN), mTexturep(texturep) { - U32 format = GL_ALPHA8; - U32 int_format = GL_ALPHA; - // Hack! sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale"); sDetailMode = gSavedSettings.getS32("RenderTerrainDetail"); - mAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", - FTT_LOCAL_FILE, - TRUE, LLGLTexture::BOOST_UI, - LLViewerTexture::FETCHED_TEXTURE, - format, int_format, - LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb")); + mAlphaRampImagep = LLViewerTextureManager::getFetchedTexture(IMG_ALPHA_GRAD); //gGL.getTexUnit(0)->bind(mAlphaRampImagep.get()); mAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP); - m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", - FTT_LOCAL_FILE, - TRUE, LLGLTexture::BOOST_UI, - LLViewerTexture::FETCHED_TEXTURE, - format, int_format, - LLUUID("38b86f85-2575-52a9-a531-23108d8da837")); + m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTexture(IMG_ALPHA_GRAD_2D); //gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get()); m2DAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 766164ebf8..5150fc9ade 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -171,13 +171,26 @@ void LLViewerTextureList::doPreloadImages() mImagePreloads.insert(image); } image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, - 0,0,LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")); + 0, 0, IMG_TRANSPARENT); if (image) { image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } - + image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, + GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_CLAMP); + mImagePreloads.insert(image); + } + image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, + GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD_2D); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_CLAMP); + mImagePreloads.insert(image); + } } static std::string get_texture_list_name() From 3d68b80bd3f981717ec60b4ba71de9e917a4d073 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 20 May 2016 16:55:46 +0300 Subject: [PATCH 042/134] MAINT-1057 Allow to close build floater via Build menu --- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0a492fb37b..b189d1038f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -806,7 +806,7 @@ + function="Build.EnabledOrActive" /> Date: Mon, 23 May 2016 12:25:27 +0300 Subject: [PATCH 043/134] MAINT-2583 Minimized floaters cannot brought back to foreground anymore --- indra/llui/llfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 14f75a2352..8a2e6a0bc0 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1326,7 +1326,7 @@ void LLFloater::setMinimized(BOOL minimize) } mMinimized = FALSE; - + setFrontmost(); // Reshape *after* setting mMinimized reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); } From efa716b5fcaa0f0faa4003e072747898a223e983 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 18 May 2016 19:29:31 +0300 Subject: [PATCH 044/134] MAINT-2129 "Block" button doesn't become disabled --- indra/llui/lltextbase.cpp | 24 +++++++++++++++++++ indra/llui/lltextbase.h | 3 +++ indra/llui/llurlaction.cpp | 10 ++++++++ indra/llui/llurlaction.h | 1 + indra/newview/llchathistory.cpp | 14 +++++++++-- indra/newview/llpanelprofile.cpp | 10 ++++++++ indra/newview/lltoastnotifypanel.cpp | 1 + .../skins/default/xui/en/menu_object_icon.xml | 15 ++++++++++-- .../default/xui/en/menu_url_objectim.xml | 7 ++++++ 9 files changed, 81 insertions(+), 4 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 616c42895c..3e4680de24 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -177,6 +177,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) : LLUICtrl(p, LLTextViewModelPtr(new LLTextViewModel)), mURLClickSignal(NULL), mIsFriendSignal(NULL), + mIsObjectBlockedSignal(NULL), mMaxTextByteLength( p.max_text_length ), mFont(p.font), mFontShadow(p.font_shadow), @@ -1942,6 +1943,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) registrar.add("Url.OpenExternal", boost::bind(&LLUrlAction::openURLExternal, url)); registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url, true)); registrar.add("Url.Block", boost::bind(&LLUrlAction::blockObject, url)); + registrar.add("Url.Unblock", boost::bind(&LLUrlAction::unblockObject, url)); registrar.add("Url.Teleport", boost::bind(&LLUrlAction::teleportToLocation, url)); registrar.add("Url.ShowProfile", boost::bind(&LLUrlAction::showProfile, url)); registrar.add("Url.AddFriend", boost::bind(&LLUrlAction::addFriend, url)); @@ -1968,6 +1970,19 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) removeFriendButton->setEnabled(isFriend); } } + + if (mIsObjectBlockedSignal) + { + bool is_blocked = *(*mIsObjectBlockedSignal)(LLUUID(LLUrlAction::getObjectId(url)), LLUrlAction::getObjectName(url)); + LLView* blockButton = mPopupMenu->getChild("block_object"); + LLView* unblockButton = mPopupMenu->getChild("unblock_object"); + + if (blockButton && unblockButton) + { + blockButton->setVisible(!is_blocked); + unblockButton->setVisible(is_blocked); + } + } if (mPopupMenu) { @@ -3022,6 +3037,15 @@ boost::signals2::connection LLTextBase::setIsFriendCallback(const is_friend_sign return mIsFriendSignal->connect(cb); } +boost::signals2::connection LLTextBase::setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb) +{ + if (!mIsObjectBlockedSignal) + { + mIsObjectBlockedSignal = new is_blocked_signal_t(); + } + return mIsObjectBlockedSignal->connect(cb); +} + // // LLTextSegment // diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index c6ce5efcb8..85641fd899 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -270,6 +270,7 @@ public: friend class LLUICtrlFactory; typedef boost::signals2::signal is_friend_signal_t; + typedef boost::signals2::signal is_blocked_signal_t; struct LineSpacingParams : public LLInitParam::ChoiceBlock { @@ -456,6 +457,7 @@ public: virtual void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo); boost::signals2::connection setURLClickedCallback(const commit_signal_t::slot_type& cb); boost::signals2::connection setIsFriendCallback(const is_friend_signal_t::slot_type& cb); + boost::signals2::connection setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb); void setWordWrap(bool wrap); LLScrollContainer* getScrollContainer() const { return mScroller; } @@ -685,6 +687,7 @@ protected: // Used to check if user with given ID is avatar's friend is_friend_signal_t* mIsFriendSignal; + is_blocked_signal_t* mIsObjectBlockedSignal; LLUIString mLabel; // text label that is visible when no user text provided }; diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index 56977c597b..84ea770a8d 100644 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -231,3 +231,13 @@ void LLUrlAction::blockObject(std::string url) executeSLURL("secondlife:///app/agent/" + object_id + "/block/" + LLURI::escape(object_name)); } } + +void LLUrlAction::unblockObject(std::string url) +{ + std::string object_id = getObjectId(url); + std::string object_name = getObjectName(url); + if (LLUUID::validate(object_id)) + { + executeSLURL("secondlife:///app/agent/" + object_id + "/unblock/" + object_name); + } +} diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 5497e28bb4..2d2a8dfef1 100644 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -83,6 +83,7 @@ public: static void addFriend(std::string url); static void removeFriend(std::string url); static void blockObject(std::string url); + static void unblockObject(std::string url); /// specify the callbacks to enable this class's functionality typedef boost::function url_callback_t; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 9564951986..5d2997688f 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -156,6 +156,10 @@ public: LLFloaterSidePanelContainer::showPanel("people", "panel_people", LLSD().with("people_panel_tab_name", "blocked_panel").with("blocked_to_select", getAvatarId())); } + else if (level == "unblock") + { + LLMuteList::getInstance()->remove(LLMute(getAvatarId(), mFrom, LLMute::OBJECT)); + } else if (level == "map") { std::string url = "secondlife://" + mObjectData["slurl"].asString(); @@ -169,10 +173,14 @@ public: } - bool onObjectIconContextMenuItemEnabled(const LLSD& userdata) + bool onObjectIconContextMenuItemVisible(const LLSD& userdata) { std::string level = userdata.asString(); if (level == "is_blocked") + { + return LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat); + } + else if (level == "not_blocked") { return !LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat); } @@ -285,7 +293,7 @@ public: registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2)); registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2)); registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2)); - registrar_enable.add("ObjectIcon.Enable", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemEnabled, this, _2)); + registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2)); LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandleAvatar = menu->getHandle(); @@ -730,6 +738,8 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) editor_params.trusted_content = false; mEditor = LLUICtrlFactory::create(editor_params, this); mEditor->setIsFriendCallback(LLAvatarActions::isFriend); + mEditor->setIsObjectBlockedCallback(boost::bind(&LLMuteList::isMuted, LLMuteList::getInstance(), _1, _2, 0)); + } LLSD LLChatHistory::getValue() const diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index e795e7eedb..184238c40c 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -176,6 +176,16 @@ public: return true; } + if (verb == "unblock") + { + if (params.size() > 2) + { + const std::string object_name = params[2].asString(); + LLMute mute(avatar_id, object_name, LLMute::OBJECT); + LLMuteList::getInstance()->remove(mute); + } + return true; + } return false; } }; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 1a8ade5b10..e3a856be5c 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -325,6 +325,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) mTextBox->setContentTrusted(is_content_trusted); mTextBox->setValue(mNotification->getMessage()); mTextBox->setIsFriendCallback(LLAvatarActions::isFriend); + mTextBox->setIsObjectBlockedCallback(boost::bind(&LLMuteList::isMuted, LLMuteList::getInstance(), _1, _2, 0)); // add buttons for a script notification if (mIsTip) diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index 93093014eb..5137aea72a 100644 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -23,8 +23,19 @@ - + + + + + + + Date: Wed, 18 May 2016 20:42:45 +0200 Subject: [PATCH 045/134] Apply changes from MAINT-6408 to FS-specific files --- indra/newview/skins/default/xui/en/panel_fs_login.xml | 2 +- indra/newview/skins/default/xui/en/panel_fs_nui_login.xml | 2 +- indra/newview/skins/latency/xui/en/panel_fs_login.xml | 2 +- indra/newview/skins/starlightcui/xui/en/panel_fs_login.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_fs_login.xml b/indra/newview/skins/default/xui/en/panel_fs_login.xml index 9fdccec641..cc04a44566 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_login.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_login.xml @@ -120,7 +120,7 @@ Date: Wed, 18 May 2016 20:54:24 +0200 Subject: [PATCH 046/134] Add installer string added as part of MAINT-6370 to all language files or the installer doesn't work. --- indra/newview/installers/windows/lang_da.nsi | Bin 8812 -> 9386 bytes indra/newview/installers/windows/lang_de.nsi | Bin 9698 -> 10354 bytes .../newview/installers/windows/lang_en-us.nsi | Bin 9670 -> 9666 bytes indra/newview/installers/windows/lang_es.nsi | Bin 9480 -> 10056 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 9760 -> 10334 bytes indra/newview/installers/windows/lang_it.nsi | Bin 9122 -> 9698 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7698 -> 8276 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 9360 -> 9940 bytes .../newview/installers/windows/lang_pt-br.nsi | Bin 9742 -> 10334 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 9082 -> 9664 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 9142 -> 9724 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 7826 -> 8416 bytes 12 files changed, 0 insertions(+), 0 deletions(-) diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 87cbb7878d8c190c73675c4ed7b0118eaa81c474..f9fd770307cc6c1630048af6ec7880ddb087b87a 100755 GIT binary patch delta 381 zcmaFkvdVLVmfYkhDVh2rhE#@hhD?THh7yJ%hDrtnhHRinC6KQG6v<#n1d5QQITL=-DsS#-gPq*>6)1BhamX3@gNChPvjVBCd7U1GCGu$Y6WcmX?G zy@E&B+QK)p7AoQYVcxuX`TqG#r@g16Sf`!Nq(VTB0yS<>p@HCvO2b;HTq5Hw-Yrn_ z6I|1svtxRnUcr!ez`&1bmNN3`z)Zm%Cj!Pi)xX@VP01n(h8RNTKVg_2M4Q^%UTPh) z{~Iu6-RNYYtB1*&z9#EwjdS9Z_+moMu0dL!IFbRJdOaZ2n2ufi%`~_Qx17lJV+-4=J^54OdOoK4sp&S>;`adnO}`q0|a P_oy9NPXA>uew_aXL2*~6 delta 12 Tcmewq@W^|Ei{j=h%JWzND&+;y diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index a06eebd47c72d39332e98b991f309f7c5b4a4055..83df5d4f8265f812f1eb04ba5fca31aa9c52d8bc 100755 GIT binary patch delta 19 bcmX@+eaL%*o8sgxEFzPHMK%{HhOhttP|XJH delta 36 rcmX@)eaw4RciGfVX2kTA+nyJ802Go(tP!7aJXyztL0EIwC zWC9HVIUx~j3DB^K4<#pGP~;H}0!kyh&l||EoP3{6o7sgSfAU0S>B-w<`0NuI3V<*N zXiPHL#hF0+^MJd(9BJg01APO z$OIY!azY~55};v|6*(j)8_4sB1_9-f9q0|@S56jW*PQGiCO7$*EZ<~32?=%F-mqs- zVTb{m4kjnR<<^V`c`%is0B9?2T_6{w0aa82JyHs!K><+))P?Rbh?g>fszB}s$)-&X P6cHE1@XzLpivBDB$|6sx delta 12 TcmcZ?u)t@-J;lv3Do!i_C<_Gx diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index 96da714f6cadc3a333dd43e5f588a2e3e6375e90..c823dc50991f0ab72422f9bb418acf2afb17d9c3 100755 GIT binary patch delta 407 zcmaKoI|>3Z6h$v+XJsJ@BN#*raS>Vw7K4R0S_l#~>fmQ&{4te_$PQeA;*MO2_hlMC zC?PN8eNOJprTy@)gOY7}#d8FMIRfmkM}!y(OJ-u;6*CKHM&+sjR$K~ecF$Rn{FuE8 z8%Bev+maJX=%x*s3P(;DoVcS8t}ZYoh=350pxq;c*{-VQdaS*Q^LdZ$&8w$c2yMOW zb!2+Y$BvGovE^EkHgUoORyL&nHrYT0L-x36yP4WZ>>E=4O^MzaJ7V$=Jms4b1@E>K V!-)#{&=51LbNTF-+q+-tr=M#LQ*i(Q delta 12 TcmaFly~uq-g#6|iie4-LCM*Q_ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 66ba4bf97e2df627aa3f6f5b7d3a122af44fad97..8d1dbe8c22beedf5300560011f9213cb7306e0dc 100755 GIT binary patch delta 410 zcmaJ-JBk896s*9+WMx2H2Sge)5n)fTpn;j0@qqMdI}Xn3GX9vzJJ^|c0wX~%cJJUd zyo2@HL=>f|H*~%CYN~queQxegzTFl|s{{riB1|zuf)olPGAZwh%n+JYxo(7*N8y*# zAv?nVa8_Z=YS4EOPE;mt+fY+s!3~2Ykv!aKaOZ*Nvky3xo fuRPO&TaU4Cfp0G4K_?hk?S1B-(&7t;qaS3h0@YRb delta 12 TcmccOFv(`a0m;owGC?c=BxMAX diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index c3d4106a49e753109f081533bb3b3101890205eb..30fc056ae1b4fb5c92cb86e0d625be97348bf11f 100755 GIT binary patch delta 452 zcmZ`#v1$TA5PgAEVv|A?PH`Y?soSB?|VP*!yD52`G;1Mi|p0c9( zA+ds((PA8~=9DD~-Ikn!9Xl-cylIKoG?-EfM-m;u1QC+?hf3sEt!nLq_5TA7_|N@! zt5fSzL@1VE%XiP-7@7Z#>IZ`r&w{L@uz({bCg%RKZ+O8cF-7c$<r)j tSrXeUJAeZq5o?JI8WS_f_+?gZfTS-%+{anG>e={&bgC-# zs_ONtI&~hs>%}v%TRFzim?6LhTf|79upp8!S48IU>6NVp2>BEucF$N5e8gUbCB4SP znqb1RveTNJ3VTjy9BAwhIKTEQ$YKwuL$d?6KasxyDe=pvm%YN_0=zk&u7KDCbHQysw`w Vo~n?;t}r$ELMi{X_5J9bohKy^RQ&(| delta 12 TcmcZ?(C4#Zg5u@}%5^LND7por diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 1cece26e38f6ddcf99444ce8fa481190460b892d..ea36af93a326e075478e5fce12b08940bccfa470 100755 GIT binary patch delta 408 zcmez6cEEdsiu~jNX_@*WhE#@hhD?THh7yJ%hDrtnhHRinC6KQG6v<#n1d+mrSTDhx3|HDGe`TQ1FbkoQx8rr^^Ba&HOVmg8XD1X_@*WhE#@hhD?THh7yJ%hDrtnhHRinC6KQG6v<#n1dO%K2#Iq1rfC4igq-*j;c2PkLzi#%IPiFxD$SG8m delta 12 Tcmez4z0G|?g8b%XieW4OD6|Dg diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index 266a42d91f8f740c578568aff8602bf94f9a1d8c..5378ad9de1eb6a17a782bfeb4db1f5de56578339 100755 GIT binary patch delta 402 zcmbPa`@nI7jMU^`Vlwqb45RciGfVX2kTA+nyJ802Go(tP!7aJXyztL0EIwC zWC9HVIUx~j3DB^~iW2JLK|ncV$9V(!K&MR>eQPThb delta 12 TcmaFhILUT{jMU~VnKBjtB6|di From 7c270c981ce981ea49acede3c99d933ae68a6701 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 18 May 2016 20:54:33 +0200 Subject: [PATCH 047/134] Update German translation --- indra/newview/skins/default/xui/de/notifications.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 05db128777..00dd258ca2 100755 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -1504,6 +1504,10 @@ Wählen Sie ein einzelnes Objekt aus und versuchen Sie es erneut. Alle Einwohner in dieser Region nach Hause teleportieren? + + Das Verringern des Objekt-Bonus nachdem bereits in einer Region gebaut wurde kann zur Folge haben, dass Objekte zurückgeschickt oder gelöscht werden. Sind Sie sicher, dass Sie den Onjekt-Bonus ändern möchten? + + Möchten Sie wirklich alle Objekte zurückgeben, die [USER_NAME] gehören? From 213bcf6bb30f9e2d4eb8bb6cbd200c94bae29b6f Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 19 May 2016 11:47:23 -0700 Subject: [PATCH 048/134] MAIN-6403: If a version mismatch occurs when requesting the COF, request a new appearance update from the simhost to update the viewer COF version. --- indra/newview/llappearancemgr.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index cc676550ab..6c510f13c8 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -60,6 +60,8 @@ #include "llcoros.h" #include "lleventcoro.h" +#include "llavatarpropertiesprocessor.h" + #if LL_MSVC // disable boost::lexical_cast warning #pragma warning (disable:4702) @@ -68,7 +70,7 @@ namespace { const S32 BAKE_RETRY_MAX_COUNT = 5; - const F32 BAKE_RETRY_TIMEOUT = 2.0F; + const F32 BAKE_RETRY_TIMEOUT = 4.0F; } // *TODO$: LLInventoryCallback should be deprecated to conform to the new boost::bind/coroutine model. @@ -3493,10 +3495,15 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro() // on multiple machines. if (result.has("expected")) { - S32 expectedCofVersion = result["expected"].asInteger(); LL_WARNS("Avatar") << "Server expected " << expectedCofVersion << " as COF version" << LL_ENDL; + // Force an update texture request for ourself. The message will return + // through the UDP and be handled in LLVOAvatar::processAvatarAppearance + // this should ensure that we receive a new canonical COF from the sim + // host. Hopefully it will return before the timeout. + LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(gAgent.getID()); + bRetry = true; // Wait for a 1/2 second before trying again. Just to keep from asking too quickly. if (++retryCount > BAKE_RETRY_MAX_COUNT) From 357f6d04edb354f12ae052f35c65cfd87ba4cb2d Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 20 May 2016 01:45:12 +0300 Subject: [PATCH 049/134] MAINT-6419 Show the release notes when first starting a new viewer --- indra/newview/app_settings/settings.xml | 11 +++++++ indra/newview/llappviewer.cpp | 33 +++++++++++++++++++ .../xui/en/panel_preferences_setup.xml | 12 +++++++ 3 files changed, 56 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4912f27e70..7bcbf819e4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13276,6 +13276,17 @@ Value 1 + UpdaterShowReleaseNotes + + Comment + Enables displaying of the Release notes in a web floater after update. + Persist + 1 + Type + Boolean + Value + 1 + UploadBakedTexOld Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6bc1f67e32..29680093f9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1220,6 +1220,8 @@ bool LLAppViewer::init() boost::bind(&LLControlGroup::getU32, boost::ref(gSavedSettings), _1), boost::bind(&LLControlGroup::declareU32, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_ALWAYS)); + showReleaseNotesIfRequired(); + return true; } @@ -5799,6 +5801,37 @@ void LLAppViewer::launchUpdater() // LLAppViewer::instance()->forceQuit(); } +/** +* Check if user is running a new version of the viewer. +* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting. +*/ +void LLAppViewer::showReleaseNotesIfRequired() +{ + if (!gLastRunVersion.empty() && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")) + { + try + { + boost::regex expr("(?[\\w\\s]+)\\s(?\\d+)\\.(?\\d+)\\.(?\\d+)\\.(?\\d+)", boost::regex::perl | boost::regex::icase); + boost::smatch matches; + if (boost::regex_search(gLastRunVersion, matches, expr)) + { + if (LLVersionInfo::getChannel() == matches["chan"] && // don't show Release Notes when changing a channel + (LLVersionInfo::getBuild() > std::stoi(matches["build"]) + || LLVersionInfo::getPatch() > std::stoi(matches["patch"]) + || LLVersionInfo::getMinor() > std::stoi(matches["min"]) + || LLVersionInfo::getMajor() > std::stoi(matches["maj"]))) + { + LLSD info(getViewerInfo()); + LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); + } + } + } + catch (boost::regex_error& e) + { + LL_WARNS() << "Can't parse previous run version, regex errpr: " << e.what() << LL_ENDL; + } + } +} //virtual void LLAppViewer::setMasterSystemAudioMute(bool mute) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 0b605cf6f7..c20f9b2c51 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -273,6 +273,18 @@ name="update_willing_to_test" width="400" top_pad="5"/> + Date: Fri, 20 May 2016 02:12:26 +0300 Subject: [PATCH 050/134] MAINT-6317 Restored the fix after a conflict resolution --- indra/newview/llviewertexturelist.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 93650ddb1a..d7080051da 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -191,6 +191,13 @@ void LLViewerTextureList::doPreloadImages() image->setAddressMode(LLTexUnit::TAM_CLAMP); mImagePreloads.insert(image); } + + LLPointer img_blak_square_tex(new LLImageRaw(2, 2, 3)); + memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize()); + LLPointer img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE)); + gBlackSquareID = img_blak_square->getID(); + img_blak_square->setUnremovable(TRUE); + addImage(img_blak_square, TEX_LIST_STANDARD); } static std::string get_texture_list_name() From 61a5c943ba33494e3d2ee60296e56932c7aa362a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 22 May 2016 20:32:27 +0200 Subject: [PATCH 051/134] MAINT-6432 Fix defaults for RenderAvatarMaxComplexity The 'all' section must be set to the value for high end machines as the minimum of high-end and recommended setting will be applied --- doc/contributions.txt | 1 + indra/newview/featuretable.txt | 2 +- indra/newview/featuretable_linux.txt | 2 +- indra/newview/featuretable_mac.txt | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 9b31e5032a..8fe04e2ff2 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -190,6 +190,7 @@ Ansariel Hiller STORM-2094 MAINT-5756 MAINT-4677 + MAINT-6432 Aralara Rajal Arare Chantilly CHUIBUG-191 diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index be8ea2bab9..e99b94f150 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -32,7 +32,7 @@ RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 -RenderAvatarMaxComplexity 1 80000 +RenderAvatarMaxComplexity 1 350000 RenderAvatarVP 1 1 RenderAutoMuteSurfaceAreaLimit 1 1000.0 RenderCubeMap 1 1 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index ca6c00951d..801a622e93 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -32,7 +32,7 @@ RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 -RenderAvatarMaxComplexity 1 80000 +RenderAvatarMaxComplexity 1 350000 RenderAvatarVP 1 1 RenderAutoMuteSurfaceAreaLimit 1 1000.0 RenderCubeMap 1 1 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index ea69b088f9..1f891ee4d7 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -32,7 +32,7 @@ RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxNonImpostors 1 16 -RenderAvatarMaxComplexity 1 80000 +RenderAvatarMaxComplexity 1 350000 RenderAvatarVP 1 1 RenderAutoMuteSurfaceAreaLimit 1 1000.0 RenderCubeMap 1 1 From 8edfdc617df6e282570521a9076d077699e632e5 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 23 May 2016 02:23:03 +0300 Subject: [PATCH 052/134] MAINT-6424 Disable the delete button for empty graphics presets list Fixed related notifications after improper merge as well --- indra/newview/llfloaterdeleteprefpreset.cpp | 2 ++ indra/newview/skins/default/xui/en/notifications.xml | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp index 7dedbbf984..c0888db3bc 100644 --- a/indra/newview/llfloaterdeleteprefpreset.cpp +++ b/indra/newview/llfloaterdeleteprefpreset.cpp @@ -53,6 +53,8 @@ BOOL LLFloaterDeletePrefPreset::postBuild() getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this)); LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this)); + onPresetsListChange(); // ensure that delete button is disabled when the list is empty + return TRUE; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 7eaeb6bd07..dfde38bc5f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8314,8 +8314,18 @@ Appearance has been saved to XML to [PATH] Failed to save appearance to XML. + + + +Error saving preset [NAME]. + + + Error deleting preset [NAME]. From ad7ee570f9195990235fc0dfd647a70d562a9399 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 23 May 2016 20:45:10 +0200 Subject: [PATCH 053/134] Transplant changes from MAINT-2129 to FSChatHistory --- indra/newview/fschathistory.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index cae95031cc..b118bab962 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -172,6 +172,10 @@ public: LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT)); LLPanelBlockedList::showPanelAndSelect(getAvatarId()); } + else if (level == "unblock") + { + LLMuteList::getInstance()->remove(LLMute(getAvatarId(), mFrom, LLMute::OBJECT)); + } else if (level == "map") { std::string url = "secondlife://" + mObjectData["slurl"].asString(); @@ -184,10 +188,14 @@ public: } } - bool onObjectIconContextMenuItemEnabled(const LLSD& userdata) + bool onObjectIconContextMenuItemVisible(const LLSD& userdata) { std::string level = userdata.asString(); if (level == "is_blocked") + { + return LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat); + } + else if (level == "not_blocked") { return !LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat); } @@ -320,7 +328,7 @@ public: registrar.add("AvatarIcon.Action", boost::bind(&FSChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2)); registrar_enable.add("AvatarIcon.Check", boost::bind(&FSChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2)); registrar.add("ObjectIcon.Action", boost::bind(&FSChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2)); - registrar_enable.add("ObjectIcon.Enable", boost::bind(&FSChatHistoryHeader::onObjectIconContextMenuItemEnabled, this, _2)); + registrar_enable.add("ObjectIcon.Visible", boost::bind(&FSChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2)); LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandleAvatar = menu->getHandle(); @@ -854,7 +862,9 @@ FSChatHistory::FSChatHistory(const FSChatHistory::Params& p) mScrollToBottom(false), mUnreadChatSources(0) { - mLineSpacingPixels=llclamp(gSavedSettings.getS32("FSFontChatLineSpacingPixels"),0,36); + mLineSpacingPixels = llclamp(gSavedSettings.getS32("FSFontChatLineSpacingPixels"), 0, 36); + + setIsObjectBlockedCallback(boost::bind(&LLMuteList::isMuted, LLMuteList::getInstance(), _1, _2, 0)); } LLSD FSChatHistory::getValue() const From 7a80f61218e229cb2379fe0fbdd11f807b14495f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 23 May 2016 20:45:24 +0200 Subject: [PATCH 054/134] Update German translation --- indra/newview/skins/default/xui/de/menu_object_icon.xml | 3 ++- indra/newview/skins/default/xui/de/menu_url_objectim.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/de/menu_object_icon.xml b/indra/newview/skins/default/xui/de/menu_object_icon.xml index f92fa0f82b..db8bb74705 100644 --- a/indra/newview/skins/default/xui/de/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/de/menu_object_icon.xml @@ -1,7 +1,8 @@ - + + diff --git a/indra/newview/skins/default/xui/de/menu_url_objectim.xml b/indra/newview/skins/default/xui/de/menu_url_objectim.xml index fc01ea8444..788b9e62cf 100644 --- a/indra/newview/skins/default/xui/de/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/de/menu_url_objectim.xml @@ -2,6 +2,7 @@ + From 8c458778717666c7be7c6e0f0b19f28deb54b50f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 12:05:53 -0700 Subject: [PATCH 055/134] backout 354345 --- indra/newview/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c49321e906..334a21a12e 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1307,10 +1307,9 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) -#Channel added for VMP programmatic access. MAINT-6413/SL-321 -set(SUMMARY_VERSION "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") -set(SUMMARY_CHANNEL "${VIEWER_CHANNEL}") -configure_file(summary.json.in ${CMAKE_BINARY_DIR}/summary.json @ONLY) +# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild +# the summary.json file is created for the benefit of the TeamCity builds, where +# it is used to provide descriptive information to the build results page set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp From 9c28c06f1da98ba42d4d5546a2b2cdb7b042c13e Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 12:08:59 -0700 Subject: [PATCH 056/134] backout 354346 / e63c00cf654a and 354347 / e4bfe3ee05a6 --- indra/newview/CMakeLists.txt | 13 +++++-------- indra/newview/summary.json.in | 5 ----- 2 files changed, 5 insertions(+), 13 deletions(-) delete mode 100644 indra/newview/summary.json.in diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 334a21a12e..4412b06d38 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1310,6 +1310,11 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) # the viewer_version.txt file created here is for passing to viewer_manifest and autobuild # the summary.json file is created for the benefit of the TeamCity builds, where # it is used to provide descriptive information to the build results page +add_custom_target(generate_viewer_version ALL + COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMENT Generating viewer_version.txt for manifest processing + ) + set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp @@ -1318,14 +1323,6 @@ set_source_files_properties( COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake ) -# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild -# the summary.json file is created for the benefit of the TeamCity builds, where -# it is used to provide descriptive information to the build results page -add_custom_target(generate_viewer_version ALL - COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMENT Generating viewer_version.txt for manifest processing - ) - if (DARWIN) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm) diff --git a/indra/newview/summary.json.in b/indra/newview/summary.json.in deleted file mode 100644 index e33cc2b7e7..0000000000 --- a/indra/newview/summary.json.in +++ /dev/null @@ -1,5 +0,0 @@ -{ -"Type":"viewer", -"Version":"@SUMMARY_VERSION@", -"Channel":"@SUMMARY_CHANNEL@" -} From 999a949b52b50d5330c717fde19af3931e256f11 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 13:49:26 -0700 Subject: [PATCH 057/134] debug version args --- indra/newview/CMakeLists.txt | 9 +-------- indra/newview/viewer_manifest.py | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4412b06d38..6734f62137 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1307,14 +1307,7 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) -# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild -# the summary.json file is created for the benefit of the TeamCity builds, where -# it is used to provide descriptive information to the build results page -add_custom_target(generate_viewer_version ALL - COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - COMMENT Generating viewer_version.txt for manifest processing - ) - +#summary.json creation moved to viewer_manifest.py MAINT-6413 set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1c77cf805e..6365de0024 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -122,6 +122,9 @@ class ViewerManifest(LLManifest): settings_install['CmdLineGridChoice']['Value'] = self.grid() print "Set CmdLineGridChoice in settings_install.xml to '%s'" % self.grid() + #COYOT: channel: self.channel_with_pkg_suffix() + print "COYOT: version %s" % '.'.join(self.args['version']) + # put_in_file(src=) need not be an actual pathname; it # only needs to be non-empty self.put_in_file(llsd.format_pretty_xml(settings_install), From c7413e51b6286a003d6629108d2757b5ff973c2b Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 23 May 2016 14:40:43 -0700 Subject: [PATCH 058/134] MAINT-6403: in the case of a version mismatch between the viewer's local accounting and the AIS reported. Override with the AIS version. simplify the appearance update code to account for new versioning. Fix spelling of descendant --- indra/newview/llaisapi.cpp | 18 ++++++--- indra/newview/llappearancemgr.h | 2 + indra/newview/llavatarrendernotifier.cpp | 7 ++-- indra/newview/llvoavatar.cpp | 47 ++++++++++++++++++++---- 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 3e3d5c7456..98a2bb436c 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -838,11 +838,11 @@ void AISUpdate::parseEmbeddedCategories(const LLSD& categories) void AISUpdate::doUpdate() { - // Do version/descendent accounting. + // Do version/descendant accounting. for (std::map::const_iterator catit = mCatDescendentDeltas.begin(); catit != mCatDescendentDeltas.end(); ++catit) { - LL_DEBUGS("Inventory") << "descendent accounting for " << catit->first << LL_ENDL; + LL_DEBUGS("Inventory") << "descendant accounting for " << catit->first << LL_ENDL; const LLUUID cat_id(catit->first); // Don't account for update if we just created this category. @@ -859,13 +859,13 @@ void AISUpdate::doUpdate() continue; } - // If we have a known descendent count, set that now. + // If we have a known descendant count, set that now. LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); if (cat) { S32 descendent_delta = catit->second; S32 old_count = cat->getDescendentCount(); - LL_DEBUGS("Inventory") << "Updating descendent count for " + LL_DEBUGS("Inventory") << "Updating descendant count for " << cat->getName() << " " << cat_id << " with delta " << descendent_delta << " from " << old_count << " to " << (old_count+descendent_delta) << LL_ENDL; @@ -896,7 +896,7 @@ void AISUpdate::doUpdate() LLUUID category_id(update_it->first); LLPointer new_category = update_it->second; // Since this is a copy of the category *before* the accounting update, above, - // we need to transfer back the updated version/descendent count. + // we need to transfer back the updated version/descendant count. LLViewerInventoryCategory* curr_cat = gInventory.getCategory(new_category->getUUID()); if (!curr_cat) { @@ -961,7 +961,13 @@ void AISUpdate::doUpdate() { LL_WARNS() << "Possible version mismatch for category " << cat->getName() << ", viewer version " << cat->getVersion() - << " server version " << version << LL_ENDL; + << " AIS version " << version << " !!!Adjusting local version!!!" << LL_ENDL; + + // the AIS version should be considered the true version. Adjust + // our local category model to reflect this version number. Otherwise + // it becomes possible to get stuck with the viewer being out of + // sync with the inventory system. + cat->setVersion(version); } } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index bf181cb4ad..f401df0949 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -36,6 +36,8 @@ #include "llviewerinventory.h" #include "llcorehttputil.h" +#define APPEARANCEBAKE_AS_IN_AIS_QUEUE 1 + class LLWearableHoldingPattern; class LLInventoryCallback; class LLOutfitUnLockTimer; diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp index a13e142e16..e2ffdec874 100644 --- a/indra/newview/llavatarrendernotifier.cpp +++ b/indra/newview/llavatarrendernotifier.cpp @@ -63,7 +63,7 @@ mLatestAgentComplexity(0), mLatestOverLimitPct(0.0f), mShowOverLimitAgents(false), mNotifyOutfitLoading(false), -mLastCofVersion(-1), +mLastCofVersion(LLViewerInventoryCategory::VERSION_UNKNOWN), mLastOutfitRezStatus(-1), mLastSkeletonSerialNum(-1) { @@ -207,8 +207,9 @@ void LLAvatarRenderNotifier::updateNotificationState() mLastSkeletonSerialNum = gAgentAvatarp->mLastSkeletonSerialNum; } else if (mLastCofVersion >= 0 - && (mLastCofVersion != gAgentAvatarp->mLastUpdateRequestCOFVersion - || mLastSkeletonSerialNum != gAgentAvatarp->mLastSkeletonSerialNum)) +// && (mLastCofVersion != gAgentAvatarp->mLastUpdateRequestCOFVersion // RIDER: Check this! + && (mLastCofVersion != LLAppearanceMgr::instance().getCOFVersion() + || mLastSkeletonSerialNum != gAgentAvatarp->mLastSkeletonSerialNum)) { // version mismatch in comparison to previous outfit - outfit changed mNotifyOutfitLoading = true; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b9dd43f061..2a91d47868 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7313,7 +7313,6 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32 //----------------------------------------------------------------------------- void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { - static S32 largestSelfCOFSeen(LLViewerInventoryCategory::VERSION_UNKNOWN); LL_DEBUGS("Avatar") << "starts" << LL_ENDL; bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"); @@ -7348,6 +7347,36 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } + S32 thisAppearanceVersion(contents.mCOFVersion); + if (isSelf()) + { // In the past this was considered to be the canonical COF version, + // that is no longer the case. The canonical version is maintained + // by the AIS code and should match the COF version there. Even so, + // we must prevent rolling this one backwards backwards or processing + // stale versions. + + S32 aisCOFVersion(LLAppearanceMgr::instance().getCOFVersion()); + + LL_INFOS("Avatar") << "handling self appearance message #" << thisAppearanceVersion << + " (highest seen #" << mLastUpdateReceivedCOFVersion << + ") (AISCOF=#" << aisCOFVersion << ")" << LL_ENDL; + + if (mLastUpdateReceivedCOFVersion >= thisAppearanceVersion) + { + LL_WARNS("Avatar") << "Stale appearance received #" << thisAppearanceVersion << + " attempt to roll back from #" << mLastUpdateReceivedCOFVersion << + "... dropping." << LL_ENDL; + return; + } + if (isEditingAppearance()) + { + LL_DEBUGS("Avatar") << "Editing appearance. Dropping appearance update." << LL_ENDL; + return; + } + + } + +#if 0 S32 this_update_cof_version = contents.mCOFVersion; S32 last_update_request_cof_version = mLastUpdateRequestCOFVersion; @@ -7385,6 +7414,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) LL_DEBUGS("Avatar") << "ignoring appearance message while in appearance edit" << LL_ENDL; return; } +#endif // SUNSHINE CLEANUP - is this case OK now? S32 num_params = contents.mParamWeights.size(); @@ -7399,13 +7429,16 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } // No backsies zone - if we get here, the message should be valid and usable, will be processed. - LL_INFOS("Avatar") << "Processing appearance message version " << this_update_cof_version << LL_ENDL; + LL_INFOS("Avatar") << "Processing appearance message version " << thisAppearanceVersion << LL_ENDL; - // Note: - // RequestAgentUpdateAppearanceResponder::onRequestRequested() - // assumes that cof version is only updated with server-bake - // appearance messages. - mLastUpdateReceivedCOFVersion = this_update_cof_version; + if (isSelf()) + { + // Note: + // RequestAgentUpdateAppearanceResponder::onRequestRequested() + // assumes that cof version is only updated with server-bake + // appearance messages. + mLastUpdateReceivedCOFVersion = thisAppearanceVersion; + } if (applyParsedTEMessage(contents.mTEContents) > 0 && isChanged(TEXTURE)) { From ce760e80c492d1c3e13306a1d06aa734b4d829a9 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 24 May 2016 11:43:57 -0700 Subject: [PATCH 059/134] MAINT-6413: write summary.json from viewer_manifest.py, remove facility from cmake --- indra/newview/CMakeLists.txt | 5 +++++ indra/newview/viewer_manifest.py | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6734f62137..64b7ff34f6 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1308,6 +1308,11 @@ set(viewer_HEADER_FILES source_group("CMake Rules" FILES ViewerInstall.cmake) #summary.json creation moved to viewer_manifest.py MAINT-6413 +# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild +add_custom_target(generate_viewer_version ALL + COMMAND printf '${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}' > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + COMMENT Generating viewer_version.txt for manifest processing + ) set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 6365de0024..f3d89bb866 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -30,6 +30,7 @@ import sys import os.path import shutil import errno +import json import re import tarfile import time @@ -122,9 +123,6 @@ class ViewerManifest(LLManifest): settings_install['CmdLineGridChoice']['Value'] = self.grid() print "Set CmdLineGridChoice in settings_install.xml to '%s'" % self.grid() - #COYOT: channel: self.channel_with_pkg_suffix() - print "COYOT: version %s" % '.'.join(self.args['version']) - # put_in_file(src=) need not be an actual pathname; it # only needs to be non-empty self.put_in_file(llsd.format_pretty_xml(settings_install), @@ -184,9 +182,16 @@ class ViewerManifest(LLManifest): self.path("*.tga") self.end_prefix("local_assets") - # Files in the newview/ directory + # File in the newview/ directory self.path("gpu_table.txt") - # The summary.json file gets left in the build directory by newview/CMakeLists.txt. + + #summary.json. Standard with exception handling is fine. If we can't open a new file for writing, we have worse problems + summary_dict = {"Type":"viewer","Version":'.'.join(self.args['version']),"Channel":self.channel_with_pkg_suffix()} + with open(os.path.join(os.pardir,'summary.json'), 'w') as summary_handle: + json.dump(summary_dict,summary_handle) + + #we likely no longer need the test, since we will throw an exception above, but belt and suspenders and we get the + #return code for free. if not self.path2basename(os.pardir, "summary.json"): print "No summary.json file" From 6f4d9a232175202f79ecd1c1a2df30805de4e2d8 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 25 May 2016 03:29:53 +0300 Subject: [PATCH 060/134] MAINT-6424 Reverted disabling of the "Delete preset" button --- indra/newview/llfloaterdeleteprefpreset.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp index c0888db3bc..7dedbbf984 100644 --- a/indra/newview/llfloaterdeleteprefpreset.cpp +++ b/indra/newview/llfloaterdeleteprefpreset.cpp @@ -53,8 +53,6 @@ BOOL LLFloaterDeletePrefPreset::postBuild() getChild("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this)); LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this)); - onPresetsListChange(); // ensure that delete button is disabled when the list is empty - return TRUE; } From 110c0658b7272a09f09fa3d8b024062bf2cc4dce Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 25 May 2016 03:47:23 +0300 Subject: [PATCH 061/134] MAINT-6413 Buildfix --- indra/newview/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e80b428f80..dce0ea73cd 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1319,7 +1319,6 @@ source_group("CMake Rules" FILES ViewerInstall.cmake) # the viewer_version.txt file created here is for passing to viewer_manifest and autobuild file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n") - "{\"Type\":\"viewer\",\"Version\":\"${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\"}\n") set_source_files_properties( llversioninfo.cpp tests/llversioninfo_test.cpp From fb598cd380b38714abed554b8feacabfc55b2aaa Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 25 May 2016 12:39:27 +0300 Subject: [PATCH 062/134] MAINT-2583 Minimized floaters cannot brought back to foreground anymore --- indra/llui/llfloater.cpp | 14 ++++++++++---- indra/llui/llfloater.h | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 8a2e6a0bc0..5ea9f5b6cc 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1575,6 +1575,7 @@ BOOL LLFloater::handleMouseDown(S32 x, S32 y, MASK mask) if(offerClickToButton(x, y, mask, BUTTON_TEAR_OFF)) return TRUE; if(offerClickToButton(x, y, mask, BUTTON_DOCK)) return TRUE; + setFrontmost(TRUE, FALSE); // Otherwise pass to drag handle for movement return mDragHandle->handleMouseDown(x, y, mask); } @@ -1649,7 +1650,7 @@ void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key) } } -void LLFloater::setFrontmost(BOOL take_focus) +void LLFloater::setFrontmost(BOOL take_focus, BOOL restore) { LLMultiFloater* hostp = getHost(); if (hostp) @@ -1665,7 +1666,7 @@ void LLFloater::setFrontmost(BOOL take_focus) LLFloaterView * parent = dynamic_cast( getParent() ); if (parent) { - parent->bringToFront(this, take_focus); + parent->bringToFront(this, take_focus, restore); } // Make sure to set the appropriate transparency type (STORM-732). @@ -2394,7 +2395,7 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF } -void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) +void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore) { if (!child) return; @@ -2478,7 +2479,12 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) { sendChildToFront(child); } - child->setMinimized(FALSE); + + if(restore) + { + child->setMinimized(FALSE); + } + if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) { child->setFocus(TRUE); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index ef7c6180d2..165f67499b 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -310,7 +310,7 @@ public: /*virtual*/ void setVisible(BOOL visible); // do not override /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); // do not override - void setFrontmost(BOOL take_focus = TRUE); + void setFrontmost(BOOL take_focus = TRUE, BOOL restore = TRUE); virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); // Defaults to false. @@ -547,7 +547,7 @@ public: void setCycleMode(BOOL mode) { mFocusCycleMode = mode; } BOOL getCycleMode() const { return mFocusCycleMode; } - void bringToFront( LLFloater* child, BOOL give_focus = TRUE ); + void bringToFront( LLFloater* child, BOOL give_focus = TRUE, BOOL restore = TRUE ); void highlightFocusedFloater(); void unhighlightFocusedFloater(); void focusFrontFloater(); From 67f8d57927f845cfb35783a1678c0e3d2ad51b61 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 24 May 2016 15:17:41 +0300 Subject: [PATCH 063/134] MAINT-6216 avatars are sometimes invisible BUG-10330 Sitting avatars are sometimes invisible --- indra/newview/llvoavatar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 672d153e51..cdc7e20c2c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8145,6 +8145,7 @@ U32 LLVOAvatar::getPartitionType() const //static void LLVOAvatar::updateImpostors() { + LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; LLCharacter::sAllowInstancesChange = FALSE; for (std::vector::iterator iter = LLCharacter::sInstances.begin(); From 0318e3616702b19c088f4cd6138b768d45b7ef11 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 24 May 2016 21:59:58 +0300 Subject: [PATCH 064/134] MAINT-6419 Simplified the version check + buildfix --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llappviewer.cpp | 25 +++---------------------- indra/newview/llappviewer.h | 2 ++ 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7bcbf819e4..57a9db9337 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13285,7 +13285,7 @@ Type Boolean Value - 1 + 1 UploadBakedTexOld diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 29680093f9..acbcb4f8b7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5807,29 +5807,10 @@ void LLAppViewer::launchUpdater() */ void LLAppViewer::showReleaseNotesIfRequired() { - if (!gLastRunVersion.empty() && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")) + if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")) { - try - { - boost::regex expr("(?[\\w\\s]+)\\s(?\\d+)\\.(?\\d+)\\.(?\\d+)\\.(?\\d+)", boost::regex::perl | boost::regex::icase); - boost::smatch matches; - if (boost::regex_search(gLastRunVersion, matches, expr)) - { - if (LLVersionInfo::getChannel() == matches["chan"] && // don't show Release Notes when changing a channel - (LLVersionInfo::getBuild() > std::stoi(matches["build"]) - || LLVersionInfo::getPatch() > std::stoi(matches["patch"]) - || LLVersionInfo::getMinor() > std::stoi(matches["min"]) - || LLVersionInfo::getMajor() > std::stoi(matches["maj"]))) - { - LLSD info(getViewerInfo()); - LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); - } - } - } - catch (boost::regex_error& e) - { - LL_WARNS() << "Can't parse previous run version, regex errpr: " << e.what() << LL_ENDL; - } + LLSD info(getViewerInfo()); + LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); } } diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index b5e674bd7b..07bef11dbc 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -254,6 +254,8 @@ private: void sendLogoutRequest(); void disconnectViewer(); + + void showReleaseNotesIfRequired(); // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. From 26b1c020c8a8d240144dadae1285c14213cb1232 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 24 May 2016 13:03:36 -0700 Subject: [PATCH 065/134] MAINT-6403: Updated a couple comments and dropped a couple warning levels back down to DEBUG. --- indra/newview/llaisapi.cpp | 5 ++- indra/newview/llappearancemgr.cpp | 17 +------- indra/newview/llappearancemgr.h | 6 --- indra/newview/llavatarrendernotifier.cpp | 1 - indra/newview/llvoavatar.cpp | 51 +++--------------------- 5 files changed, 11 insertions(+), 69 deletions(-) diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 98a2bb436c..648212177b 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -966,7 +966,10 @@ void AISUpdate::doUpdate() // the AIS version should be considered the true version. Adjust // our local category model to reflect this version number. Otherwise // it becomes possible to get stuck with the viewer being out of - // sync with the inventory system. + // sync with the inventory system. Under normal circumstances + // inventory COF is maintained on the viewer through calls to + // LLInventoryModel::accountForUpdate when a changing operation + // is performed. This occasionally gets out of sync however. cat->setVersion(version); } } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 6c510f13c8..a1d9786321 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -70,7 +70,7 @@ namespace { const S32 BAKE_RETRY_MAX_COUNT = 5; - const F32 BAKE_RETRY_TIMEOUT = 4.0F; + const F32 BAKE_RETRY_TIMEOUT = 2.0F; } // *TODO$: LLInventoryCallback should be deprecated to conform to the new boost::bind/coroutine model. @@ -3361,15 +3361,9 @@ void LLAppearanceMgr::requestServerAppearanceUpdate() { if (!mOutstandingAppearanceBakeRequest) { -#ifdef APPEARANCEBAKE_AS_IN_AIS_QUEUE mRerequestAppearanceBake = false; LLCoprocedureManager::CoProcedure_t proc = boost::bind(&LLAppearanceMgr::serverAppearanceUpdateCoro, this, _1); LLCoprocedureManager::instance().enqueueCoprocedure("AIS", "LLAppearanceMgr::serverAppearanceUpdateCoro", proc); -#else - LLCoros::instance().launch("serverAppearanceUpdateCoro", - boost::bind(&LLAppearanceMgr::serverAppearanceUpdateCoro, this)); - -#endif } else { @@ -3377,17 +3371,8 @@ void LLAppearanceMgr::requestServerAppearanceUpdate() } } -#ifdef APPEARANCEBAKE_AS_IN_AIS_QUEUE void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter) -#else -void LLAppearanceMgr::serverAppearanceUpdateCoro() -#endif { -#ifndef APPEARANCEBAKE_AS_IN_AIS_QUEUE - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("serverAppearanceUpdateCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID)); -#endif - mRerequestAppearanceBake = false; if (!gAgent.getRegion()) { diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index f401df0949..7069da7352 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -36,8 +36,6 @@ #include "llviewerinventory.h" #include "llcorehttputil.h" -#define APPEARANCEBAKE_AS_IN_AIS_QUEUE 1 - class LLWearableHoldingPattern; class LLInventoryCallback; class LLOutfitUnLockTimer; @@ -230,11 +228,7 @@ public: private: -#ifdef APPEARANCEBAKE_AS_IN_AIS_QUEUE void serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter); -#else - void serverAppearanceUpdateCoro(); -#endif static void debugAppearanceUpdateCOF(const LLSD& content); diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp index e2ffdec874..24934fdb73 100644 --- a/indra/newview/llavatarrendernotifier.cpp +++ b/indra/newview/llavatarrendernotifier.cpp @@ -207,7 +207,6 @@ void LLAvatarRenderNotifier::updateNotificationState() mLastSkeletonSerialNum = gAgentAvatarp->mLastSkeletonSerialNum; } else if (mLastCofVersion >= 0 -// && (mLastCofVersion != gAgentAvatarp->mLastUpdateRequestCOFVersion // RIDER: Check this! && (mLastCofVersion != LLAppearanceMgr::instance().getCOFVersion() || mLastSkeletonSerialNum != gAgentAvatarp->mLastSkeletonSerialNum)) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 2a91d47868..672d153e51 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7357,7 +7357,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) S32 aisCOFVersion(LLAppearanceMgr::instance().getCOFVersion()); - LL_INFOS("Avatar") << "handling self appearance message #" << thisAppearanceVersion << + LL_DEBUGS("Avatar") << "handling self appearance message #" << thisAppearanceVersion << " (highest seen #" << mLastUpdateReceivedCOFVersion << ") (AISCOF=#" << aisCOFVersion << ")" << LL_ENDL; @@ -7376,46 +7376,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } -#if 0 - S32 this_update_cof_version = contents.mCOFVersion; - S32 last_update_request_cof_version = mLastUpdateRequestCOFVersion; - - if( isSelf() ) - { - LL_DEBUGS("Avatar") << "this_update_cof_version " << this_update_cof_version - << " last_update_request_cof_version " << last_update_request_cof_version - << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << LL_ENDL; - - if (largestSelfCOFSeen > this_update_cof_version) - { - LL_WARNS("Avatar") << "Already processed appearance for COF version " << - largestSelfCOFSeen << ", discarding appearance with COF " << this_update_cof_version << LL_ENDL; - return; - } - largestSelfCOFSeen = this_update_cof_version; - - } - else - { - LL_DEBUGS("Avatar") << "appearance message received" << LL_ENDL; - } - - // Check for stale update. - if (isSelf() - && (this_update_cof_version < last_update_request_cof_version)) - { - LL_WARNS() << "Stale appearance update, wanted version " << last_update_request_cof_version - << ", got " << this_update_cof_version << LL_ENDL; - return; - } - - if (isSelf() && isEditingAppearance()) - { - LL_DEBUGS("Avatar") << "ignoring appearance message while in appearance edit" << LL_ENDL; - return; - } -#endif - // SUNSHINE CLEANUP - is this case OK now? S32 num_params = contents.mParamWeights.size(); if (num_params <= 1) @@ -7434,9 +7394,10 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) if (isSelf()) { // Note: - // RequestAgentUpdateAppearanceResponder::onRequestRequested() - // assumes that cof version is only updated with server-bake - // appearance messages. + // locally the COF is maintained via LLInventoryModel::accountForUpdate + // which is called from various places. This should match the simhost's + // idea of what the COF version is. AIS however maintains its own version + // of the COF that should be considered canonical. mLastUpdateReceivedCOFVersion = thisAppearanceVersion; } @@ -7561,7 +7522,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) // Got an update for some other avatar // Ignore updates for self, because we have a more authoritative value in the preferences. setHoverOffset(contents.mHoverOffset); - LL_INFOS("Avatar") << avString() << "setting hover to " << contents.mHoverOffset[2] << LL_ENDL; + LL_DEBUGS("Avatar") << avString() << "setting hover to " << contents.mHoverOffset[2] << LL_ENDL; } if (!contents.mHoverOffsetWasSet && !isSelf()) From 757414afb892122a4aca6dd1d694b4fd6083a698 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 25 May 2016 17:20:13 +0300 Subject: [PATCH 066/134] Updated contributions.txt --- doc/contributions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index 9b31e5032a..b7690e96f7 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -190,6 +190,7 @@ Ansariel Hiller STORM-2094 MAINT-5756 MAINT-4677 + MAINT-6300 Aralara Rajal Arare Chantilly CHUIBUG-191 From 7d54c62016c1362fc0f5fd69acda58c61aed5b76 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 25 May 2016 20:37:52 +0300 Subject: [PATCH 067/134] MAINT-6397 cut items should not go to trash --- doc/contributions.txt | 1 + indra/llui/llfolderviewitem.cpp | 23 ++++++++++++++++++++++- indra/llui/llfolderviewitem.h | 8 ++++++-- indra/llui/llfolderviewmodel.h | 1 + indra/newview/llinventorybridge.cpp | 14 +++++++++++--- indra/newview/llinventorybridge.h | 1 + indra/newview/llinventoryfilter.cpp | 17 +++++------------ 7 files changed, 47 insertions(+), 18 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index b7690e96f7..bb4d0b1f6e 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -191,6 +191,7 @@ Ansariel Hiller MAINT-5756 MAINT-4677 MAINT-6300 + MAINT-6397 Aralara Rajal Arare Chantilly CHUIBUG-191 diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 5eb5ca4f82..14a07d0e90 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -127,6 +127,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mIsSelected( FALSE ), mIsCurSelection( FALSE ), mSelectPending(FALSE), + mIsItemCut(false), + mCutGeneration(0), mLabelStyle( LLFontGL::NORMAL ), mHasVisibleChildren(FALSE), mIsFolderComplete(true), @@ -694,6 +696,19 @@ void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const L return mIsCurSelection; } +/*virtual*/ bool LLFolderViewItem::isFadeItem() +{ + LLClipboard& clipboard = LLClipboard::instance(); + if (mCutGeneration != clipboard.getGeneration()) + { + mCutGeneration = clipboard.getGeneration(); + mIsItemCut = clipboard.isCutMode() + && ((getParentFolder() && getParentFolder()->isFadeItem()) + || getViewModelItem()->isCutToClipboard()); + } + return mIsItemCut; +} + void LLFolderViewItem::drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &selectColor, const LLUIColor &flashColor, const LLUIColor &focusOutlineColor, const LLUIColor &mouseOverColor) { @@ -875,6 +890,12 @@ void LLFolderViewItem::draw() } LLColor4 color = (mIsSelected && filled) ? mFontHighlightColor : mFontColor; + + if (isFadeItem()) + { + // Fade out item color to indicate it's being cut + color.mV[VALPHA] *= 0.5f; + } drawLabel(font, text_left, y, color, right_x); //--------------------------------------------------------------------------------// @@ -882,7 +903,7 @@ void LLFolderViewItem::draw() // if (!mLabelSuffix.empty()) { - font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, + font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : sSuffixColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE ); } diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 0322c8836d..61c39e0175 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -121,8 +121,11 @@ protected: mIsMouseOverTitle, mAllowWear, mAllowDrop, - mSelectPending; - + mSelectPending, + mIsItemCut; + + S32 mCutGeneration; + LLUIColor mFontColor; LLUIColor mFontHighlightColor; @@ -145,6 +148,7 @@ protected: virtual void addFolder(LLFolderViewFolder*) { } virtual bool isHighlightAllowed(); virtual bool isHighlightActive(); + virtual bool isFadeItem(); virtual bool isFlashing() { return false; } virtual void setFlashState(bool) { } diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index a395af537a..641241a88c 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -173,6 +173,7 @@ public: virtual BOOL isItemCopyable() const = 0; virtual BOOL copyToClipboard() const = 0; virtual BOOL cutToClipboard() = 0; + virtual bool isCutToClipboard() { return false; }; virtual BOOL isClipboardPasteable() const = 0; virtual void pasteFromClipboard() = 0; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 26c9b40fb1..f4bf38f65d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -286,6 +286,16 @@ BOOL LLInvFVBridge::cutToClipboard() return FALSE; } +// virtual +bool LLInvFVBridge::isCutToClipboard() +{ + if (LLClipboard::instance().isCutMode()) + { + return LLClipboard::instance().isOnClipboard(mUUID); + } + return false; +} + // Callback for cutToClipboard if DAMA required... BOOL LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD& response) { @@ -307,9 +317,7 @@ BOOL LLInvFVBridge::perform_cutToClipboard() if (obj && isItemMovable() && isItemRemovable()) { LLClipboard::instance().setCutMode(true); - BOOL added_to_clipboard = LLClipboard::instance().addToClipboard(mUUID); - removeObject(&gInventory, mUUID); // Always perform the remove even if the object couldn't make it to the clipboard - return added_to_clipboard; + return LLClipboard::instance().addToClipboard(mUUID); } return FALSE; } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 9053c61171..df25e01688 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -116,6 +116,7 @@ public: virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL copyToClipboard() const; virtual BOOL cutToClipboard(); + virtual bool isCutToClipboard(); virtual BOOL isClipboardPasteable() const; virtual BOOL isClipboardPasteableAsLink() const; virtual void pasteFromClipboard() {} diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 003bbcafed..e995c138b4 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -84,21 +84,18 @@ LLInventoryFilter::LLInventoryFilter(const Params& p) bool LLInventoryFilter::check(const LLFolderViewModelItem* item) { const LLFolderViewModelItemInventory* listener = dynamic_cast(item); - // Clipboard cut items are *always* filtered so we need this value upfront - const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE); // If it's a folder and we're showing all folders, return automatically. const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY; if (is_folder && (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)) { - return passed_clipboard; + return true; } bool passed = (mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) != std::string::npos : true); passed = passed && checkAgainstFilterType(listener); passed = passed && checkAgainstPermissions(listener); passed = passed && checkAgainstFilterLinks(listener); - passed = passed && passed_clipboard; return passed; } @@ -108,9 +105,8 @@ bool LLInventoryFilter::check(const LLInventoryItem* item) const bool passed_string = (mFilterSubString.size() ? item->getName().find(mFilterSubString) != std::string::npos : true); const bool passed_filtertype = checkAgainstFilterType(item); const bool passed_permissions = checkAgainstPermissions(item); - const bool passed_clipboard = checkAgainstClipboard(item->getUUID()); - return passed_filtertype && passed_permissions && passed_clipboard && passed_string; + return passed_filtertype && passed_permissions && passed_string; } bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const @@ -129,13 +125,10 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const { - // Always check against the clipboard - const BOOL passed_clipboard = checkAgainstClipboard(folder_id); - // we're showing all folders, overriding filter if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) { - return passed_clipboard; + return true; } // when applying a filter, matching folders get their contents downloaded first @@ -201,7 +194,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const LLViewerInventoryItem* item = gInventory.getItem(folder_id); if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER) { - return passed_clipboard; + return true; } if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY) @@ -216,7 +209,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const return false; } - return passed_clipboard; + return true; } bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInventory* listener) const From f3507631eae59ea2e662150180de48efc544b8e6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 26 May 2016 18:26:43 +0300 Subject: [PATCH 068/134] linux build fix --- indra/llui/llfolderviewitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 14a07d0e90..3d618548c4 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -903,7 +903,7 @@ void LLFolderViewItem::draw() // if (!mLabelSuffix.empty()) { - font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : sSuffixColor, + font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE ); } From 817ae347744eab55ee1f8084102fbc8dc5195f3a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 26 May 2016 18:09:11 +0300 Subject: [PATCH 069/134] MAINT-6438 Add new alert to viewer for too much inventory in coalesced objects --- indra/newview/skins/default/xui/en/notifications.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index dfde38bc5f..0e9dcae0ba 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9835,6 +9835,17 @@ Can't move object '[OBJECT_NAME]' to You don't have permission to modify that object + + fail + Too many objects with large inventory are selected. Please select fewer objects and try again. + + + Date: Fri, 27 May 2016 03:34:37 +0300 Subject: [PATCH 070/134] MAINT-6435 Deafult preset should set the same settings as the "Reset to recommended settings" button --- indra/newview/llfeaturemanager.cpp | 59 ++++++++++++++++++++++++++++++ indra/newview/llfeaturemanager.h | 4 +- indra/newview/llpresetsmanager.cpp | 55 ++++++++++++++++++---------- indra/newview/llpresetsmanager.h | 2 +- 4 files changed, 98 insertions(+), 22 deletions(-) diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 7f1c981a3c..d4ba230feb 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -809,3 +809,62 @@ void LLFeatureManager::applyBaseMasks() maskFeatures("safe"); } } + +LLSD LLFeatureManager::getRecommendedSettingsMap() +{ + // Create the map and fill it with the hardware recommended settings. + // It's needed to create an initial Default graphics preset (MAINT-6435). + // The process is similar to the one LLFeatureManager::applyRecommendedSettings() does. + + LLSD map(LLSD::emptyMap()); + + loadGPUClass(); + U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5)); + LL_INFOS("RenderInit") << "Getting the map of recommended settings for level " << level << LL_ENDL; + + applyBaseMasks(); + std::string features(isValidGraphicsLevel(level) ? getNameForGraphicsLevel(level) : "Low"); + + maskFeatures(features); + + LLControlVariable* ctrl = gSavedSettings.getControl("RenderQualityPerformance"); // include the quality value for correct preset loading + map["RenderQualityPerformance"]["Value"] = (LLSD::Integer)level; + map["RenderQualityPerformance"]["Comment"] = ctrl->getComment();; + map["RenderQualityPerformance"]["Persist"] = 1; + map["RenderQualityPerformance"]["Type"] = LLControlGroup::typeEnumToString(ctrl->type()); + + + + for (feature_map_t::iterator mIt = mFeatures.begin(); mIt != mFeatures.end(); ++mIt) + { + LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first); + if (ctrl == NULL) + { + LL_WARNS() << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL; + continue; + } + + if (ctrl->isType(TYPE_BOOLEAN)) + { + map[mIt->first]["Value"] = (LLSD::Boolean)getRecommendedValue(mIt->first); + } + else if (ctrl->isType(TYPE_S32) || ctrl->isType(TYPE_U32)) + { + map[mIt->first]["Value"] = (LLSD::Integer)getRecommendedValue(mIt->first); + } + else if (ctrl->isType(TYPE_F32)) + { + map[mIt->first]["Value"] = (LLSD::Real)getRecommendedValue(mIt->first); + } + else + { + LL_WARNS() << "AHHH! Control variable is not a numeric type!" << LL_ENDL; + continue; + } + map[mIt->first]["Comment"] = ctrl->getComment();; + map[mIt->first]["Persist"] = 1; + map[mIt->first]["Type"] = LLControlGroup::typeEnumToString(ctrl->type()); + } + + return map; +} diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index 12ea691b49..c3d87cea0b 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -157,7 +157,9 @@ public: // load the dynamic GPU/feature table from a website void fetchHTTPTables(); - + + LLSD getRecommendedSettingsMap(); + protected: bool loadGPUClass(); diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index d95546f11d..9957039f72 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -38,6 +38,7 @@ #include "llviewercontrol.h" #include "llfloaterpreference.h" #include "llfloaterreg.h" +#include "llfeaturemanager.h" LLPresetsManager::LLPresetsManager() { @@ -60,7 +61,7 @@ void LLPresetsManager::createMissingDefault() LL_INFOS() << "No default preset found -- creating one at " << default_file << LL_ENDL; // Write current graphic settings as the default - savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT); + savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT, true); } else { @@ -134,7 +135,7 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam presets = mPresetNames; } -bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string name) +bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string name, bool createDefault) { if (LLTrans::getString(PRESETS_DEFAULT) == name) { @@ -146,11 +147,10 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n if(PRESETS_GRAPHIC == subdirectory) { - gSavedSettings.setString("PresetGraphicActive", name); - LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); - if (instance) + if (instance && !createDefault) { + gSavedSettings.setString("PresetGraphicActive", name); instance->getControlNames(name_list); LL_DEBUGS() << "saving preset '" << name << "'; " << name_list.size() << " names" << LL_ENDL; name_list.push_back("PresetGraphicActive"); @@ -170,23 +170,36 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n LL_ERRS() << "Invalid presets directory '" << subdirectory << "'" << LL_ENDL; } - if (name_list.size() > 1) // if the active preset name is the only thing in the list, don't save the list + if (name_list.size() > 1 // if the active preset name is the only thing in the list, don't save the list + || (createDefault && name == PRESETS_DEFAULT && subdirectory == PRESETS_GRAPHIC)) // or create a default graphics preset from hw recommended settings { // make an empty llsd LLSD paramsData(LLSD::emptyMap()); - for (std::vector::iterator it = name_list.begin(); it != name_list.end(); ++it) + if (createDefault) { - std::string ctrl_name = *it; - LLControlVariable* ctrl = gSavedSettings.getControl(ctrl_name).get(); - std::string comment = ctrl->getComment(); - std::string type = LLControlGroup::typeEnumToString(ctrl->type()); - LLSD value = ctrl->getValue(); + paramsData = LLFeatureManager::getInstance()->getRecommendedSettingsMap(); + if (gSavedSettings.getU32("RenderAvatarMaxComplexity") == 0) + { + // use the recommended setting as an initial one (MAINT-6435) + gSavedSettings.setU32("RenderAvatarMaxComplexity", paramsData["RenderAvatarMaxComplexity"]["Value"].asInteger()); + } + } + else + { + for (std::vector::iterator it = name_list.begin(); it != name_list.end(); ++it) + { + std::string ctrl_name = *it; + LLControlVariable* ctrl = gSavedSettings.getControl(ctrl_name).get(); + std::string comment = ctrl->getComment(); + std::string type = LLControlGroup::typeEnumToString(ctrl->type()); + LLSD value = ctrl->getValue(); - paramsData[ctrl_name]["Comment"] = comment; - paramsData[ctrl_name]["Persist"] = 1; - paramsData[ctrl_name]["Type"] = type; - paramsData[ctrl_name]["Value"] = value; + paramsData[ctrl_name]["Comment"] = comment; + paramsData[ctrl_name]["Persist"] = 1; + paramsData[ctrl_name]["Type"] = type; + paramsData[ctrl_name]["Value"] = value; + } } std::string pathName(getPresetsDir(subdirectory) + gDirUtilp->getDirDelimiter() + LLURI::escape(name) + ".xml"); @@ -203,10 +216,12 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n LL_DEBUGS() << "saved preset '" << name << "'; " << paramsData.size() << " parameters" << LL_ENDL; - gSavedSettings.setString("PresetGraphicActive", name); - - // signal interested parties - triggerChangeSignal(); + if (!createDefault) + { + gSavedSettings.setString("PresetGraphicActive", name); + // signal interested parties + triggerChangeSignal(); + } } else { diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h index ac4f0c010c..21f9885f27 100644 --- a/indra/newview/llpresetsmanager.h +++ b/indra/newview/llpresetsmanager.h @@ -56,7 +56,7 @@ public: static std::string getPresetsDir(const std::string& subdirectory); void setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option); void loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option); - bool savePreset(const std::string& subdirectory, std::string name); + bool savePreset(const std::string& subdirectory, std::string name, bool createDefault = false); void loadPreset(const std::string& subdirectory, std::string name); bool deletePreset(const std::string& subdirectory, std::string name); From ca98cd73db43c79687e3c69aa51bd68ac954792b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 28 May 2016 13:00:22 +0200 Subject: [PATCH 071/134] Back out fix to prevent items going to trash during cut&paste - fix from LL is coming in next merge --- indra/llui/llfolderviewitem.cpp | 8 -------- indra/llui/llfolderviewmodel.h | 2 -- indra/newview/llconversationmodel.h | 2 -- indra/newview/llinventorybridge.cpp | 3 +-- indra/newview/llinventoryfilter.cpp | 31 +++-------------------------- indra/newview/llinventoryfilter.h | 2 -- 6 files changed, 4 insertions(+), 44 deletions(-) diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 734125fb03..d3d35839f5 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -942,14 +942,6 @@ void LLFolderViewItem::draw() } LLColor4 color = (mIsSelected && filled) ? mFontHighlightColor : mFontColor; - // Re-apply FIRE-6714: Don't move objects to trash during cut&paste - // Don't hide cut items in inventory - if (!getRoot()->getFolderViewModel()->getFilter().checkClipboard(getViewModelItem())) - { - // Fade out item color to indicate it's being cut - color.mV[VALPHA] *= 0.5f; - } - // Re-apply FIRE-6714: Don't move objects to trash during cut&paste drawLabel(font, text_left, y, color, right_x); // Special for protected items diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 6a12c6f5a5..78886c0b1d 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -83,8 +83,6 @@ public: // +-------------------------------------------------------------------+ virtual bool check(const LLFolderViewModelItem* item) = 0; virtual bool checkFolder(const LLFolderViewModelItem* folder) const = 0; - // For clipboard highlighting - virtual bool checkClipboard(const LLFolderViewModelItem* item) = 0; virtual void setEmptyLookupMessage(const std::string& message) = 0; virtual std::string getEmptyLookupMessage() const = 0; diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index f4baa9fc3c..640f1a4144 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -243,8 +243,6 @@ public: bool check(const LLFolderViewModelItem* item) { return true; } bool checkFolder(const LLFolderViewModelItem* folder) const { return true; } - // For clipboard highlighting - bool checkClipboard(const LLFolderViewModelItem* item) { return true; } void setEmptyLookupMessage(const std::string& message) { } std::string getEmptyLookupMessage() const { return mEmpty; } bool showAllResults() const { return true; } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6e452fc95d..668308058b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -331,8 +331,7 @@ BOOL LLInvFVBridge::perform_cutToClipboard() { LLClipboard::instance().setCutMode(true); BOOL added_to_clipboard = LLClipboard::instance().addToClipboard(mUUID); - // Re-apply FIRE-6714: Don't move objects to trash during cut&paste - //removeObject(&gInventory, mUUID); // Always perform the remove even if the object couldn't make it to the clipboard + removeObject(&gInventory, mUUID); // Always perform the remove even if the object couldn't make it to the clipboard return added_to_clipboard; } return FALSE; diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 531f527046..d9dadf3b85 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -118,11 +118,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item) const LLFolderViewModelItemInventory* listener = dynamic_cast(item); // Clipboard cut items are *always* filtered so we need this value upfront - // FIRE-6714: Don't move objects to trash during cut&paste - // Don't hide cut items in inventory - //const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE); - const BOOL passed_clipboard = TRUE; - // FIRE-6714: Don't move objects to trash during cut&paste + const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE); // If it's a folder and we're showing all folders, return automatically. const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY; @@ -200,11 +196,7 @@ bool LLInventoryFilter::check(const LLInventoryItem* item) const bool passed_string = (mFilterSubString.size() ? item->getName().find(mFilterSubString) != std::string::npos : true); const bool passed_filtertype = checkAgainstFilterType(item); const bool passed_permissions = checkAgainstPermissions(item); - // FIRE-6714: Don't move objects to trash during cut&paste - // Don't hide cut items in inventory - //const bool passed_clipboard = checkAgainstClipboard(item->getUUID()); - const bool passed_clipboard = true; - // Don't filter cut items + const bool passed_clipboard = checkAgainstClipboard(item->getUUID()); return passed_filtertype && passed_permissions && passed_clipboard && passed_string; } @@ -226,11 +218,7 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const { // Always check against the clipboard - // FIRE-6714: Don't move objects to trash during cut&paste - // Don't hide cut items in inventory - //const BOOL passed_clipboard = checkAgainstClipboard(folder_id); - const BOOL passed_clipboard = TRUE; - // FIRE-6714: Don't move objects to trash during cut&paste + const BOOL passed_clipboard = checkAgainstClipboard(folder_id); // we're showing all folders, overriding filter if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) @@ -528,19 +516,6 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const return true; } -// For clipboard highlighting -bool LLInventoryFilter::checkClipboard(const LLFolderViewModelItem* item) -{ - const LLFolderViewModelItemInventory* listener = dynamic_cast(item); - if (!listener) - { - return true; - } - - return checkAgainstClipboard(listener->getUUID()); -} -// - bool LLInventoryFilter::checkAgainstPermissions(const LLFolderViewModelItemInventory* listener) const { if (!listener) return FALSE; diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 65011799dd..256a3bb4dd 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -235,8 +235,6 @@ public: // +-------------------------------------------------------------------+ bool check(const LLFolderViewModelItem* listener); bool check(const LLInventoryItem* item); - // For clipboard highlighting - bool checkClipboard(const LLFolderViewModelItem* item); bool checkFolder(const LLFolderViewModelItem* listener) const; bool checkFolder(const LLUUID& folder_id) const; From 83f49db1e239216767e01ff00511d232a11fe4fe Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 28 May 2016 14:40:40 +0200 Subject: [PATCH 072/134] Sync contributions.txt --- doc/contributions.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index d2fe1877ee..0a3b1b9641 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -67,13 +67,10 @@ Alejandro Rosenthal Aleric Inglewood OPEN-38 SNOW-240 - SNOW-477 SNOW-522 SNOW-626 - SNOW-744 SNOW-756 SNOW-764 - SNOW-766 SNOW-800 VWR-10001 VWR-10579 @@ -99,8 +96,11 @@ Aleric Inglewood VWR-24366 VWR-24519 VWR-24520 + SNOW-84 + SNOW-477 + SNOW-744 + SNOW-766 STORM-163 - STORM-864 STORM-955 STORM-960 STORM-1793 @@ -186,9 +186,9 @@ Ansariel Hiller STORM-1984 STORM-1979 STORM-2083 - STORM-2094 STORM-2105 MAINT-5533 + STORM-2094 MAINT-5756 MAINT-4677 MAINT-2199 @@ -1388,9 +1388,6 @@ Tofu Buzzard SH-2477 STORM-1684 STORM-1819 - STORM-1921 - STORM-1927 - STORM-1928 Tony Kembia Tonya Souther STORM-1905 From 9a99c6d780d67805cb6ed80b1cc4c0df1460440b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 28 May 2016 14:45:28 +0200 Subject: [PATCH 073/134] Update German translation --- indra/newview/skins/default/xui/de/notifications.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 772b70dd07..7b1e2870d5 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -4072,6 +4072,10 @@ Sie ist voll oder startet in Kürze neu. Ihnen fehlt die Berechtigung zum Modifizieren dieses Objekts. + + Es sind zu viele Objekte mit großem Inhalt ausgewählt. Bitte wählen Sie weniger Objekte aus und versuchen Sie es erneut. + + Physik kann nicht für ein Objekt aktiviert werden, das zum Navmesh beiträgt. From 5b4ed5208310b7a68891201dc98015b1677d3d2f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 28 May 2016 14:49:08 +0200 Subject: [PATCH 074/134] Set UpdaterShowReleaseNotes setting to FALSE for now --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 48de244596..36505f1c43 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16354,7 +16354,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type Boolean Value - 1 + 0 UploadBakedTexOld From f282c31f0107f05ae9e943d2fdda516cdaf3f3fa Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 31 May 2016 16:56:45 +0300 Subject: [PATCH 075/134] MAINT-2129 One more Block button --- indra/newview/llinspectremoteobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index a12ec390af..b64df2bd47 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -181,7 +181,7 @@ void LLInspectRemoteObject::update() getChild("map_btn")->setEnabled(! mSLurl.empty()); // disable the Block button if we don't have the object ID (will this ever happen?) - getChild("block_btn")->setEnabled(! mObjectID.isNull()); + getChild("block_btn")->setEnabled(!mObjectID.isNull() && !LLMuteList::getInstance()->isMuted(mObjectID)); } ////////////////////////////////////////////////////////////////////////////// From aca2dab2d0ff7d66576b5d79f34eb9a706187de4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 3 Jun 2016 20:09:33 +0300 Subject: [PATCH 076/134] MAINT-6460 Crash calculating mesh complexity --- indra/newview/llmeshrepository.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 0aaed3e286..117507ef39 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -4034,6 +4034,11 @@ void LLMeshRepository::uploadError(LLSD& args) //static F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32* bytes_visible, S32 lod, F32 *unscaled_value) { + if (header.size() == 0) + { + return 0.f; + } + F32 max_distance = 512.f; F32 dlowest = llmin(radius/0.03f, max_distance); From f9023371ba6b9bae9eef353ca8b42e4619b8ee01 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 8 Jun 2016 03:49:55 +0300 Subject: [PATCH 077/134] MAINT-6461 Added a null check --- indra/llui/llview.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 8f7cac1f61..62c3f401bf 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -588,6 +588,11 @@ void LLView::onVisibilityChange ( BOOL new_visibility ) BOOL log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus(); BOOST_FOREACH(LLView* viewp, mChildList) { + if (!viewp) + { + continue; + } + // only views that are themselves visible will have their overall visibility affected by their ancestors old_visibility=viewp->getVisible(); From 1adfaa081fd27d653619c84c520c16516c530ab1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 1 Jun 2016 16:56:04 +0300 Subject: [PATCH 078/134] MAINT-6446 Correct password length handling --- indra/llcommon/llstring.cpp | 27 +++++++++++++++++++ indra/llcommon/llstring.h | 11 ++++++++ indra/llui/lllineeditor.cpp | 7 +---- .../skins/default/xui/en/panel_login.xml | 2 +- .../default/xui/en/panel_login_first.xml | 2 +- 5 files changed, 41 insertions(+), 8 deletions(-) diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index f3b8999883..c45db3b185 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -576,6 +576,33 @@ std::string utf8str_truncate(const std::string& utf8str, const S32 max_len) } } +std::string utf8str_symbol_truncate(const std::string& utf8str, const S32 symbol_len) +{ + if (0 == symbol_len) + { + return std::string(); + } + if ((S32)utf8str.length() <= symbol_len) + { + return utf8str; + } + else + { + int len = 0, byteIndex = 0; + const char* aStr = utf8str.c_str(); + size_t origSize = utf8str.size(); + + for (byteIndex = 0; len < symbol_len && byteIndex < origSize; byteIndex++) + { + if ((aStr[byteIndex] & 0xc0) != 0x80) + { + len += 1; + } + } + return utf8str.substr(0, byteIndex); + } +} + std::string utf8str_substChar( const std::string& utf8str, const llwchar target_char, diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 393f6d7a8c..a40db0f8cc 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -563,6 +563,17 @@ LL_COMMON_API S32 utf8str_compare_insensitive( const std::string& lhs, const std::string& rhs); +/** +* @brief Properly truncate a utf8 string to a maximum character count. +* +* If symbol_len is longer than the string passed in, the return +* value == utf8str. +* @param utf8str A valid utf8 string to truncate. +* @param symbol_len The maximum number of symbols in the return value. +* @return Returns a valid utf8 string with symbol count <= max_len. +*/ +LL_COMMON_API std::string utf8str_symbol_truncate(const std::string& utf8str, const S32 symbol_len); + /** * @brief Replace all occurences of target_char with replace_char * diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index a08cf91a69..492c9315d1 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -400,12 +400,7 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) if (mMaxLengthChars) { - LLWString truncated_wstring = utf8str_to_wstring(truncated_utf8); - if (truncated_wstring.size() > (U32)mMaxLengthChars) - { - truncated_wstring = truncated_wstring.substr(0, mMaxLengthChars); - } - mText.assign(wstring_to_utf8str(truncated_wstring)); + mText.assign(utf8str_symbol_truncate(truncated_utf8, mMaxLengthChars)); } if (all_selected) diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index ae8e78a9d6..ded814bbeb 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -67,7 +67,7 @@ follows="left|top" height="32" left_pad="-11" - max_length_bytes="64" + max_length_chars="16" text_pad_left="8" name="password_edit" label="Password" diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml index dc6e27a1ee..35b80c56ab 100644 --- a/indra/newview/skins/default/xui/en/panel_login_first.xml +++ b/indra/newview/skins/default/xui/en/panel_login_first.xml @@ -124,7 +124,7 @@ width="200" height="32" left="220" - max_length_bytes="64" + max_length_chars="16" name="password_edit" label="Password" text_pad_left="8" From 44a72da519697acc926b9a825628ec256f574521 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 1 Jun 2016 19:14:38 +0200 Subject: [PATCH 079/134] Backed out changeset f8d5b5775bc8 - not sure what the purpose of this is if SL only accepts 16 characters --- indra/newview/skins/default/xui/en/panel_fs_login.xml | 2 +- indra/newview/skins/default/xui/en/panel_fs_nui_login.xml | 2 +- indra/newview/skins/latency/xui/en/panel_fs_login.xml | 2 +- indra/newview/skins/starlightcui/xui/en/panel_fs_login.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_fs_login.xml b/indra/newview/skins/default/xui/en/panel_fs_login.xml index cc04a44566..9fdccec641 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_login.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_login.xml @@ -120,7 +120,7 @@ Date: Thu, 2 Jun 2016 19:59:35 +0300 Subject: [PATCH 080/134] MAINT-6448 PERMISSION_DEBIT notification should default to Deny --- indra/newview/lltoastscriptquestion.cpp | 19 +++++++++++++++++++ indra/newview/lltoastscriptquestion.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp index 91ba8c0247..7a3a1d8fd7 100644 --- a/indra/newview/lltoastscriptquestion.cpp +++ b/indra/newview/lltoastscriptquestion.cpp @@ -54,6 +54,19 @@ BOOL LLToastScriptQuestion::postBuild() return TRUE; } + +// virtual +void LLToastScriptQuestion::setFocus(BOOL b) +{ + LLToastPanel::setFocus(b); + // toast can fade out and disappear with focus ON, so reset to default anyway + LLButton* dfbutton = getDefaultButton(); + if (dfbutton && dfbutton->getVisible() && dfbutton->getEnabled()) + { + dfbutton->setFocus(b); + } +} + void LLToastScriptQuestion::snapToMessageHeight() { LLTextBox* mMessage = getChild("top_info_message"); @@ -118,6 +131,12 @@ void LLToastScriptQuestion::createButtons() button->setRect(rect); buttons_width += rect.getWidth() + LEFT_PAD; + + if (form_element.has("default") && form_element["default"].asBoolean()) + { + button->setFocus(TRUE); + setDefaultBtn(button); + } } } } diff --git a/indra/newview/lltoastscriptquestion.h b/indra/newview/lltoastscriptquestion.h index 3a557f60f6..a756f88415 100644 --- a/indra/newview/lltoastscriptquestion.h +++ b/indra/newview/lltoastscriptquestion.h @@ -39,6 +39,8 @@ public: virtual BOOL postBuild(); virtual ~LLToastScriptQuestion(){}; + /*virtual*/ void setFocus(BOOL b); + private: void snapToMessageHeight(); From 2fc4663d0afe9869d06f4ca7001636cdcc38042c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 8 Jun 2016 16:39:00 -0400 Subject: [PATCH 081/134] first pass at new buildscripts logging convention --- build.sh | 85 +++++++++++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/build.sh b/build.sh index 20d3a41f83..9a4a8d1054 100755 --- a/build.sh +++ b/build.sh @@ -16,11 +16,11 @@ # * The special style in which python is invoked is intentional to permit # use of a native python install on windows - which requires paths in DOS form -check_for() -{ - if [ -e "$2" ]; then found_dict='FOUND'; else found_dict='MISSING'; fi - echo "$1 ${found_dict} '$2' " 1>&2 -} +# check_for() ] +# { ] +# if [ -e "$2" !#\; then found_dict='FOUND'; else found_dict='MISSING'; fi ] +# echo "$1 ${found_dict} '$2' " 1>&2 ] +# } ] build_dir_Darwin() { @@ -107,7 +107,8 @@ pre_build() -DVIEWER_CHANNEL:STRING="\"$viewer_channel\"" \ -DGRID:STRING="\"$viewer_grid\"" \ -DLL_TESTS:BOOL="$run_tests" \ - -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url + -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url \ + 2>&$stderr end_section "Configure $variant" } @@ -119,12 +120,12 @@ package_llphysicsextensions_tpv() if [ "$variant" = "Release" ] then llpetpvcfg=$build_dir/packages/llphysicsextensions/autobuild-tpv.xml - "$autobuild" build --quiet --config-file $llpetpvcfg -c Tpv + "$autobuild" build --quiet --config-file $llpetpvcfg -c Tpv 2>&$stderr # capture the package file name for use in upload later... PKGTMP=`mktemp -t pgktpv.XXXXXX` trap "rm $PKGTMP* 2>/dev/null" 0 - "$autobuild" package --quiet --config-file $llpetpvcfg --results-file "$(native_path $PKGTMP)" + "$autobuild" package --quiet --config-file $llpetpvcfg --results-file "$(native_path $PKGTMP)" 2>&$stderr tpv_status=$? if [ -r "${PKGTMP}" ] then @@ -146,18 +147,17 @@ build() local variant="$1" if $build_viewer then - "$autobuild" build --no-configure -c $variant + "$autobuild" build --no-configure -c $variant 2>&$stderr build_ok=$? # Run build extensions - if [ $build_ok -eq 0 -a -d ${build_dir}/packages/build-extensions ]; then - for extension in ${build_dir}/packages/build-extensions/*.sh; do + if [ $build_ok -eq 0 -a -d ${build_dir}/packages/build-extensions ] + then + for extension in ${build_dir}/packages/build-extensions/*.sh + do begin_section "Extension $extension" - . $extension + . $extension 2>&$trace end_section "Extension $extension" - if [ $build_ok -ne 0 ]; then - break - fi done fi @@ -173,25 +173,23 @@ build() fi } -# Check to see if we were invoked from the wrapper, if not, re-exec ourselves from there -if [ "x$arch" = x ] +################################################################ +# Start of the actual script +################################################################ + +# Check to see if we were invoked from the master buildscripts wrapper, if not, fail +if [ "x${BUILDSCRIPTS_SUPPORT_FUNCTIONS}" = x ] then - top=`hg root` - if [ -x "$top/../buildscripts/hg/bin/build.sh" ] - then - exec "$top/../buildscripts/hg/bin/build.sh" "$top" - else - cat <&2 exit 1 - fi fi # Check to see if we're skipping the platform -eval '$build_'"$arch" || pass +if ! '$build_'"$arch" +then + record_event "building on architecture $arch is disabled" + pass +fi # ensure AUTOBUILD is in native path form for child processes AUTOBUILD="$(native_path "$AUTOBUILD")" @@ -235,14 +233,13 @@ do begin_section "Initialize $variant Build Directory" rm -rf "$build_dir" - mkdir -p "$build_dir" - mkdir -p "$build_dir/tmp" + mkdir -p "$build_dir/tmp" 2>&$stderr end_section "Initialize $variant Build Directory" if pre_build "$variant" "$build_dir" then begin_section "Build $variant" - build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | sed -n 's/^ *\(##teamcity.*\)/\1/p' + build "$variant" "$build_dir" if `cat "$build_dir/build_ok"` then case "$variant" in @@ -270,7 +267,7 @@ do fi if [ -d "$build_dir/doxygen/html" ] then - tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html" + tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html" 2>&$stderr upload_item docs "$build_dir/viewer-doxygen.tar.bz2" binary/octet-stream fi ;; @@ -307,13 +304,13 @@ then --distribution unstable \ --newversion "${VIEWER_VERSION}" \ "Automated build #$build_id, repository $branch revision $revision." \ - >> "$build_log" 2>&1 + 2>&$stderr # build the debian package - $pkg_default_debuild_command >>"$build_log" 2>&1 || record_failure "\"$pkg_default_debuild_command\" failed." + $pkg_default_debuild_command 2>&$stderr || record_failure "\"$pkg_default_debuild_command\" failed." # Unmangle the changelog file - hg revert debian/changelog + hg revert debian/changelog 2>&$stderr end_section "Build Viewer Debian Package" @@ -324,8 +321,8 @@ then done fi # Move any .deb results. - mkdir -p ../packages_public - mkdir -p ../packages_private + mkdir -p ../packages_public 2>&$stderr + mkdir -p ../packages_private 2>&$stderr mv ${build_dir}/packages/*.deb ../packages_public 2>/dev/null || true mv ${build_dir}/packages/packages_private/*.deb ../packages_private 2>/dev/null || true @@ -345,7 +342,7 @@ then # doesn't make a remote repo again. for debian_repo_type in debian_repo debian_repo_private; do if [ -d "$build_log_dir/$debian_repo_type" ]; then - mv $build_log_dir/$debian_repo_type $build_log_dir/${debian_repo_type}_pushed + mv $build_log_dir/$debian_repo_type $build_log_dir/${debian_repo_type}_pushed 2>&$stderr fi done @@ -359,10 +356,10 @@ then end_section "Upload Debian Repository" else - echo debian build not enabled + record_event "debian build not enabled" fi else - echo skipping debian build due to failed build. + record_event "skipping debian build due to failed build" fi fi @@ -376,7 +373,7 @@ then package=$(installer_$arch) if [ x"$package" = x ] || test -d "$package" then - # Coverity doesn't package, so it's ok, anything else is fail + record_event "??? mystery event $package // $build_coverity" succeeded=$build_coverity else # Upload base package. @@ -428,12 +425,12 @@ then fi end_section Upload Installer else - echo skipping upload of installer + record_event "skipping upload of installer" fi else - echo skipping upload of installer due to failed build. + record_event "skipping upload of installer due to failed build" fi # The branch independent build.sh script invoking this script will finish processing From 7e910beac39341707940e94ae329952e7f6ab965 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 9 Jun 2016 06:04:27 -0400 Subject: [PATCH 082/134] use autobuild --quiet because it puts everything on stderr --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 9a4a8d1054..e54b8ff047 100755 --- a/build.sh +++ b/build.sh @@ -101,7 +101,7 @@ pre_build() && [ -r "$master_message_template_checkout/message_template.msg" ] \ && template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg" - "$autobuild" configure -c $variant -- \ + "$autobuild" configure --quiet -c $variant -- \ -DPACKAGE:BOOL=ON \ -DRELEASE_CRASH_REPORTING:BOOL=ON \ -DVIEWER_CHANNEL:STRING="\"$viewer_channel\"" \ @@ -202,7 +202,7 @@ then fi # load autobuild provided shell functions and variables -eval "$("$autobuild" source_environment)" +eval "$("$autobuild" --quiet source_environment)" # something about the additional_packages mechanism messes up buildscripts results.py on Linux # since we don't care about those packages on Linux, just zero it out, yes - a HACK From 1671de36a0172b1a5aed799bd050a8f015599262 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 9 Jun 2016 07:59:50 -0400 Subject: [PATCH 083/134] correct check for disabled build; remove unused function --- build.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build.sh b/build.sh index e54b8ff047..a978af89ab 100755 --- a/build.sh +++ b/build.sh @@ -16,12 +16,6 @@ # * The special style in which python is invoked is intentional to permit # use of a native python install on windows - which requires paths in DOS form -# check_for() ] -# { ] -# if [ -e "$2" !#\; then found_dict='FOUND'; else found_dict='MISSING'; fi ] -# echo "$1 ${found_dict} '$2' " 1>&2 ] -# } ] - build_dir_Darwin() { echo build-darwin-i386 @@ -185,7 +179,7 @@ then fi # Check to see if we're skipping the platform -if ! '$build_'"$arch" +if ! eval '$build_'"$arch" then record_event "building on architecture $arch is disabled" pass From 97f11bc635935def177d4c1a58ba1c6a76f0b540 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 9 Jun 2016 10:03:07 -0400 Subject: [PATCH 084/134] move build number informative output to stdout --- indra/cmake/BuildVersion.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 195d6e705e..6ffa698a1c 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -12,7 +12,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n if (DEFINED ENV{revision}) set(VIEWER_VERSION_REVISION $ENV{revision}) - message("Revision (from environment): ${VIEWER_VERSION_REVISION}") + message(STATUS "Revision (from environment): ${VIEWER_VERSION_REVISION}") else (DEFINED ENV{revision}) find_program(MERCURIAL @@ -33,23 +33,23 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n string(REGEX REPLACE "[^0-9a-f]" "" VIEWER_VERSION_REVISION ${VIEWER_VERSION_REVISION}) endif (NOT ${hg_id_result} EQUAL 0) if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - message("Revision (from hg) ${VIEWER_VERSION_REVISION}") + message(STATUS "Revision (from hg) ${VIEWER_VERSION_REVISION}") else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - message("Revision not set (repository not found?); using 0") + message(STATUS "Revision not set (repository not found?); using 0") set(VIEWER_VERSION_REVISION 0 ) endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") else (MERCURIAL) - message("Revision not set: mercurial not found; using 0") + message(STATUS "Revision not set: mercurial not found; using 0") set(VIEWER_VERSION_REVISION 0) endif (MERCURIAL) endif (DEFINED ENV{revision}) - message("Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") + message(STATUS "Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") else ( EXISTS ${VIEWER_VERSION_BASE_FILE} ) message(SEND_ERROR "Cannot get viewer version from '${VIEWER_VERSION_BASE_FILE}'") endif ( EXISTS ${VIEWER_VERSION_BASE_FILE} ) if ("${VIEWER_VERSION_REVISION}" STREQUAL "") - message("Ultimate fallback, revision was blank or not set: will use 0") + message(STATUS "Ultimate fallback, revision was blank or not set: will use 0") set(VIEWER_VERSION_REVISION 0) endif ("${VIEWER_VERSION_REVISION}" STREQUAL "") From 1e803a6bd7a89f60407a1fd2b2697d9e5dd23467 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 10 Jun 2016 12:33:39 -0700 Subject: [PATCH 085/134] MAINT-6486: Be sure that all the script queue functions hit all objects and scripts in those objects. Convert from responders and callbacks to coroutines. --- indra/llmessage/llassetstorage.h | 4 + indra/newview/llcompilequeue.cpp | 928 +++++++++++++++++-------------- indra/newview/llcompilequeue.h | 77 +-- 3 files changed, 555 insertions(+), 454 deletions(-) diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 4be677a4b0..0f23754096 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -181,6 +181,10 @@ protected: // Map of known bad assets typedef std::map toxic_asset_map_t; +// *TODO: these typedefs are passed into the VFS via a legacy C function pointer +// future project would be to convert these to C++ callables (std::function<>) so that +// we can use bind and remove the userData parameter. +// typedef void (*LLGetAssetCallback)(LLVFS *vfs, const LLUUID &asset_id, LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status); diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 219bcf0eb0..1c9f766666 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -62,6 +62,45 @@ #include "llviewerassetupload.h" #include "llcorehttputil.h" +namespace +{ + + const std::string QUEUE_EVENTPUMP_NAME("ScriptActionQueue"); + const F32 TIMEOUT_INVENTORY_FETCH(5.0); + + + class ObjectInventoryFetcher: public LLVOInventoryListener + { + public: + typedef boost::shared_ptr ptr_t; + + ObjectInventoryFetcher(LLEventPump &pump, LLViewerObject* object, void* user_data) : + mPump(pump), + LLVOInventoryListener() + { + registerVOInventoryListener(object, this); + } + + virtual void inventoryChanged(LLViewerObject* object, + LLInventoryObject::object_list_t* inventory, + S32 serial_num, + void* user_data); + + void fetchInventory() + { + requestVOInventory(); + } + + const LLInventoryObject::object_list_t & getInventoryList() const { return mInventoryList; } + + private: + LLInventoryObject::object_list_t mInventoryList; + LLEventPump & mPump; + }; + + +} + // *NOTE$: A minor specialization of LLScriptAssetUpload, it does not require a buffer // (and does not save a buffer to the vFS) and it finds the compile queue window and // displays a compiling message. @@ -149,47 +188,6 @@ BOOL LLFloaterScriptQueue::postBuild() return TRUE; } -// This is the callback method for the viewer object currently being -// worked on. -// NOT static, virtual! -void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object, - LLInventoryObject::object_list_t* inv, - S32, - void* q_id) -{ - LL_INFOS() << "LLFloaterScriptQueue::inventoryChanged() for object " - << viewer_object->getID() << LL_ENDL; - - //Remove this listener from the object since its - //listener callback is now being executed. - - //We remove the listener here because the function - //removeVOInventoryListener removes the listener from a ViewerObject - //which it internally stores. - - //If we call this further down in the function, calls to handleInventory - //and nextObject may update the internally stored viewer object causing - //the removal of the incorrect listener from an incorrect object. - - //Fixes SL-6119:Recompile scripts fails to complete - removeVOInventoryListener(); - - if (viewer_object && inv && (viewer_object->getID() == mCurrentObjectID) ) - { - handleInventory(viewer_object, inv); - } - else - { - // something went wrong... - // note that we're not working on this one, and move onto the - // next object in the list. - LL_WARNS() << "No inventory for " << mCurrentObjectID - << LL_ENDL; - nextObject(); - } -} - - // static void LLFloaterScriptQueue::onCloseBtn(void* user_data) { @@ -199,7 +197,7 @@ void LLFloaterScriptQueue::onCloseBtn(void* user_data) void LLFloaterScriptQueue::addObject(const LLUUID& id) { - mObjectIDs.push_back(id); + mObjectIDs.insert(id); } BOOL LLFloaterScriptQueue::start() @@ -216,74 +214,24 @@ BOOL LLFloaterScriptQueue::start() return startQueue(); } +void LLFloaterScriptQueue::addProcessingMessage(const std::string &message, const LLSD &args) +{ + std::string buffer(LLTrans::getString(message, args)); + + getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); +} + +void LLFloaterScriptQueue::addStringMessage(const std::string &message) +{ + getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); +} + + BOOL LLFloaterScriptQueue::isDone() const { return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0)); } -// go to the next object. If no objects left, it falls out silently -// and waits to be killed by the window being closed. -BOOL LLFloaterScriptQueue::nextObject() -{ - U32 count; - BOOL successful_start = FALSE; - do - { - count = mObjectIDs.size(); - LL_INFOS() << "LLFloaterScriptQueue::nextObject() - " << count - << " objects left to process." << LL_ENDL; - mCurrentObjectID.setNull(); - if(count > 0) - { - successful_start = popNext(); - } - LL_INFOS() << "LLFloaterScriptQueue::nextObject() " - << (successful_start ? "successful" : "unsuccessful") - << LL_ENDL; - } while((mObjectIDs.size() > 0) && !successful_start); - if(isDone() && !mDone) - { - mDone = true; - getChild("queue output")->addSimpleElement(getString("Done"), ADD_BOTTOM); - getChildView("close")->setEnabled(TRUE); - } - return successful_start; -} - -// returns true if the queue has started, otherwise false. This -// method pops the top object off of the queue. -BOOL LLFloaterScriptQueue::popNext() -{ - // get the first element off of the container, and attempt to get - // the inventory. - BOOL rv = FALSE; - S32 count = mObjectIDs.size(); - if(mCurrentObjectID.isNull() && (count > 0)) - { - mCurrentObjectID = mObjectIDs.at(0); - LL_INFOS() << "LLFloaterScriptQueue::popNext() - mCurrentID: " - << mCurrentObjectID << LL_ENDL; - mObjectIDs.erase(mObjectIDs.begin()); - LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID); - if(obj) - { - LL_INFOS() << "LLFloaterScriptQueue::popNext() requesting inv for " - << mCurrentObjectID << LL_ENDL; - LLUUID* id = new LLUUID(getKey().asUUID()); - registerVOInventoryListener(obj,id); - requestVOInventory(); - rv = TRUE; - } - } - return rv; -} - -BOOL LLFloaterScriptQueue::startQueue() -{ - return nextObject(); -} - - ///---------------------------------------------------------------------------- /// Class LLFloaterCompileQueue ///---------------------------------------------------------------------------- @@ -306,7 +254,7 @@ void LLFloaterCompileQueue::experienceIdsReceived( const LLSD& content ) { mExperienceIds.insert(it->asUUID()); } - nextObject(); +// nextObject(); } BOOL LLFloaterCompileQueue::hasExperience( const LLUUID& id ) const @@ -314,188 +262,295 @@ BOOL LLFloaterCompileQueue::hasExperience( const LLUUID& id ) const return mExperienceIds.find(id) != mExperienceIds.end(); } +// //Attempt to record this asset ID. If it can not be inserted into the set +// //then it has already been processed so return false. +// bool LLFloaterCompileQueue::checkAssetId(const LLUUID &assetId) +// { +// std::pair result = mAssetIds.insert(assetId); +// return result.second; +// } -void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object, - LLInventoryObject::object_list_t* inv) +void LLFloaterCompileQueue::handleHTTPResponse(std::string pumpName, const LLSD &expresult) { - // find all of the lsl, leaving off duplicates. We'll remove - // all matching asset uuids on compilation success. - - typedef std::multimap > uuid_item_map; - uuid_item_map asset_item_map; - - LLInventoryObject::object_list_t::const_iterator it = inv->begin(); - LLInventoryObject::object_list_t::const_iterator end = inv->end(); - for ( ; it != end; ++it) - { - if((*it)->getType() == LLAssetType::AT_LSL_TEXT) - { - LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); - // Check permissions before allowing the user to retrieve data. - if (item->getPermissions().allowModifyBy(gAgent.getID(), gAgent.getGroupID()) && - item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID()) ) - { - LLPointer script = new LLViewerInventoryItem(item); - mCurrentScripts.push_back(script); - asset_item_map.insert(std::make_pair(item->getAssetUUID(), item)); - } - } - } - - if (asset_item_map.empty()) - { - // There are no scripts in this object. move on. - nextObject(); - } - else - { - // request all of the assets. - uuid_item_map::iterator iter; - for(iter = asset_item_map.begin(); iter != asset_item_map.end(); iter++) - { - LLInventoryItem *itemp = iter->second; - LLScriptQueueData* datap = new LLScriptQueueData(getKey().asUUID(), - viewer_object->getID(), itemp); - - LLExperienceCache::instance().fetchAssociatedExperience(itemp->getParentUUID(), itemp->getUUID(), - boost::bind(&LLFloaterCompileQueue::requestAsset, datap, _1)); - } - } + LLEventPumps::instance().post(pumpName, expresult); } - -void LLFloaterCompileQueue::requestAsset( LLScriptQueueData* datap, const LLSD& experience ) +class HandleScriptUserData { - LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", datap->mQueueID); - if(!queue) - { - delete datap; - return; - } - if(experience.has(LLExperienceCache::EXPERIENCE_ID)) - { - datap->mExperienceId=experience[LLExperienceCache::EXPERIENCE_ID].asUUID(); - if(!queue->hasExperience(datap->mExperienceId)) - { - std::string buffer = LLTrans::getString("CompileNoExperiencePerm", LLSD::emptyMap() - .with("SCRIPT", datap->mItem->getName()) - .with("EXPERIENCE", experience[LLExperienceCache::NAME].asString())); - - queue->getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); - queue->removeItemByItemID(datap->mItem->getUUID()); - delete datap; - return; - } - } - //LL_INFOS() << "ITEM NAME 2: " << names.get(i) << LL_ENDL; - gAssetStorage->getInvItemAsset(datap->mHost, - gAgent.getID(), - gAgent.getSessionID(), - datap->mItem->getPermissions().getOwner(), - datap->mTaskId, - datap->mItem->getUUID(), - datap->mItem->getAssetUUID(), - datap->mItem->getType(), - LLFloaterCompileQueue::scriptArrived, - (void*)datap); -} +public: + HandleScriptUserData(std::string &pumpname) : + mPumpname(pumpname) + { } -/*static*/ -void LLFloaterCompileQueue::finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, std::string scriptName, LLUUID queueId) + const std::string &getPumpName() const { return mPumpname; } + +private: + std::string mPumpname; +}; + +// *TODO: handleSCriptRetrieval is passed into the VFS via a legacy C function pointer +// future project would be to convert these to C++ callables (std::function<>) so that +// we can use bind and remove the userData parameter. +// +void LLFloaterCompileQueue::handleScriptRetrieval(LLVFS *vfs, const LLUUID& assetId, + LLAssetType::EType type, void* userData, S32 status, LLExtStat extStatus) { + LLSD result(LLSD::emptyMap()); - LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", LLSD(queueId)); - if (queue) + result["asset_id"] = assetId; + if (status) { - // Bytecode save completed - if (response["compiled"]) + result["error"] = status; + + if (status == LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE) { - std::string message = std::string("Compilation of \"") + scriptName + std::string("\" succeeded"); - - queue->getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); - LL_INFOS() << message << LL_ENDL; + result["message"] = LLTrans::getString("CompileQueueProblemDownloading") + (":"); + result["alert"] = LLTrans::getString("CompileQueueScriptNotFound"); + } + else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) + { + result["message"] = LLTrans::getString("CompileQueueInsufficientPermFor") + (":"); + result["alert"] = LLTrans::getString("CompileQueueInsufficientPermDownload"); } else { - LLSD compile_errors = response["errors"]; - for (LLSD::array_const_iterator line = compile_errors.beginArray(); - line < compile_errors.endArray(); line++) - { - std::string str = line->asString(); - str.erase(std::remove(str.begin(), str.end(), '\n'), str.end()); + result["message"] = LLTrans::getString("CompileQueueUnknownFailure"); + } + } - queue->getChild("queue output")->addSimpleElement(str, ADD_BOTTOM); + LLEventPumps::instance().post(((HandleScriptUserData *)userData)->getPumpName(), result); + +} + +/*static*/ +void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID parent) +{ + LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", parent); + if (!queue) + return; + + queue->experienceIdsReceived(result["experience_ids"]); + + LLHandle hFloater(queue->getDerivedHandle()); + + fnQueueAction_t fn = boost::bind(LLFloaterCompileQueue::processScript, + queue->getDerivedHandle(), _1, _2, _3); + + + LLCoros::instance().launch("ScriptQueueCompile", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, + queue->mStartString, + hFloater, + queue->mObjectIDs, + fn)); + +} + +bool LLFloaterCompileQueue::processScript(LLHandle hfloater, + const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump) +{ + LLSD result; + LLFloaterCompileQueue *that = hfloater.get(); + bool monocompile = that->mMono; + + if (!that) + return false; + + // Initial test to see if we can (or should) attempt to compile the script. + LLInventoryItem *item = dynamic_cast(inventory); + { + + if (!item->getPermissions().allowModifyBy(gAgent.getID(), gAgent.getGroupID()) || + !item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID())) + { + std::string buffer = "Skipping: " + item->getName() + "(Permissions)"; + that->addStringMessage(buffer); + return true; + } + +// if (!that->checkAssetId(item->getAssetUUID())) +// { +// std::string buffer = "Skipping: " + item->getName() + "(Repeat)"; +// that->addStringMessage(buffer); +// return true; +// } + } + that = NULL; + + // Attempt to retrieve the experience + LLUUID experienceId; + { + LLExperienceCache::instance().fetchAssociatedExperience(inventory->getParentUUID(), inventory->getUUID(), + boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _1)); + + result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + LLSD().with("timeout", LLSD::Boolean(true))); + + that = hfloater.get(); + if (!that) + { + return false; + } + + if (result.has("timeout") && result["timeout"].asBoolean()) + { + std::string buffer = that->getString("Timeout") + ": " + inventory->getName(); + that->addStringMessage(buffer); + return true; + } + + if (result.has(LLExperienceCache::EXPERIENCE_ID)) + { + experienceId = result[LLExperienceCache::EXPERIENCE_ID].asUUID(); + if (!that->hasExperience(experienceId)) + { + that->addProcessingMessage("CompileNoExperiencePerm", LLSD() + .with("SCRIPT", inventory->getName()) + .with("EXPERIENCE", result[LLExperienceCache::NAME].asString())); + return true; } - LL_INFOS() << response["errors"] << LL_ENDL; } } + that = NULL; + + { + HandleScriptUserData userData(pump.getName()); + + + // request the asset + gAssetStorage->getInvItemAsset(LLHost(), + gAgent.getID(), + gAgent.getSessionID(), + item->getPermissions().getOwner(), + object->getID(), + item->getUUID(), + item->getAssetUUID(), + item->getType(), + &LLFloaterCompileQueue::handleScriptRetrieval, + &userData); + + result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + LLSD().with("timeout", LLSD::Boolean(true))); + } + + that = hfloater.get(); + if (!that) + { + return false; + } + + if (result.has("timeout")) + { + if (result.has("timeout") && result["timeout"].asBoolean()) + { + std::string buffer = that->getString("Timeout") + ": " + inventory->getName(); + that->addStringMessage(buffer); + return true; + } + } + + if (result.has("error")) + { + LL_WARNS("SCRIPTQ") << "Inventory fetch returned with error. Code: " << result["error"].asString() << LL_ENDL; + std::string buffer = result["message"].asString() + " " + inventory->getName(); + that->addStringMessage(buffer); + + if (result.has("alert")) + { + LLSD args; + args["MESSAGE"] = result["alert"].asString(); + LLNotificationsUtil::add("SystemMessage", args); + } + return true; + } + + LLUUID assetId = result["asset_id"]; + that = NULL; + + + std::string url = object->getRegion()->getCapability("UpdateScriptTask"); + + + { + LLResourceUploadInfo::ptr_t uploadInfo(new LLQueuedScriptAssetUpload(object->getID(), + inventory->getUUID(), + assetId, + monocompile ? LLScriptAssetUpload::MONO : LLScriptAssetUpload::LSL2, + true, + inventory->getName(), + LLUUID(), + experienceId, + boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4))); + + LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); + } + + result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, LLSD().with("timeout", LLSD::Boolean(true))); + + that = hfloater.get(); + if (!that) + { + return false; + } + + if (result.has("timeout")) + { + if (result.has("timeout") && result["timeout"].asBoolean()) + { + std::string buffer = that->getString("Timeout") + ": " + inventory->getName(); + that->addStringMessage(buffer); + return true; + } + } + + // Bytecode save completed + if (result["compiled"]) + { + std::string buffer = std::string("Compilation of \"") + inventory->getName() + std::string("\" succeeded"); + + that->addStringMessage(buffer); + LL_INFOS() << buffer << LL_ENDL; + } + else + { + LLSD compile_errors = result["errors"]; + std::string buffer = std::string("Compilation of \"") + inventory->getName() + std::string("\" failed:"); + that->addStringMessage(buffer); + for (LLSD::array_const_iterator line = compile_errors.beginArray(); + line < compile_errors.endArray(); line++) + { + std::string str = line->asString(); + str.erase(std::remove(str.begin(), str.end(), '\n'), str.end()); + + that->addStringMessage(str); + } + LL_INFOS() << result["errors"] << LL_ENDL; + } + + return true; } -// This is the callback for when each script arrives -// static -void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status) +bool LLFloaterCompileQueue::startQueue() { - LL_INFOS() << "LLFloaterCompileQueue::scriptArrived()" << LL_ENDL; - LLScriptQueueData* data = (LLScriptQueueData*)user_data; - if(!data) - { - return; - } - LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", data->mQueueID); - - std::string buffer; - if(queue && (0 == status)) - { - LLViewerObject* object = gObjectList.findObject(data->mTaskId); - if (object) + LLViewerRegion* region = gAgent.getRegion(); + if (region) + { + std::string lookup_url = region->getCapability("GetCreatorExperiences"); + if (!lookup_url.empty()) { - std::string url = object->getRegion()->getCapability("UpdateScriptTask"); - std::string scriptName = data->mItem->getName(); + LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t success = + boost::bind(&LLFloaterCompileQueue::processExperienceIdResults, _1, getKey().asUUID()); - LLBufferedAssetUploadInfo::taskUploadFinish_f proc = boost::bind(&LLFloaterCompileQueue::finishLSLUpload, _1, _2, _3, _4, - scriptName, data->mQueueID); + LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t failure = + boost::bind(&LLFloaterCompileQueue::processExperienceIdResults, LLSD(), getKey().asUUID()); - LLResourceUploadInfo::ptr_t uploadInfo(new LLQueuedScriptAssetUpload(data->mTaskId, data->mItem->getUUID(), asset_id, - (queue->mMono) ? LLScriptAssetUpload::MONO : LLScriptAssetUpload::LSL2, - true, scriptName, data->mQueueID, data->mExperienceId, proc)); - - LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); + LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpGet(lookup_url, + success, failure); + return TRUE; } - } - else - { - if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ) - { - LLSD args; - args["MESSAGE"] = LLTrans::getString("CompileQueueScriptNotFound"); - LLNotificationsUtil::add("SystemMessage", args); - - buffer = LLTrans::getString("CompileQueueProblemDownloading") + (": ") + data->mItem->getName(); - } - else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) - { - LLSD args; - args["MESSAGE"] = LLTrans::getString("CompileQueueInsufficientPermDownload"); - LLNotificationsUtil::add("SystemMessage", args); + } - buffer = LLTrans::getString("CompileQueueInsufficientPermFor") + (": ") + data->mItem->getName(); - } - else - { - buffer = LLTrans::getString("CompileQueueUnknownFailure") + (" ") + data->mItem->getName(); - } - - LL_WARNS() << "Problem downloading script asset." << LL_ENDL; - if(queue) queue->removeItemByItemID(data->mItem->getUUID()); - } - if(queue && (buffer.size() > 0)) - { - queue->getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); - } - delete data; + return true; } @@ -514,40 +569,42 @@ LLFloaterResetQueue::~LLFloaterResetQueue() { } -void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv) +bool LLFloaterResetQueue::resetObjectScripts(LLHandle hfloater, + const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump) { - // find all of the lsl, leaving off duplicates. We'll remove - // all matching asset uuids on compilation success. + LLFloaterScriptQueue *that = hfloater.get(); + if (that) + { + std::string buffer; + buffer = that->getString("Resetting") + (": ") + inventory->getName(); + that->addStringMessage(buffer); + } + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ScriptReset); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_Script); + msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); + msg->addUUIDFast(_PREHASH_ItemID, inventory->getUUID()); + msg->sendReliable(object->getRegion()->getHost()); - LLInventoryObject::object_list_t::const_iterator it = inv->begin(); - LLInventoryObject::object_list_t::const_iterator end = inv->end(); - for ( ; it != end; ++it) - { - if((*it)->getType() == LLAssetType::AT_LSL_TEXT) - { - LLViewerObject* object = gObjectList.findObject(viewer_obj->getID()); + return true; +} - if (object) - { - LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); - std::string buffer; - buffer = getString("Resetting") + (": ") + item->getName(); - getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_ScriptReset); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_Script); - msg->addUUIDFast(_PREHASH_ObjectID, viewer_obj->getID()); - msg->addUUIDFast(_PREHASH_ItemID, (*it)->getUUID()); - msg->sendReliable(object->getRegion()->getHost()); - } - } - } +bool LLFloaterResetQueue::startQueue() +{ + fnQueueAction_t fn = boost::bind(LLFloaterResetQueue::resetObjectScripts, + getDerivedHandle(), _1, _2, _3); - nextObject(); + LLCoros::instance().launch("ScriptResetQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, + mStartString, + getDerivedHandle(), + mObjectIDs, + fn)); + + return true; } ///---------------------------------------------------------------------------- @@ -565,44 +622,46 @@ LLFloaterRunQueue::~LLFloaterRunQueue() { } -void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv) +bool LLFloaterRunQueue::runObjectScripts(LLHandle hfloater, + const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump) { - // find all of the lsl, leaving off duplicates. We'll remove - // all matching asset uuids on compilation success. - LLInventoryObject::object_list_t::const_iterator it = inv->begin(); - LLInventoryObject::object_list_t::const_iterator end = inv->end(); - for ( ; it != end; ++it) - { - if((*it)->getType() == LLAssetType::AT_LSL_TEXT) - { - LLViewerObject* object = gObjectList.findObject(viewer_obj->getID()); + LLFloaterScriptQueue *that = hfloater.get(); + if (that) + { + std::string buffer; + buffer = that->getString("Running") + (": ") + inventory->getName(); + that->addStringMessage(buffer); + } - if (object) - { - LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); - LLScrollListCtrl* list = getChild("queue output"); - std::string buffer; - buffer = getString("Running") + (": ") + item->getName(); - list->addSimpleElement(buffer, ADD_BOTTOM); + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_SetScriptRunning); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_Script); + msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); + msg->addUUIDFast(_PREHASH_ItemID, inventory->getUUID()); + msg->addBOOLFast(_PREHASH_Running, TRUE); + msg->sendReliable(object->getRegion()->getHost()); - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_SetScriptRunning); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_Script); - msg->addUUIDFast(_PREHASH_ObjectID, viewer_obj->getID()); - msg->addUUIDFast(_PREHASH_ItemID, (*it)->getUUID()); - msg->addBOOLFast(_PREHASH_Running, TRUE); - msg->sendReliable(object->getRegion()->getHost()); - } - } - } - - nextObject(); + return true; } +bool LLFloaterRunQueue::startQueue() +{ + LLHandle hFloater(getDerivedHandle()); + fnQueueAction_t fn = boost::bind(LLFloaterRunQueue::runObjectScripts, hFloater, _1, _2, _3); + + LLCoros::instance().launch("ScriptRunQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, + mStartString, + hFloater, + mObjectIDs, + fn)); + + return true; +} + + ///---------------------------------------------------------------------------- /// Class LLFloaterNotRunQueue ///---------------------------------------------------------------------------- @@ -618,96 +677,151 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue() { } -void LLFloaterCompileQueue::removeItemByItemID(const LLUUID& asset_id) +bool LLFloaterNotRunQueue::stopObjectScripts(LLHandle hfloater, + const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump) { - LL_INFOS() << "LLFloaterCompileQueue::removeItemByAssetID()" << LL_ENDL; - for(S32 i = 0; i < mCurrentScripts.size(); ) - { - if(asset_id == mCurrentScripts.at(i)->getUUID()) - { - vector_replace_with_last(mCurrentScripts, mCurrentScripts.begin() + i); - } - else - { - ++i; - } - } - if(mCurrentScripts.empty()) - { - nextObject(); - } + LLFloaterScriptQueue *that = hfloater.get(); + if (that) + { + std::string buffer; + buffer = that->getString("NotRunning") + (": ") + inventory->getName(); + that->addStringMessage(buffer); + } + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_SetScriptRunning); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_Script); + msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); + msg->addUUIDFast(_PREHASH_ItemID, inventory->getUUID()); + msg->addBOOLFast(_PREHASH_Running, FALSE); + msg->sendReliable(object->getRegion()->getHost()); + + return true; } -BOOL LLFloaterCompileQueue::startQueue() +bool LLFloaterNotRunQueue::startQueue() { - LLViewerRegion* region = gAgent.getRegion(); - if (region) - { - std::string lookup_url=region->getCapability("GetCreatorExperiences"); - if(!lookup_url.empty()) - { - LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t success = - boost::bind(&LLFloaterCompileQueue::processExperienceIdResults, _1, getKey().asUUID()); + LLHandle hFloater(getDerivedHandle()); - LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t failure = - boost::bind(&LLFloaterCompileQueue::processExperienceIdResults, LLSD(), getKey().asUUID()); + fnQueueAction_t fn = boost::bind(&LLFloaterNotRunQueue::stopObjectScripts, hFloater, _1, _2, _3); + LLCoros::instance().launch("ScriptQueueNotRun", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, + mStartString, + hFloater, + mObjectIDs, + fn)); - LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpGet(lookup_url, - success, failure); - return TRUE; - } - } - return nextObject(); -} - -/*static*/ -void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID parent) -{ - LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", parent); - if (!queue) - return; - - queue->experienceIdsReceived(result["experience_ids"]); -} - -void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv) -{ - // find all of the lsl, leaving off duplicates. We'll remove - // all matching asset uuids on compilation success. - LLInventoryObject::object_list_t::const_iterator it = inv->begin(); - LLInventoryObject::object_list_t::const_iterator end = inv->end(); - for ( ; it != end; ++it) - { - if((*it)->getType() == LLAssetType::AT_LSL_TEXT) - { - LLViewerObject* object = gObjectList.findObject(viewer_obj->getID()); - - if (object) - { - LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); - LLScrollListCtrl* list = getChild("queue output"); - std::string buffer; - buffer = getString("NotRunning") + (": ") +item->getName(); - list->addSimpleElement(buffer, ADD_BOTTOM); - - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_SetScriptRunning); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_Script); - msg->addUUIDFast(_PREHASH_ObjectID, viewer_obj->getID()); - msg->addUUIDFast(_PREHASH_ItemID, (*it)->getUUID()); - msg->addBOOLFast(_PREHASH_Running, FALSE); - msg->sendReliable(object->getRegion()->getHost()); - } - } - } - - nextObject(); + return true; } ///---------------------------------------------------------------------------- /// Local function definitions ///---------------------------------------------------------------------------- +void ObjectInventoryFetcher::inventoryChanged(LLViewerObject* object, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void* user_data) +{ + mInventoryList.clear(); + mInventoryList.assign(inventory->begin(), inventory->end()); + + mPump.post(LLSD().with("changed", LLSD::Boolean(true))); + +} + +void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, + uuid_list_t objectList, fnQueueAction_t func) +{ + LLCoros::set_consuming(true); + LLFloaterScriptQueue * floater(NULL); + LLEventMailDrop maildrop(QUEUE_EVENTPUMP_NAME, true); + +// floater = hfloater.get(); +// floater->addProcessingMessage("Starting", +// LLSD() +// .with("[START]", action) +// .with("[COUNT]", LLSD::Integer(objectList.size()))); +// floater = NULL; + + for (uuid_list_t::iterator itObj(objectList.begin()); (itObj != objectList.end()); ++itObj) + { + bool firstForObject = true; + LL_INFOS("SCRIPTQ") << "Next object in queue with ID=" << (*itObj).asString() << LL_ENDL; + + LLPointer obj = gObjectList.findObject(*itObj); + LLInventoryObject::object_list_t inventory; + if (obj) + { + ObjectInventoryFetcher::ptr_t fetcher(new ObjectInventoryFetcher(maildrop, obj, NULL)); + + fetcher->fetchInventory(); + + LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, TIMEOUT_INVENTORY_FETCH, + LLSD().with("timeout", LLSD::Boolean(true))); + + if (result.has("timeout") && result["timeout"].asBoolean()) + { + LL_WARNS("SCRIPTQ") << "Unable to retrieve inventory for object " << (*itObj).asString() << + ". Skipping to next object." << LL_ENDL; + continue; + } + + inventory.assign(fetcher->getInventoryList().begin(), fetcher->getInventoryList().end()); + } + else + { + LL_WARNS("SCRIPTQ") << "Unable to retrieve object with ID of " << (*itObj) << + ". Skipping to next." << LL_ENDL; + continue; + } + + // TODO: Get the name of the object we are looking at here so that we can display it below. + //std::string objName = (dynamic_cast(obj.get()))->getName(); + LL_DEBUGS("SCRIPTQ") << "Object has " << inventory.size() << " items." << LL_ENDL; + + for (LLInventoryObject::object_list_t::iterator itInv = inventory.begin(); + itInv != inventory.end(); ++itInv) + { + floater = hfloater.get(); + if (!floater) + { + LL_WARNS("SCRIPTQ") << "Script Queue floater closed! Canceling remaining ops" << LL_ENDL; + break; + } + + // note, we have a smart pointer to the obj above... but if we didn't we'd check that + // it still exists here. + + if (((*itInv)->getType() == LLAssetType::AT_LSL_TEXT)) + { + LL_DEBUGS("SCRIPTQ") << "Inventory item " << (*itInv)->getUUID().asString() << "\"" << (*itInv)->getName() << "\"" << LL_ENDL; + if (firstForObject) + { + //floater->addStringMessage(objName + ":"); + firstForObject = false; + } + + if (!func(obj, (*itInv), maildrop)) + { + continue; + } + } + + llcoro::suspend(); + } + // Just test to be sure the floater is still present before calling the func + if (!hfloater.get()) + { + LL_WARNS("SCRIPTQ") << "Script Queue floater dismissed." << LL_ENDL; + break; + } + + } + + floater = hfloater.get(); + if (floater) + { + floater->addStringMessage("Done"); + floater->getChildView("close")->setEnabled(TRUE); + } +} diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 46bcb9746b..271ac5e05d 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -37,6 +37,8 @@ #include "llviewerinventory.h" +#include "llevents.h" + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFloaterScriptQueue // @@ -48,7 +50,7 @@ // scripts manipulated. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLFloaterScriptQueue : public LLFloater, public LLVOInventoryListener +class LLFloaterScriptQueue : public LLFloater/*, public LLVOInventoryListener*/ { public: LLFloaterScriptQueue(const LLSD& key); @@ -64,29 +66,18 @@ public: // start() returns TRUE if the queue has started, otherwise FALSE. BOOL start(); -protected: - // This is the callback method for the viewer object currently - // being worked on. - /*virtual*/ void inventoryChanged(LLViewerObject* obj, - LLInventoryObject::object_list_t* inv, - S32 serial_num, - void* queue); - - // This is called by inventoryChanged - virtual void handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv) = 0; + void addProcessingMessage(const std::string &message, const LLSD &args); + void addStringMessage(const std::string &message); + std::string getStartString() const { return mStartString; } + +protected: static void onCloseBtn(void* user_data); // returns true if this is done BOOL isDone() const; - virtual BOOL startQueue(); - - // go to the next object. If no objects left, it falls out - // silently and waits to be killed by the deleteIfDone() callback. - BOOL nextObject(); - BOOL popNext(); + virtual bool startQueue() = 0; void setStartString(const std::string& s) { mStartString = s; } @@ -96,12 +87,16 @@ protected: LLButton* mCloseBtn; // Object Queue - std::vector mObjectIDs; + uuid_list_t mObjectIDs; LLUUID mCurrentObjectID; bool mDone; std::string mStartString; bool mMono; + + typedef boost::function &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t; + static void objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, uuid_list_t objectList, fnQueueAction_t func); + }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -122,8 +117,6 @@ class LLFloaterCompileQueue : public LLFloaterScriptQueue { friend class LLFloaterReg; public: - // remove any object in mScriptScripts with the matching uuid. - void removeItemByItemID(const LLUUID& item_id); void experienceIdsReceived( const LLSD& content ); BOOL hasExperience(const LLUUID& id)const; @@ -132,27 +125,17 @@ protected: LLFloaterCompileQueue(const LLSD& key); virtual ~LLFloaterCompileQueue(); - // This is called by inventoryChanged - virtual void handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv); + virtual bool startQueue(); - static void requestAsset(struct LLScriptQueueData* datap, const LLSD& experience); + static bool processScript(LLHandle hfloater, const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump); - - static void finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, std::string scriptName, LLUUID queueId); - - // This is the callback for when each script arrives - static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status); - - virtual BOOL startQueue(); -protected: - LLViewerInventoryItem::item_array_t mCurrentScripts; + //bool checkAssetId(const LLUUID &assetId); + static void handleHTTPResponse(std::string pumpName, const LLSD &expresult); + static void handleScriptRetrieval(LLVFS *vfs, const LLUUID& assetId, LLAssetType::EType type, void* userData, S32 status, LLExtStat extStatus); private: static void processExperienceIdResults(LLSD result, LLUUID parent); - + //uuid_list_t mAssetIds; // list of asset IDs processed. uuid_list_t mExperienceIds; }; @@ -169,9 +152,9 @@ protected: LLFloaterResetQueue(const LLSD& key); virtual ~LLFloaterResetQueue(); - // This is called by inventoryChanged - virtual void handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv); + static bool resetObjectScripts(LLHandle hfloater, const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump); + + virtual bool startQueue(); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -186,10 +169,10 @@ class LLFloaterRunQueue : public LLFloaterScriptQueue protected: LLFloaterRunQueue(const LLSD& key); virtual ~LLFloaterRunQueue(); - - // This is called by inventoryChanged - virtual void handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv); + + static bool runObjectScripts(LLHandle hfloater, const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump); + + virtual bool startQueue(); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -205,9 +188,9 @@ protected: LLFloaterNotRunQueue(const LLSD& key); virtual ~LLFloaterNotRunQueue(); - // This is called by inventoryChanged - virtual void handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv); + static bool stopObjectScripts(LLHandle hfloater, const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump); + + virtual bool startQueue(); }; #endif // LL_LLCOMPILEQUEUE_H From c8b662814093fa6ed592fb9cb5118a1401fdc488 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 10 Jun 2016 13:25:22 -0700 Subject: [PATCH 086/134] Make string ref in HandleScriptUserData const --- indra/newview/llcompilequeue.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 1c9f766666..c592a6c0c6 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -98,6 +98,19 @@ namespace LLEventPump & mPump; }; + class HandleScriptUserData + { + public: + HandleScriptUserData(const std::string &pumpname) : + mPumpname(pumpname) + { } + + const std::string &getPumpName() const { return mPumpname; } + + private: + std::string mPumpname; + }; + } @@ -275,19 +288,6 @@ void LLFloaterCompileQueue::handleHTTPResponse(std::string pumpName, const LLSD LLEventPumps::instance().post(pumpName, expresult); } -class HandleScriptUserData -{ -public: - HandleScriptUserData(std::string &pumpname) : - mPumpname(pumpname) - { } - - const std::string &getPumpName() const { return mPumpname; } - -private: - std::string mPumpname; -}; - // *TODO: handleSCriptRetrieval is passed into the VFS via a legacy C function pointer // future project would be to convert these to C++ callables (std::function<>) so that // we can use bind and remove the userData parameter. From 12f2b446f884115417739719eab4729e93a8b1d8 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 15 Jun 2016 10:09:00 +0200 Subject: [PATCH 087/134] Transplant MAINT-6408 & MAINT-6446 (Fix password length) --- indra/newview/fspanellogin.cpp | 2 +- indra/newview/skins/default/xui/en/panel_fs_login.xml | 2 +- indra/newview/skins/default/xui/en/panel_fs_nui_login.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/fspanellogin.cpp b/indra/newview/fspanellogin.cpp index a6134f7d27..2690b69fbe 100644 --- a/indra/newview/fspanellogin.cpp +++ b/indra/newview/fspanellogin.cpp @@ -1026,7 +1026,7 @@ void FSPanelLogin::updateServer() loadLoginPage(); #ifdef OPENSIM - sInstance->getChild("password_edit")->setMaxTextLength(LLGridManager::getInstance()->isInSecondLife() ? MAX_PASSWORD_SL : MAX_PASSWORD_OPENSIM); + sInstance->getChild("password_edit")->setMaxTextChars(LLGridManager::getInstance()->isInSecondLife() ? MAX_PASSWORD_SL : MAX_PASSWORD_OPENSIM); #endif } catch (LLInvalidGridName ex) diff --git a/indra/newview/skins/default/xui/en/panel_fs_login.xml b/indra/newview/skins/default/xui/en/panel_fs_login.xml index 9fdccec641..eccd74f934 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_login.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_login.xml @@ -120,7 +120,7 @@ Date: Wed, 15 Jun 2016 10:50:25 +0200 Subject: [PATCH 088/134] Fix crash during script recompilation and fix other translations on the way --- indra/newview/llcompilequeue.cpp | 41 +++++++++++++++---- .../default/xui/de/floater_script_queue.xml | 15 +++++++ .../default/xui/en/floater_script_queue.xml | 20 +++++++++ 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index f47111b2d0..641aa236de 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -159,7 +159,12 @@ public: LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", LLSD(mQueueId)); if (queue) { - std::string message = std::string("Compiling \"") + getScriptName() + std::string("\"..."); + // Translation fixes + //std::string message = std::string("Compiling \"") + getScriptName() + std::string("\"..."); + LLStringUtil::format_map_t args; + args["NAME"] = getScriptName(); + std::string message = queue->getString("Compiling", args); + // queue->getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); } @@ -393,7 +398,9 @@ void LLFloaterCompileQueue::handleScriptRetrieval(LLVFS *vfs, const LLUUID& asse // put a EOS at the end script_data[file_length] = 0; - LLFloaterCompileQueue::scriptLogMessage(data, "Preprocessing: " + data->mItem->getName()); + LLStringUtil::format_map_t args; + args["SCRIPT"] = data->mItem->getName(); + LLFloaterCompileQueue::scriptLogMessage(data, LLTrans::getString("CompileQueuePreprocessing", args)); queue->mLSLProc->preprocess_script(assetId, data, type, LLStringExplicit(&script_data[0])); } @@ -445,7 +452,12 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat if (!item->getPermissions().allowModifyBy(gAgent.getID(), gAgent.getGroupID()) || !item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID())) { - std::string buffer = "Skipping: " + item->getName() + "(Permissions)"; + // Translation fixes + //std::string buffer = "Skipping: " + item->getName() + "(Permissions)"; + LLStringUtil::format_map_t args; + args["NAME"] = item->getName(); + std::string buffer = that->getString("SkippingPermissions", args); + // that->addStringMessage(buffer); return true; } @@ -626,13 +638,23 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { std::string buffer = std::string("Compilation of \"") + inventory->getName() + std::string("\" succeeded"); - that->addStringMessage(buffer); + //that->addStringMessage(buffer); LL_INFOS() << buffer << LL_ENDL; + // Translation fixes + LLStringUtil::format_map_t args; + args["NAME"] = inventory->getName(); + that->addStringMessage(that->getString("CompileSuccess", args)); + // } else { LLSD compile_errors = result["errors"]; - std::string buffer = std::string("Compilation of \"") + inventory->getName() + std::string("\" failed:"); + // Translation fixes + //std::string buffer = std::string("Compilation of \"") + inventory->getName() + std::string("\" failed:"); + LLStringUtil::format_map_t args; + args["NAME"] = inventory->getName(); + std::string buffer = that->getString("CompileFailure", args); + // that->addStringMessage(buffer); for (LLSD::array_const_iterator line = compile_errors.beginArray(); line < compile_errors.endArray(); line++) @@ -996,7 +1018,10 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L floater = hfloater.get(); if (floater) { - floater->addStringMessage("Done"); + // Translation fixes + //floater->addStringMessage("Done"); + floater->addStringMessage(floater->getString("Done")); + // floater->getChildView("close")->setEnabled(TRUE); } } @@ -1018,7 +1043,9 @@ public: LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", LLSD(mQueueId)); if (queue) { - std::string message = std::string("Compiling \"") + getScriptName() + std::string("\"..."); + LLStringUtil::format_map_t args; + args["NAME"] = getScriptName(); + std::string message = queue->getString("Compiling", args); queue->getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); } diff --git a/indra/newview/skins/default/xui/de/floater_script_queue.xml b/indra/newview/skins/default/xui/de/floater_script_queue.xml index d1facd2d15..56656b4f80 100644 --- a/indra/newview/skins/default/xui/de/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/de/floater_script_queue.xml @@ -18,5 +18,20 @@ Wird gelöscht + + Zeitüberschreitung: [NAME] + + + Übersprungen: [NAME] (Berechtigungen) + + + Kompiliere „[NAME]“... + + + Kompilierung von „[NAME]“ erfolgreich + + + Kompilierung von „[NAME]“ fehlgeschlagen: +