aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloaterland.cpp')
-rw-r--r--linden/indra/newview/llfloaterland.cpp262
1 files changed, 126 insertions, 136 deletions
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp
index c75917b..0150f44 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.cpp
@@ -60,7 +60,7 @@
60#include "lltextbox.h" 60#include "lltextbox.h"
61#include "lltexturectrl.h" 61#include "lltexturectrl.h"
62#include "lluiconstants.h" 62#include "lluiconstants.h"
63#include "llvieweruictrlfactory.h" 63#include "lluictrlfactory.h"
64#include "llviewermessage.h" 64#include "llviewermessage.h"
65#include "llviewerparcelmgr.h" 65#include "llviewerparcelmgr.h"
66#include "llviewerregion.h" 66#include "llviewerregion.h"
@@ -130,12 +130,12 @@ void send_parcel_select_objects(S32 parcel_local_id, S32 return_type,
130{ 130{
131 LLMessageSystem *msg = gMessageSystem; 131 LLMessageSystem *msg = gMessageSystem;
132 132
133 LLViewerRegion* region = gParcelMgr->getSelectionRegion(); 133 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
134 if (!region) return; 134 if (!region) return;
135 135
136 // Since new highlight will be coming in, drop any highlights 136 // Since new highlight will be coming in, drop any highlights
137 // that exist right now. 137 // that exist right now.
138 gSelectMgr->unhighlightAll(); 138 LLSelectMgr::getInstance()->unhighlightAll();
139 139
140 msg->newMessageFast(_PREHASH_ParcelSelectObjects); 140 msg->newMessageFast(_PREHASH_ParcelSelectObjects);
141 msg->nextBlockFast(_PREHASH_AgentData); 141 msg->nextBlockFast(_PREHASH_AgentData);
@@ -191,9 +191,9 @@ void LLFloaterLand::onOpen()
191{ 191{
192 // Done automatically when the selected parcel's properties arrive 192 // Done automatically when the selected parcel's properties arrive
193 // (and hence we have the local id). 193 // (and hence we have the local id).
194 // gParcelMgr->sendParcelAccessListRequest(AL_ACCESS | AL_BAN | AL_RENTER); 194 // LLViewerParcelMgr::getInstance()->sendParcelAccessListRequest(AL_ACCESS | AL_BAN | AL_RENTER);
195 195
196 mParcel = gParcelMgr->getFloatingParcelSelection(); 196 mParcel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
197 197
198 // Refresh even if not over a region so we don't get an 198 // Refresh even if not over a region so we don't get an
199 // uninitialized dialog. The dialog is 0-region aware. 199 // uninitialized dialog. The dialog is 0-region aware.
@@ -204,12 +204,12 @@ void LLFloaterLand::onOpen()
204// virtual 204// virtual
205void LLFloaterLand::onClose(bool app_quitting) 205void LLFloaterLand::onClose(bool app_quitting)
206{ 206{
207 gParcelMgr->removeObserver( sObserver ); 207 LLViewerParcelMgr::getInstance()->removeObserver( sObserver );
208 delete sObserver; 208 delete sObserver;
209 sObserver = NULL; 209 sObserver = NULL;
210 210
211 // Might have been showing owned objects 211 // Might have been showing owned objects
212 gSelectMgr->unhighlightAll(); 212 LLSelectMgr::getInstance()->unhighlightAll();
213 213
214 // Save which panel we had open 214 // Save which panel we had open
215 sLastTab = mTabLand->getCurrentPanelIndex(); 215 sLastTab = mTabLand->getCurrentPanelIndex();
@@ -233,19 +233,18 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed)
233 factory_map["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this); 233 factory_map["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this);
234 factory_map["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this); 234 factory_map["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this);
235 235
236 gUICtrlFactory->buildFloater(this, "floater_about_land.xml", &factory_map, false); 236 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", &factory_map, false);
237 237
238 sObserver = new LLParcelSelectionObserver(); 238 sObserver = new LLParcelSelectionObserver();
239 gParcelMgr->addObserver( sObserver ); 239 LLViewerParcelMgr::getInstance()->addObserver( sObserver );
240} 240}
241 241
242BOOL LLFloaterLand::postBuild() 242BOOL LLFloaterLand::postBuild()
243{ 243{
244 LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(this, "landtab"); 244 LLTabContainer* tab = getChild<LLTabContainer>("landtab");
245 245
246 mTabLand = (LLTabContainer*) tab; 246 mTabLand = (LLTabContainer*) tab;
247 247
248
249 if (tab) 248 if (tab)
250 { 249 {
251 tab->selectTab(sLastTab); 250 tab->selectTab(sLastTab);
@@ -280,8 +279,6 @@ void* LLFloaterLand::createPanelLandGeneral(void* data)
280} 279}
281 280
282// static 281// static
283
284
285void* LLFloaterLand::createPanelLandCovenant(void* data) 282void* LLFloaterLand::createPanelLandCovenant(void* data)
286{ 283{
287 LLFloaterLand* self = (LLFloaterLand*)data; 284 LLFloaterLand* self = (LLFloaterLand*)data;
@@ -337,96 +334,96 @@ LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
337BOOL LLPanelLandGeneral::postBuild() 334BOOL LLPanelLandGeneral::postBuild()
338{ 335{
339 336
340 mEditName = LLUICtrlFactory::getLineEditorByName(this, "Name"); 337 mEditName = getChild<LLLineEditor>("Name");
341 mEditName->setCommitCallback(onCommitAny); 338 mEditName->setCommitCallback(onCommitAny);
342 childSetPrevalidate("Name", LLLineEditor::prevalidatePrintableNotPipe); 339 childSetPrevalidate("Name", LLLineEditor::prevalidatePrintableNotPipe);
343 childSetUserData("Name", this); 340 childSetUserData("Name", this);
344 341
345 mEditDesc = LLUICtrlFactory::getTextEditorByName(this, "Description"); 342 mEditDesc = getChild<LLTextEditor>("Description");
346 mEditDesc->setCommitOnFocusLost(TRUE); 343 mEditDesc->setCommitOnFocusLost(TRUE);
347 mEditDesc->setCommitCallback(onCommitAny); 344 mEditDesc->setCommitCallback(onCommitAny);
348 childSetPrevalidate("Description", LLLineEditor::prevalidatePrintableNotPipe); 345 childSetPrevalidate("Description", LLLineEditor::prevalidatePrintableNotPipe);
349 childSetUserData("Description", this); 346 childSetUserData("Description", this);
350 347
351 348
352 mTextSalePending = LLUICtrlFactory::getTextBoxByName(this, "SalePending"); 349 mTextSalePending = getChild<LLTextBox>("SalePending");
353 mTextOwnerLabel = LLUICtrlFactory::getTextBoxByName(this, "Owner:"); 350 mTextOwnerLabel = getChild<LLTextBox>("Owner:");
354 mTextOwner = LLUICtrlFactory::getTextBoxByName(this, "OwnerText"); 351 mTextOwner = getChild<LLTextBox>("OwnerText");
355 352
356 353
357 mBtnProfile = LLUICtrlFactory::getButtonByName(this, "Profile..."); 354 mBtnProfile = getChild<LLButton>("Profile...");
358 mBtnProfile->setClickedCallback(onClickProfile, this); 355 mBtnProfile->setClickedCallback(onClickProfile, this);
359 356
360 357
361 mTextGroupLabel = LLUICtrlFactory::getTextBoxByName(this, "Group:"); 358 mTextGroupLabel = getChild<LLTextBox>("Group:");
362 mTextGroup = LLUICtrlFactory::getTextBoxByName(this, "GroupText"); 359 mTextGroup = getChild<LLTextBox>("GroupText");
363 360
364 361
365 mBtnSetGroup = LLUICtrlFactory::getButtonByName(this, "Set..."); 362 mBtnSetGroup = getChild<LLButton>("Set...");
366 mBtnSetGroup->setClickedCallback(onClickSetGroup, this); 363 mBtnSetGroup->setClickedCallback(onClickSetGroup, this);
367 364
368 365
369 366
370 mCheckDeedToGroup = LLUICtrlFactory::getCheckBoxByName(this, "check deed"); 367 mCheckDeedToGroup = getChild<LLCheckBoxCtrl>( "check deed");
371 childSetCommitCallback("check deed", onCommitAny, this); 368 childSetCommitCallback("check deed", onCommitAny, this);
372 369
373 370
374 mBtnDeedToGroup = LLUICtrlFactory::getButtonByName(this, "Deed..."); 371 mBtnDeedToGroup = getChild<LLButton>("Deed...");
375 mBtnDeedToGroup->setClickedCallback(onClickDeed, this); 372 mBtnDeedToGroup->setClickedCallback(onClickDeed, this);
376 373
377 374
378 mCheckContributeWithDeed = LLUICtrlFactory::getCheckBoxByName(this, "check contrib"); 375 mCheckContributeWithDeed = getChild<LLCheckBoxCtrl>( "check contrib");
379 childSetCommitCallback("check contrib", onCommitAny, this); 376 childSetCommitCallback("check contrib", onCommitAny, this);
380 377
381 378
382 379
383 mSaleInfoNotForSale = LLUICtrlFactory::getTextBoxByName(this, "Not for sale."); 380 mSaleInfoNotForSale = getChild<LLTextBox>("Not for sale.");
384 381
385 mSaleInfoForSale1 = LLUICtrlFactory::getTextBoxByName(this, "For Sale: Price L$[PRICE]."); 382 mSaleInfoForSale1 = getChild<LLTextBox>("For Sale: Price L$[PRICE].");
386 383
387 384
388 mBtnSellLand = LLUICtrlFactory::getButtonByName(this, "Sell Land..."); 385 mBtnSellLand = getChild<LLButton>("Sell Land...");
389 mBtnSellLand->setClickedCallback(onClickSellLand, this); 386 mBtnSellLand->setClickedCallback(onClickSellLand, this);
390 387
391 mSaleInfoForSale2 = LLUICtrlFactory::getTextBoxByName(this, "For sale to"); 388 mSaleInfoForSale2 = getChild<LLTextBox>("For sale to");
392 389
393 mSaleInfoForSaleObjects = LLUICtrlFactory::getTextBoxByName(this, "Sell with landowners objects in parcel."); 390 mSaleInfoForSaleObjects = getChild<LLTextBox>("Sell with landowners objects in parcel.");
394 391
395 mSaleInfoForSaleNoObjects = LLUICtrlFactory::getTextBoxByName(this, "Selling with no objects in parcel."); 392 mSaleInfoForSaleNoObjects = getChild<LLTextBox>("Selling with no objects in parcel.");
396 393
397 394
398 mBtnStopSellLand = LLUICtrlFactory::getButtonByName(this, "Cancel Land Sale"); 395 mBtnStopSellLand = getChild<LLButton>("Cancel Land Sale");
399 mBtnStopSellLand->setClickedCallback(onClickStopSellLand, this); 396 mBtnStopSellLand->setClickedCallback(onClickStopSellLand, this);
400 397
401 398
402 mTextClaimDateLabel = LLUICtrlFactory::getTextBoxByName(this, "Claimed:"); 399 mTextClaimDateLabel = getChild<LLTextBox>("Claimed:");
403 mTextClaimDate = LLUICtrlFactory::getTextBoxByName(this, "DateClaimText"); 400 mTextClaimDate = getChild<LLTextBox>("DateClaimText");
404 401
405 402
406 mTextPriceLabel = LLUICtrlFactory::getTextBoxByName(this, "PriceLabel"); 403 mTextPriceLabel = getChild<LLTextBox>("PriceLabel");
407 mTextPrice = LLUICtrlFactory::getTextBoxByName(this, "PriceText"); 404 mTextPrice = getChild<LLTextBox>("PriceText");
408 405
409 406
410 mTextDwell = LLUICtrlFactory::getTextBoxByName(this, "DwellText"); 407 mTextDwell = getChild<LLTextBox>("DwellText");
411 408
412 409
413 mBtnBuyLand = LLUICtrlFactory::getButtonByName(this, "Buy Land..."); 410 mBtnBuyLand = getChild<LLButton>("Buy Land...");
414 mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND); 411 mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
415 412
416 mBtnBuyGroupLand = LLUICtrlFactory::getButtonByName(this, "Buy For Group..."); 413 mBtnBuyGroupLand = getChild<LLButton>("Buy For Group...");
417 mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND); 414 mBtnBuyGroupLand->setClickedCallback(onClickBuyLand, (void*)&BUY_GROUP_LAND);
418 415
419 416
420 mBtnBuyPass = LLUICtrlFactory::getButtonByName(this, "Buy Pass..."); 417 mBtnBuyPass = getChild<LLButton>("Buy Pass...");
421 mBtnBuyPass->setClickedCallback(onClickBuyPass, this); 418 mBtnBuyPass->setClickedCallback(onClickBuyPass, this);
422 419
423 mBtnReleaseLand = LLUICtrlFactory::getButtonByName(this, "Abandon Land..."); 420 mBtnReleaseLand = getChild<LLButton>("Abandon Land...");
424 mBtnReleaseLand->setClickedCallback(onClickRelease, NULL); 421 mBtnReleaseLand->setClickedCallback(onClickRelease, NULL);
425 422
426 mBtnReclaimLand = LLUICtrlFactory::getButtonByName(this, "Reclaim Land..."); 423 mBtnReclaimLand = getChild<LLButton>("Reclaim Land...");
427 mBtnReclaimLand->setClickedCallback(onClickReclaim, NULL); 424 mBtnReclaimLand->setClickedCallback(onClickReclaim, NULL);
428 425
429 mBtnStartAuction = LLUICtrlFactory::getButtonByName(this, "Linden Sale..."); 426 mBtnStartAuction = getChild<LLButton>("Linden Sale...");
430 mBtnStartAuction->setClickedCallback(onClickStartAuction, NULL); 427 mBtnStartAuction->setClickedCallback(onClickStartAuction, NULL);
431 428
432 return TRUE; 429 return TRUE;
@@ -445,7 +442,7 @@ void LLPanelLandGeneral::refresh()
445 442
446 LLParcel *parcel = mParcel->getParcel(); 443 LLParcel *parcel = mParcel->getParcel();
447 bool region_owner = false; 444 bool region_owner = false;
448 LLViewerRegion* regionp = gParcelMgr->getSelectionRegion(); 445 LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
449 if(regionp && (regionp->getOwner() == gAgent.getID())) 446 if(regionp && (regionp->getOwner() == gAgent.getID()))
450 { 447 {
451 region_owner = true; 448 region_owner = true;
@@ -672,16 +669,16 @@ void LLPanelLandGeneral::refresh()
672 refreshNames(); 669 refreshNames();
673 670
674 mBtnBuyLand->setEnabled( 671 mBtnBuyLand->setEnabled(
675 gParcelMgr->canAgentBuyParcel(parcel, false)); 672 LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false));
676 mBtnBuyGroupLand->setEnabled( 673 mBtnBuyGroupLand->setEnabled(
677 gParcelMgr->canAgentBuyParcel(parcel, true)); 674 LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true));
678 675
679 // show pricing information 676 // show pricing information
680 S32 area; 677 S32 area;
681 S32 claim_price; 678 S32 claim_price;
682 S32 rent_price; 679 S32 rent_price;
683 F32 dwell; 680 F32 dwell;
684 gParcelMgr->getDisplayInfo(&area, 681 LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
685 &claim_price, 682 &claim_price,
686 &rent_price, 683 &rent_price,
687 &for_sale, 684 &for_sale,
@@ -710,7 +707,7 @@ void LLPanelLandGeneral::refresh()
710 mBtnReleaseLand->setEnabled( can_release ); 707 mBtnReleaseLand->setEnabled( can_release );
711 } 708 }
712 709
713 BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST) && !gParcelMgr->isCollisionBanned();; 710 BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();;
714 mBtnBuyPass->setEnabled(use_pass); 711 mBtnBuyPass->setEnabled(use_pass);
715 } 712 }
716} 713}
@@ -827,7 +824,7 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
827 //mTextGroup->setText(group_name); 824 //mTextGroup->setText(group_name);
828 825
829 // Send update 826 // Send update
830 gParcelMgr->sendParcelPropertiesUpdate(parcel); 827 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate(parcel);
831 828
832 // Update UI 829 // Update UI
833 refresh(); 830 refresh();
@@ -837,7 +834,7 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id)
837void LLPanelLandGeneral::onClickBuyLand(void* data) 834void LLPanelLandGeneral::onClickBuyLand(void* data)
838{ 835{
839 BOOL* for_group = (BOOL*)data; 836 BOOL* for_group = (BOOL*)data;
840 gParcelMgr->startBuyLand(*for_group); 837 LLViewerParcelMgr::getInstance()->startBuyLand(*for_group);
841} 838}
842 839
843BOOL LLPanelLandGeneral::enableDeedToGroup(void* data) 840BOOL LLPanelLandGeneral::enableDeedToGroup(void* data)
@@ -853,29 +850,29 @@ void LLPanelLandGeneral::onClickDeed(void*)
853 //LLParcel* parcel = mParcel->getParcel(); 850 //LLParcel* parcel = mParcel->getParcel();
854 //if (parcel) 851 //if (parcel)
855 //{ 852 //{
856 gParcelMgr->startDeedLandToGroup(); 853 LLViewerParcelMgr::getInstance()->startDeedLandToGroup();
857 //} 854 //}
858} 855}
859 856
860// static 857// static
861void LLPanelLandGeneral::onClickRelease(void*) 858void LLPanelLandGeneral::onClickRelease(void*)
862{ 859{
863 gParcelMgr->startReleaseLand(); 860 LLViewerParcelMgr::getInstance()->startReleaseLand();
864} 861}
865 862
866// static 863// static
867void LLPanelLandGeneral::onClickReclaim(void*) 864void LLPanelLandGeneral::onClickReclaim(void*)
868{ 865{
869 lldebugs << "LLPanelLandGeneral::onClickReclaim()" << llendl; 866 lldebugs << "LLPanelLandGeneral::onClickReclaim()" << llendl;
870 gParcelMgr->reclaimParcel(); 867 LLViewerParcelMgr::getInstance()->reclaimParcel();
871} 868}
872 869
873// static 870// static
874BOOL LLPanelLandGeneral::enableBuyPass(void* data) 871BOOL LLPanelLandGeneral::enableBuyPass(void* data)
875{ 872{
876 LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data; 873 LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data;
877 LLParcel* parcel = panelp != NULL ? panelp->mParcel->getParcel() : gParcelMgr->getParcelSelection()->getParcel(); 874 LLParcel* parcel = panelp != NULL ? panelp->mParcel->getParcel() : LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
878 return (parcel != NULL) && (parcel->getParcelFlag(PF_USE_PASS_LIST) && !gParcelMgr->isCollisionBanned()); 875 return (parcel != NULL) && (parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned());
879} 876}
880 877
881 878
@@ -883,7 +880,7 @@ BOOL LLPanelLandGeneral::enableBuyPass(void* data)
883void LLPanelLandGeneral::onClickBuyPass(void* data) 880void LLPanelLandGeneral::onClickBuyPass(void* data)
884{ 881{
885 LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data; 882 LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data;
886 LLParcel* parcel = panelp != NULL ? panelp->mParcel->getParcel() : gParcelMgr->getParcelSelection()->getParcel(); 883 LLParcel* parcel = panelp != NULL ? panelp->mParcel->getParcel() : LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
887 884
888 if (!parcel) return; 885 if (!parcel) return;
889 886
@@ -927,7 +924,7 @@ void LLPanelLandGeneral::cbBuyPass(S32 option, void* data)
927 if (0 == option) 924 if (0 == option)
928 { 925 {
929 // User clicked OK 926 // User clicked OK
930 gParcelMgr->buyPass(); 927 LLViewerParcelMgr::getInstance()->buyPass();
931 } 928 }
932} 929}
933 930
@@ -965,7 +962,7 @@ void LLPanelLandGeneral::onCommitAny(LLUICtrl *ctrl, void *userdata)
965 parcel->setContributeWithDeed(contribute_with_deed); 962 parcel->setContributeWithDeed(contribute_with_deed);
966 963
967 // Send update to server 964 // Send update to server
968 gParcelMgr->sendParcelPropertiesUpdate( parcel ); 965 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
969 966
970 // Might have changed properties, so let's redraw! 967 // Might have changed properties, so let's redraw!
971 panelp->refresh(); 968 panelp->refresh();
@@ -974,7 +971,7 @@ void LLPanelLandGeneral::onCommitAny(LLUICtrl *ctrl, void *userdata)
974// static 971// static
975void LLPanelLandGeneral::onClickSellLand(void* data) 972void LLPanelLandGeneral::onClickSellLand(void* data)
976{ 973{
977 gParcelMgr->startSellLand(); 974 LLViewerParcelMgr::getInstance()->startSellLand();
978} 975}
979 976
980// static 977// static
@@ -987,7 +984,7 @@ void LLPanelLandGeneral::onClickStopSellLand(void* data)
987 parcel->setSalePrice(0); 984 parcel->setSalePrice(0);
988 parcel->setAuthorizedBuyerID(LLUUID::null); 985 parcel->setAuthorizedBuyerID(LLUUID::null);
989 986
990 gParcelMgr->sendParcelPropertiesUpdate(parcel); 987 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate(parcel);
991} 988}
992 989
993//--------------------------------------------------------------------------- 990//---------------------------------------------------------------------------
@@ -1004,34 +1001,34 @@ BOOL LLPanelLandObjects::postBuild()
1004{ 1001{
1005 1002
1006 mFirstReply = TRUE; 1003 mFirstReply = TRUE;
1007 mParcelObjectBonus = LLUICtrlFactory::getTextBoxByName(this, "parcel_object_bonus"); 1004 mParcelObjectBonus = getChild<LLTextBox>("parcel_object_bonus");
1008 mSWTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "objects_available"); 1005 mSWTotalObjects = getChild<LLTextBox>("objects_available");
1009 mObjectContribution = LLUICtrlFactory::getTextBoxByName(this, "object_contrib_text"); 1006 mObjectContribution = getChild<LLTextBox>("object_contrib_text");
1010 mTotalObjects = LLUICtrlFactory::getTextBoxByName(this, "total_objects_text"); 1007 mTotalObjects = getChild<LLTextBox>("total_objects_text");
1011 mOwnerObjects = LLUICtrlFactory::getTextBoxByName(this, "owner_objects_text"); 1008 mOwnerObjects = getChild<LLTextBox>("owner_objects_text");
1012 1009
1013 mBtnShowOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ShowOwner"); 1010 mBtnShowOwnerObjects = getChild<LLButton>("ShowOwner");
1014 mBtnShowOwnerObjects->setClickedCallback(onClickShowOwnerObjects, this); 1011 mBtnShowOwnerObjects->setClickedCallback(onClickShowOwnerObjects, this);
1015 1012
1016 mBtnReturnOwnerObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOwner..."); 1013 mBtnReturnOwnerObjects = getChild<LLButton>("ReturnOwner...");
1017 mBtnReturnOwnerObjects->setClickedCallback(onClickReturnOwnerObjects, this); 1014 mBtnReturnOwnerObjects->setClickedCallback(onClickReturnOwnerObjects, this);
1018 1015
1019 mGroupObjects = LLUICtrlFactory::getTextBoxByName(this, "group_objects_text"); 1016 mGroupObjects = getChild<LLTextBox>("group_objects_text");
1020 mBtnShowGroupObjects = LLUICtrlFactory::getButtonByName(this, "ShowGroup"); 1017 mBtnShowGroupObjects = getChild<LLButton>("ShowGroup");
1021 mBtnShowGroupObjects->setClickedCallback(onClickShowGroupObjects, this); 1018 mBtnShowGroupObjects->setClickedCallback(onClickShowGroupObjects, this);
1022 1019
1023 mBtnReturnGroupObjects = LLUICtrlFactory::getButtonByName(this, "ReturnGroup..."); 1020 mBtnReturnGroupObjects = getChild<LLButton>("ReturnGroup...");
1024 mBtnReturnGroupObjects->setClickedCallback(onClickReturnGroupObjects, this); 1021 mBtnReturnGroupObjects->setClickedCallback(onClickReturnGroupObjects, this);
1025 1022
1026 mOtherObjects = LLUICtrlFactory::getTextBoxByName(this, "other_objects_text"); 1023 mOtherObjects = getChild<LLTextBox>("other_objects_text");
1027 mBtnShowOtherObjects = LLUICtrlFactory::getButtonByName(this, "ShowOther"); 1024 mBtnShowOtherObjects = getChild<LLButton>("ShowOther");
1028 mBtnShowOtherObjects->setClickedCallback(onClickShowOtherObjects, this); 1025 mBtnShowOtherObjects->setClickedCallback(onClickShowOtherObjects, this);
1029 1026
1030 mBtnReturnOtherObjects = LLUICtrlFactory::getButtonByName(this, "ReturnOther..."); 1027 mBtnReturnOtherObjects = getChild<LLButton>("ReturnOther...");
1031 mBtnReturnOtherObjects->setClickedCallback(onClickReturnOtherObjects, this); 1028 mBtnReturnOtherObjects->setClickedCallback(onClickReturnOtherObjects, this);
1032 1029
1033 mSelectedObjects = LLUICtrlFactory::getTextBoxByName(this, "selected_objects_text"); 1030 mSelectedObjects = getChild<LLTextBox>("selected_objects_text");
1034 mCleanOtherObjectsTime = LLUICtrlFactory::getLineEditorByName(this, "clean other time"); 1031 mCleanOtherObjectsTime = getChild<LLLineEditor>("clean other time");
1035 1032
1036 mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus, this); 1033 mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus, this);
1037 mCleanOtherObjectsTime->setCommitCallback(onCommitClean); 1034 mCleanOtherObjectsTime->setCommitCallback(onCommitClean);
@@ -1039,22 +1036,15 @@ BOOL LLPanelLandObjects::postBuild()
1039 childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32); 1036 childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32);
1040 childSetUserData("clean other time", this); 1037 childSetUserData("clean other time", this);
1041 1038
1042 mBtnRefresh = LLUICtrlFactory::getButtonByName(this, "Refresh List"); 1039 mBtnRefresh = getChild<LLButton>("Refresh List");
1043 mBtnRefresh->setClickedCallback(onClickRefresh, this); 1040 mBtnRefresh->setClickedCallback(onClickRefresh, this);
1044 1041
1045 mBtnReturnOwnerList = LLUICtrlFactory::getButtonByName(this, "Return objects..."); 1042 mBtnReturnOwnerList = getChild<LLButton>("Return objects...");
1046 mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this); 1043 mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this);
1047 1044
1048 LLUUID image_id; 1045 mIconAvatarOnline = LLUIImageList::getInstance()->getUIImage("icon_avatar_online.tga");
1049 1046 mIconAvatarOffline = LLUIImageList::getInstance()->getUIImage("icon_avatar_offline.tga");
1050 image_id.set( gViewerArt.getString("icon_avatar_online.tga") ); 1047 mIconGroup = LLUIImageList::getInstance()->getUIImage("icon_group.tga");
1051 mIconAvatarOnline = gImageList.getImage(image_id, MIPMAP_FALSE, TRUE);
1052
1053 image_id.set( gViewerArt.getString("icon_avatar_offline.tga") );
1054 mIconAvatarOffline = gImageList.getImage(image_id, MIPMAP_FALSE, TRUE);
1055
1056 image_id.set( gViewerArt.getString("icon_group.tga") );
1057 mIconGroup = gImageList.getImage(image_id, MIPMAP_FALSE, TRUE);
1058 1048
1059 mOwnerList = getChild<LLNameListCtrl>("owner list"); 1049 mOwnerList = getChild<LLNameListCtrl>("owner list");
1060 mOwnerList->sortByColumn(3, FALSE); 1050 mOwnerList->sortByColumn(3, FALSE);
@@ -1146,7 +1136,7 @@ void LLPanelLandObjects::refresh()
1146 1136
1147 // Can't have more than region max tasks, regardless of parcel 1137 // Can't have more than region max tasks, regardless of parcel
1148 // object bonus factor. 1138 // object bonus factor.
1149 LLViewerRegion* region = gParcelMgr->getSelectionRegion(); 1139 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
1150 if (region) 1140 if (region)
1151 { 1141 {
1152 S32 max_tasks_per_region = (S32)region->getMaxTasks(); 1142 S32 max_tasks_per_region = (S32)region->getMaxTasks();
@@ -1223,7 +1213,7 @@ void send_other_clean_time_message(S32 parcel_local_id, S32 other_clean_time)
1223{ 1213{
1224 LLMessageSystem *msg = gMessageSystem; 1214 LLMessageSystem *msg = gMessageSystem;
1225 1215
1226 LLViewerRegion* region = gParcelMgr->getSelectionRegion(); 1216 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
1227 if (!region) return; 1217 if (!region) return;
1228 1218
1229 msg->newMessageFast(_PREHASH_ParcelSetOtherCleanTime); 1219 msg->newMessageFast(_PREHASH_ParcelSetOtherCleanTime);
@@ -1242,7 +1232,7 @@ void send_return_objects_message(S32 parcel_local_id, S32 return_type,
1242{ 1232{
1243 LLMessageSystem *msg = gMessageSystem; 1233 LLMessageSystem *msg = gMessageSystem;
1244 1234
1245 LLViewerRegion* region = gParcelMgr->getSelectionRegion(); 1235 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
1246 if (!region) return; 1236 if (!region) return;
1247 1237
1248 msg->newMessageFast(_PREHASH_ParcelReturnObjects); 1238 msg->newMessageFast(_PREHASH_ParcelReturnObjects);
@@ -1306,8 +1296,8 @@ void LLPanelLandObjects::callbackReturnOwnerObjects(S32 option, void* userdata)
1306 } 1296 }
1307 } 1297 }
1308 1298
1309 gSelectMgr->unhighlightAll(); 1299 LLSelectMgr::getInstance()->unhighlightAll();
1310 gParcelMgr->sendParcelPropertiesUpdate( parcel ); 1300 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1311 lop->refresh(); 1301 lop->refresh();
1312} 1302}
1313 1303
@@ -1328,8 +1318,8 @@ void LLPanelLandObjects::callbackReturnGroupObjects(S32 option, void* userdata)
1328 send_return_objects_message(parcel->getLocalID(), RT_GROUP); 1318 send_return_objects_message(parcel->getLocalID(), RT_GROUP);
1329 } 1319 }
1330 } 1320 }
1331 gSelectMgr->unhighlightAll(); 1321 LLSelectMgr::getInstance()->unhighlightAll();
1332 gParcelMgr->sendParcelPropertiesUpdate( parcel ); 1322 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1333 lop->refresh(); 1323 lop->refresh();
1334} 1324}
1335 1325
@@ -1346,8 +1336,8 @@ void LLPanelLandObjects::callbackReturnOtherObjects(S32 option, void* userdata)
1346 send_return_objects_message(parcel->getLocalID(), RT_OTHER); 1336 send_return_objects_message(parcel->getLocalID(), RT_OTHER);
1347 } 1337 }
1348 } 1338 }
1349 gSelectMgr->unhighlightAll(); 1339 LLSelectMgr::getInstance()->unhighlightAll();
1350 gParcelMgr->sendParcelPropertiesUpdate( parcel ); 1340 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1351 lop->refresh(); 1341 lop->refresh();
1352} 1342}
1353 1343
@@ -1380,8 +1370,8 @@ void LLPanelLandObjects::callbackReturnOwnerList(S32 option, void* userdata)
1380 } 1370 }
1381 } 1371 }
1382 } 1372 }
1383 gSelectMgr->unhighlightAll(); 1373 LLSelectMgr::getInstance()->unhighlightAll();
1384 gParcelMgr->sendParcelPropertiesUpdate( parcel ); 1374 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
1385 self->refresh(); 1375 self->refresh();
1386} 1376}
1387 1377
@@ -1428,7 +1418,7 @@ void LLPanelLandObjects::onClickRefresh(void* userdata)
1428 LLParcel* parcel = self->mParcel->getParcel(); 1418 LLParcel* parcel = self->mParcel->getParcel();
1429 if (!parcel) return; 1419 if (!parcel) return;
1430 1420
1431 LLViewerRegion* region = gParcelMgr->getSelectionRegion(); 1421 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
1432 if (!region) return; 1422 if (!region) return;
1433 1423
1434 // ready the list for results 1424 // ready the list for results
@@ -1494,17 +1484,17 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
1494 LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, owner_id); 1484 LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, owner_id);
1495 if (is_group_owned) 1485 if (is_group_owned)
1496 { 1486 {
1497 row->addColumn(self->mIconGroup.notNull() ? self->mIconGroup->getID() : LLUUID::null); 1487 row->addColumn(self->mIconGroup);
1498 row->addColumn(OWNER_GROUP, FONT); 1488 row->addColumn(OWNER_GROUP, FONT);
1499 } 1489 }
1500 else if (is_online) 1490 else if (is_online)
1501 { 1491 {
1502 row->addColumn(self->mIconAvatarOnline.notNull() ? self->mIconAvatarOnline->getID() : LLUUID::null); 1492 row->addColumn(self->mIconAvatarOnline);
1503 row->addColumn(OWNER_ONLINE, FONT); 1493 row->addColumn(OWNER_ONLINE, FONT);
1504 } 1494 }
1505 else // offline 1495 else // offline
1506 { 1496 {
1507 row->addColumn(self->mIconAvatarOffline.notNull() ? self->mIconAvatarOffline->getID() : LLUUID::null); 1497 row->addColumn(self->mIconAvatarOffline);
1508 row->addColumn(OWNER_OFFLINE, FONT); 1498 row->addColumn(OWNER_OFFLINE, FONT);
1509 } 1499 }
1510 // Placeholder for name. 1500 // Placeholder for name.
@@ -1749,56 +1739,56 @@ BOOL LLPanelLandOptions::postBuild()
1749{ 1739{
1750 1740
1751 1741
1752 mCheckEditObjects = LLUICtrlFactory::getCheckBoxByName(this, "edit objects check"); 1742 mCheckEditObjects = getChild<LLCheckBoxCtrl>( "edit objects check");
1753 childSetCommitCallback("edit objects check", onCommitAny, this); 1743 childSetCommitCallback("edit objects check", onCommitAny, this);
1754 1744
1755 mCheckEditGroupObjects = LLUICtrlFactory::getCheckBoxByName(this, "edit group objects check"); 1745 mCheckEditGroupObjects = getChild<LLCheckBoxCtrl>( "edit group objects check");
1756 childSetCommitCallback("edit group objects check", onCommitAny, this); 1746 childSetCommitCallback("edit group objects check", onCommitAny, this);
1757 1747
1758 mCheckAllObjectEntry = LLUICtrlFactory::getCheckBoxByName(this, "all object entry check"); 1748 mCheckAllObjectEntry = getChild<LLCheckBoxCtrl>( "all object entry check");
1759 childSetCommitCallback("all object entry check", onCommitAny, this); 1749 childSetCommitCallback("all object entry check", onCommitAny, this);
1760 1750
1761 mCheckGroupObjectEntry = LLUICtrlFactory::getCheckBoxByName(this, "group object entry check"); 1751 mCheckGroupObjectEntry = getChild<LLCheckBoxCtrl>( "group object entry check");
1762 childSetCommitCallback("group object entry check", onCommitAny, this); 1752 childSetCommitCallback("group object entry check", onCommitAny, this);
1763 1753
1764 mCheckEditLand = LLUICtrlFactory::getCheckBoxByName(this, "edit land check"); 1754 mCheckEditLand = getChild<LLCheckBoxCtrl>( "edit land check");
1765 childSetCommitCallback("edit land check", onCommitAny, this); 1755 childSetCommitCallback("edit land check", onCommitAny, this);
1766 1756
1767 1757
1768 mCheckLandmark = LLUICtrlFactory::getCheckBoxByName(this, "check landmark"); 1758 mCheckLandmark = getChild<LLCheckBoxCtrl>( "check landmark");
1769 childSetCommitCallback("check landmark", onCommitAny, this); 1759 childSetCommitCallback("check landmark", onCommitAny, this);
1770 1760
1771 1761
1772 mCheckGroupScripts = LLUICtrlFactory::getCheckBoxByName(this, "check group scripts"); 1762 mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
1773 childSetCommitCallback("check group scripts", onCommitAny, this); 1763 childSetCommitCallback("check group scripts", onCommitAny, this);
1774 1764
1775 1765
1776 mCheckFly = LLUICtrlFactory::getCheckBoxByName(this, "check fly"); 1766 mCheckFly = getChild<LLCheckBoxCtrl>( "check fly");
1777 childSetCommitCallback("check fly", onCommitAny, this); 1767 childSetCommitCallback("check fly", onCommitAny, this);
1778 1768
1779 1769
1780 mCheckOtherScripts = LLUICtrlFactory::getCheckBoxByName(this, "check other scripts"); 1770 mCheckOtherScripts = getChild<LLCheckBoxCtrl>( "check other scripts");
1781 childSetCommitCallback("check other scripts", onCommitAny, this); 1771 childSetCommitCallback("check other scripts", onCommitAny, this);
1782 1772
1783 1773
1784 mCheckSafe = LLUICtrlFactory::getCheckBoxByName(this, "check safe"); 1774 mCheckSafe = getChild<LLCheckBoxCtrl>( "check safe");
1785 childSetCommitCallback("check safe", onCommitAny, this); 1775 childSetCommitCallback("check safe", onCommitAny, this);
1786 1776
1787 1777
1788 mPushRestrictionCtrl = LLUICtrlFactory::getCheckBoxByName(this, "PushRestrictCheck"); 1778 mPushRestrictionCtrl = getChild<LLCheckBoxCtrl>( "PushRestrictCheck");
1789 childSetCommitCallback("PushRestrictCheck", onCommitAny, this); 1779 childSetCommitCallback("PushRestrictCheck", onCommitAny, this);
1790 1780
1791 mCheckShowDirectory = LLUICtrlFactory::getCheckBoxByName(this, "ShowDirectoryCheck"); 1781 mCheckShowDirectory = getChild<LLCheckBoxCtrl>( "ShowDirectoryCheck");
1792 childSetCommitCallback("ShowDirectoryCheck", onCommitAny, this); 1782 childSetCommitCallback("ShowDirectoryCheck", onCommitAny, this);
1793 1783
1794 1784
1795 mCategoryCombo = LLUICtrlFactory::getComboBoxByName(this, "land category"); 1785 mCategoryCombo = getChild<LLComboBox>( "land category");
1796 childSetCommitCallback("land category", onCommitAny, this); 1786 childSetCommitCallback("land category", onCommitAny, this);
1797 1787
1798 mMatureCtrl = LLUICtrlFactory::getCheckBoxByName(this, "MatureCheck"); 1788 mMatureCtrl = getChild<LLCheckBoxCtrl>( "MatureCheck");
1799 childSetCommitCallback("MatureCheck", onCommitAny, this); 1789 childSetCommitCallback("MatureCheck", onCommitAny, this);
1800 1790
1801 mPublishHelpButton = LLUICtrlFactory::getButtonByName(this, "?"); 1791 mPublishHelpButton = getChild<LLButton>("?");
1802 mPublishHelpButton->setClickedCallback(onClickPublishHelp, this); 1792 mPublishHelpButton->setClickedCallback(onClickPublishHelp, this);
1803 1793
1804 1794
@@ -1847,17 +1837,17 @@ BOOL LLPanelLandOptions::postBuild()
1847 } 1837 }
1848 1838
1849 1839
1850 mLocationText = LLUICtrlFactory::getTextBoxByName(this, "landing_point"); 1840 mLocationText = getChild<LLTextBox>("landing_point");
1851 1841
1852 mSetBtn = LLUICtrlFactory::getButtonByName(this, "Set"); 1842 mSetBtn = getChild<LLButton>("Set");
1853 mSetBtn->setClickedCallback(onClickSet, this); 1843 mSetBtn->setClickedCallback(onClickSet, this);
1854 1844
1855 1845
1856 mClearBtn = LLUICtrlFactory::getButtonByName(this, "Clear"); 1846 mClearBtn = getChild<LLButton>("Clear");
1857 mClearBtn->setClickedCallback(onClickClear, this); 1847 mClearBtn->setClickedCallback(onClickClear, this);
1858 1848
1859 1849
1860 mLandingTypeCombo = LLUICtrlFactory::getComboBoxByName(this, "landing type"); 1850 mLandingTypeCombo = getChild<LLComboBox>( "landing type");
1861 childSetCommitCallback("landing type", onCommitAny, this); 1851 childSetCommitCallback("landing type", onCommitAny, this);
1862 1852
1863 return TRUE; 1853 return TRUE;
@@ -2031,12 +2021,12 @@ void LLPanelLandOptions::refresh()
2031// virtual 2021// virtual
2032void LLPanelLandOptions::draw() 2022void LLPanelLandOptions::draw()
2033{ 2023{
2034 LLParcel *parcel = gParcelMgr->getFloatingParcelSelection()->getParcel(); 2024 LLParcel *parcel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection()->getParcel();
2035 2025
2036 if(parcel) 2026 if(parcel)
2037 { 2027 {
2038 LLViewerRegion* region; 2028 LLViewerRegion* region;
2039 region = gParcelMgr->getSelectionRegion(); 2029 region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
2040 llassert(region); // Region should never be null. 2030 llassert(region); // Region should never be null.
2041 2031
2042 BOOL can_change_identity = region ? 2032 BOOL can_change_identity = region ?
@@ -2091,7 +2081,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
2091 S32 landing_type_index = self->mLandingTypeCombo->getCurrentIndex(); 2081 S32 landing_type_index = self->mLandingTypeCombo->getCurrentIndex();
2092 LLUUID snapshot_id = self->mSnapshotCtrl->getImageAssetID(); 2082 LLUUID snapshot_id = self->mSnapshotCtrl->getImageAssetID();
2093 LLViewerRegion* region; 2083 LLViewerRegion* region;
2094 region = gParcelMgr->getSelectionRegion(); 2084 region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
2095 2085
2096 if (!allow_other_scripts && region && region->getAllowDamage()) 2086 if (!allow_other_scripts && region && region->getAllowDamage())
2097 { 2087 {
@@ -2120,7 +2110,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
2120 parcel->setSnapshotID(snapshot_id); 2110 parcel->setSnapshotID(snapshot_id);
2121 2111
2122 // Send current parcel data upstream to server 2112 // Send current parcel data upstream to server
2123 gParcelMgr->sendParcelPropertiesUpdate( parcel ); 2113 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
2124 2114
2125 // Might have changed properties, so let's redraw! 2115 // Might have changed properties, so let's redraw!
2126 self->refresh(); 2116 self->refresh();
@@ -2135,7 +2125,7 @@ void LLPanelLandOptions::onClickSet(void* userdata)
2135 LLParcel* selected_parcel = self->mParcel->getParcel(); 2125 LLParcel* selected_parcel = self->mParcel->getParcel();
2136 if (!selected_parcel) return; 2126 if (!selected_parcel) return;
2137 2127
2138 LLParcel* agent_parcel = gParcelMgr->getAgentParcel(); 2128 LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
2139 if (!agent_parcel) return; 2129 if (!agent_parcel) return;
2140 2130
2141 if (agent_parcel->getLocalID() != selected_parcel->getLocalID()) 2131 if (agent_parcel->getLocalID() != selected_parcel->getLocalID())
@@ -2148,7 +2138,7 @@ void LLPanelLandOptions::onClickSet(void* userdata)
2148 selected_parcel->setUserLocation(pos_region); 2138 selected_parcel->setUserLocation(pos_region);
2149 selected_parcel->setUserLookAt(gAgent.getFrameAgent().getAtAxis()); 2139 selected_parcel->setUserLookAt(gAgent.getFrameAgent().getAtAxis());
2150 2140
2151 gParcelMgr->sendParcelPropertiesUpdate(selected_parcel); 2141 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate(selected_parcel);
2152 2142
2153 self->refresh(); 2143 self->refresh();
2154} 2144}
@@ -2165,7 +2155,7 @@ void LLPanelLandOptions::onClickClear(void* userdata)
2165 selected_parcel->setUserLocation(zero_vec); 2155 selected_parcel->setUserLocation(zero_vec);
2166 selected_parcel->setUserLookAt(zero_vec); 2156 selected_parcel->setUserLookAt(zero_vec);
2167 2157
2168 gParcelMgr->sendParcelPropertiesUpdate(selected_parcel); 2158 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate(selected_parcel);
2169 2159
2170 self->refresh(); 2160 self->refresh();
2171} 2161}
@@ -2173,8 +2163,8 @@ void LLPanelLandOptions::onClickClear(void* userdata)
2173// static 2163// static
2174void LLPanelLandOptions::onClickPublishHelp(void*) 2164void LLPanelLandOptions::onClickPublishHelp(void*)
2175{ 2165{
2176 LLViewerRegion* region = gParcelMgr->getSelectionRegion(); 2166 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
2177 LLParcel *parcel = gParcelMgr->getFloatingParcelSelection()->getParcel(); 2167 LLParcel *parcel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection()->getParcel();
2178 llassert(region); // Region should never be null. 2168 llassert(region); // Region should never be null.
2179 2169
2180 bool can_change_identity = region && parcel ? 2170 bool can_change_identity = region && parcel ?
@@ -2585,7 +2575,7 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
2585 parcel->setPassHours( pass_hours ); 2575 parcel->setPassHours( pass_hours );
2586 2576
2587 // Send current parcel data upstream to server 2577 // Send current parcel data upstream to server
2588 gParcelMgr->sendParcelPropertiesUpdate( parcel ); 2578 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
2589 2579
2590 // Might have changed properties, so let's redraw! 2580 // Might have changed properties, so let's redraw!
2591 self->refresh(); 2581 self->refresh();
@@ -2612,7 +2602,7 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const std::vector<std::string>& n
2612 if (parcel) 2602 if (parcel)
2613 { 2603 {
2614 parcel->addToAccessList(id, 0); 2604 parcel->addToAccessList(id, 0);
2615 gParcelMgr->sendParcelAccessListUpdate(AL_ACCESS); 2605 LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
2616 panelp->refresh(); 2606 panelp->refresh();
2617 } 2607 }
2618 } 2608 }
@@ -2635,7 +2625,7 @@ void LLPanelLandAccess::onClickRemoveAccess(void* data)
2635 const LLUUID& agent_id = item->getUUID(); 2625 const LLUUID& agent_id = item->getUUID();
2636 parcel->removeFromAccessList(agent_id); 2626 parcel->removeFromAccessList(agent_id);
2637 } 2627 }
2638 gParcelMgr->sendParcelAccessListUpdate(AL_ACCESS); 2628 LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
2639 panelp->refresh(); 2629 panelp->refresh();
2640 } 2630 }
2641 } 2631 }
@@ -2659,7 +2649,7 @@ void LLPanelLandAccess::callbackAvatarCBBanned(const std::vector<std::string>& n
2659 if (parcel) 2649 if (parcel)
2660 { 2650 {
2661 parcel->addToBanList(id, 0); 2651 parcel->addToBanList(id, 0);
2662 gParcelMgr->sendParcelAccessListUpdate(AL_BAN); 2652 LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
2663 panelp->refresh(); 2653 panelp->refresh();
2664 } 2654 }
2665 } 2655 }
@@ -2682,7 +2672,7 @@ void LLPanelLandAccess::onClickRemoveBanned(void* data)
2682 const LLUUID& agent_id = item->getUUID(); 2672 const LLUUID& agent_id = item->getUUID();
2683 parcel->removeFromBanList(agent_id); 2673 parcel->removeFromBanList(agent_id);
2684 } 2674 }
2685 gParcelMgr->sendParcelAccessListUpdate(AL_BAN); 2675 LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
2686 panelp->refresh(); 2676 panelp->refresh();
2687 } 2677 }
2688 } 2678 }
@@ -2709,7 +2699,7 @@ BOOL LLPanelLandCovenant::postBuild()
2709// virtual 2699// virtual
2710void LLPanelLandCovenant::refresh() 2700void LLPanelLandCovenant::refresh()
2711{ 2701{
2712 LLViewerRegion* region = gParcelMgr->getSelectionRegion(); 2702 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
2713 if(!region) return; 2703 if(!region) return;
2714 2704
2715 LLTextBox* region_name = getChild<LLTextBox>("region_name_text"); 2705 LLTextBox* region_name = getChild<LLTextBox>("region_name_text");