diff options
-rwxr-xr-x | indra/newview/llfloaterregioninfo.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llpanelexperiencelisteditor.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llpanelexperiencelisteditor.h | 1 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/strings.xml | 3 |
4 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 6d8f8f5587..7272fe79c7 100755 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3588,6 +3588,19 @@ void LLPanelRegionExperiences::processResponse( const LLSD& content ) mAllowed->setExperienceIds(content["allowed"]); mBlocked->setExperienceIds(content["blocked"]); mTrusted->setExperienceIds(content["trusted"]); + + if (!mAllowed->getReadonly()) + { + mAllowed->refreshExperienceCounter("RegionInfoAllowedExperiences"); + } + if (!mBlocked->getReadonly()) + { + mBlocked->refreshExperienceCounter("RegionInfoBlockedExperiences"); + } + if (!mTrusted->getReadonly()) + { + mTrusted->refreshExperienceCounter("RegionInfoTrustedExperiences"); + } } diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index 6d47673849..f01438b34e 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -36,6 +36,8 @@ #include "llscrolllistctrl.h" #include "llviewerregion.h" #include "llagent.h" +#include "lltextbox.h" +#include "lltrans.h" static LLPanelInjector<LLPanelExperienceListEditor> t_panel_experience_list_editor("panel_experience_list_editor"); @@ -211,6 +213,14 @@ void LLPanelExperienceListEditor::setReadonly( bool val ) checkButtonsEnabled(); } +void LLPanelExperienceListEditor::refreshExperienceCounter(std::string string_name) +{ + LLStringUtil::format_map_t args; + args["[EXPERIENCES]"] = llformat("%d", mItems->getItemCount()); + args["[MAXEXPERIENCES]"] = llformat("%d", ESTATE_MAX_EXPERIENCE_IDS); + getChild<LLTextBox>("text_name")->setText(LLTrans::getString(string_name, args)); +} + boost::signals2::connection LLPanelExperienceListEditor::setAddedCallback( list_changed_signal_t::slot_type cb ) { return mAddedCallback.connect(cb); diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h index 765db9acbc..b361748d29 100644 --- a/indra/newview/llpanelexperiencelisteditor.h +++ b/indra/newview/llpanelexperiencelisteditor.h @@ -62,6 +62,7 @@ public: bool getReadonly() const { return mReadonly; } void setReadonly(bool val); + void refreshExperienceCounter(std::string string_name); void addFilter(filter_function func){mFilters.push_back(func);} private: diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 7985997524..ea27d142b7 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3995,6 +3995,9 @@ Try enclosing path to the editor with double quotes. <string name="Admin_Experiences_Tab">ADMIN</string> <string name="Recent_Experiences_Tab">RECENT</string> <string name="Owned_Experiences_Tab">OWNED</string> + <string name="RegionInfoAllowedExperiences">Allowed Experiences: ([EXPERIENCES], max [MAXEXPERIENCES])</string> + <string name="RegionInfoBlockedExperiences">Blocked Experiences: ([EXPERIENCES], max [MAXEXPERIENCES])</string> + <string name="RegionInfoTrustedExperiences">Trusted Experiences: ([EXPERIENCES], max [MAXEXPERIENCES])</string> <string name="ExperiencePermission1">take over your controls</string> <string name="ExperiencePermission3">trigger animations on your avatar</string> <string name="ExperiencePermission4">attach to your avatar</string> |