diff options
author | Dave Simmons <simon@lindenlab.com> | 2009-03-20 20:00:47 +0000 |
---|---|---|
committer | Dave Simmons <simon@lindenlab.com> | 2009-03-20 20:00:47 +0000 |
commit | 24b26d71ee01211aa796b8061b66ec06a133e4ce (patch) | |
tree | 96bffcd019c933ad3ebbfd5f096968108b22aab5 /indra/newview/llfloaterland.cpp | |
parent | 5dfd435872e36445dcc82f99443dfc5a7ee0805a (diff) |
svn merge -r113004:115000 svn+ssh://svn.lindenlab.com/svn/linden/branches/server/server-1.26
Merge latest 1.26 into trunk
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r-- | indra/newview/llfloaterland.cpp | 86 |
1 files changed, 61 insertions, 25 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index e0396e070c..dc18369bb6 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -41,6 +41,7 @@ #include "llfocusmgr.h" #include "llparcel.h" #include "message.h" +#include "lluserauth.h" #include "llagent.h" #include "llfloateravatarpicker.h" @@ -319,7 +320,9 @@ BOOL LLPanelLandGeneral::postBuild() mTextSalePending = getChild<LLTextBox>("SalePending"); mTextOwnerLabel = getChild<LLTextBox>("Owner:"); mTextOwner = getChild<LLTextBox>("OwnerText"); - + + mContentRating = getChild<LLTextBox>("ContentRatingText"); + mLandType = getChild<LLTextBox>("LandTypeText"); mBtnProfile = getChild<LLButton>("Profile..."); mBtnProfile->setClickedCallback(onClickProfile, this); @@ -445,6 +448,8 @@ void LLPanelLandGeneral::refresh() mCheckContributeWithDeed->setEnabled(FALSE); mTextOwner->setText(LLStringUtil::null); + mContentRating->setText(LLStringUtil::null); + mLandType->setText(LLStringUtil::null); mBtnProfile->setLabel(getString("profile_text")); mBtnProfile->setEnabled(FALSE); @@ -479,6 +484,12 @@ void LLPanelLandGeneral::refresh() { region_xfer = TRUE; } + + if (regionp) + { + mContentRating->setText(regionp->getSimAccessString()); + mLandType->setText(regionp->getSimProductName()); + } // estate owner/manager cannot edit other parts of the parcel BOOL estate_manager_sellable = !parcel->getAuctionID() @@ -1768,8 +1779,7 @@ BOOL LLPanelLandOptions::postBuild() mPublishHelpButton = getChild<LLButton>("?"); mPublishHelpButton->setClickedCallback(onClickPublishHelp, this); - - if (gAgent.isTeen()) + if (gAgent.wantsPGOnly()) { // Disable these buttons if they are PG (Teen) users mPublishHelpButton->setVisible(FALSE); @@ -1777,26 +1787,14 @@ BOOL LLPanelLandOptions::postBuild() mMatureCtrl->setVisible(FALSE); mMatureCtrl->setEnabled(FALSE); } - - // Load up the category list - //now in xml file - /* - S32 i; - for (i = 0; i < LLParcel::C_COUNT; i++) + + if (!gAgent.getAgentAccess().isInTransition()) { - LLParcel::ECategory cat = (LLParcel::ECategory)i; - - // Selecting Linden Location when you're not a god - // is also blocked on the server. - BOOL enabled = TRUE; - if (!gAgent.isGodlike() - && i == LLParcel::C_LINDEN) - { - enabled = FALSE; - } - - mCategoryCombo->add( LLParcel::getCategoryUIString(cat), ADD_BOTTOM, enabled ); - }*/ + // remove category for adult if we're post-transition + // (this code can go away, and the category can be removed from the xml, + // once we've completed the transition period for adult) + mCategoryCombo->remove(getString("adult_land_category_label")); + } mSnapshotCtrl = getChild<LLTextureCtrl>("snapshot_ctrl"); @@ -1969,11 +1967,9 @@ void LLPanelLandOptions::refresh() mSetBtn->setEnabled( can_change_landing_point ); mClearBtn->setEnabled( can_change_landing_point ); - mMatureCtrl->set(parcel->getMaturePublish()); - mMatureCtrl->setEnabled( can_change_identity ); mPublishHelpButton->setEnabled( can_change_identity ); - if (gAgent.isTeen()) + if (gAgent.wantsPGOnly()) { // Disable these buttons if they are PG (Teen) users mPublishHelpButton->setVisible(FALSE); @@ -1981,6 +1977,34 @@ void LLPanelLandOptions::refresh() mMatureCtrl->setVisible(FALSE); mMatureCtrl->setEnabled(FALSE); } + else + { + // not teen so fill in the data for the maturity control + mMatureCtrl->setVisible(TRUE); + mMatureCtrl->setLabel(getString("mature_check_mature")); + // they can see the checkbox, but its disposition depends on the + // state of the region + LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + if (regionp) + { + if (regionp->getSimAccess() == SIM_ACCESS_PG) + { + mMatureCtrl->setEnabled(FALSE); + mMatureCtrl->set(FALSE); + } + else if (regionp->getSimAccess() == SIM_ACCESS_MATURE) + { + mMatureCtrl->setEnabled(can_change_identity); + mMatureCtrl->set(parcel->getMaturePublish()); + } + else if (regionp->getSimAccess() == SIM_ACCESS_ADULT) + { + mMatureCtrl->setEnabled(FALSE); + mMatureCtrl->set(TRUE); + mMatureCtrl->setLabel(getString("mature_check_adult")); + } + } + } } } @@ -2749,6 +2773,18 @@ void LLPanelLandCovenant::refresh() region_name->setText(region->getName()); } + LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text"); + if (region_landtype) + { + region_landtype->setText(region->getSimProductName()); + } + + LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text"); + if (region_maturity) + { + region_maturity->setText(region->getSimAccessString()); + } + LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); if (resellable_clause) { |