aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/doc/contributions.txt2
-rw-r--r--linden/etc/message.xml10
-rw-r--r--linden/indra/cmake/ViewerMiscLibs.cmake8
-rw-r--r--linden/indra/llcharacter/llkeyframewalkmotion.cpp2
-rw-r--r--linden/indra/llcommon/lltimer.cpp28
-rw-r--r--linden/indra/llcommon/lltimer.h1
-rw-r--r--linden/indra/llmessage/llcircuit.cpp11
-rw-r--r--linden/indra/llmessage/llcircuit.h3
-rw-r--r--linden/indra/llmessage/llmessagelog.cpp54
-rw-r--r--linden/indra/llmessage/llmessagelog.h41
-rw-r--r--linden/indra/llmessage/llpacketring.cpp5
-rw-r--r--linden/indra/llmessage/lltemplatemessagereader.cpp50
-rw-r--r--linden/indra/llmessage/lltemplatemessagereader.h16
-rw-r--r--linden/indra/llmessage/message.cpp18
-rw-r--r--linden/indra/llmessage/message.h18
-rw-r--r--linden/indra/llui/llscrolllistctrl.cpp17
-rw-r--r--linden/indra/llui/llscrolllistctrl.h11
-rw-r--r--linden/indra/newview/CMakeLists.txt9
-rw-r--r--linden/indra/newview/app_settings/settings.xml33
-rw-r--r--linden/indra/newview/hippoLimits.cpp141
-rw-r--r--linden/indra/newview/hippoLimits.h34
-rw-r--r--linden/indra/newview/kowopenregionsettings.cpp92
-rwxr-xr-xlinden/indra/newview/linux_tools/getvoice.sh34
-rw-r--r--linden/indra/newview/llagent.cpp83
-rw-r--r--linden/indra/newview/llagent.h15
-rw-r--r--linden/indra/newview/llappviewer.cpp2
-rw-r--r--linden/indra/newview/llassetuploadresponders.h1
-rw-r--r--linden/indra/newview/llcloud.cpp30
-rw-r--r--linden/indra/newview/llfloaterenvsettings.cpp8
-rw-r--r--linden/indra/newview/llfloaterenvsettings.h3
-rw-r--r--linden/indra/newview/llfloatermap.cpp4
-rw-r--r--linden/indra/newview/llfloatermessagebuilder.cpp978
-rw-r--r--linden/indra/newview/llfloatermessagebuilder.h55
-rw-r--r--linden/indra/newview/llfloatermessagelog.cpp962
-rw-r--r--linden/indra/newview/llfloatermessagelog.h84
-rw-r--r--linden/indra/newview/llfloaterregioninfo.cpp6734
-rw-r--r--linden/indra/newview/llfloaterregioninfo.h20
-rw-r--r--linden/indra/newview/llfloatertools.cpp49
-rw-r--r--linden/indra/newview/llfloatertos.cpp594
-rw-r--r--linden/indra/newview/llfloaterwater.cpp8
-rw-r--r--linden/indra/newview/llfloaterwindlight.cpp58
-rw-r--r--linden/indra/newview/llfloaterwindlight.h4
-rw-r--r--linden/indra/newview/llhomelocationresponder.cpp2
-rw-r--r--linden/indra/newview/llhudeffectlookat.cpp3
-rw-r--r--linden/indra/newview/llinventoryactions.cpp5
-rw-r--r--linden/indra/newview/llinventorybridge.cpp49
-rw-r--r--linden/indra/newview/llinventorybridge.h1
-rw-r--r--linden/indra/newview/llinventoryclipboard.cpp18
-rw-r--r--linden/indra/newview/llinventoryclipboard.h7
-rw-r--r--linden/indra/newview/llmaniptranslate.cpp15
-rw-r--r--linden/indra/newview/llprefschat.cpp5
-rw-r--r--linden/indra/newview/llselectmgr.cpp2
-rw-r--r--linden/indra/newview/llsurface.cpp26
-rw-r--r--linden/indra/newview/llsurface.h2
-rw-r--r--linden/indra/newview/lltexlayer.cpp57
-rw-r--r--linden/indra/newview/lltexlayer.h4
-rw-r--r--linden/indra/newview/lltexturecache.cpp54
-rw-r--r--linden/indra/newview/lltexturecache.h1
-rw-r--r--linden/indra/newview/lltooldraganddrop.cpp10
-rw-r--r--linden/indra/newview/llviewerdisplay.cpp20
-rw-r--r--linden/indra/newview/llviewerinventory.cpp2
-rw-r--r--linden/indra/newview/llviewermenu.cpp45
-rw-r--r--linden/indra/newview/llviewermenu.h2
-rwxr-xr-xlinden/indra/newview/llviewermessage.cpp72
-rw-r--r--linden/indra/newview/llviewerregion.cpp9
-rw-r--r--linden/indra/newview/llviewerregion.h4
-rw-r--r--linden/indra/newview/llvoavatar.cpp3
-rw-r--r--linden/indra/newview/llvoavatar.h1
-rw-r--r--linden/indra/newview/llwaterparammanager.cpp38
-rw-r--r--linden/indra/newview/llwaterparammanager.h7
-rw-r--r--linden/indra/newview/llwaterparamset.cpp92
-rw-r--r--linden/indra/newview/llwlparammanager.cpp42
-rw-r--r--linden/indra/newview/llwlparammanager.h7
-rw-r--r--linden/indra/newview/llwlparamset.cpp5
-rw-r--r--linden/indra/newview/llworld.cpp11
-rw-r--r--linden/indra/newview/llworld.h2
-rw-r--r--linden/indra/newview/llworldmap.cpp7
-rw-r--r--linden/indra/newview/pipeline.cpp4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_env_settings.xml10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_tos.xml9
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_water.xml549
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_windlight_manager.xml35
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml45
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_windlight_remote_save.xml123
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml366
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/legacy_menu_pie_attachment.xml46
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml12
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml9
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml94
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml46
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml28
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_radar.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_region_estate.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_region_general.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_region_open_region_settings.xml76
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/strings.xml6
-rw-r--r--linden/indra/newview/skins/default/xui/ja/menu_mini_map.xml3
-rw-r--r--linden/indra/newview/skins/default/xui/ja/menu_viewer.xml397
-rw-r--r--linden/indra/newview/skins/default/xui/ja/notifications.xml24
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_avatar.xml9
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_groups.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_mini_map.xml11
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml31
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_audio.xml7
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_fonts.xml9
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_general.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml1
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_im.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_input.xml31
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_preferences_popups.xml1
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_radar.xml59
-rw-r--r--linden/indra/newview/skins/default/xui/ja/panel_windlight_controls.xml6
-rwxr-xr-xlinden/indra/newview/viewer_manifest.py1
-rw-r--r--linden/indra/newview/viewertime.cpp20
-rw-r--r--linden/indra/newview/viewertime.h3
-rw-r--r--linden/indra/newview/windlightsettingsupdate.cpp200
-rw-r--r--linden/indra/newview/wlfloatermanager.cpp281
-rw-r--r--linden/indra/newview/wlfloatermanager.h93
-rw-r--r--linden/indra/newview/wlfloaterwindlightsend.cpp300
-rw-r--r--linden/indra/newview/wlfloaterwindlightsend.h88
-rw-r--r--linden/indra/newview/wlretrievesettings.cpp238
-rw-r--r--linden/indra/newview/wlretrievesettings.h59
-rw-r--r--linden/indra/newview/wlsettingsmanager.cpp253
-rw-r--r--linden/indra/newview/wlsettingsmanager.h90
-rwxr-xr-xlinden/scripts/install.py15
129 files changed, 10301 insertions, 4421 deletions
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index cd708fd..e5e3eb0 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -85,6 +85,8 @@ Aleric Inglewood
85 IMP-662 85 IMP-662
86 IMP-663 86 IMP-663
87 IMP-664 87 IMP-664
88 IMP-667
89 IMP-670
88Alissa Sabre 90Alissa Sabre
89 VWR-81 91 VWR-81
90 VWR-83 92 VWR-83
diff --git a/linden/etc/message.xml b/linden/etc/message.xml
index f9baf0b..c53e846 100644
--- a/linden/etc/message.xml
+++ b/linden/etc/message.xml
@@ -378,7 +378,15 @@
378 <boolean>true</boolean> 378 <boolean>true</boolean>
379 </map> 379 </map>
380 380
381 <key>ParcelVoiceInfo</key> 381 <key>WindLightSettingsUpdate</key>
382 <map>
383 <key>flavor</key>
384 <string>llsd</string>
385 <key>trusted-sender</key>
386 <boolean>true</boolean>
387 </map>
388
389 <key>ParcelVoiceInfo</key>
382 <map> 390 <map>
383 <key>flavor</key> 391 <key>flavor</key>
384 <string>llsd</string> 392 <string>llsd</string>
diff --git a/linden/indra/cmake/ViewerMiscLibs.cmake b/linden/indra/cmake/ViewerMiscLibs.cmake
index 7fe1040..35f4e3a 100644
--- a/linden/indra/cmake/ViewerMiscLibs.cmake
+++ b/linden/indra/cmake/ViewerMiscLibs.cmake
@@ -8,6 +8,14 @@ if (NOT STANDALONE)
8 use_prebuilt_binary(32bitcompatibilitylibs) 8 use_prebuilt_binary(32bitcompatibilitylibs)
9 endif(LINUX AND ${ARCH} STREQUAL "x86_64") 9 endif(LINUX AND ${ARCH} STREQUAL "x86_64")
10 use_prebuilt_binary(fontconfig) 10 use_prebuilt_binary(fontconfig)
11else (NOT STANDALONE)
12 # Download there even when using standalone.
13 set(STANDALONE OFF)
14 use_prebuilt_binary(vivox)
15 if(LINUX AND ${ARCH} STREQUAL "x86_64")
16 use_prebuilt_binary(32bitcompatibilitylibs)
17 endif(LINUX AND ${ARCH} STREQUAL "x86_64")
18 set(STANDALONE ON)
11endif(NOT STANDALONE) 19endif(NOT STANDALONE)
12 20
13if (WINDOWS) 21if (WINDOWS)
diff --git a/linden/indra/llcharacter/llkeyframewalkmotion.cpp b/linden/indra/llcharacter/llkeyframewalkmotion.cpp
index b5817e5..4aa9d2a 100644
--- a/linden/indra/llcharacter/llkeyframewalkmotion.cpp
+++ b/linden/indra/llcharacter/llkeyframewalkmotion.cpp
@@ -50,6 +50,7 @@ const F32 MIN_WALK_SPEED = 0.1f; // minimum speed at which we use velocity for d
50const F32 MAX_TIME_DELTA = 2.f; //max two seconds a frame for calculating interpolation 50const F32 MAX_TIME_DELTA = 2.f; //max two seconds a frame for calculating interpolation
51const F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed 51const F32 SPEED_ADJUST_MAX = 2.5f; // maximum adjustment of walk animation playback speed
52const F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second 52const F32 SPEED_ADJUST_MAX_SEC = 3.f; // maximum adjustment to walk animation playback speed for a second
53const F32 SPEED_FINAL_SCALING = 0.5f; // final scaling for walk animation
53const F32 DRIFT_COMP_MAX_TOTAL = 0.07f;//0.55f; // maximum drift compensation overall, in any direction 54const F32 DRIFT_COMP_MAX_TOTAL = 0.07f;//0.55f; // maximum drift compensation overall, in any direction
54const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out 55const F32 DRIFT_COMP_MAX_SPEED = 4.f; // speed at which drift compensation total maxes out
55const F32 MAX_ROLL = 0.6f; 56const F32 MAX_ROLL = 0.6f;
@@ -314,6 +315,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
314 } 315 }
315 316
316 mAnimSpeed = (mAvgSpeed + mSpeedAdjust) * mRelativeDir; 317 mAnimSpeed = (mAvgSpeed + mSpeedAdjust) * mRelativeDir;
318 mAnimSpeed = mAnimSpeed * SPEED_FINAL_SCALING;
317// char debug_text[64]; 319// char debug_text[64];
318// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity); 320// sprintf(debug_text, "Foot slip vel: %.2f", footSlipVelocity);
319// mCharacter->addDebugText(debug_text); 321// mCharacter->addDebugText(debug_text);
diff --git a/linden/indra/llcommon/lltimer.cpp b/linden/indra/llcommon/lltimer.cpp
index fa6efaf..fb3e1ef 100644
--- a/linden/indra/llcommon/lltimer.cpp
+++ b/linden/indra/llcommon/lltimer.cpp
@@ -527,6 +527,34 @@ struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time)
527} 527}
528 528
529 529
530struct tm* utc_to_offset_time(time_t utc_time, S32 offset, BOOL DST)
531{
532 if (DST)
533 {
534 //Subtract one then
535 offset--;
536 }
537
538 // We subtract off the PST/PDT offset _before_ getting
539 // "UTC" time, because this will handle wrapping around
540 // for 5 AM UTC -> 10 PM PDT of the previous day.
541 utc_time -= offset * MIN_PER_HOUR * SEC_PER_MIN;
542
543 // Internal buffer to PST/PDT (see above)
544 struct tm* internal_time = gmtime(&utc_time);
545
546 /*
547 // Don't do this, this won't correctly tell you if daylight savings is active in CA or not.
548 if (pacific_daylight_time)
549 {
550 internal_time->tm_isdst = 1;
551 }
552 */
553
554 return internal_time;
555}
556
557
530void microsecondsToTimecodeString(U64 current_time, std::string& tcstring) 558void microsecondsToTimecodeString(U64 current_time, std::string& tcstring)
531{ 559{
532 U64 hours; 560 U64 hours;
diff --git a/linden/indra/llcommon/lltimer.h b/linden/indra/llcommon/lltimer.h
index e2cf1c7..a653233 100644
--- a/linden/indra/llcommon/lltimer.h
+++ b/linden/indra/llcommon/lltimer.h
@@ -166,6 +166,7 @@ BOOL is_daylight_savings();
166// utc_time = time_corrected(); 166// utc_time = time_corrected();
167// struct tm* internal_time = utc_to_pacific_time(utc_time, gDaylight); 167// struct tm* internal_time = utc_to_pacific_time(utc_time, gDaylight);
168struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time); 168struct tm* utc_to_pacific_time(time_t utc_time, BOOL pacific_daylight_time);
169struct tm* utc_to_offset_time(time_t utc_time, S32 offset, BOOL DST);
169 170
170void microsecondsToTimecodeString(U64 current_time, std::string& tcstring); 171void microsecondsToTimecodeString(U64 current_time, std::string& tcstring);
171void secondsToTimecodeString(F32 current_time, std::string& tcstring); 172void secondsToTimecodeString(F32 current_time, std::string& tcstring);
diff --git a/linden/indra/llmessage/llcircuit.cpp b/linden/indra/llmessage/llcircuit.cpp
index 725425c..0ff5093 100644
--- a/linden/indra/llmessage/llcircuit.cpp
+++ b/linden/indra/llmessage/llcircuit.cpp
@@ -1231,6 +1231,17 @@ void LLCircuit::getCircuitRange(
1231 first = mCircuitData.upper_bound(key); 1231 first = mCircuitData.upper_bound(key);
1232} 1232}
1233 1233
1234// <edit>
1235std::vector<LLCircuitData*> LLCircuit::getCircuitDataList()
1236{
1237 std::vector<LLCircuitData*> list;
1238 circuit_data_map::iterator end = mCircuitData.end();
1239 for(circuit_data_map::iterator iter = mCircuitData.begin(); iter != end; ++iter)
1240 list.push_back((*iter).second);
1241 return list;
1242}
1243// </edit>
1244
1234TPACKETID LLCircuitData::nextPacketOutID() 1245TPACKETID LLCircuitData::nextPacketOutID()
1235{ 1246{
1236 mPacketsOut++; 1247 mPacketsOut++;
diff --git a/linden/indra/llmessage/llcircuit.h b/linden/indra/llmessage/llcircuit.h
index e373cb1..379453e 100644
--- a/linden/indra/llmessage/llcircuit.h
+++ b/linden/indra/llmessage/llcircuit.h
@@ -336,6 +336,9 @@ public:
336 // HACK - this should become protected eventually, but stupid !@$@# message system/circuit classes are jumbling things up. 336 // HACK - this should become protected eventually, but stupid !@$@# message system/circuit classes are jumbling things up.
337 circuit_data_map mUnackedCircuitMap; // Map of circuits with unacked data 337 circuit_data_map mUnackedCircuitMap; // Map of circuits with unacked data
338 circuit_data_map mSendAckMap; // Map of circuits which need to send acks 338 circuit_data_map mSendAckMap; // Map of circuits which need to send acks
339
340 std::vector<LLCircuitData*> getCircuitDataList();
341
339protected: 342protected:
340 circuit_data_map mCircuitData; 343 circuit_data_map mCircuitData;
341 344
diff --git a/linden/indra/llmessage/llmessagelog.cpp b/linden/indra/llmessage/llmessagelog.cpp
new file mode 100644
index 0000000..965b8c0
--- /dev/null
+++ b/linden/indra/llmessage/llmessagelog.cpp
@@ -0,0 +1,54 @@
1// <edit>
2#include "llmessagelog.h"
3
4LLMessageLogEntry::LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, U8* data, S32 data_size)
5: mType(type),
6 mFromHost(from_host),
7 mToHost(to_host),
8 mDataSize(data_size)
9{
10 if(data)
11 {
12 mData.resize(data_size);
13 memcpy(&(mData[0]), data, data_size);
14 }
15}
16LLMessageLogEntry::LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, std::vector<U8> data, S32 data_size)
17: mType(type),
18 mFromHost(from_host),
19 mToHost(to_host),
20 mDataSize(data_size),
21 mData(data)
22{
23}
24LLMessageLogEntry::~LLMessageLogEntry()
25{
26}
27U32 LLMessageLog::sMaxSize = 4096; // testzone fixme todo boom
28std::deque<LLMessageLogEntry> LLMessageLog::sDeque;
29void (*(LLMessageLog::sCallback))(LLMessageLogEntry);
30void LLMessageLog::setMaxSize(U32 size)
31{
32 sMaxSize = size;
33 while(sDeque.size() > sMaxSize)
34 sDeque.pop_front();
35}
36void LLMessageLog::setCallback(void (*callback)(LLMessageLogEntry))
37{
38 sCallback = callback;
39}
40void LLMessageLog::log(LLHost from_host, LLHost to_host, U8* data, S32 data_size)
41{
42 LLMessageLogEntry entry = LLMessageLogEntry(LLMessageLogEntry::TEMPLATE, from_host, to_host, data, data_size);
43 if(!entry.mDataSize || !entry.mData.size()) return;
44 if(sCallback) sCallback(entry);
45 if(!sMaxSize) return;
46 sDeque.push_back(entry);
47 if(sDeque.size() > sMaxSize)
48 sDeque.pop_front();
49}
50std::deque<LLMessageLogEntry> LLMessageLog::getDeque()
51{
52 return sDeque;
53}
54// </edit>
diff --git a/linden/indra/llmessage/llmessagelog.h b/linden/indra/llmessage/llmessagelog.h
new file mode 100644
index 0000000..5046d80
--- /dev/null
+++ b/linden/indra/llmessage/llmessagelog.h
@@ -0,0 +1,41 @@
1// <edit>
2#ifndef LL_LLMESSAGELOG_H
3#define LL_LLMESSAGELOG_H
4#include "stdtypes.h"
5#include "llhost.h"
6#include <queue>
7#include <string.h>
8
9class LLMessageSystem;
10class LLMessageLogEntry
11{
12public:
13 enum EType
14 {
15 TEMPLATE,
16 HTTP_REQUEST,
17 HTTP_RESPONSE
18 };
19 LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, U8* data, S32 data_size);
20 LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, std::vector<U8> data, S32 data_size);
21 ~LLMessageLogEntry();
22 EType mType;
23 LLHost mFromHost;
24 LLHost mToHost;
25 S32 mDataSize;
26 std::vector<U8> mData;
27};
28class LLMessageLog
29{
30public:
31 static void setMaxSize(U32 size);
32 static void setCallback(void (*callback)(LLMessageLogEntry));
33 static void log(LLHost from_host, LLHost to_host, U8* data, S32 data_size);
34 static std::deque<LLMessageLogEntry> getDeque();
35private:
36 static U32 sMaxSize;
37 static void (*sCallback)(LLMessageLogEntry);
38 static std::deque<LLMessageLogEntry> sDeque;
39};
40#endif
41// </edit>
diff --git a/linden/indra/llmessage/llpacketring.cpp b/linden/indra/llmessage/llpacketring.cpp
index 35d5aac..7dcb606 100644
--- a/linden/indra/llmessage/llpacketring.cpp
+++ b/linden/indra/llmessage/llpacketring.cpp
@@ -40,6 +40,8 @@
40#include "timing.h" 40#include "timing.h"
41#include "llrand.h" 41#include "llrand.h"
42#include "u64.h" 42#include "u64.h"
43#include "llmessagelog.h"
44#include "message.h"
43 45
44/////////////////////////////////////////////////////////// 46///////////////////////////////////////////////////////////
45LLPacketRing::LLPacketRing () : 47LLPacketRing::LLPacketRing () :
@@ -246,6 +248,9 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap)
246 248
247BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host) 249BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host)
248{ 250{
251 //<edit>
252 LLMessageLog::log(LLHost(16777343, gMessageSystem->getListenPort()), host, (U8*)send_buffer, buf_size);
253 //</edit>
249 BOOL status = TRUE; 254 BOOL status = TRUE;
250 if (!mUseOutThrottle) 255 if (!mUseOutThrottle)
251 { 256 {
diff --git a/linden/indra/llmessage/lltemplatemessagereader.cpp b/linden/indra/llmessage/lltemplatemessagereader.cpp
index d8904a9..9f68fe9 100644
--- a/linden/indra/llmessage/lltemplatemessagereader.cpp
+++ b/linden/indra/llmessage/lltemplatemessagereader.cpp
@@ -449,7 +449,10 @@ S32 LLTemplateMessageReader::getMessageSize() const
449// Returns template for the message contained in buffer 449// Returns template for the message contained in buffer
450BOOL LLTemplateMessageReader::decodeTemplate( 450BOOL LLTemplateMessageReader::decodeTemplate(
451 const U8* buffer, S32 buffer_size, // inputs 451 const U8* buffer, S32 buffer_size, // inputs
452 LLMessageTemplate** msg_template ) // outputs 452 // <edit>
453 //LLMessageTemplate** msg_template ) // outputs
454 LLMessageTemplate** msg_template, BOOL custom)
455 // </edit>
453{ 456{
454 const U8* header = buffer + LL_PACKET_ID_SIZE; 457 const U8* header = buffer + LL_PACKET_ID_SIZE;
455 458
@@ -491,6 +494,9 @@ BOOL LLTemplateMessageReader::decodeTemplate(
491 } 494 }
492 else // bogus packet received (too short) 495 else // bogus packet received (too short)
493 { 496 {
497 // <edit>
498 if(!custom)
499 // </edit>
494 llwarns << "Packet with unusable length received (too short): " 500 llwarns << "Packet with unusable length received (too short): "
495 << buffer_size << llendl; 501 << buffer_size << llendl;
496 return(FALSE); 502 return(FALSE);
@@ -503,9 +509,16 @@ BOOL LLTemplateMessageReader::decodeTemplate(
503 } 509 }
504 else 510 else
505 { 511 {
512 // <edit>
513 if(!custom)
514 {
515 // </edit>
506 llwarns << "Message #" << std::hex << num << std::dec 516 llwarns << "Message #" << std::hex << num << std::dec
507 << " received but not registered!" << llendl; 517 << " received but not registered!" << llendl;
508 gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE); 518 gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE);
519 // <edit>
520 }
521 // </edit>
509 return(FALSE); 522 return(FALSE);
510 } 523 }
511 524
@@ -532,7 +545,8 @@ void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S3
532} 545}
533 546
534// decode a given message 547// decode a given message
535BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) 548BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender, BOOL custom)
549// </edit>
536{ 550{
537 llassert( mReceiveSize >= 0 ); 551 llassert( mReceiveSize >= 0 );
538 llassert( mCurrentRMessageTemplate); 552 llassert( mCurrentRMessageTemplate);
@@ -594,6 +608,9 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
594 } 608 }
595 else 609 else
596 { 610 {
611 // <edit>
612 if(!custom)
613 // </edit>
597 llerrs << "Unknown block type" << llendl; 614 llerrs << "Unknown block type" << llendl;
598 return FALSE; 615 return FALSE;
599 } 616 }
@@ -640,6 +657,9 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
640 657
641 if ((decode_pos + data_size) > mReceiveSize) 658 if ((decode_pos + data_size) > mReceiveSize)
642 { 659 {
660 // <edit>
661 if(!custom)
662 // </edit>
643 logRanOffEndOfPacket(sender, decode_pos, data_size); 663 logRanOffEndOfPacket(sender, decode_pos, data_size);
644 664
645 // default to 0 length variable blocks 665 // default to 0 length variable blocks
@@ -676,6 +696,9 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
676 // so, copy data pointer and set data size to fixed size 696 // so, copy data pointer and set data size to fixed size
677 if ((decode_pos + mvci.getSize()) > mReceiveSize) 697 if ((decode_pos + mvci.getSize()) > mReceiveSize)
678 { 698 {
699 // <edit>
700 if(!custom)
701 // </edit>
679 logRanOffEndOfPacket(sender, decode_pos, mvci.getSize()); 702 logRanOffEndOfPacket(sender, decode_pos, mvci.getSize());
680 703
681 // default to 0s. 704 // default to 0s.
@@ -703,7 +726,10 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
703 lldebugs << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << llendl; 726 lldebugs << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << llendl;
704 return FALSE; 727 return FALSE;
705 } 728 }
706 729
730 // <edit>
731 if(!custom)
732 // </edit>
707 { 733 {
708 static LLTimer decode_timer; 734 static LLTimer decode_timer;
709 735
@@ -756,14 +782,26 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
756 return TRUE; 782 return TRUE;
757} 783}
758 784
785// <edit>
786LLMessageTemplate* LLTemplateMessageReader::getTemplate()
787{
788 return mCurrentRMessageTemplate;
789}
790// </edit>
791
759BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, 792BOOL LLTemplateMessageReader::validateMessage(const U8* buffer,
760 S32 buffer_size, 793 S32 buffer_size,
761 const LLHost& sender, 794 const LLHost& sender,
762 bool trusted) 795 bool trusted,
796 BOOL custom)
763{ 797{
764 mReceiveSize = buffer_size; 798 mReceiveSize = buffer_size;
765 BOOL valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate ); 799 // <edit>
766 if(valid) 800 //BOOL valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate );
801 BOOL valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate, custom );
802 //if(result)
803 if(valid && !custom)
804 // </edit>
767 { 805 {
768 mCurrentRMessageTemplate->mReceiveCount++; 806 mCurrentRMessageTemplate->mReceiveCount++;
769 //lldebugs << "MessageRecvd:" 807 //lldebugs << "MessageRecvd:"
diff --git a/linden/indra/llmessage/lltemplatemessagereader.h b/linden/indra/llmessage/lltemplatemessagereader.h
index ab06ab4..0eef93a 100644
--- a/linden/indra/llmessage/lltemplatemessagereader.h
+++ b/linden/indra/llmessage/lltemplatemessagereader.h
@@ -102,28 +102,32 @@ public:
102 virtual const char* getMessageName() const; 102 virtual const char* getMessageName() const;
103 virtual S32 getMessageSize() const; 103 virtual S32 getMessageSize() const;
104 104
105 // <edit>
106 LLMessageTemplate* getTemplate();
107 // </edit>
108
105 virtual void copyToBuilder(LLMessageBuilder&) const; 109 virtual void copyToBuilder(LLMessageBuilder&) const;
106 110
107 BOOL validateMessage(const U8* buffer, S32 buffer_size, 111 BOOL validateMessage(const U8* buffer, S32 buffer_size,
108 const LLHost& sender, bool trusted = false); 112 const LLHost& sender, bool trusted = false, BOOL custom = FALSE);
109 BOOL readMessage(const U8* buffer, const LLHost& sender); 113 BOOL readMessage(const U8* buffer, const LLHost& sender);
110 114
111 bool isTrusted() const; 115 bool isTrusted() const;
112 bool isBanned(bool trusted_source) const; 116 bool isBanned(bool trusted_source) const;
113 bool isUdpBanned() const; 117 bool isUdpBanned() const;
118
119 BOOL decodeData(const U8* buffer, const LLHost& sender, BOOL custom = FALSE);
120
121 BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs
122 LLMessageTemplate** msg_template, BOOL custom = FALSE); // outputs
114 123
115private: 124private:
116 125
117 void getData(const char *blockname, const char *varname, void *datap, 126 void getData(const char *blockname, const char *varname, void *datap,
118 S32 size = 0, S32 blocknum = 0, S32 max_size = S32_MAX); 127 S32 size = 0, S32 blocknum = 0, S32 max_size = S32_MAX);
119 128
120 BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs
121 LLMessageTemplate** msg_template ); // outputs
122
123 void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ); 129 void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted );
124 130
125 BOOL decodeData(const U8* buffer, const LLHost& sender );
126
127 S32 mReceiveSize; 131 S32 mReceiveSize;
128 LLMessageTemplate* mCurrentRMessageTemplate; 132 LLMessageTemplate* mCurrentRMessageTemplate;
129 LLMsgData* mCurrentRMessageData; 133 LLMsgData* mCurrentRMessageData;
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp
index 78af35b..7e8aff1 100644
--- a/linden/indra/llmessage/message.cpp
+++ b/linden/indra/llmessage/message.cpp
@@ -86,6 +86,7 @@
86#include "v3math.h" 86#include "v3math.h"
87#include "v4math.h" 87#include "v4math.h"
88#include "lltransfertargetvfile.h" 88#include "lltransfertargetvfile.h"
89#include "llmessagelog.h"
89 90
90// Constants 91// Constants
91//const char* MESSAGE_LOG_FILENAME = "message.log"; 92//const char* MESSAGE_LOG_FILENAME = "message.log";
@@ -524,10 +525,10 @@ LLCircuitData* LLMessageSystem::findCircuit(const LLHost& host,
524} 525}
525 526
526// Returns TRUE if a valid, on-circuit message has been received. 527// Returns TRUE if a valid, on-circuit message has been received.
527BOOL LLMessageSystem::checkMessages( S64 frame_count ) 528BOOL LLMessageSystem::checkMessages( S64 frame_count, bool faked_message, U8 fake_buffer[MAX_BUFFER_SIZE], LLHost fake_host, S32 fake_size )
528{ 529{
529 // Pump 530 // Pump
530 BOOL valid_packet = FALSE; 531 BOOL valid_packet = FALSE;
531 mMessageReader = mTemplateMessageReader; 532 mMessageReader = mTemplateMessageReader;
532 533
533 LLTransferTargetVFile::updateQueue(); 534 LLTransferTargetVFile::updateQueue();
@@ -557,6 +558,13 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count )
557 mTrueReceiveSize = mPacketRing.receivePacket(mSocket, (char *)mTrueReceiveBuffer); 558 mTrueReceiveSize = mPacketRing.receivePacket(mSocket, (char *)mTrueReceiveBuffer);
558 // If you want to dump all received packets into SecondLife.log, uncomment this 559 // If you want to dump all received packets into SecondLife.log, uncomment this
559 //dumpPacketToLog(); 560 //dumpPacketToLog();
561 // <edit>
562 if(mTrueReceiveSize && receive_size > (S32) LL_MINIMUM_VALID_PACKET_SIZE)
563 {
564 LLMessageLog::log(mLastSender, LLHost(16777343, mPort), buffer, mTrueReceiveSize);
565 }
566 // </edit>
567
560 568
561 receive_size = mTrueReceiveSize; 569 receive_size = mTrueReceiveSize;
562 mLastSender = mPacketRing.getLastSender(); 570 mLastSender = mPacketRing.getLastSender();
@@ -1549,6 +1557,12 @@ U32 LLMessageSystem::getOurCircuitCode()
1549 return mOurCircuitCode; 1557 return mOurCircuitCode;
1550} 1558}
1551 1559
1560// <edit>
1561LLCircuit* LLMessageSystem::getCircuit()
1562{
1563 return &mCircuitInfo;
1564}
1565
1552void LLMessageSystem::getCircuitInfo(LLSD& info) const 1566void LLMessageSystem::getCircuitInfo(LLSD& info) const
1553{ 1567{
1554 mCircuitInfo.getInfo(info); 1568 mCircuitInfo.getInfo(info);
diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h
index b25b27e..e6391d9 100644
--- a/linden/indra/llmessage/message.h
+++ b/linden/indra/llmessage/message.h
@@ -230,11 +230,14 @@ class LLMessageSystem : public LLMessageSenderInterface
230 typedef std::map<const char *, LLMessageTemplate*> message_template_name_map_t; 230 typedef std::map<const char *, LLMessageTemplate*> message_template_name_map_t;
231 typedef std::map<U32, LLMessageTemplate*> message_template_number_map_t; 231 typedef std::map<U32, LLMessageTemplate*> message_template_number_map_t;
232 232
233private: 233// <edit>
234//private:
235// </edit>
234 message_template_name_map_t mMessageTemplates; 236 message_template_name_map_t mMessageTemplates;
235 message_template_number_map_t mMessageNumbers; 237 message_template_number_map_t mMessageNumbers;
236 238// <edit>
237public: 239//public:
240// </edit>
238 S32 mSystemVersionMajor; 241 S32 mSystemVersionMajor;
239 S32 mSystemVersionMinor; 242 S32 mSystemVersionMinor;
240 S32 mSystemVersionPatch; 243 S32 mSystemVersionPatch;
@@ -341,7 +344,7 @@ public:
341 bool addCircuitCode(U32 code, const LLUUID& session_id); 344 bool addCircuitCode(U32 code, const LLUUID& session_id);
342 345
343 BOOL poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received 346 BOOL poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received
344 BOOL checkMessages( S64 frame_count = 0 ); 347 BOOL checkMessages( S64 frame_count = 0, bool faked_message = false, U8 fake_buffer[MAX_BUFFER_SIZE] = NULL, LLHost fake_host = LLHost(), S32 fake_size = 0 );
345 void processAcks(); 348 void processAcks();
346 349
347 BOOL isMessageFast(const char *msg); 350 BOOL isMessageFast(const char *msg);
@@ -569,6 +572,10 @@ public:
569 void showCircuitInfo(); 572 void showCircuitInfo();
570 void getCircuitInfo(LLSD& info) const; 573 void getCircuitInfo(LLSD& info) const;
571 574
575 // <edit>
576 LLCircuit* getCircuit();
577 // </edit>
578
572 U32 getOurCircuitCode(); 579 U32 getOurCircuitCode();
573 580
574 void enableCircuit(const LLHost &host, BOOL trusted); 581 void enableCircuit(const LLHost &host, BOOL trusted);
@@ -733,6 +740,8 @@ public:
733 // This will cause all trust queries to return true until the next message 740 // This will cause all trust queries to return true until the next message
734 // is read: use with caution! 741 // is read: use with caution!
735 void receivedMessageFromTrustedSender(); 742 void receivedMessageFromTrustedSender();
743
744 LLTemplateMessageBuilder* mTemplateMessageBuilder;
736 745
737private: 746private:
738 747
@@ -807,7 +816,6 @@ private:
807 TPACKETID mCurrentRecvPacketID; // packet ID of current receive packet (for reporting) 816 TPACKETID mCurrentRecvPacketID; // packet ID of current receive packet (for reporting)
808 817
809 LLMessageBuilder* mMessageBuilder; 818 LLMessageBuilder* mMessageBuilder;
810 LLTemplateMessageBuilder* mTemplateMessageBuilder;
811 LLSDMessageBuilder* mLLSDMessageBuilder; 819 LLSDMessageBuilder* mLLSDMessageBuilder;
812 LLMessageReader* mMessageReader; 820 LLMessageReader* mMessageReader;
813 LLTemplateMessageReader* mTemplateMessageReader; 821 LLTemplateMessageReader* mTemplateMessageReader;
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp
index 3c2293f..9635f99 100644
--- a/linden/indra/llui/llscrolllistctrl.cpp
+++ b/linden/indra/llui/llscrolllistctrl.cpp
@@ -103,6 +103,10 @@ struct SortScrollListItem
103LLScrollListIcon::LLScrollListIcon(LLUIImagePtr icon, S32 width) 103LLScrollListIcon::LLScrollListIcon(LLUIImagePtr icon, S32 width)
104 : LLScrollListCell(width), 104 : LLScrollListCell(width),
105 mIcon(icon), 105 mIcon(icon),
106 // <edit>
107 mCallback(NULL),
108 mUserData(NULL),
109 // </edit>
106 mColor(LLColor4::white) 110 mColor(LLColor4::white)
107{ 111{
108} 112}
@@ -145,6 +149,19 @@ void LLScrollListIcon::setValue(const LLSD& value)
145 } 149 }
146} 150}
147 151
152// <edit>
153void LLScrollListIcon::setClickCallback(BOOL (*callback)(void*), void* user_data)
154{
155 mCallback = callback;
156 mUserData = user_data;
157}
158
159BOOL LLScrollListIcon::handleClick()
160{
161 if(mCallback) return mCallback(mUserData);
162 return FALSE;
163}
164// </edit>
148 165
149void LLScrollListIcon::setColor(const LLColor4& color) 166void LLScrollListIcon::setColor(const LLColor4& color)
150{ 167{
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h
index 516e4f1..e875d7a 100644
--- a/linden/indra/llui/llscrolllistctrl.h
+++ b/linden/indra/llui/llscrolllistctrl.h
@@ -163,10 +163,18 @@ public:
163 virtual void setColor(const LLColor4&); 163 virtual void setColor(const LLColor4&);
164 virtual BOOL isText()const { return FALSE; } 164 virtual BOOL isText()const { return FALSE; }
165 virtual void setValue(const LLSD& value); 165 virtual void setValue(const LLSD& value);
166 // <edit>
167 void setClickCallback(BOOL (*callback)(void*), void* user_data);
168 virtual BOOL handleClick();
169 // </edit>
166 170
167private: 171private:
168 LLUIImagePtr mIcon; 172 LLUIImagePtr mIcon;
169 LLColor4 mColor; 173 LLColor4 mColor;
174 // <edit>
175 BOOL (*mCallback)(void*);
176 void* mUserData;
177 // </edit>
170}; 178};
171 179
172/* 180/*
@@ -493,6 +501,9 @@ public:
493 501
494 virtual S32 getScrollPos() const; 502 virtual S32 getScrollPos() const;
495 virtual void setScrollPos( S32 pos ); 503 virtual void setScrollPos( S32 pos );
504 // <edit>
505 S32 getPageLines() { return mPageLines; }
506 // </edit>
496 S32 getSearchColumn(); 507 S32 getSearchColumn();
497 void setSearchColumn(S32 column) { mSearchColumn = column; } 508 void setSearchColumn(S32 column) { mSearchColumn = column; }
498 S32 getColumnIndexFromOffset(S32 x); 509 S32 getColumnIndexFromOffset(S32 x);
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 1a6ad30..c3c6566 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -493,6 +493,11 @@ set(viewer_SOURCE_FILES
493 rlvfloaterbehaviour.cpp 493 rlvfloaterbehaviour.cpp
494 viewertime.cpp 494 viewertime.cpp
495 viewerversion.cpp 495 viewerversion.cpp
496 windlightsettingsupdate.cpp
497 wlfloatermanager.cpp
498 wlfloaterwindlightsend.cpp
499 wlretrievesettings.cpp
500 wlsettingsmanager.cpp
496 ) 501 )
497 502
498set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING 503set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING
@@ -950,6 +955,10 @@ set(viewer_HEADER_FILES
950 VorbisFramework.h 955 VorbisFramework.h
951 viewertime.h 956 viewertime.h
952 viewerversion.h 957 viewerversion.h
958 wlfloatermanager.h
959 wlfloaterwindlightsend.h
960 wlretrievesettings.h
961 wlsettingsmanager.h
953 ) 962 )
954 963
955source_group("CMake Rules" FILES ViewerInstall.cmake) 964source_group("CMake Rules" FILES ViewerInstall.cmake)
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 7b37bb6..576a553 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -2903,39 +2903,6 @@
2903 <key>Value</key> 2903 <key>Value</key>
2904 <integer>1</integer> 2904 <integer>1</integer>
2905 </map> 2905 </map>
2906 <key>BulkChangeIncludeAnimations</key>
2907 <map>
2908 <key>Comment</key>
2909 <string>Bulk permission changes affect animations</string>
2910 <key>Persist</key>
2911 <integer>1</integer>
2912 <key>Type</key>
2913 <string>Boolean</string>
2914 <key>Value</key>
2915 <integer>1</integer>
2916 </map>
2917 <key>BulkChangeIncludeAnimations</key>
2918 <map>
2919 <key>Comment</key>
2920 <string>Bulk permission changes affect animations</string>
2921 <key>Persist</key>
2922 <integer>1</integer>
2923 <key>Type</key>
2924 <string>Boolean</string>
2925 <key>Value</key>
2926 <integer>1</integer>
2927 </map>
2928 <key>BulkChangeIncludeAnimations</key>
2929 <map>
2930 <key>Comment</key>
2931 <string>Bulk permission changes affect animations</string>
2932 <key>Persist</key>
2933 <integer>1</integer>
2934 <key>Type</key>
2935 <string>Boolean</string>
2936 <key>Value</key>
2937 <integer>1</integer>
2938 </map>
2939 <key>BulkChangeIncludeBodyParts</key> 2906 <key>BulkChangeIncludeBodyParts</key>
2940 <map> 2907 <map>
2941 <key>Comment</key> 2908 <key>Comment</key>
diff --git a/linden/indra/newview/hippoLimits.cpp b/linden/indra/newview/hippoLimits.cpp
index 92e2ed3..a5d6ee6 100644
--- a/linden/indra/newview/hippoLimits.cpp
+++ b/linden/indra/newview/hippoLimits.cpp
@@ -43,11 +43,30 @@ void HippoLimits::setLimits()
43void HippoLimits::setOpenSimLimits() 43void HippoLimits::setOpenSimLimits()
44{ 44{
45 mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups(); 45 mMaxAgentGroups = gHippoGridManager->getConnectedGrid()->getMaxAgentGroups();
46 if (mMaxAgentGroups < 0) mMaxAgentGroups = 50; 46
47 if (mMaxAgentGroups < 0)
48 mMaxAgentGroups = 50;
49
47 mMaxPrimScale = 256.0f; 50 mMaxPrimScale = 256.0f;
48 mMinPrimScale = 0.001f; 51 mMinPrimScale = 0.001f;
52 mMinPrimXPos = 0;
53 mMinPrimYPos = 0;
54 mMinPrimZPos = 0;
55 mMaxPrimXPos = F32_MAX;
56 mMaxPrimYPos = F32_MAX;
57 mMaxPrimZPos = F32_MAX;
49 mMaxHeight = 10000.0f; 58 mMaxHeight = 10000.0f;
50 mMaxLinkedPrims = -1; 59 mMaxLinkedPrims = -1;
60 mMaxPhysLinkedPrims = -1;
61 mAllowParcelWindLight = TRUE;
62 mAllowMinimap = TRUE;
63 mMaxInventoryItemsTransfer = -1;
64 mRenderName = 2;
65 mAllowPhysicalPrims = TRUE;
66 skyUseClassicClouds = TRUE;
67 mEnableTeenMode = FALSE;
68 mEnforceMaxBuild = FALSE;
69 mRenderWater = TRUE;
51 70
52 if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { 71 if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) {
53 llinfos << "Using rendering compatible OpenSim limits" << llendl; 72 llinfos << "Using rendering compatible OpenSim limits" << llendl;
@@ -72,11 +91,27 @@ void HippoLimits::setSecondLifeLimits()
72 mMinHoleSize = 0.05f; 91 mMinHoleSize = 0.05f;
73 mMaxHollow = 0.95f; 92 mMaxHollow = 0.95f;
74 mMaxLinkedPrims = 255; 93 mMaxLinkedPrims = 255;
94 mMaxPhysLinkedPrims = 32;
95 mMinPrimXPos = 0;
96 mMinPrimYPos = 0;
97 mMinPrimZPos = 0;
98 mMaxPrimXPos = 256;
99 mMaxPrimYPos = 256;
100 mMaxPrimZPos = 4096;
101 mAllowParcelWindLight = FALSE;
102 mAllowMinimap = TRUE;
103 mMaxInventoryItemsTransfer = 42;
104 mRenderName = 2;
105 mAllowPhysicalPrims = TRUE;
106 skyUseClassicClouds = TRUE;
107 mEnableTeenMode = FALSE;
108 mEnforceMaxBuild = FALSE;
109 mRenderWater = TRUE;
75} 110}
76 111
77F32 HippoLimits::getMaxPrimScale() const 112F32 HippoLimits::getMaxPrimScale() const
78{ 113{
79 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints")) 114 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
80 { 115 {
81 return FLT_MAX; 116 return FLT_MAX;
82 } 117 }
@@ -85,3 +120,105 @@ F32 HippoLimits::getMaxPrimScale() const
85 return mMaxPrimScale; 120 return mMaxPrimScale;
86 } 121 }
87} 122}
123
124F32 HippoLimits::getMinPrimScale() const
125{
126 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
127 {
128 return 0;
129 }
130 else
131 {
132 return mMinPrimScale;
133 }
134}
135
136F32 HippoLimits::getMaxPrimXPos() const
137{
138 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
139 {
140 return FLT_MAX;
141 }
142 else
143 {
144 return mMaxPrimXPos;
145 }
146}
147
148F32 HippoLimits::getMaxPrimYPos() const
149{
150 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
151 {
152 return FLT_MAX;
153 }
154 else
155 {
156 return mMaxPrimYPos;
157 }
158}
159
160F32 HippoLimits::getMaxPrimZPos() const
161{
162 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
163 {
164 return FLT_MAX;
165 }
166 else
167 {
168 return mMaxPrimZPos;
169 }
170}
171
172F32 HippoLimits::getMinPrimXPos() const
173{
174 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
175 {
176 return FLT_MIN;
177 }
178 else
179 {
180 return mMinPrimXPos;
181 }
182}
183
184F32 HippoLimits::getMinPrimYPos() const
185{
186 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
187 {
188 return FLT_MIN;
189 }
190 else
191 {
192 return mMinPrimYPos;
193 }
194}
195
196F32 HippoLimits::getMinPrimZPos() const
197{
198 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
199 {
200 return FLT_MIN;
201 }
202 else
203 {
204 return mMinPrimZPos;
205 }
206}
207
208F32 HippoLimits::getMaxDragDistance() const
209{
210 if (mMaxDragDistance == 0)
211 {
212 return FLT_MAX;
213 }
214 else
215 {
216 F32 max_drag_distance = gSavedSettings.getBOOL("LimitDragDistance") ? gSavedSettings.getF32("MaxDragDistance") : FLT_MAX;
217
218 if(max_drag_distance > mMaxDragDistance) //Chose the more restrictive
219 {
220 max_drag_distance = mMaxDragDistance;
221 }
222 return max_drag_distance;
223 }
224} \ No newline at end of file
diff --git a/linden/indra/newview/hippoLimits.h b/linden/indra/newview/hippoLimits.h
index a5fe351..7792a2c 100644
--- a/linden/indra/newview/hippoLimits.h
+++ b/linden/indra/newview/hippoLimits.h
@@ -11,12 +11,24 @@ public:
11 const F32& getMaxHeight() const { return mMaxHeight; } 11 const F32& getMaxHeight() const { return mMaxHeight; }
12 const F32& getMinHoleSize() const { return mMinHoleSize; } 12 const F32& getMinHoleSize() const { return mMinHoleSize; }
13 const F32& getMaxHollow() const { return mMaxHollow; } 13 const F32& getMaxHollow() const { return mMaxHollow; }
14 const F32& getMinPrimScale() const { return mMinPrimScale; }
15 const S32& getMaxLinkedPrims() const { return mMaxLinkedPrims; } 14 const S32& getMaxLinkedPrims() const { return mMaxLinkedPrims; }
15 const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; }
16 const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; }
17
16 18
17 // Returns the max prim size we can use on a grid 19 // Returns the max prim size we can use on a grid
20 F32 getMinPrimScale() const;
18 F32 getMaxPrimScale() const; 21 F32 getMaxPrimScale() const;
19 22
23 F32 getMaxDragDistance() const;
24
25 F32 getMinPrimXPos() const;
26 F32 getMinPrimYPos() const;
27 F32 getMinPrimZPos() const;
28 F32 getMaxPrimXPos() const;
29 F32 getMaxPrimYPos() const;
30 F32 getMaxPrimZPos() const;
31
20 void setLimits(); 32 void setLimits();
21 33
22 S32 mMaxAgentGroups; 34 S32 mMaxAgentGroups;
@@ -27,6 +39,26 @@ public:
27 F32 mMaxPrimScale; 39 F32 mMaxPrimScale;
28 F32 mMinPrimScale; 40 F32 mMinPrimScale;
29 S32 mMaxLinkedPrims; 41 S32 mMaxLinkedPrims;
42 S32 mMaxPhysLinkedPrims;
43 F32 mMaxPrimXPos;
44 F32 mMaxPrimYPos;
45 F32 mMaxPrimZPos;
46 F32 mMinPrimXPos;
47 F32 mMinPrimYPos;
48 F32 mMinPrimZPos;
49
50 S32 mRenderName;
51
52 F32 mMaxInventoryItemsTransfer;
53 F32 mMaxDragDistance;
54
55 BOOL skyUseClassicClouds;
56 BOOL mAllowParcelWindLight;
57 BOOL mAllowMinimap;
58 BOOL mAllowPhysicalPrims;
59 BOOL mEnableTeenMode;
60 BOOL mEnforceMaxBuild;
61 BOOL mRenderWater;
30 62
31private: 63private:
32 void setOpenSimLimits(); 64 void setOpenSimLimits();
diff --git a/linden/indra/newview/kowopenregionsettings.cpp b/linden/indra/newview/kowopenregionsettings.cpp
index f568473..3cceb0c 100644
--- a/linden/indra/newview/kowopenregionsettings.cpp
+++ b/linden/indra/newview/kowopenregionsettings.cpp
@@ -30,6 +30,12 @@
30#include "hippoLimits.h" 30#include "hippoLimits.h"
31#include "llfloatertools.h" 31#include "llfloatertools.h"
32#include "llviewercontrol.h" 32#include "llviewercontrol.h"
33#include "llagent.h"
34#include "llsurface.h"
35#include "llviewerregion.h"
36#include "llviewerobject.h"
37#include "llfloaterregioninfo.h"
38#include "llfloaterworldmap.h"
33 39
34//DEBUG includes 40//DEBUG includes
35//#include "llsdserialize.h" //LLSDNotationStreamer - for dumping LLSD to string 41//#include "llsdserialize.h" //LLSDNotationStreamer - for dumping LLSD to string
@@ -62,19 +68,20 @@ class OpenRegionInfoUpdate : public LLHTTPNode
62 68
63 if ( body.has("AllowMinimap") ) 69 if ( body.has("AllowMinimap") )
64 { 70 {
65 //IMPLEMENT ME 71 gHippoLimits->mAllowMinimap = body["AllowMinimap"].asInteger() == 1;
66 } 72 }
67 if ( body.has("AllowPhysicalPrims") ) 73 if ( body.has("AllowPhysicalPrims") )
68 { 74 {
69 //IMPLEMENT ME 75 gHippoLimits->mAllowPhysicalPrims = body["AllowPhysicalPrims"].asInteger() == 1;
76 limitschanged = TRUE;
70 } 77 }
71 if ( body.has("DrawDistance") ) 78 if ( body.has("DrawDistance") )
72 { 79 {
73 //IMPLEMENT ME 80 gAgent.mDrawDistance = body["DrawDistance"].asReal();
74 } 81 }
75 if ( body.has("ForceDrawDistance") ) 82 if ( body.has("ForceDrawDistance") )
76 { 83 {
77 //IMPLEMENT ME 84 gAgent.mLockedDrawDistance = body["ForceDrawDistance"].asInteger() == 1;
78 } 85 }
79 if ( body.has("LSLFunctions") ) 86 if ( body.has("LSLFunctions") )
80 { 87 {
@@ -82,19 +89,23 @@ class OpenRegionInfoUpdate : public LLHTTPNode
82 } 89 }
83 if ( body.has("MaxDragDistance") ) 90 if ( body.has("MaxDragDistance") )
84 { 91 {
85 //IMPLEMENT ME 92 gHippoLimits->mMaxDragDistance = body["MaxDragDistance"].asReal();
86 } 93 }
87 if ( body.has("MinHoleSize") ) 94 if ( body.has("MinHoleSize") )
88 { 95 {
96 //Note: does NOT update correctly
89 gHippoLimits->mMinHoleSize = body["MinHoleSize"].asReal(); 97 gHippoLimits->mMinHoleSize = body["MinHoleSize"].asReal();
98 limitschanged = TRUE;
90 } 99 }
91 if ( body.has("MaxHollowSize") ) 100 if ( body.has("MaxHollowSize") )
92 { 101 {
102 //Note: does NOT update correctly
93 gHippoLimits->mMaxHollow = body["MaxHollowSize"].asReal(); 103 gHippoLimits->mMaxHollow = body["MaxHollowSize"].asReal();
104 limitschanged = TRUE;
94 } 105 }
95 if ( body.has("MaxInventoryItemsTransfer") ) 106 if ( body.has("MaxInventoryItemsTransfer") )
96 { 107 {
97 //IMPLEMENT ME 108 gHippoLimits->mMaxInventoryItemsTransfer = body["MaxInventoryItemsTransfer"].asReal();
98 } 109 }
99 if ( body.has("MaxLinkCount") ) 110 if ( body.has("MaxLinkCount") )
100 { 111 {
@@ -102,22 +113,28 @@ class OpenRegionInfoUpdate : public LLHTTPNode
102 } 113 }
103 if ( body.has("MaxLinkCountPhys") ) 114 if ( body.has("MaxLinkCountPhys") )
104 { 115 {
105 //IMPLEMENT ME 116 gHippoLimits->mMaxPhysLinkedPrims = body["MaxLinkCountPhys"].asInteger();
106 } 117 }
107 if ( body.has("MaxPhysPrimScale") ) 118 if ( body.has("MaxPos") )
108 { 119 {
109 //IMPLEMENT ME 120 gHippoLimits->mMaxPrimXPos = body["MaxPosX"].asReal();
121 gHippoLimits->mMaxPrimYPos = body["MaxPosY"].asReal();
122 gHippoLimits->mMaxPrimZPos = body["MaxPosZ"].asReal();
123 limitschanged = TRUE;
110 } 124 }
111 if ( body.has("MaxPos") ) 125 if ( body.has("MinPos") )
112 { 126 {
113 //IMPLEMENT ME 127 gHippoLimits->mMinPrimXPos = body["MinPosX"].asReal();
128 gHippoLimits->mMinPrimYPos = body["MinPosY"].asReal();
129 gHippoLimits->mMinPrimZPos = body["MinPosZ"].asReal();
130 limitschanged = TRUE;
114 } 131 }
115 if ( body.has("MaxPrimScale") ) 132 if ( body.has("MaxPrimScale") )
116 { 133 {
117 gHippoLimits->mMaxPrimScale = body["MaxPrimScale"].asReal(); 134 gHippoLimits->mMaxPrimScale = body["MaxPrimScale"].asReal();
118 limitschanged = TRUE; 135 limitschanged = TRUE;
119 } 136 }
120 if ( body.has("MinPos") ) 137 if ( body.has("MaxPhysPrimScale") )
121 { 138 {
122 //IMPLEMENT ME 139 //IMPLEMENT ME
123 } 140 }
@@ -128,32 +145,69 @@ class OpenRegionInfoUpdate : public LLHTTPNode
128 } 145 }
129 if ( body.has("OffsetOfUTC") ) 146 if ( body.has("OffsetOfUTC") )
130 { 147 {
131 //IMPLEMENT ME 148 gSavedSettings.setS32("TimeOffset", body["OffsetOfUTC"].asReal());
149 gSavedSettings.setBOOL("UseTimeOffset", true);
150 }
151 if ( body.has("OffsetOfUTCDST") )
152 {
153 gSavedSettings.setBOOL("TimeOffsetDST", body["OffsetOfUTCDST"].asInteger() == 1 ? TRUE : FALSE);
132 } 154 }
133 if ( body.has("RenderWater") ) 155 if ( body.has("RenderWater") )
134 { 156 {
135 gSavedSettings.setBOOL("RenderWater", body["RenderWater"].asBoolean()); 157 gHippoLimits->mRenderWater = body["RenderWater"].asInteger() == 1 ? TRUE : FALSE;
158 gAgent.getRegion()->rebuildWater();
136 } 159 }
137 if ( body.has("SayDistance") ) 160 if ( body.has("SayDistance") )
138 { 161 {
139 //IMPLEMENT ME 162 gSavedSettings.setU32("ChatDistance", body["SayDistance"].asReal());
140 } 163 }
141 if ( body.has("ShoutDistance") ) 164 if ( body.has("ShoutDistance") )
142 { 165 {
143 //IMPLEMENT ME 166 //IMPLEMENT ME
144 } 167 }
168 if ( body.has("WhisperDistance") )
169 {
170 //IMPLEMENT ME
171 }
145 if ( body.has("ToggleTeenMode") ) 172 if ( body.has("ToggleTeenMode") )
146 { 173 {
147 gSavedSettings.setBOOL("ToggleTeenMode", body["ToggleTeenMode"].asBoolean()); 174 gHippoLimits->mEnableTeenMode = body["ToggleTeenMode"].asInteger() == 1 ? TRUE : FALSE;
148
149 } 175 }
150 if ( body.has("WhisperDistance") ) 176 if ( body.has("SetTeenMode") )
151 { 177 {
152 //IMPLEMENT ME 178 gAgent.setTeen( body["SetTeenMode"].asInteger() == 1 ? TRUE : FALSE );
179 LLFloaterWorldMap::reloadIcons(NULL);
180 llinfos << "PG status set to " << (S32)gAgent.isTeen() << llendl;
181 }
182 if ( body.has("ShowTags") )
183 {
184 gHippoLimits->mRenderName = body["ShowTags"].asReal();
185 }
186 if ( body.has("EnforceMaxBuild") )
187 {
188 gHippoLimits->mEnforceMaxBuild = body["EnforceMaxBuild"].asInteger() == 1 ? TRUE : FALSE;
189 limitschanged = TRUE;
190 }
191 if ( body.has("MaxGroups") )
192 {
193 gHippoLimits->mMaxAgentGroups = body["MaxGroups"].asReal();
194 }
195 if ( body.has("AllowParcelWindLight") )
196 {
197 gHippoLimits->mAllowParcelWindLight = body["AllowParcelWindLight"].asInteger() == 1;
153 } 198 }
154 199
155 if (limitschanged) 200 if (limitschanged)
156 gFloaterTools->updateToolsSizeLimits(); 201 gFloaterTools->updateToolsSizeLimits();
202
203 //Update the floater if its around
204 LLPanelRegionOpenSettingsInfo* floater;
205 floater = LLFloaterRegionInfo::getPanelOpenSettings();
206
207 if(floater != NULL)
208 {
209 floater->refreshFromRegion(gAgent.getRegion());
210 }
157 } 211 }
158}; 212};
159 213
diff --git a/linden/indra/newview/linux_tools/getvoice.sh b/linden/indra/newview/linux_tools/getvoice.sh
deleted file mode 100755
index 13b632f..0000000
--- a/linden/indra/newview/linux_tools/getvoice.sh
+++ /dev/null
@@ -1,34 +0,0 @@
1#!/bin/bash
2
3SCRIPTSRC=`readlink -f "$0" || echo "$0"`
4RUN_PATH=`dirname "${SCRIPTSRC}" || echo .`
5
6#if mozilla-runtime-linux-x86_64 is present we are using 64bit Imprudence on 64bit Linux
7if [ -d "${RUN_PATH}/app_settings/mozilla-runtime-linux-x86_64/" ]; then
8 LIB_INSTALLDIR="lib32/" # It's 32bit voice on 64bit Linux and 64bit viewer. Not using lib/ for avoiding ambiguity.
9else
10 LIB_INSTALLDIR="lib/" # It's 32bit voice on 32 or 64bit Linux and 32bit viewer.
11fi
12
13mkdir -p $LIB_INSTALLDIR
14wget http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-2.1.3010.6270-linux-20090309.tar.bz2
15tar -C ./bin --strip-components 4 -xjf vivox-*.tar.bz2 --wildcards '*SLVoice'
16tar -C ./$LIB_INSTALLDIR --strip-components 4 -xjf vivox-*.tar.bz2 --wildcards '*.so*'
17rm vivox-*.tar.bz2
18
19#now we have Vivox' OpenAL, but we want Imprudence (32bit for voice) OpenAL which is way better:
20wget http://imprudenceviewer.org/download/libs/openal-linux32-20100426.tar.bz2
21tar -C ./$LIB_INSTALLDIR --strip-components 3 -xjf openal-*.tar.bz2 --wildcards '*openal.so*'
22rm openal-*.tar.bz2
23
24# For 64bit viewer on 64bit Linux we also need a 32bit libidn.so.11 and libuuid.so.1
25if [ -d ${RUN_PATH}/lib32/ ]; then
26 wget http://imprudenceviewer.org/download/libs/libidn20100312.tar.bz2
27 tar -C $LIB_INSTALLDIR --strip-components 1 -xjf libidn*.tar.bz2 --wildcards '*.so*'
28 rm libidn*.tar.bz2
29
30 wget http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/libuuid-linux-20090417.tar.bz2
31 tar -C ./$LIB_INSTALLDIR --strip-components 3 -xjf libuuid-*.tar.bz2 --wildcards '*.so*'
32 rm libuuid-*.tar.bz2
33fi
34
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index eb5cf9b..de1fc84 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -36,7 +36,6 @@
36#include "stdenums.h" 36#include "stdenums.h"
37 37
38#include "llagent.h" 38#include "llagent.h"
39
40#include "llcamera.h" 39#include "llcamera.h"
41#include "llcoordframe.h" 40#include "llcoordframe.h"
42#include "indra_constants.h" 41#include "indra_constants.h"
@@ -109,6 +108,7 @@
109#include "lltoolmgr.h" 108#include "lltoolmgr.h"
110#include "lltoolpie.h" 109#include "lltoolpie.h"
111#include "lltoolview.h" 110#include "lltoolview.h"
111#include "lltrans.h"
112#include "llui.h" // for make_ui_sound 112#include "llui.h" // for make_ui_sound
113#include "llurldispatcher.h" 113#include "llurldispatcher.h"
114#include "llviewercamera.h" 114#include "llviewercamera.h"
@@ -405,7 +405,17 @@ LLAgent::LLAgent() :
405 mWearablesLoaded(FALSE), 405 mWearablesLoaded(FALSE),
406 mTextureCacheQueryID(0), 406 mTextureCacheQueryID(0),
407 mAppearanceSerialNum(0), 407 mAppearanceSerialNum(0),
408 mbTeleportKeepsLookAt(false) 408 mbTeleportKeepsLookAt(false),
409
410 mLureShow(FALSE),
411 mLureName(""),
412 mLurePosGlobal(),
413 mLureGlobalX(0),
414 mLureGlobalY(0),
415 mLureX(0),
416 mLureY(0),
417 mLureZ(0),
418 mLureMaturityString("")
409{ 419{
410 U32 i; 420 U32 i;
411 for (i = 0; i < TOTAL_CONTROLS; i++) 421 for (i = 0; i < TOTAL_CONTROLS; i++)
@@ -430,6 +440,7 @@ LLAgent::LLAgent() :
430void LLAgent::init() 440void LLAgent::init()
431{ 441{
432 mDrawDistance = gSavedSettings.getF32("RenderFarClip"); 442 mDrawDistance = gSavedSettings.getF32("RenderFarClip");
443 mLockedDrawDistance = FALSE;
433 444
434 // *Note: this is where LLViewerCamera::getInstance() used to be constructed. 445 // *Note: this is where LLViewerCamera::getInstance() used to be constructed.
435 446
@@ -6015,6 +6026,14 @@ void LLAgent::setHomePosRegion( const U64& region_handle, const LLVector3& pos_r
6015 mHomePosRegion = pos_region; 6026 mHomePosRegion = pos_region;
6016} 6027}
6017 6028
6029void LLAgent::takeHomeScreenshot()
6030{
6031 std::string snap_filename = gDirUtilp->getLindenUserDir();
6032 snap_filename += gDirUtilp->getDirDelimiter();
6033 snap_filename += SCREEN_HOME_FILENAME;
6034 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, FALSE);
6035}
6036
6018BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global ) 6037BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global )
6019{ 6038{
6020 if(!mHaveHomePosition) 6039 if(!mHaveHomePosition)
@@ -8080,5 +8099,65 @@ LLVector3 LLAgent::getLastCoords()
8080 return mLastCoordinates; 8099 return mLastCoordinates;
8081} 8100}
8082 8101
8102void LLAgent::showLureDestination(const std::string fromname, const S32 global_x, const S32 global_y, const S32 x, const S32 y, const S32 z, const std::string maturity)
8103{
8104 const LLVector3d posglobal = LLVector3d(F64(global_x), F64(global_y), F64(0));
8105 LLSimInfo* siminfo;
8106 siminfo = LLWorldMap::getInstance()->simInfoFromPosGlobal(posglobal);
8107 std::string sim_name;
8108 LLWorldMap::getInstance()->simNameFromPosGlobal( posglobal, sim_name );
8109
8110 if (siminfo)
8111 {
8112 llinfos << fromname << "'s teleport lure is to " << sim_name.c_str() << " (" << maturity << ")" << llendl;
8113 LLStringUtil::format_map_t args;
8114 args["[NAME]"] = fromname;
8115 args["[DESTINATION]"] = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(x), S32(y), S32(z));
8116 std::string msg = LLTrans::getString("TeleportLureMaturity", args);
8117 if (maturity != "")
8118 {
8119 msg.append(llformat(" (%s)", maturity.c_str()));
8120 }
8121 LLChat chat(msg);
8122 LLFloaterChat::addChat(chat);
8123 }
8124 else
8125 {
8126 mLureShow = TRUE;
8127 mLureName = fromname;
8128 mLurePosGlobal = posglobal;
8129 mLureGlobalX = U16(global_x / 256);
8130 mLureGlobalY = U16(global_y / 256);
8131 mLureX = x;
8132 mLureY = y;
8133 mLureZ = z;
8134 mLureMaturityString = maturity;
8135 LLWorldMap::getInstance()->sendMapBlockRequest(mLureGlobalX, mLureGlobalY, mLureGlobalX, mLureGlobalY, true);
8136 }
8137}
8138
8139void LLAgent::onFoundLureDestination()
8140{
8141 mLureShow = FALSE;
8142 LLSimInfo* siminfo;
8143 siminfo = LLWorldMap::getInstance()->simInfoFromPosGlobal(mLurePosGlobal);
8144 std::string sim_name;
8145 LLWorldMap::getInstance()->simNameFromPosGlobal( mLurePosGlobal, sim_name );
8146
8147 if (siminfo && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)))
8148 {
8149 llinfos << mLureName << " is offering a TP to " << sim_name.c_str() << " (" << mLureMaturityString << ")" << llendl;
8150 LLStringUtil::format_map_t args;
8151 args["[NAME]"] = mLureName;
8152 args["[DESTINATION]"] = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(mLureX), S32(mLureY), S32(mLureZ));
8153 std::string msg = LLTrans::getString("TeleportOfferMaturity", args);
8154 if (mLureMaturityString != "")
8155 {
8156 msg.append(llformat(" (%s)", mLureMaturityString.c_str()));
8157 }
8158 LLChat chat(msg);
8159 LLFloaterChat::addChat(chat);
8160 }
8161}
8083 8162
8084// EOF 8163// EOF
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h
index 141c72c..fe50bf5 100644
--- a/linden/indra/newview/llagent.h
+++ b/linden/indra/newview/llagent.h
@@ -584,6 +584,7 @@ public:
584 EPointAtType getPointAtType(); 584 EPointAtType getPointAtType();
585 585
586 void setHomePosRegion( const U64& region_handle, const LLVector3& pos_region ); 586 void setHomePosRegion( const U64& region_handle, const LLVector3& pos_region );
587 void takeHomeScreenshot();
587 BOOL getHomePosGlobal( LLVector3d* pos_global ); 588 BOOL getHomePosGlobal( LLVector3d* pos_global );
588 void setCameraAnimating( BOOL b ) { mCameraAnimating = b; } 589 void setCameraAnimating( BOOL b ) { mCameraAnimating = b; }
589 BOOL getCameraAnimating( ) { return mCameraAnimating; } 590 BOOL getCameraAnimating( ) { return mCameraAnimating; }
@@ -742,6 +743,7 @@ public:
742 LLUUID mSecureSessionID; // secure token for this login session 743 LLUUID mSecureSessionID; // secure token for this login session
743 744
744 F32 mDrawDistance; 745 F32 mDrawDistance;
746 BOOL mLockedDrawDistance;
745 747
746 U64 mGroupPowers; 748 U64 mGroupPowers;
747 BOOL mHideGroupTitle; 749 BOOL mHideGroupTitle;
@@ -782,6 +784,19 @@ public:
782 LLFrameTimer mDoubleTapRunTimer; 784 LLFrameTimer mDoubleTapRunTimer;
783 EDoubleTapRunMode mDoubleTapRunMode; 785 EDoubleTapRunMode mDoubleTapRunMode;
784 786
787 BOOL mLureShow;
788 std::string mLureName;
789 LLVector3d mLurePosGlobal;
790 U16 mLureGlobalX;
791 U16 mLureGlobalY;
792 S32 mLureX;
793 S32 mLureY;
794 S32 mLureZ;
795 std::string mLureMaturityString;
796
797 void showLureDestination(const std::string fromname, const S32 global_x, const S32 global_y, const S32 x, const S32 y, const S32 z, const std::string maturity);
798 void onFoundLureDestination();
799
785private: 800private:
786 bool mbTeleportKeepsLookAt; 801 bool mbTeleportKeepsLookAt;
787 bool mbAlwaysRun; // should the avatar run by default rather than walk 802 bool mbAlwaysRun; // should the avatar run by default rather than walk
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 4485cdf..c53ced6 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -360,7 +360,7 @@ void request_initial_instant_messages()
360 static BOOL requested = FALSE; 360 static BOOL requested = FALSE;
361 if (!requested 361 if (!requested
362 && gMessageSystem 362 && gMessageSystem
363 && LLMuteList::getInstance()->isLoaded() 363 //&& LLMuteList::getInstance()->isLoaded() //We don't always want to have a mute list module
364 && gAgent.getAvatarObject()) 364 && gAgent.getAvatarObject())
365 { 365 {
366 // Auto-accepted inventory items may require the avatar object 366 // Auto-accepted inventory items may require the avatar object
diff --git a/linden/indra/newview/llassetuploadresponders.h b/linden/indra/newview/llassetuploadresponders.h
index c08f299..9102f6b 100644
--- a/linden/indra/newview/llassetuploadresponders.h
+++ b/linden/indra/newview/llassetuploadresponders.h
@@ -74,6 +74,7 @@ public:
74class LLBakedUploadData; 74class LLBakedUploadData;
75class LLSendTexLayerResponder : public LLAssetUploadResponder 75class LLSendTexLayerResponder : public LLAssetUploadResponder
76{ 76{
77 LOG_CLASS(LLSendTexLayerResponder);
77public: 78public:
78 LLSendTexLayerResponder(const LLSD& post_data, 79 LLSendTexLayerResponder(const LLSD& post_data,
79 const LLUUID& vfile_id, 80 const LLUUID& vfile_id,
diff --git a/linden/indra/newview/llcloud.cpp b/linden/indra/newview/llcloud.cpp
index 0099817..3e9b86a 100644
--- a/linden/indra/newview/llcloud.cpp
+++ b/linden/indra/newview/llcloud.cpp
@@ -38,6 +38,7 @@
38#include "v4math.h" 38#include "v4math.h"
39#include "llquaternion.h" 39#include "llquaternion.h"
40#include "v4color.h" 40#include "v4color.h"
41#include "llviewercontrol.h"
41 42
42#include "llwind.h" 43#include "llwind.h"
43#include "llcloud.h" 44#include "llcloud.h"
@@ -56,15 +57,6 @@
56 57
57extern LLPipeline gPipeline; 58extern LLPipeline gPipeline;
58 59
59const F32 CLOUD_UPDATE_RATE = 1.0f; // Global time dilation for clouds
60const F32 CLOUD_GROW_RATE = 0.05f;
61const F32 CLOUD_DECAY_RATE = -0.05f;
62const F32 CLOUD_VELOCITY_SCALE = 0.01f;
63const F32 CLOUD_DENSITY = 25.f;
64const S32 CLOUD_COUNT_MAX = 20;
65const F32 CLOUD_HEIGHT_RANGE = 48.f;
66const F32 CLOUD_HEIGHT_MEAN = 192.f;
67
68enum 60enum
69{ 61{
70 LL_PUFF_GROWING = 0, 62 LL_PUFF_GROWING = 0,
@@ -80,7 +72,7 @@ S32 LLCloudPuff::sPuffCount = 0;
80 72
81LLCloudPuff::LLCloudPuff() : 73LLCloudPuff::LLCloudPuff() :
82 mAlpha(0.01f), 74 mAlpha(0.01f),
83 mRate(CLOUD_GROW_RATE*CLOUD_UPDATE_RATE), 75 mRate((gSavedSettings.getF32("CloudGrowRate")/100)*gSavedSettings.getF32("CloudUpdateRate")),
84 mLifeState(LL_PUFF_GROWING) 76 mLifeState(LL_PUFF_GROWING)
85{ 77{
86} 78}
@@ -121,7 +113,7 @@ void LLCloudGroup::updatePuffs(const F32 dt)
121 mVOCloudsp->setPositionRegion(mCenterRegion); 113 mVOCloudsp->setPositionRegion(mCenterRegion);
122 mVOCloudsp->setScale(LLVector3(256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH, 114 mVOCloudsp->setScale(LLVector3(256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH,
123 256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH, 115 256.f/CLOUD_GROUPS_PER_EDGE + CLOUD_PUFF_WIDTH,
124 CLOUD_HEIGHT_RANGE + CLOUD_PUFF_HEIGHT)*0.5f); 116 gSavedSettings.getF32("ClassicCloudRange") + CLOUD_PUFF_HEIGHT)*0.5f);
125 gPipeline.createObject(mVOCloudsp); 117 gPipeline.createObject(mVOCloudsp);
126 } 118 }
127 119
@@ -132,7 +124,7 @@ void LLCloudGroup::updatePuffs(const F32 dt)
132 { 124 {
133 LLCloudPuff &puff = mCloudPuffs[i]; 125 LLCloudPuff &puff = mCloudPuffs[i];
134 velocity = mCloudLayerp->getRegion()->mWind.getCloudVelocity(mCloudLayerp->getRegion()->getPosRegionFromGlobal(puff.mPositionGlobal)); 126 velocity = mCloudLayerp->getRegion()->mWind.getCloudVelocity(mCloudLayerp->getRegion()->getPosRegionFromGlobal(puff.mPositionGlobal));
135 velocity *= CLOUD_VELOCITY_SCALE*CLOUD_UPDATE_RATE; 127 velocity *= (gSavedSettings.getF32("CloudVelocityScale")/100)*gSavedSettings.getF32("CloudUpdateRate");
136 vel_d.setVec(velocity); 128 vel_d.setVec(velocity);
137 mCloudPuffs[i].mPositionGlobal += vel_d; 129 mCloudPuffs[i].mPositionGlobal += vel_d;
138 mCloudPuffs[i].mAlpha += mCloudPuffs[i].mRate * dt; 130 mCloudPuffs[i].mAlpha += mCloudPuffs[i].mRate * dt;
@@ -163,7 +155,7 @@ void LLCloudGroup::updatePuffOwnership()
163 { 155 {
164 //llinfos << "Killing puff not in group" << llendl; 156 //llinfos << "Killing puff not in group" << llendl;
165 mCloudPuffs[i].setLifeState(LL_PUFF_DYING); 157 mCloudPuffs[i].setLifeState(LL_PUFF_DYING);
166 mCloudPuffs[i].mRate = CLOUD_DECAY_RATE*CLOUD_UPDATE_RATE; 158 mCloudPuffs[i].mRate = (gSavedSettings.getF32("CloudDecayRate")/100)*gSavedSettings.getF32("CloudUpdateRate");
167 i++; 159 i++;
168 continue; 160 continue;
169 } 161 }
@@ -185,9 +177,9 @@ void LLCloudGroup::updatePuffCount()
185 return; 177 return;
186 } 178 }
187 S32 i; 179 S32 i;
188 S32 target_puff_count = llround(CLOUD_DENSITY * mDensity); 180 S32 target_puff_count = llround((S32)gSavedSettings.getF32("CloudDensity") * mDensity);
189 target_puff_count = llmax(0, target_puff_count); 181 target_puff_count = llmax(0, target_puff_count);
190 target_puff_count = llmin(CLOUD_COUNT_MAX, target_puff_count); 182 target_puff_count = llmin((S32)gSavedSettings.getF32("CloudCountMax"), target_puff_count);
191 S32 current_puff_count = (S32) mCloudPuffs.size(); 183 S32 current_puff_count = (S32) mCloudPuffs.size();
192 // Create a new cloud if we need one 184 // Create a new cloud if we need one
193 if (current_puff_count < target_puff_count) 185 if (current_puff_count < target_puff_count)
@@ -199,7 +191,7 @@ void LLCloudGroup::updatePuffCount()
199 puff_pos_global = mVOCloudsp->getPositionGlobal(); 191 puff_pos_global = mVOCloudsp->getPositionGlobal();
200 F32 x = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE; 192 F32 x = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE;
201 F32 y = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE; 193 F32 y = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE;
202 F32 z = ll_frand(CLOUD_HEIGHT_RANGE) - 0.5f*CLOUD_HEIGHT_RANGE; 194 F32 z = ll_frand(gSavedSettings.getF32("ClassicCloudRange")) - 0.5f*gSavedSettings.getF32("ClassicCloudRange");
203 puff_pos_global += LLVector3d(x, y, z); 195 puff_pos_global += LLVector3d(x, y, z);
204 mCloudPuffs[i].mPositionGlobal = puff_pos_global; 196 mCloudPuffs[i].mPositionGlobal = puff_pos_global;
205 mCloudPuffs[i].mAlpha = 0.01f; 197 mCloudPuffs[i].mAlpha = 0.01f;
@@ -227,7 +219,7 @@ void LLCloudGroup::updatePuffCount()
227 { 219 {
228 //llinfos << "Killing extra live cloud" << llendl; 220 //llinfos << "Killing extra live cloud" << llendl;
229 mCloudPuffs[i].setLifeState(LL_PUFF_DYING); 221 mCloudPuffs[i].setLifeState(LL_PUFF_DYING);
230 mCloudPuffs[i].mRate = CLOUD_DECAY_RATE*CLOUD_UPDATE_RATE; 222 mCloudPuffs[i].mRate = (gSavedSettings.getF32("CloudDecayRate")/100)*gSavedSettings.getF32("CloudUpdateRate");
231 new_dying_count--; 223 new_dying_count--;
232 } 224 }
233 i++; 225 i++;
@@ -294,7 +286,7 @@ LLCloudLayer::LLCloudLayer()
294 x = (0.5f + j)*(256.f/CLOUD_GROUPS_PER_EDGE); 286 x = (0.5f + j)*(256.f/CLOUD_GROUPS_PER_EDGE);
295 287
296 mCloudGroups[i][j].setCloudLayerp(this); 288 mCloudGroups[i][j].setCloudLayerp(this);
297 mCloudGroups[i][j].setCenterRegion(LLVector3(x, y, CLOUD_HEIGHT_MEAN)); 289 mCloudGroups[i][j].setCenterRegion(LLVector3(x, y, gSavedSettings.getF32("ClassicCloudHeight")));
298 } 290 }
299 } 291 }
300} 292}
@@ -344,12 +336,10 @@ void LLCloudLayer::destroy()
344 mWindp = NULL; 336 mWindp = NULL;
345} 337}
346 338
347
348void LLCloudLayer::reset() 339void LLCloudLayer::reset()
349{ 340{
350} 341}
351 342
352
353void LLCloudLayer::setWindPointer(LLWind *windp) 343void LLCloudLayer::setWindPointer(LLWind *windp)
354{ 344{
355 if (mWindp) 345 if (mWindp)
diff --git a/linden/indra/newview/llfloaterenvsettings.cpp b/linden/indra/newview/llfloaterenvsettings.cpp
index 557a5e1..801ff49 100644
--- a/linden/indra/newview/llfloaterenvsettings.cpp
+++ b/linden/indra/newview/llfloaterenvsettings.cpp
@@ -47,6 +47,7 @@
47#include "llwaterparammanager.h" 47#include "llwaterparammanager.h"
48#include "llmath.h" 48#include "llmath.h"
49#include "llviewerwindow.h" 49#include "llviewerwindow.h"
50#include "wlfloatermanager.h"
50 51
51#include "pipeline.h" 52#include "pipeline.h"
52 53
@@ -87,7 +88,7 @@ void LLFloaterEnvSettings::initCallbacks(void)
87 // WL Top 88 // WL Top
88 childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, NULL); 89 childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, NULL);
89 childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, NULL); 90 childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, NULL);
90 childSetAction("EnvSubmitWindlight", onSubmitWindlight, NULL); 91 childSetAction("EnvWLManager", onOpenWLManager, NULL);
91 childSetAction("EnvUseEstateTimeButton", onUseEstateTime, NULL); 92 childSetAction("EnvUseEstateTimeButton", onUseEstateTime, NULL);
92 childSetAction("EnvSettingsHelpButton", onClickHelp, this); 93 childSetAction("EnvSettingsHelpButton", onClickHelp, this);
93} 94}
@@ -285,6 +286,11 @@ void LLFloaterEnvSettings::onOpenAdvancedWater(void* userData)
285 LLFloaterWater::show(); 286 LLFloaterWater::show();
286} 287}
287 288
289void LLFloaterEnvSettings::onOpenWLManager(void* userData)
290{
291 WLFloaterManager::show();
292}
293
288void LLFloaterEnvSettings::onSubmitWindlight(void* userData) 294void LLFloaterEnvSettings::onSubmitWindlight(void* userData)
289{ 295{
290 Meta7WindlightPacket * wl = new Meta7WindlightPacket(); 296 Meta7WindlightPacket * wl = new Meta7WindlightPacket();
diff --git a/linden/indra/newview/llfloaterenvsettings.h b/linden/indra/newview/llfloaterenvsettings.h
index 49bf4fd..8b44621 100644
--- a/linden/indra/newview/llfloaterenvsettings.h
+++ b/linden/indra/newview/llfloaterenvsettings.h
@@ -78,6 +78,9 @@ public:
78 /// open the advanced water settings menu 78 /// open the advanced water settings menu
79 static void onOpenAdvancedWater(void* userData); 79 static void onOpenAdvancedWater(void* userData);
80 80
81 /// open the windlight manager floater
82 static void onOpenWLManager(void* userData);
83
81 /// submit windlight settings to the estate 84 /// submit windlight settings to the estate
82 static void onSubmitWindlight(void* userData); 85 static void onSubmitWindlight(void* userData);
83 86
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp
index c15678d..34b8dde 100644
--- a/linden/indra/newview/llfloatermap.cpp
+++ b/linden/indra/newview/llfloatermap.cpp
@@ -44,6 +44,7 @@
44#include "lluictrlfactory.h" 44#include "lluictrlfactory.h"
45#include "llfirstuse.h" 45#include "llfirstuse.h"
46#include "panelradar.h" 46#include "panelradar.h"
47#include "hippoLimits.h"
47 48
48 49
49// [RLVa:KB] 50// [RLVa:KB]
@@ -149,7 +150,7 @@ void LLFloaterMap::draw()
149 drawChild(mPanelRadar); 150 drawChild(mPanelRadar);
150 } 151 }
151 } 152 }
152 else 153 else if (gHippoLimits->mAllowMinimap) //Check for if minimap is blocked
153 { 154 {
154 setMouseOpaque(TRUE); 155 setMouseOpaque(TRUE);
155 getDragHandle()->setMouseOpaque(TRUE); 156 getDragHandle()->setMouseOpaque(TRUE);
@@ -215,7 +216,6 @@ void LLFloaterMap::setRadarButtonState( bool showing_radar )
215 } 216 }
216} 217}
217 218
218
219void LLFloaterMap::adjustLayout( bool expand ) 219void LLFloaterMap::adjustLayout( bool expand )
220{ 220{
221 S32 radar_height = mPanelRadar->getRect().getHeight(); 221 S32 radar_height = mPanelRadar->getRect().getHeight();
diff --git a/linden/indra/newview/llfloatermessagebuilder.cpp b/linden/indra/newview/llfloatermessagebuilder.cpp
new file mode 100644
index 0000000..90c0f9e
--- /dev/null
+++ b/linden/indra/newview/llfloatermessagebuilder.cpp
@@ -0,0 +1,978 @@
1// <edit>
2#include "llviewerprecompiledheaders.h"
3#include "llfloatermessagebuilder.h"
4#include "lluictrlfactory.h"
5#include "llmessagetemplate.h"
6#include "llagent.h"
7#include "llchat.h"
8#include "llfloaterchat.h"
9#include "llviewerregion.h" // getHandle
10#include "llcombobox.h"
11#include "llselectmgr.h" // fill in stuff about selected object
12#include "llparcel.h"
13#include "llviewerparcelmgr.h" // same for parcel
14#include "llscrolllistctrl.h"
15#include "llworld.h"
16#include "lltemplatemessagebuilder.h"
17
18////////////////////////////////
19// LLNetListItem
20////////////////////////////////
21LLNetListItem::LLNetListItem(LLUUID id)
22: mID(id),
23 mAutoName(TRUE),
24 mName("No name"),
25 mPreviousRegionName(""),
26 mCircuitData(NULL)
27{
28}
29
30////////////////////////////////
31// LLFloaterMessageBuilder
32////////////////////////////////
33std::list<LLNetListItem*> LLFloaterMessageBuilder::sNetListItems;
34
35LLFloaterMessageBuilder::LLFloaterMessageBuilder(std::string initial_text)
36: LLFloater(),
37 LLEventTimer(1.0f),
38 mNetInfoMode(NI_NET),
39 mInitialText(initial_text)
40{
41 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_message_builder.xml");
42}
43LLFloaterMessageBuilder::~LLFloaterMessageBuilder()
44{
45}
46void LLFloaterMessageBuilder::show(std::string initial_text)
47{
48 (new LLFloaterMessageBuilder(initial_text))->open();
49}
50BOOL LLFloaterMessageBuilder::tick()
51{
52 refreshNetList();
53 return FALSE;
54}
55LLNetListItem* LLFloaterMessageBuilder::findNetListItem(LLHost host)
56{
57 std::list<LLNetListItem*>::iterator end = sNetListItems.end();
58 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != end; ++iter)
59 if((*iter)->mCircuitData && (*iter)->mCircuitData->getHost() == host)
60 return (*iter);
61 return NULL;
62}
63LLNetListItem* LLFloaterMessageBuilder::findNetListItem(LLUUID id)
64{
65 std::list<LLNetListItem*>::iterator end = sNetListItems.end();
66 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != end; ++iter)
67 if((*iter)->mID == id)
68 return (*iter);
69 return NULL;
70}
71void LLFloaterMessageBuilder::refreshNetList()
72{
73 LLScrollListCtrl* scrollp = getChild<LLScrollListCtrl>("net_list");
74 // Update circuit data of net list items
75 std::vector<LLCircuitData*> circuits = gMessageSystem->getCircuit()->getCircuitDataList();
76 std::vector<LLCircuitData*>::iterator circuits_end = circuits.end();
77 for(std::vector<LLCircuitData*>::iterator iter = circuits.begin(); iter != circuits_end; ++iter)
78 {
79 LLNetListItem* itemp = findNetListItem((*iter)->getHost());
80 if(!itemp)
81 {
82 LLUUID id; id.generate();
83 itemp = new LLNetListItem(id);
84 sNetListItems.push_back(itemp);
85 }
86 itemp->mCircuitData = (*iter);
87 }
88 // Clear circuit data of items whose circuits are gone
89 std::list<LLNetListItem*>::iterator items_end = sNetListItems.end();
90 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != items_end; ++iter)
91 {
92 if(std::find(circuits.begin(), circuits.end(), (*iter)->mCircuitData) == circuits.end())
93 (*iter)->mCircuitData = NULL;
94 }
95 // Remove net list items that are totally useless now
96 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != sNetListItems.end();)
97 {
98 if((*iter)->mCircuitData == NULL)
99 iter = sNetListItems.erase(iter);
100 else ++iter;
101 }
102 // Update names of net list items
103 items_end = sNetListItems.end();
104 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != items_end; ++iter)
105 {
106 LLNetListItem* itemp = (*iter);
107 if(itemp->mAutoName)
108 {
109 if(itemp->mCircuitData)
110 {
111 LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(itemp->mCircuitData->getHost());
112 if(regionp)
113 {
114 std::string name = regionp->getName();
115 if(name == "") name = llformat("%s (awaiting region name)", itemp->mCircuitData->getHost().getString().c_str());
116 itemp->mName = name;
117 itemp->mPreviousRegionName = name;
118 }
119 else
120 {
121 itemp->mName = itemp->mCircuitData->getHost().getString();
122 if(itemp->mPreviousRegionName != "")
123 itemp->mName.append(llformat(" (was %s)", itemp->mPreviousRegionName.c_str()));
124 }
125 }
126 else
127 {
128 // an item just for an event queue, not handled yet
129 itemp->mName = "Something else";
130 }
131 }
132 }
133 // Rebuild scroll list from scratch
134 LLUUID selected_id = scrollp->getFirstSelected() ? scrollp->getFirstSelected()->getUUID() : LLUUID::null;
135 S32 scroll_pos = scrollp->getScrollPos();
136 scrollp->clearRows();
137 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != items_end; ++iter)
138 {
139 LLNetListItem* itemp = (*iter);
140 LLSD element;
141 element["id"] = itemp->mID;
142 LLSD& text_column = element["columns"][0];
143 text_column["column"] = "text";
144 text_column["value"] = itemp->mName + (itemp->mCircuitData->getHost() == gAgent.getRegionHost() ? " (main)" : "");
145
146 LLSD& state_column = element["columns"][ 1];
147 state_column["column"] = "state";
148 state_column["value"] = "";
149
150 LLScrollListItem* scroll_itemp = scrollp->addElement(element);
151 BOOL has_live_circuit = itemp->mCircuitData && itemp->mCircuitData->isAlive();
152
153 LLScrollListText* state = (LLScrollListText*)scroll_itemp->getColumn(1);
154
155 if(has_live_circuit)
156 state->setText(std::string("Alive"));
157 else
158 state->setText(std::string("Alive"));
159 }
160 if(selected_id.notNull()) scrollp->selectByID(selected_id);
161 if(scroll_pos < scrollp->getItemCount()) scrollp->setScrollPos(scroll_pos);
162}
163BOOL LLFloaterMessageBuilder::postBuild()
164{
165 childSetText("message_edit", mInitialText);
166 childSetAction("send_btn", onClickSend, this);
167 std::vector<std::string> names;
168 LLComboBox* combo;
169 LLMessageSystem::message_template_name_map_t::iterator temp_end = gMessageSystem->mMessageTemplates.end();
170 LLMessageSystem::message_template_name_map_t::iterator temp_iter;
171 std::vector<std::string>::iterator names_end;
172 std::vector<std::string>::iterator names_iter;
173 for(temp_iter = gMessageSystem->mMessageTemplates.begin(); temp_iter != temp_end; ++temp_iter)
174 if((*temp_iter).second->getTrust() == MT_NOTRUST)
175 names.push_back((*temp_iter).second->mName);
176 std::sort(names.begin(), names.end());
177 combo = getChild<LLComboBox>("untrusted_message_combo");
178 names_end = names.end();
179 for(names_iter = names.begin(); names_iter != names_end; ++names_iter)
180 combo->add((*names_iter));
181 names.clear();
182 for(temp_iter = gMessageSystem->mMessageTemplates.begin(); temp_iter != temp_end; ++temp_iter)
183 if((*temp_iter).second->getTrust() == MT_TRUST)
184 names.push_back((*temp_iter).second->mName);
185 std::sort(names.begin(), names.end());
186 combo = getChild<LLComboBox>("trusted_message_combo");
187 names_end = names.end();
188 for(names_iter = names.begin(); names_iter != names_end; ++names_iter)
189 combo->add((*names_iter));
190 childSetCommitCallback("untrusted_message_combo", onCommitPacketCombo, this);
191 childSetCommitCallback("trusted_message_combo", onCommitPacketCombo, this);
192 return TRUE;
193}
194inline std::vector<std::string> split(std::string input, std::string separator)
195{
196 S32 size = input.length();
197 char* buffer = new char[size + 1];
198 strncpy(buffer, input.c_str(), size);
199 buffer[size] = '\0';
200 std::vector<std::string> lines;
201 char* result = strtok(buffer, separator.c_str());
202 while(result)
203 {
204 lines.push_back(result);
205 result = strtok(NULL, separator.c_str());
206 }
207 delete[] buffer;
208 return lines;
209}
210std::string mvtstr(e_message_variable_type var_type)
211{
212 switch(var_type)
213 {
214 case MVT_U8:
215 return "U8";
216 break;
217 case MVT_U16:
218 return "U16";
219 break;
220 case MVT_U32:
221 return "U32";
222 break;
223 case MVT_U64:
224 return "U64";
225 break;
226 case MVT_S8:
227 return "S8";
228 break;
229 case MVT_S16:
230 return "S16";
231 break;
232 case MVT_S32:
233 return "S32";
234 break;
235 case MVT_S64:
236 return "S64";
237 break;
238 case MVT_F32:
239 return "F32";
240 break;
241 case MVT_F64:
242 return "F64";
243 break;
244 case MVT_LLVector3:
245 return "LLVector3";
246 break;
247 case MVT_LLVector3d:
248 return "LLVector3d";
249 break;
250 case MVT_LLVector4:
251 return "LLVector4";
252 break;
253 case MVT_LLQuaternion:
254 return "LLQuaternion";
255 break;
256 case MVT_LLUUID:
257 return "LLUUID";
258 break;
259 case MVT_BOOL:
260 return "BOOL";
261 break;
262 case MVT_IP_ADDR:
263 return "IPADDR";
264 break;
265 case MVT_IP_PORT:
266 return "IPPORT";
267 break;
268 case MVT_VARIABLE:
269 return "Variable";
270 break;
271 case MVT_FIXED:
272 return "Fixed";
273 break;
274 default:
275 return "Missingno.";
276 break;
277 }
278}
279// static
280BOOL LLFloaterMessageBuilder::addField(e_message_variable_type var_type, const char* var_name, std::string input, BOOL hex)
281{
282 LLStringUtil::trim(input);
283 if(input.length() < 1 && var_type != MVT_VARIABLE)
284 return FALSE;
285 U8 valueU8;
286 U16 valueU16;
287 U32 valueU32;
288 U64 valueU64;
289 S8 valueS8;
290 S16 valueS16;
291 S32 valueS32;
292 // S64 valueS64;
293 F32 valueF32;
294 F64 valueF64;
295 LLVector3 valueVector3;
296 LLVector3d valueVector3d;
297 LLVector4 valueVector4;
298 LLQuaternion valueQuaternion;
299 LLUUID valueLLUUID;
300 BOOL valueBOOL;
301 std::string input_lower = input;
302 LLStringUtil::toLower(input_lower);
303 if(input_lower == "$agentid")
304 input = gAgent.getID().asString();
305 else if(input_lower == "$sessionid")
306 input = gAgent.getSessionID().asString();
307 else if(input_lower == "$uuid")
308 {
309 LLUUID id;
310 id.generate();
311 input = id.asString();
312 }
313 else if(input_lower == "$circuitcode")
314 {
315 std::stringstream temp_stream;
316 temp_stream << gMessageSystem->mOurCircuitCode;
317 input = temp_stream.str();
318 }
319 else if(input_lower == "$regionhandle")
320 {
321 std::stringstream temp_stream;
322 temp_stream << (gAgent.getRegion() ? gAgent.getRegion()->getHandle() : 0);
323 input = temp_stream.str();
324 }
325 else if(input_lower == "$position" || input_lower == "$pos")
326 {
327 std::stringstream temp_stream;
328 valueVector3 = gAgent.getPositionAgent();
329 temp_stream << "<" << valueVector3[0] << ", " << valueVector3[1] << ", " << valueVector3[2] << ">";
330 input = temp_stream.str();
331 }
332 if(hex)
333 {
334 if(var_type != MVT_VARIABLE && var_type != MVT_FIXED)
335 return FALSE;
336 int len = input_lower.length();
337 const char* cstr = input_lower.c_str();
338 std::string new_input("");
339 BOOL nibble = FALSE;
340 char byte = 0;
341 for(int i = 0; i < len; i++)
342 {
343 char c = cstr[i];
344 if(c >= 0x30 && c <= 0x39)
345 c -= 0x30;
346 else if(c >= 0x61 && c <= 0x66)
347 c -= 0x57;
348 else if(c != 0x20)
349 return FALSE;
350 else
351 continue;
352 if(!nibble)
353 byte = c << 4;
354 else
355 new_input.push_back(byte | c);
356 nibble = !nibble;
357 }
358 if(nibble)
359 return FALSE;
360 input = new_input;
361 }
362 std::stringstream stream(input);
363 std::vector<std::string> tokens;
364 switch(var_type)
365 {
366 case MVT_U8:
367 if(input.substr(0, 1) == "-")
368 return FALSE;
369 if((stream >> valueU32).fail())
370 return FALSE;
371 valueU8 = (U8)valueU32;
372 gMessageSystem->addU8(var_name, valueU8);
373 return TRUE;
374 break;
375 case MVT_U16:
376 if(input.substr(0, 1) == "-")
377 return FALSE;
378 if((stream >> valueU16).fail())
379 return FALSE;
380 gMessageSystem->addU16(var_name, valueU16);
381 return TRUE;
382 break;
383 case MVT_U32:
384 if(input.substr(0, 1) == "-")
385 return FALSE;
386 if((stream >> valueU32).fail())
387 return FALSE;
388 gMessageSystem->addU32(var_name, valueU32);
389 return TRUE;
390 break;
391 case MVT_U64:
392 if(input.substr(0, 1) == "-")
393 return FALSE;
394 if((stream >> valueU64).fail())
395 return FALSE;
396 gMessageSystem->addU64(var_name, valueU64);
397 return TRUE;
398 break;
399 case MVT_S8:
400 if((stream >> valueS8).fail())
401 return FALSE;
402 gMessageSystem->addS8(var_name, valueS8);
403 return TRUE;
404 break;
405 case MVT_S16:
406 if((stream >> valueS16).fail())
407 return FALSE;
408 gMessageSystem->addS16(var_name, valueS16);
409 return TRUE;
410 break;
411 case MVT_S32:
412 if((stream >> valueS32).fail())
413 return FALSE;
414 gMessageSystem->addS32(var_name, valueS32);
415 return TRUE;
416 break;
417 /*
418 case MVT_S64:
419 if((stream >> valueS64).fail())
420 return FALSE;
421 gMessageSystem->addS64(var_name, valueS64);
422 return TRUE;
423 break;
424 */
425 case MVT_F32:
426 if((stream >> valueF32).fail())
427 return FALSE;
428 gMessageSystem->addF32(var_name, valueF32);
429 return TRUE;
430 break;
431 case MVT_F64:
432 if((stream >> valueF64).fail())
433 return FALSE;
434 gMessageSystem->addF64(var_name, valueF64);
435 return TRUE;
436 break;
437 case MVT_LLVector3:
438 LLStringUtil::trim(input);
439 if(input.substr(0, 1) != "<" || input.substr(input.length() - 1, 1) != ">")
440 return FALSE;
441 tokens = split(input.substr(1, input.length() - 2), ",");
442 if(tokens.size() != 3)
443 return FALSE;
444 for(int i = 0; i < 3; i++)
445 {
446 stream.clear();
447 stream.str(tokens[i]);
448 if((stream >> valueF32).fail())
449 return FALSE;
450 valueVector3.mV[i] = valueF32;
451 }
452 gMessageSystem->addVector3(var_name, valueVector3);
453 return TRUE;
454 break;
455 case MVT_LLVector3d:
456 LLStringUtil::trim(input);
457 if(input.substr(0, 1) != "<" || input.substr(input.length() - 1, 1) != ">")
458 return FALSE;
459 tokens = split(input.substr(1, input.length() - 2), ",");
460 if(tokens.size() != 3)
461 return FALSE;
462 for(int i = 0; i < 3; i++)
463 {
464 stream.clear();
465 stream.str(tokens[i]);
466 if((stream >> valueF64).fail())
467 return FALSE;
468 valueVector3d.mdV[i] = valueF64;
469 }
470 gMessageSystem->addVector3d(var_name, valueVector3d);
471 return TRUE;
472 break;
473 case MVT_LLVector4:
474 LLStringUtil::trim(input);
475 if(input.substr(0, 1) != "<" || input.substr(input.length() - 1, 1) != ">")
476 return FALSE;
477 tokens = split(input.substr(1, input.length() - 2), ",");
478 if(tokens.size() != 4)
479 return FALSE;
480 for(int i = 0; i < 4; i++)
481 {
482 stream.clear();
483 stream.str(tokens[i]);
484 if((stream >> valueF32).fail())
485 return FALSE;
486 valueVector4.mV[i] = valueF32;
487 }
488 gMessageSystem->addVector4(var_name, valueVector4);
489 return TRUE;
490 break;
491 case MVT_LLQuaternion:
492 LLStringUtil::trim(input);
493 if(input.substr(0, 1) != "<" || input.substr(input.length() - 1, 1) != ">")
494 return FALSE;
495 tokens = split(input.substr(1, input.length() - 2), ",");
496 if(tokens.size() != 3)
497 return FALSE;
498 for(int i = 0; i < 3; i++)
499 {
500 stream.clear();
501 stream.str(tokens[i]);
502 if((stream >> valueF32).fail())
503 return FALSE;
504 valueVector3.mV[i] = valueF32;
505 }
506 valueQuaternion.unpackFromVector3(valueVector3);
507 gMessageSystem->addQuat(var_name, valueQuaternion);
508 return TRUE;
509 break;
510 case MVT_LLUUID:
511 if((stream >> valueLLUUID).fail())
512 return FALSE;
513 gMessageSystem->addUUID(var_name, valueLLUUID);
514 return TRUE;
515 break;
516 case MVT_BOOL:
517 if(input_lower == "true")
518 valueBOOL = TRUE;
519 else if(input_lower == "false")
520 valueBOOL = FALSE;
521 else if((stream >> valueBOOL).fail())
522 return FALSE;
523 //gMessageSystem->addBOOL(var_name, valueBOOL);
524 gMessageSystem->addU8(var_name, (U8)valueBOOL);
525 return TRUE;
526 break;
527 case MVT_IP_ADDR:
528 if((stream >> valueU32).fail())
529 return FALSE;
530 gMessageSystem->addIPAddr(var_name, valueU32);
531 return TRUE;
532 break;
533 case MVT_IP_PORT:
534 if((stream >> valueU16).fail())
535 return FALSE;
536 gMessageSystem->addIPPort(var_name, valueU16);
537 return TRUE;
538 break;
539 case MVT_VARIABLE:
540 if(!hex)
541 {
542 char* buffer = new char[input.size() + 1];
543 strncpy(buffer, input.c_str(), input.size());
544 buffer[input.size()] = '\0';
545 gMessageSystem->addBinaryData(var_name, buffer, input.size() + 1);
546 delete[] buffer;
547 }
548 else
549 gMessageSystem->addBinaryData(var_name, input.c_str(), input.size());
550 return TRUE;
551 break;
552 case MVT_FIXED:
553 if(!hex)
554 {
555 char* buffer = new char[input.size() + 1];
556 strncpy(buffer, input.c_str(), input.size());
557 buffer[input.size()] = '\0';
558 gMessageSystem->addBinaryData(var_name, buffer, input.size());
559 delete[] buffer;
560 }
561 else
562 gMessageSystem->addBinaryData(var_name, input.c_str(), input.size());
563 return TRUE;
564 break;
565 default:
566 break;
567 }
568 return FALSE;
569}
570// static
571void LLFloaterMessageBuilder::onCommitPacketCombo(LLUICtrl* ctrl, void* user_data)
572{
573 LLFloaterMessageBuilder* floaterp = (LLFloaterMessageBuilder*)user_data;
574 LLViewerObject* selected_objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
575 LLParcel* agent_parcelp = LLViewerParcelMgr::getInstance()->getAgentParcel();
576 std::string message = ctrl->getValue();
577 std::map<const char *, LLMessageTemplate*>::iterator template_iter;
578 template_iter = gMessageSystem->mMessageTemplates.find( LLMessageStringTable::getInstance()->getString(message.c_str()) );
579 if(template_iter == gMessageSystem->mMessageTemplates.end())
580 {
581 floaterp->childSetText("message_edit", std::string(""));
582 return;
583 }
584 std::string text(llformat((*template_iter).second->getTrust() == MT_NOTRUST ? "out %s\n" : "in %s\n", message.c_str()));
585 LLMessageTemplate* temp = (*template_iter).second;
586 LLMessageTemplate::message_block_map_t::iterator blocks_end = temp->mMemberBlocks.end();
587 for (LLMessageTemplate::message_block_map_t::iterator blocks_iter = temp->mMemberBlocks.begin();
588 blocks_iter != blocks_end; ++blocks_iter)
589 {
590 LLMessageBlock* block = (*blocks_iter);
591 const char* block_name = block->mName;
592 std::string block_name_string = std::string(block_name);
593 S32 num_blocks = 1;
594 if(block->mType == MBT_MULTIPLE)
595 num_blocks = block->mNumber;
596 else if(("ObjectLink" == message && "ObjectData" == block_name_string))
597 num_blocks = 2;
598 for(S32 i = 0; i < num_blocks; i++)
599 {
600 text.append(llformat("[%s]\n", block_name));
601 LLMessageBlock::message_variable_map_t::iterator var_end = block->mMemberVariables.end();
602 for (LLMessageBlock::message_variable_map_t::iterator var_iter = block->mMemberVariables.begin();
603 var_iter != var_end; ++var_iter)
604 {
605 LLMessageVariable* variable = (*var_iter);
606 const char* var_name = variable->getName();
607 std::string var_name_string = std::string(var_name);
608 text.append(llformat("%s = ", var_name));
609 std::string value("");
610 S32 size = variable->getSize();
611 switch(variable->getType())
612 {
613 case MVT_U8:
614 case MVT_U16:
615 case MVT_U32:
616 case MVT_U64:
617 case MVT_S8:
618 case MVT_S16:
619 case MVT_S32:
620 case MVT_IP_ADDR:
621 case MVT_IP_PORT:
622 if("RegionHandle" == var_name_string || "Handle" == var_name_string)
623 value = "$RegionHandle";
624 else if("CircuitCode" == var_name_string || "ViewerCircuitCode" == var_name_string
625 || ("Code" == var_name_string && "CircuitCode" == block_name_string) )
626 {
627 value = "$CircuitCode";
628 }
629 else if(selected_objectp &&
630 (
631 "ObjectLocalID" == var_name_string
632 || "TaskLocalID" == var_name_string
633 || ("LocalID" == var_name_string &&
634 (
635 "ObjectData" == block_name_string
636 || "UpdateData" == block_name_string
637 || "InventoryData" == block_name_string
638 )
639 )
640 )
641 )
642 {
643 std::stringstream temp_stream;
644 temp_stream << selected_objectp->getLocalID();
645 value = temp_stream.str();
646 }
647 else if( agent_parcelp &&
648 "LocalID" == var_name_string &&
649 (
650 "ParcelData" == block_name_string
651 || message.find("Parcel") != message.npos
652 )
653 )
654 {
655 std::stringstream temp_stream;
656 temp_stream << agent_parcelp->getLocalID();
657 value = temp_stream.str();
658 }
659 else if("PCode" == var_name_string)
660 value = "9";
661 else if("PathCurve" == var_name_string)
662 value = "16";
663 else if("ProfileCurve" == var_name_string)
664 value = "1";
665 else if("PathScaleX" == var_name_string || "PathScaleY" == var_name_string)
666 value = "100";
667 else if("BypassRaycast" == var_name_string)
668 value = "1";
669 else
670 value = "0";
671 break;
672 case MVT_F32:
673 case MVT_F64:
674 value = "0.0";
675 break;
676 case MVT_LLVector3:
677 case MVT_LLVector3d:
678 case MVT_LLQuaternion:
679 if("Position" == var_name_string || "RayStart" == var_name_string || "RayEnd" == var_name_string)
680 value = "$Position";
681 else if("Scale" == var_name_string)
682 value = "<0.5, 0.5, 0.5>";
683 else
684 value = "<0, 0, 0>";
685 break;
686 case MVT_LLVector4:
687 value = "<0, 0, 0, 0>";
688 break;
689 case MVT_LLUUID:
690 if("AgentID" == var_name_string)
691 value = "$AgentID";
692 else if("SessionID" == var_name_string)
693 value = "$SessionID";
694 else if("ObjectID" == var_name_string && selected_objectp)
695 value = selected_objectp->getID().asString();
696 else if("ParcelID" == var_name_string && agent_parcelp)
697 value = agent_parcelp->getID().asString();
698 else
699 value = "00000000-0000-0000-0000-000000000000";
700 break;
701 case MVT_BOOL:
702 value = "false";
703 break;
704 case MVT_VARIABLE:
705 value = "Hello, world!";
706 break;
707 case MVT_FIXED:
708 for(S32 si = 0; si < size; si++)
709 //value.append(std::string("0123456789abcdef").substr(si & 0xf, 1));
710 value.append("a");
711 break;
712 default:
713 value = "";
714 break;
715 }
716 text.append(llformat("%s\n", value.c_str()));
717 }
718 }
719 }
720 text = text.substr(0, text.length() - 1);
721 floaterp->childSetText("message_edit", text);
722}
723// static
724void LLFloaterMessageBuilder::onClickSend(void* user_data)
725{
726 LLFloaterMessageBuilder* floaterp = (LLFloaterMessageBuilder*)user_data;
727 std::vector<std::string> lines = split(floaterp->childGetText("message_edit"), "\n");
728 if(!lines.size())
729 {
730 LLFloaterChat::addChat(LLChat("Not enough information :O"));
731 return;
732 }
733 std::vector<std::string> tokens = split(lines[0], " ");
734 if(!tokens.size())
735 {
736 LLFloaterChat::addChat(LLChat("Not enough information :O"));
737 return;
738 }
739 std::string dir_str = tokens[0];
740 LLStringUtil::toLower(dir_str);
741 // Direction
742 BOOL outgoing;
743 if(dir_str == "out")
744 outgoing = TRUE;
745 else if(dir_str == "in")
746 outgoing = FALSE;
747 else
748 {
749 LLFloaterChat::addChat(LLChat("Expected direction 'in' or 'out'"));
750 return;
751 }
752 // Message
753 std::string message = "Invalid";
754 if(tokens.size() > 1)
755 {
756 if(tokens.size() > 2)
757 {
758 LLFloaterChat::addChat(LLChat("Unexpected extra stuff at the top"));
759 return;
760 }
761 message = tokens[1];
762 LLStringUtil::trim(message);
763 }
764 // Body
765 std::vector<parts_block> parts;
766 if(lines.size() > 1)
767 {
768 std::vector<std::string>::iterator line_end = lines.end();
769 std::vector<std::string>::iterator line_iter = lines.begin();
770 ++line_iter;
771 std::string current_block("");
772 int current_block_index = -1;
773 for( ; line_iter != line_end; ++line_iter)
774 {
775 std::string line = (*line_iter);
776 LLStringUtil::trim(line);
777 if(!line.length())
778 continue;
779 if(line.substr(0, 1) == "[" && line.substr(line.size() - 1, 1) == "]")
780 {
781 current_block = line.substr(1, line.length() - 2);
782 LLStringUtil::trim(current_block);
783 ++current_block_index;
784 parts_block pb;
785 pb.name = current_block;
786 parts.push_back(pb);
787 }
788 else
789 {
790 if(current_block.empty())
791 {
792 LLFloaterChat::addChat(LLChat("Unexpected field when no block yet"));
793 return;
794 }
795 int eqpos = line.find("=");
796 if(eqpos == line.npos)
797 {
798 LLFloaterChat::addChat(LLChat("Missing an equal sign"));
799 return;
800 }
801 std::string field = line.substr(0, eqpos);
802 LLStringUtil::trim(field);
803 if(!field.length())
804 {
805 LLFloaterChat::addChat(LLChat("Missing name of field"));
806 return;
807 }
808 std::string value = line.substr(eqpos + 1);
809 LLStringUtil::trim(value);
810 parts_var pv;
811 if(value.substr(0, 1) == "|")
812 {
813 pv.hex = TRUE;
814 value = value.substr(1);
815 LLStringUtil::trim(value);
816 }
817 else
818 pv.hex = FALSE;
819 pv.name = field;
820 pv.value = value;
821 parts[current_block_index].vars.push_back(pv);
822 }
823 }
824 }
825 // Verification
826 std::map<const char *, LLMessageTemplate*>::iterator template_iter;
827 template_iter = gMessageSystem->mMessageTemplates.find( LLMessageStringTable::getInstance()->getString(message.c_str()) );
828 if(template_iter == gMessageSystem->mMessageTemplates.end())
829 {
830 LLFloaterChat::addChat(LLChat(llformat("Don't know how to build a '%s' message", message.c_str())));
831 return;
832 }
833 LLMessageTemplate* temp = (*template_iter).second;
834 std::vector<parts_block>::iterator parts_end = parts.end();
835 std::vector<parts_block>::iterator parts_iter = parts.begin();
836 LLMessageTemplate::message_block_map_t::iterator blocks_end = temp->mMemberBlocks.end();
837 for (LLMessageTemplate::message_block_map_t::iterator blocks_iter = temp->mMemberBlocks.begin();
838 blocks_iter != blocks_end; )
839 {
840 LLMessageBlock* block = (*blocks_iter);
841 const char* block_name = block->mName;
842 if(parts_iter == parts_end)
843 {
844 if(block->mType != MBT_VARIABLE)
845 LLFloaterChat::addChat(LLChat(llformat("Expected '%s' block", block_name)));
846 else
847 {
848 ++blocks_iter;
849 continue;
850 }
851 return;
852 }
853 else if((*parts_iter).name != block_name)
854 {
855 if(block->mType != MBT_VARIABLE)
856 LLFloaterChat::addChat(LLChat(llformat("Expected '%s' block", block_name)));
857 else
858 {
859 ++blocks_iter;
860 continue;
861 }
862 return;
863 }
864 std::vector<parts_var>::iterator part_var_end = (*parts_iter).vars.end();
865 std::vector<parts_var>::iterator part_var_iter = (*parts_iter).vars.begin();
866 LLMessageBlock::message_variable_map_t::iterator var_end = block->mMemberVariables.end();
867 for (LLMessageBlock::message_variable_map_t::iterator var_iter = block->mMemberVariables.begin();
868 var_iter != var_end; ++var_iter)
869 {
870 LLMessageVariable* variable = (*var_iter);
871 const char* var_name = variable->getName();
872 if(part_var_iter == part_var_end)
873 {
874 LLFloaterChat::addChat(LLChat(llformat("Expected '%s' field under '%s' block", var_name, block_name)));
875 return;
876 }
877 else if((*part_var_iter).name != var_name)
878 {
879 LLFloaterChat::addChat(LLChat(llformat("Expected '%s' field under '%s' block", var_name, block_name)));
880 return;
881 }
882 (*part_var_iter).var_type = variable->getType();
883 ++part_var_iter;
884 }
885 if(part_var_iter != part_var_end)
886 {
887 LLFloaterChat::addChat(LLChat(llformat("Unexpected field(s) at end of '%s' block", block_name)));
888 return;
889 }
890 ++parts_iter;
891 // test
892 if((block->mType != MBT_SINGLE) && (parts_iter != parts_end) && ((*parts_iter).name == block_name))
893 {
894 // block will repeat
895 }
896 else ++blocks_iter;
897 }
898 if(parts_iter != parts_end)
899 {
900 LLFloaterChat::addChat(LLChat("Unexpected block(s) at end"));
901 return;
902 }
903 // Build and send
904 gMessageSystem->newMessage( message.c_str() );
905 for(parts_iter = parts.begin(); parts_iter != parts_end; ++parts_iter)
906 {
907 const char* block_name = (*parts_iter).name.c_str();
908 gMessageSystem->nextBlock(block_name);
909 std::vector<parts_var>::iterator part_var_end = (*parts_iter).vars.end();
910 for(std::vector<parts_var>::iterator part_var_iter = (*parts_iter).vars.begin();
911 part_var_iter != part_var_end; ++part_var_iter)
912 {
913 parts_var pv = (*part_var_iter);
914 if(!addField(pv.var_type, pv.name.c_str(), pv.value, pv.hex))
915 {
916 LLFloaterChat::addChat(LLChat(llformat("Error adding the provided data for %s '%s' to '%s' block", mvtstr(pv.var_type).c_str(), pv.name.c_str(), block_name)));
917 gMessageSystem->clearMessage();
918 return;
919 }
920 }
921 }
922
923 LLScrollListCtrl* scrollp = floaterp->getChild<LLScrollListCtrl>("net_list");
924 LLScrollListItem* selected_itemp = scrollp->getFirstSelected();
925
926 //if a specific circuit is selected, send it to that, otherwise send it to the current sim
927 if(selected_itemp)
928 {
929 LLNetListItem* itemp = findNetListItem(selected_itemp->getUUID());
930 LLScrollListText* textColumn = (LLScrollListText*)selected_itemp->getColumn(1);
931
932 //why would you send data through a dead circuit?
933 if(textColumn->getValue().asString() == "Dead")
934 {
935 LLFloaterChat::addChat(LLChat("No sending messages through dead circuits!"));
936 return;
937 }
938 if(outgoing)
939 {
940 gMessageSystem->sendMessage(itemp->mCircuitData->getHost());
941 } else {
942 U8 builtMessageBuffer[MAX_BUFFER_SIZE];
943
944 S32 message_size = gMessageSystem->mTemplateMessageBuilder->buildMessage(builtMessageBuffer, MAX_BUFFER_SIZE, 0);
945 gMessageSystem->clearMessage();
946 gMessageSystem->checkMessages(0, true, builtMessageBuffer, itemp->mCircuitData->getHost(), message_size);
947
948 }
949 } else {
950 if(outgoing)
951 {
952 gMessageSystem->sendMessage(gAgent.getRegionHost());
953 } else {
954 U8 builtMessageBuffer[MAX_BUFFER_SIZE];
955
956 S32 message_size = gMessageSystem->mTemplateMessageBuilder->buildMessage(builtMessageBuffer, MAX_BUFFER_SIZE, 0);
957 gMessageSystem->clearMessage();
958 gMessageSystem->checkMessages(0, true, builtMessageBuffer, gAgent.getRegionHost(), message_size);
959
960 }
961 }
962}
963
964BOOL LLFloaterMessageBuilder::handleKeyHere(KEY key, MASK mask)
965{
966 if(key == KEY_RETURN && (mask & MASK_CONTROL))
967 {
968 onClickSend(this);
969 return TRUE;
970 }
971 if(key == KEY_ESCAPE)
972 {
973 releaseFocus();
974 return TRUE;
975 }
976 return FALSE;
977}
978// </edit>
diff --git a/linden/indra/newview/llfloatermessagebuilder.h b/linden/indra/newview/llfloatermessagebuilder.h
new file mode 100644
index 0000000..5dc9b42
--- /dev/null
+++ b/linden/indra/newview/llfloatermessagebuilder.h
@@ -0,0 +1,55 @@
1// <edit>]
2#ifndef LL_LLFLOATERMESSAGEBUILDER_H
3#define LL_LLFLOATERMESSAGEBUILDER_H
4#include "llfloater.h"
5#include "lltemplatemessagereader.h"
6#include "llmessagelog.h"
7
8class LLNetListItem
9{
10public:
11 LLNetListItem(LLUUID id);
12 LLUUID mID;
13 BOOL mAutoName;
14 std::string mName;
15 std::string mPreviousRegionName;
16 LLCircuitData* mCircuitData;
17};
18
19class LLFloaterMessageBuilder : public LLFloater, public LLEventTimer
20{
21public:
22 LLFloaterMessageBuilder(std::string initial_text);
23 ~LLFloaterMessageBuilder();
24 static void show(std::string initial_text);
25 static std::list<LLNetListItem*> sNetListItems;
26 BOOL postBuild();
27 BOOL tick();
28 static BOOL addField(e_message_variable_type var_type, const char* var_name, std::string input, BOOL hex);
29 static void onClickSend(void* user_data);
30 static void onCommitPacketCombo(LLUICtrl* ctrl, void* user_data);
31 static LLFloaterMessageBuilder* sInstance;
32 BOOL handleKeyHere(KEY key, MASK mask);
33 std::string mInitialText;
34 struct parts_var
35 {
36 std::string name;
37 std::string value;
38 BOOL hex;
39 e_message_variable_type var_type;
40 };
41 struct parts_block
42 {
43 std::string name;
44 std::vector<parts_var> vars;
45 };
46 static LLNetListItem* findNetListItem(LLHost host);
47 static LLNetListItem* findNetListItem(LLUUID id);
48 void refreshNetList();
49 enum ENetInfoMode { NI_NET, NI_LOG };
50 ENetInfoMode mNetInfoMode;
51 static void onCommitMessageLog(LLUICtrl* ctrl, void* user_data);
52 static void onCommitFilter(LLUICtrl* ctrl, void* user_data);
53};
54#endif
55// </edit>
diff --git a/linden/indra/newview/llfloatermessagelog.cpp b/linden/indra/newview/llfloatermessagelog.cpp
new file mode 100644
index 0000000..161779b
--- /dev/null
+++ b/linden/indra/newview/llfloatermessagelog.cpp
@@ -0,0 +1,962 @@
1// <edit>
2#include "llviewerprecompiledheaders.h"
3#include "llfloatermessagelog.h"
4#include "lluictrlfactory.h"
5#include "llworld.h"
6#include "llviewerregion.h"
7#include "llscrolllistctrl.h"
8#include "lltexteditor.h"
9#include "llviewerwindow.h" // alertXml
10#include "llmessagetemplate.h"
11#include <boost/tokenizer.hpp>
12#include "llmenugl.h"
13#include "llfloatermessagebuilder.h"
14#include "llagent.h"
15////////////////////////////////
16// LLFloaterMessageLogItem
17////////////////////////////////
18#define MAX_PACKET_LEN (0x2000)
19LLTemplateMessageReader* LLFloaterMessageLogItem::sTemplateMessageReader = NULL;
20LLFloaterMessageLogItem::LLFloaterMessageLogItem(LLMessageLogEntry entry)
21: LLMessageLogEntry(entry.mType, entry.mFromHost, entry.mToHost, entry.mData, entry.mDataSize)
22{
23 if(!sTemplateMessageReader)
24 {
25 sTemplateMessageReader = new LLTemplateMessageReader(gMessageSystem->mMessageNumbers);
26 }
27 mID.generate();
28 mSequenceID = 0;
29 if(mType == TEMPLATE)
30 {
31 BOOL decode_invalid = FALSE;
32 S32 decode_len = mDataSize;
33 std::vector<U8> DecodeBuffer(MAX_PACKET_LEN,0);
34 memcpy(&(DecodeBuffer[0]),&(mData[0]),decode_len);
35 U8* decodep = &(DecodeBuffer[0]);
36 mFlags = DecodeBuffer[0];
37 gMessageSystem->zeroCodeExpand(&decodep, &decode_len);
38 if(decode_len < 7)
39 decode_invalid = TRUE;
40 else
41 {
42 mSequenceID = ntohl(*((U32*)(&decodep[1])));
43 sTemplateMessageReader->clearMessage();
44 if(!sTemplateMessageReader->validateMessage(decodep, decode_len, mFromHost, TRUE))
45 decode_invalid = TRUE;
46 else
47 {
48 if(!sTemplateMessageReader->decodeData(decodep, mFromHost, TRUE))
49 decode_invalid = TRUE;
50 else
51 {
52 LLMessageTemplate* temp = sTemplateMessageReader->getTemplate();
53 mName = temp->mName;
54 mSummary = "";
55
56 if(mFlags)
57 {
58 mSummary.append(" [ ");
59 if(mFlags & LL_ZERO_CODE_FLAG)
60 mSummary.append(" Zer ");
61 if(mFlags & LL_RELIABLE_FLAG)
62 mSummary.append(" Rel ");
63 if(mFlags & LL_RESENT_FLAG)
64 mSummary.append(" Rsd ");
65 if(mFlags & LL_ACK_FLAG)
66 mSummary.append(" Ack ");
67 mSummary.append(" ] ");
68 }
69
70 LLMessageTemplate::message_block_map_t::iterator blocks_end = temp->mMemberBlocks.end();
71 for (LLMessageTemplate::message_block_map_t::iterator blocks_iter = temp->mMemberBlocks.begin();
72 blocks_iter != blocks_end; ++blocks_iter)
73 {
74 LLMessageBlock* block = (*blocks_iter);
75 const char* block_name = block->mName;
76 S32 num_blocks = sTemplateMessageReader->getNumberOfBlocks(block_name);
77 if(!num_blocks)
78 mSummary.append(" { } ");
79 else if(num_blocks > 1)
80 mSummary.append(llformat(" %s [ %d ] { ... } ", block_name, num_blocks));
81 else for(S32 i = 0; i < 1; i++)
82 {
83 mSummary.append(" { ");
84 LLMessageBlock::message_variable_map_t::iterator var_end = block->mMemberVariables.end();
85 for (LLMessageBlock::message_variable_map_t::iterator var_iter = block->mMemberVariables.begin();
86 var_iter != var_end; ++var_iter)
87 {
88 LLMessageVariable* variable = (*var_iter);
89 const char* var_name = variable->getName();
90 BOOL returned_hex;
91 std::string value = getString(sTemplateMessageReader, block_name, i, var_name, variable->getType(), returned_hex, TRUE);
92 mSummary.append(llformat(" %s=%s ", var_name, value.c_str()));
93 }
94 mSummary.append(" } ");
95 if(mSummary.length() > 255) break;
96 }
97 if(mSummary.length() > 255)
98 {
99 mSummary.append(" ... ");
100 break;
101 }
102 } // blocks_iter
103 } // decode_valid
104 }
105 }
106 if(decode_invalid)
107 {
108 mName = "Invalid";
109 mSummary = "";
110 for(S32 i = 0; i < mDataSize; i++)
111 mSummary.append(llformat("%02X ", mData[i]));
112 }
113 }
114 else // not template
115 {
116 mName = "SOMETHING ELSE";
117 mSummary = "TODO: SOMETHING ELSE";
118 }
119}
120LLFloaterMessageLogItem::~LLFloaterMessageLogItem()
121{
122}
123BOOL LLFloaterMessageLogItem::isOutgoing()
124{
125 return mFromHost == LLHost(16777343, gMessageSystem->getListenPort());
126}
127std::string LLFloaterMessageLogItem::getFull(BOOL show_header)
128{
129 std::string full("");
130 if(mType == TEMPLATE)
131 {
132 BOOL decode_invalid = FALSE;
133 S32 decode_len = mDataSize;
134 std::vector<U8> DecodeBuffer(MAX_PACKET_LEN,0);
135 memcpy(&(DecodeBuffer[0]),&(mData[0]),decode_len);
136 U8* decodep = &(DecodeBuffer[0]);
137 gMessageSystem->zeroCodeExpand(&decodep, &decode_len);
138 if(decode_len < 7)
139 decode_invalid = TRUE;
140 else
141 {
142 sTemplateMessageReader->clearMessage();
143 if(!sTemplateMessageReader->validateMessage(decodep, decode_len, mFromHost, TRUE))
144 decode_invalid = TRUE;
145 else
146 {
147 if(!sTemplateMessageReader->decodeData(decodep, mFromHost, TRUE))
148 decode_invalid = TRUE;
149 else
150 {
151 LLMessageTemplate* temp = sTemplateMessageReader->getTemplate();
152 full.append(isOutgoing() ? "out " : "in ");
153 full.append(llformat("%s\n", temp->mName));
154 if(show_header)
155 {
156 full.append("[Header]\n");
157 full.append(llformat("SequenceID = %u\n", mSequenceID));
158 full.append(llformat("LL_ZERO_CODE_FLAG = %s\n", (mFlags & LL_ZERO_CODE_FLAG) ? "True" : "False"));
159 full.append(llformat("LL_RELIABLE_FLAG = %s\n", (mFlags & LL_RELIABLE_FLAG) ? "True" : "False"));
160 full.append(llformat("LL_RESENT_FLAG = %s\n", (mFlags & LL_RESENT_FLAG) ? "True" : "False"));
161 full.append(llformat("LL_ACK_FLAG = %s\n", (mFlags & LL_ACK_FLAG) ? "True" : "False"));
162 }
163 LLMessageTemplate::message_block_map_t::iterator blocks_end = temp->mMemberBlocks.end();
164 for (LLMessageTemplate::message_block_map_t::iterator blocks_iter = temp->mMemberBlocks.begin();
165 blocks_iter != blocks_end; ++blocks_iter)
166 {
167 LLMessageBlock* block = (*blocks_iter);
168 const char* block_name = block->mName;
169 S32 num_blocks = sTemplateMessageReader->getNumberOfBlocks(block_name);
170 for(S32 i = 0; i < num_blocks; i++)
171 {
172 full.append(llformat("[%s]\n", block->mName));
173 LLMessageBlock::message_variable_map_t::iterator var_end = block->mMemberVariables.end();
174 for (LLMessageBlock::message_variable_map_t::iterator var_iter = block->mMemberVariables.begin();
175 var_iter != var_end; ++var_iter)
176 {
177 LLMessageVariable* variable = (*var_iter);
178 const char* var_name = variable->getName();
179 BOOL returned_hex;
180 std::string value = getString(sTemplateMessageReader, block_name, i, var_name, variable->getType(), returned_hex);
181 if(returned_hex)
182 full.append(llformat("%s =| ", var_name));
183 else
184 full.append(llformat("%s = ", var_name));
185 // llformat has a 1024 char limit!?
186 full.append(value);
187 full.append("\n");
188 }
189 }
190 } // blocks_iter
191 } // decode_valid
192 }
193 }
194 if(decode_invalid)
195 {
196 full = isOutgoing() ? "out" : "in";
197 full.append("\n");
198 for(S32 i = 0; i < mDataSize; i++)
199 full.append(llformat("%02X ", mData[i]));
200 }
201 }
202 else // not template
203 {
204 full = "FIXME";
205 }
206 return full;
207}
208// static
209std::string LLFloaterMessageLogItem::getString(LLTemplateMessageReader* readerp, const char* block_name, S32 block_num, const char* var_name, e_message_variable_type var_type, BOOL &returned_hex, BOOL summary_mode)
210{
211 returned_hex = FALSE;
212 std::stringstream stream;
213 char* value;
214 U32 valueU32;
215 U16 valueU16;
216 LLVector3 valueVector3;
217 LLVector3d valueVector3d;
218 LLVector4 valueVector4;
219 LLQuaternion valueQuaternion;
220 LLUUID valueLLUUID;
221 switch(var_type)
222 {
223 case MVT_U8:
224 U8 valueU8;
225 readerp->getU8(block_name, var_name, valueU8, block_num);
226 stream << U32(valueU8);
227 break;
228 case MVT_U16:
229 readerp->getU16(block_name, var_name, valueU16, block_num);
230 stream << valueU16;
231 break;
232 case MVT_U32:
233 readerp->getU32(block_name, var_name, valueU32, block_num);
234 stream << valueU32;
235 break;
236 case MVT_U64:
237 U64 valueU64;
238 readerp->getU64(block_name, var_name, valueU64, block_num);
239 stream << valueU64;
240 break;
241 case MVT_S8:
242 S8 valueS8;
243 readerp->getS8(block_name, var_name, valueS8, block_num);
244 stream << S32(valueS8);
245 break;
246 case MVT_S16:
247 S16 valueS16;
248 readerp->getS16(block_name, var_name, valueS16, block_num);
249 stream << valueS16;
250 break;
251 case MVT_S32:
252 S32 valueS32;
253 readerp->getS32(block_name, var_name, valueS32, block_num);
254 stream << valueS32;
255 break;
256 /*case MVT_S64:
257 S64 valueS64;
258 readerp->getS64(block_name, var_name, valueS64, block_num);
259 stream << valueS64;
260 break;*/
261 case MVT_F32:
262 F32 valueF32;
263 readerp->getF32(block_name, var_name, valueF32, block_num);
264 stream << valueF32;
265 break;
266 case MVT_F64:
267 F64 valueF64;
268 readerp->getF64(block_name, var_name, valueF64, block_num);
269 stream << valueF64;
270 break;
271 case MVT_LLVector3:
272 readerp->getVector3(block_name, var_name, valueVector3, block_num);
273 //stream << valueVector3;
274 stream << "<" << valueVector3.mV[0] << ", " << valueVector3.mV[1] << ", " << valueVector3.mV[2] << ">";
275 break;
276 case MVT_LLVector3d:
277 readerp->getVector3d(block_name, var_name, valueVector3d, block_num);
278 //stream << valueVector3d;
279 stream << "<" << valueVector3d.mdV[0] << ", " << valueVector3d.mdV[1] << ", " << valueVector3d.mdV[2] << ">";
280 break;
281 case MVT_LLVector4:
282 readerp->getVector4(block_name, var_name, valueVector4, block_num);
283 //stream << valueVector4;
284 stream << "<" << valueVector4.mV[0] << ", " << valueVector4.mV[1] << ", " << valueVector4.mV[2] << ", " << valueVector4.mV[3] << ">";
285 break;
286 case MVT_LLQuaternion:
287 readerp->getQuat(block_name, var_name, valueQuaternion, block_num);
288 //stream << valueQuaternion;
289 stream << "<" << valueQuaternion.mQ[0] << ", " << valueQuaternion.mQ[1] << ", " << valueQuaternion.mQ[2] << ", " << valueQuaternion.mQ[3] << ">";
290 break;
291 case MVT_LLUUID:
292 readerp->getUUID(block_name, var_name, valueLLUUID, block_num);
293 stream << valueLLUUID;
294 break;
295 case MVT_BOOL:
296 BOOL valueBOOL;
297 readerp->getBOOL(block_name, var_name, valueBOOL, block_num);
298 stream << valueBOOL;
299 break;
300 case MVT_IP_ADDR:
301 readerp->getIPAddr(block_name, var_name, valueU32, block_num);
302 stream << LLHost(valueU32, 0).getIPString();
303 break;
304 case MVT_IP_PORT:
305 readerp->getIPPort(block_name, var_name, valueU16, block_num);
306 stream << valueU16;
307 case MVT_VARIABLE:
308 case MVT_FIXED:
309 default:
310 S32 size = readerp->getSize(block_name, block_num, var_name);
311 if(size)
312 {
313 value = new char[size + 1];
314 readerp->getBinaryData(block_name, var_name, value, size, block_num);
315 value[size] = '\0';
316 S32 readable = 0;
317 S32 unreadable = 0;
318 S32 end = (summary_mode && (size > 64)) ? 64 : size;
319 for(S32 i = 0; i < end; i++)
320 {
321 if(!value[i])
322 {
323 if(i != (end - 1))
324 { // don't want null terminator hiding data
325 unreadable = S32_MAX;
326 break;
327 }
328 }
329 else if(value[i] < 0x20 || value[i] >= 0x7F)
330 {
331 if(summary_mode)
332 unreadable++;
333 else
334 { // never want any wrong characters outside of summary mode
335 unreadable = S32_MAX;
336 break;
337 }
338 }
339 else readable++;
340 }
341 if(readable >= unreadable)
342 {
343 if(summary_mode && (size > 64))
344 {
345 for(S32 i = 60; i < 63; i++)
346 value[i] = '.';
347 value[63] = '\0';
348 }
349 stream << value;
350
351 delete[] value;
352 }
353 else
354 {
355 returned_hex = TRUE;
356 S32 end = (summary_mode && (size > 8)) ? 8 : size;
357 for(S32 i = 0; i < end; i++)
358 //stream << std::uppercase << std::hex << U32(value[i]) << " ";
359 stream << llformat("%02X ", (U8)value[i]);
360 if(summary_mode && (size > 8))
361 stream << " ... ";
362 }
363 }
364 break;
365 }
366
367 return stream.str();
368}
369LLMessageLogFilter::LLMessageLogFilter()
370{
371}
372LLMessageLogFilter::~LLMessageLogFilter()
373{
374}
375BOOL LLMessageLogFilter::set(std::string filter)
376{
377 mPositiveNames.clear();
378 mNegativeNames.clear();
379 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
380 boost::char_separator<char> sep(" ","",boost::keep_empty_tokens);
381 boost::tokenizer<boost::char_separator<char> > tokens(filter, sep);
382 boost::tokenizer<boost::char_separator<char> >::iterator end = tokens.end();
383 for(boost::tokenizer<boost::char_separator<char> >::iterator iter = tokens.begin(); iter != end; ++iter)
384 {
385 std::string token = (*iter);
386 LLStringUtil::trim(token);
387 LLStringUtil::toLower(token);
388 BOOL negative = token.find("!") == 0;
389 if(negative)
390 {
391 token = token.substr(1);
392 mNegativeNames.push_back(token);
393 }
394 else
395 mPositiveNames.push_back(token);
396 }
397 return TRUE;
398}
399////////////////////////////////
400// LLMessageLogFilterApply
401////////////////////////////////
402LLMessageLogFilterApply::LLMessageLogFilterApply()
403: LLEventTimer(0.1f),
404 mFinished(FALSE),
405 mProgress(0)
406{
407 mIter = LLFloaterMessageLog::sMessageLogEntries.begin();
408}
409void LLMessageLogFilterApply::cancel()
410{
411 mFinished = TRUE;
412}
413BOOL LLMessageLogFilterApply::tick()
414{
415 std::deque<LLMessageLogEntry>::iterator end = LLFloaterMessageLog::sMessageLogEntries.end();
416 if(mIter == end || !LLFloaterMessageLog::sInstance)
417 {
418 mFinished = TRUE;
419 if(LLFloaterMessageLog::sInstance)
420 {
421 if(LLFloaterMessageLog::sInstance->mMessageLogFilterApply == this)
422 {
423 LLFloaterMessageLog::sInstance->stopApplyingFilter();
424 }
425 }
426 return TRUE;
427 }
428 for(S32 i = 0; i < 256; i++)
429 {
430 if(mIter == end)
431 {
432 mFinished = TRUE;
433 if(LLFloaterMessageLog::sInstance)
434 {
435 if(LLFloaterMessageLog::sInstance->mMessageLogFilterApply == this)
436 {
437 LLFloaterMessageLog::sInstance->stopApplyingFilter();
438
439 //we're done messing with the deque, push all queued items to the main deque
440 std::deque<LLMessageLogEntry>::iterator queueIter = mQueuedMessages.begin();
441 std::deque<LLMessageLogEntry>::iterator queueEnd = mQueuedMessages.end();
442
443 while(queueIter != queueEnd)
444 {
445 LLFloaterMessageLog::sInstance->conditionalLog(LLFloaterMessageLogItem((*queueIter)));
446 ++queueIter;
447 }
448
449 mQueuedMessages.clear();
450 }
451 }
452
453 return TRUE;
454 }
455
456 LLFloaterMessageLog::sInstance->conditionalLog(LLFloaterMessageLogItem((*mIter)));
457
458 mIter++;
459 mProgress++;
460 }
461 LLFloaterMessageLog::sInstance->updateFilterStatus();
462 return FALSE;
463}
464////////////////////////////////
465// LLFloaterMessageLog
466////////////////////////////////
467LLFloaterMessageLog* LLFloaterMessageLog::sInstance;
468std::list<LLNetListItem*> LLFloaterMessageLog::sNetListItems;
469std::deque<LLMessageLogEntry> LLFloaterMessageLog::sMessageLogEntries;
470std::vector<LLFloaterMessageLogItem> LLFloaterMessageLog::sFloaterMessageLogItems;
471LLMessageLogFilter LLFloaterMessageLog::sMessageLogFilter = LLMessageLogFilter();
472std::string LLFloaterMessageLog::sMessageLogFilterString("!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket !SoundTrigger !AttachedSound !PreloadSound");
473BOOL LLFloaterMessageLog::sBusyApplyingFilter = FALSE;
474LLFloaterMessageLog::LLFloaterMessageLog()
475: LLFloater(),
476 LLEventTimer(1.0f),
477 mNetInfoMode(NI_NET),
478 mMessageLogFilterApply(NULL)
479{
480 sInstance = this;
481 LLMessageLog::setCallback(onLog);
482 sMessageLogEntries = LLMessageLog::getDeque();
483 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_message_log.xml");
484}
485LLFloaterMessageLog::~LLFloaterMessageLog()
486{
487 LLMessageLog::setCallback(NULL);
488 stopApplyingFilter();
489 sInstance = NULL;
490 sNetListItems.clear();
491 sMessageLogEntries.clear();
492 sFloaterMessageLogItems.clear();
493}
494// static
495void LLFloaterMessageLog::show()
496{
497 if(!sInstance) sInstance = new LLFloaterMessageLog();
498 sInstance->open();
499}
500BOOL LLFloaterMessageLog::postBuild()
501{
502 childSetCommitCallback("net_list", onCommitNetList, this);
503 childSetCommitCallback("message_log", onCommitMessageLog, this);
504 childSetAction("filter_choice_btn", onClickFilterChoice, this);
505 childSetAction("filter_apply_btn", onClickFilterApply, this);
506 childSetCommitCallback("filter_edit", onCommitFilter, this);
507 childSetAction("clear_log_btn", onClickClearLog, this);
508 childSetAction("send_to_message_builder_btn", onClickSendToMessageBuilder, this);
509 childSetText("filter_edit", sMessageLogFilterString);
510 refreshNetList();
511 refreshNetInfo(TRUE);
512 startApplyingFilter(sMessageLogFilterString, TRUE);
513 return TRUE;
514}
515BOOL LLFloaterMessageLog::tick()
516{
517 refreshNetList();
518 refreshNetInfo(FALSE);
519 return FALSE;
520}
521LLNetListItem* LLFloaterMessageLog::findNetListItem(LLHost host)
522{
523 std::list<LLNetListItem*>::iterator end = sNetListItems.end();
524 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != end; ++iter)
525 if((*iter)->mCircuitData && (*iter)->mCircuitData->getHost() == host)
526 return (*iter);
527 return NULL;
528}
529LLNetListItem* LLFloaterMessageLog::findNetListItem(LLUUID id)
530{
531 std::list<LLNetListItem*>::iterator end = sNetListItems.end();
532 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != end; ++iter)
533 if((*iter)->mID == id)
534 return (*iter);
535 return NULL;
536}
537void LLFloaterMessageLog::refreshNetList()
538{
539 LLScrollListCtrl* scrollp = getChild<LLScrollListCtrl>("net_list");
540 // Update circuit data of net list items
541 std::vector<LLCircuitData*> circuits = gMessageSystem->getCircuit()->getCircuitDataList();
542 std::vector<LLCircuitData*>::iterator circuits_end = circuits.end();
543 for(std::vector<LLCircuitData*>::iterator iter = circuits.begin(); iter != circuits_end; ++iter)
544 {
545 LLNetListItem* itemp = findNetListItem((*iter)->getHost());
546 if(!itemp)
547 {
548 LLUUID id; id.generate();
549 itemp = new LLNetListItem(id);
550 sNetListItems.push_back(itemp);
551 }
552 itemp->mCircuitData = (*iter);
553 }
554 // Clear circuit data of items whose circuits are gone
555 std::list<LLNetListItem*>::iterator items_end = sNetListItems.end();
556 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != items_end; ++iter)
557 {
558 if(std::find(circuits.begin(), circuits.end(), (*iter)->mCircuitData) == circuits.end())
559 (*iter)->mCircuitData = NULL;
560 }
561 // Remove net list items that are totally useless now
562 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != sNetListItems.end();)
563 {
564 if((*iter)->mCircuitData == NULL)
565 iter = sNetListItems.erase(iter);
566 else ++iter;
567 }
568 // Update names of net list items
569 items_end = sNetListItems.end();
570 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != items_end; ++iter)
571 {
572 LLNetListItem* itemp = (*iter);
573 if(itemp->mAutoName)
574 {
575 if(itemp->mCircuitData)
576 {
577 LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(itemp->mCircuitData->getHost());
578 if(regionp)
579 {
580 std::string name = regionp->getName();
581 if(name == "") name = llformat("%s (awaiting region name)", itemp->mCircuitData->getHost().getString().c_str());
582 itemp->mName = name;
583 itemp->mPreviousRegionName = name;
584 }
585 else
586 {
587 itemp->mName = itemp->mCircuitData->getHost().getString();
588 if(itemp->mPreviousRegionName != "")
589 itemp->mName.append(llformat(" (was %s)", itemp->mPreviousRegionName.c_str()));
590 }
591 }
592 else
593 {
594 // an item just for an event queue, not handled yet
595 itemp->mName = "Something else";
596 }
597 }
598 }
599 // Rebuild scroll list from scratch
600 LLUUID selected_id = scrollp->getFirstSelected() ? scrollp->getFirstSelected()->getUUID() : LLUUID::null;
601 S32 scroll_pos = scrollp->getScrollPos();
602 scrollp->clearRows();
603 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != items_end; ++iter)
604 {
605 LLNetListItem* itemp = (*iter);
606 LLSD element;
607 element["id"] = itemp->mID;
608 LLSD& text_column = element["columns"][0];
609 text_column["column"] = "text";
610 text_column["value"] = itemp->mName + (itemp->mCircuitData->getHost() == gAgent.getRegionHost() ? " (main)" : "");
611 for(int i = 0; i < 2; i++)
612 {
613 LLSD& icon_column = element["columns"][i + 1];
614 icon_column["column"] = llformat("icon%d", i);
615 icon_column["type"] = "icon";
616 icon_column["value"] = "";
617 }
618 LLScrollListItem* scroll_itemp = scrollp->addElement(element);
619 BOOL has_live_circuit = itemp->mCircuitData && itemp->mCircuitData->isAlive();
620 if(has_live_circuit)
621 {
622 LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(1);
623 icon->setValue("icon_net_close_circuit.tga");
624 icon->setClickCallback(onClickCloseCircuit, itemp);
625 }
626 else
627 {
628 LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(1);
629 icon->setValue("icon_net_close_circuit_gray.tga");
630 icon->setClickCallback(NULL, NULL);
631 }
632 // Event queue isn't even supported yet... FIXME
633 LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(2);
634 icon->setValue("icon_net_close_eventpoll_gray.tga");
635 icon->setClickCallback(NULL, NULL);
636 }
637 if(selected_id.notNull()) scrollp->selectByID(selected_id);
638 if(scroll_pos < scrollp->getItemCount()) scrollp->setScrollPos(scroll_pos);
639}
640void LLFloaterMessageLog::refreshNetInfo(BOOL force)
641{
642 if(mNetInfoMode != NI_NET) return;
643 LLScrollListCtrl* scrollp = getChild<LLScrollListCtrl>("net_list");
644 LLScrollListItem* selected_itemp = scrollp->getFirstSelected();
645 if(selected_itemp)
646 {
647 if(!force) if(getChild<LLTextEditor>("net_info")->hasSelection()) return;
648 LLNetListItem* itemp = findNetListItem(selected_itemp->getUUID());
649 if(itemp)
650 {
651 std::string info(llformat("%s\n--------------------------------\n\n", itemp->mName.c_str()));
652 if(itemp->mCircuitData)
653 {
654 LLCircuitData* cdp = itemp->mCircuitData;
655 info.append("Circuit\n--------------------------------\n");
656 info.append(llformat(" * Host: %s\n", cdp->getHost().getString().c_str()));
657 S32 seconds = (S32)cdp->getAgeInSeconds();
658 S32 minutes = seconds / 60;
659 seconds = seconds % 60;
660 S32 hours = minutes / 60;
661 minutes = minutes % 60;
662 info.append(llformat(" * Age: %dh %dm %ds\n", hours, minutes, seconds));
663 info.append(llformat(" * Alive: %s\n", cdp->isAlive() ? "yes" : "no"));
664 info.append(llformat(" * Blocked: %s\n", cdp->isBlocked() ? "yes" : "no"));
665 info.append(llformat(" * Allow timeout: %s\n", cdp->getAllowTimeout() ? "yes" : "no"));
666 info.append(llformat(" * Trusted: %s\n", cdp->getTrusted() ? "yes" : "no"));
667 info.append(llformat(" * Ping delay: %d\n", cdp->getPingDelay()));
668 info.append(llformat(" * Packets out: %d\n", cdp->getPacketsOut()));
669 info.append(llformat(" * Bytes out: %d\n", cdp->getBytesOut()));
670 info.append(llformat(" * Packets in: %d\n", cdp->getPacketsIn()));
671 info.append(llformat(" * Bytes in: %d\n", cdp->getBytesIn()));
672 info.append(llformat(" * Endpoint ID: %s\n", cdp->getLocalEndPointID().asString().c_str()));
673 info.append(llformat(" * Remote ID: %s\n", cdp->getRemoteID().asString().c_str()));
674 info.append(llformat(" * Remote session ID: %s\n", cdp->getRemoteSessionID().asString().c_str()));
675 }
676 childSetText("net_info", info);
677 }
678 else childSetText("net_info", std::string(""));
679 }
680 else childSetText("net_info", std::string(""));
681}
682void LLFloaterMessageLog::setNetInfoMode(ENetInfoMode mode)
683{
684 mNetInfoMode = mode;
685 if(mNetInfoMode == NI_NET)
686 refreshNetInfo(TRUE);
687 childSetEnabled("send_to_message_builder_btn", mNetInfoMode == NI_LOG);
688}
689// static
690void LLFloaterMessageLog::onLog(LLMessageLogEntry entry)
691{
692 //don't mess with the queue while a filter's being applied, or face invalid iterators
693 if(!sBusyApplyingFilter)
694 {
695 sMessageLogEntries.push_back(entry);
696 conditionalLog(LLFloaterMessageLogItem(entry));
697 }
698}
699// static
700void LLFloaterMessageLog::conditionalLog(LLFloaterMessageLogItem item)
701{
702 if(!sBusyApplyingFilter)
703 sInstance->childSetText("log_status_text", llformat("Showing %d messages from %d", sFloaterMessageLogItems.size(), sMessageLogEntries.size()));
704 std::string find_name = item.mName;
705 LLStringUtil::toLower(find_name);
706 if(sMessageLogFilter.mPositiveNames.size())
707 if(std::find(sMessageLogFilter.mPositiveNames.begin(), sMessageLogFilter.mPositiveNames.end(), find_name) == sMessageLogFilter.mPositiveNames.end())
708 return;
709 if(std::find(sMessageLogFilter.mNegativeNames.begin(), sMessageLogFilter.mNegativeNames.end(), find_name) != sMessageLogFilter.mNegativeNames.end())
710 return;
711 sFloaterMessageLogItems.push_back(item); // moved from beginning...
712 BOOL outgoing = item.isOutgoing();
713 std::string net_name("\?\?\?");
714 if(item.mType == LLFloaterMessageLogItem::TEMPLATE)
715 {
716 LLHost find_host = outgoing ? item.mToHost : item.mFromHost;
717 net_name = find_host.getIPandPort();
718 std::list<LLNetListItem*>::iterator end = sNetListItems.end();
719 for(std::list<LLNetListItem*>::iterator iter = sNetListItems.begin(); iter != end; ++iter)
720 {
721 if((*iter)->mCircuitData->getHost() == find_host)
722 {
723 net_name = (*iter)->mName;
724 break;
725 }
726 }
727 }
728 LLSD element;
729 element["id"] = item.mID;
730 LLSD& sequence_column = element["columns"][0];
731 sequence_column["column"] = "sequence";
732 sequence_column["value"] = llformat("%u", item.mSequenceID);
733 LLSD& type_column = element["columns"][1];
734 type_column["column"] = "type";
735 type_column["value"] = item.mType == LLFloaterMessageLogItem::TEMPLATE ? "UDP" : "\?\?\?";
736 LLSD& direction_column = element["columns"][2];
737 direction_column["column"] = "direction";
738 direction_column["value"] = outgoing ? "to" : "from";
739 LLSD& net_column = element["columns"][3];
740 net_column["column"] = "net";
741 net_column["value"] = net_name;
742 LLSD& name_column = element["columns"][4];
743 name_column["column"] = "name";
744 name_column["value"] = item.mName;
745 /*
746 LLSD& zer_column = element["columns"][5];
747 zer_column["column"] = "flag_zer";
748 zer_column["type"] = "icon";
749 zer_column["value"] = (item.mFlags & LL_ZERO_CODE_FLAG) ? "flag_zer.tga" : "";
750 LLSD& rel_column = element["columns"][6];
751 rel_column["column"] = "flag_rel";
752 rel_column["type"] = "icon";
753 rel_column["value"] = (item.mFlags & LL_RELIABLE_FLAG) ? "flag_rel.tga" : "";
754 LLSD& rsd_column = element["columns"][7];
755 rsd_column["column"] = "flag_rsd";
756 rsd_column["type"] = "icon";
757 rsd_column["value"] = (item.mFlags & LL_RESENT_FLAG) ? "flag_rsd.tga" : "";
758 LLSD& ack_column = element["columns"][8];
759 ack_column["column"] = "flag_ack";
760 ack_column["type"] = "icon";
761 ack_column["value"] = (item.mFlags & LL_ACK_FLAG) ? "flag_ack.tga" : "";
762 */
763 LLSD& summary_column = element["columns"][5];
764 summary_column["column"] = "summary";
765 summary_column["value"] = item.mSummary;
766 LLScrollListCtrl* scrollp = sInstance->getChild<LLScrollListCtrl>("message_log");
767 S32 scroll_pos = scrollp->getScrollPos();
768 scrollp->addElement(element);
769 if(scroll_pos > scrollp->getItemCount() - scrollp->getPageLines() - 4)
770 scrollp->setScrollPos(scrollp->getItemCount());
771}
772// static
773void LLFloaterMessageLog::onCommitNetList(LLUICtrl* ctrl, void* user_data)
774{
775 LLFloaterMessageLog* floaterp = (LLFloaterMessageLog*)user_data;
776 floaterp->setNetInfoMode(NI_NET);
777 floaterp->refreshNetInfo(TRUE);
778}
779// static
780void LLFloaterMessageLog::onCommitMessageLog(LLUICtrl* ctrl, void* user_data)
781{
782 LLFloaterMessageLog* floaterp = (LLFloaterMessageLog*)user_data;
783 LLScrollListCtrl* scrollp = floaterp->getChild<LLScrollListCtrl>("message_log");
784 LLScrollListItem* selected_itemp = scrollp->getFirstSelected();
785 if(!selected_itemp) return;
786 LLUUID id = selected_itemp->getUUID();
787 std::vector<LLFloaterMessageLogItem>::iterator end = sFloaterMessageLogItems.end();
788 for(std::vector<LLFloaterMessageLogItem>::iterator iter = sFloaterMessageLogItems.begin(); iter != end; ++iter)
789 {
790 if(iter->mID == id)
791 {
792 floaterp->setNetInfoMode(NI_LOG);
793 floaterp->childSetText("net_info", iter->getFull(FALSE));
794 break;
795 }
796 }
797}
798// static
799BOOL LLFloaterMessageLog::onClickCloseCircuit(void* user_data)
800{
801 LLNetListItem* itemp = (LLNetListItem*)user_data;
802 LLCircuitData* cdp = (LLCircuitData*)itemp->mCircuitData;
803 if(!cdp) return FALSE;
804 LLHost myhost = cdp->getHost();
805 LLSD args;
806 args["MESSAGE"] = "This will delete local circuit data.\nDo you want to tell the remote host to close the circuit too?";
807 LLSD payload;
808 payload["circuittoclose"] = myhost.getString();
809 LLNotifications::instance().add("GenericAlertYesCancel", args, payload, onConfirmCloseCircuit);
810 return TRUE;
811}
812// static
813bool LLFloaterMessageLog::onConfirmCloseCircuit(const LLSD& notification, const LLSD& response )
814{
815 S32 option = LLNotification::getSelectedOption(notification, response);
816 LLCircuitData* cdp = gMessageSystem->mCircuitInfo.findCircuit(LLHost(notification["payload"]["circuittoclose"].asString()));
817 if(!cdp) return false;
818 LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(cdp->getHost());
819 switch(option)
820 {
821 case 0: // yes
822 gMessageSystem->newMessageFast(_PREHASH_CloseCircuit);
823 gMessageSystem->sendReliable(cdp->getHost());
824 break;
825 case 2: // cancel
826 return false;
827 break;
828 case 1: // no
829 default:
830 break;
831 }
832 if(gMessageSystem->findCircuitCode(cdp->getHost()))
833 gMessageSystem->disableCircuit(cdp->getHost());
834 else
835 gMessageSystem->getCircuit()->removeCircuitData(cdp->getHost());
836 if(regionp)
837 {
838 LLHost myhost = regionp->getHost();
839 LLSD args;
840 args["MESSAGE"] = "That host had a region associated with it.\nDo you want to clean that up?";
841 LLSD payload;
842 payload["regionhost"] = myhost.getString();
843 LLNotifications::instance().add("GenericAlertYesCancel", args, payload, onConfirmRemoveRegion);
844 }
845 return false;
846}
847// static
848bool LLFloaterMessageLog::onConfirmRemoveRegion(const LLSD& notification, const LLSD& response )
849{
850 S32 option = LLNotification::getSelectedOption(notification, response);
851 if(option == 0) // yes
852 LLWorld::getInstance()->removeRegion(LLHost(notification["payload"]["regionhost"].asString()));
853 return false;
854}
855// static
856void LLFloaterMessageLog::onClickFilterApply(void* user_data)
857{
858 LLFloaterMessageLog* floaterp = (LLFloaterMessageLog*)user_data;
859 floaterp->startApplyingFilter(floaterp->childGetValue("filter_edit"), FALSE);
860}
861void LLFloaterMessageLog::startApplyingFilter(std::string filter, BOOL force)
862{
863 LLMessageLogFilter new_filter = LLMessageLogFilter();
864 sMessageLogFilterString = filter;
865 new_filter.set(sMessageLogFilterString);
866 if(!filter.length() || filter.at(filter.length()-1) != ' ')
867 childSetText("filter_edit", filter + " ");
868 if(force
869 || (new_filter.mNegativeNames != sMessageLogFilter.mNegativeNames)
870 || (new_filter.mPositiveNames != sMessageLogFilter.mPositiveNames))
871 {
872 stopApplyingFilter();
873 sMessageLogFilter = new_filter;
874 sFloaterMessageLogItems.clear();
875 getChild<LLScrollListCtrl>("message_log")->clearRows();
876 sBusyApplyingFilter = TRUE;
877 childSetVisible("message_log", false);
878 //childSetVisible("log_status_text", true);
879 mMessageLogFilterApply = new LLMessageLogFilterApply();
880 }
881}
882void LLFloaterMessageLog::stopApplyingFilter()
883{
884 if(mMessageLogFilterApply)
885 {
886 if(!(mMessageLogFilterApply->mFinished))
887 mMessageLogFilterApply->cancel();
888 //delete mMessageLogFilterApply;
889 sBusyApplyingFilter = FALSE;
890 //childSetVisible("log_status_text", false);
891 childSetVisible("message_log", true);
892 childSetText("log_status_text", llformat("Showing %d messages from %d", sFloaterMessageLogItems.size(), sMessageLogEntries.size()));
893 }
894}
895void LLFloaterMessageLog::updateFilterStatus()
896{
897 if(!mMessageLogFilterApply || !sBusyApplyingFilter) return;
898 S32 progress = mMessageLogFilterApply->mProgress;
899 S32 packets = sMessageLogEntries.size();
900 S32 matches = sFloaterMessageLogItems.size();
901 std::string text = llformat("Applying filter ( %d / %d ), %d matches ...", progress, packets, matches);
902 childSetText("log_status_text", text);
903}
904// static
905void LLFloaterMessageLog::onCommitFilter(LLUICtrl* ctrl, void* user_data)
906{
907 LLFloaterMessageLog* floaterp = (LLFloaterMessageLog*)user_data;
908 floaterp->startApplyingFilter(floaterp->childGetValue("filter_edit"), FALSE);
909}
910// static
911void LLFloaterMessageLog::onClickClearLog(void* user_data)
912{
913 LLFloaterMessageLog* floaterp = (LLFloaterMessageLog*)user_data;
914 floaterp->stopApplyingFilter();
915 floaterp->getChild<LLScrollListCtrl>("message_log")->clearRows();
916 floaterp->setNetInfoMode(NI_NET);
917 sMessageLogEntries.clear();
918 sFloaterMessageLogItems.clear();
919}
920// static
921void LLFloaterMessageLog::onClickFilterChoice(void* user_data)
922{
923 LLMenuGL* menu = new LLMenuGL(LLStringUtil::null);
924 menu->append(new LLMenuItemCallGL("No filter", onClickFilterMenu, NULL, (void*)""));
925 menu->append(new LLMenuItemCallGL("Fewer spammy messages", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket"));
926 menu->append(new LLMenuItemCallGL("Fewer spammy messages (minus sound crap)", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket !SoundTrigger !AttachedSound !PreloadSound"));
927 menu->append(new LLMenuItemCallGL("Object updates", onClickFilterMenu, NULL, (void*)"ObjectUpdateCached ObjectUpdate ObjectUpdateCompressed ImprovedTerseObjectUpdate KillObject RequestMultipleObjects"));
928 menu->append(new LLMenuItemCallGL("Abnormal", onClickFilterMenu, NULL, (void*)"Invalid TestMessage AddCircuitCode NeighborList AvatarTextureUpdate SimulatorMapUpdate SimulatorSetMap SubscribeLoad UnsubscribeLoad SimulatorReady SimulatorPresentAtLocation SimulatorLoad SimulatorShutdownRequest RegionPresenceRequestByRegionID RegionPresenceRequestByHandle RegionPresenceResponse UpdateSimulator LogDwellTime FeatureDisabled LogFailedMoneyTransaction UserReportInternal SetSimStatusInDatabase SetSimPresenceInDatabase OpenCircuit CloseCircuit DirFindQueryBackend DirPlacesQueryBackend DirClassifiedQueryBackend DirLandQueryBackend DirPopularQueryBackend GroupNoticeAdd DataHomeLocationRequest DataHomeLocationReply DerezContainer ObjectCategory ObjectExportSelected StateSave ReportAutosaveCrash AgentAlertMessage NearestLandingRegionRequest NearestLandingRegionReply NearestLandingRegionUpdated TeleportLandingStatusChanged ConfirmEnableSimulator KickUserAck SystemKickUser AvatarPropertiesRequestBackend UpdateParcel RemoveParcel MergeParcel LogParcelChanges CheckParcelSales ParcelSales StartAuction ConfirmAuctionStart CompleteAuction CancelAuction CheckParcelAuctions ParcelAuctions ChatPass EdgeDataPacket SimStatus ChildAgentUpdate ChildAgentAlive ChildAgentPositionUpdate ChildAgentDying ChildAgentUnknown AtomicPassObject KillChildAgents ScriptSensorRequest ScriptSensorReply DataServerLogout RequestInventoryAsset InventoryAssetResponse TransferInventory TransferInventoryAck EventLocationRequest EventLocationReply MoneyTransferBackend RoutedMoneyBalanceReply SetStartLocation NetTest SetCPURatio SimCrashed NameValuePair RemoveNameValuePair UpdateAttachment RemoveAttachment EmailMessageRequest EmailMessageReply InternalScriptMail ScriptDataRequest ScriptDataReply InviteGroupResponse TallyVotes LiveHelpGroupRequest LiveHelpGroupReply GroupDataUpdate LogTextMessage CreateTrustedCircuit ParcelRename SystemMessage RpcChannelRequest RpcChannelReply RpcScriptRequestInbound RpcScriptRequestInboundForward RpcScriptReplyInbound ScriptMailRegistration Error"));
929 menu->updateParent(LLMenuGL::sMenuContainer);
930 menu->setCanTearOff(FALSE);
931 LLView* buttonp = sInstance->getChild<LLView>("filter_choice_btn");
932 S32 x = buttonp->getRect().mLeft;
933 S32 y = buttonp->getRect().mBottom;
934 LLMenuGL::showPopup(sInstance, menu, x, y);
935}
936// static
937void LLFloaterMessageLog::onClickFilterMenu(void* user_data)
938{
939 std::string filter = std::string((char*)user_data);
940 sInstance->childSetText("filter_edit", filter);
941 sInstance->startApplyingFilter(filter, FALSE);
942}
943// static
944void LLFloaterMessageLog::onClickSendToMessageBuilder(void* user_data)
945{
946 LLFloaterMessageLog* floaterp = (LLFloaterMessageLog*)user_data;
947 LLScrollListCtrl* scrollp = floaterp->getChild<LLScrollListCtrl>("message_log");
948 LLScrollListItem* selected_itemp = scrollp->getFirstSelected();
949 if(!selected_itemp) return;
950 LLUUID id = selected_itemp->getUUID();
951 std::vector<LLFloaterMessageLogItem>::iterator end = sFloaterMessageLogItems.end();
952 for(std::vector<LLFloaterMessageLogItem>::iterator iter = sFloaterMessageLogItems.begin(); iter != end; ++iter)
953 {
954 if(iter->mID == id)
955 {
956 std::string message_text = iter->getFull(FALSE);
957 LLFloaterMessageBuilder::show(message_text);
958 break;
959 }
960 }
961}
962// </edit>
diff --git a/linden/indra/newview/llfloatermessagelog.h b/linden/indra/newview/llfloatermessagelog.h
new file mode 100644
index 0000000..ebc4f2a
--- /dev/null
+++ b/linden/indra/newview/llfloatermessagelog.h
@@ -0,0 +1,84 @@
1// <edit>
2#include "llfloater.h"
3#include "llmessagelog.h"
4#include "lltemplatemessagereader.h"
5#include "llfloatermessagebuilder.h"
6
7class LLFloaterMessageLogItem : public LLMessageLogEntry
8{
9public:
10 LLFloaterMessageLogItem(LLMessageLogEntry entry);
11 ~LLFloaterMessageLogItem();
12 LLUUID mID;
13 U32 mSequenceID;
14 std::string mName;
15 std::string mSummary;
16 U32 mFlags;
17 std::string getFull(BOOL show_header = TRUE);
18 BOOL isOutgoing();
19private:
20 static LLTemplateMessageReader* sTemplateMessageReader;
21 static std::string getString(LLTemplateMessageReader* readerp, const char* block_name, S32 block_num, const char* var_name, e_message_variable_type var_type, BOOL &returned_hex, BOOL summary_mode = FALSE);
22};
23class LLMessageLogFilter
24{
25public:
26 LLMessageLogFilter();
27 ~LLMessageLogFilter();
28 BOOL set(std::string filter);
29 std::list<std::string> mPositiveNames;
30 std::list<std::string> mNegativeNames;
31};
32class LLMessageLogFilterApply : public LLEventTimer
33{
34public:
35 LLMessageLogFilterApply();
36 void cancel();
37 BOOL tick();
38 S32 mProgress;
39 BOOL mFinished;
40private:
41 std::deque<LLMessageLogEntry> mQueuedMessages;
42 std::deque<LLMessageLogEntry>::iterator mIter;
43};
44class LLFloaterMessageLog : public LLFloater, public LLEventTimer
45{
46public:
47 LLFloaterMessageLog();
48 ~LLFloaterMessageLog();
49 static void show();
50 BOOL postBuild();
51 BOOL tick();
52 LLNetListItem* findNetListItem(LLHost host);
53 LLNetListItem* findNetListItem(LLUUID id);
54 void refreshNetList();
55 void refreshNetInfo(BOOL force);
56 enum ENetInfoMode { NI_NET, NI_LOG };
57 void setNetInfoMode(ENetInfoMode mode);
58 static void onLog(LLMessageLogEntry entry);
59 static void conditionalLog(LLFloaterMessageLogItem item);
60 static void onCommitNetList(LLUICtrl* ctrl, void* user_data);
61 static void onCommitMessageLog(LLUICtrl* ctrl, void* user_data);
62 static void onCommitFilter(LLUICtrl* ctrl, void* user_data);
63 static BOOL onClickCloseCircuit(void* user_data);
64 static bool onConfirmCloseCircuit(const LLSD& notification, const LLSD& response );
65 static bool onConfirmRemoveRegion(const LLSD& notification, const LLSD& response );
66 static void onClickFilterApply(void* user_data);
67 void startApplyingFilter(std::string filter, BOOL force);
68 void stopApplyingFilter();
69 void updateFilterStatus();
70 static BOOL sBusyApplyingFilter;
71 LLMessageLogFilterApply* mMessageLogFilterApply;
72 static void onClickClearLog(void* user_data);
73 static LLFloaterMessageLog* sInstance;
74 static std::list<LLNetListItem*> sNetListItems;
75 static std::deque<LLMessageLogEntry> sMessageLogEntries;
76 static std::vector<LLFloaterMessageLogItem> sFloaterMessageLogItems;
77 static LLMessageLogFilter sMessageLogFilter;
78 static std::string sMessageLogFilterString;
79 ENetInfoMode mNetInfoMode;
80 static void onClickFilterChoice(void* user_data);
81 static void onClickFilterMenu(void* user_data);
82 static void onClickSendToMessageBuilder(void* user_data);
83};
84// </edit>
diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp
index deee0f6..c7f1c38 100644
--- a/linden/indra/newview/llfloaterregioninfo.cpp
+++ b/linden/indra/newview/llfloaterregioninfo.cpp
@@ -1,3298 +1,3436 @@
1/** 1/**
2 * @file llfloaterregioninfo.cpp 2 * @file llfloaterregioninfo.cpp
3 * @author Aaron Brashears 3 * @author Aaron Brashears
4 * @brief Implementation of the region info and controls floater and panels. 4 * @brief Implementation of the region info and controls floater and panels.
5 * 5 *
6 * $LicenseInfo:firstyear=2004&license=viewergpl$ 6 * $LicenseInfo:firstyear=2004&license=viewergpl$
7 * 7 *
8 * Copyright (c) 2004-2009, Linden Research, Inc. 8 * Copyright (c) 2004-2009, Linden Research, Inc.
9 * 9 *
10 * Second Life Viewer Source Code 10 * Second Life Viewer Source Code
11 * The source code in this file ("Source Code") is provided by Linden Lab 11 * The source code in this file ("Source Code") is provided by Linden Lab
12 * to you under the terms of the GNU General Public License, version 2.0 12 * to you under the terms of the GNU General Public License, version 2.0
13 * ("GPL"), unless you have obtained a separate licensing agreement 13 * ("GPL"), unless you have obtained a separate licensing agreement
14 * ("Other License"), formally executed by you and Linden Lab. Terms of 14 * ("Other License"), formally executed by you and Linden Lab. Terms of
15 * the GPL can be found in doc/GPL-license.txt in this distribution, or 15 * the GPL can be found in doc/GPL-license.txt in this distribution, or
16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
17 * 17 *
18 * There are special exceptions to the terms and conditions of the GPL as 18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception 19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or 20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at 21 * online at
22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception 22 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 * 23 *
24 * By copying, modifying or distributing this software, you acknowledge 24 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above, 25 * that you have read and understood your obligations described above,
26 * and agree to abide by those obligations. 26 * and agree to abide by those obligations.
27 * 27 *
28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
30 * COMPLETENESS OR PERFORMANCE. 30 * COMPLETENESS OR PERFORMANCE.
31 * $/LicenseInfo$ 31 * $/LicenseInfo$
32 */ 32 */
33 33
34#include "llviewerprecompiledheaders.h" 34#include "llviewerprecompiledheaders.h"
35#include "llfloaterregioninfo.h" 35#include "llfloaterregioninfo.h"
36 36
37#include <algorithm> 37#include <algorithm>
38#include <functional> 38#include <functional>
39 39
40#include "llcachename.h" 40#include "llcachename.h"
41#include "lldir.h" 41#include "lldir.h"
42#include "lldispatcher.h" 42#include "lldispatcher.h"
43#include "llglheaders.h" 43#include "llglheaders.h"
44#include "llregionflags.h" 44#include "llregionflags.h"
45#include "llstl.h" 45#include "llstl.h"
46#include "indra_constants.h" 46#include "indra_constants.h"
47#include "message.h" 47#include "message.h"
48 48
49#include "llagent.h" 49#include "llagent.h"
50#include "llalertdialog.h" 50#include "llalertdialog.h"
51#include "llappviewer.h" 51#include "llappviewer.h"
52#include "llfloateravatarpicker.h" 52#include "llfloateravatarpicker.h"
53#include "llbutton.h" 53#include "llbutton.h"
54#include "llcheckboxctrl.h" 54#include "llcheckboxctrl.h"
55#include "llcombobox.h" 55#include "llcombobox.h"
56#include "llfilepicker.h" 56#include "llfilepicker.h"
57#include "llfloaterdaycycle.h" 57#include "llfloaterdaycycle.h"
58#include "llfloatergodtools.h" // for send_sim_wide_deletes() 58#include "llfloatergodtools.h" // for send_sim_wide_deletes()
59#include "llfloatertopobjects.h" // added to fix SL-32336 59#include "llfloatertopobjects.h" // added to fix SL-32336
60#include "llfloatergroups.h" 60#include "llfloatergroups.h"
61#include "llfloatertelehub.h" 61#include "llfloatertelehub.h"
62#include "llfloaterwindlight.h" 62#include "llfloaterwindlight.h"
63#include "llinventorymodel.h" 63#include "llinventorymodel.h"
64#include "lllineeditor.h" 64#include "lllineeditor.h"
65#include "llalertdialog.h" 65#include "llalertdialog.h"
66#include "llnamelistctrl.h" 66#include "llnamelistctrl.h"
67#include "llsliderctrl.h" 67#include "llsliderctrl.h"
68#include "llspinctrl.h" 68#include "llspinctrl.h"
69#include "lltabcontainer.h" 69#include "lltabcontainer.h"
70#include "lltextbox.h" 70#include "lltextbox.h"
71#include "llinventory.h" 71#include "llinventory.h"
72#include "lltexturectrl.h" 72#include "lltexturectrl.h"
73#include "lltrans.h" 73#include "lltrans.h"
74#include "llviewercontrol.h" 74#include "llviewercontrol.h"
75#include "lluictrlfactory.h" 75#include "lluictrlfactory.h"
76#include "llviewerimage.h" 76#include "llviewerimage.h"
77#include "llviewerimagelist.h" 77#include "llviewerimagelist.h"
78#include "llviewerregion.h" 78#include "llviewerregion.h"
79#include "llviewerstats.h" 79#include "llviewerstats.h"
80#include "llviewertexteditor.h" 80#include "llviewertexteditor.h"
81#include "llviewerwindow.h" 81#include "llviewerwindow.h"
82#include "llvlcomposition.h" 82#include "llvlcomposition.h"
83 83#include "hippoLimits.h"
84// [RLVa:KB] 84
85#include "rlvhandler.h" 85// [RLVa:KB]
86// [/RLVa:KB] 86#include "rlvhandler.h"
87 87// [/RLVa:KB]
88#define ELAR_ENABLED 0 // Enable when server support is implemented 88
89 89#define ELAR_ENABLED 0 // Enable when server support is implemented
90const S32 TERRAIN_TEXTURE_COUNT = 4; 90
91const S32 CORNER_COUNT = 4; 91const S32 TERRAIN_TEXTURE_COUNT = 4;
92 92const S32 CORNER_COUNT = 4;
93///---------------------------------------------------------------------------- 93
94/// Local class declaration 94///----------------------------------------------------------------------------
95///---------------------------------------------------------------------------- 95/// Local class declaration
96 96///----------------------------------------------------------------------------
97class LLDispatchEstateUpdateInfo : public LLDispatchHandler 97
98{ 98class LLDispatchEstateUpdateInfo : public LLDispatchHandler
99public: 99{
100 LLDispatchEstateUpdateInfo() {} 100public:
101 virtual ~LLDispatchEstateUpdateInfo() {} 101 LLDispatchEstateUpdateInfo() {}
102 virtual bool operator()( 102 virtual ~LLDispatchEstateUpdateInfo() {}
103 const LLDispatcher* dispatcher, 103 virtual bool operator()(
104 const std::string& key, 104 const LLDispatcher* dispatcher,
105 const LLUUID& invoice, 105 const std::string& key,
106 const sparam_t& strings); 106 const LLUUID& invoice,
107}; 107 const sparam_t& strings);
108 108};
109class LLDispatchSetEstateAccess : public LLDispatchHandler 109
110{ 110class LLDispatchSetEstateAccess : public LLDispatchHandler
111public: 111{
112 LLDispatchSetEstateAccess() {} 112public:
113 virtual ~LLDispatchSetEstateAccess() {} 113 LLDispatchSetEstateAccess() {}
114 virtual bool operator()( 114 virtual ~LLDispatchSetEstateAccess() {}
115 const LLDispatcher* dispatcher, 115 virtual bool operator()(
116 const std::string& key, 116 const LLDispatcher* dispatcher,
117 const LLUUID& invoice, 117 const std::string& key,
118 const sparam_t& strings); 118 const LLUUID& invoice,
119}; 119 const sparam_t& strings);
120 120};
121 121
122/* 122
123void unpack_request_params( 123/*
124 LLMessageSystem* msg, 124void unpack_request_params(
125 LLDispatcher::sparam_t& strings, 125 LLMessageSystem* msg,
126 LLDispatcher::iparam_t& integers) 126 LLDispatcher::sparam_t& strings,
127{ 127 LLDispatcher::iparam_t& integers)
128 char str_buf[MAX_STRING]; 128{
129 S32 str_count = msg->getNumberOfBlocksFast(_PREHASH_StringData); 129 char str_buf[MAX_STRING];
130 S32 i; 130 S32 str_count = msg->getNumberOfBlocksFast(_PREHASH_StringData);
131 for (i = 0; i < str_count; ++i) 131 S32 i;
132 { 132 for (i = 0; i < str_count; ++i)
133 // we treat the SParam as binary data (since it might be an 133 {
134 // LLUUID in compressed form which may have embedded \0's,) 134 // we treat the SParam as binary data (since it might be an
135 str_buf[0] = '\0'; 135 // LLUUID in compressed form which may have embedded \0's,)
136 S32 data_size = msg->getSizeFast(_PREHASH_StringData, i, _PREHASH_SParam); 136 str_buf[0] = '\0';
137 if (data_size >= 0) 137 S32 data_size = msg->getSizeFast(_PREHASH_StringData, i, _PREHASH_SParam);
138 { 138 if (data_size >= 0)
139 msg->getBinaryDataFast(_PREHASH_StringData, _PREHASH_SParam, 139 {
140 str_buf, data_size, i, MAX_STRING - 1); 140 msg->getBinaryDataFast(_PREHASH_StringData, _PREHASH_SParam,
141 strings.push_back(std::string(str_buf, data_size)); 141 str_buf, data_size, i, MAX_STRING - 1);
142 } 142 strings.push_back(std::string(str_buf, data_size));
143 } 143 }
144 144 }
145 U32 int_buf; 145
146 S32 int_count = msg->getNumberOfBlocksFast(_PREHASH_IntegerData); 146 U32 int_buf;
147 for (i = 0; i < int_count; ++i) 147 S32 int_count = msg->getNumberOfBlocksFast(_PREHASH_IntegerData);
148 { 148 for (i = 0; i < int_count; ++i)
149 msg->getU32("IntegerData", "IParam", int_buf, i); 149 {
150 integers.push_back(int_buf); 150 msg->getU32("IntegerData", "IParam", int_buf, i);
151 } 151 integers.push_back(int_buf);
152} 152 }
153*/ 153}
154 154*/
155 155
156 156
157bool estate_dispatch_initialized = false; 157
158 158bool estate_dispatch_initialized = false;
159 159
160///---------------------------------------------------------------------------- 160
161/// LLFloaterRegionInfo 161///----------------------------------------------------------------------------
162///---------------------------------------------------------------------------- 162/// LLFloaterRegionInfo
163 163///----------------------------------------------------------------------------
164//S32 LLFloaterRegionInfo::sRequestSerial = 0; 164
165LLUUID LLFloaterRegionInfo::sRequestInvoice; 165//S32 LLFloaterRegionInfo::sRequestSerial = 0;
166 166LLUUID LLFloaterRegionInfo::sRequestInvoice;
167LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) 167
168{ 168LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
169 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", NULL, FALSE); 169{
170} 170 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", NULL, FALSE);
171 171}
172BOOL LLFloaterRegionInfo::postBuild() 172
173{ 173BOOL LLFloaterRegionInfo::postBuild()
174 mTab = getChild<LLTabContainer>("region_panels"); 174{
175 175 mTab = getChild<LLTabContainer>("region_panels");
176 // contruct the panels 176
177 LLPanelRegionInfo* panel; 177 // contruct the panels
178 panel = new LLPanelRegionGeneralInfo; 178 LLPanelRegionInfo* panel;
179 mInfoPanels.push_back(panel); 179
180 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml"); 180 panel = new LLPanelRegionGeneralInfo;
181 mTab->addTabPanel(panel, panel->getLabel(), TRUE); 181 mInfoPanels.push_back(panel);
182 182 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml");
183 panel = new LLPanelRegionDebugInfo; 183 mTab->addTabPanel(panel, panel->getLabel(), TRUE);
184 mInfoPanels.push_back(panel); 184
185 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.xml"); 185 panel = new LLPanelRegionOpenSettingsInfo;
186 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 186 mInfoPanels.push_back(panel);
187 187 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_open_region_settings.xml");
188 panel = new LLPanelRegionTextureInfo; 188 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
189 mInfoPanels.push_back(panel); 189
190 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml"); 190 panel = new LLPanelRegionDebugInfo;
191 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 191 mInfoPanels.push_back(panel);
192 192 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.xml");
193 panel = new LLPanelRegionTerrainInfo; 193 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
194 mInfoPanels.push_back(panel); 194
195 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml"); 195 panel = new LLPanelRegionTextureInfo;
196 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 196 mInfoPanels.push_back(panel);
197 197 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml");
198 panel = new LLPanelEstateInfo; 198 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
199 mInfoPanels.push_back(panel); 199
200 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_estate.xml"); 200 panel = new LLPanelRegionTerrainInfo;
201 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 201 mInfoPanels.push_back(panel);
202 202 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml");
203 panel = new LLPanelEstateCovenant; 203 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
204 mInfoPanels.push_back(panel); 204
205 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_covenant.xml"); 205 panel = new LLPanelEstateInfo;
206 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 206 mInfoPanels.push_back(panel);
207 207 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_estate.xml");
208 gMessageSystem->setHandlerFunc( 208 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
209 "EstateOwnerMessage", 209
210 &processEstateOwnerRequest); 210 panel = new LLPanelEstateCovenant;
211 211 mInfoPanels.push_back(panel);
212 return TRUE; 212 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_covenant.xml");
213} 213 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
214 214
215LLFloaterRegionInfo::~LLFloaterRegionInfo() 215 gMessageSystem->setHandlerFunc(
216{ 216 "EstateOwnerMessage",
217} 217 &processEstateOwnerRequest);
218 218
219void LLFloaterRegionInfo::onOpen() 219 return TRUE;
220{ 220}
221 LLRect rect = gSavedSettings.getRect("FloaterRegionInfo"); 221
222 S32 left, top; 222LLFloaterRegionInfo::~LLFloaterRegionInfo()
223 gFloaterView->getNewFloaterPosition(&left, &top); 223{
224 rect.translate(left,top); 224}
225 225
226 refreshFromRegion(gAgent.getRegion()); 226void LLFloaterRegionInfo::onOpen()
227 requestRegionInfo(); 227{
228 LLFloater::onOpen(); 228 LLRect rect = gSavedSettings.getRect("FloaterRegionInfo");
229} 229 S32 left, top;
230 230 gFloaterView->getNewFloaterPosition(&left, &top);
231// static 231 rect.translate(left,top);
232void LLFloaterRegionInfo::requestRegionInfo() 232
233{ 233 refreshFromRegion(gAgent.getRegion());
234 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels"); 234 requestRegionInfo();
235 235 LLFloater::onOpen();
236 tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE); 236}
237 tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE); 237
238 tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE); 238// static
239 tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE); 239void LLFloaterRegionInfo::requestRegionInfo()
240 240{
241 // Must allow anyone to request the RegionInfo data 241 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
242 // so non-owners/non-gods can see the values. 242
243 // Therefore can't use an EstateOwnerMessage JC 243 tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
244 LLMessageSystem* msg = gMessageSystem; 244 tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
245 msg->newMessage("RequestRegionInfo"); 245 tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
246 msg->nextBlock("AgentData"); 246 tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
247 msg->addUUID("AgentID", gAgent.getID()); 247 tab->getChild<LLPanel>("RegionSettings")->setCtrlsEnabled(FALSE);
248 msg->addUUID("SessionID", gAgent.getSessionID()); 248
249 gAgent.sendReliableMessage(); 249 // Must allow anyone to request the RegionInfo data
250} 250 // so non-owners/non-gods can see the values.
251 251 // Therefore can't use an EstateOwnerMessage JC
252// static 252 LLMessageSystem* msg = gMessageSystem;
253void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) 253 msg->newMessage("RequestRegionInfo");
254{ 254 msg->nextBlock("AgentData");
255 static LLDispatcher dispatch; 255 msg->addUUID("AgentID", gAgent.getID());
256 if(!findInstance()) 256 msg->addUUID("SessionID", gAgent.getSessionID());
257 { 257 gAgent.sendReliableMessage();
258 return; 258}
259 } 259
260 260// static
261 if (!estate_dispatch_initialized) 261void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
262 { 262{
263 LLPanelEstateInfo::initDispatch(dispatch); 263 static LLDispatcher dispatch;
264 } 264 if(!findInstance())
265 265 {
266 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels"); 266 return;
267 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate"); 267 }
268 268
269 // unpack the message 269 if (!estate_dispatch_initialized)
270 std::string request; 270 {
271 LLUUID invoice; 271 LLPanelEstateInfo::initDispatch(dispatch);
272 LLDispatcher::sparam_t strings; 272 }
273 LLDispatcher::unpackMessage(msg, request, invoice, strings); 273
274 if(invoice != getLastInvoice()) 274 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
275 { 275 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
276 llwarns << "Mismatched Estate message: " << request << llendl; 276
277 return; 277 // unpack the message
278 } 278 std::string request;
279 279 LLUUID invoice;
280 //dispatch the message 280 LLDispatcher::sparam_t strings;
281 dispatch.dispatch(request, invoice, strings); 281 LLDispatcher::unpackMessage(msg, request, invoice, strings);
282 282 if(invoice != getLastInvoice())
283 LLViewerRegion* region = gAgent.getRegion(); 283 {
284 panel->updateControls(region); 284 llwarns << "Mismatched Estate message: " << request << llendl;
285} 285 return;
286 286 }
287 287
288// static 288 //dispatch the message
289void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) 289 dispatch.dispatch(request, invoice, strings);
290{ 290
291 LLPanel* panel; 291 LLViewerRegion* region = gAgent.getRegion();
292 292 panel->updateControls(region);
293 llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl; 293}
294 if(!findInstance()) 294
295 { 295
296 return; 296// static
297 } 297void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
298 298{
299 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels"); 299 LLPanel* panel;
300 300
301 LLViewerRegion* region = gAgent.getRegion(); 301 llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl;
302 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 302 if(!findInstance())
303 303 {
304 // extract message 304 return;
305 std::string sim_name; 305 }
306 std::string sim_type = LLTrans::getString("land_type_unknown"); 306
307 U32 region_flags; 307 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
308 U8 agent_limit; 308
309 F32 object_bonus_factor; 309 LLViewerRegion* region = gAgent.getRegion();
310 U8 sim_access; 310 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
311 F32 water_height; 311
312 F32 terrain_raise_limit; 312 // extract message
313 F32 terrain_lower_limit; 313 std::string sim_name;
314 BOOL use_estate_sun; 314 std::string sim_type = LLTrans::getString("land_type_unknown");
315 F32 sun_hour; 315 U32 region_flags;
316 msg->getString("RegionInfo", "SimName", sim_name); 316 U8 agent_limit;
317 msg->getU32("RegionInfo", "RegionFlags", region_flags); 317 F32 object_bonus_factor;
318 msg->getU8("RegionInfo", "MaxAgents", agent_limit); 318 U8 sim_access;
319 msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor); 319 F32 water_height;
320 msg->getU8("RegionInfo", "SimAccess", sim_access); 320 F32 terrain_raise_limit;
321 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height); 321 F32 terrain_lower_limit;
322 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit); 322 BOOL use_estate_sun;
323 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit); 323 F32 sun_hour;
324 msg->getBOOL("RegionInfo", "UseEstateSun", use_estate_sun); 324 msg->getString("RegionInfo", "SimName", sim_name);
325 // actually the "last set" sun hour, not the current sun hour. JC 325 msg->getU32("RegionInfo", "RegionFlags", region_flags);
326 msg->getF32("RegionInfo", "SunHour", sun_hour); 326 msg->getU8("RegionInfo", "MaxAgents", agent_limit);
327 // the only reasonable way to decide if we actually have any data is to 327 msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor);
328 // check to see if any of these fields have nonzero sizes 328 msg->getU8("RegionInfo", "SimAccess", sim_access);
329 if (msg->getSize("RegionInfo2", "ProductSKU") > 0 || 329 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height);
330 msg->getSize("RegionInfo2", "ProductName") > 0) 330 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit);
331 { 331 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit);
332 msg->getString("RegionInfo2", "ProductName", sim_type); 332 msg->getBOOL("RegionInfo", "UseEstateSun", use_estate_sun);
333 } 333 // actually the "last set" sun hour, not the current sun hour. JC
334 334 msg->getF32("RegionInfo", "SunHour", sun_hour);
335 // GENERAL PANEL 335 // the only reasonable way to decide if we actually have any data is to
336 panel = tab->getChild<LLPanel>("General"); 336 // check to see if any of these fields have nonzero sizes
337 panel->childSetValue("region_text", LLSD(sim_name)); 337 if (msg->getSize("RegionInfo2", "ProductSKU") > 0 ||
338 panel->childSetValue("region_type", LLSD(sim_type)); 338 msg->getSize("RegionInfo2", "ProductName") > 0)
339 panel->childSetValue("version_channel_text", gLastVersionChannel); 339 {
340 340 msg->getString("RegionInfo2", "ProductName", sim_type);
341 panel->childSetValue("block_terraform_check", (region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE ); 341 }
342 panel->childSetValue("block_fly_check", (region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE ); 342
343 panel->childSetValue("allow_damage_check", (region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE ); 343 // GENERAL PANEL
344 panel->childSetValue("restrict_pushobject", (region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE ); 344 panel = tab->getChild<LLPanel>("General");
345 panel->childSetValue("allow_land_resell_check", (region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE ); 345 panel->childSetValue("region_text", LLSD(sim_name));
346 panel->childSetValue("allow_parcel_changes_check", (region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE ); 346 panel->childSetValue("region_type", LLSD(sim_type));
347 panel->childSetValue("block_parcel_search_check", (region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE ); 347 panel->childSetValue("version_channel_text", gLastVersionChannel);
348 panel->childSetValue("agent_limit_spin", LLSD((F32)agent_limit) ); 348
349 panel->childSetValue("object_bonus_spin", LLSD(object_bonus_factor) ); 349 panel->childSetValue("block_terraform_check", (region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE );
350 panel->childSetValue("access_combo", LLSD(sim_access) ); 350 panel->childSetValue("block_fly_check", (region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE );
351 351 panel->childSetValue("allow_damage_check", (region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE );
352 352 panel->childSetValue("restrict_pushobject", (region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE );
353 // detect teen grid for maturity 353 panel->childSetValue("allow_land_resell_check", (region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE );
354 354 panel->childSetValue("allow_parcel_changes_check", (region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE );
355 U32 parent_estate_id; 355 panel->childSetValue("block_parcel_search_check", (region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE );
356 msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id); 356 panel->childSetValue("agent_limit_spin", LLSD((F32)agent_limit) );
357 BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that 357 panel->childSetValue("object_bonus_spin", LLSD(object_bonus_factor) );
358 panel->childSetEnabled("access_combo", gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); 358 panel->childSetValue("access_combo", LLSD(sim_access) );
359 panel->setCtrlsEnabled(allow_modify); 359
360 360
361 361 // detect teen grid for maturity
362 // DEBUG PANEL 362
363 panel = tab->getChild<LLPanel>("Debug"); 363 U32 parent_estate_id;
364 364 msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id);
365 panel->childSetValue("region_text", LLSD(sim_name) ); 365 BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that
366 panel->childSetValue("disable_scripts_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) ); 366 panel->childSetEnabled("access_combo", gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid));
367 panel->childSetValue("disable_collisions_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) ); 367 panel->setCtrlsEnabled(allow_modify);
368 panel->childSetValue("disable_physics_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) ); 368
369 panel->setCtrlsEnabled(allow_modify); 369 // RegionSettings PANEL
370 370 panel = tab->getChild<LLPanel>("RegionSettings");
371 // TERRAIN PANEL 371 panel->setCtrlsEnabled(allow_modify);
372 panel = tab->getChild<LLPanel>("Terrain"); 372
373 373 // DEBUG PANEL
374 panel->childSetValue("region_text", LLSD(sim_name)); 374 panel = tab->getChild<LLPanel>("Debug");
375 panel->childSetValue("water_height_spin", LLSD(water_height)); 375
376 panel->childSetValue("terrain_raise_spin", LLSD(terrain_raise_limit)); 376 panel->childSetValue("region_text", LLSD(sim_name) );
377 panel->childSetValue("terrain_lower_spin", LLSD(terrain_lower_limit)); 377 panel->childSetValue("disable_scripts_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) );
378 panel->childSetValue("use_estate_sun_check", LLSD(use_estate_sun)); 378 panel->childSetValue("disable_collisions_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) );
379 379 panel->childSetValue("disable_physics_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) );
380 panel->childSetValue("fixed_sun_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED))); 380 panel->setCtrlsEnabled(allow_modify);
381 panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun); 381
382 panel->childSetValue("sun_hour_slider", LLSD(sun_hour)); 382 // TERRAIN PANEL
383 panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun); 383 panel = tab->getChild<LLPanel>("Terrain");
384 panel->setCtrlsEnabled(allow_modify); 384
385 385 panel->childSetValue("region_text", LLSD(sim_name));
386 getInstance()->refreshFromRegion( gAgent.getRegion() ); 386 panel->childSetValue("water_height_spin", LLSD(water_height));
387} 387 panel->childSetValue("terrain_raise_spin", LLSD(terrain_raise_limit));
388 388 panel->childSetValue("terrain_lower_spin", LLSD(terrain_lower_limit));
389// static 389 panel->childSetValue("use_estate_sun_check", LLSD(use_estate_sun));
390LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate() 390
391{ 391 panel->childSetValue("fixed_sun_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED)));
392 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); 392 panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun);
393 if (!floater) return NULL; 393 panel->childSetValue("sun_hour_slider", LLSD(sun_hour));
394 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); 394 panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun);
395 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate"); 395 panel->setCtrlsEnabled(allow_modify);
396 return panel; 396
397} 397 getInstance()->refreshFromRegion( gAgent.getRegion() );
398 398}
399// static 399
400LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() 400// static
401{ 401LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate()
402 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); 402{
403 if (!floater) return NULL; 403 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
404 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); 404 if (!floater) return NULL;
405 LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)tab->getChild<LLPanel>("Covenant"); 405 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
406 return panel; 406 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
407} 407 return panel;
408 408}
409void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) 409
410{ 410// static
411 // call refresh from region on all panels 411LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant()
412 std::for_each( 412{
413 mInfoPanels.begin(), 413 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
414 mInfoPanels.end(), 414 if (!floater) return NULL;
415 llbind2nd( 415 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
416#if LL_WINDOWS 416 LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)tab->getChild<LLPanel>("Covenant");
417 std::mem_fun1(&LLPanelRegionInfo::refreshFromRegion), 417 return panel;
418#else 418}
419 std::mem_fun(&LLPanelRegionInfo::refreshFromRegion), 419
420#endif 420// static
421 region)); 421LLPanelRegionOpenSettingsInfo* LLFloaterRegionInfo::getPanelOpenSettings()
422} 422{
423 423 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
424// public 424 if (!floater) return NULL;
425void LLFloaterRegionInfo::refresh() 425 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
426{ 426 LLPanelRegionOpenSettingsInfo* panel;
427 for(info_panels_t::iterator iter = mInfoPanels.begin(); 427 panel = (LLPanelRegionOpenSettingsInfo*)tab->getChild<LLPanel>("RegionSettings");
428 iter != mInfoPanels.end(); ++iter) 428 return panel;
429 { 429}
430 (*iter)->refresh(); 430
431 } 431void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
432} 432{
433 433 // call refresh from region on all panels
434 434 std::for_each(
435///---------------------------------------------------------------------------- 435 mInfoPanels.begin(),
436/// Local class implementation 436 mInfoPanels.end(),
437///---------------------------------------------------------------------------- 437 llbind2nd(
438 438#if LL_WINDOWS
439// 439 std::mem_fun1(&LLPanelRegionInfo::refreshFromRegion),
440// LLPanelRegionInfo 440#else
441// 441 std::mem_fun(&LLPanelRegionInfo::refreshFromRegion),
442 442#endif
443// static 443 region));
444void LLPanelRegionInfo::onBtnSet(void* user_data) 444}
445{ 445
446 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data; 446// public
447 if(!panel) return; 447void LLFloaterRegionInfo::refresh()
448 if (panel->sendUpdate()) 448{
449 { 449 for(info_panels_t::iterator iter = mInfoPanels.begin();
450 panel->disableButton("apply_btn"); 450 iter != mInfoPanels.end(); ++iter)
451 } 451 {
452} 452 (*iter)->refresh();
453 453 }
454//static 454}
455void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl, void* user_data) 455
456{ 456
457 if (ctrl) 457///----------------------------------------------------------------------------
458 { 458/// Local class implementation
459 LLPanelRegionInfo* panel = (LLPanelRegionInfo*) ctrl->getParent(); 459///----------------------------------------------------------------------------
460 panel->updateChild(ctrl); 460
461 } 461//
462} 462// LLPanelRegionInfo
463 463//
464// static 464
465// Enables the "set" button if it is not already enabled 465// static
466void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data) 466void LLPanelRegionInfo::onBtnSet(void* user_data)
467{ 467{
468 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data; 468 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data;
469 if(panel) 469 if(!panel) return;
470 { 470 if (panel->sendUpdate())
471 panel->enableButton("apply_btn"); 471 {
472 panel->refresh(); 472 panel->disableButton("apply_btn");
473 } 473 }
474} 474}
475 475
476// static 476//static
477// Enables set button on change to line editor 477void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl, void* user_data)
478void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) 478{
479{ 479 if (ctrl)
480 // reuse the previous method 480 {
481 onChangeAnything(0, user_data); 481 LLPanelRegionInfo* panel = (LLPanelRegionInfo*) ctrl->getParent();
482} 482 panel->updateChild(ctrl);
483 483 }
484 484}
485// virtual 485
486BOOL LLPanelRegionInfo::postBuild() 486// static
487{ 487// Enables the "set" button if it is not already enabled
488 childSetAction("apply_btn", onBtnSet, this); 488void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data)
489 childDisable("apply_btn"); 489{
490 refresh(); 490 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data;
491 return TRUE; 491 if(panel)
492} 492 {
493 493 panel->enableButton("apply_btn");
494// virtual 494 panel->refresh();
495void LLPanelRegionInfo::updateChild(LLUICtrl* child_ctr) 495 }
496{ 496}
497} 497
498 498// static
499// virtual 499// Enables set button on change to line editor
500bool LLPanelRegionInfo::refreshFromRegion(LLViewerRegion* region) 500void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data)
501{ 501{
502 if (region) mHost = region->getHost(); 502 // reuse the previous method
503 return true; 503 onChangeAnything(0, user_data);
504} 504}
505 505
506void LLPanelRegionInfo::sendEstateOwnerMessage( 506
507 LLMessageSystem* msg, 507// virtual
508 const std::string& request, 508BOOL LLPanelRegionInfo::postBuild()
509 const LLUUID& invoice, 509{
510 const strings_t& strings) 510 childSetAction("apply_btn", onBtnSet, this);
511{ 511 childDisable("apply_btn");
512 llinfos << "Sending estate request '" << request << "'" << llendl; 512 refresh();
513 msg->newMessage("EstateOwnerMessage"); 513 return TRUE;
514 msg->nextBlockFast(_PREHASH_AgentData); 514}
515 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 515
516 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 516// virtual
517 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 517void LLPanelRegionInfo::updateChild(LLUICtrl* child_ctr)
518 msg->nextBlock("MethodData"); 518{
519 msg->addString("Method", request); 519}
520 msg->addUUID("Invoice", invoice); 520
521 if(strings.empty()) 521// virtual
522 { 522bool LLPanelRegionInfo::refreshFromRegion(LLViewerRegion* region)
523 msg->nextBlock("ParamList"); 523{
524 msg->addString("Parameter", NULL); 524 if (region) mHost = region->getHost();
525 } 525 return true;
526 else 526}
527 { 527
528 strings_t::const_iterator it = strings.begin(); 528void LLPanelRegionInfo::sendEstateOwnerMessage(
529 strings_t::const_iterator end = strings.end(); 529 LLMessageSystem* msg,
530 for(; it != end; ++it) 530 const std::string& request,
531 { 531 const LLUUID& invoice,
532 msg->nextBlock("ParamList"); 532 const strings_t& strings)
533 msg->addString("Parameter", *it); 533{
534 } 534 llinfos << "Sending estate request '" << request << "'" << llendl;
535 } 535 msg->newMessage("EstateOwnerMessage");
536 msg->sendReliable(mHost); 536 msg->nextBlockFast(_PREHASH_AgentData);
537} 537 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
538 538 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
539void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) 539 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
540{ 540 msg->nextBlock("MethodData");
541 childSetEnabled(btn_name, enable); 541 msg->addString("Method", request);
542} 542 msg->addUUID("Invoice", invoice);
543 543 if(strings.empty())
544void LLPanelRegionInfo::disableButton(const std::string& btn_name) 544 {
545{ 545 msg->nextBlock("ParamList");
546 childDisable(btn_name); 546 msg->addString("Parameter", NULL);
547} 547 }
548 548 else
549void LLPanelRegionInfo::initCtrl(const std::string& name) 549 {
550{ 550 strings_t::const_iterator it = strings.begin();
551 childSetCommitCallback(name, onChangeAnything, this); 551 strings_t::const_iterator end = strings.end();
552} 552 for(; it != end; ++it)
553 553 {
554void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert) 554 msg->nextBlock("ParamList");
555{ 555 msg->addString("Parameter", *it);
556 childSetAction(name, onClickHelp, new std::string(xml_alert)); 556 }
557} 557 }
558 558 msg->sendReliable(mHost);
559// static 559}
560void LLPanelRegionInfo::onClickHelp(void* data) 560
561{ 561void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable)
562 std::string* xml_alert = (std::string*)data; 562{
563 LLNotifications::instance().add(*xml_alert); 563 childSetEnabled(btn_name, enable);
564} 564}
565 565
566///////////////////////////////////////////////////////////////////////////// 566void LLPanelRegionInfo::disableButton(const std::string& btn_name)
567// LLPanelRegionGeneralInfo 567{
568// 568 childDisable(btn_name);
569bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) 569}
570{ 570
571 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 571void LLPanelRegionInfo::initCtrl(const std::string& name)
572 setCtrlsEnabled(allow_modify); 572{
573 childDisable("apply_btn"); 573 childSetCommitCallback(name, onChangeAnything, this);
574 childSetEnabled("access_text", allow_modify); 574}
575 // childSetEnabled("access_combo", allow_modify); 575
576 // now set in processRegionInfo for teen grid detection 576void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert)
577 childSetEnabled("kick_btn", allow_modify); 577{
578 childSetEnabled("kick_all_btn", allow_modify); 578 childSetAction(name, onClickHelp, new std::string(xml_alert));
579 childSetEnabled("im_btn", allow_modify); 579}
580 childSetEnabled("manage_telehub_btn", allow_modify); 580
581 581// static
582 // Data gets filled in by processRegionInfo 582void LLPanelRegionInfo::onClickHelp(void* data)
583 583{
584 return LLPanelRegionInfo::refreshFromRegion(region); 584 std::string* xml_alert = (std::string*)data;
585} 585 LLNotifications::instance().add(*xml_alert);
586 586}
587BOOL LLPanelRegionGeneralInfo::postBuild() 587
588{ 588/////////////////////////////////////////////////////////////////////////////
589 // Enable the "Apply" button if something is changed. JC 589// LLPanelRegionGeneralInfo
590 initCtrl("block_terraform_check"); 590//
591 initCtrl("block_fly_check"); 591bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
592 initCtrl("allow_damage_check"); 592{
593 initCtrl("allow_land_resell_check"); 593 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
594 initCtrl("allow_parcel_changes_check"); 594 setCtrlsEnabled(allow_modify);
595 initCtrl("agent_limit_spin"); 595 childDisable("apply_btn");
596 initCtrl("object_bonus_spin"); 596 childSetEnabled("access_text", allow_modify);
597 initCtrl("access_combo"); 597 // childSetEnabled("access_combo", allow_modify);
598 initCtrl("restrict_pushobject"); 598 // now set in processRegionInfo for teen grid detection
599 initCtrl("block_parcel_search_check"); 599 childSetEnabled("kick_btn", allow_modify);
600 600 childSetEnabled("kick_all_btn", allow_modify);
601 initHelpBtn("terraform_help", "HelpRegionBlockTerraform"); 601 childSetEnabled("im_btn", allow_modify);
602 initHelpBtn("fly_help", "HelpRegionBlockFly"); 602 childSetEnabled("manage_telehub_btn", allow_modify);
603 initHelpBtn("damage_help", "HelpRegionAllowDamage"); 603
604 initHelpBtn("agent_limit_help", "HelpRegionAgentLimit"); 604 // Data gets filled in by processRegionInfo
605 initHelpBtn("object_bonus_help", "HelpRegionObjectBonus"); 605
606 initHelpBtn("access_help", "HelpRegionMaturity"); 606 return LLPanelRegionInfo::refreshFromRegion(region);
607 initHelpBtn("restrict_pushobject_help", "HelpRegionRestrictPushObject"); 607}
608 initHelpBtn("land_resell_help", "HelpRegionLandResell"); 608
609 initHelpBtn("parcel_changes_help", "HelpParcelChanges"); 609BOOL LLPanelRegionGeneralInfo::postBuild()
610 initHelpBtn("parcel_search_help", "HelpRegionSearch"); 610{
611 611 // Enable the "Apply" button if something is changed. JC
612 childSetAction("kick_btn", onClickKick, this); 612 initCtrl("block_terraform_check");
613 childSetAction("kick_all_btn", onClickKickAll, this); 613 initCtrl("block_fly_check");
614 childSetAction("im_btn", onClickMessage, this); 614 initCtrl("allow_damage_check");
615 childSetAction("manage_telehub_btn", onClickManageTelehub, this); 615 initCtrl("allow_land_resell_check");
616 616 initCtrl("allow_parcel_changes_check");
617 return LLPanelRegionInfo::postBuild(); 617 initCtrl("agent_limit_spin");
618} 618 initCtrl("object_bonus_spin");
619 619 initCtrl("access_combo");
620// static 620 initCtrl("restrict_pushobject");
621void LLPanelRegionGeneralInfo::onClickKick(void* userdata) 621 initCtrl("block_parcel_search_check");
622{ 622 initCtrl("minimum_agent_age");
623 llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl; 623
624 LLPanelRegionGeneralInfo* panelp = (LLPanelRegionGeneralInfo*)userdata; 624 initHelpBtn("terraform_help", "HelpRegionBlockTerraform");
625 625 initHelpBtn("fly_help", "HelpRegionBlockFly");
626 // this depends on the grandparent view being a floater 626 initHelpBtn("damage_help", "HelpRegionAllowDamage");
627 // in order to set up floater dependency 627 initHelpBtn("agent_limit_help", "HelpRegionAgentLimit");
628 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); 628 initHelpBtn("object_bonus_help", "HelpRegionObjectBonus");
629 LLFloater* child_floater = LLFloaterAvatarPicker::show(onKickCommit, userdata, FALSE, TRUE); 629 initHelpBtn("access_help", "HelpRegionMaturity");
630 parent_floater->addDependentFloater(child_floater); 630 initHelpBtn("restrict_pushobject_help", "HelpRegionRestrictPushObject");
631} 631 initHelpBtn("land_resell_help", "HelpRegionLandResell");
632 632 initHelpBtn("parcel_changes_help", "HelpParcelChanges");
633// static 633 initHelpBtn("parcel_search_help", "HelpRegionSearch");
634void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata) 634
635{ 635 childSetAction("kick_btn", onClickKick, this);
636 if (names.empty() || ids.empty()) return; 636 childSetAction("kick_all_btn", onClickKickAll, this);
637 if(ids[0].notNull()) 637 childSetAction("im_btn", onClickMessage, this);
638 { 638 childSetAction("manage_telehub_btn", onClickManageTelehub, this);
639 LLPanelRegionGeneralInfo* self = (LLPanelRegionGeneralInfo*)userdata; 639
640 if(!self) return; 640 return LLPanelRegionInfo::postBuild();
641 strings_t strings; 641}
642 // [0] = our agent id 642
643 // [1] = target agent id 643// static
644 std::string buffer; 644void LLPanelRegionGeneralInfo::onClickKick(void* userdata)
645 gAgent.getID().toString(buffer); 645{
646 strings.push_back(buffer); 646 llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl;
647 647 LLPanelRegionGeneralInfo* panelp = (LLPanelRegionGeneralInfo*)userdata;
648 ids[0].toString(buffer); 648
649 strings.push_back(strings_t::value_type(buffer)); 649 // this depends on the grandparent view being a floater
650 650 // in order to set up floater dependency
651 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 651 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
652 self->sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", invoice, strings); 652 LLFloater* child_floater = LLFloaterAvatarPicker::show(onKickCommit, userdata, FALSE, TRUE);
653 } 653 parent_floater->addDependentFloater(child_floater);
654} 654}
655 655
656// static 656// static
657void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata) 657void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata)
658{ 658{
659 llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl; 659 if (names.empty() || ids.empty()) return;
660 LLNotifications::instance().add("KickUsersFromRegion", 660 if(ids[0].notNull())
661 LLSD(), 661 {
662 LLSD(), 662 LLPanelRegionGeneralInfo* self = (LLPanelRegionGeneralInfo*)userdata;
663 boost::bind(&LLPanelRegionGeneralInfo::onKickAllCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2)); 663 if(!self) return;
664} 664 strings_t strings;
665 665 // [0] = our agent id
666bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const LLSD& response) 666 // [1] = target agent id
667{ 667 std::string buffer;
668 S32 option = LLNotification::getSelectedOption(notification, response); 668 gAgent.getID().toString(buffer);
669 if (option == 0) 669 strings.push_back(buffer);
670 { 670
671 strings_t strings; 671 ids[0].toString(buffer);
672 // [0] = our agent id 672 strings.push_back(strings_t::value_type(buffer));
673 std::string buffer; 673
674 gAgent.getID().toString(buffer); 674 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
675 strings.push_back(buffer); 675 self->sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", invoice, strings);
676 676 }
677 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 677}
678 // historical message name 678
679 sendEstateOwnerMessage(gMessageSystem, "teleporthomeallusers", invoice, strings); 679// static
680 } 680void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata)
681 return false; 681{
682} 682 llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl;
683 683 LLNotifications::instance().add("KickUsersFromRegion",
684// static 684 LLSD(),
685void LLPanelRegionGeneralInfo::onClickMessage(void* userdata) 685 LLSD(),
686{ 686 boost::bind(&LLPanelRegionGeneralInfo::onKickAllCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
687 llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl; 687}
688 LLNotifications::instance().add("MessageRegion", 688
689 LLSD(), 689bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const LLSD& response)
690 LLSD(), 690{
691 boost::bind(&LLPanelRegionGeneralInfo::onMessageCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2)); 691 S32 option = LLNotification::getSelectedOption(notification, response);
692} 692 if (option == 0)
693 693 {
694// static 694 strings_t strings;
695bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const LLSD& response) 695 // [0] = our agent id
696{ 696 std::string buffer;
697 if(LLNotification::getSelectedOption(notification, response) != 0) return false; 697 gAgent.getID().toString(buffer);
698 698 strings.push_back(buffer);
699 std::string text = response["message"].asString(); 699
700 if (text.empty()) return false; 700 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
701 701 // historical message name
702 llinfos << "Message to everyone: " << text << llendl; 702 sendEstateOwnerMessage(gMessageSystem, "teleporthomeallusers", invoice, strings);
703 strings_t strings; 703 }
704 // [0] grid_x, unused here 704 return false;
705 // [1] grid_y, unused here 705}
706 // [2] agent_id of sender 706
707 // [3] sender name 707// static
708 // [4] message 708void LLPanelRegionGeneralInfo::onClickMessage(void* userdata)
709 strings.push_back("-1"); 709{
710 strings.push_back("-1"); 710 llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl;
711 std::string buffer; 711 LLNotifications::instance().add("MessageRegion",
712 gAgent.getID().toString(buffer); 712 LLSD(),
713 strings.push_back(buffer); 713 LLSD(),
714 std::string name; 714 boost::bind(&LLPanelRegionGeneralInfo::onMessageCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
715 gAgent.buildFullname(name); 715}
716 strings.push_back(strings_t::value_type(name)); 716
717 strings.push_back(strings_t::value_type(text)); 717// static
718 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 718bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
719 sendEstateOwnerMessage(gMessageSystem, "simulatormessage", invoice, strings); 719{
720 return false; 720 if(LLNotification::getSelectedOption(notification, response) != 0) return false;
721} 721
722 722 std::string text = response["message"].asString();
723// static 723 if (text.empty()) return false;
724void LLPanelRegionGeneralInfo::onClickManageTelehub(void* data) 724
725{ 725 llinfos << "Message to everyone: " << text << llendl;
726 LLFloaterRegionInfo::getInstance()->close(); 726 strings_t strings;
727 727 // [0] grid_x, unused here
728 LLFloaterTelehub::show(); 728 // [1] grid_y, unused here
729} 729 // [2] agent_id of sender
730 730 // [3] sender name
731// setregioninfo 731 // [4] message
732// strings[0] = 'Y' - block terraform, 'N' - not 732 strings.push_back("-1");
733// strings[1] = 'Y' - block fly, 'N' - not 733 strings.push_back("-1");
734// strings[2] = 'Y' - allow damage, 'N' - not 734 std::string buffer;
735// strings[3] = 'Y' - allow land sale, 'N' - not 735 gAgent.getID().toString(buffer);
736// strings[4] = agent limit 736 strings.push_back(buffer);
737// strings[5] = object bonus 737 std::string name;
738// strings[6] = sim access (0 = unknown, 13 = PG, 21 = Mature, 42 = Adult) 738 gAgent.buildFullname(name);
739// strings[7] = restrict pushobject 739 strings.push_back(strings_t::value_type(name));
740// strings[8] = 'Y' - allow parcel subdivide, 'N' - not 740 strings.push_back(strings_t::value_type(text));
741// strings[9] = 'Y' - block parcel search, 'N' - allow 741 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
742BOOL LLPanelRegionGeneralInfo::sendUpdate() 742 sendEstateOwnerMessage(gMessageSystem, "simulatormessage", invoice, strings);
743{ 743 return false;
744 llinfos << "LLPanelRegionGeneralInfo::sendUpdate()" << llendl; 744}
745 745
746 // First try using a Cap. If that fails use the old method. 746// static
747 LLSD body; 747void LLPanelRegionGeneralInfo::onClickManageTelehub(void* data)
748 std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo"); 748{
749 if (!url.empty()) 749 LLFloaterRegionInfo::getInstance()->close();
750 { 750
751 body["block_terraform"] = childGetValue("block_terraform_check"); 751 LLFloaterTelehub::show();
752 body["block_fly"] = childGetValue("block_fly_check"); 752}
753 body["allow_damage"] = childGetValue("allow_damage_check"); 753
754 body["allow_land_resell"] = childGetValue("allow_land_resell_check"); 754// setregioninfo
755 body["agent_limit"] = childGetValue("agent_limit_spin"); 755// strings[0] = 'Y' - block terraform, 'N' - not
756 body["prim_bonus"] = childGetValue("object_bonus_spin"); 756// strings[1] = 'Y' - block fly, 'N' - not
757 body["sim_access"] = childGetValue("access_combo"); 757// strings[2] = 'Y' - allow damage, 'N' - not
758 body["restrict_pushobject"] = childGetValue("restrict_pushobject"); 758// strings[3] = 'Y' - allow land sale, 'N' - not
759 body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check"); 759// strings[4] = agent limit
760 body["block_parcel_search"] = childGetValue("block_parcel_search_check"); 760// strings[5] = object bonus
761 761// strings[6] = sim access (0 = unknown, 13 = PG, 21 = Mature, 42 = Adult)
762 LLHTTPClient::post(url, body, new LLHTTPClient::Responder()); 762// strings[7] = restrict pushobject
763 } 763// strings[8] = 'Y' - allow parcel subdivide, 'N' - not
764 else 764// strings[9] = 'Y' - block parcel search, 'N' - allow
765 { 765BOOL LLPanelRegionGeneralInfo::sendUpdate()
766 strings_t strings; 766{
767 std::string buffer; 767 llinfos << "LLPanelRegionGeneralInfo::sendUpdate()" << llendl;
768 768
769 buffer = llformat("%s", (childGetValue("block_terraform_check").asBoolean() ? "Y" : "N")); 769 // First try using a Cap. If that fails use the old method.
770 strings.push_back(strings_t::value_type(buffer)); 770 LLSD body;
771 771 std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo");
772 buffer = llformat("%s", (childGetValue("block_fly_check").asBoolean() ? "Y" : "N")); 772 if (!url.empty())
773 strings.push_back(strings_t::value_type(buffer)); 773 {
774 774 body["block_terraform"] = childGetValue("block_terraform_check");
775 buffer = llformat("%s", (childGetValue("allow_damage_check").asBoolean() ? "Y" : "N")); 775 body["block_fly"] = childGetValue("block_fly_check");
776 strings.push_back(strings_t::value_type(buffer)); 776 body["allow_damage"] = childGetValue("allow_damage_check");
777 777 body["allow_land_resell"] = childGetValue("allow_land_resell_check");
778 buffer = llformat("%s", (childGetValue("allow_land_resell_check").asBoolean() ? "Y" : "N")); 778 body["agent_limit"] = childGetValue("agent_limit_spin");
779 strings.push_back(strings_t::value_type(buffer)); 779 body["prim_bonus"] = childGetValue("object_bonus_spin");
780 780 body["sim_access"] = childGetValue("access_combo");
781 F32 value = (F32)childGetValue("agent_limit_spin").asReal(); 781 body["restrict_pushobject"] = childGetValue("restrict_pushobject");
782 buffer = llformat("%f", value); 782 body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check");
783 strings.push_back(strings_t::value_type(buffer)); 783 body["block_parcel_search"] = childGetValue("block_parcel_search_check");
784 784 body["minimum_agent_age"] = childGetValue("minimum_agent_age");
785 value = (F32)childGetValue("object_bonus_spin").asReal(); 785
786 buffer = llformat("%f", value); 786 LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
787 strings.push_back(strings_t::value_type(buffer)); 787 }
788 788 else
789 buffer = llformat("%d", childGetValue("access_combo").asInteger()); 789 {
790 strings.push_back(strings_t::value_type(buffer)); 790 strings_t strings;
791 791 std::string buffer;
792 buffer = llformat("%s", (childGetValue("restrict_pushobject").asBoolean() ? "Y" : "N")); 792
793 strings.push_back(strings_t::value_type(buffer)); 793 buffer = llformat("%s", (childGetValue("block_terraform_check").asBoolean() ? "Y" : "N"));
794 794 strings.push_back(strings_t::value_type(buffer));
795 buffer = llformat("%s", (childGetValue("allow_parcel_changes_check").asBoolean() ? "Y" : "N")); 795
796 strings.push_back(strings_t::value_type(buffer)); 796 buffer = llformat("%s", (childGetValue("block_fly_check").asBoolean() ? "Y" : "N"));
797 797 strings.push_back(strings_t::value_type(buffer));
798 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 798
799 sendEstateOwnerMessage(gMessageSystem, "setregioninfo", invoice, strings); 799 buffer = llformat("%s", (childGetValue("allow_damage_check").asBoolean() ? "Y" : "N"));
800 } 800 strings.push_back(strings_t::value_type(buffer));
801 801
802 // if we changed access levels, tell user about it 802 buffer = llformat("%s", (childGetValue("allow_land_resell_check").asBoolean() ? "Y" : "N"));
803 LLViewerRegion* region = gAgent.getRegion(); 803 strings.push_back(strings_t::value_type(buffer));
804 if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) ) 804
805 { 805 F32 value = (F32)childGetValue("agent_limit_spin").asReal();
806 LLNotifications::instance().add("RegionMaturityChange"); 806 buffer = llformat("%f", value);
807 } 807 strings.push_back(strings_t::value_type(buffer));
808 808
809 return TRUE; 809 value = (F32)childGetValue("object_bonus_spin").asReal();
810} 810 buffer = llformat("%f", value);
811 811 strings.push_back(strings_t::value_type(buffer));
812///////////////////////////////////////////////////////////////////////////// 812
813// LLPanelRegionDebugInfo 813 buffer = llformat("%d", childGetValue("access_combo").asInteger());
814///////////////////////////////////////////////////////////////////////////// 814 strings.push_back(strings_t::value_type(buffer));
815BOOL LLPanelRegionDebugInfo::postBuild() 815
816{ 816 buffer = llformat("%s", (childGetValue("restrict_pushobject").asBoolean() ? "Y" : "N"));
817 LLPanelRegionInfo::postBuild(); 817 strings.push_back(strings_t::value_type(buffer));
818 initCtrl("disable_scripts_check"); 818
819 initCtrl("disable_collisions_check"); 819 buffer = llformat("%s", (childGetValue("allow_parcel_changes_check").asBoolean() ? "Y" : "N"));
820 initCtrl("disable_physics_check"); 820 strings.push_back(strings_t::value_type(buffer));
821 821
822 initHelpBtn("disable_scripts_help", "HelpRegionDisableScripts"); 822 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
823 initHelpBtn("disable_collisions_help", "HelpRegionDisableCollisions"); 823 sendEstateOwnerMessage(gMessageSystem, "setregioninfo", invoice, strings);
824 initHelpBtn("disable_physics_help", "HelpRegionDisablePhysics"); 824 }
825 initHelpBtn("top_colliders_help", "HelpRegionTopColliders"); 825
826 initHelpBtn("top_scripts_help", "HelpRegionTopScripts"); 826 // if we changed access levels, tell user about it
827 initHelpBtn("restart_help", "HelpRegionRestart"); 827 LLViewerRegion* region = gAgent.getRegion();
828 828 if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) )
829 childSetAction("choose_avatar_btn", onClickChooseAvatar, this); 829 {
830 childSetAction("return_btn", onClickReturn, this); 830 LLNotifications::instance().add("RegionMaturityChange");
831 childSetAction("top_colliders_btn", onClickTopColliders, this); 831 }
832 childSetAction("top_scripts_btn", onClickTopScripts, this); 832
833 childSetAction("restart_btn", onClickRestart, this); 833 return TRUE;
834 childSetAction("cancel_restart_btn", onClickCancelRestart, this); 834}
835 835
836 return TRUE; 836/////////////////////////////////////////////////////////////////////////////
837} 837// LLPanelRegionOpenSettingsInfo
838 838//
839// virtual 839bool LLPanelRegionOpenSettingsInfo::refreshFromRegion(LLViewerRegion* region)
840bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) 840{
841{ 841 // Data gets filled in by hippo manager
842 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 842 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
843 setCtrlsEnabled(allow_modify); 843
844 childDisable("apply_btn"); 844 childSetValue("draw_distance", gAgent.mDrawDistance);
845 childDisable("target_avatar_name"); 845 childSetValue("force_draw_distance", gAgent.mLockedDrawDistance);
846 846 childSetValue("allow_minimap", LLSD(gHippoLimits->mAllowMinimap));
847 childSetEnabled("choose_avatar_btn", allow_modify); 847 childSetValue("allow_physical_prims", (gHippoLimits->mAllowPhysicalPrims == 1 ? TRUE : FALSE));
848 childSetEnabled("return_scripts", allow_modify && !mTargetAvatar.isNull()); 848 childSetValue("max_drag_distance", LLSD(gHippoLimits->mMaxDragDistance));
849 childSetEnabled("return_other_land", allow_modify && !mTargetAvatar.isNull()); 849 childSetValue("min_hole_size", LLSD(gHippoLimits->mMinHoleSize));
850 childSetEnabled("return_estate_wide", allow_modify && !mTargetAvatar.isNull()); 850 childSetValue("max_hollow_size", LLSD(gHippoLimits->mMaxHollow));
851 childSetEnabled("return_btn", allow_modify && !mTargetAvatar.isNull()); 851 childSetValue("max_inventory_items_transfer", LLSD(gHippoLimits->mMaxInventoryItemsTransfer));
852 childSetEnabled("top_colliders_btn", allow_modify); 852 childSetValue("max_link_count", LLSD(gHippoLimits->mMaxLinkedPrims));
853 childSetEnabled("top_scripts_btn", allow_modify); 853 childSetValue("max_link_count_phys", LLSD(gHippoLimits->mMaxPhysLinkedPrims));
854 childSetEnabled("restart_btn", allow_modify); 854 childSetValue("max_phys_prim_scale", LLSD(gHippoLimits->mMaxPrimScale));//Todo:Fix
855 childSetEnabled("cancel_restart_btn", allow_modify); 855 childSetValue("max_prim_scale", LLSD(gHippoLimits->mMaxPrimScale));
856 856 childSetValue("min_prim_scale", LLSD(gHippoLimits->mMinPrimScale));
857 return LLPanelRegionInfo::refreshFromRegion(region); 857 childSetValue("render_water", LLSD(gHippoLimits->mRenderWater));
858} 858 childSetValue("show_tags", LLSD(gHippoLimits->mRenderName));
859 859 childSetValue("max_groups", LLSD(gHippoLimits->mMaxAgentGroups));
860// virtual 860 childSetValue("allow_parcel_windlight", LLSD(gHippoLimits->mAllowParcelWindLight));
861BOOL LLPanelRegionDebugInfo::sendUpdate() 861 childSetValue("enable_teen_mode", LLSD(gHippoLimits->mEnableTeenMode));
862{ 862 childSetValue("enforce_max_build", LLSD(gHippoLimits->mEnforceMaxBuild));
863 llinfos << "LLPanelRegionDebugInfo::sendUpdate" << llendl; 863
864 strings_t strings; 864 setCtrlsEnabled(allow_modify);
865 std::string buffer; 865
866 866 return LLPanelRegionInfo::refreshFromRegion(region);
867 buffer = llformat("%s", (childGetValue("disable_scripts_check").asBoolean() ? "Y" : "N")); 867}
868 strings.push_back(buffer); 868
869 869BOOL LLPanelRegionOpenSettingsInfo::postBuild()
870 buffer = llformat("%s", (childGetValue("disable_collisions_check").asBoolean() ? "Y" : "N")); 870{
871 strings.push_back(buffer); 871 // Enable the "Apply" button if something is changed. JC
872 872 initCtrl("draw_distance");
873 buffer = llformat("%s", (childGetValue("disable_physics_check").asBoolean() ? "Y" : "N")); 873 initCtrl("force_draw_distance");
874 strings.push_back(buffer); 874 initCtrl("max_drag_distance");
875 875 initCtrl("max_prim_scale");
876 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 876 initCtrl("min_prim_scale");
877 sendEstateOwnerMessage(gMessageSystem, "setregiondebug", invoice, strings); 877 initCtrl("max_phys_prim_scale");
878 return TRUE; 878 initCtrl("max_hollow_size");
879} 879 initCtrl("min_hole_size");
880 880 initCtrl("max_link_count");
881void LLPanelRegionDebugInfo::onClickChooseAvatar(void* data) 881 initCtrl("max_link_count_phys");
882{ 882 initCtrl("max_inventory_items_transfer");
883 LLFloaterAvatarPicker::show(callbackAvatarID, data, FALSE, TRUE); 883 initCtrl("max_groups");
884} 884 initCtrl("render_water");
885 885 initCtrl("allow_minimap");
886// static 886 initCtrl("allow_physical_prims");
887void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data) 887 initCtrl("enable_teen_mode");
888{ 888 initCtrl("show_tags");
889 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*) data; 889 initCtrl("allow_parcel_windlight");
890 if (ids.empty() || names.empty()) return; 890
891 self->mTargetAvatar = ids[0]; 891 initHelpBtn("force_draw_distance_help", "HelpForceDrawDistance");
892 self->childSetValue("target_avatar_name", LLSD(names[0])); 892 initHelpBtn("max_inventory_items_transfer_help", "HelpMaxInventoryItemsTransfer");
893 self->refreshFromRegion( gAgent.getRegion() ); 893 initHelpBtn("max_groups_help", "HelpMaxGroups");
894} 894 initHelpBtn("render_water_help", "HelpRenderWater");
895 895 initHelpBtn("allow_minimap_help", "HelpAllowMinimap");
896// static 896 initHelpBtn("allow_physical_prims_help", "HelpAllowPhysicalPrims");
897void LLPanelRegionDebugInfo::onClickReturn(void* data) 897 initHelpBtn("enable_teen_mode_help", "HelpEnableTeenMode");
898{ 898 initHelpBtn("show_tags_help", "HelpShowTags");
899 LLPanelRegionDebugInfo* panelp = (LLPanelRegionDebugInfo*) data; 899 initHelpBtn("allow_parcel_windlight_help", "HelpAllowParcelWindLight");
900 if (panelp->mTargetAvatar.isNull()) return; 900
901 901 childSetAction("apply_ors_btn", sendUpdate, this);
902 LLSD args; 902
903 args["USER_NAME"] = panelp->childGetValue("target_avatar_name").asString(); 903 refreshFromRegion(gAgent.getRegion());
904 LLSD payload; 904
905 payload["avatar_id"] = panelp->mTargetAvatar; 905 return LLPanelRegionInfo::postBuild();
906 906}
907 U32 flags = SWD_ALWAYS_RETURN_OBJECTS; 907
908 908// setregioninfo
909 if (panelp->childGetValue("return_scripts").asBoolean()) 909// strings[0] = 'Y' - block terraform, 'N' - not
910 { 910// strings[1] = 'Y' - block fly, 'N' - not
911 flags |= SWD_SCRIPTED_ONLY; 911// strings[2] = 'Y' - allow damage, 'N' - not
912 } 912// strings[3] = 'Y' - allow land sale, 'N' - not
913 913// strings[4] = agent limit
914 if (panelp->childGetValue("return_other_land").asBoolean()) 914// strings[5] = object bonus
915 { 915// strings[6] = sim access (0 = unknown, 13 = PG, 21 = Mature, 42 = Adult)
916 flags |= SWD_OTHERS_LAND_ONLY; 916// strings[7] = restrict pushobject
917 } 917// strings[8] = 'Y' - allow parcel subdivide, 'N' - not
918 payload["flags"] = int(flags); 918// strings[9] = 'Y' - block parcel search, 'N' - allow
919 payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean(); 919void LLPanelRegionOpenSettingsInfo::sendUpdate(void* userdata)
920 LLNotifications::instance().add("EstateObjectReturn", args, payload, 920{
921 boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2)); 921 LLPanelRegionOpenSettingsInfo* self;
922} 922 self = (LLPanelRegionOpenSettingsInfo*)userdata;
923 923
924bool LLPanelRegionDebugInfo::callbackReturn(const LLSD& notification, const LLSD& response) 924 llinfos << "LLPanelRegionOpenSettingsInfo::sendUpdate()" << llendl;
925{ 925
926 S32 option = LLNotification::getSelectedOption(notification, response); 926 LLSD body;
927 if (option != 0) return false; 927 std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings");
928 928 if (!url.empty())
929 LLUUID target_avatar = notification["payload"]["avatar_id"].asUUID(); 929 {
930 if (!target_avatar.isNull()) 930 body["draw_distance"] = self->childGetValue("draw_distance");
931 { 931 body["force_draw_distance"] = self->childGetValue("force_draw_distance");
932 U32 flags = notification["payload"]["flags"].asInteger(); 932 body["allow_minimap"] = self->childGetValue("allow_minimap");
933 bool return_estate_wide = notification["payload"]["return_estate_wide"]; 933 body["allow_physical_prims"] = self->childGetValue("allow_physical_prims");
934 if (return_estate_wide) 934 body["max_drag_distance"] = self->childGetValue("max_drag_distance");
935 { 935 body["min_hole_size"] = self->childGetValue("min_hole_size");
936 // send as estate message - routed by spaceserver to all regions in estate 936 body["max_hollow_size"] = self->childGetValue("max_hollow_size");
937 strings_t strings; 937 body["max_inventory_items_transfer"] = self->childGetValue("max_inventory_items_transfer");
938 strings.push_back(llformat("%d", flags)); 938 body["max_link_count"] = self->childGetValue("max_link_count");
939 strings.push_back(target_avatar.asString()); 939 body["max_link_count_phys"] = self->childGetValue("max_link_count_phys");
940 940 body["max_phys_prim_scale"] = self->childGetValue("max_phys_prim_scale");
941 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 941 body["max_prim_scale"] = self->childGetValue("max_prim_scale");
942 942 body["min_prim_scale"] = self->childGetValue("min_prim_scale");
943 sendEstateOwnerMessage(gMessageSystem, "estateobjectreturn", invoice, strings); 943 body["render_water"] = self->childGetValue("render_water");
944 } 944 body["show_tags"] = self->childGetValue("show_tags");
945 else 945 body["max_groups"] = self->childGetValue("max_groups");
946 { 946 body["allow_parcel_windlight"] = self->childGetValue("allow_parcel_windlight");
947 // send to this simulator only 947 body["enable_teen_mode"] = self->childGetValue("enable_teen_mode");
948 send_sim_wide_deletes(target_avatar, flags); 948 body["enforce_max_build"] = self->childGetValue("enforce_max_build");
949 } 949
950 } 950 LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
951 return false; 951 }
952} 952}
953 953
954 954/////////////////////////////////////////////////////////////////////////////
955// static 955// LLPanelRegionDebugInfo
956void LLPanelRegionDebugInfo::onClickTopColliders(void* data) 956/////////////////////////////////////////////////////////////////////////////
957{ 957BOOL LLPanelRegionDebugInfo::postBuild()
958 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data; 958{
959 strings_t strings; 959 LLPanelRegionInfo::postBuild();
960 strings.push_back("1"); // one physics step 960 initCtrl("disable_scripts_check");
961 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 961 initCtrl("disable_collisions_check");
962 LLFloaterTopObjects::show(); 962 initCtrl("disable_physics_check");
963 LLFloaterTopObjects::clearList(); 963
964 self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings); 964 initHelpBtn("disable_scripts_help", "HelpRegionDisableScripts");
965} 965 initHelpBtn("disable_collisions_help", "HelpRegionDisableCollisions");
966 966 initHelpBtn("disable_physics_help", "HelpRegionDisablePhysics");
967// static 967 initHelpBtn("top_colliders_help", "HelpRegionTopColliders");
968void LLPanelRegionDebugInfo::onClickTopScripts(void* data) 968 initHelpBtn("top_scripts_help", "HelpRegionTopScripts");
969{ 969 initHelpBtn("restart_help", "HelpRegionRestart");
970 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data; 970 initHelpBtn("minimum_agent_age_help", "HelpRegionMinimumAge");
971 strings_t strings; 971
972 strings.push_back("6"); // top 5 scripts 972
973 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 973 childSetAction("choose_avatar_btn", onClickChooseAvatar, this);
974 LLFloaterTopObjects::show(); 974 childSetAction("return_btn", onClickReturn, this);
975 LLFloaterTopObjects::clearList(); 975 childSetAction("top_colliders_btn", onClickTopColliders, this);
976 self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings); 976 childSetAction("top_scripts_btn", onClickTopScripts, this);
977} 977 childSetAction("restart_btn", onClickRestart, this);
978 978 childSetAction("cancel_restart_btn", onClickCancelRestart, this);
979// static 979
980void LLPanelRegionDebugInfo::onClickRestart(void* data) 980 return TRUE;
981{ 981}
982 LLNotifications::instance().add("ConfirmRestart", LLSD(), LLSD(), 982
983 boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2)); 983// virtual
984} 984bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region)
985 985{
986bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response) 986 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
987{ 987 setCtrlsEnabled(allow_modify);
988 S32 option = LLNotification::getSelectedOption(notification, response); 988 childDisable("apply_btn");
989 if (option != 0) return false; 989 childDisable("target_avatar_name");
990 990
991 strings_t strings; 991 childSetEnabled("choose_avatar_btn", allow_modify);
992 strings.push_back("120"); 992 childSetEnabled("return_scripts", allow_modify && !mTargetAvatar.isNull());
993 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 993 childSetEnabled("return_other_land", allow_modify && !mTargetAvatar.isNull());
994 sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings); 994 childSetEnabled("return_estate_wide", allow_modify && !mTargetAvatar.isNull());
995 return false; 995 childSetEnabled("return_btn", allow_modify && !mTargetAvatar.isNull());
996} 996 childSetEnabled("top_colliders_btn", allow_modify);
997 997 childSetEnabled("top_scripts_btn", allow_modify);
998// static 998 childSetEnabled("restart_btn", allow_modify);
999void LLPanelRegionDebugInfo::onClickCancelRestart(void* data) 999 childSetEnabled("cancel_restart_btn", allow_modify);
1000{ 1000
1001 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data; 1001 return LLPanelRegionInfo::refreshFromRegion(region);
1002 strings_t strings; 1002}
1003 strings.push_back("-1"); 1003
1004 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1004// virtual
1005 self->sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings); 1005BOOL LLPanelRegionDebugInfo::sendUpdate()
1006} 1006{
1007 1007 llinfos << "LLPanelRegionDebugInfo::sendUpdate" << llendl;
1008 1008 strings_t strings;
1009///////////////////////////////////////////////////////////////////////////// 1009 std::string buffer;
1010// LLPanelRegionTextureInfo 1010
1011// 1011 buffer = llformat("%s", (childGetValue("disable_scripts_check").asBoolean() ? "Y" : "N"));
1012LLPanelRegionTextureInfo::LLPanelRegionTextureInfo() : LLPanelRegionInfo() 1012 strings.push_back(buffer);
1013{ 1013
1014 // nothing. 1014 buffer = llformat("%s", (childGetValue("disable_collisions_check").asBoolean() ? "Y" : "N"));
1015} 1015 strings.push_back(buffer);
1016 1016
1017bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region) 1017 buffer = llformat("%s", (childGetValue("disable_physics_check").asBoolean() ? "Y" : "N"));
1018{ 1018 strings.push_back(buffer);
1019 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 1019
1020 setCtrlsEnabled(allow_modify); 1020 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1021 childDisable("apply_btn"); 1021 sendEstateOwnerMessage(gMessageSystem, "setregiondebug", invoice, strings);
1022 1022 return TRUE;
1023 if (region) 1023}
1024 { 1024
1025 childSetValue("region_text", LLSD(region->getName())); 1025void LLPanelRegionDebugInfo::onClickChooseAvatar(void* data)
1026 } 1026{
1027 else 1027 LLFloaterAvatarPicker::show(callbackAvatarID, data, FALSE, TRUE);
1028 { 1028}
1029 childSetValue("region_text", LLSD("")); 1029
1030 } 1030// static
1031 1031void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
1032 if (!region) return LLPanelRegionInfo::refreshFromRegion(region); 1032{
1033 1033 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*) data;
1034 LLVLComposition* compp = region->getComposition(); 1034 if (ids.empty() || names.empty()) return;
1035 LLTextureCtrl* texture_ctrl; 1035 self->mTargetAvatar = ids[0];
1036 std::string buffer; 1036 self->childSetValue("target_avatar_name", LLSD(names[0]));
1037 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1037 self->refreshFromRegion( gAgent.getRegion() );
1038 { 1038}
1039 buffer = llformat("texture_detail_%d", i); 1039
1040 texture_ctrl = getChild<LLTextureCtrl>(buffer); 1040// static
1041 if(texture_ctrl) 1041void LLPanelRegionDebugInfo::onClickReturn(void* data)
1042 { 1042{
1043 lldebugs << "Detail Texture " << i << ": " 1043 LLPanelRegionDebugInfo* panelp = (LLPanelRegionDebugInfo*) data;
1044 << compp->getDetailTextureID(i) << llendl; 1044 if (panelp->mTargetAvatar.isNull()) return;
1045 LLUUID tmp_id(compp->getDetailTextureID(i)); 1045
1046 texture_ctrl->setImageAssetID(tmp_id); 1046 LLSD args;
1047 } 1047 args["USER_NAME"] = panelp->childGetValue("target_avatar_name").asString();
1048 } 1048 LLSD payload;
1049 1049 payload["avatar_id"] = panelp->mTargetAvatar;
1050 for(S32 i = 0; i < CORNER_COUNT; ++i) 1050
1051 { 1051 U32 flags = SWD_ALWAYS_RETURN_OBJECTS;
1052 buffer = llformat("height_start_spin_%d", i); 1052
1053 childSetValue(buffer, LLSD(compp->getStartHeight(i))); 1053 if (panelp->childGetValue("return_scripts").asBoolean())
1054 buffer = llformat("height_range_spin_%d", i); 1054 {
1055 childSetValue(buffer, LLSD(compp->getHeightRange(i))); 1055 flags |= SWD_SCRIPTED_ONLY;
1056 } 1056 }
1057 1057
1058 // Call the parent for common book-keeping 1058 if (panelp->childGetValue("return_other_land").asBoolean())
1059 return LLPanelRegionInfo::refreshFromRegion(region); 1059 {
1060} 1060 flags |= SWD_OTHERS_LAND_ONLY;
1061 1061 }
1062 1062 payload["flags"] = int(flags);
1063BOOL LLPanelRegionTextureInfo::postBuild() 1063 payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean();
1064{ 1064 LLNotifications::instance().add("EstateObjectReturn", args, payload,
1065 LLPanelRegionInfo::postBuild(); 1065 boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2));
1066 std::string buffer; 1066}
1067 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1067
1068 { 1068bool LLPanelRegionDebugInfo::callbackReturn(const LLSD& notification, const LLSD& response)
1069 buffer = llformat("texture_detail_%d", i); 1069{
1070 initCtrl(buffer); 1070 S32 option = LLNotification::getSelectedOption(notification, response);
1071 } 1071 if (option != 0) return false;
1072 1072
1073 for(S32 i = 0; i < CORNER_COUNT; ++i) 1073 LLUUID target_avatar = notification["payload"]["avatar_id"].asUUID();
1074 { 1074 if (!target_avatar.isNull())
1075 buffer = llformat("height_start_spin_%d", i); 1075 {
1076 initCtrl(buffer); 1076 U32 flags = notification["payload"]["flags"].asInteger();
1077 buffer = llformat("height_range_spin_%d", i); 1077 bool return_estate_wide = notification["payload"]["return_estate_wide"];
1078 initCtrl(buffer); 1078 if (return_estate_wide)
1079 } 1079 {
1080 1080 // send as estate message - routed by spaceserver to all regions in estate
1081// LLButton* btn = new LLButton("dump", LLRect(0, 20, 100, 0), "", onClickDump, this); 1081 strings_t strings;
1082// btn->setFollows(FOLLOWS_TOP|FOLLOWS_LEFT); 1082 strings.push_back(llformat("%d", flags));
1083// addChild(btn); 1083 strings.push_back(target_avatar.asString());
1084 1084
1085 return LLPanelRegionInfo::postBuild(); 1085 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1086} 1086
1087 1087 sendEstateOwnerMessage(gMessageSystem, "estateobjectreturn", invoice, strings);
1088BOOL LLPanelRegionTextureInfo::sendUpdate() 1088 }
1089{ 1089 else
1090 llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl; 1090 {
1091 1091 // send to this simulator only
1092 // Make sure user hasn't chosen wacky textures. 1092 send_sim_wide_deletes(target_avatar, flags);
1093 if (!validateTextureSizes()) 1093 }
1094 { 1094 }
1095 return FALSE; 1095 return false;
1096 } 1096}
1097 1097
1098 LLTextureCtrl* texture_ctrl; 1098
1099 std::string buffer; 1099// static
1100 std::string id_str; 1100void LLPanelRegionDebugInfo::onClickTopColliders(void* data)
1101 LLMessageSystem* msg = gMessageSystem; 1101{
1102 strings_t strings; 1102 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data;
1103 1103 strings_t strings;
1104 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1104 strings.push_back("1"); // one physics step
1105 1105 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1106 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1106 LLFloaterTopObjects::show();
1107 { 1107 LLFloaterTopObjects::clearList();
1108 buffer = llformat("texture_detail_%d", i); 1108 self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings);
1109 texture_ctrl = getChild<LLTextureCtrl>(buffer); 1109}
1110 if(texture_ctrl) 1110
1111 { 1111// static
1112 LLUUID tmp_id(texture_ctrl->getImageAssetID()); 1112void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
1113 tmp_id.toString(id_str); 1113{
1114 buffer = llformat("%d %s", i, id_str.c_str()); 1114 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data;
1115 strings.push_back(buffer); 1115 strings_t strings;
1116 } 1116 strings.push_back("6"); // top 5 scripts
1117 } 1117 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1118 sendEstateOwnerMessage(msg, "texturedetail", invoice, strings); 1118 LLFloaterTopObjects::show();
1119 strings.clear(); 1119 LLFloaterTopObjects::clearList();
1120 for(S32 i = 0; i < CORNER_COUNT; ++i) 1120 self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings);
1121 { 1121}
1122 buffer = llformat("height_start_spin_%d", i); 1122
1123 std::string buffer2 = llformat("height_range_spin_%d", i); 1123// static
1124 std::string buffer3 = llformat("%d %f %f", i, (F32)childGetValue(buffer).asReal(), (F32)childGetValue(buffer2).asReal()); 1124void LLPanelRegionDebugInfo::onClickRestart(void* data)
1125 strings.push_back(buffer3); 1125{
1126 } 1126 LLNotifications::instance().add("ConfirmRestart", LLSD(), LLSD(),
1127 sendEstateOwnerMessage(msg, "textureheights", invoice, strings); 1127 boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2));
1128 strings.clear(); 1128}
1129 sendEstateOwnerMessage(msg, "texturecommit", invoice, strings); 1129
1130 return TRUE; 1130bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response)
1131} 1131{
1132 1132 S32 option = LLNotification::getSelectedOption(notification, response);
1133BOOL LLPanelRegionTextureInfo::validateTextureSizes() 1133 if (option != 0) return false;
1134{ 1134
1135 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1135 strings_t strings;
1136 { 1136 strings.push_back("120");
1137 std::string buffer; 1137 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1138 buffer = llformat("texture_detail_%d", i); 1138 sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings);
1139 LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(buffer); 1139 return false;
1140 if (!texture_ctrl) continue; 1140}
1141 1141
1142 LLUUID image_asset_id = texture_ctrl->getImageAssetID(); 1142// static
1143 LLViewerImage* img = gImageList.getImage(image_asset_id); 1143void LLPanelRegionDebugInfo::onClickCancelRestart(void* data)
1144 S32 components = img->getComponents(); 1144{
1145 // Must ask for highest resolution version's width. JC 1145 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data;
1146 S32 width = img->getWidth(0); 1146 strings_t strings;
1147 S32 height = img->getHeight(0); 1147 strings.push_back("-1");
1148 1148 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1149 //llinfos << "texture detail " << i << " is " << width << "x" << height << "x" << components << llendl; 1149 self->sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings);
1150 1150}
1151 if (components != 3) 1151
1152 { 1152
1153 LLSD args; 1153/////////////////////////////////////////////////////////////////////////////
1154 args["TEXTURE_NUM"] = i+1; 1154// LLPanelRegionTextureInfo
1155 args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8); 1155//
1156 LLNotifications::instance().add("InvalidTerrainBitDepth", args); 1156LLPanelRegionTextureInfo::LLPanelRegionTextureInfo() : LLPanelRegionInfo()
1157 return FALSE; 1157{
1158 } 1158 // nothing.
1159 1159}
1160 if (width > 512 || height > 512) 1160
1161 { 1161bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region)
1162 1162{
1163 LLSD args; 1163 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
1164 args["TEXTURE_NUM"] = i+1; 1164 setCtrlsEnabled(allow_modify);
1165 args["TEXTURE_SIZE_X"] = width; 1165 childDisable("apply_btn");
1166 args["TEXTURE_SIZE_Y"] = height; 1166
1167 LLNotifications::instance().add("InvalidTerrainSize", args); 1167 if (region)
1168 return FALSE; 1168 {
1169 1169 childSetValue("region_text", LLSD(region->getName()));
1170 } 1170 }
1171 } 1171 else
1172 1172 {
1173 return TRUE; 1173 childSetValue("region_text", LLSD(""));
1174} 1174 }
1175 1175
1176 1176 if (!region) return LLPanelRegionInfo::refreshFromRegion(region);
1177// static 1177
1178void LLPanelRegionTextureInfo::onClickDump(void* data) 1178 LLVLComposition* compp = region->getComposition();
1179{ 1179 LLTextureCtrl* texture_ctrl;
1180 llinfos << "LLPanelRegionTextureInfo::onClickDump()" << llendl; 1180 std::string buffer;
1181} 1181 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1182 1182 {
1183 1183 buffer = llformat("texture_detail_%d", i);
1184///////////////////////////////////////////////////////////////////////////// 1184 texture_ctrl = getChild<LLTextureCtrl>(buffer);
1185// LLPanelRegionTerrainInfo 1185 if(texture_ctrl)
1186///////////////////////////////////////////////////////////////////////////// 1186 {
1187BOOL LLPanelRegionTerrainInfo::postBuild() 1187 lldebugs << "Detail Texture " << i << ": "
1188{ 1188 << compp->getDetailTextureID(i) << llendl;
1189 LLPanelRegionInfo::postBuild(); 1189 LLUUID tmp_id(compp->getDetailTextureID(i));
1190 1190 texture_ctrl->setImageAssetID(tmp_id);
1191 initHelpBtn("water_height_help", "HelpRegionWaterHeight"); 1191 }
1192 initHelpBtn("terrain_raise_help", "HelpRegionTerrainRaise"); 1192 }
1193 initHelpBtn("terrain_lower_help", "HelpRegionTerrainLower"); 1193
1194 initHelpBtn("upload_raw_help", "HelpRegionUploadRaw"); 1194 for(S32 i = 0; i < CORNER_COUNT; ++i)
1195 initHelpBtn("download_raw_help", "HelpRegionDownloadRaw"); 1195 {
1196 initHelpBtn("use_estate_sun_help", "HelpRegionUseEstateSun"); 1196 buffer = llformat("height_start_spin_%d", i);
1197 initHelpBtn("fixed_sun_help", "HelpRegionFixedSun"); 1197 childSetValue(buffer, LLSD(compp->getStartHeight(i)));
1198 initHelpBtn("bake_terrain_help", "HelpRegionBakeTerrain"); 1198 buffer = llformat("height_range_spin_%d", i);
1199 1199 childSetValue(buffer, LLSD(compp->getHeightRange(i)));
1200 initCtrl("water_height_spin"); 1200 }
1201 initCtrl("terrain_raise_spin"); 1201
1202 initCtrl("terrain_lower_spin"); 1202 // Call the parent for common book-keeping
1203 1203 return LLPanelRegionInfo::refreshFromRegion(region);
1204 initCtrl("fixed_sun_check"); 1204}
1205 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this); 1205
1206 childSetCommitCallback("use_estate_sun_check", onChangeUseEstateTime, this); 1206
1207 childSetCommitCallback("sun_hour_slider", onChangeSunHour, this); 1207BOOL LLPanelRegionTextureInfo::postBuild()
1208 1208{
1209 childSetAction("download_raw_btn", onClickDownloadRaw, this); 1209 LLPanelRegionInfo::postBuild();
1210 childSetAction("upload_raw_btn", onClickUploadRaw, this); 1210 std::string buffer;
1211 childSetAction("bake_terrain_btn", onClickBakeTerrain, this); 1211 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1212 1212 {
1213 return TRUE; 1213 buffer = llformat("texture_detail_%d", i);
1214} 1214 initCtrl(buffer);
1215 1215 }
1216// virtual 1216
1217bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) 1217 for(S32 i = 0; i < CORNER_COUNT; ++i)
1218{ 1218 {
1219 llinfos << "LLPanelRegionTerrainInfo::refreshFromRegion" << llendl; 1219 buffer = llformat("height_start_spin_%d", i);
1220 1220 initCtrl(buffer);
1221 BOOL owner_or_god = gAgent.isGodlike() 1221 buffer = llformat("height_range_spin_%d", i);
1222 || (region && (region->getOwner() == gAgent.getID())); 1222 initCtrl(buffer);
1223 BOOL owner_or_god_or_manager = owner_or_god 1223 }
1224 || (region && region->isEstateManager()); 1224
1225 setCtrlsEnabled(owner_or_god_or_manager); 1225// LLButton* btn = new LLButton("dump", LLRect(0, 20, 100, 0), "", onClickDump, this);
1226 childDisable("apply_btn"); 1226// btn->setFollows(FOLLOWS_TOP|FOLLOWS_LEFT);
1227 1227// addChild(btn);
1228 childSetEnabled("download_raw_btn", owner_or_god); 1228
1229 childSetEnabled("upload_raw_btn", owner_or_god); 1229 return LLPanelRegionInfo::postBuild();
1230 childSetEnabled("bake_terrain_btn", owner_or_god); 1230}
1231 1231
1232 return LLPanelRegionInfo::refreshFromRegion(region); 1232BOOL LLPanelRegionTextureInfo::sendUpdate()
1233} 1233{
1234 1234 llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl;
1235// virtual 1235
1236BOOL LLPanelRegionTerrainInfo::sendUpdate() 1236 // Make sure user hasn't chosen wacky textures.
1237{ 1237 if (!validateTextureSizes())
1238 llinfos << "LLPanelRegionTerrainInfo::sendUpdate" << llendl; 1238 {
1239 std::string buffer; 1239 return FALSE;
1240 strings_t strings; 1240 }
1241 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1241
1242 1242 LLTextureCtrl* texture_ctrl;
1243 buffer = llformat("%f", (F32)childGetValue("water_height_spin").asReal()); 1243 std::string buffer;
1244 strings.push_back(buffer); 1244 std::string id_str;
1245 buffer = llformat("%f", (F32)childGetValue("terrain_raise_spin").asReal()); 1245 LLMessageSystem* msg = gMessageSystem;
1246 strings.push_back(buffer); 1246 strings_t strings;
1247 buffer = llformat("%f", (F32)childGetValue("terrain_lower_spin").asReal()); 1247
1248 strings.push_back(buffer); 1248 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1249 buffer = llformat("%s", (childGetValue("use_estate_sun_check").asBoolean() ? "Y" : "N")); 1249
1250 strings.push_back(buffer); 1250 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1251 buffer = llformat("%s", (childGetValue("fixed_sun_check").asBoolean() ? "Y" : "N")); 1251 {
1252 strings.push_back(buffer); 1252 buffer = llformat("texture_detail_%d", i);
1253 buffer = llformat("%f", (F32)childGetValue("sun_hour_slider").asReal() ); 1253 texture_ctrl = getChild<LLTextureCtrl>(buffer);
1254 strings.push_back(buffer); 1254 if(texture_ctrl)
1255 1255 {
1256 // Grab estate information in case the user decided to set the 1256 LLUUID tmp_id(texture_ctrl->getImageAssetID());
1257 // region back to estate time. JC 1257 tmp_id.toString(id_str);
1258 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); 1258 buffer = llformat("%d %s", i, id_str.c_str());
1259 if (!floater) return true; 1259 strings.push_back(buffer);
1260 1260 }
1261 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); 1261 }
1262 if (!tab) return true; 1262 sendEstateOwnerMessage(msg, "texturedetail", invoice, strings);
1263 1263 strings.clear();
1264 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate"); 1264 for(S32 i = 0; i < CORNER_COUNT; ++i)
1265 if (!panel) return true; 1265 {
1266 1266 buffer = llformat("height_start_spin_%d", i);
1267 BOOL estate_global_time = panel->getGlobalTime(); 1267 std::string buffer2 = llformat("height_range_spin_%d", i);
1268 BOOL estate_fixed_sun = panel->getFixedSun(); 1268 std::string buffer3 = llformat("%d %f %f", i, (F32)childGetValue(buffer).asReal(), (F32)childGetValue(buffer2).asReal());
1269 F32 estate_sun_hour; 1269 strings.push_back(buffer3);
1270 if (estate_global_time) 1270 }
1271 { 1271 sendEstateOwnerMessage(msg, "textureheights", invoice, strings);
1272 estate_sun_hour = 0.f; 1272 strings.clear();
1273 } 1273 sendEstateOwnerMessage(msg, "texturecommit", invoice, strings);
1274 else 1274 return TRUE;
1275 { 1275}
1276 estate_sun_hour = panel->getSunHour(); 1276
1277 } 1277BOOL LLPanelRegionTextureInfo::validateTextureSizes()
1278 1278{
1279 buffer = llformat("%s", (estate_global_time ? "Y" : "N") ); 1279 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1280 strings.push_back(buffer); 1280 {
1281 buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") ); 1281 std::string buffer;
1282 strings.push_back(buffer); 1282 buffer = llformat("texture_detail_%d", i);
1283 buffer = llformat("%f", estate_sun_hour); 1283 LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(buffer);
1284 strings.push_back(buffer); 1284 if (!texture_ctrl) continue;
1285 1285
1286 sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings); 1286 LLUUID image_asset_id = texture_ctrl->getImageAssetID();
1287 return TRUE; 1287 LLViewerImage* img = gImageList.getImage(image_asset_id);
1288} 1288 S32 components = img->getComponents();
1289 1289 // Must ask for highest resolution version's width. JC
1290// static 1290 S32 width = img->getWidth(0);
1291void LLPanelRegionTerrainInfo::onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data) 1291 S32 height = img->getHeight(0);
1292{ 1292
1293 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data; 1293 //llinfos << "texture detail " << i << " is " << width << "x" << height << "x" << components << llendl;
1294 if (!panel) return; 1294
1295 BOOL use_estate_sun = panel->childGetValue("use_estate_sun_check").asBoolean(); 1295 if (components != 3)
1296 panel->childSetEnabled("fixed_sun_check", !use_estate_sun); 1296 {
1297 panel->childSetEnabled("sun_hour_slider", !use_estate_sun); 1297 LLSD args;
1298 if (use_estate_sun) 1298 args["TEXTURE_NUM"] = i+1;
1299 { 1299 args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8);
1300 panel->childSetValue("fixed_sun_check", LLSD(FALSE)); 1300 LLNotifications::instance().add("InvalidTerrainBitDepth", args);
1301 panel->childSetValue("sun_hour_slider", LLSD(0.f)); 1301 return FALSE;
1302 } 1302 }
1303 panel->childEnable("apply_btn"); 1303
1304} 1304 if (width > 512 || height > 512)
1305 1305 {
1306// static 1306
1307void LLPanelRegionTerrainInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data) 1307 LLSD args;
1308{ 1308 args["TEXTURE_NUM"] = i+1;
1309 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data; 1309 args["TEXTURE_SIZE_X"] = width;
1310 if (!panel) return; 1310 args["TEXTURE_SIZE_Y"] = height;
1311 // Just enable the apply button. We let the sun-hour slider be enabled 1311 LLNotifications::instance().add("InvalidTerrainSize", args);
1312 // for both fixed-sun and non-fixed-sun. JC 1312 return FALSE;
1313 panel->childEnable("apply_btn"); 1313
1314} 1314 }
1315 1315 }
1316// static 1316
1317void LLPanelRegionTerrainInfo::onChangeSunHour(LLUICtrl* ctrl, void*) 1317 return TRUE;
1318{ 1318}
1319 // can't use userdata to get panel, slider uses it internally 1319
1320 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) ctrl->getParent(); 1320
1321 if (!panel) return; 1321// static
1322 panel->childEnable("apply_btn"); 1322void LLPanelRegionTextureInfo::onClickDump(void* data)
1323} 1323{
1324 1324 llinfos << "LLPanelRegionTextureInfo::onClickDump()" << llendl;
1325// static 1325}
1326void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data) 1326
1327{ 1327
1328 LLFilePicker& picker = LLFilePicker::instance(); 1328/////////////////////////////////////////////////////////////////////////////
1329 if (!picker.getSaveFile(LLFilePicker::FFSAVE_RAW, "terrain.raw")) 1329// LLPanelRegionTerrainInfo
1330 { 1330/////////////////////////////////////////////////////////////////////////////
1331 llwarns << "No file" << llendl; 1331BOOL LLPanelRegionTerrainInfo::postBuild()
1332 return; 1332{
1333 } 1333 LLPanelRegionInfo::postBuild();
1334 std::string filepath = picker.getFirstFile(); 1334
1335 gXferManager->expectFileForRequest(filepath); 1335 initHelpBtn("water_height_help", "HelpRegionWaterHeight");
1336 1336 initHelpBtn("terrain_raise_help", "HelpRegionTerrainRaise");
1337 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data; 1337 initHelpBtn("terrain_lower_help", "HelpRegionTerrainLower");
1338 strings_t strings; 1338 initHelpBtn("upload_raw_help", "HelpRegionUploadRaw");
1339 strings.push_back("download filename"); 1339 initHelpBtn("download_raw_help", "HelpRegionDownloadRaw");
1340 strings.push_back(filepath); 1340 initHelpBtn("use_estate_sun_help", "HelpRegionUseEstateSun");
1341 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1341 initHelpBtn("fixed_sun_help", "HelpRegionFixedSun");
1342 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); 1342 initHelpBtn("bake_terrain_help", "HelpRegionBakeTerrain");
1343} 1343
1344 1344 initCtrl("water_height_spin");
1345// static 1345 initCtrl("terrain_raise_spin");
1346void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data) 1346 initCtrl("terrain_lower_spin");
1347{ 1347
1348 LLFilePicker& picker = LLFilePicker::instance(); 1348 initCtrl("fixed_sun_check");
1349 if (!picker.getOpenFile(LLFilePicker::FFLOAD_RAW)) 1349 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this);
1350 { 1350 childSetCommitCallback("use_estate_sun_check", onChangeUseEstateTime, this);
1351 llwarns << "No file" << llendl; 1351 childSetCommitCallback("sun_hour_slider", onChangeSunHour, this);
1352 return; 1352
1353 } 1353 childSetAction("download_raw_btn", onClickDownloadRaw, this);
1354 std::string filepath = picker.getFirstFile(); 1354 childSetAction("upload_raw_btn", onClickUploadRaw, this);
1355 gXferManager->expectFileForTransfer(filepath); 1355 childSetAction("bake_terrain_btn", onClickBakeTerrain, this);
1356 1356
1357 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data; 1357 return TRUE;
1358 strings_t strings; 1358}
1359 strings.push_back("upload filename"); 1359
1360 strings.push_back(filepath); 1360// virtual
1361 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1361bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
1362 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); 1362{
1363 1363 llinfos << "LLPanelRegionTerrainInfo::refreshFromRegion" << llendl;
1364 LLNotifications::instance().add("RawUploadStarted"); 1364
1365} 1365 BOOL owner_or_god = gAgent.isGodlike()
1366 1366 || (region && (region->getOwner() == gAgent.getID()));
1367// static 1367 BOOL owner_or_god_or_manager = owner_or_god
1368void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data) 1368 || (region && region->isEstateManager());
1369{ 1369 setCtrlsEnabled(owner_or_god_or_manager);
1370 LLNotifications::instance().add( 1370 childDisable("apply_btn");
1371 LLNotification::Params("ConfirmBakeTerrain") 1371
1372 .functor(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2))); 1372 childSetEnabled("download_raw_btn", owner_or_god);
1373} 1373 childSetEnabled("upload_raw_btn", owner_or_god);
1374 1374 childSetEnabled("bake_terrain_btn", owner_or_god);
1375bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response) 1375
1376{ 1376 return LLPanelRegionInfo::refreshFromRegion(region);
1377 S32 option = LLNotification::getSelectedOption(notification, response); 1377}
1378 if (option != 0) return false; 1378
1379 1379// virtual
1380 strings_t strings; 1380BOOL LLPanelRegionTerrainInfo::sendUpdate()
1381 strings.push_back("bake"); 1381{
1382 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1382 llinfos << "LLPanelRegionTerrainInfo::sendUpdate" << llendl;
1383 sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); 1383 std::string buffer;
1384 return false; 1384 strings_t strings;
1385} 1385 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1386 1386
1387///////////////////////////////////////////////////////////////////////////// 1387 buffer = llformat("%f", (F32)childGetValue("water_height_spin").asReal());
1388// LLPanelEstateInfo 1388 strings.push_back(buffer);
1389// 1389 buffer = llformat("%f", (F32)childGetValue("terrain_raise_spin").asReal());
1390 1390 strings.push_back(buffer);
1391LLPanelEstateInfo::LLPanelEstateInfo() 1391 buffer = llformat("%f", (F32)childGetValue("terrain_lower_spin").asReal());
1392: LLPanelRegionInfo(), 1392 strings.push_back(buffer);
1393 mEstateID(0) // invalid 1393 buffer = llformat("%s", (childGetValue("use_estate_sun_check").asBoolean() ? "Y" : "N"));
1394{ 1394 strings.push_back(buffer);
1395} 1395 buffer = llformat("%s", (childGetValue("fixed_sun_check").asBoolean() ? "Y" : "N"));
1396 1396 strings.push_back(buffer);
1397// static 1397 buffer = llformat("%f", (F32)childGetValue("sun_hour_slider").asReal() );
1398void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch) 1398 strings.push_back(buffer);
1399{ 1399
1400 std::string name; 1400 // Grab estate information in case the user decided to set the
1401 1401 // region back to estate time. JC
1402// name.assign("setowner"); 1402 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
1403// static LLDispatchSetEstateOwner set_owner; 1403 if (!floater) return true;
1404// dispatch.addHandler(name, &set_owner); 1404
1405 1405 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
1406 name.assign("estateupdateinfo"); 1406 if (!tab) return true;
1407 static LLDispatchEstateUpdateInfo estate_update_info; 1407
1408 dispatch.addHandler(name, &estate_update_info); 1408 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
1409 1409 if (!panel) return true;
1410 name.assign("setaccess"); 1410
1411 static LLDispatchSetEstateAccess set_access; 1411 BOOL estate_global_time = panel->getGlobalTime();
1412 dispatch.addHandler(name, &set_access); 1412 BOOL estate_fixed_sun = panel->getFixedSun();
1413 1413 F32 estate_sun_hour;
1414 estate_dispatch_initialized = true; 1414 if (estate_global_time)
1415} 1415 {
1416 1416 estate_sun_hour = 0.f;
1417// static 1417 }
1418// Disables the sun-hour slider and the use fixed time check if the use global time is check 1418 else
1419void LLPanelEstateInfo::onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data) 1419 {
1420{ 1420 estate_sun_hour = panel->getSunHour();
1421 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data; 1421 }
1422 if (panel) 1422
1423 { 1423 buffer = llformat("%s", (estate_global_time ? "Y" : "N") );
1424 bool enabled = !panel->childGetValue("use_global_time_check").asBoolean(); 1424 strings.push_back(buffer);
1425 panel->childSetEnabled("sun_hour_slider", enabled); 1425 buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") );
1426 panel->childSetEnabled("fixed_sun_check", enabled); 1426 strings.push_back(buffer);
1427 panel->childSetValue("fixed_sun_check", LLSD(FALSE)); 1427 buffer = llformat("%f", estate_sun_hour);
1428 panel->enableButton("apply_btn"); 1428 strings.push_back(buffer);
1429 } 1429
1430} 1430 sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings);
1431 1431 return TRUE;
1432// Enables the sun-hour slider if the fixed-sun checkbox is set 1432}
1433void LLPanelEstateInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data) 1433
1434{ 1434// static
1435 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data; 1435void LLPanelRegionTerrainInfo::onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data)
1436 if (panel) 1436{
1437 { 1437 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data;
1438 bool enabled = !panel->childGetValue("fixed_sun_check").asBoolean(); 1438 if (!panel) return;
1439 panel->childSetEnabled("use_global_time_check", enabled); 1439 BOOL use_estate_sun = panel->childGetValue("use_estate_sun_check").asBoolean();
1440 panel->childSetValue("use_global_time_check", LLSD(FALSE)); 1440 panel->childSetEnabled("fixed_sun_check", !use_estate_sun);
1441 panel->enableButton("apply_btn"); 1441 panel->childSetEnabled("sun_hour_slider", !use_estate_sun);
1442 } 1442 if (use_estate_sun)
1443} 1443 {
1444 1444 panel->childSetValue("fixed_sun_check", LLSD(FALSE));
1445 1445 panel->childSetValue("sun_hour_slider", LLSD(0.f));
1446 1446 }
1447 1447 panel->childEnable("apply_btn");
1448//--------------------------------------------------------------------------- 1448}
1449// Add/Remove estate access button callbacks 1449
1450//--------------------------------------------------------------------------- 1450// static
1451void LLPanelEstateInfo::onClickEditSky(void* user_data) 1451void LLPanelRegionTerrainInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data)
1452{ 1452{
1453 LLFloaterWindLight::show(); 1453 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data;
1454} 1454 if (!panel) return;
1455 1455 // Just enable the apply button. We let the sun-hour slider be enabled
1456void LLPanelEstateInfo::onClickEditDayCycle(void* user_data) 1456 // for both fixed-sun and non-fixed-sun. JC
1457{ 1457 panel->childEnable("apply_btn");
1458 LLFloaterDayCycle::show(); 1458}
1459} 1459
1460 1460// static
1461// static 1461void LLPanelRegionTerrainInfo::onChangeSunHour(LLUICtrl* ctrl, void*)
1462void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data) 1462{
1463{ 1463 // can't use userdata to get panel, slider uses it internally
1464 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1464 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) ctrl->getParent();
1465 LLCtrlListInterface *list = self->childGetListInterface("allowed_avatar_name_list"); 1465 if (!panel) return;
1466 if (!list) return; 1466 panel->childEnable("apply_btn");
1467 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) 1467}
1468 { 1468
1469 //args 1469// static
1470 1470void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data)
1471 LLSD args; 1471{
1472 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1472 LLFilePicker& picker = LLFilePicker::instance();
1473 LLNotifications::instance().add("MaxAllowedAgentOnRegion", args); 1473 if (!picker.getSaveFile(LLFilePicker::FFSAVE_RAW, "terrain.raw"))
1474 return; 1474 {
1475 } 1475 llwarns << "No file" << llendl;
1476 accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd"); 1476 return;
1477} 1477 }
1478 1478 std::string filepath = picker.getFirstFile();
1479// static 1479 gXferManager->expectFileForRequest(filepath);
1480void LLPanelEstateInfo::onClickRemoveAllowedAgent(void* user_data) 1480
1481{ 1481 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data;
1482 accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list"); 1482 strings_t strings;
1483} 1483 strings.push_back("download filename");
1484 1484 strings.push_back(filepath);
1485// static 1485 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1486void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data) 1486 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
1487{ 1487}
1488 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1488
1489 LLCtrlListInterface *list = self->childGetListInterface("allowed_group_name_list"); 1489// static
1490 if (!list) return; 1490void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data)
1491 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) 1491{
1492 { 1492 LLFilePicker& picker = LLFilePicker::instance();
1493 LLSD args; 1493 if (!picker.getOpenFile(LLFilePicker::FFLOAD_RAW))
1494 args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1494 {
1495 LLNotifications::instance().add("MaxAllowedGroupsOnRegion", args); 1495 llwarns << "No file" << llendl;
1496 return; 1496 return;
1497 } 1497 }
1498 1498 std::string filepath = picker.getFirstFile();
1499 LLNotification::Params params("ChangeLindenAccess"); 1499 gXferManager->expectFileForTransfer(filepath);
1500 params.functor(boost::bind(&LLPanelEstateInfo::addAllowedGroup, self, _1, _2)); 1500
1501 if (isLindenEstate()) 1501 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data;
1502 { 1502 strings_t strings;
1503 LLNotifications::instance().add(params); 1503 strings.push_back("upload filename");
1504 } 1504 strings.push_back(filepath);
1505 else 1505 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1506 { 1506 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
1507 LLNotifications::instance().forceResponse(params, 0); 1507
1508 } 1508 LLNotifications::instance().add("RawUploadStarted");
1509} 1509}
1510 1510
1511bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response) 1511// static
1512{ 1512void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data)
1513 S32 option = LLNotification::getSelectedOption(notification, response); 1513{
1514 if (option != 0) return false; 1514 LLNotifications::instance().add(
1515 1515 LLNotification::Params("ConfirmBakeTerrain")
1516 LLFloater* parent_floater = gFloaterView->getParentFloater(this); 1516 .functor(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2)));
1517 1517}
1518 LLFloaterGroupPicker* widget; 1518
1519 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); 1519bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response)
1520 if (widget) 1520{
1521 { 1521 S32 option = LLNotification::getSelectedOption(notification, response);
1522 widget->setSelectCallback(addAllowedGroup2, NULL); 1522 if (option != 0) return false;
1523 if (parent_floater) 1523
1524 { 1524 strings_t strings;
1525 LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget); 1525 strings.push_back("bake");
1526 widget->setOrigin(new_rect.mLeft, new_rect.mBottom); 1526 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1527 parent_floater->addDependentFloater(widget); 1527 sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
1528 } 1528 return false;
1529 } 1529}
1530 1530
1531 return false; 1531/////////////////////////////////////////////////////////////////////////////
1532} 1532// LLPanelEstateInfo
1533 1533//
1534// static 1534
1535void LLPanelEstateInfo::onClickRemoveAllowedGroup(void* user_data) 1535LLPanelEstateInfo::LLPanelEstateInfo()
1536{ 1536: LLPanelRegionInfo(),
1537 accessRemoveCore(ESTATE_ACCESS_ALLOWED_GROUP_REMOVE, "EstateAllowedGroupRemove", "allowed_group_name_list"); 1537 mEstateID(0) // invalid
1538} 1538{
1539 1539}
1540// static 1540
1541void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data) 1541// static
1542{ 1542void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
1543 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1543{
1544 LLCtrlListInterface *list = self->childGetListInterface("banned_avatar_name_list"); 1544 std::string name;
1545 if (!list) return; 1545
1546 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) 1546// name.assign("setowner");
1547 { 1547// static LLDispatchSetEstateOwner set_owner;
1548 LLSD args; 1548// dispatch.addHandler(name, &set_owner);
1549 args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1549
1550 LLNotifications::instance().add("MaxBannedAgentsOnRegion", args); 1550 name.assign("estateupdateinfo");
1551 return; 1551 static LLDispatchEstateUpdateInfo estate_update_info;
1552 } 1552 dispatch.addHandler(name, &estate_update_info);
1553 accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd"); 1553
1554} 1554 name.assign("setaccess");
1555 1555 static LLDispatchSetEstateAccess set_access;
1556// static 1556 dispatch.addHandler(name, &set_access);
1557void LLPanelEstateInfo::onClickRemoveBannedAgent(void* user_data) 1557
1558{ 1558 estate_dispatch_initialized = true;
1559 accessRemoveCore(ESTATE_ACCESS_BANNED_AGENT_REMOVE, "EstateBannedAgentRemove", "banned_avatar_name_list"); 1559}
1560} 1560
1561 1561// static
1562// static 1562// Disables the sun-hour slider and the use fixed time check if the use global time is check
1563void LLPanelEstateInfo::onClickAddEstateManager(void* user_data) 1563void LLPanelEstateInfo::onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data)
1564{ 1564{
1565 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1565 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data;
1566 LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list"); 1566 if (panel)
1567 if (!list) return; 1567 {
1568 if (list->getItemCount() >= ESTATE_MAX_MANAGERS) 1568 bool enabled = !panel->childGetValue("use_global_time_check").asBoolean();
1569 { // Tell user they can't add more managers 1569 panel->childSetEnabled("sun_hour_slider", enabled);
1570 LLSD args; 1570 panel->childSetEnabled("fixed_sun_check", enabled);
1571 args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS); 1571 panel->childSetValue("fixed_sun_check", LLSD(FALSE));
1572 LLNotifications::instance().add("MaxManagersOnRegion", args); 1572 panel->enableButton("apply_btn");
1573 } 1573 }
1574 else 1574}
1575 { // Go pick managers to add 1575
1576 accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd"); 1576// Enables the sun-hour slider if the fixed-sun checkbox is set
1577 } 1577void LLPanelEstateInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data)
1578} 1578{
1579 1579 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data;
1580// static 1580 if (panel)
1581void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data) 1581 {
1582{ 1582 bool enabled = !panel->childGetValue("fixed_sun_check").asBoolean();
1583 accessRemoveCore(ESTATE_ACCESS_MANAGER_REMOVE, "EstateManagerRemove", "estate_manager_name_list"); 1583 panel->childSetEnabled("use_global_time_check", enabled);
1584} 1584 panel->childSetValue("use_global_time_check", LLSD(FALSE));
1585 1585 panel->enableButton("apply_btn");
1586//--------------------------------------------------------------------------- 1586 }
1587// Kick from estate methods 1587}
1588//--------------------------------------------------------------------------- 1588
1589struct LLKickFromEstateInfo 1589
1590{ 1590
1591 LLPanelEstateInfo *mEstatePanelp; 1591
1592 LLUUID mAgentID; 1592//---------------------------------------------------------------------------
1593}; 1593// Add/Remove estate access button callbacks
1594 1594//---------------------------------------------------------------------------
1595void LLPanelEstateInfo::onClickKickUser(void *user_data) 1595void LLPanelEstateInfo::onClickEditSky(void* user_data)
1596{ 1596{
1597 LLPanelEstateInfo* panelp = (LLPanelEstateInfo*)user_data; 1597 LLFloaterWindLight::show();
1598 1598}
1599 // this depends on the grandparent view being a floater 1599
1600 // in order to set up floater dependency 1600void LLPanelEstateInfo::onClickEditDayCycle(void* user_data)
1601 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); 1601{
1602 LLFloater* child_floater = LLFloaterAvatarPicker::show(LLPanelEstateInfo::onKickUserCommit, user_data, FALSE, TRUE); 1602 LLFloaterDayCycle::show();
1603 parent_floater->addDependentFloater(child_floater); 1603}
1604} 1604
1605 1605// static
1606void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata) 1606void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data)
1607{ 1607{
1608 if (names.empty() || ids.empty()) return; 1608 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1609 1609 LLCtrlListInterface *list = self->childGetListInterface("allowed_avatar_name_list");
1610 //check to make sure there is one valid user and id 1610 if (!list) return;
1611 if( (ids[0].isNull()) || 1611 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
1612 (names[0].length() == 0) ) 1612 {
1613 { 1613 //args
1614 return; 1614
1615 } 1615 LLSD args;
1616 1616 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1617 LLPanelEstateInfo* self = (LLPanelEstateInfo*)userdata; 1617 LLNotifications::instance().add("MaxAllowedAgentOnRegion", args);
1618 if(!self) return; 1618 return;
1619 1619 }
1620 //keep track of what user they want to kick and other misc info 1620 accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd");
1621 LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo(); 1621}
1622 kick_info->mEstatePanelp = self; 1622
1623 kick_info->mAgentID = ids[0]; 1623// static
1624 1624void LLPanelEstateInfo::onClickRemoveAllowedAgent(void* user_data)
1625 //Bring up a confirmation dialog 1625{
1626 LLSD args; 1626 accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list");
1627 args["EVIL_USER"] = names[0]; 1627}
1628 LLSD payload; 1628
1629 payload["agent_id"] = ids[0]; 1629// static
1630 LLNotifications::instance().add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2)); 1630void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data)
1631 1631{
1632} 1632 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1633 1633 LLCtrlListInterface *list = self->childGetListInterface("allowed_group_name_list");
1634bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& response) 1634 if (!list) return;
1635{ 1635 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
1636 S32 option = LLNotification::getSelectedOption(notification, response); 1636 {
1637 switch(option) 1637 LLSD args;
1638 { 1638 args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1639 case 0: 1639 LLNotifications::instance().add("MaxAllowedGroupsOnRegion", args);
1640 { 1640 return;
1641 //Kick User 1641 }
1642 strings_t strings; 1642
1643 strings.push_back(notification["payload"]["agent_id"].asString()); 1643 LLNotification::Params params("ChangeLindenAccess");
1644 1644 params.functor(boost::bind(&LLPanelEstateInfo::addAllowedGroup, self, _1, _2));
1645 sendEstateOwnerMessage(gMessageSystem, "kickestate", LLFloaterRegionInfo::getLastInvoice(), strings); 1645 if (isLindenEstate())
1646 break; 1646 {
1647 } 1647 LLNotifications::instance().add(params);
1648 default: 1648 }
1649 break; 1649 else
1650 } 1650 {
1651 return false; 1651 LLNotifications::instance().forceResponse(params, 0);
1652} 1652 }
1653 1653}
1654//--------------------------------------------------------------------------- 1654
1655// Core Add/Remove estate access methods 1655bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response)
1656// TODO: INTERNATIONAL: don't build message text here; 1656{
1657// instead, create multiple translatable messages and choose 1657 S32 option = LLNotification::getSelectedOption(notification, response);
1658// one based on the status. 1658 if (option != 0) return false;
1659//--------------------------------------------------------------------------- 1659
1660std::string all_estates_text() 1660 LLFloater* parent_floater = gFloaterView->getParentFloater(this);
1661{ 1661
1662 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1662 LLFloaterGroupPicker* widget;
1663 if (!panel) return "(error)"; 1663 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
1664 1664 if (widget)
1665 std::string owner = panel->getOwnerName(); 1665 {
1666 1666 widget->setSelectCallback(addAllowedGroup2, NULL);
1667 LLViewerRegion* region = gAgent.getRegion(); 1667 if (parent_floater)
1668 if (gAgent.isGodlike()) 1668 {
1669 { 1669 LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget);
1670 return llformat("all estates\nowned by %s", owner.c_str()); 1670 widget->setOrigin(new_rect.mLeft, new_rect.mBottom);
1671 } 1671 parent_floater->addDependentFloater(widget);
1672 else if (region && region->getOwner() == gAgent.getID()) 1672 }
1673 { 1673 }
1674 return "all estates you own"; 1674
1675 } 1675 return false;
1676 else if (region && region->isEstateManager()) 1676}
1677 { 1677
1678 return llformat("all estates that\nyou manage for %s", owner.c_str()); 1678// static
1679 } 1679void LLPanelEstateInfo::onClickRemoveAllowedGroup(void* user_data)
1680 else 1680{
1681 { 1681 accessRemoveCore(ESTATE_ACCESS_ALLOWED_GROUP_REMOVE, "EstateAllowedGroupRemove", "allowed_group_name_list");
1682 return "(error)"; 1682}
1683 } 1683
1684} 1684// static
1685 1685void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data)
1686// static 1686{
1687bool LLPanelEstateInfo::isLindenEstate() 1687 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1688{ 1688 LLCtrlListInterface *list = self->childGetListInterface("banned_avatar_name_list");
1689 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1689 if (!list) return;
1690 if (!panel) return false; 1690 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
1691 1691 {
1692 U32 estate_id = panel->getEstateID(); 1692 LLSD args;
1693 return (estate_id <= ESTATE_LAST_LINDEN); 1693 args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1694} 1694 LLNotifications::instance().add("MaxBannedAgentsOnRegion", args);
1695 1695 return;
1696typedef std::vector<LLUUID> AgentOrGroupIDsVector; 1696 }
1697struct LLEstateAccessChangeInfo 1697 accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd");
1698{ 1698}
1699 LLEstateAccessChangeInfo(const LLSD& sd) 1699
1700 { 1700// static
1701 mDialogName = sd["dialog_name"].asString(); 1701void LLPanelEstateInfo::onClickRemoveBannedAgent(void* user_data)
1702 mOperationFlag = (U32)sd["operation"].asInteger(); 1702{
1703 LLSD::array_const_iterator end_it = sd["allowed_ids"].endArray(); 1703 accessRemoveCore(ESTATE_ACCESS_BANNED_AGENT_REMOVE, "EstateBannedAgentRemove", "banned_avatar_name_list");
1704 for (LLSD::array_const_iterator id_it = sd["allowed_ids"].beginArray(); 1704}
1705 id_it != end_it; 1705
1706 ++id_it) 1706// static
1707 { 1707void LLPanelEstateInfo::onClickAddEstateManager(void* user_data)
1708 mAgentOrGroupIDs.push_back(id_it->asUUID()); 1708{
1709 } 1709 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1710 } 1710 LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list");
1711 1711 if (!list) return;
1712 const LLSD asLLSD() const 1712 if (list->getItemCount() >= ESTATE_MAX_MANAGERS)
1713 { 1713 { // Tell user they can't add more managers
1714 LLSD sd; 1714 LLSD args;
1715 sd["name"] = mDialogName; 1715 args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS);
1716 sd["operation"] = (S32)mOperationFlag; 1716 LLNotifications::instance().add("MaxManagersOnRegion", args);
1717 for (AgentOrGroupIDsVector::const_iterator it = mAgentOrGroupIDs.begin(); 1717 }
1718 it != mAgentOrGroupIDs.end(); 1718 else
1719 ++it) 1719 { // Go pick managers to add
1720 { 1720 accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
1721 sd["allowed_ids"].append(*it); 1721 }
1722 } 1722}
1723 return sd; 1723
1724 } 1724// static
1725 1725void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data)
1726 U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc. 1726{
1727 std::string mDialogName; 1727 accessRemoveCore(ESTATE_ACCESS_MANAGER_REMOVE, "EstateManagerRemove", "estate_manager_name_list");
1728 AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change 1728}
1729}; 1729
1730 1730//---------------------------------------------------------------------------
1731// Special case callback for groups, since it has different callback format than names 1731// Kick from estate methods
1732// static 1732//---------------------------------------------------------------------------
1733void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data) 1733struct LLKickFromEstateInfo
1734{ 1734{
1735 LLSD payload; 1735 LLPanelEstateInfo *mEstatePanelp;
1736 payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD; 1736 LLUUID mAgentID;
1737 payload["dialog_name"] = "EstateAllowedGroupAdd"; 1737};
1738 payload["allowed_ids"].append(id); 1738
1739 1739void LLPanelEstateInfo::onClickKickUser(void *user_data)
1740 LLSD args; 1740{
1741 args["ALL_ESTATES"] = all_estates_text(); 1741 LLPanelEstateInfo* panelp = (LLPanelEstateInfo*)user_data;
1742 1742
1743 LLNotification::Params params("EstateAllowedGroupAdd"); 1743 // this depends on the grandparent view being a floater
1744 params.payload(payload) 1744 // in order to set up floater dependency
1745 .substitutions(args) 1745 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
1746 .functor(accessCoreConfirm); 1746 LLFloater* child_floater = LLFloaterAvatarPicker::show(LLPanelEstateInfo::onKickUserCommit, user_data, FALSE, TRUE);
1747 if (isLindenEstate()) 1747 parent_floater->addDependentFloater(child_floater);
1748 { 1748}
1749 LLNotifications::instance().forceResponse(params, 0); 1749
1750 } 1750void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata)
1751 else 1751{
1752 { 1752 if (names.empty() || ids.empty()) return;
1753 LLNotifications::instance().add(params); 1753
1754 } 1754 //check to make sure there is one valid user and id
1755} 1755 if( (ids[0].isNull()) ||
1756 1756 (names[0].length() == 0) )
1757// static 1757 {
1758void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dialog_name) 1758 return;
1759{ 1759 }
1760 LLSD payload; 1760
1761 payload["operation"] = (S32)operation_flag; 1761 LLPanelEstateInfo* self = (LLPanelEstateInfo*)userdata;
1762 payload["dialog_name"] = dialog_name; 1762 if(!self) return;
1763 // agent id filled in after avatar picker 1763
1764 1764 //keep track of what user they want to kick and other misc info
1765 LLNotification::Params params("ChangeLindenAccess"); 1765 LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo();
1766 params.payload(payload) 1766 kick_info->mEstatePanelp = self;
1767 .functor(accessAddCore2); 1767 kick_info->mAgentID = ids[0];
1768 1768
1769 if (isLindenEstate()) 1769 //Bring up a confirmation dialog
1770 { 1770 LLSD args;
1771 LLNotifications::instance().add(params); 1771 args["EVIL_USER"] = names[0];
1772 } 1772 LLSD payload;
1773 else 1773 payload["agent_id"] = ids[0];
1774 { 1774 LLNotifications::instance().add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2));
1775 // same as clicking "OK" 1775
1776 LLNotifications::instance().forceResponse(params, 0); 1776}
1777 } 1777
1778} 1778bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& response)
1779 1779{
1780// static 1780 S32 option = LLNotification::getSelectedOption(notification, response);
1781bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response) 1781 switch(option)
1782{ 1782 {
1783 S32 option = LLNotification::getSelectedOption(notification, response); 1783 case 0:
1784 if (option != 0) 1784 {
1785 { 1785 //Kick User
1786 // abort change 1786 strings_t strings;
1787 return false; 1787 strings.push_back(notification["payload"]["agent_id"].asString());
1788 } 1788
1789 1789 sendEstateOwnerMessage(gMessageSystem, "kickestate", LLFloaterRegionInfo::getLastInvoice(), strings);
1790 LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]); 1790 break;
1791 // avatar picker yes multi-select, yes close-on-select 1791 }
1792 LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, TRUE, TRUE); 1792 default:
1793 return false; 1793 break;
1794} 1794 }
1795 1795 return false;
1796// static 1796}
1797void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data) 1797
1798{ 1798//---------------------------------------------------------------------------
1799 LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data; 1799// Core Add/Remove estate access methods
1800 if (!change_info) return; 1800// TODO: INTERNATIONAL: don't build message text here;
1801 if (ids.empty()) 1801// instead, create multiple translatable messages and choose
1802 { 1802// one based on the status.
1803 // User didn't select a name. 1803//---------------------------------------------------------------------------
1804 delete change_info; 1804std::string all_estates_text()
1805 change_info = NULL; 1805{
1806 return; 1806 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
1807 } 1807 if (!panel) return "(error)";
1808 // User did select a name. 1808
1809 change_info->mAgentOrGroupIDs = ids; 1809 std::string owner = panel->getOwnerName();
1810 // Can't put estate owner on ban list 1810
1811 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1811 LLViewerRegion* region = gAgent.getRegion();
1812 if (!panel) return; 1812 if (gAgent.isGodlike())
1813 LLViewerRegion* region = gAgent.getRegion(); 1813 {
1814 if (!region) return; 1814 return llformat("all estates\nowned by %s", owner.c_str());
1815 1815 }
1816 if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD) 1816 else if (region && region->getOwner() == gAgent.getID())
1817 { 1817 {
1818 LLCtrlListInterface *list = panel->childGetListInterface("allowed_avatar_name_list"); 1818 return "all estates you own";
1819 int currentCount = (list ? list->getItemCount() : 0); 1819 }
1820 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) 1820 else if (region && region->isEstateManager())
1821 { 1821 {
1822 LLSD args; 1822 return llformat("all estates that\nyou manage for %s", owner.c_str());
1823 args["NUM_ADDED"] = llformat("%d",ids.size()); 1823 }
1824 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1824 else
1825 args["LIST_TYPE"] = "Allowed Residents"; 1825 {
1826 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); 1826 return "(error)";
1827 LLNotifications::instance().add("MaxAgentOnRegionBatch", args); 1827 }
1828 delete change_info; 1828}
1829 return; 1829
1830 } 1830// static
1831 } 1831bool LLPanelEstateInfo::isLindenEstate()
1832 if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD) 1832{
1833 { 1833 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
1834 LLCtrlListInterface *list = panel->childGetListInterface("banned_avatar_name_list"); 1834 if (!panel) return false;
1835 int currentCount = (list ? list->getItemCount() : 0); 1835
1836 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) 1836 U32 estate_id = panel->getEstateID();
1837 { 1837 return (estate_id <= ESTATE_LAST_LINDEN);
1838 LLSD args; 1838}
1839 args["NUM_ADDED"] = llformat("%d",ids.size()); 1839
1840 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1840typedef std::vector<LLUUID> AgentOrGroupIDsVector;
1841 args["LIST_TYPE"] = "Banned Residents"; 1841struct LLEstateAccessChangeInfo
1842 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); 1842{
1843 LLNotifications::instance().add("MaxAgentOnRegionBatch", args); 1843 LLEstateAccessChangeInfo(const LLSD& sd)
1844 delete change_info; 1844 {
1845 return; 1845 mDialogName = sd["dialog_name"].asString();
1846 } 1846 mOperationFlag = (U32)sd["operation"].asInteger();
1847 } 1847 LLSD::array_const_iterator end_it = sd["allowed_ids"].endArray();
1848 1848 for (LLSD::array_const_iterator id_it = sd["allowed_ids"].beginArray();
1849 LLSD args; 1849 id_it != end_it;
1850 args["ALL_ESTATES"] = all_estates_text(); 1850 ++id_it)
1851 1851 {
1852 LLNotification::Params params(change_info->mDialogName); 1852 mAgentOrGroupIDs.push_back(id_it->asUUID());
1853 params.substitutions(args) 1853 }
1854 .payload(change_info->asLLSD()) 1854 }
1855 .functor(accessCoreConfirm); 1855
1856 1856 const LLSD asLLSD() const
1857 if (isLindenEstate()) 1857 {
1858 { 1858 LLSD sd;
1859 // just apply to this estate 1859 sd["name"] = mDialogName;
1860 LLNotifications::instance().forceResponse(params, 0); 1860 sd["operation"] = (S32)mOperationFlag;
1861 } 1861 for (AgentOrGroupIDsVector::const_iterator it = mAgentOrGroupIDs.begin();
1862 else 1862 it != mAgentOrGroupIDs.end();
1863 { 1863 ++it)
1864 // ask if this estate or all estates with this owner 1864 {
1865 LLNotifications::instance().add(params); 1865 sd["allowed_ids"].append(*it);
1866 } 1866 }
1867} 1867 return sd;
1868 1868 }
1869// static 1869
1870void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name) 1870 U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc.
1871{ 1871 std::string mDialogName;
1872 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1872 AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change
1873 if (!panel) return; 1873};
1874 LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>(list_ctrl_name); 1874
1875 if (!name_list) return; 1875// Special case callback for groups, since it has different callback format than names
1876 1876// static
1877 std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected(); 1877void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data)
1878 if (list_vector.size() == 0) 1878{
1879 return; 1879 LLSD payload;
1880 1880 payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
1881 LLSD payload; 1881 payload["dialog_name"] = "EstateAllowedGroupAdd";
1882 payload["operation"] = (S32)operation_flag; 1882 payload["allowed_ids"].append(id);
1883 payload["dialog_name"] = dialog_name; 1883
1884 1884 LLSD args;
1885 for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin(); 1885 args["ALL_ESTATES"] = all_estates_text();
1886 iter != list_vector.end(); 1886
1887 iter++) 1887 LLNotification::Params params("EstateAllowedGroupAdd");
1888 { 1888 params.payload(payload)
1889 LLScrollListItem *item = (*iter); 1889 .substitutions(args)
1890 payload["allowed_ids"].append(item->getUUID()); 1890 .functor(accessCoreConfirm);
1891 } 1891 if (isLindenEstate())
1892 1892 {
1893 LLNotification::Params params("ChangeLindenAccess"); 1893 LLNotifications::instance().forceResponse(params, 0);
1894 params.payload(payload) 1894 }
1895 .functor(accessRemoveCore2); 1895 else
1896 1896 {
1897 if (isLindenEstate()) 1897 LLNotifications::instance().add(params);
1898 { 1898 }
1899 // warn on change linden estate 1899}
1900 LLNotifications::instance().add(params); 1900
1901 } 1901// static
1902 else 1902void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dialog_name)
1903 { 1903{
1904 // just proceed, as if clicking OK 1904 LLSD payload;
1905 LLNotifications::instance().forceResponse(params, 0); 1905 payload["operation"] = (S32)operation_flag;
1906 } 1906 payload["dialog_name"] = dialog_name;
1907} 1907 // agent id filled in after avatar picker
1908 1908
1909// static 1909 LLNotification::Params params("ChangeLindenAccess");
1910bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response) 1910 params.payload(payload)
1911{ 1911 .functor(accessAddCore2);
1912 S32 option = LLNotification::getSelectedOption(notification, response); 1912
1913 if (option != 0) 1913 if (isLindenEstate())
1914 { 1914 {
1915 // abort 1915 LLNotifications::instance().add(params);
1916 return false; 1916 }
1917 } 1917 else
1918 1918 {
1919 // If Linden estate, can only apply to "this" estate, not all estates 1919 // same as clicking "OK"
1920 // owned by NULL. 1920 LLNotifications::instance().forceResponse(params, 0);
1921 if (isLindenEstate()) 1921 }
1922 { 1922}
1923 accessCoreConfirm(notification, response); 1923
1924 } 1924// static
1925 else 1925bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response)
1926 { 1926{
1927 LLSD args; 1927 S32 option = LLNotification::getSelectedOption(notification, response);
1928 args["ALL_ESTATES"] = all_estates_text(); 1928 if (option != 0)
1929 LLNotifications::instance().add(notification["payload"]["dialog_name"], 1929 {
1930 args, 1930 // abort change
1931 notification["payload"], 1931 return false;
1932 accessCoreConfirm); 1932 }
1933 } 1933
1934 return false; 1934 LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]);
1935} 1935 // avatar picker yes multi-select, yes close-on-select
1936 1936 LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, TRUE, TRUE);
1937// Used for both access add and remove operations, depending on the mOperationFlag 1937 return false;
1938// passed in (ESTATE_ACCESS_BANNED_AGENT_ADD, ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, etc.) 1938}
1939// static 1939
1940bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response) 1940// static
1941{ 1941void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
1942 S32 option = LLNotification::getSelectedOption(notification, response); 1942{
1943 const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger(); 1943 LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data;
1944 1944 if (!change_info) return;
1945 LLViewerRegion* region = gAgent.getRegion(); 1945 if (ids.empty())
1946 1946 {
1947 LLSD::array_const_iterator end_it = notification["payload"]["allowed_ids"].endArray(); 1947 // User didn't select a name.
1948 1948 delete change_info;
1949 for (LLSD::array_const_iterator iter = notification["payload"]["allowed_ids"].beginArray(); 1949 change_info = NULL;
1950 iter != end_it; 1950 return;
1951 iter++) 1951 }
1952 { 1952 // User did select a name.
1953 U32 flags = originalFlags; 1953 change_info->mAgentOrGroupIDs = ids;
1954 if (iter + 1 != end_it) 1954 // Can't put estate owner on ban list
1955 flags |= ESTATE_ACCESS_NO_REPLY; 1955 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
1956 1956 if (!panel) return;
1957 const LLUUID id = iter->asUUID(); 1957 LLViewerRegion* region = gAgent.getRegion();
1958 if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD) 1958 if (!region) return;
1959 && region && (region->getOwner() == id)) 1959
1960 { 1960 if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD)
1961 LLNotifications::instance().add("OwnerCanNotBeDenied"); 1961 {
1962 break; 1962 LLCtrlListInterface *list = panel->childGetListInterface("allowed_avatar_name_list");
1963 } 1963 int currentCount = (list ? list->getItemCount() : 0);
1964 switch(option) 1964 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
1965 { 1965 {
1966 case 0: 1966 LLSD args;
1967 // This estate 1967 args["NUM_ADDED"] = llformat("%d",ids.size());
1968 sendEstateAccessDelta(flags, id); 1968 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1969 break; 1969 args["LIST_TYPE"] = "Allowed Residents";
1970 case 1: 1970 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
1971 { 1971 LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
1972 // All estates, either than I own or manage for this owner. 1972 delete change_info;
1973 // This will be verified on simulator. JC 1973 return;
1974 if (!region) break; 1974 }
1975 if (region->getOwner() == gAgent.getID() 1975 }
1976 || gAgent.isGodlike()) 1976 if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD)
1977 { 1977 {
1978 flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES; 1978 LLCtrlListInterface *list = panel->childGetListInterface("banned_avatar_name_list");
1979 sendEstateAccessDelta(flags, id); 1979 int currentCount = (list ? list->getItemCount() : 0);
1980 } 1980 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
1981 else if (region->isEstateManager()) 1981 {
1982 { 1982 LLSD args;
1983 flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES; 1983 args["NUM_ADDED"] = llformat("%d",ids.size());
1984 sendEstateAccessDelta(flags, id); 1984 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1985 } 1985 args["LIST_TYPE"] = "Banned Residents";
1986 break; 1986 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
1987 } 1987 LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
1988 case 2: 1988 delete change_info;
1989 default: 1989 return;
1990 break; 1990 }
1991 } 1991 }
1992 } 1992
1993 return false; 1993 LLSD args;
1994} 1994 args["ALL_ESTATES"] = all_estates_text();
1995 1995
1996// key = "estateaccessdelta" 1996 LLNotification::Params params(change_info->mDialogName);
1997// str(estate_id) will be added to front of list by forward_EstateOwnerRequest_to_dataserver 1997 params.substitutions(args)
1998// str[0] = str(agent_id) requesting the change 1998 .payload(change_info->asLLSD())
1999// str[1] = str(flags) (ESTATE_ACCESS_DELTA_*) 1999 .functor(accessCoreConfirm);
2000// str[2] = str(agent_id) to add or remove 2000
2001// static 2001 if (isLindenEstate())
2002void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_group_id) 2002 {
2003{ 2003 // just apply to this estate
2004 LLMessageSystem* msg = gMessageSystem; 2004 LLNotifications::instance().forceResponse(params, 0);
2005 msg->newMessage("EstateOwnerMessage"); 2005 }
2006 msg->nextBlockFast(_PREHASH_AgentData); 2006 else
2007 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2007 {
2008 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 2008 // ask if this estate or all estates with this owner
2009 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 2009 LLNotifications::instance().add(params);
2010 2010 }
2011 msg->nextBlock("MethodData"); 2011}
2012 msg->addString("Method", "estateaccessdelta"); 2012
2013 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); 2013// static
2014 2014void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name)
2015 std::string buf; 2015{
2016 gAgent.getID().toString(buf); 2016 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
2017 msg->nextBlock("ParamList"); 2017 if (!panel) return;
2018 msg->addString("Parameter", buf); 2018 LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>(list_ctrl_name);
2019 2019 if (!name_list) return;
2020 buf = llformat("%u", flags); 2020
2021 msg->nextBlock("ParamList"); 2021 std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected();
2022 msg->addString("Parameter", buf); 2022 if (list_vector.size() == 0)
2023 2023 return;
2024 agent_or_group_id.toString(buf); 2024
2025 msg->nextBlock("ParamList"); 2025 LLSD payload;
2026 msg->addString("Parameter", buf); 2026 payload["operation"] = (S32)operation_flag;
2027 2027 payload["dialog_name"] = dialog_name;
2028 2028
2029 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 2029 for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin();
2030 2030 iter != list_vector.end();
2031 if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | 2031 iter++)
2032 ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_BANNED_AGENT_REMOVE)) 2032 {
2033 { 2033 LLScrollListItem *item = (*iter);
2034 2034 payload["allowed_ids"].append(item->getUUID());
2035 panel->clearAccessLists(); 2035 }
2036 } 2036
2037 2037 LLNotification::Params params("ChangeLindenAccess");
2038 gAgent.sendReliableMessage(); 2038 params.payload(payload)
2039} 2039 .functor(accessRemoveCore2);
2040 2040
2041void LLPanelEstateInfo::updateControls(LLViewerRegion* region) 2041 if (isLindenEstate())
2042{ 2042 {
2043 BOOL god = gAgent.isGodlike(); 2043 // warn on change linden estate
2044 BOOL owner = (region && (region->getOwner() == gAgent.getID())); 2044 LLNotifications::instance().add(params);
2045 BOOL manager = (region && region->isEstateManager()); 2045 }
2046 setCtrlsEnabled(god || owner || manager); 2046 else
2047 2047 {
2048 childDisable("apply_btn"); 2048 // just proceed, as if clicking OK
2049 childSetEnabled("add_allowed_avatar_btn", god || owner || manager); 2049 LLNotifications::instance().forceResponse(params, 0);
2050 childSetEnabled("remove_allowed_avatar_btn", god || owner || manager); 2050 }
2051 childSetEnabled("add_allowed_group_btn", god || owner || manager); 2051}
2052 childSetEnabled("remove_allowed_group_btn", god || owner || manager); 2052
2053 childSetEnabled("add_banned_avatar_btn", god || owner || manager); 2053// static
2054 childSetEnabled("remove_banned_avatar_btn", god || owner || manager); 2054bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response)
2055 childSetEnabled("message_estate_btn", god || owner || manager); 2055{
2056 childSetEnabled("kick_user_from_estate_btn", god || owner || manager); 2056 S32 option = LLNotification::getSelectedOption(notification, response);
2057#if ELAR_ENABLED 2057 if (option != 0)
2058 childSetEnabled("abuse_email_address", god || owner || manager); 2058 {
2059#else 2059 // abort
2060 childSetEnabled("abuse_email_address", false); 2060 return false;
2061#endif 2061 }
2062 2062
2063 // estate managers can't add estate managers 2063 // If Linden estate, can only apply to "this" estate, not all estates
2064 childSetEnabled("add_estate_manager_btn", god || owner); 2064 // owned by NULL.
2065 childSetEnabled("remove_estate_manager_btn", god || owner); 2065 if (isLindenEstate())
2066 childSetEnabled("estate_manager_name_list", god || owner); 2066 {
2067} 2067 accessCoreConfirm(notification, response);
2068 2068 }
2069bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) 2069 else
2070{ 2070 {
2071 updateControls(region); 2071 LLSD args;
2072 2072 args["ALL_ESTATES"] = all_estates_text();
2073 // let the parent class handle the general data collection. 2073 LLNotifications::instance().add(notification["payload"]["dialog_name"],
2074 bool rv = LLPanelRegionInfo::refreshFromRegion(region); 2074 args,
2075 2075 notification["payload"],
2076 // We want estate info. To make sure it works across region 2076 accessCoreConfirm);
2077 // boundaries and multiple packets, we add a serial number to the 2077 }
2078 // integers and track against that on update. 2078 return false;
2079 strings_t strings; 2079}
2080 //integers_t integers; 2080
2081 //LLFloaterRegionInfo::incrementSerial(); 2081// Used for both access add and remove operations, depending on the mOperationFlag
2082 LLFloaterRegionInfo::nextInvoice(); 2082// passed in (ESTATE_ACCESS_BANNED_AGENT_ADD, ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, etc.)
2083 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 2083// static
2084 //integers.push_back(LLFloaterRegionInfo::());::getPanelEstate(); 2084bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response)
2085 2085{
2086 2086 S32 option = LLNotification::getSelectedOption(notification, response);
2087 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 2087 const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger();
2088 panel->clearAccessLists(); 2088
2089 2089 LLViewerRegion* region = gAgent.getRegion();
2090 2090
2091 sendEstateOwnerMessage(gMessageSystem, "getinfo", invoice, strings); 2091 LLSD::array_const_iterator end_it = notification["payload"]["allowed_ids"].endArray();
2092 2092
2093 refresh(); 2093 for (LLSD::array_const_iterator iter = notification["payload"]["allowed_ids"].beginArray();
2094 2094 iter != end_it;
2095 return rv; 2095 iter++)
2096} 2096 {
2097 2097 U32 flags = originalFlags;
2098void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) 2098 if (iter + 1 != end_it)
2099{ 2099 flags |= ESTATE_ACCESS_NO_REPLY;
2100 if (checkRemovalButton(child_ctrl->getName())) 2100
2101 { 2101 const LLUUID id = iter->asUUID();
2102 // do nothing 2102 if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD)
2103 } 2103 && region && (region->getOwner() == id))
2104 else if (checkSunHourSlider(child_ctrl)) 2104 {
2105 { 2105 LLNotifications::instance().add("OwnerCanNotBeDenied");
2106 // do nothing 2106 break;
2107 } 2107 }
2108} 2108 switch(option)
2109 2109 {
2110bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) 2110 case 0:
2111{ 2111 // This estate
2112 llinfos << "LLPanelEstateInfo::estateUpdate()" << llendl; 2112 sendEstateAccessDelta(flags, id);
2113 return false; 2113 break;
2114} 2114 case 1:
2115 2115 {
2116 2116 // All estates, either than I own or manage for this owner.
2117BOOL LLPanelEstateInfo::postBuild() 2117 // This will be verified on simulator. JC
2118{ 2118 if (!region) break;
2119 // set up the callbacks for the generic controls 2119 if (region->getOwner() == gAgent.getID()
2120 initCtrl("externally_visible_check"); 2120 || gAgent.isGodlike())
2121 initCtrl("use_global_time_check"); 2121 {
2122 initCtrl("fixed_sun_check"); 2122 flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES;
2123 initCtrl("allow_direct_teleport"); 2123 sendEstateAccessDelta(flags, id);
2124 initCtrl("limit_payment"); 2124 }
2125 initCtrl("limit_age_verified"); 2125 else if (region->isEstateManager())
2126 initCtrl("voice_chat_check"); 2126 {
2127 childSetCommitCallback("abuse_email_address", onChangeAnything, this); 2127 flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES;
2128 childSetKeystrokeCallback("abuse_email_address", onChangeText, this); 2128 sendEstateAccessDelta(flags, id);
2129 2129 }
2130 initHelpBtn("estate_manager_help", "HelpEstateEstateManager"); 2130 break;
2131 initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime"); 2131 }
2132 initHelpBtn("fixed_sun_help", "HelpEstateFixedSun"); 2132 case 2:
2133 initHelpBtn("WLEditSkyHelp", "HelpEditSky"); 2133 default:
2134 initHelpBtn("WLEditDayCycleHelp", "HelpEditDayCycle"); 2134 break;
2135 2135 }
2136 initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible"); 2136 }
2137 initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport"); 2137 return false;
2138 initHelpBtn("allow_resident_help", "HelpEstateAllowResident"); 2138}
2139 initHelpBtn("allow_group_help", "HelpEstateAllowGroup"); 2139
2140 initHelpBtn("ban_resident_help", "HelpEstateBanResident"); 2140// key = "estateaccessdelta"
2141 initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress"); 2141// str(estate_id) will be added to front of list by forward_EstateOwnerRequest_to_dataserver
2142 initHelpBtn("voice_chat_help", "HelpEstateVoiceChat"); 2142// str[0] = str(agent_id) requesting the change
2143 2143// str[1] = str(flags) (ESTATE_ACCESS_DELTA_*)
2144 // set up the use global time checkbox 2144// str[2] = str(agent_id) to add or remove
2145 childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this); 2145// static
2146 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this); 2146void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_group_id)
2147 childSetCommitCallback("sun_hour_slider", onChangeChildCtrl, this); 2147{
2148 2148 LLMessageSystem* msg = gMessageSystem;
2149 childSetCommitCallback("allowed_avatar_name_list", onChangeChildCtrl, this); 2149 msg->newMessage("EstateOwnerMessage");
2150 LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); 2150 msg->nextBlockFast(_PREHASH_AgentData);
2151 if (avatar_name_list) 2151 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2152 { 2152 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
2153 avatar_name_list->setCommitOnSelectionChange(TRUE); 2153 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
2154 avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); 2154
2155 } 2155 msg->nextBlock("MethodData");
2156 2156 msg->addString("Method", "estateaccessdelta");
2157 childSetAction("add_allowed_avatar_btn", onClickAddAllowedAgent, this); 2157 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
2158 childSetAction("remove_allowed_avatar_btn", onClickRemoveAllowedAgent, this); 2158
2159 2159 std::string buf;
2160 childSetCommitCallback("allowed_group_name_list", onChangeChildCtrl, this); 2160 gAgent.getID().toString(buf);
2161 LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list"); 2161 msg->nextBlock("ParamList");
2162 if (group_name_list) 2162 msg->addString("Parameter", buf);
2163 { 2163
2164 group_name_list->setCommitOnSelectionChange(TRUE); 2164 buf = llformat("%u", flags);
2165 group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); 2165 msg->nextBlock("ParamList");
2166 } 2166 msg->addString("Parameter", buf);
2167 2167
2168 childSetAction("add_allowed_group_btn", onClickAddAllowedGroup, this); 2168 agent_or_group_id.toString(buf);
2169 childSetAction("remove_allowed_group_btn", onClickRemoveAllowedGroup, this); 2169 msg->nextBlock("ParamList");
2170 2170 msg->addString("Parameter", buf);
2171 childSetCommitCallback("banned_avatar_name_list", onChangeChildCtrl, this); 2171
2172 LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list"); 2172
2173 if (banned_name_list) 2173 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
2174 { 2174
2175 banned_name_list->setCommitOnSelectionChange(TRUE); 2175 if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE |
2176 banned_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); 2176 ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_BANNED_AGENT_REMOVE))
2177 } 2177 {
2178 2178
2179 childSetAction("add_banned_avatar_btn", onClickAddBannedAgent, this); 2179 panel->clearAccessLists();
2180 childSetAction("remove_banned_avatar_btn", onClickRemoveBannedAgent, this); 2180 }
2181 2181
2182 childSetCommitCallback("estate_manager_name_list", onChangeChildCtrl, this); 2182 gAgent.sendReliableMessage();
2183 LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list"); 2183}
2184 if (manager_name_list) 2184
2185 { 2185void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
2186 manager_name_list->setCommitOnSelectionChange(TRUE); 2186{
2187 manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue 2187 BOOL god = gAgent.isGodlike();
2188 } 2188 BOOL owner = (region && (region->getOwner() == gAgent.getID()));
2189 2189 BOOL manager = (region && region->isEstateManager());
2190 childSetAction("add_estate_manager_btn", onClickAddEstateManager, this); 2190 setCtrlsEnabled(god || owner || manager);
2191 childSetAction("remove_estate_manager_btn", onClickRemoveEstateManager, this); 2191
2192 childSetAction("message_estate_btn", onClickMessageEstate, this); 2192 childDisable("apply_btn");
2193 childSetAction("kick_user_from_estate_btn", onClickKickUser, this); 2193 childSetEnabled("add_allowed_avatar_btn", god || owner || manager);
2194 2194 childSetEnabled("remove_allowed_avatar_btn", god || owner || manager);
2195 childSetAction("WLEditSky", onClickEditSky, this); 2195 childSetEnabled("add_allowed_group_btn", god || owner || manager);
2196 childSetAction("WLEditDayCycle", onClickEditDayCycle, this); 2196 childSetEnabled("remove_allowed_group_btn", god || owner || manager);
2197 2197 childSetEnabled("add_banned_avatar_btn", god || owner || manager);
2198 return LLPanelRegionInfo::postBuild(); 2198 childSetEnabled("remove_banned_avatar_btn", god || owner || manager);
2199} 2199 childSetEnabled("message_estate_btn", god || owner || manager);
2200 2200 childSetEnabled("kick_user_from_estate_btn", god || owner || manager);
2201void LLPanelEstateInfo::refresh() 2201 childSetEnabled("abuse_email_address", god || owner || manager);
2202{ 2202
2203 bool public_access = childGetValue("externally_visible_check").asBoolean(); 2203 // estate managers can't add estate managers
2204 childSetEnabled("Only Allow", public_access); 2204 childSetEnabled("add_estate_manager_btn", god || owner);
2205 childSetEnabled("limit_payment", public_access); 2205 childSetEnabled("remove_estate_manager_btn", god || owner);
2206 childSetEnabled("limit_age_verified", public_access); 2206 childSetEnabled("estate_manager_name_list", god || owner);
2207 // if this is set to false, then the limit fields are meaningless and should be turned off 2207}
2208 if (public_access == false) 2208
2209 { 2209bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
2210 childSetValue("limit_payment", false); 2210{
2211 childSetValue("limit_age_verified", false); 2211 updateControls(region);
2212 } 2212
2213} 2213 // let the parent class handle the general data collection.
2214 2214 bool rv = LLPanelRegionInfo::refreshFromRegion(region);
2215BOOL LLPanelEstateInfo::sendUpdate() 2215
2216{ 2216 // We want estate info. To make sure it works across region
2217 llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl; 2217 // boundaries and multiple packets, we add a serial number to the
2218 2218 // integers and track against that on update.
2219 LLNotification::Params params("ChangeLindenEstate"); 2219 strings_t strings;
2220 params.functor(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2)); 2220 //integers_t integers;
2221 2221 //LLFloaterRegionInfo::incrementSerial();
2222 if (getEstateID() <= ESTATE_LAST_LINDEN) 2222 LLFloaterRegionInfo::nextInvoice();
2223 { 2223 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
2224 // trying to change reserved estate, warn 2224 //integers.push_back(LLFloaterRegionInfo::());::getPanelEstate();
2225 LLNotifications::instance().add(params); 2225
2226 } 2226
2227 else 2227 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
2228 { 2228 panel->clearAccessLists();
2229 // for normal estates, just make the change 2229
2230 LLNotifications::instance().forceResponse(params, 0); 2230
2231 } 2231 sendEstateOwnerMessage(gMessageSystem, "getinfo", invoice, strings);
2232 return TRUE; 2232
2233} 2233 refresh();
2234 2234
2235bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response) 2235 return rv;
2236{ 2236}
2237 S32 option = LLNotification::getSelectedOption(notification, response); 2237
2238 switch(option) 2238void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl)
2239 { 2239{
2240 case 0: 2240 if (checkRemovalButton(child_ctrl->getName()))
2241 // send the update 2241 {
2242 if (!commitEstateInfoCaps()) 2242 // do nothing
2243 { 2243 }
2244 // the caps method failed, try the old way 2244 else if (checkSunHourSlider(child_ctrl))
2245 LLFloaterRegionInfo::nextInvoice(); 2245 {
2246 commitEstateInfoDataserver(); 2246 // do nothing
2247 } 2247 }
2248 // we don't want to do this because we'll get it automatically from the sim 2248}
2249 // after the spaceserver processes it 2249
2250// else 2250bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg)
2251// { 2251{
2252// // caps method does not automatically send this info 2252 llinfos << "LLPanelEstateInfo::estateUpdate()" << llendl;
2253// LLFloaterRegionInfo::requestRegionInfo(); 2253 return false;
2254// } 2254}
2255 break; 2255
2256 case 1: 2256
2257 default: 2257BOOL LLPanelEstateInfo::postBuild()
2258 // do nothing 2258{
2259 break; 2259 // set up the callbacks for the generic controls
2260 } 2260 initCtrl("externally_visible_check");
2261 return false; 2261 initCtrl("use_global_time_check");
2262} 2262 initCtrl("fixed_sun_check");
2263 2263 initCtrl("allow_direct_teleport");
2264 2264 initCtrl("limit_payment");
2265/* 2265 initCtrl("limit_age_verified");
2266// Request = "getowner" 2266 initCtrl("voice_chat_check");
2267// SParam[0] = "" (empty string) 2267 childSetCommitCallback("abuse_email_address", onChangeAnything, this);
2268// IParam[0] = serial 2268 childSetKeystrokeCallback("abuse_email_address", onChangeText, this);
2269void LLPanelEstateInfo::getEstateOwner() 2269
2270{ 2270 initHelpBtn("estate_manager_help", "HelpEstateEstateManager");
2271 // TODO -- disable the panel 2271 initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime");
2272 // and call this function whenever we cross a region boundary 2272 initHelpBtn("fixed_sun_help", "HelpEstateFixedSun");
2273 // re-enable when owner matches, and get new estate info 2273 initHelpBtn("WLEditSkyHelp", "HelpEditSky");
2274 LLMessageSystem* msg = gMessageSystem; 2274 initHelpBtn("WLEditDayCycleHelp", "HelpEditDayCycle");
2275 msg->newMessageFast(_PREHASH_EstateOwnerRequest); 2275
2276 msg->nextBlockFast(_PREHASH_AgentData); 2276 initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible");
2277 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2277 initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport");
2278 2278 initHelpBtn("allow_resident_help", "HelpEstateAllowResident");
2279 msg->nextBlockFast(_PREHASH_RequestData); 2279 initHelpBtn("allow_group_help", "HelpEstateAllowGroup");
2280 msg->addStringFast(_PREHASH_Request, "getowner"); 2280 initHelpBtn("ban_resident_help", "HelpEstateBanResident");
2281 2281 initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress");
2282 // we send an empty string so that the variable block is not empty 2282 initHelpBtn("voice_chat_help", "HelpEstateVoiceChat");
2283 msg->nextBlockFast(_PREHASH_StringData); 2283
2284 msg->addStringFast(_PREHASH_SParam, ""); 2284 // set up the use global time checkbox
2285 2285 childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this);
2286 msg->nextBlockFast(_PREHASH_IntegerData); 2286 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this);
2287 msg->addS32Fast(_PREHASH_IParam, LLFloaterRegionInfo::getSerial()); 2287 childSetCommitCallback("sun_hour_slider", onChangeChildCtrl, this);
2288 2288
2289 gAgent.sendMessage(); 2289 childSetCommitCallback("allowed_avatar_name_list", onChangeChildCtrl, this);
2290} 2290 LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
2291*/ 2291 if (avatar_name_list)
2292 2292 {
2293class LLEstateChangeInfoResponder : public LLHTTPClient::Responder 2293 avatar_name_list->setCommitOnSelectionChange(TRUE);
2294{ 2294 avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
2295public: 2295 }
2296 LLEstateChangeInfoResponder(void* userdata) : mpPanel((LLPanelEstateInfo*)userdata) {}; 2296
2297 2297 childSetAction("add_allowed_avatar_btn", onClickAddAllowedAgent, this);
2298 // if we get a normal response, handle it here 2298 childSetAction("remove_allowed_avatar_btn", onClickRemoveAllowedAgent, this);
2299 virtual void result(const LLSD& content) 2299
2300 { 2300 childSetCommitCallback("allowed_group_name_list", onChangeChildCtrl, this);
2301 // refresh the panel from the database 2301 LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list");
2302 mpPanel->refresh(); 2302 if (group_name_list)
2303 } 2303 {
2304 2304 group_name_list->setCommitOnSelectionChange(TRUE);
2305 // if we get an error response 2305 group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
2306 virtual void error(U32 status, const std::string& reason) 2306 }
2307 { 2307
2308 llinfos << "LLEstateChangeInfoResponder::error " 2308 childSetAction("add_allowed_group_btn", onClickAddAllowedGroup, this);
2309 << status << ": " << reason << llendl; 2309 childSetAction("remove_allowed_group_btn", onClickRemoveAllowedGroup, this);
2310 } 2310
2311private: 2311 childSetCommitCallback("banned_avatar_name_list", onChangeChildCtrl, this);
2312 LLPanelEstateInfo* mpPanel; 2312 LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
2313}; 2313 if (banned_name_list)
2314 2314 {
2315// tries to send estate info using a cap; returns true if it succeeded 2315 banned_name_list->setCommitOnSelectionChange(TRUE);
2316bool LLPanelEstateInfo::commitEstateInfoCaps() 2316 banned_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
2317{ 2317 }
2318 std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo"); 2318
2319 2319 childSetAction("add_banned_avatar_btn", onClickAddBannedAgent, this);
2320 if (url.empty()) 2320 childSetAction("remove_banned_avatar_btn", onClickRemoveBannedAgent, this);
2321 { 2321
2322 // whoops, couldn't find the cap, so bail out 2322 childSetCommitCallback("estate_manager_name_list", onChangeChildCtrl, this);
2323 return false; 2323 LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list");
2324 } 2324 if (manager_name_list)
2325 2325 {
2326 LLSD body; 2326 manager_name_list->setCommitOnSelectionChange(TRUE);
2327 body["estate_name"] = getEstateName(); 2327 manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
2328 2328 }
2329 body["is_externally_visible"] = childGetValue("externally_visible_check").asBoolean(); 2329
2330 body["allow_direct_teleport"] = childGetValue("allow_direct_teleport").asBoolean(); 2330 childSetAction("add_estate_manager_btn", onClickAddEstateManager, this);
2331 body["is_sun_fixed" ] = childGetValue("fixed_sun_check").asBoolean(); 2331 childSetAction("remove_estate_manager_btn", onClickRemoveEstateManager, this);
2332 body["deny_anonymous" ] = childGetValue("limit_payment").asBoolean(); 2332 childSetAction("message_estate_btn", onClickMessageEstate, this);
2333 body["deny_age_unverified" ] = childGetValue("limit_age_verified").asBoolean(); 2333 childSetAction("kick_user_from_estate_btn", onClickKickUser, this);
2334 body["allow_voice_chat" ] = childGetValue("voice_chat_check").asBoolean(); 2334
2335 body["invoice" ] = LLFloaterRegionInfo::getLastInvoice(); 2335 childSetAction("WLEditSky", onClickEditSky, this);
2336 2336 childSetAction("WLEditDayCycle", onClickEditDayCycle, this);
2337 // block fly is in estate database but not in estate UI, so we're not supporting it 2337
2338 //body["block_fly" ] = childGetValue("").asBoolean(); 2338 return LLPanelRegionInfo::postBuild();
2339 2339}
2340 F32 sun_hour = getSunHour(); 2340
2341 if (childGetValue("use_global_time_check").asBoolean()) 2341void LLPanelEstateInfo::refresh()
2342 { 2342{
2343 sun_hour = 0.f; // 0 = global time 2343 bool public_access = childGetValue("externally_visible_check").asBoolean();
2344 } 2344 childSetEnabled("Only Allow", public_access);
2345 body["sun_hour"] = sun_hour; 2345 childSetEnabled("limit_payment", public_access);
2346 2346 childSetEnabled("limit_age_verified", public_access);
2347 body["owner_abuse_email"] = childGetValue("abuse_email_address").asString(); 2347 // if this is set to false, then the limit fields are meaningless and should be turned off
2348 2348 if (public_access == false)
2349 // we use a responder so that we can re-get the data after committing to the database 2349 {
2350 LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder((void*)this)); 2350 childSetValue("limit_payment", false);
2351 return true; 2351 childSetValue("limit_age_verified", false);
2352} 2352 }
2353 2353}
2354/* This is the old way of doing things, is deprecated, and should be 2354
2355 deleted when the dataserver model can be removed */ 2355BOOL LLPanelEstateInfo::sendUpdate()
2356// key = "estatechangeinfo" 2356{
2357// strings[0] = str(estate_id) (added by simulator before relay - not here) 2357 llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl;
2358// strings[1] = estate_name 2358
2359// strings[2] = str(estate_flags) 2359 LLNotification::Params params("ChangeLindenEstate");
2360// strings[3] = str((S32)(sun_hour * 1024.f)) 2360 params.functor(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2));
2361void LLPanelEstateInfo::commitEstateInfoDataserver() 2361
2362{ 2362 if (getEstateID() <= ESTATE_LAST_LINDEN)
2363 LLMessageSystem* msg = gMessageSystem; 2363 {
2364 msg->newMessage("EstateOwnerMessage"); 2364 // trying to change reserved estate, warn
2365 msg->nextBlockFast(_PREHASH_AgentData); 2365 LLNotifications::instance().add(params);
2366 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2366 }
2367 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 2367 else
2368 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 2368 {
2369 2369 // for normal estates, just make the change
2370 msg->nextBlock("MethodData"); 2370 LLNotifications::instance().forceResponse(params, 0);
2371 msg->addString("Method", "estatechangeinfo"); 2371 }
2372 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); 2372 return TRUE;
2373 2373}
2374 msg->nextBlock("ParamList"); 2374
2375 msg->addString("Parameter", getEstateName()); 2375bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response)
2376 2376{
2377 std::string buffer; 2377 S32 option = LLNotification::getSelectedOption(notification, response);
2378 buffer = llformat("%u", computeEstateFlags()); 2378 switch(option)
2379 msg->nextBlock("ParamList"); 2379 {
2380 msg->addString("Parameter", buffer); 2380 case 0:
2381 2381 // send the update
2382 F32 sun_hour = getSunHour(); 2382 if (!commitEstateInfoCaps())
2383 if (childGetValue("use_global_time_check").asBoolean()) 2383 {
2384 { 2384 // the caps method failed, try the old way
2385 sun_hour = 0.f; // 0 = global time 2385 LLFloaterRegionInfo::nextInvoice();
2386 } 2386 commitEstateInfoDataserver();
2387 2387 }
2388 buffer = llformat("%d", (S32)(sun_hour*1024.0f)); 2388 // we don't want to do this because we'll get it automatically from the sim
2389 msg->nextBlock("ParamList"); 2389 // after the spaceserver processes it
2390 msg->addString("Parameter", buffer); 2390// else
2391 2391// {
2392 gAgent.sendMessage(); 2392// // caps method does not automatically send this info
2393} 2393// LLFloaterRegionInfo::requestRegionInfo();
2394 2394// }
2395void LLPanelEstateInfo::setEstateFlags(U32 flags) 2395 break;
2396{ 2396 case 1:
2397 childSetValue("externally_visible_check", LLSD(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE) ); 2397 default:
2398 childSetValue("fixed_sun_check", LLSD(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE) ); 2398 // do nothing
2399 childSetValue( 2399 break;
2400 "voice_chat_check", 2400 }
2401 LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE)); 2401 return false;
2402 childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) ); 2402}
2403 childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) ); 2403
2404 childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) ); 2404
2405 2405/*
2406 refresh(); 2406// Request = "getowner"
2407} 2407// SParam[0] = "" (empty string)
2408 2408// IParam[0] = serial
2409U32 LLPanelEstateInfo::computeEstateFlags() 2409void LLPanelEstateInfo::getEstateOwner()
2410{ 2410{
2411 U32 flags = 0; 2411 // TODO -- disable the panel
2412 2412 // and call this function whenever we cross a region boundary
2413 if (childGetValue("externally_visible_check").asBoolean()) 2413 // re-enable when owner matches, and get new estate info
2414 { 2414 LLMessageSystem* msg = gMessageSystem;
2415 flags |= REGION_FLAGS_EXTERNALLY_VISIBLE; 2415 msg->newMessageFast(_PREHASH_EstateOwnerRequest);
2416 } 2416 msg->nextBlockFast(_PREHASH_AgentData);
2417 2417 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2418 if ( childGetValue("voice_chat_check").asBoolean() ) 2418
2419 { 2419 msg->nextBlockFast(_PREHASH_RequestData);
2420 flags |= REGION_FLAGS_ALLOW_VOICE; 2420 msg->addStringFast(_PREHASH_Request, "getowner");
2421 } 2421
2422 2422 // we send an empty string so that the variable block is not empty
2423 if (childGetValue("allow_direct_teleport").asBoolean()) 2423 msg->nextBlockFast(_PREHASH_StringData);
2424 { 2424 msg->addStringFast(_PREHASH_SParam, "");
2425 flags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT; 2425
2426 } 2426 msg->nextBlockFast(_PREHASH_IntegerData);
2427 2427 msg->addS32Fast(_PREHASH_IParam, LLFloaterRegionInfo::getSerial());
2428 if (childGetValue("fixed_sun_check").asBoolean()) 2428
2429 { 2429 gAgent.sendMessage();
2430 flags |= REGION_FLAGS_SUN_FIXED; 2430}
2431 } 2431*/
2432 2432
2433 if (childGetValue("limit_payment").asBoolean()) 2433class LLEstateChangeInfoResponder : public LLHTTPClient::Responder
2434 { 2434{
2435 flags |= REGION_FLAGS_DENY_ANONYMOUS; 2435public:
2436 } 2436 LLEstateChangeInfoResponder(void* userdata) : mpPanel((LLPanelEstateInfo*)userdata) {};
2437 2437
2438 if (childGetValue("limit_age_verified").asBoolean()) 2438 // if we get a normal response, handle it here
2439 { 2439 virtual void result(const LLSD& content)
2440 flags |= REGION_FLAGS_DENY_AGEUNVERIFIED; 2440 {
2441 } 2441 // refresh the panel from the database
2442 2442 mpPanel->refresh();
2443 2443 }
2444 return flags; 2444
2445} 2445 // if we get an error response
2446 2446 virtual void error(U32 status, const std::string& reason)
2447BOOL LLPanelEstateInfo::getGlobalTime() 2447 {
2448{ 2448 llinfos << "LLEstateChangeInfoResponder::error "
2449 return childGetValue("use_global_time_check").asBoolean(); 2449 << status << ": " << reason << llendl;
2450} 2450 }
2451 2451private:
2452void LLPanelEstateInfo::setGlobalTime(bool b) 2452 LLPanelEstateInfo* mpPanel;
2453{ 2453};
2454 childSetValue("use_global_time_check", LLSD(b)); 2454
2455 childSetEnabled("fixed_sun_check", LLSD(!b)); 2455// tries to send estate info using a cap; returns true if it succeeded
2456 childSetEnabled("sun_hour_slider", LLSD(!b)); 2456bool LLPanelEstateInfo::commitEstateInfoCaps()
2457 if (b) 2457{
2458 { 2458 std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo");
2459 childSetValue("sun_hour_slider", LLSD(0.f)); 2459
2460 } 2460 if (url.empty())
2461} 2461 {
2462 2462 // whoops, couldn't find the cap, so bail out
2463 2463 return false;
2464BOOL LLPanelEstateInfo::getFixedSun() 2464 }
2465{ 2465
2466 return childGetValue("fixed_sun_check").asBoolean(); 2466 LLSD body;
2467} 2467 body["estate_name"] = getEstateName();
2468 2468
2469void LLPanelEstateInfo::setSunHour(F32 sun_hour) 2469 body["is_externally_visible"] = childGetValue("externally_visible_check").asBoolean();
2470{ 2470 body["allow_direct_teleport"] = childGetValue("allow_direct_teleport").asBoolean();
2471 if(sun_hour < 6.0f) 2471 body["is_sun_fixed" ] = childGetValue("fixed_sun_check").asBoolean();
2472 { 2472 body["deny_anonymous" ] = childGetValue("limit_payment").asBoolean();
2473 sun_hour = 24.0f + sun_hour; 2473 body["deny_age_unverified" ] = childGetValue("limit_age_verified").asBoolean();
2474 } 2474 body["allow_voice_chat" ] = childGetValue("voice_chat_check").asBoolean();
2475 childSetValue("sun_hour_slider", LLSD(sun_hour)); 2475 body["invoice" ] = LLFloaterRegionInfo::getLastInvoice();
2476} 2476
2477 2477 // block fly is in estate database but not in estate UI, so we're not supporting it
2478F32 LLPanelEstateInfo::getSunHour() 2478 //body["block_fly" ] = childGetValue("").asBoolean();
2479{ 2479
2480 if (childIsEnabled("sun_hour_slider")) 2480 F32 sun_hour = getSunHour();
2481 { 2481 if (childGetValue("use_global_time_check").asBoolean())
2482 return (F32)childGetValue("sun_hour_slider").asReal(); 2482 {
2483 } 2483 sun_hour = 0.f; // 0 = global time
2484 return 0.f; 2484 }
2485} 2485 body["sun_hour"] = sun_hour;
2486 2486
2487const std::string LLPanelEstateInfo::getEstateName() const 2487 body["owner_abuse_email"] = childGetValue("abuse_email_address").asString();
2488{ 2488
2489 return childGetValue("estate_name").asString(); 2489 // we use a responder so that we can re-get the data after committing to the database
2490} 2490 LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder((void*)this));
2491 2491 return true;
2492void LLPanelEstateInfo::setEstateName(const std::string& name) 2492}
2493{ 2493
2494 childSetValue("estate_name", LLSD(name)); 2494/* This is the old way of doing things, is deprecated, and should be
2495} 2495 deleted when the dataserver model can be removed */
2496 2496// key = "estatechangeinfo"
2497const std::string LLPanelEstateInfo::getOwnerName() const 2497// strings[0] = str(estate_id) (added by simulator before relay - not here)
2498{ 2498// strings[1] = estate_name
2499 return childGetValue("estate_owner").asString(); 2499// strings[2] = str(estate_flags)
2500} 2500// strings[3] = str((S32)(sun_hour * 1024.f))
2501 2501void LLPanelEstateInfo::commitEstateInfoDataserver()
2502void LLPanelEstateInfo::setOwnerName(const std::string& name) 2502{
2503{ 2503 LLMessageSystem* msg = gMessageSystem;
2504 childSetValue("estate_owner", LLSD(name)); 2504 msg->newMessage("EstateOwnerMessage");
2505} 2505 msg->nextBlockFast(_PREHASH_AgentData);
2506 2506 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2507const std::string LLPanelEstateInfo::getAbuseEmailAddress() const 2507 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
2508{ 2508 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
2509 return childGetValue("abuse_email_address").asString(); 2509
2510} 2510 msg->nextBlock("MethodData");
2511 2511 msg->addString("Method", "estatechangeinfo");
2512void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address) 2512 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
2513{ 2513
2514 childSetValue("abuse_email_address", LLSD(address)); 2514 msg->nextBlock("ParamList");
2515} 2515 msg->addString("Parameter", getEstateName());
2516 2516
2517void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, 2517 std::string buffer;
2518 bool enable_group, 2518 buffer = llformat("%u", computeEstateFlags());
2519 bool enable_ban) 2519 msg->nextBlock("ParamList");
2520{ 2520 msg->addString("Parameter", buffer);
2521 childSetEnabled("allow_resident_label", enable_agent); 2521
2522 childSetEnabled("allowed_avatar_name_list", enable_agent); 2522 F32 sun_hour = getSunHour();
2523 childSetVisible("allowed_avatar_name_list", enable_agent); 2523 if (childGetValue("use_global_time_check").asBoolean())
2524 childSetEnabled("add_allowed_avatar_btn", enable_agent); 2524 {
2525 childSetEnabled("remove_allowed_avatar_btn", enable_agent); 2525 sun_hour = 0.f; // 0 = global time
2526 2526 }
2527 // Groups 2527
2528 childSetEnabled("allow_group_label", enable_group); 2528 buffer = llformat("%d", (S32)(sun_hour*1024.0f));
2529 childSetEnabled("allowed_group_name_list", enable_group); 2529 msg->nextBlock("ParamList");
2530 childSetVisible("allowed_group_name_list", enable_group); 2530 msg->addString("Parameter", buffer);
2531 childSetEnabled("add_allowed_group_btn", enable_group); 2531
2532 childSetEnabled("remove_allowed_group_btn", enable_group); 2532 gAgent.sendMessage();
2533 2533}
2534 // Ban 2534
2535 childSetEnabled("ban_resident_label", enable_ban); 2535void LLPanelEstateInfo::setEstateFlags(U32 flags)
2536 childSetEnabled("banned_avatar_name_list", enable_ban); 2536{
2537 childSetVisible("banned_avatar_name_list", enable_ban); 2537 childSetValue("externally_visible_check", LLSD(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE) );
2538 childSetEnabled("add_banned_avatar_btn", enable_ban); 2538 childSetValue("fixed_sun_check", LLSD(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE) );
2539 childSetEnabled("remove_banned_avatar_btn", enable_ban); 2539 childSetValue(
2540 2540 "voice_chat_check",
2541 // Update removal buttons if needed 2541 LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE));
2542 if (enable_agent) 2542 childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) );
2543 { 2543 childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) );
2544 checkRemovalButton("allowed_avatar_name_list"); 2544 childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) );
2545 } 2545
2546 2546 refresh();
2547 if (enable_group) 2547}
2548 { 2548
2549 checkRemovalButton("allowed_group_name_list"); 2549U32 LLPanelEstateInfo::computeEstateFlags()
2550 } 2550{
2551 2551 U32 flags = 0;
2552 if (enable_ban) 2552
2553 { 2553 if (childGetValue("externally_visible_check").asBoolean())
2554 checkRemovalButton("banned_avatar_name_list"); 2554 {
2555 } 2555 flags |= REGION_FLAGS_EXTERNALLY_VISIBLE;
2556} 2556 }
2557 2557
2558// static 2558 if ( childGetValue("voice_chat_check").asBoolean() )
2559void LLPanelEstateInfo::callbackCacheName( 2559 {
2560 const LLUUID& id, 2560 flags |= REGION_FLAGS_ALLOW_VOICE;
2561 const std::string& first, 2561 }
2562 const std::string& last, 2562
2563 BOOL is_group, 2563 if (childGetValue("allow_direct_teleport").asBoolean())
2564 void*) 2564 {
2565{ 2565 flags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT;
2566 LLPanelEstateInfo* self = LLFloaterRegionInfo::getPanelEstate(); 2566 }
2567 if (!self) return; 2567
2568 2568 if (childGetValue("fixed_sun_check").asBoolean())
2569 std::string name; 2569 {
2570 2570 flags |= REGION_FLAGS_SUN_FIXED;
2571 if (id.isNull()) 2571 }
2572 { 2572
2573 name = "(none)"; 2573 if (childGetValue("limit_payment").asBoolean())
2574 } 2574 {
2575 else 2575 flags |= REGION_FLAGS_DENY_ANONYMOUS;
2576 { 2576 }
2577 name = first + " " + last; 2577
2578 } 2578 if (childGetValue("limit_age_verified").asBoolean())
2579 2579 {
2580 self->setOwnerName(name); 2580 flags |= REGION_FLAGS_DENY_AGEUNVERIFIED;
2581} 2581 }
2582 2582
2583void LLPanelEstateInfo::clearAccessLists() 2583
2584{ 2584 return flags;
2585 LLNameListCtrl* name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); 2585}
2586 if (name_list) 2586
2587 { 2587BOOL LLPanelEstateInfo::getGlobalTime()
2588 name_list->deleteAllItems(); 2588{
2589 } 2589 return childGetValue("use_global_time_check").asBoolean();
2590 2590}
2591 name_list = getChild<LLNameListCtrl>("banned_avatar_name_list"); 2591
2592 if (name_list) 2592void LLPanelEstateInfo::setGlobalTime(bool b)
2593 { 2593{
2594 name_list->deleteAllItems(); 2594 childSetValue("use_global_time_check", LLSD(b));
2595 } 2595 childSetEnabled("fixed_sun_check", LLSD(!b));
2596} 2596 childSetEnabled("sun_hour_slider", LLSD(!b));
2597 2597 if (b)
2598// enables/disables the "remove" button for the various allow/ban lists 2598 {
2599BOOL LLPanelEstateInfo::checkRemovalButton(std::string name) 2599 childSetValue("sun_hour_slider", LLSD(0.f));
2600{ 2600 }
2601 std::string btn_name = ""; 2601}
2602 if (name == "allowed_avatar_name_list") 2602
2603 { 2603
2604 btn_name = "remove_allowed_avatar_btn"; 2604BOOL LLPanelEstateInfo::getFixedSun()
2605 } 2605{
2606 else if (name == "allowed_group_name_list") 2606 return childGetValue("fixed_sun_check").asBoolean();
2607 { 2607}
2608 btn_name = "remove_allowed_group_btn"; 2608
2609 } 2609void LLPanelEstateInfo::setSunHour(F32 sun_hour)
2610 else if (name == "banned_avatar_name_list") 2610{
2611 { 2611 if(sun_hour < 6.0f)
2612 btn_name = "remove_banned_avatar_btn"; 2612 {
2613 } 2613 sun_hour = 24.0f + sun_hour;
2614 else if (name == "estate_manager_name_list") 2614 }
2615 { 2615 childSetValue("sun_hour_slider", LLSD(sun_hour));
2616 //ONLY OWNER CAN ADD /DELET ESTATE MANAGER 2616}
2617 LLViewerRegion* region = gAgent.getRegion(); 2617
2618 if (region && (region->getOwner() == gAgent.getID())) 2618F32 LLPanelEstateInfo::getSunHour()
2619 { 2619{
2620 btn_name = "remove_estate_manager_btn"; 2620 if (childIsEnabled("sun_hour_slider"))
2621 } 2621 {
2622 } 2622 return (F32)childGetValue("sun_hour_slider").asReal();
2623 2623 }
2624 // enable the remove button if something is selected 2624 return 0.f;
2625 LLNameListCtrl* name_list = getChild<LLNameListCtrl>(name); 2625}
2626 childSetEnabled(btn_name, name_list && name_list->getFirstSelected() ? TRUE : FALSE); 2626
2627 2627const std::string LLPanelEstateInfo::getEstateName() const
2628 return (btn_name != ""); 2628{
2629} 2629 return childGetValue("estate_name").asString();
2630 2630}
2631BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl) 2631
2632{ 2632void LLPanelEstateInfo::setEstateName(const std::string& name)
2633 BOOL found_child_ctrl = FALSE; 2633{
2634 if (child_ctrl->getName() == "sun_hour_slider") 2634 childSetValue("estate_name", LLSD(name));
2635 { 2635}
2636 enableButton("apply_btn"); 2636
2637 found_child_ctrl = TRUE; 2637const std::string LLPanelEstateInfo::getOwnerName() const
2638 } 2638{
2639 return found_child_ctrl; 2639 return childGetValue("estate_owner").asString();
2640} 2640}
2641 2641
2642// static 2642void LLPanelEstateInfo::setOwnerName(const std::string& name)
2643void LLPanelEstateInfo::onClickMessageEstate(void* userdata) 2643{
2644{ 2644 childSetValue("estate_owner", LLSD(name));
2645 llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl; 2645}
2646 LLNotifications::instance().add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2)); 2646
2647} 2647const std::string LLPanelEstateInfo::getAbuseEmailAddress() const
2648 2648{
2649bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& response) 2649 return childGetValue("abuse_email_address").asString();
2650{ 2650}
2651 S32 option = LLNotification::getSelectedOption(notification, response); 2651
2652 std::string text = response["message"].asString(); 2652void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address)
2653 if(option != 0) return false; 2653{
2654 if(text.empty()) return false; 2654 childSetValue("abuse_email_address", LLSD(address));
2655 llinfos << "Message to everyone: " << text << llendl; 2655}
2656 strings_t strings; 2656
2657 //integers_t integers; 2657void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent,
2658 std::string name; 2658 bool enable_group,
2659 gAgent.buildFullname(name); 2659 bool enable_ban)
2660 strings.push_back(strings_t::value_type(name)); 2660{
2661 strings.push_back(strings_t::value_type(text)); 2661 childSetEnabled("allow_resident_label", enable_agent);
2662 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 2662 childSetEnabled("allowed_avatar_name_list", enable_agent);
2663 sendEstateOwnerMessage(gMessageSystem, "instantmessage", invoice, strings); 2663 childSetVisible("allowed_avatar_name_list", enable_agent);
2664 return false; 2664 childSetEnabled("add_allowed_avatar_btn", enable_agent);
2665} 2665 childSetEnabled("remove_allowed_avatar_btn", enable_agent);
2666 2666
2667LLPanelEstateCovenant::LLPanelEstateCovenant() 2667 // Groups
2668: mCovenantID(LLUUID::null) 2668 childSetEnabled("allow_group_label", enable_group);
2669{ 2669 childSetEnabled("allowed_group_name_list", enable_group);
2670} 2670 childSetVisible("allowed_group_name_list", enable_group);
2671 2671 childSetEnabled("add_allowed_group_btn", enable_group);
2672// virtual 2672 childSetEnabled("remove_allowed_group_btn", enable_group);
2673bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region) 2673
2674{ 2674 // Ban
2675 LLTextBox* region_name = getChild<LLTextBox>("region_name_text"); 2675 childSetEnabled("ban_resident_label", enable_ban);
2676 if (region_name) 2676 childSetEnabled("banned_avatar_name_list", enable_ban);
2677 { 2677 childSetVisible("banned_avatar_name_list", enable_ban);
2678 region_name->setText(region->getName()); 2678 childSetEnabled("add_banned_avatar_btn", enable_ban);
2679 } 2679 childSetEnabled("remove_banned_avatar_btn", enable_ban);
2680 2680
2681 LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); 2681 // Update removal buttons if needed
2682 if (resellable_clause) 2682 if (enable_agent)
2683 { 2683 {
2684 if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) 2684 checkRemovalButton("allowed_avatar_name_list");
2685 { 2685 }
2686 resellable_clause->setText(getString("can_not_resell")); 2686
2687 } 2687 if (enable_group)
2688 else 2688 {
2689 { 2689 checkRemovalButton("allowed_group_name_list");
2690 resellable_clause->setText(getString("can_resell")); 2690 }
2691 } 2691
2692 } 2692 if (enable_ban)
2693 2693 {
2694 LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause"); 2694 checkRemovalButton("banned_avatar_name_list");
2695 if (changeable_clause) 2695 }
2696 { 2696}
2697 if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES) 2697
2698 { 2698// static
2699 changeable_clause->setText(getString("can_change")); 2699void LLPanelEstateInfo::callbackCacheName(
2700 } 2700 const LLUUID& id,
2701 else 2701 const std::string& first,
2702 { 2702 const std::string& last,
2703 changeable_clause->setText(getString("can_not_change")); 2703 BOOL is_group,
2704 } 2704 void*)
2705 } 2705{
2706 2706 LLPanelEstateInfo* self = LLFloaterRegionInfo::getPanelEstate();
2707 LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text"); 2707 if (!self) return;
2708 if (region_maturity) 2708
2709 { 2709 std::string name;
2710 region_maturity->setText(region->getSimAccessString()); 2710
2711 } 2711 if (id.isNull())
2712 2712 {
2713 LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text"); 2713 name = "(none)";
2714 if (region_landtype) 2714 }
2715 { 2715 else
2716 region_landtype->setText(region->getSimProductName()); 2716 {
2717 } 2717 name = first + " " + last;
2718 2718 }
2719 2719
2720 // let the parent class handle the general data collection. 2720 self->setOwnerName(name);
2721 bool rv = LLPanelRegionInfo::refreshFromRegion(region); 2721}
2722 LLMessageSystem *msg = gMessageSystem; 2722
2723 msg->newMessage("EstateCovenantRequest"); 2723void LLPanelEstateInfo::clearAccessLists()
2724 msg->nextBlockFast(_PREHASH_AgentData); 2724{
2725 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2725 LLNameListCtrl* name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
2726 msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); 2726 if (name_list)
2727 msg->sendReliable(region->getHost()); 2727 {
2728 return rv; 2728 name_list->deleteAllItems();
2729} 2729 }
2730 2730
2731// virtual 2731 name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
2732bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg) 2732 if (name_list)
2733{ 2733 {
2734 llinfos << "LLPanelEstateCovenant::estateUpdate()" << llendl; 2734 name_list->deleteAllItems();
2735 return true; 2735 }
2736} 2736}
2737 2737
2738// virtual 2738// enables/disables the "remove" button for the various allow/ban lists
2739BOOL LLPanelEstateCovenant::postBuild() 2739BOOL LLPanelEstateInfo::checkRemovalButton(std::string name)
2740{ 2740{
2741 initHelpBtn("covenant_help", "HelpEstateCovenant"); 2741 std::string btn_name = "";
2742 mEstateNameText = getChild<LLTextBox>("estate_name_text"); 2742 if (name == "allowed_avatar_name_list")
2743 mEstateOwnerText = getChild<LLTextBox>("estate_owner_text"); 2743 {
2744 mLastModifiedText = getChild<LLTextBox>("covenant_timestamp_text"); 2744 btn_name = "remove_allowed_avatar_btn";
2745 mEditor = getChild<LLViewerTextEditor>("covenant_editor"); 2745 }
2746 if (mEditor) mEditor->setHandleEditKeysDirectly(TRUE); 2746 else if (name == "allowed_group_name_list")
2747 LLButton* reset_button = getChild<LLButton>("reset_covenant"); 2747 {
2748 reset_button->setEnabled(gAgent.canManageEstate()); 2748 btn_name = "remove_allowed_group_btn";
2749 reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, NULL); 2749 }
2750 2750 else if (name == "banned_avatar_name_list")
2751 return LLPanelRegionInfo::postBuild(); 2751 {
2752} 2752 btn_name = "remove_banned_avatar_btn";
2753 2753 }
2754// virtual 2754 else if (name == "estate_manager_name_list")
2755void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl) 2755 {
2756{ 2756 //ONLY OWNER CAN ADD /DELET ESTATE MANAGER
2757} 2757 LLViewerRegion* region = gAgent.getRegion();
2758 2758 if (region && (region->getOwner() == gAgent.getID()))
2759// virtual 2759 {
2760BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, 2760 btn_name = "remove_estate_manager_btn";
2761 EDragAndDropType cargo_type, 2761 }
2762 void* cargo_data, 2762 }
2763 EAcceptance* accept, 2763
2764 std::string& tooltip_msg) 2764 // enable the remove button if something is selected
2765{ 2765 LLNameListCtrl* name_list = getChild<LLNameListCtrl>(name);
2766 LLInventoryItem* item = (LLInventoryItem*)cargo_data; 2766 childSetEnabled(btn_name, name_list && name_list->getFirstSelected() ? TRUE : FALSE);
2767 2767
2768 if (!gAgent.canManageEstate()) 2768 return (btn_name != "");
2769 { 2769}
2770 *accept = ACCEPT_NO; 2770
2771 return TRUE; 2771BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl)
2772 } 2772{
2773 2773 BOOL found_child_ctrl = FALSE;
2774 switch(cargo_type) 2774 if (child_ctrl->getName() == "sun_hour_slider")
2775 { 2775 {
2776 case DAD_NOTECARD: 2776 enableButton("apply_btn");
2777 *accept = ACCEPT_YES_COPY_SINGLE; 2777 found_child_ctrl = TRUE;
2778 if (item && drop) 2778 }
2779 { 2779 return found_child_ctrl;
2780 LLSD payload; 2780}
2781 payload["item_id"] = item->getUUID(); 2781
2782 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), payload, 2782// static
2783 LLPanelEstateCovenant::confirmChangeCovenantCallback); 2783void LLPanelEstateInfo::onClickMessageEstate(void* userdata)
2784 } 2784{
2785 break; 2785 llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl;
2786 default: 2786 LLNotifications::instance().add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2));
2787 *accept = ACCEPT_NO; 2787}
2788 break; 2788
2789 } 2789bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
2790 2790{
2791 return TRUE; 2791 S32 option = LLNotification::getSelectedOption(notification, response);
2792} 2792 std::string text = response["message"].asString();
2793 2793 if(option != 0) return false;
2794// static 2794 if(text.empty()) return false;
2795bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response) 2795 llinfos << "Message to everyone: " << text << llendl;
2796{ 2796 strings_t strings;
2797 S32 option = LLNotification::getSelectedOption(notification, response); 2797 //integers_t integers;
2798 LLInventoryItem* item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); 2798 std::string name;
2799 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant(); 2799 gAgent.buildFullname(name);
2800 2800 strings.push_back(strings_t::value_type(name));
2801 if (!item || !self) return false; 2801 strings.push_back(strings_t::value_type(text));
2802 2802 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
2803 switch(option) 2803 sendEstateOwnerMessage(gMessageSystem, "instantmessage", invoice, strings);
2804 { 2804 return false;
2805 case 0: 2805}
2806 self->loadInvItem(item); 2806
2807 break; 2807LLPanelEstateCovenant::LLPanelEstateCovenant()
2808 default: 2808: mCovenantID(LLUUID::null)
2809 break; 2809{
2810 } 2810}
2811 return false; 2811
2812} 2812// virtual
2813 2813bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)
2814// static 2814{
2815void LLPanelEstateCovenant::resetCovenantID(void* userdata) 2815 LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
2816{ 2816 if (region_name)
2817 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback); 2817 {
2818} 2818 region_name->setText(region->getName());
2819 2819 }
2820// static 2820
2821bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notification, const LLSD& response) 2821 LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
2822{ 2822 if (resellable_clause)
2823 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant(); 2823 {
2824 if (!self) return false; 2824 if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
2825 2825 {
2826 S32 option = LLNotification::getSelectedOption(notification, response); 2826 resellable_clause->setText(getString("can_not_resell"));
2827 switch(option) 2827 }
2828 { 2828 else
2829 case 0: 2829 {
2830 self->loadInvItem(NULL); 2830 resellable_clause->setText(getString("can_resell"));
2831 break; 2831 }
2832 default: 2832 }
2833 break; 2833
2834 } 2834 LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
2835 return false; 2835 if (changeable_clause)
2836} 2836 {
2837 2837 if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
2838void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp) 2838 {
2839{ 2839 changeable_clause->setText(getString("can_change"));
2840 const BOOL high_priority = TRUE; 2840 }
2841 if (itemp) 2841 else
2842 { 2842 {
2843 gAssetStorage->getInvItemAsset(gAgent.getRegionHost(), 2843 changeable_clause->setText(getString("can_not_change"));
2844 gAgent.getID(), 2844 }
2845 gAgent.getSessionID(), 2845 }
2846 itemp->getPermissions().getOwner(), 2846
2847 LLUUID::null, 2847 LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");
2848 itemp->getUUID(), 2848 if (region_maturity)
2849 itemp->getAssetUUID(), 2849 {
2850 itemp->getType(), 2850 region_maturity->setText(region->getSimAccessString());
2851 onLoadComplete, 2851 }
2852 (void*)this, 2852
2853 high_priority); 2853 LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
2854 mAssetStatus = ASSET_LOADING; 2854 if (region_landtype)
2855 } 2855 {
2856 else 2856 region_landtype->setText(region->getSimProductName());
2857 { 2857 }
2858 mAssetStatus = ASSET_LOADED; 2858
2859 setCovenantTextEditor("There is no Covenant provided for this Estate."); 2859
2860 sendChangeCovenantID(LLUUID::null); 2860 // let the parent class handle the general data collection.
2861 } 2861 bool rv = LLPanelRegionInfo::refreshFromRegion(region);
2862} 2862 LLMessageSystem *msg = gMessageSystem;
2863 2863 msg->newMessage("EstateCovenantRequest");
2864// static 2864 msg->nextBlockFast(_PREHASH_AgentData);
2865void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, 2865 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2866 const LLUUID& asset_uuid, 2866 msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
2867 LLAssetType::EType type, 2867 msg->sendReliable(region->getHost());
2868 void* user_data, S32 status, LLExtStat ext_status) 2868 return rv;
2869{ 2869}
2870 llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl; 2870
2871 LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data; 2871// virtual
2872 if( panelp ) 2872bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg)
2873 { 2873{
2874 if(0 == status) 2874 llinfos << "LLPanelEstateCovenant::estateUpdate()" << llendl;
2875 { 2875 return true;
2876 LLVFile file(vfs, asset_uuid, type, LLVFile::READ); 2876}
2877 2877
2878 S32 file_length = file.getSize(); 2878// virtual
2879 2879BOOL LLPanelEstateCovenant::postBuild()
2880 char* buffer = new char[file_length+1]; 2880{
2881 if (buffer == NULL) 2881 initHelpBtn("covenant_help", "HelpEstateCovenant");
2882 { 2882 mEstateNameText = getChild<LLTextBox>("estate_name_text");
2883 llerrs << "Memory Allocation Failed" << llendl; 2883 mEstateOwnerText = getChild<LLTextBox>("estate_owner_text");
2884 return; 2884 mLastModifiedText = getChild<LLTextBox>("covenant_timestamp_text");
2885 } 2885 mEditor = getChild<LLViewerTextEditor>("covenant_editor");
2886 2886 if (mEditor) mEditor->setHandleEditKeysDirectly(TRUE);
2887 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */ 2887 LLButton* reset_button = getChild<LLButton>("reset_covenant");
2888 // put a EOS at the end 2888 reset_button->setEnabled(gAgent.canManageEstate());
2889 buffer[file_length] = 0; 2889 reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, NULL);
2890 2890
2891 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) 2891 return LLPanelRegionInfo::postBuild();
2892 { 2892}
2893 if( !panelp->mEditor->importBuffer( buffer, file_length+1 ) ) 2893
2894 { 2894// virtual
2895 llwarns << "Problem importing estate covenant." << llendl; 2895void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl)
2896 LLNotifications::instance().add("ProblemImportingEstateCovenant"); 2896{
2897 } 2897}
2898 else 2898
2899 { 2899// virtual
2900 panelp->sendChangeCovenantID(asset_uuid); 2900BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
2901 } 2901 EDragAndDropType cargo_type,
2902 } 2902 void* cargo_data,
2903 else 2903 EAcceptance* accept,
2904 { 2904 std::string& tooltip_msg)
2905 // Version 0 (just text, doesn't include version number) 2905{
2906 panelp->sendChangeCovenantID(asset_uuid); 2906 LLInventoryItem* item = (LLInventoryItem*)cargo_data;
2907 } 2907
2908 delete[] buffer; 2908 if (!gAgent.canManageEstate())
2909 } 2909 {
2910 else 2910 *accept = ACCEPT_NO;
2911 { 2911 return TRUE;
2912 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); 2912 }
2913 2913
2914 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || 2914 switch(cargo_type)
2915 LL_ERR_FILE_EMPTY == status) 2915 {
2916 { 2916 case DAD_NOTECARD:
2917 LLNotifications::instance().add("MissingNotecardAssetID"); 2917 *accept = ACCEPT_YES_COPY_SINGLE;
2918 } 2918 if (item && drop)
2919 else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) 2919 {
2920 { 2920 LLSD payload;
2921 LLNotifications::instance().add("NotAllowedToViewNotecard"); 2921 payload["item_id"] = item->getUUID();
2922 } 2922 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), payload,
2923 else 2923 LLPanelEstateCovenant::confirmChangeCovenantCallback);
2924 { 2924 }
2925 LLNotifications::instance().add("UnableToLoadNotecardAsset"); 2925 break;
2926 } 2926 default:
2927 2927 *accept = ACCEPT_NO;
2928 llwarns << "Problem loading notecard: " << status << llendl; 2928 break;
2929 } 2929 }
2930 panelp->mAssetStatus = ASSET_LOADED; 2930
2931 panelp->setCovenantID(asset_uuid); 2931 return TRUE;
2932 } 2932}
2933} 2933
2934 2934// static
2935// key = "estatechangecovenantid" 2935bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response)
2936// strings[0] = str(estate_id) (added by simulator before relay - not here) 2936{
2937// strings[1] = str(covenant_id) 2937 S32 option = LLNotification::getSelectedOption(notification, response);
2938void LLPanelEstateCovenant::sendChangeCovenantID(const LLUUID &asset_id) 2938 LLInventoryItem* item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
2939{ 2939 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
2940 if (asset_id != getCovenantID()) 2940
2941 { 2941 if (!item || !self) return false;
2942 setCovenantID(asset_id); 2942
2943 2943 switch(option)
2944 LLMessageSystem* msg = gMessageSystem; 2944 {
2945 msg->newMessage("EstateOwnerMessage"); 2945 case 0:
2946 msg->nextBlockFast(_PREHASH_AgentData); 2946 self->loadInvItem(item);
2947 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2947 break;
2948 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 2948 default:
2949 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 2949 break;
2950 2950 }
2951 msg->nextBlock("MethodData"); 2951 return false;
2952 msg->addString("Method", "estatechangecovenantid"); 2952}
2953 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); 2953
2954 2954// static
2955 msg->nextBlock("ParamList"); 2955void LLPanelEstateCovenant::resetCovenantID(void* userdata)
2956 msg->addString("Parameter", getCovenantID().asString()); 2956{
2957 gAgent.sendReliableMessage(); 2957 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback);
2958 } 2958}
2959} 2959
2960 2960// static
2961// virtual 2961bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notification, const LLSD& response)
2962BOOL LLPanelEstateCovenant::sendUpdate() 2962{
2963{ 2963 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
2964 return TRUE; 2964 if (!self) return false;
2965} 2965
2966 2966 S32 option = LLNotification::getSelectedOption(notification, response);
2967const std::string& LLPanelEstateCovenant::getEstateName() const 2967 switch(option)
2968{ 2968 {
2969 return mEstateNameText->getText(); 2969 case 0:
2970} 2970 self->loadInvItem(NULL);
2971 2971 break;
2972void LLPanelEstateCovenant::setEstateName(const std::string& name) 2972 default:
2973{ 2973 break;
2974 mEstateNameText->setText(name); 2974 }
2975} 2975 return false;
2976 2976}
2977// static 2977
2978void LLPanelEstateCovenant::updateCovenantText(const std::string& string, const LLUUID& asset_id) 2978void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
2979{ 2979{
2980 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 2980 const BOOL high_priority = TRUE;
2981 if( panelp ) 2981 if (itemp)
2982 { 2982 {
2983 panelp->mEditor->setText(string); 2983 gAssetStorage->getInvItemAsset(gAgent.getRegionHost(),
2984 panelp->setCovenantID(asset_id); 2984 gAgent.getID(),
2985 } 2985 gAgent.getSessionID(),
2986} 2986 itemp->getPermissions().getOwner(),
2987 2987 LLUUID::null,
2988// static 2988 itemp->getUUID(),
2989void LLPanelEstateCovenant::updateEstateName(const std::string& name) 2989 itemp->getAssetUUID(),
2990{ 2990 itemp->getType(),
2991 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 2991 onLoadComplete,
2992 if( panelp ) 2992 (void*)this,
2993 { 2993 high_priority);
2994 panelp->mEstateNameText->setText(name); 2994 mAssetStatus = ASSET_LOADING;
2995 } 2995 }
2996} 2996 else
2997 2997 {
2998// static 2998 mAssetStatus = ASSET_LOADED;
2999void LLPanelEstateCovenant::updateLastModified(const std::string& text) 2999 setCovenantTextEditor("There is no Covenant provided for this Estate.");
3000{ 3000 sendChangeCovenantID(LLUUID::null);
3001 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 3001 }
3002 if( panelp ) 3002}
3003 { 3003
3004 panelp->mLastModifiedText->setText(text); 3004// static
3005 } 3005void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
3006} 3006 const LLUUID& asset_uuid,
3007 3007 LLAssetType::EType type,
3008// static 3008 void* user_data, S32 status, LLExtStat ext_status)
3009void LLPanelEstateCovenant::updateEstateOwnerName(const std::string& name) 3009{
3010{ 3010 llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl;
3011 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 3011 LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data;
3012 if( panelp ) 3012 if( panelp )
3013 { 3013 {
3014 panelp->mEstateOwnerText->setText(name); 3014 if(0 == status)
3015 } 3015 {
3016} 3016 LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
3017 3017
3018const std::string& LLPanelEstateCovenant::getOwnerName() const 3018 S32 file_length = file.getSize();
3019{ 3019
3020 return mEstateOwnerText->getText(); 3020 char* buffer = new char[file_length+1];
3021} 3021 if (buffer == NULL)
3022 3022 {
3023void LLPanelEstateCovenant::setOwnerName(const std::string& name) 3023 llerrs << "Memory Allocation Failed" << llendl;
3024{ 3024 return;
3025 mEstateOwnerText->setText(name); 3025 }
3026} 3026
3027 3027 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */
3028void LLPanelEstateCovenant::setCovenantTextEditor(const std::string& text) 3028 // put a EOS at the end
3029{ 3029 buffer[file_length] = 0;
3030 mEditor->setText(text); 3030
3031} 3031 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) )
3032 3032 {
3033// key = "estateupdateinfo" 3033 if( !panelp->mEditor->importBuffer( buffer, file_length+1 ) )
3034// strings[0] = estate name 3034 {
3035// strings[1] = str(owner_id) 3035 llwarns << "Problem importing estate covenant." << llendl;
3036// strings[2] = str(estate_id) 3036 LLNotifications::instance().add("ProblemImportingEstateCovenant");
3037// strings[3] = str(estate_flags) 3037 }
3038// strings[4] = str((S32)(sun_hour * 1024)) 3038 else
3039// strings[5] = str(parent_estate_id) 3039 {
3040// strings[6] = str(covenant_id) 3040 panelp->sendChangeCovenantID(asset_uuid);
3041// strings[7] = str(covenant_timestamp) 3041 }
3042// strings[8] = str(send_to_agent_only) 3042 }
3043// strings[9] = str(abuse_email_addr) 3043 else
3044bool LLDispatchEstateUpdateInfo::operator()( 3044 {
3045 const LLDispatcher* dispatcher, 3045 // Version 0 (just text, doesn't include version number)
3046 const std::string& key, 3046 panelp->sendChangeCovenantID(asset_uuid);
3047 const LLUUID& invoice, 3047 }
3048 const sparam_t& strings) 3048 delete[] buffer;
3049{ 3049 }
3050 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 3050 else
3051 if (!panel) return true; 3051 {
3052 3052 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
3053 // NOTE: LLDispatcher extracts strings with an extra \0 at the 3053
3054 // end. If we pass the std::string direct to the UI/renderer 3054 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
3055 // it draws with a weird character at the end of the string. 3055 LL_ERR_FILE_EMPTY == status)
3056 std::string estate_name = strings[0].c_str(); // preserve c_str() call! 3056 {
3057 panel->setEstateName(estate_name); 3057 LLNotifications::instance().add("MissingNotecardAssetID");
3058 3058 }
3059#if ELAR_ENABLED 3059 else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
3060 if (strings.size() > 9) 3060 {
3061 { 3061 LLNotifications::instance().add("NotAllowedToViewNotecard");
3062 std::string abuse_email = strings[9].c_str(); // preserve c_str() call! 3062 }
3063 panel->setAbuseEmailAddress(abuse_email); 3063 else
3064 } 3064 {
3065 else 3065 LLNotifications::instance().add("UnableToLoadNotecardAsset");
3066#endif 3066 }
3067 { 3067
3068 panel->setAbuseEmailAddress(panel->getString("email_unsupported")); 3068 llwarns << "Problem loading notecard: " << status << llendl;
3069 } 3069 }
3070 3070 panelp->mAssetStatus = ASSET_LOADED;
3071 LLViewerRegion* regionp = gAgent.getRegion(); 3071 panelp->setCovenantID(asset_uuid);
3072 3072 }
3073 LLUUID owner_id(strings[1]); 3073}
3074 regionp->setOwner(owner_id); 3074
3075 // Update estate owner name in UI 3075// key = "estatechangecovenantid"
3076 const BOOL is_group = FALSE; 3076// strings[0] = str(estate_id) (added by simulator before relay - not here)
3077 gCacheName->get(owner_id, is_group, LLPanelEstateInfo::callbackCacheName); 3077// strings[1] = str(covenant_id)
3078 3078void LLPanelEstateCovenant::sendChangeCovenantID(const LLUUID &asset_id)
3079 U32 estate_id = strtoul(strings[2].c_str(), NULL, 10); 3079{
3080 panel->setEstateID(estate_id); 3080 if (asset_id != getCovenantID())
3081 3081 {
3082 U32 flags = strtoul(strings[3].c_str(), NULL, 10); 3082 setCovenantID(asset_id);
3083 panel->setEstateFlags(flags); 3083
3084 3084 LLMessageSystem* msg = gMessageSystem;
3085 F32 sun_hour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f; 3085 msg->newMessage("EstateOwnerMessage");
3086 if(sun_hour == 0 && (flags & REGION_FLAGS_SUN_FIXED ? FALSE : TRUE)) 3086 msg->nextBlockFast(_PREHASH_AgentData);
3087 { 3087 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
3088 panel->setGlobalTime(TRUE); 3088 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3089 } 3089 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
3090 else 3090
3091 { 3091 msg->nextBlock("MethodData");
3092 panel->setGlobalTime(FALSE); 3092 msg->addString("Method", "estatechangecovenantid");
3093 panel->setSunHour(sun_hour); 3093 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
3094 } 3094
3095 3095 msg->nextBlock("ParamList");
3096 bool visible_from_mainland = (bool)(flags & REGION_FLAGS_EXTERNALLY_VISIBLE); 3096 msg->addString("Parameter", getCovenantID().asString());
3097 bool god = gAgent.isGodlike(); 3097 gAgent.sendReliableMessage();
3098 bool linden_estate = (estate_id <= ESTATE_LAST_LINDEN); 3098 }
3099 3099}
3100 // If visible from mainland, disable the access allowed 3100
3101 // UI, as anyone can teleport there. 3101// virtual
3102 // However, gods need to be able to edit the access list for 3102BOOL LLPanelEstateCovenant::sendUpdate()
3103 // linden estates, regardless of visibility, to allow object 3103{
3104 // and L$ transfers. 3104 return TRUE;
3105 bool enable_agent = (!visible_from_mainland || (god && linden_estate)); 3105}
3106 bool enable_group = enable_agent; 3106
3107 bool enable_ban = !linden_estate; 3107const std::string& LLPanelEstateCovenant::getEstateName() const
3108 panel->setAccessAllowedEnabled(enable_agent, enable_group, enable_ban); 3108{
3109 3109 return mEstateNameText->getText();
3110 return true; 3110}
3111} 3111
3112 3112void LLPanelEstateCovenant::setEstateName(const std::string& name)
3113 3113{
3114// key = "setaccess" 3114 mEstateNameText->setText(name);
3115// strings[0] = str(estate_id) 3115}
3116// strings[1] = str(packed_access_lists) 3116
3117// strings[2] = str(num allowed agent ids) 3117// static
3118// strings[3] = str(num allowed group ids) 3118void LLPanelEstateCovenant::updateCovenantText(const std::string& string, const LLUUID& asset_id)
3119// strings[4] = str(num banned agent ids) 3119{
3120// strings[5] = str(num estate manager agent ids) 3120 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant();
3121// strings[6] = bin(uuid) 3121 if( panelp )
3122// strings[7] = bin(uuid) 3122 {
3123// strings[8] = bin(uuid) 3123 panelp->mEditor->setText(string);
3124// ... 3124 panelp->setCovenantID(asset_id);
3125bool LLDispatchSetEstateAccess::operator()( 3125 }
3126 const LLDispatcher* dispatcher, 3126}
3127 const std::string& key, 3127
3128 const LLUUID& invoice, 3128// static
3129 const sparam_t& strings) 3129void LLPanelEstateCovenant::updateEstateName(const std::string& name)
3130{ 3130{
3131 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 3131 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant();
3132 if (!panel) return true; 3132 if( panelp )
3133 3133 {
3134 S32 index = 1; // skip estate_id 3134 panelp->mEstateNameText->setText(name);
3135 U32 access_flags = strtoul(strings[index++].c_str(), NULL,10); 3135 }
3136 S32 num_allowed_agents = strtol(strings[index++].c_str(), NULL, 10); 3136}
3137 S32 num_allowed_groups = strtol(strings[index++].c_str(), NULL, 10); 3137
3138 S32 num_banned_agents = strtol(strings[index++].c_str(), NULL, 10); 3138// static
3139 S32 num_estate_managers = strtol(strings[index++].c_str(), NULL, 10); 3139void LLPanelEstateCovenant::updateLastModified(const std::string& text)
3140 3140{
3141 // sanity ckecks 3141 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant();
3142 if (num_allowed_agents > 0 3142 if( panelp )
3143 && !(access_flags & ESTATE_ACCESS_ALLOWED_AGENTS)) 3143 {
3144 { 3144 panelp->mLastModifiedText->setText(text);
3145 llwarns << "non-zero count for allowed agents, but no corresponding flag" << llendl; 3145 }
3146 } 3146}
3147 if (num_allowed_groups > 0 3147
3148 && !(access_flags & ESTATE_ACCESS_ALLOWED_GROUPS)) 3148// static
3149 { 3149void LLPanelEstateCovenant::updateEstateOwnerName(const std::string& name)
3150 llwarns << "non-zero count for allowed groups, but no corresponding flag" << llendl; 3150{
3151 } 3151 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant();
3152 if (num_banned_agents > 0 3152 if( panelp )
3153 && !(access_flags & ESTATE_ACCESS_BANNED_AGENTS)) 3153 {
3154 { 3154 panelp->mEstateOwnerText->setText(name);
3155 llwarns << "non-zero count for banned agents, but no corresponding flag" << llendl; 3155 }
3156 } 3156}
3157 if (num_estate_managers > 0 3157
3158 && !(access_flags & ESTATE_ACCESS_MANAGERS)) 3158const std::string& LLPanelEstateCovenant::getOwnerName() const
3159 { 3159{
3160 llwarns << "non-zero count for managers, but no corresponding flag" << llendl; 3160 return mEstateOwnerText->getText();
3161 } 3161}
3162 3162
3163 // grab the UUID's out of the string fields 3163void LLPanelEstateCovenant::setOwnerName(const std::string& name)
3164 if (access_flags & ESTATE_ACCESS_ALLOWED_AGENTS) 3164{
3165 { 3165 mEstateOwnerText->setText(name);
3166 LLNameListCtrl* allowed_agent_name_list; 3166}
3167 allowed_agent_name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list"); 3167
3168 3168void LLPanelEstateCovenant::setCovenantTextEditor(const std::string& text)
3169 int totalAllowedAgents = num_allowed_agents; 3169{
3170 3170 mEditor->setText(text);
3171 if (allowed_agent_name_list) 3171}
3172 { 3172
3173 totalAllowedAgents += allowed_agent_name_list->getItemCount(); 3173// key = "estateupdateinfo"
3174 } 3174// strings[0] = estate name
3175 3175// strings[1] = str(owner_id)
3176 std::string msg = llformat("Allowed residents: (%d, max %d)", 3176// strings[2] = str(estate_id)
3177 totalAllowedAgents, 3177// strings[3] = str(estate_flags)
3178 ESTATE_MAX_ACCESS_IDS); 3178// strings[4] = str((S32)(sun_hour * 1024))
3179 panel->childSetValue("allow_resident_label", LLSD(msg)); 3179// strings[5] = str(parent_estate_id)
3180 3180// strings[6] = str(covenant_id)
3181 if (allowed_agent_name_list) 3181// strings[7] = str(covenant_timestamp)
3182 { 3182// strings[8] = str(send_to_agent_only)
3183 //allowed_agent_name_list->deleteAllItems(); 3183// strings[9] = str(abuse_email_addr)
3184 for (S32 i = 0; i < num_allowed_agents && i < ESTATE_MAX_ACCESS_IDS; i++) 3184bool LLDispatchEstateUpdateInfo::operator()(
3185 { 3185 const LLDispatcher* dispatcher,
3186 LLUUID id; 3186 const std::string& key,
3187 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3187 const LLUUID& invoice,
3188 allowed_agent_name_list->addNameItem(id); 3188 const sparam_t& strings)
3189 } 3189{
3190 panel->childSetEnabled("remove_allowed_avatar_btn", allowed_agent_name_list->getFirstSelected() ? TRUE : FALSE); 3190 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
3191 allowed_agent_name_list->sortByColumnIndex(0, TRUE); 3191 if (!panel) return true;
3192 } 3192
3193 } 3193 // NOTE: LLDispatcher extracts strings with an extra \0 at the
3194 3194 // end. If we pass the std::string direct to the UI/renderer
3195 if (access_flags & ESTATE_ACCESS_ALLOWED_GROUPS) 3195 // it draws with a weird character at the end of the string.
3196 { 3196 std::string estate_name = strings[0].c_str(); // preserve c_str() call!
3197 LLNameListCtrl* allowed_group_name_list; 3197 panel->setEstateName(estate_name);
3198 allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list"); 3198
3199 3199 if (strings.size() > 3)
3200 std::string msg = llformat("Allowed groups: (%d, max %d)", 3200 {
3201 num_allowed_groups, 3201 std::string abuse_email = strings[9].c_str(); // preserve c_str() call!
3202 (S32) ESTATE_MAX_GROUP_IDS); 3202 panel->setAbuseEmailAddress(abuse_email);
3203 panel->childSetValue("allow_group_label", LLSD(msg)); 3203 }
3204 3204 else
3205 if (allowed_group_name_list) 3205 {
3206 { 3206 panel->setAbuseEmailAddress(panel->getString("email_unsupported"));
3207 allowed_group_name_list->deleteAllItems(); 3207 }
3208 for (S32 i = 0; i < num_allowed_groups && i < ESTATE_MAX_GROUP_IDS; i++) 3208
3209 { 3209 LLViewerRegion* regionp = gAgent.getRegion();
3210 LLUUID id; 3210
3211 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3211 LLUUID owner_id(strings[1]);
3212 allowed_group_name_list->addGroupNameItem(id); 3212 regionp->setOwner(owner_id);
3213 } 3213 // Update estate owner name in UI
3214 panel->childSetEnabled("remove_allowed_group_btn", allowed_group_name_list->getFirstSelected() ? TRUE : FALSE); 3214 const BOOL is_group = FALSE;
3215 allowed_group_name_list->sortByColumnIndex(0, TRUE); 3215 gCacheName->get(owner_id, is_group, LLPanelEstateInfo::callbackCacheName);
3216 } 3216
3217 } 3217 U32 estate_id = strtoul(strings[2].c_str(), NULL, 10);
3218 3218 panel->setEstateID(estate_id);
3219 if (access_flags & ESTATE_ACCESS_BANNED_AGENTS) 3219
3220 { 3220 U32 flags = strtoul(strings[3].c_str(), NULL, 10);
3221 LLNameListCtrl* banned_agent_name_list; 3221 panel->setEstateFlags(flags);
3222 banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list"); 3222
3223 3223 F32 sun_hour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f;
3224 int totalBannedAgents = num_banned_agents; 3224 if(sun_hour == 0 && (flags & REGION_FLAGS_SUN_FIXED ? FALSE : TRUE))
3225 3225 {
3226 if (banned_agent_name_list) 3226 panel->setGlobalTime(TRUE);
3227 { 3227 }
3228 totalBannedAgents += banned_agent_name_list->getItemCount(); 3228 else
3229 } 3229 {
3230 3230 panel->setGlobalTime(FALSE);
3231 3231 panel->setSunHour(sun_hour);
3232 std::string msg = llformat("Banned residents: (%d, max %d)", 3232 }
3233 totalBannedAgents, 3233
3234 ESTATE_MAX_ACCESS_IDS); 3234 bool visible_from_mainland = (bool)(flags & REGION_FLAGS_EXTERNALLY_VISIBLE);
3235 panel->childSetValue("ban_resident_label", LLSD(msg)); 3235 bool god = gAgent.isGodlike();
3236 3236 bool linden_estate = (estate_id <= ESTATE_LAST_LINDEN);
3237 if (banned_agent_name_list) 3237
3238 { 3238 // If visible from mainland, disable the access allowed
3239 //banned_agent_name_list->deleteAllItems(); 3239 // UI, as anyone can teleport there.
3240 for (S32 i = 0; i < num_banned_agents && i < ESTATE_MAX_ACCESS_IDS; i++) 3240 // However, gods need to be able to edit the access list for
3241 { 3241 // linden estates, regardless of visibility, to allow object
3242 LLUUID id; 3242 // and L$ transfers.
3243 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3243 bool enable_agent = (!visible_from_mainland || (god && linden_estate));
3244 banned_agent_name_list->addNameItem(id); 3244 bool enable_group = enable_agent;
3245 } 3245 bool enable_ban = !linden_estate;
3246 panel->childSetEnabled("remove_banned_avatar_btn", banned_agent_name_list->getFirstSelected() ? TRUE : FALSE); 3246 panel->setAccessAllowedEnabled(enable_agent, enable_group, enable_ban);
3247 banned_agent_name_list->sortByColumnIndex(0, TRUE); 3247
3248 } 3248 return true;
3249 } 3249}
3250 3250
3251 if (access_flags & ESTATE_ACCESS_MANAGERS) 3251
3252 { 3252// key = "setaccess"
3253 std::string msg = llformat("Estate Managers: (%d, max %d)", 3253// strings[0] = str(estate_id)
3254 num_estate_managers, 3254// strings[1] = str(packed_access_lists)
3255 ESTATE_MAX_MANAGERS); 3255// strings[2] = str(num allowed agent ids)
3256 panel->childSetValue("estate_manager_label", LLSD(msg)); 3256// strings[3] = str(num allowed group ids)
3257 3257// strings[4] = str(num banned agent ids)
3258 LLNameListCtrl* estate_manager_name_list = 3258// strings[5] = str(num estate manager agent ids)
3259 panel->getChild<LLNameListCtrl>("estate_manager_name_list"); 3259// strings[6] = bin(uuid)
3260 if (estate_manager_name_list) 3260// strings[7] = bin(uuid)
3261 { 3261// strings[8] = bin(uuid)
3262 estate_manager_name_list->deleteAllItems(); // Clear existing entries 3262// ...
3263 3263bool LLDispatchSetEstateAccess::operator()(
3264 // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't 3264 const LLDispatcher* dispatcher,
3265 // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused, 3265 const std::string& key,
3266 // and they can still remove them. 3266 const LLUUID& invoice,
3267 for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++) 3267 const sparam_t& strings)
3268 { 3268{
3269 LLUUID id; 3269 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
3270 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3270 if (!panel) return true;
3271 estate_manager_name_list->addNameItem(id); 3271
3272 } 3272 S32 index = 1; // skip estate_id
3273 panel->childSetEnabled("remove_estate_manager_btn", estate_manager_name_list->getFirstSelected() ? TRUE : FALSE); 3273 U32 access_flags = strtoul(strings[index++].c_str(), NULL,10);
3274 estate_manager_name_list->sortByColumnIndex(0, TRUE); 3274 S32 num_allowed_agents = strtol(strings[index++].c_str(), NULL, 10);
3275 } 3275 S32 num_allowed_groups = strtol(strings[index++].c_str(), NULL, 10);
3276 } 3276 S32 num_banned_agents = strtol(strings[index++].c_str(), NULL, 10);
3277 3277 S32 num_estate_managers = strtol(strings[index++].c_str(), NULL, 10);
3278 return true; 3278
3279} 3279 // sanity ckecks
3280 3280 if (num_allowed_agents > 0
3281// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) 3281 && !(access_flags & ESTATE_ACCESS_ALLOWED_AGENTS))
3282void LLFloaterRegionInfo::open() 3282 {
3283{ 3283 llwarns << "non-zero count for allowed agents, but no corresponding flag" << llendl;
3284 // We'll allow access to the estate tools for estate managers (and for the sim owner) 3284 }
3285 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) 3285 if (num_allowed_groups > 0
3286 { 3286 && !(access_flags & ESTATE_ACCESS_ALLOWED_GROUPS))
3287 LLViewerRegion* pRegion = gAgent.getRegion(); 3287 {
3288 if (!pRegion) 3288 llwarns << "non-zero count for allowed groups, but no corresponding flag" << llendl;
3289 return; 3289 }
3290 3290 if (num_banned_agents > 0
3291 // Should be able to call LLRegion::canManageEstate() but then we can fake god like 3291 && !(access_flags & ESTATE_ACCESS_BANNED_AGENTS))
3292 if ( (!pRegion->isEstateManager()) && (pRegion->getOwner() != gAgent.getID()) ) 3292 {
3293 return; 3293 llwarns << "non-zero count for banned agents, but no corresponding flag" << llendl;
3294 } 3294 }
3295 3295 if (num_estate_managers > 0
3296 LLFloater::open(); 3296 && !(access_flags & ESTATE_ACCESS_MANAGERS))
3297} 3297 {
3298// [/RLVa:KB] 3298 llwarns << "non-zero count for managers, but no corresponding flag" << llendl;
3299 }
3300
3301 // grab the UUID's out of the string fields
3302 if (access_flags & ESTATE_ACCESS_ALLOWED_AGENTS)
3303 {
3304 LLNameListCtrl* allowed_agent_name_list;
3305 allowed_agent_name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list");
3306
3307 int totalAllowedAgents = num_allowed_agents;
3308
3309 if (allowed_agent_name_list)
3310 {
3311 totalAllowedAgents += allowed_agent_name_list->getItemCount();
3312 }
3313
3314 std::string msg = llformat("Allowed residents: (%d, max %d)",
3315 totalAllowedAgents,
3316 ESTATE_MAX_ACCESS_IDS);
3317 panel->childSetValue("allow_resident_label", LLSD(msg));
3318
3319 if (allowed_agent_name_list)
3320 {
3321 //allowed_agent_name_list->deleteAllItems();
3322 for (S32 i = 0; i < num_allowed_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
3323 {
3324 LLUUID id;
3325 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3326 allowed_agent_name_list->addNameItem(id);
3327 }
3328 panel->childSetEnabled("remove_allowed_avatar_btn", allowed_agent_name_list->getFirstSelected() ? TRUE : FALSE);
3329 allowed_agent_name_list->sortByColumnIndex(0, TRUE);
3330 }
3331 }
3332
3333 if (access_flags & ESTATE_ACCESS_ALLOWED_GROUPS)
3334 {
3335 LLNameListCtrl* allowed_group_name_list;
3336 allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
3337
3338 std::string msg = llformat("Allowed groups: (%d, max %d)",
3339 num_allowed_groups,
3340 (S32) ESTATE_MAX_GROUP_IDS);
3341 panel->childSetValue("allow_group_label", LLSD(msg));
3342
3343 if (allowed_group_name_list)
3344 {
3345 allowed_group_name_list->deleteAllItems();
3346 for (S32 i = 0; i < num_allowed_groups && i < ESTATE_MAX_GROUP_IDS; i++)
3347 {
3348 LLUUID id;
3349 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3350 allowed_group_name_list->addGroupNameItem(id);
3351 }
3352 panel->childSetEnabled("remove_allowed_group_btn", allowed_group_name_list->getFirstSelected() ? TRUE : FALSE);
3353 allowed_group_name_list->sortByColumnIndex(0, TRUE);
3354 }
3355 }
3356
3357 if (access_flags & ESTATE_ACCESS_BANNED_AGENTS)
3358 {
3359 LLNameListCtrl* banned_agent_name_list;
3360 banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
3361
3362 int totalBannedAgents = num_banned_agents;
3363
3364 if (banned_agent_name_list)
3365 {
3366 totalBannedAgents += banned_agent_name_list->getItemCount();
3367 }
3368
3369
3370 std::string msg = llformat("Banned residents: (%d, max %d)",
3371 totalBannedAgents,
3372 ESTATE_MAX_ACCESS_IDS);
3373 panel->childSetValue("ban_resident_label", LLSD(msg));
3374
3375 if (banned_agent_name_list)
3376 {
3377 //banned_agent_name_list->deleteAllItems();
3378 for (S32 i = 0; i < num_banned_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
3379 {
3380 LLUUID id;
3381 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3382 banned_agent_name_list->addNameItem(id);
3383 }
3384 panel->childSetEnabled("remove_banned_avatar_btn", banned_agent_name_list->getFirstSelected() ? TRUE : FALSE);
3385 banned_agent_name_list->sortByColumnIndex(0, TRUE);
3386 }
3387 }
3388
3389 if (access_flags & ESTATE_ACCESS_MANAGERS)
3390 {
3391 std::string msg = llformat("Estate Managers: (%d, max %d)",
3392 num_estate_managers,
3393 ESTATE_MAX_MANAGERS);
3394 panel->childSetValue("estate_manager_label", LLSD(msg));
3395
3396 LLNameListCtrl* estate_manager_name_list =
3397 panel->getChild<LLNameListCtrl>("estate_manager_name_list");
3398 if (estate_manager_name_list)
3399 {
3400 estate_manager_name_list->deleteAllItems(); // Clear existing entries
3401
3402 // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't
3403 // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused,
3404 // and they can still remove them.
3405 for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++)
3406 {
3407 LLUUID id;
3408 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3409 estate_manager_name_list->addNameItem(id);
3410 }
3411 panel->childSetEnabled("remove_estate_manager_btn", estate_manager_name_list->getFirstSelected() ? TRUE : FALSE);
3412 estate_manager_name_list->sortByColumnIndex(0, TRUE);
3413 }
3414 }
3415
3416 return true;
3417}
3418
3419// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
3420void LLFloaterRegionInfo::open()
3421{
3422 // We'll allow access to the estate tools for estate managers (and for the sim owner)
3423 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
3424 {
3425 LLViewerRegion* pRegion = gAgent.getRegion();
3426 if (!pRegion)
3427 return;
3428
3429 // Should be able to call LLRegion::canManageEstate() but then we can fake god like
3430 if ( (!pRegion->isEstateManager()) && (pRegion->getOwner() != gAgent.getID()) )
3431 return;
3432 }
3433
3434 LLFloater::open();
3435}
3436// [/RLVa:KB]
diff --git a/linden/indra/newview/llfloaterregioninfo.h b/linden/indra/newview/llfloaterregioninfo.h
index fd0d9ce..ee01c7c 100644
--- a/linden/indra/newview/llfloaterregioninfo.h
+++ b/linden/indra/newview/llfloaterregioninfo.h
@@ -53,6 +53,7 @@ class LLSpinCtrl;
53class LLTextBox; 53class LLTextBox;
54 54
55class LLPanelRegionGeneralInfo; 55class LLPanelRegionGeneralInfo;
56class LLPanelRegionOpenSettingsInfo;
56class LLPanelRegionDebugInfo; 57class LLPanelRegionDebugInfo;
57class LLPanelRegionTextureInfo; 58class LLPanelRegionTextureInfo;
58class LLPanelRegionTerrainInfo; 59class LLPanelRegionTerrainInfo;
@@ -83,6 +84,7 @@ public:
83 84
84 static LLPanelEstateInfo* getPanelEstate(); 85 static LLPanelEstateInfo* getPanelEstate();
85 static LLPanelEstateCovenant* getPanelCovenant(); 86 static LLPanelEstateCovenant* getPanelCovenant();
87 static LLPanelRegionOpenSettingsInfo* getPanelOpenSettings();
86 88
87 // from LLPanel 89 // from LLPanel
88 virtual void refresh(); 90 virtual void refresh();
@@ -173,6 +175,24 @@ protected:
173 175
174///////////////////////////////////////////////////////////////////////////// 176/////////////////////////////////////////////////////////////////////////////
175 177
178class LLPanelRegionOpenSettingsInfo : public LLPanelRegionInfo
179{
180public:
181 LLPanelRegionOpenSettingsInfo()
182 : LLPanelRegionInfo() {}
183 ~LLPanelRegionOpenSettingsInfo() {}
184
185 virtual bool refreshFromRegion(LLViewerRegion* region);
186
187 // LLPanel
188 virtual BOOL postBuild();
189
190protected:
191 static void sendUpdate(void* userdata);
192};
193
194/////////////////////////////////////////////////////////////////////////////
195
176class LLPanelRegionDebugInfo : public LLPanelRegionInfo 196class LLPanelRegionDebugInfo : public LLPanelRegionInfo
177{ 197{
178public: 198public:
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index 6744faf..2f02f1e 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -181,26 +181,23 @@ void* LLFloaterTools::createPanelLandInfo(void* data)
181 181
182void LLFloaterTools::updateToolsSizeLimits() 182void LLFloaterTools::updateToolsSizeLimits()
183{ 183{
184 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints")) 184 getChild<LLSpinCtrl>("Scale X")->setMinValue(gHippoLimits->getMinPrimScale());
185 { 185 getChild<LLSpinCtrl>("Scale Y")->setMinValue(gHippoLimits->getMinPrimScale());
186 getChild<LLSpinCtrl>("Scale X")->setMaxValue(F32_MAX); 186 getChild<LLSpinCtrl>("Scale Z")->setMinValue(gHippoLimits->getMinPrimScale());
187 getChild<LLSpinCtrl>("Scale Y")->setMaxValue(F32_MAX);
188 getChild<LLSpinCtrl>("Scale Z")->setMaxValue(F32_MAX);
189 187
190 getChild<LLSpinCtrl>("Pos X")->setMaxValue(F32_MAX); 188 getChild<LLSpinCtrl>("Scale X")->setMaxValue(gHippoLimits->getMaxPrimScale());
191 getChild<LLSpinCtrl>("Pos Y")->setMaxValue(F32_MAX); 189 getChild<LLSpinCtrl>("Scale Y")->setMaxValue(gHippoLimits->getMaxPrimScale());
192 getChild<LLSpinCtrl>("Pos Z")->setMaxValue(F32_MAX); 190 getChild<LLSpinCtrl>("Scale Z")->setMaxValue(gHippoLimits->getMaxPrimScale());
193 }
194 else
195 {
196 getChild<LLSpinCtrl>("Scale X")->setMaxValue(gHippoLimits->getMaxPrimScale());
197 getChild<LLSpinCtrl>("Scale Y")->setMaxValue(gHippoLimits->getMaxPrimScale());
198 getChild<LLSpinCtrl>("Scale Z")->setMaxValue(gHippoLimits->getMaxPrimScale());
199 191
200 getChild<LLSpinCtrl>("Scale X")->setMinValue(gHippoLimits->getMinPrimScale()); 192 getChild<LLSpinCtrl>("Pos X")->setMinValue(gHippoLimits->getMinPrimXPos());
201 getChild<LLSpinCtrl>("Scale Y")->setMinValue(gHippoLimits->getMinPrimScale()); 193 getChild<LLSpinCtrl>("Pos Y")->setMinValue(gHippoLimits->getMinPrimYPos());
202 getChild<LLSpinCtrl>("Scale Z")->setMinValue(gHippoLimits->getMinPrimScale()); 194 getChild<LLSpinCtrl>("Pos Z")->setMinValue(gHippoLimits->getMinPrimZPos());
203 } 195
196 getChild<LLSpinCtrl>("Pos X")->setMaxValue(gHippoLimits->getMaxPrimXPos());
197 getChild<LLSpinCtrl>("Pos Y")->setMaxValue(gHippoLimits->getMaxPrimYPos());
198 getChild<LLSpinCtrl>("Pos Z")->setMaxValue(gHippoLimits->getMaxPrimZPos());
199
200 getChild<LLCheckBoxCtrl>("Physical Checkbox Ctrl")->setEnabled(gHippoLimits->mAllowPhysicalPrims);
204} 201}
205 202
206void LLFloaterTools::updateToolsPrecision() 203void LLFloaterTools::updateToolsPrecision()
@@ -1258,8 +1255,18 @@ void LLFloaterTools::onClickLink(void* data)
1258 return; 1255 return;
1259 } 1256 }
1260 1257
1261 S32 max_linked_prims = gHippoLimits->getMaxLinkedPrims(); 1258 S32 max_linked_prims = 0;
1262 if (max_linked_prims > -1) 1259 if(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->usePhysics())
1260 {
1261 //Physical - use phys prim limit
1262 max_linked_prims = gHippoLimits->getMaxPhysLinkedPrims();
1263 }
1264 else
1265 {
1266 //Non phys limit
1267 max_linked_prims = gHippoLimits->getMaxLinkedPrims();
1268 }
1269 if (max_linked_prims > -1) //-1 : no limits
1263 { 1270 {
1264 S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); 1271 S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
1265 if (object_count > max_linked_prims + 1) 1272 if (object_count > max_linked_prims + 1)
@@ -1271,7 +1278,7 @@ void LLFloaterTools::onClickLink(void* data)
1271 return; 1278 return;
1272 } 1279 }
1273 } 1280 }
1274 1281
1275 if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) 1282 if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2)
1276 { 1283 {
1277 LLNotifications::instance().add("CannotLinkIncompleteSet"); 1284 LLNotifications::instance().add("CannotLinkIncompleteSet");
diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp
index 52d7b1f..2684e10 100644
--- a/linden/indra/newview/llfloatertos.cpp
+++ b/linden/indra/newview/llfloatertos.cpp
@@ -1,284 +1,310 @@
1/** 1/**
2 * @file llfloatertos.cpp 2 * @file llfloatertos.cpp
3 * @brief Terms of Service Agreement dialog 3 * @brief Terms of Service Agreement dialog
4 * 4 *
5 * $LicenseInfo:firstyear=2003&license=viewergpl$ 5 * $LicenseInfo:firstyear=2003&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2003-2009, Linden Research, Inc. 7 * Copyright (c) 2003-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0 11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception 21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 * 22 *
23 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations. 25 * and agree to abide by those obligations.
26 * 26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE. 29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$ 30 * $/LicenseInfo$
31 */ 31 */
32 32
33#include "llviewerprecompiledheaders.h" 33#include "llviewerprecompiledheaders.h"
34 34
35#include "llfloatertos.h" 35#include "llfloatertos.h"
36 36
37// viewer includes 37// viewer includes
38#include "llagent.h" 38#include "llagent.h"
39#include "llappviewer.h" 39#include "llappviewer.h"
40#include "llstartup.h" 40#include "llstartup.h"
41#include "llviewerstats.h" 41#include "llviewerstats.h"
42#include "llviewertexteditor.h" 42#include "llviewertexteditor.h"
43#include "llviewerwindow.h" 43#include "llviewerwindow.h"
44 44
45// linden library includes 45// linden library includes
46#include "llbutton.h" 46#include "llbutton.h"
47#include "llhttpclient.h" 47#include "llhttpclient.h"
48#include "llhttpstatuscodes.h" // for HTTP_FOUND 48#include "llhttpstatuscodes.h" // for HTTP_FOUND
49#include "llradiogroup.h" 49#include "llradiogroup.h"
50#include "lltextbox.h" 50#include "lltextbox.h"
51#include "llui.h" 51#include "llui.h"
52#include "lluictrlfactory.h" 52#include "lluictrlfactory.h"
53#include "llvfile.h" 53#include "llvfile.h"
54#include "message.h" 54#include "message.h"
55 55#include "hippoGridManager.h"
56 56
57// static 57
58LLFloaterTOS* LLFloaterTOS::sInstance = NULL; 58// static
59 59LLFloaterTOS* LLFloaterTOS::sInstance = NULL;
60// static 60
61LLFloaterTOS* LLFloaterTOS::show(ETOSType type, const std::string & message) 61// static
62{ 62LLFloaterTOS* LLFloaterTOS::show(ETOSType type, const std::string & message)
63 if( !LLFloaterTOS::sInstance ) 63{
64 { 64 if( !LLFloaterTOS::sInstance )
65 LLFloaterTOS::sInstance = new LLFloaterTOS(type, message); 65 {
66 } 66 LLFloaterTOS::sInstance = new LLFloaterTOS(type, message);
67 67 }
68 if (type == TOS_TOS) 68
69 { 69 if (type == TOS_TOS)
70 LLUICtrlFactory::getInstance()->buildFloater(LLFloaterTOS::sInstance, "floater_tos.xml"); 70 {
71 } 71 LLUICtrlFactory::getInstance()->buildFloater(LLFloaterTOS::sInstance, "floater_tos.xml");
72 else 72 }
73 { 73 else
74 LLUICtrlFactory::getInstance()->buildFloater(LLFloaterTOS::sInstance, "floater_critical.xml"); 74 {
75 } 75 LLUICtrlFactory::getInstance()->buildFloater(LLFloaterTOS::sInstance, "floater_critical.xml");
76 76 }
77 return LLFloaterTOS::sInstance; 77
78} 78 return LLFloaterTOS::sInstance;
79 79}
80 80
81LLFloaterTOS::LLFloaterTOS(ETOSType type, const std::string & message) 81
82: LLModalDialog( std::string(" "), 100, 100 ), 82LLFloaterTOS::LLFloaterTOS(ETOSType type, const std::string & message)
83 mType(type), 83: LLModalDialog( std::string(" "), 100, 100 ),
84 mMessage(message), 84 mType(type),
85 mWebBrowserWindowId( 0 ), 85 mMessage(message),
86 mLoadCompleteCount( 0 ) 86 mWebBrowserWindowId( 0 ),
87{ 87 mLoadCompleteCount( 0 )
88} 88{
89 89}
90// helper class that trys to download a URL from a web site and calls a method 90
91// on parent class indicating if the web server is working or not 91// helper class that trys to download a URL from a web site and calls a method
92class LLIamHereTOS : public LLHTTPClient::Responder 92// on parent class indicating if the web server is working or not
93{ 93class LLIamHereTOS : public LLHTTPClient::Responder
94 private: 94{
95 LLIamHereTOS( LLFloaterTOS* parent ) : 95 private:
96 mParent( parent ) 96 LLIamHereTOS( LLFloaterTOS* parent ) :
97 {} 97 mParent( parent )
98 98 {}
99 LLFloaterTOS* mParent; 99
100 100 LLFloaterTOS* mParent;
101 public: 101
102 102 public:
103 static boost::intrusive_ptr< LLIamHereTOS > build( LLFloaterTOS* parent ) 103
104 { 104 static boost::intrusive_ptr< LLIamHereTOS > build( LLFloaterTOS* parent )
105 return boost::intrusive_ptr< LLIamHereTOS >( new LLIamHereTOS( parent ) ); 105 {
106 }; 106 return boost::intrusive_ptr< LLIamHereTOS >( new LLIamHereTOS( parent ) );
107 107 };
108 virtual void setParent( LLFloaterTOS* parentIn ) 108
109 { 109 virtual void setParent( LLFloaterTOS* parentIn )
110 mParent = parentIn; 110 {
111 }; 111 mParent = parentIn;
112 112 };
113 virtual void result( const LLSD& content ) 113
114 { 114 virtual void result( const LLSD& content )
115 if ( mParent ) 115 {
116 mParent->setSiteIsAlive( true ); 116 if ( mParent )
117 }; 117 mParent->setSiteIsAlive( true );
118 118 };
119 virtual void error( U32 status, const std::string& reason ) 119
120 { 120 virtual void error( U32 status, const std::string& reason )
121 if ( mParent ) 121 {
122 { 122 if ( mParent )
123 // *HACK: For purposes of this alive check, 302 Found 123 {
124 // (aka Moved Temporarily) is considered alive. The web site 124 // *HACK: For purposes of this alive check, 302 Found
125 // redirects this link to a "cache busting" temporary URL. JC 125 // (aka Moved Temporarily) is considered alive. The web site
126 bool alive = (status == HTTP_FOUND); 126 // redirects this link to a "cache busting" temporary URL. JC
127 mParent->setSiteIsAlive( alive ); 127 bool alive = (status == HTTP_FOUND);
128 } 128 mParent->setSiteIsAlive( alive );
129 }; 129 }
130}; 130 };
131 131};
132// this is global and not a class member to keep crud out of the header file 132
133namespace { 133// this is global and not a class member to keep crud out of the header file
134 boost::intrusive_ptr< LLIamHereTOS > gResponsePtr = 0; 134namespace {
135}; 135 boost::intrusive_ptr< LLIamHereTOS > gResponsePtr = 0;
136 136};
137BOOL LLFloaterTOS::postBuild() 137
138{ 138BOOL LLFloaterTOS::postBuild()
139 childSetAction("Continue", onContinue, this); 139{
140 childSetAction("Cancel", onCancel, this); 140 childSetAction("Continue", onContinue, this);
141 childSetCommitCallback("agree_chk", updateAgree, this); 141 childSetAction("Cancel", onCancel, this);
142 142 childSetCommitCallback("agree_chk", updateAgree, this);
143 if ( mType != TOS_TOS ) 143
144 { 144 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
145 llinfos << "tos_type != TOS_TOS" << llendl; 145 tos_agreement->setEnabled( true );
146 // this displays the critical message 146
147 LLTextEditor *editor = getChild<LLTextEditor>("tos_text"); 147 //Always set this so that the TOS is displayed whether the web browser pops up or not.
148 editor->setHandleEditKeysDirectly( TRUE ); 148 LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
149 editor->setEnabled( FALSE ); 149 editor->setHandleEditKeysDirectly( TRUE );
150 editor->setWordWrap(TRUE); 150 editor->setEnabled( FALSE );
151 editor->setFocus(TRUE); 151 editor->setWordWrap(TRUE);
152 // editor->setValue(LLSD(mMessage)); 152 editor->setFocus(TRUE);
153 editor->setValue(mMessage); 153 editor->setValue(LLSD(mMessage));
154 154 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
155 return TRUE; 155 if (web_browser)
156 } 156 {
157 157 //Disable for critical messages and text messages, it is reenabled later
158 // disable Agree to TOS radio button until the page has fully loaded 158 web_browser->setVisible( FALSE );
159 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); 159 }
160 tos_agreement->setEnabled( false ); 160
161 161 if ( mType != TOS_TOS )
162 // hide the SL text widget if we're displaying TOS with using a browser widget. 162 {
163 LLTextEditor *editor = getChild<LLTextEditor>("tos_text"); 163 // this displays the critical message only
164 editor->setVisible(FALSE); 164 return TRUE;
165 165 }
166 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html"); 166 bool use_web_browser = false;
167 if ( web_browser ) 167
168 { 168 //Check to see if the message is a link to display
169 // start to observe it so we see navigate complete events 169 std::string token = "http://";
170 web_browser->addObserver( this ); 170 std::string::size_type iIndex = mMessage.rfind(token);
171 171 //IF it has http:// in it, we use the web browser
172 gResponsePtr = LLIamHereTOS::build( this ); 172 if(iIndex != std::string::npos && mMessage.length() >= 2)
173 LLHTTPClient::head( getString( "real_url" ), gResponsePtr ); 173 {
174 } 174 // it exists
175 175 use_web_browser = true;
176 return TRUE; 176 }
177} 177 else if (gHippoGridManager->getConnectedGrid()->isSecondLife())
178 178 {
179void LLFloaterTOS::setSiteIsAlive( bool alive ) 179 //Its SL, use the browser for it as thats what it should do
180{ 180 use_web_browser = true;
181 // only do this for TOS pages 181 }
182 if ( mType == TOS_TOS ) 182
183 { 183 if ( web_browser && use_web_browser)
184 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html"); 184 {
185 // if the contents of the site was retrieved 185 // hide the SL text widget if we're displaying TOS with using a browser widget.
186 if ( alive ) 186 LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
187 { 187 editor->setVisible( FALSE );
188 if ( web_browser ) 188
189 { 189 // disable Agree to TOS radio button until the page has fully loaded
190 // navigate to the "real" page 190 tos_agreement->setEnabled( false );
191 web_browser->navigateTo( getString( "real_url" ) ); 191
192 }; 192 // Reenable the web browser
193 } 193 web_browser->setVisible( TRUE );
194 else 194
195 { 195 // start to observe it so we see navigate complete events
196 // normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads) 196 web_browser->addObserver( this );
197 // but if the page is unavailable, we need to do this now 197
198 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); 198 gResponsePtr = LLIamHereTOS::build( this );
199 tos_agreement->setEnabled( true ); 199 LLHTTPClient::head( getString( "real_url" ), gResponsePtr );
200 }; 200 }
201 }; 201
202} 202 return TRUE;
203 203}
204LLFloaterTOS::~LLFloaterTOS() 204
205{ 205void LLFloaterTOS::setSiteIsAlive( bool alive )
206 // stop obsaerving events 206{
207 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html"); 207 // only do this for TOS pages
208 if ( web_browser ) 208 if ( mType == TOS_TOS )
209 { 209 {
210 web_browser->remObserver( this ); 210 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
211 }; 211 // if the contents of the site was retrieved
212 212 if ( alive )
213 // tell the responder we're not here anymore 213 {
214 if ( gResponsePtr ) 214 if ( web_browser )
215 gResponsePtr->setParent( 0 ); 215 {
216 216 // navigate to the "real" page
217 LLFloaterTOS::sInstance = NULL; 217 web_browser->navigateTo( getString( "real_url" ) );
218} 218 };
219 219 }
220// virtual 220 else
221void LLFloaterTOS::draw() 221 {
222{ 222 // normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads)
223 // draw children 223 // but if the page is unavailable, we need to do this now
224 LLModalDialog::draw(); 224 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
225} 225 tos_agreement->setEnabled( true );
226 226 };
227// static 227 };
228void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata ) 228}
229{ 229
230 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 230LLFloaterTOS::~LLFloaterTOS()
231 bool agree = self->childGetValue("agree_chk").asBoolean(); 231{
232 self->childSetEnabled("Continue", agree); 232 // stop obsaerving events
233} 233 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
234 234 if ( web_browser )
235// static 235 {
236void LLFloaterTOS::onContinue( void* userdata ) 236 web_browser->remObserver( this );
237{ 237 };
238 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 238
239 llinfos << "User agrees with TOS." << llendl; 239 // tell the responder we're not here anymore
240 if (self->mType == TOS_TOS) 240 if ( gResponsePtr )
241 { 241 gResponsePtr->setParent( 0 );
242 gAcceptTOS = TRUE; 242
243 } 243 LLFloaterTOS::sInstance = NULL;
244 else 244}
245 { 245
246 gAcceptCriticalMessage = TRUE; 246// virtual
247 } 247void LLFloaterTOS::draw()
248 248{
249 // Testing TOS dialog 249 // draw children
250 #if ! LL_RELEASE_FOR_DOWNLOAD 250 LLModalDialog::draw();
251 if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT ) 251}
252 { 252
253 LLStartUp::setStartupState( STATE_LOGIN_SHOW ); 253// static
254 } 254void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata )
255 else 255{
256 #endif 256 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
257 257 bool agree = self->childGetValue("agree_chk").asBoolean();
258 LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication 258 self->childSetEnabled("Continue", agree);
259 self->close(); // destroys this object 259}
260} 260
261 261// static
262// static 262void LLFloaterTOS::onContinue( void* userdata )
263void LLFloaterTOS::onCancel( void* userdata ) 263{
264{ 264 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
265 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 265 llinfos << "User agrees with TOS." << llendl;
266 llinfos << "User disagrees with TOS." << llendl; 266 if (self->mType == TOS_TOS)
267 LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done); 267 {
268 LLStartUp::setStartupState( STATE_LOGIN_SHOW ); 268 gAcceptTOS = TRUE;
269 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS 269 }
270 self->close(); // destroys this object 270 else
271} 271 {
272 272 gAcceptCriticalMessage = TRUE;
273//virtual 273 }
274void LLFloaterTOS::onNavigateComplete( const EventType& eventIn ) 274
275{ 275 // Testing TOS dialog
276 // skip past the loading screen navigate complete 276 #if ! LL_RELEASE_FOR_DOWNLOAD
277 if ( ++mLoadCompleteCount == 2 ) 277 if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT )
278 { 278 {
279 llinfos << "NAVIGATE COMPLETE" << llendl; 279 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
280 // enable Agree to TOS radio button now that page has loaded 280 }
281 LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); 281 else
282 tos_agreement->setEnabled( true ); 282 #endif
283 }; 283
284} 284 LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
285 self->close(); // destroys this object
286}
287
288// static
289void LLFloaterTOS::onCancel( void* userdata )
290{
291 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
292 llinfos << "User disagrees with TOS." << llendl;
293 LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
294 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
295 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
296 self->close(); // destroys this object
297}
298
299//virtual
300void LLFloaterTOS::onNavigateComplete( const EventType& eventIn )
301{
302 // skip past the loading screen navigate complete
303 if ( ++mLoadCompleteCount == 2 )
304 {
305 llinfos << "NAVIGATE COMPLETE" << llendl;
306 // enable Agree to TOS radio button now that page has loaded
307 LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
308 tos_agreement->setEnabled( true );
309 };
310}
diff --git a/linden/indra/newview/llfloaterwater.cpp b/linden/indra/newview/llfloaterwater.cpp
index c4b6d0d..782c56e 100644
--- a/linden/indra/newview/llfloaterwater.cpp
+++ b/linden/indra/newview/llfloaterwater.cpp
@@ -64,6 +64,8 @@
64#include "llwaterparammanager.h" 64#include "llwaterparammanager.h"
65#include "llpostprocess.h" 65#include "llpostprocess.h"
66 66
67#include "wlfloaterwindlightsend.h"
68
67#undef max 69#undef max
68 70
69LLFloaterWater* LLFloaterWater::sWaterMenu = NULL; 71LLFloaterWater* LLFloaterWater::sWaterMenu = NULL;
@@ -680,6 +682,12 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData)
680 682
681 } 683 }
682 } 684 }
685 else if (ctrl->getValue().asString() == "send_to_server_item")
686 {
687 //Open the other box
688 WLFloaterWindLightSend::instance();
689 WLFloaterWindLightSend::instance()->open();
690 }
683 else 691 else
684 { 692 {
685 LLWaterParamManager::instance()->mCurParams.mName = 693 LLWaterParamManager::instance()->mCurParams.mName =
diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp
index be3c1fd..4937232 100644
--- a/linden/indra/newview/llfloaterwindlight.cpp
+++ b/linden/indra/newview/llfloaterwindlight.cpp
@@ -63,6 +63,9 @@
63#include "llwlparamset.h" 63#include "llwlparamset.h"
64#include "llwlparammanager.h" 64#include "llwlparammanager.h"
65#include "llpostprocess.h" 65#include "llpostprocess.h"
66#include "wlfloaterwindlightsend.h"
67#include "llworld.h"
68#include "hippolimits.h"
66 69
67#undef max 70#undef max
68 71
@@ -216,7 +219,9 @@ void LLFloaterWindLight::initCallbacks(void) {
216 childSetCommitCallback("WLCloudScrollX", onCloudScrollXMoved, NULL); 219 childSetCommitCallback("WLCloudScrollX", onCloudScrollXMoved, NULL);
217 childSetCommitCallback("WLCloudScrollY", onCloudScrollYMoved, NULL); 220 childSetCommitCallback("WLCloudScrollY", onCloudScrollYMoved, NULL);
218 childSetCommitCallback("WLDistanceMult", onFloatControlMoved, &param_mgr->mDistanceMult); 221 childSetCommitCallback("WLDistanceMult", onFloatControlMoved, &param_mgr->mDistanceMult);
219 childSetCommitCallback("DrawClassicClouds", LLSavedSettingsGlue::setBOOL, (void*)"SkyUseClassicClouds"); 222 childSetCommitCallback("DrawClassicClouds", onCloudDrawToggled, NULL);
223 childSetCommitCallback("WLCloudHeight", onCloudHeightMoved, NULL);
224 childSetCommitCallback("WLCloudRange", onCloudRangeMoved, NULL);
220 225
221 // WL Top 226 // WL Top
222 childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL); 227 childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL);
@@ -425,7 +430,21 @@ void LLFloaterWindLight::syncMenu()
425 bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY(); 430 bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY();
426 childSetValue("WLCloudLockX", lockX); 431 childSetValue("WLCloudLockX", lockX);
427 childSetValue("WLCloudLockY", lockY); 432 childSetValue("WLCloudLockY", lockY);
428 childSetValue("DrawClassicClouds", gSavedSettings.getBOOL("SkyUseClassicClouds")); 433 childSetValue("DrawClassicClouds", gHippoLimits->skyUseClassicClouds);
434
435 childSetValue("WLCloudHeight", gSavedSettings.getF32("ClassicCloudHeight"));
436 childSetValue("WLCloudRange", gSavedSettings.getF32("ClassicCloudRange"));
437
438 if(!gHippoLimits->skyUseClassicClouds)
439 {
440 childDisable("WLCloudHeight");
441 childDisable("WLCloudRange");
442 }
443 else
444 {
445 childEnable("WLCloudHeight");
446 childEnable("WLCloudRange");
447 }
429 448
430 // disable if locked, enable if not 449 // disable if locked, enable if not
431 if(lockX) 450 if(lockX)
@@ -874,6 +893,12 @@ void LLFloaterWindLight::onSavePreset(LLUICtrl* ctrl, void* userData)
874 893
875 } 894 }
876 } 895 }
896 else if (ctrl->getValue().asString() == "send_to_server_item")
897 {
898 //Open the other box
899 WLFloaterWindLightSend::instance();
900 WLFloaterWindLightSend::instance()->open();
901 }
877 else 902 else
878 { 903 {
879 // check to see if it's a default and shouldn't be overwritten 904 // check to see if it's a default and shouldn't be overwritten
@@ -1046,6 +1071,35 @@ void LLFloaterWindLight::onCloudScrollYMoved(LLUICtrl* ctrl, void* userData)
1046 // *HACK all cloud scrolling is off by an additive of 10. 1071 // *HACK all cloud scrolling is off by an additive of 10.
1047 LLWLParamManager::instance()->mCurParams.setCloudScrollY(sldrCtrl->getValueF32() + 10.0f); 1072 LLWLParamManager::instance()->mCurParams.setCloudScrollY(sldrCtrl->getValueF32() + 10.0f);
1048} 1073}
1074void LLFloaterWindLight::onCloudDrawToggled(LLUICtrl* ctrl, void* userData)
1075{
1076 LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl);
1077
1078 bool lock = cbCtrl->get();
1079 gHippoLimits->skyUseClassicClouds = lock;
1080
1081 LLWorld::getInstance()->rebuildClouds(gAgent.getRegion());
1082}
1083
1084void LLFloaterWindLight::onCloudHeightMoved(LLUICtrl* ctrl, void* userData)
1085{
1086 deactivateAnimator();
1087
1088 LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
1089
1090 gSavedSettings.setF32("ClassicCloudHeight", sldrCtrl->getValueF32());
1091
1092 LLWorld::getInstance()->rebuildClouds(gAgent.getRegion());
1093}
1094
1095void LLFloaterWindLight::onCloudRangeMoved(LLUICtrl* ctrl, void* userData)
1096{
1097 deactivateAnimator();
1098
1099 LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
1100
1101 gSavedSettings.setF32("ClassicCloudRange", sldrCtrl->getValueF32());
1102}
1049 1103
1050void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl, void* userData) 1104void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl, void* userData)
1051{ 1105{
diff --git a/linden/indra/newview/llfloaterwindlight.h b/linden/indra/newview/llfloaterwindlight.h
index b9e5311..24b0e87 100644
--- a/linden/indra/newview/llfloaterwindlight.h
+++ b/linden/indra/newview/llfloaterwindlight.h
@@ -118,6 +118,10 @@ public:
118 static void onCloudScrollXToggled(LLUICtrl* ctrl, void* userData); 118 static void onCloudScrollXToggled(LLUICtrl* ctrl, void* userData);
119 static void onCloudScrollYToggled(LLUICtrl* ctrl, void* userData); 119 static void onCloudScrollYToggled(LLUICtrl* ctrl, void* userData);
120 120
121 static void onCloudDrawToggled(LLUICtrl* ctrl, void* userData);
122 static void onCloudHeightMoved(LLUICtrl* ctrl, void* userData);
123 static void onCloudRangeMoved(LLUICtrl* ctrl, void* userData);
124
121 //// menu management 125 //// menu management
122 126
123 /// show off our menu 127 /// show off our menu
diff --git a/linden/indra/newview/llhomelocationresponder.cpp b/linden/indra/newview/llhomelocationresponder.cpp
index 3ef58e7..e609237 100644
--- a/linden/indra/newview/llhomelocationresponder.cpp
+++ b/linden/indra/newview/llhomelocationresponder.cpp
@@ -100,6 +100,8 @@ void LLHomeLocationResponder::result( const LLSD& content )
100 100
101 LLViewerRegion *viewer_region = gAgent.getRegion(); 101 LLViewerRegion *viewer_region = gAgent.getRegion();
102 gAgent.setHomePosRegion( viewer_region->getHandle(), agent_pos ); 102 gAgent.setHomePosRegion( viewer_region->getHandle(), agent_pos );
103 gAgent.takeHomeScreenshot();
104
103 } 105 }
104} 106}
105 107
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp
index 75e2f30..ccd723f 100644
--- a/linden/indra/newview/llhudeffectlookat.cpp
+++ b/linden/indra/newview/llhudeffectlookat.cpp
@@ -53,6 +53,7 @@
53// [/RLVa:KB] 53// [/RLVa:KB]
54 54
55#include "llxmltree.h" 55#include "llxmltree.h"
56#include "hippolimits.h"
56 57
57 58
58BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE; 59BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE;
@@ -553,7 +554,7 @@ void LLHUDEffectLookAt::setSourceObject(LLViewerObject* objectp)
553//----------------------------------------------------------------------------- 554//-----------------------------------------------------------------------------
554void LLHUDEffectLookAt::render() 555void LLHUDEffectLookAt::render()
555{ 556{
556 if (sDebugLookAt && mSourceObject.notNull()) 557 if (sDebugLookAt && mSourceObject.notNull() && gHippoLimits->mAllowMinimap) //Has to have allow minimap as well, otherwise it defeats the purpose of no minimap
557 { 558 {
558 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); 559 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
559 560
diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp
index 7ae96ad..25a4a4b 100644
--- a/linden/indra/newview/llinventoryactions.cpp
+++ b/linden/indra/newview/llinventoryactions.cpp
@@ -119,6 +119,11 @@ bool doToSelected(LLFolderView* folder, std::string action)
119 LLInventoryClipboard::instance().reset(); 119 LLInventoryClipboard::instance().reset();
120 } 120 }
121 121
122 if ("cut" == action)
123 {
124 LLInventoryClipboard::instance().reset();
125 }
126
122 std::set<LLUUID> selected_items; 127 std::set<LLUUID> selected_items;
123 folder->getSelectionList(selected_items); 128 folder->getSelectionList(selected_items);
124 129
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index b1627b5..f71df2d 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -463,6 +463,12 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::str
463 463
464 items.push_back(std::string("Copy Separator")); 464 items.push_back(std::string("Copy Separator"));
465 465
466 items.push_back(std::string("Cut"));
467 if (!isItemCopyable())
468 {
469 disabled_items.push_back(std::string("Cut"));
470 }
471
466 items.push_back(std::string("Copy")); 472 items.push_back(std::string("Copy"));
467 if (!isItemCopyable()) 473 if (!isItemCopyable())
468 { 474 {
@@ -813,6 +819,11 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
813 copyToClipboard(); 819 copyToClipboard();
814 return; 820 return;
815 } 821 }
822 else if ("cut" == action)
823 {
824 cutToClipboard();
825 return;
826 }
816 else if ("paste" == action) 827 else if ("paste" == action)
817 { 828 {
818 // Single item only 829 // Single item only
@@ -1086,6 +1097,15 @@ BOOL LLItemBridge::copyToClipboard() const
1086 } 1097 }
1087 return FALSE; 1098 return FALSE;
1088} 1099}
1100BOOL LLItemBridge::cutToClipboard() const
1101{
1102 if(isItemCopyable())
1103 {
1104 LLInventoryClipboard::instance().addCut(mUUID);
1105 return TRUE;
1106 }
1107 return FALSE;
1108}
1089 1109
1090LLViewerInventoryItem* LLItemBridge::getItem() const 1110LLViewerInventoryItem* LLItemBridge::getItem() const
1091{ 1111{
@@ -1890,6 +1910,35 @@ void LLFolderBridge::pasteFromClipboard()
1890 LLPointer<LLInventoryCallback>(NULL)); 1910 LLPointer<LLInventoryCallback>(NULL));
1891 } 1911 }
1892 } 1912 }
1913 //Do cuts as well
1914 LLInventoryClipboard::instance().retrieveCuts(objects);
1915 count = objects.count();
1916 parent_id = mUUID;
1917 for(S32 i = 0; i < count; i++)
1918 {
1919 item = model->getItem(objects.get(i));
1920 if (item)
1921 {
1922 copy_inventory_item(
1923 gAgent.getID(),
1924 item->getPermissions().getOwner(),
1925 item->getUUID(),
1926 parent_id,
1927 std::string(),
1928 LLPointer<LLInventoryCallback>(NULL));
1929 LLInventoryCategory* cat = model->getCategory(item->getUUID());
1930 if(cat)
1931 {
1932 model->purgeDescendentsOf(mUUID);
1933 }
1934 LLInventoryObject* obj = model->getObject(item->getUUID());
1935 if(!obj) return;
1936 obj->removeFromServer();
1937 LLPreview::hide(item->getUUID());
1938 model->deleteObject(item->getUUID());
1939 model->notifyObservers();
1940 }
1941 }
1893 } 1942 }
1894} 1943}
1895 1944
diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h
index 45486ed..2004678 100644
--- a/linden/indra/newview/llinventorybridge.h
+++ b/linden/indra/newview/llinventorybridge.h
@@ -297,6 +297,7 @@ public:
297 virtual BOOL removeItem(); 297 virtual BOOL removeItem();
298 virtual BOOL isItemCopyable() const; 298 virtual BOOL isItemCopyable() const;
299 virtual BOOL copyToClipboard() const; 299 virtual BOOL copyToClipboard() const;
300 virtual BOOL cutToClipboard() const;
300 virtual BOOL hasChildren() const { return FALSE; } 301 virtual BOOL hasChildren() const { return FALSE; }
301 virtual BOOL isUpToDate() const { return TRUE; } 302 virtual BOOL isUpToDate() const { return TRUE; }
302 303
diff --git a/linden/indra/newview/llinventoryclipboard.cpp b/linden/indra/newview/llinventoryclipboard.cpp
index 94ffcbd..95c22aa 100644
--- a/linden/indra/newview/llinventoryclipboard.cpp
+++ b/linden/indra/newview/llinventoryclipboard.cpp
@@ -60,6 +60,11 @@ void LLInventoryClipboard::add(const LLUUID& object)
60 mObjects.put(object); 60 mObjects.put(object);
61} 61}
62 62
63void LLInventoryClipboard::addCut(const LLUUID& object)
64{
65 mCutObjects.put(object);
66}
67
63// this stores a single inventory object 68// this stores a single inventory object
64void LLInventoryClipboard::store(const LLUUID& object) 69void LLInventoryClipboard::store(const LLUUID& object)
65{ 70{
@@ -87,15 +92,26 @@ void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
87 } 92 }
88} 93}
89 94
95void LLInventoryClipboard::retrieveCuts(LLDynamicArray<LLUUID>& inv_objects) const
96{
97 inv_objects.reset();
98 S32 count = mCutObjects.count();
99 for(S32 i = 0; i < count; i++)
100 {
101 inv_objects.put(mCutObjects[i]);
102 }
103}
104
90void LLInventoryClipboard::reset() 105void LLInventoryClipboard::reset()
91{ 106{
92 mObjects.reset(); 107 mObjects.reset();
108 mCutObjects.reset();
93} 109}
94 110
95// returns true if the clipboard has something pasteable in it. 111// returns true if the clipboard has something pasteable in it.
96BOOL LLInventoryClipboard::hasContents() const 112BOOL LLInventoryClipboard::hasContents() const
97{ 113{
98 return (mObjects.count() > 0); 114 return (mObjects.count() > 0) || (mCutObjects.count() > 0);
99} 115}
100 116
101 117
diff --git a/linden/indra/newview/llinventoryclipboard.h b/linden/indra/newview/llinventoryclipboard.h
index 7a2cf15..99e8450 100644
--- a/linden/indra/newview/llinventoryclipboard.h
+++ b/linden/indra/newview/llinventoryclipboard.h
@@ -54,6 +54,8 @@ public:
54 // this method adds to the current list. 54 // this method adds to the current list.
55 void add(const LLUUID& object); 55 void add(const LLUUID& object);
56 56
57 void addCut(const LLUUID& object);
58
57 // this stores a single inventory object 59 // this stores a single inventory object
58 void store(const LLUUID& object); 60 void store(const LLUUID& object);
59 61
@@ -64,6 +66,10 @@ public:
64 // into the array provided. 66 // into the array provided.
65 void retrieve(LLDynamicArray<LLUUID>& inventory_objects) const; 67 void retrieve(LLDynamicArray<LLUUID>& inventory_objects) const;
66 68
69 // this method gets the objects in the clipboard by copying them
70 // into the array provided.
71 void retrieveCuts(LLDynamicArray<LLUUID>& inventory_objects) const;
72
67 // this method empties out the clipboard 73 // this method empties out the clipboard
68 void reset(); 74 void reset();
69 75
@@ -74,6 +80,7 @@ protected:
74 static LLInventoryClipboard sInstance; 80 static LLInventoryClipboard sInstance;
75 81
76 LLDynamicArray<LLUUID> mObjects; 82 LLDynamicArray<LLUUID> mObjects;
83 LLDynamicArray<LLUUID> mCutObjects;
77 84
78public: 85public:
79 // please don't actually call these 86 // please don't actually call these
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp
index 01fe6f8..cc14b27 100644
--- a/linden/indra/newview/llmaniptranslate.cpp
+++ b/linden/indra/newview/llmaniptranslate.cpp
@@ -529,16 +529,13 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
529 relative_move -= mDragCursorStartGlobal; 529 relative_move -= mDragCursorStartGlobal;
530 530
531 // You can't move more than some distance from your original mousedown point. 531 // You can't move more than some distance from your original mousedown point.
532 if (gSavedSettings.getBOOL("LimitDragDistance")) 532 F32 max_drag_distance = gHippoLimits->getMaxDragDistance();
533 {
534 F32 max_drag_distance = gSavedSettings.getF32("MaxDragDistance");
535 533
536 if (relative_move.magVecSquared() > max_drag_distance * max_drag_distance) 534 if (max_drag_distance != FLT_MAX && relative_move.magVecSquared() > max_drag_distance * max_drag_distance)
537 { 535 {
538 lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (too far)" << llendl; 536 lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (too far)" << llendl;
539 gViewerWindow->setCursor(UI_CURSOR_NOLOCKED); 537 gViewerWindow->setCursor(UI_CURSOR_NOLOCKED);
540 return TRUE; 538 return TRUE;
541 }
542 } 539 }
543 540
544 F64 axis_magnitude = relative_move * axis_d; // dot product 541 F64 axis_magnitude = relative_move * axis_d; // dot product
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index 6ebc880..8d704d5 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -72,6 +72,7 @@ private:
72 BOOL mShowTimestamps; 72 BOOL mShowTimestamps;
73 BOOL mPlayTypingAnim; 73 BOOL mPlayTypingAnim;
74 BOOL mChatBubbles; 74 BOOL mChatBubbles;
75 BOOL mLocalChatBubbles;
75 BOOL mScriptErrorAsChat; 76 BOOL mScriptErrorAsChat;
76 BOOL mChatChannel; 77 BOOL mChatChannel;
77 F32 mConsoleOpacity; 78 F32 mConsoleOpacity;
@@ -106,6 +107,7 @@ LLPrefsChatImpl::LLPrefsChatImpl()
106 childSetValue("script_errors_as_chat", gSavedSettings.getBOOL("ScriptErrorsAsChat")); 107 childSetValue("script_errors_as_chat", gSavedSettings.getBOOL("ScriptErrorsAsChat"));
107 108
108 childSetValue("bubble_text_chat", gSavedSettings.getBOOL("UseChatBubbles")); 109 childSetValue("bubble_text_chat", gSavedSettings.getBOOL("UseChatBubbles"));
110 childSetValue("local_bubble_text_chat", gSavedSettings.getBOOL("UseLocalChatWithBubbles"));
109 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth")); 111 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth"));
110 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn")); 112 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn"));
111 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); 113 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim"));
@@ -135,6 +137,7 @@ void LLPrefsChatImpl::refreshValues()
135 mShowTimestamps = gSavedSettings.getBOOL("ChatShowTimestamps"); 137 mShowTimestamps = gSavedSettings.getBOOL("ChatShowTimestamps");
136 mScriptErrorAsChat = gSavedSettings.getBOOL("ScriptErrorsAsChat"); 138 mScriptErrorAsChat = gSavedSettings.getBOOL("ScriptErrorsAsChat");
137 mChatBubbles = gSavedSettings.getBOOL("UseChatBubbles"); 139 mChatBubbles = gSavedSettings.getBOOL("UseChatBubbles");
140 mLocalChatBubbles = gSavedSettings.getBOOL("UseLocalChatWithBubbles");
138 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth"); 141 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth");
139 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn"); 142 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn");
140 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); 143 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim");
@@ -164,6 +167,7 @@ void LLPrefsChatImpl::cancel()
164 gSavedSettings.setBOOL("ChatShowTimestamps", mShowTimestamps); 167 gSavedSettings.setBOOL("ChatShowTimestamps", mShowTimestamps);
165 gSavedSettings.setBOOL("ScriptErrorsAsChat", mScriptErrorAsChat); 168 gSavedSettings.setBOOL("ScriptErrorsAsChat", mScriptErrorAsChat);
166 gSavedSettings.setBOOL("UseChatBubbles", mChatBubbles); 169 gSavedSettings.setBOOL("UseChatBubbles", mChatBubbles);
170 gSavedSettings.setBOOL("UseLocalChatWithBubbles", mLocalChatBubbles);
167 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth); 171 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth);
168 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn); 172 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn);
169 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); 173 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim);
@@ -196,6 +200,7 @@ void LLPrefsChatImpl::apply()
196 gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check")); 200 gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check"));
197 gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat")); 201 gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat"));
198 gSavedSettings.setBOOL("UseChatBubbles", childGetValue("bubble_text_chat")); 202 gSavedSettings.setBOOL("UseChatBubbles", childGetValue("bubble_text_chat"));
203 gSavedSettings.setBOOL("UseLocalChatWithBubbles", childGetValue("local_bubble_text_chat"));
199 gSavedSettings.setBOOL("ChatFullWidth", childGetValue("chat_full_width_check")); 204 gSavedSettings.setBOOL("ChatFullWidth", childGetValue("chat_full_width_check"));
200 gSavedSettings.setBOOL("CloseChatOnReturn", childGetValue("close_chat_on_return_check")); 205 gSavedSettings.setBOOL("CloseChatOnReturn", childGetValue("close_chat_on_return_check"));
201 gSavedSettings.setBOOL("PlayTypingAnim", childGetValue("play_typing_animation")); 206 gSavedSettings.setBOOL("PlayTypingAnim", childGetValue("play_typing_animation"));
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp
index 5a10e98..5a55351 100644
--- a/linden/indra/newview/llselectmgr.cpp
+++ b/linden/indra/newview/llselectmgr.cpp
@@ -1861,7 +1861,7 @@ BOOL LLSelectMgr::selectionAllPCode(LLPCode code)
1861 f(const LLPCode& t) : mCode(t) {} 1861 f(const LLPCode& t) : mCode(t) {}
1862 virtual bool apply(LLViewerObject* object) 1862 virtual bool apply(LLViewerObject* object)
1863 { 1863 {
1864 if (object->getPCode() != mCode) 1864 if (object->getPCode() != mCode && !gSavedSettings.getBOOL("AllowEditingOfTrees"))
1865 { 1865 {
1866 return FALSE; 1866 return FALSE;
1867 } 1867 }
diff --git a/linden/indra/newview/llsurface.cpp b/linden/indra/newview/llsurface.cpp
index caaba05..d736fb0 100644
--- a/linden/indra/newview/llsurface.cpp
+++ b/linden/indra/newview/llsurface.cpp
@@ -59,6 +59,7 @@
59#include "llglheaders.h" 59#include "llglheaders.h"
60#include "lldrawpoolterrain.h" 60#include "lldrawpoolterrain.h"
61#include "lldrawable.h" 61#include "lldrawable.h"
62#include "hippolimits.h"
62 63
63extern LLPipeline gPipeline; 64extern LLPipeline gPipeline;
64 65
@@ -295,7 +296,7 @@ void LLSurface::initTextures()
295 // 296 //
296 // Water texture 297 // Water texture
297 // 298 //
298 if (gSavedSettings.getBOOL("RenderWater") ) 299 if (gSavedSettings.getBOOL("RenderWater") && gHippoLimits->mRenderWater)
299 { 300 {
300 createWaterTexture(); 301 createWaterTexture();
301 mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp); 302 mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
@@ -306,6 +307,29 @@ void LLSurface::initTextures()
306 } 307 }
307} 308}
308 309
310//static
311void LLSurface::rebuildWater()
312{
313 //lldebugs << "Rebuilding Water...";
314 if(!mWaterObjp.isNull())
315 {
316 //lldebugs << "Removing Water";
317 //Remove the old
318 gObjectList.killObject(mWaterObjp);
319 }
320
321 if (gSavedSettings.getBOOL("RenderWater") && gHippoLimits->mRenderWater)
322 {
323 //lldebugs << "Building Water";
324 createWaterTexture();
325 mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
326 gPipeline.createObject(mWaterObjp);
327 LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
328 water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
329 mWaterObjp->setPositionGlobal(water_pos_global);
330 }
331 //lldebugs << "Rebuilding Water Complete";
332}
309 333
310void LLSurface::setOriginGlobal(const LLVector3d &origin_global) 334void LLSurface::setOriginGlobal(const LLVector3d &origin_global)
311{ 335{
diff --git a/linden/indra/newview/llsurface.h b/linden/indra/newview/llsurface.h
index 003b2f2..c217b19 100644
--- a/linden/indra/newview/llsurface.h
+++ b/linden/indra/newview/llsurface.h
@@ -91,6 +91,8 @@ public:
91 void disconnectNeighbor(LLSurface *neighborp); 91 void disconnectNeighbor(LLSurface *neighborp);
92 void disconnectAllNeighbors(); 92 void disconnectAllNeighbors();
93 93
94 void rebuildWater(); //Destroys (if nesessary) and then rebuilds (if needed)
95
94 virtual void decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch); 96 virtual void decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch);
95 virtual void updatePatchVisibilities(LLAgent &agent); 97 virtual void updatePatchVisibilities(LLAgent &agent);
96 98
diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp
index 5175cbb..c8e1298 100644
--- a/linden/indra/newview/lltexlayer.cpp
+++ b/linden/indra/newview/lltexlayer.cpp
@@ -61,6 +61,8 @@
61 61
62using namespace LLVOAvatarDefines; 62using namespace LLVOAvatarDefines;
63 63
64const S32 MAX_BAKE_UPLOAD_ATTEMPTS = 4;
65
64// static 66// static
65S32 LLTexLayerSetBuffer::sGLByteCount = 0; 67S32 LLTexLayerSetBuffer::sGLByteCount = 0;
66 68
@@ -98,6 +100,8 @@ LLTexLayerSetBuffer::LLTexLayerSetBuffer(LLTexLayerSet* owner, S32 width, S32 he
98 mNeedsUpdate( TRUE ), 100 mNeedsUpdate( TRUE ),
99 mNeedsUpload( FALSE ), 101 mNeedsUpload( FALSE ),
100 mUploadPending( FALSE ), // Not used for any logic here, just to sync sending of updates 102 mUploadPending( FALSE ), // Not used for any logic here, just to sync sending of updates
103 mUploadFailCount( 0 ),
104 mUploadAfter( 0 ),
101 mTexLayerSet( owner ) 105 mTexLayerSet( owner )
102{ 106{
103 LLTexLayerSetBuffer::sGLByteCount += getSize(); 107 LLTexLayerSetBuffer::sGLByteCount += getSize();
@@ -151,6 +155,18 @@ void LLTexLayerSetBuffer::requestUpload()
151 { 155 {
152 mNeedsUpload = TRUE; 156 mNeedsUpload = TRUE;
153 mUploadPending = TRUE; 157 mUploadPending = TRUE;
158 mUploadAfter = 0;
159 }
160}
161
162// request an upload to start delay_usec microseconds from now
163void LLTexLayerSetBuffer::requestDelayedUpload(U64 delay_usec)
164{
165 if (!mNeedsUpload)
166 {
167 mNeedsUpload = TRUE;
168 mUploadPending = TRUE;
169 mUploadAfter = LLFrameTimer::getTotalTime() + delay_usec;
154 } 170 }
155} 171}
156 172
@@ -161,6 +177,14 @@ void LLTexLayerSetBuffer::cancelUpload()
161 mNeedsUpload = FALSE; 177 mNeedsUpload = FALSE;
162 } 178 }
163 mUploadPending = FALSE; 179 mUploadPending = FALSE;
180 mUploadAfter = 0;
181}
182
183// do we need to upload, and do we have sufficient data to create an uploadable composite?
184BOOL LLTexLayerSetBuffer::needsUploadNow() const
185{
186 BOOL upload = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && (gAgent.mNumPendingQueries == 0);
187 return (upload && (LLFrameTimer::getTotalTime() > mUploadAfter));
164} 188}
165 189
166void LLTexLayerSetBuffer::pushProjection() 190void LLTexLayerSetBuffer::pushProjection()
@@ -187,7 +211,7 @@ void LLTexLayerSetBuffer::popProjection()
187BOOL LLTexLayerSetBuffer::needsRender() 211BOOL LLTexLayerSetBuffer::needsRender()
188{ 212{
189 LLVOAvatar* avatar = mTexLayerSet->getAvatar(); 213 LLVOAvatar* avatar = mTexLayerSet->getAvatar();
190 BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgent.mNumPendingQueries == 0; 214 BOOL upload_now = needsUploadNow();
191 BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating; 215 BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating;
192 if (needs_update) 216 if (needs_update)
193 { 217 {
@@ -229,9 +253,6 @@ BOOL LLTexLayerSetBuffer::render()
229 // Default color mask for tex layer render 253 // Default color mask for tex layer render
230 gGL.setColorMask(true, true); 254 gGL.setColorMask(true, true);
231 255
232 // do we need to upload, and do we have sufficient data to create an uploadable composite?
233 // When do we upload the texture if gAgent.mNumPendingQueries is non-zero?
234 BOOL upload_now = (gAgent.mNumPendingQueries == 0 && mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal());
235 BOOL success = TRUE; 256 BOOL success = TRUE;
236 257
237 // Composite the color data 258 // Composite the color data
@@ -239,7 +260,7 @@ BOOL LLTexLayerSetBuffer::render()
239 success &= mTexLayerSet->render( mOrigin.mX, mOrigin.mY, mWidth, mHeight ); 260 success &= mTexLayerSet->render( mOrigin.mX, mOrigin.mY, mWidth, mHeight );
240 gGL.flush(); 261 gGL.flush();
241 262
242 if( upload_now ) 263 if( needsUploadNow() )
243 { 264 {
244 if (!success) 265 if (!success)
245 { 266 {
@@ -387,7 +408,8 @@ void LLTexLayerSetBuffer::readBackAndUpload()
387 std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture"); 408 std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture");
388 409
389 if(!url.empty() 410 if(!url.empty()
390 && !LLPipeline::sForceOldBakedUpload) // Toggle the debug setting UploadBakedTexOld to change between the new caps method and old method 411 && !LLPipeline::sForceOldBakedUpload // Toggle the debug setting UploadBakedTexOld to change between the new caps method and old method
412 && (mUploadFailCount < MAX_BAKE_UPLOAD_ATTEMPTS-1)) // allow last ditch attempt via asset store, since capabilty seems prone to transient failures.
391 { 413 {
392 llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl; 414 llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl;
393 415
@@ -436,12 +458,14 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* user
436 458
437 LLVOAvatar* avatar = gAgent.getAvatarObject(); 459 LLVOAvatar* avatar = gAgent.getAvatarObject();
438 460
439 if (0 == result && 461 if (avatar && !avatar->isDead() &&
440 avatar && !avatar->isDead() && 462 baked_upload_data &&
441 baked_upload_data->mAvatar == avatar && // Sanity check: only the user's avatar should be uploading textures. 463 baked_upload_data->mAvatar == avatar && // Sanity check: only the user's avatar should be uploading textures.
442 baked_upload_data->mLayerSet->hasComposite()) 464 baked_upload_data->mLayerSet->hasComposite())
443 { 465 {
444 LLTexLayerSetBuffer* layerset_buffer = baked_upload_data->mLayerSet->getComposite(); 466 LLTexLayerSetBuffer* layerset_buffer = baked_upload_data->mLayerSet->getComposite();
467 S32 failures = layerset_buffer->mUploadFailCount;
468 layerset_buffer->mUploadFailCount = 0;
445 469
446 if (layerset_buffer->mUploadID.isNull()) 470 if (layerset_buffer->mUploadID.isNull())
447 { 471 {
@@ -469,9 +493,20 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* user
469 } 493 }
470 else 494 else
471 { 495 {
472 // Avatar appearance is changing, ignore the upload results 496 ++failures;
473 llinfos << "Baked upload failed. Reason: " << result << llendl; 497 llinfos << "Baked upload failed (attempt " << failures << "/" << MAX_BAKE_UPLOAD_ATTEMPTS << "), ";
474 // *FIX: retry upload after n seconds, asset server could be busy 498 if (failures >= MAX_BAKE_UPLOAD_ATTEMPTS)
499 {
500 llcont << "giving up.";
501 }
502 else
503 {
504 const F32 delay = 5.f;
505 llcont << llformat("retrying in %.2f seconds.", delay);
506 layerset_buffer->mUploadFailCount = failures;
507 layerset_buffer->requestDelayedUpload((U64)(delay * 1000000));
508 }
509 llcont << llendl;
475 } 510 }
476 } 511 }
477 else 512 else
diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h
index 020ba86..31b175e 100644
--- a/linden/indra/newview/lltexlayer.h
+++ b/linden/indra/newview/lltexlayer.h
@@ -218,6 +218,7 @@ public:
218 BOOL needsRender(); 218 BOOL needsRender();
219 void requestUpdate(); 219 void requestUpdate();
220 void requestUpload(); 220 void requestUpload();
221 void requestDelayedUpload(U64 delay_usec);
221 void cancelUpload(); 222 void cancelUpload();
222 BOOL uploadPending() { return mUploadPending; } 223 BOOL uploadPending() { return mUploadPending; }
223 BOOL render( S32 x, S32 y, S32 width, S32 height ); 224 BOOL render( S32 x, S32 y, S32 width, S32 height );
@@ -234,12 +235,15 @@ public:
234private: 235private:
235 void pushProjection(); 236 void pushProjection();
236 void popProjection(); 237 void popProjection();
238 BOOL needsUploadNow() const;
237 239
238private: 240private:
239 BOOL mNeedsUpdate; 241 BOOL mNeedsUpdate;
240 BOOL mNeedsUpload; 242 BOOL mNeedsUpload;
241 BOOL mUploadPending; 243 BOOL mUploadPending;
242 LLUUID mUploadID; // Identifys the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit) 244 LLUUID mUploadID; // Identifys the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit)
245 S32 mUploadFailCount;
246 U64 mUploadAfter; // delay upload until after this time (in microseconds)
243 LLTexLayerSet* mTexLayerSet; 247 LLTexLayerSet* mTexLayerSet;
244 248
245 static S32 sGLByteCount; 249 static S32 sGLByteCount;
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp
index a9b7f81..a1a9a39 100644
--- a/linden/indra/newview/lltexturecache.cpp
+++ b/linden/indra/newview/lltexturecache.cpp
@@ -1172,7 +1172,7 @@ void LLTextureCache::readHeaderCache()
1172 U32 empty_entries = 0; 1172 U32 empty_entries = 0;
1173 typedef std::pair<U32, LLUUID> lru_data_t; 1173 typedef std::pair<U32, LLUUID> lru_data_t;
1174 std::set<lru_data_t> lru; 1174 std::set<lru_data_t> lru;
1175 std::vector<LLUUID> purge_list; 1175 std::set<LLUUID> purge_list;
1176 for (U32 i=0; i<num_entries; i++) 1176 for (U32 i=0; i<num_entries; i++)
1177 { 1177 {
1178 Entry& entry = entries[i]; 1178 Entry& entry = entries[i];
@@ -1191,27 +1191,23 @@ void LLTextureCache::readHeaderCache()
1191 { 1191 {
1192 // Shouldn't happen, failsafe only 1192 // Shouldn't happen, failsafe only
1193 llwarns << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << llendl; 1193 llwarns << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << llendl;
1194 purge_list.push_back(id); 1194 purge_list.insert(id);
1195 } 1195 }
1196 } 1196 }
1197 } 1197 }
1198 } 1198 }
1199 if (num_entries > sCacheMaxEntries) 1199 if (num_entries - empty_entries > sCacheMaxEntries)
1200 { 1200 {
1201 // Special case: cache size was reduced, need to remove entries 1201 // Special case: cache size was reduced, need to remove entries
1202 // Note: After we prune entries, we will call this again and create the LRU 1202 // Note: After we prune entries, we will call this again and create the LRU
1203 U32 entries_to_purge = (num_entries-empty_entries) - sCacheMaxEntries; 1203 U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries;
1204 llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl; 1204 llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl;
1205 if (entries_to_purge > 0) 1205 // We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have:
1206 // purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge
1207 for (std::set<lru_data_t>::iterator iter = lru.begin(); purge_list.size() < entries_to_purge; ++iter)
1206 { 1208 {
1207 for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter) 1209 purge_list.insert(iter->second);
1208 {
1209 purge_list.push_back(iter->second);
1210 if (purge_list.size() >= entries_to_purge)
1211 break;
1212 }
1213 } 1210 }
1214 llassert_always(purge_list.size() >= entries_to_purge);
1215 } 1211 }
1216 else 1212 else
1217 { 1213 {
@@ -1227,11 +1223,9 @@ void LLTextureCache::readHeaderCache()
1227 1223
1228 if (purge_list.size() > 0) 1224 if (purge_list.size() > 0)
1229 { 1225 {
1230 for (std::vector<LLUUID>::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter) 1226 for (std::set<LLUUID>::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter)
1231 { 1227 {
1232 mHeaderMutex.unlock(); 1228 removeFromCacheLocked(*iter);
1233 removeFromCache(*iter);
1234 mHeaderMutex.lock();
1235 } 1229 }
1236 // If we removed any entries, we need to rebuild the entries list, 1230 // If we removed any entries, we need to rebuild the entries list,
1237 // write the header, and call this again 1231 // write the header, and call this again
@@ -1250,7 +1244,7 @@ void LLTextureCache::readHeaderCache()
1250 writeEntriesAndClose(new_entries); 1244 writeEntriesAndClose(new_entries);
1251 mHeaderMutex.unlock(); // unlock the mutex before calling again 1245 mHeaderMutex.unlock(); // unlock the mutex before calling again
1252 readHeaderCache(); // repeat with new entries file 1246 readHeaderCache(); // repeat with new entries file
1253 mHeaderMutex.lock(); 1247 return;
1254 } 1248 }
1255 else 1249 else
1256 { 1250 {
@@ -1345,7 +1339,7 @@ void LLTextureCache::purgeTextures(bool validate)
1345 if (validate) 1339 if (validate)
1346 { 1340 {
1347 validate_idx = gSavedSettings.getU32("CacheValidateCounter"); 1341 validate_idx = gSavedSettings.getU32("CacheValidateCounter");
1348 U32 next_idx = (++validate_idx) % 256; 1342 U32 next_idx = (validate_idx + 1) % 256;
1349 gSavedSettings.setU32("CacheValidateCounter", next_idx); 1343 gSavedSettings.setU32("CacheValidateCounter", next_idx);
1350 LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL; 1344 LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL;
1351 } 1345 }
@@ -1388,7 +1382,15 @@ void LLTextureCache::purgeTextures(bool validate)
1388 { 1382 {
1389 purge_count++; 1383 purge_count++;
1390 LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL; 1384 LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL;
1391 LLAPRFile::remove(filename); 1385 if (entries[idx].mBodySize > 0)
1386 {
1387 LLAPRFile::remove(filename);
1388 }
1389 else if (LLAPRFile::isExist(filename)) // Sanity check. Shouldn't exist.
1390 {
1391 LL_WARNS("TextureCache") << "Entry has zero body size but existing " << filename << ". Deleting file too..." << LL_ENDL;
1392 LLAPRFile::remove(filename);
1393 }
1392 cache_size -= entries[idx].mBodySize; 1394 cache_size -= entries[idx].mBodySize;
1393 mTexturesSizeTotal -= entries[idx].mBodySize; 1395 mTexturesSizeTotal -= entries[idx].mBodySize;
1394 entries[idx].mBodySize = 0; 1396 entries[idx].mBodySize = 0;
@@ -1615,7 +1617,6 @@ bool LLTextureCache::removeHeaderCacheEntry(const LLUUID& id)
1615{ 1617{
1616 if (!mReadOnly) 1618 if (!mReadOnly)
1617 { 1619 {
1618 LLMutexLock lock(&mHeaderMutex);
1619 Entry entry; 1620 Entry entry;
1620 S32 idx = openAndReadEntry(id, entry, false); 1621 S32 idx = openAndReadEntry(id, entry, false);
1621 if (idx >= 0) 1622 if (idx >= 0)
@@ -1632,17 +1633,26 @@ bool LLTextureCache::removeHeaderCacheEntry(const LLUUID& id)
1632 return false; 1633 return false;
1633} 1634}
1634 1635
1635void LLTextureCache::removeFromCache(const LLUUID& id) 1636void LLTextureCache::removeFromCacheLocked(const LLUUID& id)
1636{ 1637{
1637 //llwarns << "Removing texture from cache: " << id << llendl; 1638 //llwarns << "Removing texture from cache: " << id << llendl;
1638 if (!mReadOnly) 1639 if (!mReadOnly)
1639 { 1640 {
1640 removeHeaderCacheEntry(id); 1641 removeHeaderCacheEntry(id);
1641 LLMutexLock lock(&mHeaderMutex);
1642 LLAPRFile::remove(getTextureFileName(id)); 1642 LLAPRFile::remove(getTextureFileName(id));
1643 } 1643 }
1644} 1644}
1645 1645
1646void LLTextureCache::removeFromCache(const LLUUID& id)
1647{
1648 //llwarns << "Removing texture from cache: " << id << llendl;
1649 if (!mReadOnly)
1650 {
1651 LLMutexLock lock(&mHeaderMutex);
1652 LLTextureCache::removeFromCacheLocked(id);
1653 }
1654}
1655
1646////////////////////////////////////////////////////////////////////////////// 1656//////////////////////////////////////////////////////////////////////////////
1647 1657
1648LLTextureCache::ReadResponder::ReadResponder() 1658LLTextureCache::ReadResponder::ReadResponder()
diff --git a/linden/indra/newview/lltexturecache.h b/linden/indra/newview/lltexturecache.h
index 45804c2..c859b9a 100644
--- a/linden/indra/newview/lltexturecache.h
+++ b/linden/indra/newview/lltexturecache.h
@@ -158,6 +158,7 @@ private:
158 S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize); 158 S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize);
159 S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize); 159 S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize);
160 bool removeHeaderCacheEntry(const LLUUID& id); 160 bool removeHeaderCacheEntry(const LLUUID& id);
161 void removeFromCacheLocked(const LLUUID& id);
161 162
162private: 163private:
163 // Internal 164 // Internal
diff --git a/linden/indra/newview/lltooldraganddrop.cpp b/linden/indra/newview/lltooldraganddrop.cpp
index 2bc6e3e..4e133de 100644
--- a/linden/indra/newview/lltooldraganddrop.cpp
+++ b/linden/indra/newview/lltooldraganddrop.cpp
@@ -75,6 +75,7 @@
75// [RLVa:KB] 75// [RLVa:KB]
76#include "rlvhandler.h" 76#include "rlvhandler.h"
77// [/RLVa:KB] 77// [/RLVa:KB]
78#include "hippoLimits.h"
78 79
79// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES 80// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES
80// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a 81// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a
@@ -1679,8 +1680,10 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent,
1679 LLNotifications::instance().add("IncompleteInventory"); 1680 LLNotifications::instance().add("IncompleteInventory");
1680 return; 1681 return;
1681 } 1682 }
1683
1682 count = items.count() + cats.count(); 1684 count = items.count() + cats.count();
1683 if(count > MAX_ITEMS) 1685 if(count > gHippoLimits->getMaxInventoryItemsTransfer() &&
1686 gHippoLimits->getMaxInventoryItemsTransfer() != -1) //MAX_ITEMS)
1684 { 1687 {
1685 LLNotifications::instance().add("TooManyItems"); 1688 LLNotifications::instance().add("TooManyItems");
1686 return; 1689 return;
@@ -1776,8 +1779,9 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent,
1776 // MTUBYTES or 18 * count < 1200 => count < 1200/18 => 1779 // MTUBYTES or 18 * count < 1200 => count < 1200/18 =>
1777 // 66. I've cut it down a bit from there to give some pad. 1780 // 66. I've cut it down a bit from there to give some pad.
1778 S32 count = items.count() + cats.count(); 1781 S32 count = items.count() + cats.count();
1779 if(count > MAX_ITEMS) 1782 if(count > gHippoLimits->getMaxInventoryItemsTransfer() &&
1780 { 1783 gHippoLimits->getMaxInventoryItemsTransfer() != -1) //MAX_ITEMS)
1784 {
1781 LLNotifications::instance().add("TooManyItems"); 1785 LLNotifications::instance().add("TooManyItems");
1782 return; 1786 return;
1783 } 1787 }
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp
index 78940cc..4167464 100644
--- a/linden/indra/newview/llviewerdisplay.cpp
+++ b/linden/indra/newview/llviewerdisplay.cpp
@@ -82,6 +82,7 @@
82#include "llwlparammanager.h" 82#include "llwlparammanager.h"
83#include "llwaterparammanager.h" 83#include "llwaterparammanager.h"
84#include "llpostprocess.h" 84#include "llpostprocess.h"
85#include "hippoLimits.h"
85 86
86// [RLVa:KB] 87// [RLVa:KB]
87#include "rlvhandler.h" 88#include "rlvhandler.h"
@@ -181,6 +182,12 @@ void display_update_camera()
181 { 182 {
182 final_far *= 0.5f; 183 final_far *= 0.5f;
183 } 184 }
185 if(gAgent.mLockedDrawDistance)
186 {
187 //Reset the draw distance and do not update with the new val
188 final_far = LLViewerCamera::getInstance()->getFar();
189 gAgent.mDrawDistance = final_far;
190 }
184 LLViewerCamera::getInstance()->setFar(final_far); 191 LLViewerCamera::getInstance()->setFar(final_far);
185 gViewerWindow->setup3DRender(); 192 gViewerWindow->setup3DRender();
186 193
@@ -305,13 +312,19 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
305 // Update GL Texture statistics (used for discard logic?) 312 // Update GL Texture statistics (used for discard logic?)
306 // 313 //
307 314
315
308 LLAppViewer::instance()->pingMainloopTimeout("Display:TextureStats"); 316 LLAppViewer::instance()->pingMainloopTimeout("Display:TextureStats");
309 gFrameStats.start(LLFrameStats::UPDATE_TEX_STATS); 317 gFrameStats.start(LLFrameStats::UPDATE_TEX_STATS);
310 stop_glerror(); 318 stop_glerror();
311 319
312 LLImageGL::updateStats(gFrameTimeSeconds); 320 LLImageGL::updateStats(gFrameTimeSeconds);
313 321
314 LLVOAvatar::sRenderName = gSavedSettings.getS32("RenderName"); 322 S32 RenderName = gSavedSettings.getS32("RenderName");
323
324 if(RenderName > gHippoLimits->mRenderName)//The most restricted gets set here
325 RenderName = gHippoLimits->mRenderName;
326
327 LLVOAvatar::sRenderName = RenderName;
315 LLVOAvatar::sRenderGroupTitles = !gSavedSettings.getBOOL("RenderHideGroupTitleAll"); 328 LLVOAvatar::sRenderGroupTitles = !gSavedSettings.getBOOL("RenderHideGroupTitleAll");
316 329
317 gPipeline.mBackfaceCull = TRUE; 330 gPipeline.mBackfaceCull = TRUE;
@@ -835,6 +848,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
835 //} 848 //}
836 849
837 LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE; 850 LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
851
852 //Check for RenderWater
853 if (!gSavedSettings.getBOOL("RenderWater") || !gHippoLimits->mRenderWater)
854 LLPipeline::sUnderWaterRender = FALSE;
855
838 LLPipeline::updateRenderDeferred(); 856 LLPipeline::updateRenderDeferred();
839 857
840 stop_glerror(); 858 stop_glerror();
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp
index 33113f1..0e06353 100644
--- a/linden/indra/newview/llviewerinventory.cpp
+++ b/linden/indra/newview/llviewerinventory.cpp
@@ -268,7 +268,7 @@ void LLViewerInventoryItem::packMessage(LLMessageSystem* msg) const
268 msg->addU32Fast(_PREHASH_Flags, mFlags); 268 msg->addU32Fast(_PREHASH_Flags, mFlags);
269 mSaleInfo.packMessage(msg); 269 mSaleInfo.packMessage(msg);
270 msg->addStringFast(_PREHASH_Name, mName); 270 msg->addStringFast(_PREHASH_Name, mName);
271 msg->addStringFast(_PREHASH_Description, mDescription); 271 msg->addStringFast(_PREHASH_Description, mDescription);
272 msg->addS32Fast(_PREHASH_CreationDate, mCreationDate); 272 msg->addS32Fast(_PREHASH_CreationDate, mCreationDate);
273 U32 crc = getCRC32(); 273 U32 crc = getCRC32();
274 msg->addU32Fast(_PREHASH_CRC, crc); 274 msg->addU32Fast(_PREHASH_CRC, crc);
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 524654a..3e502c0 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -121,6 +121,8 @@
121#include "llfloaterland.h" 121#include "llfloaterland.h"
122#include "llfloaterlandholdings.h" 122#include "llfloaterlandholdings.h"
123#include "llfloatermap.h" 123#include "llfloatermap.h"
124#include "llfloatermessagebuilder.h"
125#include "llfloatermessagelog.h"
124#include "llfloatermute.h" 126#include "llfloatermute.h"
125#include "llfloateropenobject.h" 127#include "llfloateropenobject.h"
126#include "llfloaterpermissionsmgr.h" 128#include "llfloaterpermissionsmgr.h"
@@ -394,6 +396,8 @@ void handle_god_mode(void*);
394// God menu 396// God menu
395void handle_leave_god_mode(void*); 397void handle_leave_god_mode(void*);
396 398
399void handle_open_message_log(void*);
400void handle_open_message_builder(void*);
397BOOL is_inventory_visible( void* user_data ); 401BOOL is_inventory_visible( void* user_data );
398void handle_reset_view(); 402void handle_reset_view();
399 403
@@ -778,6 +782,11 @@ void init_client_menu(LLMenuGL* menu)
778 782
779 sub->appendSeparator(); 783 sub->appendSeparator();
780 784
785 sub->append(new LLMenuItemCallGL( "Message Log", &handle_open_message_log, NULL));
786 sub->append(new LLMenuItemCallGL( "Message Builder", &handle_open_message_builder, NULL));
787
788 sub->appendSeparator();
789
781 sub->append(new LLMenuItemCallGL("Region Info to Debug Console", 790 sub->append(new LLMenuItemCallGL("Region Info to Debug Console",
782 &handle_region_dump_settings, NULL)); 791 &handle_region_dump_settings, NULL));
783 sub->append(new LLMenuItemCallGL("Group Info to Debug Console", 792 sub->append(new LLMenuItemCallGL("Group Info to Debug Console",
@@ -3280,6 +3289,16 @@ void process_grant_godlike_powers(LLMessageSystem* msg, void**)
3280 } 3289 }
3281} 3290}
3282 3291
3292
3293void handle_open_message_log(void*)
3294{
3295 LLFloaterMessageLog::show();
3296}
3297
3298void handle_open_message_builder(void*)
3299{
3300 LLFloaterMessageBuilder::show("");
3301}
3283/* 3302/*
3284class LLHaveCallingcard : public LLInventoryCollectFunctor 3303class LLHaveCallingcard : public LLInventoryCollectFunctor
3285{ 3304{
@@ -8672,6 +8691,30 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t
8672 8691
8673 8692
8674 8693
8694/////////////////////////
8695// MESSAGE LOG/BUILDER //
8696/////////////////////////
8697
8698
8699class LLMessageLogBuilder : public view_listener_t
8700{
8701 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8702 {
8703 std::string info_type = userdata.asString();
8704 if ("MessageLog" == info_type)
8705 {
8706 handle_open_message_log(NULL);
8707 }
8708 else if ("MessageBuilder" == info_type)
8709 {
8710 handle_open_message_builder(NULL);
8711 }
8712 return true;
8713 }
8714};
8715
8716
8717
8675/////////////////////////////// 8718///////////////////////////////
8676// RELOAD SETTINGS OVERRIDES // 8719// RELOAD SETTINGS OVERRIDES //
8677/////////////////////////////// 8720///////////////////////////////
@@ -11260,6 +11303,8 @@ void initialize_menus()
11260 addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole"); 11303 addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole");
11261 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); 11304 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole");
11262 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); 11305 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole");
11306 addMenu(new LLMessageLogBuilder(), "Advanced.MessageLog");
11307 addMenu(new LLMessageLogBuilder(), "Advanced.MessageBuilder");
11263 addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); 11308 addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides");
11264 addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); 11309 addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit");
11265 addMenu(new LLAdvancedCheckSit(), "Advanced.CheckSit"); 11310 addMenu(new LLAdvancedCheckSit(), "Advanced.CheckSit");
diff --git a/linden/indra/newview/llviewermenu.h b/linden/indra/newview/llviewermenu.h
index 632f783..f33c201 100644
--- a/linden/indra/newview/llviewermenu.h
+++ b/linden/indra/newview/llviewermenu.h
@@ -110,6 +110,8 @@ bool handle_give_money_dialog();
110bool handle_object_open(); 110bool handle_object_open();
111bool handle_go_to_confirm(); 111bool handle_go_to_confirm();
112bool handle_go_to(); 112bool handle_go_to();
113void handle_open_message_log(void*);
114void handle_open_message_builder(void*);
113 115
114// Export to XML or Collada 116// Export to XML or Collada
115void handle_export_selected( void * ); 117void handle_export_selected( void * );
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index dbf9d72..9e7b166 100755
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -152,6 +152,7 @@
152 152
153#include "hippoGridManager.h" 153#include "hippoGridManager.h"
154#include "hippoLimits.h" 154#include "hippoLimits.h"
155#include "wlsettingsmanager.h"
155 156
156#if LL_WINDOWS // For Windows specific error handler 157#if LL_WINDOWS // For Windows specific error handler
157#include "llwindebug.h" // For the invalid message handler 158#include "llwindebug.h" // For the invalid message handler
@@ -2520,6 +2521,62 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
2520 else 2521 else
2521 { 2522 {
2522 LLNotifications::instance().add("TeleportOffered", args, payload); 2523 LLNotifications::instance().add("TeleportOffered", args, payload);
2524 if(binary_bucket_size)
2525 {
2526 char* dest = new char[binary_bucket_size];
2527 strncpy(dest, (char*)binary_bucket, binary_bucket_size-1); /* Flawfinder: ignore */
2528 dest[binary_bucket_size-1] = '\0';
2529
2530 llinfos << "IM_LURE_USER binary_bucket " << dest << llendl;
2531
2532 std::string str(dest);
2533 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
2534 boost::char_separator<char> sep("|","",boost::keep_empty_tokens);
2535 tokenizer tokens(str, sep);
2536 tokenizer::iterator iter = tokens.begin();
2537 std::string global_x_str(*iter++);
2538 std::string global_y_str(*iter++);
2539 std::string x_str(*iter++);
2540 std::string y_str(*iter++);
2541 std::string z_str(*iter++);
2542 // skip what I think must be LookAt
2543 if(iter != tokens.end())
2544 iter++; // x
2545 if(iter != tokens.end())
2546 iter++; // y
2547 if(iter != tokens.end())
2548 iter++; // z
2549 std::string mat_str("");
2550 if(iter != tokens.end())
2551 mat_str.assign(*iter++);
2552 mat_str = utf8str_trim(mat_str);
2553
2554 llinfos << "IM_LURE_USER tokenized " << global_x_str << "|" << global_y_str << "|" << x_str << "|" << y_str << "|" << z_str << "|" << mat_str << llendl;
2555
2556 std::istringstream gxstr(global_x_str);
2557 int global_x;
2558 gxstr >> global_x;
2559
2560 std::istringstream gystr(global_y_str);
2561 int global_y;
2562 gystr >> global_y;
2563
2564 std::istringstream xstr(x_str);
2565 int x;
2566 xstr >> x;
2567
2568 std::istringstream ystr(y_str);
2569 int y;
2570 ystr >> y;
2571
2572 std::istringstream zstr(z_str);
2573 int z;
2574 zstr >> z;
2575
2576 llinfos << "IM_LURE_USER parsed " << global_x << "|" << global_y << "|" << x << "|" << y << "|" << z << "|" << mat_str << llendl;
2577
2578 gAgent.showLureDestination(name, global_x, global_y, x, y, z, mat_str);
2579 }
2523 } 2580 }
2524// [/RLVa:KB] 2581// [/RLVa:KB]
2525 //LLNotifications::instance().add("TeleportOffered", args, payload); 2582 //LLNotifications::instance().add("TeleportOffered", args, payload);
@@ -3060,8 +3117,17 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
3060 3117
3061 if (!is_muted && !is_busy) 3118 if (!is_muted && !is_busy)
3062 { 3119 {
3063 static BOOL* sUseChatBubbles = rebind_llcontrol<BOOL>("UseChatBubbles", &gSavedSettings, true); 3120
3064 visible_in_chat_bubble = *sUseChatBubbles; 3121 BOOL sUseChatBubbles = gSavedSettings.getBOOL("UseChatBubbles");
3122 if(sUseChatBubbles)
3123 {
3124 BOOL localChat = gSavedSettings.getBOOL("UseLocalChatWithBubbles");
3125 if(localChat)
3126 sUseChatBubbles = FALSE; //Act like they arn't enabled and show it anyway
3127 }
3128 //Update..
3129 visible_in_chat_bubble = sUseChatBubbles;
3130
3065 ((LLVOAvatar*)chatter)->addChat(chat); 3131 ((LLVOAvatar*)chatter)->addChat(chat);
3066 } 3132 }
3067 } 3133 }
@@ -3513,6 +3579,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
3513 3579
3514 // Tell the LightShare handler that we have changed regions. 3580 // Tell the LightShare handler that we have changed regions.
3515 WindlightMessage::resetRegion(); 3581 WindlightMessage::resetRegion();
3582 WLSettingsManager::wlresetRegion();
3516} 3583}
3517 3584
3518// stuff we have to do every time we get an AvatarInitComplete from a sim 3585// stuff we have to do every time we get an AvatarInitComplete from a sim
@@ -3779,6 +3846,7 @@ void process_crossed_region(LLMessageSystem* msg, void**)
3779 3846
3780 // Tell the LightShare handler that we have changed regions. 3847 // Tell the LightShare handler that we have changed regions.
3781 WindlightMessage::resetRegion(); 3848 WindlightMessage::resetRegion();
3849 WLSettingsManager::wlresetRegion();
3782} 3850}
3783 3851
3784 3852
diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp
index 4fd3bfb..b63914c 100644
--- a/linden/indra/newview/llviewerregion.cpp
+++ b/linden/indra/newview/llviewerregion.cpp
@@ -452,6 +452,12 @@ void LLViewerRegion::setWaterHeight(F32 water_level)
452 mLandp->setWaterHeight(water_level); 452 mLandp->setWaterHeight(water_level);
453} 453}
454 454
455
456void LLViewerRegion::rebuildWater()
457{
458 mLandp->rebuildWater();
459}
460
455F32 LLViewerRegion::getWaterHeight() const 461F32 LLViewerRegion::getWaterHeight() const
456{ 462{
457 return mLandp->getWaterHeight(); 463 return mLandp->getWaterHeight();
@@ -1416,7 +1422,9 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
1416 LLSD capabilityNames = LLSD::emptyArray(); 1422 LLSD capabilityNames = LLSD::emptyArray();
1417 capabilityNames.append("ChatSessionRequest"); 1423 capabilityNames.append("ChatSessionRequest");
1418 capabilityNames.append("CopyInventoryFromNotecard"); 1424 capabilityNames.append("CopyInventoryFromNotecard");
1425 capabilityNames.append("DispatchOpenRegionSettings");
1419 capabilityNames.append("DispatchRegionInfo"); 1426 capabilityNames.append("DispatchRegionInfo");
1427 capabilityNames.append("DispatchWindLightSettings");
1420 capabilityNames.append("EstateChangeInfo"); 1428 capabilityNames.append("EstateChangeInfo");
1421 capabilityNames.append("EventQueueGet"); 1429 capabilityNames.append("EventQueueGet");
1422 capabilityNames.append("FetchInventory"); 1430 capabilityNames.append("FetchInventory");
@@ -1434,6 +1442,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
1434 capabilityNames.append("ProvisionVoiceAccountRequest"); 1442 capabilityNames.append("ProvisionVoiceAccountRequest");
1435 capabilityNames.append("RemoteParcelRequest"); 1443 capabilityNames.append("RemoteParcelRequest");
1436 capabilityNames.append("RequestTextureDownload"); 1444 capabilityNames.append("RequestTextureDownload");
1445 capabilityNames.append("RetrieveWindLightSettings");
1437 capabilityNames.append("SearchStatRequest"); 1446 capabilityNames.append("SearchStatRequest");
1438 capabilityNames.append("SearchStatTracking"); 1447 capabilityNames.append("SearchStatTracking");
1439 capabilityNames.append("SendPostcard"); 1448 capabilityNames.append("SendPostcard");
diff --git a/linden/indra/newview/llviewerregion.h b/linden/indra/newview/llviewerregion.h
index 09280a5..8cc80e3 100644
--- a/linden/indra/newview/llviewerregion.h
+++ b/linden/indra/newview/llviewerregion.h
@@ -132,6 +132,7 @@ public:
132 132
133 void setWaterHeight(F32 water_level); 133 void setWaterHeight(F32 water_level);
134 F32 getWaterHeight() const; 134 F32 getWaterHeight() const;
135 void rebuildWater();
135 136
136 BOOL isVoiceEnabled() const; 137 BOOL isVoiceEnabled() const;
137 138
@@ -315,10 +316,11 @@ public:
315 LLDynamicArray<U32> mMapAvatars; 316 LLDynamicArray<U32> mMapAvatars;
316 LLDynamicArray<LLUUID> mMapAvatarIDs; 317 LLDynamicArray<LLUUID> mMapAvatarIDs;
317 318
318private:
319 // The surfaces and other layers 319 // The surfaces and other layers
320 LLSurface* mLandp; 320 LLSurface* mLandp;
321 321
322private:
323
322 // Region geometry data 324 // Region geometry data
323 LLVector3d mOriginGlobal; // Location of southwest corner of region (meters) 325 LLVector3d mOriginGlobal; // Location of southwest corner of region (meters)
324 LLVector3d mCenterGlobal; // Location of center in world space (meters) 326 LLVector3d mCenterGlobal; // Location of center in world space (meters)
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 9937ed9..a20769e 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -94,7 +94,7 @@
94#include "boost/lexical_cast.hpp" 94#include "boost/lexical_cast.hpp"
95#endif 95#endif
96#include "hippoLimits.h"// getMaxPrimScale 96#include "hippoLimits.h"// getMaxPrimScale
97 97#include "llstartup.h"
98// [RLVa:KB] 98// [RLVa:KB]
99#include "rlvhandler.h" 99#include "rlvhandler.h"
100// [/RLVa:KB] 100// [/RLVa:KB]
@@ -3666,7 +3666,6 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
3666 } 3666 }
3667// [/RLVa:KB] 3667// [/RLVa:KB]
3668 3668
3669
3670 BOOL need_comma = FALSE; 3669 BOOL need_comma = FALSE;
3671 3670
3672 static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true); 3671 static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true);
diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h
index 50ce53a..548818d 100644
--- a/linden/indra/newview/llvoavatar.h
+++ b/linden/indra/newview/llvoavatar.h
@@ -148,6 +148,7 @@ public:
148 void clampAttachmentPositions(); 148 void clampAttachmentPositions();
149 S32 getAttachmentCount(); // Warning: order(N) not order(1) 149 S32 getAttachmentCount(); // Warning: order(N) not order(1)
150 150
151
151 // HUD functions 152 // HUD functions
152 BOOL hasHUDAttachment() const; 153 BOOL hasHUDAttachment() const;
153 LLBBox getHUDBBox() const; 154 LLBBox getHUDBBox() const;
diff --git a/linden/indra/newview/llwaterparammanager.cpp b/linden/indra/newview/llwaterparammanager.cpp
index e01506e..0156622 100644
--- a/linden/indra/newview/llwaterparammanager.cpp
+++ b/linden/indra/newview/llwaterparammanager.cpp
@@ -75,6 +75,7 @@
75#include "curl/curl.h" 75#include "curl/curl.h"
76 76
77LLWaterParamManager * LLWaterParamManager::sInstance = NULL; 77LLWaterParamManager * LLWaterParamManager::sInstance = NULL;
78LLFrameTimer waterSmoothTransitionTimer;
78 79
79LLWaterParamManager::LLWaterParamManager() : 80LLWaterParamManager::LLWaterParamManager() :
80 mFogColor(22.f/255.f, 43.f/255.f, 54.f/255.f, 0.0f, 0.0f, "waterFogColor", "WaterFogColor"), 81 mFogColor(22.f/255.f, 43.f/255.f, 54.f/255.f, 0.0f, 0.0f, "waterFogColor", "WaterFogColor"),
@@ -454,9 +455,44 @@ void LLWaterParamManager::update(LLViewerCamera * cam)
454 shaders_iter->mUniformsDirty = TRUE; 455 shaders_iter->mUniformsDirty = TRUE;
455 } 456 }
456 } 457 }
458 //Mix windlight settings if needed
459 if(sNeedsMix == TRUE)
460 {
461 if(sMixSet == NULL)
462 {
463 sNeedsMix = FALSE;
464 return;
465 }
466 if (waterSmoothTransitionTimer.getElapsedTimeF32() >=
467 (sMixTime / 100)) //100 steps inbetween
468 {
469 waterSmoothTransitionTimer.reset();
470 mCurParams.mix(mCurParams, *sMixSet, sMixCount / 100);//.01 to 1.0
471 }
472 sMixCount++;
473 if((sMixCount / 100) == 1)
474 {
475 //All done
476 sNeedsMix = FALSE;
477 std::string wlWaterPresetName = "(Region settings)";
478 mCurParams.mName = wlWaterPresetName;
479 removeParamSet( wlWaterPresetName, true );
480 addParamSet( wlWaterPresetName, mCurParams );
481 savePreset( wlWaterPresetName );
482 loadPreset( wlWaterPresetName, true );
483 sMixSet = NULL;
484 }
485 }
457 } 486 }
458} 487}
459 488void LLWaterParamManager::SetMixTime(LLWaterParamSet *mixSet, F32 mixTime)
489{
490 waterSmoothTransitionTimer.reset();
491 sNeedsMix = TRUE;
492 sMixSet = mixSet;
493 sMixTime = mixTime;
494 sMixCount = 1;
495}
460// static 496// static
461void LLWaterParamManager::initClass(void) 497void LLWaterParamManager::initClass(void)
462{ 498{
diff --git a/linden/indra/newview/llwaterparammanager.h b/linden/indra/newview/llwaterparammanager.h
index 588e436..96dd1aa 100644
--- a/linden/indra/newview/llwaterparammanager.h
+++ b/linden/indra/newview/llwaterparammanager.h
@@ -304,6 +304,8 @@ public:
304 // singleton pattern implementation 304 // singleton pattern implementation
305 static LLWaterParamManager * instance(); 305 static LLWaterParamManager * instance();
306 306
307 void SetMixTime(LLWaterParamSet* mixSet, F32 mixTime);
308
307public: 309public:
308 310
309 LLWaterParamSet mCurParams; 311 LLWaterParamSet mCurParams;
@@ -334,6 +336,11 @@ private:
334 LLVector4 mWaterPlane; 336 LLVector4 mWaterPlane;
335 F32 mWaterFogKS; 337 F32 mWaterFogKS;
336 338
339 BOOL sNeedsMix;
340 LLWaterParamSet* sMixSet;
341 F32 sMixTime;
342 F32 sMixCount;
343
337 // our parameter manager singleton instance 344 // our parameter manager singleton instance
338 static LLWaterParamManager * sInstance; 345 static LLWaterParamManager * sInstance;
339 346
diff --git a/linden/indra/newview/llwaterparamset.cpp b/linden/indra/newview/llwaterparamset.cpp
index a26cced..4b2e426 100644
--- a/linden/indra/newview/llwaterparamset.cpp
+++ b/linden/indra/newview/llwaterparamset.cpp
@@ -229,4 +229,96 @@ F32 LLWaterParamSet::getFloat(const std::string& paramName, bool& error)
229 error = true; 229 error = true;
230 return 0; 230 return 0;
231} 231}
232void LLWaterParamSet::mix(LLWaterParamSet& src, LLWaterParamSet& dest, F32 weight)
233{
234 // set up the iterators
235 LLSD::map_iterator cIt = mParamValues.beginMap();
236
237 LLSD srcVal;
238 LLSD destVal;
239
240 // do the interpolation for all the ones saved as vectors
241 // skip the weird ones
242 for(; cIt != mParamValues.endMap(); cIt++) {
243
244 // check params to make sure they're actually there
245 if(src.mParamValues.has(cIt->first))
246 {
247 srcVal = src.mParamValues[cIt->first];
248 }
249 else
250 {
251 continue;
252 }
253
254 if(dest.mParamValues.has(cIt->first))
255 {
256 destVal = dest.mParamValues[cIt->first];
257 }
258 else
259 {
260 continue;
261 }
262
263 // skip if not a vector
264 if(!cIt->second.isArray())
265 {
266 continue;
267 }
268
269 // only Real vectors allowed
270 if(!cIt->second[0].isReal())
271 {
272 continue;
273 }
274
275 // make sure all the same size
276 if( cIt->second.size() != srcVal.size() ||
277 cIt->second.size() != destVal.size())
278 {
279 continue;
280 }
281
282 // more error checking might be necessary;
283
284 for(int i=0; i < cIt->second.size(); ++i)
285 {
286 cIt->second[i] = (1.0f - weight) * (F32) srcVal[i].asReal() +
287 weight * (F32) destVal[i].asReal();
288 }
289 }
290 mParamValues["waterFogColor"][0] = (1 - weight) * (F32) src.mParamValues["waterFogColor"][0].asReal()
291 + weight * (F32) dest.mParamValues["waterFogColor"][0].asReal();
292 mParamValues["waterFogColor"][1] = (1 - weight) * (F32) src.mParamValues["waterFogColor"][1].asReal()
293 + weight * (F32) dest.mParamValues["waterFogColor"][1].asReal();
294 mParamValues["waterFogColor"][2] = (1 - weight) * (F32) src.mParamValues["waterFogColor"][2].asReal()
295 + weight * (F32) dest.mParamValues["waterFogColor"][2].asReal();
296 mParamValues["waterFogColor"][3] = (1 - weight) * (F32) src.mParamValues["waterFogColor"][3].asReal()
297 + weight * (F32) dest.mParamValues["waterFogColor"][3].asReal();
298
299 mParamValues["waterFogDensity"] = (1 - weight) * (F32) src.mParamValues["waterFogDensity"].asReal()
300 + weight * (F32) dest.mParamValues["waterFogDensity"].asReal();
301 mParamValues["underWaterFogMod"] = (1 - weight) * (F32) src.mParamValues["underWaterFogMod"].asReal()
302 + weight * (F32) dest.mParamValues["underWaterFogMod"].asReal();
303 mParamValues["fresnelScale"] = (1 - weight) * (F32) src.mParamValues["fresnelScale"].asReal()
304 + weight * (F32) dest.mParamValues["fresnelScale"].asReal();
305 mParamValues["fresnelOffset"] = (1 - weight) * (F32) src.mParamValues["fresnelOffset"].asReal()
306 + weight * (F32) dest.mParamValues["fresnelOffset"].asReal();
307 mParamValues["scaleAbove"] = (1 - weight) * (F32) src.mParamValues["scaleAbove"].asReal()
308 + weight * (F32) dest.mParamValues["scaleAbove"].asReal();
309 mParamValues["scaleBelow"] = (1 - weight) * (F32) src.mParamValues["scaleBelow"].asReal()
310 + weight * (F32) dest.mParamValues["scaleBelow"].asReal();
311 mParamValues["blurMultiplier"] = (1 - weight) * (F32) src.mParamValues["blurMultiplier"].asReal()
312 + weight * (F32) dest.mParamValues["blurMultiplier"].asReal();
313
314 mParamValues["wave2Dir"][0] = (1 - weight) * (F32) src.mParamValues["wave2Dir"][0].asReal()
315 + weight * (F32) dest.mParamValues["wave2Dir"][0].asReal();
316 mParamValues["wave2Dir"][1] = (1 - weight) * (F32) src.mParamValues["wave2Dir"][1].asReal()
317 + weight * (F32) dest.mParamValues["wave2Dir"][1].asReal();
318
319 mParamValues["wave1Dir"][0] = (1 - weight) * (F32) src.mParamValues["wave1Dir"][0].asReal()
320 + weight * (F32) dest.mParamValues["wave1Dir"][0].asReal();
321 mParamValues["wave1Dir"][1] = (1 - weight) * (F32) src.mParamValues["wave1Dir"][1].asReal()
322 + weight * (F32) dest.mParamValues["wave1Dir"][1].asReal();
323}
232 324
diff --git a/linden/indra/newview/llwlparammanager.cpp b/linden/indra/newview/llwlparammanager.cpp
index 31471d7..8007cce 100644
--- a/linden/indra/newview/llwlparammanager.cpp
+++ b/linden/indra/newview/llwlparammanager.cpp
@@ -71,11 +71,13 @@
71#include "llviewerinventory.h" 71#include "llviewerinventory.h"
72#include "llviewerregion.h" 72#include "llviewerregion.h"
73#include "llassetuploadresponders.h" 73#include "llassetuploadresponders.h"
74#include "llframetimer.h"
74 75
75#include "curl/curl.h" 76#include "curl/curl.h"
76 77
77LLWLParamManager * LLWLParamManager::sInstance = NULL; 78LLWLParamManager * LLWLParamManager::sInstance = NULL;
78std::vector<LLWLPresetsObserver*> LLWLParamManager::sObservers; 79std::vector<LLWLPresetsObserver*> LLWLParamManager::sObservers;
80LLFrameTimer wlSmoothTransitionTimer;
79 81
80LLWLParamManager::LLWLParamManager() : 82LLWLParamManager::LLWLParamManager() :
81 83
@@ -562,6 +564,46 @@ void LLWLParamManager::update(LLViewerCamera * cam)
562 } 564 }
563 } 565 }
564 } 566 }
567
568 //Mix windlight settings if needed
569 if(sNeedsMix == TRUE)
570 {
571 if(sMixSet == NULL)
572 {
573 sNeedsMix = FALSE;
574 return;
575 }
576 if (wlSmoothTransitionTimer.getElapsedTimeF32() >=
577 (sMixTime / 100)) //100 steps inbetween
578 {
579 wlSmoothTransitionTimer.reset();
580 mCurParams.mix(mCurParams, *sMixSet, sMixCount / 100);//.01 to 1.0
581 }
582 sMixCount++;
583 if((sMixCount / 100) == 1)
584 {
585 //All done
586 sNeedsMix = FALSE;
587 std::string wlSkyPresetName = "(Region settings)";
588 mCurParams.mName = wlSkyPresetName;
589 removeParamSet( wlSkyPresetName, true );
590 addParamSet( wlSkyPresetName, mCurParams );
591 savePreset( wlSkyPresetName );
592 mAnimator.mIsRunning = false;
593 mAnimator.mUseLindenTime = false;
594 loadPreset( wlSkyPresetName, true );
595 sMixSet = NULL;
596 }
597 }
598}
599
600void LLWLParamManager::SetMixTime(LLWLParamSet *mixSet, F32 mixTime)
601{
602 wlSmoothTransitionTimer.reset();
603 sNeedsMix = TRUE;
604 sMixSet = mixSet;
605 sMixTime = mixTime;
606 sMixCount = 1;
565} 607}
566 608
567// static 609// static
diff --git a/linden/indra/newview/llwlparammanager.h b/linden/indra/newview/llwlparammanager.h
index 612a507..fc1127e 100644
--- a/linden/indra/newview/llwlparammanager.h
+++ b/linden/indra/newview/llwlparammanager.h
@@ -221,6 +221,8 @@ public:
221 static void removeObserver(LLWLPresetsObserver* observer); 221 static void removeObserver(LLWLPresetsObserver* observer);
222 static void notifyObservers(); 222 static void notifyObservers();
223 223
224 void SetMixTime(LLWLParamSet* mixSet, F32 mixTime);
225
224public: 226public:
225 227
226 // helper variables 228 // helper variables
@@ -280,6 +282,11 @@ public:
280private: 282private:
281 // our parameter manager singleton instance 283 // our parameter manager singleton instance
282 static LLWLParamManager * sInstance; 284 static LLWLParamManager * sInstance;
285
286 BOOL sNeedsMix;
287 LLWLParamSet* sMixSet;
288 F32 sMixTime;
289 F32 sMixCount;
283 290
284 static std::vector<LLWLPresetsObserver*> sObservers; 291 static std::vector<LLWLPresetsObserver*> sObservers;
285 292
diff --git a/linden/indra/newview/llwlparamset.cpp b/linden/indra/newview/llwlparamset.cpp
index ea9c00a..19528eb 100644
--- a/linden/indra/newview/llwlparamset.cpp
+++ b/linden/indra/newview/llwlparamset.cpp
@@ -145,6 +145,11 @@ void LLWLParamSet::set(const std::string& paramName, float x)
145 { 145 {
146 mParamValues[paramName][0] = x; 146 mParamValues[paramName][0] = x;
147 } 147 }
148 else
149 {
150 //Default this
151 mParamValues[paramName] = x;
152 }
148} 153}
149 154
150void LLWLParamSet::set(const std::string& paramName, float x, float y) { 155void LLWLParamSet::set(const std::string& paramName, float x, float y) {
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index ca8ce2d..c484462 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -669,7 +669,8 @@ void LLWorld::updateClouds(const F32 dt)
669{ 669{
670 static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); 670 static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true);
671 if ((*sFreezeTime) || 671 if ((*sFreezeTime) ||
672 !gSavedSettings.getBOOL("SkyUseClassicClouds")) 672 !gSavedSettings.getBOOL("SkyUseClassicClouds") ||
673 !gHippoLimits->skyUseClassicClouds)
673 { 674 {
674 // don't move clouds in snapshot mode 675 // don't move clouds in snapshot mode
675 return; 676 return;
@@ -830,6 +831,14 @@ void LLWorld::setLandFarClip(const F32 far_clip)
830 } 831 }
831} 832}
832 833
834void LLWorld::rebuildClouds(LLViewerRegion *regionp)
835{
836 regionp->mCloudLayer.destroy();
837 regionp->mCloudLayer.create(regionp);
838 regionp->mCloudLayer.setWidth((F32)mWidth);
839 regionp->mCloudLayer.setWindPointer(&regionp->mWind);
840}
841
833// Some region that we're connected to, but not the one we're in, gave us 842// Some region that we're connected to, but not the one we're in, gave us
834// a (possibly) new water height. Update it in our local copy. 843// a (possibly) new water height. Update it in our local copy.
835void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_height) 844void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_height)
diff --git a/linden/indra/newview/llworld.h b/linden/indra/newview/llworld.h
index 2c5815c..964729d 100644
--- a/linden/indra/newview/llworld.h
+++ b/linden/indra/newview/llworld.h
@@ -150,6 +150,8 @@ public:
150 150
151 void getInfo(LLSD& info); 151 void getInfo(LLSD& info);
152 152
153 void rebuildClouds(LLViewerRegion *regionp);
154
153public: 155public:
154 typedef std::list<LLViewerRegion*> region_list_t; 156 typedef std::list<LLViewerRegion*> region_list_t;
155 const region_list_t& getRegionList() const { return mActiveRegionList; } 157 const region_list_t& getRegionList() const { return mActiveRegionList; }
diff --git a/linden/indra/newview/llworldmap.cpp b/linden/indra/newview/llworldmap.cpp
index c6242f6..43d7426 100644
--- a/linden/indra/newview/llworldmap.cpp
+++ b/linden/indra/newview/llworldmap.cpp
@@ -735,6 +735,13 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
735 callback(handle, LLWorldMap::getInstance()->mSLURL, image_id, LLWorldMap::getInstance()->mSLURLTeleport); 735 callback(handle, LLWorldMap::getInstance()->mSLURL, image_id, LLWorldMap::getInstance()->mSLURLTeleport);
736 } 736 }
737 } 737 }
738 if(gAgent.mLureShow)
739 {
740 if((x_regions == gAgent.mLureGlobalX) && (y_regions == gAgent.mLureGlobalY))
741 {
742 gAgent.onFoundLureDestination();
743 }
744 }
738 } 745 }
739 746
740 if(adjust) gFloaterWorldMap->adjustZoomSliderBounds(); 747 if(adjust) gFloaterWorldMap->adjustZoomSliderBounds();
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index cf766e0..2932865 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -101,6 +101,7 @@
101#include "llwaterparammanager.h" 101#include "llwaterparammanager.h"
102#include "llspatialpartition.h" 102#include "llspatialpartition.h"
103#include "llmutelist.h" 103#include "llmutelist.h"
104#include "hippolimits.h"
104 105
105// [RLVa:KB] 106// [RLVa:KB]
106#include "rlvhandler.h" 107#include "rlvhandler.h"
@@ -5980,6 +5981,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
5980 stop_glerror(); 5981 stop_glerror();
5981 5982
5982 LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? FALSE : TRUE; 5983 LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? FALSE : TRUE;
5984
5985 if (!gSavedSettings.getBOOL("RenderWater") || !gHippoLimits->mRenderWater)
5986 LLPipeline::sUnderWaterRender = FALSE;
5983 5987
5984 if (LLPipeline::sUnderWaterRender) 5988 if (LLPipeline::sUnderWaterRender)
5985 { 5989 {
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml b/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml
index 0e5a642..cd88c2e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml
@@ -58,7 +58,7 @@
58 font="SansSerif" mouse_opaque="true" name="Refresh" scale_image="TRUE" /> 58 font="SansSerif" mouse_opaque="true" name="Refresh" scale_image="TRUE" />
59 <slider bottom_delta="-20" left="10" follows="left|top" width="175" height="15" 59 <slider bottom_delta="-20" left="10" follows="left|top" width="175" height="15"
60 name="near_me_range" label="Range" control_name="NearMeRange" 60 name="near_me_range" label="Range" control_name="NearMeRange"
61 min_val="5" max_val="40" increment="1" initial_val="20" decimal_digits="0" /> 61 min_val="5" max_val="512" increment="1" initial_val="20" decimal_digits="0" />
62 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 62 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
63 bottom_delta="0" left="185" drop_shadow_visible="true" follows="left|top" 63 bottom_delta="0" left="185" drop_shadow_visible="true" follows="left|top"
64 font="SansSerifSmall" h_pad="0" halign="left" height="15" 64 font="SansSerifSmall" h_pad="0" halign="left" height="15"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_env_settings.xml b/linden/indra/newview/skins/default/xui/en-us/floater_env_settings.xml
index e2bafbf..0a4f2a9 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_env_settings.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_env_settings.xml
@@ -58,9 +58,11 @@
58 <button bottom="-140" follows="left|top" font="SansSerifSmall" height="20" 58 <button bottom="-140" follows="left|top" font="SansSerifSmall" height="20"
59 label="Use Estate Time" left="8" name="EnvUseEstateTimeButton" width="137" /> 59 label="Use Estate Time" left="8" name="EnvUseEstateTimeButton" width="137" />
60 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="20" 60 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="20"
61 label="Advanced Sky" left="154" name="EnvAdvancedSkyButton" width="137" /> 61 label="Advanced Sky" left="154" name="EnvAdvancedSkyButton" width="107" />
62 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="20" 62 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="20"
63 label="Advanced Water" left="300" name="EnvAdvancedWaterButton" width="137" /> 63 label="Advanced Water" left="270" name="EnvAdvancedWaterButton" width="137" />
64 <button bottom="-40" follows="left|top" font="SansSerif" height="18" label="?" 64 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="20"
65 label="Advanced WindLight Manager" left="416" name="EnvWLManager" width="177" />
66 <button bottom="-40" follows="left|top" font="SansSerif" height="18" label="?"
65 left="570" name="EnvSettingsHelpButton" width="22" /> 67 left="570" name="EnvSettingsHelpButton" width="22" />
66</floater> 68</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml b/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml
index 82a65b8..0175508 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml
@@ -5,7 +5,7 @@
5 embedded_items="false" enabled="true" follows="left|top|right|bottom" 5 embedded_items="false" enabled="true" follows="left|top|right|bottom"
6 font="Monospace" height="376" ignore_tab="false" left="4" 6 font="Monospace" height="376" ignore_tab="false" left="4"
7 max_length="65536" mouse_opaque="true" name="Script Editor" width="492" border_drop_shadow_visible="false" border_visible="false" bevel_style="none" border_style="line" border_thickness="0" 7 max_length="65536" mouse_opaque="true" name="Script Editor" width="492" border_drop_shadow_visible="false" border_visible="false" bevel_style="none" border_style="line" border_thickness="0"
8 word_wrap="true" show_line_numbers="true"> 8 word_wrap="true" show_line_numbers="true" spell_check="false">
9 Loading... 9 Loading...
10 </text_editor> 10 </text_editor>
11 <button bottom="-499" enabled="true" follows="right|bottom" font="SansSerif" 11 <button bottom="-499" enabled="true" follows="right|bottom" font="SansSerif"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tos.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tos.xml
index 485cfcc..beea02f 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_tos.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_tos.xml
@@ -15,15 +15,14 @@
15 bottom="-50" drop_shadow_visible="true" follows="left|top" font="SansSerif" 15 bottom="-50" drop_shadow_visible="true" follows="left|top" font="SansSerif"
16 h_pad="0" halign="left" height="30" left="16" mouse_opaque="true" 16 h_pad="0" halign="left" height="30" left="16" mouse_opaque="true"
17 name="tos_heading" v_pad="0" width="552"> 17 name="tos_heading" v_pad="0" width="552">
18 Please read the following Terms of Service carefully. To continue logging in to Second Life, 18 Please read the following Terms of Service carefully. To continue logging in you must accept the agreement.
19you must accept the agreement.
20 </text> 19 </text>
21 <text_editor bottom="-376" embedded_items="false" follows="left|top" font="SansSerif" 20 <text_editor bottom="-376" embedded_items="false" follows="left|top" font="SansSerif"
22 height="283" left="16" max_length="65536" mouse_opaque="true" 21 height="283" left="16" max_length="65536" mouse_opaque="true"
23 name="tos_text" width="568" 22 name="tos_text" width="568"
24 word_wrap="true"> 23 word_wrap="true">
25 TOS_TEXT 24 TOS_TEXT
26 </text_editor> 25 </text_editor>
27 <!-- Loading text says: "Loading Terms of Service..." URL encoded --> 26 <!-- Loading text says: "Loading Terms of Service..." URL encoded -->
28 <web_browser bottom="-406" embedded_items="false" follows="left|top" font="SansSerif" 27 <web_browser bottom="-406" embedded_items="false" follows="left|top" font="SansSerif"
29 height="340" left="16" max_length="65536" mouse_opaque="true" 28 height="340" left="16" max_length="65536" mouse_opaque="true"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_water.xml b/linden/indra/newview/skins/default/xui/en-us/floater_water.xml
index 441ce7b..a05deb6 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_water.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_water.xml
@@ -1,273 +1,276 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-150" can_close="true" can_drag_on_left="false" can_minimize="true" 2<floater bottom="-150" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" height="240" left="50" min_height="200" 3 can_resize="false" height="240" left="50" min_height="200"
4 min_width="400" mouse_opaque="true" name="Water Floater" 4 min_width="400" mouse_opaque="true" name="Water Floater"
5 rect_control="FloaterAdvancedWaterRect" title="Advanced Water Editor" 5 rect_control="FloaterAdvancedWaterRect" title="Advanced Water Editor"
6 width="700"> 6 width="700">
7 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 7 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
8 bottom="-50" drop_shadow_visible="true" follows="left|top|right" 8 bottom="-50" drop_shadow_visible="true" follows="left|top|right"
9 font="SansSerif" h_pad="0" halign="left" height="16" 9 font="SansSerif" h_pad="0" halign="left" height="16"
10 left="10" mouse_opaque="true" name="KeyFramePresetsText" v_pad="0" 10 left="10" mouse_opaque="true" name="KeyFramePresetsText" v_pad="0"
11 width="110"> 11 width="110">
12 Water Presets: 12 Water Presets:
13 </text> 13 </text>
14 <combo_box allow_text_entry="false" bottom="-52" follows="left|top" height="18" 14 <combo_box allow_text_entry="false" bottom="-52" follows="left|top" height="18"
15 left_delta="120" max_chars="20" mouse_opaque="true" 15 left_delta="120" max_chars="20" mouse_opaque="true"
16 name="WaterPresetsCombo" width="150" /> 16 name="WaterPresetsCombo" width="150" />
17 <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" 17 <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20"
18 label="" label_selected="" left_delta="-25" image_overlay="arrow_left.tga" 18 label="" label_selected="" left_delta="-25" image_overlay="arrow_left.tga"
19 mouse_opaque="true" name="prev" scale_image="true" width="20" /> 19 mouse_opaque="true" name="prev" scale_image="true" width="20" />
20 <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" 20 <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20"
21 label="" label_selected="" left_delta="180" image_overlay="arrow_right.tga" 21 label="" label_selected="" left_delta="180" image_overlay="arrow_right.tga"
22 mouse_opaque="true" name="next" scale_image="true" width="20" /> 22 mouse_opaque="true" name="next" scale_image="true" width="20" />
23 <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" 23 <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20"
24 label="New" right="-270" 24 label="New" right="-270"
25 mouse_opaque="true" name="WaterNewPreset" scale_image="true" width="100" /> 25 mouse_opaque="true" name="WaterNewPreset" scale_image="true" width="100" />
26 <flyout_button bottom_delta="0" follows="left|top" height="20" label="Save to Disk" 26 <flyout_button bottom_delta="0" follows="left|top" height="20" label="Save to Disk"
27 right="-140" halign="center" list_position="above" enabled="true" 27 right="-140" halign="center" list_position="above" enabled="true"
28 mouse_opaque="true" width="125" name="WaterSavePreset"> 28 mouse_opaque="true" width="125" name="WaterSavePreset">
29 <flyout_button_item value="save_inventory_item" name="save_inventory_item"> 29 <flyout_button_item value="save_inventory_item" name="save_inventory_item">
30 Save to Inventory 30 Save to Inventory
31 </flyout_button_item> 31 </flyout_button_item>
32 <flyout_button_item value="save_disk_item" name="save_disk_item"> 32 <flyout_button_item value="save_disk_item" name="save_disk_item">
33 Save to Disk 33 Save to Disk
34 </flyout_button_item> 34 </flyout_button_item>
35 </flyout_button> 35 <flyout_button_item value="send_to_server_item" name="send_to_server_item">
36 <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" 36 Send to Server
37 label="Delete File" label_selected="Delete File" right="-10" 37 </flyout_button_item>
38 mouse_opaque="true" name="WaterDeletePreset" scale_image="true" width="125" /> 38 </flyout_button>
39 <tab_container bottom="-240" follows="left|top" height="180" left="0" 39 <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20"
40 mouse_opaque="false" name="Water Tabs" tab_position="top" width="700"> 40 label="Delete File" label_selected="Delete File" right="-10"
41 <panel border="true" bottom="-240" follows="left|top|right|bottom" height="180" 41 mouse_opaque="true" name="WaterDeletePreset" scale_image="true" width="125" />
42 label="Settings" left="1" mouse_opaque="false" 42 <tab_container bottom="-240" follows="left|top" height="180" left="0"
43 name="Settings" width="698"> 43 mouse_opaque="false" name="Water Tabs" tab_position="top" width="700">
44 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 44 <panel border="true" bottom="-240" follows="left|top|right|bottom" height="180"
45 bottom="-20" drop_shadow_visible="true" follows="left|top|right" 45 label="Settings" left="1" mouse_opaque="false"
46 font="SansSerif" h_pad="0" halign="left" height="16" 46 name="Settings" width="698">
47 left="10" mouse_opaque="true" name="BHText" v_pad="0" width="355"> 47 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
48 Water Fog Color 48 bottom="-20" drop_shadow_visible="true" follows="left|top|right"
49 </text> 49 font="SansSerif" h_pad="0" halign="left" height="16"
50 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 50 left="10" mouse_opaque="true" name="BHText" v_pad="0" width="355">
51 left="160" name="WaterFogColorHelp" width="18" /> 51 Water Fog Color
52 <color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom="-80" 52 </text>
53 can_apply_immediately="true" color="0.5, 0.5, 0.5, 1" follows="left|top" 53 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
54 height="50" label="" left="40" mouse_opaque="true" 54 left="160" name="WaterFogColorHelp" width="18" />
55 name="WaterFogColor" tool_tip="Click to open Color Picker" width="40" /> 55 <color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom="-80"
56 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 56 can_apply_immediately="true" color="0.5, 0.5, 0.5, 1" follows="left|top"
57 bottom="-90" drop_shadow_visible="true" follows="left|top|right" 57 height="50" label="" left="40" mouse_opaque="true"
58 font="SansSerif" h_pad="0" halign="left" height="16" 58 name="WaterFogColor" tool_tip="Click to open Color Picker" width="40" />
59 left="10" mouse_opaque="true" name="WaterFogDensText" v_pad="0" width="355"> 59 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
60 Fog Density Exponent 60 bottom="-90" drop_shadow_visible="true" follows="left|top|right"
61 </text> 61 font="SansSerif" h_pad="0" halign="left" height="16"
62 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 62 left="10" mouse_opaque="true" name="WaterFogDensText" v_pad="0" width="355">
63 left="160" name="WaterFogDensityHelp" width="18" /> 63 Fog Density Exponent
64 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterFogDensity" 64 </text>
65 decimal_digits="1" follows="left" height="10" increment=".1" 65 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
66 initial_val="16" label="" left="24" max_val="10" min_val="0" 66 left="160" name="WaterFogDensityHelp" width="18" />
67 mouse_opaque="true" name="WaterFogDensity" show_text="true" value="1.0" 67 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterFogDensity"
68 width="200" /> 68 decimal_digits="1" follows="left" height="10" increment=".1"
69 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 69 initial_val="16" label="" left="24" max_val="10" min_val="0"
70 bottom="-130" drop_shadow_visible="true" follows="left|top|right" 70 mouse_opaque="true" name="WaterFogDensity" show_text="true" value="1.0"
71 font="SansSerif" h_pad="0" halign="left" height="16" 71 width="200" />
72 left="10" mouse_opaque="true" name="WaterUnderWaterFogModText" v_pad="0" 72 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
73 width="355"> 73 bottom="-130" drop_shadow_visible="true" follows="left|top|right"
74 Underwater Fog Modifier 74 font="SansSerif" h_pad="0" halign="left" height="16"
75 </text> 75 left="10" mouse_opaque="true" name="WaterUnderWaterFogModText" v_pad="0"
76 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 76 width="355">
77 left="160" name="WaterUnderWaterFogModHelp" width="18" /> 77 Underwater Fog Modifier
78 <slider bottom_delta="-30" can_edit_text="false" control_name="" decimal_digits="2" 78 </text>
79 follows="left" height="10" increment=".01" initial_val="16" label="" 79 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
80 left="24" max_val="2" min_val="0" mouse_opaque="true" 80 left="160" name="WaterUnderWaterFogModHelp" width="18" />
81 name="WaterUnderWaterFogMod" show_text="true" value="0.25" width="200" /> 81 <slider bottom_delta="-30" can_edit_text="false" control_name="" decimal_digits="2"
82 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 82 follows="left" height="10" increment=".01" initial_val="16" label=""
83 bottom="-20" drop_shadow_visible="true" follows="left|top|right" 83 left="24" max_val="2" min_val="0" mouse_opaque="true"
84 font="SansSerif" h_pad="0" halign="left" height="16" 84 name="WaterUnderWaterFogMod" show_text="true" value="0.25" width="200" />
85 left="245" mouse_opaque="true" name="BDensText" v_pad="0" width="355"> 85 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
86 Reflection Wavelet Scale 86 bottom="-20" drop_shadow_visible="true" follows="left|top|right"
87 </text> 87 font="SansSerif" h_pad="0" halign="left" height="16"
88 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 88 left="245" mouse_opaque="true" name="BDensText" v_pad="0" width="355">
89 left="395" name="WaterNormalScaleHelp" width="18" /> 89 Reflection Wavelet Scale
90 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 90 </text>
91 bottom="-37" drop_shadow_visible="true" follows="left|top|right" 91 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
92 font="SansSerifSmall" h_pad="0" halign="center" height="16" 92 left="395" name="WaterNormalScaleHelp" width="18" />
93 left="245" mouse_opaque="true" name="BHText2" v_pad="0" width="10"> 93 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
94 1 94 bottom="-37" drop_shadow_visible="true" follows="left|top|right"
95 </text> 95 font="SansSerifSmall" h_pad="0" halign="center" height="16"
96 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 96 left="245" mouse_opaque="true" name="BHText2" v_pad="0" width="10">
97 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right" 97 1
98 font="SansSerifSmall" h_pad="0" halign="center" height="16" 98 </text>
99 left_delta="0" mouse_opaque="true" name="BHText3" v_pad="0" width="10"> 99 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
100 2 100 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right"
101 </text> 101 font="SansSerifSmall" h_pad="0" halign="center" height="16"
102 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 102 left_delta="0" mouse_opaque="true" name="BHText3" v_pad="0" width="10">
103 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right" 103 2
104 font="SansSerifSmall" h_pad="0" halign="center" height="16" 104 </text>
105 left_delta="0" mouse_opaque="true" name="BHText4" v_pad="0" width="10"> 105 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
106 3 106 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right"
107 </text> 107 font="SansSerifSmall" h_pad="0" halign="center" height="16"
108 <slider bottom="-50" can_edit_text="false" control_name="WaterNormalScaleX" 108 left_delta="0" mouse_opaque="true" name="BHText4" v_pad="0" width="10">
109 decimal_digits="1" follows="left" height="10" increment="0.1" 109 3
110 initial_val="0.7" label="" left="259" max_val="10" min_val="0" 110 </text>
111 mouse_opaque="true" name="WaterNormalScaleX" show_text="true" value="1.0" 111 <slider bottom="-50" can_edit_text="false" control_name="WaterNormalScaleX"
112 width="200" /> 112 decimal_digits="1" follows="left" height="10" increment="0.1"
113 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterNormalScaleY" 113 initial_val="0.7" label="" left="259" max_val="10" min_val="0"
114 decimal_digits="1" follows="left" height="10" increment="0.1" 114 mouse_opaque="true" name="WaterNormalScaleX" show_text="true" value="1.0"
115 initial_val="0.7" label="" left="259" max_val="10" min_val="0" 115 width="200" />
116 mouse_opaque="true" name="WaterNormalScaleY" show_text="true" value="1.0" 116 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterNormalScaleY"
117 width="200" /> 117 decimal_digits="1" follows="left" height="10" increment="0.1"
118 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterNormalScaleZ" 118 initial_val="0.7" label="" left="259" max_val="10" min_val="0"
119 decimal_digits="1" follows="left" height="10" increment="0.1" 119 mouse_opaque="true" name="WaterNormalScaleY" show_text="true" value="1.0"
120 initial_val="0.7" label="" left="259" max_val="10" min_val="0" 120 width="200" />
121 mouse_opaque="true" name="WaterNormalScaleZ" show_text="true" value="1.0" 121 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterNormalScaleZ"
122 width="200" /> 122 decimal_digits="1" follows="left" height="10" increment="0.1"
123 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 123 initial_val="0.7" label="" left="259" max_val="10" min_val="0"
124 bottom="-80" drop_shadow_visible="true" follows="left|top|right" 124 mouse_opaque="true" name="WaterNormalScaleZ" show_text="true" value="1.0"
125 font="SansSerif" h_pad="0" halign="left" height="16" 125 width="200" />
126 left="245" mouse_opaque="true" name="HDText" v_pad="0" width="355"> 126 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
127 Fresnel Scale 127 bottom="-80" drop_shadow_visible="true" follows="left|top|right"
128 </text> 128 font="SansSerif" h_pad="0" halign="left" height="16"
129 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 129 left="245" mouse_opaque="true" name="HDText" v_pad="0" width="355">
130 left="395" name="WaterFresnelScaleHelp" width="18" /> 130 Fresnel Scale
131 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterFresnelScale" 131 </text>
132 decimal_digits="2" follows="left" height="10" increment="0.01" 132 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
133 initial_val="0.7" label="" left="259" max_val="1" min_val="0" 133 left="395" name="WaterFresnelScaleHelp" width="18" />
134 mouse_opaque="true" name="WaterFresnelScale" show_text="true" value="1.0" 134 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterFresnelScale"
135 width="200" /> 135 decimal_digits="2" follows="left" height="10" increment="0.01"
136 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 136 initial_val="0.7" label="" left="259" max_val="1" min_val="0"
137 bottom="-115" drop_shadow_visible="true" follows="left|top|right" 137 mouse_opaque="true" name="WaterFresnelScale" show_text="true" value="1.0"
138 font="SansSerif" h_pad="0" halign="left" height="16" 138 width="200" />
139 left="245" mouse_opaque="true" name="FresnelOffsetText" v_pad="0" 139 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
140 width="355"> 140 bottom="-115" drop_shadow_visible="true" follows="left|top|right"
141 Fresnel Offset 141 font="SansSerif" h_pad="0" halign="left" height="16"
142 </text> 142 left="245" mouse_opaque="true" name="FresnelOffsetText" v_pad="0"
143 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 143 width="355">
144 left="395" name="WaterFresnelOffsetHelp" width="18" /> 144 Fresnel Offset
145 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterFresnelOffset" 145 </text>
146 decimal_digits="2" follows="left" height="10" increment="0.01" 146 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
147 initial_val="0.7" label="" left="259" max_val="1" min_val="0" 147 left="395" name="WaterFresnelOffsetHelp" width="18" />
148 mouse_opaque="true" name="WaterFresnelOffset" show_text="true" value="1.0" 148 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterFresnelOffset"
149 width="200" /> 149 decimal_digits="2" follows="left" height="10" increment="0.01"
150 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 150 initial_val="0.7" label="" left="259" max_val="1" min_val="0"
151 bottom="-20" drop_shadow_visible="true" follows="left|top|right" 151 mouse_opaque="true" name="WaterFresnelOffset" show_text="true" value="1.0"
152 font="SansSerif" h_pad="0" halign="left" height="16" 152 width="200" />
153 left="480" mouse_opaque="true" name="DensMultText" v_pad="0" width="355"> 153 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
154 Refract Scale Above 154 bottom="-20" drop_shadow_visible="true" follows="left|top|right"
155 </text> 155 font="SansSerif" h_pad="0" halign="left" height="16"
156 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 156 left="480" mouse_opaque="true" name="DensMultText" v_pad="0" width="355">
157 left="630" name="WaterScaleAboveHelp" width="18" /> 157 Refract Scale Above
158 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterScaleAbove" 158 </text>
159 decimal_digits="2" follows="left" height="10" increment="0.01" 159 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
160 initial_val="0.1" label="" left="494" max_val="1" min_val="0" 160 left="630" name="WaterScaleAboveHelp" width="18" />
161 mouse_opaque="true" name="WaterScaleAbove" show_text="true" value="1.0" 161 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterScaleAbove"
162 width="200" /> 162 decimal_digits="2" follows="left" height="10" increment="0.01"
163 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 163 initial_val="0.1" label="" left="494" max_val="1" min_val="0"
164 bottom="-53" drop_shadow_visible="true" follows="left|top|right" 164 mouse_opaque="true" name="WaterScaleAbove" show_text="true" value="1.0"
165 font="SansSerif" h_pad="0" halign="left" height="16" 165 width="200" />
166 left="480" mouse_opaque="true" name="WaterScaleBelowText" v_pad="0" 166 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
167 width="355"> 167 bottom="-53" drop_shadow_visible="true" follows="left|top|right"
168 Refract Scale Below 168 font="SansSerif" h_pad="0" halign="left" height="16"
169 </text> 169 left="480" mouse_opaque="true" name="WaterScaleBelowText" v_pad="0"
170 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 170 width="355">
171 left="630" name="WaterScaleBelowHelp" width="18" /> 171 Refract Scale Below
172 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterScaleBelow" 172 </text>
173 decimal_digits="2" follows="left" height="10" increment="0.01" 173 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
174 initial_val="0" label="" left="494" max_val="1" min_val="0" 174 left="630" name="WaterScaleBelowHelp" width="18" />
175 mouse_opaque="true" name="WaterScaleBelow" show_text="true" value="0.0" 175 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterScaleBelow"
176 width="200" /> 176 decimal_digits="2" follows="left" height="10" increment="0.01"
177 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 177 initial_val="0" label="" left="494" max_val="1" min_val="0"
178 bottom="-87" drop_shadow_visible="true" follows="left|top|right" 178 mouse_opaque="true" name="WaterScaleBelow" show_text="true" value="0.0"
179 font="SansSerif" h_pad="0" halign="left" height="16" 179 width="200" />
180 left="480" mouse_opaque="true" name="MaxAltText" v_pad="0" width="355"> 180 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
181 Blur Multiplier 181 bottom="-87" drop_shadow_visible="true" follows="left|top|right"
182 </text> 182 font="SansSerif" h_pad="0" halign="left" height="16"
183 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 183 left="480" mouse_opaque="true" name="MaxAltText" v_pad="0" width="355">
184 left="630" name="WaterBlurMultiplierHelp" width="18" /> 184 Blur Multiplier
185 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterBlurMult" 185 </text>
186 decimal_digits="3" follows="left" height="10" increment=".001" 186 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
187 initial_val="0" label="" left="494" max_val=".16" min_val="0" 187 left="630" name="WaterBlurMultiplierHelp" width="18" />
188 mouse_opaque="true" name="WaterBlurMult" show_text="true" value="0" 188 <slider bottom_delta="-30" can_edit_text="false" control_name="WaterBlurMult"
189 width="200" /> 189 decimal_digits="3" follows="left" height="10" increment=".001"
190 </panel> 190 initial_val="0" label="" left="494" max_val=".16" min_val="0"
191 <panel border="true" bottom="-240" follows="left|top|right|bottom" height="180" 191 mouse_opaque="true" name="WaterBlurMult" show_text="true" value="0"
192 label="Image" left="1" mouse_opaque="false" name="Waves" 192 width="200" />
193 width="698"> 193 </panel>
194 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 194 <panel border="true" bottom="-240" follows="left|top|right|bottom" height="180"
195 bottom="-20" drop_shadow_visible="true" follows="left|top|right" 195 label="Image" left="1" mouse_opaque="false" name="Waves"
196 font="SansSerif" h_pad="0" halign="left" height="16" 196 width="698">
197 left="10" mouse_opaque="true" name="BHText" v_pad="0" width="355"> 197 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
198 Big Wave Direction 198 bottom="-20" drop_shadow_visible="true" follows="left|top|right"
199 </text> 199 font="SansSerif" h_pad="0" halign="left" height="16"
200 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 200 left="10" mouse_opaque="true" name="BHText" v_pad="0" width="355">
201 left="155" name="WaterWave1Help" width="18" /> 201 Big Wave Direction
202 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 202 </text>
203 bottom="-37" drop_shadow_visible="true" follows="left|top|right" 203 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
204 font="SansSerifSmall" h_pad="0" halign="center" height="16" 204 left="155" name="WaterWave1Help" width="18" />
205 left="10" mouse_opaque="true" name="WaterWave1DirXText" v_pad="0" 205 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
206 width="10"> 206 bottom="-37" drop_shadow_visible="true" follows="left|top|right"
207 X 207 font="SansSerifSmall" h_pad="0" halign="center" height="16"
208 </text> 208 left="10" mouse_opaque="true" name="WaterWave1DirXText" v_pad="0"
209 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 209 width="10">
210 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right" 210 X
211 font="SansSerifSmall" h_pad="0" halign="center" height="16" 211 </text>
212 left_delta="0" mouse_opaque="true" name="WaterWave1DirYText" v_pad="0" 212 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
213 width="10"> 213 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right"
214 Y 214 font="SansSerifSmall" h_pad="0" halign="center" height="16"
215 </text> 215 left_delta="0" mouse_opaque="true" name="WaterWave1DirYText" v_pad="0"
216 <slider bottom="-50" can_edit_text="false" control_name="WaterWave1DirX" 216 width="10">
217 decimal_digits="2" follows="left" height="10" increment="0.01" 217 Y
218 initial_val="0.7" label="" left="24" max_val="4" min_val="-4" 218 </text>
219 mouse_opaque="true" name="WaterWave1DirX" show_text="true" value="0.7" 219 <slider bottom="-50" can_edit_text="false" control_name="WaterWave1DirX"
220 width="200" /> 220 decimal_digits="2" follows="left" height="10" increment="0.01"
221 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterWave1DirY" 221 initial_val="0.7" label="" left="24" max_val="4" min_val="-4"
222 decimal_digits="2" follows="left" height="10" increment="0.01" 222 mouse_opaque="true" name="WaterWave1DirX" show_text="true" value="0.7"
223 initial_val="0.7" label="" left="24" max_val="4" min_val="-4" 223 width="200" />
224 mouse_opaque="true" name="WaterWave1DirY" show_text="true" value="0.7" 224 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterWave1DirY"
225 width="200" /> 225 decimal_digits="2" follows="left" height="10" increment="0.01"
226 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 226 initial_val="0.7" label="" left="24" max_val="4" min_val="-4"
227 bottom="-70" drop_shadow_visible="true" follows="left|top|right" 227 mouse_opaque="true" name="WaterWave1DirY" show_text="true" value="0.7"
228 font="SansSerif" h_pad="0" halign="left" height="16" 228 width="200" />
229 left="10" mouse_opaque="true" name="BHText2" v_pad="0" width="355"> 229 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
230 Little Wave Direction 230 bottom="-70" drop_shadow_visible="true" follows="left|top|right"
231 </text> 231 font="SansSerif" h_pad="0" halign="left" height="16"
232 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 232 left="10" mouse_opaque="true" name="BHText2" v_pad="0" width="355">
233 left="155" name="WaterWave2Help" width="18" /> 233 Little Wave Direction
234 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 234 </text>
235 bottom="-87" drop_shadow_visible="true" follows="left|top|right" 235 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
236 font="SansSerifSmall" h_pad="0" halign="center" height="16" 236 left="155" name="WaterWave2Help" width="18" />
237 left="10" mouse_opaque="true" name="WaterWave2DirXText" v_pad="0" 237 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
238 width="10"> 238 bottom="-87" drop_shadow_visible="true" follows="left|top|right"
239 X 239 font="SansSerifSmall" h_pad="0" halign="center" height="16"
240 </text> 240 left="10" mouse_opaque="true" name="WaterWave2DirXText" v_pad="0"
241 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 241 width="10">
242 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right" 242 X
243 font="SansSerifSmall" h_pad="0" halign="center" height="16" 243 </text>
244 left_delta="0" mouse_opaque="true" name="WaterWave2DirYText" v_pad="0" 244 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
245 width="10"> 245 bottom_delta="-11" drop_shadow_visible="true" follows="left|top|right"
246 Y 246 font="SansSerifSmall" h_pad="0" halign="center" height="16"
247 </text> 247 left_delta="0" mouse_opaque="true" name="WaterWave2DirYText" v_pad="0"
248 <slider bottom="-100" can_edit_text="false" control_name="WaterWave2DirX" 248 width="10">
249 decimal_digits="2" follows="left" height="10" increment="0.01" 249 Y
250 initial_val="0.7" label="" left="24" max_val="4" min_val="-4" 250 </text>
251 mouse_opaque="true" name="WaterWave2DirX" show_text="true" value="0.7" 251 <slider bottom="-100" can_edit_text="false" control_name="WaterWave2DirX"
252 width="200" /> 252 decimal_digits="2" follows="left" height="10" increment="0.01"
253 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterWave2DirY" 253 initial_val="0.7" label="" left="24" max_val="4" min_val="-4"
254 decimal_digits="2" follows="left" height="10" increment="0.01" 254 mouse_opaque="true" name="WaterWave2DirX" show_text="true" value="0.7"
255 initial_val="0.7" label="" left="24" max_val="4" min_val="-4" 255 width="200" />
256 mouse_opaque="true" name="WaterWave2DirY" show_text="true" value="0.7" 256 <slider bottom_delta="-11" can_edit_text="false" control_name="WaterWave2DirY"
257 width="200" /> 257 decimal_digits="2" follows="left" height="10" increment="0.01"
258 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 258 initial_val="0.7" label="" left="24" max_val="4" min_val="-4"
259 bottom="-20" drop_shadow_visible="true" follows="left|top|right" 259 mouse_opaque="true" name="WaterWave2DirY" show_text="true" value="0.7"
260 font="SansSerif" h_pad="0" halign="left" height="16" 260 width="200" />
261 left="240" mouse_opaque="true" name="BHText3" v_pad="0" width="355"> 261 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
262 Normal Map 262 bottom="-20" drop_shadow_visible="true" follows="left|top|right"
263 </text> 263 font="SansSerif" h_pad="0" halign="left" height="16"
264 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 264 left="240" mouse_opaque="true" name="BHText3" v_pad="0" width="355">
265 left="365" name="WaterNormalMapHelp" width="18" /> 265 Normal Map
266 <texture_picker bottom="-165" height="143" label="" left="250" name="WaterNormalMap" 266 </text>
267 width="128" /> 267 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
268 </panel> 268 left="365" name="WaterNormalMapHelp" width="18" />
269 </tab_container> 269 <texture_picker bottom="-165" height="143" label="" left="250" name="WaterNormalMap"
270 <string name="WLDefaultWaterNames"> 270 width="128" />
271 Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez 271 </panel>
272 </string> 272 </tab_container>
273</floater> 273 <string name="WLDefaultWaterNames">
274 Default:Glassy:Pond:Murky:Second Plague:SNAKE!!!:Valdez
275 </string>
276</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_windlight_manager.xml b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_manager.xml
new file mode 100644
index 0000000..9ef70c8
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_manager.xml
@@ -0,0 +1,35 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-150" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" height="130" left="50" min_height="130"
4 min_width="300" mouse_opaque="true" name="WindLight send to server floater"
5 title="WindLight Manager"
6 width="300">
7 <button bottom="-50" enabled="true" font="SansSerif" halign="center" height="20"
8 label="This Parcel" label_selected="This Parcel" left="10"
9 mouse_opaque="true" name="this_parcel" scale_image="true" width="90" />
10 <button bottom="-50" enabled="true" font="SansSerif" halign="center" height="20"
11 label="All Parcels" label_selected="All Parcels" left_delta="95 "
12 mouse_opaque="true" name="all_parcels" scale_image="true" width="90" />
13 <button bottom="-50" enabled="true" font="SansSerif" halign="center" height="20"
14 label="This Region" label_selected="This Region" left_delta="95 "
15 mouse_opaque="true" name="this_region" scale_image="true" width="90" />
16 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
17 bottom="-75" drop_shadow_visible="true" follows="left|top|right"
18 font="SansSerif" h_pad="0" halign="left" height="16"
19 left="10" mouse_opaque="true" name="KeyFramePresetsText" v_pad="0"
20 width="110">
21 Settings:
22 </text>
23 <combo_box allow_text_entry="false" bottom="-77" follows="left|top" height="18"
24 left_delta="70" max_chars="20" mouse_opaque="true" name="WLSettingsCombo"
25 width="200" />
26 <button bottom="-125" enabled="true" font="SansSerif" halign="center" height="20"
27 label="Show" label_selected="Show" left="10"
28 mouse_opaque="true" name="show" scale_image="true" width="80" />
29 <button bottom="-125" enabled="true" font="SansSerif" halign="center" height="20"
30 label="Set to Current" label_selected="Set to Current" left="95"
31 mouse_opaque="true" name="set_to_current" scale_image="true" width="100" />
32 <button bottom="-125" enabled="true" font="SansSerif" halign="center" height="20"
33 label="Remove" label_selected="Remove" left="200"
34 mouse_opaque="true" name="remove" scale_image="true" width="80" />
35</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml
index 4f5fc4a..c5e2c2a 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_options.xml
@@ -32,6 +32,9 @@
32 <flyout_button_item value="save_disk_item" name="save_disk_item"> 32 <flyout_button_item value="save_disk_item" name="save_disk_item">
33 Save to Disk 33 Save to Disk
34 </flyout_button_item> 34 </flyout_button_item>
35 <flyout_button_item value="send_to_server_item" name="send_to_server_item">
36 Send to Server
37 </flyout_button_item>
35 </flyout_button> 38 </flyout_button>
36 <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" 39 <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20"
37 label="Delete File" label_selected="Delete File" right="-10" 40 label="Delete File" label_selected="Delete File" right="-10"
@@ -211,6 +214,10 @@
211 initial_val="500" label="" left="494" max_val="4000" min_val="0" 214 initial_val="500" label="" left="494" max_val="4000" min_val="0"
212 mouse_opaque="true" name="WLMaxAltitude" show_text="true" value="4000" 215 mouse_opaque="true" name="WLMaxAltitude" show_text="true" value="4000"
213 width="205" /> 216 width="205" />
217 <button bottom="4" enabled="true" font="SansSerif" halign="center" height="20"
218 label="Day Cycle Editor" label_selected="Day Cycle Editor"
219 right="-10" mouse_opaque="true" name="WLDayCycleMenuButton"
220 scale_image="true" width="150" />
214 </panel> 221 </panel>
215 <panel border="true" bottom="-180" follows="left|top|right|bottom" height="160" 222 <panel border="true" bottom="-180" follows="left|top|right|bottom" height="160"
216 label="Lighting" left="1" mouse_opaque="true" 223 label="Lighting" left="1" mouse_opaque="true"
@@ -572,34 +579,54 @@
572 mouse_opaque="true" name="WLCloudScrollX" show_text="true" value="0.0" 579 mouse_opaque="true" name="WLCloudScrollX" show_text="true" value="0.0"
573 width="200" /> 580 width="200" />
574 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 581 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
575 bottom="-60" drop_shadow_visible="true" follows="left|top|right" 582 bottom="-52" drop_shadow_visible="true" follows="left|top|right"
576 font="SansSerif" h_pad="0" halign="left" height="16" 583 font="SansSerif" h_pad="0" halign="left" height="16"
577 left="480" mouse_opaque="true" name="WLCloudScrollYText" v_pad="0" 584 left="480" mouse_opaque="true" name="WLCloudScrollYText" v_pad="0"
578 width="355"> 585 width="355">
579 Cloud Scroll Y 586 Cloud Scroll Y
580 </text> 587 </text>
581 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 588 <button bottom_delta="-2" follows="left|top" font="SansSerifSmall" height="18" label="?"
582 left="605" name="WLCloudScrollYHelp" width="18" /> 589 left="605" name="WLCloudScrollYHelp" width="18" />
583 <check_box control_name="WLCloudLockY" follows="left" font="SansSerifSmall" height="16" 590 <check_box control_name="WLCloudLockY" follows="left" font="SansSerifSmall" height="16"
584 initial_value="false" label="Lock" left="625" mouse_opaque="true" 591 initial_value="false" label="Lock" left="625" mouse_opaque="true"
585 name="WLCloudLockY" width="200" /> 592 name="WLCloudLockY" width="200" />
586 <slider bottom_delta="-15" can_edit_text="false" control_name="WLCloudScrollY" 593 <slider bottom_delta="-10" can_edit_text="false" control_name="WLCloudScrollY"
587 decimal_digits="2" follows="left" height="10" increment="0.01" 594 decimal_digits="2" follows="left" height="10" increment="0.01"
588 initial_val="0.5" label="" left="494" max_val="10" min_val="-10" 595 initial_val="0.5" label="" left="494" max_val="10" min_val="-10"
589 mouse_opaque="true" name="WLCloudScrollY" show_text="true" value="0.0" 596 mouse_opaque="true" name="WLCloudScrollY" show_text="true" value="0.0"
590 width="200" /> 597 width="200" />
591 <check_box bottom="-120" control_name="DrawClassicClouds" follows="left" 598 <check_box bottom="-102" control_name="DrawClassicClouds" follows="left"
592 font="SansSerifSmall" height="16" initial_value="false" 599 font="SansSerifSmall" height="16" initial_value="false"
593 label="Draw Classic Clouds" left="480" mouse_opaque="true" 600 label="Draw Classic Clouds" left="480" mouse_opaque="true"
594 name="DrawClassicClouds" width="200" /> 601 name="DrawClassicClouds" width="200" />
595 <button bottom="-102" follows="left|top" font="SansSerifSmall" height="18" label="?" 602 <button bottom="-85" follows="left|top" font="SansSerifSmall" height="18" label="?"
596 left="608" name="WLClassicCloudsHelp" width="18" /> 603 left="608" name="WLClassicCloudsHelp" width="18" />
604 <text bottom_delta="-19" type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
605 drop_shadow_visible="true" follows="left|top|right"
606 font="SansSerif" h_pad="0" halign="left" height="20"
607 left="480" mouse_opaque="true" name="WLCloudHeightText" v_pad="0"
608 width="355">
609 Classic Cloud Height
610 </text>
611 <slider bottom_delta="-27" can_edit_text="true" control_name="WLCloudHeight"
612 decimal_digits="0" follows="left" height="16" increment="1"
613 initial_val="192" label="" left="494" max_val="1000" min_val="0"
614 mouse_opaque="true" name="WLCloudHeight" show_text="true" value="192"
615 width="200" />
616 <text bottom_delta="0" type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
617 drop_shadow_visible="true" follows="left|top|right"
618 font="SansSerif" h_pad="0" halign="left" height="20"
619 left="480" mouse_opaque="true" name="WLCloudClassicRangeText" v_pad="0"
620 width="355">
621 Classic Cloud Range
622 </text>
623 <slider bottom_delta="-27" can_edit_text="true" control_name="WLCloudClassicRange"
624 decimal_digits="0" follows="left" height="16" increment="1 "
625 initial_val="48" label="" left="494" max_val="100" min_val="0"
626 mouse_opaque="true" name="WLCloudRange" show_text="true" value="48"
627 width="200" />
597 </panel> 628 </panel>
598 </tab_container> 629 </tab_container>
599 <button bottom="4" enabled="true" font="SansSerif" halign="center" height="20"
600 label="Day Cycle Editor" label_selected="Day Cycle Editor"
601 right="-10" mouse_opaque="true" name="WLDayCycleMenuButton"
602 scale_image="true" width="150" />
603 <string name="WLDefaultSkyNames"> 630 <string name="WLDefaultSkyNames">
604 A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality 631 A-12AM:A-12PM:A-3AM:A-3PM:A-4.30PM:A-6AM:A-6PM:A-9AM:A-9PM:Barcelona:Blizzard:Blue Midday:Coastal Afternoon:Coastal Sunset:Default:Desert Sunset:Fine Day:Fluffy Big Clouds:Foggy:Funky Funky:Funky Funky Funky:Gelatto:Ghost:Incongruent Truths:Midday 1:Midday 2:Midday 3:Midday 4:Night:Pirate:Purple:Sailor&apos;s Delight:Sheer Sensuality
605 </string> 632 </string>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_windlight_remote_save.xml b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_remote_save.xml
new file mode 100644
index 0000000..84c1d04
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_windlight_remote_save.xml
@@ -0,0 +1,123 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-150" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="true" height="220" left="50" min_height="220"
4 min_width="300" mouse_opaque="true" name="WindLight send to server floater"
5 title="WindLight Send to Server"
6 width="300">
7 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
8 left="10" bottom="180" drop_shadow_visible="true" follows="left|top"
9 font="SansSerif" h_pad="0" halign="left" height="10"
10 mouse_opaque="true" name="label Type" v_pad="0" width="275">
11 WindLight Send to Server
12 </text>
13 <slider can_edit_text="true" control_name="max_altitude"
14 left="20" bottom="110"
15 decimal_digits="2" follows="left" height="18" increment="0.1"
16 initial_val="4096.0" label="Max Altitude" max_val="4096.001" min_val="0"
17 mouse_opaque="true" name="max_altitude" show_text="true" value="4096.0"
18 width="200" />
19 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
20 left_delta="210" bottom="125" name="max_altitude_help" width="18" enabled="true" />
21
22 <slider can_edit_text="true" control_name="min_altitude"
23 left="20" bottom="80"
24 decimal_digits="2" follows="left" height="18" increment="0.1"
25 initial_val="1.0" label="Min Altitude" max_val="4096" min_val="0"
26 mouse_opaque="true" name="min_altitude" show_text="true" value="0"
27 width="200" />
28 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
29 left_delta="210" bottom="95" name="min_altitude_help" width="18" enabled="true" />
30 <slider can_edit_text="true" control_name="Fade"
31 left="20" bottom="50"
32 decimal_digits="2" follows="left" height="18" increment="0.1"
33 initial_val="1.0" label="Fade" max_val="10" min_val="0"
34 mouse_opaque="true" name="Fade" show_text="true" value="1.0"
35 width="200" />
36 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
37 left_delta="210" bottom="65" name="fade_help" width="18" />
38
39 <tab_container bottom="-220" follows="left|top" height="160" left="0"
40 mouse_opaque="false" name="WindLight_Setting_Types" tab_position="top" width="299">
41 <panel border="true" bottom="175" follows="left|top|right|bottom" height="160"
42 label="Region" left="1" mouse_opaque="false"
43 name="Region" width="698">
44 <check_box control_name="override_parcel" follows="left" font="SansSerifSmall" height="16"
45 left="20" bottom="30"
46 initial_value="false" label="Override Parcels" mouse_opaque="true"
47 name="override_parcel" width="200" enabled="true" />
48 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
49 left_delta="210" bottom="45" name="override_parcel_help" width="18" enabled="true" />
50
51 <button follows="top|right" font="SansSerif" halign="center"
52 right="-10" bottom="20"
53 height="20" label="Send" label_selected="Send"
54 mouse_opaque="true" name="button_region_send_to_server" scale_image="TRUE" width="78" />
55 </panel>
56 <panel border="true" bottom="175" follows="left|top|right|bottom" height="160"
57 label="Parcel" left="1" mouse_opaque="false"
58 name="Parcel" width="698">
59
60 <!--<slider can_edit_text="true" control_name="max_altitude"
61 left="20" bottom="110"
62 decimal_digits="2" follows="left" height="18" increment="0.1"
63 initial_val="4096.0" label="Max Altitude" max_val="4096.001" min_val="0"
64 mouse_opaque="true" name="max_altitude" show_text="true" value="4096.0"
65 width="200" />
66 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
67 left_delta="210" bottom="125" name="max_altitude_help" width="18" enabled="true" />
68
69 <slider can_edit_text="true" control_name="min_altitude"
70 left="20" bottom="80"
71 decimal_digits="2" follows="left" height="18" increment="0.1"
72 initial_val="1.0" label="Min Altitude" max_val="4096" min_val="0"
73 mouse_opaque="true" name="min_altitude" show_text="true" value="0"
74 width="200" />
75 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
76 left_delta="210" bottom="95" name="min_altitude_help" width="18" enabled="true" />
77
78 <slider can_edit_text="true" control_name="Fade"
79 left="20" bottom="50"
80 decimal_digits="2" follows="left" height="18" increment="0.1"
81 initial_val="1.0" label="Fade" max_val="10" min_val="0"
82 mouse_opaque="true" name="Fade" show_text="true" value="1.0"
83 width="200" />
84 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
85 left_delta="210" bottom="65" name="fade_help" width="18" />-->
86
87 <button follows="top|right" font="SansSerif" halign="center"
88 right="-10" bottom="20" height="20" label="Send"
89 mouse_opaque="true" name="button_parcel_send_to_server" width="78" />
90 </panel>
91 <!--<panel border="true" bottom="175" follows="left|top|right|bottom" height="160"
92 label="Area" left="1" mouse_opaque="false"
93 name="Area" width="698">
94
95 <slider can_edit_text="true" control_name="Max Altitude"
96 left="20" bottom="110"
97 decimal_digits="2" follows="left" height="18" increment="0.1"
98 initial_val="4096.0" label="Max Altitude" max_val="4096.001" min_val="0"
99 mouse_opaque="true" name="Max Altitude" show_text="true" value="4096.0"
100 width="200" />
101 <slider can_edit_text="true" control_name="Min Altitude"
102 left="20" bottom="80"
103 decimal_digits="2" follows="left" height="18" increment="0.1"
104 initial_val="1.0" label="Min Altitude" max_val="4096" min_val="0"
105 mouse_opaque="true" name="Min Altitude" show_text="true" value="0"
106 width="200" />
107
108 <slider can_edit_text="true" control_name="Fade"
109 left="20" bottom="50"
110 decimal_digits="2" follows="left" height="18" increment="0.1"
111 initial_val="1.0" label="Fade" max_val="10" min_val="0"
112 mouse_opaque="true" name="Fade" show_text="true" value="1.0"
113 width="200" />
114 <button follows="left|top" font="SansSerifSmall" height="18" label="?"
115 left_delta="210" bottom="65" name="fade_help" width="18" />
116
117 <button follows="top|right" font="SansSerif" halign="center"
118 right="-10" bottom="20"
119 height="20" label="Send" label_selected="Send"
120 mouse_opaque="true" name="button send to server" scale_image="TRUE" width="78" />
121 </panel>-->
122 </tab_container>
123</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml b/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml
index 389efb5..daf217e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml
@@ -1,183 +1,183 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" 2<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
3 height="711" min_height="520" min_width="410" name="worldmap" 3 height="711" min_height="520" min_width="410" name="worldmap"
4 rect_control="FloaterWorldMapRect2" title="World Map" width="1243"> 4 rect_control="FloaterWorldMapRect2" title="World Map" width="1243">
5 <tab_container bottom="-701" follows="left|top|right|bottom" height="681" left="15" 5 <tab_container bottom="-701" follows="left|top|right|bottom" height="681" left="15"
6 mouse_opaque="false" name="maptab" tab_position="top" width="995"> 6 mouse_opaque="false" name="maptab" tab_position="top" width="995">
7 <panel bottom="-680" follows="left|top|right|bottom" height="664" label="Objects" 7 <panel bottom="-680" follows="left|top|right|bottom" height="664" label="Objects"
8 left="1" mouse_opaque="true" name="objects_mapview" width="993" /> 8 left="1" mouse_opaque="true" name="objects_mapview" width="993" />
9 <panel bottom="-680" follows="left|top|right|bottom" height="664" label="Terrain" 9 <panel bottom="-680" follows="left|top|right|bottom" height="664" label="Terrain"
10 left="1" mouse_opaque="true" name="terrain_mapview" width="993" /> 10 left="1" mouse_opaque="true" name="terrain_mapview" width="993" />
11 </tab_container> 11 </tab_container>
12 <icon bottom="-50" color="1, 1, 1, 1" follows="top|right" height="16" 12 <icon bottom="-50" color="1, 1, 1, 1" follows="top|right" height="16"
13 image_name="map_avatar_16.tga" left="1013" mouse_opaque="true" name="self" 13 image_name="map_avatar_16.tga" left="1013" mouse_opaque="true" name="self"
14 width="16" /> 14 width="16" />
15 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 15 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
16 bottom="-50" drop_shadow_visible="true" follows="top|right" 16 bottom="-50" drop_shadow_visible="true" follows="top|right"
17 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20" 17 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20"
18 mouse_opaque="true" name="you_label" v_pad="0" width="145"> 18 mouse_opaque="true" name="you_label" v_pad="0" width="145">
19 You 19 You
20 </text> 20 </text>
21 <icon bottom="-50" color="1, 1, 1, 1" follows="top|right" height="16" 21 <icon bottom="-50" color="1, 1, 1, 1" follows="top|right" height="16"
22 image_name="map_home.tga" left="1083" mouse_opaque="true" name="home" 22 image_name="map_home.tga" left="1083" mouse_opaque="true" name="home"
23 width="16" /> 23 width="16" />
24 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 24 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
25 bottom="-50" drop_shadow_visible="true" follows="top|right" 25 bottom="-50" drop_shadow_visible="true" follows="top|right"
26 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20" 26 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20"
27 mouse_opaque="true" name="home_label" v_pad="0" width="145"> 27 mouse_opaque="true" name="home_label" v_pad="0" width="145">
28 Home 28 Home
29 </text> 29 </text>
30 <icon bottom="-70" color="0.5, 0.25, 1, 1" follows="top|right" height="16" 30 <icon bottom="-70" color="0.5, 0.25, 1, 1" follows="top|right" height="16"
31 image_name="legend.tga" left="1013" mouse_opaque="true" name="square2" 31 image_name="legend.tga" left="1013" mouse_opaque="true" name="square2"
32 width="16" /> 32 width="16" />
33 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 33 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
34 bottom="-70" drop_shadow_visible="true" follows="top|right" 34 bottom="-70" drop_shadow_visible="true" follows="top|right"
35 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20" 35 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20"
36 mouse_opaque="true" name="auction_label" v_pad="0" width="145"> 36 mouse_opaque="true" name="auction_label" v_pad="0" width="145">
37 Auction 37 Auction
38 </text> 38 </text>
39 <icon bottom="-70" color="1, 1, 0.25, 1" follows="top|right" height="16" 39 <icon bottom="-70" color="1, 1, 0.25, 1" follows="top|right" height="16"
40 image_name="legend.tga" left="1083" mouse_opaque="true" name="square" 40 image_name="legend.tga" left="1083" mouse_opaque="true" name="square"
41 width="16" /> 41 width="16" />
42 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 42 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
43 bottom="-70" drop_shadow_visible="true" follows="top|right" 43 bottom="-70" drop_shadow_visible="true" follows="top|right"
44 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20" 44 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20"
45 mouse_opaque="true" name="land_for_sale_label" v_pad="0" width="145"> 45 mouse_opaque="true" name="land_for_sale_label" v_pad="0" width="145">
46 Land For Sale 46 Land For Sale
47 </text> 47 </text>
48 <button bottom="-50" follows="top|right" font="SansSerifSmall" halign="center" 48 <button bottom="-50" follows="top|right" font="SansSerifSmall" halign="center"
49 height="16" label="Go Home" label_selected="Go Home" left="1150" 49 height="16" label="Go Home" label_selected="Go Home" left="1150"
50 mouse_opaque="true" name="Go Home" tool_tip="Teleport to your home" 50 mouse_opaque="true" name="Go Home" tool_tip="Teleport to your home"
51 width="88" /> 51 width="88" />
52 <icon bottom="-92" color="0, 1, 0, 1" follows="top|right" height="8" 52 <icon bottom="-92" color="0, 1, 0, 1" follows="top|right" height="8"
53 image_name="map_avatar_8.tga" left="1017" mouse_opaque="true" name="person" 53 image_name="map_avatar_8.tga" left="1017" mouse_opaque="true" name="person"
54 width="8" /> 54 width="8" />
55 <check_box bottom="-96" control_name="MapShowPeople" follows="top|right" 55 <check_box bottom="-96" control_name="MapShowPeople" follows="top|right"
56 font="SansSerifSmall" height="16" initial_value="false" label="Resident" 56 font="SansSerifSmall" height="16" initial_value="false" label="Resident"
57 left_delta="16" mouse_opaque="true" name="people_chk" width="110" /> 57 left_delta="16" mouse_opaque="true" name="people_chk" width="110" />
58 <icon bottom="-116" color="1, 1, 1, 1" follows="top|right" height="16" 58 <icon bottom="-116" color="1, 1, 1, 1" follows="top|right" height="16"
59 image_name="map_infohub.tga" left="1013" mouse_opaque="true" name="infohub" 59 image_name="map_infohub.tga" left="1013" mouse_opaque="true" name="infohub"
60 width="16" /> 60 width="16" />
61 <check_box bottom="-116" control_name="MapShowInfohubs" follows="top|right" 61 <check_box bottom="-116" control_name="MapShowInfohubs" follows="top|right"
62 font="SansSerifSmall" height="16" initial_value="false" label="Infohub" 62 font="SansSerifSmall" height="16" initial_value="false" label="Infohub"
63 left_delta="20" mouse_opaque="true" name="infohub_chk" width="110" /> 63 left_delta="20" mouse_opaque="true" name="infohub_chk" width="110" />
64 <icon bottom="-136" color="1, 1, 1, 1" follows="top|right" height="16" 64 <icon bottom="-136" color="1, 1, 1, 1" follows="top|right" height="16"
65 image_name="map_telehub.tga" left="1013" mouse_opaque="true" name="telehub" 65 image_name="map_telehub.tga" left="1013" mouse_opaque="true" name="telehub"
66 width="16" /> 66 width="16" />
67 <check_box bottom="-136" control_name="MapShowTelehubs" follows="top|right" 67 <check_box bottom="-136" control_name="MapShowTelehubs" follows="top|right"
68 font="SansSerifSmall" height="16" initial_value="false" label="Telehub" 68 font="SansSerifSmall" height="16" initial_value="false" label="Telehub"
69 left_delta="20" mouse_opaque="true" name="telehubchk" width="110" /> 69 left_delta="20" mouse_opaque="true" name="telehubchk" width="110" />
70 <icon bottom="-156" color="1, 1, 1, 1" follows="top|right" height="16" 70 <icon bottom="-156" color="1, 1, 1, 1" follows="top|right" height="16"
71 image_name="icon_for_sale.tga" left="1013" mouse_opaque="true" 71 image_name="icon_for_sale.tga" left="1013" mouse_opaque="true"
72 name="landforsale" width="16" /> 72 name="landforsale" width="16" />
73 <check_box bottom="-156" control_name="MapShowLandForSale" follows="top|right" 73 <check_box bottom="-156" control_name="MapShowLandForSale" follows="top|right"
74 font="SansSerifSmall" height="16" initial_value="false" label="Land for Sale" 74 font="SansSerifSmall" height="16" initial_value="false" label="Land for Sale"
75 left_delta="20" mouse_opaque="true" name="land_for_sale_chk" width="110" /> 75 left_delta="20" mouse_opaque="true" name="land_for_sale_chk" width="110" />
76 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 76 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
77 bottom="-96" drop_shadow_visible="true" follows="top|right" 77 bottom="-96" drop_shadow_visible="true" follows="top|right"
78 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="1139" 78 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="1139"
79 mouse_opaque="true" name="events_label" v_pad="0" width="145"> 79 mouse_opaque="true" name="events_label" v_pad="0" width="145">
80 Events: 80 Events:
81 </text> 81 </text>
82 <icon bottom="-116" color="1, 1, 1, 1" follows="top|right" height="16" 82 <icon bottom="-116" color="1, 1, 1, 1" follows="top|right" height="16"
83 image_name="map_event.tga" left="1151" mouse_opaque="true" name="event" 83 image_name="map_event.tga" left="1151" mouse_opaque="true" name="event"
84 width="16" /> 84 width="16" />
85 <check_box bottom="-116" control_name="MapShowEvents" follows="top|right" 85 <check_box bottom="-116" control_name="MapShowEvents" follows="top|right"
86 font="SansSerifSmall" height="16" initial_value="false" label="PG" 86 font="SansSerifSmall" height="16" initial_value="false" label="PG"
87 left_delta="20" mouse_opaque="true" name="event_chk" width="55" /> 87 left_delta="20" mouse_opaque="true" name="event_chk" width="55" />
88 <icon bottom="-136" color="1, 1, 1, 1" follows="top|right" height="16" 88 <icon bottom="-136" color="1, 1, 1, 1" follows="top|right" height="16"
89 image_name="map_event_mature.tga" left="1151" mouse_opaque="true" 89 image_name="map_event_mature.tga" left="1151" mouse_opaque="true"
90 name="events_mature_icon" width="16" /> 90 name="events_mature_icon" width="16" />
91 <check_box bottom="-136" control_name="ShowMatureEvents" follows="top|right" 91 <check_box bottom="-136" control_name="ShowMatureEvents" follows="top|right"
92 font="SansSerifSmall" height="16" initial_value="true" label="Mature" 92 font="SansSerifSmall" height="16" initial_value="true" label="Mature"
93 left_delta="20" mouse_opaque="true" name="event_mature_chk" width="55" /> 93 left_delta="20" mouse_opaque="true" name="event_mature_chk" width="55" />
94 <icon bottom="-156" color="1, 1, 1, 1" follows="top|right" height="16" 94 <icon bottom="-156" color="1, 1, 1, 1" follows="top|right" height="16"
95 image_name="map_event_adult.tga" left="1151" mouse_opaque="true" 95 image_name="map_event_adult.tga" left="1151" mouse_opaque="true"
96 name="events_adult_icon" width="16" /> 96 name="events_adult_icon" width="16" />
97 <check_box bottom="-156" control_name="ShowAdultEvents" follows="top|right" 97 <check_box bottom="-156" control_name="ShowAdultEvents" follows="top|right"
98 font="SansSerifSmall" height="16" initial_value="false" label="Adult" 98 font="SansSerifSmall" height="16" initial_value="false" label="Adult"
99 left_delta="20" mouse_opaque="true" name="event_adult_chk" width="55" /> 99 left_delta="20" mouse_opaque="true" name="event_adult_chk" width="55" />
100 <icon bottom="-180" color="0.5, 0, 0, 1" follows="top|right" height="16" 100 <icon bottom="-180" color="0.5, 0, 0, 1" follows="top|right" height="16"
101 image_name="map_track_16.tga" left="1013" mouse_opaque="true" 101 image_name="map_track_16.tga" left="1013" mouse_opaque="true"
102 name="avatar_icon" width="16" /> 102 name="avatar_icon" width="16" />
103 <combo_box allow_text_entry="true" bottom_delta="0" follows="top|right" height="20" 103 <combo_box allow_text_entry="true" bottom_delta="0" follows="top|right" height="20"
104 label="Online Friends" left_delta="20" max_chars="60" mouse_opaque="true" 104 label="Online Friends" left_delta="20" max_chars="60" mouse_opaque="true"
105 name="friend combo" tool_tip="Friend to Show on Map" width="202"> 105 name="friend combo" tool_tip="Friend to Show on Map" width="202">
106 <combo_item name="none_selected" value="None"> 106 <combo_item name="none_selected" value="None">
107 Online Friends 107 Online Friends
108 </combo_item> 108 </combo_item>
109 </combo_box> 109 </combo_box>
110 <icon bottom_delta="-25" color="0.5, 0, 0, 1" follows="top|right" height="16" 110 <icon bottom_delta="-25" color="0.5, 0, 0, 1" follows="top|right" height="16"
111 image_name="map_track_16.tga" left="1013" mouse_opaque="true" 111 image_name="map_track_16.tga" left="1013" mouse_opaque="true"
112 name="landmark_icon" width="16" /> 112 name="landmark_icon" width="16" />
113 <combo_box allow_text_entry="true" bottom_delta="0" follows="top|right" height="20" 113 <combo_box allow_text_entry="true" bottom_delta="0" follows="top|right" height="20"
114 label="Landmarks" left_delta="20" max_chars="64" mouse_opaque="true" 114 label="Landmarks" left_delta="20" max_chars="64" mouse_opaque="true"
115 name="landmark combo" tool_tip="Landmark to Show on Map" width="202"> 115 name="landmark combo" tool_tip="Landmark to Show on Map" width="202">
116 <combo_item name="none_selected" value="None"> 116 <combo_item name="none_selected" value="None">
117 Landmarks 117 Landmarks
118 </combo_item> 118 </combo_item>
119 </combo_box> 119 </combo_box>
120 <icon bottom_delta="-25" color="0.5, 0, 0, 1" follows="top|right" height="16" 120 <icon bottom_delta="-25" color="0.5, 0, 0, 1" follows="top|right" height="16"
121 image_name="map_track_16.tga" left="1013" mouse_opaque="true" 121 image_name="map_track_16.tga" left="1013" mouse_opaque="true"
122 name="location_icon" width="16" /> 122 name="location_icon" width="16" />
123 <line_editor bottom_delta="0" follows="top|right" height="20" label="Search by Region Name" 123 <line_editor bottom_delta="0" follows="top|right" height="20" label="Search by Region Name"
124 left_delta="20" name="location" select_on_focus="true" 124 left_delta="20" name="location" select_on_focus="true"
125 tool_tip="Type the name of a region" width="140" /> 125 tool_tip="Type the name of a region" width="140" />
126 <button bottom_delta="0" follows="top|right" font="SansSerif" halign="center" 126 <button bottom_delta="0" follows="top|right" font="SansSerif" halign="center"
127 height="20" label="Search" left_delta="145" mouse_opaque="true" 127 height="20" label="Search" left_delta="145" mouse_opaque="true"
128 name="DoSearch" tool_tip="Search for region" width="60" /> 128 name="DoSearch" tool_tip="Search for region" width="60" />
129 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 129 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
130 bottom_delta="-20" drop_shadow_visible="true" follows="top|right" 130 bottom_delta="-20" drop_shadow_visible="true" follows="top|right"
131 font="SansSerif" h_pad="0" halign="left" height="16" left="1013" 131 font="SansSerif" h_pad="0" halign="left" height="16" left="1013"
132 mouse_opaque="true" name="search_label" v_pad="0" width="222"> 132 mouse_opaque="true" name="search_label" v_pad="0" width="222">
133 Search Results: 133 Search Results:
134 </text> 134 </text>
135 <scroll_list background_visible="true" bottom_delta="-326" draw_border="true" 135 <scroll_list background_visible="true" bottom_delta="-326" draw_border="true"
136 draw_stripes="false" 136 draw_stripes="false"
137 follows="top|right|bottom" height="320" left="1013" multi_select="false" 137 follows="top|right|bottom" height="320" left="1013" multi_select="false"
138 name="search_results" width="222"> 138 name="search_results" width="222">
139 <column label="" name="icon" width="16" /> 139 <column label="" name="icon" width="16" />
140 <column label="" name="sim_name" width="206" /> 140 <column label="" name="sim_name" width="206" />
141 </scroll_list> 141 </scroll_list>
142 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 142 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
143 bottom_delta="-20" drop_shadow_visible="true" follows="bottom|right" 143 bottom_delta="-20" drop_shadow_visible="true" follows="bottom|right"
144 font="SansSerif" h_pad="0" halign="left" height="16" left="1013" 144 font="SansSerif" h_pad="0" halign="left" height="16" left="1013"
145 mouse_opaque="true" name="location_label" v_pad="0" width="98"> 145 mouse_opaque="true" name="location_label" v_pad="0" width="98">
146 Location: 146 Location:
147 </text> 147 </text>
148 <spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16" 148 <spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16"
149 increment="1" initial_val="128" left="1090" max_val="255" min_val="0" 149 increment="1" initial_val="128" left="1090" max_val="99999" min_val="0"
150 mouse_opaque="true" name="spin x" 150 mouse_opaque="true" name="spin x"
151 tool_tip="X coordinate of location to show on map" width="48" /> 151 tool_tip="X coordinate of location to show on map" width="48" />
152 <spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16" 152 <spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16"
153 increment="1" initial_val="128" left_delta="50" max_val="255" min_val="0" 153 increment="1" initial_val="128" left_delta="50" max_val="99999" min_val="0"
154 mouse_opaque="true" name="spin y" 154 mouse_opaque="true" name="spin y"
155 tool_tip="Y coordinate of location to show on map" width="48" /> 155 tool_tip="Y coordinate of location to show on map" width="48" />
156 <spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16" 156 <spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16"
157 increment="1" initial_val="0" left_delta="50" max_val="4096" min_val="0" 157 increment="1" initial_val="0" left_delta="50" max_val="4096" min_val="0"
158 mouse_opaque="true" name="spin z" 158 mouse_opaque="true" name="spin z"
159 tool_tip="Z coordinate of location to show on map" width="48" /> 159 tool_tip="Z coordinate of location to show on map" width="48" />
160 <button bottom="-625" follows="right|bottom" font="SansSerif" halign="center" 160 <button bottom="-625" follows="right|bottom" font="SansSerif" halign="center"
161 height="20" label="Teleport" label_selected="Teleport" left="-230" 161 height="20" label="Teleport" label_selected="Teleport" left="-230"
162 mouse_opaque="true" name="Teleport" 162 mouse_opaque="true" name="Teleport"
163 tool_tip="Teleport to selected location" width="90" /> 163 tool_tip="Teleport to selected location" width="90" />
164 <button bottom_delta="0" follows="right|bottom" font="SansSerif" halign="center" 164 <button bottom_delta="0" follows="right|bottom" font="SansSerif" halign="center"
165 height="20" label="Show Destination" label_selected="Show Destination" 165 height="20" label="Show Destination" label_selected="Show Destination"
166 left_delta="100" mouse_opaque="true" name="Show Destination" 166 left_delta="100" mouse_opaque="true" name="Show Destination"
167 tool_tip="Center map on selected location" width="125" /> 167 tool_tip="Center map on selected location" width="125" />
168 <button bottom_delta="-24" follows="right|bottom" font="SansSerif" halign="center" 168 <button bottom_delta="-24" follows="right|bottom" font="SansSerif" halign="center"
169 height="20" label="Clear" label_selected="Clear" left="-230" 169 height="20" label="Clear" label_selected="Clear" left="-230"
170 mouse_opaque="true" name="Clear" tool_tip="Stop tracking" width="90" /> 170 mouse_opaque="true" name="Clear" tool_tip="Stop tracking" width="90" />
171 <button bottom_delta="0" follows="right|bottom" font="SansSerif" halign="center" 171 <button bottom_delta="0" follows="right|bottom" font="SansSerif" halign="center"
172 height="20" label="Show My Location" label_selected="Show My Location" 172 height="20" label="Show My Location" label_selected="Show My Location"
173 left_delta="100" mouse_opaque="true" name="Show My Location" 173 left_delta="100" mouse_opaque="true" name="Show My Location"
174 tool_tip="Center map on your avatar&apos;s location" width="125" /> 174 tool_tip="Center map on your avatar&apos;s location" width="125" />
175 <button bottom_delta="-24" enabled="false" follows="bottom|right" font="SansSerif" 175 <button bottom_delta="-24" enabled="false" follows="bottom|right" font="SansSerif"
176 height="20" label="Copy SLURL to clipboard" left="-230" name="copy_slurl" 176 height="20" label="Copy SLURL to clipboard" left="-230" name="copy_slurl"
177 tool_tip="Copies current location as SLURL to be used on the web." 177 tool_tip="Copies current location as SLURL to be used on the web."
178 width="222" /> 178 width="222" />
179 <slider bottom="-697" can_edit_text="false" decimal_digits="3" follows="right|bottom" 179 <slider bottom="-697" can_edit_text="false" decimal_digits="3" follows="right|bottom"
180 height="16" increment="0.2" initial_val="48.5029" label="Zoom" left="-230" 180 height="16" increment="0.2" initial_val="48.5029" label="Zoom" left="-230"
181 max_val="0" min_val="-8" mouse_opaque="true" name="zoom slider" 181 max_val="0" min_val="-8" mouse_opaque="true" name="zoom slider"
182 show_text="false" value="48.5029" width="222" /> 182 show_text="false" value="48.5029" width="222" />
183</floater> 183</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/legacy_menu_pie_attachment.xml b/linden/indra/newview/skins/default/xui/en-us/legacy_menu_pie_attachment.xml
index 18bedd0..35f3037 100644
--- a/linden/indra/newview/skins/default/xui/en-us/legacy_menu_pie_attachment.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/legacy_menu_pie_attachment.xml
@@ -1,23 +1,23 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<pie_menu name="Attachment Pie"> 2<pie_menu name="Attachment Pie">
3 <menu_item_call enabled="false" label="Drop" mouse_opaque="true" name="Drop"> 3 <menu_item_call enabled="false" label="Drop" mouse_opaque="true" name="Drop">
4 <on_click function="Attachment.Drop" /> 4 <on_click function="Attachment.Drop" />
5 <on_enable function="Attachment.EnableDrop" /> 5 <on_enable function="Attachment.EnableDrop" />
6 </menu_item_call> 6 </menu_item_call>
7 <menu_item_separator /> 7 <menu_item_separator />
8 <menu_item_separator /> 8 <menu_item_separator />
9 <menu_item_separator /> 9 <menu_item_separator />
10 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect"> 10 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
11 <on_click function="Object.Inspect" /> 11 <on_click function="Object.Inspect" />
12 <on_enable function="Object.EnableInspect" /> 12 <on_enable function="Object.EnableInspect" />
13 </menu_item_call> 13 </menu_item_call>
14 <menu_item_separator /> 14 <menu_item_separator />
15 <menu_item_call enabled="false" label="Detach" mouse_opaque="true" name="Detach"> 15 <menu_item_call enabled="false" label="Detach" mouse_opaque="true" name="Detach">
16 <on_click function="Attachment.Detach" /> 16 <on_click function="Attachment.Detach" />
17 <on_enable function="Attachment.EnableDetach" /> 17 <on_enable function="Attachment.EnableDetach" />
18 </menu_item_call> 18 </menu_item_call>
19 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit"> 19 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit">
20 <on_click function="Object.Edit" /> 20 <on_click function="Object.Edit" />
21 <on_enable function="EnableEdit" /> 21 <on_enable function="EnableEdit" />
22 </menu_item_call> 22 </menu_item_call>
23</pie_menu> 23</pie_menu>
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
index 1ae7465..86dc5c7 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
@@ -166,11 +166,15 @@
166 <on_click filter="" function="Inventory.DoToSelected" userdata="copy_uuid" /> 166 <on_click filter="" function="Inventory.DoToSelected" userdata="copy_uuid" />
167 </menu_item_call> 167 </menu_item_call>
168 <menu_item_separator name="Copy Separator" /> 168 <menu_item_separator name="Copy Separator" />
169 <menu_item_call bottom_delta="-18" height="18" label="Copy" left="0" mouse_opaque="true" 169 <menu_item_call bottom_delta="-18" height="18" label="Cut" left="0" mouse_opaque="true"
170 name="Cut" width="128">
171 <on_click filter="" function="Inventory.DoToSelected" userdata="cut" />
172 </menu_item_call>
173 <menu_item_call bottom_delta="-18" height="18" label="Copy" left="0" mouse_opaque="true"
170 name="Copy" width="128"> 174 name="Copy" width="128">
171 <on_click filter="" function="Inventory.DoToSelected" userdata="copy" /> 175 <on_click filter="" function="Inventory.DoToSelected" userdata="copy" />
172 </menu_item_call> 176 </menu_item_call>
173 <menu_item_call bottom_delta="-18" height="18" label="Paste" left="0" mouse_opaque="true" 177 <menu_item_call bottom_delta="-18" height="18" label="Paste" left="0" mouse_opaque="true"
174 name="Paste" width="128"> 178 name="Paste" width="128">
175 <on_click filter="" function="Inventory.DoToSelected" userdata="paste" /> 179 <on_click filter="" function="Inventory.DoToSelected" userdata="paste" />
176 </menu_item_call> 180 </menu_item_call>
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index c85dd47..53e9e2d 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -908,6 +908,15 @@
908 userdata="notifications" /> 908 userdata="notifications" />
909 </menu_item_call> 909 </menu_item_call>
910 <menu_item_separator /> 910 <menu_item_separator />
911 <menu_item_call name="Message Log" label="Message Log">
912 <on_click function="Advanced.MessageLog"
913 userdata="MessageLog" />
914 </menu_item_call>
915 <menu_item_call name="Message Builder" label="Message Builder">
916 <on_click function="Advanced.MessageBuilder"
917 userdata="MessageBuilder" />
918 </menu_item_call>
919 <menu_item_separator />
911 <menu_item_call name="Region Info to Debug Console" 920 <menu_item_call name="Region Info to Debug Console"
912 label="Region Info to Debug Console"> 921 label="Region Info to Debug Console">
913 <on_click function="Advanced.DumpInfoToConsole" 922 <on_click function="Advanced.DumpInfoToConsole"
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
index 0ac7401..3680ca9 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -3653,6 +3653,16 @@ Default: off
3653 3653
3654<notification 3654<notification
3655 icon="alertmodal.tga" 3655 icon="alertmodal.tga"
3656 label="Minimum Age"
3657 name="HelpRegionMinimumAge"
3658 type="alertmodal">
3659This sets the minimum age (in days) that users entering this sim have to be to enter.
3660
3661Default: 0 (disabled)
3662</notification>
3663
3664<notification
3665 icon="alertmodal.tga"
3656 label="Block Fly" 3666 label="Block Fly"
3657 name="HelpRegionBlockFly" 3667 name="HelpRegionBlockFly"
3658 type="alertmodal"> 3668 type="alertmodal">
@@ -3663,6 +3673,90 @@ Default: off
3663 3673
3664<notification 3674<notification
3665 icon="alertmodal.tga" 3675 icon="alertmodal.tga"
3676 label="Force Draw Distance"
3677 name="HelpForceDrawDistance"
3678 type="alertmodal">
3679If this box is checked, draw distance will be locked for all people in the sim. Note: This will lag people on older machines. PLEASE think before setting this setting.
3680
3681Default: off
3682</notification>
3683
3684<notification
3685 icon="alertmodal.tga"
3686 label="Max Inventory Items To Transfer"
3687 name="HelpMaxInventoryItemsTransfer"
3688 type="alertmodal">
3689This box controls how many objects can be transfered between clients at a time. -1 sets no limit on the amount of objects. Default Second Life setting is 42.
3690
3691Default: -1
3692</notification>
3693<notification
3694 icon="alertmodal.tga"
3695 label="Max Groups"
3696 name="HelpMaxGroups"
3697 type="alertmodal">
3698This box controls how many groups an agent can join. -1 sets no limit on the amount of groups.
3699
3700Default: -1
3701</notification>
3702 <notification
3703 icon="alertmodal.tga"
3704 label="Render Water"
3705 name="HelpRenderWater"
3706 type="alertmodal">
3707 If this box is checked, water will not be shown for users in this sim.
3708
3709 Default: -1
3710 </notification>
3711<notification
3712 icon="alertmodal.tga"
3713 label="Allow Minimap"
3714 name="HelpAllowMinimap"
3715 type="alertmodal">
3716If this box is checked, the minimap will be disabled for users in this sim.
3717
3718Default: on
3719</notification>
3720<notification
3721 icon="alertmodal.tga"
3722 label="Allow Minimap"
3723 name="HelpAllowPhysicalPrims"
3724 type="alertmodal">
3725If this box is checked, physical prims will be allowed to be created in this sim.
3726
3727Default: on
3728</notification>
3729<notification
3730 icon="alertmodal.tga"
3731 label="Enable Teen Mode"
3732 name="HelpEnableTeenMode"
3733 type="alertmodal">
3734If this box is checked, all avatars will be forced to wear underwear and will not be able to take it off.
3735
3736Default: off
3737</notification>
3738<notification
3739 icon="alertmodal.tga"
3740 label="Show Tags"
3741 name="HelpShowTags"
3742 type="alertmodal">
3743This box controls how avatar name tags are shown in this sim. 2 sets tags to always be shown. 1 sets tags to disappear after some time. 0 blocks the viewing of name tags.
3744
3745Default: 2
3746</notification>
3747<notification
3748 icon="alertmodal.tga"
3749 label="Allow Parcel WindLight"
3750 name="HelpAllowParcelWindLight"
3751 type="alertmodal">
3752If this box is checked, setting WindLight settings in parcels will be enabled.
3753
3754Default: on
3755</notification>
3756
3757
3758<notification
3759 icon="alertmodal.tga"
3666 label="Bulk Change Content Permissions" 3760 label="Bulk Change Content Permissions"
3667 name="HelpBulkPermission" 3761 name="HelpBulkPermission"
3668 type="alertmodal"> 3762 type="alertmodal">
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml
index 2360e6b..0df65e7 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml
@@ -138,11 +138,11 @@
138 bottom_delta="-6" drop_shadow_visible="true" follows="left|top" 138 bottom_delta="-6" drop_shadow_visible="true" follows="left|top"
139 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0" 139 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
140 mouse_opaque="true" name="About:" v_pad="0" width="170"> 140 mouse_opaque="true" name="About:" v_pad="0" width="170">
141 About (500 chars): 141 About (8196 chars):
142 </text> 142 </text>
143 <text_editor bottom_delta="-137" embedded_items="false" 143 <text_editor bottom_delta="-137" embedded_items="false"
144 enabled="true" follows="left|top" font="SansSerifSmall" height="137" 144 enabled="true" follows="left|top" font="SansSerifSmall" height="137"
145 is_unicode="false" left_delta="0" max_length="511" mouse_opaque="true" 145 is_unicode="false" left_delta="0" max_length="8196" mouse_opaque="true"
146 name="about" width="235" word_wrap="true" spell_check="true" /> 146 name="about" width="235" word_wrap="true" spell_check="true" />
147 147
148 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 148 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
@@ -350,11 +350,11 @@
350 bottom_delta="-8" drop_shadow_visible="true" follows="left|top" 350 bottom_delta="-8" drop_shadow_visible="true" follows="left|top"
351 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12" 351 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12"
352 mouse_opaque="true" name="Info:" v_pad="0" width="161"> 352 mouse_opaque="true" name="Info:" v_pad="0" width="161">
353 Info (250 chars): 353 Info (8196 chars):
354 </text> 354 </text>
355 <text_editor bottom_delta="-179" embedded_items="false" 355 <text_editor bottom_delta="-179" embedded_items="false"
356 enabled="true" follows="left|top" font="SansSerifSmall" height="178" 356 enabled="true" follows="left|top" font="SansSerifSmall" height="178"
357 is_unicode="false" left="12" max_length="254" mouse_opaque="false" 357 is_unicode="false" left="12" max_length="8196" mouse_opaque="false"
358 name="about" width="378" word_wrap="true" spell_check="true" /> 358 name="about" width="378" word_wrap="true" spell_check="true" />
359 </panel> 359 </panel>
360 <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466" 360 <panel border="true" bottom="-482" follows="left|top|right|bottom" height="466"
@@ -372,7 +372,7 @@
372 </text> 372 </text>
373 <text_editor bottom_delta="-260" embedded_items="false" enabled="true" follows="left|top" 373 <text_editor bottom_delta="-260" embedded_items="false" enabled="true" follows="left|top"
374 font="SansSerif" height="256" is_unicode="false" left="10" 374 font="SansSerif" height="256" is_unicode="false" left="10"
375 max_length="1023" mouse_opaque="true" name="notes edit" width="400" 375 max_length="8196" mouse_opaque="true" name="notes edit" width="400"
376 word_wrap="false" spell_check="true" /> 376 word_wrap="false" spell_check="true" />
377 </panel> 377 </panel>
378 </tab_container> 378 </tab_container>
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
index 95d0c33..fe60203 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
@@ -153,11 +153,15 @@
153 mouse_opaque="false" name="text_box7" v_pad="0" width="128"> 153 mouse_opaque="false" name="text_box7" v_pad="0" width="128">
154 Chat Bubbles: 154 Chat Bubbles:
155 </text> 155 </text>
156 <check_box bottom="-386" control_name="UseChatBubbles" enabled="true" follows="left|top" 156 <check_box bottom="-386" control_name="UseChatBubbles" enabled="true" follows="left|top"
157 font="SansSerifSmall" height="16" initial_value="false" 157 font="SansSerifSmall" height="16" initial_value="false"
158 label="Show chat bubbles" left="148" mouse_opaque="true" 158 label="Show chat bubbles" left="148" mouse_opaque="true"
159 name="bubble_text_chat" radio_style="false" width="237" /> 159 name="bubble_text_chat" radio_style="false" width="237" />
160 <slider bottom="-402" can_edit_text="false" control_name="ChatBubbleOpacity" 160 <check_box bottom="-386" control_name="UseLocalChatBubbles" enabled="true" follows="left|top"
161 font="SansSerifSmall" height="16" initial_value="false"
162 label="Show local chat and bubbles" left="288" mouse_opaque="true"
163 name="local_bubble_text_chat" radio_style="false" width="237" />
164 <slider bottom="-402" can_edit_text="false" control_name="ChatBubbleOpacity"
161 decimal_digits="3" enabled="true" follows="left|top" height="12" 165 decimal_digits="3" enabled="true" follows="left|top" height="12"
162 increment="0.05" initial_val="1" label="Bubble opacity:" left="148" max_val="1" 166 increment="0.05" initial_val="1" label="Bubble opacity:" left="148" max_val="1"
163 min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true" 167 min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
index f85e3c0..b47794b 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
@@ -61,34 +61,34 @@
61 font="SansSerifSmall" height="16" initial_value="false" 61 font="SansSerifSmall" height="16" initial_value="false"
62 label="Hide my group title" left="151" name="show_my_title_checkbox" 62 label="Hide my group title" left="151" name="show_my_title_checkbox"
63 radio_style="false" width="256" /> 63 radio_style="false" width="256" />
64 <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-230" 64 <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-210"
65 can_apply_immediately="false" color="1 1 1 1" 65 can_apply_immediately="false" color="1 1 1 1"
66 enabled="true" follows="left|top" height="65" label="" left="153" 66 enabled="true" follows="left|top" height="65" label="" left="153"
67 mouse_opaque="true" name="effect_color_swatch" 67 mouse_opaque="true" name="effect_color_swatch"
68 tool_tip="Click to open Color Picker" width="55" /> 68 tool_tip="Click to open Color Picker" width="55" />
69 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 69 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
70 bottom="-235" drop_shadow_visible="true" enabled="true" follows="left|top" 70 bottom="-215" drop_shadow_visible="true" enabled="true" follows="left|top"
71 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 71 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
72 mouse_opaque="true" name="UI Size:" v_pad="0" width="128"> 72 mouse_opaque="true" name="UI Size:" v_pad="0" width="128">
73 UI Size: 73 UI Size:
74 </text> 74 </text>
75 <slider bottom="-237" can_edit_text="true" 75 <slider bottom="-217" can_edit_text="true"
76 decimal_digits="3" enabled="true" height="16" increment="0.001" 76 decimal_digits="3" enabled="true" height="16" increment="0.001"
77 initial_val="1" left="148" max_val="1.4" min_val="0.75" mouse_opaque="true" 77 initial_val="1" left="148" max_val="1.4" min_val="0.75" mouse_opaque="true"
78 name="ui_scale_slider" show_text="true" value="1" width="220" /> 78 name="ui_scale_slider" show_text="true" value="1" width="220" />
79 <button bottom="-241" enabled="true" follows="left|top" 79 <button bottom="-221" enabled="true" follows="left|top"
80 font="SansSerif" halign="center" height="22" label="Reset" 80 font="SansSerif" halign="center" height="22" label="Reset"
81 label_selected="Reset" left_delta="226" mouse_opaque="true" 81 label_selected="Reset" left_delta="226" mouse_opaque="true"
82 name="reset_ui_size" scale_image="true" width="80" /> 82 name="reset_ui_size" scale_image="true" width="80" />
83 <check_box bottom="-256" enabled="true" follows="left|top" 83 <check_box bottom="-236" enabled="true" follows="left|top"
84 font="SansSerifSmall" height="16" initial_value="false" 84 font="SansSerifSmall" height="16" initial_value="false"
85 label="Use resolution independent scale" left="151" mouse_opaque="true" 85 label="Use resolution independent scale" left="151" mouse_opaque="true"
86 name="ui_auto_scale" radio_style="false" width="256" /> 86 name="ui_auto_scale" radio_style="false" width="256" />
87 <check_box bottom="-280" enabled="true" follows="left|top" 87 <check_box bottom="-260" enabled="true" follows="left|top"
88 font="SansSerifSmall" height="16" initial_value="false" 88 font="SansSerifSmall" height="16" initial_value="false"
89 label="Go Away/AFK when idle" left="330" mouse_opaque="true" 89 label="Go Away/AFK when idle" left="330" mouse_opaque="true"
90 name="afk_timeout_checkbox" radio_style="false" width="256" /> 90 name="afk_timeout_checkbox" radio_style="false" width="256" />
91 <spinner bottom="-280" decimal_digits="0" enabled="true" 91 <spinner bottom="-260" decimal_digits="0" enabled="true"
92 follows="left|top" height="16" increment="1" initial_val="300" 92 follows="left|top" height="16" increment="1" initial_val="300"
93 label="Away Timeout:" label_width="141" left="10" max_val="600" 93 label="Away Timeout:" label_width="141" left="10" max_val="600"
94 min_val="30" mouse_opaque="true" name="afk_timeout_spinner" width="202" /> 94 min_val="30" mouse_opaque="true" name="afk_timeout_spinner" width="202" />
@@ -109,18 +109,18 @@
109 mouse_opaque="true" name="mini_map_notify_sim" radio_style="false" 109 mouse_opaque="true" name="mini_map_notify_sim" radio_style="false"
110 width="256" /> 110 width="256" />
111 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 111 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
112 bottom="-332" drop_shadow_visible="true" enabled="true" follows="left|top" 112 bottom="-312" drop_shadow_visible="true" enabled="true" follows="left|top"
113 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 113 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
114 mouse_opaque="true" name="maturity_desired_label" v_pad="0" width="394"> 114 mouse_opaque="true" name="maturity_desired_label" v_pad="0" width="394">
115 Rating: 115 Rating:
116 </text> 116 </text>
117 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 117 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
118 bottom="-332" drop_shadow_visible="true" enabled="true" follows="left|top" 118 bottom="-312" drop_shadow_visible="true" enabled="true" follows="left|top"
119 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="151" 119 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="151"
120 mouse_opaque="true" name="maturity_desired_prompt" v_pad="0" width="394"> 120 mouse_opaque="true" name="maturity_desired_prompt" v_pad="0" width="394">
121 I want to access content rated: 121 I want to access content rated:
122 </text> 122 </text>
123 <combo_box bottom="-338" follows="left|top" height="18" left="320" 123 <combo_box bottom="-318" follows="left|top" height="18" left="315"
124 mouse_opaque="true" name="maturity_desired_combobox" width="150"> 124 mouse_opaque="true" name="maturity_desired_combobox" width="150">
125 <combo_item name="Desired_Adult" value="42"> 125 <combo_item name="Desired_Adult" value="42">
126 PG, Mature and Adult 126 PG, Mature and Adult
@@ -133,8 +133,8 @@
133 </combo_item> 133 </combo_item>
134 </combo_box> 134 </combo_box>
135 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 135 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
136 bottom="-332" drop_shadow_visible="true" enabled="true" follows="left|top" 136 bottom="-312" drop_shadow_visible="true" enabled="true" follows="left|top"
137 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="320" 137 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="315"
138 mouse_opaque="true" name="maturity_desired_textbox" v_pad="0" width="150"> 138 mouse_opaque="true" name="maturity_desired_textbox" v_pad="0" width="150">
139 PG only 139 PG only
140 </text> 140 </text>
@@ -151,25 +151,25 @@
151 Nametags: 151 Nametags:
152 </text> 152 </text>
153 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 153 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
154 bottom="-175" drop_shadow_visible="true" enabled="true" follows="left|top" 154 bottom="-155" drop_shadow_visible="true" enabled="true" follows="left|top"
155 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 155 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
156 mouse_opaque="true" name="effects_color_textbox" v_pad="0" width="394"> 156 mouse_opaque="true" name="effects_color_textbox" v_pad="0" width="394">
157 Selection Beam Color: 157 Selection Beam Color:
158 </text> 158 </text>
159 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 159 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
160 bottom="-274" drop_shadow_visible="true" enabled="true" follows="left|top" 160 bottom="-254" drop_shadow_visible="true" enabled="true" follows="left|top"
161 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="220" 161 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="220"
162 mouse_opaque="true" name="seconds_textbox" v_pad="0" width="128"> 162 mouse_opaque="true" name="seconds_textbox" v_pad="0" width="128">
163 seconds 163 seconds
164 </text> 164 </text>
165 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 165 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
166 bottom="-372" drop_shadow_visible="true" enabled="true" follows="left|top" 166 bottom="-352" drop_shadow_visible="true" enabled="true" follows="left|top"
167 font="SansSerifSmall" h_pad="0" halign="left" height="18" left="10" 167 font="SansSerifSmall" h_pad="0" halign="left" height="18" left="10"
168 mouse_opaque="true" name="time_textbox" v_pad="0" width="394"> 168 mouse_opaque="true" name="time_textbox" v_pad="0" width="394">
169 Clock: 169 Clock:
170 </text> 170 </text>
171 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 171 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
172 bottom="-404" drop_shadow_visible="true" enabled="true" follows="left|top" 172 bottom="-384" drop_shadow_visible="true" enabled="true" follows="left|top"
173 font="SansSerifSmall" h_pad="0" halign="left" height="18" left="10" 173 font="SansSerifSmall" h_pad="0" halign="left" height="18" left="10"
174 mouse_opaque="true" name="language_textbox" v_pad="0" width="394"> 174 mouse_opaque="true" name="language_textbox" v_pad="0" width="394">
175 Language: 175 Language:
@@ -181,10 +181,20 @@
181 v_pad="0" width="400"> 181 v_pad="0" width="400">
182 (requires restart for full effect) 182 (requires restart for full effect)
183 </text> 183 </text>
184 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
185 bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top"
186 font="SansSerifSmall" h_pad="0" halign="left" height="18" left="10"
187 mouse_opaque="true" name="remember_password_text" v_pad="0" width="394">
188 Remember Password:
189 </text>
190 <check_box bottom_delta="0" follows="left|top"
191 font="SansSerifSmall" height="16" initial_value="false"
192 label="Remember Password" left="151" mouse_opaque="true"
193 name="remember_password" radio_style="false" width="256" />
184 <string name="region_name_prompt"> 194 <string name="region_name_prompt">
185 &lt;Type region name&gt; 195 &lt;Type region name&gt;
186 </string> 196 </string>
187 <combo_box allow_text_entry="false" bottom="-372" enabled="true" follows="left|top" 197 <combo_box allow_text_entry="false" bottom="-352" enabled="true" follows="left|top"
188 height="18" left="153" max_chars="20" mouse_opaque="true" 198 height="18" left="153" max_chars="20" mouse_opaque="true"
189 name="time_combobox" width="146"> 199 name="time_combobox" width="146">
190 <combo_item type="string" name="12HourTime" value="PST 12"> 200 <combo_item type="string" name="12HourTime" value="PST 12">
@@ -197,7 +207,7 @@
197 UTC 207 UTC
198 </combo_item> 208 </combo_item>
199 </combo_box> 209 </combo_box>
200 <combo_box allow_text_entry="true" bottom="-402" enabled="true" 210 <combo_box allow_text_entry="true" bottom="-382" enabled="true"
201 follows="left|top" height="16" left="153" max_chars="135" 211 follows="left|top" height="16" left="153" max_chars="135"
202 mouse_opaque="true" name="language_combobox" width="146"> 212 mouse_opaque="true" name="language_combobox" width="146">
203 <combo_item type="string" length="1" enabled="true" name="System Default Language" value="default"> 213 <combo_item type="string" length="1" enabled="true" name="System Default Language" value="default">
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml
index 0611ce3..58a2989 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml
@@ -5,8 +5,8 @@
5 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 5 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
6 bottom="-22" drop_shadow_visible="true" enabled="true" follows="left|top" 6 bottom="-22" drop_shadow_visible="true" enabled="true" follows="left|top"
7 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 7 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
8 mouse_opaque="true" name="muting_text" v_pad="0" width="400"> 8 mouse_opaque="true" name="muting_text" v_pad="0" width="500">
9 Select a skin (requires restart). 9 Select a skin (requires restart). (Please see the skin folders for information and credits)
10 </text> 10 </text>
11 <radio_group bottom="0" draw_border="false" follows="top|left" height="380" left="12" 11 <radio_group bottom="0" draw_border="false" follows="top|left" height="380" left="12"
12 name="skin_selection" width="480"> 12 name="skin_selection" width="480">
@@ -40,12 +40,24 @@
40 scale_image="true" label="" image_selected="skin_thumbnail_gemini.png" 40 scale_image="true" label="" image_selected="skin_thumbnail_gemini.png"
41 image_hover_selected="skin_thumbnail_gemini.png" image_unselected="skin_thumbnail_gemini.png" 41 image_hover_selected="skin_thumbnail_gemini.png" image_unselected="skin_thumbnail_gemini.png"
42 image_hover_unselected="skin_thumbnail_gemini.png" follows="left|top" /> 42 image_hover_unselected="skin_thumbnail_gemini.png" follows="left|top" />
43 43 <text name="skin_current_text"
44 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 44 left="10" bottom="5" halign="left" height="12"
45 bottom="10" drop_shadow_visible="true" enabled="true" follows="left|bottom" 45 follows="left|bottom" h_pad="0" v_pad="0"
46 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="90" 46 bg_visible="false" drop_shadow_visible="true"
47 mouse_opaque="true" name="muting_text" v_pad="0" width="400"> 47 border_visible="false" border_drop_shadow_visible="false"
48 (Please see the skin folders for information and credits) 48 font="SansSerif" mouse_opaque="true">
49 Other Skin Name:
49 </text> 50 </text>
51 <line_editor name="skin_current_edit"
52 bottom_delta="0" left_delta="120" height="20" width="120"
53 follows="left|bottom" font="SansSerif"
54 bevel_style="in" border_style="line" border_thickness="1"
55 max_length="31" mouse_opaque="true"
56 handle_edit_keys_directly="true"
57 select_all_on_focus_received="true" />
58 <button name="save_skin" label="Save"
59 bottom_delta="-2" left_delta="120" height="24" width="90"
60 follows="left|center" font="SansSerif" halign="center"
61 mouse_opaque="true" scale_image="TRUE" />
50</panel> 62</panel>
51 63
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml
index 603f2d8..ce2d5ad 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml
@@ -41,15 +41,15 @@
41 </text> 41 </text>
42 42
43 <slider name="near_me_range" label="" control_name="NearMeRange" 43 <slider name="near_me_range" label="" control_name="NearMeRange"
44 bottom_delta="0" left_delta="62" width="110" height="15" 44 bottom_delta="0" left_delta="62" width="150" height="15"
45 follows="left|top" min_val="5" max_val="512" increment="1" 45 follows="left|top" min_val="5" max_val="2048" increment="1"
46 initial_val="96" decimal_digits="0" /> 46 initial_val="96" decimal_digits="0" />
47 47
48 <text name="meters" 48 <text name="meters"
49 bottom_delta="0" left="180" height="15" width="40" 49 bottom_delta="0" left_delta="10" height="15" width="40"
50 h_pad="0" halign="left" v_pad="0" follows="left|top" 50 h_pad="0" halign="left" v_pad="0" follows="left|top"
51 bg_visible="false" border_drop_shadow_visible="false" 51 bg_visible="false" border_drop_shadow_visible="false"
52 border_visible="false" drop_shadow_visible="true" 52 border_visible="false" drop_shadow_visible="true"
53 font="SansSerifSmall" mouse_opaque="true"> 53 font="SansSerifSmall" mouse_opaque="true">
54 m 54 m
55 </text> 55 </text>
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_region_estate.xml b/linden/indra/newview/skins/default/xui/en-us/panel_region_estate.xml
index 84ce9d0..5dd738a 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_region_estate.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_region_estate.xml
@@ -25,7 +25,7 @@ regions in the estate.
25 (unknown) 25 (unknown)
26 </text> 26 </text>
27 <view_border bevel_style="in" border="true" border_thickness="1" bottom_delta="-295" 27 <view_border bevel_style="in" border="true" border_thickness="1" bottom_delta="-295"
28 follows="top|left" height="290" left="6" width="250" /> 28 follows="top|left" height="350" left="6" width="250" />
29 <check_box bottom_delta="265" follows="left|top" height="20" label="Use Global Time" 29 <check_box bottom_delta="265" follows="left|top" height="20" label="Use Global Time"
30 left="12" name="use_global_time_check" width="200" /> 30 left="12" name="use_global_time_check" width="200" />
31 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 31 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
@@ -69,13 +69,12 @@ regions in the estate.
69 left="12" name="allow_direct_teleport" width="80" /> 69 left="12" name="allow_direct_teleport" width="80" />
70 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 70 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
71 name="allow_direct_teleport_help" right="250" width="18" /> 71 name="allow_direct_teleport_help" right="250" width="18" />
72 <text bottom_delta="-26" follows="left|top" font="SansSerifSmall" height="20" 72 <text bottom_delta="-26" follows="left|top" font="SansSerifSmall" height="20"
73 left="10" name="abuse_email_text" width="180"> 73 left="10" name="abuse_email_text" width="180">
74 Abuse email address: 74 Abuse email address:
75 </text> 75 </text>
76 <line_editor bottom_delta="-16" follows="top|left" height="19" left="15" max_length="254" 76 <line_editor bottom_delta="-16" follows="top|left" height="19" left="15" max_length="254"
77 name="abuse_email_address" width="205" /> 77 name="abuse_email_address" width="205" />
78 <string name="email_unsupported">Feature unsupported</string>
79 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 78 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
80 name="abuse_email_address_help" right="250" width="18" /> 79 name="abuse_email_address_help" right="250" width="18" />
81 <button bottom_delta="-26" enabled="false" follows="left|top" height="20" label="Apply" 80 <button bottom_delta="-26" enabled="false" follows="left|top" height="20" label="Apply"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_region_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_region_general.xml
index 6302428..70df1df 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_region_general.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_region_general.xml
@@ -58,16 +58,21 @@
58 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 58 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
59 left="205" name="parcel_search_help" width="18" /> 59 left="205" name="parcel_search_help" width="18" />
60 <spinner bottom_delta="-40" follows="left|top" height="20" increment="1" 60 <spinner bottom_delta="-40" follows="left|top" height="20" increment="1"
61 label="Agent Limit" label_width="97" left="10" max_val="100" min_val="1" 61 label="Agent Limit" label_width="100" left="10" max_val="100" min_val="1"
62 name="agent_limit_spin" width="170" /> 62 name="agent_limit_spin" width="170" />
63 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 63 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
64 left="205" name="agent_limit_help" width="18" /> 64 left="205" name="agent_limit_help" width="18" />
65 <spinner bottom_delta="-20" follows="left|top" height="20" increment="0.5" 65 <spinner bottom_delta="-20" follows="left|top" height="20" increment="0.5"
66 label="Object Bonus" label_width="97" left="10" max_val="10" min_val="1" 66 label="Object Bonus" label_width="100" left="10" max_val="10" min_val="1"
67 name="object_bonus_spin" width="170" /> 67 name="object_bonus_spin" width="170" />
68 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?" 68 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
69 left="205" name="object_bonus_help" width="18" /> 69 left="205" name="object_bonus_help" width="18" />
70 <text bottom_delta="-30" follows="left|top" height="20" label="Maturity" left="10" 70 <spinner bottom_delta="-20" follows="left|top" height="20" increment="0.5"
71 label="Minimum Agent Age" label_width="100" left="10" max_val="1000" min_val="0"
72 name="minimum_agent_age" width="170" />
73 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
74 left="205" name="minimum_agent_age_help" width="18" />
75 <text bottom_delta="-30" follows="left|top" height="20" label="Maturity" left="10"
71 name="access_text" width="100"> 76 name="access_text" width="100">
72 Rating: 77 Rating:
73 </text> 78 </text>
@@ -87,7 +92,7 @@
87 left="205" name="access_help" width="18" /> 92 left="205" name="access_help" width="18" />
88 <button bottom_delta="-30" enabled="false" follows="left|top" height="20" label="Apply" 93 <button bottom_delta="-30" enabled="false" follows="left|top" height="20" label="Apply"
89 left="108" name="apply_btn" width="100" /> 94 left="108" name="apply_btn" width="100" />
90 <button bottom_delta="-60" follows="left|top" height="20" 95 <button bottom_delta="-40" follows="left|top" height="20"
91 label="Teleport Home One User..." left="10" name="kick_btn" width="250" /> 96 label="Teleport Home One User..." left="10" name="kick_btn" width="250" />
92 <button bottom_delta="-23" follows="left|top" height="20" 97 <button bottom_delta="-23" follows="left|top" height="20"
93 label="Teleport Home All Users..." left="10" name="kick_all_btn" width="250" /> 98 label="Teleport Home All Users..." left="10" name="kick_all_btn" width="250" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_region_open_region_settings.xml b/linden/indra/newview/skins/default/xui/en-us/panel_region_open_region_settings.xml
new file mode 100644
index 0000000..3eb7806
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_region_open_region_settings.xml
@@ -0,0 +1,76 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<panel border="true" bottom="100" follows="top|left" height="320" label="Region Settings"
3 left="0" name="RegionSettings" width="480">
4 <spinner bottom_delta="-40" follows="left|top" height="20" increment="1"
5 label="Default Draw Distance" label_width="175" left="10" max_val="10000" min_val="1"
6 name="draw_distance" width="250" />
7 <check_box bottom_delta="-20" follows="left|top" height="20" label="Force Draw Distance"
8 left="10" name="force_draw_distance" width="80" />
9 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
10 left="285" name="force_draw_distance_help" width="18" />
11 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
12 label="Max Drag Distance" label_width="175" left="10" max_val="1000 0" min_val="0"
13 name="max_drag_distance" width="250" />
14 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
15 label="Max Prim Scale" label_width="175" left="10" max_val="10000" min_val="0"
16 name="max_prim_scale" width="250" />
17 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
18 label="Min Prim Scale" label_width="175" left="10" max_val="10000" min_val="0"
19 name="min_prim_scale" width="250" />
20 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
21 label="Max Physical Prim Scale" label_width="175" left="10" max_val="10000" min_val="0"
22 name="max_phys_prim_scale" width="250" />
23 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
24 label="Max Hollow Size" label_width="175" left="10" max_val="100" min_val="0"
25 name="max_hollow_size" width="250" />
26 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
27 label="Min Hole Size" label_width="175" left="10" max_val="100" min_val="0"
28 name="min_hole_size" width="250" />
29 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
30 label="Max Link Count" label_width="175" left="10" max_val="100000" min_val="0"
31 name="max_link_count" width="250" />
32 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
33 label="Max Link Count Phys" label_width="175" left="10" max_val="100000" min_val="0"
34 name="max_link_count_phys" width="250" />
35 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
36 label="Max Inventory Items To Transfer" label_width="175" left="10" max_val="10000" min_val="-1"
37 name="max_inventory_items_transfer" width="250" />
38 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
39 left="285" name="max_inventory_items_transfer_help" width="18" />
40 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
41 label="Show Tags" label_width="175" left="10" max_val="2" min_val="0"
42 name="show_tags" width="250" />
43 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
44 left="285" name="show_tags_help" width="18" />
45 <spinner bottom_delta="-20" follows="left|top" height="20" increment="1"
46 label="Max Groups" label_width="175" left="10" max_val="1000" min_val="-1"
47 name="max_groups" width="250" />
48 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
49 left="285" name="max_groups_help" width="18" />
50 <check_box bottom_delta="-20" follows="left|top" height="20" label="Render Water" left="10"
51 name="render_water" width="80" />
52 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
53 left="285" name="render_water_help" width="18" />
54 <check_box bottom_delta="-20" follows="left|top" height="20" label="Allow Minimap"
55 left="10" name="allow_minimap" width="80" />
56 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
57 left="285" name="allow_minimap_help" width="18" />
58 <check_box bottom_delta="-20" follows="left|top" height="20" label="Allow Physical Prims"
59 left="10" name="allow_physical_prims" width="80" />
60 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
61 left="285" name="allow_physical_prims_help" width="18" />
62 <check_box bottom_delta="-20" follows="left|top" height="20" label="Enable Teen Mode"
63 left="10" name="enable_teen_mode" width="80" />
64 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
65 left="285" name="enable_teen_mode_help" width="18" />
66 <check_box bottom_delta="-20" follows="left|top" height="20" label="Enforce Max Build Constraints"
67 left="10" name="enforce_max_build" width="80" />
68 <check_box bottom_delta="-20" follows="left|top" height="20"
69 label="Allow Parcel WindLight" left="10"
70 name="allow_parcel_windlight"
71 width="80" />
72 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" height="18" label="?"
73 left="285" name="allow_parcel_windlight_help" width="18" />
74 <button bottom_delta="-30" enabled="false" follows="left|top" height="20" label="Apply"
75 left="108" name="apply_ors_btn" width="100" />
76</panel>
diff --git a/linden/indra/newview/skins/default/xui/en-us/strings.xml b/linden/indra/newview/skins/default/xui/en-us/strings.xml
index ceb6994..d3c9df1 100644
--- a/linden/indra/newview/skins/default/xui/en-us/strings.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/strings.xml
@@ -23,6 +23,12 @@
23 <string name="copy_obj_key_info"> 23 <string name="copy_obj_key_info">
24 Copied key(s) for: 24 Copied key(s) for:
25 </string> 25 </string>
26 <string name="TeleportOfferMaturity">
27 [NAME] is offering a TP to [DESTINATION]
28 </string>
29 <string name="TeleportLureMaturity">
30 [NAME]'s teleport lure is to [DESTINATION]
31 </string>
26 32
27 <!-- Login --> 33 <!-- Login -->
28 <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string> 34 <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string>
diff --git a/linden/indra/newview/skins/default/xui/ja/menu_mini_map.xml b/linden/indra/newview/skins/default/xui/ja/menu_mini_map.xml
index c8828a5..bdd63e8 100644
--- a/linden/indra/newview/skins/default/xui/ja/menu_mini_map.xml
+++ b/linden/indra/newview/skins/default/xui/ja/menu_mini_map.xml
@@ -3,6 +3,9 @@
3 <menu_item_call label="ズーム(近)" name="Zoom Close"/> 3 <menu_item_call label="ズーム(近)" name="Zoom Close"/>
4 <menu_item_call label="ズーム(中)" name="Zoom Medium"/> 4 <menu_item_call label="ズーム(中)" name="Zoom Medium"/>
5 <menu_item_call label="ズーム(遠)" name="Zoom Far"/> 5 <menu_item_call label="ズーム(遠)" name="Zoom Far"/>
6 <menu_item_check label="カメラを中央に" name="Center on Camera"/>
7 <menu_item_check label="ミニマップを回転" name="Rotate Mini-Map"/>
8 <menu_itemcall label="世界地図を表示" name="Show Map"/>
6 <menu_item_call label="追跡をやめる" name="Stop Tracking"/> 9 <menu_item_call label="追跡をやめる" name="Stop Tracking"/>
7 <menu_item_call label="プロフィール..." name="Profile"/> 10 <menu_item_call label="プロフィール..." name="Profile"/>
8</menu> 11</menu>
diff --git a/linden/indra/newview/skins/default/xui/ja/menu_viewer.xml b/linden/indra/newview/skins/default/xui/ja/menu_viewer.xml
index c69c2e3..bc263bb 100644
--- a/linden/indra/newview/skins/default/xui/ja/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/ja/menu_viewer.xml
@@ -1,26 +1,39 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?> 1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<menu_bar name="Main Menu"> 2<menu_bar name="Main Menu">
3
4
5 <!-- ファイル -->
6
3 <menu label="ファイル" name="File"> 7 <menu label="ファイル" name="File">
4 <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/> 8 <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
5 <menu label="アップロード" name="upload"> 9 <menu label="アップロード" name="Upload">
6 <menu_item_call label="画像 (L$[COST])..." name="Upload Image"/> 10 <menu_item_call label="画像 ([UPLOADFEE])..." name="Upload Image"/>
7 <menu_item_call label="サウンド (L$[COST])..." name="Upload Sound"/> 11 <menu_item_call label="サウンド ([UPLOADFEE])..." name="Upload Sound"/>
8 <menu_item_call label="アニメーション (L$[COST])..." name="Upload Animation"/> 12 <menu_item_call label="アニメーション ([UPLOADFEE])..." name="Upload Animation"/>
9 <menu_item_call label="一括 (ファイルにつきL$[COST])..." name="Bulk Upload"/> 13 <menu_item_call label="一括 (ファイルにつき[UPLOADFEE])..." name="Bulk Upload"/>
10 <menu_item_separator label="-----------" name="separator"/> 14 <menu_item_separator label="-----------" name="separator"/>
11 <menu_item_call label="デフォルト権限の設定..." name="perm prefs"/> 15 <menu_item_call label="デフォルト権限の設定..." name="perm prefs"/>
12 </menu> 16 </menu>
13 <menu_item_separator label="-----------" name="separator"/> 17 <menu_item_separator label="-----------" name="separator"/>
18 <menu_item_call label="オブジェクトのインポート..." name="Import"/>
19 <menu_item_call label="インポートとアップロード... (テクスチャにつき[UPLOADFEE])" name="ImportUpload"/>
20 <menu_item_call label="選択したオブジェクトのエクスポート..." name="Export"/>
21 <menu_item_separator label="-----------" name="separator2"/>
22 <menu_item_call label="全てののウィンドウを最小化" name="Minimize All Windows"/>
14 <menu_item_call label="ウィンドウを閉じる" name="Close Window"/> 23 <menu_item_call label="ウィンドウを閉じる" name="Close Window"/>
15 <menu_item_call label="全てのウィンドウを閉じる" name="Close All Windows"/> 24 <menu_item_call label="全てのウィンドウを閉じる" name="Close All Windows"/>
16 <menu_item_separator label="-----------" name="separator2"/>
17 <menu_item_call label="テクスチャーを別名で保存..." name="Save Texture As..."/>
18 <menu_item_separator label="-----------" name="separator3"/> 25 <menu_item_separator label="-----------" name="separator3"/>
26 <menu_item_call label="テクスチャーを別名で保存..." name="Save Texture As..."/>
27 <menu_item_separator label="-----------" name="separator4"/>
19 <menu_item_call label="スナップショットを撮る" name="Take Snapshot"/> 28 <menu_item_call label="スナップショットを撮る" name="Take Snapshot"/>
20 <menu_item_call label="スナップショットをディスクに保存" name="Snapshot to Disk"/> 29 <menu_item_call label="スナップショットをディスクに保存" name="Snapshot to Disk"/>
21 <menu_item_separator label="-----------" name="separator4"/> 30 <menu_item_separator label="-----------" name="separator5"/>
22 <menu_item_call label="終了" name="Quit"/> 31 <menu_item_call label="終了" name="Quit"/>
23 </menu> 32 </menu>
33
34
35 <!-- 編集 -->
36
24 <menu label="編集" name="Edit"> 37 <menu label="編集" name="Edit">
25 <menu_item_call label="元に戻す" name="Undo"/> 38 <menu_item_call label="元に戻す" name="Undo"/>
26 <menu_item_call label="やり直し" name="Redo"/> 39 <menu_item_call label="やり直し" name="Redo"/>
@@ -51,16 +64,21 @@
51 <menu_item_call label="スカート" name="Skirt"/> 64 <menu_item_call label="スカート" name="Skirt"/>
52 <menu_item_call label="すべての服" name="All Clothes"/> 65 <menu_item_call label="すべての服" name="All Clothes"/>
53 </menu> 66 </menu>
67 <menu_item_call label="容姿の再描画" name="Refresh Appearance"/>
54 <menu_item_separator label="-----------" name="separator6"/> 68 <menu_item_separator label="-----------" name="separator6"/>
55 <menu_item_call label="ジェスチャー" name="Gestures..."/> 69 <menu_item_call label="ジェスチャー" name="Gestures"/>
56 <menu_item_call label="プロフィール..." name="Profile..."/> 70 <menu_item_call label="プロフィール..." name="Profile..."/>
57 <menu_item_call label="容姿..." name="Appearance..."/> 71 <menu_item_call label="容姿..." name="Appearance..."/>
58 <menu_item_separator label="-----------" name="separator7"/> 72 <menu_item_separator label="-----------" name="separator7"/>
59 <menu_item_check label="フレンド..." name="Friends..."/> 73 <menu_item_check label="フレンド" name="Friends"/>
60 <menu_item_call label="グループ..." name="Groups..."/> 74 <menu_item_call label="グループ" name="Groups"/>
61 <menu_item_separator label="-----------" name="separator8"/> 75 <menu_item_separator label="-----------" name="separator8"/>
62 <menu_item_call label="環境設定..." name="Preferences..."/> 76 <menu_item_call label="環境設定..." name="Preferences..."/>
63 </menu> 77 </menu>
78
79
80 <!-- 表示 -->
81
64 <menu label="表示" name="View"> 82 <menu label="表示" name="View">
65 <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/> 83 <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/>
66 <menu_item_call label="一人称視点(マウスルック)" name="Mouselook"/> 84 <menu_item_call label="一人称視点(マウスルック)" name="Mouselook"/>
@@ -69,23 +87,27 @@
69 <menu_item_call label="表示をリセット" name="Reset View"/> 87 <menu_item_call label="表示をリセット" name="Reset View"/>
70 <menu_item_call label="最後のチャットを閲覧" name="Look at Last Chatter"/> 88 <menu_item_call label="最後のチャットを閲覧" name="Look at Last Chatter"/>
71 <menu_item_separator label="-----------" name="separator"/> 89 <menu_item_separator label="-----------" name="separator"/>
90 <menu_item_call label="ウェブ・ブラウザ" name="Web Browser"/>
91 <menu_item_separator label="-----------" name="separator2"/>
72 <menu_item_check label="ツールバー" name="Toolbar"/> 92 <menu_item_check label="ツールバー" name="Toolbar"/>
73 <menu_item_check label="ローカル・チャット" name="Chat History"/> 93 <menu_item_check label="ローカル・チャット" name="Chat History"/>
74 <menu_item_check label="コミュニケーション" name="Instant Message"/> 94 <menu_item_check label="コミュニケーション" name="Instant Message"/>
75 <menu_item_check label="持ち物" name="Inventory"/> 95 <menu_item_check label="持ち物" name="Inventory"/>
76 <menu_item_check label="ボイスチャット・ユーザー一覧" name="Active Speakers"/> 96 <menu_item_check label="ボイスチャット・ユーザー一覧" name="Active Speakers"/>
77 <menu_item_check label="無視リスト" name="Mute List"/> 97 <menu_item_check label="無視リスト" name="Mute List"/>
78 <menu_item_separator label="-----------" name="separator2"/> 98 <menu_item_separator label="-----------" name="separator3"/>
79 <menu_item_check label="カメラ・コントロール" name="Camera Controls"/> 99 <menu_item_check label="カメラ・コントロール" name="Camera Controls"/>
80 <menu_item_check label="移動コントロール" name="Movement Controls"/> 100 <menu_item_check label="移動コントロール" name="Movement Controls"/>
81 <menu_item_check label="世界地図" name="World Map"/> 101 <menu_item_check label="世界地図" name="World Map"/>
82 <menu_item_check label="ミニマップ" name="Mini-Map"/> 102 <menu_item_check label="ミニマップ" name="Mini-Map"/>
83 <menu_item_separator label="-----------" name="separator3"/> 103 <menu_item_separator label="-----------" name="separator4"/>
104 <menu_item_call label="AO" name="AO"/>
105 <menu_item_separator label="-----------" name="separator5"/>
84 <menu_item_check label="地域の統計情報" name="Statistics Bar"/> 106 <menu_item_check label="地域の統計情報" name="Statistics Bar"/>
85 <menu_item_check label="土地の境界線" name="Property Lines"/> 107 <menu_item_check label="土地の境界線" name="Property Lines"/>
86 <menu_item_check label="立入禁止ライン" name="Banlines"/> 108 <menu_item_check label="立入禁止ライン" name="Banlines"/>
87 <menu_item_check label="土地オーナー" name="Land Owners"/> 109 <menu_item_check label="土地オーナー" name="Land Owners"/>
88 <menu_item_separator label="-----------" name="separator4"/> 110 <menu_item_separator label="-----------" name="separator6"/>
89 <menu label="ヒントのポップアップ" name="Hover Tips"> 111 <menu label="ヒントのポップアップ" name="Hover Tips">
90 <menu_item_check label="ヒントを表示" name="Show Tips"/> 112 <menu_item_check label="ヒントを表示" name="Show Tips"/>
91 <menu_item_separator label="-----------" name="separator"/> 113 <menu_item_separator label="-----------" name="separator"/>
@@ -96,14 +118,21 @@
96 <menu_item_check label="ビーコン(標識)" name="beacons"/> 118 <menu_item_check label="ビーコン(標識)" name="beacons"/>
97 <menu_item_check label="パーティクルを非表示" name="Hide Particles"/> 119 <menu_item_check label="パーティクルを非表示" name="Hide Particles"/>
98 <menu_item_check label="HUD装着物を表示" name="Show HUD Attachments"/> 120 <menu_item_check label="HUD装着物を表示" name="Show HUD Attachments"/>
99 <menu_item_separator label="-----------" name="separator5"/> 121 <menu_item_separator label="-----------" name="separator7"/>
100 <menu_item_call label="カメラ・ズームイン" name="Zoom In"/> 122 <menu label="ズーム" name="Zoom Level">
101 <menu_item_call label="カメラ・デフォルト" name="Zoom Default"/> 123 <menu_item_call label="カメラ・ズームイン" name="Zoom In"/>
102 <menu_item_call label="カメラ・ズームアウト" name="Zoom Out"/> 124 <menu_item_call label="カメラ・デフォルト" name="Zoom Default"/>
103 <menu_item_separator label="-----------" name="separator6"/> 125 <menu_item_call label="カメラ・ズームアウト" name="Zoom Out"/>
126 </menu>
104 <menu_item_call label="[全画面表示]" name="Toggle Fullscreen"/> 127 <menu_item_call label="[全画面表示]" name="Toggle Fullscreen"/>
105 <menu_item_call label="UIサイズを標準設定に戻す" name="Set UI Size to Default"/> 128 <menu_item_call label="UIサイズを標準設定に戻す" name="Set UI Size to Default"/>
129 <menu_item_separator label="-----------" name="separator8"/>
130 <menu_item_check label="アドバンスメニューを表示" name="Toggle Advanced Menu"/>
106 </menu> 131 </menu>
132
133
134 <!-- 世界 -->
135
107 <menu label="世界" name="World"> 136 <menu label="世界" name="World">
108 <menu_item_call label="チャット" name="Chat"/> 137 <menu_item_call label="チャット" name="Chat"/>
109 <menu_item_check label="常に走る" name="Always Run"/> 138 <menu_item_check label="常に走る" name="Always Run"/>
@@ -116,9 +145,11 @@
116 <menu_item_separator label="-----------" name="separator3"/> 145 <menu_item_separator label="-----------" name="separator3"/>
117 <menu_item_call label="離席中に設定" name="Set Away"/> 146 <menu_item_call label="離席中に設定" name="Set Away"/>
118 <menu_item_call label="取り込み中に設定" name="Set Busy"/> 147 <menu_item_call label="取り込み中に設定" name="Set Busy"/>
148 <menu_item_call label="IMに自動応答する" name="Auto-Respond to IMs"/>
149 <menu_item_separator label="-----------" name="separator4"/>
119 <menu_item_call label="自分のアバターのアニメーションを停止" name="Stop Animating My Avatar"/> 150 <menu_item_call label="自分のアバターのアニメーションを停止" name="Stop Animating My Avatar"/>
120 <menu_item_call label="キー制御を解除" name="Release Keys"/> 151 <menu_item_call label="キー制御を解除" name="Release Keys"/>
121 <menu_item_separator label="-----------" name="separator4"/> 152 <menu_item_separator label="-----------" name="separator5"/>
122 <menu_item_call label="アカウントの履歴..." name="Account History..."> 153 <menu_item_call label="アカウントの履歴..." name="Account History...">
123 <on_click name="AccountHistory_url" userdata="WebLaunchAccountHistory,http://secondlife.com/account/transactions.php?lang=ja"/> 154 <on_click name="AccountHistory_url" userdata="WebLaunchAccountHistory,http://secondlife.com/account/transactions.php?lang=ja"/>
124 </menu_item_call> 155 </menu_item_call>
@@ -126,12 +157,12 @@
126 <on_click name="ManageMyAccount_url" userdata="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=ja"/> 157 <on_click name="ManageMyAccount_url" userdata="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=ja"/>
127 </menu_item_call> 158 </menu_item_call>
128 <menu_item_call label="L$(リンデン・ドル)を購入" name="Buy and Sell L$..."/> 159 <menu_item_call label="L$(リンデン・ドル)を購入" name="Buy and Sell L$..."/>
129 <menu_item_separator label="-----------" name="separator5"/>
130 <menu_item_call label="自分の土地..." name="My Land..."/>
131 <menu_item_call label="土地情報..." name="About Land..."/>
132 <menu_item_call label="土地を購入..." name="Buy Land..."/>
133 <menu_item_call label="地域/不動産..." name="Region/Estate..."/>
134 <menu_item_separator label="-----------" name="separator6"/> 160 <menu_item_separator label="-----------" name="separator6"/>
161 <menu_item_call label="自分の土地" name="My Land"/>
162 <menu_item_call label="土地情報" name="About Land"/>
163 <menu_item_call label="土地を購入..." name="Buy Land..."/>
164 <menu_item_call label="地域/不動産" name="Region/Estate"/>
165 <menu_item_separator label="-----------" name="separator7"/>
135 <menu label="環境の設定" name="Environment Settings"> 166 <menu label="環境の設定" name="Environment Settings">
136 <menu_item_call label="日の出" name="Sunrise"/> 167 <menu_item_call label="日の出" name="Sunrise"/>
137 <menu_item_call label="正午" name="Noon"/> 168 <menu_item_call label="正午" name="Noon"/>
@@ -142,6 +173,10 @@
142 <menu_item_call label="環境編集" name="Environment Editor"/> 173 <menu_item_call label="環境編集" name="Environment Editor"/>
143 </menu> 174 </menu>
144 </menu> 175 </menu>
176
177
178 <!-- ツール -->
179
145 <menu label="ツール" name="Tools"> 180 <menu label="ツール" name="Tools">
146 <menu label="ツールを選ぶ" name="Select Tool"> 181 <menu label="ツールを選ぶ" name="Select Tool">
147 <menu_item_call label="フォーカス" name="Focus"/> 182 <menu_item_call label="フォーカス" name="Focus"/>
@@ -151,28 +186,43 @@
151 <menu_item_call label="土地" name="Land"/> 186 <menu_item_call label="土地" name="Land"/>
152 </menu> 187 </menu>
153 <menu_item_separator label="-----------" name="separator"/> 188 <menu_item_separator label="-----------" name="separator"/>
154 <menu_item_check label="自分のオブジェクトのみ選択" name="Select Only My Objects"/> 189 <menu_item_call label="選択対象に視点移動" name="Focus on Selection"/>
155 <menu_item_check label="移動可能なオブジェクトのみ選択" name="Select Only Movable Objects"/> 190 <menu_item_call label="選択範囲にズームイン" name="Zoom to Selection"/>
156 <menu_item_check label="環境で選択" name="Select By Surrounding"/> 191 <menu label="選択オプション" name="Selection Options">
157 <menu_item_check label="隠れた位置の選択も表示" name="Show Hidden Selection"/> 192 <menu_item_check label="自分のオブジェクトのみ選択" name="Select Only My Objects"/>
158 <menu_item_check label="選択したものの光源範囲を表示" name="Show Light Radius for Selection"/> 193 <menu_item_check label="移動可能なオブジェクトのみ選択" name="Select Only Movable Objects"/>
159 <menu_item_check label="選択ビームを表示" name="Show Selection Beam"/> 194 <menu_item_check label="コピー可能なオブジェクトのみ選択" name="Select Only Copyable Objects"/>
195 <menu_item_check label="環境で選択" name="Select By Surrounding"/>
196 <menu_item_separator label="-----------" name="separator"/>
197 <menu_item_check label="隠れた位置の選択も表示" name="Show Hidden Selection"/>
198 <menu_item_check label="選択したものの光源範囲を表示" name="Show Light Radius for Selection"/>
199 <menu_item_check label="選択したものの輪郭を表示" name="Show Selection Outlines"/>
200 <menu_item_check label="選択ビームを表示" name="Show Selection Beam"/>
201 </menu>
160 <menu_item_separator label="-----------" name="separator2"/> 202 <menu_item_separator label="-----------" name="separator2"/>
161 <menu_item_check label="グリッドにスナップ" name="Snap to Grid"/> 203 <menu_item_check label="グリッドにスナップ" name="Snap to Grid"/>
162 <menu_item_call label="オブジェクトのXY移動をグリッドに合わせる" name="Snap Object XY to Grid"/> 204 <menu_item_call label="オブジェクトのXY移動をグリッドに合わせる" name="Snap Object XY to Grid"/>
163 <menu_item_call label="グリッドをオブジェクトの位置基準で再設定" name="Use Selection for Grid"/> 205 <menu_item_call label="グリッドをオブジェクトの位置基準で再設定" name="Use Selection for Grid"/>
164 <menu_item_call label="グリッドのオプション..." name="Grid Options..."/> 206 <menu_item_call label="グリッドのオプション..." name="Grid Options..."/>
207 <menu_item_call label="高度な制作オプション" name="Advanced Build Options..."/>
165 <menu_item_separator label="-----------" name="separator3"/> 208 <menu_item_separator label="-----------" name="separator3"/>
166 <menu_item_check label="リンクされた一部を編集" name="Edit Linked Parts"/> 209 <menu_item_check label="リンクされた一部を編集" name="Edit Linked Parts"/>
210 <menu label="リンクした部分を選択する" name="Select Linked Parts">
211 <menu_item_call label="次の部分を選択する" name="Select Next Part"/>
212 <menu_item_call label="前回の部分を選択する" name="Select Previous Part"/>
213 <menu_item_call label="次の部分を含める" name="Include Next Part"/>
214 <menu_item_call label="前回の部分を含める" name="Include Previous Part"/>
215 </menu>
167 <menu_item_call label="リンク" name="Link"/> 216 <menu_item_call label="リンク" name="Link"/>
168 <menu_item_call label="リンク解除" name="Unlink"/> 217 <menu_item_call label="リンク解除" name="Unlink"/>
169 <menu_item_separator label="-----------" name="separator4"/> 218 <menu_item_separator label="-----------" name="separator4"/>
170 <menu_item_call label="選択対象に視点移動" name="Focus on Selection"/> 219 <menu_item_call label="複製" name="Duplicate"/>
171 <menu_item_call label="選択範囲にズームイン" name="Zoom to Selection"/>
172 <menu_item_call label="オブジェクトを購入" name="Menu Object Take"> 220 <menu_item_call label="オブジェクトを購入" name="Menu Object Take">
173 <on_enable userdata="購入,取る" name="EnableBuyOrTake"/> 221 <on_enable userdata="購入,取る" name="EnableBuyOrTake"/>
174 </menu_item_call> 222 </menu_item_call>
175 <menu_item_call label="コピーを取る" name="Take Copy"/> 223 <menu_item_call label="コピーを取る" name="Take Copy"/>
224 <menu_item_separator label="-----------" name="separator5"/>
225 <menu_item_call label="オブジェクトを返却" name="Return..."/>
176 <menu_item_call label="オブジェクトをオブジェクト・コンテンツに戻して保存" name="Save Object Back to Object Contents"/> 226 <menu_item_call label="オブジェクトをオブジェクト・コンテンツに戻して保存" name="Save Object Back to Object Contents"/>
177 <menu_item_separator label="-----------" name="separator6"/> 227 <menu_item_separator label="-----------" name="separator6"/>
178 <menu_item_call label="スクリプト警告/エラー・ウィンドウを表示" name="Show Script Warning/Error Window"/> 228 <menu_item_call label="スクリプト警告/エラー・ウィンドウを表示" name="Show Script Warning/Error Window"/>
@@ -183,37 +233,274 @@
183 <menu_item_call label="選択したオブジェクトの中のスクリプトをリセット" name="Reset Scripts in Selection"/> 233 <menu_item_call label="選択したオブジェクトの中のスクリプトをリセット" name="Reset Scripts in Selection"/>
184 <menu_item_call label="選択したオブジェクトの中のスクリプトを起動する" name="Set Scripts to Running in Selection"/> 234 <menu_item_call label="選択したオブジェクトの中のスクリプトを起動する" name="Set Scripts to Running in Selection"/>
185 <menu_item_call label="選択したオブジェクトの中のスクリプトを停止する" name="Set Scripts to Not Running in Selection"/> 235 <menu_item_call label="選択したオブジェクトの中のスクリプトを停止する" name="Set Scripts to Not Running in Selection"/>
236 <menu_item_separator label="-----------" name="separator7"/>
237 <menu_item_call label="一括権限設定" name="Set permissions on selected task inventory"/>
186 </menu> 238 </menu>
239
240
241 <!-- ヘルプ -->
242
187 <menu label="ヘルプ" name="Help"> 243 <menu label="ヘルプ" name="Help">
188 <menu_item_call label="Second Life ヘルプ" name="Second Life Help"/> 244 <menu_item_call label="ヘルプ" name="Grid Help"/>
189 <menu_item_call label="チュートリアル" name="Tutorial"/> 245 <menu_item_call label="チュートリアル" name="Tutorial"/>
190 <menu_item_separator label="-----------" name="separator"/> 246 <menu_item_separator label="-----------" name="separator"/>
191 <menu_item_call label="Linden公式ブログ..." name="Official Linden Blog..."/> 247 <menu_item_call label="Imprudenceブログ" name="Imprudence Blog"/>
248 <menu_item_call label="Imprudenceフォーラム" name="Imprudence Forums"/>
192 <menu_item_separator label="-----------" name="separator2"/> 249 <menu_item_separator label="-----------" name="separator2"/>
193 <menu_item_call label="スクリプト・ポータル..." name="Scripting Portal..."> 250 <menu_item_call label="スクリプト・ポータル" name="Scripting Portal">
194 <on_click name="ScriptingPortal_url" userdata="WebLaunchLSLWiki,http://wiki.secondlife.com/wiki/LSL_Portal/ja" /> 251 <on_click name="ScriptingPortal_url" userdata="WebLaunchLSLWiki,http://wiki.secondlife.com/wiki/LSL_Portal/ja" />
195 </menu_item_call> 252 </menu_item_call>
196 <menu_item_separator label="-----------" name="separator3"/> 253 <menu_item_separator label="-----------" name="separator3"/>
197 <menu_item_call label="嫌がらせの報告..." name="Report Abuse..."/> 254 <menu_item_call label="嫌がらせの報告..." name="Report Abuse..."/>
198 <menu_item_call label="衝突の記録..." name="Bumps, Pushes &amp;amp; Hits..."/> 255 <menu_item_call label="衝突の記録" name="Bumps, Pushes &amp;amp; Hits"/>
199 <menu_item_call label="ラグ メーター" name="Lag Meter"/> 256 <menu_item_call label="ラグ メーター" name="Lag Meter"/>
200 <menu_item_separator label="-----------" name="separator7"/> 257 <menu_item_separator label="-----------" name="separator4"/>
201 <menu label="バグの報告" name="Bug Reporting"> 258 <menu_item_call label="Imprudenceについて" name="About Imprudence"/>
202 <menu_item_call label="パブリック問題トラッカー..." name="Public Issue Tracker..."/> 259 </menu>
203 <menu_item_call label="パブリック問題トラッカー ヘルプ..." name="Publc Issue Tracker Help..."> 260
204 <on_click name="PublicIssueTrackerHelp_url" userdata="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker/ja" /> 261
205 </menu_item_call> 262 <!-- アドバンス-->
206 <menu_item_separator label="-----------" name="separator7"/> 263
207 <menu_item_call label="バグの報告 101..." name="Bug Reporing 101..."> 264 <menu label="アドバンス" name="Advanced" drop_shadow="true">
208 <on_click name="BugReporting101_url" userdata="WebLaunchBugReport101,http://wiki.secondlife.com/wiki/Bug_Reporting_101"/> 265 <menu label="コンソール" name="Consoles">
209 </menu_item_call> 266 <menu_item_check label="フレームのコンソール" name="Frame Console"/>
210 <menu_item_call label="セキュリティ問題..." name="Security Issues..."> 267 <menu_item_check label="テクスチャのコンソール" name="Texture Console"/>
211 <on_click name="SecurityIssues_url" userdata="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues/ja"/> 268 <menu_item_check label="デバッグコンソール" name="Debug Console"/>
212 </menu_item_call> 269 <menu_item_check label="ファーストタイマー" name="Fast Timers"/>
213 <menu_item_call label="品質保証関連Wiki..." name="QA Wiki..."/> 270 <menu_item_separator label="-----------" name="separator"/> <menu_item_call label="通知コンソール" name="Notifications Console"/>
214 <menu_item_separator label="-----------" name="separator9"/> 271 <menu_item_separator label="-----------" name="separator2"/> <menu_item_call label="リージョン情報をデバッグコンソールへ" name="Region Info to Debug Console"/>
215 <menu_item_call label="バグの報告..." name="Report Bug..."/> 272 <menu_item_call label="グループ情報をデバッグコンソールへ" name="Group Info to Debug Console"/>
216 </menu> 273 <menu_item_call label="性能情報をデバッグコンソールへ" name="Capabilities Info to Debug Console"/>
217 <menu_item_call label="Second Lifeについて" name="About Second Life..."/> 274 </menu>
275 <menu label="HUD情報" name="HUD Info">
276 <menu_item_check label="速度" name="Velocity"/>
277 <menu_item_check label="カメラ" name="Camera"/>
278 <menu_item_check label="風" name="Wind"/>
279 <menu_item_check label="FOV (視野角)" name="FOV"/>
280 </menu>
281 <menu_item_separator label="-----------" name="separator"/>
282 <menu_item_call label="ここにすわる" name="Ground Sit"/>
283 <menu_item_call label="地上にテレポート" name="Teleport to Ground"/>
284 <menu_item_check label="アバターをファントムにする" name="Phantom"/>
285 <menu_item_check label="アニメーション・リスト" name="Animation List"/>
286 <menu_item_check label="このエリアのオブジェクトを検索" name="Area Object Search"/>
287 <menu_item_check label="テクスチャ・ブラウザ" name="asset browser"/>
288 <menu_item_separator label="-----------" name="separator2"/>
289 <menu label="レンダリング" name="Rendering">
290 <menu label="種類" name="Types">
291 <menu_item_check label="シンプル" name="Simple"/>
292 <menu_item_check label="アルファ" name="Alpha"/>
293 <menu_item_check label="木" name="Tree"/>
294 <menu_item_check label="アバター" name="Character"/>
295 <menu_item_check label="地表" name="SurfacePatch"/>
296 <menu_item_check label="空" name="Sky"/>
297 <menu_item_check label="水" name="Water"/>
298 <menu_item_check label="地面" name="Ground"/>
299 <menu_item_check label="ボリューム" name="Volume"/>
300 <menu_item_check label="草" name="Grass"/>
301 <menu_item_check label="雲" name="Clouds"/>
302 <menu_item_check label="パーティクル" name="Particles"/>
303 <menu_item_check label="衝突" name="Bump"/>
304 </menu>
305 <menu label="機能" name="Features">
306 <menu_item_check label="UI" name="UI"/>
307 <menu_item_check label="選択済" name="Selected"/>
308 <menu_item_check label="ハイライト" name="Highlighted"/>
309 <menu_item_check label="ダイナミックテクスチャ" name="Dynamic Textures"/>
310 <menu_item_check label="足の影" name="Foot Shadows"/>
311 <menu_item_check label="くもり" name="Fog"/>
312 <menu_item_check label="FRInfo のテスト" name="Test FRInfo"/>
313 <menu_item_check label="フレキシブルオブジェクト" name="Flexible Objects"/>
314 </menu>
315 <menu label="情報を表示" name="Info Displays">
316 <menu_item_check label="検証" name="Verify"/>
317 <menu_item_check label="バウンディングボックス" name="BBoxes"/>
318 <menu_item_check label="先端" name="Points"/>
319 <menu_item_check label="オクトリー" name="Octree"/>
320 <menu_item_check label="オクルージョン" name="Occlusion"/>
321 <menu_item_check label="バッチの描画" name="Render Batches"/>
322 <menu_item_check label="アニメーション・テクスチャ" name="Animated Textures"/>
323 <menu_item_check label="テクスチャ優先度" name="Texture Priority"/>
324 <menu_item_check label="アバターのレンダリングコストを表示する" name="Avatar Rendering Cost"/>
325 <menu_item_check label="テクスチャの範囲" name="Texture Area (sqrt(A))"/>
326 <menu_item_check label="側面" name="Face Area (sqrt(A))"/>
327 <menu_item_check label="光" name="Lights"/>
328 <menu_item_check label="パーティクル" name="Particles"/>
329 </menu>
330 <menu label="レンダーテスト" name="Render Tests">
331 <menu_item_check label="カメラオフセット" name="Camera Offset"/>
332 <menu_item_check label="フレームレートをランダム化" name="Randomize Framerate"/>
333 <menu_item_check label="定期的に遅いフレームを挿入する" name="Periodic Slow Frame"/>
334 <menu_item_check label="フレームテスト" name="Frame Test"/>
335 </menu>
336 <menu_item_separator label="-----------" name="separator"/>
337 <menu_item_check label="軸" name="Axes"/>
338 <menu_item_separator label="-----------" name="separator2"/>
339 <menu_item_check label="選択したものを非表示にする" name="Hide Selected"/>
340 <menu_item_separator label="-----------" name="separator3"/>
341 <menu_item_check label="接線基底" name="Tangent Basis"/>
342 <menu_item_call label="選択したテクスチャ情報" name="Selected Texture Info"/>
343 <menu_item_check label="ワイヤーフレーム" name="Wireframe"/>
344 <menu_item_check label="オブジェクト間オクルージョン" name="Object-Object Occlusion"/>
345 <menu_item_check label="GL デバッグ" name="Debug GL"/>
346 <menu_item_check label="経路をデバッグ" name="Debug Pipeline"/>
347 <menu_item_check label="ファーストアルファ" name="Fast Alpha"/>
348 <menu_item_check label="木のアニメーション" name="Animate Trees"/>
349 <menu_item_check label="テクスチャのアニメーション" name="Animate Textures"/>
350 <menu_item_check label="テクスチャを無効にする" name="Disable Textures"/>
351 <menu_item_check label="マルチスレッド処理" name="Run Multiple Threads"/>
352 <menu_item_check label="チージービーコン" name="Cheesy Beacon"/>
353 <menu_item_check label="装着された光源を描画する" name="Attached Lights"/>
354 <menu_item_check label="装着されたパーティクルを描画する" name="Attached Particles"/>
355 </menu>
356 <menu label="世界" name="World">
357 <menu_item_check label="シムの太陽の設定を無視する" name="Sim Sun Override"/>
358 <menu_item_call label="スクリプト付きカメラをダンプ" name="Dump Scripted Camera"/>
359 <menu_item_check label="固定された天気" name="Fixed Weather"/>
360 <menu_item_call label="リージョンオブジェクトのキャッシュをダンプする" name="Dump Region Object Cache"/>
361 </menu>
362 <menu label="RLVa" name="RLVa">
363 <menu label="デバッグ" name="Debug">
364 <menu_item_check label="デバッグ・メッセージを表示" name="Show Debug Messages"/>
365 <menu_item_separator label="-----------" name="separator"/>
366 <menu_item_check label="古い名称を有効にする" name="Enable Legacy Naming"/>
367 </menu>
368 <menu_item_separator label="-----------" name="separator"/>
369 <menu_item_check label="装着を有効にする" name="Enable Wear"/>
370 <menu_item_separator label="-----------" name="separator2"/>
371 <menu_item_check label="ロックされたレイヤーを非表示" name="Hide locked layers"/>
372 <menu_item_check label="ロックされたアタッチメントを非表示" name="Hide locked attachments"/>
373 <menu_item_separator label="-----------" name="separator3"/>
374 <menu_item_check label="#RLVフォルダの共有を禁止" name="Forbid Give to #RLV"/>
375 <menu_item_check label="タグを表示" name="Show Name Tags"/>
376 <menu_item_separator label="-----------" name="separator4"/>
377 <menu_item_call label="制限..." name="Restrictions..."/>
378 </menu>
379 <menu label="UI" name="UI">
380 <menu_item_check label="デフォルトのカラー・ピッカーを使用する" name="Use default system color picker"/>
381 <menu_item_check label="メニュー・バーに検索ボックスを表示" name="Show search panel in overlay bar"/>
382 <menu_item_separator label="-----------" name="separator"/>
383 <menu_item_call label="Web ブラウザのテスト" name="Web Browser Test"/>
384 <menu_item_call label="UIを編集可能にする" name="Editable UI"/>
385 <menu_item_call label="SelectMgrをダンプ" name="Dump SelectMgr"/>
386 <menu_item_call label="持ち物の出力" name="Dump Inventory"/>
387 <menu_item_call label="フォーカスホールダーをダンプ" name="Dump Focus Holder"/>
388 <menu_item_call label="選択したオブジェクト情報をプリント" name="Print Selected Object Info"/>
389 <menu_item_call label="エージェント情報をプリント" name="Print Agent Info"/>
390 <menu_item_call label="メモリ使用状況" name="Memory Stats"/>
391 <menu_item_call label="グループ情報のキャッシュをクリア" name="Clear Cached Group Info"/>
392 <menu_item_separator label="-----------" name="separator2"/>
393 <menu_item_check label="SelectMgr のデバッグ" name="Debug SelectMgr"/>
394 <menu_item_check label="ダブルクリック" name="Debug Clicks"/>
395 <menu_item_check label="表示のデバッグ" name="Debug Views"/>
396 <menu_item_check label="名称ツールチップのデバッグ" name="Show Name Tooltips"/>
397 <menu_item_check label="マウス操作によるイベントのデバッグ" name="Debug Mouse Events"/>
398 <menu_item_check label="キーのデバッグ" name="Debug Keys"/>
399 <menu_item_check label="WindowProcのデバッグ" name="Debug WindowProc"/>
400 <menu_item_check label="テキスト・エディタのヒントをデバッグ" name="Debug Text Editor Tips"/>
401 <menu_item_separator label="-----------" name="separator3"/>
402 <menu_item_check label="時間を表示する" name="Show Time"/>
403 <menu_item_check label="描画情報を表示する" name="Show Render Info"/>
404 <menu_item_check label="マトリックスを表示する" name="Show Matrices"/>
405 <menu_item_check label="カーソルを乗せた場所の色を表示する" name="Show Color Under Cursor"/>
406 </menu>
407 <menu label="XUI" name="XUI">
408 <menu_item_call label="ウィンドウのテスト" name="Floater Test"/>
409 <menu_item_call label="フォントのテスト" name="Font Test"/>
410 <menu_item_call label="メニューをXMLで書き出し..." name="Export Menus to XML..."/>
411 <menu_item_call label="UIの編集..." name="Edit UI..."/>
412 <menu_item_call label="XMLから読み込む" name="Load from XML..."/>
413 <menu_item_call label="XMLで保存する" name="Save to XML..."/>
414 <menu_item_check label="XUIネームを表示する" name="Show XUI Names"/>
415 <menu_item_call label="テスト用 IM を送信する" name="Send Test IMs"/>
416 </menu>
417 <menu label="アバター" name="Character">
418 <menu label="ベークドテクスチャを取得する" name="Grab Baked Texture">
419 <menu_item_call label="瞳" name="Iris"/>
420 <menu_item_call label="頭" name="Head"/>
421 <menu_item_call label="上半身" name="Upper Body"/>
422 <menu_item_call label="下半身" name="Lower Body"/>
423 <menu_item_call label="スカート" name="Skirt"/>
424 </menu>
425 <menu label="キャラクターテスト" name="Character Tests">
426 <menu_item_call label="容姿を XML に保存する" name="Appearance To XML"/>
427 <menu_item_call label="キャラクタジオメトリの切り替え" name="Toggle Character Geometry"/>
428 <menu_item_call label="男性アバターのテスト" name="Test Male"/>
429 <menu_item_call label="女性アバターのテスト" name="Test Female"/>
430 <menu_item_call label="PGを有効にする" name="Toggle PG"/>
431 <menu_item_check label="アバターの選択を許可" name="Allow Select Avatar"/>
432 </menu>
433 <menu_item_check label="ボイスに合わせて唇を動かす" name="Enable Lip Sync (Beta)"/>
434 <menu_item_check label="矢印キーのTap-Tap-Holdで走る" name="Tap-Tap-Hold To Run"/>
435 <menu_item_call label="パラメータを強制的にデフォルトにする" name="Force Params to Default"/>
436 <menu_item_call label="頂点シェーダの再読込" name="Reload Vertex Shader"/>
437 <menu_item_check label="アニメーション情報" name="Animation Info"/>
438 <menu_item_check label="スローモーションのアニメーション" name="Slow Motion Animations"/>
439 <menu_item_check label="見ているものを表示する" name="Show Look At"/>
440 <menu_item_check label="クリックした場所を表示する" name="Show Point At"/>
441 <menu_item_check label="見ているものを自分にだけ表示" name="Private Look At"/>
442 <menu_item_check label="クリックした場所を自分にだけ表示" name="Private Point At"/>
443 <menu_item_check label="結合部のアップデートのデバッグ" name="Debug Joint Updates"/>
444 <menu_item_check label="LOD を無効にする" name="Disable LOD"/>
445 <menu_item_check label="キャラクターVis のデバッグ" name="Debug Character Vis"/>
446 <menu_item_check label="骨組みの衝突判定を表示する" name="Show Collision Skeleton"/>
447 <menu_item_check label="エージェントのターゲットを表示する" name="Display Agent Target"/>
448 <menu_item_check label="回転をデバッグ" name="Debug Rotation"/>
449 <menu_item_call label="アタッチメントをダンプ" name="Dump Attachments"/>
450 </menu>
451 <menu label="クラッシュ" name="Crash">
452 <menu_item_call label="バッドメモリアクセスを実行する" name="Force Bad Memory Access"/>
453 <menu_item_call label="LLErrorとクラッシュを実行する" name="Force LLError And Crash"/>
454 <menu_item_call label="無限ループ" name="Force Infinite Loop"/>
455 <menu_item_call label="ドライバのクラッシュを実行する" name="Force Driver Crash"/>
456 <menu_item_call label="ビューワの接続遮断を実行する" name="Force Disconnect Viewer"/>
457 <menu_item_separator label="-----------" name="separator"/>
458 <menu_item_check label="デバッグ用のミニダンプを出力する" name="Output Debug Minidump"/>
459 </menu>
460 <menu label="ネットワーク" name="Network">
461 <menu_item_call label="メッセージログを有効にする" name="Enable Message Log"/>
462 <menu_item_call label="メッセージログを使用不可にする" name="Disable Message Log"/>
463 <menu_item_separator label="-----------" name="separator"/>
464 <menu_item_check label="速力が挿入されたオブジェクト" name="Velocity Interpolate Objects"/>
465 <menu_item_check label="挿入されたオブジェクトの位置の Ping" name="Ping Interpolate Object Positions"/>
466 <menu_item_separator label="-----------" name="separator2"/>
467 <menu_item_call label="パケットドロップ" name="Drop a Packet"/>
468 </menu>
469 <menu label="レコーダー" name="Recorder">
470 <menu_item_call label="全セッションのログを記録" name="Full Session Logging"/>
471 <menu_item_call label="ログの記録開始" name="Start Logging"/>
472 <menu_item_call label="ログの記録停止" name="Stop Logging"/>
473 <menu_item_call label="10秒間ログを記録" name="Log 10 Seconds"/>
474 <menu_item_call label="30秒間ログを記録" name="Log 30 Seconds"/>
475 <menu_item_call label="60秒間ログを記録" name="Log 60 Seconds"/>
476 <menu_item_separator label="-----------" name="separator"/>
477 <menu_item_call label="再生開始" name="Start Playback"/>
478 <menu_item_call label="再生停止" name="Stop Playback"/>
479 <menu_item_check label="再生をループ" name="Loop Playback"/>
480 <menu_item_call label="記録開始" name="Start Record"/>
481 <menu_item_call label="記録停止" name="Stop Record"/>
482 </menu>
483 <menu label="管理者オプション" name="Admin Options">
484 <menu_item_check label="管理者メニューを表示する" name="View Admin Options"/>
485 <menu_item_call label="管理者ステータスの呼び出し" name="Request Admin Status"/>
486 <menu_item_call label="管理者ステータス解除" name="Leave Admin Status"/>
487 </menu>
488 <menu_item_separator label="-----------" name="separator3"/>
489 <menu_item_check label="オブジェクトのアップデートを表示する" name="Show Updates"/>
490 <menu_item_separator label="-----------" name="separator4"/>
491 <menu_item_check label="シャッター音とアニメーションなしでスナップショットをディスクに保存する" name="Quiet Snapshots to Disk"/>
492 <menu_item_call label="画像を圧縮" name="Compress Image..."/>
493 <menu_item_check label="ビルドの最大制限を解除" name="Disable Max Build Constraints"/>
494 <menu_item_check label="権限の詳細を表示する" name="Debug Permissions"/>
495 <menu_item_check label="マウスの動きをスムーズに" name="Mouse Smoothing"/>
496 <menu_item_check label="マウスルック時に十字カーソルを表示" name="Show Mouselook Crosshairs"/>
497 <menu_item_separator label="-----------" name="separator5"/>
498 <menu_item_check label="次回の起動時にコンソールウィンドウを表示する" name="Console Window"/>
499 <menu_item_check label="Restrained Loveの使用" name="Restrained Love Support"/>
500 <menu_item_check label="複数のImprudenceの同時起動を許可" name="Allow Multiple Instances"/>
501 <menu_item_call label="ログアウト" name="Logout"/>
502 <menu_item_call label="デバッグ設定を表示する" name="Debug Settings"/>
218 </menu> 503 </menu>
504
505
219</menu_bar> 506</menu_bar>
diff --git a/linden/indra/newview/skins/default/xui/ja/notifications.xml b/linden/indra/newview/skins/default/xui/ja/notifications.xml
index 77c6068..6da6ccc 100644
--- a/linden/indra/newview/skins/default/xui/ja/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/ja/notifications.xml
@@ -3271,6 +3271,30 @@ Macの場合は、Cmd-Opt-Shift-Dを押してください。
3271 <notification name="UnableToOpenCommandURL"> 3271 <notification name="UnableToOpenCommandURL">
3272 クリックしたURLはこのウェブブラウザでは開けません 3272 クリックしたURLはこのウェブブラウザでは開けません
3273 </notification> 3273 </notification>
3274
3275
3276<!-- ここから Imprudence 固有の通知 -->
3277
3278
3279 <notification name="ConfirmAutoPilot">
3280 本当にここまで歩きますか?
3281 <usetemplate ignoretext="オートパイロットする時" name="okcancelignore" notext="キャンセル" yestext="歩く"/>
3282 </notification>
3283
3284 <notification name="ConfirmDoubleClickTP">
3285 本当にここにテレポートしますか?
3286 <usetemplate ignoretext="ダブルクリックテレポート時" name="okcancelignore" notext="キャンセル" yestext="テレポート"/>
3287 </notification>
3288
3289 <notification name="ConfirmTeleportHome">
3290 本当にホームにテレポートしますか?
3291 <usetemplate ignoretext="ホームにテレポートする時" name="okcancelignore" notext="キャンセル" yestext="テレポート"/>
3292 </notification>
3293
3294
3295<!-- ここまで Imprudence 固有の通知 -->
3296
3297
3274 <global name="UnsupportedCPU"> 3298 <global name="UnsupportedCPU">
3275 - あなたの CPU の速度は必須動作環境の条件を満たしていません。 3299 - あなたの CPU の速度は必須動作環境の条件を満たしていません。
3276 </global> 3300 </global>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_avatar.xml b/linden/indra/newview/skins/default/xui/ja/panel_avatar.xml
index a3745a2..147a5f6 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_avatar.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_avatar.xml
@@ -60,6 +60,7 @@
60 <text name="Photo:"> 60 <text name="Photo:">
61 写真: 61 写真:
62 </text> 62 </text>
63 <button label="UUIDコピー" name="btn_copy_uuid"/>
63 <texture_picker label="" name="img" tool_tip="写真をクリックして選択"/> 64 <texture_picker label="" name="img" tool_tip="写真をクリックして選択"/>
64 <text name="Groups:"> 65 <text name="Groups:">
65 グループ: 66 グループ:
@@ -77,8 +78,11 @@
77 </text> 78 </text>
78 <view_border name="drop_target_rect" /> 79 <view_border name="drop_target_rect" />
79 <view_border name="drop_target_rect_vis" /> 80 <view_border name="drop_target_rect_vis" />
80 <text name="Give inventory" tool_tip="ここに物品目をドロップしてこの人に贈ります"> 81 <text name="drop target" tool_tip="ここに持ち物アイテムをドロップしてこの人に贈ります">
81 持ち物アイテムをここにドロップします 82 持ち物アイテムを
83 </text>
84 <text name="Give inventory 2" tool_tip="ここに持ち物アイテムをドロップしてこの人に贈ります">
85 ここにドロップします
82 </text> 86 </text>
83 <check_box label="検索に表示" name="allow_publish" tool_tip="検索で、詳細やイメージなどさらなるプロフィール情報を公開する。"/> 87 <check_box label="検索に表示" name="allow_publish" tool_tip="検索で、詳細やイメージなどさらなるプロフィール情報を公開する。"/>
84 <button label="?" label_selected="?" name="?"/> 88 <button label="?" label_selected="?" name="?"/>
@@ -87,6 +91,7 @@
87 <button label="フレンドに追加" label_selected="フレンドに追加" name="Add Friend..." /> 91 <button label="フレンドに追加" label_selected="フレンドに追加" name="Add Friend..." />
88 <button label="支払う" label_selected="支払う" name="Pay..."/> 92 <button label="支払う" label_selected="支払う" name="Pay..."/>
89 <button label="IMを送る" label_selected="IMを送る" name="Instant Message..." tool_tip="インスタント・メッセージ (IM)" /> 93 <button label="IMを送る" label_selected="IMを送る" name="Instant Message..." tool_tip="インスタント・メッセージ (IM)" />
94 <button label="グループに招待..." label_selected="グループに招待" name="Invite to Group..." />
90 <button label="無視する" label_selected="無視する" name="Mute" /> 95 <button label="無視する" label_selected="無視する" name="Mute" />
91 </panel> 96 </panel>
92 <panel label="ウェブ" name="WebProfile"> 97 <panel label="ウェブ" name="WebProfile">
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_groups.xml b/linden/indra/newview/skins/default/xui/ja/panel_groups.xml
index adfdcd4..f326a13 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_groups.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_groups.xml
@@ -13,6 +13,8 @@
13 <button label="抜ける" name="Leave" /> 13 <button label="抜ける" name="Leave" />
14 <button label="作成..." name="Create" /> 14 <button label="作成..." name="Create" />
15 <button label="検索..." name="Search..." /> 15 <button label="検索..." name="Search..." />
16 <button label="招待..." name="Invite..." />
17 <button label="タイトル..." name="Titles..." />
16 <string name="none"> 18 <string name="none">
17 グループなし 19 グループなし
18 </string> 20 </string>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_mini_map.xml b/linden/indra/newview/skins/default/xui/ja/panel_mini_map.xml
index fdc4465..2f07116 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_mini_map.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_mini_map.xml
@@ -24,4 +24,15 @@
24 <text name="nw_label" width="40"> 24 <text name="nw_label" width="40">
25 北西 25 北西
26 </text> 26 </text>
27
28 <string name="tooltip_tp">
29 ダブルクリックでテレポートします
30 </string>
31 <string name="tooltip_pan">
32 Shift+ドラッグでパンします
33 </string>
34 <string name="tooltip_map">
35 ダブルクリックで地図を開きます
36 </string>
37
27</panel> 38</panel>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
index ef13a75..4b5a2bb 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
@@ -1,4 +1,33 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?> 1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<panel name="advanced_panel"> 2<panel label="高度な設定" name="advanced_panel">
3 <check_box label="ログイン/ログアウト画面を非表示" name="disable_log_screen_check"/>
4 <check_box label="テレポート画面を非表示" name="disable_tp_screen_check"/>
5 <check_box label="名前タグに使用ビューワの名称を表示" name="client_name_tag_check"/>
6 <check_box label="ビューワを色で識別" name="client_name_color_check"/>
7 <check_box label="ビューワの名称にヒントを表示" name="client_name_hover_check"/>
8 <check_box label="自分のビューワ名称をタグに表示" name="client_name_tag_broadcast_check"/>
9 <check_box label="影を有効にする(警告:動作が不安定になり、高いグラフィック性能が必要です。)" name="shadows_check"/>
10 <text bottom_delta="-25" left="16" height="15" width="300"
11 follows="top|left">
12 LightShare機能の使用(OpenSimのみ):
13 </text>
14 <combo_box name="lightshare_combo">
15 <combo_item name="never">
16 使用しない
17 </combo_item>
18 <combo_item name="ask">
19 毎回確認
20 </combo_item>
21 <combo_item name="always">
22 常に使用
23 </combo_item>
24 </combo_box>
25 <check_box label="HTTPテクスチャを使用(試験中の機能)" name="http_texture_check"/>
26 <check_box label="遠距離の描画をスキップして早く読み込む" name="speed_rez_check"/>
27 <check_box label="容姿編集中のアニメーションを表示" name="appearance_anim_check"/>
28 <check_box label="伝統的なパイメニューを使用" name="legacy_pie_menu_checkbox"/>
3 <check_box label="言語をオブジェクトと共有" name="language_is_public" tool_tip="優先言語をインワールドのオブジェクトが認識する"/> 29 <check_box label="言語をオブジェクトと共有" name="language_is_public" tool_tip="優先言語をインワールドのオブジェクトが認識する"/>
30 <check_box label="チャットとIMで MU* ポーズ・スタイルを使用" name="allow_mupose"/>
31 <check_box label="OOCチャットの自動クローズ" name="auto_close_ooc"/>
32 <button label="全ての設定を初期値に戻す" name="reset_btn"/>
4</panel> 33</panel>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_audio.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_audio.xml
index 9a8d175..c617ba1 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_preferences_audio.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_audio.xml
@@ -20,6 +20,7 @@
20 </text> 20 </text>
21 <check_box label="音楽がある場合再生する(通信が重くなる)" 21 <check_box label="音楽がある場合再生する(通信が重くなる)"
22 name="streaming_music" /> 22 name="streaming_music" />
23 <check_box label="音楽のタイトルをチャットに表示" name="show_stream_title"/>
23 <check_box 24 <check_box
24 label="ストリーミング・メディア使用可時に再生(帯域幅の消費増)" 25 label="ストリーミング・メディア使用可時に再生(帯域幅の消費増)"
25 name="streaming_video" /> 26 name="streaming_video" />
@@ -35,11 +36,15 @@
35 <text type="string" length="1" name="ui_volume_text"> 36 <text type="string" length="1" name="ui_volume_text">
36 UI音量: 37 UI音量:
37 </text> 38 </text>
39 <text name="ambient_prefs_text">
40 環境音:
41 </text>
42 <check_box label="風の発生を有効にする" name="mute_wind_check"/>
38 <slider label="ドップラー効果" name="Doppler Effect" /> 43 <slider label="ドップラー効果" name="Doppler Effect" />
39 <slider label="遠隔要因" name="Distance Factor" /> 44 <slider label="遠隔要因" name="Distance Factor" />
40 <slider label="ロールオフ係数" name="Rolloff Factor" /> 45 <slider label="ロールオフ係数" name="Rolloff Factor" />
41 <spinner label="L$変更基準点" name="L$ Change Threshold" /> 46 <spinner label="L$変更基準点" name="L$ Change Threshold" />
42 <spinner label="ヘルス変化基準点" name="Health Change Threshold" /> 47 <spinner label="ヘルス変化基準点" name="Health change threshold" />
43 <text type="string" length="1" name="doppler_effect_text"> 48 <text type="string" length="1" name="doppler_effect_text">
44 オーディオ環境設定: 49 オーディオ環境設定:
45 </text> 50 </text>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_fonts.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_fonts.xml
new file mode 100644
index 0000000..3cf54b7
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_fonts.xml
@@ -0,0 +1,9 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2
3<panel label="フォント" name="font_panel">
4
5 <text>
6 ユーザー・インターフェースのフォントを変更できます。(再起動後に有効)
7 </text>
8
9</panel>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
index 83b21b8..ee99373 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
@@ -32,8 +32,16 @@
32 UI サイズ: 32 UI サイズ:
33 </text> 33 </text>
34 <check_box label="解像度独立スケールを使用" name="ui_auto_scale"/> 34 <check_box label="解像度独立スケールを使用" name="ui_auto_scale"/>
35 <check_box label="操作していない時は退席/AFK" name="afk_timeout_checkbox"/>
35 <spinner label="退席までの時間:" name="afk_timeout_spinner"/> 36 <spinner label="退席までの時間:" name="afk_timeout_spinner"/>
37 <!-- リンデン・ドル支払/受取の通知は「ポップアップ」タブへ移動
36 <check_box label="リンデン・ドル(L$)の支払い/受け取りを通知" name="notify_money_change_checkbox"/> 38 <check_box label="リンデン・ドル(L$)の支払い/受け取りを通知" name="notify_money_change_checkbox"/>
39 -->
40 <text name="Mini-Map Notify:">
41 ミニマップ通知:
42 </text>
43 <check_box label="チャット範囲に入った時" name="mini_map_notify_chat"/>
44 <check_box label="SIMに入った時" name="mini_map_notify_sim"/>
37 <text name="maturity_desired_label"> 45 <text name="maturity_desired_label">
38 レーティング区分: 46 レーティング区分:
39 </text> 47 </text>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
index 167bc2a..bca61d9 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_graphics1.xml
@@ -5,6 +5,7 @@
5 </text> 5 </text>
6 <button label="?" name="GraphicsPreferencesHelpButton" /> 6 <button label="?" name="GraphicsPreferencesHelpButton" />
7 <check_box label="ウィンドウ内で Second Life を起動" name="windowed mode" /> 7 <check_box label="ウィンドウ内で Second Life を起動" name="windowed mode" />
8 <check_box label="Windlightツールバーを表示" name="toggle_windlight_control"/>
8 <text_editor name="voice_chat_description"> 9 <text_editor name="voice_chat_description">
9 チェック無しの場合は、ログイン時にフルスクリーン表示 10 チェック無しの場合は、ログイン時にフルスクリーン表示
10 </text_editor> 11 </text_editor>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_im.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_im.xml
index a2c13bb..8d4a564 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_preferences_im.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_im.xml
@@ -11,9 +11,14 @@
11 ログインして変更してください 11 ログインして変更してください
12 </text> 12 </text>
13 <check_box label="IMを電子メール([EMAIL])へ送信" name="send_im_to_email"/> 13 <check_box label="IMを電子メール([EMAIL])へ送信" name="send_im_to_email"/>
14 <check_box label="チャットコンソールにIMを表示する" name="include_im_in_chat_console"/> 14 <text name="show_ims_label">
15 IMの表示:
16 </text>
17 <check_box label="チャットコンソールに表示" name="include_im_in_chat_console" left="208"/>
18 <check_box label="チャット履歴に表示" name="include_im_in_chat_history" left="358"/>
15 <check_box label="IMにタイムスタンプを表示" name="show_timestamps_check"/> 19 <check_box label="IMにタイムスタンプを表示" name="show_timestamps_check"/>
16 <check_box label="オンライン・フレンド通知を表示" name="friends_online_notify_checkbox"/> 20 <check_box label="オンライン・フレンド通知を表示" name="friends_online_notify_checkbox"/>
21 <check_box label="IMタブを縦並びに(再起動後に有効)" name="vertical-imtabs-toggle"/>
17 <text name="text_box4"> 22 <text name="text_box4">
18 記録オプション: 23 記録オプション:
19 </text> 24 </text>
@@ -29,4 +34,5 @@
29 取り込み中 34 取り込み中
30応答メッセージ: 35応答メッセージ:
31 </text> 36 </text>
37 <button label="IM応答オプション" name="busy_adv_btn"/>
32</panel> 38</panel>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_input.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_input.xml
index ded6f9d..ed20af2 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_preferences_input.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_input.xml
@@ -21,11 +21,42 @@
21 <text name="Camera Follow Distance:"> 21 <text name="Camera Follow Distance:">
22 カメラ追従距離: 22 カメラ追従距離:
23 </text> 23 </text>
24 <text name="Camera Transition Time:">
25 カメラ切替時間:
26 </text>
27 <text name="Camera Smoothing:">
28 カメラの滑らかさ:
29 </text>
30
24 <check_box label="編集カメラの自動移動" name="edit_camera_movement" tool_tip="編集モードの開始、終了時はカメラ自動位置調整を使用"/> 31 <check_box label="編集カメラの自動移動" name="edit_camera_movement" tool_tip="編集モードの開始、終了時はカメラ自動位置調整を使用"/>
25 <check_box label="容姿カメラの自動移動" name="appearance_camera_movement" tool_tip="編集モードでは、カメラ自動位置調整を使用"/> 32 <check_box label="容姿カメラの自動移動" name="appearance_camera_movement" tool_tip="編集モードでは、カメラ自動位置調整を使用"/>
33 <check_box label="カメラ移動の制限を解除" name="Disable camera constraints"/>
34 <check_box label="ズームの最短距離制限を解除" name="disable_min_zoom_check"/>
26 <text name="text2"> 35 <text name="text2">
27 アバター表示: 36 アバター表示:
28 </text> 37 </text>
29 <check_box label="アバターを一人称視点(マウスルック)で表示" name="first_person_avatar_visible"/> 38 <check_box label="アバターを一人称視点(マウスルック)で表示" name="first_person_avatar_visible"/>
30 <button label="ジョイスティック設定" name="joystick_setup_button"/> 39 <button label="ジョイスティック設定" name="joystick_setup_button"/>
40 <text name="double_click_action_label">
41 ダブルクリック時の動作:
42 </text>
43 <combo_box name="double_click_action">
44 <combo_item name="None">
45 なし
46 </combo_item>
47 <combo_item name="Go">
48 オートパイロット
49 </combo_item>
50 </combo_box>
51 <text name="go_action_label">
52 オートパイロットの種類:
53 </text>
54 <combo_box name="go_action">
55 <combo_item name="Move">
56 歩く
57 </combo_item>
58 <combo_item name="Teleport">
59 テレポート
60 </combo_item>
61 </combo_box>
31</panel> 62</panel>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_preferences_popups.xml b/linden/indra/newview/skins/default/xui/ja/panel_preferences_popups.xml
index 9c1ca6e..75b316c 100644
--- a/linden/indra/newview/skins/default/xui/ja/panel_preferences_popups.xml
+++ b/linden/indra/newview/skins/default/xui/ja/panel_preferences_popups.xml
@@ -18,4 +18,5 @@
18 <button width="235" label="ポップアップ全てを有効化..." label_selected="「次回表示」ダイアログリセット..." name="reset_dialogs_btn" tool_tip="全てのオプショナルポップアップと「初回使用」通知を有効にしてください。"/> 18 <button width="235" label="ポップアップ全てを有効化..." label_selected="「次回表示」ダイアログリセット..." name="reset_dialogs_btn" tool_tip="全てのオプショナルポップアップと「初回使用」通知を有効にしてください。"/>
19 <button width="235" label="これらのポップアップ全てを無効化..." name="skip_dialogs_btn" tool_tip="全てのオプショナルポップアップと「初回使用」通知を無効にしてください。"/> 19 <button width="235" label="これらのポップアップ全てを無効化..." name="skip_dialogs_btn" tool_tip="全てのオプショナルポップアップと「初回使用」通知を無効にしてください。"/>
20 <check_box label="新たに受け取ったオブジェクトを持ち物に自動的に表示" name="show_in_inventory"/> 20 <check_box label="新たに受け取ったオブジェクトを持ち物に自動的に表示" name="show_in_inventory"/>
21 <check_box label="[CURRENCY]を使用・受け取る時に通知" name="notify_money_change_checkbox"/>
21</panel> 22</panel>
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_radar.xml b/linden/indra/newview/skins/default/xui/ja/panel_radar.xml
new file mode 100644
index 0000000..ae86ae6
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/ja/panel_radar.xml
@@ -0,0 +1,59 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2
3<!-- Note: panel rect (size) is specified in floater_mini_map.xml -->
4
5<panel name="RadarPanel" label="レーダー">
6
7 <string name="no_one_near">
8 近くに誰もいません
9 </string>
10 <string name="is_muted">
11 (ミュート)
12 </string>
13 <string name="is_typing">
14 (タイプ中)
15 </string>
16 <string name="entering_chat_range">
17 [NAME] さんがチャットレンジに入ってきました。 ([DISTANCE]m)
18 </string>
19 <string name="entering_sim_range">
20 [NAME] さんがSIMに入ってきました。 ([DISTANCE]m)
21 </string>
22 <string name="avatars_in_singular">
23 [COUNT]人のアバター
24 </string>
25 <string name="avatars_in_plural">
26 [COUNT]人のアバター
27 </string>
28 <string name="unknown_avatar">
29 (不明)
30 </string>
31
32 <tab_container name="radar_tab_container">
33 <panel name="avatar_tab" label="アバター">
34 <button name="im_btn" label="IM/コール" tool_tip="IMウィンドウを開きます" />
35 <button name="profile_btn" label="プロフィール" tool_tip="写真、所属グループ、その他の情報"/>
36 <button name="offer_teleport_btn" label="TPを送る" tool_tip="この人にテレポートを送って自分のところに呼びます"/>
37 <button name="teleport_btn" label="居場所へTP" tool_tip="この人のいるところにテレポートします"/>
38 <button name="track_btn" label="追跡する" tool_tip="地図上のフレンドにビーコンを作成、追跡します"/>
39 <button name="invite_btn" label="招待..." tool_tip="この人を自分の所属グループに招待します"/>
40 <button name="add_btn" label="追加..." tool_tip="この人にフレンド要請を送ります"/>
41 </panel>
42 <panel name="estate_tab" label="不動産管理">
43 <button name="cam_btn" label="カメラ追跡"/>
44 <button name="freeze_btn" label="動けなくする..."/>
45 <button name="eject_btn" label="追い出す..."/>
46 <button name="ban_btn" label="立入禁止..."/>
47 <button name="mute_btn" label="ミュート..."/>
48 <button name="unmute_btn" label="ミュート解除..."/>
49 <button name="ar_btn" label="報告..."/>
50 </panel>
51 </tab_container>
52
53 <scroll_list name="RadarList">
54 <column name="avatar_name" label="名前"/>
55 <column name="avatar_distance" label="距離"/>
56 </scroll_list>
57
58</panel>
59
diff --git a/linden/indra/newview/skins/default/xui/ja/panel_windlight_controls.xml b/linden/indra/newview/skins/default/xui/ja/panel_windlight_controls.xml
new file mode 100644
index 0000000..bfe6a42
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/ja/panel_windlight_controls.xml
@@ -0,0 +1,6 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<panel name="windlight_controls">
3 <button label="環境編集" name="Environment"/>
4 <flyout_button label="空" name="Presets">
5 </flyout_button>
6</panel>
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py
index ff59aec..bccfa8f 100755
--- a/linden/indra/newview/viewer_manifest.py
+++ b/linden/indra/newview/viewer_manifest.py
@@ -845,7 +845,6 @@ class LinuxManifest(ViewerManifest):
845 self.path("wrapper.sh","imprudence") 845 self.path("wrapper.sh","imprudence")
846 self.path("handle_secondlifeprotocol.sh") 846 self.path("handle_secondlifeprotocol.sh")
847 self.path("register_secondlifeprotocol.sh") 847 self.path("register_secondlifeprotocol.sh")
848 self.path("getvoice.sh")
849 self.end_prefix("linux_tools") 848 self.end_prefix("linux_tools")
850 849
851 self.gather_documents() 850 self.gather_documents()
diff --git a/linden/indra/newview/viewertime.cpp b/linden/indra/newview/viewertime.cpp
index 06dd91a..06436b6 100644
--- a/linden/indra/newview/viewertime.cpp
+++ b/linden/indra/newview/viewertime.cpp
@@ -47,6 +47,9 @@ ViewerTime* gViewerTime = 0;
47// We use statics here for speed reasons 47// We use statics here for speed reasons
48bool ViewerTime::sUse24HourTime = false; 48bool ViewerTime::sUse24HourTime = false;
49bool ViewerTime::sUseUTCTime = false; 49bool ViewerTime::sUseUTCTime = false;
50bool ViewerTime::sUseTimeOffset = false;
51S32 ViewerTime::sTimeOffset = 0;
52bool ViewerTime::sTimeOffsetDST = false;
50 53
51std::vector<std::string> ViewerTime::sDays; 54std::vector<std::string> ViewerTime::sDays;
52std::vector<std::string> ViewerTime::sMonths; 55std::vector<std::string> ViewerTime::sMonths;
@@ -87,16 +90,21 @@ void ViewerTime::refresh()
87 // There's only one internal tm buffer. 90 // There's only one internal tm buffer.
88 struct tm* internal_time; 91 struct tm* internal_time;
89 92
90 if (!sUseUTCTime) 93 if (sUseUTCTime)
91 { 94 {
92 // Convert to Pacific, based on server's opinion of whether 95 time(&utc_time);
93 // it's daylight savings time there. 96 internal_time = gmtime(&utc_time);
94 internal_time = utc_to_pacific_time(utc_time, gPacificDaylightTime); 97 }
98 else if (sUseTimeOffset)
99 {
100 //Its a UTC offset, deal with it
101 internal_time = utc_to_offset_time(utc_time, sTimeOffset, sTimeOffsetDST);
95 } 102 }
96 else 103 else
97 { 104 {
98 time(&utc_time); 105 // Convert to Pacific, based on server's opinion of whether
99 internal_time = gmtime(&utc_time); 106 // it's daylight savings time there.
107 internal_time = utc_to_pacific_time(utc_time, gPacificDaylightTime);
100 } 108 }
101 109
102 mMinute = internal_time->tm_min; 110 mMinute = internal_time->tm_min;
diff --git a/linden/indra/newview/viewertime.h b/linden/indra/newview/viewertime.h
index 525a2bc..f7a80a6 100644
--- a/linden/indra/newview/viewertime.h
+++ b/linden/indra/newview/viewertime.h
@@ -59,6 +59,9 @@ public:
59 59
60 static bool sUse24HourTime; 60 static bool sUse24HourTime;
61 static bool sUseUTCTime; 61 static bool sUseUTCTime;
62 static bool sUseTimeOffset;
63 static S32 sTimeOffset;
64 static bool sTimeOffsetDST;
62 65
63 void updateTimeFormat(const U32& index); 66 void updateTimeFormat(const U32& index);
64 67
diff --git a/linden/indra/newview/windlightsettingsupdate.cpp b/linden/indra/newview/windlightsettingsupdate.cpp
new file mode 100644
index 0000000..a5f9cb7
--- /dev/null
+++ b/linden/indra/newview/windlightsettingsupdate.cpp
@@ -0,0 +1,200 @@
1/*
2 * @file kowopenregionsettings.cpp
3 * @brief Handler for OpenRegionInfo event queue message.
4 *
5 * Copyright (c) 2010, Patrick Sapinski
6 *
7 * The source code in this file ("Source Code") is provided to you
8 * under the terms of the GNU General Public License, version 2.0
9 * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
10 * this distribution, or online at
11 * http://secondlifegrid.net/programs/open_source/licensing/gplv2
12 *
13 * There are special exceptions to the terms and conditions of the GPL as
14 * it is applied to this Source Code. View the full text of the exception
15 * in the file doc/FLOSS-exception.txt in this software distribution, or
16 * online at
17 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28#include "llviewerprecompiledheaders.h"
29#include "llhttpnode.h"
30#include "hippoLimits.h"
31#include "llfloatertools.h"
32#include "llviewercontrol.h"
33#include "llagent.h"
34#include "llsurface.h"
35#include "llviewerregion.h"
36#include "llviewerobject.h"
37
38#include "linden_common.h"
39#include "llwaterparammanager.h"
40#include "llwaterparamset.h"
41#include "llwlparammanager.h"
42#include "llwlparamset.h"
43#include "message.h"
44#include "meta7windlight.h"
45#include "lightshare.h"
46#include "wlsettingsmanager.h"
47
48//DEBUG includes
49//#include "llsdserialize.h" //LLSDNotationStreamer - for dumping LLSD to string
50
51class WindLightSettingsUpdate : public LLHTTPNode
52{
53 /*virtual*/ void post(
54 LLHTTPNode::ResponsePtr response,
55 const LLSD& context,
56 const LLSD& input) const
57 {
58 if (!input.isMap() || !input.has("body"))
59 {
60 llinfos << "malformed WindLightSettingsUpdate update!" << llendl;
61 return;
62 }
63 LLWaterParamSet* mWater;
64 LLWLParamSet* mSky;
65 LLUUID* mWaterNormal;
66
67 mWater = new LLWaterParamSet();
68 mSky = new LLWLParamSet();
69 mWaterNormal = new LLUUID();
70
71 LLSD body = input["body"];
72
73 mWater->set("waterFogColor",
74 body["waterColorX"].asReal() / 256.f,
75 body["waterColorY"].asReal() / 256.f,
76 body["waterColorZ"].asReal() / 256.f,
77 body["waterColorW"].asReal() / 256.f);
78 mWater->set("waterFogDensity", body["waterFogDensityExponent"].asReal());
79 mWater->set("underWaterFogMod", body["underwaterFogModifier"].asReal());
80 mWater->set("normScale", body["reflectionWaveletScaleX"].asReal(),
81 body["reflectionWaveletScaleY"].asReal(),
82 body["reflectionWaveletScaleZ"].asReal());
83 mWater->set("fresnelScale", body["fresnelScale"].asReal());
84 mWater->set("fresnelOffset", body["fresnelOffset"].asReal());
85 mWater->set("scaleAbove", body["refractScaleAbove"].asReal());
86 mWater->set("scaleBelow", body["refractScaleBelow"].asReal());
87 mWater->set("blurMultiplier", body["blurMultiplier"].asReal());
88 mWater->set("wave2Dir", body["bigWaveDirectionX"].asReal(),
89 body["bigWaveDirectionY"].asReal());
90 mWater->set("wave1Dir", body["littleWaveDirectionX"].asReal(),
91 body["littleWaveDirectionY"].asReal());
92 mWaterNormal->parseUUID(body["normalMapTexture"].asUUID().asString(), mWaterNormal);
93
94 mSky->setSunAngle(body["sunMoonPosition"].asReal());
95 mSky->setEastAngle(body["eastAngle"].asReal());
96
97 mSky->set("sunlight_color",
98 body["sunMoonColorX"].asReal() * 3.0f,
99 body["sunMoonColorY"].asReal() * 3.0f,
100 body["sunMoonColorZ"].asReal() * 3.0f,
101 body["sunMoonColorW"].asReal() * 3.0f);
102
103 mSky->set("ambient",
104 body["ambientX"].asReal() * 3.0f,
105 body["ambientY"].asReal() * 3.0f,
106 body["ambientZ"].asReal() * 3.0f,
107 body["ambientW"].asReal() * 3.0f);
108
109 mSky->set("blue_horizon",
110 body["horizonX"].asReal() * 2.0f,
111 body["horizonY"].asReal() * 2.0f,
112 body["horizonZ"].asReal() * 2.0f,
113 body["horizonW"].asReal() * 2.0f);
114
115 mSky->set("blue_density",
116 body["blueDensityX"].asReal(),
117 body["blueDensityY"].asReal(),
118 body["blueDensityZ"].asReal(),
119 1.0);
120
121 mSky->set("haze_horizon",
122 body["hazeHorizon"].asReal(),
123 body["hazeHorizon"].asReal(),
124 body["hazeHorizon"].asReal(),
125 1.f);
126
127 mSky->set("haze_density",
128 body["hazeDensity"].asReal(),
129 0.f, 0.f, 1.f);
130
131 mSky->set("cloud_shadow",
132 body["cloudCoverage"].asReal(),
133 0.f, 0.f, 1.f);
134
135 mSky->set("density_multiplier",
136 body["densityMultiplier"].asReal() / 1000.0f,
137 0.f, 0.f, 1.f);
138
139 mSky->set("distance_multiplier",
140 body["distanceMultiplier"].asReal(),
141 0.f, 0.f, 1.f);
142
143 mSky->set("max_y",
144 body["maxAltitude"].asReal(),
145 0.f, 0.f, 1.f);
146
147 mSky->set("cloud_color",
148 body["cloudColorX"].asReal(),
149 body["cloudColorY"].asReal(),
150 body["cloudColorZ"].asReal(),
151 body["cloudColorW"].asReal());
152
153 mSky->set("cloud_pos_density1",
154 body["cloudXYDensityX"].asReal(),
155 body["cloudXYDensityY"].asReal(),
156 body["cloudXYDensityZ"].asReal(),
157 1.f);
158
159 mSky->set("cloud_pos_density2",
160 body["cloudDetailXYDensityX"].asReal(),
161 body["cloudDetailXYDensityY"].asReal(),
162 body["cloudDetailXYDensityZ"].asReal(),
163 1.f);
164
165 mSky->set("cloud_scale",
166 body["cloudScale"].asReal(),
167 0.f, 0.f, 1.f);
168
169 mSky->set("gamma",
170 body["sceneGamma"].asReal(),
171 0.f, 0.f, 1.f);
172
173 mSky->set("glow",
174 (2 - body["sunGlowSize"].asReal()) * 20,
175 0.f,
176 -body["sunGlowFocus"].asReal() * 5,
177 1.f);
178
179 mSky->setCloudScrollX(body["cloudScrollX"].asReal() + 10.0f);
180 mSky->setCloudScrollY(body["cloudScrollY"].asReal() + 10.0f);
181
182 mSky->setEnableCloudScrollX(!body["cloudScrollXLock"].asBoolean());
183 mSky->setEnableCloudScrollY(!body["cloudScrollYLock"].asBoolean());
184
185 mSky->setStarBrightness(body["starBrightness"].asReal());
186
187 mSky->set("fade", body["fade"].asReal());
188
189 //Update this here.. since it isn't a part of WL... go figure
190 gHippoLimits->skyUseClassicClouds = body["drawClassicClouds"].asBoolean();
191 gSavedSettings.setF32("ClassicCloudHeight",body["classicCloudHeight"].asReal());
192 gSavedSettings.setF32("ClassicCloudRange",body["classicCloudRange"].asReal());
193
194 WLSettingsManager::Apply(mSky, mWater, mWaterNormal);
195}
196};
197
198LLHTTPRegistration<WindLightSettingsUpdate>
199gHTTPRegistrationWindLightSettingsUpdate(
200 "/message/WindLightSettingsUpdate"); \ No newline at end of file
diff --git a/linden/indra/newview/wlfloatermanager.cpp b/linden/indra/newview/wlfloatermanager.cpp
new file mode 100644
index 0000000..1946807
--- /dev/null
+++ b/linden/indra/newview/wlfloatermanager.cpp
@@ -0,0 +1,281 @@
1/**
2* @file wlfloaterwindlightsend.cpp
3* @brief WLFloaterWindLightSend class definition
4*
5* $LicenseInfo:firstyear=2007&license=viewergpl$
6*
7* Copyright (c) 2007-2009, Linden Research, Inc.
8*
9* Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0
12* ("GPL"), unless you have obtained a separate licensing agreement
13* ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at
21* http://secondlifegrid.net/programs/open_source/licensing/flossexception
22*
23* By copying, modifying or distributing this software, you acknowledge
24* that you have read and understood your obligations described above,
25* and agree to abide by those obligations.
26*
27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29* COMPLETENESS OR PERFORMANCE.
30* $/LicenseInfo$
31*/
32
33#include "llviewerprecompiledheaders.h"
34
35#include "llfloaterwindlight.h"
36
37#include "pipeline.h"
38#include "llsky.h"
39
40#include "llsliderctrl.h"
41#include "llmultislider.h"
42#include "llmultisliderctrl.h"
43#include "llspinctrl.h"
44#include "llcheckboxctrl.h"
45#include "lluictrlfactory.h"
46#include "llviewercamera.h"
47#include "llcombobox.h"
48#include "lllineeditor.h"
49#include "llfloaterdaycycle.h"
50#include "lltabcontainer.h"
51#include "llboost.h"
52
53#include "llagent.h"
54#include "llinventorymodel.h"
55#include "llviewerinventory.h"
56
57#include "v4math.h"
58#include "llviewerdisplay.h"
59#include "llviewercontrol.h"
60#include "llviewerwindow.h"
61#include "llsavedsettingsglue.h"
62
63#include "llwlparamset.h"
64#include "llwlparammanager.h"
65#include "llwaterparammanager.h"
66#include "llpostprocess.h"
67#include "hippoLimits.h"
68#include "wlfloatermanager.h"
69#include "llviewerregion.h"
70#include "llviewerparcelmgr.h"
71#include "llparcel.h"
72#include "wlretrievesettings.h"
73#include "wlsettingsmanager.h"
74#include "wlfloaterwindlightsend.h"
75
76#undef max
77WLFloaterManager* WLFloaterManager::sWindLight;
78std::map<std::string, LLWLParamSet*> WLFloaterManager::mWLParamList;
79std::map<std::string, LLWaterParamSet*> WLFloaterManager::mWaterParamList;
80std::map<std::string, LLUUID*> WLFloaterManager::mWaterNormalParamList;
81std::map<std::string, LLSD> WLFloaterManager::mMinAltParamList;
82std::map<std::string, LLSD> WLFloaterManager::mMaxAltParamList;
83std::map<std::string, LLSD> WLFloaterManager::mFadeParamList;
84
85WLFloaterManager::WLFloaterManager() : LLFloater(std::string("windlight manager floater"))
86{
87 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_windlight_manager.xml");
88
89 // load it up
90 initCallbacks();
91}
92
93WLFloaterManager::~WLFloaterManager()
94{
95}
96
97void WLFloaterManager::initCallbacks(void) {
98
99 // help buttons
100 childSetAction("this_parcel", onGetThisParcel, this);
101 childSetAction("all_parcels", onGetAllParcels, this);
102 childSetAction("this_region", onGetThisRegion, this);
103 childSetAction("show", onShow, this);
104 childSetAction("set_to_current", onSetToCurrent, this);
105 childSetAction("remove", onRemove, this);
106}
107
108void WLFloaterManager::onClickHelp(void* data)
109{
110 LLFloaterWindLight* self = LLFloaterWindLight::instance();
111
112 const std::string xml_alert = *(std::string*)data;
113 LLNotifications::instance().add(self->contextualNotification(xml_alert));
114}
115
116void WLFloaterManager::initHelpBtn(const std::string& name, const std::string& xml_alert)
117{
118 childSetAction(name, onClickHelp, new std::string(xml_alert));
119}
120
121// static
122WLFloaterManager* WLFloaterManager::instance()
123{
124 if (!sWindLight)
125 {
126 sWindLight = new WLFloaterManager();
127 sWindLight->open();
128 sWindLight->setFocus(TRUE);
129 }
130 return sWindLight;
131}
132
133void WLFloaterManager::show()
134{
135 if (!sWindLight)
136 {
137 WLFloaterManager::instance();
138 }
139 else
140 {
141 if (sWindLight->getVisible())
142 {
143 sWindLight->close();
144 }
145 else
146 {
147 sWindLight->open();
148 }
149 }
150}
151
152bool WLFloaterManager::isOpen()
153{
154 if (sWindLight != NULL) {
155 return true;
156 }
157 return false;
158}
159
160// virtual
161void WLFloaterManager::onClose(bool app_quitting)
162{
163 if (sWindLight)
164 {
165 sWindLight->setVisible(FALSE);
166 }
167}
168
169void WLFloaterManager::onGetThisRegion(void* userData)
170{
171 LLSD body;
172
173 //Send the update CAPS to the server
174 std::string url = gAgent.getRegion()->getCapability("RetrieveWindLightSettings");
175 if (!url.empty())
176 {
177 body["RegionID"] = gAgent.getRegion()->getRegionID();
178 LLHTTPClient::post(url, body, new retrieveWindlightSettings(body));
179 }
180}
181
182void WLFloaterManager::onGetThisParcel(void* userData)
183{
184 LLSD body;
185
186 //Send the update CAPS to the server
187 std::string url = gAgent.getRegion()->getCapability("RetrieveWindLightSettings");
188 if (!url.empty())
189 {
190 body["ParcelID"] = LLViewerParcelMgr::getInstance()->getAgentParcel()->getLocalID();
191 LLHTTPClient::post(url, body, new retrieveWindlightSettings(body));
192 }
193}
194void WLFloaterManager::onGetAllParcels(void* userData)
195{
196 LLSD body;
197
198 //Send the update CAPS to the server
199 std::string url = gAgent.getRegion()->getCapability("RetrieveWindLightSettings");
200 if (!url.empty())
201 {
202 body["ParcelID"] = -1;
203 LLHTTPClient::post(url, body, new retrieveWindlightSettings(body));
204 }
205}
206
207void WLFloaterManager::onShow(void* userData)
208{
209 WLFloaterManager* mgr = WLFloaterManager::instance();
210 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo");
211 std::string name = comboBox->getSelectedItemLabel();
212 //Set the new settings up
213 LLWLParamSet* mSky = mgr->mWLParamList[name];
214 LLWaterParamSet* mWater = mgr->mWaterParamList[name];
215 LLUUID* mWaterNormal = mgr->mWaterNormalParamList[name];
216 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
217 WLSettingsManager::Apply(mSky, mWater, mWaterNormal);
218}
219void WLFloaterManager::onSetToCurrent(void* userData)
220{
221 WLFloaterManager* mgr = WLFloaterManager::instance();
222 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo");
223 std::string name = comboBox->getSelectedItemLabel();
224
225 LLWLParamSet* mSky = mgr->mWLParamList[name];
226 LLWaterParamSet* mWater = mgr->mWaterParamList[name];
227 LLUUID* mWaterNormal = mgr->mWaterNormalParamList[name];
228 LLSD fade = mgr->mFadeParamList[name];
229 LLSD minAlt = mgr->mMinAltParamList[name];
230 LLSD maxAlt = mgr->mMaxAltParamList[name];
231
232 int type = 1;
233 if(name == "(Region Settings)")
234 {
235 type = 0;
236 }
237
238 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
239 WLFloaterWindLightSend::SendSettings(false, type, NULL, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal);
240}
241void WLFloaterManager::onRemove(void* userData)
242{
243 WLFloaterManager* mgr = WLFloaterManager::instance();
244 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo");
245 std::string name = comboBox->getSelectedItemLabel();
246
247 LLWLParamSet* mSky = mgr->mWLParamList[name];
248 LLWaterParamSet* mWater = mgr->mWaterParamList[name];
249 LLUUID* mWaterNormal = mgr->mWaterNormalParamList[name];
250 LLSD fade = mgr->mFadeParamList[name];
251 LLSD minAlt = mgr->mMinAltParamList[name];
252 LLSD maxAlt = mgr->mMaxAltParamList[name];
253
254 int type = 1;
255 if(name == "(Region Settings)")
256 {
257 type = 0;
258 }
259
260 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
261 WLFloaterWindLightSend::SendSettings(true, type, false, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal);
262}
263
264
265//static
266void WLFloaterManager::UpdateFloater()
267{
268 WLFloaterManager* mgr = WLFloaterManager::instance();
269 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo");
270 comboBox->clear();
271 comboBox->removeall();
272 std::map<std::string, LLWLParamSet*>::iterator mIt =
273 WLFloaterManager::instance()->mWLParamList.begin();
274 for(; mIt != WLFloaterManager::instance()->mWLParamList.end(); mIt++)
275 {
276 comboBox->add(mIt->first);
277 }
278 //Reorder them
279 comboBox->sortByName();
280}
281
diff --git a/linden/indra/newview/wlfloatermanager.h b/linden/indra/newview/wlfloatermanager.h
new file mode 100644
index 0000000..0a2d0ca
--- /dev/null
+++ b/linden/indra/newview/wlfloatermanager.h
@@ -0,0 +1,93 @@
1/**
2 * @file wlfloaterwindlightsend.h
3 * @brief WLFloaterWindLightSend class definition
4 *
5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 *
7 * Copyright (c) 2007-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33/*
34 * Menu for adjusting the atmospheric settings of the world
35 */
36
37#include "llfloater.h"
38
39#include <vector>
40#include "llwlparamset.h"
41
42struct WLColorControl;
43struct WLFloatControl;
44
45
46/// Menuing system for all of windlight's functionality
47class WLFloaterManager : public LLFloater
48{
49public:
50
51 WLFloaterManager();
52 virtual ~WLFloaterManager();
53
54 /// initialize all
55 void initCallbacks(void);
56
57 /// one and one instance only
58 static WLFloaterManager* instance();
59
60 // help button stuff
61 static void onClickHelp(void* data);
62 void initHelpBtn(const std::string& name, const std::string& xml_alert);
63
64 static void onGetThisRegion(void* userData);
65 static void onGetThisParcel(void* userData);
66 static void onGetAllParcels(void* userData);
67 static void onShow(void* userData);
68 static void onSetToCurrent(void* userData);
69 static void onRemove(void* userData);
70
71 //// menu management
72
73 /// show off our menu
74 static void show();
75
76 /// return if the menu exists or not
77 static bool isOpen();
78
79 /// stuff to do on exit
80 virtual void onClose(bool app_quitting);
81
82 static void UpdateFloater();
83 static std::map<std::string, LLWLParamSet*> mWLParamList;
84 static std::map<std::string, LLWaterParamSet*> mWaterParamList;
85 static std::map<std::string, LLUUID*> mWaterNormalParamList;
86 static std::map<std::string, LLSD> mMinAltParamList;
87 static std::map<std::string, LLSD> mMaxAltParamList;
88 static std::map<std::string, LLSD> mFadeParamList;
89
90private:
91 // one instance on the inside
92 static WLFloaterManager* sWindLight;
93}; \ No newline at end of file
diff --git a/linden/indra/newview/wlfloaterwindlightsend.cpp b/linden/indra/newview/wlfloaterwindlightsend.cpp
new file mode 100644
index 0000000..5244bcd
--- /dev/null
+++ b/linden/indra/newview/wlfloaterwindlightsend.cpp
@@ -0,0 +1,300 @@
1/**
2* @file wlfloaterwindlightsend.cpp
3* @brief WLFloaterWindLightSend class definition
4*
5* $LicenseInfo:firstyear=2007&license=viewergpl$
6*
7* Copyright (c) 2007-2009, Linden Research, Inc.
8*
9* Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0
12* ("GPL"), unless you have obtained a separate licensing agreement
13* ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at
21* http://secondlifegrid.net/programs/open_source/licensing/flossexception
22*
23* By copying, modifying or distributing this software, you acknowledge
24* that you have read and understood your obligations described above,
25* and agree to abide by those obligations.
26*
27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29* COMPLETENESS OR PERFORMANCE.
30* $/LicenseInfo$
31*/
32
33#include "llviewerprecompiledheaders.h"
34
35#include "llfloaterwindlight.h"
36
37#include "pipeline.h"
38#include "llsky.h"
39
40#include "llsliderctrl.h"
41#include "llmultislider.h"
42#include "llmultisliderctrl.h"
43#include "llspinctrl.h"
44#include "llcheckboxctrl.h"
45#include "lluictrlfactory.h"
46#include "llviewercamera.h"
47#include "llcombobox.h"
48#include "lllineeditor.h"
49#include "llfloaterdaycycle.h"
50#include "lltabcontainer.h"
51#include "llboost.h"
52
53#include "llagent.h"
54#include "llinventorymodel.h"
55#include "llviewerinventory.h"
56
57#include "v4math.h"
58#include "llviewerdisplay.h"
59#include "llviewercontrol.h"
60#include "llviewerwindow.h"
61#include "llsavedsettingsglue.h"
62
63#include "llwlparamset.h"
64#include "llwlparammanager.h"
65#include "llwaterparammanager.h"
66#include "llpostprocess.h"
67#include "hippoLimits.h"
68#include "wlfloaterwindlightsend.h"
69#include "llviewerregion.h"
70
71#undef max
72
73
74WLFloaterWindLightSend* WLFloaterWindLightSend::sWindLight = NULL;
75
76WLFloaterWindLightSend::WLFloaterWindLightSend() : LLFloater(std::string("windlight send floater"))
77{
78 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_windlight_remote_save.xml");
79
80 // load it up
81 initCallbacks();
82}
83
84WLFloaterWindLightSend::~WLFloaterWindLightSend()
85{
86}
87
88void WLFloaterWindLightSend::initCallbacks(void) {
89
90 // help buttons
91 initHelpBtn("fade_help", "HelpBlueHorizon");
92 initHelpBtn("override_parcel_default_help", "HelpHazeHorizon");
93 initHelpBtn("override_parcel_help", "HelpBlueDensity");
94 initHelpBtn("max_altitude_help", "HelpHazeDensity");
95 initHelpBtn("min_altitude_help", "HelpDensityMult");
96 childSetAction("button_region_send_to_server", onSaveRegionPreset, this);
97 childSetAction("button_parcel_send_to_server", onSaveParcelPreset, this);
98}
99
100void WLFloaterWindLightSend::onClickHelp(void* data)
101{
102 LLFloaterWindLight* self = LLFloaterWindLight::instance();
103
104 const std::string xml_alert = *(std::string*)data;
105 LLNotifications::instance().add(self->contextualNotification(xml_alert));
106}
107
108void WLFloaterWindLightSend::initHelpBtn(const std::string& name, const std::string& xml_alert)
109{
110 childSetAction(name, onClickHelp, new std::string(xml_alert));
111}
112
113// static
114WLFloaterWindLightSend* WLFloaterWindLightSend::instance()
115{
116 if (!sWindLight)
117 {
118 sWindLight = new WLFloaterWindLightSend();
119 sWindLight->open();
120 sWindLight->setFocus(TRUE);
121 }
122 return sWindLight;
123}
124
125void WLFloaterWindLightSend::show()
126{
127 if (!sWindLight)
128 {
129 WLFloaterWindLightSend::instance();
130 }
131 else
132 {
133 if (sWindLight->getVisible())
134 {
135 sWindLight->close();
136 }
137 else
138 {
139 sWindLight->open();
140 }
141 }
142}
143
144bool WLFloaterWindLightSend::isOpen()
145{
146 if (sWindLight != NULL) {
147 return true;
148 }
149 return false;
150}
151
152// virtual
153void WLFloaterWindLightSend::onClose(bool app_quitting)
154{
155 if (sWindLight)
156 {
157 sWindLight->setVisible(FALSE);
158 }
159}
160
161void WLFloaterWindLightSend::onSaveRegionPreset(void* userData)
162{
163 int RegionType = 0;
164 SendSettings(false, RegionType,
165 WLFloaterWindLightSend::instance()->childGetValue("override_parcel"),
166 LLWLParamManager::instance()->mCurParams,
167 LLWaterParamManager::instance()->mCurParams,
168 WLFloaterWindLightSend::instance()->childGetValue("Fade"),
169 WLFloaterWindLightSend::instance()->childGetValue("min_altitude"),
170 WLFloaterWindLightSend::instance()->childGetValue("max_altitude"),
171 LLWaterParamManager::instance()->getNormalMapID());
172}
173void WLFloaterWindLightSend::onSaveParcelPreset(void* userData)
174{
175 int ParcelType = 1;
176 SendSettings(false, ParcelType, false, LLWLParamManager::instance()->mCurParams,
177 LLWaterParamManager::instance()->mCurParams,
178 WLFloaterWindLightSend::instance()->childGetValue("Fade"),
179 WLFloaterWindLightSend::instance()->childGetValue("min_altitude"),
180 WLFloaterWindLightSend::instance()->childGetValue("max_altitude"),
181 LLWaterParamManager::instance()->getNormalMapID());
182}
183void WLFloaterWindLightSend::SendSettings(bool remove, int type, bool overrideParcels,
184 LLWLParamSet mSky, LLWaterParamSet mWater,
185 LLSD fade, LLSD minAlt, LLSD maxAlt,
186 LLUUID normalMap)
187{
188 LLSD body;
189 std::string url = gAgent.getRegion()->getCapability("DispatchWindLightSettings");
190 if (!url.empty())
191 {
192 bool error;
193
194 body["type"] = type;
195 body["remove"] = remove;
196 body["fade"] = fade;
197 body["maxEffectiveAltitude"] = maxAlt;
198 body["minEffectiveAltitude"] = minAlt;
199 if(overrideParcels == true || overrideParcels == false)
200 body["overrideParcels"] = overrideParcels;
201
202 LLVector4 v = mSky.getVector("ambient", error);
203 body["ambientX"] = v[0] / 3.0;
204 body["ambientY"] = v[1] / 3.0;
205 body["ambientZ"] = v[2] / 3.0;
206 body["ambientW"] = v[3] / 3.0;
207
208 body["eastAngle"] = mSky.getEastAngle();
209 body["sunMoonPosition"] = mSky.getSunAngle();
210
211 v = mSky.getVector("sunlight_color",error);
212 body["sunMoonColorX"] = v[0] / 3.0;
213 body["sunMoonColorY"] = v[1] / 3.0;
214 body["sunMoonColorZ"] = v[2] / 3.0;
215 body["sunMoonColorW"] = v[3] / 3.0;
216
217 v = mSky.getVector("blue_horizon",error);
218 body["horizonX"] = v[0] / 2.0;
219 body["horizonY"] = v[1] / 2.0;
220 body["horizonZ"] = v[2] / 2.0;
221 body["horizonW"] = v[3] / 2.0;
222
223 v = mSky.getVector("blue_density",error);
224 body["blueDensityX"] = v[0];
225 body["blueDensityY"] = v[1];
226 body["blueDensityZ"] = v[2];
227
228 v = mSky.getVector("haze_horizon",error);
229 body["hazeHorizon"] = v[0];
230
231 body["hazeDensity"] = mSky.getFloat("haze_density",error);
232 body["cloudCoverage"] = mSky.getFloat("cloud_shadow",error);
233 body["densityMultiplier"] = mSky.getFloat("density_multiplier",error) * 1000;
234 body["distanceMultiplier"] = mSky.getFloat("distance_multiplier",error);
235 body["maxAltitude"] = mSky.getFloat("max_y",error);
236
237 v = mSky.getVector("cloud_color",error);
238 body["cloudColorX"] = v[0];
239 body["cloudColorY"] = v[1];
240 body["cloudColorZ"] = v[2];
241 body["cloudColorW"] = v[3];
242
243 v = mSky.getVector("cloud_pos_density1",error);
244 body["cloudXYDensityX"] = v[0];
245 body["cloudXYDensityY"] = v[1];
246 body["cloudXYDensityZ"] = v[2];
247
248 v = mSky.getVector("cloud_pos_density2",error);
249 body["cloudDetailXYDensityX"] = v[0];
250 body["cloudDetailXYDensityY"] = v[1];
251 body["cloudDetailXYDensityZ"] = v[2];
252
253 v = mSky.getVector("glow",error);
254 body["sunGlowSize"] = -((v[0]/ 20) - 2);
255 body["sunGlowFocus"] = -v[2] / 5;
256
257 body["cloudScale"] = mSky.getFloat("cloud_scale",error);
258 body["sceneGamma"] = mSky.getFloat("gamma",error);
259 body["cloudScrollX"] = mSky.getCloudScrollX() - 10;
260 body["cloudScrollY"] = mSky.getCloudScrollY() - 10;
261 body["cloudScrollXLock"] = !mSky.getEnableCloudScrollX();
262 body["cloudScrollYLock"] = !mSky.getEnableCloudScrollY();
263 body["starBrightness"] = mSky.getStarBrightness();
264 body["drawClassicClouds"] = gHippoLimits->skyUseClassicClouds;
265 body["classicCloudHeight"] = gSavedSettings.getF32("ClassicCloudHeight");
266 body["classicCloudRange"] = gSavedSettings.getF32("ClassicCloudRange");
267
268 LLVector3 vvv = mWater.getVector3("normScale",error);
269 body["reflectionWaveletScaleX"] = vvv[0];
270 body["reflectionWaveletScaleY"] = vvv[1];
271 body["reflectionWaveletScaleZ"] = vvv[2];
272
273 v = mWater.getVector4("waterFogColor",error);
274 body["waterColorX"] = v[0] * 256.0;
275 body["waterColorY"] = v[1] * 256.0;
276 body["waterColorZ"] = v[2] * 256.0;
277 body["waterColorW"] = v[3] * 256.0;
278
279 body["waterFogDensityExponent"] = mWater.getFloat("waterFogDensity", error);
280 body["underwaterFogModifier"] = mWater.getFloat("underWaterFogMod", error);
281
282 body["fresnelScale"] = mWater.getFloat("fresnelScale", error);
283 body["fresnelOffset"] = mWater.getFloat("fresnelOffset", error);
284 body["refractScaleAbove"] = mWater.getFloat("scaleAbove", error);
285 body["refractScaleBelow"] = mWater.getFloat("scaleBelow", error);
286 body["blurMultiplier"] = mWater.getFloat("blurMultiplier", error);
287
288 LLVector2 vv = mWater.getVector2("wave1Dir",error);
289 body["littleWaveDirectionX"] = vv[0];
290 body["littleWaveDirectionY"] = vv[1];
291
292 vv = mWater.getVector2("wave2Dir",error);
293 body["bigWaveDirectionX"] = vv[0];
294 body["bigWaveDirectionY"] = vv[1];
295
296 body["normalMapTexture"] = normalMap;
297
298 LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
299 }
300} \ No newline at end of file
diff --git a/linden/indra/newview/wlfloaterwindlightsend.h b/linden/indra/newview/wlfloaterwindlightsend.h
new file mode 100644
index 0000000..acd4386
--- /dev/null
+++ b/linden/indra/newview/wlfloaterwindlightsend.h
@@ -0,0 +1,88 @@
1/**
2 * @file wlfloaterwindlightsend.h
3 * @brief WLFloaterWindLightSend class definition
4 *
5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 *
7 * Copyright (c) 2007-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33/*
34 * Menu for adjusting the atmospheric settings of the world
35 */
36
37#include "llfloater.h"
38
39#include <vector>
40#include "llwlparamset.h"
41#include "llwaterparamset.h"
42#include "llsd.h"
43
44struct WLColorControl;
45struct WLFloatControl;
46
47
48/// Menuing system for all of windlight's functionality
49class WLFloaterWindLightSend : public LLFloater
50{
51public:
52
53 WLFloaterWindLightSend();
54 virtual ~WLFloaterWindLightSend();
55
56 /// initialize all
57 void initCallbacks(void);
58
59 /// one and one instance only
60 static WLFloaterWindLightSend* instance();
61
62 // help button stuff
63 static void onClickHelp(void* data);
64 void initHelpBtn(const std::string& name, const std::string& xml_alert);
65
66 static void onSaveParcelPreset(void* userData);
67 static void onSaveRegionPreset(void* userData);
68
69 //// menu management
70
71 /// show off our menu
72 static void show();
73
74 /// return if the menu exists or not
75 static bool isOpen();
76
77 /// stuff to do on exit
78 virtual void onClose(bool app_quitting);
79
80 static void SendSettings(bool remove, int type, bool overrideParcel,
81 LLWLParamSet mSky, LLWaterParamSet mWater,
82 LLSD Fade, LLSD minAlt, LLSD maxAlt,
83 LLUUID normalMap);
84
85private:
86 // one instance on the inside
87 static WLFloaterWindLightSend* sWindLight;
88}; \ No newline at end of file
diff --git a/linden/indra/newview/wlretrievesettings.cpp b/linden/indra/newview/wlretrievesettings.cpp
new file mode 100644
index 0000000..ca91ba2
--- /dev/null
+++ b/linden/indra/newview/wlretrievesettings.cpp
@@ -0,0 +1,238 @@
1/**
2* @file wlfloaterwindlightsend.cpp
3* @brief WLFloaterWindLightSend class definition
4*
5* $LicenseInfo:firstyear=2007&license=viewergpl$
6*
7* Copyright (c) 2007-2009, Linden Research, Inc.
8*
9* Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0
12* ("GPL"), unless you have obtained a separate licensing agreement
13* ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at
21* http://secondlifegrid.net/programs/open_source/licensing/flossexception
22*
23* By copying, modifying or distributing this software, you acknowledge
24* that you have read and understood your obligations described above,
25* and agree to abide by those obligations.
26*
27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29* COMPLETENESS OR PERFORMANCE.
30* $/LicenseInfo$
31*/
32
33#include "llviewerprecompiledheaders.h"
34
35#include "llfloaterwindlight.h"
36
37#include "pipeline.h"
38#include "llsky.h"
39
40#include "llsliderctrl.h"
41#include "llmultislider.h"
42#include "llmultisliderctrl.h"
43#include "llspinctrl.h"
44#include "llcheckboxctrl.h"
45#include "lluictrlfactory.h"
46#include "llviewercamera.h"
47#include "llcombobox.h"
48#include "lllineeditor.h"
49#include "llfloaterdaycycle.h"
50#include "lltabcontainer.h"
51#include "llboost.h"
52
53#include "llagent.h"
54#include "llinventorymodel.h"
55#include "llviewerinventory.h"
56
57#include "v4math.h"
58#include "llviewerdisplay.h"
59#include "llviewercontrol.h"
60#include "llviewerwindow.h"
61#include "llsavedsettingsglue.h"
62
63#include "llwlparamset.h"
64#include "llwlparammanager.h"
65#include "llwaterparammanager.h"
66#include "llpostprocess.h"
67#include "hippoLimits.h"
68#include "wlfloaterwindlightsend.h"
69#include "llviewerregion.h"
70#include "wlsettingsmanager.h"
71#include "lightshare.h"
72
73#include "linden_common.h"
74#include "llviewercontrol.h"
75#include "message.h"
76#include "meta7windlight.h"
77#include "wlretrievesettings.h"
78#include "wlfloatermanager.h"
79
80#undef max
81
82//If we get back a normal response, handle it here
83void retrieveWindlightSettings::result(const LLSD& content)
84{
85 //Clear the lists first
86 WLFloaterManager::mMinAltParamList.clear();
87 WLFloaterManager::mMaxAltParamList.clear();
88 WLFloaterManager::mFadeParamList.clear();
89 WLFloaterManager::mWLParamList.clear();
90 WLFloaterManager::mWaterParamList.clear();
91 WLFloaterManager::mWaterNormalParamList.clear();
92
93 for(LLSD::array_const_iterator wls = content["WindLight"].beginArray();
94 wls != content["WindLight"].endArray();
95 ++wls)
96 {
97 LLSD windLightLLSD = *wls;
98 LLWaterParamSet* mWater;
99 LLWLParamSet* mSky;
100 LLUUID* mWaterNormal;
101
102 mWater = new LLWaterParamSet();
103 mSky = new LLWLParamSet();
104 mWaterNormal = new LLUUID();
105
106 mWater->set("waterFogColor",
107 windLightLLSD["waterColorX"].asReal() / 256.f,
108 windLightLLSD["waterColorY"].asReal() / 256.f,
109 windLightLLSD["waterColorZ"].asReal() / 256.f,
110 windLightLLSD["waterColorW"].asReal() / 256.f);
111 mWater->set("waterFogDensity", windLightLLSD["waterFogDensityExponent"].asReal());
112 mWater->set("underWaterFogMod", windLightLLSD["underwaterFogModifier"].asReal());
113 mWater->set("normScale", windLightLLSD["reflectionWaveletScaleX"].asReal(),
114 windLightLLSD["reflectionWaveletScaleY"].asReal(),
115 windLightLLSD["reflectionWaveletScaleZ"].asReal());
116 mWater->set("fresnelScale", windLightLLSD["fresnelScale"].asReal());
117 mWater->set("fresnelOffset", windLightLLSD["fresnelOffset"].asReal());
118 mWater->set("scaleAbove", windLightLLSD["refractScaleAbove"].asReal());
119 mWater->set("scaleBelow", windLightLLSD["refractScaleBelow"].asReal());
120 mWater->set("blurMultiplier", windLightLLSD["blurMultiplier"].asReal());
121 mWater->set("wave2Dir", windLightLLSD["bigWaveDirectionX"].asReal(),
122 windLightLLSD["bigWaveDirectionY"].asReal());
123 mWater->set("wave1Dir", windLightLLSD["littleWaveDirectionX"].asReal(),
124 windLightLLSD["littleWaveDirectionY"].asReal());
125 mWaterNormal->parseUUID(windLightLLSD["normalMapTexture"].asUUID().asString(), mWaterNormal);
126
127 mSky->setSunAngle(windLightLLSD["sunMoonPosition"].asReal());
128 mSky->setEastAngle(windLightLLSD["eastAngle"].asReal());
129
130 mSky->set("sunlight_color",
131 windLightLLSD["sunMoonColorX"].asReal() * 3.0f,
132 windLightLLSD["sunMoonColorY"].asReal() * 3.0f,
133 windLightLLSD["sunMoonColorZ"].asReal() * 3.0f,
134 windLightLLSD["sunMoonColorW"].asReal() * 3.0f);
135
136 mSky->set("ambient",
137 windLightLLSD["ambientX"].asReal() * 3.0f,
138 windLightLLSD["ambientY"].asReal() * 3.0f,
139 windLightLLSD["ambientZ"].asReal() * 3.0f,
140 windLightLLSD["ambientW"].asReal() * 3.0f);
141
142 mSky->set("blue_horizon",
143 windLightLLSD["horizonX"].asReal() * 2.0f,
144 windLightLLSD["horizonY"].asReal() * 2.0f,
145 windLightLLSD["horizonZ"].asReal() * 2.0f,
146 windLightLLSD["horizonW"].asReal() * 2.0f);
147
148 mSky->set("blue_density",
149 windLightLLSD["blueDensityX"].asReal(),
150 windLightLLSD["blueDensityY"].asReal(),
151 windLightLLSD["blueDensityZ"].asReal(),
152 1.0);
153
154 mSky->set("haze_horizon",
155 windLightLLSD["hazeHorizon"].asReal(),
156 windLightLLSD["hazeHorizon"].asReal(),
157 windLightLLSD["hazeHorizon"].asReal(),
158 1.f);
159
160 mSky->set("haze_density",
161 windLightLLSD["hazeDensity"].asReal(),
162 0.f, 0.f, 1.f);
163
164 mSky->set("cloud_shadow",
165 windLightLLSD["cloudCoverage"].asReal(),
166 0.f, 0.f, 1.f);
167
168 mSky->set("density_multiplier",
169 windLightLLSD["densityMultiplier"].asReal() / 1000.0f,
170 0.f, 0.f, 1.f);
171
172 mSky->set("distance_multiplier",
173 windLightLLSD["distanceMultiplier"].asReal(),
174 0.f, 0.f, 1.f);
175
176 mSky->set("max_y",
177 windLightLLSD["maxAltitude"].asReal(),
178 0.f, 0.f, 1.f);
179
180 mSky->set("cloud_color",
181 windLightLLSD["cloudColorX"].asReal(),
182 windLightLLSD["cloudColorY"].asReal(),
183 windLightLLSD["cloudColorZ"].asReal(),
184 windLightLLSD["cloudColorW"].asReal());
185
186 mSky->set("cloud_pos_density1",
187 windLightLLSD["cloudXYDensityX"].asReal(),
188 windLightLLSD["cloudXYDensityY"].asReal(),
189 windLightLLSD["cloudXYDensityZ"].asReal(),
190 1.f);
191
192 mSky->set("cloud_pos_density2",
193 windLightLLSD["cloudDetailXYDensityX"].asReal(),
194 windLightLLSD["cloudDetailXYDensityY"].asReal(),
195 windLightLLSD["cloudDetailXYDensityZ"].asReal(),
196 1.f);
197
198 mSky->set("cloud_scale",
199 windLightLLSD["cloudScale"].asReal(),
200 0.f, 0.f, 1.f);
201
202 mSky->set("gamma",
203 windLightLLSD["sceneGamma"].asReal(),
204 0.f, 0.f, 1.f);
205
206 mSky->set("glow",
207 (2 - windLightLLSD["sunGlowSize"].asReal()) * 20,
208 0.f,
209 -windLightLLSD["sunGlowFocus"].asReal() * 5,
210 1.f);
211
212 mSky->setCloudScrollX(windLightLLSD["cloudScrollX"].asReal() + 10.0f);
213 mSky->setCloudScrollY(windLightLLSD["cloudScrollY"].asReal() + 10.0f);
214
215 mSky->setEnableCloudScrollX(!windLightLLSD["cloudScrollXLock"].asBoolean());
216 mSky->setEnableCloudScrollY(!windLightLLSD["cloudScrollYLock"].asBoolean());
217
218 mSky->setStarBrightness(windLightLLSD["starBrightness"].asReal());
219
220 mSky->set("fade", windLightLLSD["fade"].asReal());
221
222 WLFloaterManager::mMinAltParamList[windLightLLSD["Name"].asString()] = windLightLLSD["minEffectiveAltitude"].asReal();
223 WLFloaterManager::mMaxAltParamList[windLightLLSD["Name"].asString()] = windLightLLSD["maxEffectiveAltitude"].asReal();
224 WLFloaterManager::mFadeParamList[windLightLLSD["Name"].asString()] = windLightLLSD["fade"].asReal();
225
226 WLFloaterManager::mWLParamList[windLightLLSD["Name"].asString()] = mSky;
227 WLFloaterManager::mWaterParamList[windLightLLSD["Name"].asString()] = mWater;
228 WLFloaterManager::mWaterNormalParamList[windLightLLSD["Name"].asString()] = mWaterNormal;
229 }
230 WLFloaterManager::UpdateFloater();
231}
232
233//If we get back an error (not found, etc...), handle it here
234void retrieveWindlightSettings::error(U32 status, const std::string& reason)
235{
236 LL_INFOS("Inventory") << "retrieveWindlightSettings::error "
237 << status << ": " << reason << LL_ENDL;
238} \ No newline at end of file
diff --git a/linden/indra/newview/wlretrievesettings.h b/linden/indra/newview/wlretrievesettings.h
new file mode 100644
index 0000000..d75d0d1
--- /dev/null
+++ b/linden/indra/newview/wlretrievesettings.h
@@ -0,0 +1,59 @@
1/**
2 * @file wlfloaterwindlightsend.h
3 * @brief WLFloaterWindLightSend class definition
4 *
5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 *
7 * Copyright (c) 2007-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33/*
34 * Menu for adjusting the atmospheric settings of the world
35 */
36
37
38#include <string>
39#include "llwlparamset.h"
40#include "llwaterparamset.h"
41#include "lluuid.h"
42
43class LLSD;
44class LLTimer;
45class LLUUID;
46class LLWaterParamSet;
47class LLWLParamSet;
48
49
50/// Menuing system for all of windlight's functionality
51class retrieveWindlightSettings: public LLHTTPClient::Responder
52{
53public:
54 retrieveWindlightSettings(const LLSD& request_sd) : mRequestSD(request_sd) {};
55 void result(const LLSD& content);
56 void error(U32 status, const std::string& reason);
57protected:
58 LLSD mRequestSD;
59}; \ No newline at end of file
diff --git a/linden/indra/newview/wlsettingsmanager.cpp b/linden/indra/newview/wlsettingsmanager.cpp
new file mode 100644
index 0000000..853d14f
--- /dev/null
+++ b/linden/indra/newview/wlsettingsmanager.cpp
@@ -0,0 +1,253 @@
1/**
2* @file wlfloaterwindlightsend.cpp
3* @brief WLFloaterWindLightSend class definition
4*
5* $LicenseInfo:firstyear=2007&license=viewergpl$
6*
7* Copyright (c) 2007-2009, Linden Research, Inc.
8*
9* Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0
12* ("GPL"), unless you have obtained a separate licensing agreement
13* ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at
21* http://secondlifegrid.net/programs/open_source/licensing/flossexception
22*
23* By copying, modifying or distributing this software, you acknowledge
24* that you have read and understood your obligations described above,
25* and agree to abide by those obligations.
26*
27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29* COMPLETENESS OR PERFORMANCE.
30* $/LicenseInfo$
31*/
32
33#include "llviewerprecompiledheaders.h"
34
35#include "llfloaterwindlight.h"
36
37#include "pipeline.h"
38#include "llsky.h"
39
40#include "llsliderctrl.h"
41#include "llmultislider.h"
42#include "llmultisliderctrl.h"
43#include "llspinctrl.h"
44#include "llcheckboxctrl.h"
45#include "lluictrlfactory.h"
46#include "llviewercamera.h"
47#include "llcombobox.h"
48#include "lllineeditor.h"
49#include "llfloaterdaycycle.h"
50#include "lltabcontainer.h"
51#include "llboost.h"
52
53#include "llagent.h"
54#include "llinventorymodel.h"
55#include "llviewerinventory.h"
56
57#include "v4math.h"
58#include "llviewerdisplay.h"
59#include "llviewercontrol.h"
60#include "llviewerwindow.h"
61#include "llsavedsettingsglue.h"
62
63#include "llwlparamset.h"
64#include "llwlparammanager.h"
65#include "llwaterparammanager.h"
66#include "llpostprocess.h"
67#include "hippoLimits.h"
68#include "wlfloaterwindlightsend.h"
69#include "llviewerregion.h"
70#include "wlsettingsmanager.h"
71#include "lightshare.h"
72
73#include "linden_common.h"
74#include "llviewercontrol.h"
75#include "message.h"
76#include "meta7windlight.h"
77#include "llworld.h"
78
79#undef max
80
81const std::string WLSettingsManager::wlWaterPresetName = "(Region settings)";
82const std::string WLSettingsManager::wlSkyPresetName = "(Region settings)";
83
84LLTimer* WLSettingsManager::wlIgnoreTimer = new LLTimer();
85bool WLSettingsManager::wlIgnoreRegion = false;
86LLWaterParamSet* WLSettingsManager::mWater = NULL;
87LLWLParamSet* WLSettingsManager::mSky = NULL;
88LLUUID* WLSettingsManager::mWaterNormal = NULL;
89
90void WLSettingsManager::Apply( LLWLParamSet* Sky, LLWaterParamSet* Water, LLUUID* WaterNormal )
91{
92 if( gSavedSettings.getU32("LightShareAllowed") <= WindlightMessage::LIGHTSHARE_NEVER )
93 return;
94
95 std::string water = LLWaterParamManager::instance()->mCurParams.mName;
96 std::string sky = LLWLParamManager::instance()->mCurParams.mName;
97
98 // If they are using region settings already, or LightShare is
99 // always allowed, just apply the new settings, don't bother asking.
100 if( gSavedSettings.getU32("LightShareAllowed") == WindlightMessage::LIGHTSHARE_ALWAYS ||
101 (sky == wlSkyPresetName && water == wlWaterPresetName) )
102 {
103 mSky = Sky;
104 mWater = Water;
105 mWaterNormal = WaterNormal;
106 Apply();
107 return;
108 }
109
110 if( !wlignoreTimerHasExpired() )
111 {
112 // The user recently ignored a windlight message, so ignore
113 // this one too, and restart the timer.
114 wlrestartIgnoreTimer();
115 return;
116 }
117
118 if(wlIgnoreRegion)
119 {
120 // We are ignoring new settings until user enters a new region.
121 return;
122 }
123
124 if( gSavedSettings.getU32("LightShareAllowed") == WindlightMessage::LIGHTSHARE_ASK &&
125 mSky == NULL && mWater == NULL)
126 {
127 // No most recent, so store this and create notification
128 // asking the user whether to apply or not.
129 mSky = Sky;
130 mWater = Water;
131 mWaterNormal = WaterNormal;
132 LLNotifications::instance().add("ConfirmLightShare", LLSD(), LLSD(),
133 boost::bind(&wlapplyCallback, _1, _2));
134 }
135 else
136 {
137 // No new notification (to avoid spamming the user, we do keep the saves from above)
138 mSky = Sky;
139 mWater = Water;
140 mWaterNormal = WaterNormal;
141 }
142}
143
144// static
145bool WLSettingsManager::wlapplyCallback(const LLSD& notification,
146 const LLSD& response)
147{
148 S32 option = LLNotification::getSelectedOption(notification, response);
149
150 switch(option)
151 {
152 case 0:{
153 // "Apply"
154 Apply();
155 break;
156 }
157 case 1:{
158 // "Not Now", ignore until the region stops spamming
159 wlrestartIgnoreTimer();
160 break;
161 }
162 case 2:{
163 // "Ignore", ignore all until user leaves the region
164 wlIgnoreRegion = true;
165 break;
166 }
167 }
168 return false;
169}
170
171//static
172void WLSettingsManager::Apply()
173{
174 LLWaterParamManager* water_mgr = LLWaterParamManager::instance();
175 LLWLParamManager* sky_mgr = LLWLParamManager::instance();
176
177 F32 fade = 0; //Instant
178 bool error;
179 fade = mSky->getFloat("fade", error);
180
181 mWater->mName = wlWaterPresetName;
182 if(fade != 0 && water_mgr->mCurParams.mName == wlWaterPresetName)//Load the settings forcefully the first time
183 {
184 LLWaterParamSet oldWset = water_mgr->mCurParams;
185 //This still needs done so that we update right, but load it to the old
186 water_mgr->removeParamSet( wlWaterPresetName, false );
187 water_mgr->addParamSet( wlWaterPresetName, oldWset );
188 water_mgr->savePreset( wlWaterPresetName );
189 water_mgr->loadPreset( wlWaterPresetName, true );
190 water_mgr->setNormalMapID( *mWaterNormal );
191 //Then mix with the new
192 water_mgr->SetMixTime(mWater, fade);
193 }
194 else
195 {
196 //Instant if fade is 0
197 water_mgr->removeParamSet( wlWaterPresetName, false );
198 water_mgr->addParamSet( wlWaterPresetName, *mWater );
199 water_mgr->savePreset( wlWaterPresetName );
200 water_mgr->loadPreset( wlWaterPresetName, true );
201 water_mgr->setNormalMapID( *mWaterNormal );
202 }
203
204 mSky->mName = wlSkyPresetName;
205 if(fade != 0 && sky_mgr->mCurParams.mName == wlSkyPresetName)//Load the settings forcefully the first time
206 {
207 LLWLParamSet oldset = sky_mgr->mCurParams;
208 //This still needs done so that we update right, but load it to the old
209 sky_mgr->removeParamSet( wlSkyPresetName, true );
210 sky_mgr->addParamSet( wlSkyPresetName, oldset );
211 sky_mgr->savePreset( wlSkyPresetName );
212 sky_mgr->loadPreset( wlSkyPresetName, true );
213 //Then mix with the new
214 sky_mgr->SetMixTime(mSky, fade);
215 }
216 else
217 {
218 //Instant if fade is 0
219 sky_mgr->mAnimator.mIsRunning = false;
220 sky_mgr->mAnimator.mUseLindenTime = false;
221 sky_mgr->removeParamSet( wlSkyPresetName, false );
222 sky_mgr->addParamSet( wlSkyPresetName, *mSky );
223 sky_mgr->savePreset( wlSkyPresetName );
224 sky_mgr->loadPreset( wlSkyPresetName, true );
225 }
226
227 LLWorld::getInstance()->rebuildClouds(gAgent.getRegion());
228
229 mSky = NULL;
230 mWater = NULL;
231 mWaterNormal = NULL;
232}
233
234// static
235void WLSettingsManager::wlresetRegion()
236{
237 wlIgnoreRegion = false;
238 LLWorld::getInstance()->rebuildClouds(gAgent.getRegion());
239}
240
241// static
242void WLSettingsManager::wlrestartIgnoreTimer()
243{
244 F32 time = gSavedSettings.getF32("LightShareIgnoreTimer");
245 wlIgnoreTimer->start();
246 wlIgnoreTimer->setTimerExpirySec( (time < 0) ? 0 : time );
247}
248
249// static
250bool WLSettingsManager::wlignoreTimerHasExpired()
251{
252 return wlIgnoreTimer->hasExpired();
253} \ No newline at end of file
diff --git a/linden/indra/newview/wlsettingsmanager.h b/linden/indra/newview/wlsettingsmanager.h
new file mode 100644
index 0000000..5a0e9e7
--- /dev/null
+++ b/linden/indra/newview/wlsettingsmanager.h
@@ -0,0 +1,90 @@
1/**
2 * @file wlfloaterwindlightsend.h
3 * @brief WLFloaterWindLightSend class definition
4 *
5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 *
7 * Copyright (c) 2007-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33/*
34 * Menu for adjusting the atmospheric settings of the world
35 */
36
37#ifndef WINDLIGHTSETTINGSMANAGER_H
38#define WINDLIGHTSETTINGSMANAGER_H
39
40#include <string>
41#include "llwlparamset.h"
42#include "llwaterparamset.h"
43#include "lluuid.h"
44
45class LLSD;
46class LLTimer;
47class LLUUID;
48class LLWaterParamSet;
49class LLWLParamSet;
50
51
52/// Menuing system for all of windlight's functionality
53class WLSettingsManager
54{
55public:
56
57 static LLTimer* wlIgnoreTimer;
58 static bool wlIgnoreRegion;
59
60 // Called after the user has entered a new region, to reset the
61 // "ignore while in this region" state.
62 static void wlresetRegion();
63
64 static void Apply( LLWLParamSet* Sky, LLWaterParamSet* Water, LLUUID* WaterNormal );
65
66 // Callback when the user interacts with the notification.
67 static bool wlapplyCallback(const LLSD& notification,
68 const LLSD& response);
69
70 static LLWaterParamSet* mWater;
71 static LLWLParamSet* mSky;
72 static LLUUID* mWaterNormal;
73
74private:
75 static void Apply();
76
77 // The name of the water preset where the region settings are stored.
78 static const std::string wlWaterPresetName;
79
80 // The name of the sky preset where the region settings are stored.
81 static const std::string wlSkyPresetName;
82
83 // Restart the timer for temporarily ignoring settings.
84 static void wlrestartIgnoreTimer();
85
86 // Returns true if the ignore timer has expired (i.e. new settings
87 // should not be ignored anymore).
88 static bool wlignoreTimerHasExpired();
89};
90#endif \ No newline at end of file
diff --git a/linden/scripts/install.py b/linden/scripts/install.py
index a16034f..f09fc48 100755
--- a/linden/scripts/install.py
+++ b/linden/scripts/install.py
@@ -534,24 +534,24 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
534 platform, 534 platform,
535 cache_dir)) 535 cache_dir))
536 to_install = [] 536 to_install = []
537 to_uninstall = []
537 #print "self._installed",self._installed 538 #print "self._installed",self._installed
538 for ifile in ifiles: 539 for ifile in ifiles:
539 if ifile.pkgname not in self._installed: 540 if ifile.pkgname not in self._installed:
540 to_install.append(ifile) 541 to_install.append(ifile)
541 elif ifile.url not in self._installed[ifile.pkgname].urls(): 542 elif ifile.url not in self._installed[ifile.pkgname].urls():
543 to_uninstall.append(ifile.pkgname)
542 to_install.append(ifile) 544 to_install.append(ifile)
543 elif ifile.md5sum != \ 545 elif ifile.md5sum != \
544 self._installed[ifile.pkgname].get_md5sum(ifile.url): 546 self._installed[ifile.pkgname].get_md5sum(ifile.url):
545 # *TODO: We may want to uninstall the old version too 547 to_uninstall.append(ifile.pkgname)
546 # when we detect it is installed, but the md5 sum is
547 # different.
548 to_install.append(ifile) 548 to_install.append(ifile)
549 else: 549 else:
550 #print "Installation up to date:", 550 #print "Installation up to date:",
551 # ifile.pkgname,ifile.platform_path 551 # ifile.pkgname,ifile.platform_path
552 pass 552 pass
553 #print "to_install",to_install 553 #print "to_install",to_install
554 return to_install 554 return [to_install, to_uninstall]
555 555
556 def _install(self, to_install, install_dir): 556 def _install(self, to_install, install_dir):
557 for ifile in to_install: 557 for ifile in to_install:
@@ -620,12 +620,17 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
620 cache_dir = os.path.realpath(cache_dir) 620 cache_dir = os.path.realpath(cache_dir)
621 _mkdir(install_dir) 621 _mkdir(install_dir)
622 _mkdir(cache_dir) 622 _mkdir(cache_dir)
623 to_install = self._build_ifiles(platform, cache_dir) 623 to_install_uninstall = self._build_ifiles(platform, cache_dir)
624 to_install = to_install_uninstall[0]
625 to_uninstall = to_install_uninstall[1]
624 626
625 # Filter for files which we actually requested to install. 627 # Filter for files which we actually requested to install.
626 to_install = [ifl for ifl in to_install if ifl.pkgname in installables] 628 to_install = [ifl for ifl in to_install if ifl.pkgname in installables]
629 to_uninstall = [ifl for ifl in to_uninstall if ifl in installables]
627 for ifile in to_install: 630 for ifile in to_install:
628 ifile.fetch_local() 631 ifile.fetch_local()
632 if to_uninstall:
633 self.uninstall(to_uninstall, install_dir)
629 self._install(to_install, install_dir) 634 self._install(to_install, install_dir)
630 635
631 def do_install(self, installables, platform, install_dir, cache_dir=None, 636 def do_install(self, installables, platform, install_dir, cache_dir=None,