diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterexperiencepicker.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llfloaterexperiencepicker.h | 1 | ||||
-rwxr-xr-x | indra/newview/llfloaterregioninfo.cpp | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llfloaterexperiencepicker.cpp b/indra/newview/llfloaterexperiencepicker.cpp index fd2cb31ee4..a1b62648d6 100644 --- a/indra/newview/llfloaterexperiencepicker.cpp +++ b/indra/newview/llfloaterexperiencepicker.cpp @@ -458,11 +458,16 @@ bool LLFloaterExperiencePicker::FilterOverRating( const LLSD& experience ) return experience[LLExperienceCache::MATURITY].asInteger() > maturity; } -bool LLFloaterExperiencePicker::FilterWithProperty( const LLSD& experience, S32 prop ) +bool LLFloaterExperiencePicker::FilterWithProperty( const LLSD& experience, S32 prop) { return (experience[LLExperienceCache::PROPERTIES].asInteger() & prop) != 0; } +bool LLFloaterExperiencePicker::FilterWithoutProperty( const LLSD& experience, S32 prop ) +{ + return (experience[LLExperienceCache::PROPERTIES].asInteger() & prop) == 0; +} + void LLFloaterExperiencePicker::setDefaultFilters() { mFilters.clear(); diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h index 7f2083c6d9..ea0240d2ac 100644 --- a/indra/newview/llfloaterexperiencepicker.h +++ b/indra/newview/llfloaterexperiencepicker.h @@ -57,6 +57,7 @@ public: void setDefaultFilters(); static bool FilterWithProperty(const LLSD& experience, S32 prop); + static bool FilterWithoutProperty(const LLSD& experience, S32 prop); bool FilterOverRating(const LLSD& experience); virtual void draw(); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index edaca68da3..e1cfc036ca 100755 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3569,11 +3569,16 @@ bool LLPanelRegionExperiences::refreshFromRegion(LLViewerRegion* region) mAllowed->loading(); mAllowed->setReadonly(!allow_modify); + // remove grid-wide experiences mAllowed->addFilter(boost::bind(LLFloaterExperiencePicker::FilterWithProperty, _1, LLExperienceCache::PROPERTY_GRID)); + // and stuff only in another list mAllowed->addFilter(boost::bind(&LLPanelRegionExperiences::FilterExisting, this, _1)); mBlocked->loading(); mBlocked->setReadonly(!allow_modify); + // only grid-wide experiences + mBlocked->addFilter(boost::bind(LLFloaterExperiencePicker::FilterWithoutProperty, _1, LLExperienceCache::PROPERTY_GRID)); + // but not privileged ones mBlocked->addFilter(boost::bind(LLFloaterExperiencePicker::FilterWithProperty, _1, LLExperienceCache::PROPERTY_PRIVILEGED)); mBlocked->addFilter(boost::bind(&LLPanelRegionExperiences::FilterExisting, this, _1)); |