summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llmessage/llregionflags.h2
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp1659
-rw-r--r--indra/newview/llfloaterregioninfo.h94
-rw-r--r--indra/newview/llnamelistctrl.cpp54
-rw-r--r--indra/newview/llnamelistctrl.h4
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml70
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_access.xml397
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_estate.xml220
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
11 files changed, 1529 insertions, 978 deletions
diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h
index d3791ef4d1..e1ccd333f1 100644
--- a/indra/llmessage/llregionflags.h
+++ b/indra/llmessage/llregionflags.h
@@ -166,7 +166,7 @@ const U32 ESTATE_ACCESS_MANAGER_REMOVE = 1U << 9;
const U32 ESTATE_ACCESS_NO_REPLY = 1U << 10;
const U32 ESTATE_ACCESS_FAILED_BAN_ESTATE_MANAGER = 1U << 11;
-const S32 ESTATE_MAX_MANAGERS = 10;
+const S32 ESTATE_MAX_MANAGERS = 15;
const S32 ESTATE_MAX_ACCESS_IDS = 500; // max for access, banned
const S32 ESTATE_MAX_GROUP_IDS = (S32) ESTATE_ACCESS_MAX_ENTRIES_PER_PACKET;
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index d4bda08b51..91ff57278e 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-5.1.8
+5.2.0
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index af68a2aae1..25f1fb8c13 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -98,10 +98,13 @@
#include "llexperiencecache.h"
#include "llpanelexperiences.h"
#include "llcorehttputil.h"
+#include "llavatarnamecache.h"
const S32 TERRAIN_TEXTURE_COUNT = 4;
const S32 CORNER_COUNT = 4;
+const U32 MAX_LISTED_NAMES = 100;
+
#define TMP_DISABLE_WLES // STORM-1180
///----------------------------------------------------------------------------
@@ -207,6 +210,11 @@ BOOL LLFloaterRegionInfo::postBuild()
panel->buildFromFile("panel_region_estate.xml");
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
+ panel = new LLPanelEstateAccess;
+ mInfoPanels.push_back(panel);
+ panel->buildFromFile("panel_region_access.xml");
+ mTab->addTabPanel(panel);
+
panel = new LLPanelEstateCovenant;
mInfoPanels.push_back(panel);
panel->buildFromFile("panel_region_covenant.xml");
@@ -269,6 +277,19 @@ void LLFloaterRegionInfo::onOpen(const LLSD& key)
refreshFromRegion(gAgent.getRegion());
requestRegionInfo();
requestMeshRezInfo();
+
+ if (!mGodLevelChangeSlot.connected())
+ {
+ mGodLevelChangeSlot = gAgent.registerGodLevelChanageListener(boost::bind(&LLFloaterRegionInfo::onGodLevelChange, this, _1));
+ }
+}
+
+void LLFloaterRegionInfo::onClose(bool app_quitting)
+{
+ if (mGodLevelChangeSlot.connected())
+ {
+ mGodLevelChangeSlot.disconnect();
+ }
}
// static
@@ -280,6 +301,7 @@ void LLFloaterRegionInfo::requestRegionInfo()
tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("Access")->setCtrlsEnabled(FALSE);
// Must allow anyone to request the RegionInfo data
// so non-owners/non-gods can see the values.
@@ -307,8 +329,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
LLPanelEstateInfo::initDispatch(dispatch);
}
- LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
- LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
+ LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
// unpack the message
std::string request;
@@ -324,7 +345,10 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
//dispatch the message
dispatch.dispatch(request, invoice, strings);
- panel->updateControls(gAgent.getRegion());
+ if (panel)
+ {
+ panel->updateControls(gAgent.getRegion());
+ }
}
@@ -464,6 +488,16 @@ LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate()
}
// static
+LLPanelEstateAccess* LLFloaterRegionInfo::getPanelAccess()
+{
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
+ if (!floater) return NULL;
+ LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
+ LLPanelEstateAccess* panel = (LLPanelEstateAccess*)tab->getChild<LLPanel>("Access");
+ return panel;
+}
+
+// static
LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant()
{
LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
@@ -517,6 +551,7 @@ void LLFloaterRegionInfo::disableTabCtrls()
tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(FALSE);
tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
+ tab->getChild<LLPanel>("Access")->setCtrlsEnabled(FALSE);
}
void LLFloaterRegionInfo::onTabSelected(const LLSD& param)
@@ -567,6 +602,15 @@ void LLFloaterRegionInfo::disableTopButtons()
getChildView("top_scripts_btn")->setEnabled(false);
}
+void LLFloaterRegionInfo::onGodLevelChange(U8 god_level)
+{
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
+ if (floater && floater->getVisible())
+ {
+ refreshFromRegion(gAgent.getRegion());
+ }
+}
+
///----------------------------------------------------------------------------
/// Local class implementation
///----------------------------------------------------------------------------
@@ -1522,11 +1566,7 @@ LLPanelEstateInfo::LLPanelEstateInfo()
void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
{
std::string name;
-
-// name.assign("setowner");
-// static LLDispatchSetEstateOwner set_owner;
-// dispatch.addHandler(name, &set_owner);
-
+
name.assign("estateupdateinfo");
static LLDispatchEstateUpdateInfo estate_update_info;
dispatch.addHandler(name, &estate_update_info);
@@ -1535,7 +1575,6 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
static LLDispatchSetEstateAccess set_access;
dispatch.addHandler(name, &set_access);
-
name.assign("setexperience");
static LLDispatchSetEstateExperience set_experience;
dispatch.addHandler(name, &set_experience);
@@ -1544,124 +1583,6 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
}
//---------------------------------------------------------------------------
-// Add/Remove estate access button callbacks
-//---------------------------------------------------------------------------
-void LLPanelEstateInfo::onClickAddAllowedAgent()
-{
- LLCtrlListInterface *list = childGetListInterface("allowed_avatar_name_list");
- if (!list) return;
- if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
- {
- //args
-
- LLSD args;
- args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- LLNotificationsUtil::add("MaxAllowedAgentOnRegion", args);
- return;
- }
- accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd");
-}
-
-void LLPanelEstateInfo::onClickRemoveAllowedAgent()
-{
- accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list");
-}
-
-void LLPanelEstateInfo::onClickAddAllowedGroup()
-{
- LLCtrlListInterface *list = childGetListInterface("allowed_group_name_list");
- if (!list) return;
- if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
- {
- LLSD args;
- args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- LLNotificationsUtil::add("MaxAllowedGroupsOnRegion", args);
- return;
- }
-
- LLNotification::Params params("ChangeLindenAccess");
- params.functor.function(boost::bind(&LLPanelEstateInfo::addAllowedGroup, this, _1, _2));
- if (isLindenEstate())
- {
- LLNotifications::instance().add(params);
- }
- else
- {
- LLNotifications::instance().forceResponse(params, 0);
- }
-}
-
-bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option != 0) return false;
-
- LLFloater* parent_floater = gFloaterView->getParentFloater(this);
-
- LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(gAgent.getID()));
- if (widget)
- {
- widget->removeNoneOption();
- widget->setSelectGroupCallback(boost::bind(&LLPanelEstateInfo::addAllowedGroup2, this, _1));
- if (parent_floater)
- {
- LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget);
- widget->setOrigin(new_rect.mLeft, new_rect.mBottom);
- parent_floater->addDependentFloater(widget);
- }
- }
-
- return false;
-}
-
-void LLPanelEstateInfo::onClickRemoveAllowedGroup()
-{
- accessRemoveCore(ESTATE_ACCESS_ALLOWED_GROUP_REMOVE, "EstateAllowedGroupRemove", "allowed_group_name_list");
-}
-
-void LLPanelEstateInfo::onClickAddBannedAgent()
-{
- LLCtrlListInterface *list = childGetListInterface("banned_avatar_name_list");
- if (!list) return;
- if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
- {
- LLSD args;
- args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- LLNotificationsUtil::add("MaxBannedAgentsOnRegion", args);
- return;
- }
- accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd");
-}
-
-void LLPanelEstateInfo::onClickRemoveBannedAgent()
-{
- accessRemoveCore(ESTATE_ACCESS_BANNED_AGENT_REMOVE, "EstateBannedAgentRemove", "banned_avatar_name_list");
-}
-
-// static
-void LLPanelEstateInfo::onClickAddEstateManager()
-{
- LLCtrlListInterface *list = childGetListInterface("estate_manager_name_list");
- if (!list) return;
- if (list->getItemCount() >= ESTATE_MAX_MANAGERS)
- { // Tell user they can't add more managers
- LLSD args;
- args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS);
- LLNotificationsUtil::add("MaxManagersOnRegion", args);
- }
- else
- { // Go pick managers to add
- accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
- }
-}
-
-// static
-void LLPanelEstateInfo::onClickRemoveEstateManager()
-{
- accessRemoveCore(ESTATE_ACCESS_MANAGER_REMOVE, "EstateManagerRemove", "estate_manager_name_list");
-}
-
-//---------------------------------------------------------------------------
// Kick from estate methods
//---------------------------------------------------------------------------
@@ -1788,346 +1709,6 @@ struct LLEstateAccessChangeInfo
uuid_vec_t mAgentOrGroupIDs; // List of agent IDs to apply to this change
};
-// Special case callback for groups, since it has different callback format than names
-void LLPanelEstateInfo::addAllowedGroup2(LLUUID id)
-{
- LLSD payload;
- payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
- payload["dialog_name"] = "EstateAllowedGroupAdd";
- payload["allowed_ids"].append(id);
-
- LLSD args;
- args["ALL_ESTATES"] = all_estates_text();
-
- LLNotification::Params params("EstateAllowedGroupAdd");
- params.payload(payload)
- .substitutions(args)
- .functor.function(accessCoreConfirm);
- if (isLindenEstate())
- {
- LLNotifications::instance().forceResponse(params, 0);
- }
- else
- {
- LLNotifications::instance().add(params);
- }
-}
-
-// static
-void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dialog_name)
-{
- LLSD payload;
- payload["operation"] = (S32)operation_flag;
- payload["dialog_name"] = dialog_name;
- // agent id filled in after avatar picker
-
- LLNotification::Params params("ChangeLindenAccess");
- params.payload(payload)
- .functor.function(accessAddCore2);
-
- if (isLindenEstate())
- {
- LLNotifications::instance().add(params);
- }
- else
- {
- // same as clicking "OK"
- LLNotifications::instance().forceResponse(params, 0);
- }
-}
-
-// static
-bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option != 0)
- {
- // abort change
- return false;
- }
-
- LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]);
- //Get parent floater name
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- LLFloater* parent_floater = panel ? gFloaterView->getParentFloater(panel) : NULL;
- const std::string& parent_floater_name = parent_floater ? parent_floater->getName() : "";
-
- //Determine the button that triggered opening of the avatar picker
- //(so that a shadow frustum from the button to the avatar picker can be created)
- LLView * button = NULL;
- switch(change_info->mOperationFlag)
- {
- case ESTATE_ACCESS_ALLOWED_AGENT_ADD:
- button = panel->findChild<LLButton>("add_allowed_avatar_btn");
- break;
-
- case ESTATE_ACCESS_BANNED_AGENT_ADD:
- button = panel->findChild<LLButton>("add_banned_avatar_btn");
- break;
-
- case ESTATE_ACCESS_MANAGER_ADD:
- button = panel->findChild<LLButton>("add_estate_manager_btn");
- break;
- }
-
- // avatar picker yes multi-select, yes close-on-select
- LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::accessAddCore3, _1, (void*)change_info),
- TRUE, TRUE, FALSE, parent_floater_name, button);
-
- //Allows the closed parent floater to close the child floater (avatar picker)
- if (child_floater)
- {
- parent_floater->addDependentFloater(child_floater);
- }
-
- return false;
-}
-
-// static
-void LLPanelEstateInfo::accessAddCore3(const uuid_vec_t& ids, void* data)
-{
- LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data;
- if (!change_info) return;
- if (ids.empty())
- {
- // User didn't select a name.
- delete change_info;
- change_info = NULL;
- return;
- }
- // User did select a name.
- change_info->mAgentOrGroupIDs = ids;
- // Can't put estate owner on ban list
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- if (!panel) return;
- LLViewerRegion* region = gAgent.getRegion();
- if (!region) return;
-
- if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD)
- {
- LLCtrlListInterface *list = panel->childGetListInterface("allowed_avatar_name_list");
- int currentCount = (list ? list->getItemCount() : 0);
- if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
- {
- LLSD args;
- args["NUM_ADDED"] = llformat("%d",ids.size());
- args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeAllowedAgents");
- args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
- LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
- delete change_info;
- return;
- }
- }
- if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD)
- {
- LLCtrlListInterface *list = panel->childGetListInterface("banned_avatar_name_list");
- int currentCount = (list ? list->getItemCount() : 0);
- if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
- {
- LLSD args;
- args["NUM_ADDED"] = llformat("%d",ids.size());
- args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeBannedAgents");
- args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
- LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
- delete change_info;
- return;
- }
- }
-
- LLSD args;
- args["ALL_ESTATES"] = all_estates_text();
-
- LLNotification::Params params(change_info->mDialogName);
- params.substitutions(args)
- .payload(change_info->asLLSD())
- .functor.function(accessCoreConfirm);
-
- if (isLindenEstate())
- {
- // just apply to this estate
- LLNotifications::instance().forceResponse(params, 0);
- }
- else
- {
- // ask if this estate or all estates with this owner
- LLNotifications::instance().add(params);
- }
-}
-
-// static
-void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name)
-{
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- if (!panel) return;
- LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>(list_ctrl_name);
- if (!name_list) return;
-
- std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected();
- if (list_vector.size() == 0)
- return;
-
- LLSD payload;
- payload["operation"] = (S32)operation_flag;
- payload["dialog_name"] = dialog_name;
-
- for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin();
- iter != list_vector.end();
- iter++)
- {
- LLScrollListItem *item = (*iter);
- payload["allowed_ids"].append(item->getUUID());
- }
-
- LLNotification::Params params("ChangeLindenAccess");
- params.payload(payload)
- .functor.function(accessRemoveCore2);
-
- if (isLindenEstate())
- {
- // warn on change linden estate
- LLNotifications::instance().add(params);
- }
- else
- {
- // just proceed, as if clicking OK
- LLNotifications::instance().forceResponse(params, 0);
- }
-}
-
-// static
-bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option != 0)
- {
- // abort
- return false;
- }
-
- // If Linden estate, can only apply to "this" estate, not all estates
- // owned by NULL.
- if (isLindenEstate())
- {
- accessCoreConfirm(notification, response);
- }
- else
- {
- LLSD args;
- args["ALL_ESTATES"] = all_estates_text();
- LLNotificationsUtil::add(notification["payload"]["dialog_name"],
- args,
- notification["payload"],
- accessCoreConfirm);
- }
- return false;
-}
-
-// Used for both access add and remove operations, depending on the mOperationFlag
-// passed in (ESTATE_ACCESS_BANNED_AGENT_ADD, ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, etc.)
-// static
-bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger();
-
- LLViewerRegion* region = gAgent.getRegion();
-
- LLSD::array_const_iterator end_it = notification["payload"]["allowed_ids"].endArray();
-
- for (LLSD::array_const_iterator iter = notification["payload"]["allowed_ids"].beginArray();
- iter != end_it;
- iter++)
- {
- U32 flags = originalFlags;
- if (iter + 1 != end_it)
- flags |= ESTATE_ACCESS_NO_REPLY;
-
- const LLUUID id = iter->asUUID();
- if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD)
- && region && (region->getOwner() == id))
- {
- LLNotificationsUtil::add("OwnerCanNotBeDenied");
- break;
- }
- switch(option)
- {
- case 0:
- // This estate
- sendEstateAccessDelta(flags, id);
- break;
- case 1:
- {
- // All estates, either than I own or manage for this owner.
- // This will be verified on simulator. JC
- if (!region) break;
- if (region->getOwner() == gAgent.getID()
- || gAgent.isGodlike())
- {
- flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES;
- sendEstateAccessDelta(flags, id);
- }
- else if (region->isEstateManager())
- {
- flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES;
- sendEstateAccessDelta(flags, id);
- }
- break;
- }
- case 2:
- default:
- break;
- }
- }
- return false;
-}
-
-// key = "estateaccessdelta"
-// str(estate_id) will be added to front of list by forward_EstateOwnerRequest_to_dataserver
-// str[0] = str(agent_id) requesting the change
-// str[1] = str(flags) (ESTATE_ACCESS_DELTA_*)
-// str[2] = str(agent_id) to add or remove
-// static
-void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_group_id)
-{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("EstateOwnerMessage");
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
-
- msg->nextBlock("MethodData");
- msg->addString("Method", "estateaccessdelta");
- msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
-
- std::string buf;
- gAgent.getID().toString(buf);
- msg->nextBlock("ParamList");
- msg->addString("Parameter", buf);
-
- buf = llformat("%u", flags);
- msg->nextBlock("ParamList");
- msg->addString("Parameter", buf);
-
- agent_or_group_id.toString(buf);
- msg->nextBlock("ParamList");
- msg->addString("Parameter", buf);
-
-
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
-
- if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE |
- ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_BANNED_AGENT_REMOVE))
- {
-
- panel->clearAccessLists();
- }
-
- gAgent.sendReliableMessage();
-}
-
// static
void LLPanelEstateInfo::updateEstateOwnerName(const std::string& name)
{
@@ -2157,36 +1738,9 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
getChildView("apply_btn")->setEnabled(FALSE);
- BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
- BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE;
- BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
- BOOL has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? TRUE : FALSE;
-
- getChildView("add_allowed_avatar_btn")->setEnabled(god || owner || manager);
- getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && (god || owner || manager));
- getChildView("allowed_avatar_name_list")->setEnabled(god || owner || manager);
-
- getChildView("add_allowed_group_btn")->setEnabled(god || owner || manager);
- getChildView("remove_allowed_group_btn")->setEnabled(has_allowed_group && (god || owner || manager) );
- getChildView("allowed_group_name_list")->setEnabled(god || owner || manager);
-
- // Can't ban people from mainland, orientation islands, etc. because this
- // creates much network traffic and server load.
- // Disable their accounts in CSR tool instead.
- bool linden_estate = isLindenEstate();
- bool enable_ban = (god || owner || manager) && !linden_estate;
- getChildView("add_banned_avatar_btn")->setEnabled(enable_ban);
- getChildView("remove_banned_avatar_btn")->setEnabled(has_banned_agent && enable_ban);
- getChildView("banned_avatar_name_list")->setEnabled(god || owner || manager);
-
getChildView("message_estate_btn")->setEnabled(god || owner || manager);
getChildView("kick_user_from_estate_btn")->setEnabled(god || owner || manager);
- // estate managers can't add estate managers
- getChildView("add_estate_manager_btn")->setEnabled(god || owner);
- getChildView("remove_estate_manager_btn")->setEnabled(has_estate_manager && (god || owner));
- getChildView("estate_manager_name_list")->setEnabled(god || owner);
-
refresh();
}
@@ -2208,10 +1762,6 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
//integers.push_back(LLFloaterRegionInfo::());::getPanelEstate();
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- panel->clearAccessLists();
-
-
sendEstateOwnerMessage(gMessageSystem, "getinfo", invoice, strings);
refresh();
@@ -2242,49 +1792,6 @@ BOOL LLPanelEstateInfo::postBuild()
initCtrl("voice_chat_check");
initCtrl("parcel_access_override");
- getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
- LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
- if (avatar_name_list)
- {
- avatar_name_list->setCommitOnSelectionChange(TRUE);
- avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
- }
-
- childSetAction("add_allowed_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickAddAllowedAgent, this));
- childSetAction("remove_allowed_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveAllowedAgent, this));
-
- getChild<LLUICtrl>("allowed_group_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
- LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list");
- if (group_name_list)
- {
- group_name_list->setCommitOnSelectionChange(TRUE);
- group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
- }
-
- getChild<LLUICtrl>("add_allowed_group_btn")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onClickAddAllowedGroup, this));
- childSetAction("remove_allowed_group_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveAllowedGroup, this));
-
- getChild<LLUICtrl>("banned_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
- LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
- if (banned_name_list)
- {
- banned_name_list->setCommitOnSelectionChange(TRUE);
- banned_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
- }
-
- childSetAction("add_banned_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickAddBannedAgent, this));
- childSetAction("remove_banned_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveBannedAgent, this));
-
- getChild<LLUICtrl>("estate_manager_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
- LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list");
- if (manager_name_list)
- {
- manager_name_list->setCommitOnSelectionChange(TRUE);
- manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
- }
-
- childSetAction("add_estate_manager_btn", boost::bind(&LLPanelEstateInfo::onClickAddEstateManager, this));
- childSetAction("remove_estate_manager_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveEstateManager, this));
childSetAction("message_estate_btn", boost::bind(&LLPanelEstateInfo::onClickMessageEstate, this));
childSetAction("kick_user_from_estate_btn", boost::bind(&LLPanelEstateInfo::onClickKickUser, this));
@@ -2429,22 +1936,6 @@ void LLPanelEstateInfo::setOwnerName(const std::string& name)
getChild<LLUICtrl>("estate_owner")->setValue(LLSD(name));
}
-void LLPanelEstateInfo::clearAccessLists()
-{
- LLNameListCtrl* name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
- if (name_list)
- {
- name_list->deleteAllItems();
- }
-
- name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
- if (name_list)
- {
- name_list->deleteAllItems();
- }
- updateControls(gAgent.getRegion());
-}
-
// static
void LLPanelEstateInfo::onClickMessageEstate(void* userdata)
{
@@ -2858,182 +2349,18 @@ bool LLDispatchEstateUpdateInfo::operator()(
return true;
}
-
-// key = "setaccess"
-// strings[0] = str(estate_id)
-// strings[1] = str(packed_access_lists)
-// strings[2] = str(num allowed agent ids)
-// strings[3] = str(num allowed group ids)
-// strings[4] = str(num banned agent ids)
-// strings[5] = str(num estate manager agent ids)
-// strings[6] = bin(uuid)
-// strings[7] = bin(uuid)
-// strings[8] = bin(uuid)
-// ...
bool LLDispatchSetEstateAccess::operator()(
- const LLDispatcher* dispatcher,
- const std::string& key,
- const LLUUID& invoice,
- const sparam_t& strings)
+ const LLDispatcher* dispatcher,
+ const std::string& key,
+ const LLUUID& invoice,
+ const sparam_t& strings)
{
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- if (!panel) return true;
-
- S32 index = 1; // skip estate_id
- U32 access_flags = strtoul(strings[index++].c_str(), NULL,10);
- S32 num_allowed_agents = strtol(strings[index++].c_str(), NULL, 10);
- S32 num_allowed_groups = strtol(strings[index++].c_str(), NULL, 10);
- S32 num_banned_agents = strtol(strings[index++].c_str(), NULL, 10);
- S32 num_estate_managers = strtol(strings[index++].c_str(), NULL, 10);
-
- // sanity ckecks
- if (num_allowed_agents > 0
- && !(access_flags & ESTATE_ACCESS_ALLOWED_AGENTS))
- {
- LL_WARNS() << "non-zero count for allowed agents, but no corresponding flag" << LL_ENDL;
- }
- if (num_allowed_groups > 0
- && !(access_flags & ESTATE_ACCESS_ALLOWED_GROUPS))
- {
- LL_WARNS() << "non-zero count for allowed groups, but no corresponding flag" << LL_ENDL;
- }
- if (num_banned_agents > 0
- && !(access_flags & ESTATE_ACCESS_BANNED_AGENTS))
- {
- LL_WARNS() << "non-zero count for banned agents, but no corresponding flag" << LL_ENDL;
- }
- if (num_estate_managers > 0
- && !(access_flags & ESTATE_ACCESS_MANAGERS))
- {
- LL_WARNS() << "non-zero count for managers, but no corresponding flag" << LL_ENDL;
- }
-
- // grab the UUID's out of the string fields
- if (access_flags & ESTATE_ACCESS_ALLOWED_AGENTS)
- {
- LLNameListCtrl* allowed_agent_name_list;
- allowed_agent_name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list");
-
- int totalAllowedAgents = num_allowed_agents;
-
- if (allowed_agent_name_list)
- {
- totalAllowedAgents += allowed_agent_name_list->getItemCount();
- }
-
- LLStringUtil::format_map_t args;
- args["[ALLOWEDAGENTS]"] = llformat ("%d", totalAllowedAgents);
- args["[MAXACCESS]"] = llformat ("%d", ESTATE_MAX_ACCESS_IDS);
- std::string msg = LLTrans::getString("RegionInfoAllowedResidents", args);
- panel->getChild<LLUICtrl>("allow_resident_label")->setValue(LLSD(msg));
-
- if (allowed_agent_name_list)
- {
- // Don't sort these as we add them, sort them when we are done.
- allowed_agent_name_list->clearSortOrder();
- for (S32 i = 0; i < num_allowed_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
- {
- LLUUID id;
- memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
- allowed_agent_name_list->addNameItem(id);
- }
- allowed_agent_name_list->sortByName(TRUE);
- }
- }
-
- if (access_flags & ESTATE_ACCESS_ALLOWED_GROUPS)
- {
- LLNameListCtrl* allowed_group_name_list;
- allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
-
- LLStringUtil::format_map_t args;
- args["[ALLOWEDGROUPS]"] = llformat ("%d", num_allowed_groups);
- args["[MAXACCESS]"] = llformat ("%d", ESTATE_MAX_GROUP_IDS);
- std::string msg = LLTrans::getString("RegionInfoAllowedGroups", args);
- panel->getChild<LLUICtrl>("allow_group_label")->setValue(LLSD(msg));
-
- if (allowed_group_name_list)
- {
- // Don't sort these as we add them, sort them when we are done.
- allowed_group_name_list->clearSortOrder();
- allowed_group_name_list->deleteAllItems();
- for (S32 i = 0; i < num_allowed_groups && i < ESTATE_MAX_GROUP_IDS; i++)
- {
- LLUUID id;
- memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
- allowed_group_name_list->addGroupNameItem(id);
- }
- allowed_group_name_list->sortByName(TRUE);
- }
- }
-
- if (access_flags & ESTATE_ACCESS_BANNED_AGENTS)
- {
- LLNameListCtrl* banned_agent_name_list;
- banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
-
- int totalBannedAgents = num_banned_agents;
-
- if (banned_agent_name_list)
- {
- totalBannedAgents += banned_agent_name_list->getItemCount();
- }
-
-
- LLStringUtil::format_map_t args;
- args["[BANNEDAGENTS]"] = llformat("%d", totalBannedAgents);
- args["[MAXBANNED]"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
- std::string msg = LLTrans::getString("RegionInfoBannedResidents", args);
- panel->getChild<LLUICtrl>("ban_resident_label")->setValue(LLSD(msg));
-
- if (banned_agent_name_list)
- {
- // Don't sort these as we add them, sort them when we are done.
- banned_agent_name_list->clearSortOrder();
-
- for (S32 i = 0; i < num_banned_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
- {
- LLUUID id;
- memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
- banned_agent_name_list->addNameItem(id);
- }
- banned_agent_name_list->sortByName(TRUE);
- }
- }
-
- if (access_flags & ESTATE_ACCESS_MANAGERS)
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (panel && panel->getPendingUpdate())
{
- LLStringUtil::format_map_t args;
- args["[ESTATEMANAGERS]"] = llformat("%d", num_estate_managers);
- args["[MAXMANAGERS]"] = llformat("%d", ESTATE_MAX_MANAGERS);
- std::string msg = LLTrans::getString("RegionInfoEstateManagers", args);
- panel->getChild<LLUICtrl>("estate_manager_label")->setValue(LLSD(msg));
-
- LLNameListCtrl* estate_manager_name_list =
- panel->getChild<LLNameListCtrl>("estate_manager_name_list");
- if (estate_manager_name_list)
- {
- // Don't sort these as we add them, sort them when we are done.
- estate_manager_name_list->clearSortOrder();
-
- estate_manager_name_list->deleteAllItems(); // Clear existing entries
-
- // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't
- // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused,
- // and they can still remove them.
- for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++)
- {
- LLUUID id;
- memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
- estate_manager_name_list->addNameItem(id);
- }
- estate_manager_name_list->sortByName(TRUE);
- }
+ panel->setPendingUpdate(false);
+ panel->updateLists();
}
-
- // Update the buttons which may change based on the list contents but also needs to account for general access features.
- panel->updateControls(gAgent.getRegion());
-
return true;
}
@@ -3942,3 +3269,877 @@ void LLPanelRegionExperiences::itemChanged( U32 event_type, const LLUUID& id )
onChangeAnything();
}
+
+
+LLPanelEstateAccess::LLPanelEstateAccess()
+: LLPanelRegionInfo(), mPendingUpdate(false)
+{}
+
+BOOL LLPanelEstateAccess::postBuild()
+{
+ getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
+ LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
+ if (avatar_name_list)
+ {
+ avatar_name_list->setCommitOnSelectionChange(TRUE);
+ avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
+ }
+
+ getChild<LLUICtrl>("allowed_search_input")->setCommitCallback(boost::bind(&LLPanelEstateAccess::onAllowedSearchEdit, this, _2));
+ childSetAction("add_allowed_avatar_btn", boost::bind(&LLPanelEstateAccess::onClickAddAllowedAgent, this));
+ childSetAction("remove_allowed_avatar_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveAllowedAgent, this));
+
+ getChild<LLUICtrl>("allowed_group_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
+ LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list");
+ if (group_name_list)
+ {
+ group_name_list->setCommitOnSelectionChange(TRUE);
+ group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
+ }
+
+ getChild<LLUICtrl>("allowed_group_search_input")->setCommitCallback(boost::bind(&LLPanelEstateAccess::onAllowedGroupsSearchEdit, this, _2));
+ getChild<LLUICtrl>("add_allowed_group_btn")->setCommitCallback(boost::bind(&LLPanelEstateAccess::onClickAddAllowedGroup, this));
+ childSetAction("remove_allowed_group_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveAllowedGroup, this));
+
+ getChild<LLUICtrl>("banned_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
+ LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
+ if (banned_name_list)
+ {
+ banned_name_list->setCommitOnSelectionChange(TRUE);
+ banned_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
+ }
+
+ getChild<LLUICtrl>("banned_search_input")->setCommitCallback(boost::bind(&LLPanelEstateAccess::onBannedSearchEdit, this, _2));
+ childSetAction("add_banned_avatar_btn", boost::bind(&LLPanelEstateAccess::onClickAddBannedAgent, this));
+ childSetAction("remove_banned_avatar_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveBannedAgent, this));
+
+ getChild<LLUICtrl>("estate_manager_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
+ LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list");
+ if (manager_name_list)
+ {
+ manager_name_list->setCommitOnSelectionChange(TRUE);
+ manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
+ }
+
+ childSetAction("add_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickAddEstateManager, this));
+ childSetAction("remove_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveEstateManager, this));
+
+ return TRUE;
+}
+
+void LLPanelEstateAccess::updateControls(LLViewerRegion* region)
+{
+ BOOL god = gAgent.isGodlike();
+ BOOL owner = (region && (region->getOwner() == gAgent.getID()));
+ BOOL manager = (region && region->isEstateManager());
+ setCtrlsEnabled(god || owner || manager);
+
+ BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
+ BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE;
+ BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE;
+ BOOL has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? TRUE : FALSE;
+
+ getChildView("add_allowed_avatar_btn")->setEnabled(god || owner || manager);
+ getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && (god || owner || manager));
+ getChildView("allowed_avatar_name_list")->setEnabled(god || owner || manager);
+
+ getChildView("add_allowed_group_btn")->setEnabled(god || owner || manager);
+ getChildView("remove_allowed_group_btn")->setEnabled(has_allowed_group && (god || owner || manager));
+ getChildView("allowed_group_name_list")->setEnabled(god || owner || manager);
+
+ // Can't ban people from mainland, orientation islands, etc. because this
+ // creates much network traffic and server load.
+ // Disable their accounts in CSR tool instead.
+ bool linden_estate = LLPanelEstateInfo::isLindenEstate();
+ bool enable_ban = (god || owner || manager) && !linden_estate;
+ getChildView("add_banned_avatar_btn")->setEnabled(enable_ban);
+ getChildView("remove_banned_avatar_btn")->setEnabled(has_banned_agent && enable_ban);
+ getChildView("banned_avatar_name_list")->setEnabled(god || owner || manager);
+
+ // estate managers can't add estate managers
+ getChildView("add_estate_manager_btn")->setEnabled(god || owner);
+ getChildView("remove_estate_manager_btn")->setEnabled(has_estate_manager && (god || owner));
+ getChildView("estate_manager_name_list")->setEnabled(god || owner);
+}
+
+//---------------------------------------------------------------------------
+// Add/Remove estate access button callbacks
+//---------------------------------------------------------------------------
+void LLPanelEstateAccess::onClickAddAllowedAgent()
+{
+ LLCtrlListInterface *list = childGetListInterface("allowed_avatar_name_list");
+ if (!list) return;
+ if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
+ {
+ //args
+
+ LLSD args;
+ args["MAX_AGENTS"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
+ LLNotificationsUtil::add("MaxAllowedAgentOnRegion", args);
+ return;
+ }
+ accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd");
+}
+
+void LLPanelEstateAccess::onClickRemoveAllowedAgent()
+{
+ accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list");
+}
+
+void LLPanelEstateAccess::onClickAddAllowedGroup()
+{
+ LLCtrlListInterface *list = childGetListInterface("allowed_group_name_list");
+ if (!list) return;
+ if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
+ {
+ LLSD args;
+ args["MAX_GROUPS"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
+ LLNotificationsUtil::add("MaxAllowedGroupsOnRegion", args);
+ return;
+ }
+
+ LLNotification::Params params("ChangeLindenAccess");
+ params.functor.function(boost::bind(&LLPanelEstateAccess::addAllowedGroup, this, _1, _2));
+ if (LLPanelEstateInfo::isLindenEstate())
+ {
+ LLNotifications::instance().add(params);
+ }
+ else
+ {
+ LLNotifications::instance().forceResponse(params, 0);
+ }
+}
+
+bool LLPanelEstateAccess::addAllowedGroup(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0) return false;
+
+ LLFloater* parent_floater = gFloaterView->getParentFloater(this);
+
+ LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(gAgent.getID()));
+ if (widget)
+ {
+ widget->removeNoneOption();
+ widget->setSelectGroupCallback(boost::bind(&LLPanelEstateAccess::addAllowedGroup2, this, _1));
+ if (parent_floater)
+ {
+ LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget);
+ widget->setOrigin(new_rect.mLeft, new_rect.mBottom);
+ parent_floater->addDependentFloater(widget);
+ }
+ }
+
+ return false;
+}
+
+void LLPanelEstateAccess::onClickRemoveAllowedGroup()
+{
+ accessRemoveCore(ESTATE_ACCESS_ALLOWED_GROUP_REMOVE, "EstateAllowedGroupRemove", "allowed_group_name_list");
+}
+
+void LLPanelEstateAccess::onClickAddBannedAgent()
+{
+ LLCtrlListInterface *list = childGetListInterface("banned_avatar_name_list");
+ if (!list) return;
+ if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
+ {
+ LLSD args;
+ args["MAX_BANNED"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
+ LLNotificationsUtil::add("MaxBannedAgentsOnRegion", args);
+ return;
+ }
+ accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd");
+}
+
+void LLPanelEstateAccess::onClickRemoveBannedAgent()
+{
+ accessRemoveCore(ESTATE_ACCESS_BANNED_AGENT_REMOVE, "EstateBannedAgentRemove", "banned_avatar_name_list");
+}
+
+// static
+void LLPanelEstateAccess::onClickAddEstateManager()
+{
+ LLCtrlListInterface *list = childGetListInterface("estate_manager_name_list");
+ if (!list) return;
+ if (list->getItemCount() >= ESTATE_MAX_MANAGERS)
+ { // Tell user they can't add more managers
+ LLSD args;
+ args["MAX_MANAGER"] = llformat("%d", ESTATE_MAX_MANAGERS);
+ LLNotificationsUtil::add("MaxManagersOnRegion", args);
+ }
+ else
+ { // Go pick managers to add
+ accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
+ }
+}
+
+// static
+void LLPanelEstateAccess::onClickRemoveEstateManager()
+{
+ accessRemoveCore(ESTATE_ACCESS_MANAGER_REMOVE, "EstateManagerRemove", "estate_manager_name_list");
+}
+
+
+// Special case callback for groups, since it has different callback format than names
+void LLPanelEstateAccess::addAllowedGroup2(LLUUID id)
+{
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (panel)
+ {
+ LLNameListCtrl* group_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
+ LLScrollListItem* item = group_list->getNameItemByAgentId(id);
+ if (item)
+ {
+ LLSD args;
+ args["GROUP"] = item->getColumn(0)->getValue().asString();
+ LLNotificationsUtil::add("GroupIsAlreadyInList", args);
+ return;
+ }
+ }
+
+ LLSD payload;
+ payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
+ payload["dialog_name"] = "EstateAllowedGroupAdd";
+ payload["allowed_ids"].append(id);
+
+ LLSD args;
+ args["ALL_ESTATES"] = all_estates_text();
+
+ LLNotification::Params params("EstateAllowedGroupAdd");
+ params.payload(payload)
+ .substitutions(args)
+ .functor.function(accessCoreConfirm);
+ if (LLPanelEstateInfo::isLindenEstate())
+ {
+ LLNotifications::instance().forceResponse(params, 0);
+ }
+ else
+ {
+ LLNotifications::instance().add(params);
+ }
+}
+
+// static
+void LLPanelEstateAccess::accessAddCore(U32 operation_flag, const std::string& dialog_name)
+{
+ LLSD payload;
+ payload["operation"] = (S32)operation_flag;
+ payload["dialog_name"] = dialog_name;
+ // agent id filled in after avatar picker
+
+ LLNotification::Params params("ChangeLindenAccess");
+ params.payload(payload)
+ .functor.function(accessAddCore2);
+
+ if (LLPanelEstateInfo::isLindenEstate())
+ {
+ LLNotifications::instance().add(params);
+ }
+ else
+ {
+ // same as clicking "OK"
+ LLNotifications::instance().forceResponse(params, 0);
+ }
+}
+
+// static
+bool LLPanelEstateAccess::accessAddCore2(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0)
+ {
+ // abort change
+ return false;
+ }
+
+ LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]);
+ //Get parent floater name
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ LLFloater* parent_floater = panel ? gFloaterView->getParentFloater(panel) : NULL;
+ const std::string& parent_floater_name = parent_floater ? parent_floater->getName() : "";
+
+ //Determine the button that triggered opening of the avatar picker
+ //(so that a shadow frustum from the button to the avatar picker can be created)
+ LLView * button = NULL;
+ switch (change_info->mOperationFlag)
+ {
+ case ESTATE_ACCESS_ALLOWED_AGENT_ADD:
+ button = panel->findChild<LLButton>("add_allowed_avatar_btn");
+ break;
+
+ case ESTATE_ACCESS_BANNED_AGENT_ADD:
+ button = panel->findChild<LLButton>("add_banned_avatar_btn");
+ break;
+
+ case ESTATE_ACCESS_MANAGER_ADD:
+ button = panel->findChild<LLButton>("add_estate_manager_btn");
+ break;
+ }
+
+ // avatar picker yes multi-select, yes close-on-select
+ LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateAccess::accessAddCore3, _1, (void*)change_info),
+ TRUE, TRUE, FALSE, parent_floater_name, button);
+
+ //Allows the closed parent floater to close the child floater (avatar picker)
+ if (child_floater)
+ {
+ parent_floater->addDependentFloater(child_floater);
+ }
+
+ return false;
+}
+
+// static
+void LLPanelEstateAccess::accessAddCore3(const uuid_vec_t& ids, void* data)
+{
+ LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data;
+ if (!change_info) return;
+ if (ids.empty())
+ {
+ // User didn't select a name.
+ delete change_info;
+ change_info = NULL;
+ return;
+ }
+ // User did select a name.
+ change_info->mAgentOrGroupIDs = ids;
+ // Can't put estate owner on ban list
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (!panel) return;
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region) return;
+
+ if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD)
+ {
+ LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list");
+ int currentCount = (name_list ? name_list->getItemCount() : 0);
+ if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
+ {
+ LLSD args;
+ args["NUM_ADDED"] = llformat("%d", ids.size());
+ args["MAX_AGENTS"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
+ args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeAllowedAgents");
+ args["NUM_EXCESS"] = llformat("%d", (ids.size() + currentCount) - ESTATE_MAX_ACCESS_IDS);
+ LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
+ delete change_info;
+ return;
+ }
+
+ std::string already_allowed;
+ bool single = true;
+ for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ {
+ LLScrollListItem* item = name_list->getNameItemByAgentId(*it);
+ if (item)
+ {
+ if (!already_allowed.empty())
+ {
+ already_allowed += ", ";
+ single = false;
+ }
+ already_allowed += item->getColumn(0)->getValue().asString();
+ }
+ }
+ if (!already_allowed.empty())
+ {
+ LLSD args;
+ args["AGENT"] = already_allowed;
+ args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeAllowedAgents");
+ LLNotificationsUtil::add(single ? "AgentIsAlreadyInList" : "AgentsAreAlreadyInList", args);
+ delete change_info;
+ return;
+ }
+ }
+ if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD)
+ {
+ LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
+ LLNameListCtrl* em_list = panel->getChild<LLNameListCtrl>("estate_manager_name_list");
+ int currentCount = (name_list ? name_list->getItemCount() : 0);
+ if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
+ {
+ LLSD args;
+ args["NUM_ADDED"] = llformat("%d", ids.size());
+ args["MAX_AGENTS"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
+ args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeBannedAgents");
+ args["NUM_EXCESS"] = llformat("%d", (ids.size() + currentCount) - ESTATE_MAX_ACCESS_IDS);
+ LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
+ delete change_info;
+ return;
+ }
+
+ std::string already_banned;
+ std::string em_ban;
+ bool single = true;
+ for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ {
+ LLScrollListItem* em_item = em_list->getNameItemByAgentId(*it);
+ if (em_item)
+ {
+ em_ban = em_item->getColumn(0)->getValue().asString();
+ break;
+ }
+
+ LLScrollListItem* item = name_list->getNameItemByAgentId(*it);
+ if (item)
+ {
+ if (!already_banned.empty())
+ {
+ already_banned += ", ";
+ single = false;
+ }
+ already_banned += item->getColumn(0)->getValue().asString();
+ }
+ }
+ if (!em_ban.empty())
+ {
+ LLSD args;
+ args["AGENT"] = em_ban;
+ LLNotificationsUtil::add("ProblemBanningEstateManager", args);
+ delete change_info;
+ return;
+ }
+ if (!already_banned.empty())
+ {
+ LLSD args;
+ args["AGENT"] = already_banned;
+ args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeBannedAgents");
+ LLNotificationsUtil::add(single ? "AgentIsAlreadyInList" : "AgentsAreAlreadyInList", args);
+ delete change_info;
+ return;
+ }
+ }
+
+ LLSD args;
+ args["ALL_ESTATES"] = all_estates_text();
+
+ LLNotification::Params params(change_info->mDialogName);
+ params.substitutions(args)
+ .payload(change_info->asLLSD())
+ .functor.function(accessCoreConfirm);
+
+ if (LLPanelEstateInfo::isLindenEstate())
+ {
+ // just apply to this estate
+ LLNotifications::instance().forceResponse(params, 0);
+ }
+ else
+ {
+ // ask if this estate or all estates with this owner
+ LLNotifications::instance().add(params);
+ }
+}
+
+// static
+void LLPanelEstateAccess::accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name)
+{
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (!panel) return;
+ LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>(list_ctrl_name);
+ if (!name_list) return;
+
+ std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected();
+ if (list_vector.size() == 0)
+ return;
+
+ LLSD payload;
+ payload["operation"] = (S32)operation_flag;
+ payload["dialog_name"] = dialog_name;
+
+ for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin();
+ iter != list_vector.end();
+ iter++)
+ {
+ LLScrollListItem *item = (*iter);
+ payload["allowed_ids"].append(item->getUUID());
+ }
+
+ LLNotification::Params params("ChangeLindenAccess");
+ params.payload(payload)
+ .functor.function(accessRemoveCore2);
+
+ if (LLPanelEstateInfo::isLindenEstate())
+ {
+ // warn on change linden estate
+ LLNotifications::instance().add(params);
+ }
+ else
+ {
+ // just proceed, as if clicking OK
+ LLNotifications::instance().forceResponse(params, 0);
+ }
+}
+
+// static
+bool LLPanelEstateAccess::accessRemoveCore2(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0)
+ {
+ // abort
+ return false;
+ }
+
+ // If Linden estate, can only apply to "this" estate, not all estates
+ // owned by NULL.
+ if (LLPanelEstateInfo::isLindenEstate())
+ {
+ accessCoreConfirm(notification, response);
+ }
+ else
+ {
+ LLSD args;
+ args["ALL_ESTATES"] = all_estates_text();
+ LLNotificationsUtil::add(notification["payload"]["dialog_name"],
+ args,
+ notification["payload"],
+ accessCoreConfirm);
+ }
+ return false;
+}
+
+// Used for both access add and remove operations, depending on the mOperationFlag
+// passed in (ESTATE_ACCESS_BANNED_AGENT_ADD, ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, etc.)
+// static
+bool LLPanelEstateAccess::accessCoreConfirm(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger();
+ U32 flags = originalFlags;
+
+ LLViewerRegion* region = gAgent.getRegion();
+
+ if (option == 2) // cancel
+ {
+ return false;
+ }
+ else if (option == 1)
+ {
+ // All estates, either than I own or manage for this owner.
+ // This will be verified on simulator. JC
+ if (!region) return false;
+ if (region->getOwner() == gAgent.getID()
+ || gAgent.isGodlike())
+ {
+ flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES;
+ }
+ else if (region->isEstateManager())
+ {
+ flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES;
+ }
+ }
+
+ std::string names;
+ U32 listed_names = 0;
+ LLSD::array_const_iterator end_it = notification["payload"]["allowed_ids"].endArray();
+ for (LLSD::array_const_iterator iter = notification["payload"]["allowed_ids"].beginArray();
+ iter != end_it;
+ iter++)
+ {
+ if (iter + 1 != end_it)
+ {
+ flags |= ESTATE_ACCESS_NO_REPLY;
+ }
+ else
+ {
+ flags &= ~ESTATE_ACCESS_NO_REPLY;
+ }
+
+ const LLUUID id = iter->asUUID();
+ if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD)
+ && region && (region->getOwner() == id))
+ {
+ LLNotificationsUtil::add("OwnerCanNotBeDenied");
+ break;
+ }
+
+ sendEstateAccessDelta(flags, id);
+
+ if ((flags & (ESTATE_ACCESS_ALLOWED_GROUP_ADD | ESTATE_ACCESS_ALLOWED_GROUP_REMOVE)) == 0)
+ {
+ // fill the name list for confirmation
+ if (listed_names < MAX_LISTED_NAMES)
+ {
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(id, &av_name))
+ {
+ if (!names.empty())
+ {
+ names += ", ";
+ }
+ names += av_name.getCompleteName();
+ }
+ }
+ listed_names++;
+ }
+ }
+ if (listed_names > MAX_LISTED_NAMES)
+ {
+ LLSD args;
+ args["EXTRA_COUNT"] = llformat("%d", listed_names - MAX_LISTED_NAMES);
+ names += " " + LLTrans::getString("AndNMore", args);
+ }
+
+ if (!names.empty()) // show the conirmation
+ {
+ LLSD args;
+ args["AGENT"] = names;
+
+ if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE))
+ {
+ args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeAllowedAgents");
+ }
+ else if (flags & (ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_BANNED_AGENT_REMOVE))
+ {
+ args["LIST_TYPE"] = LLTrans::getString("RegionInfoListTypeBannedAgents");
+ }
+
+ if (flags & ESTATE_ACCESS_APPLY_TO_ALL_ESTATES)
+ {
+ args["ESTATE"] = LLTrans::getString("RegionInfoAllEstates");
+ }
+ else if (flags & ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES)
+ {
+ args["ESTATE"] = LLTrans::getString("RegionInfoManagedEstates");
+ }
+ else
+ {
+ args["ESTATE"] = LLTrans::getString("RegionInfoThisEstate");
+ }
+
+ bool single = (listed_names == 1);
+ if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_ADD | ESTATE_ACCESS_BANNED_AGENT_ADD))
+ {
+ LLNotificationsUtil::add(single ? "AgentWasAddedToList" : "AgentsWereAddedToList", args);
+ }
+ else if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_BANNED_AGENT_REMOVE))
+ {
+ LLNotificationsUtil::add(single ? "AgentWasRemovedFromList" : "AgentsWereRemovedFromList", args);
+ }
+ }
+
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (panel)
+ {
+ panel->setPendingUpdate(true);
+ }
+
+ return false;
+}
+
+// key = "estateaccessdelta"
+// str(estate_id) will be added to front of list by forward_EstateOwnerRequest_to_dataserver
+// str[0] = str(agent_id) requesting the change
+// str[1] = str(flags) (ESTATE_ACCESS_DELTA_*)
+// str[2] = str(agent_id) to add or remove
+// static
+void LLPanelEstateAccess::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_group_id)
+{
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessage("EstateOwnerMessage");
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
+
+ msg->nextBlock("MethodData");
+ msg->addString("Method", "estateaccessdelta");
+ msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
+
+ std::string buf;
+ gAgent.getID().toString(buf);
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", buf);
+
+ buf = llformat("%u", flags);
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", buf);
+
+ agent_or_group_id.toString(buf);
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", buf);
+
+ gAgent.sendReliableMessage();
+}
+
+void LLPanelEstateAccess::updateChild(LLUICtrl* child_ctrl)
+{
+ // Ensure appropriate state of the management ui.
+ updateControls(gAgent.getRegion());
+}
+
+void LLPanelEstateAccess::updateLists()
+{
+ std::string cap_url = gAgent.getRegionCapability("EstateAccess");
+ if (!cap_url.empty())
+ {
+ LLCoros::instance().launch("LLFloaterRegionInfo::requestEstateGetAccessCoro", boost::bind(LLPanelEstateAccess::requestEstateGetAccessCoro, cap_url));
+ }
+}
+
+void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
+{
+ LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestEstateGetAccessoCoro", httpPolicy));
+ LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+
+ LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
+
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (!panel) return;
+
+ LLNameListCtrl* allowed_agent_name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list");
+ if (allowed_agent_name_list && result.has("AllowedAgents"))
+ {
+ LLStringUtil::format_map_t args;
+ args["[ALLOWEDAGENTS]"] = llformat("%d", result["AllowedAgents"].size());
+ args["[MAXACCESS]"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
+ std::string msg = LLTrans::getString("RegionInfoAllowedResidents", args);
+ panel->getChild<LLUICtrl>("allow_resident_label")->setValue(LLSD(msg));
+
+ allowed_agent_name_list->clearSortOrder();
+ allowed_agent_name_list->deleteAllItems();
+ for (LLSD::array_const_iterator it = result["AllowedAgents"].beginArray(); it != result["AllowedAgents"].endArray(); ++it)
+ {
+ LLUUID id = (*it)["id"].asUUID();
+ allowed_agent_name_list->addNameItem(id);
+ }
+ allowed_agent_name_list->sortByName(TRUE);
+ }
+
+ LLNameListCtrl* banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
+ if (banned_agent_name_list && result.has("BannedAgents"))
+ {
+ LLStringUtil::format_map_t args;
+ args["[BANNEDAGENTS]"] = llformat("%d", result["BannedAgents"].size());
+ args["[MAXBANNED]"] = llformat("%d", ESTATE_MAX_ACCESS_IDS);
+ std::string msg = LLTrans::getString("RegionInfoBannedResidents", args);
+ panel->getChild<LLUICtrl>("ban_resident_label")->setValue(LLSD(msg));
+
+ banned_agent_name_list->clearSortOrder();
+ banned_agent_name_list->deleteAllItems();
+ for (LLSD::array_const_iterator it = result["BannedAgents"].beginArray(); it != result["BannedAgents"].endArray(); ++it)
+ {
+ LLSD item;
+ item["id"] = (*it)["id"].asUUID();
+ LLSD& columns = item["columns"];
+
+ columns[0]["column"] = "name"; // to be populated later
+
+ columns[1]["column"] = "last_login_date";
+ columns[1]["value"] = (*it)["last_login_date"].asString().substr(0, 16); // cut the seconds
+
+ std::string ban_date = (*it)["ban_date"].asString();
+ columns[2]["column"] = "ban_date";
+ columns[2]["value"] = ban_date[0] != '0' ? ban_date.substr(0, 16) : LLTrans::getString("na"); // server returns the "0000-00-00 00:00:00" date in case it doesn't know it
+
+ columns[3]["column"] = "bannedby";
+ LLUUID banning_id = (*it)["banning_id"].asUUID();
+ LLAvatarName av_name;
+ if (banning_id.isNull())
+ {
+ columns[3]["value"] = LLTrans::getString("na");
+ }
+ else if (LLAvatarNameCache::get(banning_id, &av_name))
+ {
+ columns[3]["value"] = av_name.getCompleteName(); //TODO: fetch the name if it wasn't cached
+ }
+
+ banned_agent_name_list->addElement(item);
+ }
+ banned_agent_name_list->sortByName(TRUE);
+ }
+
+ LLNameListCtrl* allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
+ if (allowed_group_name_list && result.has("AllowedGroups"))
+ {
+ LLStringUtil::format_map_t args;
+ args["[ALLOWEDGROUPS]"] = llformat("%d", result["AllowedGroups"].size());
+ args["[MAXACCESS]"] = llformat("%d", ESTATE_MAX_GROUP_IDS);
+ std::string msg = LLTrans::getString("RegionInfoAllowedGroups", args);
+ panel->getChild<LLUICtrl>("allow_group_label")->setValue(LLSD(msg));
+
+ allowed_group_name_list->clearSortOrder();
+ allowed_group_name_list->deleteAllItems();
+ for (LLSD::array_const_iterator it = result["AllowedGroups"].beginArray(); it != result["AllowedGroups"].endArray(); ++it)
+ {
+ LLUUID id = (*it)["id"].asUUID();
+ allowed_group_name_list->addGroupNameItem(id);
+ }
+ allowed_group_name_list->sortByName(TRUE);
+ }
+
+ LLNameListCtrl* estate_manager_name_list = panel->getChild<LLNameListCtrl>("estate_manager_name_list");
+ if (estate_manager_name_list && result.has("Managers"))
+ {
+ LLStringUtil::format_map_t args;
+ args["[ESTATEMANAGERS]"] = llformat("%d", result["Managers"].size());
+ args["[MAXMANAGERS]"] = llformat("%d", ESTATE_MAX_MANAGERS);
+ std::string msg = LLTrans::getString("RegionInfoEstateManagers", args);
+ panel->getChild<LLUICtrl>("estate_manager_label")->setValue(LLSD(msg));
+
+ estate_manager_name_list->clearSortOrder();
+ estate_manager_name_list->deleteAllItems();
+ for (LLSD::array_const_iterator it = result["Managers"].beginArray(); it != result["Managers"].endArray(); ++it)
+ {
+ LLUUID id = (*it)["agent_id"].asUUID();
+ estate_manager_name_list->addNameItem(id);
+ }
+ estate_manager_name_list->sortByName(TRUE);
+ }
+
+
+ panel->updateControls(gAgent.getRegion());
+}
+
+//---------------------------------------------------------------------------
+// Access lists search
+//---------------------------------------------------------------------------
+void LLPanelEstateAccess::onAllowedSearchEdit(const std::string& search_string)
+{
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (!panel) return;
+ LLNameListCtrl* allowed_agent_name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list");
+ searchAgent(allowed_agent_name_list, search_string);
+}
+
+void LLPanelEstateAccess::onAllowedGroupsSearchEdit(const std::string& search_string)
+{
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (!panel) return;
+ LLNameListCtrl* allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
+ searchAgent(allowed_group_name_list, search_string);
+}
+
+void LLPanelEstateAccess::onBannedSearchEdit(const std::string& search_string)
+{
+ LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
+ if (!panel) return;
+ LLNameListCtrl* banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
+ searchAgent(banned_agent_name_list, search_string);
+}
+
+void LLPanelEstateAccess::searchAgent(LLNameListCtrl* listCtrl, const std::string& search_string)
+{
+ if (!listCtrl) return;
+
+ if (!search_string.empty())
+ {
+ listCtrl->setSearchColumn(0); // name column
+ listCtrl->selectItemByPrefix(search_string, FALSE);
+ }
+ else
+ {
+ listCtrl->deselectAllItems(TRUE);
+ }
+}
+
+bool LLPanelEstateAccess::refreshFromRegion(LLViewerRegion* region)
+{
+ updateLists();
+ return LLPanelRegionInfo::refreshFromRegion(region);
+}
+
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index c9d0e51640..5b4c81000e 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -29,6 +29,7 @@
#define LL_LLFLOATERREGIONINFO_H
#include <vector>
+#include "llagent.h"
#include "llassettype.h"
#include "llfloater.h"
#include "llhost.h"
@@ -64,6 +65,7 @@ class LLPanelEstateCovenant;
class LLPanelExperienceListEditor;
class LLPanelExperiences;
class LLPanelRegionExperiences;
+class LLPanelEstateAccess;
class LLEventTimer;
class LLEnvironmentSettings;
@@ -79,6 +81,7 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
/*virtual*/ BOOL postBuild();
static void processEstateOwnerRequest(LLMessageSystem* msg, void**);
@@ -92,6 +95,7 @@ public:
//static void incrementSerial() { sRequestSerial++; }
static LLPanelEstateInfo* getPanelEstate();
+ static LLPanelEstateAccess* getPanelAccess();
static LLPanelEstateCovenant* getPanelCovenant();
static LLPanelRegionTerrainInfo* getPanelRegionTerrain();
static LLPanelRegionExperiences* getPanelExperiences();
@@ -110,12 +114,11 @@ private:
LLFloaterRegionInfo(const LLSD& seed);
~LLFloaterRegionInfo();
-
-
protected:
void onTabSelected(const LLSD& param);
void disableTabCtrls();
void refreshFromRegion(LLViewerRegion* region);
+ void onGodLevelChange(U8 god_level);
// member data
LLTabContainer* mTab;
@@ -123,6 +126,10 @@ protected:
info_panels_t mInfoPanels;
//static S32 sRequestSerial; // serial # of last EstateOwnerRequest
static LLUUID sRequestInvoice;
+
+private:
+ LLAgent::god_level_change_slot_t mGodLevelChangeSlot;
+
};
@@ -163,6 +170,7 @@ protected:
const LLUUID& invoice,
const strings_t& strings);
+
// member data
LLHost mHost;
};
@@ -281,35 +289,11 @@ public:
void onClickEditDayCycle();
void onClickEditDayCycleHelp();
- void onClickAddAllowedAgent();
- void onClickRemoveAllowedAgent();
- void onClickAddAllowedGroup();
- void onClickRemoveAllowedGroup();
- void onClickAddBannedAgent();
- void onClickRemoveBannedAgent();
- void onClickAddEstateManager();
- void onClickRemoveEstateManager();
void onClickKickUser();
- // Group picker callback is different, can't use core methods below
- bool addAllowedGroup(const LLSD& notification, const LLSD& response);
- void addAllowedGroup2(LLUUID id);
-
- // Core methods for all above add/remove button clicks
- static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
- static bool accessAddCore2(const LLSD& notification, const LLSD& response);
- static void accessAddCore3(const uuid_vec_t& ids, void* data);
-
- static void accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name);
- static bool accessRemoveCore2(const LLSD& notification, const LLSD& response);
- // used for both add and remove operations
- static bool accessCoreConfirm(const LLSD& notification, const LLSD& response);
bool kickUserConfirm(const LLSD& notification, const LLSD& response);
- // Send the actual EstateOwnerRequest "estateaccessdelta" message
- static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id);
-
void onKickUserCommit(const uuid_vec_t& ids);
static void onClickMessageEstate(void* data);
bool onMessageCommit(const LLSD& notification, const LLSD& response);
@@ -345,7 +329,6 @@ protected:
void commitEstateAccess();
void commitEstateManagers();
- void clearAccessLists();
BOOL checkSunHourSlider(LLUICtrl* child_ctrl);
U32 mEstateID;
@@ -507,4 +490,61 @@ private:
LLUUID mDefaultExperience;
};
+
+class LLPanelEstateAccess : public LLPanelRegionInfo
+{
+ LOG_CLASS(LLPanelEnvironmentInfo);
+
+public:
+ LLPanelEstateAccess();
+
+ virtual BOOL postBuild();
+ virtual void updateChild(LLUICtrl* child_ctrl);
+
+ void updateControls(LLViewerRegion* region);
+ void updateLists();
+
+ void setPendingUpdate(bool pending) { mPendingUpdate = pending; }
+ bool getPendingUpdate() { return mPendingUpdate; }
+
+ virtual bool refreshFromRegion(LLViewerRegion* region);
+
+private:
+ void onClickAddAllowedAgent();
+ void onClickRemoveAllowedAgent();
+ void onClickAddAllowedGroup();
+ void onClickRemoveAllowedGroup();
+ void onClickAddBannedAgent();
+ void onClickRemoveBannedAgent();
+ void onClickAddEstateManager();
+ void onClickRemoveEstateManager();
+ void onAllowedSearchEdit(const std::string& search_string);
+ void onAllowedGroupsSearchEdit(const std::string& search_string);
+ void onBannedSearchEdit(const std::string& search_string);
+
+ // Group picker callback is different, can't use core methods below
+ bool addAllowedGroup(const LLSD& notification, const LLSD& response);
+ void addAllowedGroup2(LLUUID id);
+
+ // Core methods for all above add/remove button clicks
+ static void accessAddCore(U32 operation_flag, const std::string& dialog_name);
+ static bool accessAddCore2(const LLSD& notification, const LLSD& response);
+ static void accessAddCore3(const uuid_vec_t& ids, void* data);
+
+ static void accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name);
+ static bool accessRemoveCore2(const LLSD& notification, const LLSD& response);
+
+ // used for both add and remove operations
+ static bool accessCoreConfirm(const LLSD& notification, const LLSD& response);
+
+ // Send the actual EstateOwnerRequest "estateaccessdelta" message
+ static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id);
+
+ static void requestEstateGetAccessCoro(std::string url);
+
+ void searchAgent(LLNameListCtrl* listCtrl, const std::string& search_string);
+
+ bool mPendingUpdate;
+};
+
#endif
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index fe75ab8e50..60b4c62e8f 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -313,8 +313,19 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
switch(name_item.target)
{
case GROUP:
- gCacheName->getGroupName(id, fullname);
- // fullname will be "nobody" if group not found
+ if (!gCacheName->getGroupName(id, fullname))
+ {
+ avatar_name_cache_connection_map_t::iterator it = mGroupNameCacheConnections.find(id);
+ if (it != mGroupNameCacheConnections.end())
+ {
+ if (it->second.connected())
+ {
+ it->second.disconnect();
+ }
+ mGroupNameCacheConnections.erase(it);
+ }
+ mGroupNameCacheConnections[id] = gCacheName->getGroup(id, boost::bind(&LLNameListCtrl::onGroupNameCache, this, _1, _2, item->getHandle()));
+ }
break;
case SPECIAL:
// just use supplied name
@@ -415,6 +426,20 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
}
}
+// public
+LLScrollListItem* LLNameListCtrl::getNameItemByAgentId(const LLUUID& agent_id)
+{
+ for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++)
+ {
+ LLScrollListItem* item = *it;
+ if (item && item->getUUID() == agent_id)
+ {
+ return item;
+ }
+ }
+ return NULL;
+}
+
void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name,
std::string suffix,
@@ -479,6 +504,31 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
dirtyColumns();
}
+void LLNameListCtrl::onGroupNameCache(const LLUUID& group_id, const std::string name, LLHandle<LLNameListItem> item)
+{
+ avatar_name_cache_connection_map_t::iterator it = mGroupNameCacheConnections.find(group_id);
+ if (it != mGroupNameCacheConnections.end())
+ {
+ if (it->second.connected())
+ {
+ it->second.disconnect();
+ }
+ mGroupNameCacheConnections.erase(it);
+ }
+
+ LLNameListItem* list_item = item.get();
+ if (list_item && list_item->getUUID() == group_id)
+ {
+ LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex);
+ if (cell)
+ {
+ cell->setValue(name);
+ setNeedsSort();
+ }
+ }
+
+ dirtyColumns();
+}
void LLNameListCtrl::updateColumns(bool force_update)
{
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 677b49e667..ef0be135e6 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -154,6 +154,8 @@ public:
void removeNameItem(const LLUUID& agent_id);
+ LLScrollListItem* getNameItemByAgentId(const LLUUID& agent_id);
+
// LLView interface
/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
@@ -171,6 +173,7 @@ public:
private:
void showInspector(const LLUUID& avatar_id, bool is_group, bool is_experience = false);
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, std::string prefix, LLHandle<LLNameListItem> item);
+ void onGroupNameCache(const LLUUID& group_id, const std::string name, LLHandle<LLNameListItem> item);
private:
S32 mNameColumnIndex;
@@ -179,6 +182,7 @@ private:
bool mShortNames; // display name only, no SLID
typedef std::map<LLUUID, boost::signals2::connection> avatar_name_cache_connection_map_t;
avatar_name_cache_connection_map_t mAvatarNameCacheConnections;
+ avatar_name_cache_connection_map_t mGroupNameCacheConnections;
S32 mPendingLookupsRemaining;
namelist_complete_signal_t mNameListCompleteSignal;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index b759c2a3ab..5b5b53a5c3 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2831,6 +2831,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("DispatchRegionInfo");
capabilityNames.append("DirectDelivery");
capabilityNames.append("EnvironmentSettings");
+ capabilityNames.append("EstateAccess");
capabilityNames.append("EstateChangeInfo");
capabilityNames.append("EventQueueGet");
capabilityNames.append("FacebookConnect");
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 6b164c660a..5fd1d8f13a 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3805,6 +3805,62 @@ Can&apos;t add estate owner to estate &apos;Banned Resident&apos; list.
type="alertmodal">
Unable to add banned resident to estate manager list.
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ProblemBanningEstateManager"
+ type="alertmodal">
+Unable to add estate manager [AGENT] to banned list.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="GroupIsAlreadyInList"
+ type="alertmodal">
+&lt;nolink&gt;[GROUP]&lt;/nolink&gt; is already in the Allowed Groups list.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AgentIsAlreadyInList"
+ type="alertmodal">
+[AGENT] is already in your [LIST_TYPE] list.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AgentsAreAlreadyInList"
+ type="alertmodal">
+[AGENT] are already in your [LIST_TYPE] list.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AgentWasAddedToList"
+ type="alertmodal">
+[AGENT] was added to [LIST_TYPE] list of [ESTATE].
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AgentsWereAddedToList"
+ type="alertmodal">
+[AGENT] were added to [LIST_TYPE] list of [ESTATE].
+
+ </notification>
+ <notification
+ icon="alertmodal.tga"
+ name="AgentWasRemovedFromList"
+ type="alertmodal">
+[AGENT] was removed from [LIST_TYPE] list of [ESTATE].
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AgentsWereRemovedFromList"
+ type="alertmodal">
+[AGENT] were removed from [LIST_TYPE] list of [ESTATE].
+ </notification>
<notification
icon="alertmodal.tga"
@@ -4581,7 +4637,8 @@ Add to allowed list for this estate only or for [ALL_ESTATES]?
icon="alert.tga"
label="Select estate"
name="EstateAllowedAgentRemove"
- type="alert">
+ type="alertmodal">
+ <unique/>
Remove from allowed list for this estate only or for [ALL_ESTATES]?
<tag>confirm</tag>
<usetemplate
@@ -4610,7 +4667,8 @@ Add to group allowed list for this estate only or for [ALL_ESTATES]?
icon="alert.tga"
label="Select estate"
name="EstateAllowedGroupRemove"
- type="alert">
+ type="alertmodal">
+ <unique/>
Remove from group allowed list for this estate only or [ALL_ESTATES]?
<tag>group</tag>
<tag>confirm</tag>
@@ -4639,8 +4697,9 @@ Deny access for this estate only or for [ALL_ESTATES]?
icon="alert.tga"
label="Select estate"
name="EstateBannedAgentRemove"
- type="alert">
-Remove this Resident from the ban list for access for this estate only or for [ALL_ESTATES]?
+ type="alertmodal">
+ <unique/>
+Remove this Resident from the ban list for access for this estate only or for [ALL_ESTATES]?
<tag>confirm</tag>
<usetemplate
canceltext="Cancel"
@@ -4667,7 +4726,8 @@ Add estate manager for this estate only or for [ALL_ESTATES]?
icon="alert.tga"
label="Select estate"
name="EstateManagerRemove"
- type="alert">
+ type="alertmodal">
+ <unique/>
Remove estate manager for this estate only or for [ALL_ESTATES]?
<tag>confirm</tag>
<usetemplate
diff --git a/indra/newview/skins/default/xui/en/panel_region_access.xml b/indra/newview/skins/default/xui/en/panel_region_access.xml
new file mode 100644
index 0000000000..4a78cdacf0
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_region_access.xml
@@ -0,0 +1,397 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ border="true"
+ follows="top|left"
+ height="510"
+ help_topic="panel_region_access_tab"
+ label="Access"
+ layout="topleft"
+ left="0"
+ name="Access"
+ top="320"
+ width="530">
+
+
+<tab_container
+ bottom="-10"
+ follows="all"
+ layout="topleft"
+ left="3"
+ name="tabs"
+ tab_min_width="70"
+ tab_height="30"
+ tab_position="top"
+ top="10"
+ halign="center"
+ right="-5">
+
+<!-- ============================= ESTATE MANAGERS tab ====================== -->
+ <panel
+ background_opaque="true"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ bg_opaque_color="DkGray"
+ bottom="-1"
+ follows="all"
+ label="ESTATE MANAGERS"
+ layout="topleft"
+ left="0"
+ help_topic="estate_managers_tab"
+ name="estate_managers_panel"
+ right="-1"
+ top="0">
+ <text
+ type="string"
+ length="1"
+ bottom="34"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ name="estate_manager_label"
+ top_pad="10"
+ left="10"
+ width="200">
+ Estate Managers:
+ </text>
+ <!-- Estate Managers box -->
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="400"
+ layout="topleft"
+ left="10"
+ top_pad="-5"
+ width="498" />
+ <name_list
+ follows="left|top"
+ height="400"
+ layout="topleft"
+ left_delta="0"
+ multi_select="true"
+ draw_heading="true"
+ name="estate_manager_name_list"
+ top_delta="0"
+ width="498">
+ <columns
+ label="Name"
+ name="name"
+ width="498" />
+ </name_list>
+ <!-- Estate Managers buttons -->
+ <button
+ follows="left|top"
+ height="23"
+ label="Add..."
+ layout="topleft"
+ left="10"
+ name="add_estate_manager_btn"
+ top_pad="6"
+ width="114" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Remove..."
+ layout="topleft"
+ name="remove_estate_manager_btn"
+ left_pad="6"
+ width="114" />
+ </panel>
+
+
+<!-- ================================ ALLOWED tab =========================== -->
+ <panel
+ background_opaque="true"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ bg_opaque_color="DkGray"
+ bottom="-1"
+ follows="all"
+ label="ALLOWED"
+ layout="topleft"
+ left="0"
+ help_topic="allowed_tab"
+ name="allowed_panel"
+ right="-1"
+ top="0">
+ <panel
+ follows="left|top|right"
+ height="27"
+ label="top_panel"
+ layout="topleft"
+ left="0"
+ name="allowed_search_panel"
+ right="-1"
+ top="0">
+ <filter_editor
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ left="6"
+ label="Search allowed agents"
+ max_length_chars="300"
+ name="allowed_search_input"
+ text_color="Black"
+ text_pad_left="10"
+ top="4"
+ width="498" />
+ </panel>
+ <text
+ type="string"
+ length="1"
+ bottom="34"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ name="allow_resident_label"
+ top_pad="10"
+ left="10"
+ width="200">
+ Always allowed:
+ </text>
+ <!-- Always allowed box -->
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="370"
+ layout="topleft"
+ left="10"
+ top_pad="-5"
+ width="498" />
+ <name_list
+ follows="left|top"
+ height="370"
+ layout="topleft"
+ left_delta="0"
+ multi_select="true"
+ draw_heading="true"
+ name="allowed_avatar_name_list"
+ top_delta="0"
+ width="498">
+ <columns
+ label="Name"
+ name="name"
+ width="498" />
+ </name_list>
+ <!-- Always allowed buttons -->
+ <button
+ follows="left|top"
+ height="23"
+ label="Add..."
+ layout="topleft"
+ left="10"
+ name="add_allowed_avatar_btn"
+ top_pad="6"
+ width="114" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Remove..."
+ layout="topleft"
+ name="remove_allowed_avatar_btn"
+ left_pad="6"
+ width="114" />
+ </panel>
+
+ <!-- ============================= ALLOWED GROUPS tab ======================= -->
+ <panel
+ background_opaque="true"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ bg_opaque_color="DkGray"
+ bottom="-1"
+ follows="all"
+ label="ALLOWED GROUPS"
+ layout="topleft"
+ left="0"
+ help_topic="allowed_groups_tab"
+ name="allowed_groups_panel"
+ right="-1"
+ top="0">
+ <panel
+ follows="left|top|right"
+ height="27"
+ label="top_panel"
+ layout="topleft"
+ left="0"
+ name="allowed_group_search_panel"
+ right="-1"
+ top="0">
+ <filter_editor
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ left="6"
+ label="Search allowed groups"
+ max_length_chars="300"
+ name="allowed_group_search_input"
+ text_color="Black"
+ text_pad_left="10"
+ top="4"
+ width="498" />
+ </panel>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="allow_group_label"
+ top_pad="10"
+ width="200">
+ Groups always allowed:
+ </text>
+ <!-- Groups always allowed box -->
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="370"
+ layout="topleft"
+ left="10"
+ top_pad="-5"
+ width="498" />
+ <name_list
+ follows="left|top"
+ height="370"
+ layout="topleft"
+ left_delta="0"
+ multi_select="true"
+ draw_heading="true"
+ name="allowed_group_name_list"
+ top_delta="0"
+ width="498">
+ <columns
+ label="Name"
+ name="name"
+ width="498" />
+ </name_list>
+ <!-- Groups always allowed buttons -->
+ <button
+ follows="left|top"
+ height="23"
+ label="Add..."
+ layout="topleft"
+ left="10"
+ name="add_allowed_group_btn"
+ top_pad="6"
+ width="114" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Remove..."
+ layout="topleft"
+ name="remove_allowed_group_btn"
+ left_pad="6"
+ top_delta="0"
+ width="114" />
+ </panel>
+
+ <!-- ================================ BANNED tab ============================ -->
+ <panel
+ background_opaque="true"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ bg_opaque_color="DkGray"
+ bottom="-1"
+ follows="all"
+ label="BANNED"
+ layout="topleft"
+ left="0"
+ help_topic="banned_tab"
+ name="banned_panel"
+ right="-1"
+ top="0">
+ <panel
+ follows="left|top|right"
+ height="27"
+ label="top_panel"
+ layout="topleft"
+ left="0"
+ name="banned_search_panel"
+ right="-1"
+ top="0">
+ <filter_editor
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ left="6"
+ label="Search banned agents"
+ max_length_chars="300"
+ name="banned_search_input"
+ text_color="Black"
+ text_pad_left="10"
+ top="4"
+ width="498" />
+ </panel>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="ban_resident_label"
+ top_pad="10"
+ width="200">
+ Always banned:
+ </text>
+ <!-- Always banned box -->
+ <view_border
+ bevel_style="none"
+ follows="top|left"
+ height="370"
+ layout="topleft"
+ left="10"
+ top_pad="-5"
+ width="498" />
+ <name_list
+ follows="left|top"
+ height="370"
+ layout="topleft"
+ left_delta="0"
+ multi_select="true"
+ draw_heading="true"
+ name="banned_avatar_name_list"
+ top_delta="0"
+ width="498">
+ <columns
+ label="Name"
+ name="name"
+ width="140" />
+ <columns
+ label="Last login date"
+ name="last_login_date"
+ width="100" />
+ <columns
+ label="Date banned"
+ name="ban_date"
+ width="100" />
+ <columns
+ label="Banned by"
+ name="bannedby"
+ width="140" />
+ </name_list>
+ <!-- Always banned buttons -->
+ <button
+ follows="left|top"
+ height="23"
+ label="Add..."
+ layout="topleft"
+ left="10"
+ name="add_banned_avatar_btn"
+ top_pad="6"
+ width="114" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Remove..."
+ layout="topleft"
+ name="remove_banned_avatar_btn"
+ left_pad="6"
+ top_delta="0"
+ width="114" />
+ </panel>
+
+
+</tab_container>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml
index a0c1dd0be6..9b9c870c49 100644
--- a/indra/newview/skins/default/xui/en/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml
@@ -82,7 +82,7 @@
<view_border
bevel_style="none"
follows="top|left"
- height="105"
+ height="185"
layout="topleft"
left="10"
top_pad="5"
@@ -96,7 +96,7 @@
width="200">
<radio_item
height="16"
- label="Allow only residents and groups listed below"
+ label="Allow only residents and groups listed on the Access tab"
layout="topleft"
name="estate_restricted_access" />
<radio_item
@@ -137,10 +137,10 @@
height="18"
label="Allow Voice Chat"
layout="topleft"
- left="290"
+ left="20"
name="voice_chat_check"
- top_delta="-78"
- width="200" />
+ top_pad="2"
+ width="240" />
<check_box
height="18"
label="Allow Direct Teleport"
@@ -148,7 +148,7 @@
left_delta="0"
name="allow_direct_teleport"
top_pad="2"
- width="80" />
+ width="240" />
<button
enabled="false"
follows="left|top"
@@ -156,215 +156,9 @@
label="Apply"
layout="topleft"
name="apply_btn"
- top_pad="30"
- left_delta="0"
- width="97" />
-
- <text
- type="string"
- length="1"
- bottom="34"
- follows="left|top"
- height="20"
- layout="topleft"
- name="estate_manager_label"
- top_pad="25"
- left="10"
- width="200">
- Estate Managers:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left="280"
- name="allow_resident_label"
- top_delta="0"
- width="200">
- Always allowed:
- </text>
-
- <!-- Estate Managers box -->
- <view_border
- bevel_style="none"
- follows="top|left"
- height="71"
- layout="topleft"
- left="10"
- top_pad="-5"
- width="235" />
- <name_list
- follows="left|top"
- height="71"
- layout="topleft"
- left_delta="0"
- multi_select="true"
- name="estate_manager_name_list"
- top_delta="0"
- width="235" />
-
- <!-- Always allowed box -->
- <view_border
- bevel_style="none"
- follows="top|left"
- height="71"
- layout="topleft"
- left="280"
- top_delta="0"
- width="235" />
- <name_list
- follows="left|top"
- height="71"
- layout="topleft"
- left_delta="0"
- multi_select="true"
- name="allowed_avatar_name_list"
- top_delta="0"
- width="235" />
-
- <!-- Estate Managers buttons -->
- <button
- follows="left|top"
- height="23"
- label="Add..."
- layout="topleft"
- left="10"
- name="add_estate_manager_btn"
- top_pad="6"
- width="114" />
- <button
- follows="left|top"
- height="23"
- label="Remove..."
- layout="topleft"
- name="remove_estate_manager_btn"
- left_pad="6"
- width="114" />
-
- <!-- Always allowed buttons -->
- <button
- follows="left|top"
- height="23"
- left="280"
- label="Add..."
- layout="topleft"
- name="add_allowed_avatar_btn"
- top_delta="0"
- width="114" />
- <button
- follows="left|top"
- height="23"
- label="Remove..."
- layout="topleft"
- name="remove_allowed_avatar_btn"
- left_pad="6"
- top_delta="0"
- width="114" />
-
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left="10"
- name="allow_group_label"
top_pad="10"
- width="200">
- Groups always allowed:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left="280"
- name="ban_resident_label"
- top_delta="0"
- width="200">
- Always banned:
- </text>
-
- <!-- Groups always allowed box -->
- <view_border
- bevel_style="none"
- follows="top|left"
- height="71"
- layout="topleft"
- left="10"
- top_pad="-5"
- width="235" />
- <name_list
- follows="left|top"
- height="71"
- layout="topleft"
left_delta="0"
- multi_select="true"
- name="allowed_group_name_list"
- top_delta="0"
- width="235" />
-
- <!-- Always banned box -->
- <view_border
- bevel_style="none"
- follows="top|left"
- height="71"
- layout="topleft"
- left="280"
- top_delta="0"
- width="235" />
- <name_list
- follows="left|top"
- height="71"
- layout="topleft"
- left_delta="0"
- multi_select="true"
- name="banned_avatar_name_list"
- top_delta="0"
- width="235" />
-
- <!-- Groups always allowed buttons -->
- <button
- follows="left|top"
- height="23"
- label="Add..."
- layout="topleft"
- left="10"
- name="add_allowed_group_btn"
- top_pad="6"
- width="114" />
- <button
- follows="left|top"
- height="23"
- label="Remove..."
- layout="topleft"
- name="remove_allowed_group_btn"
- left_pad="6"
- top_delta="0"
- width="114" />
-
- <!-- Always banned buttons -->
- <button
- follows="left|top"
- height="23"
- label="Add..."
- layout="topleft"
- left="280"
- name="add_banned_avatar_btn"
- top_delta="0"
- width="114" />
- <button
- follows="left|top"
- height="23"
- label="Remove..."
- layout="topleft"
- name="remove_banned_avatar_btn"
- top_delta="0"
- left_pad="6"
- width="114" />
+ width="97" />
<button
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 882fbaf634..d4327b0c7c 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2658,6 +2658,10 @@ If you continue to receive this message, please contact Second Life support for
<string name="RegionInfoBannedResidents">Always banned: ([BANNEDAGENTS], max [MAXBANNED])</string>
<string name="RegionInfoListTypeAllowedAgents">Always allowed</string>
<string name="RegionInfoListTypeBannedAgents">Always banned</string>
+ <string name="RegionInfoAllEstates">all estates</string>
+ <string name="RegionInfoManagedEstates">managed estates</string>
+ <string name="RegionInfoThisEstate">this estate</string>
+ <string name="AndNMore">and [EXTRA_COUNT] more</string>
<!-- script limits floater -->
<string name="ScriptLimitsParcelScriptMemory">Parcel Script Memory</string>