aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterregioninfo.cpp52
1 files changed, 37 insertions, 15 deletions
diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp
index 20f3192..3306142 100644
--- a/linden/indra/newview/llfloaterregioninfo.cpp
+++ b/linden/indra/newview/llfloaterregioninfo.cpp
@@ -408,6 +408,15 @@ void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
408 region)); 408 region));
409} 409}
410 410
411// public
412void LLFloaterRegionInfo::refresh()
413{
414 for(info_panels_t::iterator iter = mInfoPanels.begin();
415 iter != mInfoPanels.end(); ++iter)
416 {
417 (*iter)->refresh();
418 }
419}
411 420
412 421
413///---------------------------------------------------------------------------- 422///----------------------------------------------------------------------------
@@ -447,6 +456,7 @@ void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data)
447 if(panel) 456 if(panel)
448 { 457 {
449 panel->enableButton("apply_btn"); 458 panel->enableButton("apply_btn");
459 panel->refresh();
450 } 460 }
451} 461}
452 462
@@ -455,6 +465,7 @@ BOOL LLPanelRegionInfo::postBuild()
455{ 465{
456 childSetAction("apply_btn", onBtnSet, this); 466 childSetAction("apply_btn", onBtnSet, this);
457 childDisable("apply_btn"); 467 childDisable("apply_btn");
468 refresh();
458 return TRUE; 469 return TRUE;
459} 470}
460 471
@@ -716,6 +727,8 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
716 body["allow_land_resell"] = childGetValue("allow_land_resell_check"); 727 body["allow_land_resell"] = childGetValue("allow_land_resell_check");
717 body["agent_limit"] = childGetValue("agent_limit_spin"); 728 body["agent_limit"] = childGetValue("agent_limit_spin");
718 body["prim_bonus"] = childGetValue("object_bonus_spin"); 729 body["prim_bonus"] = childGetValue("object_bonus_spin");
730 // the combo box stores strings "Mature" and "PG", but we have to convert back to a number,
731 // because the sim doesn't know from strings for this stuff
719 body["sim_access"] = LLViewerRegion::stringToAccess(childGetValue("access_combo").asString().c_str()); 732 body["sim_access"] = LLViewerRegion::stringToAccess(childGetValue("access_combo").asString().c_str());
720 body["restrict_pushobject"] = childGetValue("restrict_pushobject"); 733 body["restrict_pushobject"] = childGetValue("restrict_pushobject");
721 body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check"); 734 body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check");
@@ -1907,6 +1920,7 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
1907 BOOL owner = (region && (region->getOwner() == gAgent.getID())); 1920 BOOL owner = (region && (region->getOwner() == gAgent.getID()));
1908 BOOL manager = (region && region->isEstateManager()); 1921 BOOL manager = (region && region->isEstateManager());
1909 setCtrlsEnabled(god || owner || manager); 1922 setCtrlsEnabled(god || owner || manager);
1923
1910 childDisable("apply_btn"); 1924 childDisable("apply_btn");
1911 childSetEnabled("add_allowed_avatar_btn", god || owner || manager); 1925 childSetEnabled("add_allowed_avatar_btn", god || owner || manager);
1912 childSetEnabled("remove_allowed_avatar_btn", god || owner || manager); 1926 childSetEnabled("remove_allowed_avatar_btn", god || owner || manager);
@@ -1942,8 +1956,7 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
1942 1956
1943 sendEstateOwnerMessage(gMessageSystem, "getinfo", invoice, strings); 1957 sendEstateOwnerMessage(gMessageSystem, "getinfo", invoice, strings);
1944 1958
1945 1959 refresh();
1946
1947 1960
1948 return rv; 1961 return rv;
1949} 1962}
@@ -1974,9 +1987,8 @@ BOOL LLPanelEstateInfo::postBuild()
1974 initCtrl("use_global_time_check"); 1987 initCtrl("use_global_time_check");
1975 initCtrl("fixed_sun_check"); 1988 initCtrl("fixed_sun_check");
1976 initCtrl("allow_direct_teleport"); 1989 initCtrl("allow_direct_teleport");
1977 initCtrl("deny_anonymous"); 1990 initCtrl("limit_payment");
1978 initCtrl("deny_identified"); 1991 initCtrl("limit_age_verified");
1979 initCtrl("deny_transacted");
1980 initCtrl("voice_chat_check"); 1992 initCtrl("voice_chat_check");
1981 1993
1982 initHelpBtn("estate_manager_help", "HelpEstateEstateManager"); 1994 initHelpBtn("estate_manager_help", "HelpEstateEstateManager");
@@ -2043,6 +2055,19 @@ BOOL LLPanelEstateInfo::postBuild()
2043 return LLPanelRegionInfo::postBuild(); 2055 return LLPanelRegionInfo::postBuild();
2044} 2056}
2045 2057
2058void LLPanelEstateInfo::refresh()
2059{
2060 bool public_access = childGetValue("externally_visible_check").asBoolean();
2061 childSetEnabled("Only Allow", public_access);
2062 childSetEnabled("limit_payment", public_access);
2063 childSetEnabled("limit_age_verified", public_access);
2064 // if this is set to false, then the limit fields are meaningless and should be turned off
2065 if (public_access == false)
2066 {
2067 childSetValue("limit_payment", false);
2068 childSetValue("limit_age_verified", false);
2069 }
2070}
2046 2071
2047BOOL LLPanelEstateInfo::sendUpdate() 2072BOOL LLPanelEstateInfo::sendUpdate()
2048{ 2073{
@@ -2157,10 +2182,11 @@ void LLPanelEstateInfo::setEstateFlags(U32 flags)
2157 "voice_chat_check", 2182 "voice_chat_check",
2158 LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE)); 2183 LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE));
2159 childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) ); 2184 childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) );
2160 childSetValue("deny_anonymous", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) ); 2185 childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) );
2161 childSetValue("deny_identified", LLSD(flags & REGION_FLAGS_DENY_IDENTIFIED ? TRUE : FALSE) ); 2186 childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) );
2162 childSetValue("deny_transacted", LLSD(flags & REGION_FLAGS_DENY_TRANSACTED ? TRUE : FALSE) );
2163 childSetVisible("abuse_email_text", flags & REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER); 2187 childSetVisible("abuse_email_text", flags & REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER);
2188
2189 refresh();
2164} 2190}
2165 2191
2166U32 LLPanelEstateInfo::computeEstateFlags() 2192U32 LLPanelEstateInfo::computeEstateFlags()
@@ -2187,20 +2213,16 @@ U32 LLPanelEstateInfo::computeEstateFlags()
2187 flags |= REGION_FLAGS_SUN_FIXED; 2213 flags |= REGION_FLAGS_SUN_FIXED;
2188 } 2214 }
2189 2215
2190 if (childGetValue("deny_anonymous").asBoolean()) 2216 if (childGetValue("limit_payment").asBoolean())
2191 { 2217 {
2192 flags |= REGION_FLAGS_DENY_ANONYMOUS; 2218 flags |= REGION_FLAGS_DENY_ANONYMOUS;
2193 } 2219 }
2194 2220
2195 if (childGetValue("deny_identified").asBoolean()) 2221 if (childGetValue("limit_age_verified").asBoolean())
2196 { 2222 {
2197 flags |= REGION_FLAGS_DENY_IDENTIFIED; 2223 flags |= REGION_FLAGS_DENY_AGEUNVERIFIED;
2198 } 2224 }
2199 2225
2200 if (childGetValue("deny_transacted").asBoolean())
2201 {
2202 flags |= REGION_FLAGS_DENY_TRANSACTED;
2203 }
2204 2226
2205 return flags; 2227 return flags;
2206} 2228}