From 29b544bde609eec4b4859bf915f0b8657f3d0d1f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 7 Apr 2016 11:28:37 +0300 Subject: 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(-) (limited to 'indra') 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; -- cgit v1.2.3 From 8c973c812b956bda1f1afa1d6be4b5fb9ffd7ce6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 7 Apr 2016 14:52:20 +0300 Subject: 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(+) (limited to 'indra') 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 -- cgit v1.2.3 From f5c21ce1aef74bd79cbcb8c7a6cd4f9f4891c993 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 8 Apr 2016 18:23:35 +0300 Subject: MAINT-6320 Snapshot floater is stuck in 'Saving to Inventory' state. --- indra/newview/llviewerassetupload.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra') 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"))); + } + } -- cgit v1.2.3 From 1a2d326c2b7b24139c85dc10f63ecfd37db7eca4 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 11 Apr 2016 14:25:08 +0300 Subject: 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 + .../skins/default/xui/en/menu_people_nearby.xml | 16 +++ 5 files changed, 231 insertions(+), 2 deletions(-) (limited to 'indra') 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" /> + + + + + + + + -- cgit v1.2.3 From 8f52908994da1788fb68f551758d4a8e143a65ba Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 12 Apr 2016 12:35:04 +0300 Subject: 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(-) (limited to 'indra') 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 } -- cgit v1.2.3 From e5048ad8b2648fa05f6a02cc39f06ce9ec53ec87 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 14 Apr 2016 13:06:44 +0300 Subject: 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(+) (limited to 'indra') 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"); -- cgit v1.2.3 From c436716d92f3f38686b8d138e8e52a378c044490 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 12 Apr 2016 17:50:05 +0300 Subject: MAINT-6301 Recent tab sorting changes do not persist between logins --- indra/newview/llpanelmaininventory.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra') 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 -- cgit v1.2.3 From af408181c134e08b4b19f173d56b912c9e1f153b Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 14 Apr 2016 02:10:21 +0300 Subject: 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 + .../newview/skins/default/xui/en/notifications.xml | 13 +++++++++++ 3 files changed, 39 insertions(+) (limited to 'indra') 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: 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(-) (limited to 'indra') 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; -- cgit v1.2.3 From 2311d8c2b200574a0fb38c80222a0f09ce984f67 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 15 Apr 2016 15:33:27 +0300 Subject: MAINT-4220 Raise UIScaleFactor limit --- indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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" -- cgit v1.2.3 From eec33adf34db3fe0c32600808458e4307ede1bf0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 13 Apr 2016 18:59:00 +0300 Subject: 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 +++++++++++++++-- .../newview/skins/default/xui/en/notifications.xml | 16 ++++++++++++++++ 5 files changed, 63 insertions(+), 7 deletions(-) (limited to 'indra') 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: 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 +++++++++++ indra/newview/skins/default/xui/en/menu_object_icon.xml | 3 +++ 2 files changed, 14 insertions(+) (limited to 'indra') 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 @@ + -- cgit v1.2.3 From bb719baec5b3000d0e9671283f5b5e9f23e780ac Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 21 Apr 2016 16:16:16 +0300 Subject: 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(-) (limited to 'indra') 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"); -- cgit v1.2.3 From e302b6f1f451f8a2388698b3528fb71af9cf41b2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 22 Apr 2016 18:41:45 +0300 Subject: 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(-) (limited to 'indra') 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() -- cgit v1.2.3 From 772f0db14ecf721302d4c2a56f66a73a080f7b36 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 25 Apr 2016 13:05:35 +0300 Subject: MAINT-6283 reverted --- indra/newview/lllogchat.cpp | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) (limited to 'indra') 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; } } -- cgit v1.2.3 From 4a94133b072fc9263bf632f85468d2498a9c7eae Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 27 Apr 2016 10:56:38 +0300 Subject: 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(+) (limited to 'indra') 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 @@ + + + -- cgit v1.2.3 From c1a56f9fb784b1f64ddae45c6dd5bb9f5ae6eecd Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 27 Apr 2016 10:58:44 +0300 Subject: 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(-) (limited to 'indra') 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); -- cgit v1.2.3 From 8d9f1ca337bc566511e9f65f82228235857903a8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 26 Apr 2016 18:21:55 +0300 Subject: 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(-) (limited to 'indra') 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()); } } } -- cgit v1.2.3 From b493edd2c32273b767d8bc3177b3b662947a5655 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 27 Apr 2016 18:06:57 +0300 Subject: 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(-) (limited to 'indra') 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 -- cgit v1.2.3 From e05c7d70d4bb338426c29728659dd6ef75459e0d Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 28 Apr 2016 13:06:55 +0300 Subject: 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(-) (limited to 'indra') 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); -- cgit v1.2.3 From 5ec93df56a27af6763ae7fbd84bd6edd4145540b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 27 Apr 2016 20:54:21 +0300 Subject: 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(-) (limited to 'indra') 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: MAINT-6370 Second Life uninstall does not remove registry keys handling secondlife protocols --- .../newview/installers/windows/installer_template.nsi | 11 +++++++++++ indra/newview/installers/windows/lang_en-us.nsi | Bin 8510 -> 9096 bytes 2 files changed, 11 insertions(+) (limited to 'indra') 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 343c312ddc..aa403a961c 100755 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ -- cgit v1.2.3 From b2fd39781833cf00c09d70704f13a8fa58428292 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 4 May 2016 11:31:00 +0300 Subject: 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 ++++++++++++++++++++ .../default/xui/en/menu_people_friends_view.xml | 8 ++++++++ .../default/xui/en/menu_people_nearby_view.xml | 8 ++++++++ 12 files changed, 146 insertions(+), 13 deletions(-) (limited to 'indra') 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" /> + + + + + + + + -- cgit v1.2.3 From eae82c8e4794e2d8374dd8d70547b00c5ac4f300 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 4 May 2016 14:59:22 +0300 Subject: 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(-) (limited to 'indra') 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; } -- cgit v1.2.3 From 51cf02086a5f172bb49872945aa66e72fd5db561 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 6 May 2016 15:00:19 +0300 Subject: MAINT-6376 Disable loading surface textures in the wireframe mode --- indra/newview/llviewertexture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') 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; } -- cgit v1.2.3 From 3d68b80bd3f981717ec60b4ba71de9e917a4d073 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 20 May 2016 16:55:46 +0300 Subject: 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(-) (limited to 'indra') 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: MAINT-2583 Minimized floaters cannot brought back to foreground anymore --- indra/llui/llfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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 ); } -- cgit v1.2.3 From efa716b5fcaa0f0faa4003e072747898a223e983 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 18 May 2016 19:29:31 +0300 Subject: 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 ++++++++++++-- .../skins/default/xui/en/menu_url_objectim.xml | 7 +++++++ 9 files changed, 81 insertions(+), 4 deletions(-) (limited to 'indra') 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: Mon, 23 May 2016 18:06:16 +0300 Subject: MAINT-2129 signuls cleanup --- indra/llui/lltextbase.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') 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) -- cgit v1.2.3 From 709c15dc233134370425687cfd429b48d6205afa Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 10 May 2016 19:35:41 +0200 Subject: Display correct attempt for requesting region capabilities at startup --- indra/newview/llviewerregion.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') 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 { -- cgit v1.2.3 From 54bbf95f26c7412a0febb9279981c820d2a45c3d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 11 May 2016 18:33:50 +0300 Subject: MAINT-5635 PSYS_SRC_MAX_AGE breaks when replacing a particle system without it --- indra/newview/llviewerpartsource.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra') 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); -- cgit v1.2.3 From 5048402da82417f653060ef04cfc36bb67f8cd2f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 12 May 2016 17:46:20 +0300 Subject: MAINT-5786 FIXED Redundant sibling index suffix on uploaded mesh object names. --- indra/llprimitive/lldaeloader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra') 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"); -- cgit v1.2.3 From 87ca1fc3d9ec4650147882f7b8cd85c38c983066 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 13 May 2016 13:33:14 +0300 Subject: MAINT-6400 Make the region "Object Bonus" setting safer --- indra/newview/llfloaterregioninfo.cpp | 52 +++++++++++++++++++++- indra/newview/llfloaterregioninfo.h | 7 +++ .../newview/skins/default/xui/en/notifications.xml | 13 ++++++ 3 files changed, 71 insertions(+), 1 deletion(-) (limited to 'indra') 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: 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(-) (limited to 'indra') 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" -- cgit v1.2.3 From b756b47d08d028a40d0a49b11755d31f47efe46d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 13 May 2016 19:42:27 +0300 Subject: 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(-) (limited to 'indra') 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. -- cgit v1.2.3 From e3afb1fdbadd3d6cdae7c261e7a975f3bf9faa89 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 16 May 2016 17:50:09 +0300 Subject: MAINT-5935 server timestamp --- indra/newview/llstartup.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra') 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; } } -- cgit v1.2.3 From 58e9a5919952cbd0a5b2112bf5c72db09c4750ec Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 16 May 2016 14:49:40 -0700 Subject: fix for maint-6413: add channel to summary.json --- indra/newview/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') 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 ) -- cgit v1.2.3 From 191c2aec49491c74a6ce9b23a813dc89d63f2c6a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 18 May 2016 13:15:01 +0300 Subject: MAINT-6377 Nearby chat toasts cover the conversation floater. --- indra/newview/llfloaterimnearbychathandler.cpp | 25 ++++++++++++++++++++++--- indra/newview/llfloaterimsessiontab.cpp | 6 ++++++ indra/newview/llfloaterimsessiontab.h | 2 ++ 3 files changed, 30 insertions(+), 3 deletions(-) (limited to 'indra') 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 -- cgit v1.2.3 From e795fee86448970881066af95de7eac8e4847d14 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 17 May 2016 17:05:59 +0300 Subject: MAINT-6409 texture_list xml file should be in cache. --- indra/newview/llviewertexturelist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') 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; -- cgit v1.2.3 From a382dcfb8dbc26fa7e73647bf996e9d166bfce6d Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 17 May 2016 10:52:59 -0700 Subject: maint-6413: use file write as printf inserts escape chars --- indra/newview/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') 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 -- cgit v1.2.3 From e8773a72cb63f693b00100de4e02ab073f531b4f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 17 May 2016 16:05:37 -0700 Subject: 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 (limited to 'indra') 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@" +} -- cgit v1.2.3 From d3de134da047460c68ffd7cc732e592049a1e83d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 18 May 2016 17:17:32 +0300 Subject: 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(-) (limited to 'indra') 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() -- cgit v1.2.3 From 213bcf6bb30f9e2d4eb8bb6cbd200c94bae29b6f Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 19 May 2016 11:47:23 -0700 Subject: 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(-) (limited to 'indra') 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) -- cgit v1.2.3 From 602c9bc04ab5c611bcac51c0c33d5ad34d06a16f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 20 May 2016 02:12:26 +0300 Subject: MAINT-6317 Restored the fix after a conflict resolution --- indra/newview/llviewertexturelist.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra') 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() -- cgit v1.2.3 From 61a5c943ba33494e3d2ee60296e56932c7aa362a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 22 May 2016 20:32:27 +0200 Subject: 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 --- indra/newview/featuretable.txt | 2 +- indra/newview/featuretable_linux.txt | 2 +- indra/newview/featuretable_mac.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') 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 -- cgit v1.2.3 From 8edfdc617df6e282570521a9076d077699e632e5 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 23 May 2016 02:23:03 +0300 Subject: 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(-) (limited to 'indra') 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]. -- cgit v1.2.3 From 8c458778717666c7be7c6e0f0b19f28deb54b50f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 12:05:53 -0700 Subject: backout 354345 --- indra/newview/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra') 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 -- cgit v1.2.3 From 9c28c06f1da98ba42d4d5546a2b2cdb7b042c13e Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 12:08:59 -0700 Subject: 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 (limited to 'indra') 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@" -} -- cgit v1.2.3 From 999a949b52b50d5330c717fde19af3931e256f11 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 23 May 2016 13:49:26 -0700 Subject: debug version args --- indra/newview/CMakeLists.txt | 9 +-------- indra/newview/viewer_manifest.py | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'indra') 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), -- cgit v1.2.3 From c7413e51b6286a003d6629108d2757b5ff973c2b Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 23 May 2016 14:40:43 -0700 Subject: 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(-) (limited to 'indra') 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)) { -- cgit v1.2.3 From ce760e80c492d1c3e13306a1d06aa734b4d829a9 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 24 May 2016 11:43:57 -0700 Subject: 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(-) (limited to 'indra') 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" -- cgit v1.2.3 From 6f4d9a232175202f79ecd1c1a2df30805de4e2d8 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 25 May 2016 03:29:53 +0300 Subject: MAINT-6424 Reverted disabling of the "Delete preset" button --- indra/newview/llfloaterdeleteprefpreset.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra') 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; } -- cgit v1.2.3 From 110c0658b7272a09f09fa3d8b024062bf2cc4dce Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 25 May 2016 03:47:23 +0300 Subject: MAINT-6413 Buildfix --- indra/newview/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') 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 -- cgit v1.2.3 From fb598cd380b38714abed554b8feacabfc55b2aaa Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 25 May 2016 12:39:27 +0300 Subject: 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(-) (limited to 'indra') 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(); -- cgit v1.2.3 From 67f8d57927f845cfb35783a1678c0e3d2ad51b61 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 24 May 2016 15:17:41 +0300 Subject: MAINT-6216 avatars are sometimes invisible BUG-10330 Sitting avatars are sometimes invisible --- indra/newview/llvoavatar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') 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(); -- cgit v1.2.3 From 26b1c020c8a8d240144dadae1285c14213cb1232 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 24 May 2016 13:03:36 -0700 Subject: 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(-) (limited to 'indra') 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()) -- cgit v1.2.3 From 0d5edb03a226a62bb416ddca250e4f1f789f56fd Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 27 May 2016 03:34:37 +0300 Subject: 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 | 57 ++++++++++++++++++++++-------------- indra/newview/llpresetsmanager.h | 2 +- 4 files changed, 99 insertions(+), 23 deletions(-) (limited to 'indra') 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) + { + 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 { - 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; + 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; + } } 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); -- cgit v1.2.3 From f282c31f0107f05ae9e943d2fdda516cdaf3f3fa Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 31 May 2016 16:56:45 +0300 Subject: MAINT-2129 One more Block button --- indra/newview/llinspectremoteobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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)); } ////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From aca2dab2d0ff7d66576b5d79f34eb9a706187de4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 3 Jun 2016 20:09:33 +0300 Subject: MAINT-6460 Crash calculating mesh complexity --- indra/newview/llmeshrepository.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') 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); -- cgit v1.2.3 From f9023371ba6b9bae9eef353ca8b42e4619b8ee01 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 8 Jun 2016 03:49:55 +0300 Subject: MAINT-6461 Added a null check --- indra/llui/llview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') 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(); -- cgit v1.2.3 From 1adfaa081fd27d653619c84c520c16516c530ab1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 1 Jun 2016 16:56:04 +0300 Subject: MAINT-6446 Correct password length handling --- indra/llcommon/llstring.cpp | 27 ++++++++++++++++++++++ indra/llcommon/llstring.h | 11 +++++++++ indra/llui/lllineeditor.cpp | 7 +----- indra/newview/skins/default/xui/en/panel_login.xml | 2 +- .../skins/default/xui/en/panel_login_first.xml | 2 +- 5 files changed, 41 insertions(+), 8 deletions(-) (limited to 'indra') 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" -- cgit v1.2.3 From 1e803a6bd7a89f60407a1fd2b2697d9e5dd23467 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 10 Jun 2016 12:33:39 -0700 Subject: 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 | 908 ++++++++++++++++++++++----------------- indra/newview/llcompilequeue.h | 77 ++-- 3 files changed, 545 insertions(+), 444 deletions(-) (limited to 'indra') 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(); } -BOOL LLFloaterScriptQueue::isDone() const +void LLFloaterScriptQueue::addProcessingMessage(const std::string &message, const LLSD &args) { - return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0)); -} + std::string buffer(LLTrans::getString(message, args)); -// 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; + getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); } -// returns true if the queue has started, otherwise false. This -// method pops the top object off of the queue. -BOOL LLFloaterScriptQueue::popNext() +void LLFloaterScriptQueue::addStringMessage(const std::string &message) { - // 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; + getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); } -BOOL LLFloaterScriptQueue::startQueue() + +BOOL LLFloaterScriptQueue::isDone() const { - return nextObject(); + return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0)); } - ///---------------------------------------------------------------------------- /// 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; + LLEventPumps::instance().post(pumpName, expresult); +} - 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)); - } - } - } +class HandleScriptUserData +{ +public: + HandleScriptUserData(std::string &pumpname) : + mPumpname(pumpname) + { } - 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)); - } - } -} + const std::string &getPumpName() const { return mPumpname; } +private: + std::string mPumpname; +}; -void LLFloaterCompileQueue::requestAsset( LLScriptQueueData* datap, const LLSD& experience ) +// *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) { - 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); + LLSD result(LLSD::emptyMap()); + + result["asset_id"] = assetId; + if (status) + { + result["error"] = status; + + if (status == LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE) + { + 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 + { + result["message"] = LLTrans::getString("CompileQueueUnknownFailure"); + } + } + + LLEventPumps::instance().post(((HandleScriptUserData *)userData)->getPumpName(), result); + } /*static*/ -void LLFloaterCompileQueue::finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, std::string scriptName, LLUUID queueId) +void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID parent) { + LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", parent); + if (!queue) + return; - LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", LLSD(queueId)); - if (queue) + 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); { - // Bytecode save completed - if (response["compiled"]) + + if (!item->getPermissions().allowModifyBy(gAgent.getID(), gAgent.getGroupID()) || + !item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID())) { - std::string message = std::string("Compilation of \"") + scriptName + std::string("\" succeeded"); + std::string buffer = "Skipping: " + item->getName() + "(Permissions)"; + that->addStringMessage(buffer); + return true; + } - queue->getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); - LL_INFOS() << message << LL_ENDL; +// 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; } - else + + if (result.has("timeout") && result["timeout"].asBoolean()) { - 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()); + std::string buffer = that->getString("Timeout") + ": " + inventory->getName(); + that->addStringMessage(buffer); + return true; + } - queue->getChild("queue output")->addSimpleElement(str, ADD_BOTTOM); + 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(); - - LLBufferedAssetUploadInfo::taskUploadFinish_f proc = boost::bind(&LLFloaterCompileQueue::finishLSLUpload, _1, _2, _3, _4, - scriptName, data->mQueueID); + LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t success = + boost::bind(&LLFloaterCompileQueue::processExperienceIdResults, _1, 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)); + LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t failure = + boost::bind(&LLFloaterCompileQueue::processExperienceIdResults, LLSD(), getKey().asUUID()); - 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()); + + return true; +} - 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)); - 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); + + LLCoros::instance().launch("ScriptResetQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, + mStartString, + getDerivedHandle(), + mObjectIDs, + fn)); - nextObject(); + 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()); - - 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, viewer_obj->getID()); - msg->addUUIDFast(_PREHASH_ItemID, (*it)->getUUID()); - msg->addBOOLFast(_PREHASH_Running, TRUE); - msg->sendReliable(object->getRegion()->getHost()); - } - } - } + LLFloaterScriptQueue *that = hfloater.get(); + if (that) + { + std::string buffer; + buffer = that->getString("Running") + (": ") + inventory->getName(); + that->addStringMessage(buffer); + } - nextObject(); + 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()); + + 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(); + return true; } -/*static*/ -void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID parent) +///---------------------------------------------------------------------------- +/// Local function definitions +///---------------------------------------------------------------------------- +void ObjectInventoryFetcher::inventoryChanged(LLViewerObject* object, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void* user_data) { - LLFloaterCompileQueue* queue = LLFloaterReg::findTypedInstance("compile_queue", parent); - if (!queue) - return; + mInventoryList.clear(); + mInventoryList.assign(inventory->begin(), inventory->end()); + + mPump.post(LLSD().with("changed", LLSD::Boolean(true))); - queue->experienceIdsReceived(result["experience_ids"]); } -void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj, - LLInventoryObject::object_list_t* inv) +void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, + uuid_list_t objectList, fnQueueAction_t func) { - // 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()); - } - } - } + 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; - nextObject(); -} + LLPointer obj = gObjectList.findObject(*itObj); + LLInventoryObject::object_list_t inventory; + if (obj) + { + ObjectInventoryFetcher::ptr_t fetcher(new ObjectInventoryFetcher(maildrop, obj, NULL)); -///---------------------------------------------------------------------------- -/// Local function definitions -///---------------------------------------------------------------------------- + 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); - - static void requestAsset(struct LLScriptQueueData* datap, const LLSD& experience); + virtual bool startQueue(); + 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 -- cgit v1.2.3 From c8b662814093fa6ed592fb9cb5118a1401fdc488 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 10 Jun 2016 13:25:22 -0700 Subject: Make string ref in HandleScriptUserData const --- indra/newview/llcompilequeue.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra') 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. -- cgit v1.2.3 From c664ae73c3fa46e430306d7b24af3026246f8097 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 15 Jun 2016 18:01:44 +0300 Subject: MAINT-6460 additional header check --- indra/newview/llmeshrepository.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 117507ef39..39ebf9f95b 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -4034,7 +4034,7 @@ 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) + if (header.size() == 0 || header.has("404") || header["version"].asInteger() > MAX_MESH_VERSION) { return 0.f; } -- cgit v1.2.3 From 0597f876469d8ef672a270528cbeecc069ab5e66 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 15 Jun 2016 13:42:39 -0700 Subject: MAINT-6486: Use literal string. Don't try and look it up. --- indra/newview/llcompilequeue.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index c592a6c0c6..ea2e284305 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -393,7 +393,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = that->getString("Timeout") + ": " + inventory->getName(); + std::string buffer = "Timeout: " + inventory->getName(); that->addStringMessage(buffer); return true; } @@ -443,7 +443,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = that->getString("Timeout") + ": " + inventory->getName(); + std::string buffer = "Timeout: " + inventory->getName(); that->addStringMessage(buffer); return true; } @@ -497,7 +497,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = that->getString("Timeout") + ": " + inventory->getName(); + std::string buffer = "Timeout: " + inventory->getName(); that->addStringMessage(buffer); return true; } -- cgit v1.2.3 From 2b287b6bf7313100c78cc7c6186654e832c1887f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 16 Jun 2016 23:27:39 +0300 Subject: MAINT-6511 Added a null check in LLFloaterView::restoreAll --- indra/llui/llfloater.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 5ea9f5b6cc..69038a8627 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2321,7 +2321,10 @@ void LLFloaterView::restoreAll() for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { LLFloater* floaterp = (LLFloater*)*child_it; - floaterp->setMinimized(FALSE); + if (floaterp) + { + floaterp->setMinimized(FALSE); + } } // *FIX: make sure dependents are restored -- cgit v1.2.3 From e2ee3a151978d1783baecefd337530bd7fde7c9b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Jun 2016 16:47:12 +0300 Subject: MAINT-6534 Resetting scripts fails due to small timeout --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llcompilequeue.cpp | 11 ++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4912f27e70..ce2d652c37 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3701,6 +3701,17 @@ Value 1 + QueueInventoryFetchTimeout + + Comment + Max time llcompilequeue will wait for inventory fetch to complete (in seconds) + Persist + 1 + Type + F32 + Value + 40.0 + FindLandArea Comment diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index ea2e284305..de7bc1e3c5 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -66,7 +66,6 @@ namespace { const std::string QUEUE_EVENTPUMP_NAME("ScriptActionQueue"); - const F32 TIMEOUT_INVENTORY_FETCH(5.0); class ObjectInventoryFetcher: public LLVOInventoryListener @@ -351,6 +350,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLSD result; LLFloaterCompileQueue *that = hfloater.get(); bool monocompile = that->mMono; + F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout"); if (!that) return false; @@ -382,7 +382,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLExperienceCache::instance().fetchAssociatedExperience(inventory->getParentUUID(), inventory->getUUID(), boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _1)); - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); that = hfloater.get(); @@ -429,7 +429,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat &LLFloaterCompileQueue::handleScriptRetrieval, &userData); - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); } @@ -485,7 +485,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); } - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, LLSD().with("timeout", LLSD::Boolean(true))); + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); that = hfloater.get(); if (!that) @@ -735,6 +735,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L LLCoros::set_consuming(true); LLFloaterScriptQueue * floater(NULL); LLEventMailDrop maildrop(QUEUE_EVENTPUMP_NAME, true); + F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout"); // floater = hfloater.get(); // floater->addProcessingMessage("Starting", @@ -756,7 +757,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L fetcher->fetchInventory(); - LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, TIMEOUT_INVENTORY_FETCH, + LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); if (result.has("timeout") && result["timeout"].asBoolean()) -- cgit v1.2.3 From 33be227716b0fa675f010555e753f45adb746971 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 2 Jun 2016 19:59:35 +0300 Subject: MAINT-6448 PERMISSION_DEBIT notification should default to Deny --- indra/newview/lltoastscriptquestion.cpp | 19 +++++++++++++++++++ indra/newview/lltoastscriptquestion.h | 2 ++ 2 files changed, 21 insertions(+) (limited to 'indra') 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(); -- cgit v1.2.3 From 8d542a46c7b1c5eb1817076348c0793fa6d3f617 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 8 Jul 2016 18:50:19 +0300 Subject: MAINT-6534 Fixed the LLSD validation failure --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ce2d652c37..aaf41b68b4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3710,7 +3710,7 @@ Type F32 Value - 40.0 + 40.0 FindLandArea -- cgit v1.2.3 From 1c7548d3bfaa6f2351d8102e53b2dd90a5d864e7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 8 Jul 2016 15:07:52 +0300 Subject: MAINT-6448 PERMISSION_DEBIT notification should default to Deny --- indra/newview/lltoast.cpp | 15 +++++++++++++++ indra/newview/lltoast.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'indra') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 7020ac0c65..edde7c8076 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -202,6 +202,21 @@ void LLToast::hide() } } +/*virtual*/ +void LLToast::setFocus(BOOL b) +{ + if (b && !hasFocus() && mPanel) + { + LLModalDialog::setFocus(TRUE); + // mostly for buttons + mPanel->setFocus(TRUE); + } + else + { + LLModalDialog::setFocus(b); + } +} + void LLToast::onFocusLost() { if(mWrapperPanel && !isBackgroundVisible()) diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index f02d7c2a1a..cd92189012 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -150,6 +150,8 @@ public: // virtual void hide(); + /*virtual*/ void setFocus(BOOL b); + /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); -- cgit v1.2.3 From a3f63bce3c5f45e2275980363bbb598cd6861bc8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Jul 2016 16:23:18 +0300 Subject: MAINT-6534 Resetting scripts via the build menu no longer works on many scripted objects --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llcompilequeue.cpp | 60 ++++++++++++++++------ indra/newview/llcompilequeue.h | 13 +++-- indra/newview/llviewermenu.cpp | 13 +++-- .../skins/default/xui/en/floater_script_queue.xml | 8 +++ 5 files changed, 71 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aaf41b68b4..6ccf89eabe 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3710,7 +3710,7 @@ Type F32 Value - 40.0 + 300.0 FindLandArea diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index de7bc1e3c5..7721e67290 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -207,9 +207,10 @@ void LLFloaterScriptQueue::onCloseBtn(void* user_data) self->closeFloater(); } -void LLFloaterScriptQueue::addObject(const LLUUID& id) +void LLFloaterScriptQueue::addObject(const LLUUID& id, std::string name) { - mObjectIDs.insert(id); + ObjectData obj = { id, name }; + mObjectList.push_back(obj); } BOOL LLFloaterScriptQueue::start() @@ -218,7 +219,7 @@ BOOL LLFloaterScriptQueue::start() LLStringUtil::format_map_t args; args["[START]"] = mStartString; - args["[COUNT]"] = llformat ("%d", mObjectIDs.size()); + args["[COUNT]"] = llformat ("%d", mObjectList.size()); buffer = getString ("Starting", args); getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); @@ -241,7 +242,7 @@ void LLFloaterScriptQueue::addStringMessage(const std::string &message) BOOL LLFloaterScriptQueue::isDone() const { - return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0)); + return (mCurrentObjectID.isNull() && (mObjectList.size() == 0)); } ///---------------------------------------------------------------------------- @@ -339,7 +340,7 @@ void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID paren LLCoros::instance().launch("ScriptQueueCompile", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, queue->mStartString, hFloater, - queue->mObjectIDs, + queue->mObjectList, fn)); } @@ -393,7 +394,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -443,7 +446,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -497,7 +502,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -601,7 +608,7 @@ bool LLFloaterResetQueue::startQueue() LLCoros::instance().launch("ScriptResetQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, getDerivedHandle(), - mObjectIDs, + mObjectList, fn)); return true; @@ -655,7 +662,7 @@ bool LLFloaterRunQueue::startQueue() LLCoros::instance().launch("ScriptRunQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, hFloater, - mObjectIDs, + mObjectList, fn)); return true; @@ -710,7 +717,7 @@ bool LLFloaterNotRunQueue::startQueue() LLCoros::instance().launch("ScriptQueueNotRun", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, hFloater, - mObjectIDs, + mObjectList, fn)); return true; @@ -730,7 +737,7 @@ void ObjectInventoryFetcher::inventoryChanged(LLViewerObject* object, } void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, - uuid_list_t objectList, fnQueueAction_t func) + object_data_list_t objectList, fnQueueAction_t func) { LLCoros::set_consuming(true); LLFloaterScriptQueue * floater(NULL); @@ -744,12 +751,13 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L // .with("[COUNT]", LLSD::Integer(objectList.size()))); // floater = NULL; - for (uuid_list_t::iterator itObj(objectList.begin()); (itObj != objectList.end()); ++itObj) + for (object_data_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; + LLUUID object_id = (*itObj).mObjectId; + LL_INFOS("SCRIPTQ") << "Next object in queue with ID=" << object_id.asString() << LL_ENDL; - LLPointer obj = gObjectList.findObject(*itObj); + LLPointer obj = gObjectList.findObject(object_id); LLInventoryObject::object_list_t inventory; if (obj) { @@ -757,13 +765,31 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L fetcher->fetchInventory(); + floater = hfloater.get(); + if (floater) + { + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = (*itObj).mObjectName; + floater->addStringMessage(floater->getString("LoadingObjInv", args)); + } + LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); if (result.has("timeout") && result["timeout"].asBoolean()) { - LL_WARNS("SCRIPTQ") << "Unable to retrieve inventory for object " << (*itObj).asString() << + LL_WARNS("SCRIPTQ") << "Unable to retrieve inventory for object " << object_id.asString() << ". Skipping to next object." << LL_ENDL; + + // floater could have been closed + floater = hfloater.get(); + if (floater) + { + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = (*itObj).mObjectName; + floater->addStringMessage(floater->getString("Timeout", args)); + } + continue; } @@ -771,7 +797,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L } else { - LL_WARNS("SCRIPTQ") << "Unable to retrieve object with ID of " << (*itObj) << + LL_WARNS("SCRIPTQ") << "Unable to retrieve object with ID of " << object_id << ". Skipping to next." << LL_ENDL; continue; } diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 271ac5e05d..1b3d8f83a0 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -61,7 +61,7 @@ public: void setMono(bool mono) { mMono = mono; } // addObject() accepts an object id. - void addObject(const LLUUID& id); + void addObject(const LLUUID& id, std::string name); // start() returns TRUE if the queue has started, otherwise FALSE. BOOL start(); @@ -87,7 +87,14 @@ protected: LLButton* mCloseBtn; // Object Queue - uuid_list_t mObjectIDs; + struct ObjectData + { + LLUUID mObjectId; + std::string mObjectName; + }; + typedef std::vector object_data_list_t; + + object_data_list_t mObjectList; LLUUID mCurrentObjectID; bool mDone; @@ -95,7 +102,7 @@ protected: bool mMono; typedef boost::function &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t; - static void objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, uuid_list_t objectList, fnQueueAction_t func); + static void objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, object_data_list_t objectList, fnQueueAction_t func); }; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 99a9ed1d75..f5b06fbd19 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6986,20 +6986,25 @@ class LLAvatarCall : public view_listener_t namespace { - struct QueueObjects : public LLSelectedObjectFunctor + struct QueueObjects : public LLSelectedNodeFunctor { BOOL scripted; BOOL modifiable; LLFloaterScriptQueue* mQueue; QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {} - virtual bool apply(LLViewerObject* obj) + virtual bool apply(LLSelectNode* node) { + LLViewerObject* obj = node->getObject(); + if (!obj) + { + return true; + } scripted = obj->flagScripted(); modifiable = obj->permModify(); if( scripted && modifiable ) { - mQueue->addObject(obj->getID()); + mQueue->addObject(obj->getID(), node->mName); return false; } else @@ -7015,7 +7020,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) QueueObjects func(q); LLSelectMgr *mgr = LLSelectMgr::getInstance(); LLObjectSelectionHandle selectHandle = mgr->getSelection(); - bool fail = selectHandle->applyToObjects(&func); + bool fail = selectHandle->applyToNodes(&func); if(fail) { if ( !func.scripted ) diff --git a/indra/newview/skins/default/xui/en/floater_script_queue.xml b/indra/newview/skins/default/xui/en/floater_script_queue.xml index f4aca7bb3d..0982683a7f 100644 --- a/indra/newview/skins/default/xui/en/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/en/floater_script_queue.xml @@ -29,6 +29,14 @@ name="NotRunning"> Not running + + Timeout: [OBJECT_NAME] + + + Loading inventory for: [OBJECT_NAME] +