diff options
author | Jacek Antonelli | 2009-05-24 02:59:02 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-05-24 02:59:08 -0500 |
commit | 811454f47ea1f3c5cb8971f0fed0959b18bd0747 (patch) | |
tree | 1b8689df2dc8857cdc5a956a5233d5bf94b5c8d7 /linden/indra/newview/llpanelclassified.cpp | |
parent | Second Life viewer sources 1.23.0-RC (diff) | |
download | meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.zip meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.gz meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.bz2 meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.xz |
Second Life viewer sources 1.23.1-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelclassified.cpp | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index afaaea2..a3ee93c 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp | |||
@@ -760,10 +760,9 @@ void LLPanelClassified::refresh() | |||
760 | if( mMatureCombo->getCurrentIndex() == 0 ) | 760 | if( mMatureCombo->getCurrentIndex() == 0 ) |
761 | { | 761 | { |
762 | // It's a new panel. | 762 | // It's a new panel. |
763 | // PG regions must have PG classifieds. AO must have mature. | 763 | // PG regions should have PG classifieds. AO should have mature. |
764 | // Only Mature can be PG or Mature. | ||
765 | 764 | ||
766 | constrainAccessCombo(); | 765 | setDefaultAccessCombo(); |
767 | } | 766 | } |
768 | } | 767 | } |
769 | else | 768 | else |
@@ -1007,7 +1006,7 @@ void LLPanelClassified::onClickSet(void* data) | |||
1007 | self->mLocationEditor->setText(location_text); | 1006 | self->mLocationEditor->setText(location_text); |
1008 | self->mLocationChanged = true; | 1007 | self->mLocationChanged = true; |
1009 | 1008 | ||
1010 | self->constrainAccessCombo(); | 1009 | self->setDefaultAccessCombo(); |
1011 | 1010 | ||
1012 | // Set this to null so it updates on the next save. | 1011 | // Set this to null so it updates on the next save. |
1013 | self->mParcelID.setNull(); | 1012 | self->mParcelID.setNull(); |
@@ -1137,35 +1136,22 @@ void LLFloaterPriceForListing::buttonCore(S32 button, void* data) | |||
1137 | } | 1136 | } |
1138 | } | 1137 | } |
1139 | 1138 | ||
1140 | void LLPanelClassified::constrainAccessCombo() | 1139 | void LLPanelClassified::setDefaultAccessCombo() |
1141 | { | 1140 | { |
1142 | // Location changed. | 1141 | // PG regions should have PG classifieds. AO should have mature. |
1143 | // PG regions must have PG classifieds. AO must have mature. | ||
1144 | // Only Mature can be PG or Mature. | ||
1145 | 1142 | ||
1146 | bool pref_visible = TRUE; | ||
1147 | |||
1148 | S32 force_access = MATURE_UNDEFINED; | ||
1149 | LLViewerRegion *regionp = gAgent.getRegion(); | 1143 | LLViewerRegion *regionp = gAgent.getRegion(); |
1150 | 1144 | ||
1151 | switch( regionp->getSimAccess() ) | 1145 | switch( regionp->getSimAccess() ) |
1152 | { | 1146 | { |
1153 | case SIM_ACCESS_PG: | 1147 | case SIM_ACCESS_PG: |
1154 | force_access = PG_CONTENT; | 1148 | mMatureCombo->setCurrentByIndex(PG_CONTENT); |
1155 | break; | 1149 | break; |
1156 | case SIM_ACCESS_ADULT: | 1150 | case SIM_ACCESS_ADULT: |
1157 | force_access = MATURE_CONTENT; | 1151 | mMatureCombo->setCurrentByIndex(MATURE_CONTENT); |
1158 | break; | 1152 | break; |
1159 | default: | 1153 | default: |
1160 | // You are free to move about the cabin. | 1154 | // You are free to move about the cabin. |
1161 | break; | 1155 | break; |
1162 | } | 1156 | } |
1163 | |||
1164 | if ( force_access != MATURE_UNDEFINED ) | ||
1165 | { | ||
1166 | pref_visible = FALSE; | ||
1167 | mMatureCombo->setCurrentByIndex(force_access); | ||
1168 | } | ||
1169 | |||
1170 | mMatureCombo->setEnabled(pref_visible); | ||
1171 | } | 1157 | } |