Merge in EAM from viewer-release

Remove the derpy stuff lindens like to do
Wide strings aren't normal strings

Make it all a bit better~
Redid the Duration floater because it was kinda icky,
gave it more flexibility~<3
Display parcel ban and access durations as dates instead of text, sortable!
Reworked the rather icky lookin' Access panel control ordering
Enabled lowering parcel ban time without needing to find and remove first
This commit is contained in:
Lirusaito
2019-07-19 02:21:25 -04:00
parent 3f921251ee
commit d0a6772245
22 changed files with 2448 additions and 1066 deletions

View File

@@ -803,7 +803,7 @@ void LLParcel::expirePasses(S32 now)
if (entry.mTime != 0 && entry.mTime < now)
{
mAccessList.erase(itor++);
itor = mAccessList.erase(itor);
}
else
{
@@ -894,7 +894,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
{
if (time == 0 || (entry.mTime != 0 && entry.mTime < time))
{
mAccessList.erase(itor++);
itor = mAccessList.erase(itor);
}
else
{
@@ -937,15 +937,18 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
const LLAccessEntry& entry = (*itor).second;
if (entry.mID == agent_id)
{
if (time == 0 || (entry.mTime != 0 && entry.mTime < time))
// Singu Note: Allow amending ban time to be less without needing to remove
//if (time == 0 || (entry.mTime != 0 && entry.mTime < time))
{
mBanList.erase(itor++);
itor = mBanList.erase(itor);
}
#if 0
else
{
// existing one expires later
return FALSE;
}
#endif
}
else
{
@@ -973,7 +976,7 @@ BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list,
const LLAccessEntry& entry = (*itor).second;
if (entry.mID == agent_id)
{
list->erase(itor++);
itor = list->erase(itor);
removed = TRUE;
}
else

View File

@@ -432,6 +432,13 @@ void LLLineEditor::setCursorToEnd()
deselect();
}
void LLLineEditor::resetScrollPosition()
{
mScrollHPos = 0;
// make sure cursor stays in visible range
setCursor(getCursor());
}
BOOL LLLineEditor::canDeselect() const
{
return hasSelection();

View File

@@ -190,6 +190,9 @@ public:
void setCursor( S32 pos );
void setCursorToEnd();
// set scroll to earliest position it can reasonably be set
void resetScrollPosition();
// Selects characters 'start' to 'end'.
void setSelection(S32 start, S32 end);

View File

@@ -264,6 +264,7 @@ void LLSpinCtrl::forceSetValue(const LLSD& value )
mValue = v;
updateEditor();
mEditor->resetScrollPosition();
}
}
@@ -329,7 +330,9 @@ void LLSpinCtrl::onEditorCommit( const LLSD& data )
if( success )
{
updateEditor();
// We committed and clamped value
// try to display as much as possible
mEditor->resetScrollPosition();
}
else
{
@@ -461,6 +464,7 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
// text editors don't support revert normally (due to user confusion)
// but not allowing revert on a spinner seems dangerous
updateEditor();
mEditor->resetScrollPosition();
mEditor->setFocus(FALSE);
return TRUE;
}

View File

@@ -184,6 +184,7 @@ set(viewer_SOURCE_FILES
llfloateravatarlist.cpp
llfloateravatarpicker.cpp
llfloateravatartextures.cpp
llfloaterbanduration.cpp
llfloaterbeacons.cpp
llfloaterblacklist.cpp
llfloaterbuildoptions.cpp
@@ -720,6 +721,7 @@ set(viewer_HEADER_FILES
llfloateravatarlist.h
llfloateravatarpicker.h
llfloateravatartextures.h
llfloaterbanduration.h
llfloaterbeacons.h
llfloaterblacklist.h
llfloaterbuildoptions.h

View File

@@ -1430,7 +1430,7 @@ static void cmd_eject(const LLAvatarListEntry* entry) { send_eject(entry->getID
static void cmd_ban(const LLAvatarListEntry* entry) { send_eject(entry->getID(), true); }
static void cmd_estate_eject(const LLAvatarListEntry* entry){ send_estate_message("kickestate", {entry->getID().asString()}); }
static void cmd_estate_tp_home(const LLAvatarListEntry* entry){ send_estate_message("teleporthomeuser", {gAgentID.asString(), entry->getID().asString()}); }
static void cmd_estate_ban(const LLAvatarListEntry* entry) { LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, entry->getID()); }
static void cmd_estate_ban(const LLAvatarListEntry* entry) { LLPanelEstateAccess::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, entry->getID()); }
void LLFloaterAvatarList::doCommand(avlist_command_t func, bool single/*=false*/) const
{

View File

@@ -0,0 +1,92 @@
/**
* @file llfloaterbanduration.cpp
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2018, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llfloaterbanduration.h"
#include "llcombobox.h"
#include "llspinctrl.h"
#include "lluictrlfactory.h"
LLFloaterBanDuration::LLFloaterBanDuration(const LLSD& target) : LLFloater()
{
LLUICtrlFactory::instance().buildFloater(this, "floater_ban_duration.xml");
}
BOOL LLFloaterBanDuration::postBuild()
{
childSetAction("ok_btn", boost::bind(&LLFloaterBanDuration::onClickBan, this));
childSetAction("cancel_btn", boost::bind(&LLFloaterBanDuration::close, this, false));
auto combo = getChild<LLUICtrl>("ban_duration_combo");
combo->setCommitCallback(boost::bind(&LLFloaterBanDuration::onClickCombo, this, _2, getChild<LLUICtrl>("ban_duration")));
combo->onCommit();
return TRUE;
}
LLFloaterBanDuration* LLFloaterBanDuration::show(select_callback_t callback, const uuid_vec_t& ids)
{
LLFloaterBanDuration* floater = showInstance();
if (!floater)
{
LL_WARNS() << "Cannot instantiate ban duration floater" << LL_ENDL;
return nullptr;
}
floater->mSelectionCallback = callback;
floater->mAvatar_ids = ids;
return floater;
}
void LLFloaterBanDuration::onClickCombo(const LLSD& val, LLUICtrl* duration)
{
duration->setEnabled(val.asInteger() != 0);
}
void LLFloaterBanDuration::onClickBan()
{
if (mSelectionCallback)
{
S32 time = 0;
if (auto type = getChild<LLUICtrl>("ban_duration_combo")->getValue().asInteger())
{
LLSpinCtrl* duration_spin = getChild<LLSpinCtrl>("ban_duration");
if (duration_spin)
{
time = (duration_spin->getValue().asInteger() * 3600);
if (type > 1)
{
time *= type == 2 ? 24 : type == 3 ? 168 : 730;
}
time += LLDate::now().secondsSinceEpoch();
}
}
mSelectionCallback(mAvatar_ids, time);
}
close();
}

View File

@@ -0,0 +1,52 @@
/**
* @file llfloaterbanduration.h
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2018, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_FLOATERBANDURATION_H
#define LL_FLOATERBANDURATION_H
#include "llfloater.h"
class LLFloaterBanDuration : public LLFloater
, public LLFloaterSingleton<LLFloaterBanDuration>
{
typedef std::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
public:
LLFloaterBanDuration(const LLSD& target);
BOOL postBuild() override;
static LLFloaterBanDuration* show(select_callback_t callback, const uuid_vec_t& ids);
private:
~LLFloaterBanDuration() {};
void onClickBan();
void onClickCombo(const LLSD&, LLUICtrl*);
uuid_vec_t mAvatar_ids;
select_callback_t mSelectionCallback;
};
#endif // LL_FLOATERBANDURATION_H

View File

@@ -52,6 +52,7 @@
#include "llcombobox.h"
#include "llfloaterauction.h"
#include "llfloateravatarpicker.h"
#include "llfloaterbanduration.h"
#include "llfloatergroups.h"
#include "llfloaterscriptlimits.h"
#include "llgroupactions.h"
@@ -220,7 +221,6 @@ void LLFloaterLand::onOpen()
refresh();
}
// virtual
void LLFloaterLand::onClose(bool app_quitting)
{
@@ -471,6 +471,13 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnBuyLand = getChild<LLButton>("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
if(gDisconnected)
{
return TRUE;
}
// note: on region change this will not be re checked, should not matter on Agni as
// 99% of the time all regions will return the same caps. In case of an erroneous setting
// to enabled the floater will just throw an error when trying to get it's cap
@@ -584,6 +591,11 @@ void LLPanelLandGeneral::refresh()
mBtnReleaseLand->setEnabled(FALSE);
mBtnReclaimLand->setEnabled(FALSE);
mBtnBuyPass->setEnabled(FALSE);
if(gDisconnected)
{
return;
}
}
else
{
@@ -591,7 +603,7 @@ void LLPanelLandGeneral::refresh()
BOOL is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus());
BOOL region_xfer = FALSE;
if(regionp
&& !regionp->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL))
&& !(regionp->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL)))
{
region_xfer = TRUE;
}
@@ -1245,7 +1257,7 @@ void LLPanelLandObjects::refresh()
mOwnerList->deleteAllItems();
mOwnerList->setEnabled(FALSE);
if (!parcel)
if (!parcel || gDisconnected)
{
mSWTotalObjects->setTextArg("[COUNT]", llformat("%d", 0));
mSWTotalObjects->setTextArg("[TOTAL]", llformat("%d", 0));
@@ -1619,13 +1631,12 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
{
msg->getU32("DataExtended", "TimeStamp", most_recent_time, i);
}
if (owner_id.isNull())
{
continue;
}
BOOL in_sim = (std::find(avatar_ids.begin(), avatar_ids.end(), owner_id) != avatar_ids.end());
LLNameListCtrl::NameItem item_params;
item_params.value = owner_id;
item_params.target = is_group_owned ? LLNameListCtrl::GROUP : LLNameListCtrl::INDIVIDUAL;
@@ -1635,7 +1646,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
item_params.columns.add().type("icon").value(self->mIconGroup->getName()).column("type");
item_params.columns.add().value(OWNER_GROUP).font(FONT).column("online_status");
}
else if (in_sim)
else if (std::find(avatar_ids.begin(), avatar_ids.end(), owner_id) != avatar_ids.end())
{
item_params.columns.add().type("icon").value(self->mIconAvatarInSim->getName()).column("type");
item_params.columns.add().value(OWNER_INSIM).font(FONT).column("online_status");
@@ -1661,10 +1672,10 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date");
self->mOwnerList->addNameItemRow(item_params);
LL_DEBUGS() << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent")
<< ") owns " << object_count << " objects." << LL_ENDL;
}
// check for no results
if (0 == self->mOwnerList->getItemCount())
{
@@ -1842,10 +1853,15 @@ void LLPanelLandObjects::onCommitClean(LLUICtrl *caller, void* user_data)
LLParcel* parcel = lop->mParcel->getParcel();
if (parcel)
{
lop->mOtherTime = atoi(lop->mCleanOtherObjectsTime->getText().c_str());
S32 return_time = atoi(lop->mCleanOtherObjectsTime->getText().c_str());
// Only send return time if it has changed
if (return_time != lop->mOtherTime)
{
lop->mOtherTime = return_time;
parcel->setCleanOtherTime(lop->mOtherTime);
send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime);
parcel->setCleanOtherTime(lop->mOtherTime);
send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime);
}
}
}
@@ -2014,7 +2030,7 @@ void LLPanelLandOptions::refresh()
refreshSearch();
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
if (!parcel || gDisconnected)
{
mCheckEditObjects ->set(FALSE);
mCheckEditObjects ->setEnabled(FALSE);
@@ -2203,7 +2219,7 @@ void LLPanelLandOptions::draw()
void LLPanelLandOptions::refreshSearch()
{
LLParcel *parcel = mParcel->getParcel();
if (!parcel)
if (!parcel || gDisconnected)
{
mCheckShowDirectory->set(FALSE);
mCheckShowDirectory->setEnabled(FALSE);
@@ -2499,19 +2515,32 @@ void LLPanelLandAccess::refresh()
LLParcel *parcel = mParcel->getParcel();
// Display options
if (parcel)
if (parcel && !gDisconnected)
{
BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST);
BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP);
BOOL public_access = !use_access_list && !use_group;
BOOL public_access = !use_access_list;
getChild<LLUICtrl>("public_access")->setValue(public_access );
getChild<LLUICtrl>("GroupCheck")->setValue(use_group );
if (parcel->getRegionAllowAccessOverride())
{
getChild<LLUICtrl>("public_access")->setValue(public_access );
getChild<LLUICtrl>("GroupCheck")->setValue(use_group );
}
else
{
getChild<LLUICtrl>("public_access")->setValue(TRUE);
getChild<LLUICtrl>("GroupCheck")->setValue(FALSE);
}
std::string group_name;
gCacheName->getGroupName(parcel->getGroupID(), group_name);
getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name );
const auto always = getString("Always");
static const LLCachedControl<std::string> date("ShortDateFormat");
static const LLCachedControl<std::string> time("LongTimeFormat");
const auto time_format = date() + ' ' + time();
// Allow list
if (mListAccess)
{
@@ -2519,6 +2548,9 @@ void LLPanelLandAccess::refresh()
mListAccess->clearSortOrder();
mListAccess->deleteAllItems();
S32 count = parcel->mAccessList.size();
getChild<LLUICtrl>("AllowedText")->setTextArg("[COUNT]", llformat("%d",count));
getChild<LLUICtrl>("AllowedText")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
@@ -2526,34 +2558,22 @@ void LLPanelLandAccess::refresh()
cit != parcel->mAccessList.end(); ++cit)
{
const LLAccessEntry& entry = (*cit).second;
std::string suffix;
LLSD item;
item["id"] = entry.mID;
LLSD& columns = item["columns"];
columns[0]["column"] = "name"; // to be populated later
columns[1]["column"] = "duration";
if (entry.mTime != 0)
{
S32 now = time(NULL);
S32 seconds = entry.mTime - now;
if (seconds < 0) seconds = 0;
suffix.assign(" (");
if (seconds >= 120)
{
std::string buf = llformat("%d ", (seconds/60)) + getString("minutes");
suffix.append(buf);
}
else if (seconds >= 60)
{
suffix.append(getString("1_minute"));
}
else if (seconds == 1)
{
suffix.append(getString("1_second"));
}
else
{
std::string buf = llformat("%d ", seconds) + getString("seconds");
suffix.append(buf);
}
suffix.append(" " + getString("remaining") + ")");
columns[1]["type"] = "date";
columns[1]["format"] = time_format;
columns[1]["value"] = LLDate(entry.mTime);
}
mListAccess->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix);
else
{
columns[1]["value"] = always;
}
mListAccess->addElement(item);
}
mListAccess->sortByName(TRUE);
}
@@ -2565,6 +2585,8 @@ void LLPanelLandAccess::refresh()
mListBanned->clearSortOrder();
mListBanned->deleteAllItems();
S32 count = parcel->mBanList.size();
getChild<LLUICtrl>("BanCheck")->setTextArg("[COUNT]", llformat("%d",count));
getChild<LLUICtrl>("BanCheck")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST));
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
@@ -2573,34 +2595,22 @@ void LLPanelLandAccess::refresh()
cit != parcel->mBanList.end(); ++cit)
{
const LLAccessEntry& entry = (*cit).second;
std::string suffix;
LLSD item;
item["id"] = entry.mID;
LLSD& columns = item["columns"];
columns[0]["column"] = "name"; // to be populated later
columns[1]["column"] = "duration";
if (entry.mTime != 0)
{
S32 now = time(NULL);
S32 seconds = entry.mTime - now;
if (seconds < 0) seconds = 0;
suffix.assign(" (");
if (seconds >= 120)
{
std::string buf = llformat("%d ", (seconds/60)) + getString("minutes");
suffix.append(buf);
}
else if (seconds >= 60)
{
suffix.append(getString("1_minute"));
}
else if (seconds == 1)
{
suffix.append(getString("1_second"));
}
else
{
std::string buf = llformat("%d ", seconds) + getString("seconds");
suffix.append(buf);
}
suffix.append(" " + getString("remaining") + ")");
columns[1]["type"] = "date";
columns[1]["format"] = time_format;
columns[1]["value"] = LLDate(entry.mTime);
}
mListBanned->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix);
else
{
columns[1]["value"] = always;
}
mListBanned->addElement(item);
}
mListBanned->sortByName(TRUE);
}
@@ -2608,18 +2618,22 @@ void LLPanelLandAccess::refresh()
if(parcel->getRegionDenyAnonymousOverride())
{
getChild<LLUICtrl>("limit_payment")->setValue(TRUE);
getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") );
}
else
{
getChild<LLUICtrl>("limit_payment")->setValue((parcel->getParcelFlag(PF_DENY_ANONYMOUS)));
getChild<LLUICtrl>("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", std::string() );
}
if(parcel->getRegionDenyAgeUnverifiedOverride())
{
getChild<LLUICtrl>("limit_age_verified")->setValue(TRUE);
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") );
}
else
{
getChild<LLUICtrl>("limit_age_verified")->setValue((parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED)));
getChild<LLUICtrl>("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() );
}
BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST);
@@ -2669,13 +2683,22 @@ void LLPanelLandAccess::refresh_ui()
getChildView("HoursSpin")->setEnabled(FALSE);
getChildView("AccessList")->setEnabled(FALSE);
getChildView("BannedList")->setEnabled(FALSE);
getChildView("add_allowed")->setEnabled(FALSE);
getChildView("remove_allowed")->setEnabled(FALSE);
getChildView("add_banned")->setEnabled(FALSE);
getChildView("remove_banned")->setEnabled(FALSE);
LLParcel *parcel = mParcel->getParcel();
if (parcel)
if (parcel && !gDisconnected)
{
BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
BOOL can_manage_allowed = false;
BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED);
if (parcel->getRegionAllowAccessOverride())
{ // Estate owner may have disabled allowing the parcel owner from managing access.
can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED);
}
getChildView("public_access")->setEnabled(can_manage_allowed);
BOOL public_access = getChild<LLUICtrl>("public_access")->getValue().asBoolean();
if (public_access)
@@ -2707,7 +2730,6 @@ void LLPanelLandAccess::refresh_ui()
{
getChildView("Only Allow")->setToolTip(std::string());
}
getChildView("GroupCheck")->setEnabled(FALSE);
getChildView("PassCheck")->setEnabled(FALSE);
getChildView("pass_combo")->setEnabled(FALSE);
getChildView("AccessList")->setEnabled(FALSE);
@@ -2717,11 +2739,7 @@ void LLPanelLandAccess::refresh_ui()
getChildView("limit_payment")->setEnabled(FALSE);
getChildView("limit_age_verified")->setEnabled(FALSE);
std::string group_name;
if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
{
getChildView("GroupCheck")->setEnabled(can_manage_allowed);
}
BOOL sell_passes = getChild<LLUICtrl>("PassCheck")->getValue().asBoolean();
getChildView("PassCheck")->setEnabled(can_manage_allowed);
if (sell_passes)
@@ -2731,6 +2749,12 @@ void LLPanelLandAccess::refresh_ui()
getChildView("HoursSpin")->setEnabled(can_manage_allowed);
}
}
std::string group_name;
if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
{
bool can_allow_groups = !public_access || (public_access && (getChild<LLUICtrl>("limit_payment")->getValue().asBoolean() ^ getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean()));
getChildView("GroupCheck")->setEnabled(can_manage_allowed && can_allow_groups);
}
getChildView("AccessList")->setEnabled(true/*can_manage_allowed*/);
S32 allowed_list_count = parcel->mAccessList.size();
getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
@@ -2779,12 +2803,12 @@ void LLPanelLandAccess::onCommitPublicAccess(LLUICtrl *ctrl, void *userdata)
// If we disabled public access, enable group access by default (if applicable)
BOOL public_access = self->getChild<LLUICtrl>("public_access")->getValue().asBoolean();
if (public_access == FALSE)
if (!public_access)
{
std::string group_name;
if (gCacheName->getGroupName(parcel->getGroupID(), group_name))
{
self->getChild<LLUICtrl>("GroupCheck")->setValue(public_access ? FALSE : TRUE);
self->getChild<LLUICtrl>("GroupCheck")->setValue(true);
}
}
@@ -2893,7 +2917,7 @@ void LLPanelLandAccess::onClickAddAccess()
{
LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1));
boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), true, true);
if (picker)
{
root_floater->addDependentFloater(picker);
@@ -2902,17 +2926,29 @@ void LLPanelLandAccess::onClickAddAccess()
void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)
{
if (!ids.empty())
LLParcel* parcel = mParcel->getParcel();
if (!parcel) return;
U32 lists_to_update = 0;
for (const auto& id : ids)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
if (parcel)
if (parcel->addToAccessList(id, 0))
{
parcel->addToAccessList(id, 0);
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS);
refresh();
lists_to_update |= AL_ACCESS;
// agent was successfully added to access list
// but we also need to check ban list to ensure that agent will not be in two lists simultaneously
if(parcel->removeFromBanList(id))
{
lists_to_update |= AL_BAN;
}
}
}
if (lists_to_update)
{
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}
// static
@@ -2942,7 +2978,7 @@ void LLPanelLandAccess::onClickAddBanned()
{
LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1));
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, true);
if (picker)
{
root_floater->addDependentFloater(picker);
@@ -2951,17 +2987,40 @@ void LLPanelLandAccess::onClickAddBanned()
void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids)
{
if (!ids.empty())
LLFloater* root_floater = gFloaterView->getParentFloater(this);
LLFloaterBanDuration* duration_floater = LLFloaterBanDuration::show(
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned2, this, _1, _2), ids);
if (duration_floater)
{
LLUUID id = ids[0];
LLParcel* parcel = mParcel->getParcel();
if (parcel)
root_floater->addDependentFloater(duration_floater);
}
}
void LLPanelLandAccess::callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 duration)
{
LLParcel* parcel = mParcel->getParcel();
if (!parcel) return;
U32 lists_to_update = 0;
for (const auto& id : ids)
{
if (parcel->addToBanList(id, duration))
{
parcel->addToBanList(id, 0);
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN);
refresh();
lists_to_update |= AL_BAN;
// agent was successfully added to ban list
// but we also need to check access list to ensure that agent will not be in two lists simultaneously
if(parcel->removeFromAccessList(id))
{
lists_to_update |= AL_ACCESS;
}
}
}
if (lists_to_update)
{
LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);
refresh();
}
}
// static
@@ -3010,7 +3069,7 @@ BOOL LLPanelLandCovenant::postBuild()
void LLPanelLandCovenant::refresh()
{
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(!region) return;
if(!region || gDisconnected) return;
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
if (region_name)

View File

@@ -384,6 +384,7 @@ public:
void onClickAddAccess();
void onClickAddBanned();
void callbackAvatarCBBanned(const uuid_vec_t& ids);
void callbackAvatarCBBanned2(const uuid_vec_t& ids, S32 duration);
void callbackAvatarCBAccess(const uuid_vec_t& ids);
protected:

File diff suppressed because it is too large Load Diff

View File

@@ -35,6 +35,7 @@
#define LL_LLFLOATERREGIONINFO_H
#include <vector>
#include "llagent.h"
#include "llfloater.h"
#include "llpanel.h"
@@ -63,15 +64,17 @@ class LLPanelRegionDebugInfo;
class LLPanelRegionTerrainInfo;
class LLPanelEstateInfo;
class LLPanelEstateCovenant;
class LLPanelEstateAccess;
class LLFloaterRegionInfo : public LLFloater, public LLFloaterSingleton<LLFloaterRegionInfo>
{
friend class LLUISingleton<LLFloaterRegionInfo, VisibilityPolicy<LLFloater> >;
friend class LLUISingleton<LLFloaterRegionInfo, VisibilityPolicy<LLFloater>>;
public:
/*virtual*/ void onOpen();
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ BOOL postBuild();
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
/*virtual*/ void open();
@@ -88,6 +91,7 @@ public:
//static void incrementSerial() { sRequestSerial++; }
static LLPanelEstateInfo* getPanelEstate();
static LLPanelEstateAccess* getPanelAccess();
static LLPanelEstateCovenant* getPanelCovenant();
static LLPanelRegionTerrainInfo* getPanelRegionTerrain();
@@ -106,6 +110,7 @@ protected:
protected:
void onTabSelected(const LLSD& param);
void refreshFromRegion(LLViewerRegion* region);
void onGodLevelChange(U8 god_level);
// member data
LLTabContainer* mTab;
@@ -113,6 +118,10 @@ protected:
info_panels_t mInfoPanels;
//static S32 sRequestSerial; // serial # of last EstateOwnerRequest
static LLUUID sRequestInvoice;
private:
LLAgent::god_level_change_slot_t mGodLevelChangeSlot;
};
@@ -261,41 +270,18 @@ public:
void onChangeFixedSun();
void onChangeUseGlobalTime();
void onChangeAccessOverride();
void onClickEditSky();
void onClickEditSkyHelp();
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, LLEstateAccessChangeInfo* change_info);
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, const std::vector<LLAvatarName>& names);
static void onClickMessageEstate(void* data);
bool onMessageCommit(const LLSD& notification, const LLSD& response);
@@ -331,7 +317,6 @@ protected:
void commitEstateAccess();
void commitEstateManagers();
void clearAccessLists();
BOOL checkSunHourSlider(LLUICtrl* child_ctrl);
U32 mEstateID;
@@ -410,8 +395,6 @@ public:
// LLPanel
/*virtual*/ BOOL postBuild();
// LLPanelRegionInfo
/*virtual*/ void onOpen(const LLSD& key);
// LLView
@@ -463,4 +446,104 @@ private:
LLComboBox* mDayCyclePresetCombo;
};
#if 0 // Singu TODO: Experiences
class LLPanelRegionExperiences : public LLPanelRegionInfo
{
LOG_CLASS(LLPanelEnvironmentInfo);
public:
LLPanelRegionExperiences();
/*virtual*/ BOOL postBuild() override;
BOOL sendUpdate() override;
static bool experienceCoreConfirm(const LLSD& notification, const LLSD& response);
static void sendEstateExperienceDelta(U32 flags, const LLUUID& agent_id);
static void infoCallback(LLHandle<LLPanelRegionExperiences> handle, const LLSD& content);
bool refreshFromRegion(LLViewerRegion* region) override;
void sendPurchaseRequest()const;
void processResponse( const LLSD& content );
private:
void refreshRegionExperiences();
static std::string regionCapabilityQuery(LLViewerRegion* region, const std::string &cap);
void setupList(LLPanelExperienceListEditor* child, const char* control_name, U32 add_id, U32 remove_id);
static LLSD addIds( LLPanelExperienceListEditor* panel );
void itemChanged(U32 event_type, const LLUUID& id);
LLPanelExperienceListEditor* mTrusted;
LLPanelExperienceListEditor* mAllowed;
LLPanelExperienceListEditor* mBlocked;
LLUUID mDefaultExperience;
};
#endif // Singu TODO: Experiences
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);
static void onEstateAccessReceived(const LLSD& result);
private:
void onClickAddAllowedAgent();
void onClickRemoveAllowedAgent();
void onClickCopyAllowedList();
void onClickAddAllowedGroup();
void onClickRemoveAllowedGroup();
void onClickCopyAllowedGroupList();
void onClickAddBannedAgent();
void onClickRemoveBannedAgent();
void onClickCopyBannedList();
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, const std::vector<LLAvatarName>& names, LLEstateAccessChangeInfo* change_info);
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);
public:
// Send the actual EstateOwnerRequest "estateaccessdelta" message
static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id);
private:
//static void requestEstateGetAccessCoro(std::string url);
void searchAgent(LLNameListCtrl* listCtrl, const std::string& search_string);
void copyListToClipboard(std::string list_name);
bool mPendingUpdate;
bool mCtrlsEnabled;
};
#endif

