diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llfloaterbuyland.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-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/llfloaterbuyland.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterbuyland.cpp | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/linden/indra/newview/llfloaterbuyland.cpp b/linden/indra/newview/llfloaterbuyland.cpp index 1ad45e1..29506e2 100644 --- a/linden/indra/newview/llfloaterbuyland.cpp +++ b/linden/indra/newview/llfloaterbuyland.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, |
@@ -213,7 +214,7 @@ void LLFloaterBuyLand::buyLand( | |||
213 | { | 214 | { |
214 | if(is_for_group && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED)) | 215 | if(is_for_group && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED)) |
215 | { | 216 | { |
216 | gViewerWindow->alertXml("OnlyOfficerCanBuyLand"); | 217 | LLNotifications::instance().add("OnlyOfficerCanBuyLand"); |
217 | return; | 218 | return; |
218 | } | 219 | } |
219 | 220 | ||
@@ -528,6 +529,12 @@ void LLFloaterBuyLandUI::updateCovenantInfo() | |||
528 | region_name->setText(region->getName()); | 529 | region_name->setText(region->getName()); |
529 | } | 530 | } |
530 | 531 | ||
532 | LLTextBox* region_type = getChild<LLTextBox>("region_type_text"); | ||
533 | if (region_type) | ||
534 | { | ||
535 | region_type->setText(region->getSimProductName()); | ||
536 | } | ||
537 | |||
531 | LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); | 538 | LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); |
532 | if (resellable_clause) | 539 | if (resellable_clause) |
533 | { | 540 | { |
@@ -976,7 +983,7 @@ BOOL LLFloaterBuyLandUI::canClose() | |||
976 | if (!can_close) | 983 | if (!can_close) |
977 | { | 984 | { |
978 | // explain to user why they can't do this, see DEV-9605 | 985 | // explain to user why they can't do this, see DEV-9605 |
979 | gViewerWindow->alertXml("CannotCloseFloaterBuyLand"); | 986 | LLNotifications::instance().add("CannotCloseFloaterBuyLand"); |
980 | } | 987 | } |
981 | return can_close; | 988 | return can_close; |
982 | } | 989 | } |
@@ -1020,14 +1027,24 @@ void LLFloaterBuyLandUI::refreshUI() | |||
1020 | 1027 | ||
1021 | childSetText("info_size", getString("meters_supports_object", string_args)); | 1028 | childSetText("info_size", getString("meters_supports_object", string_args)); |
1022 | 1029 | ||
1030 | F32 cost_per_sqm = 0.0f; | ||
1031 | if (mParcelActualArea > 0) | ||
1032 | { | ||
1033 | cost_per_sqm = (F32)mParcelPrice / (F32)mParcelActualArea; | ||
1034 | } | ||
1023 | 1035 | ||
1024 | childSetText("info_price", | 1036 | LLStringUtil::format_map_t info_price_args; |
1025 | llformat( | 1037 | info_price_args["[PRICE]"] = llformat("%d", mParcelPrice); |
1026 | "L$ %d%s", | 1038 | info_price_args["[PRICE_PER_SQM]"] = llformat("%.1f", cost_per_sqm); |
1027 | mParcelPrice, | 1039 | if (mParcelSoldWithObjects) |
1028 | mParcelSoldWithObjects | 1040 | { |
1029 | ? "\nsold with objects" | 1041 | info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_with_objects"); |
1030 | : "")); | 1042 | } |
1043 | else | ||
1044 | { | ||
1045 | info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_without_objects"); | ||
1046 | } | ||
1047 | childSetText("info_price", getString("info_price_string", info_price_args)); | ||
1031 | childSetVisible("info_price", mParcelIsForSale); | 1048 | childSetVisible("info_price", mParcelIsForSale); |
1032 | } | 1049 | } |
1033 | else | 1050 | else |
@@ -1157,7 +1174,7 @@ void LLFloaterBuyLandUI::refreshUI() | |||
1157 | else if (mParcelBillableArea == mParcelActualArea) | 1174 | else if (mParcelBillableArea == mParcelActualArea) |
1158 | { | 1175 | { |
1159 | LLStringUtil::format_map_t string_args; | 1176 | LLStringUtil::format_map_t string_args; |
1160 | string_args["[AMOUNT]"] = llformat("%d", mParcelActualArea); | 1177 | string_args["[AMOUNT]"] = llformat("%d ", mParcelActualArea); |
1161 | message += getString("parcel_meters", string_args); | 1178 | message += getString("parcel_meters", string_args); |
1162 | } | 1179 | } |
1163 | else | 1180 | else |
@@ -1166,13 +1183,13 @@ void LLFloaterBuyLandUI::refreshUI() | |||
1166 | if (mParcelBillableArea > mParcelActualArea) | 1183 | if (mParcelBillableArea > mParcelActualArea) |
1167 | { | 1184 | { |
1168 | LLStringUtil::format_map_t string_args; | 1185 | LLStringUtil::format_map_t string_args; |
1169 | string_args["[AMOUNT]"] = llformat("%d", mParcelBillableArea); | 1186 | string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); |
1170 | message += getString("premium_land", string_args); | 1187 | message += getString("premium_land", string_args); |
1171 | } | 1188 | } |
1172 | else | 1189 | else |
1173 | { | 1190 | { |
1174 | LLStringUtil::format_map_t string_args; | 1191 | LLStringUtil::format_map_t string_args; |
1175 | string_args["[AMOUNT]"] = llformat("%d", mParcelBillableArea); | 1192 | string_args["[AMOUNT]"] = llformat("%d ", mParcelBillableArea); |
1176 | message += getString("discounted_land", string_args); | 1193 | message += getString("discounted_land", string_args); |
1177 | } | 1194 | } |
1178 | } | 1195 | } |