summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
commit4a6bacea0f8dcff959028f285bc533852da608b5 (patch)
tree7f49b429051e550f70917ccbcdd1c27bf86f5bdf /indra/newview/llfloaterregioninfo.cpp
parentac4766d4354ee1945f1569a94d755e3e7c0cd566 (diff)
merge viewer/viewer_1-21 94170-94770 -> release
merge viewer/viewer_1-21-0 94830-95157 -> release Includes: QAR-786 Sandbox buildme for viewer + server Release Notes on the wiki! QAR-797 teleport failures (DEV-6198 / SVC-972) mergeme
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 3b2fb43f61..f6dab5391a 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -78,6 +78,8 @@
#include "llviewerwindow.h"
#include "llvlcomposition.h"
+#define ELAR_ENABLED 0 // Enable when server support is implemented
+
const S32 TERRAIN_TEXTURE_COUNT = 4;
const S32 CORNER_COUNT = 4;
@@ -269,9 +271,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
dispatch.dispatch(request, invoice, strings);
LLViewerRegion* region = gAgent.getRegion();
- BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
- panel->setCtrlsEnabled(allow_modify);
-
+ panel->updateControls(region);
}
@@ -532,12 +532,6 @@ void LLPanelRegionInfo::initCtrl(const std::string& name)
childSetCommitCallback(name, onChangeAnything, this);
}
-void LLPanelRegionInfo::initTextCtrl(const std::string& name)
-{
- childSetCommitCallback(name, onChangeAnything, this);
- childSetKeystrokeCallback("abuse_email_address", onChangeText, this);
-}
-
void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert)
{
childSetAction(name, onClickHelp, new std::string(xml_alert));
@@ -1973,8 +1967,7 @@ void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_
gAgent.sendReliableMessage();
}
-
-bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
+void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
{
BOOL god = gAgent.isGodlike();
BOOL owner = (region && (region->getOwner() == gAgent.getID()));
@@ -1990,13 +1983,22 @@ bool LLPanelEstateInfo::refreshFromRegion(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);
childSetEnabled("remove_estate_manager_btn", god || owner);
childSetEnabled("estate_manager_name_list", god || owner);
+}
+bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
+{
+ updateControls(region);
+
// let the parent class handle the general data collection.
bool rv = LLPanelRegionInfo::refreshFromRegion(region);
@@ -2051,7 +2053,8 @@ BOOL LLPanelEstateInfo::postBuild()
initCtrl("limit_payment");
initCtrl("limit_age_verified");
initCtrl("voice_chat_check");
- initTextCtrl("abuse_email_address");
+ childSetCommitCallback("abuse_email_address", onChangeAnything, this);
+ childSetKeystrokeCallback("abuse_email_address", onChangeText, this);
initHelpBtn("estate_manager_help", "HelpEstateEstateManager");
initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime");
@@ -2966,15 +2969,17 @@ bool LLDispatchEstateUpdateInfo::operator()(
// it draws with a weird character at the end of the string.
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("@ Old Server @");
+ panel->setAbuseEmailAddress(panel->getString("email_unsupported"));
}
LLViewerRegion* regionp = gAgent.getRegion();