diff options
Diffstat (limited to 'indra/newview/llpanelgrouplandmoney.cpp')
-rw-r--r-- | indra/newview/llpanelgrouplandmoney.cpp | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 6ff09e56f8..73a9868962 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -43,9 +43,11 @@ #include "llagent.h" #include "lliconctrl.h" #include "lllineeditor.h" +#include "llproductinforequest.h" #include "llscrolllistctrl.h" #include "lltextbox.h" #include "lltabcontainer.h" +#include "lltrans.h" #include "lltransactiontypes.h" #include "lluictrlfactory.h" @@ -232,10 +234,7 @@ void LLPanelGroupLandMoney::impl::onMapButton() if (!itemp) return; const LLScrollListCell* cellp; - // name - // location - // area - cellp = itemp->getColumn(3); // hidden + cellp = itemp->getColumn(itemp->getNumColumns() - 1); // hidden column is last F32 global_x = 0.f; F32 global_y = 0.f; @@ -414,6 +413,9 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) F32 global_x; F32 global_y; std::string sim_name; + std::string land_sku; + std::string land_type; + for(S32 i = first_block; i < count; ++i) { msg->getUUID("QueryData", "OwnerID", owner_id, i); @@ -426,6 +428,18 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) msg->getF32("QueryData", "GlobalY", global_y, i); msg->getString("QueryData", "SimName", sim_name, i); + if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 ) + { + msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i); + llinfos << "Land sku: " << land_sku << llendl; + land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku); + } + else + { + land_sku.clear(); + land_type = LLTrans::getString("land_type_unknown"); + } + S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y); @@ -438,6 +452,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) { area = llformat("%d / %d", billable_area, actual_area); } + std::string hidden; hidden = llformat("%f %f", global_x, global_y); @@ -455,8 +470,13 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) row["columns"][2]["value"] = area; row["columns"][2]["font"] = "SANSSERIFSMALL"; - row["columns"][3]["column"] = "hidden"; - row["columns"][3]["value"] = hidden; + row["columns"][3]["column"] = "type"; + row["columns"][3]["value"] = land_type; + row["columns"][3]["font"] = "SANSSERIFSMALL"; + + // hidden is always last column + row["columns"][4]["column"] = "hidden"; + row["columns"][4]["value"] = hidden; mGroupParcelsp->addElement(row, ADD_SORTED); } @@ -706,7 +726,7 @@ BOOL LLPanelGroupLandMoney::postBuild() textp = getChild<LLTextEditor>("group_money_planning_text", true); panelp = getChild<LLPanel>("group_money_planning_tab", true); - if ( 1 ) //!can_view + if ( !can_view ) { textp->setText(mImplementationp->mCantViewAccountsText); } @@ -1412,11 +1432,18 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, text.append(1, '\n'); } - text.append( " Group Individual Share\n"); - text.append(llformat( "%-24s %6d %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members))); - text.append(llformat( "%-24s %6d %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members))); - text.append(llformat( "%-24s %6d %6d \n", "Total", total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members))); - + // [DEV-29503] Hide the individual info since + // non_exempt_member here is a wrong choice to calculate individual shares. + // text.append( " Group Individual Share\n"); + // text.append(llformat( "%-24s %6d %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members))); + // text.append(llformat( "%-24s %6d %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members))); + // text.append(llformat( "%-24s %6d %6d \n", "Total", total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members))); + + text.append( " Group\n"); + text.append(llformat( "%-24s %6d\n", "Credits", total_credits)); + text.append(llformat( "%-24s %6d\n", "Debits", total_debits)); + text.append(llformat( "%-24s %6d\n", "Total", total_credits + total_debits)); + if ( mImplementationp->mTextEditorp ) { mImplementationp->mTextEditorp->setText(text); |