From 9e79e1a2e25275eecc21b715120848b426c06474 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 6 May 2020 20:46:43 +0300 Subject: SL-13132 Emphasize parcel name over region name in Landmarks and Place Profiles --- indra/newview/llpanellandmarkinfo.cpp | 44 ++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanellandmarkinfo.cpp') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 06bb886ae8..9b55fe9ce2 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -39,6 +39,7 @@ #include "llagent.h" #include "llagentui.h" #include "lllandmarkactions.h" +#include "llparcel.h" #include "llslurl.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" @@ -101,6 +102,9 @@ void LLPanelLandmarkInfo::resetLocation() mLandmarkTitle->setText(LLStringUtil::null); mLandmarkTitleEditor->setText(LLStringUtil::null); mNotesEditor->setText(LLStringUtil::null); + + mParcelOwner->setVisible(FALSE); + getChild("parcel_owner_label")->setVisible(FALSE); } // virtual @@ -126,7 +130,8 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) mNotesEditor->setEnabled(TRUE); LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); - std::string name = parcel_mgr->getAgentParcelName(); + LLParcel* parcel = parcel_mgr->getAgentParcel(); + std::string name = parcel->getName(); LLVector3 agent_pos = gAgent.getPositionAgent(); std::string desc; @@ -159,6 +164,27 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) mLandmarkTitleEditor->setText(name); } + mParcelOwner->setVisible(TRUE); + getChild("parcel_owner_label")->setVisible(TRUE); + LLUUID owner_id = parcel->getOwnerID(); + if (owner_id.notNull()) + { + if (parcel->getIsGroupOwned()) + { + std::string owner_name = LLSLURL("group", parcel->getGroupID(), "inspect").getSLURLString(); + mParcelOwner->setText(owner_name); + } + else + { + std::string owner_name = LLSLURL("agent", owner_id, "inspect").getSLURLString(); + mParcelOwner->setText(owner_name); + } + } + else + { + mParcelOwner->setText(getString("public")); + } + // Moved landmark creation here from LLPanelLandmarkInfo::processParcelInfo() // because we use only agent's current coordinates instead of waiting for // remote parcel request to complete. @@ -210,6 +236,17 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG)); } + if (parcel_data.owner_id.notNull()) + { + // not suported and ivisible due to missing isGroupOwned flag + } + else + { + mParcelOwner->setVisible(TRUE); + mParcelOwner->setText(getString("public")); + getChild("parcel_owner_label")->setVisible(FALSE); + } + LLSD info; info["update_verbs"] = true; info["global_x"] = parcel_data.global_x; @@ -264,7 +301,8 @@ void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem) } else { - mOwner->setText(getString("public")); + std::string public_str = getString("public"); + mOwner->setText(public_str); } ////////////////// @@ -357,7 +395,7 @@ void LLPanelLandmarkInfo::createLandmark(const LLUUID& folder_id) // If no parcel exists use the region name instead. if (name.empty()) { - name = mRegionName->getText(); + name = mRegionTitle; } } -- cgit v1.2.3 From 293f5184811abdf5a9a41db490a58389dc3523fb Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 26 May 2020 17:45:01 +0300 Subject: SL-13279 Changes in Landmarks view UI - clarify that Notes are editable --- indra/newview/llpanellandmarkinfo.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpanellandmarkinfo.cpp') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 9b55fe9ce2..8a6a9f1fcd 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -78,7 +78,7 @@ BOOL LLPanelLandmarkInfo::postBuild() mCreator = getChild("creator"); mCreated = getChild("created"); - mLandmarkTitle = getChild("title_value"); + mLandmarkTitle = getChild("title_value"); mLandmarkTitleEditor = getChild("title_editor"); mNotesEditor = getChild("notes_editor"); mFolderCombo = getChild("folder_combo"); @@ -117,6 +117,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) landmark_info_panel->setVisible(type == LANDMARK); getChild("folder_label")->setVisible(is_info_type_create_landmark); + getChild("edit_btn")->setVisible(!is_info_type_create_landmark); mFolderCombo->setVisible(is_info_type_create_landmark); switch(type) @@ -134,10 +135,6 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) std::string name = parcel->getName(); LLVector3 agent_pos = gAgent.getPositionAgent(); - std::string desc; - LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_FULL, agent_pos); - mNotesEditor->setText(desc); - if (name.empty()) { S32 region_x = ll_round(agent_pos.mV[VX]); @@ -152,6 +149,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) } else { + std::string desc; LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_NORMAL, agent_pos); region_name = desc; } @@ -349,6 +347,7 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled) mNotesEditor->setReadOnly(!enabled); mFolderCombo->setVisible(enabled); getChild("folder_label")->setVisible(enabled); + getChild("edit_btn")->setVisible(!enabled); // HACK: To change the text color in a text editor // when it was enabled/disabled we set the text once again. -- cgit v1.2.3 From 59b10c2cbcb3bbe8b88cd9c7dba17b0e28d56a9b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 22 Jun 2020 20:47:04 +0300 Subject: SL-12335 Show parcel owner's name and icon in landmarks --- indra/newview/llpanellandmarkinfo.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpanellandmarkinfo.cpp') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 8a6a9f1fcd..1992374c35 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -103,7 +103,6 @@ void LLPanelLandmarkInfo::resetLocation() mLandmarkTitleEditor->setText(LLStringUtil::null); mNotesEditor->setText(LLStringUtil::null); - mParcelOwner->setVisible(FALSE); getChild("parcel_owner_label")->setVisible(FALSE); } @@ -162,7 +161,6 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) mLandmarkTitleEditor->setText(name); } - mParcelOwner->setVisible(TRUE); getChild("parcel_owner_label")->setVisible(TRUE); LLUUID owner_id = parcel->getOwnerID(); if (owner_id.notNull()) @@ -236,11 +234,19 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) if (parcel_data.owner_id.notNull()) { - // not suported and ivisible due to missing isGroupOwned flag + if (parcel_data.flags & 0x4) // depends onto DRTSIM-453 + { + std::string owner_name = LLSLURL("group", parcel_data.owner_id, "inspect").getSLURLString(); + mParcelOwner->setText(owner_name); + } + else + { + std::string owner_name = LLSLURL("agent", parcel_data.owner_id, "inspect").getSLURLString(); + mParcelOwner->setText(owner_name); + } } else { - mParcelOwner->setVisible(TRUE); mParcelOwner->setText(getString("public")); getChild("parcel_owner_label")->setVisible(FALSE); } -- cgit v1.2.3 From 4ff5ad507a20eec241a154591872cd4005a981d6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 25 Sep 2020 19:19:28 +0300 Subject: SL-13132 Fixed missing 'owner' label --- indra/newview/llpanellandmarkinfo.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llpanellandmarkinfo.cpp') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 1992374c35..6751c25fb9 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -102,8 +102,6 @@ void LLPanelLandmarkInfo::resetLocation() mLandmarkTitle->setText(LLStringUtil::null); mLandmarkTitleEditor->setText(LLStringUtil::null); mNotesEditor->setText(LLStringUtil::null); - - getChild("parcel_owner_label")->setVisible(FALSE); } // virtual @@ -161,7 +159,6 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) mLandmarkTitleEditor->setText(name); } - getChild("parcel_owner_label")->setVisible(TRUE); LLUUID owner_id = parcel->getOwnerID(); if (owner_id.notNull()) { @@ -248,7 +245,6 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) else { mParcelOwner->setText(getString("public")); - getChild("parcel_owner_label")->setVisible(FALSE); } LLSD info; -- cgit v1.2.3