aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llfloaterland.cpp
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterland.cpp402
1 files changed, 148 insertions, 254 deletions
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp
index a98c835..43c39aa 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.cpp
@@ -2,6 +2,8 @@
2 * @file llfloaterland.cpp 2 * @file llfloaterland.cpp
3 * @brief "About Land" floater, allowing display and editing of land parcel properties. 3 * @brief "About Land" floater, allowing display and editing of land parcel properties.
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 7 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,12 +26,12 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
30 33
31#include <sstream> 34#include <sstream>
32#include <time.h>
33 35
34#include "llfloaterland.h" 36#include "llfloaterland.h"
35 37
@@ -70,43 +72,10 @@
70#include "llviewercontrol.h" 72#include "llviewercontrol.h"
71#include "roles_constants.h" 73#include "roles_constants.h"
72 74
73static const S32 EDIT_HEIGHT = 16;
74static const S32 LEFT = HPAD;
75static const S32 BOTTOM = VPAD;
76static const S32 RULER0 = LEFT;
77static const S32 RULER05 = RULER0 + 24;
78static const S32 RULER1 = RULER05 + 16;
79static const S32 RULER15 = RULER1 + 20;
80static const S32 RULER2 = RULER1 + 32;
81static const S32 RULER205= RULER2 + 32;
82static const S32 RULER20 = RULER2 + 64;
83static const S32 RULER21 = RULER20 + 16;
84static const S32 RULER22 = RULER21 + 32;
85static const S32 RULER225 = RULER20 + 64;
86static const S32 RULER23 = RULER22 + 64;
87static const S32 RULER24 = RULER23 + 26;
88static const S32 RULER3 = RULER2 + 102;
89static const S32 RULER4 = RULER3 + 8;
90static const S32 RULER5 = RULER4 + 50;
91static const S32 RULER6 = RULER5 + 52;
92static const S32 RULER7 = RULER6 + 24;
93static const S32 RIGHT = LEFT + 278;
94static const S32 FAR_RIGHT = LEFT + 324 + 40;
95
96static const char PRICE[] = "Price:";
97static const char NO_PRICE[] = "";
98static const char AREA[] = "Area:";
99
100static const char OWNER_ONLINE[] = "0"; 75static const char OWNER_ONLINE[] = "0";
101static const char OWNER_OFFLINE[] = "1"; 76static const char OWNER_OFFLINE[] = "1";
102static const char OWNER_GROUP[] = "2"; 77static const char OWNER_GROUP[] = "2";
103 78
104static const char NEED_TIER_TO_MODIFY_STRING[] = "You must approve your purchase to modify this land.";
105
106static const char WEB_PAGE[] = "Web page";
107static const char QUICKTIME_MOVIE[] = "QuickTime movie";
108static const char RAW_HTML[] = "Raw HTML";
109
110// constants used in callbacks below - syntactic sugar. 79// constants used in callbacks below - syntactic sugar.
111static const BOOL BUY_GROUP_LAND = TRUE; 80static const BOOL BUY_GROUP_LAND = TRUE;
112static const BOOL BUY_PERSONAL_LAND = FALSE; 81static const BOOL BUY_PERSONAL_LAND = FALSE;
@@ -387,7 +356,8 @@ BOOL LLPanelLandGeneral::postBuild()
387 childSetUserData("Name", this); 356 childSetUserData("Name", this);
388 357
389 358
390 mEditDesc = LLUICtrlFactory::getLineEditorByName(this, "Description"); 359 mEditDesc = LLUICtrlFactory::getTextEditorByName(this, "Description");
360 mEditDesc->setCommitOnFocusLost(TRUE);
391 mEditDesc->setCommitCallback(onCommitAny); 361 mEditDesc->setCommitCallback(onCommitAny);
392 childSetPrevalidate("Description", LLLineEditor::prevalidatePrintableNotPipe); 362 childSetPrevalidate("Description", LLLineEditor::prevalidatePrintableNotPipe);
393 childSetUserData("Description", this); 363 childSetUserData("Description", this);
@@ -505,12 +475,12 @@ void LLPanelLandGeneral::refresh()
505 { 475 {
506 // nothing selected, disable panel 476 // nothing selected, disable panel
507 mEditName->setEnabled(FALSE); 477 mEditName->setEnabled(FALSE);
508 mEditName->setText(""); 478 mEditName->setText(LLString::null);
509 479
510 mEditDesc->setEnabled(FALSE); 480 mEditDesc->setEnabled(FALSE);
511 mEditDesc->setText(""); 481 mEditDesc->setText(LLString::null);
512 482
513 mTextSalePending->setText(""); 483 mTextSalePending->setText(LLString::null);
514 mTextSalePending->setEnabled(FALSE); 484 mTextSalePending->setEnabled(FALSE);
515 485
516 mBtnDeedToGroup->setEnabled(FALSE); 486 mBtnDeedToGroup->setEnabled(FALSE);
@@ -522,14 +492,13 @@ void LLPanelLandGeneral::refresh()
522 mCheckContributeWithDeed->set(FALSE); 492 mCheckContributeWithDeed->set(FALSE);
523 mCheckContributeWithDeed->setEnabled(FALSE); 493 mCheckContributeWithDeed->setEnabled(FALSE);
524 494
525 mTextOwner->setText(""); 495 mTextOwner->setText(LLString::null);
526 mBtnProfile->setLabelSelected("Profile..."); 496 mBtnProfile->setLabel(childGetText("profile_text"));
527 mBtnProfile->setLabelUnselected("Profile...");
528 mBtnProfile->setEnabled(FALSE); 497 mBtnProfile->setEnabled(FALSE);
529 498
530 mTextClaimDate->setText(""); 499 mTextClaimDate->setText(LLString::null);
531 mTextGroup->setText(""); 500 mTextGroup->setText(LLString::null);
532 mTextPrice->setText(""); 501 mTextPrice->setText(LLString::null);
533 502
534 mSaleInfoForSale1->setVisible(FALSE); 503 mSaleInfoForSale1->setVisible(FALSE);
535 mSaleInfoForSale2->setVisible(FALSE); 504 mSaleInfoForSale2->setVisible(FALSE);
@@ -539,8 +508,8 @@ void LLPanelLandGeneral::refresh()
539 mBtnSellLand->setVisible(FALSE); 508 mBtnSellLand->setVisible(FALSE);
540 mBtnStopSellLand->setVisible(FALSE); 509 mBtnStopSellLand->setVisible(FALSE);
541 510
542 mTextPriceLabel->setText(NO_PRICE); 511 mTextPriceLabel->setText(LLString::null);
543 mTextDwell->setText(""); 512 mTextDwell->setText(LLString::null);
544 513
545 mBtnBuyLand->setEnabled(FALSE); 514 mBtnBuyLand->setEnabled(FALSE);
546 mBtnBuyGroupLand->setEnabled(FALSE); 515 mBtnBuyGroupLand->setEnabled(FALSE);
@@ -576,14 +545,14 @@ void LLPanelLandGeneral::refresh()
576 // Is it owned? 545 // Is it owned?
577 if (is_public) 546 if (is_public)
578 { 547 {
579 mTextSalePending->setText(""); 548 mTextSalePending->setText(LLString::null);
580 mTextSalePending->setEnabled(FALSE); 549 mTextSalePending->setEnabled(FALSE);
581 mTextOwner->setText("(public)"); 550 mTextOwner->setText(childGetText("public_text"));
582 mTextOwner->setEnabled(FALSE); 551 mTextOwner->setEnabled(FALSE);
583 mBtnProfile->setEnabled(FALSE); 552 mBtnProfile->setEnabled(FALSE);
584 mTextClaimDate->setText(""); 553 mTextClaimDate->setText(LLString::null);
585 mTextClaimDate->setEnabled(FALSE); 554 mTextClaimDate->setEnabled(FALSE);
586 mTextGroup->setText("(none)"); 555 mTextGroup->setText(childGetText("none_text"));
587 mTextGroup->setEnabled(FALSE); 556 mTextGroup->setEnabled(FALSE);
588 mBtnStartAuction->setEnabled(FALSE); 557 mBtnStartAuction->setEnabled(FALSE);
589 } 558 }
@@ -591,20 +560,19 @@ void LLPanelLandGeneral::refresh()
591 { 560 {
592 if(!is_leased && (owner_id == gAgent.getID())) 561 if(!is_leased && (owner_id == gAgent.getID()))
593 { 562 {
594 mTextSalePending->setText(NEED_TIER_TO_MODIFY_STRING); 563 mTextSalePending->setText(childGetText("need_tier_to_modify"));
595 mTextSalePending->setEnabled(TRUE); 564 mTextSalePending->setEnabled(TRUE);
596 } 565 }
597 else if(parcel->getAuctionID()) 566 else if(parcel->getAuctionID())
598 { 567 {
599 char auction_str[MAX_STRING]; /*Flawfinder: ignore*/ 568 mTextSalePending->setText(childGetText("auction_id_text"));
600 snprintf(auction_str, sizeof(auction_str), "Auction ID: %u", parcel->getAuctionID()); /* Flawfinder: ignore */ 569 mTextSalePending->setTextArg("[ID]", llformat("%u", parcel->getAuctionID()));
601 mTextSalePending->setText(auction_str);
602 mTextSalePending->setEnabled(TRUE); 570 mTextSalePending->setEnabled(TRUE);
603 } 571 }
604 else 572 else
605 { 573 {
606 // not the owner, or it is leased 574 // not the owner, or it is leased
607 mTextSalePending->setText(""); 575 mTextSalePending->setText(LLString::null);
608 mTextSalePending->setEnabled(FALSE); 576 mTextSalePending->setEnabled(FALSE);
609 } 577 }
610 //refreshNames(); 578 //refreshNames();
@@ -616,26 +584,25 @@ void LLPanelLandGeneral::refresh()
616 if (parcel->getGroupID().isNull()) 584 if (parcel->getGroupID().isNull())
617 { 585 {
618 // Not group owned, so "Profile" 586 // Not group owned, so "Profile"
619 mBtnProfile->setLabelSelected("Profile..."); 587 mBtnProfile->setLabel(childGetText("profile_text"));
620 mBtnProfile->setLabelUnselected("Profile...");
621 588
622 mTextGroup->setText("(none)"); 589 mTextGroup->setText(childGetText("none_text"));
623 mTextGroup->setEnabled(FALSE); 590 mTextGroup->setEnabled(FALSE);
624 } 591 }
625 else 592 else
626 { 593 {
627 // Group owned, so "Info" 594 // Group owned, so "Info"
628 mBtnProfile->setLabelSelected("Info..."); 595 mBtnProfile->setLabel(childGetText("info_text"));
629 mBtnProfile->setLabelUnselected("Info...");
630 596
631 //mTextGroup->setText("HIPPOS!");//parcel->getGroupName()); 597 //mTextGroup->setText("HIPPOS!");//parcel->getGroupName());
632 mTextGroup->setEnabled(TRUE); 598 mTextGroup->setEnabled(TRUE);
633 } 599 }
634 600
635 // Display claim date 601 // Display claim date
602 // *TODO:Localize (Time format may need Translating)
636 time_t claim_date = parcel->getClaimDate(); 603 time_t claim_date = parcel->getClaimDate();
637 char time_buf[TIME_STR_LENGTH]; /*Flawfinder: ignore*/ 604 char time_buf[TIME_STR_LENGTH]; /*Flawfinder: ignore*/
638 mTextClaimDate->setText(formatted_time(claim_date, time_buf)); 605 mTextClaimDate->setText(LLString(formatted_time(claim_date, time_buf)));
639 mTextClaimDate->setEnabled(is_leased); 606 mTextClaimDate->setEnabled(is_leased);
640 607
641 BOOL enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) 608 BOOL enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON)
@@ -724,8 +691,6 @@ void LLPanelLandGeneral::refresh()
724 gParcelMgr->canAgentBuyParcel(parcel, true)); 691 gParcelMgr->canAgentBuyParcel(parcel, true));
725 692
726 // show pricing information 693 // show pricing information
727 char price[64]; /*Flawfinder: ignore*/
728 const char* label = NULL;
729 S32 area; 694 S32 area;
730 S32 claim_price; 695 S32 claim_price;
731 S32 rent_price; 696 S32 rent_price;
@@ -737,14 +702,12 @@ void LLPanelLandGeneral::refresh()
737 &dwell); 702 &dwell);
738 703
739 // Area 704 // Area
740 snprintf(price, sizeof(price), "%d sq. m.", area); /* Flawfinder: ignore */ 705 LLUIString price = childGetText("area_size_text");
741 label = AREA; 706 price.setArg("[AREA]", llformat("%d",area));
707 mTextPriceLabel->setText(childGetText("area_text"));
708 mTextPrice->setText(price.getString());
742 709
743 mTextPriceLabel->setText(label); 710 mTextDwell->setText(llformat("%.0f", dwell));
744 mTextPrice->setText(price);
745
746 snprintf(price, sizeof(price), "%.0f", dwell); /* Flawfinder: ignore */
747 mTextDwell->setText(price);
748 711
749 if(region_owner) 712 if(region_owner)
750 { 713 {
@@ -772,15 +735,14 @@ void LLPanelLandGeneral::refreshNames()
772 LLParcel *parcel = mParcel->getParcel(); 735 LLParcel *parcel = mParcel->getParcel();
773 if (!parcel) 736 if (!parcel)
774 { 737 {
775 mTextOwner->setText(""); 738 mTextOwner->setText(LLString::null);
776 return; 739 return;
777 } 740 }
778 741
779 char buffer[MAX_STRING]; /*Flawfinder: ignore*/ 742 LLString owner;
780 if (parcel->getIsGroupOwned()) 743 if (parcel->getIsGroupOwned())
781 { 744 {
782 buffer[0] = '\0'; 745 owner = childGetText("group_owned_text");
783 strcat(buffer, "(Group Owned)"); /*Flawfinder: ignore*/
784 } 746 }
785 else 747 else
786 { 748 {
@@ -788,24 +750,23 @@ void LLPanelLandGeneral::refreshNames()
788 char owner_first[MAX_STRING]; /*Flawfinder: ignore*/ 750 char owner_first[MAX_STRING]; /*Flawfinder: ignore*/
789 char owner_last[MAX_STRING]; /*Flawfinder: ignore*/ 751 char owner_last[MAX_STRING]; /*Flawfinder: ignore*/
790 gCacheName->getName(parcel->getOwnerID(), owner_first, owner_last); 752 gCacheName->getName(parcel->getOwnerID(), owner_first, owner_last);
791 snprintf(buffer, sizeof(buffer), "%s %s", owner_first, owner_last); /* Flawfinder: ignore */ 753 owner = llformat("%s %s", owner_first, owner_last);
792 } 754 }
793 755
794 if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) 756 if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus())
795 { 757 {
796 strcat(buffer, " (Sale Pending)"); /*Flawfinder: ignore*/ 758 owner += childGetText("sale_pending_text");
797 } 759 }
798 mTextOwner->setText(buffer); 760 mTextOwner->setText(owner);
799 761
762 LLString group;
800 if(!parcel->getGroupID().isNull()) 763 if(!parcel->getGroupID().isNull())
801 { 764 {
765 char buffer[MAX_STRING]; /*Flawfinder: ignore*/
802 gCacheName->getGroupName(parcel->getGroupID(), buffer); 766 gCacheName->getGroupName(parcel->getGroupID(), buffer);
767 group = buffer;
803 } 768 }
804 else 769 mTextGroup->setText(group);
805 {
806 buffer[0] = '\0';
807 }
808 mTextGroup->setText(buffer);
809 770
810 const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); 771 const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
811 if(auth_buyer_id.notNull()) 772 if(auth_buyer_id.notNull())
@@ -952,7 +913,7 @@ void LLPanelLandGeneral::onClickBuyPass(void* data)
952 if (!parcel) return; 913 if (!parcel) return;
953 914
954 S32 pass_price = parcel->getPassPrice(); 915 S32 pass_price = parcel->getPassPrice();
955 const char* parcel_name = parcel->getName(); 916 LLString parcel_name = parcel->getName();
956 F32 pass_hours = parcel->getPassHours(); 917 F32 pass_hours = parcel->getPassHours();
957 918
958 char cost[256], time[256]; /*Flawfinder: ignore*/ 919 char cost[256], time[256]; /*Flawfinder: ignore*/
@@ -1068,8 +1029,8 @@ BOOL LLPanelLandObjects::postBuild()
1068{ 1029{
1069 1030
1070 mFirstReply = TRUE; 1031 mFirstReply = TRUE;
1071 mParcelObjectBonus = LLUICtrlFactory::getTextBoxByName(this, "Simulator Primitive Bonus Factor: 1.00"); 1032 mParcelObjectBonus = LLUICtrlFactory::getTextBoxByName(this, "parcel_object_bonus");
1072 mSWTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "0 out of 0 available"); 1033 mSWTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "objects_available");
1073 mObjectContribution = LLUICtrlFactory::getTextBoxByName(this, "object_contrib_text"); 1034 mObjectContribution = LLUICtrlFactory::getTextBoxByName(this, "object_contrib_text");
1074 mTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "total_objects_text"); 1035 mTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "total_objects_text");
1075 mOwnerObjects = LLUICtrlFactory::getTextBoxByName(this, "owner_objects_text"); 1036 mOwnerObjects = LLUICtrlFactory::getTextBoxByName(this, "owner_objects_text");
@@ -1218,17 +1179,18 @@ void LLPanelLandObjects::refresh()
1218 1179
1219 if (!parcel) 1180 if (!parcel)
1220 { 1181 {
1221 mSWTotalObjects->setText("0 out of 0 available"); 1182 mSWTotalObjects->setTextArg("[COUNT]", llformat("%d", 0));
1222 mObjectContribution->setText("0"); 1183 mSWTotalObjects->setTextArg("[TOTAL]", llformat("%d", 0));
1223 mTotalObjects->setText("0"); 1184 mSWTotalObjects->setTextArg("[AVAILABLE]", llformat("%d", 0));
1224 mOwnerObjects->setText("0"); 1185 mObjectContribution->setTextArg("[COUNT]", llformat("%d", 0));
1225 mGroupObjects->setText("0"); 1186 mTotalObjects->setTextArg("[COUNT]", llformat("%d", 0));
1226 mOtherObjects->setText("0"); 1187 mOwnerObjects->setTextArg("[COUNT]", llformat("%d", 0));
1227 mSelectedObjects->setText("0"); 1188 mGroupObjects->setTextArg("[COUNT]", llformat("%d", 0));
1189 mOtherObjects->setTextArg("[COUNT]", llformat("%d", 0));
1190 mSelectedObjects->setTextArg("[COUNT]", llformat("%d", 0));
1228 } 1191 }
1229 else 1192 else
1230 { 1193 {
1231 char count[MAX_STRING]; /*Flawfinder: ignore*/
1232 S32 sw_max = 0; 1194 S32 sw_max = 0;
1233 S32 sw_total = 0; 1195 S32 sw_total = 0;
1234 S32 max = 0; 1196 S32 max = 0;
@@ -1255,47 +1217,34 @@ void LLPanelLandObjects::refresh()
1255 1217
1256 if (parcel_object_bonus != 1.0f) 1218 if (parcel_object_bonus != 1.0f)
1257 { 1219 {
1258 snprintf(count, sizeof(count), "Region Object Bonus Factor: %.2f", /* Flawfinder: ignore */ 1220 mParcelObjectBonus->setVisible(TRUE);
1259 parcel_object_bonus); 1221 mParcelObjectBonus->setTextArg("[BONUS]", llformat("%.2f", parcel_object_bonus));
1260 mParcelObjectBonus->setText(count);
1261 } 1222 }
1262 else 1223 else
1263 { 1224 {
1264 mParcelObjectBonus->setText(""); 1225 mParcelObjectBonus->setVisible(FALSE);
1265 } 1226 }
1266 1227
1267 if (sw_total > sw_max) 1228 if (sw_total > sw_max)
1268 { 1229 {
1269 snprintf(count, sizeof(count), "%d out of %d (%d will be deleted)", /* Flawfinder: ignore */ 1230 mSWTotalObjects->setText(childGetText("objects_deleted_text"));
1270 sw_total, sw_max, sw_total - sw_max); 1231 mSWTotalObjects->setTextArg("[DELETED]", llformat("%d", sw_total - sw_max));
1271 } 1232 }
1272 else 1233 else
1273 { 1234 {
1274 snprintf(count, sizeof(count), "%d out of %d (%d available)", /* Flawfinder: ignore */ 1235 mSWTotalObjects->setText(childGetText("objects_available_text"));
1275 sw_total, sw_max, sw_max - sw_total); 1236 mSWTotalObjects->setTextArg("[AVAILABLE]", llformat("%d", sw_max - sw_total));
1276 } 1237 }
1277 mSWTotalObjects->setText(count); 1238 mSWTotalObjects->setTextArg("[COUNT]", llformat("%d", sw_total));
1278 1239 mSWTotalObjects->setTextArg("[MAX]", llformat("%d", sw_max));
1279 snprintf(count, sizeof(count), "%d", max); /* Flawfinder: ignore */
1280 mObjectContribution->setText(count);
1281
1282 snprintf(count, sizeof(count), "%d", total); /* Flawfinder: ignore */
1283 mTotalObjects->setText(count);
1284
1285 snprintf(count, sizeof(count), "%d", owned); /* Flawfinder: ignore */
1286 mOwnerObjects->setText(count);
1287
1288 snprintf(count, sizeof(count), "%d", group); /* Flawfinder: ignore */
1289 mGroupObjects->setText(count);
1290
1291 snprintf(count, sizeof(count), "%d", other); /* Flawfinder: ignore */
1292 mOtherObjects->setText(count);
1293
1294 snprintf(count, sizeof(count), "%d", selected); /* Flawfinder: ignore */
1295 mSelectedObjects->setText(count);
1296 1240
1297 snprintf(count, sizeof(count), "%d", mOtherTime); /* Flawfinder: ignore */ 1241 mObjectContribution->setTextArg("[COUNT]", llformat("%d", max));
1298 mCleanOtherObjectsTime->setText(count); 1242 mTotalObjects->setTextArg("[COUNT]", llformat("%d", total));
1243 mOwnerObjects->setTextArg("[COUNT]", llformat("%d", owned));
1244 mGroupObjects->setTextArg("[COUNT]", llformat("%d", group));
1245 mOtherObjects->setTextArg("[COUNT]", llformat("%d", other));
1246 mSelectedObjects->setTextArg("[COUNT]", llformat("%d", selected));
1247 mCleanOtherObjectsTime->setText(llformat("%d", mOtherTime));
1299 1248
1300 BOOL can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED); 1249 BOOL can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED);
1301 BOOL can_return_group_set = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_SET); 1250 BOOL can_return_group_set = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_SET);
@@ -1485,7 +1434,6 @@ void LLPanelLandObjects::callbackReturnOwnerList(S32 option, void* userdata)
1485 } 1434 }
1486 else 1435 else
1487 { 1436 {
1488 // XUI:translate NAME -> FIRST LAST
1489 args["[NAME]"] = self->mSelectedName; 1437 args["[NAME]"] = self->mSelectedName;
1490 LLNotifyBox::showXml("OtherObjectsReturned2", args); 1438 LLNotifyBox::showXml("OtherObjectsReturned2", args);
1491 } 1439 }
@@ -1630,7 +1578,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
1630 row->addColumn(OWNER_OFFLINE, FONT, self->mColWidth[1]); 1578 row->addColumn(OWNER_OFFLINE, FONT, self->mColWidth[1]);
1631 } 1579 }
1632 // Placeholder for name. 1580 // Placeholder for name.
1633 row->addColumn("", FONT, self->mColWidth[2]); 1581 row->addColumn(LLString::null, FONT, self->mColWidth[2]);
1634 1582
1635 snprintf(object_count_str, sizeof(object_count_str), "%d", object_count); /* Flawfinder: ignore */ 1583 snprintf(object_count_str, sizeof(object_count_str), "%d", object_count); /* Flawfinder: ignore */
1636 row->addColumn(object_count_str, FONT, self->mColWidth[3]); 1584 row->addColumn(object_count_str, FONT, self->mColWidth[3]);
@@ -1977,10 +1925,6 @@ BOOL LLPanelLandOptions::postBuild()
1977 mCategoryCombo = LLUICtrlFactory::getComboBoxByName(this, "land category"); 1925 mCategoryCombo = LLUICtrlFactory::getComboBoxByName(this, "land category");
1978 childSetCommitCallback("land category", onCommitAny, this); 1926 childSetCommitCallback("land category", onCommitAny, this);
1979 1927
1980 mAllowPublishCtrl = LLUICtrlFactory::getCheckBoxByName(this, "PublishCheck");
1981 childSetCommitCallback("PublishCheck", onCommitAny, this);
1982
1983
1984 mMatureCtrl = LLUICtrlFactory::getCheckBoxByName(this, "MatureCheck"); 1928 mMatureCtrl = LLUICtrlFactory::getCheckBoxByName(this, "MatureCheck");
1985 childSetCommitCallback("MatureCheck", onCommitAny, this); 1929 childSetCommitCallback("MatureCheck", onCommitAny, this);
1986 1930
@@ -1991,8 +1935,6 @@ BOOL LLPanelLandOptions::postBuild()
1991 if (gAgent.mAccess < SIM_ACCESS_MATURE) 1935 if (gAgent.mAccess < SIM_ACCESS_MATURE)
1992 { 1936 {
1993 // Disable these buttons if they are PG (Teen) users 1937 // Disable these buttons if they are PG (Teen) users
1994 mAllowPublishCtrl->setVisible(FALSE);
1995 mAllowPublishCtrl->setEnabled(FALSE);
1996 mPublishHelpButton->setVisible(FALSE); 1938 mPublishHelpButton->setVisible(FALSE);
1997 mPublishHelpButton->setEnabled(FALSE); 1939 mPublishHelpButton->setEnabled(FALSE);
1998 mMatureCtrl->setVisible(FALSE); 1940 mMatureCtrl->setVisible(FALSE);
@@ -2035,7 +1977,7 @@ BOOL LLPanelLandOptions::postBuild()
2035 } 1977 }
2036 1978
2037 1979
2038 mLocationText = LLUICtrlFactory::getTextBoxByName(this, "Landing Point: (none)"); 1980 mLocationText = LLUICtrlFactory::getTextBoxByName(this, "landing_point");
2039 1981
2040 mSetBtn = LLUICtrlFactory::getButtonByName(this, "Set"); 1982 mSetBtn = LLUICtrlFactory::getButtonByName(this, "Set");
2041 mSetBtn->setClickedCallback(onClickSet, this); 1983 mSetBtn->setClickedCallback(onClickSet, this);
@@ -2100,8 +2042,9 @@ void LLPanelLandOptions::refresh()
2100 mPushRestrictionCtrl->set(FALSE); 2042 mPushRestrictionCtrl->set(FALSE);
2101 mPushRestrictionCtrl->setEnabled(FALSE); 2043 mPushRestrictionCtrl->setEnabled(FALSE);
2102 2044
2045 // *TODO:Translate
2103 const char* none_string = LLParcel::getCategoryUIString(LLParcel::C_NONE); 2046 const char* none_string = LLParcel::getCategoryUIString(LLParcel::C_NONE);
2104 mCategoryCombo->setSimple(none_string); 2047 mCategoryCombo->setSimple(LLString(none_string));
2105 mCategoryCombo->setEnabled(FALSE); 2048 mCategoryCombo->setEnabled(FALSE);
2106 2049
2107 mLandingTypeCombo->setCurrentByIndex(0); 2050 mLandingTypeCombo->setCurrentByIndex(0);
@@ -2110,11 +2053,10 @@ void LLPanelLandOptions::refresh()
2110 mSnapshotCtrl->setImageAssetID(LLUUID::null); 2053 mSnapshotCtrl->setImageAssetID(LLUUID::null);
2111 mSnapshotCtrl->setEnabled(FALSE); 2054 mSnapshotCtrl->setEnabled(FALSE);
2112 2055
2113 mLocationText->setText("Landing Point: (none)"); 2056 mLocationText->setTextArg("[LANDING]", childGetText("landing_point_none"));
2114 mSetBtn->setEnabled(FALSE); 2057 mSetBtn->setEnabled(FALSE);
2115 mClearBtn->setEnabled(FALSE); 2058 mClearBtn->setEnabled(FALSE);
2116 2059
2117 mAllowPublishCtrl->setEnabled(FALSE);
2118 mMatureCtrl->setEnabled(FALSE); 2060 mMatureCtrl->setEnabled(FALSE);
2119 mPublishHelpButton->setEnabled(FALSE); 2061 mPublishHelpButton->setEnabled(FALSE);
2120 } 2062 }
@@ -2155,29 +2097,26 @@ void LLPanelLandOptions::refresh()
2155 mCheckOtherScripts ->set( parcel->getAllowOtherScripts() ); 2097 mCheckOtherScripts ->set( parcel->getAllowOtherScripts() );
2156 mCheckOtherScripts ->setEnabled( can_change_options ); 2098 mCheckOtherScripts ->setEnabled( can_change_options );
2157 2099
2158 BOOL can_change_identity = LLViewerParcelMgr::isParcelModifiableByAgent(parcel,
2159 GP_LAND_CHANGE_IDENTITY);
2160 mCheckShowDirectory ->set( parcel->getParcelFlag(PF_SHOW_DIRECTORY));
2161 mCheckShowDirectory ->setEnabled( can_change_identity );
2162
2163 mPushRestrictionCtrl->set( parcel->getRestrictPushObject() ); 2100 mPushRestrictionCtrl->set( parcel->getRestrictPushObject() );
2164 if(parcel->getRegionPushOverride()) 2101 if(parcel->getRegionPushOverride())
2165 { 2102 {
2166 mPushRestrictionCtrl->setLabel("Restrict Pushing (Region Override)"); 2103 mPushRestrictionCtrl->setLabel(childGetText("push_restrict_region_text"));
2167 mPushRestrictionCtrl->setEnabled(false); 2104 mPushRestrictionCtrl->setEnabled(false);
2168 mPushRestrictionCtrl->set(TRUE); 2105 mPushRestrictionCtrl->set(TRUE);
2169 } 2106 }
2170 else 2107 else
2171 { 2108 {
2172 mPushRestrictionCtrl->setLabel("Restrict Pushing"); 2109 mPushRestrictionCtrl->setLabel(childGetText("push_restrict_text"));
2173 mPushRestrictionCtrl->setEnabled(can_change_options); 2110 mPushRestrictionCtrl->setEnabled(can_change_options);
2174 } 2111 }
2175 2112
2176 // Set by string in case the order in UI doesn't match the order 2113 BOOL can_change_identity =
2177 // by index. 2114 LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY);
2115 // Set by string in case the order in UI doesn't match the order by index.
2116 // *TODO:Translate
2178 LLParcel::ECategory cat = parcel->getCategory(); 2117 LLParcel::ECategory cat = parcel->getCategory();
2179 const char* category_string = LLParcel::getCategoryUIString(cat); 2118 const char* category_string = LLParcel::getCategoryUIString(cat);
2180 mCategoryCombo->setSimple(category_string); 2119 mCategoryCombo->setSimple(LLString(category_string));
2181 mCategoryCombo->setEnabled( can_change_identity ); 2120 mCategoryCombo->setEnabled( can_change_identity );
2182 2121
2183 BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, 2122 BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel,
@@ -2191,23 +2130,19 @@ void LLPanelLandOptions::refresh()
2191 LLVector3 pos = parcel->getUserLocation(); 2130 LLVector3 pos = parcel->getUserLocation();
2192 if (pos.isExactlyZero()) 2131 if (pos.isExactlyZero())
2193 { 2132 {
2194 mLocationText->setText("Landing Point: (none)"); 2133 mLocationText->setTextArg("[LANDING]", childGetText("landing_point_none"));
2195 } 2134 }
2196 else 2135 else
2197 { 2136 {
2198 char buffer[256]; /*Flawfinder: ignore*/ 2137 mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d",
2199 snprintf(buffer, sizeof(buffer), "Landing Point: %d, %d, %d", /* Flawfinder: ignore */ 2138 llround(pos.mV[VX]),
2200 llround(pos.mV[VX]), 2139 llround(pos.mV[VY]),
2201 llround(pos.mV[VY]), 2140 llround(pos.mV[VZ])));
2202 llround(pos.mV[VZ]));
2203 mLocationText->setText(buffer);
2204 } 2141 }
2205 2142
2206 mSetBtn->setEnabled( can_change_landing_point ); 2143 mSetBtn->setEnabled( can_change_landing_point );
2207 mClearBtn->setEnabled( can_change_landing_point ); 2144 mClearBtn->setEnabled( can_change_landing_point );
2208 2145
2209 mAllowPublishCtrl->set(parcel->getAllowPublish());
2210 mAllowPublishCtrl->setEnabled( can_change_identity );
2211 mMatureCtrl->set(parcel->getMaturePublish()); 2146 mMatureCtrl->set(parcel->getMaturePublish());
2212 mMatureCtrl->setEnabled( can_change_identity ); 2147 mMatureCtrl->setEnabled( can_change_identity );
2213 mPublishHelpButton->setEnabled( can_change_identity ); 2148 mPublishHelpButton->setEnabled( can_change_identity );
@@ -2215,8 +2150,6 @@ void LLPanelLandOptions::refresh()
2215 if (gAgent.mAccess < SIM_ACCESS_MATURE) 2150 if (gAgent.mAccess < SIM_ACCESS_MATURE)
2216 { 2151 {
2217 // Disable these buttons if they are PG (Teen) users 2152 // Disable these buttons if they are PG (Teen) users
2218 mAllowPublishCtrl->setVisible(FALSE);
2219 mAllowPublishCtrl->setEnabled(FALSE);
2220 mPublishHelpButton->setVisible(FALSE); 2153 mPublishHelpButton->setVisible(FALSE);
2221 mPublishHelpButton->setEnabled(FALSE); 2154 mPublishHelpButton->setEnabled(FALSE);
2222 mMatureCtrl->setVisible(FALSE); 2155 mMatureCtrl->setVisible(FALSE);
@@ -2225,7 +2158,39 @@ void LLPanelLandOptions::refresh()
2225 } 2158 }
2226} 2159}
2227 2160
2161// virtual
2162void LLPanelLandOptions::draw()
2163{
2164 LLParcel *parcel = gParcelMgr->getFloatingParcelSelection()->getParcel();
2165
2166 if(parcel)
2167 {
2168 LLViewerRegion* region;
2169 region = gParcelMgr->getSelectionRegion();
2170 llassert(region); // Region should never be null.
2171
2172 BOOL can_change_identity = region ?
2173 LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY) &&
2174 ! (region->getRegionFlags() & REGION_FLAGS_BLOCK_PARCEL_SEARCH) : false;
2175
2176 // There is a bug with this panel whereby the Show Directory bit can be
2177 // slammed off by the Region based on an override. Since this data is cached
2178 // locally the change will not reflect in the panel, which could cause confusion
2179 // A workaround for this is to flip the bit off in the locally cached version
2180 // when we detect a mismatch case.
2181 if(! can_change_identity && parcel->getParcelFlag(PF_SHOW_DIRECTORY))
2182 {
2183 parcel->setParcelFlag(PF_SHOW_DIRECTORY, FALSE);
2184 }
2185 mCheckShowDirectory ->set(parcel->getParcelFlag(PF_SHOW_DIRECTORY));
2186 mCheckShowDirectory ->setEnabled(can_change_identity);
2187 mCategoryCombo->setEnabled(can_change_identity);
2188 }
2189
2190 LLPanel::draw();
2191
2228 2192
2193}
2229// static 2194// static
2230void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) 2195void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
2231{ 2196{
@@ -2248,7 +2213,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
2248 BOOL allow_landmark = self->mCheckLandmark->get(); 2213 BOOL allow_landmark = self->mCheckLandmark->get();
2249 BOOL allow_group_scripts = self->mCheckGroupScripts->get() || self->mCheckOtherScripts->get(); 2214 BOOL allow_group_scripts = self->mCheckGroupScripts->get() || self->mCheckOtherScripts->get();
2250 BOOL allow_other_scripts = self->mCheckOtherScripts->get(); 2215 BOOL allow_other_scripts = self->mCheckOtherScripts->get();
2251 BOOL allow_publish = self->mAllowPublishCtrl->get(); 2216 BOOL allow_publish = FALSE;
2252 BOOL mature_publish = self->mMatureCtrl->get(); 2217 BOOL mature_publish = self->mMatureCtrl->get();
2253 BOOL push_restriction = self->mPushRestrictionCtrl->get(); 2218 BOOL push_restriction = self->mPushRestrictionCtrl->get();
2254 BOOL show_directory = self->mCheckShowDirectory->get(); 2219 BOOL show_directory = self->mCheckShowDirectory->get();
@@ -2338,7 +2303,22 @@ void LLPanelLandOptions::onClickClear(void* userdata)
2338// static 2303// static
2339void LLPanelLandOptions::onClickPublishHelp(void*) 2304void LLPanelLandOptions::onClickPublishHelp(void*)
2340{ 2305{
2341 gViewerWindow->alertXml("ClickPublishHelpLand"); 2306 LLViewerRegion* region = gParcelMgr->getSelectionRegion();
2307 LLParcel *parcel = gParcelMgr->getFloatingParcelSelection()->getParcel();
2308 llassert(region); // Region should never be null.
2309
2310 bool can_change_identity = region && parcel ?
2311 LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY) &&
2312 ! (region->getRegionFlags() & REGION_FLAGS_BLOCK_PARCEL_SEARCH) : false;
2313
2314 if(! can_change_identity)
2315 {
2316 gViewerWindow->alertXml("ClickPublishHelpLandDisabled");
2317 }
2318 else
2319 {
2320 gViewerWindow->alertXml("ClickPublishHelpLand");
2321 }
2342} 2322}
2343 2323
2344//--------------------------------------------------------------------------- 2324//---------------------------------------------------------------------------
@@ -2408,10 +2388,10 @@ void LLPanelLandMedia::refresh()
2408 mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatEstate); 2388 mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatEstate);
2409 mRadioVoiceChat->setEnabled(FALSE); 2389 mRadioVoiceChat->setEnabled(FALSE);
2410 2390
2411 mMusicURLEdit->setText(""); 2391 mMusicURLEdit->setText(LLString::null);
2412 mMusicURLEdit->setEnabled(FALSE); 2392 mMusicURLEdit->setEnabled(FALSE);
2413 2393
2414 mMediaURLEdit->setText(""); 2394 mMediaURLEdit->setText(LLString::null);
2415 mMediaURLEdit->setEnabled(FALSE); 2395 mMediaURLEdit->setEnabled(FALSE);
2416 2396
2417 mMediaAutoScaleCheck->set ( FALSE ); 2397 mMediaAutoScaleCheck->set ( FALSE );
@@ -2627,24 +2607,20 @@ void LLPanelLandAccess::refresh()
2627 2607
2628 if (parcel) 2608 if (parcel)
2629 { 2609 {
2630 char label[256]; /*Flawfinder: ignore*/
2631
2632 // Display options 2610 // Display options
2633 BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP); 2611 BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
2634 mCheckGroup->set( use_group ); 2612 mCheckGroup->set( use_group );
2635 2613
2636 char group_name[MAX_STRING]; /*Flawfinder: ignore*/ 2614 char group_name[MAX_STRING]; /*Flawfinder: ignore*/
2637 gCacheName->getGroupName(parcel->getGroupID(), group_name); 2615 gCacheName->getGroupName(parcel->getGroupID(), group_name);
2638 snprintf(label, sizeof(label), "Group: %s", group_name); /* Flawfinder: ignore */ 2616 mCheckGroup->setLabelArg( "[GROUP]", LLString(group_name) );
2639 mCheckGroup->setLabel( label );
2640 2617
2641 S32 count = parcel->mAccessList.size(); 2618 S32 count = parcel->mAccessList.size();
2642 2619
2643 BOOL use_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST); 2620 BOOL use_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
2644 mCheckAccess->set( use_list ); 2621 mCheckAccess->set( use_list );
2645 snprintf(label, sizeof(label), "Avatars: (%d listed, %d max)", /* Flawfinder: ignore */ 2622 mCheckAccess->setLabelArg( "[LISTED]", llformat("%d",count));
2646 count, PARCEL_MAX_ACCESS_LIST); 2623 mCheckAccess->setLabelArg( "[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
2647 mCheckAccess->setLabel( label );
2648 2624
2649 access_map_const_iterator cit = parcel->mAccessList.begin(); 2625 access_map_const_iterator cit = parcel->mAccessList.begin();
2650 access_map_const_iterator end = parcel->mAccessList.end(); 2626 access_map_const_iterator end = parcel->mAccessList.end();
@@ -2712,9 +2688,9 @@ void LLPanelLandAccess::refresh()
2712 else 2688 else
2713 { 2689 {
2714 mCheckGroup->set(FALSE); 2690 mCheckGroup->set(FALSE);
2715 mCheckGroup->setLabel("Group:"); 2691 mCheckGroup->setLabelArg( "[GROUP]", LLString::null );
2716 mCheckAccess->set(FALSE); 2692 mCheckAccess->set(FALSE);
2717 mCheckAccess->setLabel("Avatars:"); 2693 mCheckAccess->setLabelArg( "[LISTED]", llformat("%d",0));
2718 mBtnAddAccess->setEnabled(FALSE); 2694 mBtnAddAccess->setEnabled(FALSE);
2719 mBtnRemoveAccess->setEnabled(FALSE); 2695 mBtnRemoveAccess->setEnabled(FALSE);
2720 mSpinPrice->set((F32)PARCEL_PASS_PRICE_DEFAULT); 2696 mSpinPrice->set((F32)PARCEL_PASS_PRICE_DEFAULT);
@@ -2736,9 +2712,7 @@ void LLPanelLandAccess::refreshNames()
2736 { 2712 {
2737 gCacheName->getGroupName(parcel->getGroupID(), group_name); 2713 gCacheName->getGroupName(parcel->getGroupID(), group_name);
2738 } 2714 }
2739 char label[MAX_STRING]; /*Flawfinder: ignore*/ 2715 mCheckGroup->setLabelArg("[GROUP]", LLString(group_name));
2740 snprintf(label, sizeof(label), "Group: %s", group_name); /* Flawfinder: ignore */
2741 mCheckGroup->setLabel(label);
2742} 2716}
2743 2717
2744 2718
@@ -2904,18 +2878,14 @@ void LLPanelLandBan::refresh()
2904 2878
2905 if (parcel) 2879 if (parcel)
2906 { 2880 {
2907 char label[256]; /*Flawfinder: ignore*/
2908
2909 // Display options 2881 // Display options
2910 2882
2911 S32 count = parcel->mBanList.size(); 2883 S32 count = parcel->mBanList.size();
2912 2884
2913 BOOL use_ban = parcel->getParcelFlag(PF_USE_BAN_LIST); 2885 BOOL use_ban = parcel->getParcelFlag(PF_USE_BAN_LIST);
2914 mCheck->set( use_ban ); 2886 mCheck->set( use_ban );
2915 2887 mCheck->setLabelArg( "[LISTED]", llformat("%d",count));
2916 snprintf(label, sizeof(label), "Ban these avatars: (%d listed, %d max)", /* Flawfinder: ignore */ 2888 mCheck->setLabelArg( "[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
2917 count, PARCEL_MAX_ACCESS_LIST);
2918 mCheck->setLabel( label );
2919 2889
2920 access_map_const_iterator cit = parcel->mBanList.begin(); 2890 access_map_const_iterator cit = parcel->mBanList.begin();
2921 access_map_const_iterator end = parcel->mBanList.end(); 2891 access_map_const_iterator end = parcel->mBanList.end();
@@ -2994,7 +2964,7 @@ void LLPanelLandBan::refresh()
2994 else 2964 else
2995 { 2965 {
2996 mCheck->set(FALSE); 2966 mCheck->set(FALSE);
2997 mCheck->setLabel("Ban these avatars:"); 2967 mCheck->setLabelArg( "[LISTED]", llformat("%d",0));
2998 mCheck->setEnabled(FALSE); 2968 mCheck->setEnabled(FALSE);
2999 mBtnAdd->setEnabled(FALSE); 2969 mBtnAdd->setEnabled(FALSE);
3000 mBtnRemove->setEnabled(FALSE); 2970 mBtnRemove->setEnabled(FALSE);
@@ -3088,82 +3058,6 @@ void LLPanelLandBan::onClickRemove(void* data)
3088} 3058}
3089 3059
3090//--------------------------------------------------------------------------- 3060//---------------------------------------------------------------------------
3091// LLPanelLandRenters
3092//---------------------------------------------------------------------------
3093LLPanelLandRenters::LLPanelLandRenters(LLParcelSelectionHandle& parcel)
3094: LLPanel("landrenters", LLRect(0,500,500,0)), mParcel(parcel)
3095{
3096 const S32 BTN_WIDTH = 64;
3097
3098 S32 x = LEFT;
3099 S32 y = mRect.getHeight() - VPAD;
3100
3101 LLCheckBoxCtrl* check = NULL;
3102 LLButton* btn = NULL;
3103 LLNameListCtrl* list = NULL;
3104
3105 check = new LLCheckBoxCtrl("RentersCheck",
3106 LLRect(RULER0, y, RIGHT, y-LINE),
3107 "Rent space to these avatars:");
3108 addChild(check);
3109 mCheckRenters = check;
3110
3111 y -= VPAD + LINE;
3112
3113 const S32 ITEMS = 5;
3114 const BOOL NO_MULTIPLE_SELECT = FALSE;
3115
3116 list = new LLNameListCtrl("RentersList",
3117 LLRect(RULER05, y, RIGHT, y-LINE*ITEMS),
3118 NULL, NULL,
3119 NO_MULTIPLE_SELECT);
3120 list->addSimpleItem("foo tester");
3121 list->addSimpleItem("bar tester");
3122 list->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
3123 addChild(list);
3124 mListRenters = list;
3125
3126 y -= VPAD + LINE*ITEMS;
3127
3128 x = RULER05;
3129 btn = new LLButton("Add...",
3130 LLRect(x, y, x+BTN_WIDTH, y-LINE),
3131 "",
3132 onClickAdd, this);
3133 btn->setFont( LLFontGL::sSansSerifSmall );
3134 btn->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
3135 addChild(btn);
3136 mBtnAddRenter = btn;
3137
3138 x += HPAD + BTN_WIDTH;
3139
3140 btn = new LLButton("Remove",
3141 LLRect(x, y, x+BTN_WIDTH, y-LINE),
3142 "",
3143 onClickRemove, this);
3144 btn->setFont( LLFontGL::sSansSerifSmall );
3145 btn->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
3146 addChild(btn);
3147 mBtnRemoveRenter = btn;
3148}
3149
3150LLPanelLandRenters::~LLPanelLandRenters()
3151{ }
3152
3153void LLPanelLandRenters::refresh()
3154{ }
3155
3156// static
3157void LLPanelLandRenters::onClickAdd(void*)
3158{
3159}
3160
3161// static
3162void LLPanelLandRenters::onClickRemove(void*)
3163{
3164}
3165
3166//---------------------------------------------------------------------------
3167// LLPanelLandCovenant 3061// LLPanelLandCovenant
3168//--------------------------------------------------------------------------- 3062//---------------------------------------------------------------------------
3169LLPanelLandCovenant::LLPanelLandCovenant(LLParcelSelectionHandle& parcel) 3063LLPanelLandCovenant::LLPanelLandCovenant(LLParcelSelectionHandle& parcel)