From a4c795f87b4a9026e850474cfd51b6b4253e31a4 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 9 Jul 2018 18:06:16 +0300 Subject: MAINT-8848 FIXED Object name in the llGiveInventory chat message is represented as a hyperlink --- indra/newview/llviewermessage.cpp | 21 +++++++++++++++++++-- indra/newview/llviewermessage.h | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6cba7dd70c..a89b1220de 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1732,7 +1732,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + log_message = "" + chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + getSanitizedDescription() + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; LLNotificationsUtil::add("SystemMessageTip", args); @@ -1917,7 +1917,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + log_message = "" + chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + getSanitizedDescription() + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; LLNotificationsUtil::add("SystemMessageTip", args); @@ -1990,6 +1990,23 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const return false; } +std::string LLOfferInfo::getSanitizedDescription() +{ + // currently we get description from server as: 'Object' ( Location ) + // object name shouldn't be shown as a hyperlink + std::string description = mDesc; + + std::size_t start = mDesc.find_first_of("'"); + std::size_t end = mDesc.find_last_of("'"); + if ((start != std::string::npos) && (end != std::string::npos)) + { + description.insert(start, ""); + description.insert(end + 8, ""); + } + return description; +} + + void LLOfferInfo::initRespondFunctionMap() { if(mRespondFunctions.empty()) diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index b0eaa37541..424aae1229 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -257,6 +257,7 @@ public: private: void initRespondFunctionMap(); + std::string getSanitizedDescription(); typedef boost::function respond_function_t; typedef std::map respond_function_map_t; -- cgit v1.2.3 From 4e84a7f9517e9e10287490d3b96ed3c9cb24f45e Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 10 Jul 2018 18:06:52 +0300 Subject: MAINT-8855 FIXED Location SLURL gets truncated when using Help -> Report Bug to file JIRA --- indra/newview/llviewermenu.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f7250ffb66..ec851ddaf9 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -134,6 +134,7 @@ #include "llpathfindingmanager.h" #include "llstartup.h" #include "boost/unordered_map.hpp" +#include #include "llcleanup.h" using namespace LLAvatarAppearanceDefines; @@ -8025,7 +8026,12 @@ void handle_report_bug(const LLSD& param) LLUIString url(param.asString()); LLStringUtil::format_map_t replace; - replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getViewerInfoString(true)); + std::string environment = LLAppViewer::instance()->getViewerInfoString(true); + boost::regex regex; + regex.assign(""); + std::string stripped_env = boost::regex_replace(environment, regex, ""); + + replace["[ENVIRONMENT]"] = LLURI::escape(stripped_env); LLSLURL location_url; LLAgentUI::buildSLURL(location_url); replace["[LOCATION]"] = LLURI::escape(location_url.getSLURLString()); -- cgit v1.2.3 From 00f89e52ce8333b485c3bf9213b6c6b3ae96e615 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 11 Jul 2018 16:39:22 +0300 Subject: MAINT-8849 Fixed Viewer displays 'Conneting to region...' screen forever --- indra/newview/llstartup.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7a4c41779a..cc02642203 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -246,6 +246,7 @@ static bool mLoginStatePastUI = false; const S32 DEFAULT_MAX_AGENT_GROUPS = 42; const S32 ALLOWED_MAX_AGENT_GROUPS = 500; +const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds boost::scoped_ptr LLStartUp::sStateWatcher(new LLEventStream("StartupState")); boost::scoped_ptr LLStartUp::sListener(new LLStartupListener()); @@ -1615,6 +1616,13 @@ bool idle_startup() LLStartUp::setStartupState( STATE_INVENTORY_SEND ); } display_startup(); + + if (!gAgentMovementCompleted && timeout.getElapsedTimeF32() > STATE_AGENT_WAIT_TIMEOUT) + { + LL_WARNS("AppInit") << "Backing up to login screen!" << LL_ENDL; + LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status); + reset_login(); + } return FALSE; } -- cgit v1.2.3 From bb904e2f35a87f716ad57cbaf55039f297a0db7c Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 11 Jul 2018 17:39:39 +0300 Subject: MAINT-8856 FIXED URL in Group Name is represented as a hyperlink in group notice --- indra/newview/skins/default/xui/en/panel_group_notify.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml index 4121acdfb0..60e5a03d51 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notify.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml @@ -43,6 +43,7 @@ layout="topleft" left_pad="10" name="title" + parse_urls="false" text_color="GroupNotifyTextColor" top="5" use_ellipses="true" -- cgit v1.2.3 From 14c65a2c9e8c2017a62aacf2e276b42c1f2b0873 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 12 Jul 2018 17:57:40 +0300 Subject: MAINT-8862 mailto URIs should be loaded in the external browser --- indra/newview/llweb.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index b816225b07..768db047a4 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -268,6 +268,12 @@ bool LLWeb::useExternalBrowser(const std::string &url) boost::match_results matches; return !(boost::regex_search(uri_string, matches, pattern)); } + else + { + boost::regex pattern = boost::regex("^mailto:", boost::regex::perl | boost::regex::icase); + boost::match_results matches; + return boost::regex_search(url, matches, pattern); + } return false; #endif } -- cgit v1.2.3 From dc0bd05717106522eb350b02dbac663eaebb8eef Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 26 Jun 2018 14:47:30 +0300 Subject: SL-927 Add new groups caps to viewer (offline messages only) --- indra/newview/llfloaternotificationstabbed.cpp | 3 +- indra/newview/llimprocessing.cpp | 11 +- indra/newview/llnotificationlistitem.cpp | 31 +---- indra/newview/llnotificationlistitem.h | 1 + indra/newview/llviewermessage.cpp | 159 ++++++++++++++++++------- indra/newview/llviewermessage.h | 5 + indra/newview/llviewerregion.cpp | 4 +- 7 files changed, 142 insertions(+), 72 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 4b5fe4989a..d1679fd936 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -387,7 +387,8 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) p.notification_name = notify->getName(); p.transaction_id = payload["transaction_id"]; p.group_id = payload["group_id"]; - p.fee = payload["fee"]; + p.fee = payload["fee"]; + p.use_offline_cap = payload["use_offline_cap"].asInteger(); p.subject = payload["subject"].asString(); p.message = payload["message"].asString(); p.sender = payload["sender_name"].asString(); diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 491671c46f..e76b3d118e 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -814,10 +814,11 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, LLSD payload; payload["transaction_id"] = session_id; - payload["group_id"] = from_id; + payload["group_id"] = from_group ? from_id : aux_id; payload["name"] = name; payload["message"] = message; payload["fee"] = membership_fee; + payload["use_offline_cap"] = session_id.isNull() && (offline == IM_OFFLINE); LLSD args; args["MESSAGE"] = message; @@ -1459,8 +1460,12 @@ void LLIMProcessing::requestOfflineMessages() // Auto-accepted inventory items may require the avatar object // to build a correct name. Likewise, inventory offers from // muted avatars require the mute list to properly mute. - if (cap_url.empty()) + if (cap_url.empty() + || gAgent.getRegionCapability("AcceptFriendship").empty() + || gAgent.getRegionCapability("AcceptGroupInvite").empty()) { + // Offline messages capability provides no session/transaction ids for message AcceptFriendship and IM_GROUP_INVITATION to work + // So make sure we have the caps before using it. requestOfflineMessagesLegacy(); } else @@ -1561,7 +1566,7 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) message_data["to_agent_id"].asUUID(), IM_OFFLINE, (EInstantMessage)message_data["dialog"].asInteger(), - LLUUID::null, // session id, fix this for friendship offers to work + LLUUID::null, // session id, since there is none we can only use frienship/group invite caps message_data["timestamp"].asInteger(), message_data["from_agent_name"].asString(), message_data["message"].asString(), diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index f2de8e54a0..a5bc75e6bd 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -312,38 +312,15 @@ void LLGroupInviteNotificationListItem::onClickJoinBtn() return; } - if(mParams.fee > 0) - { - LLSD args; - args["COST"] = llformat("%d", mParams.fee); - // Set the fee for next time to 0, so that we don't keep - // asking about a fee. - LLSD next_payload; - next_payload["group_id"]= mParams.group_id; - next_payload["transaction_id"]= mParams.transaction_id; - next_payload["fee"] = 0; - LLNotificationsUtil::add("JoinGroupCanAfford", args, next_payload); - } - else - { - send_improved_im(mParams.group_id, - std::string("name"), - std::string("message"), - IM_ONLINE, - IM_GROUP_INVITATION_ACCEPT, - mParams.transaction_id); - } + send_join_group_response(mParams.group_id, mParams.transaction_id, true, mParams.fee, mParams.use_offline_cap); + LLNotificationListItem::onClickCloseBtn(); } void LLGroupInviteNotificationListItem::onClickDeclineBtn() { - send_improved_im(mParams.group_id, - std::string("name"), - std::string("message"), - IM_ONLINE, - IM_GROUP_INVITATION_DECLINE, - mParams.transaction_id); + send_join_group_response(mParams.group_id, mParams.transaction_id, false, mParams.fee, mParams.use_offline_cap); + LLNotificationListItem::onClickCloseBtn(); } diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 3dd52986b0..3d564fed0e 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -56,6 +56,7 @@ public: std::string message; std::string sender; S32 fee; + U8 use_offline_cap; LLDate time_stamp; LLDate received_time; LLSD inventory_offer; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a89b1220de..211d7b8c64 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -198,15 +198,15 @@ void accept_friendship_coro(std::string url, LLSD notification) void decline_friendship_coro(std::string url, LLSD notification, S32 option) { - LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); if (url.empty()) { LL_WARNS() << "Empty capability!" << LL_ENDL; return; } + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); + LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); LLSD payload = notification["payload"]; url += "?from=" + payload["from_id"].asString(); @@ -724,6 +724,119 @@ void send_sound_trigger(const LLUUID& sound_id, F32 gain) static LLSD sSavedGroupInvite; static LLSD sSavedResponse; +void response_group_invitation_coro(std::string url, LLUUID group_id, bool notify_and_update) +{ + if (url.empty()) + { + LL_WARNS("GroupInvite") << "Empty capability!" << LL_ENDL; + return; + } + + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); + LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + + LLSD payload; + payload["group"] = group_id; + + LLSD result = httpAdapter->postAndSuspend(httpRequest, url, payload); + + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + + if (!status) + { + LL_WARNS("GroupInvite") << "HTTP status, " << status.toTerseString() << + ". Group " << group_id << " invitation response processing failed." << LL_ENDL; + } + else + { + if (!result.has("success") || result["success"].asBoolean() == false) + { + LL_WARNS("GroupInvite") << "Server failed to process group " << group_id << " invitation response. " << httpResults << LL_ENDL; + } + else + { + LL_DEBUGS("GroupInvite") << "Successfully sent response to group " << group_id << " invitation" << LL_ENDL; + if (notify_and_update) + { + LLNotificationsUtil::add("JoinGroupSuccess"); + gAgent.sendAgentDataUpdateRequest(); + + LLGroupMgr::getInstance()->clearGroupData(group_id); + // refresh the floater for this group, if any. + LLGroupActions::refresh(group_id); + } + } + } +} + +void send_join_group_response(LLUUID group_id, LLUUID transaction_id, bool accept_invite, S32 fee, bool use_offline_cap, LLSD &payload) +{ + if (accept_invite && fee > 0) + { + // If there is a fee to join this group, make + // sure the user is sure they want to join. + LLSD args; + args["COST"] = llformat("%d", fee); + // Set the fee for next time to 0, so that we don't keep + // asking about a fee. + LLSD next_payload = payload; + next_payload["fee"] = 0; + LLNotificationsUtil::add("JoinGroupCanAfford", + args, + next_payload); + } + else if (use_offline_cap) + { + std::string url; + if (accept_invite) + { + url = gAgent.getRegionCapability("AcceptGroupInvite"); + } + else + { + url = gAgent.getRegionCapability("DeclineGroupInvite"); + } + + if (!url.empty()) + { + LLCoros::instance().launch("LLMessageSystem::acceptGroupInvitation", + boost::bind(response_group_invitation_coro, url, group_id, accept_invite)); + } + else + { + // if sim has no this cap, we can do nothing - regular request will fail + LL_WARNS("GroupInvite") << "No capability, can't reply to offline invitation!" << LL_ENDL; + } + } + else + { + EInstantMessage type = accept_invite ? IM_GROUP_INVITATION_ACCEPT : IM_GROUP_INVITATION_DECLINE; + + send_improved_im(group_id, + std::string("name"), + std::string("message"), + IM_ONLINE, + type, + transaction_id); + } +} + +void send_join_group_response(LLUUID group_id, LLUUID transaction_id, bool accept_invite, S32 fee, bool use_offline_cap) +{ + LLSD payload; + if (accept_invite) + { + payload["group_id"] = group_id; + payload["transaction_id"] = transaction_id; + payload["fee"] = fee; + payload["use_offline_cap"] = use_offline_cap; + } + send_join_group_response(group_id, transaction_id, accept_invite, fee, use_offline_cap, payload); +} + bool join_group_response(const LLSD& notification, const LLSD& response) { // A bit of variable saving and restoring is used to deal with the case where your group list is full and you @@ -762,6 +875,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) std::string name = notification_adjusted["payload"]["name"].asString(); std::string message = notification_adjusted["payload"]["message"].asString(); S32 fee = notification_adjusted["payload"]["fee"].asInteger(); + U8 use_offline_cap = notification_adjusted["payload"]["use_offline_cap"].asInteger(); if (option == 2 && !group_id.isNull()) { @@ -790,42 +904,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) return false; } } - - if (accept_invite) - { - // If there is a fee to join this group, make - // sure the user is sure they want to join. - if (fee > 0) - { - LLSD args; - args["COST"] = llformat("%d", fee); - // Set the fee for next time to 0, so that we don't keep - // asking about a fee. - LLSD next_payload = notification_adjusted["payload"]; - next_payload["fee"] = 0; - LLNotificationsUtil::add("JoinGroupCanAfford", - args, - next_payload); - } - else - { - send_improved_im(group_id, - std::string("name"), - std::string("message"), - IM_ONLINE, - IM_GROUP_INVITATION_ACCEPT, - transaction_id); - } - } - else - { - send_improved_im(group_id, - std::string("name"), - std::string("message"), - IM_ONLINE, - IM_GROUP_INVITATION_DECLINE, - transaction_id); - } + send_join_group_response(group_id, transaction_id, accept_invite, fee, use_offline_cap, notification_adjusted["payload"]); sSavedGroupInvite[id] = LLSD::emptyMap(); sSavedResponse[id] = LLSD::emptyMap(); diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 424aae1229..913abef2be 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -66,6 +66,11 @@ enum InventoryOfferResponse BOOL can_afford_transaction(S32 cost); void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group = FALSE, S32 trx_type = TRANS_GIFT, const std::string& desc = LLStringUtil::null); +void send_join_group_response(LLUUID group_id, + LLUUID transaction_id, + bool accept_invite, + S32 fee, + bool use_offline_cap); void process_logout_reply(LLMessageSystem* msg, void**); void process_layer_data(LLMessageSystem *mesgsys, void **user_data); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 832dcc2dd8..e1437e28f7 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2818,6 +2818,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) { capabilityNames.append("AbuseCategories"); capabilityNames.append("AcceptFriendship"); + capabilityNames.append("AcceptGroupInvite"); // ReadOfflineMsgs recieved messages only!!! capabilityNames.append("AgentPreferences"); capabilityNames.append("AgentState"); capabilityNames.append("AttachmentResources"); @@ -2828,6 +2829,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("CreateInventoryCategory"); capabilityNames.append("DeclineFriendship"); + capabilityNames.append("DeclineGroupInvite"); // ReadOfflineMsgs recieved messages only!!! capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("DirectDelivery"); capabilityNames.append("EnvironmentSettings"); @@ -2878,7 +2880,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ParcelVoiceInfoRequest"); capabilityNames.append("ProductInfoRequest"); capabilityNames.append("ProvisionVoiceAccountRequest"); - //capabilityNames.append("ReadOfflineMsgs"); + capabilityNames.append("ReadOfflineMsgs"); // Only use with AcceptGroupInvite AcceptFriendship capabilityNames.append("RemoteParcelRequest"); capabilityNames.append("RenderMaterials"); capabilityNames.append("RequestTextureDownload"); -- cgit v1.2.3 From bb6e8372f4c7e0c80d49727a6f509e49a22083ee Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 16 Jul 2018 16:07:09 +0300 Subject: MAINT-8883 FIXED If someone sends a group notice immediately before you, it wipes out the notice you are writing --- indra/newview/llpanelgroupnotices.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 178b5db6c2..fe49ed0649 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -575,7 +575,10 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->setNeedsSort(save_sort); mNoticesList->updateSort(); - mNoticesList->selectFirstItem(); + if (mPanelViewNotice->getVisible()) + { + mNoticesList->selectFirstItem(); + } } void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data) -- cgit v1.2.3 From 1e883c5b3936abd8791a7a0350bd2ddac1f72161 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 16 Jul 2018 17:35:29 +0300 Subject: MAINT-8844 Fixed selection inconsistancies (inworld manipulation vs tool floater) --- indra/newview/llpanelobject.cpp | 18 +++++++----------- indra/newview/llselectmgr.cpp | 33 +++++++++++++++++++++++++++++++++ indra/newview/llselectmgr.h | 5 +++++ indra/newview/llviewerwindow.cpp | 33 +++++++++------------------------ 4 files changed, 54 insertions(+), 35 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 25cfb598e7..3665910c63 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -341,21 +341,17 @@ void LLPanelObject::getState( ) return; } - // can move or rotate only linked group with move permissions, or sub-object with move and modify perms - BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); - BOOL enable_scale = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && objectp->permModify(); - BOOL enable_rotate = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); - S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) && (selected_count == 1); - if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 1) - { - enable_move = FALSE; - enable_scale = FALSE; - enable_rotate = FALSE; - } + bool enable_move; + bool enable_modify; + + LLSelectMgr::getInstance()->selectGetEditMoveLinksetPermissions(enable_move, enable_modify); + + BOOL enable_scale = enable_modify; + BOOL enable_rotate = enable_move; // already accounts for a case of children, which needs permModify() as well LLVector3 vec; if (enable_move) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ddae109030..f3cac0abdf 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3676,6 +3676,39 @@ void LLSelectMgr::selectForceDelete() SEND_ONLY_ROOTS); } +BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) +{ + move = true; + modify = true; + bool selecting_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); + + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++) + { + LLSelectNode* nodep = *iter; + if (!nodep->mValid) + { + move = false; + modify = false; + return FALSE; + } + + LLViewerObject* object = nodep->getObject(); + LLViewerObject *root_object = (object == NULL) ? NULL : object->getRootEdit(); + bool this_object_movable = false; + if (object->permMove() && !object->isPermanentEnforced() && + ((root_object == NULL) || !root_object->isPermanentEnforced()) && + (object->permModify() || selecting_linked_set)) + { + this_object_movable = true; + } + move = move && this_object_movable; + modify = modify && object->permModify(); + } + + return TRUE; +} + void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale, BOOL &is_for_sale_mixed, BOOL &is_sale_price_mixed, diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index e965dd80d5..87ac899325 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -675,6 +675,11 @@ public: // returns TRUE if all the nodes are valid. Accumulates // permissions in the parameter. BOOL selectGetPermissions(LLPermissions& perm); + + // returns TRUE if all the nodes are valid. Depends onto "edit linked" state + // Children in linksets are a bit special - they require not only move permission + // but also modify if "edit linked" is set, since you move them relative to parent + BOOL selectGetEditMoveLinksetPermissions(bool &move, bool &modify); // Get a bunch of useful sale information for the object(s) selected. // "_mixed" is true if not all objects have the same setting. diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cef19c9c2d..01ec703fe6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3826,37 +3826,22 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, { if( !LLSelectMgr::getInstance()->getSelection()->isEmpty() ) { - BOOL moveable_object_selected = FALSE; - BOOL all_selected_objects_move = TRUE; - BOOL all_selected_objects_modify = TRUE; - BOOL selecting_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); - - for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin(); - iter != LLSelectMgr::getInstance()->getSelection()->end(); iter++) - { - LLSelectNode* nodep = *iter; - LLViewerObject* object = nodep->getObject(); - LLViewerObject *root_object = (object == NULL) ? NULL : object->getRootEdit(); - BOOL this_object_movable = FALSE; - if (object->permMove() && !object->isPermanentEnforced() && - ((root_object == NULL) || !root_object->isPermanentEnforced()) && - (object->permModify() || selecting_linked_set)) - { - moveable_object_selected = TRUE; - this_object_movable = TRUE; - } - all_selected_objects_move = all_selected_objects_move && this_object_movable; - all_selected_objects_modify = all_selected_objects_modify && object->permModify(); - } + bool all_selected_objects_move; + bool all_selected_objects_modify; + // Note: This might be costly to do on each frame and when a lot of objects are selected + // we might be better off with some kind of memory for selection and/or states, consider + // optimizing, perhaps even some kind of selection generation at level of LLSelectMgr to + // make whole viewer benefit. + LLSelectMgr::getInstance()->selectGetEditMoveLinksetPermissions(all_selected_objects_move, all_selected_objects_modify); BOOL draw_handles = TRUE; - if (tool == LLToolCompTranslate::getInstance() && (!moveable_object_selected || !all_selected_objects_move)) + if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move) { draw_handles = FALSE; } - if (tool == LLToolCompRotate::getInstance() && (!moveable_object_selected || !all_selected_objects_move)) + if (tool == LLToolCompRotate::getInstance() && !all_selected_objects_move) { draw_handles = FALSE; } -- cgit v1.2.3 From 2ebe9c481841aefa20ff2287dfeb786e99ebe0c9 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 16 Jul 2018 20:50:58 +0300 Subject: SL-927 Fix coro name --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 211d7b8c64..ba5097f4ad 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -734,7 +734,7 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); + httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("responseGroupInvitation", httpPolicy)); LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); LLSD payload; -- cgit v1.2.3 From 04e27dad427807ecef813c7de4f813a18afc36c6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 17 Jul 2018 10:42:17 +0300 Subject: SL-920 Better logging and limited cap to offline messages --- indra/newview/llviewermessage.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6ec79ff77a..6fc53892dd 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -161,7 +161,7 @@ void accept_friendship_coro(std::string url, LLSD notification) LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); if (url.empty()) { - LL_WARNS() << "Empty capability!" << LL_ENDL; + LL_WARNS("Friendship") << "Empty capability!" << LL_ENDL; return; } @@ -176,17 +176,18 @@ void accept_friendship_coro(std::string url, LLSD notification) if (!status) { - LL_WARNS() << "HTTP status, " << status.toTerseString() << + LL_WARNS("Friendship") << "HTTP status, " << status.toTerseString() << ". friendship offer accept failed." << LL_ENDL; } else { if (!result.has("success") || result["success"].asBoolean() == false) { - LL_WARNS() << "Server failed to process accepted friendship. " << httpResults << LL_ENDL; + LL_WARNS("Friendship") << "Server failed to process accepted friendship. " << httpResults << LL_ENDL; } else { + LL_DEBUGS("Friendship") << "Adding friend to list" << httpResults << LL_ENDL; // add friend to recent people list LLRecentPeople::instance().add(payload["from_id"]); @@ -200,7 +201,7 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option) { if (url.empty()) { - LL_WARNS() << "Empty capability!" << LL_ENDL; + LL_WARNS("Friendship") << "Empty capability!" << LL_ENDL; return; } LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); @@ -218,17 +219,18 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option) if (!status) { - LL_WARNS() << "HTTP status, " << status.toTerseString() << + LL_WARNS("Friendship") << "HTTP status, " << status.toTerseString() << ". friendship offer decline failed." << LL_ENDL; } else { if (!result.has("success") || result["success"].asBoolean() == false) { - LL_WARNS() << "Server failed to process declined friendship. " << httpResults << LL_ENDL; + LL_WARNS("Friendship") << "Server failed to process declined friendship. " << httpResults << LL_ENDL; } else { + LL_DEBUGS("Friendship") << "Friendship declined" << httpResults << LL_ENDL; if (option == 1) { LLNotificationsUtil::add("FriendshipDeclinedByMe", @@ -264,13 +266,16 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) // This will also trigger an onlinenotification if the user is online std::string url = gAgent.getRegionCapability("AcceptFriendship"); - if (!url.empty()) + LL_DEBUGS("Friendship") << "Cap string: " << url << LL_ENDL; + if (!url.empty() && payload.has("online") && payload["online"].asBoolean() == false) { + LL_DEBUGS("Friendship") << "Accepting friendship via capability" << LL_ENDL; LLCoros::instance().launch("LLMessageSystem::acceptFriendshipOffer", boost::bind(accept_friendship_coro, url, notification)); } else if (payload.has("session_id") && payload["session_id"].asUUID().notNull()) { + LL_DEBUGS("Friendship") << "Accepting friendship via viewer message" << LL_ENDL; msg->newMessageFast(_PREHASH_AcceptFriendship); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -288,7 +293,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) } else { - LL_WARNS() << "Failed to accept friendship offer, neither capability nor transaction id are accessible" << LL_ENDL; + LL_WARNS("Friendship") << "Failed to accept friendship offer, neither capability nor transaction id are accessible" << LL_ENDL; } break; } @@ -300,13 +305,16 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) // We no longer notify other viewers, but we DO still send // the rejection to the simulator to delete the pending userop. std::string url = gAgent.getRegionCapability("DeclineFriendship"); - if (!url.empty()) + LL_DEBUGS("Friendship") << "Cap string: " << url << LL_ENDL; + if (!url.empty() && payload.has("online") && payload["online"].asBoolean() == false) { + LL_DEBUGS("Friendship") << "Declining friendship via capability" << LL_ENDL; LLCoros::instance().launch("LLMessageSystem::declineFriendshipOffer", boost::bind(decline_friendship_coro, url, notification, option)); } else if (payload.has("session_id") && payload["session_id"].asUUID().notNull()) { + LL_DEBUGS("Friendship") << "Declining friendship via viewer message" << LL_ENDL; msg->newMessageFast(_PREHASH_DeclineFriendship); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -328,7 +336,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) } else { - LL_WARNS() << "Failed to decline friendship offer, neither capability nor transaction id are accessible" << LL_ENDL; + LL_WARNS("Friendship") << "Failed to decline friendship offer, neither capability nor transaction id are accessible" << LL_ENDL; } } default: -- cgit v1.2.3 From 42ab393dd39e2e78cde2b55dcd04d21be6a51937 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 17 Jul 2018 15:45:02 +0300 Subject: SL-927 Better logging --- indra/newview/llviewermessage.cpp | 3 +++ indra/newview/llviewerregion.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ba5097f4ad..6ec79ff77a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -802,6 +802,7 @@ void send_join_group_response(LLUUID group_id, LLUUID transaction_id, bool accep if (!url.empty()) { + LL_DEBUGS("GroupInvite") << "Capability url: " << url << LL_ENDL; LLCoros::instance().launch("LLMessageSystem::acceptGroupInvitation", boost::bind(response_group_invitation_coro, url, group_id, accept_invite)); } @@ -813,6 +814,8 @@ void send_join_group_response(LLUUID group_id, LLUUID transaction_id, bool accep } else { + LL_DEBUGS("GroupInvite") << "Replying to group invite via IM message" << LL_ENDL; + EInstantMessage type = accept_invite ? IM_GROUP_INVITATION_ACCEPT : IM_GROUP_INVITATION_DECLINE; send_improved_im(group_id, diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index e1437e28f7..4f0460da29 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2880,7 +2880,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ParcelVoiceInfoRequest"); capabilityNames.append("ProductInfoRequest"); capabilityNames.append("ProvisionVoiceAccountRequest"); - capabilityNames.append("ReadOfflineMsgs"); // Only use with AcceptGroupInvite AcceptFriendship + capabilityNames.append("ReadOfflineMsgs"); // Requires to respond reliably: AcceptFriendship, AcceptGroupInvite, DeclineFriendship, DeclineGroupInvite capabilityNames.append("RemoteParcelRequest"); capabilityNames.append("RenderMaterials"); capabilityNames.append("RequestTextureDownload"); -- cgit v1.2.3 From 7c82588ae3686cf982891a92164e384ff3475cc6 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 17 Jul 2018 18:29:46 +0300 Subject: MAINT-8883 Restore previous selection after updating the list --- indra/newview/llpanelgroupnotices.cpp | 16 +++++++++++++--- indra/newview/llpanelgroupnotices.h | 4 ++++ 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index fe49ed0649..ce6834b4b3 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -303,6 +303,8 @@ void LLPanelGroupNotices::activate() { if(mNoticesList) mNoticesList->deleteAllItems(); + + mPrevSelectedNotice = LLUUID(); BOOL can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND); BOOL can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE); @@ -454,12 +456,18 @@ void LLPanelGroupNotices::refreshNotices() } +void LLPanelGroupNotices::clearNoticeList() +{ + mPrevSelectedNotice = mNoticesList->getStringUUIDSelectedItem(); + mNoticesList->deleteAllItems(); +} + void LLPanelGroupNotices::onClickRefreshNotices(void* data) { LL_DEBUGS() << "LLPanelGroupNotices::onClickGetPastNotices" << LL_ENDL; LLPanelGroupNotices* self = (LLPanelGroupNotices*)data; - self->mNoticesList->deleteAllItems(); + self->clearNoticeList(); LLMessageSystem* msg = gMessageSystem; msg->newMessage("GroupNoticesListRequest"); @@ -547,7 +555,6 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) LLSD row; row["id"] = id; - row["columns"][0]["column"] = "icon"; if (has_attachment) { @@ -577,7 +584,10 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->updateSort(); if (mPanelViewNotice->getVisible()) { - mNoticesList->selectFirstItem(); + if (!mNoticesList->selectByID(mPrevSelectedNotice)) + { + mNoticesList->selectFirstItem(); + } } } diff --git a/indra/newview/llpanelgroupnotices.h b/indra/newview/llpanelgroupnotices.h index 04629b5f6b..46c8c241c6 100644 --- a/indra/newview/llpanelgroupnotices.h +++ b/indra/newview/llpanelgroupnotices.h @@ -65,6 +65,8 @@ public: void refreshNotices(); + void clearNoticeList(); + virtual void setGroupID(const LLUUID& id); private: @@ -113,6 +115,8 @@ private: LLOfferInfo* mInventoryOffer; + LLUUID mPrevSelectedNotice; + static std::map sInstances; }; -- cgit v1.2.3 From 6e3627aa641b60d041fedf36803d260abc7ca651 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 2 Aug 2018 16:35:14 +0300 Subject: MAINT-8936 FIXED "Share" checkbox becomes gray in some inappropriate cases --- indra/newview/llsidepaneliteminfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index a486a29aa2..2503e2a5e2 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -613,7 +613,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(TRUE); + ctl->setTentative(!ctl->getEnabled()); ctl->set(TRUE); } } -- cgit v1.2.3 From f858a8c66b4738fe67caa1667724cd1777532360 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 18 Jul 2018 17:54:04 +0300 Subject: SL-920 Change http methods --- indra/newview/llviewermessage.cpp | 5 +++-- indra/newview/llviewerregion.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6fc53892dd..a2b4a6a91d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -169,7 +169,8 @@ void accept_friendship_coro(std::string url, LLSD notification) url += "?from=" + payload["from_id"].asString(); url += "&agent_name=\"" + LLURI::escape(gAgentAvatarp->getFullname()) + "\""; - LLSD result = httpAdapter->getAndSuspend(httpRequest, url); + LLSD data; + LLSD result = httpAdapter->postAndSuspend(httpRequest, url, data); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); @@ -212,7 +213,7 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option) LLSD payload = notification["payload"]; url += "?from=" + payload["from_id"].asString(); - LLSD result = httpAdapter->getAndSuspend(httpRequest, url); + LLSD result = httpAdapter->deleteAndSuspend(httpRequest, url); LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b2587e7e5e..4f0460da29 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2817,7 +2817,7 @@ void LLViewerRegion::unpackRegionHandshake() void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) { capabilityNames.append("AbuseCategories"); - //capabilityNames.append("AcceptFriendship"); + capabilityNames.append("AcceptFriendship"); capabilityNames.append("AcceptGroupInvite"); // ReadOfflineMsgs recieved messages only!!! capabilityNames.append("AgentPreferences"); capabilityNames.append("AgentState"); @@ -2828,7 +2828,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ChatSessionRequest"); capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("CreateInventoryCategory"); - //capabilityNames.append("DeclineFriendship"); + capabilityNames.append("DeclineFriendship"); capabilityNames.append("DeclineGroupInvite"); // ReadOfflineMsgs recieved messages only!!! capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("DirectDelivery"); -- cgit v1.2.3 From bce40a19348a35f5e223cf740e4ba7e96314286b Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 18 Jul 2018 19:59:00 +0300 Subject: Backed out changeset: 1d9ad7f485e6 --- indra/newview/llinventorymodel.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 76bf87cfe5..bedf11d7e4 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -344,23 +344,13 @@ LLViewerInventoryCategory* LLInventoryModel::getCategory(const LLUUID& id) const bool LLInventoryModel::isCategoryHidden(const LLUUID& id) const { - bool res = false; const LLViewerInventoryCategory* category = getCategory(id); if (category) { LLFolderType::EType cat_type = category->getPreferredType(); - switch (cat_type) - { - case LLFolderType::FT_INBOX: - case LLFolderType::FT_OUTBOX: - case LLFolderType::FT_MARKETPLACE_LISTINGS: - res = true; - break; - default: - break; - } + return (cat_type == LLFolderType::FT_INBOX || cat_type == LLFolderType::FT_OUTBOX); } - return res; + return false; } S32 LLInventoryModel::getItemCount() const -- cgit v1.2.3 From e37c30d5cd247d4dcefa1cf8e9e83fa8d8c25470 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 18 Jul 2018 19:59:31 +0300 Subject: Backed out changeset: 43f9351c7f6f --- indra/newview/llinventoryfilter.cpp | 2 +- indra/newview/llinventorymodel.cpp | 11 ----------- indra/newview/llinventorymodel.h | 4 +--- 3 files changed, 2 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index f64c39c3ad..9193613e9f 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -153,7 +153,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const // we're showing all folders, overriding filter if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) { - return !gInventory.isCategoryHidden(folder_id); + return true; } // when applying a filter, matching folders get their contents downloaded first diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index bedf11d7e4..b447166764 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -342,17 +342,6 @@ LLViewerInventoryCategory* LLInventoryModel::getCategory(const LLUUID& id) const return category; } -bool LLInventoryModel::isCategoryHidden(const LLUUID& id) const -{ - const LLViewerInventoryCategory* category = getCategory(id); - if (category) - { - LLFolderType::EType cat_type = category->getPreferredType(); - return (cat_type == LLFolderType::FT_INBOX || cat_type == LLFolderType::FT_OUTBOX); - } - return false; -} - S32 LLInventoryModel::getItemCount() const { return mItemMap.size(); diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 576c5e9e20..01e0ed7e9b 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -316,9 +316,7 @@ public: // Copy content of all folders of type "type" into folder "id" and delete/purge the empty folders // Note : This method has been designed for FT_OUTBOX (aka Merchant Outbox) but can be used for other categories void consolidateForType(const LLUUID& id, LLFolderType::EType type); - - bool isCategoryHidden(const LLUUID& id) const; - + private: mutable LLPointer mLastItem; // cache recent lookups -- cgit v1.2.3 From ef148a73aaacf0f6276a236180cdeaf43615fc31 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 18 Jul 2018 20:35:41 +0300 Subject: MAINT-8844 Fix redundant check --- indra/newview/llselectmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index f3cac0abdf..57b144aa51 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3694,7 +3694,7 @@ BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) } LLViewerObject* object = nodep->getObject(); - LLViewerObject *root_object = (object == NULL) ? NULL : object->getRootEdit(); + LLViewerObject *root_object = object->getRootEdit(); bool this_object_movable = false; if (object->permMove() && !object->isPermanentEnforced() && ((root_object == NULL) || !root_object->isPermanentEnforced()) && -- cgit v1.2.3 From f796c33d43b03e2ebd7ccdf4ee3c09da858263eb Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 19 Jul 2018 11:59:02 +0300 Subject: MAINT-8844 Null check (just to be on the safe side) --- indra/newview/llselectmgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 57b144aa51..fce21fa30a 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3686,14 +3686,14 @@ BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) iter != getSelection()->end(); iter++) { LLSelectNode* nodep = *iter; - if (!nodep->mValid) + LLViewerObject* object = nodep->getObject(); + if (!object || !nodep->mValid) { move = false; modify = false; return FALSE; } - LLViewerObject* object = nodep->getObject(); LLViewerObject *root_object = object->getRootEdit(); bool this_object_movable = false; if (object->permMove() && !object->isPermanentEnforced() && -- cgit v1.2.3 From a7a2ea0293e5fd2ef594e9f82ab01fde855f8284 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 20 Jul 2018 11:44:39 +0300 Subject: MAINT-8163 Move buttons down to accommodate text change --- indra/newview/skins/default/xui/ru/floater_tos.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/ru/floater_tos.xml b/indra/newview/skins/default/xui/ru/floater_tos.xml index 3f2b5747d5..7196a04de1 100644 --- a/indra/newview/skins/default/xui/ru/floater_tos.xml +++ b/indra/newview/skins/default/xui/ru/floater_tos.xml @@ -16,6 +16,6 @@ Я прочитал и согласен с Условиями и положениями по конфиденциальности Пользовательского соглашения, включая требования по разрешению разногласий Second Life. -