aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-04-26 11:41:55 -0700
committerMcCabe Maxsted2009-04-26 11:41:55 -0700
commit8b061ccb37afe4393c66edded4e33fc5e2793eb0 (patch)
treeb55a9ea8d9ef711a983b108baa18399714dea2df /linden/indra/newview/llfloaterland.cpp
parentFixed space in changelog (diff)
downloadmeta-impy-8b061ccb37afe4393c66edded4e33fc5e2793eb0.zip
meta-impy-8b061ccb37afe4393c66edded4e33fc5e2793eb0.tar.gz
meta-impy-8b061ccb37afe4393c66edded4e33fc5e2793eb0.tar.bz2
meta-impy-8b061ccb37afe4393c66edded4e33fc5e2793eb0.tar.xz
Backported L$/sq meter info from 1.23
Diffstat (limited to 'linden/indra/newview/llfloaterland.cpp')
-rw-r--r--linden/indra/newview/llfloaterland.cpp46
1 files changed, 27 insertions, 19 deletions
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp
index 891cde7..74eb172 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.cpp
@@ -604,6 +604,25 @@ void LLPanelLandGeneral::refresh()
604 mBtnSellLand->setVisible(FALSE); 604 mBtnSellLand->setVisible(FALSE);
605 mBtnStopSellLand->setVisible(FALSE); 605 mBtnStopSellLand->setVisible(FALSE);
606 606
607 // show pricing information
608 S32 area;
609 S32 claim_price;
610 S32 rent_price;
611 F32 dwell;
612 LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
613 &claim_price,
614 &rent_price,
615 &for_sale,
616 &dwell);
617
618 // Area
619 LLUIString price = getString("area_size_text");
620 price.setArg("[AREA]", llformat("%d",area));
621 mTextPriceLabel->setText(getString("area_text"));
622 mTextPrice->setText(price.getString());
623
624 mTextDwell->setText(llformat("%.0f", dwell));
625
607 if (for_sale) 626 if (for_sale)
608 { 627 {
609 mSaleInfoForSale1->setVisible(TRUE); 628 mSaleInfoForSale1->setVisible(TRUE);
@@ -619,7 +638,15 @@ void LLPanelLandGeneral::refresh()
619 mSaleInfoForSaleNoObjects->setVisible(TRUE); 638 mSaleInfoForSaleNoObjects->setVisible(TRUE);
620 } 639 }
621 mSaleInfoNotForSale->setVisible(FALSE); 640 mSaleInfoNotForSale->setVisible(FALSE);
641
642 F32 cost_per_sqm = 0.0f;
643 if (area > 0)
644 {
645 cost_per_sqm = (F32)parcel->getSalePrice() / (F32)area;
646 }
647
622 mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice())); 648 mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice()));
649 mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm));
623 if (can_be_sold) 650 if (can_be_sold)
624 { 651 {
625 mBtnStopSellLand->setVisible(TRUE); 652 mBtnStopSellLand->setVisible(TRUE);
@@ -645,25 +672,6 @@ void LLPanelLandGeneral::refresh()
645 mBtnBuyGroupLand->setEnabled( 672 mBtnBuyGroupLand->setEnabled(
646 LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true)); 673 LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true));
647 674
648 // show pricing information
649 S32 area;
650 S32 claim_price;
651 S32 rent_price;
652 F32 dwell;
653 LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
654 &claim_price,
655 &rent_price,
656 &for_sale,
657 &dwell);
658
659 // Area
660 LLUIString price = getString("area_size_text");
661 price.setArg("[AREA]", llformat("%d",area));
662 mTextPriceLabel->setText(getString("area_text"));
663 mTextPrice->setText(price.getString());
664
665 mTextDwell->setText(llformat("%.0f", dwell));
666
667 if(region_owner) 675 if(region_owner)
668 { 676 {
669 mBtnReclaimLand->setEnabled( 677 mBtnReclaimLand->setEnabled(