From f45218ff32a20d1bd490fb9dc3951c4986bdd5ca Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 1 May 2014 22:57:04 +0100 Subject: Added counter of experiences in trusted/allowed/blocked lists in Region/Estate floater for ACME-1435 --- indra/newview/llfloaterregioninfo.cpp | 13 +++++++++++++ indra/newview/llpanelexperiencelisteditor.cpp | 10 ++++++++++ indra/newview/llpanelexperiencelisteditor.h | 1 + indra/newview/skins/default/xui/en/strings.xml | 3 +++ 4 files changed, 27 insertions(+) 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 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("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. ADMIN RECENT OWNED + Allowed Experiences: ([EXPERIENCES], max [MAXEXPERIENCES]) + Blocked Experiences: ([EXPERIENCES], max [MAXEXPERIENCES]) + Trusted Experiences: ([EXPERIENCES], max [MAXEXPERIENCES]) take over your controls trigger animations on your avatar attach to your avatar -- cgit v1.2.3