Added counter of experiences in trusted/allowed/blocked lists in Region/Estate floater for ACME-1435
parent
7d08e72b4d
commit
f45218ff32
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue