diff options
Diffstat (limited to 'linden/indra/newview/llfloaterregioninfo.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterregioninfo.cpp | 192 |
1 files changed, 166 insertions, 26 deletions
diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 2f01844..8043fe0 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp | |||
@@ -52,10 +52,12 @@ | |||
52 | #include "llcheckboxctrl.h" | 52 | #include "llcheckboxctrl.h" |
53 | #include "llcombobox.h" | 53 | #include "llcombobox.h" |
54 | #include "llfilepicker.h" | 54 | #include "llfilepicker.h" |
55 | #include "llfloaterdaycycle.h" | ||
55 | #include "llfloatergodtools.h" // for send_sim_wide_deletes() | 56 | #include "llfloatergodtools.h" // for send_sim_wide_deletes() |
56 | #include "llfloatertopobjects.h" // added to fix SL-32336 | 57 | #include "llfloatertopobjects.h" // added to fix SL-32336 |
57 | #include "llfloatergroups.h" | 58 | #include "llfloatergroups.h" |
58 | #include "llfloatertelehub.h" | 59 | #include "llfloatertelehub.h" |
60 | #include "llfloaterwindlight.h" | ||
59 | #include "lllineeditor.h" | 61 | #include "lllineeditor.h" |
60 | #include "llalertdialog.h" | 62 | #include "llalertdialog.h" |
61 | #include "llnamelistctrl.h" | 63 | #include "llnamelistctrl.h" |
@@ -214,7 +216,6 @@ BOOL LLFloaterRegionInfo::postBuild() | |||
214 | 216 | ||
215 | LLFloaterRegionInfo::~LLFloaterRegionInfo() | 217 | LLFloaterRegionInfo::~LLFloaterRegionInfo() |
216 | { | 218 | { |
217 | sInstance = NULL; | ||
218 | } | 219 | } |
219 | 220 | ||
220 | void LLFloaterRegionInfo::onOpen() | 221 | void LLFloaterRegionInfo::onOpen() |
@@ -229,6 +230,7 @@ void LLFloaterRegionInfo::onOpen() | |||
229 | LLFloater::onOpen(); | 230 | LLFloater::onOpen(); |
230 | } | 231 | } |
231 | 232 | ||
233 | // static | ||
232 | void LLFloaterRegionInfo::requestRegionInfo() | 234 | void LLFloaterRegionInfo::requestRegionInfo() |
233 | { | 235 | { |
234 | // Must allow anyone to request the RegionInfo data | 236 | // Must allow anyone to request the RegionInfo data |
@@ -247,14 +249,17 @@ void LLFloaterRegionInfo::requestRegionInfo() | |||
247 | void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) | 249 | void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) |
248 | { | 250 | { |
249 | static LLDispatcher dispatch; | 251 | static LLDispatcher dispatch; |
250 | if(!sInstance) return; | 252 | if(!findInstance()) |
251 | 253 | { | |
254 | return; | ||
255 | } | ||
256 | |||
252 | if (!estate_dispatch_initialized) | 257 | if (!estate_dispatch_initialized) |
253 | { | 258 | { |
254 | LLPanelEstateInfo::initDispatch(dispatch); | 259 | LLPanelEstateInfo::initDispatch(dispatch); |
255 | } | 260 | } |
256 | 261 | ||
257 | LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(sInstance, "region_panels"); | 262 | LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(findInstance(), "region_panels"); |
258 | if (!tab) return; | 263 | if (!tab) return; |
259 | 264 | ||
260 | LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab, "Estate"); | 265 | LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab, "Estate"); |
@@ -282,8 +287,12 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) | |||
282 | LLPanel* panel; | 287 | LLPanel* panel; |
283 | 288 | ||
284 | llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl; | 289 | llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl; |
285 | if(!sInstance) return; | 290 | if(!findInstance()) |
286 | LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(sInstance, "region_panels"); | 291 | { |
292 | return; | ||
293 | } | ||
294 | |||
295 | LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(findInstance(), "region_panels"); | ||
287 | if(!tab) return; | 296 | if(!tab) return; |
288 | 297 | ||
289 | // extract message | 298 | // extract message |
@@ -359,6 +368,8 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) | |||
359 | panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun); | 368 | panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun); |
360 | panel->childSetValue("sun_hour_slider", LLSD(sun_hour)); | 369 | panel->childSetValue("sun_hour_slider", LLSD(sun_hour)); |
361 | panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun); | 370 | panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun); |
371 | |||
372 | getInstance()->refreshFromRegion( gAgent.getRegion() ); | ||
362 | } | 373 | } |
363 | 374 | ||
364 | // static | 375 | // static |
@@ -366,7 +377,7 @@ LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate() | |||
366 | { | 377 | { |
367 | LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); | 378 | LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); |
368 | if (!floater) return NULL; | 379 | if (!floater) return NULL; |
369 | LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); | 380 | LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); |
370 | if (!tab) return NULL; | 381 | if (!tab) return NULL; |
371 | LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab,"Estate"); | 382 | LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab,"Estate"); |
372 | return panel; | 383 | return panel; |
@@ -377,7 +388,7 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() | |||
377 | { | 388 | { |
378 | LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); | 389 | LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); |
379 | if (!floater) return NULL; | 390 | if (!floater) return NULL; |
380 | LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); | 391 | LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); |
381 | if (!tab) return NULL; | 392 | if (!tab) return NULL; |
382 | LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)LLUICtrlFactory::getPanelByName(tab, "Covenant"); | 393 | LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)LLUICtrlFactory::getPanelByName(tab, "Covenant"); |
383 | return panel; | 394 | return panel; |
@@ -450,6 +461,15 @@ void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data) | |||
450 | } | 461 | } |
451 | } | 462 | } |
452 | 463 | ||
464 | // static | ||
465 | // Enables set button on change to line editor | ||
466 | void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) | ||
467 | { | ||
468 | // reuse the previous method | ||
469 | onChangeAnything(0, user_data); | ||
470 | } | ||
471 | |||
472 | |||
453 | // virtual | 473 | // virtual |
454 | BOOL LLPanelRegionInfo::postBuild() | 474 | BOOL LLPanelRegionInfo::postBuild() |
455 | { | 475 | { |
@@ -519,6 +539,12 @@ void LLPanelRegionInfo::initCtrl(const char* name) | |||
519 | childSetCommitCallback(name, onChangeAnything, this); | 539 | childSetCommitCallback(name, onChangeAnything, this); |
520 | } | 540 | } |
521 | 541 | ||
542 | void LLPanelRegionInfo::initTextCtrl(const char* name) | ||
543 | { | ||
544 | childSetCommitCallback(name, onChangeAnything, this); | ||
545 | childSetKeystrokeCallback("abuse_email_address", onChangeText, this); | ||
546 | } | ||
547 | |||
522 | void LLPanelRegionInfo::initHelpBtn(const char* name, const char* xml_alert) | 548 | void LLPanelRegionInfo::initHelpBtn(const char* name, const char* xml_alert) |
523 | { | 549 | { |
524 | childSetAction(name, onClickHelp, (void*)xml_alert); | 550 | childSetAction(name, onClickHelp, (void*)xml_alert); |
@@ -1231,7 +1257,7 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() | |||
1231 | LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); | 1257 | LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); |
1232 | if (!floater) return true; | 1258 | if (!floater) return true; |
1233 | 1259 | ||
1234 | LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); | 1260 | LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); |
1235 | if (!tab) return true; | 1261 | if (!tab) return true; |
1236 | 1262 | ||
1237 | LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab, "Estate"); | 1263 | LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab, "Estate"); |
@@ -1412,9 +1438,21 @@ void LLPanelEstateInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data) | |||
1412 | } | 1438 | } |
1413 | } | 1439 | } |
1414 | 1440 | ||
1441 | |||
1442 | |||
1443 | |||
1415 | //--------------------------------------------------------------------------- | 1444 | //--------------------------------------------------------------------------- |
1416 | // Add/Remove estate access button callbacks | 1445 | // Add/Remove estate access button callbacks |
1417 | //--------------------------------------------------------------------------- | 1446 | //--------------------------------------------------------------------------- |
1447 | void LLPanelEstateInfo::onClickEditSky(void* user_data) | ||
1448 | { | ||
1449 | LLFloaterWindLight::show(); | ||
1450 | } | ||
1451 | |||
1452 | void LLPanelEstateInfo::onClickEditDayCycle(void* user_data) | ||
1453 | { | ||
1454 | LLFloaterDayCycle::show(); | ||
1455 | } | ||
1418 | 1456 | ||
1419 | // static | 1457 | // static |
1420 | void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data) | 1458 | void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data) |
@@ -1920,6 +1958,7 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) | |||
1920 | childSetEnabled("remove_banned_avatar_btn", god || owner || manager); | 1958 | childSetEnabled("remove_banned_avatar_btn", god || owner || manager); |
1921 | childSetEnabled("message_estate_btn", god || owner || manager); | 1959 | childSetEnabled("message_estate_btn", god || owner || manager); |
1922 | childSetEnabled("kick_user_from_estate_btn", god || owner || manager); | 1960 | childSetEnabled("kick_user_from_estate_btn", god || owner || manager); |
1961 | childSetEnabled("abuse_email_address", god || owner || manager); | ||
1923 | 1962 | ||
1924 | // estate managers can't add estate managers | 1963 | // estate managers can't add estate managers |
1925 | childSetEnabled("add_estate_manager_btn", god || owner); | 1964 | childSetEnabled("add_estate_manager_btn", god || owner); |
@@ -1980,16 +2019,21 @@ BOOL LLPanelEstateInfo::postBuild() | |||
1980 | initCtrl("limit_payment"); | 2019 | initCtrl("limit_payment"); |
1981 | initCtrl("limit_age_verified"); | 2020 | initCtrl("limit_age_verified"); |
1982 | initCtrl("voice_chat_check"); | 2021 | initCtrl("voice_chat_check"); |
2022 | initTextCtrl("abuse_email_address"); | ||
1983 | 2023 | ||
1984 | initHelpBtn("estate_manager_help", "HelpEstateEstateManager"); | 2024 | initHelpBtn("estate_manager_help", "HelpEstateEstateManager"); |
1985 | initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime"); | 2025 | initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime"); |
1986 | initHelpBtn("fixed_sun_help", "HelpEstateFixedSun"); | 2026 | initHelpBtn("fixed_sun_help", "HelpEstateFixedSun"); |
2027 | initHelpBtn("WLEditSkyHelp", "HelpEditSky"); | ||
2028 | initHelpBtn("WLEditDayCycleHelp", "HelpEditDayCycle"); | ||
2029 | |||
1987 | initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible"); | 2030 | initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible"); |
1988 | initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport"); | 2031 | initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport"); |
1989 | initHelpBtn("allow_resident_help", "HelpEstateAllowResident"); | 2032 | initHelpBtn("allow_resident_help", "HelpEstateAllowResident"); |
1990 | initHelpBtn("allow_group_help", "HelpEstateAllowGroup"); | 2033 | initHelpBtn("allow_group_help", "HelpEstateAllowGroup"); |
1991 | initHelpBtn("ban_resident_help", "HelpEstateBanResident"); | 2034 | initHelpBtn("ban_resident_help", "HelpEstateBanResident"); |
1992 | initHelpBtn("voice_chat_help", "HelpEstateVoiceChat"); | 2035 | initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress"); |
2036 | initHelpBtn("voice_chat_help", "HelpEstateVoiceChat"); | ||
1993 | 2037 | ||
1994 | // set up the use global time checkbox | 2038 | // set up the use global time checkbox |
1995 | childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this); | 2039 | childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this); |
@@ -2042,6 +2086,9 @@ BOOL LLPanelEstateInfo::postBuild() | |||
2042 | childSetAction("message_estate_btn", onClickMessageEstate, this); | 2086 | childSetAction("message_estate_btn", onClickMessageEstate, this); |
2043 | childSetAction("kick_user_from_estate_btn", onClickKickUser, this); | 2087 | childSetAction("kick_user_from_estate_btn", onClickKickUser, this); |
2044 | 2088 | ||
2089 | childSetAction("WLEditSky", onClickEditSky, this); | ||
2090 | childSetAction("WLEditDayCycle", onClickEditDayCycle, this); | ||
2091 | |||
2045 | return LLPanelRegionInfo::postBuild(); | 2092 | return LLPanelRegionInfo::postBuild(); |
2046 | } | 2093 | } |
2047 | 2094 | ||
@@ -2086,8 +2133,19 @@ void LLPanelEstateInfo::callbackChangeLindenEstate(S32 option, void* data) | |||
2086 | { | 2133 | { |
2087 | case 0: | 2134 | case 0: |
2088 | // send the update | 2135 | // send the update |
2089 | LLFloaterRegionInfo::nextInvoice(); | 2136 | if (!self->commitEstateInfoCaps()) |
2090 | self->commitEstateInfo(); | 2137 | { |
2138 | // the caps method failed, try the old way | ||
2139 | LLFloaterRegionInfo::nextInvoice(); | ||
2140 | self->commitEstateInfoDataserver(); | ||
2141 | } | ||
2142 | // we don't want to do this because we'll get it automatically from the sim | ||
2143 | // after the spaceserver processes it | ||
2144 | // else | ||
2145 | // { | ||
2146 | // // caps method does not automatically send this info | ||
2147 | // LLFloaterRegionInfo::requestRegionInfo(); | ||
2148 | // } | ||
2091 | break; | 2149 | break; |
2092 | case 1: | 2150 | case 1: |
2093 | default: | 2151 | default: |
@@ -2125,12 +2183,75 @@ void LLPanelEstateInfo::getEstateOwner() | |||
2125 | } | 2183 | } |
2126 | */ | 2184 | */ |
2127 | 2185 | ||
2186 | class LLEstateChangeInfoResponder : public LLHTTPClient::Responder | ||
2187 | { | ||
2188 | public: | ||
2189 | LLEstateChangeInfoResponder(void* userdata) : mpPanel((LLPanelEstateInfo*)userdata) {}; | ||
2190 | |||
2191 | // if we get a normal response, handle it here | ||
2192 | virtual void result(const LLSD& content) | ||
2193 | { | ||
2194 | // refresh the panel from the database | ||
2195 | mpPanel->refresh(); | ||
2196 | } | ||
2197 | |||
2198 | // if we get an error response | ||
2199 | virtual void error(U32 status, const std::string& reason) | ||
2200 | { | ||
2201 | llinfos << "LLEstateChangeInfoResponder::error " | ||
2202 | << status << ": " << reason << llendl; | ||
2203 | } | ||
2204 | private: | ||
2205 | LLPanelEstateInfo* mpPanel; | ||
2206 | }; | ||
2207 | |||
2208 | // tries to send estate info using a cap; returns true if it succeeded | ||
2209 | bool LLPanelEstateInfo::commitEstateInfoCaps() | ||
2210 | { | ||
2211 | std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo"); | ||
2212 | |||
2213 | if (url.empty()) | ||
2214 | { | ||
2215 | // whoops, couldn't find the cap, so bail out | ||
2216 | return false; | ||
2217 | } | ||
2218 | |||
2219 | LLSD body; | ||
2220 | body["estate_name"] = getEstateName(); | ||
2221 | |||
2222 | body["is_externally_visible"] = childGetValue("externally_visible_check").asBoolean(); | ||
2223 | body["allow_direct_teleport"] = childGetValue("allow_direct_teleport").asBoolean(); | ||
2224 | body["is_sun_fixed" ] = childGetValue("fixed_sun_check").asBoolean(); | ||
2225 | body["deny_anonymous" ] = childGetValue("limit_payment").asBoolean(); | ||
2226 | body["deny_age_unverified" ] = childGetValue("limit_age_verified").asBoolean(); | ||
2227 | body["allow_voice_chat" ] = childGetValue("voice_chat_check").asBoolean(); | ||
2228 | body["invoice" ] = LLFloaterRegionInfo::getLastInvoice(); | ||
2229 | |||
2230 | // block fly is in estate database but not in estate UI, so we're not supporting it | ||
2231 | //body["block_fly" ] = childGetValue("").asBoolean(); | ||
2232 | |||
2233 | F32 sun_hour = getSunHour(); | ||
2234 | if (childGetValue("use_global_time_check").asBoolean()) | ||
2235 | { | ||
2236 | sun_hour = 0.f; // 0 = global time | ||
2237 | } | ||
2238 | body["sun_hour"] = sun_hour; | ||
2239 | |||
2240 | body["owner_abuse_email"] = childGetValue("abuse_email_address").asString(); | ||
2241 | |||
2242 | // we use a responder so that we can re-get the data after committing to the database | ||
2243 | LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder((void*)this)); | ||
2244 | return true; | ||
2245 | } | ||
2246 | |||
2247 | /* This is the old way of doing things, is deprecated, and should be | ||
2248 | deleted when the dataserver model can be removed */ | ||
2128 | // key = "estatechangeinfo" | 2249 | // key = "estatechangeinfo" |
2129 | // strings[0] = str(estate_id) (added by simulator before relay - not here) | 2250 | // strings[0] = str(estate_id) (added by simulator before relay - not here) |
2130 | // strings[1] = estate_name | 2251 | // strings[1] = estate_name |
2131 | // strings[2] = str(estate_flags) | 2252 | // strings[2] = str(estate_flags) |
2132 | // strings[3] = str((S32)(sun_hour * 1024.f)) | 2253 | // strings[3] = str((S32)(sun_hour * 1024.f)) |
2133 | void LLPanelEstateInfo::commitEstateInfo() | 2254 | void LLPanelEstateInfo::commitEstateInfoDataserver() |
2134 | { | 2255 | { |
2135 | LLMessageSystem* msg = gMessageSystem; | 2256 | LLMessageSystem* msg = gMessageSystem; |
2136 | msg->newMessage("EstateOwnerMessage"); | 2257 | msg->newMessage("EstateOwnerMessage"); |
@@ -2174,7 +2295,6 @@ void LLPanelEstateInfo::setEstateFlags(U32 flags) | |||
2174 | childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) ); | 2295 | childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) ); |
2175 | childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) ); | 2296 | childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) ); |
2176 | childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) ); | 2297 | childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) ); |
2177 | childSetVisible("abuse_email_text", flags & REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER); | ||
2178 | 2298 | ||
2179 | refresh(); | 2299 | refresh(); |
2180 | } | 2300 | } |
@@ -2277,6 +2397,16 @@ void LLPanelEstateInfo::setOwnerName(const std::string& name) | |||
2277 | childSetValue("estate_owner", LLSD(name)); | 2397 | childSetValue("estate_owner", LLSD(name)); |
2278 | } | 2398 | } |
2279 | 2399 | ||
2400 | const std::string LLPanelEstateInfo::getAbuseEmailAddress() const | ||
2401 | { | ||
2402 | return childGetValue("abuse_email_address").asString(); | ||
2403 | } | ||
2404 | |||
2405 | void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address) | ||
2406 | { | ||
2407 | childSetValue("abuse_email_address", LLSD(address)); | ||
2408 | } | ||
2409 | |||
2280 | void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, | 2410 | void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, |
2281 | bool enable_group, | 2411 | bool enable_group, |
2282 | bool enable_ban) | 2412 | bool enable_ban) |
@@ -2439,35 +2569,35 @@ LLPanelEstateCovenant::LLPanelEstateCovenant() | |||
2439 | // virtual | 2569 | // virtual |
2440 | bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region) | 2570 | bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region) |
2441 | { | 2571 | { |
2442 | LLTextBox* region_name = (LLTextBox*)getChildByName("region_name_text"); | 2572 | LLTextBox* region_name = getChild<LLTextBox>("region_name_text"); |
2443 | if (region_name) | 2573 | if (region_name) |
2444 | { | 2574 | { |
2445 | region_name->setText(region->getName()); | 2575 | region_name->setText(region->getName()); |
2446 | } | 2576 | } |
2447 | 2577 | ||
2448 | LLTextBox* resellable_clause = (LLTextBox*)getChildByName("resellable_clause"); | 2578 | LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); |
2449 | if (resellable_clause) | 2579 | if (resellable_clause) |
2450 | { | 2580 | { |
2451 | if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) | 2581 | if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) |
2452 | { | 2582 | { |
2453 | resellable_clause->setText(childGetText("can_not_resell")); | 2583 | resellable_clause->setText(getString("can_not_resell")); |
2454 | } | 2584 | } |
2455 | else | 2585 | else |
2456 | { | 2586 | { |
2457 | resellable_clause->setText(childGetText("can_resell")); | 2587 | resellable_clause->setText(getString("can_resell")); |
2458 | } | 2588 | } |
2459 | } | 2589 | } |
2460 | 2590 | ||
2461 | LLTextBox* changeable_clause = (LLTextBox*)getChildByName("changeable_clause"); | 2591 | LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause"); |
2462 | if (changeable_clause) | 2592 | if (changeable_clause) |
2463 | { | 2593 | { |
2464 | if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES) | 2594 | if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES) |
2465 | { | 2595 | { |
2466 | changeable_clause->setText(childGetText("can_change")); | 2596 | changeable_clause->setText(getString("can_change")); |
2467 | } | 2597 | } |
2468 | else | 2598 | else |
2469 | { | 2599 | { |
2470 | changeable_clause->setText(childGetText("can_not_change")); | 2600 | changeable_clause->setText(getString("can_not_change")); |
2471 | } | 2601 | } |
2472 | } | 2602 | } |
2473 | 2603 | ||
@@ -2493,12 +2623,12 @@ bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg) | |||
2493 | BOOL LLPanelEstateCovenant::postBuild() | 2623 | BOOL LLPanelEstateCovenant::postBuild() |
2494 | { | 2624 | { |
2495 | initHelpBtn("covenant_help", "HelpEstateCovenant"); | 2625 | initHelpBtn("covenant_help", "HelpEstateCovenant"); |
2496 | mEstateNameText = (LLTextBox*)getChildByName("estate_name_text"); | 2626 | mEstateNameText = getChild<LLTextBox>("estate_name_text"); |
2497 | mEstateOwnerText = (LLTextBox*)getChildByName("estate_owner_text"); | 2627 | mEstateOwnerText = getChild<LLTextBox>("estate_owner_text"); |
2498 | mLastModifiedText = (LLTextBox*)getChildByName("covenant_timestamp_text"); | 2628 | mLastModifiedText = getChild<LLTextBox>("covenant_timestamp_text"); |
2499 | mEditor = (LLViewerTextEditor*)getChildByName("covenant_editor"); | 2629 | mEditor = getChild<LLViewerTextEditor>("covenant_editor"); |
2500 | if (mEditor) mEditor->setHandleEditKeysDirectly(TRUE); | 2630 | if (mEditor) mEditor->setHandleEditKeysDirectly(TRUE); |
2501 | LLButton* reset_button = (LLButton*)getChildByName("reset_covenant"); | 2631 | LLButton* reset_button = getChild<LLButton>("reset_covenant"); |
2502 | reset_button->setEnabled(gAgent.canManageEstate()); | 2632 | reset_button->setEnabled(gAgent.canManageEstate()); |
2503 | reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, NULL); | 2633 | reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, NULL); |
2504 | 2634 | ||
@@ -2821,6 +2951,7 @@ bool LLDispatchSetEstateOwner::operator()( | |||
2821 | // strings[6] = str(covenant_id) | 2951 | // strings[6] = str(covenant_id) |
2822 | // strings[7] = str(covenant_timestamp) | 2952 | // strings[7] = str(covenant_timestamp) |
2823 | // strings[8] = str(send_to_agent_only) | 2953 | // strings[8] = str(send_to_agent_only) |
2954 | // strings[9] = str(abuse_email_addr) | ||
2824 | bool LLDispatchEstateUpdateInfo::operator()( | 2955 | bool LLDispatchEstateUpdateInfo::operator()( |
2825 | const LLDispatcher* dispatcher, | 2956 | const LLDispatcher* dispatcher, |
2826 | const std::string& key, | 2957 | const std::string& key, |
@@ -2836,6 +2967,15 @@ bool LLDispatchEstateUpdateInfo::operator()( | |||
2836 | std::string estate_name = strings[0].c_str(); | 2967 | std::string estate_name = strings[0].c_str(); |
2837 | panel->setEstateName(estate_name); | 2968 | panel->setEstateName(estate_name); |
2838 | 2969 | ||
2970 | if (strings.size() > 9) | ||
2971 | { | ||
2972 | std::string abuse_email = strings[9].c_str(); | ||
2973 | panel->setAbuseEmailAddress(abuse_email); | ||
2974 | } | ||
2975 | else | ||
2976 | { | ||
2977 | panel->setAbuseEmailAddress("@ Old Server @"); | ||
2978 | } | ||
2839 | 2979 | ||
2840 | LLViewerRegion* regionp = gAgent.getRegion(); | 2980 | LLViewerRegion* regionp = gAgent.getRegion(); |
2841 | 2981 | ||