diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventoryfilter.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 44 | ||||
-rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 65 | ||||
-rw-r--r-- | indra/newview/llpanelplaceinfo.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanelplaceprofile.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llpanelplaceprofile.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_landmark_info.xml | 64 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_place_profile.xml | 51 |
8 files changed, 168 insertions, 79 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 745b953996..b57bc5a4ed 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -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 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<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; } } diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 0c70aa87c2..9157df789f 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -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; diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 30327378ef..8bf67cfe7d 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -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; diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 104316e253..9283dfa218 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -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"); diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 3d2654fc12..16478bc179 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -76,8 +76,6 @@ private: LLPanel* mForSalePanel; LLPanel* mYouAreHerePanel; - LLTextBox* mParcelOwner; - LLIconCtrl* mParcelRatingIcon; LLTextBox* mParcelRatingText; LLIconCtrl* mVoiceIcon; diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 13986c4030..dd80f6eac8 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -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 diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 0dd75b1b55..36b7b0501b 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -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,32 +277,25 @@ 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" /> - <expandable_text - follows="left|top" - height="50" - layout="topleft" - left="5" - name="description" - top_pad="10" - value="Du waltz die spritz" - 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" @@ -310,20 +303,28 @@ left="10" name="owner_label" text_color="White" - top_pad="0" + top_pad="2" value="Owner:" - width="90" /> - <!--TODO: HOOK THIS NAME UP WITH AN INSPECTOR --> + width="80" /> <text follows="left|top|right" height="14" layout="topleft" - left_pad="1" - name="owner_value" + left_pad="0" + name="parcel_owner" top_delta="0" value="Alex Superduperlongenamenton" use_ellipses="true" width="200" /> + <expandable_text + follows="left|top" + height="50" + layout="topleft" + left="5" + name="description" + top_pad="10" + value="Du waltz die spritz" + width="285" /> <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" |