aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.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/llfloaterland.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/llfloaterland.cpp')
-rw-r--r--linden/indra/newview/llfloaterland.cpp459
1 files changed, 283 insertions, 176 deletions
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp
index e1d08da..94a8345 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.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,
@@ -40,6 +41,7 @@
40#include "llfocusmgr.h" 41#include "llfocusmgr.h"
41#include "llparcel.h" 42#include "llparcel.h"
42#include "message.h" 43#include "message.h"
44#include "lluserauth.h"
43 45
44#include "llagent.h" 46#include "llagent.h"
45#include "llfloateravatarpicker.h" 47#include "llfloateravatarpicker.h"
@@ -64,6 +66,7 @@
64#include "lltexturectrl.h" 66#include "lltexturectrl.h"
65#include "lluiconstants.h" 67#include "lluiconstants.h"
66#include "lluictrlfactory.h" 68#include "lluictrlfactory.h"
69#include "llviewerimagelist.h" // LLUIImageList
67#include "llviewermessage.h" 70#include "llviewermessage.h"
68#include "llviewerparcelmgr.h" 71#include "llviewerparcelmgr.h"
69#include "llviewerregion.h" 72#include "llviewerregion.h"
@@ -85,8 +88,6 @@ static const BOOL BUY_PERSONAL_LAND = FALSE;
85LLParcelSelectionObserver* LLFloaterLand::sObserver = NULL; 88LLParcelSelectionObserver* LLFloaterLand::sObserver = NULL;
86S32 LLFloaterLand::sLastTab = 0; 89S32 LLFloaterLand::sLastTab = 0;
87 90
88LLHandle<LLFloater> LLPanelLandGeneral::sBuyPassDialogHandle;
89
90// Local classes 91// Local classes
91class LLParcelSelectionObserver : public LLParcelObserver 92class LLParcelSelectionObserver : public LLParcelObserver
92{ 93{
@@ -194,8 +195,6 @@ void LLFloaterLand::onClose(bool app_quitting)
194LLFloaterLand::LLFloaterLand(const LLSD& seed) 195LLFloaterLand::LLFloaterLand(const LLSD& seed)
195: LLFloater(std::string("floaterland"), std::string("FloaterLandRect5"), std::string("About Land")) 196: LLFloater(std::string("floaterland"), std::string("FloaterLandRect5"), std::string("About Land"))
196{ 197{
197
198
199 LLCallbackMap::map_t factory_map; 198 LLCallbackMap::map_t factory_map;
200 factory_map["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this); 199 factory_map["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
201 200
@@ -306,7 +305,6 @@ LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
306 305
307BOOL LLPanelLandGeneral::postBuild() 306BOOL LLPanelLandGeneral::postBuild()
308{ 307{
309
310 mEditName = getChild<LLLineEditor>("Name"); 308 mEditName = getChild<LLLineEditor>("Name");
311 mEditName->setCommitCallback(onCommitAny); 309 mEditName->setCommitCallback(onCommitAny);
312 childSetPrevalidate("Name", LLLineEditor::prevalidatePrintableNotPipe); 310 childSetPrevalidate("Name", LLLineEditor::prevalidatePrintableNotPipe);
@@ -322,7 +320,9 @@ BOOL LLPanelLandGeneral::postBuild()
322 mTextSalePending = getChild<LLTextBox>("SalePending"); 320 mTextSalePending = getChild<LLTextBox>("SalePending");
323 mTextOwnerLabel = getChild<LLTextBox>("Owner:"); 321 mTextOwnerLabel = getChild<LLTextBox>("Owner:");
324 mTextOwner = getChild<LLTextBox>("OwnerText"); 322 mTextOwner = getChild<LLTextBox>("OwnerText");
325 323
324 mContentRating = getChild<LLTextBox>("ContentRatingText");
325 mLandType = getChild<LLTextBox>("LandTypeText");
326 326
327 mBtnProfile = getChild<LLButton>("Profile..."); 327 mBtnProfile = getChild<LLButton>("Profile...");
328 mBtnProfile->setClickedCallback(onClickProfile, this); 328 mBtnProfile->setClickedCallback(onClickProfile, this);
@@ -336,7 +336,6 @@ BOOL LLPanelLandGeneral::postBuild()
336 mBtnSetGroup->setClickedCallback(onClickSetGroup, this); 336 mBtnSetGroup->setClickedCallback(onClickSetGroup, this);
337 337
338 338
339
340 mCheckDeedToGroup = getChild<LLCheckBoxCtrl>( "check deed"); 339 mCheckDeedToGroup = getChild<LLCheckBoxCtrl>( "check deed");
341 childSetCommitCallback("check deed", onCommitAny, this); 340 childSetCommitCallback("check deed", onCommitAny, this);
342 341
@@ -449,6 +448,8 @@ void LLPanelLandGeneral::refresh()
449 mCheckContributeWithDeed->setEnabled(FALSE); 448 mCheckContributeWithDeed->setEnabled(FALSE);
450 449
451 mTextOwner->setText(LLStringUtil::null); 450 mTextOwner->setText(LLStringUtil::null);
451 mContentRating->setText(LLStringUtil::null);
452 mLandType->setText(LLStringUtil::null);
452 mBtnProfile->setLabel(getString("profile_text")); 453 mBtnProfile->setLabel(getString("profile_text"));
453 mBtnProfile->setEnabled(FALSE); 454 mBtnProfile->setEnabled(FALSE);
454 455
@@ -483,6 +484,12 @@ void LLPanelLandGeneral::refresh()
483 { 484 {
484 region_xfer = TRUE; 485 region_xfer = TRUE;
485 } 486 }
487
488 if (regionp)
489 {
490 mContentRating->setText(regionp->getSimAccessString());
491 mLandType->setText(regionp->getSimProductName());
492 }
486 493
487 // estate owner/manager cannot edit other parts of the parcel 494 // estate owner/manager cannot edit other parts of the parcel
488 BOOL estate_manager_sellable = !parcel->getAuctionID() 495 BOOL estate_manager_sellable = !parcel->getAuctionID()
@@ -604,6 +611,25 @@ void LLPanelLandGeneral::refresh()
604 mBtnSellLand->setVisible(FALSE); 611 mBtnSellLand->setVisible(FALSE);
605 mBtnStopSellLand->setVisible(FALSE); 612 mBtnStopSellLand->setVisible(FALSE);
606 613
614 // show pricing information
615 S32 area;
616 S32 claim_price;
617 S32 rent_price;
618 F32 dwell;
619 LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
620 &claim_price,
621 &rent_price,
622 &for_sale,
623 &dwell);
624
625 // Area
626 LLUIString price = getString("area_size_text");
627 price.setArg("[AREA]", llformat("%d",area));
628 mTextPriceLabel->setText(getString("area_text"));
629 mTextPrice->setText(price.getString());
630
631 mTextDwell->setText(llformat("%.0f", dwell));
632
607 if (for_sale) 633 if (for_sale)
608 { 634 {
609 mSaleInfoForSale1->setVisible(TRUE); 635 mSaleInfoForSale1->setVisible(TRUE);
@@ -619,7 +645,15 @@ void LLPanelLandGeneral::refresh()
619 mSaleInfoForSaleNoObjects->setVisible(TRUE); 645 mSaleInfoForSaleNoObjects->setVisible(TRUE);
620 } 646 }
621 mSaleInfoNotForSale->setVisible(FALSE); 647 mSaleInfoNotForSale->setVisible(FALSE);
648
649 F32 cost_per_sqm = 0.0f;
650 if (area > 0)
651 {
652 cost_per_sqm = (F32)parcel->getSalePrice() / (F32)area;
653 }
654
622 mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice())); 655 mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice()));
656 mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm));
623 if (can_be_sold) 657 if (can_be_sold)
624 { 658 {
625 mBtnStopSellLand->setVisible(TRUE); 659 mBtnStopSellLand->setVisible(TRUE);
@@ -645,25 +679,6 @@ void LLPanelLandGeneral::refresh()
645 mBtnBuyGroupLand->setEnabled( 679 mBtnBuyGroupLand->setEnabled(
646 LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true)); 680 LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true));
647 681
648 // show pricing information
649 S32 area;
650 S32 claim_price;
651 S32 rent_price;
652 F32 dwell;
653 LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
654 &claim_price,
655 &rent_price,
656 &for_sale,
657 &dwell);
658
659 // Area
660 LLUIString price = getString("area_size_text");
661 price.setArg("[AREA]", llformat("%d",area));
662 mTextPriceLabel->setText(getString("area_text"));
663 mTextPrice->setText(price.getString());
664
665 mTextDwell->setText(llformat("%.0f", dwell));
666
667 if(region_owner) 682 if(region_owner)
668 { 683 {
669 mBtnReclaimLand->setEnabled( 684 mBtnReclaimLand->setEnabled(
@@ -864,12 +879,12 @@ void LLPanelLandGeneral::onClickBuyPass(void* data)
864 cost = llformat("%d", pass_price); 879 cost = llformat("%d", pass_price);
865 time = llformat("%.2f", pass_hours); 880 time = llformat("%.2f", pass_hours);
866 881
867 LLStringUtil::format_map_t args; 882 LLSD args;
868 args["[COST]"] = cost; 883 args["COST"] = cost;
869 args["[PARCEL_NAME]"] = parcel_name; 884 args["PARCEL_NAME"] = parcel_name;
870 args["[TIME]"] = time; 885 args["TIME"] = time;
871 886
872 sBuyPassDialogHandle = gViewerWindow->alertXml("LandBuyPass", args, cbBuyPass)->getHandle(); 887 LLNotifications::instance().add("LandBuyPass", args, LLSD(), cbBuyPass);
873} 888}
874 889
875// static 890// static
@@ -881,7 +896,7 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
881 { 896 {
882 if(parcelp->getForSale()) 897 if(parcelp->getForSale())
883 { 898 {
884 gViewerWindow->alertXml("CannotStartAuctionAlreadForSale"); 899 LLNotifications::instance().add("CannotStartAuctionAlreadyForSale");
885 } 900 }
886 else 901 else
887 { 902 {
@@ -891,19 +906,15 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
891} 906}
892 907
893// static 908// static
894void LLPanelLandGeneral::cbBuyPass(S32 option, void* data) 909bool LLPanelLandGeneral::cbBuyPass(const LLSD& notification, const LLSD& response)
895{ 910{
911 S32 option = LLNotification::getSelectedOption(notification, response);
896 if (0 == option) 912 if (0 == option)
897 { 913 {
898 // User clicked OK 914 // User clicked OK
899 LLViewerParcelMgr::getInstance()->buyPass(); 915 LLViewerParcelMgr::getInstance()->buyPass();
900 } 916 }
901} 917 return false;
902
903//static
904BOOL LLPanelLandGeneral::buyPassDialogVisible()
905{
906 return sBuyPassDialogHandle.get() != NULL;
907} 918}
908 919
909// static 920// static
@@ -1241,28 +1252,27 @@ void send_return_objects_message(S32 parcel_local_id, S32 return_type,
1241 msg->sendReliable(region->getHost()); 1252 msg->sendReliable(region->getHost());
1242} 1253}
1243 1254
1244// static 1255bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, const LLSD& response)
1245void LLPanelLandObjects::callbackReturnOwnerObjects(S32 option, void* userdata)
1246{ 1256{
1247 LLPanelLandObjects *lop = (LLPanelLandObjects *)userdata; 1257 S32 option = LLNotification::getSelectedOption(notification, response);
1248 LLParcel *parcel = lop->mParcel->getParcel(); 1258 LLParcel *parcel = mParcel->getParcel();
1249 if (0 == option) 1259 if (0 == option)
1250 { 1260 {
1251 if (parcel) 1261 if (parcel)
1252 { 1262 {
1253 LLUUID owner_id = parcel->getOwnerID(); 1263 LLUUID owner_id = parcel->getOwnerID();
1254 LLStringUtil::format_map_t args; 1264 LLSD args;
1255 if (owner_id == gAgentID) 1265 if (owner_id == gAgentID)
1256 { 1266 {
1257 LLNotifyBox::showXml("OwnedObjectsReturned"); 1267 LLNotifications::instance().add("OwnedObjectsReturned");
1258 } 1268 }
1259 else 1269 else
1260 { 1270 {
1261 std::string first, last; 1271 std::string first, last;
1262 gCacheName->getName(owner_id, first, last); 1272 gCacheName->getName(owner_id, first, last);
1263 args["[FIRST]"] = first; 1273 args["FIRST"] = first;
1264 args["[LAST]"] = last; 1274 args["LAST"] = last;
1265 LLNotifyBox::showXml("OtherObjectsReturned", args); 1275 LLNotifications::instance().add("OtherObjectsReturned", args);
1266 } 1276 }
1267 send_return_objects_message(parcel->getLocalID(), RT_OWNER); 1277 send_return_objects_message(parcel->getLocalID(), RT_OWNER);
1268 } 1278 }
@@ -1270,81 +1280,82 @@ void LLPanelLandObjects::callbackReturnOwnerObjects(S32 option, void* userdata)
1270 1280
1271 LLSelectMgr::getInstance()->unhighlightAll(); 1281 LLSelectMgr::getInstance()->unhighlightAll();
1272 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); 1282 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1273 lop->refresh(); 1283 refresh();
1284 return false;
1274} 1285}
1275 1286
1276// static 1287bool LLPanelLandObjects::callbackReturnGroupObjects(const LLSD& notification, const LLSD& response)
1277void LLPanelLandObjects::callbackReturnGroupObjects(S32 option, void* userdata)
1278{ 1288{
1279 LLPanelLandObjects *lop = (LLPanelLandObjects *)userdata; 1289 S32 option = LLNotification::getSelectedOption(notification, response);
1280 LLParcel *parcel = lop->mParcel->getParcel(); 1290 LLParcel *parcel = mParcel->getParcel();
1281 if (0 == option) 1291 if (0 == option)
1282 { 1292 {
1283 if (parcel) 1293 if (parcel)
1284 { 1294 {
1285 std::string group_name; 1295 std::string group_name;
1286 gCacheName->getGroupName(parcel->getGroupID(), group_name); 1296 gCacheName->getGroupName(parcel->getGroupID(), group_name);
1287 LLStringUtil::format_map_t args; 1297 LLSD args;
1288 args["[GROUPNAME]"] = group_name; 1298 args["GROUPNAME"] = group_name;
1289 LLNotifyBox::showXml("GroupObjectsReturned", args); 1299 LLNotifications::instance().add("GroupObjectsReturned", args);
1290 send_return_objects_message(parcel->getLocalID(), RT_GROUP); 1300 send_return_objects_message(parcel->getLocalID(), RT_GROUP);
1291 } 1301 }
1292 } 1302 }
1293 LLSelectMgr::getInstance()->unhighlightAll(); 1303 LLSelectMgr::getInstance()->unhighlightAll();
1294 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); 1304 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1295 lop->refresh(); 1305 refresh();
1306 return false;
1296} 1307}
1297 1308
1298// static 1309bool LLPanelLandObjects::callbackReturnOtherObjects(const LLSD& notification, const LLSD& response)
1299void LLPanelLandObjects::callbackReturnOtherObjects(S32 option, void* userdata)
1300{ 1310{
1301 LLPanelLandObjects *lop = (LLPanelLandObjects *)userdata; 1311 S32 option = LLNotification::getSelectedOption(notification, response);
1302 LLParcel *parcel = lop->mParcel->getParcel(); 1312 LLParcel *parcel = mParcel->getParcel();
1303 if (0 == option) 1313 if (0 == option)
1304 { 1314 {
1305 if (parcel) 1315 if (parcel)
1306 { 1316 {
1307 LLNotifyBox::showXml("UnOwnedObjectsReturned"); 1317 LLNotifications::instance().add("UnOwnedObjectsReturned");
1308 send_return_objects_message(parcel->getLocalID(), RT_OTHER); 1318 send_return_objects_message(parcel->getLocalID(), RT_OTHER);
1309 } 1319 }
1310 } 1320 }
1311 LLSelectMgr::getInstance()->unhighlightAll(); 1321 LLSelectMgr::getInstance()->unhighlightAll();
1312 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); 1322 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1313 lop->refresh(); 1323 refresh();
1324 return false;
1314} 1325}
1315 1326
1316// static 1327bool LLPanelLandObjects::callbackReturnOwnerList(const LLSD& notification, const LLSD& response)
1317void LLPanelLandObjects::callbackReturnOwnerList(S32 option, void* userdata)
1318{ 1328{
1319 LLPanelLandObjects *self = (LLPanelLandObjects *)userdata; 1329 S32 option = LLNotification::getSelectedOption(notification, response);
1320 LLParcel *parcel = self->mParcel->getParcel(); 1330 LLParcel *parcel = mParcel->getParcel();
1321 if (0 == option) 1331 if (0 == option)
1322 { 1332 {
1323 if (parcel) 1333 if (parcel)
1324 { 1334 {
1325 // Make sure we have something selected. 1335 // Make sure we have something selected.
1326 uuid_list_t::iterator selected = self->mSelectedOwners.begin(); 1336 uuid_list_t::iterator selected = mSelectedOwners.begin();
1327 if (selected != self->mSelectedOwners.end()) 1337 if (selected != mSelectedOwners.end())
1328 { 1338 {
1329 LLStringUtil::format_map_t args; 1339 LLSD args;
1330 if (self->mSelectedIsGroup) 1340 if (mSelectedIsGroup)
1331 { 1341 {
1332 args["[GROUPNAME]"] = self->mSelectedName; 1342 args["GROUPNAME"] = mSelectedName;
1333 LLNotifyBox::showXml("GroupObjectsReturned", args); 1343 LLNotifications::instance().add("GroupObjectsReturned", args);
1334 } 1344 }
1335 else 1345 else
1336 { 1346 {
1337 args["[NAME]"] = self->mSelectedName; 1347 args["NAME"] = mSelectedName;
1338 LLNotifyBox::showXml("OtherObjectsReturned2", args); 1348 LLNotifications::instance().add("OtherObjectsReturned2", args);
1339 } 1349 }
1340 1350
1341 send_return_objects_message(parcel->getLocalID(), RT_LIST, &(self->mSelectedOwners)); 1351 send_return_objects_message(parcel->getLocalID(), RT_LIST, &(mSelectedOwners));
1342 } 1352 }
1343 } 1353 }
1344 } 1354 }
1345 LLSelectMgr::getInstance()->unhighlightAll(); 1355 LLSelectMgr::getInstance()->unhighlightAll();
1346 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); 1356 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1347 self->refresh(); 1357 refresh();
1358 return false;
1348} 1359}
1349 1360
1350 1361
@@ -1366,16 +1377,16 @@ void LLPanelLandObjects::onClickReturnOwnerList(void* userdata)
1366 1377
1367 send_parcel_select_objects(parcelp->getLocalID(), RT_LIST, &(self->mSelectedOwners)); 1378 send_parcel_select_objects(parcelp->getLocalID(), RT_LIST, &(self->mSelectedOwners));
1368 1379
1369 LLStringUtil::format_map_t args; 1380 LLSD args;
1370 args["[NAME]"] = self->mSelectedName; 1381 args["NAME"] = self->mSelectedName;
1371 args["[N]"] = llformat("%d",self->mSelectedCount); 1382 args["N"] = llformat("%d",self->mSelectedCount);
1372 if (self->mSelectedIsGroup) 1383 if (self->mSelectedIsGroup)
1373 { 1384 {
1374 gViewerWindow->alertXml("ReturnObjectsDeededToGroup", args, callbackReturnOwnerList, userdata); 1385 LLNotifications::instance().add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2));
1375 } 1386 }
1376 else 1387 else
1377 { 1388 {
1378 gViewerWindow->alertXml("ReturnObjectsOwnedByUser", args, callbackReturnOwnerList, userdata); 1389 LLNotifications::instance().add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2));
1379 } 1390 }
1380} 1391}
1381 1392
@@ -1422,7 +1433,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
1422 return; 1433 return;
1423 } 1434 }
1424 1435
1425 const LLFontGL* FONT = LLFontGL::sSansSerif; 1436 const LLFontGL* FONT = LLFontGL::getFontSansSerif();
1426 1437
1427 // Extract all of the owners. 1438 // Extract all of the owners.
1428 S32 rows = msg->getNumberOfBlocksFast(_PREHASH_Data); 1439 S32 rows = msg->getNumberOfBlocksFast(_PREHASH_Data);
@@ -1583,19 +1594,19 @@ void LLPanelLandObjects::onClickReturnOwnerObjects(void* userdata)
1583 1594
1584 LLUUID owner_id = parcel->getOwnerID(); 1595 LLUUID owner_id = parcel->getOwnerID();
1585 1596
1586 LLStringUtil::format_map_t args; 1597 LLSD args;
1587 args["[N]"] = llformat("%d",owned); 1598 args["N"] = llformat("%d",owned);
1588 1599
1589 if (owner_id == gAgent.getID()) 1600 if (owner_id == gAgent.getID())
1590 { 1601 {
1591 gViewerWindow->alertXml("ReturnObjectsOwnedBySelf", args, callbackReturnOwnerObjects, userdata); 1602 LLNotifications::instance().add("ReturnObjectsOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2));
1592 } 1603 }
1593 else 1604 else
1594 { 1605 {
1595 std::string name; 1606 std::string name;
1596 gCacheName->getFullName(owner_id, name); 1607 gCacheName->getFullName(owner_id, name);
1597 args["[NAME]"] = name; 1608 args["NAME"] = name;
1598 gViewerWindow->alertXml("ReturnObjectsOwnedByUser", args, callbackReturnOwnerObjects, userdata); 1609 LLNotifications::instance().add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2));
1599 } 1610 }
1600} 1611}
1601 1612
@@ -1611,12 +1622,12 @@ void LLPanelLandObjects::onClickReturnGroupObjects(void* userdata)
1611 std::string group_name; 1622 std::string group_name;
1612 gCacheName->getGroupName(parcel->getGroupID(), group_name); 1623 gCacheName->getGroupName(parcel->getGroupID(), group_name);
1613 1624
1614 LLStringUtil::format_map_t args; 1625 LLSD args;
1615 args["[NAME]"] = group_name; 1626 args["NAME"] = group_name;
1616 args["[N]"] = llformat("%d", parcel->getGroupPrimCount()); 1627 args["N"] = llformat("%d", parcel->getGroupPrimCount());
1617 1628
1618 // create and show confirmation textbox 1629 // create and show confirmation textbox
1619 gViewerWindow->alertXml("ReturnObjectsDeededToGroup", args, callbackReturnGroupObjects, userdata); 1630 LLNotifications::instance().add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnGroupObjects, panelp, _1, _2));
1620} 1631}
1621 1632
1622// static 1633// static
@@ -1632,16 +1643,16 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
1632 1643
1633 send_parcel_select_objects(parcel->getLocalID(), RT_OTHER); 1644 send_parcel_select_objects(parcel->getLocalID(), RT_OTHER);
1634 1645
1635 LLStringUtil::format_map_t args; 1646 LLSD args;
1636 args["[N]"] = llformat("%d", other); 1647 args["N"] = llformat("%d", other);
1637 1648
1638 if (parcel->getIsGroupOwned()) 1649 if (parcel->getIsGroupOwned())
1639 { 1650 {
1640 std::string group_name; 1651 std::string group_name;
1641 gCacheName->getGroupName(parcel->getGroupID(), group_name); 1652 gCacheName->getGroupName(parcel->getGroupID(), group_name);
1642 args["[NAME]"] = group_name; 1653 args["NAME"] = group_name;
1643 1654
1644 gViewerWindow->alertXml("ReturnObjectsNotOwnedByGroup", args, callbackReturnOtherObjects, userdata); 1655 LLNotifications::instance().add("ReturnObjectsNotOwnedByGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
1645 } 1656 }
1646 else 1657 else
1647 { 1658 {
@@ -1649,15 +1660,15 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
1649 1660
1650 if (owner_id == gAgent.getID()) 1661 if (owner_id == gAgent.getID())
1651 { 1662 {
1652 gViewerWindow->alertXml("ReturnObjectsNotOwnedBySelf", args, callbackReturnOtherObjects, userdata); 1663 LLNotifications::instance().add("ReturnObjectsNotOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
1653 } 1664 }
1654 else 1665 else
1655 { 1666 {
1656 std::string name; 1667 std::string name;
1657 gCacheName->getFullName(owner_id, name); 1668 gCacheName->getFullName(owner_id, name);
1658 args["[NAME]"] = name; 1669 args["NAME"] = name;
1659 1670
1660 gViewerWindow->alertXml("ReturnObjectsNotOwnedByUser", args, callbackReturnOtherObjects, userdata); 1671 LLNotifications::instance().add("ReturnObjectsNotOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
1661 } 1672 }
1662 } 1673 }
1663} 1674}
@@ -1716,8 +1727,6 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
1716 1727
1717BOOL LLPanelLandOptions::postBuild() 1728BOOL LLPanelLandOptions::postBuild()
1718{ 1729{
1719
1720
1721 mCheckEditObjects = getChild<LLCheckBoxCtrl>( "edit objects check"); 1730 mCheckEditObjects = getChild<LLCheckBoxCtrl>( "edit objects check");
1722 childSetCommitCallback("edit objects check", onCommitAny, this); 1731 childSetCommitCallback("edit objects check", onCommitAny, this);
1723 1732
@@ -1761,8 +1770,24 @@ BOOL LLPanelLandOptions::postBuild()
1761 childSetCommitCallback("ShowDirectoryCheck", onCommitAny, this); 1770 childSetCommitCallback("ShowDirectoryCheck", onCommitAny, this);
1762 1771
1763 1772
1764 mCategoryCombo = getChild<LLComboBox>( "land category"); 1773 if (gAgent.getAgentAccess().isInTransition())
1765 childSetCommitCallback("land category", onCommitAny, this); 1774 {
1775 // during the AO transition, this combo has an Adult item.
1776 // Post-transition, it goes away. We can remove this conditional
1777 // after the transition and just use the "else" clause.
1778 mCategoryCombo = getChild<LLComboBox>( "land category with adult");
1779 childSetCommitCallback("land category with adult", onCommitAny, this);
1780 }
1781 else
1782 {
1783 // this is the code that should be preserved post-transition
1784 // you could also change the XML to set visibility and enabled true.
1785 mCategoryCombo = getChild<LLComboBox>( "land category");
1786 childSetCommitCallback("land category", onCommitAny, this);
1787 }
1788 mCategoryCombo->setVisible(true);
1789 mCategoryCombo->setEnabled(true);
1790
1766 1791
1767 mMatureCtrl = getChild<LLCheckBoxCtrl>( "MatureCheck"); 1792 mMatureCtrl = getChild<LLCheckBoxCtrl>( "MatureCheck");
1768 childSetCommitCallback("MatureCheck", onCommitAny, this); 1793 childSetCommitCallback("MatureCheck", onCommitAny, this);
@@ -1770,8 +1795,7 @@ BOOL LLPanelLandOptions::postBuild()
1770 mPublishHelpButton = getChild<LLButton>("?"); 1795 mPublishHelpButton = getChild<LLButton>("?");
1771 mPublishHelpButton->setClickedCallback(onClickPublishHelp, this); 1796 mPublishHelpButton->setClickedCallback(onClickPublishHelp, this);
1772 1797
1773 1798 if (gAgent.wantsPGOnly())
1774 if (gAgent.isTeen())
1775 { 1799 {
1776 // Disable these buttons if they are PG (Teen) users 1800 // Disable these buttons if they are PG (Teen) users
1777 mPublishHelpButton->setVisible(FALSE); 1801 mPublishHelpButton->setVisible(FALSE);
@@ -1779,27 +1803,7 @@ BOOL LLPanelLandOptions::postBuild()
1779 mMatureCtrl->setVisible(FALSE); 1803 mMatureCtrl->setVisible(FALSE);
1780 mMatureCtrl->setEnabled(FALSE); 1804 mMatureCtrl->setEnabled(FALSE);
1781 } 1805 }
1782 1806
1783 // Load up the category list
1784 //now in xml file
1785 /*
1786 S32 i;
1787 for (i = 0; i < LLParcel::C_COUNT; i++)
1788 {
1789 LLParcel::ECategory cat = (LLParcel::ECategory)i;
1790
1791 // Selecting Linden Location when you're not a god
1792 // is also blocked on the server.
1793 BOOL enabled = TRUE;
1794 if (!gAgent.isGodlike()
1795 && i == LLParcel::C_LINDEN)
1796 {
1797 enabled = FALSE;
1798 }
1799
1800 mCategoryCombo->add( LLParcel::getCategoryUIString(cat), ADD_BOTTOM, enabled );
1801 }*/
1802
1803 1807
1804 mSnapshotCtrl = getChild<LLTextureCtrl>("snapshot_ctrl"); 1808 mSnapshotCtrl = getChild<LLTextureCtrl>("snapshot_ctrl");
1805 if (mSnapshotCtrl) 1809 if (mSnapshotCtrl)
@@ -1829,6 +1833,8 @@ BOOL LLPanelLandOptions::postBuild()
1829 mLandingTypeCombo = getChild<LLComboBox>( "landing type"); 1833 mLandingTypeCombo = getChild<LLComboBox>( "landing type");
1830 childSetCommitCallback("landing type", onCommitAny, this); 1834 childSetCommitCallback("landing type", onCommitAny, this);
1831 1835
1836 getChild<LLTextureCtrl>("snapshot_ctrl")->setFallbackImageName("default_land_picture.j2c");
1837
1832 return TRUE; 1838 return TRUE;
1833} 1839}
1834 1840
@@ -1838,11 +1844,12 @@ LLPanelLandOptions::~LLPanelLandOptions()
1838{ } 1844{ }
1839 1845
1840 1846
1841// public 1847// virtual
1842void LLPanelLandOptions::refresh() 1848void LLPanelLandOptions::refresh()
1843{ 1849{
1850 refreshSearch();
1851
1844 LLParcel *parcel = mParcel->getParcel(); 1852 LLParcel *parcel = mParcel->getParcel();
1845
1846 if (!parcel) 1853 if (!parcel)
1847 { 1854 {
1848 mCheckEditObjects ->set(FALSE); 1855 mCheckEditObjects ->set(FALSE);
@@ -1875,17 +1882,9 @@ void LLPanelLandOptions::refresh()
1875 mCheckOtherScripts ->set(FALSE); 1882 mCheckOtherScripts ->set(FALSE);
1876 mCheckOtherScripts ->setEnabled(FALSE); 1883 mCheckOtherScripts ->setEnabled(FALSE);
1877 1884
1878 mCheckShowDirectory ->set(FALSE);
1879 mCheckShowDirectory ->setEnabled(FALSE);
1880
1881 mPushRestrictionCtrl->set(FALSE); 1885 mPushRestrictionCtrl->set(FALSE);
1882 mPushRestrictionCtrl->setEnabled(FALSE); 1886 mPushRestrictionCtrl->setEnabled(FALSE);
1883 1887
1884 // *TODO:Translate
1885 const std::string& none_string = LLParcel::getCategoryUIString(LLParcel::C_NONE);
1886 mCategoryCombo->setSimple(none_string);
1887 mCategoryCombo->setEnabled(FALSE);
1888
1889 mLandingTypeCombo->setCurrentByIndex(0); 1888 mLandingTypeCombo->setCurrentByIndex(0);
1890 mLandingTypeCombo->setEnabled(FALSE); 1889 mLandingTypeCombo->setEnabled(FALSE);
1891 1890
@@ -1949,20 +1948,14 @@ void LLPanelLandOptions::refresh()
1949 mPushRestrictionCtrl->setEnabled(can_change_options); 1948 mPushRestrictionCtrl->setEnabled(can_change_options);
1950 } 1949 }
1951 1950
1952 BOOL can_change_identity =
1953 LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY);
1954 // Set by string in case the order in UI doesn't match the order by index.
1955 // *TODO:Translate
1956 LLParcel::ECategory cat = parcel->getCategory();
1957 const std::string& category_string = LLParcel::getCategoryUIString(cat);
1958 mCategoryCombo->setSimple(category_string);
1959 mCategoryCombo->setEnabled( can_change_identity );
1960
1961 BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, 1951 BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel,
1962 GP_LAND_SET_LANDING_POINT); 1952 GP_LAND_SET_LANDING_POINT);
1963 mLandingTypeCombo->setCurrentByIndex((S32)parcel->getLandingType()); 1953 mLandingTypeCombo->setCurrentByIndex((S32)parcel->getLandingType());
1964 mLandingTypeCombo->setEnabled( can_change_landing_point ); 1954 mLandingTypeCombo->setEnabled( can_change_landing_point );
1965 1955
1956 bool can_change_identity =
1957 LLViewerParcelMgr::isParcelModifiableByAgent(
1958 parcel, GP_LAND_CHANGE_IDENTITY);
1966 mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID()); 1959 mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID());
1967 mSnapshotCtrl->setEnabled( can_change_identity ); 1960 mSnapshotCtrl->setEnabled( can_change_identity );
1968 1961
@@ -1982,11 +1975,9 @@ void LLPanelLandOptions::refresh()
1982 mSetBtn->setEnabled( can_change_landing_point ); 1975 mSetBtn->setEnabled( can_change_landing_point );
1983 mClearBtn->setEnabled( can_change_landing_point ); 1976 mClearBtn->setEnabled( can_change_landing_point );
1984 1977
1985 mMatureCtrl->set(parcel->getMaturePublish());
1986 mMatureCtrl->setEnabled( can_change_identity );
1987 mPublishHelpButton->setEnabled( can_change_identity ); 1978 mPublishHelpButton->setEnabled( can_change_identity );
1988 1979
1989 if (gAgent.isTeen()) 1980 if (gAgent.wantsPGOnly())
1990 { 1981 {
1991 // Disable these buttons if they are PG (Teen) users 1982 // Disable these buttons if they are PG (Teen) users
1992 mPublishHelpButton->setVisible(FALSE); 1983 mPublishHelpButton->setVisible(FALSE);
@@ -1994,42 +1985,145 @@ void LLPanelLandOptions::refresh()
1994 mMatureCtrl->setVisible(FALSE); 1985 mMatureCtrl->setVisible(FALSE);
1995 mMatureCtrl->setEnabled(FALSE); 1986 mMatureCtrl->setEnabled(FALSE);
1996 } 1987 }
1988 else
1989 {
1990 // not teen so fill in the data for the maturity control
1991 mMatureCtrl->setVisible(TRUE);
1992 mMatureCtrl->setLabel(getString("mature_check_mature"));
1993 mMatureCtrl->setToolTip(getString("mature_check_mature_tooltip"));
1994 // they can see the checkbox, but its disposition depends on the
1995 // state of the region
1996 LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
1997 if (regionp)
1998 {
1999 if (regionp->getSimAccess() == SIM_ACCESS_PG)
2000 {
2001 mMatureCtrl->setEnabled(FALSE);
2002 mMatureCtrl->set(FALSE);
2003 }
2004 else if (regionp->getSimAccess() == SIM_ACCESS_MATURE)
2005 {
2006 mMatureCtrl->setEnabled(can_change_identity);
2007 mMatureCtrl->set(parcel->getMaturePublish());
2008 }
2009 else if (regionp->getSimAccess() == SIM_ACCESS_ADULT)
2010 {
2011 mMatureCtrl->setEnabled(FALSE);
2012 mMatureCtrl->set(TRUE);
2013 mMatureCtrl->setLabel(getString("mature_check_adult"));
2014 mMatureCtrl->setToolTip(getString("mature_check_adult_tooltip"));
2015 }
2016 }
2017 }
1997 } 2018 }
1998} 2019}
1999 2020
2000// virtual 2021// virtual
2001void LLPanelLandOptions::draw() 2022void LLPanelLandOptions::draw()
2002{ 2023{
2003 LLParcel *parcel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection()->getParcel(); 2024 refreshSearch(); // Is this necessary? JC
2004 2025 LLPanel::draw();
2005 if(parcel) 2026}
2027
2028
2029// private
2030void LLPanelLandOptions::refreshSearch()
2031{
2032 LLParcel *parcel = mParcel->getParcel();
2033 if (!parcel)
2034 {
2035 mCheckShowDirectory->set(FALSE);
2036 mCheckShowDirectory->setEnabled(FALSE);
2037
2038 // *TODO:Translate
2039 const std::string& none_string = LLParcel::getCategoryUIString(LLParcel::C_NONE);
2040 mCategoryCombo->setSimple(none_string);
2041 mCategoryCombo->setEnabled(FALSE);
2042 return;
2043 }
2044
2045 LLViewerRegion* region =
2046 LLViewerParcelMgr::getInstance()->getSelectionRegion();
2047
2048 bool can_change =
2049 LLViewerParcelMgr::isParcelModifiableByAgent(
2050 parcel, GP_LAND_CHANGE_IDENTITY)
2051 && region
2052 && !(region->getRegionFlags() & REGION_FLAGS_BLOCK_PARCEL_SEARCH);
2053
2054 // There is a bug with this panel whereby the Show Directory bit can be
2055 // slammed off by the Region based on an override. Since this data is cached
2056 // locally the change will not reflect in the panel, which could cause confusion
2057 // A workaround for this is to flip the bit off in the locally cached version
2058 // when we detect a mismatch case.
2059 if(!can_change && parcel->getParcelFlag(PF_SHOW_DIRECTORY))
2006 { 2060 {
2007 LLViewerRegion* region; 2061 parcel->setParcelFlag(PF_SHOW_DIRECTORY, FALSE);
2008 region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); 2062 }
2009 llassert(region); // Region should never be null. 2063 BOOL show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY);
2064 mCheckShowDirectory ->set(show_directory);
2010 2065
2011 BOOL can_change_identity = region ? 2066 // Set by string in case the order in UI doesn't match the order by index.
2012 LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY) && 2067 // *TODO:Translate
2013 ! (region->getRegionFlags() & REGION_FLAGS_BLOCK_PARCEL_SEARCH) : false; 2068 LLParcel::ECategory cat = parcel->getCategory();
2069 const std::string& category_string = LLParcel::getCategoryUIString(cat);
2070 mCategoryCombo->setSimple(category_string);
2014 2071
2015 // There is a bug with this panel whereby the Show Directory bit can be 2072 std::string tooltip;
2016 // slammed off by the Region based on an override. Since this data is cached 2073 bool enable_show_directory = false;
2017 // locally the change will not reflect in the panel, which could cause confusion 2074 // Parcels <= 128 square meters cannot be listed in search, in an
2018 // A workaround for this is to flip the bit off in the locally cached version 2075 // effort to reduce search spam from small parcels. See also
2019 // when we detect a mismatch case. 2076 // the search crawler "grid-crawl.py" in secondlife.com/doc/app/search/ JC
2020 if(! can_change_identity && parcel->getParcelFlag(PF_SHOW_DIRECTORY)) 2077 const S32 MIN_PARCEL_AREA_FOR_SEARCH = 128;
2078 bool large_enough = parcel->getArea() > MIN_PARCEL_AREA_FOR_SEARCH;
2079 if (large_enough)
2080 {
2081 if (can_change)
2021 { 2082 {
2022 parcel->setParcelFlag(PF_SHOW_DIRECTORY, FALSE); 2083 tooltip = getString("search_enabled_tooltip");
2084 enable_show_directory = true;
2085 }
2086 else
2087 {
2088 tooltip = getString("search_disabled_permissions_tooltip");
2089 enable_show_directory = false;
2023 } 2090 }
2024 mCheckShowDirectory ->set(parcel->getParcelFlag(PF_SHOW_DIRECTORY));
2025 mCheckShowDirectory ->setEnabled(can_change_identity);
2026 mCategoryCombo->setEnabled(can_change_identity);
2027 } 2091 }
2028 2092 else
2029 LLPanel::draw(); 2093 {
2094 // not large enough to include in search
2095 if (can_change)
2096 {
2097 if (show_directory)
2098 {
2099 // parcels that are too small, but are still in search for
2100 // legacy reasons, need to have the check box enabled so
2101 // the owner can delist the parcel. JC
2102 tooltip = getString("search_enabled_tooltip");
2103 enable_show_directory = true;
2104 }
2105 else
2106 {
2107 tooltip = getString("search_disabled_small_tooltip");
2108 enable_show_directory = false;
2109 }
2110 }
2111 else
2112 {
2113 // both too small and don't have permission, so just
2114 // show the permissions as the reason (which is probably
2115 // the more common case) JC
2116 tooltip = getString("search_disabled_permissions_tooltip");
2117 enable_show_directory = false;
2118 }
2119 }
2120 mCheckShowDirectory->setToolTip(tooltip);
2121 mCategoryCombo->setToolTip(tooltip);
2122 mCheckShowDirectory->setEnabled(enable_show_directory);
2123 mCategoryCombo->setEnabled(enable_show_directory);
2124}
2030 2125
2031 2126
2032}
2033// static 2127// static
2034void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) 2128void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
2035{ 2129{
@@ -2056,7 +2150,8 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
2056 BOOL mature_publish = self->mMatureCtrl->get(); 2150 BOOL mature_publish = self->mMatureCtrl->get();
2057 BOOL push_restriction = self->mPushRestrictionCtrl->get(); 2151 BOOL push_restriction = self->mPushRestrictionCtrl->get();
2058 BOOL show_directory = self->mCheckShowDirectory->get(); 2152 BOOL show_directory = self->mCheckShowDirectory->get();
2059 S32 category_index = self->mCategoryCombo->getCurrentIndex(); 2153 // we have to get the index from a lookup, not from the position in the dropdown!
2154 S32 category_index = LLParcel::getCategoryFromString(self->mCategoryCombo->getSelectedValue());
2060 S32 landing_type_index = self->mLandingTypeCombo->getCurrentIndex(); 2155 S32 landing_type_index = self->mLandingTypeCombo->getCurrentIndex();
2061 LLUUID snapshot_id = self->mSnapshotCtrl->getImageAssetID(); 2156 LLUUID snapshot_id = self->mSnapshotCtrl->getImageAssetID();
2062 LLViewerRegion* region; 2157 LLViewerRegion* region;
@@ -2065,7 +2160,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
2065 if (!allow_other_scripts && region && region->getAllowDamage()) 2160 if (!allow_other_scripts && region && region->getAllowDamage())
2066 { 2161 {
2067 2162
2068 gViewerWindow->alertXml("UnableToDisableOutsideScripts"); 2163 LLNotifications::instance().add("UnableToDisableOutsideScripts");
2069 return; 2164 return;
2070 } 2165 }
2071 2166
@@ -2109,7 +2204,7 @@ void LLPanelLandOptions::onClickSet(void* userdata)
2109 2204
2110 if (agent_parcel->getLocalID() != selected_parcel->getLocalID()) 2205 if (agent_parcel->getLocalID() != selected_parcel->getLocalID())
2111 { 2206 {
2112 gViewerWindow->alertXml("MustBeInParcel"); 2207 LLNotifications::instance().add("MustBeInParcel");
2113 return; 2208 return;
2114 } 2209 }
2115 2210
@@ -2152,11 +2247,11 @@ void LLPanelLandOptions::onClickPublishHelp(void*)
2152 2247
2153 if(! can_change_identity) 2248 if(! can_change_identity)
2154 { 2249 {
2155 gViewerWindow->alertXml("ClickPublishHelpLandDisabled"); 2250 LLNotifications::instance().add("ClickPublishHelpLandDisabled");
2156 } 2251 }
2157 else 2252 else
2158 { 2253 {
2159 gViewerWindow->alertXml("ClickPublishHelpLand"); 2254 LLNotifications::instance().add("ClickPublishHelpLand");
2160 } 2255 }
2161} 2256}
2162 2257
@@ -2689,6 +2784,18 @@ void LLPanelLandCovenant::refresh()
2689 region_name->setText(region->getName()); 2784 region_name->setText(region->getName());
2690 } 2785 }
2691 2786
2787 LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
2788 if (region_landtype)
2789 {
2790 region_landtype->setText(region->getSimProductName());
2791 }
2792
2793 LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");
2794 if (region_maturity)
2795 {
2796 region_maturity->setText(region->getSimAccessString());
2797 }
2798
2692 LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); 2799 LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
2693 if (resellable_clause) 2800 if (resellable_clause)
2694 { 2801 {