aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgrouplandmoney.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llpanelgrouplandmoney.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/llpanelgrouplandmoney.cpp')
-rw-r--r--linden/indra/newview/llpanelgrouplandmoney.cpp54
1 files changed, 41 insertions, 13 deletions
diff --git a/linden/indra/newview/llpanelgrouplandmoney.cpp b/linden/indra/newview/llpanelgrouplandmoney.cpp
index 51bdbdc..f69ea9f 100644
--- a/linden/indra/newview/llpanelgrouplandmoney.cpp
+++ b/linden/indra/newview/llpanelgrouplandmoney.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -42,9 +43,11 @@
42#include "llagent.h" 43#include "llagent.h"
43#include "lliconctrl.h" 44#include "lliconctrl.h"
44#include "lllineeditor.h" 45#include "lllineeditor.h"
46#include "llproductinforequest.h"
45#include "llscrolllistctrl.h" 47#include "llscrolllistctrl.h"
46#include "lltextbox.h" 48#include "lltextbox.h"
47#include "lltabcontainer.h" 49#include "lltabcontainer.h"
50#include "lltrans.h"
48#include "lltransactiontypes.h" 51#include "lltransactiontypes.h"
49#include "lluictrlfactory.h" 52#include "lluictrlfactory.h"
50 53
@@ -231,10 +234,7 @@ void LLPanelGroupLandMoney::impl::onMapButton()
231 if (!itemp) return; 234 if (!itemp) return;
232 235
233 const LLScrollListCell* cellp; 236 const LLScrollListCell* cellp;
234 // name 237 cellp = itemp->getColumn(itemp->getNumColumns() - 1); // hidden column is last
235 // location
236 // area
237 cellp = itemp->getColumn(3); // hidden
238 238
239 F32 global_x = 0.f; 239 F32 global_x = 0.f;
240 F32 global_y = 0.f; 240 F32 global_y = 0.f;
@@ -413,6 +413,9 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
413 F32 global_x; 413 F32 global_x;
414 F32 global_y; 414 F32 global_y;
415 std::string sim_name; 415 std::string sim_name;
416 std::string land_sku;
417 std::string land_type;
418
416 for(S32 i = first_block; i < count; ++i) 419 for(S32 i = first_block; i < count; ++i)
417 { 420 {
418 msg->getUUID("QueryData", "OwnerID", owner_id, i); 421 msg->getUUID("QueryData", "OwnerID", owner_id, i);
@@ -425,6 +428,18 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
425 msg->getF32("QueryData", "GlobalY", global_y, i); 428 msg->getF32("QueryData", "GlobalY", global_y, i);
426 msg->getString("QueryData", "SimName", sim_name, i); 429 msg->getString("QueryData", "SimName", sim_name, i);
427 430
431 if ( msg->getSizeFast(_PREHASH_QueryData, i, _PREHASH_ProductSKU) > 0 )
432 {
433 msg->getStringFast( _PREHASH_QueryData, _PREHASH_ProductSKU, land_sku, i);
434 llinfos << "Land sku: " << land_sku << llendl;
435 land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku);
436 }
437 else
438 {
439 land_sku.clear();
440 land_type = LLTrans::getString("land_type_unknown");
441 }
442
428 S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; 443 S32 region_x = llround(global_x) % REGION_WIDTH_UNITS;
429 S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; 444 S32 region_y = llround(global_y) % REGION_WIDTH_UNITS;
430 std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y); 445 std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y);
@@ -437,6 +452,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
437 { 452 {
438 area = llformat("%d / %d", billable_area, actual_area); 453 area = llformat("%d / %d", billable_area, actual_area);
439 } 454 }
455
440 std::string hidden; 456 std::string hidden;
441 hidden = llformat("%f %f", global_x, global_y); 457 hidden = llformat("%f %f", global_x, global_y);
442 458
@@ -454,8 +470,13 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
454 row["columns"][2]["value"] = area; 470 row["columns"][2]["value"] = area;
455 row["columns"][2]["font"] = "SANSSERIFSMALL"; 471 row["columns"][2]["font"] = "SANSSERIFSMALL";
456 472
457 row["columns"][3]["column"] = "hidden"; 473 row["columns"][3]["column"] = "type";
458 row["columns"][3]["value"] = hidden; 474 row["columns"][3]["value"] = land_type;
475 row["columns"][3]["font"] = "SANSSERIFSMALL";
476
477 // hidden is always last column
478 row["columns"][4]["column"] = "hidden";
479 row["columns"][4]["value"] = hidden;
459 480
460 mGroupParcelsp->addElement(row, ADD_SORTED); 481 mGroupParcelsp->addElement(row, ADD_SORTED);
461 } 482 }
@@ -705,7 +726,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
705 textp = getChild<LLTextEditor>("group_money_planning_text", true); 726 textp = getChild<LLTextEditor>("group_money_planning_text", true);
706 panelp = getChild<LLPanel>("group_money_planning_tab", true); 727 panelp = getChild<LLPanel>("group_money_planning_tab", true);
707 728
708 if ( 1 ) //!can_view 729 if ( !can_view )
709 { 730 {
710 textp->setText(mImplementationp->mCantViewAccountsText); 731 textp->setText(mImplementationp->mCantViewAccountsText);
711 } 732 }
@@ -1411,11 +1432,18 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
1411 text.append(1, '\n'); 1432 text.append(1, '\n');
1412 } 1433 }
1413 1434
1414 text.append( " Group Individual Share\n"); 1435 // [DEV-29503] Hide the individual info since
1415 text.append(llformat( "%-24s %6d %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members))); 1436 // non_exempt_member here is a wrong choice to calculate individual shares.
1416 text.append(llformat( "%-24s %6d %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members))); 1437 // text.append( " Group Individual Share\n");
1417 text.append(llformat( "%-24s %6d %6d \n", "Total", total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members))); 1438 // text.append(llformat( "%-24s %6d %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members)));
1418 1439 // text.append(llformat( "%-24s %6d %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members)));
1440 // text.append(llformat( "%-24s %6d %6d \n", "Total", total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members)));
1441
1442 text.append( " Group\n");
1443 text.append(llformat( "%-24s %6d\n", "Credits", total_credits));
1444 text.append(llformat( "%-24s %6d\n", "Debits", total_debits));
1445 text.append(llformat( "%-24s %6d\n", "Total", total_credits + total_debits));
1446
1419 if ( mImplementationp->mTextEditorp ) 1447 if ( mImplementationp->mTextEditorp )
1420 { 1448 {
1421 mImplementationp->mTextEditorp->setText(text); 1449 mImplementationp->mTextEditorp->setText(text);