SL-13132 Emphasize parcel name over region name in Landmarks and Place Profiles
parent
40418c388c
commit
9e79e1a2e2
|
|
@ -192,10 +192,15 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
|
|||
// when applying a filter, matching folders get their contents downloaded first
|
||||
// but make sure we are not interfering with pre-download
|
||||
if (isNotDefault()
|
||||
&& !gInventory.isCategoryComplete(folder_id)
|
||||
&& LLStartUp::getStartupState() > STATE_WEARABLES_WAIT)
|
||||
{
|
||||
LLInventoryModelBackgroundFetch::instance().start(folder_id);
|
||||
{
|
||||
LLViewerInventoryCategory* cat = gInventory.getCategory(folder_id);
|
||||
if (!cat || (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN))
|
||||
{
|
||||
// At the moment background fetch only cares about VERSION_UNKNOWN,
|
||||
// so do not check isCategoryComplete that compares descendant count
|
||||
LLInventoryModelBackgroundFetch::instance().start(folder_id);
|
||||
}
|
||||
}
|
||||
|
||||
// Marketplace folder filtering
|
||||
|
|
|
|||
|
|
@ -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<LLUICtrl>("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<LLUICtrl>("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<LLUICtrl>("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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#include "llagent.h"
|
||||
#include "llexpandabletextbox.h"
|
||||
#include "llpanelpick.h"
|
||||
#include "llslurl.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llhttpconstants.h"
|
||||
|
|
@ -78,6 +79,7 @@ BOOL LLPanelPlaceInfo::postBuild()
|
|||
mSnapshotCtrl = getChild<LLTextureCtrl>("logo");
|
||||
mRegionName = getChild<LLTextBox>("region_title");
|
||||
mParcelName = getChild<LLTextBox>("parcel_title");
|
||||
mParcelOwner = getChild<LLTextBox>("parcel_owner");
|
||||
mDescEditor = getChild<LLExpandableTextBox>("description");
|
||||
|
||||
mMaturityRatingIcon = getChild<LLIconCtrl>("maturity_icon");
|
||||
|
|
@ -98,11 +100,13 @@ void LLPanelPlaceInfo::resetLocation()
|
|||
mParcelID.setNull();
|
||||
mRequestedID.setNull();
|
||||
mPosRegion.clearVec();
|
||||
mRegionTitle.clear();
|
||||
|
||||
std::string loading = LLTrans::getString("LoadingData");
|
||||
mMaturityRatingText->setValue(loading);
|
||||
mRegionName->setText(loading);
|
||||
mRegionName->setTextArg("[REGIONAMEPOS]", loading);
|
||||
mParcelName->setText(loading);
|
||||
mParcelOwner->setText(loading);
|
||||
mDescEditor->setText(loading);
|
||||
mMaturityRatingIcon->setValue(LLUUID::null);
|
||||
|
||||
|
|
@ -182,9 +186,11 @@ void LLPanelPlaceInfo::setErrorStatus(S32 status, const std::string& reason)
|
|||
|
||||
std::string not_available = getString("not_available");
|
||||
mMaturityRatingText->setValue(not_available);
|
||||
mRegionName->setText(not_available);
|
||||
mRegionName->setTextArg("[REGIONAMEPOS]", not_available);
|
||||
mParcelName->setText(not_available);
|
||||
mParcelOwner->setText(not_available);
|
||||
mMaturityRatingIcon->setValue(LLUUID::null);
|
||||
mRegionTitle.clear();
|
||||
|
||||
// Enable "Back" button that was disabled when parcel request was sent.
|
||||
getChild<LLButton>("back_btn")->setEnabled(TRUE);
|
||||
|
|
@ -198,12 +204,34 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
|
|||
mSnapshotCtrl->setImageAssetID(parcel_data.snapshot_id);
|
||||
}
|
||||
|
||||
if(!parcel_data.sim_name.empty())
|
||||
{
|
||||
mRegionName->setText(parcel_data.sim_name);
|
||||
S32 region_x;
|
||||
S32 region_y;
|
||||
S32 region_z;
|
||||
|
||||
// If the region position is zero, grab position from the global
|
||||
if (mPosRegion.isExactlyZero())
|
||||
{
|
||||
region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS;
|
||||
region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS;
|
||||
region_z = ll_round(parcel_data.global_z);
|
||||
}
|
||||
else
|
||||
{
|
||||
region_x = ll_round(mPosRegion.mV[VX]);
|
||||
region_y = ll_round(mPosRegion.mV[VY]);
|
||||
region_z = ll_round(mPosRegion.mV[VZ]);
|
||||
}
|
||||
|
||||
if (!parcel_data.sim_name.empty())
|
||||
{
|
||||
mRegionTitle = parcel_data.sim_name;
|
||||
std::string name_and_pos = llformat("%s (%d, %d, %d)",
|
||||
mRegionTitle.c_str(), region_x, region_y, region_z);
|
||||
mRegionName->setTextArg("[REGIONAMEPOS]", name_and_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
mRegionTitle.clear();
|
||||
mRegionName->setText(LLStringUtil::null);
|
||||
}
|
||||
|
||||
|
|
@ -216,30 +244,11 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
|
|||
mDescEditor->setText(getString("not_available"));
|
||||
}
|
||||
|
||||
S32 region_x;
|
||||
S32 region_y;
|
||||
S32 region_z;
|
||||
|
||||
// If the region position is zero, grab position from the global
|
||||
if(mPosRegion.isExactlyZero())
|
||||
{
|
||||
region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS;
|
||||
region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS;
|
||||
region_z = ll_round(parcel_data.global_z);
|
||||
}
|
||||
else
|
||||
{
|
||||
region_x = ll_round(mPosRegion.mV[VX]);
|
||||
region_y = ll_round(mPosRegion.mV[VY]);
|
||||
region_z = ll_round(mPosRegion.mV[VZ]);
|
||||
}
|
||||
|
||||
if (!parcel_data.name.empty())
|
||||
{
|
||||
mParcelTitle = parcel_data.name;
|
||||
|
||||
mParcelName->setText(llformat("%s (%d, %d, %d)",
|
||||
mParcelTitle.c_str(), region_x, region_y, region_z));
|
||||
mParcelName->setText(mParcelTitle);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -280,12 +289,10 @@ void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
|
||||
void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel)
|
||||
{
|
||||
std::string region_name = mRegionName->getText();
|
||||
|
||||
LLPickData data;
|
||||
data.pos_global = pos_global;
|
||||
data.name = mParcelTitle.empty() ? region_name : mParcelTitle;
|
||||
data.sim_name = region_name;
|
||||
data.name = mParcelTitle.empty() ? mRegionTitle : mParcelTitle;
|
||||
data.sim_name = mRegionTitle;
|
||||
data.desc = mDescEditor->getText();
|
||||
data.snapshot_id = mSnapshotCtrl->getImageAssetID();
|
||||
data.parcel_id = mParcelID;
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ protected:
|
|||
LLUUID mRequestedID;
|
||||
LLVector3 mPosRegion;
|
||||
std::string mParcelTitle; // used for pick title without coordinates
|
||||
std::string mRegionTitle;
|
||||
std::string mCurrentTitle;
|
||||
S32 mScrollingPanelMinHeight;
|
||||
S32 mScrollingPanelWidth;
|
||||
|
|
@ -120,6 +121,7 @@ protected:
|
|||
LLTextureCtrl* mSnapshotCtrl;
|
||||
LLTextBox* mRegionName;
|
||||
LLTextBox* mParcelName;
|
||||
LLTextBox* mParcelOwner;
|
||||
LLExpandableTextBox* mDescEditor;
|
||||
LLIconCtrl* mMaturityRatingIcon;
|
||||
LLTextBox* mMaturityRatingText;
|
||||
|
|
|
|||
|
|
@ -104,8 +104,6 @@ BOOL LLPanelPlaceProfile::postBuild()
|
|||
mForSalePanel->getChild<LLIconCtrl>("icon_for_sale")->
|
||||
setMouseDownCallback(boost::bind(&LLPanelPlaceProfile::onForSaleBannerClick, this));
|
||||
|
||||
mParcelOwner = getChild<LLTextBox>("owner_value");
|
||||
|
||||
mParcelRatingIcon = getChild<LLIconCtrl>("rating_icon");
|
||||
mParcelRatingText = getChild<LLTextBox>("rating_value");
|
||||
mVoiceIcon = getChild<LLIconCtrl>("voice_icon");
|
||||
|
|
@ -183,7 +181,6 @@ void LLPanelPlaceProfile::resetLocation()
|
|||
mYouAreHerePanel->setVisible(FALSE);
|
||||
|
||||
std::string loading = LLTrans::getString("LoadingData");
|
||||
mParcelOwner->setValue(loading);
|
||||
|
||||
mParcelRatingIcon->setValue(loading);
|
||||
mParcelRatingText->setText(loading);
|
||||
|
|
@ -248,14 +245,14 @@ void LLPanelPlaceProfile::setInfoType(EInfoType type)
|
|||
const S32 SEARCH_DESC_HEIGHT = 150;
|
||||
|
||||
// Remember original geometry (once).
|
||||
static const S32 sOrigDescVPad = getChildView("parcel_title")->getRect().mBottom - mDescEditor->getRect().mTop;
|
||||
static const S32 sOrigDescVPad = getChildView("owner_label")->getRect().mBottom - mDescEditor->getRect().mTop;
|
||||
static const S32 sOrigDescHeight = mDescEditor->getRect().getHeight();
|
||||
static const S32 sOrigMRIconVPad = mDescEditor->getRect().mBottom - mMaturityRatingIcon->getRect().mTop;
|
||||
static const S32 sOrigMRTextVPad = mDescEditor->getRect().mBottom - mMaturityRatingText->getRect().mTop;
|
||||
|
||||
// Resize the description.
|
||||
const S32 desc_height = is_info_type_agent ? sOrigDescHeight : SEARCH_DESC_HEIGHT;
|
||||
const S32 desc_top = getChildView("parcel_title")->getRect().mBottom - sOrigDescVPad;
|
||||
const S32 desc_top = getChildView("owner_label")->getRect().mBottom - sOrigDescVPad;
|
||||
LLRect desc_rect = mDescEditor->getRect();
|
||||
desc_rect.setOriginAndSize(desc_rect.mLeft, desc_top - desc_height, desc_rect.getWidth(), desc_height);
|
||||
mDescEditor->reshape(desc_rect.getWidth(), desc_rect.getHeight());
|
||||
|
|
@ -401,6 +398,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
|
|||
parcel_data.global_x = pos_global.mdV[VX];
|
||||
parcel_data.global_y = pos_global.mdV[VY];
|
||||
parcel_data.global_z = pos_global.mdV[VZ];
|
||||
parcel_data.owner_id = parcel->getOwnerID();
|
||||
|
||||
std::string on = getString("on");
|
||||
std::string off = getString("off");
|
||||
|
|
|
|||
|
|
@ -76,8 +76,6 @@ private:
|
|||
LLPanel* mForSalePanel;
|
||||
LLPanel* mYouAreHerePanel;
|
||||
|
||||
LLTextBox* mParcelOwner;
|
||||
|
||||
LLIconCtrl* mParcelRatingIcon;
|
||||
LLTextBox* mParcelRatingText;
|
||||
LLIconCtrl* mVoiceIcon;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
<panel
|
||||
bg_alpha_color="DkGray2"
|
||||
follows="left|top|right"
|
||||
height="630"
|
||||
height="654"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
min_height="300"
|
||||
|
|
@ -112,35 +112,56 @@
|
|||
name="logo"
|
||||
top="10"
|
||||
width="290" />
|
||||
<!-- texture picker has an empty label section, compensate for it with negative top_pad-->
|
||||
<text
|
||||
follows="left|top|right"
|
||||
font="SansSerifLarge"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="region_title"
|
||||
top_pad="-10"
|
||||
width="280"
|
||||
name="parcel_title"
|
||||
text_color="white"
|
||||
top_pad="10"
|
||||
use_ellipses="true"
|
||||
value="SampleRegion"
|
||||
width="280" />
|
||||
value="SampleParcel, Name Long" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="parcel_title"
|
||||
top_pad="10"
|
||||
top_pad="9"
|
||||
width="280"
|
||||
name="region_title"
|
||||
use_ellipses="true">
|
||||
Region: [REGIONAMEPOS]
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="parcel_owner_label"
|
||||
top_pad="7"
|
||||
value="Owner:"
|
||||
width="80" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left_pad="0"
|
||||
name="parcel_owner"
|
||||
top_delta="0"
|
||||
use_ellipses="true"
|
||||
value="SampleParcel, Name Long (145, 228, 26)"
|
||||
width="280" />
|
||||
value="TempOwner"
|
||||
width="215" />
|
||||
<expandable_text
|
||||
follows="left|top|right"
|
||||
height="50"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="description"
|
||||
top_pad="10"
|
||||
top_pad="7"
|
||||
value="Du waltz die spritz"
|
||||
width="280" />
|
||||
<icon
|
||||
|
|
@ -163,19 +184,38 @@
|
|||
width="268" />
|
||||
<panel
|
||||
follows="left|top|right"
|
||||
height="55"
|
||||
height="81"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="landmark_info_panel"
|
||||
top_pad="10"
|
||||
width="290">
|
||||
<view_border
|
||||
bevel_style="none"
|
||||
follows="top|left"
|
||||
height="0"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="lod_tab_border"
|
||||
top_pad="5"
|
||||
width="290" />
|
||||
<text
|
||||
follows="left|top"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="this_landmark"
|
||||
top_pad="8"
|
||||
width="90">
|
||||
This landmark:
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="15"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="owner_label"
|
||||
top_pad="10"
|
||||
top_pad="8"
|
||||
value="Owner:"
|
||||
width="90" />
|
||||
<text
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@
|
|||
<panel
|
||||
bg_alpha_color="DkGray2"
|
||||
follows="left|top|right|bottom"
|
||||
height="580"
|
||||
height="597"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
min_height="300"
|
||||
|
|
@ -277,23 +277,45 @@
|
|||
height="14"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="region_title"
|
||||
text_color="white"
|
||||
top_pad="5"
|
||||
width="290"
|
||||
name="parcel_title"
|
||||
text_color="white"
|
||||
use_ellipses="true"
|
||||
value="SampleRegion"
|
||||
width="290" />
|
||||
value="SampleParcel" />
|
||||
<text
|
||||
parse_urls="false"
|
||||
follows="left|top|right"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="parcel_title"
|
||||
top_pad="4"
|
||||
use_ellipses="true"
|
||||
value="SampleParcel, Name Long (145, 228, 26)"
|
||||
width="285" />
|
||||
top_pad="5"
|
||||
width="285"
|
||||
name="region_title"
|
||||
text_color="White"
|
||||
use_ellipses="true">
|
||||
Region: [REGIONAMEPOS]
|
||||
</text>
|
||||
<text
|
||||
follows="left|top"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="owner_label"
|
||||
text_color="White"
|
||||
top_pad="2"
|
||||
value="Owner:"
|
||||
width="80" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="0"
|
||||
name="parcel_owner"
|
||||
top_delta="0"
|
||||
value="Alex Superduperlongenamenton"
|
||||
use_ellipses="true"
|
||||
width="200" />
|
||||
<expandable_text
|
||||
follows="left|top"
|
||||
height="50"
|
||||
|
|
@ -303,27 +325,6 @@
|
|||
top_pad="10"
|
||||
value="Du waltz die spritz"
|
||||
width="285" />
|
||||
<text
|
||||
follows="left|top"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="owner_label"
|
||||
text_color="White"
|
||||
top_pad="0"
|
||||
value="Owner:"
|
||||
width="90" />
|
||||
<!--TODO: HOOK THIS NAME UP WITH AN INSPECTOR -->
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="14"
|
||||
layout="topleft"
|
||||
left_pad="1"
|
||||
name="owner_value"
|
||||
top_delta="0"
|
||||
value="Alex Superduperlongenamenton"
|
||||
use_ellipses="true"
|
||||
width="200" />
|
||||
<icon
|
||||
follows="top|left"
|
||||
height="16"
|
||||
|
|
@ -331,7 +332,7 @@
|
|||
layout="topleft"
|
||||
left="10"
|
||||
name="maturity_icon"
|
||||
top_delta="0"
|
||||
top_pad="0"
|
||||
width="18" />
|
||||
<text
|
||||
follows="left|top|right"
|
||||
|
|
|
|||
Loading…
Reference in New Issue