From 8b0d63f343c4c77910c3d5e5516673bb9b76a35a Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 28 Oct 2011 07:27:54 -0400 Subject: STORM-1105 "Traffic: 0" shown for two cases (traffic actually 0, and waiting for data) --- doc/contributions.txt | 1 + indra/newview/llfloaterland.cpp | 13 +++++++++---- indra/newview/llviewerparcelmgr.cpp | 8 ++++---- indra/newview/llviewerparcelmgr.h | 2 ++ indra/newview/skins/default/xui/en/floater_about_land.xml | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 988410701b..8d57c28149 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -581,6 +581,7 @@ Jonathan Yap STORM-1639 STORM-910 STORM-1642 + STORM-1105 Kadah Coba STORM-1060 Jondan Lundquist diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 4746f93009..2bb1075ec4 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -433,7 +433,6 @@ BOOL LLPanelLandGeneral::postBuild() mTextDwell = getChild("DwellText"); - mBtnBuyLand = getChild("Buy Land..."); mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND); @@ -696,20 +695,26 @@ void LLPanelLandGeneral::refresh() S32 area; S32 claim_price; S32 rent_price; - F32 dwell; + F32 dwell = DWELL_NAN; LLViewerParcelMgr::getInstance()->getDisplayInfo(&area, &claim_price, &rent_price, &for_sale, &dwell); - // Area LLUIString price = getString("area_size_text"); price.setArg("[AREA]", llformat("%d",area)); mTextPriceLabel->setText(getString("area_text")); mTextPrice->setText(price.getString()); - mTextDwell->setText(llformat("%.0f", dwell)); + if (dwell == DWELL_NAN) + { + mTextDwell->setText(LLTrans::getString("LoadingData")); + } + else + { + mTextDwell->setText(llformat("%.0f", dwell)); + } if (for_sale) { diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 8db72da1ee..d6002e7320 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -113,7 +113,7 @@ LLViewerParcelMgr::LLViewerParcelMgr() mRequestResult(0), mWestSouth(), mEastNorth(), - mSelectedDwell(0.f), + mSelectedDwell(DWELL_NAN), mAgentParcelSequenceID(-1), mHoverRequestResult(0), mHoverWestSouth(), @@ -233,7 +233,7 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out, S32 price = 0; S32 rent = 0; BOOL for_sale = FALSE; - F32 dwell = 0.f; + F32 dwell = DWELL_NAN; if (mSelected) { @@ -579,7 +579,7 @@ void LLViewerParcelMgr::deselectLand() mCurrentParcel->mBanList.clear(); //mCurrentParcel->mRenterList.reset(); - mSelectedDwell = 0.f; + mSelectedDwell = DWELL_NAN; // invalidate parcel selection so that existing users of this selection can clean up mCurrentParcelSelection->setParcel(NULL); @@ -1663,7 +1663,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use LLViewerParcelMgr::getInstance()->requestParcelMediaURLFilter(); // Request dwell for this land, if it's not public land. - LLViewerParcelMgr::getInstance()->mSelectedDwell = 0.f; + LLViewerParcelMgr::getInstance()->mSelectedDwell = DWELL_NAN; if (0 != local_id) { LLViewerParcelMgr::getInstance()->sendParcelDwellRequest(); diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 68d8978ea8..cac8d8391c 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -43,6 +43,8 @@ class LLParcel; class LLViewerTexture; class LLViewerRegion; +const F32 DWELL_NAN = -1.0f; // A dwell having this value will be displayed as Loading... + // Constants for sendLandOwner //const U32 NO_NEIGHBOR_JOIN = 0x0; //const U32 ALL_NEIGHBOR_JOIN = U32( NORTH_MASK diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index eaffbf5fa6..1c7b354221 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -487,7 +487,7 @@ name="DwellText" top_delta="0" width="186"> - 0 + Loading...