diff options
author | McCabe Maxsted | 2010-04-26 20:06:23 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-04-26 20:06:23 -0700 |
commit | e563e2c2cc66fa9f3b47c4814d70f9800d957026 (patch) | |
tree | a2a9ca5bfeaf747b76b744f007da061ad15110c2 /linden/indra/newview/llpanelpermissions.cpp | |
parent | Merge commit 'jacek/next' into next (diff) | |
download | meta-impy-e563e2c2cc66fa9f3b47c4814d70f9800d957026.zip meta-impy-e563e2c2cc66fa9f3b47c4814d70f9800d957026.tar.gz meta-impy-e563e2c2cc66fa9f3b47c4814d70f9800d957026.tar.bz2 meta-impy-e563e2c2cc66fa9f3b47c4814d70f9800d957026.tar.xz |
Ported currency changes from Hippo (#237) and fixed some labels Hippo missed (also fixed #200 in the process)
Diffstat (limited to 'linden/indra/newview/llpanelpermissions.cpp')
-rw-r--r-- | linden/indra/newview/llpanelpermissions.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index 0cb5b9e..cd1aee7 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp | |||
@@ -65,6 +65,8 @@ | |||
65 | #include "lluictrlfactory.h" | 65 | #include "lluictrlfactory.h" |
66 | #include "roles_constants.h" | 66 | #include "roles_constants.h" |
67 | 67 | ||
68 | #include "hippoGridManager.h" | ||
69 | |||
68 | ///---------------------------------------------------------------------------- | 70 | ///---------------------------------------------------------------------------- |
69 | /// Class llpanelpermissions | 71 | /// Class llpanelpermissions |
70 | ///---------------------------------------------------------------------------- | 72 | ///---------------------------------------------------------------------------- |
@@ -134,6 +136,9 @@ LLPanelPermissions::~LLPanelPermissions() | |||
134 | 136 | ||
135 | void LLPanelPermissions::refresh() | 137 | void LLPanelPermissions::refresh() |
136 | { | 138 | { |
139 | LLStringUtil::format_map_t argsCurrency; | ||
140 | argsCurrency["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); | ||
141 | |||
137 | LLButton* BtnDeedToGroup = getChild<LLButton>("button deed"); | 142 | LLButton* BtnDeedToGroup = getChild<LLButton>("button deed"); |
138 | if(BtnDeedToGroup) | 143 | if(BtnDeedToGroup) |
139 | { | 144 | { |
@@ -234,7 +239,7 @@ void LLPanelPermissions::refresh() | |||
234 | } | 239 | } |
235 | 240 | ||
236 | childSetEnabled("Cost",false); | 241 | childSetEnabled("Cost",false); |
237 | childSetText("Cost",getString("Cost Default")); | 242 | childSetText("Cost", getString("Cost Default", argsCurrency)); |
238 | childSetText("Edit Cost",LLStringUtil::null); | 243 | childSetText("Edit Cost",LLStringUtil::null); |
239 | childSetEnabled("Edit Cost",false); | 244 | childSetEnabled("Edit Cost",false); |
240 | 245 | ||
@@ -465,11 +470,11 @@ void LLPanelPermissions::refresh() | |||
465 | // If there are multiple items for sale then set text to PRICE PER UNIT. | 470 | // If there are multiple items for sale then set text to PRICE PER UNIT. |
466 | if (num_for_sale > 1) | 471 | if (num_for_sale > 1) |
467 | { | 472 | { |
468 | childSetText("Cost",getString("Cost Per Unit")); | 473 | childSetText("Cost",getString("Cost Per Unit", argsCurrency)); |
469 | } | 474 | } |
470 | else | 475 | else |
471 | { | 476 | { |
472 | childSetText("Cost",getString("Cost Default")); | 477 | childSetText("Cost",getString("Cost Default", argsCurrency)); |
473 | } | 478 | } |
474 | 479 | ||
475 | LLLineEditor *editPrice = getChild<LLLineEditor>("Edit Cost"); | 480 | LLLineEditor *editPrice = getChild<LLLineEditor>("Edit Cost"); |
@@ -510,15 +515,15 @@ void LLPanelPermissions::refresh() | |||
510 | 515 | ||
511 | // If multiple items are for sale, set text to TOTAL PRICE. | 516 | // If multiple items are for sale, set text to TOTAL PRICE. |
512 | if (num_for_sale > 1) | 517 | if (num_for_sale > 1) |
513 | childSetText("Cost",getString("Cost Total")); | 518 | childSetText("Cost", getString("Cost Total", argsCurrency)); |
514 | else | 519 | else |
515 | childSetText("Cost",getString("Cost Default")); | 520 | childSetText("Cost", getString("Cost Default", argsCurrency)); |
516 | } | 521 | } |
517 | // This is a public object. | 522 | // This is a public object. |
518 | else | 523 | else |
519 | { | 524 | { |
520 | childSetEnabled("Cost",false); | 525 | childSetEnabled("Cost",false); |
521 | childSetText("Cost",getString("Cost Default")); | 526 | childSetText("Cost", getString("Cost Default", argsCurrency)); |
522 | 527 | ||
523 | childSetText("Edit Cost",LLStringUtil::null); | 528 | childSetText("Edit Cost",LLStringUtil::null); |
524 | childSetEnabled("Edit Cost",false); | 529 | childSetEnabled("Edit Cost",false); |
@@ -954,7 +959,9 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response) | |||
954 | 959 | ||
955 | void LLPanelPermissions::onClickDeedToGroup(void* data) | 960 | void LLPanelPermissions::onClickDeedToGroup(void* data) |
956 | { | 961 | { |
957 | LLNotifications::instance().add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group); | 962 | LLSD args; |
963 | args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); | ||
964 | LLNotifications::instance().add( "DeedObjectToGroup", args, LLSD(), callback_deed_to_group); | ||
958 | } | 965 | } |
959 | 966 | ||
960 | ///---------------------------------------------------------------------------- | 967 | ///---------------------------------------------------------------------------- |
@@ -1060,6 +1067,9 @@ void LLPanelPermissions::setAllSaleInfo() | |||
1060 | llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl; | 1067 | llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl; |
1061 | LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; | 1068 | LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; |
1062 | 1069 | ||
1070 | LLStringUtil::format_map_t argsCurrency; | ||
1071 | argsCurrency["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); | ||
1072 | |||
1063 | LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale"); | 1073 | LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale"); |
1064 | 1074 | ||
1065 | // Set the sale type if the object(s) are for sale. | 1075 | // Set the sale type if the object(s) are for sale. |
@@ -1093,7 +1103,7 @@ void LLPanelPermissions::setAllSaleInfo() | |||
1093 | { | 1103 | { |
1094 | // Don't extract the price if it's labeled as MIXED or is empty. | 1104 | // Don't extract the price if it's labeled as MIXED or is empty. |
1095 | const std::string& editPriceString = editPrice->getText(); | 1105 | const std::string& editPriceString = editPrice->getText(); |
1096 | if (editPriceString != getString("Cost Mixed") && | 1106 | if (editPriceString != getString("Cost Mixed", argsCurrency) && |
1097 | !editPriceString.empty()) | 1107 | !editPriceString.empty()) |
1098 | { | 1108 | { |
1099 | price = atoi(editPriceString.c_str()); | 1109 | price = atoi(editPriceString.c_str()); |