From 7e5a092ba1126f0527e915a7bfadb92e989880c7 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 22 Mar 2018 17:56:12 +0200 Subject: MAINT-8415 FIXED Group chat toast ignores IRC-like formatting --- indra/newview/lltoastimpanel.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 39adfb3431..c4c4b13a2f 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -65,14 +65,9 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(p.session_id); mIsGroupMsg = (im_session && im_session->mSessionType == LLIMModel::LLIMSession::GROUP_SESSION); - if(mIsGroupMsg) - { - mAvatarName->setValue(im_session->mName); - LLAvatarName avatar_name; - LLAvatarNameCache::get(p.avatar_id, &avatar_name); - p.message = "[From " + avatar_name.getDisplayName() + "]\n" + p.message; - } - + std::string title = mIsGroupMsg ? im_session->mName : p.from; + mAvatarName->setValue(title); + //Handle IRC styled /me messages. std::string prefix = p.message.substr(0, 4); if (prefix == "/me " || prefix == "/me'") @@ -88,14 +83,16 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif } else { + if (mIsGroupMsg) + { + LLAvatarName avatar_name; + LLAvatarNameCache::get(p.avatar_id, &avatar_name); + p.message = "[From " + avatar_name.getDisplayName() + "]\n" + p.message; + } style_params.font.style = "NORMAL"; mMessage->setText(p.message, style_params); } - if(!mIsGroupMsg) - { - mAvatarName->setValue(p.from); - } mTime->setValue(p.time); mSessionID = p.session_id; mAvatarID = p.avatar_id; -- cgit v1.2.3 From f9242c3caa1e4bac5dbb89adc1ebc50f848859cb Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 23 Mar 2018 11:51:51 +0200 Subject: MAINT-8414 Change LOD slider min value to 1 --- .../skins/default/xui/en/floater_preferences_graphics_advanced.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index c6b91a8b2f..1425d16cf1 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -509,6 +509,7 @@ label_width="185" layout="topleft" left="420" + min_val="1" max_val="2" name="ObjectMeshDetail" show_text="false" -- cgit v1.2.3 From 536a99c7aebdc42b26b150bee269edd2f430e289 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 26 Mar 2018 17:42:57 +0300 Subject: MAINT-8428 FIXED [OSX] The 'Eyedropper' cursor is not shown in the world --- indra/newview/cursors_mac/UI_CURSOR_PIPETTE.tif | Bin 0 -> 326 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 indra/newview/cursors_mac/UI_CURSOR_PIPETTE.tif (limited to 'indra/newview') diff --git a/indra/newview/cursors_mac/UI_CURSOR_PIPETTE.tif b/indra/newview/cursors_mac/UI_CURSOR_PIPETTE.tif new file mode 100644 index 0000000000..b4780967f9 Binary files /dev/null and b/indra/newview/cursors_mac/UI_CURSOR_PIPETTE.tif differ -- cgit v1.2.3 From b1a84d955144664eb83cebbb4eb6b9f5229b0219 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 29 Mar 2018 18:17:59 +0300 Subject: MAINT-2929 Group Role Permission "Eject Members from this Group" Is Poorly Described --- indra/newview/llpanelgrouproles.cpp | 47 +++++++++++++- indra/newview/llpanelgrouproles.h | 6 ++ .../skins/default/xui/en/panel_group_roles.xml | 74 ++++++++++++++++++++-- .../newview/skins/default/xui/en/role_actions.xml | 2 +- 4 files changed, 120 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 66a0a1d4ad..5ee272749c 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -821,8 +821,12 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) mMembersList = parent->getChild("member_list", recurse); mAssignedRolesList = parent->getChild("member_assigned_roles", recurse); mAllowedActionsList = parent->getChild("member_allowed_actions", recurse); + mActionDescription = parent->getChild("member_action_description", recurse); - if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList) return FALSE; + if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return FALSE; + + mAllowedActionsList->setCommitOnSelectionChange(TRUE); + mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupMembersSubTab::updateActionDescription, this)); // We want to be notified whenever a member is selected. mMembersList->setCommitOnSelectionChange(TRUE); @@ -889,6 +893,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() mAssignedRolesList->deleteAllItems(); mAllowedActionsList->deleteAllItems(); + mActionDescription->clear(); LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) @@ -1386,6 +1391,7 @@ void LLPanelGroupMembersSubTab::activate() update(GC_MEMBER_DATA); } } + mActionDescription->clear(); } void LLPanelGroupMembersSubTab::deactivate() @@ -1894,6 +1900,23 @@ bool LLPanelGroupMembersSubTab::handleBanCallback(const LLSD& notification, cons return false; } +void LLPanelGroupMembersSubTab::updateActionDescription() +{ + mActionDescription->setText(std::string()); + LLScrollListItem* action_item = mAllowedActionsList->getFirstSelected(); + if (!action_item || !mAllowedActionsList->getCanSelect()) + { + return; + } + + LLRoleAction* rap = (LLRoleAction*)action_item->getUserdata(); + if (rap) + { + std::string desc = rap->mLongDescription.empty() ? rap->mDescription : rap->mLongDescription; + mActionDescription->setText(desc); + } +} + void LLPanelGroupMembersSubTab::handleBanMember() { LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); @@ -1964,6 +1987,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mRolesList = parent->getChild("role_list", recurse); mAssignedMembersList = parent->getChild("role_assigned_members", recurse); mAllowedActionsList = parent->getChild("role_allowed_actions", recurse); + mActionDescription = parent->getChild("role_action_description", recurse); mRoleName = parent->getChild("role_name", recurse); mRoleTitle = parent->getChild("role_title", recurse); @@ -1971,7 +1995,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mMemberVisibleCheck = parent->getChild("role_visible_in_list", recurse); - if (!mRolesList || !mAssignedMembersList || !mAllowedActionsList + if (!mRolesList || !mAssignedMembersList || !mAllowedActionsList || !mActionDescription || !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck) { LL_WARNS() << "ARG! element not found." << LL_ENDL; @@ -2004,6 +2028,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mMemberVisibleCheck->setCommitCallback(onMemberVisibilityChange, this); mAllowedActionsList->setCommitOnSelectionChange(TRUE); + mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupRolesSubTab::updateActionDescription, this)); mRoleName->setCommitOnFocusLost(TRUE); mRoleName->setKeystrokeCallback(onPropertiesKey, this); @@ -2023,6 +2048,7 @@ void LLPanelGroupRolesSubTab::activate() { LLPanelGroupSubTab::activate(); + mActionDescription->clear(); mRolesList->deselectAllItems(); mAssignedMembersList->deleteAllItems(); mAllowedActionsList->deleteAllItems(); @@ -2707,6 +2733,23 @@ void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role) } } +void LLPanelGroupRolesSubTab::updateActionDescription() +{ + mActionDescription->setText(std::string()); + LLScrollListItem* action_item = mAllowedActionsList->getFirstSelected(); + if (!action_item || !mAllowedActionsList->getCanSelect()) + { + return; + } + + LLRoleAction* rap = (LLRoleAction*)action_item->getUserdata(); + if (rap) + { + std::string desc = rap->mLongDescription.empty() ? rap->mDescription : rap->mLongDescription; + mActionDescription->setText(desc); + } +} + void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id) { if(mRolesList) mRolesList->deleteAllItems(); diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 1d1d69e0ae..99ee310dd6 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -182,6 +182,7 @@ public: bool handleBanCallback(const LLSD& notification, const LLSD& response); void confirmBanMembers(); + void updateActionDescription(); void applyMemberChanges(); bool addOwnerCB(const LLSD& notification, const LLSD& response); @@ -222,6 +223,8 @@ protected: BOOL mPendingMemberUpdate; BOOL mHasMatch; + LLTextEditor* mActionDescription; + member_role_changes_map_t mMemberRoleChangeData; U32 mNumOwnerAdditions; @@ -269,6 +272,8 @@ public: static void onDeleteRole(void*); void handleDeleteRole(); + void updateActionDescription(); + void saveRoleChanges(bool select_saved_role); virtual void setGroupID(const LLUUID& id); @@ -282,6 +287,7 @@ protected: LLScrollListCtrl* mRolesList; LLNameListCtrl* mAssignedMembersList; LLScrollListCtrl* mAllowedActionsList; + LLTextEditor* mActionDescription; LLLineEditor* mRoleName; LLLineEditor* mRoleTitle; diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index dac4371a38..714d4166c0 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -1,6 +1,6 @@ + name="action" /> + + This Ability is 'Eject Members from this Group'. Only an Owner can eject another Owner. + + + + name="action" /> + + + This Ability is 'Eject Members from this Group'. Only an Owner can eject another Owner. + + - Date: Fri, 30 Mar 2018 13:11:30 +0000 Subject: SL-440 Obtain Abuse Report categories from capability --- indra/newview/llfloaterreporter.cpp | 79 ++++++++++++++++++++++ indra/newview/llfloaterreporter.h | 1 + indra/newview/llviewerregion.cpp | 1 + .../skins/default/xui/en/floater_report_abuse.xml | 1 + 4 files changed, 82 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index a320bcc6fc..26e2470494 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -214,10 +214,30 @@ BOOL LLFloaterReporter::postBuild() std::string reporter = LLSLURL("agent", gAgent.getID(), "inspect").getSLURLString(); getChild("reporter_field")->setValue(reporter); + // request categories + if (gAgent.getRegion() + && gAgent.getRegion()->capabilitiesReceived()) + { + std::string cap_url = gAgent.getRegionCapability("AbuseCategories"); + + if (!cap_url.empty()) + { + std::string lang = gSavedSettings.getString("Language"); + if (lang != "default" && !lang.empty()) + { + cap_url += "?lc="; + cap_url += lang; + } + LLCoros::instance().launch("LLIMProcessing::requestOfflineMessagesCoro", + boost::bind(LLFloaterReporter::requestAbuseCategoriesCoro, cap_url, this->getHandle())); + } + } + center(); return TRUE; } + // virtual LLFloaterReporter::~LLFloaterReporter() { @@ -402,6 +422,65 @@ void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvata } } +void LLFloaterReporter::requestAbuseCategoriesCoro(std::string url, LLHandle handle) +{ + LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAbuseCategoriesCoro", httpPolicy)); + LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + + LLSD result = httpAdapter->getAndSuspend(httpRequest, url); + + LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + + if (!status || !result.has("categories")) // success = httpResults["success"].asBoolean(); + { + LL_WARNS() << "Error requesting Abuse Categories from capability: " << url << LL_ENDL; + return; + } + + if (handle.isDead()) + { + // nothing to do + return; + } + + LLFloater* floater = handle.get(); + LLComboBox* combo = floater->getChild("category_combo"); + if (!combo) + { + LL_WARNS() << "categories category_combo not found!" << LL_ENDL; + return; + } + + //get selection (in case capability took a while) + S32 selection = combo->getCurrentIndex(); + + // Combobox should have a "Select category" element; + // This is a bit of workaround since there is no proper and simple way to save array of + // localizable strings in xml along with data (value). For now combobox is initialized along + // with placeholders, and first element is "Select category" which we want to keep, so remove + // everything but first element. + // Todo: once sim with capability fully releases, just remove this string and all unnecessary + // items from combobox since they will be obsolete (or depending on situation remake this to + // something better, for example move "Select category" to separate string) + while (combo->remove(1)); + + LLSD contents = result["categories"]; + + LLSD::array_iterator i = contents.beginArray(); + LLSD::array_iterator iEnd = contents.endArray(); + for (; i != iEnd; ++i) + { + const LLSD &message_data(*i); + std::string label = message_data["description_localized"]; + combo->add(label, message_data["category"]); + } + + //restore selection + combo->selectNthItem(selection); +} // static void LLFloaterReporter::onClickSend(void *userdata) diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index d9ecb9f4ea..c678df7155 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -129,6 +129,7 @@ private: void setFromAvatarID(const LLUUID& avatar_id); void onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name); + static void requestAbuseCategoriesCoro(std::string url, LLHandle handle); static void finishedARPost(const LLSD &); private: diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b128e2cd93..bb0dbc6457 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2816,6 +2816,7 @@ void LLViewerRegion::unpackRegionHandshake() void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) { + capabilityNames.append("AbuseCategories"); capabilityNames.append("AgentPreferences"); capabilityNames.append("AgentState"); capabilityNames.append("AttachmentResources"); diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml index 225266af86..8fa5b49573 100644 --- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml @@ -188,6 +188,7 @@ tool_tip="Category -- select the category that best describes this report" top_pad="5" width="313"> + Date: Fri, 30 Mar 2018 16:47:29 +0300 Subject: MAINT-8468 Increase max bandwidth on the viewer to 6mbps --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/lltexturefetch.cpp | 2 +- indra/newview/llviewerthrottle.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 756e4b6616..75c7ee002b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12339,7 +12339,7 @@ Type F32 Value - 500.0 + 3000.0 UpdaterMaximumBandwidth diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 6fd90e4935..1f69939c46 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3082,7 +3082,7 @@ void LLTextureFetch::commonUpdate() //virtual S32 LLTextureFetch::update(F32 max_time_ms) { - static LLCachedControl band_width(gSavedSettings,"ThrottleBandwidthKBPS", 500.0); + static LLCachedControl band_width(gSavedSettings,"ThrottleBandwidthKBPS", 3000.0); { mNetworkQueueMutex.lock(); // +Mfnq diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index 22de7e150b..2729253d18 100644 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -46,7 +46,7 @@ const F32 MAX_FRACTIONAL = 1.5f; const F32 MIN_FRACTIONAL = 0.2f; const F32 MIN_BANDWIDTH = 50.f; -const F32 MAX_BANDWIDTH = 3000.f; +const F32 MAX_BANDWIDTH = 6000.f; const F32 STEP_FRACTIONAL = 0.1f; const LLUnit TIGHTEN_THROTTLE_THRESHOLD(3.0f); // packet loss % per s const LLUnit EASE_THROTTLE_THRESHOLD(0.5f); // packet loss % per s -- cgit v1.2.3 From f271522d918b125ec8f83758e95bc26b4f1fe5f9 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 2 Apr 2018 12:13:16 +0300 Subject: MAINT-8469 FIXED text description of group 'Abilities' --- indra/newview/skins/default/xui/en/role_actions.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml index a9523d9dca..f79d752fdb 100644 --- a/indra/newview/skins/default/xui/en/role_actions.xml +++ b/indra/newview/skins/default/xui/en/role_actions.xml @@ -4,10 +4,10 @@ description="These Abilities include powers to add and remove group Members, and allow new Members to join without an invitation." name="Membership"> Date: Tue, 3 Apr 2018 18:52:09 +0300 Subject: MAINT-8429 FIXED Screenshot opens on full screen of the viewer --- indra/newview/llfloatersnapshot.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 25e3d74ebc..156b2ba7b1 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1100,6 +1100,7 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) if(preview) { LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL; + preview->setAllowFullScreenPreview(TRUE); preview->updateSnapshot(TRUE); } focusFirstItem(FALSE); @@ -1129,6 +1130,7 @@ void LLFloaterSnapshotBase::onClose(bool app_quitting) LLSnapshotLivePreview* previewp = getPreviewView(); if (previewp) { + previewp->setAllowFullScreenPreview(FALSE); previewp->setVisible(FALSE); previewp->setEnabled(FALSE); } -- cgit v1.2.3 From cb754c60a9431b1118ebac9a0946010ddbed8239 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 3 Apr 2018 22:37:54 +0000 Subject: MAINT-8465 Fixed Detaching then rezzing then wearing an attachment puts it in an invalid folder. --- indra/newview/llinventorymodel.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 556af93963..60fe152876 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -925,7 +925,17 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) new_item = old_item; LLUUID old_parent_id = old_item->getParentUUID(); LLUUID new_parent_id = item->getParentUUID(); - + bool update_parent_on_server = false; + + if (new_parent_id.isNull()) + { + // item with null parent will end in random location and then in Lost&Found, + // either move to default folder as if it is new item or don't move at all + LL_DEBUGS(LOG_INV) << "Update attempts to reparent item to null folder. Resorting!" << LL_ENDL; + new_parent_id = findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(new_item->getType())); + update_parent_on_server = true; + } + if(old_parent_id != new_parent_id) { // need to update the parent-child tree @@ -947,6 +957,14 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) mask |= LLInventoryObserver::LABEL; } old_item->copyViewerItem(item); + if (update_parent_on_server) + { + LLInventoryModel::LLCategoryUpdate update(new_parent_id, 1); + gInventory.accountForUpdate(update); + // Update on server or item will end up in Lost&Found + old_item->setParent(new_parent_id); + new_item->updateParentOnServer(FALSE); + } mask |= LLInventoryObserver::INTERNAL; } else @@ -2820,7 +2838,6 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32 item_array_t items; update_map_t update; S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); - LLUUID folder_id; // Does this loop ever execute more than once? for(S32 i = 0; i < count; ++i) { @@ -2847,10 +2864,6 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32 { ++update[titem->getParentUUID()]; } - if (folder_id.isNull()) - { - folder_id = titem->getParentUUID(); - } } if(account) { -- cgit v1.2.3 From faceb7112e189af2ec827f1999c295450198045f Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 4 Apr 2018 18:22:34 +0300 Subject: MAINT-8477 FIXED "Zoom" in build tab rotates around the avatar, instead of zooming --- indra/newview/lltoolfocus.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index caa055e5e0..596951fdfb 100644 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -222,8 +222,10 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) gAgentCamera.setFocusGlobal(pick_info); } + BOOL zoom_tool = gCameraBtnZoom && (LLToolMgr::getInstance()->getBaseTool() == LLToolCamera::getInstance()); if (!(pick_info.mKeyMask & MASK_ALT) && !LLFloaterCamera::inFreeCameraMode() && + !zoom_tool && gAgentCamera.cameraThirdPerson() && gViewerWindow->getLeftMouseDown() && !gSavedSettings.getBOOL("FreezeTime") && -- cgit v1.2.3 From bf60675ee5bca3e6e388a6dd62debdf3e7eca8ec Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 5 Apr 2018 17:01:19 +0300 Subject: MAINT-8465 Item should be moved to lost and found folder --- indra/newview/llinventorymodel.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 60fe152876..76bf87cfe5 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -931,8 +931,11 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) { // item with null parent will end in random location and then in Lost&Found, // either move to default folder as if it is new item or don't move at all - LL_DEBUGS(LOG_INV) << "Update attempts to reparent item to null folder. Resorting!" << LL_ENDL; - new_parent_id = findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(new_item->getType())); + LL_WARNS(LOG_INV) << "Update attempts to reparent item " << item->getUUID() + << " to null folder. Moving to Lost&Found. Old item name: " << old_item->getName() + << ". New name: " << item->getName() + << "." << LL_ENDL; + new_parent_id = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); update_parent_on_server = true; } @@ -948,6 +951,11 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) item_array = get_ptr_in_map(mParentChildItemTree, new_parent_id); if(item_array) { + if (update_parent_on_server) + { + LLInventoryModel::LLCategoryUpdate update(new_parent_id, 1); + gInventory.accountForUpdate(update); + } item_array->push_back(old_item); } mask |= LLInventoryObserver::STRUCTURE; @@ -959,9 +967,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) old_item->copyViewerItem(item); if (update_parent_on_server) { - LLInventoryModel::LLCategoryUpdate update(new_parent_id, 1); - gInventory.accountForUpdate(update); - // Update on server or item will end up in Lost&Found + // Parent id at server is null, so update server even if item already is in the same folder old_item->setParent(new_parent_id); new_item->updateParentOnServer(FALSE); } -- cgit v1.2.3 From 83de982be911322dd0d22b5818363355fc9a5e4f Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 5 Apr 2018 18:22:15 +0300 Subject: MAINT-8488 FIXED Favourite location list on login screen is not updated after pressing "Esc" key while in username field --- indra/newview/llpanellogin.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index c876c1c149..5f26821c4f 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -284,6 +284,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, username_combo->setTextChangedCallback(boost::bind(&LLPanelLogin::addFavoritesToStartLocation, this)); // STEAM-14: When user presses Enter with this field in focus, initiate login username_combo->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); + username_combo->setKeystrokeOnEsc(TRUE); } void LLPanelLogin::addFavoritesToStartLocation() -- cgit v1.2.3 From c1a44d462e39c84a6af187ed14c6c8beee3140da Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 6 Apr 2018 12:15:08 +0000 Subject: MAINT-8479 Acount for possibility of agent's position above ground being below agent's pelvis --- indra/newview/llagent.cpp | 2 ++ indra/newview/lltoolselect.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2243cbdf5a..901294d6b4 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1580,6 +1580,8 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) LLViewerObject *obj; LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj); + // Note: this might malfunction for sitting agent, since pelvis stays same, but agent's position becomes lower + // But for autopilot to work we assume that agent is standing and ready to go. F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]); // clamp z value of target to minimum height above ground diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 1fcc9a0711..0ff05479f1 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -194,7 +194,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi { LLQuaternion target_rot; target_rot.shortestArc(LLVector3::x_axis, selection_dir); - gAgent.startAutoPilotGlobal(gAgent.getPositionGlobal(), "", &target_rot, NULL, NULL, 1.f, SELECTION_ROTATION_TRESHOLD); + gAgent.startAutoPilotGlobal(gAgent.getPositionGlobal(), "", &target_rot, NULL, NULL, llmax(1.f, gAgentAvatarp->getPelvisToFoot()), SELECTION_ROTATION_TRESHOLD); } } -- cgit v1.2.3 From 2dc1f3b7d9c927189101dfa550f1cd59e461f55a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 6 Apr 2018 12:52:39 +0000 Subject: SL-440 Fix coroutine name --- indra/newview/llfloaterreporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 26e2470494..d94bf3f651 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -228,7 +228,7 @@ BOOL LLFloaterReporter::postBuild() cap_url += "?lc="; cap_url += lang; } - LLCoros::instance().launch("LLIMProcessing::requestOfflineMessagesCoro", + LLCoros::instance().launch("LLFloaterReporter::requestAbuseCategoriesCoro", boost::bind(LLFloaterReporter::requestAbuseCategoriesCoro, cap_url, this->getHandle())); } } -- cgit v1.2.3 From 5b46df908fc2798815bd157c7468b07f7b3acefb Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 10 Apr 2018 18:30:48 +0300 Subject: MAINT-8518 FIXED Notifications.xml inconsistency / Referring to residents as "Players" --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6aa6653f42..73b7671824 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -11031,7 +11031,7 @@ An internal error prevented us from properly updating your viewer. The L$ balan name="LargePrimAgentIntersect" type="notify"> fail -Cannot create large prims that intersect other players. Please re-try when other players have moved. +Cannot create large prims that intersect other residents. Please re-try when other residents have moved. Date: Tue, 10 Apr 2018 15:59:21 +0000 Subject: MAINT-8489 Remove/Cleanup LLIMInfo --- indra/newview/llfloaterimsession.cpp | 25 ++++++++++++------------- indra/newview/llfloaterimsession.h | 8 ++++---- indra/newview/llimprocessing.cpp | 36 ++---------------------------------- indra/newview/llimview.cpp | 14 +++++++------- indra/newview/llimview.h | 6 +++--- indra/newview/llvoicevivox.cpp | 4 ++-- 6 files changed, 30 insertions(+), 63 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 6623ce0f80..a4ab1af9a8 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -82,8 +82,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id) mPositioned(false), mSessionInitialized(false), mMeTypingTimer(), - mOtherTypingTimer(), - mImInfo() + mOtherTypingTimer() { mIsNearbyChat = false; @@ -125,7 +124,7 @@ void LLFloaterIMSession::refresh() if (mOtherTyping && mOtherTypingTimer.getElapsedTimeF32() > OTHER_TYPING_TIMEOUT) { LL_DEBUGS("TypingMsgs") << "Received: is typing cleared due to timeout" << LL_ENDL; - removeTypingIndicator(mImInfo); + removeTypingIndicator(mImFromId); mOtherTyping = false; } @@ -1006,19 +1005,19 @@ void LLFloaterIMSession::setTyping(bool typing) } } -void LLFloaterIMSession::processIMTyping(const LLIMInfo* im_info, BOOL typing) +void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, BOOL typing) { LL_DEBUGS("TypingMsgs") << "typing=" << typing << LL_ENDL; if ( typing ) { // other user started typing - addTypingIndicator(im_info); + addTypingIndicator(from_id); mOtherTypingTimer.reset(); } else { // other user stopped typing - removeTypingIndicator(im_info); + removeTypingIndicator(from_id); } } @@ -1218,7 +1217,7 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids) return is_region_exist; } -void LLFloaterIMSession::addTypingIndicator(const LLIMInfo* im_info) +void LLFloaterIMSession::addTypingIndicator(const LLUUID& from_id) { /* Operation of " is typing" state machine: Not Typing state: @@ -1248,35 +1247,35 @@ Note: OTHER_TYPING_TIMEOUT must be > ME_TYPING_TIMEOUT for proper operation of t */ // We may have lost a "stop-typing" packet, don't add it twice - if (im_info && !mOtherTyping) + if (from_id.notNull() && !mOtherTyping) { mOtherTyping = true; mOtherTypingTimer.reset(); // Save im_info so that removeTypingIndicator can be properly called because a timeout has occurred - mImInfo = im_info; + mImFromId = from_id; // Update speaker LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if ( speaker_mgr ) { - speaker_mgr->setSpeakerTyping(im_info->mFromID, TRUE); + speaker_mgr->setSpeakerTyping(from_id, TRUE); } } } -void LLFloaterIMSession::removeTypingIndicator(const LLIMInfo* im_info) +void LLFloaterIMSession::removeTypingIndicator(const LLUUID& from_id) { if (mOtherTyping) { mOtherTyping = false; - if (im_info) + if (from_id.notNull()) { // Update speaker LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if (speaker_mgr) { - speaker_mgr->setSpeakerTyping(im_info->mFromID, FALSE); + speaker_mgr->setSpeakerTyping(from_id, FALSE); } } } diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index 0f7164a585..28464fc14b 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -122,7 +122,7 @@ public: const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); - void processIMTyping(const LLIMInfo* im_info, BOOL typing); + void processIMTyping(const LLUUID& from_id, BOOL typing); void processAgentListUpdates(const LLSD& body); void processSessionUpdate(const LLSD& session_update); @@ -165,10 +165,10 @@ private: void boundVoiceChannel(); // Add the "User is typing..." indicator. - void addTypingIndicator(const LLIMInfo* im_info); + void addTypingIndicator(const LLUUID& from_id); // Remove the "User is typing..." indicator. - void removeTypingIndicator(const LLIMInfo* im_info = NULL); + void removeTypingIndicator(const LLUUID& from_id = LLUUID::null); static void closeHiddenIMToasts(); @@ -199,7 +199,7 @@ private: // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; - const LLIMInfo* mImInfo; + LLUUID mImFromId; }; #endif // LL_FLOATERIMSESSION_H diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index da0c218f9f..9a11680d42 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -593,45 +593,13 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, case IM_TYPING_START: { - std::vector bucket(binary_bucket[0], binary_bucket_size); - LLSD data; - data["binary_bucket"] = bucket; - LLPointer im_info = new LLIMInfo(from_id, - from_group, - to_id, - dialog, - agentName, - message, - session_id, - parent_estate_id, - region_id, - position, - data, - offline, - timestamp); - gIMMgr->processIMTypingStart(im_info); + gIMMgr->processIMTypingStart(from_id, dialog); } break; case IM_TYPING_STOP: { - std::vector bucket(binary_bucket[0], binary_bucket_size); - LLSD data; - data["binary_bucket"] = bucket; - LLPointer im_info = new LLIMInfo(from_id, - from_group, - to_id, - dialog, - agentName, - message, - session_id, - parent_estate_id, - region_id, - position, - data, - offline, - timestamp); - gIMMgr->processIMTypingStop(im_info); + gIMMgr->processIMTypingStop(from_id, dialog); } break; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d62b6300cb..0f5d514660 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3432,23 +3432,23 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id, } } -void LLIMMgr::processIMTypingStart(const LLIMInfo* im_info) +void LLIMMgr::processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type) { - processIMTypingCore(im_info, TRUE); + processIMTypingCore(from_id, im_type, TRUE); } -void LLIMMgr::processIMTypingStop(const LLIMInfo* im_info) +void LLIMMgr::processIMTypingStop(const LLUUID& from_id, const EInstantMessage im_type) { - processIMTypingCore(im_info, FALSE); + processIMTypingCore(from_id, im_type, FALSE); } -void LLIMMgr::processIMTypingCore(const LLIMInfo* im_info, BOOL typing) +void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing) { - LLUUID session_id = computeSessionID(im_info->mIMType, im_info->mFromID); + LLUUID session_id = computeSessionID(im_type, from_id); LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id); if ( im_floater ) { - im_floater->processIMTyping(im_info, typing); + im_floater->processIMTyping(from_id, typing); } } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index e3851a56e0..81d3ffa1a6 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -391,8 +391,8 @@ public: const std::string& session_handle = LLStringUtil::null, const std::string& session_uri = LLStringUtil::null); - void processIMTypingStart(const LLIMInfo* im_info); - void processIMTypingStop(const LLIMInfo* im_info); + void processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type); + void processIMTypingStop(const LLUUID& from_id, const EInstantMessage im_type); // automatically start a call once the session has initialized void autoStartCallOnStartup(const LLUUID& session_id); @@ -471,7 +471,7 @@ private: void noteOfflineUsers(const LLUUID& session_id, const std::vector& ids); void noteMutedUsers(const LLUUID& session_id, const std::vector& ids); - void processIMTypingCore(const LLIMInfo* im_info, BOOL typing); + void processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing); static void onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarName& name); diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 838de48308..da4b6a5008 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -3997,13 +3997,13 @@ void LLVivoxVoiceClient::sessionNotificationEvent(std::string &sessionHandle, st { // Other end started typing // TODO: The proper way to add a typing notification seems to be LLIMMgr::processIMTypingStart(). - // It requires an LLIMInfo for the message, which we don't have here. + // It requires some info for the message, which we don't have here. } else if (!stricmp(notificationType.c_str(), "NotTyping")) { // Other end stopped typing // TODO: The proper way to remove a typing notification seems to be LLIMMgr::processIMTypingStop(). - // It requires an LLIMInfo for the message, which we don't have here. + // It requires some info for the message, which we don't have here. } else { -- cgit v1.2.3 From 31a2379607af21730e854773613e71c80a8caa0b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 10 Apr 2018 18:01:02 +0300 Subject: Fix for some tests not building --- indra/newview/tests/lldateutil_test.cpp | 2 +- indra/newview/tests/llslurl_test.cpp | 4 ++-- indra/newview/tests/llviewernetwork_test.cpp | 4 ++-- indra/newview/tests/llworldmap_test.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp index 47353962e1..62158d8f66 100644 --- a/indra/newview/tests/lldateutil_test.cpp +++ b/indra/newview/tests/lldateutil_test.cpp @@ -45,7 +45,7 @@ std::map< std::string, std::string > gString; typedef std::pair< std::string, int > count_string_t; std::map< count_string_t, std::string > gCountString; -std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) +std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string) { std::string text = gString[xml_desc]; LLStringUtil::format(text, args); diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 4694f657b6..eabf922875 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -46,10 +46,10 @@ static const char * const TEST_FILENAME("llslurl_test.xml"); class LLTrans { public: - static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args); + static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false); }; -std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) +std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string) { return std::string(); } diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index e68da14fe9..3dd327591e 100644 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -45,10 +45,10 @@ static const char * const TEST_FILENAME("llviewernetwork_test.xml"); class LLTrans { public: - static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args); + static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false); }; -std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) +std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string) { std::string grid_label = std::string(); if(xml_desc == "AgniGridLabel") diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp index 84194adb5d..f1dd8acccf 100644 --- a/indra/newview/tests/llworldmap_test.cpp +++ b/indra/newview/tests/llworldmap_test.cpp @@ -66,7 +66,7 @@ void LLWorldMipmap::equalizeBoostLevels() { } LLPointer LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load) { return NULL; } // Stub other stuff -std::string LLTrans::getString(const std::string &, const LLStringUtil::format_map_t& ) { return std::string("test_trans"); } +std::string LLTrans::getString(const std::string &, const LLStringUtil::format_map_t&, bool def_string) { return std::string("test_trans"); } void LLUIString::updateResult() const { } void LLUIString::setArg(const std::string& , const std::string& ) { } void LLUIString::assign(const std::string& ) { } -- cgit v1.2.3 From d6f1dc06ee590aa2aeb9d3eb953a1217a83c9482 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 13 Apr 2018 18:29:47 +0300 Subject: MAINT-8532 FIXED Group invite text is overlapped when an empty string is present in the group description ending --- indra/newview/llnotificationlistitem.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index cbcf9cac9c..f2de8e54a0 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -288,9 +288,7 @@ BOOL LLGroupInviteNotificationListItem::postBuild() //invitation with any non-default group role, doesn't have newline characters at the end unlike simple invitations std::string invitation_desc = mNoticeTextExp->getValue().asString(); - boost::regex pattern = boost::regex("\n\n$", boost::regex::perl|boost::regex::icase); - boost::match_results matches; - if(!boost::regex_search(invitation_desc, matches, pattern)) + if (invitation_desc.substr(invitation_desc.size() - 2) != "\n\n") { invitation_desc += "\n\n"; mNoticeTextExp->setValue(invitation_desc); -- cgit v1.2.3 From 1bdf76dde7aa7cd9c2d0fbb589ac44f6b3788d33 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 16 Apr 2018 16:27:59 +0300 Subject: MAINT-8453 FIXED The "Reload page" button is displayed for some time after opening media browser --- indra/newview/llfloaterwebcontent.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 8a8d92d459..3b17368445 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -105,6 +105,7 @@ BOOL LLFloaterWebContent::postBuild() // these buttons are always enabled mBtnReload->setEnabled( true ); + mBtnReload->setVisible( false ); getChildView("popexternal")->setEnabled( true ); // cache image for secure browsing -- cgit v1.2.3 From 6bb9ec41950d8f83c8659e36850aa47e8ea601b8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 17 Apr 2018 13:11:53 +0000 Subject: MAINT-8498 Fixed item offers not appearing after friednship offer --- indra/newview/llchathistory.cpp | 73 +++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 32 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index a9e8e77a0b..97a71a8802 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -53,6 +53,7 @@ #include "llstylemap.h" #include "llslurl.h" #include "lllayoutstack.h" +#include "llnotifications.h" #include "llnotificationsutil.h" #include "lltoastnotifypanel.h" #include "lltooltip.h" @@ -1315,44 +1316,52 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // notify processing if (chat.mNotifId.notNull()) { - bool create_toast = true; - for (LLToastNotifyPanel::instance_iter ti(LLToastNotifyPanel::beginInstances()) - , tend(LLToastNotifyPanel::endInstances()); ti != tend; ++ti) - { - LLToastNotifyPanel& panel = *ti; - LLIMToastNotifyPanel * imtoastp = dynamic_cast(&panel); - const std::string& notification_name = panel.getNotificationName(); - if (notification_name == "OfferFriendship" && panel.isControlPanelEnabled() && imtoastp) - { - create_toast = false; - break; - } - } - - if (create_toast) - { LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId); if (notification != NULL) { - LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel( - notification, chat.mSessionID, LLRect::null, !use_plain_text_chat_history, mEditor); - - //Prepare the rect for the view - LLRect target_rect = mEditor->getDocumentView()->getRect(); - // squeeze down the widget by subtracting padding off left and right - target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad(); - target_rect.mRight -= mRightWidgetPad; - notify_box->reshape(target_rect.getWidth(), notify_box->getRect().getHeight()); - notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom); + bool create_toast = true; + if (notification->getName() == "OfferFriendship") + { + // We don't want multiple friendship offers to appear, this code checks if there are previous offers + // by iterating though all panels. + // Note: it might be better to simply add a "pending offer" flag somewhere + for (LLToastNotifyPanel::instance_iter ti(LLToastNotifyPanel::beginInstances()) + , tend(LLToastNotifyPanel::endInstances()); ti != tend; ++ti) + { + LLToastNotifyPanel& panel = *ti; + LLIMToastNotifyPanel * imtoastp = dynamic_cast(&panel); + const std::string& notification_name = panel.getNotificationName(); + if (notification_name == "OfferFriendship" + && panel.isControlPanelEnabled() + && imtoastp) + { + create_toast = false; + break; + } + } + } - LLInlineViewSegment::Params params; - params.view = notify_box; - params.left_pad = mLeftWidgetPad; - params.right_pad = mRightWidgetPad; - mEditor->appendWidget(params, "\n", false); + if (create_toast) + { + LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel( + notification, chat.mSessionID, LLRect::null, !use_plain_text_chat_history, mEditor); + + //Prepare the rect for the view + LLRect target_rect = mEditor->getDocumentView()->getRect(); + // squeeze down the widget by subtracting padding off left and right + target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad(); + target_rect.mRight -= mRightWidgetPad; + notify_box->reshape(target_rect.getWidth(), notify_box->getRect().getHeight()); + notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom); + + LLInlineViewSegment::Params params; + params.view = notify_box; + params.left_pad = mLeftWidgetPad; + params.right_pad = mRightWidgetPad; + mEditor->appendWidget(params, "\n", false); + } } } - } // usual messages showing else -- cgit v1.2.3 From 1fc32d4c973275cf86d2b936e7bb3241e0155197 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 17 Apr 2018 18:39:31 +0300 Subject: MAINT-8458 FIXED Fields for new group notice dissapears immediately after appearing --- indra/newview/llpanelgroupnotices.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 48b659a81e..178b5db6c2 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -575,6 +575,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->setNeedsSort(save_sort); mNoticesList->updateSort(); + mNoticesList->selectFirstItem(); } void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data) -- cgit v1.2.3 From 66502df0502f1c2aa6aa9fda0a2a61921535a645 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 20 Apr 2018 20:21:20 +0300 Subject: MAINT-8540 Eliminated a lot of xui related log warnings on startup and opening preferences --- indra/newview/llfloaterpreference.cpp | 33 +++++++++++++--------- indra/newview/llfloaterpreference.h | 1 + indra/newview/llfloatertools.cpp | 1 - indra/newview/llmoveview.cpp | 4 +-- indra/newview/llpanellogin.cpp | 13 --------- indra/newview/llpanellogin.h | 1 - indra/newview/llpanelobject.cpp | 18 ------------ indra/newview/llpanelpeople.cpp | 1 - indra/newview/llpanelvolume.cpp | 6 +--- indra/newview/llpanelvolumepulldown.cpp | 31 ++++++++++++++++---- indra/newview/llpanelvolumepulldown.h | 4 +++ indra/newview/llstartup.cpp | 1 - indra/newview/llstatusbar.cpp | 6 ---- indra/newview/llstatusbar.h | 2 -- indra/newview/llviewermenu.cpp | 19 +++++++++++++ indra/newview/llviewerwindow.cpp | 4 +++ .../skins/default/xui/en/panel_volume_pulldown.xml | 20 ++++++------- 17 files changed, 86 insertions(+), 79 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 5de7ca5289..9d723bdd9d 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1249,6 +1249,8 @@ void LLFloaterPreference::refreshEnabledState() // Cannot have floater active until caps have been received getChild("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true); + + getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess()); } void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() @@ -1383,8 +1385,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() // now turn off any features that are unavailable disableUnavailableSettings(); - - getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess()); } // static @@ -2563,18 +2563,6 @@ BOOL LLPanelPreferenceGraphics::postBuild() LLFloaterReg::showInstance("prefs_graphics_advanced"); LLFloaterReg::hideInstance("prefs_graphics_advanced"); -// Don't do this on Mac as their braindead GL versioning -// sets this when 8x and 16x are indeed available -// -#if !LL_DARWIN - if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f) - { //remove FSAA settings above "4x" - LLComboBox* combo = getChild("fsaa"); - combo->remove("8x"); - combo->remove("16x"); - } -#endif - resetDirtyChilds(); setPresetText(); @@ -2749,6 +2737,23 @@ LLFloaterPreferenceProxy::LLFloaterPreferenceProxy(const LLSD& key) mCommitCallbackRegistrar.add("Proxy.Change", boost::bind(&LLFloaterPreferenceProxy::onChangeSocksSettings, this)); } +BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild() +{ + // Don't do this on Mac as their braindead GL versioning + // sets this when 8x and 16x are indeed available + // +#if !LL_DARWIN + if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f) + { //remove FSAA settings above "4x" + LLComboBox* combo = getChild("fsaa"); + combo->remove("8x"); + combo->remove("16x"); + } +#endif + + return TRUE; +} + void LLFloaterPreferenceGraphicsAdvanced::onOpen(const LLSD& key) { refresh(); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 444ad5a928..0cd7bac20f 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -276,6 +276,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater public: LLFloaterPreferenceGraphicsAdvanced(const LLSD& key); ~LLFloaterPreferenceGraphicsAdvanced(); + /*virtual*/ BOOL postBuild(); void onOpen(const LLSD& key); void onClickCloseBtn(bool app_quitting); void disableUnavailableSettings(); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index c9d664c7c4..cf7096da9c 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -253,7 +253,6 @@ BOOL LLFloaterTools::postBuild() mCheckStretchTexture = getChild("checkbox stretch textures"); getChild("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures")); mComboGridMode = getChild("combobox grid mode"); - mCheckStretchUniformLabel = getChild("checkbox uniform label"); // // Create Buttons diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index c03080beb8..301487b994 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -716,9 +716,9 @@ void LLPanelStandStopFlying::updatePosition() left_tb_width = toolbar_left->getRect().getWidth(); } - if (!mStateManagementButtons.get()) + if (!mStateManagementButtons.get()) // Obsolete?!! { - LLPanel* panel_ssf_container = getRootView()->getChild("state_management_buttons_container"); + LLPanel* panel_ssf_container = gToolBarView->getChild("state_management_buttons_container"); if (panel_ssf_container) { mStateManagementButtons = panel_ssf_container->getHandle(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 5f26821c4f..ef5ce155b1 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -271,9 +271,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* forgot_password_text = getChild("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); - LLTextBox* need_help_text = getChild("login_help"); - need_help_text->setClickedCallback(onClickHelp, NULL); - // get the web browser control LLMediaCtrl* web_browser = getChild("login_html"); web_browser->addObserver(this); @@ -924,16 +921,6 @@ void LLPanelLogin::onClickForgotPassword(void*) } } -//static -void LLPanelLogin::onClickHelp(void*) -{ - if (sInstance) - { - LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->preLoginTopic()); - } -} - // static void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 82ef048493..852195b304 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -99,7 +99,6 @@ private: static void onClickNewAccount(void*); static void onClickVersion(void*); static void onClickForgotPassword(void*); - static void onClickHelp(void*); static void onPassKey(LLLineEditor* caller, void* user_data); static void updateServerCombo(); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index d0dea5d044..25cfb598e7 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -448,20 +448,6 @@ void LLPanelObject::getState( ) S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); BOOL editable = root_objectp->permModify(); - // Select Single Message - getChildView("select_single")->setVisible( FALSE); - getChildView("edit_object")->setVisible( FALSE); - if (!editable || single_volume || selected_count <= 1) - { - getChildView("edit_object")->setVisible( TRUE); - getChildView("edit_object")->setEnabled(TRUE); - } - else - { - getChildView("select_single")->setVisible( TRUE); - getChildView("select_single")->setEnabled(TRUE); - } - BOOL is_flexible = volobjp && volobjp->isFlexible(); BOOL is_permanent = root_objectp->flagObjectPermanent(); BOOL is_permanent_enforced = root_objectp->isPermanentEnforced(); @@ -1893,10 +1879,6 @@ void LLPanelObject::clearCtrls() mLabelTaper ->setEnabled( FALSE ); mLabelRadiusOffset->setEnabled( FALSE ); mLabelRevolutions->setEnabled( FALSE ); - - getChildView("select_single")->setVisible( FALSE); - getChildView("edit_object")->setVisible( TRUE); - getChildView("edit_object")->setEnabled(FALSE); getChildView("scale_hole")->setEnabled(FALSE); getChildView("scale_taper")->setEnabled(FALSE); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index eb2a297a35..30fef9f5f0 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -586,7 +586,6 @@ BOOL LLPanelPeople::postBuild() getChild("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - getChild("fbc_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); if(gMaxAgentGroups <= BASE_MAX_AGENT_GROUPS) { diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index b1895bfc9b..95a535da50 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -282,7 +282,6 @@ void LLPanelVolume::getState( ) if (is_light && editable && single_volume) { - getChildView("label color")->setEnabled(true); //mLabelColor ->setEnabled( TRUE ); LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) @@ -325,7 +324,6 @@ void LLPanelVolume::getState( ) getChild("Light Radius", true)->clear(); getChild("Light Falloff", true)->clear(); - getChildView("label color")->setEnabled(false); LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { @@ -567,9 +565,7 @@ void LLPanelVolume::clearCtrls() getChildView("select_single")->setVisible(true); getChildView("edit_object")->setEnabled(false); getChildView("edit_object")->setVisible(false); - getChildView("Light Checkbox Ctrl")->setEnabled(false); - getChildView("label color")->setEnabled(false); - getChildView("label color")->setEnabled(false); + getChildView("Light Checkbox Ctrl")->setEnabled(false);; LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index 6595da235c..6792137350 100644 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -35,6 +35,7 @@ // Linden libs #include "llbutton.h" +#include "llcheckboxctrl.h" #include "lltabcontainer.h" #include "llfloaterreg.h" #include "llfloaterpreference.h" @@ -52,17 +53,15 @@ LLPanelVolumePulldown::LLPanelVolumePulldown() { mHoverTimer.stop(); - mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2)); + mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2)); + mCommitCallbackRegistrar.add("Vol.SetSounds", boost::bind(&LLPanelVolumePulldown::onClickSetSounds, this)); + mCommitCallbackRegistrar.add("Vol.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelVolumePulldown::updateMediaAutoPlayCheckbox, this, _1)); mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2)); buildFromFile( "panel_volume_pulldown.xml"); } BOOL LLPanelVolumePulldown::postBuild() { - // set the initial volume-slider's position to reflect reality - LLSliderCtrl* volslider = getChild( "mastervolume" ); - volslider->setValue(gSavedSettings.getF32("AudioLevelMaster")); - return LLPanel::postBuild(); } @@ -130,6 +129,28 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data) control->set(LLSD(FALSE)); } +void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) +{ + std::string name = ctrl->getName(); + + // Disable "Allow Media to auto play" only when both + // "Streaming Music" and "Media" are unchecked. STORM-513. + if ((name == "enable_music") || (name == "enable_media")) + { + bool music_enabled = getChild("enable_music")->get(); + bool media_enabled = getChild("enable_media")->get(); + + getChild("media_auto_play_btn")->setEnabled(music_enabled || media_enabled); + } +} + +void LLPanelVolumePulldown::onClickSetSounds() +{ + // Disable Enable gesture sounds checkbox if the master sound is disabled + // or if sound effects are disabled. + getChild("gesture_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds")); +} + //virtual void LLPanelVolumePulldown::draw() { diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h index b843fab756..4f23112f50 100644 --- a/indra/newview/llpanelvolumepulldown.h +++ b/indra/newview/llpanelvolumepulldown.h @@ -47,6 +47,10 @@ class LLPanelVolumePulldown : public LLPanel private: void setControlFalse(const LLSD& user_data); + void onClickSetSounds(); + // Disables "Allow Media to auto play" check box only when both + // "Streaming Music" and "Media" are unchecked. Otherwise enables it. + void updateMediaAutoPlayCheckbox(LLUICtrl* ctrl); void onAdvancedButtonClick(const LLSD& user_data); LLFrameTimer mHoverTimer; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 62560a2fc8..7a4c41779a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -751,7 +751,6 @@ bool idle_startup() if (gLoginMenuBarView == NULL) { LL_DEBUGS("AppInit") << "initializing menu bar" << LL_ENDL; - initialize_edit_menu(); initialize_spellcheck_menu(); init_menus(); } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 72c5c961aa..43c0fbd53a 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -108,7 +108,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mTextTime(NULL), mSGBandwidth(NULL), mSGPacketLoss(NULL), - mBtnStats(NULL), mBtnVolume(NULL), mBoxBalance(NULL), mBalance(0), @@ -168,8 +167,6 @@ BOOL LLStatusBar::postBuild() mBoxBalance = getChild("balance"); mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this ); - - mBtnStats = getChildView("stat_btn"); mIconPresets = getChild( "presets_icon" ); mIconPresets->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterPresets, this)); @@ -242,8 +239,6 @@ BOOL LLStatusBar::postBuild() mPanelNearByMedia->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); mPanelNearByMedia->setVisible(FALSE); - mScriptOut = getChildView("scriptout"); - return TRUE; } @@ -297,7 +292,6 @@ void LLStatusBar::refresh() mSGBandwidth->setVisible(net_stats_visible); mSGPacketLoss->setVisible(net_stats_visible); - mBtnStats->setEnabled(net_stats_visible); // update the master volume button state bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 277f039f20..a3326e752a 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -105,12 +105,10 @@ private: LLStatGraph *mSGBandwidth; LLStatGraph *mSGPacketLoss; - LLView *mBtnStats; LLIconCtrl *mIconPresets; LLButton *mBtnVolume; LLTextBox *mBoxBalance; LLButton *mMediaToggle; - LLView *mScriptOut; LLFrameTimer mClockUpdateTimer; S32 mBalance; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e973363e0f..0eebf2051c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7976,6 +7976,23 @@ void handle_web_browser_test(const LLSD& param) LLWeb::loadURLInternal(url); } +bool callback_clear_cache_immediately(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if ( option == 0 ) // YES + { + //clear cache + LLAppViewer::instance()->purgeCacheImmediate(); + } + + return false; +} + +void handle_cache_clear_immediately() +{ + LLNotificationsUtil::add("ConfirmClearCache", LLSD(), LLSD(), callback_clear_cache_immediately); +} + void handle_web_content_test(const LLSD& param) { std::string url = param.asString(); @@ -9026,6 +9043,8 @@ void initialize_menus() //Develop (Texture Fetch Debug Console) view_listener_t::addMenu(new LLDevelopTextureFetchDebugger(), "Develop.SetTexFetchDebugger"); + //Develop (clear cache immediately) + commit.add("Develop.ClearCache", boost::bind(&handle_cache_clear_immediately) ); // Admin >Object view_listener_t::addMenu(new LLAdminForceTakeCopy(), "Admin.ForceTakeCopy"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e90b4ac86c..a6a083ec6b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1946,6 +1946,10 @@ void LLViewerWindow::initBase() // Create global views + // Login screen and main_view.xml need edit menus for preferences and browser + LL_DEBUGS("AppInit") << "initializing edit menu" << LL_ENDL; + initialize_edit_menu(); + // Create the floater view at the start so that other views can add children to it. // (But wait to add it as a child of the root view so that it will be in front of the // other views.) diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 6adede0362..2034409111 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -29,7 +29,7 @@ top="10" volume="true"> - - - - -- cgit v1.2.3 From 7fc86d1a99245556e7f886dd75546716d4a30cc8 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 22 May 2018 13:42:15 +0300 Subject: MAINT-8553 FIXED link is not copied from original folder in some cases --- indra/newview/llinventoryfunctions.cpp | 81 ++++++++++++++++++---------------- indra/newview/llinventoryfunctions.h | 2 + 2 files changed, 45 insertions(+), 38 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 0da4331af8..030c967019 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -398,61 +398,66 @@ void copy_inventory_category(LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& parent_id, const LLUUID& root_copy_id, - bool move_no_copy_items ) + bool move_no_copy_items ) { // Create the initial folder - LLUUID new_cat_uuid = gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName()); + inventory_func_type func = boost::bind(©_inventory_category_content, _1, model, cat, root_copy_id, move_no_copy_items); + gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func); +} + +void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& root_copy_id, bool move_no_copy_items) +{ model->notifyObservers(); - + // We need to exclude the initial root of the copy to avoid recursively copying the copy, etc... LLUUID root_id = (root_copy_id.isNull() ? new_cat_uuid : root_copy_id); // Get the content of the folder LLInventoryModel::cat_array_t* cat_array; LLInventoryModel::item_array_t* item_array; - gInventory.getDirectDescendentsOf(cat->getUUID(),cat_array,item_array); - - // If root_copy_id is null, tell the marketplace model we'll be waiting for new items to be copied over for this folder - if (root_copy_id.isNull()) - { - LLMarketplaceData::instance().setValidationWaiting(root_id,count_descendants_items(cat->getUUID())); - } + gInventory.getDirectDescendentsOf(cat->getUUID(), cat_array, item_array); + + // If root_copy_id is null, tell the marketplace model we'll be waiting for new items to be copied over for this folder + if (root_copy_id.isNull()) + { + LLMarketplaceData::instance().setValidationWaiting(root_id, count_descendants_items(cat->getUUID())); + } // Copy all the items LLInventoryModel::item_array_t item_array_copy = *item_array; for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++) { LLInventoryItem* item = *iter; - LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid)); + LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid)); - if (item->getIsLinkType()) - { - link_inventory_object(new_cat_uuid, item->getLinkedUUID(), cb); - } - else if(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) - { - // If the item is nocopy, we do nothing or, optionally, move it - if (move_no_copy_items) - { - // Reparent the item - LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) item; - gInventory.changeItemParent(viewer_inv_item, new_cat_uuid, true); - } - // Decrement the count in root_id since that one item won't be copied over - LLMarketplaceData::instance().decrementValidationWaiting(root_id); - } - else - { - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - new_cat_uuid, - std::string(), - cb); - } + if (item->getIsLinkType()) + { + link_inventory_object(new_cat_uuid, item->getLinkedUUID(), cb); + } + else if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + { + // If the item is nocopy, we do nothing or, optionally, move it + if (move_no_copy_items) + { + // Reparent the item + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *)item; + gInventory.changeItemParent(viewer_inv_item, new_cat_uuid, true); + } + // Decrement the count in root_id since that one item won't be copied over + LLMarketplaceData::instance().decrementValidationWaiting(root_id); + } + else + { + copy_inventory_item( + gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + new_cat_uuid, + std::string(), + cb); + } } - + // Copy all the folders LLInventoryModel::cat_array_t cat_array_copy = *cat_array; for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++) diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index d454d7e00b..fd106bc2d8 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -72,6 +72,8 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s void copy_inventory_category(LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& parent_id, const LLUUID& root_copy_id = LLUUID::null, bool move_no_copy_items = false); +void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& root_copy_id, bool move_no_copy_items); + // Generates a string containing the path to the item specified by item_id. void append_path(const LLUUID& id, std::string& path); -- cgit v1.2.3 From 250a0396ac2c8af0a8139b50b55c81f036d37def Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 22 May 2018 14:24:09 +0300 Subject: MAINT-8635 Don't allow using 'close all windows' if modal toast is open --- indra/newview/lltoast.cpp | 15 +++++++++++++++ indra/newview/lltoast.h | 4 ++++ indra/newview/llviewermenufile.cpp | 5 +++-- 3 files changed, 22 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index edde7c8076..b9b05966bc 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -34,6 +34,7 @@ #include "llviewercontrol.h" using namespace LLNotificationsUI; +std::list LLToast::sModalToastsList; //-------------------------------------------------------------------------- LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period) @@ -143,6 +144,11 @@ LLToast::LLToast(const LLToast::Params& p) { mOnDeleteToastSignal.connect(p.on_delete_toast()); } + + if (isModal()) + { + sModalToastsList.push_front(this); + } } void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -187,6 +193,15 @@ LLToast::~LLToast() { mOnToastDestroyedSignal(this); } + + if (isModal()) + { + std::list::iterator iter = std::find(sModalToastsList.begin(), sModalToastsList.end(), this); + if (iter != sModalToastsList.end()) + { + sModalToastsList.erase(iter); + } + } } //-------------------------------------------------------------------------- diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index cd92189012..69074b1670 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -108,6 +108,8 @@ public: static void updateClass(); static void cleanupToasts(); + static BOOL isAlertToastShown() { return sModalToastsList.size() > 0; } + LLToast(const LLToast::Params& p); virtual ~LLToast(); BOOL postBuild(); @@ -245,6 +247,8 @@ private: commit_signal_t mToastMouseEnterSignal; commit_signal_t mToastMouseLeaveSignal; + + static std::list sModalToastsList; }; } diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 90355b7166..e4525609c2 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -46,6 +46,7 @@ #include "llimagetga.h" #include "llinventorymodel.h" // gInventory #include "llresourcedata.h" +#include "lltoast.h" #include "llfloaterperms.h" #include "llstatusbar.h" #include "llviewercontrol.h" // gSavedSettings @@ -482,7 +483,7 @@ class LLFileEnableCloseWindow : public view_listener_t bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater()); bool frontmost_snapshot_fl_exists = (NULL != gSnapshotFloaterView->getFrontmostClosableFloater()); - return frontmost_fl_exists || frontmost_snapshot_fl_exists; + return !LLNotificationsUI::LLToast::isAlertToastShown() && (frontmost_fl_exists || frontmost_snapshot_fl_exists); } }; @@ -519,7 +520,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t bool is_floaters_snapshot_opened = (floater_snapshot && floater_snapshot->isInVisibleChain()) || (floater_outfit_snapshot && floater_outfit_snapshot->isInVisibleChain()); bool open_children = gFloaterView->allChildrenClosed() && !is_floaters_snapshot_opened; - return !open_children; + return !open_children && !LLNotificationsUI::LLToast::isAlertToastShown(); } }; -- cgit v1.2.3 From d35a8fcb3fca2b080a029bd261894c3ba0fdb6f5 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 22 May 2018 18:18:57 +0300 Subject: MAINT-8670 Crash in: LLFace::getGeometryVolume() Guarded. --- indra/newview/llface.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 50a4925c37..474645c084 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1217,6 +1217,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM); llassert(verify()); + + if (volume.getNumVolumeFaces() <= f) { + LL_WARNS() << "Attempt get volume face out of range! Total Faces: " << volume.getNumVolumeFaces() << " Attempt get access to: " << f << LL_ENDL; + return FALSE; + } + const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mNumVertices; S32 num_indices = (S32) vf.mNumIndices; -- cgit v1.2.3 From 3c12c7ce5695a1010646cdd01f5484c6c61b50f7 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 23 May 2018 11:58:42 +0300 Subject: MAINT-8619 Disable local textures for selection in Group profile --- indra/newview/llpanelgroupgeneral.cpp | 1 + indra/newview/lltexturectrl.cpp | 7 +++++++ indra/newview/lltexturectrl.h | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index d17f5494a0..f85a2ffbc1 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -194,6 +194,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group) if (mInsignia) { mInsignia->setCommitCallback(onCommitAny, this); + mInsignia->setAllowLocalTexture(FALSE); } mFounderName = getChild("founder_name"); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c7adaa908f..a5a2eec246 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -990,6 +990,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mOnSelectCallback(NULL), mBorderColor( p.border_color() ), mAllowNoTexture( FALSE ), + mAllowLocalTexture( TRUE ), mImmediateFilterPermMask( PERM_NONE ), mNonImmediateFilterPermMask( PERM_NONE ), mCanApplyImmediately( FALSE ), @@ -1198,6 +1199,12 @@ void LLTextureCtrl::showPicker(BOOL take_focus) floaterp->openFloater(); } + LLFloaterTexturePicker* picker_floater = dynamic_cast(floaterp); + if (picker_floater) + { + picker_floater->setLocalTextureEnabled(mAllowLocalTexture); + } + if (take_focus) { floaterp->setFocus(TRUE); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 840feddfaf..6bcf9c3a75 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -142,6 +142,9 @@ public: void setAllowNoTexture( BOOL b ) { mAllowNoTexture = b; } bool getAllowNoTexture() const { return mAllowNoTexture; } + void setAllowLocalTexture(BOOL b) { mAllowLocalTexture = b; } + BOOL getAllowLocalTexture() const { return mAllowLocalTexture; } + const LLUUID& getImageItemID() { return mImageItemID; } virtual void setImageAssetName(const std::string& name); @@ -222,6 +225,7 @@ private: LLTextBox* mCaption; std::string mLabel; BOOL mAllowNoTexture; // If true, the user can select "none" as an option + BOOL mAllowLocalTexture; PermissionMask mImmediateFilterPermMask; PermissionMask mDnDFilterPermMask; PermissionMask mNonImmediateFilterPermMask; -- cgit v1.2.3 From a0d24f18b7675dfcb9b798c95bbc68cf9f1bc900 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 24 May 2018 14:02:51 +0300 Subject: MAINT-8687 Add a hotkey for Advanced > Set UI Size to Default --- indra/newview/skins/default/xui/en/menu_viewer.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index dcd8f0b495..d28f47c2e1 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1487,7 +1487,8 @@ + name="Set UI Size to Default" + shortcut="control|alt|shift|R"> -- cgit v1.2.3 From 5b943c698aa08df54abefdd76bdfeb874bbebb6a Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 24 May 2018 18:14:54 +0300 Subject: MAINT-8634 Hide texture UUIDs for non-gods --- indra/newview/llvoavatar.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0f751de2e3..7458c00b70 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8539,6 +8539,8 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara apr_file_printf( file, "\n" ); apr_file_printf( file, "\n\t\n" ); + bool agent_is_godlike = gAgent.isGodlikeWithoutAdminMenuFakery(); + if (group_by_wearables) { for (S32 type = LLWearableType::WT_SHAPE; type < LLWearableType::WT_COUNT; type++) @@ -8564,8 +8566,11 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara LLViewerTexture* te_image = getImage((ETextureIndex)te, 0); if( te_image ) { - std::string uuid_str; - te_image->getID().toString( uuid_str ); + std::string uuid_str = LLUUID().asString(); + if (agent_is_godlike) + { + te_image->getID().toString(uuid_str); + } apr_file_printf( file, "\t\t\n", te, uuid_str.c_str()); } } @@ -8587,8 +8592,11 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara LLViewerTexture* te_image = getImage((ETextureIndex)te, 0); if( te_image ) { - std::string uuid_str; - te_image->getID().toString( uuid_str ); + std::string uuid_str = LLUUID().asString(); + if (agent_is_godlike) + { + te_image->getID().toString(uuid_str); + } apr_file_printf( file, "\t\t\n", te, uuid_str.c_str()); } } -- cgit v1.2.3 From a28a3b756d7688fcb917122efee01f16ab5319cd Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 25 May 2018 11:32:15 +0300 Subject: MAINT-8694 FIXED Typo in logging --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 10af524ee7..00e72bfbff 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2758,7 +2758,7 @@ void LLVOAvatarSelf::sendHoverHeight() const // class responder if nothing else gets added. // (comment from removed Responder) LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, update, - "Hover hight sent to sim", "Hover hight not sent to sim"); + "Hover height sent to sim", "Hover height not sent to sim"); mLastHoverOffsetSent = hover_offset; } } -- cgit v1.2.3 From c10f8b1aa4f2badbf4b0f72b1747c2943568ed2e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 25 May 2018 12:34:14 +0000 Subject: MAINT-8674 Clean up already requested ids. --- indra/newview/llviewerobjectlist.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index dc54346d59..131434504a 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1046,9 +1046,11 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) mPendingObjectCost.begin(), mPendingObjectCost.end(), std::inserter(diff, diff.begin())); + mStaleObjectCost.clear(); + if (diff.empty()) { - LL_INFOS() << "No outstanding object IDs to request." << LL_ENDL; + LL_INFOS() << "No outstanding object IDs to request. Pending count: " << mPendingObjectCost.size() << " Requesting count: " << mStaleObjectCost.size() << LL_ENDL; return; } @@ -1057,7 +1059,6 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) for (uuid_set_t::iterator it = diff.begin(); it != diff.end(); ++it) { idList.append(*it); - mStaleObjectCost.erase(*it); } mPendingObjectCost.insert(diff.begin(), diff.end()); @@ -1094,9 +1095,7 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) { LLUUID objectId = it->asUUID(); - // If the object was added to the StaleObjectCost set after it had been - // added to mPendingObjectCost it would still be in the StaleObjectCost - // set when we got the response back. + // Object could have been added to the mStaleObjectCost after request started mStaleObjectCost.erase(objectId); mPendingObjectCost.erase(objectId); -- cgit v1.2.3 From 86ffcca29392b79d553ace9403bbf628fbefe3d0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 25 May 2018 16:01:59 +0300 Subject: MAINT-8674 Fixed logs --- indra/newview/llviewerobjectlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 131434504a..23a51b99f6 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1050,7 +1050,7 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) if (diff.empty()) { - LL_INFOS() << "No outstanding object IDs to request. Pending count: " << mPendingObjectCost.size() << " Requesting count: " << mStaleObjectCost.size() << LL_ENDL; + LL_INFOS() << "No outstanding object IDs to request. Pending count: " << mPendingObjectCost.size() << LL_ENDL; return; } -- cgit v1.2.3 From fadb6c7c65f4d531f513d5d896ca25b9bb22b48f Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 25 May 2018 18:00:57 +0300 Subject: MAINT-8459 Save favorite places and landmarks to Location Bar history list --- indra/newview/llnavigationbar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 84a2cd8be1..cfe2e6bf6a 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -443,6 +443,7 @@ void LLNavigationBar::onLocationSelection() { gAgent.teleportViaLandmark( LLUUID(value["AssetUUID"].asString())); + mSaveToLocationHistory = true; return; } else @@ -453,6 +454,7 @@ void LLNavigationBar::onLocationSelection() if (!landmark_items.empty()) { gAgent.teleportViaLandmark( landmark_items[0]->getAssetUUID()); + mSaveToLocationHistory = true; return; } } -- cgit v1.2.3 From 177f24f56fd6a3624efa1fa311c5a79025fbfa64 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 May 2018 17:26:10 +0300 Subject: MAINT-8586 Eliminate obsolete xui elements --- indra/newview/llfloaterproperties.cpp | 4 ---- indra/newview/llfloatertools.cpp | 12 +++-------- indra/newview/llpanelface.cpp | 13 +---------- indra/newview/llpanelvolume.cpp | 1 - indra/newview/llsidepaneliteminfo.cpp | 18 +--------------- .../xui/en/floater_inventory_item_properties.xml | 25 ---------------------- .../skins/default/xui/en/panel_tools_texture.xml | 8 ------- 7 files changed, 5 insertions(+), 76 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 1310a60638..fbb7432f71 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -490,7 +490,6 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) if (is_obj_modify && can_agent_sell && gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE)) { - getChildView("SaleLabel")->setEnabled(is_complete); getChildView("CheckPurchase")->setEnabled(is_complete); getChildView("NextOwnerLabel")->setEnabled(TRUE); @@ -498,13 +497,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions); getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); - getChildView("TextPrice")->setEnabled(is_complete && is_for_sale); combo_sale_type->setEnabled(is_complete && is_for_sale); edit_cost->setEnabled(is_complete && is_for_sale); } else { - getChildView("SaleLabel")->setEnabled(FALSE); getChildView("CheckPurchase")->setEnabled(FALSE); getChildView("NextOwnerLabel")->setEnabled(FALSE); @@ -512,7 +509,6 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) getChildView("CheckNextOwnerCopy")->setEnabled(FALSE); getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE); - getChildView("TextPrice")->setEnabled(FALSE); combo_sale_type->setEnabled(FALSE); edit_cost->setEnabled(FALSE); } diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index cf7096da9c..7fc60ddaac 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1213,7 +1213,7 @@ void LLFloaterTools::getMediaState() &&first_object->permModify() )) { - getChildView("Add_Media")->setEnabled(FALSE); + getChildView("add_media")->setEnabled(FALSE); media_info->clear(); clearMediaSettings(); return; @@ -1224,7 +1224,7 @@ void LLFloaterTools::getMediaState() if(!has_media_capability) { - getChildView("Add_Media")->setEnabled(FALSE); + getChildView("add_media")->setEnabled(FALSE); LL_WARNS("LLFloaterTools: media") << "Media not enabled (no capability) in this region!" << LL_ENDL; clearMediaSettings(); return; @@ -1319,7 +1319,7 @@ void LLFloaterTools::getMediaState() // update UI depending on whether "object" (prim or face) has media // and whether or not you are allowed to edit it. - getChildView("Add_Media")->setEnabled(editable); + getChildView("add_media")->setEnabled(editable); // IF all the faces have media (or all dont have media) if ( LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo ) { @@ -1341,10 +1341,7 @@ void LLFloaterTools::getMediaState() media_title = multi_media_info_str; } - getChildView("media_tex")->setEnabled(bool_has_media && editable); - getChildView("edit_media")->setEnabled(bool_has_media && LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo && editable ); getChildView("delete_media")->setEnabled(bool_has_media && editable ); - getChildView("add_media")->setEnabled(editable); // TODO: display a list of all media on the face - use 'identical' flag } else // not all face has media but at least one does. @@ -1366,10 +1363,7 @@ void LLFloaterTools::getMediaState() } } - getChildView("media_tex")->setEnabled(TRUE); - getChildView("edit_media")->setEnabled(LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo); getChildView("delete_media")->setEnabled(TRUE); - getChildView("add_media")->setEnabled(editable); } navigateToTitleMedia(media_title); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 7e75dca908..01ce4470f0 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1165,16 +1165,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChild("combobox texgen")->setTentative(!identical); getChildView("tex gen")->setEnabled(editable); - if (selected_texgen == LLTextureEntry::TEX_GEN_PLANAR) - { - // EXP-1507 (change label based on the mapping mode) - getChild("rpt")->setValue(getString("string repeats per meter")); - } - else - if (selected_texgen == LLTextureEntry::TEX_GEN_DEFAULT) - { - getChild("rpt")->setValue(getString("string repeats per face")); - } } { @@ -1390,8 +1380,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) mColorSwatch->setValid(FALSE); } getChildView("color trans")->setEnabled(FALSE); - getChildView("rpt")->setEnabled(FALSE); - getChildView("tex offset")->setEnabled(FALSE); + getChildView("rptctrl")->setEnabled(FALSE); getChildView("tex gen")->setEnabled(FALSE); getChildView("label shininess")->setEnabled(FALSE); getChildView("label bumpiness")->setEnabled(FALSE); diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 95a535da50..1c4384ff08 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -524,7 +524,6 @@ void LLPanelVolume::refresh() BOOL visible = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 0 ? TRUE : FALSE; - getChildView("label texture")->setVisible( visible); getChildView("Light FOV")->setVisible( visible); getChildView("Light Focus")->setVisible( visible); getChildView("Light Ambiance")->setVisible( visible); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 43e7e57814..a486a29aa2 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -441,7 +441,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) const std::string perm_and_sale_items[]={ "perms_inv", - "OwnerLabel", "perm_modify", "CheckOwnerModify", "CheckOwnerCopy", @@ -455,10 +454,8 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) "CheckNextOwnerCopy", "CheckNextOwnerTransfer", "CheckPurchase", - "SaleLabel", "ComboBoxSaleType", - "Edit Cost", - "TextPrice" + "Edit Cost" }; const std::string debug_items[]={ @@ -495,14 +492,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) /////////////////////// // OWNER PERMISSIONS // /////////////////////// - if(can_agent_manipulate) - { - getChild("OwnerLabel")->setValue(getString("you_can")); - } - else - { - getChild("OwnerLabel")->setValue(getString("owner_can")); - } U32 base_mask = perm.getMaskBase(); U32 owner_mask = perm.getMaskOwner(); @@ -510,7 +499,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) U32 everyone_mask = perm.getMaskEveryone(); U32 next_owner_mask = perm.getMaskNextOwner(); - getChildView("OwnerLabel")->setEnabled(TRUE); getChildView("CheckOwnerModify")->setEnabled(FALSE); getChild("CheckOwnerModify")->setValue(LLSD((BOOL)(owner_mask & PERM_MODIFY))); getChildView("CheckOwnerCopy")->setEnabled(FALSE); @@ -645,7 +633,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if (is_obj_modify && can_agent_sell && gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE)) { - getChildView("SaleLabel")->setEnabled(is_complete); getChildView("CheckPurchase")->setEnabled(is_complete); getChildView("NextOwnerLabel")->setEnabled(TRUE); @@ -653,13 +640,11 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions); getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); - getChildView("TextPrice")->setEnabled(is_complete && is_for_sale); combo_sale_type->setEnabled(is_complete && is_for_sale); edit_cost->setEnabled(is_complete && is_for_sale); } else { - getChildView("SaleLabel")->setEnabled(FALSE); getChildView("CheckPurchase")->setEnabled(FALSE); getChildView("NextOwnerLabel")->setEnabled(FALSE); @@ -667,7 +652,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) getChildView("CheckNextOwnerCopy")->setEnabled(FALSE); getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE); - getChildView("TextPrice")->setEnabled(FALSE); combo_sale_type->setEnabled(FALSE); edit_cost->setEnabled(FALSE); } diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index 6667238232..45e16c59ae 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -418,30 +418,5 @@ width="90"> N: - - - diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index ffdbc5d227..8c769d87de 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -11,14 +11,6 @@ name="Texture" top="0" width="295"> - - Repeats Per Meter - - - Repeats Per Face - Date: Wed, 30 May 2018 18:31:30 +0300 Subject: MAINT-8700 FIXED The File dialog disconnects the viewer if you do not choose upload files within the first minute --- indra/newview/llfloaterautoreplacesettings.cpp | 108 ++++++----- indra/newview/llfloaterautoreplacesettings.h | 3 + indra/newview/llfloaterspellchecksettings.cpp | 16 +- indra/newview/llfloaterspellchecksettings.h | 1 + indra/newview/llpreviewscript.cpp | 48 ++--- indra/newview/llpreviewscript.h | 5 +- indra/newview/llviewermenufile.cpp | 253 +++++++++++++++++++------ indra/newview/llviewermenufile.h | 19 ++ 8 files changed, 303 insertions(+), 150 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 5830f2f711..ec05ba924c 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -54,6 +54,7 @@ #include "llhost.h" #include "llassetstorage.h" #include "roles_constants.h" +#include "llviewermenufile.h" // LLFilePickerReplyThread #include "llviewertexteditor.h" #include @@ -349,62 +350,58 @@ void LLFloaterAutoReplaceSettings::onDeleteEntry() // called when the Import List button is pressed void LLFloaterAutoReplaceSettings::onImportList() { - LLFilePicker& picker = LLFilePicker::instance(); - if( picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) + (new LLFilePickerReplyThread(boost::bind(&LLFloaterAutoReplaceSettings::loadListFromFile, this, _1), LLFilePicker::FFLOAD_XML, false))->getFile(); +} + +void LLFloaterAutoReplaceSettings::loadListFromFile(const std::vector& filenames) +{ + llifstream file; + file.open(filenames[0].c_str()); + LLSD newList; + if (file.is_open()) { - llifstream file; - file.open(picker.getFirstFile().c_str()); - LLSD newList; - if (file.is_open()) - { - LLSDSerialize::fromXMLDocument(newList, file); - } - file.close(); + LLSDSerialize::fromXMLDocument(newList, file); + } + file.close(); - switch ( mSettings.addList(newList) ) - { - case LLAutoReplaceSettings::AddListOk: - mSelectedListName = LLAutoReplaceSettings::getListName(newList); + switch ( mSettings.addList(newList) ) + { + case LLAutoReplaceSettings::AddListOk: + mSelectedListName = LLAutoReplaceSettings::getListName(newList); - updateListNames(); - updateListNamesControls(); - updateReplacementsList(); - break; + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); + break; - case LLAutoReplaceSettings::AddListDuplicateName: - { - std::string newName = LLAutoReplaceSettings::getListName(newList); - LL_WARNS("AutoReplace")<<"name '"<getFirstSelected()->getColumn(0)->getValue().asString(); - const LLSD* list = mSettings.exportList(listName); std::string listFileName = listName + ".xml"; - LLFilePicker& picker = LLFilePicker::instance(); - if( picker.getSaveFile( LLFilePicker::FFSAVE_XML, listFileName) ) - { - llofstream file; - file.open(picker.getFirstFile().c_str()); - LLSDSerialize::toPrettyXML(*list, file); - file.close(); - } + (new LLFilePickerReplyThread(boost::bind(&LLFloaterAutoReplaceSettings::saveListToFile, this, _1, listName), LLFilePicker::FFSAVE_XML, listFileName))->getFile(); +} + +void LLFloaterAutoReplaceSettings::saveListToFile(const std::vector& filenames, std::string listName) +{ + llofstream file; + const LLSD* list = mSettings.exportList(listName); + file.open(filenames[0].c_str()); + LLSDSerialize::toPrettyXML(*list, file); + file.close(); } void LLFloaterAutoReplaceSettings::onAddEntry() diff --git a/indra/newview/llfloaterautoreplacesettings.h b/indra/newview/llfloaterautoreplacesettings.h index 629aea3e3c..2109aa7026 100644 --- a/indra/newview/llfloaterautoreplacesettings.h +++ b/indra/newview/llfloaterautoreplacesettings.h @@ -112,6 +112,9 @@ private: bool selectedListIsLast(); void cleanUp(); + + void loadListFromFile(const std::vector& filenames); + void saveListToFile(const std::vector& filenames, std::string listName); }; #endif // LLFLOATERAUTOREPLACESETTINGS_H diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 5124dae147..b87044ef5a 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -30,12 +30,13 @@ #include "llfilepicker.h" #include "llfloaterreg.h" #include "llfloaterspellchecksettings.h" +#include "llnotificationsutil.h" #include "llscrolllistctrl.h" #include "llsdserialize.h" #include "llspellcheck.h" #include "lltrans.h" #include "llviewercontrol.h" -#include "llnotificationsutil.h" +#include "llviewermenufile.h" // LLFilePickerReplyThread #include @@ -258,13 +259,12 @@ BOOL LLFloaterSpellCheckerImport::postBuild(void) void LLFloaterSpellCheckerImport::onBtnBrowse() { - LLFilePicker& file_picker = LLFilePicker::instance(); - if (!file_picker.getOpenFile(LLFilePicker::FFLOAD_DICTIONARY)) - { - return; - } + (new LLFilePickerReplyThread(boost::bind(&LLFloaterSpellCheckerImport::importSelectedDictionary, this, _1), LLFilePicker::FFLOAD_DICTIONARY, false))->getFile(); +} - std::string filepath = file_picker.getFirstFile(); +void LLFloaterSpellCheckerImport::importSelectedDictionary(const std::vector& filenames) +{ + std::string filepath = filenames[0]; const std::string extension = gDirUtilp->getExtension(filepath); if ("xcu" == extension) @@ -277,7 +277,7 @@ void LLFloaterSpellCheckerImport::onBtnBrowse() } getChild("dictionary_path")->setValue(filepath); - + mDictionaryDir = gDirUtilp->getDirName(filepath); mDictionaryBasename = gDirUtilp->getBaseFileName(filepath, true); getChild("dictionary_name")->setValue(mDictionaryBasename); diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index de59d83f24..f9bbefafb7 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -58,6 +58,7 @@ protected: void onBtnBrowse(); void onBtnCancel(); void onBtnOK(); + void importSelectedDictionary(const std::vector& filenames); std::string parseXcuFile(const std::string& file_path) const; std::string mDictionaryDir; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 945f3c370c..d4eecaffce 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -61,6 +61,7 @@ #include "llselectmgr.h" #include "llviewerinventory.h" #include "llviewermenu.h" +#include "llviewermenufile.h" // LLFilePickerReplyThread #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" @@ -1202,17 +1203,12 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) void LLScriptEdCore::onBtnLoadFromFile( void* data ) { - LLScriptEdCore* self = (LLScriptEdCore*) data; - - // TODO Maybe add a dialogue warning here if the current file has unsaved changes. - LLFilePicker& file_picker = LLFilePicker::instance(); - if( !file_picker.getOpenFile( LLFilePicker::FFLOAD_SCRIPT ) ) - { - //File picking cancelled by user, so nothing to do. - return; - } + (new LLFilePickerReplyThread(boost::bind(&LLScriptEdCore::loadScriptFromFile, _1, data), LLFilePicker::FFLOAD_SCRIPT, false))->getFile(); +} - std::string filename = file_picker.getFirstFile(); +void LLScriptEdCore::loadScriptFromFile(const std::vector& filenames, void* data) +{ + std::string filename = filenames[0]; llifstream fin(filename.c_str()); @@ -1220,8 +1216,8 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) std::string text; std::string linetotal; while (!fin.eof()) - { - getline(fin,line); + { + getline(fin, line); text += line; if (!fin.eof()) { @@ -1231,7 +1227,8 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) fin.close(); // Only replace the script if there is something to replace with. - if (text.length() > 0) + LLScriptEdCore* self = (LLScriptEdCore*)data; + if (self && (text.length() > 0)) { self->mEditor->selectAll(); LLWString script(utf8str_to_wstring(text)); @@ -1247,16 +1244,21 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata ) if( self->mSaveCallback ) { - LLFilePicker& file_picker = LLFilePicker::instance(); - if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT, self->mScriptName ) ) - { - std::string filename = file_picker.getFirstFile(); - std::string scriptText=self->mEditor->getText(); - llofstream fout(filename.c_str()); - fout<<(scriptText); - fout.close(); - self->mSaveCallback( self->mUserdata, FALSE ); - } + (new LLFilePickerReplyThread(boost::bind(&LLScriptEdCore::saveScriptToFile, _1, userdata), LLFilePicker::FFSAVE_SCRIPT, self->mScriptName))->getFile(); + } +} + +void LLScriptEdCore::saveScriptToFile(const std::vector& filenames, void* data) +{ + LLScriptEdCore* self = (LLScriptEdCore*)data; + if (self) + { + std::string filename = filenames[0]; + std::string scriptText = self->mEditor->getText(); + llofstream fout(filename.c_str()); + fout << (scriptText); + fout.close(); + self->mSaveCallback(self->mUserdata, FALSE); } } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index a185d85889..69cf9d9158 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -109,7 +109,10 @@ public: static void onBtnInsertSample(void*); static void onBtnInsertFunction(LLUICtrl*, void*); static void onBtnLoadFromFile(void*); - static void onBtnSaveToFile(void*); + static void onBtnSaveToFile(void*); + + static void loadScriptFromFile(const std::vector& filenames, void* data); + static void saveScriptToFile(const std::vector& filenames, void* data); static bool enableSaveToFileMenu(void* userdata); static bool enableLoadFromFileMenu(void* userdata); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 8160a3a139..f676519153 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -203,6 +203,40 @@ void LLFilePickerThread::clearDead() } } +LLFilePickerReplyThread::LLFilePickerReplyThread(const file_picked_signal_t::slot_type& cb, LLFilePicker::ELoadFilter filter, bool get_multiple) + : LLFilePickerThread(filter, get_multiple), + mLoadFilter(filter), + mSaveFilter(LLFilePicker::FFSAVE_ALL), + mFilePickedSignal(NULL) +{ + mFilePickedSignal = new file_picked_signal_t(); + mFilePickedSignal->connect(cb); +} + +LLFilePickerReplyThread::LLFilePickerReplyThread(const file_picked_signal_t::slot_type& cb, LLFilePicker::ESaveFilter filter, const std::string &proposed_name) + : LLFilePickerThread(filter, proposed_name), + mLoadFilter(LLFilePicker::FFLOAD_ALL), + mSaveFilter(filter), + mFilePickedSignal(NULL) +{ + mFilePickedSignal = new file_picked_signal_t(); + mFilePickedSignal->connect(cb); +} + +LLFilePickerReplyThread::~LLFilePickerReplyThread() +{ + delete mFilePickedSignal; +} + +void LLFilePickerReplyThread::notify(const std::vector& filenames) +{ + if (filenames.empty()) return; + + if (mFilePickedSignal) + { + (*mFilePickedSignal)(filenames, mLoadFilter, mSaveFilter); + } +} //============================================================================ @@ -249,6 +283,150 @@ std::string build_extensions_string(LLFilePicker::ELoadFilter filter) } } + +const bool check_file_extension(const std::string& filename, LLFilePicker::ELoadFilter type) +{ + std::string ext = gDirUtilp->getExtension(filename); + + //strincmp doesn't like NULL pointers + if (ext.empty()) + { + std::string short_name = gDirUtilp->getBaseFileName(filename); + + // No extension + LLSD args; + args["FILE"] = short_name; + LLNotificationsUtil::add("NoFileExtension", args); + return false; + } + else + { + //so there is an extension + //loop over the valid extensions and compare to see + //if the extension is valid + + //now grab the set of valid file extensions + std::string valid_extensions = build_extensions_string(type); + + BOOL ext_valid = FALSE; + + typedef boost::tokenizer > tokenizer; + boost::char_separator sep(" "); + tokenizer tokens(valid_extensions, sep); + tokenizer::iterator token_iter; + + //now loop over all valid file extensions + //and compare them to the extension of the file + //to be uploaded + for (token_iter = tokens.begin(); + token_iter != tokens.end() && ext_valid != TRUE; + ++token_iter) + { + const std::string& cur_token = *token_iter; + + if (cur_token == ext || cur_token == "*.*") + { + //valid extension + //or the acceptable extension is any + ext_valid = TRUE; + } + }//end for (loop over all tokens) + + if (ext_valid == FALSE) + { + //should only get here if the extension exists + //but is invalid + LLSD args; + args["EXTENSION"] = ext; + args["VALIDS"] = valid_extensions; + LLNotificationsUtil::add("InvalidFileExtension", args); + return false; + } + }//end else (non-null extension) + return true; +} + +const void upload_single_file(const std::vector& filenames, LLFilePicker::ELoadFilter type) +{ + std::string filename = filenames[0]; + if (!check_file_extension(filename, type)) return; + + if (!filename.empty()) + { + if (type == LLFilePicker::FFLOAD_WAV) + { + // pre-qualify wavs to make sure the format is acceptable + std::string error_msg; + if (check_for_invalid_wav_formats(filename, error_msg)) + { + LL_INFOS() << error_msg << ": " << filename << LL_ENDL; + LLSD args; + args["FILE"] = filename; + LLNotificationsUtil::add(error_msg, args); + return; + } + else + { + LLFloaterReg::showInstance("upload_sound", LLSD(filename)); + } + } + if (type == LLFilePicker::FFLOAD_IMAGE) + { + LLFloaterReg::showInstance("upload_image", LLSD(filename)); + } + if (type == LLFilePicker::FFLOAD_ANIM) + { + if (filename.rfind(".anim") != std::string::npos) + { + LLFloaterReg::showInstance("upload_anim_anim", LLSD(filename)); + } + else + { + LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename)); + } + } + } + return; +} + + +const void upload_bulk(const std::vector& filenames, LLFilePicker::ELoadFilter type) +{ + // TODO: + // Check user balance for entire cost + // Charge user entire cost + // Loop, uploading + // If an upload fails, refund the user for that one + // + // Also fix single upload to charge first, then refund + + S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); + for (std::vector::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) + { + std::string filename = (*in_iter); + if (!check_file_extension(filename, type)) continue; + + std::string name = gDirUtilp->getBaseFileName(filename, true); + std::string asset_name = name; + LLStringUtil::replaceNonstandardASCII(asset_name, '?'); + LLStringUtil::replaceChar(asset_name, '|', '?'); + LLStringUtil::stripNonprintable(asset_name); + LLStringUtil::trim(asset_name); + + LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( + filename, + asset_name, + asset_name, 0, + LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), + expected_upload_cost)); + + upload_new_resource(uploadInfo, NULL, NULL); + } +} + /** char* upload_pick(void* data) @@ -369,12 +547,12 @@ class LLFileUploadImage : public view_listener_t { bool handleEvent(const LLSD& userdata) { - std::string filename = upload_pick((void *)LLFilePicker::FFLOAD_IMAGE); - if (!filename.empty()) + if (gAgentCamera.cameraMouselook()) { - LLFloaterReg::showInstance("upload_image", LLSD(filename)); + gAgentCamera.changeCameraToDefault(); } - return TRUE; + (new LLFilePickerReplyThread(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_IMAGE, false))->getFile(); + return true; } }; @@ -396,11 +574,11 @@ class LLFileUploadSound : public view_listener_t { bool handleEvent(const LLSD& userdata) { - std::string filename = upload_pick((void*)LLFilePicker::FFLOAD_WAV); - if (!filename.empty()) + if (gAgentCamera.cameraMouselook()) { - LLFloaterReg::showInstance("upload_sound", LLSD(filename)); + gAgentCamera.changeCameraToDefault(); } + (new LLFilePickerReplyThread(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_WAV, false))->getFile(); return true; } }; @@ -409,18 +587,11 @@ class LLFileUploadAnim : public view_listener_t { bool handleEvent(const LLSD& userdata) { - const std::string filename = upload_pick((void*)LLFilePicker::FFLOAD_ANIM); - if (!filename.empty()) + if (gAgentCamera.cameraMouselook()) { - if (filename.rfind(".anim") != std::string::npos) - { - LLFloaterReg::showInstance("upload_anim_anim", LLSD(filename)); - } - else - { - LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename)); - } + gAgentCamera.changeCameraToDefault(); } + (new LLFilePickerReplyThread(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_ANIM, false))->getFile(); return true; } }; @@ -429,55 +600,11 @@ class LLFileUploadBulk : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if( gAgentCamera.cameraMouselook() ) + if (gAgentCamera.cameraMouselook()) { gAgentCamera.changeCameraToDefault(); } - - // TODO: - // Check extensions for uploadability, cost - // Check user balance for entire cost - // Charge user entire cost - // Loop, uploading - // If an upload fails, refund the user for that one - // - // Also fix single upload to charge first, then refund - - LLFilePicker& picker = LLFilePicker::instance(); - if (picker.getMultipleOpenFiles()) - { - std::string filename = picker.getFirstFile(); - S32 expected_upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); - - while (!filename.empty()) - { - std::string name = gDirUtilp->getBaseFileName(filename, true); - - std::string asset_name = name; - LLStringUtil::replaceNonstandardASCII( asset_name, '?' ); - LLStringUtil::replaceChar(asset_name, '|', '?'); - LLStringUtil::stripNonprintable(asset_name); - LLStringUtil::trim(asset_name); - - LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( - filename, - asset_name, - asset_name, 0, - LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - LLFloaterPerms::getNextOwnerPerms("Uploads"), - LLFloaterPerms::getGroupPerms("Uploads"), - LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost)); - - upload_new_resource(uploadInfo, NULL, NULL); - - filename = picker.getNextFile(); - } - } - else - { - LL_INFOS() << "Couldn't import objects from file" << LL_ENDL; - } + (new LLFilePickerReplyThread(boost::bind(&upload_bulk, _1, _2), LLFilePicker::FFLOAD_ALL, true))->getFile(); return true; } }; diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 3e23940c3f..15bbdd1e2d 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -107,4 +107,23 @@ public: }; +class LLFilePickerReplyThread : public LLFilePickerThread +{ +public: + + typedef boost::signals2::signal& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter)> file_picked_signal_t; + + LLFilePickerReplyThread(const file_picked_signal_t::slot_type& cb, LLFilePicker::ELoadFilter filter, bool get_multiple); + LLFilePickerReplyThread(const file_picked_signal_t::slot_type& cb, LLFilePicker::ESaveFilter filter, const std::string &proposed_name); + ~LLFilePickerReplyThread(); + + virtual void notify(const std::vector& filenames); + +private: + LLFilePicker::ELoadFilter mLoadFilter; + LLFilePicker::ESaveFilter mSaveFilter; + file_picked_signal_t* mFilePickedSignal; +}; + + #endif -- cgit v1.2.3 From f2113a037c7215d0234652f6ae69c63e8b91df58 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 31 May 2018 14:59:31 +0300 Subject: MAINT-8700 Remove obsolete code and update 'Save texture' file dialog --- indra/newview/llfilepicker.h | 2 - indra/newview/llpreviewtexture.cpp | 25 ++++---- indra/newview/llpreviewtexture.h | 2 + indra/newview/llviewermenufile.cpp | 116 ------------------------------------- 4 files changed, 15 insertions(+), 130 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index 7914067976..2fc496a144 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -198,6 +198,4 @@ public: ~LLFilePicker(); }; -const std::string upload_pick(void* data); - #endif diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 12bcd89cb0..9d8be4b2fe 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -46,6 +46,7 @@ #include "lltextureview.h" #include "llui.h" #include "llviewerinventory.h" +#include "llviewermenufile.h" // LLFilePickerReplyThread #include "llviewertexture.h" #include "llviewertexturelist.h" #include "lluictrlfactory.h" @@ -293,27 +294,27 @@ void LLPreviewTexture::saveAs() if( mLoadingFullImage ) return; - LLFilePicker& file_picker = LLFilePicker::instance(); - const LLInventoryItem* item = getItem() ; - if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_TGAPNG, item ? LLDir::getScrubbedFileName(item->getName()) : LLStringUtil::null) ) - { - // User canceled or we failed to acquire save file. - return; - } - if(mPreviewToSave) + std::string filename = getItem() ? LLDir::getScrubbedFileName(getItem()->getName()) : LLStringUtil::null; + (new LLFilePickerReplyThread(boost::bind(&LLPreviewTexture::saveTextureToFile, this, _1), LLFilePicker::FFSAVE_TGAPNG, filename))->getFile(); +} + +void LLPreviewTexture::saveTextureToFile(const std::vector& filenames) +{ + const LLInventoryItem* item = getItem(); + if (item && mPreviewToSave) { mPreviewToSave = FALSE; LLFloaterReg::showTypedInstance("preview_texture", item->getUUID()); } // remember the user-approved/edited file name. - mSaveFileName = file_picker.getFirstFile(); + mSaveFileName = filenames[0]; mLoadingFullImage = TRUE; getWindow()->incBusyCount(); - mImage->forceToSaveRawImage(0) ;//re-fetch the raw image if the old one is removed. - mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave, - 0, TRUE, FALSE, new LLUUID( mItemUUID ), &mCallbackTextureList ); + mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed. + mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave, + 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList); } // virtual diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index c156c48d0c..ad77d9e118 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -61,6 +61,8 @@ public: BOOL final, void* userdata ); void openToSave(); + + void saveTextureToFile(const std::vector& filenames); static void onSaveAsBtn(void* data); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index f676519153..dc05d98228 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -427,122 +427,6 @@ const void upload_bulk(const std::vector& filenames, LLFilePicker:: } } -/** - char* upload_pick(void* data) - - If applicable, brings up a file chooser in which the user selects a file - to upload for a particular task. If the file is valid for the given action, - returns the string to the full path filename, else returns NULL. - Data is the load filter for the type of file as defined in LLFilePicker. -**/ -const std::string upload_pick(void* data) -{ - if( gAgentCamera.cameraMouselook() ) - { - gAgentCamera.changeCameraToDefault(); - // This doesn't seem necessary. JC - // display(); - } - - LLFilePicker::ELoadFilter type; - if(data) - { - type = (LLFilePicker::ELoadFilter)((intptr_t)data); - } - else - { - type = LLFilePicker::FFLOAD_ALL; - } - - LLFilePicker& picker = LLFilePicker::instance(); - if (!picker.getOpenFile(type)) - { - LL_INFOS() << "Couldn't import objects from file" << LL_ENDL; - return std::string(); - } - - - const std::string& filename = picker.getFirstFile(); - std::string ext = gDirUtilp->getExtension(filename); - - //strincmp doesn't like NULL pointers - if (ext.empty()) - { - std::string short_name = gDirUtilp->getBaseFileName(filename); - - // No extension - LLSD args; - args["FILE"] = short_name; - LLNotificationsUtil::add("NoFileExtension", args); - return std::string(); - } - else - { - //so there is an extension - //loop over the valid extensions and compare to see - //if the extension is valid - - //now grab the set of valid file extensions - std::string valid_extensions = build_extensions_string(type); - - BOOL ext_valid = FALSE; - - typedef boost::tokenizer > tokenizer; - boost::char_separator sep(" "); - tokenizer tokens(valid_extensions, sep); - tokenizer::iterator token_iter; - - //now loop over all valid file extensions - //and compare them to the extension of the file - //to be uploaded - for( token_iter = tokens.begin(); - token_iter != tokens.end() && ext_valid != TRUE; - ++token_iter) - { - const std::string& cur_token = *token_iter; - - if (cur_token == ext || cur_token == "*.*") - { - //valid extension - //or the acceptable extension is any - ext_valid = TRUE; - } - }//end for (loop over all tokens) - - if (ext_valid == FALSE) - { - //should only get here if the extension exists - //but is invalid - LLSD args; - args["EXTENSION"] = ext; - args["VALIDS"] = valid_extensions; - LLNotificationsUtil::add("InvalidFileExtension", args); - return std::string(); - } - }//end else (non-null extension) - - //valid file extension - - //now we check to see - //if the file is actually a valid image/sound/etc. - if (type == LLFilePicker::FFLOAD_WAV) - { - // pre-qualify wavs to make sure the format is acceptable - std::string error_msg; - if (check_for_invalid_wav_formats(filename,error_msg)) - { - LL_INFOS() << error_msg << ": " << filename << LL_ENDL; - LLSD args; - args["FILE"] = filename; - LLNotificationsUtil::add( error_msg, args ); - return std::string(); - } - }//end if a wave/sound file - - - return filename; -} - class LLFileUploadImage : public view_listener_t { bool handleEvent(const LLSD& userdata) -- cgit v1.2.3 From b1f2b350799f10e0980b0814d10e85dd3543e2af Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 31 May 2018 18:24:42 +0300 Subject: MAINT-8702 FIXED Uploading any item results in opening previous Item Profile instead of Inventory Floater --- indra/newview/llinventorypanel.cpp | 10 ++++++---- indra/newview/llviewerassetupload.cpp | 9 +-------- 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 7e3fa1d334..702675ad49 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1449,14 +1449,16 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) //static void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel, BOOL take_keyboard_focus, BOOL reset_filter) { - LLInventoryPanel *active_panel; + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); + sidepanel_inventory->showInventoryPanel(); + bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); if (main_panel && !in_inbox) { - LLFloaterSidePanelContainer::getPanel("inventory")->selectAllItemsPanel(); + sidepanel_inventory->selectAllItemsPanel(); } - active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); if (active_panel) { @@ -1469,7 +1471,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L if (in_inbox) { - LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); + LLInventoryPanel * inventory_panel = NULL; sidepanel_inventory->openInbox(); inventory_panel = sidepanel_inventory->getInboxPanel(); diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 346b2c0d1b..4e13eceb55 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -766,14 +766,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - if (panel) - { - panel->setSelection(serverInventoryItem, TAKE_FOCUS_NO); - } - else - { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, TRUE, TAKE_FOCUS_NO, TRUE); - } + LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, TRUE, TAKE_FOCUS_NO, (panel == NULL)); // restore keyboard focus gFocusMgr.setKeyboardFocus(focus); -- cgit v1.2.3 From c767c906b299116a38de826f8a442962ca0637d9 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 1 Jun 2018 14:14:02 +0300 Subject: MAINT-8714 Eliminate viewer duplicated ID nodes --- .../default/xui/en/floater_preferences_graphics_advanced.xml | 6 +++--- indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 8 -------- indra/newview/skins/default/xui/en/panel_preferences_uploads.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 3 +-- 5 files changed, 6 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index 1425d16cf1..c2500951a6 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -253,7 +253,7 @@ follows="left|top" height="16" layout="topleft" - name="ShadersText" + name="HardwareText" top_delta="20" left="10" width="128"> @@ -426,7 +426,7 @@ follows="left|top" height="16" layout="topleft" - name="AvatarText" + name="MeshText" top_delta="20" left="400" top="21" @@ -917,7 +917,7 @@ are saved in a preset file. --> label="RenderAvatarMaxComplexity" layout="topleft" left="0" - name="RenderAvatarMaxNonImpostors" + name="RenderAvatarMaxComplexity" top_delta="0" width="0"> diff --git a/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml b/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml index 01ca38f51a..5e16707340 100644 --- a/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_people_blocked_gear.xml @@ -53,7 +53,7 @@ + name="MuteParticles"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 73b7671824..7f9dc0c41f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -10413,14 +10413,6 @@ Not enough script resources available to attach object! Cannot attach object because it is already being removed. - - fail - The attachment has requested a nonexistent point on the avatar. It has been attached to the chest instead. - - Models diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0a220e68fd..882fbaf634 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4199,8 +4199,7 @@ Try enclosing path to the editor with double quotes. Control Camera Teleport Permission - Unknown: [Permission] - + Conversations are not being logged. To begin keeping a log, choose "Save: Log only" or "Save: Log and transcripts" under Preferences > Chat. -- cgit v1.2.3 From 18bb3f6b86b32c4ca22f0466ee175d68969a03fd Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 1 Jun 2018 13:51:03 +0000 Subject: MAINT-8712 Crash on close in LLWindowWin32 --- indra/newview/llviewerwindow.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d54138b80e..f394d6913f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2156,6 +2156,15 @@ void LLViewerWindow::shutdownViews() RecordToChatConsole::getInstance()->stopRecorder(); LL_INFOS() << "Warning logger is cleaned." << LL_ENDL ; + gFocusMgr.unlockFocus(); + gFocusMgr.setMouseCapture(NULL); + gFocusMgr.setKeyboardFocus(NULL); + gFocusMgr.setTopCtrl(NULL); + if (mWindow) + { + mWindow->allowLanguageTextInput(NULL, FALSE); + } + delete mDebugText; mDebugText = NULL; @@ -2188,7 +2197,11 @@ void LLViewerWindow::shutdownViews() view_listener_t::cleanup(); LL_INFOS() << "view listeners destroyed." << LL_ENDL ; - + + // Clean up pointers that are going to be invalid. (todo: check sMenuContainer) + mProgressView = NULL; + mPopupView = NULL; + // Delete all child views. delete mRootView; mRootView = NULL; -- cgit v1.2.3 From 0a36c8d3be17032db20a9bdeff2b00ae2ed608a0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 7 Jun 2018 20:10:24 +0300 Subject: MAINT-8689 Potential crash fix --- indra/newview/llavatarrenderinfoaccountant.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 7413dbed20..7c7f55f68c 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -286,6 +286,9 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio && regionp->getRenderInfoReportTimer().hasExpired() // Time to make request) ) { + // make sure we won't re-report, coro will update timer with correct time later + regionp->getRenderInfoReportTimer().resetWithExpiry(SECS_BETWEEN_REGION_REPORTS); + std::string coroname = LLCoros::instance().launch("LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro", boost::bind(&LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro, url, regionp->getHandle())); @@ -306,6 +309,9 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi << " from " << url << LL_ENDL; + // make sure we won't re-request, coro will update timer with correct time later + regionp->getRenderInfoRequestTimer().resetWithExpiry(SECS_BETWEEN_REGION_REQUEST); + // First send a request to get the latest data std::string coroname = LLCoros::instance().launch("LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro", -- cgit v1.2.3 From 71fa94b3665b4554470314f481c9f0a35f8e6ef2 Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Wed, 30 May 2018 05:51:37 +0530 Subject: [MAINT-8693] - fix null check --- indra/newview/llfloateravatartextures.cpp | 4 ++-- indra/newview/llviewerwearable.cpp | 2 +- indra/newview/llvoavatar.cpp | 8 ++++---- indra/newview/llvoavatarself.cpp | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 78807a8e99..8e654a53c4 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -78,7 +78,7 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, { LLUUID id = IMG_DEFAULT_AVATAR; const LLAvatarAppearanceDictionary::TextureEntry* tex_entry = LLAvatarAppearanceDictionary::getInstance()->getTexture(te); - if (tex_entry->mIsLocalTexture) + if (tex_entry && tex_entry->mIsLocalTexture) { if (avatarp->isSelf()) { @@ -96,7 +96,7 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, } else { - id = avatarp->getTE(te)->getID(); + id = tex_entry ? avatarp->getTE(te)->getID() : IMG_DEFAULT_AVATAR; } //id = avatarp->getTE(te)->getID(); if (id == IMG_DEFAULT_AVATAR) diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index ae9ce37a28..2d7a0f920f 100644 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -301,7 +301,7 @@ void LLViewerWearable::setTexturesToDefaults() LLUUID LLViewerWearable::getDefaultTextureImageID(ETextureIndex index) const { const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index); - const std::string &default_image_name = texture_dict->mDefaultImageName; + const std::string &default_image_name = texture_dict ? texture_dict->mDefaultImageName : ""; if (default_image_name == "") { return IMG_DEFAULT_AVATAR; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7458c00b70..5eef48d735 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1007,7 +1007,7 @@ void LLVOAvatar::dumpBakedStatus() const ETextureIndex index = baked_dict->mTextureIndex; if (!inst->isTextureDefined(index)) { - LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName; + LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index) ? LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName : ""; } } LL_CONT << " ) " << inst->getUnbakedPixelAreaRank(); @@ -4715,7 +4715,7 @@ void LLVOAvatar::collectLocalTextureUUIDs(std::set& ids) const if (imagep) { const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)texture_index); - if (texture_dict->mIsLocalTexture) + if (texture_dict && texture_dict->mIsLocalTexture) { ids.insert(imagep->getID()); } @@ -4872,8 +4872,8 @@ void LLVOAvatar::updateTextures() if (imagep) { const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)texture_index); - const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; - if (texture_dict->mIsLocalTexture) + const EBakedTextureIndex baked_index = texture_dict ? texture_dict->mBakedTextureIndex : EBakedTextureIndex::BAKED_NUM_INDICES; + if (texture_dict && texture_dict->mIsLocalTexture) { addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, mBakedTextureDatas[baked_index].mIsUsed); } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 00e72bfbff..b2954f4de2 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2606,6 +2606,8 @@ void LLVOAvatarSelf::requestLayerSetUpdate(ETextureIndex index ) if( mUpperBodyLayerSet ) mUpperBodyLayerSet->requestUpdate(); */ const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index); + if (!texture_dict) + return; if (!texture_dict->mIsLocalTexture || !texture_dict->mIsUsedByBakedTexture) return; const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; @@ -2622,7 +2624,7 @@ LLViewerTexLayerSet* LLVOAvatarSelf::getLayerSet(ETextureIndex index) const case TEX_HEAD_BODYPAINT: return mHeadLayerSet; */ const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index); - if (texture_dict->mIsUsedByBakedTexture) + if (texture_dict && texture_dict->mIsUsedByBakedTexture) { const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; return getLayerSet(baked_index); -- cgit v1.2.3 From 5651b433d3fcfba6a98e31edc3a747059bf3560a Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Wed, 6 Jun 2018 03:23:32 +0530 Subject: fix xcode build --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5eef48d735..b221dc7c35 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1007,7 +1007,7 @@ void LLVOAvatar::dumpBakedStatus() const ETextureIndex index = baked_dict->mTextureIndex; if (!inst->isTextureDefined(index)) { - LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index) ? LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName : ""; + LL_CONT << " " << (LLAvatarAppearanceDictionary::getInstance()->getTexture(index) ? LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName : ""); } } LL_CONT << " ) " << inst->getUnbakedPixelAreaRank(); -- cgit v1.2.3 From dc07de2f4a4c49d1877bf743b6f0d209392f6eb6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 21 Jun 2018 08:54:26 -0400 Subject: increment viewer version to 5.1.7 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 8710cfdff2..cbad66a094 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -5.1.6 +5.1.7 -- cgit v1.2.3