summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp254
1 files changed, 78 insertions, 176 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 11544f5b7b..d54736e942 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -42,18 +42,18 @@
#include "llglheaders.h"
#include "llregionflags.h"
#include "llstl.h"
+#include "llvfile.h"
+#include "llxfermanager.h"
#include "indra_constants.h"
#include "message.h"
#include "llagent.h"
-#include "llalertdialog.h"
#include "llappviewer.h"
#include "llfloateravatarpicker.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "llfilepicker.h"
-#include "llfloaterdaycycle.h"
#include "llfloatergodtools.h" // for send_sim_wide_deletes()
#include "llfloatertopobjects.h" // added to fix SL-32336
#include "llfloatergroups.h"
@@ -62,8 +62,9 @@
#include "llfloaterwindlight.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
-#include "llalertdialog.h"
#include "llnamelistctrl.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "llscrolllistitem.h"
#include "llsliderctrl.h"
#include "llslurl.h"
@@ -86,8 +87,6 @@
#include "lltrans.h"
#include "llagentui.h"
-#define ELAR_ENABLED 0 // Enable when server support is implemented
-
const S32 TERRAIN_TEXTURE_COUNT = 4;
const S32 CORNER_COUNT = 4;
@@ -179,6 +178,8 @@ BOOL LLFloaterRegionInfo::postBuild()
LLPanelRegionInfo* panel;
panel = new LLPanelRegionGeneralInfo;
mInfoPanels.push_back(panel);
+ panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel));
+
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml");
mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true));
@@ -405,6 +406,11 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant()
void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
{
+ if (!region)
+ {
+ return;
+ }
+
// call refresh from region on all panels
std::for_each(
mInfoPanels.begin(),
@@ -544,14 +550,10 @@ void LLPanelRegionInfo::initCtrl(const std::string& name)
getChild<LLUICtrl>(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this));
}
-void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert)
-{
- getChild<LLUICtrl>(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onClickHelp, this, xml_alert));
-}
-
-void LLPanelRegionInfo::onClickHelp(std::string xml_alert)
+void LLPanelRegionInfo::onClickManageTelehub()
{
- LLNotifications::instance().add(xml_alert);
+ LLFloaterReg::hideInstance("region_info");
+ LLFloaterReg::showInstance("telehubs");
}
/////////////////////////////////////////////////////////////////////////////
@@ -589,47 +591,30 @@ BOOL LLPanelRegionGeneralInfo::postBuild()
initCtrl("restrict_pushobject");
initCtrl("block_parcel_search_check");
- initHelpBtn("terraform_help", "HelpRegionBlockTerraform");
- initHelpBtn("fly_help", "HelpRegionBlockFly");
- initHelpBtn("damage_help", "HelpRegionAllowDamage");
- initHelpBtn("agent_limit_help", "HelpRegionAgentLimit");
- initHelpBtn("object_bonus_help", "HelpRegionObjectBonus");
- initHelpBtn("access_help", "HelpRegionMaturity");
- initHelpBtn("restrict_pushobject_help", "HelpRegionRestrictPushObject");
- initHelpBtn("land_resell_help", "HelpRegionLandResell");
- initHelpBtn("parcel_changes_help", "HelpParcelChanges");
- initHelpBtn("parcel_search_help", "HelpRegionSearch");
-
- childSetAction("kick_btn", onClickKick, this);
+ childSetAction("kick_btn", boost::bind(&LLPanelRegionGeneralInfo::onClickKick, this));
childSetAction("kick_all_btn", onClickKickAll, this);
childSetAction("im_btn", onClickMessage, this);
// childSetAction("manage_telehub_btn", onClickManageTelehub, this);
- mCommitCallbackRegistrar.add("RegionInfo.Cancel", boost::bind(&LLPanelRegionGeneralInfo::onClickManageTelehub, this));
return LLPanelRegionInfo::postBuild();
}
-// static
-void LLPanelRegionGeneralInfo::onClickKick(void* userdata)
+void LLPanelRegionGeneralInfo::onClickKick()
{
llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl;
- LLPanelRegionGeneralInfo* panelp = (LLPanelRegionGeneralInfo*)userdata;
// this depends on the grandparent view being a floater
// in order to set up floater dependency
- LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
- LLFloater* child_floater = LLFloaterAvatarPicker::show(onKickCommit, userdata, FALSE, TRUE);
+ LLFloater* parent_floater = gFloaterView->getParentFloater(this);
+ LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1,_2), FALSE, TRUE);
parent_floater->addDependentFloater(child_floater);
}
-// static
-void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata)
+void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
{
if (names.empty() || ids.empty()) return;
if(ids[0].notNull())
{
- LLPanelRegionGeneralInfo* self = (LLPanelRegionGeneralInfo*)userdata;
- if(!self) return;
strings_t strings;
// [0] = our agent id
// [1] = target agent id
@@ -641,7 +626,7 @@ void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& name
strings.push_back(strings_t::value_type(buffer));
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
- self->sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", invoice, strings);
+ sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", invoice, strings);
}
}
@@ -649,7 +634,7 @@ void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& name
void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata)
{
llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl;
- LLNotifications::instance().add("KickUsersFromRegion",
+ LLNotificationsUtil::add("KickUsersFromRegion",
LLSD(),
LLSD(),
boost::bind(&LLPanelRegionGeneralInfo::onKickAllCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
@@ -657,7 +642,7 @@ void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata)
bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
strings_t strings;
@@ -677,7 +662,7 @@ bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const L
void LLPanelRegionGeneralInfo::onClickMessage(void* userdata)
{
llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl;
- LLNotifications::instance().add("MessageRegion",
+ LLNotificationsUtil::add("MessageRegion",
LLSD(),
LLSD(),
boost::bind(&LLPanelRegionGeneralInfo::onMessageCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
@@ -686,7 +671,7 @@ void LLPanelRegionGeneralInfo::onClickMessage(void* userdata)
// static
bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
{
- if(LLNotification::getSelectedOption(notification, response) != 0) return false;
+ if(LLNotificationsUtil::getSelectedOption(notification, response) != 0) return false;
std::string text = response["message"].asString();
if (text.empty()) return false;
@@ -712,11 +697,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
return false;
}
-void LLPanelRegionGeneralInfo::onClickManageTelehub()
-{
- LLFloaterReg::hideInstance("region_info");
- LLFloaterReg::showInstance("telehubs");
-}
+
// setregioninfo
// strings[0] = 'Y' - block terraform, 'N' - not
@@ -793,7 +774,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
LLViewerRegion* region = gAgent.getRegion();
if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) )
{
- LLNotifications::instance().add("RegionMaturityChange");
+ LLNotificationsUtil::add("RegionMaturityChange");
}
return TRUE;
@@ -809,14 +790,7 @@ BOOL LLPanelRegionDebugInfo::postBuild()
initCtrl("disable_collisions_check");
initCtrl("disable_physics_check");
- initHelpBtn("disable_scripts_help", "HelpRegionDisableScripts");
- initHelpBtn("disable_collisions_help", "HelpRegionDisableCollisions");
- initHelpBtn("disable_physics_help", "HelpRegionDisablePhysics");
- initHelpBtn("top_colliders_help", "HelpRegionTopColliders");
- initHelpBtn("top_scripts_help", "HelpRegionTopScripts");
- initHelpBtn("restart_help", "HelpRegionRestart");
-
- childSetAction("choose_avatar_btn", onClickChooseAvatar, this);
+ childSetAction("choose_avatar_btn", boost::bind(&LLPanelRegionDebugInfo::onClickChooseAvatar, this));
childSetAction("return_btn", onClickReturn, this);
childSetAction("top_colliders_btn", onClickTopColliders, this);
childSetAction("top_scripts_btn", onClickTopScripts, this);
@@ -868,19 +842,18 @@ BOOL LLPanelRegionDebugInfo::sendUpdate()
return TRUE;
}
-void LLPanelRegionDebugInfo::onClickChooseAvatar(void* data)
+void LLPanelRegionDebugInfo::onClickChooseAvatar()
{
- LLFloaterAvatarPicker::show(callbackAvatarID, data, FALSE, TRUE);
+ LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), FALSE, TRUE);
}
-// static
-void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
+
+void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
{
- LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*) data;
if (ids.empty() || names.empty()) return;
- self->mTargetAvatar = ids[0];
- self->childSetValue("target_avatar_name", LLSD(names[0]));
- self->refreshFromRegion( gAgent.getRegion() );
+ mTargetAvatar = ids[0];
+ childSetValue("target_avatar_name", LLSD(names[0]));
+ refreshFromRegion( gAgent.getRegion() );
}
// static
@@ -907,13 +880,13 @@ void LLPanelRegionDebugInfo::onClickReturn(void* data)
}
payload["flags"] = int(flags);
payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean();
- LLNotifications::instance().add("EstateObjectReturn", args, payload,
+ LLNotificationsUtil::add("EstateObjectReturn", args, payload,
boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2));
}
bool LLPanelRegionDebugInfo::callbackReturn(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
LLUUID target_avatar = notification["payload"]["avatar_id"].asUUID();
@@ -973,13 +946,13 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
// static
void LLPanelRegionDebugInfo::onClickRestart(void* data)
{
- LLNotifications::instance().add("ConfirmRestart", LLSD(), LLSD(),
+ LLNotificationsUtil::add("ConfirmRestart", LLSD(), LLSD(),
boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2));
}
bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
strings_t strings;
@@ -1147,7 +1120,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes()
LLSD args;
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8);
- LLNotifications::instance().add("InvalidTerrainBitDepth", args);
+ LLNotificationsUtil::add("InvalidTerrainBitDepth", args);
return FALSE;
}
@@ -1158,7 +1131,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes()
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_SIZE_X"] = width;
args["TEXTURE_SIZE_Y"] = height;
- LLNotifications::instance().add("InvalidTerrainSize", args);
+ LLNotificationsUtil::add("InvalidTerrainSize", args);
return FALSE;
}
@@ -1182,15 +1155,6 @@ BOOL LLPanelRegionTerrainInfo::postBuild()
{
LLPanelRegionInfo::postBuild();
- initHelpBtn("water_height_help", "HelpRegionWaterHeight");
- initHelpBtn("terrain_raise_help", "HelpRegionTerrainRaise");
- initHelpBtn("terrain_lower_help", "HelpRegionTerrainLower");
- initHelpBtn("upload_raw_help", "HelpRegionUploadRaw");
- initHelpBtn("download_raw_help", "HelpRegionDownloadRaw");
- initHelpBtn("use_estate_sun_help", "HelpRegionUseEstateSun");
- initHelpBtn("fixed_sun_help", "HelpRegionFixedSun");
- initHelpBtn("bake_terrain_help", "HelpRegionBakeTerrain");
-
initCtrl("water_height_spin");
initCtrl("terrain_raise_spin");
initCtrl("terrain_lower_spin");
@@ -1345,21 +1309,18 @@ void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data)
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
- LLNotifications::instance().add("RawUploadStarted");
+ LLNotificationsUtil::add("RawUploadStarted");
}
// static
void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data)
{
- LLNotification::Params::Functor functor_params;
- functor_params.function(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2));
-
- LLNotifications::instance().add(LLNotification::Params("ConfirmBakeTerrain").functor(functor_params));
+ LLNotificationsUtil::add("ConfirmBakeTerrain", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2));
}
bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
strings_t strings;
@@ -1446,7 +1407,7 @@ void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data)
LLSD args;
args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- LLNotifications::instance().add("MaxAllowedAgentOnRegion", args);
+ LLNotificationsUtil::add("MaxAllowedAgentOnRegion", args);
return;
}
accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd");
@@ -1466,7 +1427,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup()
{
LLSD args;
args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- LLNotifications::instance().add("MaxAllowedGroupsOnRegion", args);
+ LLNotificationsUtil::add("MaxAllowedGroupsOnRegion", args);
return;
}
@@ -1484,7 +1445,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup()
bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
@@ -1521,7 +1482,7 @@ void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data)
{
LLSD args;
args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
- LLNotifications::instance().add("MaxBannedAgentsOnRegion", args);
+ LLNotificationsUtil::add("MaxBannedAgentsOnRegion", args);
return;
}
accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd");
@@ -1543,7 +1504,7 @@ void LLPanelEstateInfo::onClickAddEstateManager(void* user_data)
{ // Tell user they can't add more managers
LLSD args;
args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS);
- LLNotifications::instance().add("MaxManagersOnRegion", args);
+ LLNotificationsUtil::add("MaxManagersOnRegion", args);
}
else
{ // Go pick managers to add
@@ -1560,24 +1521,17 @@ void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data)
//---------------------------------------------------------------------------
// Kick from estate methods
//---------------------------------------------------------------------------
-struct LLKickFromEstateInfo
-{
- LLPanelEstateInfo *mEstatePanelp;
- LLUUID mAgentID;
-};
-void LLPanelEstateInfo::onClickKickUser(void *user_data)
+void LLPanelEstateInfo::onClickKickUser()
{
- LLPanelEstateInfo* panelp = (LLPanelEstateInfo*)user_data;
-
// this depends on the grandparent view being a floater
// in order to set up floater dependency
- LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
- LLFloater* child_floater = LLFloaterAvatarPicker::show(LLPanelEstateInfo::onKickUserCommit, user_data, FALSE, TRUE);
+ LLFloater* parent_floater = gFloaterView->getParentFloater(this);
+ LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1, _2), FALSE, TRUE);
parent_floater->addDependentFloater(child_floater);
}
-void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata)
+void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids)
{
if (names.empty() || ids.empty()) return;
@@ -1588,26 +1542,18 @@ void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names,
return;
}
- LLPanelEstateInfo* self = (LLPanelEstateInfo*)userdata;
- if(!self) return;
-
- //keep track of what user they want to kick and other misc info
- LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo();
- kick_info->mEstatePanelp = self;
- kick_info->mAgentID = ids[0];
-
//Bring up a confirmation dialog
LLSD args;
args["EVIL_USER"] = names[0];
LLSD payload;
payload["agent_id"] = ids[0];
- LLNotifications::instance().add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2));
+ LLNotificationsUtil::add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, this, _1, _2));
}
bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:
@@ -1647,7 +1593,7 @@ std::string all_estates_text()
}
else if (region && region->getOwner() == gAgent.getID())
{
- return LLTrans::getString("AllEstatesYouOwn");
+ return LLTrans::getString("RegionInfoAllEstatesYouOwn");
}
else if (region && region->isEstateManager())
{
@@ -1756,7 +1702,7 @@ void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dia
// static
bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
{
// abort change
@@ -1765,7 +1711,7 @@ bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& res
LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]);
// avatar picker yes multi-select, yes close-on-select
- LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, TRUE, TRUE);
+ LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::accessAddCore3, _1, _2, (void*)change_info), TRUE, TRUE);
return false;
}
@@ -1800,7 +1746,7 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, co
args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
args["LIST_TYPE"] = "Allowed Residents";
args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
- LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
+ LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
delete change_info;
return;
}
@@ -1816,7 +1762,7 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, co
args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
args["LIST_TYPE"] = "Banned Residents";
args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
- LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
+ LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
delete change_info;
return;
}
@@ -1885,7 +1831,7 @@ void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string&
// static
bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
{
// abort
@@ -1902,7 +1848,7 @@ bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD&
{
LLSD args;
args["ALL_ESTATES"] = all_estates_text();
- LLNotifications::instance().add(notification["payload"]["dialog_name"],
+ LLNotificationsUtil::add(notification["payload"]["dialog_name"],
args,
notification["payload"],
accessCoreConfirm);
@@ -1915,7 +1861,7 @@ bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD&
// static
bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger();
LLViewerRegion* region = gAgent.getRegion();
@@ -1934,7 +1880,7 @@ bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD&
if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD)
&& region && (region->getOwner() == id))
{
- LLNotifications::instance().add("OwnerCanNotBeDenied");
+ LLNotificationsUtil::add("OwnerCanNotBeDenied");
break;
}
switch(option)
@@ -2030,11 +1976,6 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
childSetEnabled("remove_banned_avatar_btn", god || owner || manager);
childSetEnabled("message_estate_btn", god || owner || manager);
childSetEnabled("kick_user_from_estate_btn", god || owner || manager);
-#if ELAR_ENABLED
- childSetEnabled("abuse_email_address", god || owner || manager);
-#else
- childSetEnabled("abuse_email_address", false);
-#endif
// estate managers can't add estate managers
childSetEnabled("add_estate_manager_btn", god || owner);
@@ -2100,22 +2041,6 @@ BOOL LLPanelEstateInfo::postBuild()
initCtrl("limit_payment");
initCtrl("limit_age_verified");
initCtrl("voice_chat_check");
- getChild<LLUICtrl>("abuse_email_address")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAnything, this));
- getChild<LLLineEditor>("abuse_email_address")->setKeystrokeCallback(onChangeText, this);
-
- initHelpBtn("estate_manager_help", "HelpEstateEstateManager");
- initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime");
- initHelpBtn("fixed_sun_help", "HelpEstateFixedSun");
- initHelpBtn("WLEditSkyHelp", "HelpEditSky");
- initHelpBtn("WLEditDayCycleHelp", "HelpEditDayCycle");
-
- initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible");
- initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport");
- initHelpBtn("allow_resident_help", "HelpEstateAllowResident");
- initHelpBtn("allow_group_help", "HelpEstateAllowGroup");
- initHelpBtn("ban_resident_help", "HelpEstateBanResident");
- initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress");
- initHelpBtn("voice_chat_help", "HelpEstateVoiceChat");
// set up the use global time checkbox
getChild<LLUICtrl>("use_global_time_check")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeUseGlobalTime, this));
@@ -2166,7 +2091,7 @@ BOOL LLPanelEstateInfo::postBuild()
childSetAction("add_estate_manager_btn", onClickAddEstateManager, this);
childSetAction("remove_estate_manager_btn", onClickRemoveEstateManager, this);
childSetAction("message_estate_btn", onClickMessageEstate, this);
- childSetAction("kick_user_from_estate_btn", onClickKickUser, this);
+ childSetAction("kick_user_from_estate_btn", boost::bind(&LLPanelEstateInfo::onClickKickUser, this));
childSetAction("WLEditSky", onClickEditSky, this);
childSetAction("WLEditDayCycle", onClickEditDayCycle, this);
@@ -2210,7 +2135,7 @@ BOOL LLPanelEstateInfo::sendUpdate()
bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:
@@ -2325,8 +2250,6 @@ bool LLPanelEstateInfo::commitEstateInfoCaps()
}
body["sun_hour"] = sun_hour;
- body["owner_abuse_email"] = childGetValue("abuse_email_address").asString();
-
// we use a responder so that we can re-get the data after committing to the database
LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder(this));
return true;
@@ -2485,16 +2408,6 @@ void LLPanelEstateInfo::setOwnerName(const std::string& name)
childSetValue("estate_owner", LLSD(name));
}
-const std::string LLPanelEstateInfo::getAbuseEmailAddress() const
-{
- return childGetValue("abuse_email_address").asString();
-}
-
-void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address)
-{
- childSetValue("abuse_email_address", LLSD(address));
-}
-
void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent,
bool enable_group,
bool enable_ban)
@@ -2599,12 +2512,12 @@ BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl)
void LLPanelEstateInfo::onClickMessageEstate(void* userdata)
{
llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl;
- LLNotifications::instance().add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2));
+ LLNotificationsUtil::add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2));
}
bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
std::string text = response["message"].asString();
if(option != 0) return false;
if(text.empty()) return false;
@@ -2621,7 +2534,9 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re
}
LLPanelEstateCovenant::LLPanelEstateCovenant()
-: mCovenantID(LLUUID::null)
+ :
+ mCovenantID(LLUUID::null),
+ mAssetStatus(ASSET_ERROR)
{
}
@@ -2694,7 +2609,6 @@ bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg)
// virtual
BOOL LLPanelEstateCovenant::postBuild()
{
- initHelpBtn("covenant_help", "HelpEstateCovenant");
mEstateNameText = getChild<LLTextBox>("estate_name_text");
mEstateOwnerText = getChild<LLTextBox>("estate_owner_text");
mLastModifiedText = getChild<LLTextBox>("covenant_timestamp_text");
@@ -2734,7 +2648,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop
{
LLSD payload;
payload["item_id"] = item->getUUID();
- LLNotifications::instance().add("EstateChangeCovenant", LLSD(), payload,
+ LLNotificationsUtil::add("EstateChangeCovenant", LLSD(), payload,
LLPanelEstateCovenant::confirmChangeCovenantCallback);
}
break;
@@ -2749,7 +2663,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop
// static
bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLInventoryItem* item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
@@ -2769,7 +2683,7 @@ bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notificati
// static
void LLPanelEstateCovenant::resetCovenantID(void* userdata)
{
- LLNotifications::instance().add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback);
+ LLNotificationsUtil::add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback);
}
// static
@@ -2778,7 +2692,7 @@ bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notificatio
LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
if (!self) return false;
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:
@@ -2842,7 +2756,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
if( !panelp->mEditor->importBuffer( &buffer[0], file_length+1 ) )
{
llwarns << "Problem importing estate covenant." << llendl;
- LLNotifications::instance().add("ProblemImportingEstateCovenant");
+ LLNotificationsUtil::add("ProblemImportingEstateCovenant");
}
else
{
@@ -2862,15 +2776,15 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
- LLNotifications::instance().add("MissingNotecardAssetID");
+ LLNotificationsUtil::add("MissingNotecardAssetID");
}
else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
{
- LLNotifications::instance().add("NotAllowedToViewNotecard");
+ LLNotificationsUtil::add("NotAllowedToViewNotecard");
}
else
{
- LLNotifications::instance().add("UnableToLoadNotecardAsset");
+ LLNotificationsUtil::add("UnableToLoadNotecardAsset");
}
llwarns << "Problem loading notecard: " << status << llendl;
@@ -3004,18 +2918,6 @@ bool LLDispatchEstateUpdateInfo::operator()(
std::string estate_name = strings[0].c_str(); // preserve c_str() call!
panel->setEstateName(estate_name);
-#if ELAR_ENABLED
- if (strings.size() > 9)
- {
- std::string abuse_email = strings[9].c_str(); // preserve c_str() call!
- panel->setAbuseEmailAddress(abuse_email);
- }
- else
-#endif
- {
- panel->setAbuseEmailAddress(panel->getString("email_unsupported"));
- }
-
LLViewerRegion* regionp = gAgent.getRegion();
LLUUID owner_id(strings[1]);