View File

@@ -61,7 +61,7 @@ LLNameListCtrl::LLNameListCtrl(const std::string& name, const LLRect& rect, BOOL
// public
LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
BOOL enabled, const std::string& suffix)
BOOL enabled, const std::string& suffix, const std::string& prefix)
{
//LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL;
@@ -70,7 +70,7 @@ LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPositi
item.enabled = enabled;
item.target = INDIVIDUAL;
return addNameItemRow(item, pos, suffix);
return addNameItemRow(item, pos, suffix, prefix);
}
// virtual, public
@@ -160,7 +160,8 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p
LLScrollListItem* LLNameListCtrl::addNameItemRow(
const LLNameListCtrl::NameItem& name_item,
EAddPosition pos,
const std::string& suffix)
const std::string& suffix,
const std::string& prefix)
{
LLUUID id = name_item.value().asUUID();
LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP);
@@ -174,8 +175,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 = mAvatarNameCacheConnections.find(id);
if (it != mAvatarNameCacheConnections.end())
{
if (it->second.connected())
{
it->second.disconnect();
}
mAvatarNameCacheConnections.erase(it);
}
mAvatarNameCacheConnections[id] = gCacheName->getGroup(id, boost::bind(&LLNameListCtrl::onGroupNameCache, this, _1, _2, item->getHandle()));
}
break;
case SPECIAL:
// just use supplied name
@@ -203,12 +215,12 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
}
mAvatarNameCacheConnections.erase(it);
}
mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, item->getHandle()));
mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, prefix, item->getHandle()));
if (mPendingLookupsRemaining <= 0)
{
// BAKER TODO:
// We might get into a state where mPendingLookupsRemainig might
// We might get into a state where mPendingLookupsRemaining might
// go negative. So just reset it right now and figure out if it's
// possible later :)
mPendingLookupsRemaining = 0;
@@ -231,7 +243,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
LLScrollListCell* cell = item->getColumn(mNameColumnIndex);
if (cell)
{
cell->setValue(fullname);
cell->setValue(prefix + fullname);
}
dirtyColumns();
@@ -271,9 +283,24 @@ 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,
std::string prefix,
LLHandle<LLNameListItem> item)
{
avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(agent_id);
@@ -295,6 +322,11 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id,
name.append(suffix);
}
if (!prefix.empty())
{
name.insert(0, prefix);
}
LLNameListItem* list_item = item.get();
if (list_item && list_item->getUUID() == agent_id)
{
@@ -326,6 +358,33 @@ 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 = mAvatarNameCacheConnections.find(group_id);
if (it != mAvatarNameCacheConnections.end())
{
if (it->second.connected())
{
it->second.disconnect();
}
mAvatarNameCacheConnections.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::sortByName(BOOL ascending)
{
sortByColumnIndex(mNameColumnIndex,ascending);

View File

@@ -124,11 +124,12 @@ public:
// Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary.
LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null);
BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null);
LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
/*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null);
LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null,
const std::string& prefix = LLStringUtil::null);
// Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary.
@@ -139,6 +140,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,
@@ -149,7 +152,8 @@ public:
void sortByName(BOOL ascending);
private:
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, LLHandle<LLNameListItem> item);
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;

View File

@@ -9371,7 +9371,7 @@ void estate_bulk_eject(const uuid_vec_t& ids, bool ban, S32 option)
else
strings.push_back(idstr);
if (ban)
LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, id);
LLPanelEstateAccess::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, id);
}
if (!tphome) send_estate_message("kickestate", strings);
}

View File

@@ -1984,6 +1984,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("ExtEnvironment");
@@ -2019,6 +2020,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ProductInfoRequest");
capabilityNames.append("ProvisionVoiceAccountRequest");
capabilityNames.append("ReadOfflineMsgs"); // Requires to respond reliably: AcceptFriendship, AcceptGroupInvite, DeclineFriendship, DeclineGroupInvite
capabilityNames.append("RemoteParcelRequest");
capabilityNames.append("RenderMaterials");
capabilityNames.append("RequestTextureDownload");

View File

@@ -1349,6 +1349,7 @@ Select the thumbnail to choose a different texture.
<string name="1_second">1 second</string>
<string name="seconds">seconds</string>
<string name="remaining">remaining</string>
<string name="Always">Always</string>
<check_box bottom_delta="-20" enabled="true" follows="left|top" font="SansSerifSmall"
height="16" initial_value="false" label="Allow Group Access: [GROUP]"
left="8" mouse_opaque="true" name="GroupCheck" radio_style="false"
@@ -1377,13 +1378,16 @@ Select the thumbnail to choose a different texture.
<text bottom="-220" enabled="true" follows="left|right|top" font="SansSerifSmall"
height="16" initial_value="false" label="Always Allow" left="20"
mouse_opaque="true" name="AllowedText" radio_style="false" width="195">
Allowed Residents
Allowed ([COUNT], max [MAX])
</text>
<name_list allow_calling_card_drop="false" background_visible="true" bottom="-304"
column_padding="0" draw_border="true" draw_heading="false" enabled="true"
follows="top|bottom" heading_font="SansSerifSmall" heading_height="14"
column_padding="0" draw_border="true" draw_heading="true" enabled="true"
follows="top|bottom" heading_font="SansSerifSmall" heading_height="16"
height="80" left="20" mouse_opaque="true" multi_select="true" name_system="LandManagementNameSystem"
name="AccessList" tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_num="0"/>
name="AccessList" tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_num="0">
<column label="Name" name="name" width="120"/>
<column label="Duration" name="duration" width="75"/>
</name_list>
<button bottom_delta="-20" enabled="true" follows="bottom" font="SansSerifSmall"
halign="center" height="16" label="Add..." label_selected="Add..."
left_delta="5" mouse_opaque="true" name="add_allowed" scale_image="true"
@@ -1393,17 +1397,18 @@ Select the thumbnail to choose a different texture.
left_delta="100" mouse_opaque="true" name="remove_allowed"
scale_image="true" width="80" />
<text bottom="-220" enabled="true" follows="left|right|top" font="SansSerifSmall"
height="16" initial_value="false"
label="Ban" left="240" mouse_opaque="true"
name="BanCheck" radio_style="false" width="195">
Banned Residents
height="16" left="240" mouse_opaque="true" name="BanCheck" width="195">
Banned ([COUNT], max [MAX])
</text>
<name_list allow_calling_card_drop="false" background_visible="true" bottom="-304"
column_padding="0" draw_border="true" draw_heading="false" enabled="true"
column_padding="0" draw_border="true" draw_heading="true" enabled="true"
follows="top|bottom" heading_font="SansSerifSmall"
heading_height="14" height="80" left_delta="0" mouse_opaque="true"
heading_height="16" height="80" left_delta="0" mouse_opaque="true"
multi_select="true" name="BannedList" name_system="LandManagementNameSystem"
tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_num="0"/>
tool_tip="([LISTED] listed, [MAX] max)" width="195" menu_num="0">
<column label="Name" name="name" width="120"/>
<column label="Duration" name="duration" width="75"/>
</name_list>
<button bottom_delta="-20" enabled="true" follows="bottom" font="SansSerifSmall"
halign="center" height="16" label="Add..." label_selected="Add..."
left_delta="5" mouse_opaque="true" name="add_banned" scale_image="true"

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
can_minimize="false"
can_tear_off="false"
can_resize="false"
can_drag_on_left="false"
can_close="true"
height="80"
layout="topleft"
name="ban_duration"
title="Duration"
single_instance="true"
width="180">
<!-- Liru make this a combo: Hours, Days, Weeks, Months -->
<combo_box name="ban_duration_combo" bottom="-40" left="10" height="20" width="100" initial_value="0">
<combo_item name="permanent" label="Permanent" value="0"/>
<combo_item name="hours" label="Hours" value="1"/>
<combo_item name="days" label="Days" value="2"/>
<combo_item name="weeks" label="Weeks" value="3"/>
<combo_item name="months" label="Months" value="4"/>
</combo_box>
<spinner
allow_digits_only="true"
decimal_digits="0"
follows="left|top"
height="20"
increment="1"
max_val="8766"
min_val="1"
initial_val="1"
name="ban_duration"
bottom_delta="-2"
left_delta="100"
width="60"/>
<button
follows="left|top"
height="23"
label="OK"
left="10"
name="ok_btn"
bottom_delta="-30"
width="80">
</button>
<button
follows="left|top"
height="23"
label="Cancel"
left_delta="80"
name="cancel_btn"
bottom_delta="0"
width="80">
</button>
</floater>

View File

@@ -3390,6 +3390,69 @@ You can only have [MAX_MANAGER] Estate Managers.
type="alertmodal">
Can&apos;t add estate owner to estate &apos;Banned Resident&apos; list.
</notification>
<notification
icon="alertmodal.tga"
name="ProblemAddingEstateManagerBanned"
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"

View File

@@ -0,0 +1,466 @@
<?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"
bottom="320"
width="480">
<tab_container
bottom="-10"
follows="all"
layout="topleft"
left="3"
name="tabs"
tab_min_width="70"
tab_height="30"
tab_position="top"
top="-1"
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"
follows="left|top"
height="20"
layout="topleft"
name="estate_manager_label"
bottom="-20"
left="10"
width="200">
Estate Managers:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="estate_manager_help"
right="-10"
width="18" />
<!-- Estate Managers box -->
<view_border
bevel_style="none"
follows="top|left"
height="400"
layout="topleft"
left="10"
bottom_delta="-408"
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"
menu_num="0"
name_system="LandManagementNameSystem"
bottom_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"
bottom_delta="-29"
width="114" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
name="remove_estate_manager_btn"
left_delta="123"
bottom_delta="0"
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">
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
name="allow_resident_label"
bottom="-20"
left="10"
width="200">
Allowed Residents:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="allow_resident_help"
right="-10"
width="18" />
<panel
follows="left|top|right"
height="27"
label="top_panel"
layout="topleft"
left="0"
name="allowed_search_panel"
right="-1"
bottom_delta="-27">
<filter_editor
follows="left|top|right"
height="23"
layout="topleft"
left="10"
label="Search allowed agents"
max_length_chars="300"
name="allowed_search_input"
text_color="Black"
text_pad_left="10"
bottom="-27"
width="440" />
<button
follows="left|top"
bottom_delta="-1"
height="24"
label="Copy"
layout="topleft"
left_delta="440"
name="copy_allowed_list_btn"
width="60" />
</panel>
<!-- Always allowed box -->
<view_border
bevel_style="none"
follows="top|left"
height="373"
layout="topleft"
left="10"
bottom_delta="-381"
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"
menu_num="0"
name_system="LandManagementNameSystem"
bottom_delta="0"
width="498">
<columns
label="Name"
name="name"
width="498" />
</name_list>
<!-- Allowed Residents buttons -->
<button
follows="left|top"
height="23"
label="Add..."
layout="topleft"
left="10"
name="add_allowed_avatar_btn"
bottom_delta="-29"
width="114" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
name="remove_allowed_avatar_btn"
left_delta="123"
bottom_delta="0"
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">
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
left="10"
name="allow_group_label"
bottom="-20"
width="200">
Allowed Groups:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="allow_group_help"
right="-10"
width="18" />
<panel
follows="left|top|right"
height="27"
label="top_panel"
layout="topleft"
left="0"
name="allowed_group_search_panel"
right="-1"
bottom_delta="-27">
<filter_editor
follows="left|top|right"
height="23"
layout="topleft"
left="10"
label="Search allowed groups"
max_length_chars="300"
name="allowed_group_search_input"
text_color="Black"
text_pad_left="10"
bottom="-27"
width="440" />
<button
follows="left|top"
bottom_delta="-1"
height="24"
label="Copy"
layout="topleft"
left_delta="440"
name="copy_allowed_group_list_btn"
width="60" />
</panel>
<!-- Groups always allowed box -->
<view_border
bevel_style="none"
follows="top|left"
height="373"
layout="topleft"
left="10"
bottom_delta="-381"
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"
bottom_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"
bottom_delta="-29"
width="114" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
name="remove_allowed_group_btn"
left_delta="123"
bottom_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">
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
left="10"
name="ban_resident_label"
bottom="-20"
width="200">
Banned Residents:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="ban_resident_help"
right="-10"
width="18" />
<panel
follows="left|top|right"
height="27"
label="top_panel"
layout="topleft"
left="0"
name="banned_search_panel"
right="-1"
bottom_delta="-27">
<filter_editor
follows="left|top|right"
height="23"
layout="topleft"
left="10"
label="Search banned agents"
max_length_chars="300"
name="banned_search_input"
text_color="Black"
text_pad_left="10"
bottom="-27"
width="440" />
<button
follows="left|top"
bottom_delta="-1"
height="24"
label="Copy"
layout="topleft"
left_delta="440"
name="copy_banned_list_btn"
width="60" />
</panel>
<!-- Always banned box -->
<view_border
bevel_style="none"
follows="top|left"
height="373"
layout="topleft"
left="10"
bottom_delta="-381"
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"
menu_num="0"
name_system="LandManagementNameSystem"
bottom_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"
bottom_delta="-29"
width="114" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
name="remove_banned_avatar_btn"
left_delta="123"
bottom_delta="0"
width="114" />
</panel>
</tab_container>
</panel>

View File

@@ -198,254 +198,6 @@
bottom_delta="-16"
width="278" />
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
name="estate_manager_label"
bottom_delta="-28"
left="10"
width="200">
Estate Managers:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="estate_manager_help"
left_delta="202"
width="18" />
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
left="250"
name="allow_resident_label"
bottom_delta="-4"
width="200">
Allowed Residents:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="allow_resident_help"
left_delta="202"
width="18" />
<!-- Estate Managers box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
left="10"
bottom_delta="-72"
width="220" />
<name_list
follows="left|top"
height="71"
layout="topleft"
left_delta="0"
multi_select="true"
name="estate_manager_name_list"
menu_num="0"
name_system="LandManagementNameSystem"
bottom_delta="0"
width="220" />
<!-- Allowed Residents box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
left="250"
bottom_delta="0"
width="220" />
<name_list
follows="left|top"
height="71"
layout="topleft"
left_delta="0"
multi_select="true"
name="allowed_avatar_name_list"
menu_num="0"
name_system="LandManagementNameSystem"
bottom_delta="0"
width="220" />
<!-- Estate Managers buttons -->
<button
follows="left|top"
height="23"
label="Add..."
layout="topleft"
left="10"
name="add_estate_manager_btn"
bottom_delta="-26"
width="97" />
<button
bottom_delta="0"
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
name="remove_estate_manager_btn"
left_delta="123"
width="97" />
<!-- Allowed Residents buttons -->
<button
follows="left|top"
height="23"
left="250"
label="Add..."
layout="topleft"
name="add_allowed_avatar_btn"
bottom_delta="0"
width="97" />
<button
follows="left|top"
height="20"
label="Remove..."
layout="topleft"
name="remove_allowed_avatar_btn"
left_delta="123"
bottom_delta="0"
width="97" />
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
left="10"
name="allow_group_label"
bottom_delta="-28"
width="200">
Allowed Groups:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="allow_group_help"
left_delta="202"
width="18" />
<text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
left="250"
name="ban_resident_label"
bottom_delta="-4"
width="200">
Banned Residents:
</text>
<button
bottom_delta="3"
follows="left|top"
font="SansSerifSmall"
height="18"
label="?"
name="ban_resident_help"
left_delta="202"
width="18" />
<!-- Allowed Groups box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
left="10"
bottom_delta="-72"
width="220" />
<name_list
follows="left|top"
height="71"
layout="topleft"
left_delta="0"
multi_select="true"
name="allowed_group_name_list"
bottom_delta="0"
width="220" />
<!-- Banned Residents box -->
<view_border
bevel_style="none"
follows="top|left"
height="71"
layout="topleft"
left="250"
bottom_delta="0"
width="220" />
<name_list
follows="left|top"
height="71"
layout="topleft"
left_delta="0"
multi_select="true"
name="banned_avatar_name_list"
menu_num="0"
name_system="LandManagementNameSystem"
bottom_delta="0"
width="220" />
<!-- Allowed Groups buttons -->
<button
follows="left|top"
height="23"
label="Add..."
layout="topleft"
left="10"
name="add_allowed_group_btn"
bottom_delta="-26"
width="97" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
name="remove_allowed_group_btn"
left_delta="123"
bottom_delta="0"
width="97" />
<!-- Banned Residents buttons -->
<button
follows="left|top"
height="23"
label="Add..."
layout="topleft"
left="250"
name="add_banned_avatar_btn"
bottom_delta="0"
width="97" />
<button
follows="left|top"
height="23"
label="Remove..."
layout="topleft"
name="remove_banned_avatar_btn"
bottom_delta="0"
left_delta="123"
width="97" />
<button
follows="left|top"
height="23"

View File

@@ -3671,6 +3671,10 @@ If you continue to receive this message, please contact Second Life support for
<string name="RegionInfoBannedResidents">Banned Residents: ([BANNEDAGENTS], max [MAXBANNED])</string>
<string name="RegionInfoListTypeAllowedAgents">Allowed Residents</string>
<string name="RegionInfoListTypeBannedAgents">Banned Residents</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>