aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:54 -0500
committerJacek Antonelli2008-08-15 23:44:54 -0500
commitb2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch)
tree3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/newview/llfloaterland.cpp
parentSecond Life viewer sources 1.14.0.1 (diff)
downloadmeta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2
meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz
Second Life viewer sources 1.15.0.2
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterland.cpp105
1 files changed, 39 insertions, 66 deletions
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp
index 6bb6aff..9ff44f4 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -411,8 +412,8 @@ BOOL LLPanelLandGeneral::postBuild()
411 mBtnDeedToGroup->setClickedCallback(onClickDeed, this); 412 mBtnDeedToGroup->setClickedCallback(onClickDeed, this);
412 413
413 414
414 mCheckContributeWithDeed = LLUICtrlFactory::getCheckBoxByName(this, "check contib"); 415 mCheckContributeWithDeed = LLUICtrlFactory::getCheckBoxByName(this, "check contrib");
415 childSetCommitCallback("check contib", onCommitAny, this); 416 childSetCommitCallback("check contrib", onCommitAny, this);
416 417
417 418
418 419
@@ -589,7 +590,7 @@ void LLPanelLandGeneral::refresh()
589 else if(parcel->getAuctionID()) 590 else if(parcel->getAuctionID())
590 { 591 {
591 char auction_str[MAX_STRING]; /*Flawfinder: ignore*/ 592 char auction_str[MAX_STRING]; /*Flawfinder: ignore*/
592 snprintf(auction_str, sizeof(auction_str), "Auction ID: %u", parcel->getAuctionID()); /*Flawfinder: ignore*/ 593 snprintf(auction_str, sizeof(auction_str), "Auction ID: %u", parcel->getAuctionID()); /* Flawfinder: ignore */
593 mTextSalePending->setText(auction_str); 594 mTextSalePending->setText(auction_str);
594 mTextSalePending->setEnabled(TRUE); 595 mTextSalePending->setEnabled(TRUE);
595 } 596 }
@@ -729,13 +730,13 @@ void LLPanelLandGeneral::refresh()
729 &dwell); 730 &dwell);
730 731
731 // Area 732 // Area
732 snprintf(price, sizeof(price), "%d sq. m.", area); /*Flawfinder: ignore*/ 733 snprintf(price, sizeof(price), "%d sq. m.", area); /* Flawfinder: ignore */
733 label = AREA; 734 label = AREA;
734 735
735 mTextPriceLabel->setText(label); 736 mTextPriceLabel->setText(label);
736 mTextPrice->setText(price); 737 mTextPrice->setText(price);
737 738
738 snprintf(price, sizeof(price), "%.0f", dwell); /*Flawfinder: ignore*/ 739 snprintf(price, sizeof(price), "%.0f", dwell); /* Flawfinder: ignore */
739 mTextDwell->setText(price); 740 mTextDwell->setText(price);
740 741
741 if(region_owner) 742 if(region_owner)
@@ -780,7 +781,7 @@ void LLPanelLandGeneral::refreshNames()
780 char owner_first[MAX_STRING]; /*Flawfinder: ignore*/ 781 char owner_first[MAX_STRING]; /*Flawfinder: ignore*/
781 char owner_last[MAX_STRING]; /*Flawfinder: ignore*/ 782 char owner_last[MAX_STRING]; /*Flawfinder: ignore*/
782 gCacheName->getName(parcel->getOwnerID(), owner_first, owner_last); 783 gCacheName->getName(parcel->getOwnerID(), owner_first, owner_last);
783 snprintf(buffer, sizeof(buffer), "%s %s", owner_first, owner_last); /*Flawfinder: ignore*/ 784 snprintf(buffer, sizeof(buffer), "%s %s", owner_first, owner_last); /* Flawfinder: ignore */
784 } 785 }
785 786
786 if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus()) 787 if(LLParcel::OS_LEASE_PENDING == parcel->getOwnershipStatus())
@@ -812,10 +813,6 @@ void LLPanelLandGeneral::refreshNames()
812 813
813 mSaleInfoForSale2->setTextArg("[BUYER]", name); 814 mSaleInfoForSale2->setTextArg("[BUYER]", name);
814 } 815 }
815 else if(parcel->getReservedForNewbie())
816 {
817 mSaleInfoForSale2->setTextArg("[BUYER]", childGetText("new users only"));
818 }
819 else 816 else
820 { 817 {
821 mSaleInfoForSale2->setTextArg("[BUYER]", childGetText("anyone")); 818 mSaleInfoForSale2->setTextArg("[BUYER]", childGetText("anyone"));
@@ -941,8 +938,8 @@ void LLPanelLandGeneral::onClickBuyPass(void* data)
941 F32 pass_hours = parcel->getPassHours(); 938 F32 pass_hours = parcel->getPassHours();
942 939
943 char cost[256], time[256]; /*Flawfinder: ignore*/ 940 char cost[256], time[256]; /*Flawfinder: ignore*/
944 snprintf(cost, sizeof(cost), "%d", pass_price); /*Flawfinder: ignore*/ 941 snprintf(cost, sizeof(cost), "%d", pass_price); /* Flawfinder: ignore */
945 snprintf(time, sizeof(time), "%.2f", pass_hours); /*Flawfinder: ignore*/ 942 snprintf(time, sizeof(time), "%.2f", pass_hours); /* Flawfinder: ignore */
946 943
947 LLStringBase<char>::format_map_t args; 944 LLStringBase<char>::format_map_t args;
948 args["[COST]"] = cost; 945 args["[COST]"] = cost;
@@ -1054,65 +1051,39 @@ BOOL LLPanelLandObjects::postBuild()
1054 1051
1055 mFirstReply = TRUE; 1052 mFirstReply = TRUE;
1056 mParcelObjectBonus = LLUICtrlFactory::getTextBoxByName(this, "Simulator Primitive Bonus Factor: 1.00"); 1053 mParcelObjectBonus = LLUICtrlFactory::getTextBoxByName(this, "Simulator Primitive Bonus Factor: 1.00");
1057
1058 mSWTotalObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Simulator primitive usage:");
1059 mSWTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "0 out of 0 available"); 1054 mSWTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "0 out of 0 available");
1060
1061 mObjectContributionLabel = LLUICtrlFactory::getTextBoxByName(this, "Primitives parcel supports:");
1062 mObjectContribution = LLUICtrlFactory::getTextBoxByName(this, "object_contrib_text"); 1055 mObjectContribution = LLUICtrlFactory::getTextBoxByName(this, "object_contrib_text");
1063
1064
1065 mTotalObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Primitives on parcel:");
1066 mTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "total_objects_text"); 1056 mTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "total_objects_text");
1067
1068
1069 mOwnerObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Owned by parcel owner:");
1070 mOwnerObjects = LLUICtrlFactory::getTextBoxByName(this, "owner_objects_text"); 1057 mOwnerObjects = LLUICtrlFactory::getTextBoxByName(this, "owner_objects_text");
1071
1072 1058
1073 mBtnShowOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ShowOwner"); 1059 mBtnShowOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ShowOwner");
1074 mBtnShowOwnerObjects->setClickedCallback(onClickShowOwnerObjects, this); 1060 mBtnShowOwnerObjects->setClickedCallback(onClickShowOwnerObjects, this);
1075 1061
1076 mBtnReturnOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOwner..."); 1062 mBtnReturnOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOwner...");
1077 mBtnReturnOwnerObjects->setClickedCallback(onClickReturnOwnerObjects, this); 1063 mBtnReturnOwnerObjects->setClickedCallback(onClickReturnOwnerObjects, this);
1078
1079 1064
1080 mGroupObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Set to group:");
1081 mGroupObjects = LLUICtrlFactory::getTextBoxByName(this, "group_objects_text"); 1065 mGroupObjects = LLUICtrlFactory::getTextBoxByName(this, "group_objects_text");
1082
1083
1084 mBtnShowGroupObjects = LLUICtrlFactory::getButtonByName(this, "ShowGroup"); 1066 mBtnShowGroupObjects = LLUICtrlFactory::getButtonByName(this, "ShowGroup");
1085 mBtnShowGroupObjects->setClickedCallback(onClickShowGroupObjects, this); 1067 mBtnShowGroupObjects->setClickedCallback(onClickShowGroupObjects, this);
1086 1068
1087 mBtnReturnGroupObjects = LLUICtrlFactory::getButtonByName(this, "ReturnGroup..."); 1069 mBtnReturnGroupObjects = LLUICtrlFactory::getButtonByName(this, "ReturnGroup...");
1088 mBtnReturnGroupObjects->setClickedCallback(onClickReturnGroupObjects, this); 1070 mBtnReturnGroupObjects->setClickedCallback(onClickReturnGroupObjects, this);
1089
1090 1071
1091 mOtherObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Owned by others:");
1092 mOtherObjects = LLUICtrlFactory::getTextBoxByName(this, "other_objects_text"); 1072 mOtherObjects = LLUICtrlFactory::getTextBoxByName(this, "other_objects_text");
1093
1094 mBtnShowOtherObjects = LLUICtrlFactory::getButtonByName(this, "ShowOther"); 1073 mBtnShowOtherObjects = LLUICtrlFactory::getButtonByName(this, "ShowOther");
1095 mBtnShowOtherObjects->setClickedCallback(onClickShowOtherObjects, this); 1074 mBtnShowOtherObjects->setClickedCallback(onClickShowOtherObjects, this);
1096 1075
1097 mBtnReturnOtherObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOther..."); 1076 mBtnReturnOtherObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOther...");
1098 mBtnReturnOtherObjects->setClickedCallback(onClickReturnOtherObjects, this); 1077 mBtnReturnOtherObjects->setClickedCallback(onClickReturnOtherObjects, this);
1099
1100 mSelectedObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Selected / sat upon:");
1101 mSelectedObjects = LLUICtrlFactory::getTextBoxByName(this, "selected_objects_text");
1102 1078
1103 mCleanOtherObjectsLabel = LLUICtrlFactory::getTextBoxByName(this, "Autoreturn other resident's objects (minutes, 0 for off):"); 1079 mSelectedObjects = LLUICtrlFactory::getTextBoxByName(this, "selected_objects_text");
1104
1105 mCleanOtherObjectsTime = LLUICtrlFactory::getLineEditorByName(this, "clean other time"); 1080 mCleanOtherObjectsTime = LLUICtrlFactory::getLineEditorByName(this, "clean other time");
1106 mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus); 1081 mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus);
1107 childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32); 1082 childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32);
1108 childSetUserData("clean other time", this); 1083 childSetUserData("clean other time", this);
1109 1084
1110 mOwnerListText = LLUICtrlFactory::getTextBoxByName(this, "Object Owners:");
1111
1112
1113 mBtnRefresh = LLUICtrlFactory::getButtonByName(this, "Refresh List"); 1085 mBtnRefresh = LLUICtrlFactory::getButtonByName(this, "Refresh List");
1114 mBtnRefresh->setClickedCallback(onClickRefresh, this); 1086 mBtnRefresh->setClickedCallback(onClickRefresh, this);
1115
1116 1087
1117 mBtnReturnOwnerList = LLUICtrlFactory::getButtonByName(this, "Return objects..."); 1088 mBtnReturnOwnerList = LLUICtrlFactory::getButtonByName(this, "Return objects...");
1118 mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this); 1089 mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this);
@@ -1266,7 +1237,7 @@ void LLPanelLandObjects::refresh()
1266 1237
1267 if (parcel_object_bonus != 1.0f) 1238 if (parcel_object_bonus != 1.0f)
1268 { 1239 {
1269 snprintf(count, sizeof(count), "Region Object Bonus Factor: %.2f", /*Flawfinder: ignore*/ 1240 snprintf(count, sizeof(count), "Region Object Bonus Factor: %.2f", /* Flawfinder: ignore */
1270 parcel_object_bonus); 1241 parcel_object_bonus);
1271 mParcelObjectBonus->setText(count); 1242 mParcelObjectBonus->setText(count);
1272 } 1243 }
@@ -1277,35 +1248,35 @@ void LLPanelLandObjects::refresh()
1277 1248
1278 if (sw_total > sw_max) 1249 if (sw_total > sw_max)
1279 { 1250 {
1280 snprintf(count, sizeof(count), "%d out of %d (%d will be deleted)", /*Flawfinder: ignore*/ 1251 snprintf(count, sizeof(count), "%d out of %d (%d will be deleted)", /* Flawfinder: ignore */
1281 sw_total, sw_max, sw_total - sw_max); 1252 sw_total, sw_max, sw_total - sw_max);
1282 } 1253 }
1283 else 1254 else
1284 { 1255 {
1285 snprintf(count, sizeof(count), "%d out of %d (%d available)", /*Flawfinder: ignore*/ 1256 snprintf(count, sizeof(count), "%d out of %d (%d available)", /* Flawfinder: ignore */
1286 sw_total, sw_max, sw_max - sw_total); 1257 sw_total, sw_max, sw_max - sw_total);
1287 } 1258 }
1288 mSWTotalObjects->setText(count); 1259 mSWTotalObjects->setText(count);
1289 1260
1290 snprintf(count, sizeof(count), "%d", max); /*Flawfinder: ignore*/ 1261 snprintf(count, sizeof(count), "%d", max); /* Flawfinder: ignore */
1291 mObjectContribution->setText(count); 1262 mObjectContribution->setText(count);
1292 1263
1293 snprintf(count, sizeof(count), "%d", total); /*Flawfinder: ignore*/ 1264 snprintf(count, sizeof(count), "%d", total); /* Flawfinder: ignore */
1294 mTotalObjects->setText(count); 1265 mTotalObjects->setText(count);
1295 1266
1296 snprintf(count, sizeof(count), "%d", owned); /*Flawfinder: ignore*/ 1267 snprintf(count, sizeof(count), "%d", owned); /* Flawfinder: ignore */
1297 mOwnerObjects->setText(count); 1268 mOwnerObjects->setText(count);
1298 1269
1299 snprintf(count, sizeof(count), "%d", group); /*Flawfinder: ignore*/ 1270 snprintf(count, sizeof(count), "%d", group); /* Flawfinder: ignore */
1300 mGroupObjects->setText(count); 1271 mGroupObjects->setText(count);
1301 1272
1302 snprintf(count, sizeof(count), "%d", other); /*Flawfinder: ignore*/ 1273 snprintf(count, sizeof(count), "%d", other); /* Flawfinder: ignore */
1303 mOtherObjects->setText(count); 1274 mOtherObjects->setText(count);
1304 1275
1305 snprintf(count, sizeof(count), "%d", selected); /*Flawfinder: ignore*/ 1276 snprintf(count, sizeof(count), "%d", selected); /* Flawfinder: ignore */
1306 mSelectedObjects->setText(count); 1277 mSelectedObjects->setText(count);
1307 1278
1308 snprintf(count, sizeof(count), "%d", mOtherTime); /*Flawfinder: ignore*/ 1279 snprintf(count, sizeof(count), "%d", mOtherTime); /* Flawfinder: ignore */
1309 mCleanOtherObjectsTime->setText(count); 1280 mCleanOtherObjectsTime->setText(count);
1310 1281
1311 BOOL can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED); 1282 BOOL can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED);
@@ -1636,7 +1607,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
1636 // Placeholder for name. 1607 // Placeholder for name.
1637 row->addColumn("", FONT, self->mColWidth[2]); 1608 row->addColumn("", FONT, self->mColWidth[2]);
1638 1609
1639 snprintf(object_count_str, sizeof(object_count_str), "%d", object_count); /*Flawfinder: ignore*/ 1610 snprintf(object_count_str, sizeof(object_count_str), "%d", object_count); /* Flawfinder: ignore */
1640 row->addColumn(object_count_str, FONT, self->mColWidth[3]); 1611 row->addColumn(object_count_str, FONT, self->mColWidth[3]);
1641 1612
1642 if (is_group_owned) 1613 if (is_group_owned)
@@ -1884,7 +1855,7 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
1884} 1855}
1885 1856
1886// static 1857// static
1887void LLPanelLandObjects::onLostFocus(LLLineEditor *caller, void* user_data) 1858void LLPanelLandObjects::onLostFocus(LLUICtrl *caller, void* user_data)
1888{ 1859{
1889 LLPanelLandObjects *lop = (LLPanelLandObjects *)user_data; 1860 LLPanelLandObjects *lop = (LLPanelLandObjects *)user_data;
1890 LLParcel* parcel = lop->mParcel->getParcel(); 1861 LLParcel* parcel = lop->mParcel->getParcel();
@@ -2194,7 +2165,7 @@ void LLPanelLandOptions::refresh()
2194 else 2165 else
2195 { 2166 {
2196 char buffer[256]; /*Flawfinder: ignore*/ 2167 char buffer[256]; /*Flawfinder: ignore*/
2197 snprintf(buffer, sizeof(buffer), "Landing Point: %d, %d, %d", /*Flawfinder: ignore*/ 2168 snprintf(buffer, sizeof(buffer), "Landing Point: %d, %d, %d", /* Flawfinder: ignore */
2198 llround(pos.mV[VX]), 2169 llround(pos.mV[VX]),
2199 llround(pos.mV[VY]), 2170 llround(pos.mV[VY]),
2200 llround(pos.mV[VZ])); 2171 llround(pos.mV[VZ]));
@@ -2534,6 +2505,7 @@ BOOL LLPanelLandAccess::postBuild()
2534 childSetCommitCallback("AccessCheck", onCommitAny, this); 2505 childSetCommitCallback("AccessCheck", onCommitAny, this);
2535 2506
2536 mListAccess = LLUICtrlFactory::getNameListByName(this, "AccessList"); 2507 mListAccess = LLUICtrlFactory::getNameListByName(this, "AccessList");
2508 mListAccess->sortByColumn(0, TRUE); // ascending
2537 2509
2538 mBtnAddAccess = LLUICtrlFactory::getButtonByName(this, "Add..."); 2510 mBtnAddAccess = LLUICtrlFactory::getButtonByName(this, "Add...");
2539 2511
@@ -2578,14 +2550,14 @@ void LLPanelLandAccess::refresh()
2578 2550
2579 char group_name[MAX_STRING]; /*Flawfinder: ignore*/ 2551 char group_name[MAX_STRING]; /*Flawfinder: ignore*/
2580 gCacheName->getGroupName(parcel->getGroupID(), group_name); 2552 gCacheName->getGroupName(parcel->getGroupID(), group_name);
2581 snprintf(label, sizeof(label), "Group: %s", group_name); /*Flawfinder: ignore*/ 2553 snprintf(label, sizeof(label), "Group: %s", group_name); /* Flawfinder: ignore */
2582 mCheckGroup->setLabel( label ); 2554 mCheckGroup->setLabel( label );
2583 2555
2584 S32 count = parcel->mAccessList.size(); 2556 S32 count = parcel->mAccessList.size();
2585 2557
2586 BOOL use_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST); 2558 BOOL use_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
2587 mCheckAccess->set( use_list ); 2559 mCheckAccess->set( use_list );
2588 snprintf(label, sizeof(label), "Avatars: (%d listed, %d max)", /*Flawfinder: ignore*/ 2560 snprintf(label, sizeof(label), "Avatars: (%d listed, %d max)", /* Flawfinder: ignore */
2589 count, PARCEL_MAX_ACCESS_LIST); 2561 count, PARCEL_MAX_ACCESS_LIST);
2590 mCheckAccess->setLabel( label ); 2562 mCheckAccess->setLabel( label );
2591 2563
@@ -2605,7 +2577,7 @@ void LLPanelLandAccess::refresh()
2605 if (seconds >= 120) 2577 if (seconds >= 120)
2606 { 2578 {
2607 char buf[30]; /*Flawfinder: ignore*/ 2579 char buf[30]; /*Flawfinder: ignore*/
2608 snprintf(buf, sizeof(buf), "%d minutes", (seconds/60)); /*Flawfinder: ignore*/ 2580 snprintf(buf, sizeof(buf), "%d minutes", (seconds/60)); /* Flawfinder: ignore */
2609 suffix.append(buf); 2581 suffix.append(buf);
2610 } 2582 }
2611 else if (seconds >= 60) 2583 else if (seconds >= 60)
@@ -2615,14 +2587,14 @@ void LLPanelLandAccess::refresh()
2615 else 2587 else
2616 { 2588 {
2617 char buf[30]; /*Flawfinder: ignore*/ 2589 char buf[30]; /*Flawfinder: ignore*/
2618 snprintf(buf, sizeof(buf), "%d seconds", seconds); /*Flawfinder: ignore*/ 2590 snprintf(buf, sizeof(buf), "%d seconds", seconds); /* Flawfinder: ignore */
2619 suffix.append(buf); 2591 suffix.append(buf);
2620 } 2592 }
2621 suffix.append(" remaining)"); 2593 suffix.append(" remaining)");
2622 } 2594 }
2623 mListAccess->addNameItem(entry.mID, ADD_BOTTOM, TRUE, suffix); 2595 mListAccess->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix);
2624 } 2596 }
2625 2597
2626 BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED); 2598 BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
2627 2599
2628 BOOL enable_add = can_manage_allowed && (count < PARCEL_MAX_ACCESS_LIST); 2600 BOOL enable_add = can_manage_allowed && (count < PARCEL_MAX_ACCESS_LIST);
@@ -2680,7 +2652,7 @@ void LLPanelLandAccess::refreshNames()
2680 gCacheName->getGroupName(parcel->getGroupID(), group_name); 2652 gCacheName->getGroupName(parcel->getGroupID(), group_name);
2681 } 2653 }
2682 char label[MAX_STRING]; /*Flawfinder: ignore*/ 2654 char label[MAX_STRING]; /*Flawfinder: ignore*/
2683 snprintf(label, sizeof(label), "Group: %s", group_name); /*Flawfinder: ignore*/ 2655 snprintf(label, sizeof(label), "Group: %s", group_name); /* Flawfinder: ignore */
2684 mCheckGroup->setLabel(label); 2656 mCheckGroup->setLabel(label);
2685} 2657}
2686 2658
@@ -2812,6 +2784,7 @@ BOOL LLPanelLandBan::postBuild()
2812 childSetCommitCallback("LandBanCheck", onCommitAny, this); 2784 childSetCommitCallback("LandBanCheck", onCommitAny, this);
2813 2785
2814 mList = LLUICtrlFactory::getNameListByName(this, "LandBanList"); 2786 mList = LLUICtrlFactory::getNameListByName(this, "LandBanList");
2787 mList->sortByColumn(0, TRUE); // ascending
2815 2788
2816 mBtnAdd = LLUICtrlFactory::getButtonByName(this, "Add..."); 2789 mBtnAdd = LLUICtrlFactory::getButtonByName(this, "Add...");
2817 2790
@@ -2855,7 +2828,7 @@ void LLPanelLandBan::refresh()
2855 BOOL use_ban = parcel->getParcelFlag(PF_USE_BAN_LIST); 2828 BOOL use_ban = parcel->getParcelFlag(PF_USE_BAN_LIST);
2856 mCheck->set( use_ban ); 2829 mCheck->set( use_ban );
2857 2830
2858 snprintf(label, sizeof(label), "Ban these avatars: (%d listed, %d max)", /*Flawfinder: ignore*/ 2831 snprintf(label, sizeof(label), "Ban these avatars: (%d listed, %d max)", /* Flawfinder: ignore */
2859 count, PARCEL_MAX_ACCESS_LIST); 2832 count, PARCEL_MAX_ACCESS_LIST);
2860 mCheck->setLabel( label ); 2833 mCheck->setLabel( label );
2861 2834
@@ -2874,7 +2847,7 @@ void LLPanelLandBan::refresh()
2874 if (seconds >= 120) 2847 if (seconds >= 120)
2875 { 2848 {
2876 char buf[30]; /*Flawfinder: ignore*/ 2849 char buf[30]; /*Flawfinder: ignore*/
2877 snprintf(buf, sizeof(buf), "%d minutes", (seconds/60)); /*Flawfinder: ignore*/ 2850 snprintf(buf, sizeof(buf), "%d minutes", (seconds/60)); /* Flawfinder: ignore */
2878 suffix.append(buf); 2851 suffix.append(buf);
2879 } 2852 }
2880 else if (seconds >= 60) 2853 else if (seconds >= 60)
@@ -2884,12 +2857,12 @@ void LLPanelLandBan::refresh()
2884 else 2857 else
2885 { 2858 {
2886 char buf[30]; /*Flawfinder: ignore*/ 2859 char buf[30]; /*Flawfinder: ignore*/
2887 snprintf(buf, sizeof(buf), "%d seconds", seconds); /*Flawfinder: ignore*/ 2860 snprintf(buf, sizeof(buf), "%d seconds", seconds); /* Flawfinder: ignore */
2888 suffix.append(buf); 2861 suffix.append(buf);
2889 } 2862 }
2890 suffix.append(" remaining)"); 2863 suffix.append(" remaining)");
2891 } 2864 }
2892 mList->addNameItem(entry.mID, ADD_BOTTOM, TRUE, suffix); 2865 mList->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix);
2893 } 2866 }
2894 2867
2895 BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED); 2868 BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED);