summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelclassified.cpp
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-05-22 09:58:47 +0000
committerAdam Moss <moss@lindenlab.com>2009-05-22 09:58:47 +0000
commit9dfe0ca9a0228c4fa75c8a3e51840696cc6b4960 (patch)
tree3136e0a32cdcb1d55a4c3a5a67791ca128d947a5 /indra/newview/llpanelclassified.cpp
parent93cf3d89e51835dd2f61c32b16191ab724528055 (diff)
svn merge -r121194:121210
svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-1.23.onetwo-merge-1 QAR-1531 viewer 1.23rc1+1.23rc2 merge to trunk
Diffstat (limited to 'indra/newview/llpanelclassified.cpp')
-rw-r--r--indra/newview/llpanelclassified.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index afaaea28f0..9e4f9709a8 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -754,22 +754,18 @@ void LLPanelClassified::refresh()
mDescEditor->setEnabled(is_self);
//mPriceEditor->setEnabled(is_self);
mCategoryCombo->setEnabled(is_self);
+ mMatureCombo->setEnabled(is_self);
if( is_self )
{
if( mMatureCombo->getCurrentIndex() == 0 )
{
// It's a new panel.
- // PG regions must have PG classifieds. AO must have mature.
- // Only Mature can be PG or Mature.
+ // PG regions should have PG classifieds. AO should have mature.
- constrainAccessCombo();
+ setDefaultAccessCombo();
}
}
- else
- {
- mMatureCombo->setEnabled( FALSE );
- }
if (mAutoRenewCheck)
{
@@ -1007,7 +1003,7 @@ void LLPanelClassified::onClickSet(void* data)
self->mLocationEditor->setText(location_text);
self->mLocationChanged = true;
- self->constrainAccessCombo();
+ self->setDefaultAccessCombo();
// Set this to null so it updates on the next save.
self->mParcelID.setNull();
@@ -1137,35 +1133,22 @@ void LLFloaterPriceForListing::buttonCore(S32 button, void* data)
}
}
-void LLPanelClassified::constrainAccessCombo()
+void LLPanelClassified::setDefaultAccessCombo()
{
- // Location changed.
- // PG regions must have PG classifieds. AO must have mature.
- // Only Mature can be PG or Mature.
-
- bool pref_visible = TRUE;
+ // PG regions should have PG classifieds. AO should have mature.
- S32 force_access = MATURE_UNDEFINED;
LLViewerRegion *regionp = gAgent.getRegion();
switch( regionp->getSimAccess() )
{
case SIM_ACCESS_PG:
- force_access = PG_CONTENT;
+ mMatureCombo->setCurrentByIndex(PG_CONTENT);
break;
case SIM_ACCESS_ADULT:
- force_access = MATURE_CONTENT;
+ mMatureCombo->setCurrentByIndex(MATURE_CONTENT);
break;
default:
// You are free to move about the cabin.
break;
}
-
- if ( force_access != MATURE_UNDEFINED )
- {
- pref_visible = FALSE;
- mMatureCombo->setCurrentByIndex(force_access);
- }
-
- mMatureCombo->setEnabled(pref_visible);
}