aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/etc/message.xml10
-rw-r--r--linden/indra/llcommon/lltimer.cpp28
-rw-r--r--linden/indra/llcommon/lltimer.h1
-rw-r--r--linden/indra/llmessage/CMakeLists.txt2
-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/llmessage/tests/lltemplatemessagedispatcher_test.cpp2
-rw-r--r--linden/indra/llui/llscrolllistctrl.cpp17
-rw-r--r--linden/indra/llui/llscrolllistctrl.h11
-rw-r--r--linden/indra/llwindow/llwindowmacosx-objc.h2
-rw-r--r--linden/indra/llwindow/llwindowmacosx-objc.mm37
-rw-r--r--linden/indra/newview/CMakeLists.txt13
-rw-r--r--linden/indra/newview/Info-Imprudence.plist2
-rw-r--r--linden/indra/newview/app_settings/settings.xml132
-rw-r--r--linden/indra/newview/hippoGridManager.cpp4
-rw-r--r--linden/indra/newview/hippoGridManager.h2
-rw-r--r--linden/indra/newview/hippoLimits.cpp141
-rw-r--r--linden/indra/newview/hippoLimits.h34
-rw-r--r--linden/indra/newview/kowopenregionsettings.cpp97
-rwxr-xr-xlinden/indra/newview/linux_tools/getvoice.sh35
-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.cpp6744
-rw-r--r--linden/indra/newview/llfloaterregioninfo.h20
-rw-r--r--linden/indra/newview/llfloatertools.cpp49
-rw-r--r--linden/indra/newview/llfloatertos.cpp584
-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/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.cpp10
-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_message_builder.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_message_log.xml31
-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
132 files changed, 10426 insertions, 4421 deletions
diff --git a/linden/etc/message.xml b/linden/etc/message.xml
index 461d7b8..0fdf364 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/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/CMakeLists.txt b/linden/indra/llmessage/CMakeLists.txt
index a484580..4723281 100644
--- a/linden/indra/llmessage/CMakeLists.txt
+++ b/linden/indra/llmessage/CMakeLists.txt
@@ -48,6 +48,7 @@ set(llmessage_SOURCE_FILES
48 llmail.cpp 48 llmail.cpp
49 llmessagebuilder.cpp 49 llmessagebuilder.cpp
50 llmessageconfig.cpp 50 llmessageconfig.cpp
51 llmessagelog.cpp
51 llmessagereader.cpp 52 llmessagereader.cpp
52 llmessagetemplate.cpp 53 llmessagetemplate.cpp
53 llmessagetemplateparser.cpp 54 llmessagetemplateparser.cpp
@@ -138,6 +139,7 @@ set(llmessage_HEADER_FILES
138 llmail.h 139 llmail.h
139 llmessagebuilder.h 140 llmessagebuilder.h
140 llmessageconfig.h 141 llmessageconfig.h
142 llmessagelog.h
141 llmessagereader.h 143 llmessagereader.h
142 llmessagetemplate.h 144 llmessagetemplate.h
143 llmessagetemplateparser.h 145 llmessagetemplateparser.h
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/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/linden/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
index d57f17f..0cf49c1 100644
--- a/linden/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
+++ b/linden/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
@@ -60,7 +60,7 @@ BOOL LLTemplateMessageReader::readMessage(const U8* data,class LLHost const &)
60} 60}
61 61
62BOOL gValidateMessage = FALSE; 62BOOL gValidateMessage = FALSE;
63BOOL LLTemplateMessageReader::validateMessage(const U8*, S32 buffer_size, LLHost const &sender, bool trusted) 63BOOL LLTemplateMessageReader::validateMessage(const U8*, S32 buffer_size, LLHost const &sender, bool trusted, BOOL custom)
64{ 64{
65 return gValidateMessage; 65 return gValidateMessage;
66} 66}
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/llwindow/llwindowmacosx-objc.h b/linden/indra/llwindow/llwindowmacosx-objc.h
index 14c9c92..a96246e 100644
--- a/linden/indra/llwindow/llwindowmacosx-objc.h
+++ b/linden/indra/llwindow/llwindowmacosx-objc.h
@@ -49,4 +49,4 @@ CursorRef createImageCursor(const char *fullpath, int hotspotX, int hotspotY);
49OSErr releaseImageCursor(CursorRef ref); 49OSErr releaseImageCursor(CursorRef ref);
50OSErr setImageCursor(CursorRef ref); 50OSErr setImageCursor(CursorRef ref);
51BOOL decodeImageQuartz(std::string filename, LLImageRaw *raw_image); 51BOOL decodeImageQuartz(std::string filename, LLImageRaw *raw_image);
52BOOL decodeImageQuartz(const UInt8* data, int len, LLImageRaw *raw_image); 52BOOL decodeImageQuartz(const UInt8* data, int len, LLImageRaw *raw_image, std::string ext);
diff --git a/linden/indra/llwindow/llwindowmacosx-objc.mm b/linden/indra/llwindow/llwindowmacosx-objc.mm
index abe8c5d..80ad087 100644
--- a/linden/indra/llwindow/llwindowmacosx-objc.mm
+++ b/linden/indra/llwindow/llwindowmacosx-objc.mm
@@ -43,12 +43,15 @@
43 */ 43 */
44 44
45#include "llwindowmacosx-objc.h" 45#include "llwindowmacosx-objc.h"
46#include "lldir.h"
46 47
47BOOL decodeImageQuartz(const UInt8* data, int len, LLImageRaw *raw_image) 48BOOL decodeImageQuartz(const UInt8* data, int len, LLImageRaw *raw_image, std::string ext)
48{ 49{
49 CFDataRef theData = CFDataCreate(kCFAllocatorDefault, data, len); 50 CFDataRef theData = CFDataCreate(kCFAllocatorDefault, data, len);
51
50 CGImageSourceRef srcRef = CGImageSourceCreateWithData(theData, NULL); 52 CGImageSourceRef srcRef = CGImageSourceCreateWithData(theData, NULL);
51 CGImageRef image_ref = CGImageSourceCreateImageAtIndex(srcRef, 0, NULL); 53 CGImageRef image_ref = CGImageSourceCreateImageAtIndex(srcRef, 0, NULL);
54 CFRelease(srcRef);
52 55
53 size_t width = CGImageGetWidth(image_ref); 56 size_t width = CGImageGetWidth(image_ref);
54 size_t height = CGImageGetHeight(image_ref); 57 size_t height = CGImageGetHeight(image_ref);
@@ -58,7 +61,7 @@ BOOL decodeImageQuartz(const UInt8* data, int len, LLImageRaw *raw_image)
58 UInt8* bitmap = (UInt8*)CFDataGetBytePtr(result); 61 UInt8* bitmap = (UInt8*)CFDataGetBytePtr(result);
59 62
60 CGImageAlphaInfo format = CGImageGetAlphaInfo(image_ref); 63 CGImageAlphaInfo format = CGImageGetAlphaInfo(image_ref);
61 if (format != kCGImageAlphaNone) 64 if (comps == 4)
62 { 65 {
63 vImage_Buffer vb; 66 vImage_Buffer vb;
64 vb.data = bitmap; 67 vb.data = bitmap;
@@ -68,29 +71,13 @@ BOOL decodeImageQuartz(const UInt8* data, int len, LLImageRaw *raw_image)
68 71
69 if (format & kCGImageAlphaPremultipliedFirst) 72 if (format & kCGImageAlphaPremultipliedFirst)
70 { 73 {
71 // Ele: ARGB -> BGRA on Intel, need to first reorder the bytes, then unpremultiply as RGBA :) 74 // Ele: Skip unpremultiplication for PSD, PNG and TGA files
72 llinfos << "Unpremultiplying BGRA8888" << llendl; 75 if (ext != std::string("psd") && ext != std::string("tga") && ext != std::string("png"))
73 76 vImageUnpremultiplyData_ARGB8888(&vb, &vb, 0);
74 for (int i=0; i<height; i++)
75 {
76 for (int j=0; j<bytes_per_row; j+=4)
77 {
78 unsigned char tmp[4];
79
80 tmp[0] = bitmap[j*height+3];
81 tmp[1] = bitmap[j*height+2];
82 tmp[2] = bitmap[j*height+1];
83 tmp[3] = bitmap[j*height];
84
85 memcpy(&bitmap[j*height], &tmp, 4);
86 }
87 }
88
89 vImageUnpremultiplyData_RGBA8888(&vb, &vb, 0);
90 } 77 }
91 else if (format & kCGImageAlphaPremultipliedLast) 78 else if (format & kCGImageAlphaPremultipliedLast)
92 { 79 {
93 llinfos << "Unpremultiplying RGBA8888" << llendl; 80 // Ele: Photoshop Native Transparency needs unmultiplication
94 vImageUnpremultiplyData_RGBA8888(&vb, &vb, 0); 81 vImageUnpremultiplyData_RGBA8888(&vb, &vb, 0);
95 } 82 }
96 } 83 }
@@ -100,7 +87,6 @@ BOOL decodeImageQuartz(const UInt8* data, int len, LLImageRaw *raw_image)
100 raw_image->verticalFlip(); 87 raw_image->verticalFlip();
101 88
102 CFRelease(theData); 89 CFRelease(theData);
103 CFRelease(srcRef);
104 CGImageRelease(image_ref); 90 CGImageRelease(image_ref);
105 CFRelease(result); 91 CFRelease(result);
106 92
@@ -112,7 +98,10 @@ BOOL decodeImageQuartz(std::string filename, LLImageRaw *raw_image)
112 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 98 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
113 NSURL *url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithCString:filename.c_str()]]; 99 NSURL *url = [[NSURL alloc] initFileURLWithPath:[NSString stringWithCString:filename.c_str()]];
114 NSData *data = [NSData dataWithContentsOfURL:url]; 100 NSData *data = [NSData dataWithContentsOfURL:url];
115 BOOL result = decodeImageQuartz((UInt8*)[data bytes], [data length], raw_image); 101
102 std::string ext = gDirUtilp->getExtension(filename);
103
104 BOOL result = decodeImageQuartz((UInt8*)[data bytes], [data length], raw_image, ext);
116 [pool release]; 105 [pool release];
117 return result; 106 return result;
118} 107}
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 829aa69..58c89eb 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -197,6 +197,8 @@ set(viewer_SOURCE_FILES
197 llfloaterlandmark.cpp 197 llfloaterlandmark.cpp
198 llfloatermap.cpp 198 llfloatermap.cpp
199 llfloatermemleak.cpp 199 llfloatermemleak.cpp
200 llfloatermessagebuilder.cpp
201 llfloatermessagelog.cpp
200 llfloatermute.cpp 202 llfloatermute.cpp
201 llfloaternamedesc.cpp 203 llfloaternamedesc.cpp
202 llfloaternewim.cpp 204 llfloaternewim.cpp
@@ -494,6 +496,11 @@ set(viewer_SOURCE_FILES
494 rlvfloaterbehaviour.cpp 496 rlvfloaterbehaviour.cpp
495 viewertime.cpp 497 viewertime.cpp
496 viewerversion.cpp 498 viewerversion.cpp
499 windlightsettingsupdate.cpp
500 wlfloatermanager.cpp
501 wlfloaterwindlightsend.cpp
502 wlretrievesettings.cpp
503 wlsettingsmanager.cpp
497 ) 504 )
498 505
499set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING 506set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING
@@ -647,6 +654,8 @@ set(viewer_HEADER_FILES
647 llfloaterlandmark.h 654 llfloaterlandmark.h
648 llfloatermap.h 655 llfloatermap.h
649 llfloatermemleak.h 656 llfloatermemleak.h
657 llfloatermessagebuilder.h
658 llfloatermessagelog.h
650 llfloatermute.h 659 llfloatermute.h
651 llfloaternamedesc.h 660 llfloaternamedesc.h
652 llfloaternewim.h 661 llfloaternewim.h
@@ -954,6 +963,10 @@ set(viewer_HEADER_FILES
954 VorbisFramework.h 963 VorbisFramework.h
955 viewertime.h 964 viewertime.h
956 viewerversion.h 965 viewerversion.h
966 wlfloatermanager.h
967 wlfloaterwindlightsend.h
968 wlretrievesettings.h
969 wlsettingsmanager.h
957 ) 970 )
958 971
959source_group("CMake Rules" FILES ViewerInstall.cmake) 972source_group("CMake Rules" FILES ViewerInstall.cmake)
diff --git a/linden/indra/newview/Info-Imprudence.plist b/linden/indra/newview/Info-Imprudence.plist
index 3fe2000..e7dc82d 100644
--- a/linden/indra/newview/Info-Imprudence.plist
+++ b/linden/indra/newview/Info-Imprudence.plist
@@ -32,7 +32,7 @@
32 </dict> 32 </dict>
33 </array> 33 </array>
34 <key>CFBundleVersion</key> 34 <key>CFBundleVersion</key>
35 <string>Experimental 2010.10.17</string> 35 <string>Experimental 2010.10.23</string>
36 <key>CSResourcesFileMapped</key> 36 <key>CSResourcesFileMapped</key>
37 <true/> 37 <true/>
38</dict> 38</dict>
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 11555fa..91ed5c2 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -195,6 +195,94 @@
195 <key>Value</key> 195 <key>Value</key>
196 <real>20</real> 196 <real>20</real>
197 </map> 197 </map>
198 <key>ClassicCloudHeight</key>
199 <map>
200 <key>Comment</key>
201 <string>Height for classic particle clouds</string>
202 <key>Persist</key>
203 <integer>1</integer>
204 <key>Type</key>
205 <string>F32</string>
206 <key>Value</key>
207 <integer>192</integer>
208 </map>
209 <key>ClassicCloudRange</key>
210 <map>
211 <key>Comment</key>
212 <string>Height range for classic particle clouds</string>
213 <key>Persist</key>
214 <integer>1</integer>
215 <key>Type</key>
216 <string>F32</string>
217 <key>Value</key>
218 <integer>48</integer>
219 </map>
220 <key>CloudCountMax</key>
221 <map>
222 <key>Comment</key>
223 <string>Max amount of particle clouds</string>
224 <key>Persist</key>
225 <integer>1</integer>
226 <key>Type</key>
227 <string>F32</string>
228 <key>Value</key>
229 <integer>20</integer>
230 </map>
231 <key>CloudVelocityScale</key>
232 <map>
233 <key>Comment</key>
234 <string>Particle cloud velocity</string>
235 <key>Persist</key>
236 <integer>1</integer>
237 <key>Type</key>
238 <string>F32</string>
239 <key>Value</key>
240 <integer>1</integer>
241 </map>
242 <key>CloudDecayRate</key>
243 <map>
244 <key>Comment</key>
245 <string>Particle cloud decay rate</string>
246 <key>Persist</key>
247 <integer>1</integer>
248 <key>Type</key>
249 <string>F32</string>
250 <key>Value</key>
251 <integer>-5</integer>
252 </map>
253 <key>CloudGrowRate</key>
254 <map>
255 <key>Comment</key>
256 <string>Particle cloud grow rate</string>
257 <key>Persist</key>
258 <integer>1</integer>
259 <key>Type</key>
260 <string>F32</string>
261 <key>Value</key>
262 <integer>5</integer>
263 </map>
264 <key>CloudUpdateRate</key>
265 <map>
266 <key>Comment</key>
267 <string>Particle cloud update rate</string>
268 <key>Persist</key>
269 <integer>1</integer>
270 <key>Type</key>
271 <string>F32</string>
272 <key>Value</key>
273 <integer>1</integer>
274 </map>
275 <key>CloudDensity</key>
276 <map>
277 <key>Comment</key>
278 <string>Particle cloud density</string>
279 <key>Persist</key>
280 <integer>1</integer>
281 <key>Type</key>
282 <string>F32</string>
283 <key>Value</key>
284 <integer>25</integer>
285 </map>
198 <key>ConnectingToRegionTimeout</key> 286 <key>ConnectingToRegionTimeout</key>
199 <map> 287 <map>
200 <key>Comment</key> 288 <key>Comment</key>
@@ -418,6 +506,17 @@
418 <key>Value</key> 506 <key>Value</key>
419 <integer>0</integer> 507 <integer>0</integer>
420 </map> 508 </map>
509 <key>GridUpdateList</key>
510 <map>
511 <key>Comment</key>
512 <string>Location to download default grid options.</string>
513 <key>Persist</key>
514 <integer>1</integer>
515 <key>Type</key>
516 <string>String</string>
517 <key>Value</key>
518 <string>http://imprudenceviewer.org/app/grids/</string>
519 </map>
421 <key>GoAction</key> 520 <key>GoAction</key>
422 <map> 521 <map>
423 <key>Comment</key> 522 <key>Comment</key>
@@ -2936,39 +3035,6 @@
2936 <key>Value</key> 3035 <key>Value</key>
2937 <integer>1</integer> 3036 <integer>1</integer>
2938 </map> 3037 </map>
2939 <key>BulkChangeIncludeAnimations</key>
2940 <map>
2941 <key>Comment</key>
2942 <string>Bulk permission changes affect animations</string>
2943 <key>Persist</key>
2944 <integer>1</integer>
2945 <key>Type</key>
2946 <string>Boolean</string>
2947 <key>Value</key>
2948 <integer>1</integer>
2949 </map>
2950 <key>BulkChangeIncludeAnimations</key>
2951 <map>
2952 <key>Comment</key>
2953 <string>Bulk permission changes affect animations</string>
2954 <key>Persist</key>
2955 <integer>1</integer>
2956 <key>Type</key>
2957 <string>Boolean</string>
2958 <key>Value</key>
2959 <integer>1</integer>
2960 </map>
2961 <key>BulkChangeIncludeAnimations</key>
2962 <map>
2963 <key>Comment</key>
2964 <string>Bulk permission changes affect animations</string>
2965 <key>Persist</key>
2966 <integer>1</integer>
2967 <key>Type</key>
2968 <string>Boolean</string>
2969 <key>Value</key>
2970 <integer>1</integer>
2971 </map>
2972 <key>BulkChangeIncludeBodyParts</key> 3038 <key>BulkChangeIncludeBodyParts</key>
2973 <map> 3039 <map>
2974 <key>Comment</key> 3040 <key>Comment</key>
diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp
index 5a229fd..dd0fa35 100644
--- a/linden/indra/newview/hippoGridManager.cpp
+++ b/linden/indra/newview/hippoGridManager.cpp
@@ -799,7 +799,7 @@ void HippoGridManager::loadFromFile()
799 parseFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml"), !mGridInfo.empty()); 799 parseFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml"), !mGridInfo.empty());
800 // merge grid info from web site, if newer. Force load, if list of grids is empty. 800 // merge grid info from web site, if newer. Force load, if list of grids is empty.
801 if (gSavedSettings.getBOOL("CheckForGridUpdates")) 801 if (gSavedSettings.getBOOL("CheckForGridUpdates"))
802 parseUrl("http://imprudenceviewer.org/app/grids/", !mGridInfo.empty()); 802 parseUrl(gSavedSettings.getString("GridUpdateList"), !mGridInfo.empty());
803 803
804 std::string last_grid = gSavedSettings.getString("LastSelectedGrid"); 804 std::string last_grid = gSavedSettings.getString("LastSelectedGrid");
805 if (last_grid.empty()) last_grid = gSavedSettings.getString("DefaultGrid"); 805 if (last_grid.empty()) last_grid = gSavedSettings.getString("DefaultGrid");
@@ -808,7 +808,7 @@ void HippoGridManager::loadFromFile()
808} 808}
809 809
810 810
811void HippoGridManager::parseUrl(const char* url, bool mergeIfNewer) 811void HippoGridManager::parseUrl(const std::string url, bool mergeIfNewer)
812{ 812{
813 llinfos << "Loading grid info from '" << url << "'." << llendl; 813 llinfos << "Loading grid info from '" << url << "'." << llendl;
814 814
diff --git a/linden/indra/newview/hippoGridManager.h b/linden/indra/newview/hippoGridManager.h
index bc19ff8..8429dba 100644
--- a/linden/indra/newview/hippoGridManager.h
+++ b/linden/indra/newview/hippoGridManager.h
@@ -172,7 +172,7 @@ private:
172 void cleanup(); 172 void cleanup();
173 void loadFromFile(); 173 void loadFromFile();
174 void parseFile(const std::string& fileName, bool mergeIfNewer); 174 void parseFile(const std::string& fileName, bool mergeIfNewer);
175 void parseUrl(const char* url, bool mergeIfNewer); 175 void parseUrl(const std::string url, bool mergeIfNewer);
176 void parseData(LLSD &gridInfo, bool mergeIfNewer); 176 void parseData(LLSD &gridInfo, bool mergeIfNewer);
177}; 177};
178 178
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..86a426c 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
@@ -41,7 +47,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode
41 const LLSD& context, 47 const LLSD& context,
42 const LLSD& input) const 48 const LLSD& input) const
43 { 49 {
44 if (!input.isMap() || !input.has("body")) 50 if (!input || !context || !input.isMap() || !input.has("body"))
45 { 51 {
46 llinfos << "malformed OpenRegionInfo update!" << llendl; 52 llinfos << "malformed OpenRegionInfo update!" << llendl;
47 return; 53 return;
@@ -62,19 +68,24 @@ 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 F32 distance = body["DrawDistance"].asReal();
81 if (distance > 0)
82 {
83 gAgent.mDrawDistance = distance;
84 }
74 } 85 }
75 if ( body.has("ForceDrawDistance") ) 86 if ( body.has("ForceDrawDistance") )
76 { 87 {
77 //IMPLEMENT ME 88 gAgent.mLockedDrawDistance = body["ForceDrawDistance"].asInteger() == 1;
78 } 89 }
79 if ( body.has("LSLFunctions") ) 90 if ( body.has("LSLFunctions") )
80 { 91 {
@@ -82,19 +93,23 @@ class OpenRegionInfoUpdate : public LLHTTPNode
82 } 93 }
83 if ( body.has("MaxDragDistance") ) 94 if ( body.has("MaxDragDistance") )
84 { 95 {
85 //IMPLEMENT ME 96 gHippoLimits->mMaxDragDistance = body["MaxDragDistance"].asReal();
86 } 97 }
87 if ( body.has("MinHoleSize") ) 98 if ( body.has("MinHoleSize") )
88 { 99 {
100 //Note: does NOT update correctly
89 gHippoLimits->mMinHoleSize = body["MinHoleSize"].asReal(); 101 gHippoLimits->mMinHoleSize = body["MinHoleSize"].asReal();
102 limitschanged = TRUE;
90 } 103 }
91 if ( body.has("MaxHollowSize") ) 104 if ( body.has("MaxHollowSize") )
92 { 105 {
106 //Note: does NOT update correctly
93 gHippoLimits->mMaxHollow = body["MaxHollowSize"].asReal(); 107 gHippoLimits->mMaxHollow = body["MaxHollowSize"].asReal();
108 limitschanged = TRUE;
94 } 109 }
95 if ( body.has("MaxInventoryItemsTransfer") ) 110 if ( body.has("MaxInventoryItemsTransfer") )
96 { 111 {
97 //IMPLEMENT ME 112 gHippoLimits->mMaxInventoryItemsTransfer = body["MaxInventoryItemsTransfer"].asReal();
98 } 113 }
99 if ( body.has("MaxLinkCount") ) 114 if ( body.has("MaxLinkCount") )
100 { 115 {
@@ -102,22 +117,28 @@ class OpenRegionInfoUpdate : public LLHTTPNode
102 } 117 }
103 if ( body.has("MaxLinkCountPhys") ) 118 if ( body.has("MaxLinkCountPhys") )
104 { 119 {
105 //IMPLEMENT ME 120 gHippoLimits->mMaxPhysLinkedPrims = body["MaxLinkCountPhys"].asInteger();
106 } 121 }
107 if ( body.has("MaxPhysPrimScale") ) 122 if ( body.has("MaxPos") )
108 { 123 {
109 //IMPLEMENT ME 124 gHippoLimits->mMaxPrimXPos = body["MaxPosX"].asReal();
125 gHippoLimits->mMaxPrimYPos = body["MaxPosY"].asReal();
126 gHippoLimits->mMaxPrimZPos = body["MaxPosZ"].asReal();
127 limitschanged = TRUE;
110 } 128 }
111 if ( body.has("MaxPos") ) 129 if ( body.has("MinPos") )
112 { 130 {
113 //IMPLEMENT ME 131 gHippoLimits->mMinPrimXPos = body["MinPosX"].asReal();
132 gHippoLimits->mMinPrimYPos = body["MinPosY"].asReal();
133 gHippoLimits->mMinPrimZPos = body["MinPosZ"].asReal();
134 limitschanged = TRUE;
114 } 135 }
115 if ( body.has("MaxPrimScale") ) 136 if ( body.has("MaxPrimScale") )
116 { 137 {
117 gHippoLimits->mMaxPrimScale = body["MaxPrimScale"].asReal(); 138 gHippoLimits->mMaxPrimScale = body["MaxPrimScale"].asReal();
118 limitschanged = TRUE; 139 limitschanged = TRUE;
119 } 140 }
120 if ( body.has("MinPos") ) 141 if ( body.has("MaxPhysPrimScale") )
121 { 142 {
122 //IMPLEMENT ME 143 //IMPLEMENT ME
123 } 144 }
@@ -128,32 +149,68 @@ class OpenRegionInfoUpdate : public LLHTTPNode
128 } 149 }
129 if ( body.has("OffsetOfUTC") ) 150 if ( body.has("OffsetOfUTC") )
130 { 151 {
131 //IMPLEMENT ME 152 gSavedSettings.setS32("TimeOffset", body["OffsetOfUTC"].asReal());
153 gSavedSettings.setBOOL("UseTimeOffset", true);
154 }
155 if ( body.has("OffsetOfUTCDST") )
156 {
157 gSavedSettings.setBOOL("TimeOffsetDST", body["OffsetOfUTCDST"].asInteger() == 1 ? TRUE : FALSE);
132 } 158 }
133 if ( body.has("RenderWater") ) 159 if ( body.has("RenderWater") )
134 { 160 {
135 gSavedSettings.setBOOL("RenderWater", body["RenderWater"].asBoolean()); 161 gHippoLimits->mRenderWater = body["RenderWater"].asInteger() == 1 ? TRUE : FALSE;
162 gAgent.getRegion()->rebuildWater();
136 } 163 }
137 if ( body.has("SayDistance") ) 164 if ( body.has("SayDistance") )
138 { 165 {
139 //IMPLEMENT ME 166 gSavedSettings.setU32("ChatDistance", body["SayDistance"].asReal());
140 } 167 }
141 if ( body.has("ShoutDistance") ) 168 if ( body.has("ShoutDistance") )
142 { 169 {
143 //IMPLEMENT ME 170 //IMPLEMENT ME
144 } 171 }
172 if ( body.has("WhisperDistance") )
173 {
174 //IMPLEMENT ME
175 }
145 if ( body.has("ToggleTeenMode") ) 176 if ( body.has("ToggleTeenMode") )
146 { 177 {
147 gSavedSettings.setBOOL("ToggleTeenMode", body["ToggleTeenMode"].asBoolean()); 178 gHippoLimits->mEnableTeenMode = body["ToggleTeenMode"].asInteger() == 1 ? TRUE : FALSE;
148
149 } 179 }
150 if ( body.has("WhisperDistance") ) 180 if ( body.has("SetTeenMode") )
151 { 181 {
152 //IMPLEMENT ME 182 gAgent.setTeen( body["SetTeenMode"].asInteger() == 1 ? TRUE : FALSE );
183 LLFloaterWorldMap::reloadIcons(NULL);
184 llinfos << "PG status set to " << (S32)gAgent.isTeen() << llendl;
185 }
186 if ( body.has("ShowTags") )
187 {
188 gHippoLimits->mRenderName = body["ShowTags"].asReal();
189 }
190 if ( body.has("EnforceMaxBuild") )
191 {
192 gHippoLimits->mEnforceMaxBuild = body["EnforceMaxBuild"].asInteger() == 1 ? TRUE : FALSE;
193 limitschanged = TRUE;
194 }
195 if ( body.has("MaxGroups") )
196 {
197 gHippoLimits->mMaxAgentGroups = body["MaxGroups"].asReal();
198 }
199 if ( body.has("AllowParcelWindLight") )
200 {
201 gHippoLimits->mAllowParcelWindLight = body["AllowParcelWindLight"].asInteger() == 1;
153 } 202 }
154 203
155 if (limitschanged) 204 if (limitschanged)
156 gFloaterTools->updateToolsSizeLimits(); 205 gFloaterTools->updateToolsSizeLimits();
206
207 //Update the floater if its around
208 LLPanelRegionOpenSettingsInfo* floater = LLFloaterRegionInfo::getPanelOpenSettings();
209
210 if (floater != NULL)
211 {
212 floater->refreshFromRegion(gAgent.getRegion());
213 }
157 } 214 }
158}; 215};
159 216
diff --git a/linden/indra/newview/linux_tools/getvoice.sh b/linden/indra/newview/linux_tools/getvoice.sh
deleted file mode 100755
index afebda9..0000000
--- a/linden/indra/newview/linux_tools/getvoice.sh
+++ /dev/null
@@ -1,35 +0,0 @@
1#!/bin/bash
2
3SCRIPTSRC=`readlink -f "$0" || echo "$0"`
4RUN_PATH=`dirname "${SCRIPTSRC}" || echo .`
5
6BINARY_SYSTEM=$(expr match "$(file -b /bin/uname)" '\(.*executable\)')
7BINARY_VIEWER=$(expr match "$(file -b ${RUN_PATH}/bin/do-not-directly-run-imprudence-bin)" '\(.*executable\)')
8if ( [ "$BINARY_SYSTEM" == "ELF 64-bit LSB executable" ] && [ "$BINARY_VIEWER" == "ELF 64-bit LSB executable" ] ); then
9 LIB_INSTALLDIR="lib32/" # It's 32bit voice on 64bit Linux and 64bit viewer. Not using lib/ for avoiding ambiguity.
10else
11 LIB_INSTALLDIR="lib/" # It's 32bit voice on 32 or 64bit Linux and 32bit viewer.
12fi
13
14mkdir -p $LIB_INSTALLDIR
15wget http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-2.1.3010.6270-linux-20090309.tar.bz2
16tar -C ./bin --strip-components 4 -xjf vivox-*.tar.bz2 --wildcards '*SLVoice'
17tar -C ./$LIB_INSTALLDIR --strip-components 4 -xjf vivox-*.tar.bz2 --wildcards '*.so*'
18rm vivox-*.tar.bz2
19
20#now we have Vivox' OpenAL, but we want Imprudence (32bit for voice) OpenAL which is way better:
21wget http://imprudenceviewer.org/download/libs/openal-linux32-20100426.tar.bz2
22tar -C ./$LIB_INSTALLDIR --strip-components 3 -xjf openal-*.tar.bz2 --wildcards '*openal.so*'
23rm openal-*.tar.bz2
24
25# For 64bit viewer on 64bit Linux we also need a 32bit libidn.so.11 and libuuid.so.1
26if [ -d ${RUN_PATH}/lib32/ ]; then
27 wget http://imprudenceviewer.org/download/libs/libidn20100312.tar.bz2
28 tar -C $LIB_INSTALLDIR --strip-components 1 -xjf libidn*.tar.bz2 --wildcards '*.so*'
29 rm libidn*.tar.bz2
30
31 wget http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/libuuid-linux-20090417.tar.bz2
32 tar -C ./$LIB_INSTALLDIR --strip-components 3 -xjf libuuid-*.tar.bz2 --wildcards '*.so*'
33 rm libuuid-*.tar.bz2
34fi
35
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index fba530f..8109196 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"
@@ -110,6 +109,7 @@
110#include "lltoolmgr.h" 109#include "lltoolmgr.h"
111#include "lltoolpie.h" 110#include "lltoolpie.h"
112#include "lltoolview.h" 111#include "lltoolview.h"
112#include "lltrans.h"
113#include "llui.h" // for make_ui_sound 113#include "llui.h" // for make_ui_sound
114#include "llurldispatcher.h" 114#include "llurldispatcher.h"
115#include "llviewercamera.h" 115#include "llviewercamera.h"
@@ -407,7 +407,17 @@ LLAgent::LLAgent() :
407 mWearablesLoaded(FALSE), 407 mWearablesLoaded(FALSE),
408 mTextureCacheQueryID(0), 408 mTextureCacheQueryID(0),
409 mAppearanceSerialNum(0), 409 mAppearanceSerialNum(0),
410 mbTeleportKeepsLookAt(false) 410 mbTeleportKeepsLookAt(false),
411
412 mLureShow(FALSE),
413 mLureName(""),
414 mLurePosGlobal(),
415 mLureGlobalX(0),
416 mLureGlobalY(0),
417 mLureX(0),
418 mLureY(0),
419 mLureZ(0),
420 mLureMaturityString("")
411{ 421{
412 U32 i; 422 U32 i;
413 for (i = 0; i < TOTAL_CONTROLS; i++) 423 for (i = 0; i < TOTAL_CONTROLS; i++)
@@ -432,6 +442,7 @@ LLAgent::LLAgent() :
432void LLAgent::init() 442void LLAgent::init()
433{ 443{
434 mDrawDistance = gSavedSettings.getF32("RenderFarClip"); 444 mDrawDistance = gSavedSettings.getF32("RenderFarClip");
445 mLockedDrawDistance = FALSE;
435 446
436 // *Note: this is where LLViewerCamera::getInstance() used to be constructed. 447 // *Note: this is where LLViewerCamera::getInstance() used to be constructed.
437 448
@@ -6017,6 +6028,14 @@ void LLAgent::setHomePosRegion( const U64& region_handle, const LLVector3& pos_r
6017 mHomePosRegion = pos_region; 6028 mHomePosRegion = pos_region;
6018} 6029}
6019 6030
6031void LLAgent::takeHomeScreenshot()
6032{
6033 std::string snap_filename = gDirUtilp->getLindenUserDir();
6034 snap_filename += gDirUtilp->getDirDelimiter();
6035 snap_filename += SCREEN_HOME_FILENAME;
6036 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, FALSE);
6037}
6038
6020BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global ) 6039BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global )
6021{ 6040{
6022 if(!mHaveHomePosition) 6041 if(!mHaveHomePosition)
@@ -8086,5 +8105,65 @@ LLVector3 LLAgent::getLastCoords()
8086 return mLastCoordinates; 8105 return mLastCoordinates;
8087} 8106}
8088 8107
8108void 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)
8109{
8110 const LLVector3d posglobal = LLVector3d(F64(global_x), F64(global_y), F64(0));
8111 LLSimInfo* siminfo;
8112 siminfo = LLWorldMap::getInstance()->simInfoFromPosGlobal(posglobal);
8113 std::string sim_name;
8114 LLWorldMap::getInstance()->simNameFromPosGlobal( posglobal, sim_name );
8115
8116 if (siminfo)
8117 {
8118 llinfos << fromname << "'s teleport lure is to " << sim_name.c_str() << " (" << maturity << ")" << llendl;
8119 LLStringUtil::format_map_t args;
8120 args["[NAME]"] = fromname;
8121 args["[DESTINATION]"] = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(x), S32(y), S32(z));
8122 std::string msg = LLTrans::getString("TeleportLureMaturity", args);
8123 if (maturity != "")
8124 {
8125 msg.append(llformat(" (%s)", maturity.c_str()));
8126 }
8127 LLChat chat(msg);
8128 LLFloaterChat::addChat(chat);
8129 }
8130 else
8131 {
8132 mLureShow = TRUE;
8133 mLureName = fromname;
8134 mLurePosGlobal = posglobal;
8135 mLureGlobalX = U16(global_x / 256);
8136 mLureGlobalY = U16(global_y / 256);
8137 mLureX = x;
8138 mLureY = y;
8139 mLureZ = z;
8140 mLureMaturityString = maturity;
8141 LLWorldMap::getInstance()->sendMapBlockRequest(mLureGlobalX, mLureGlobalY, mLureGlobalX, mLureGlobalY, true);
8142 }
8143}
8144
8145void LLAgent::onFoundLureDestination()
8146{
8147 mLureShow = FALSE;
8148 LLSimInfo* siminfo;
8149 siminfo = LLWorldMap::getInstance()->simInfoFromPosGlobal(mLurePosGlobal);
8150 std::string sim_name;
8151 LLWorldMap::getInstance()->simNameFromPosGlobal( mLurePosGlobal, sim_name );
8152
8153 if (siminfo && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)))
8154 {
8155 llinfos << mLureName << " is offering a TP to " << sim_name.c_str() << " (" << mLureMaturityString << ")" << llendl;
8156 LLStringUtil::format_map_t args;
8157 args["[NAME]"] = mLureName;
8158 args["[DESTINATION]"] = LLURLDispatcher::buildSLURL(sim_name.c_str(), S32(mLureX), S32(mLureY), S32(mLureZ));
8159 std::string msg = LLTrans::getString("TeleportOfferMaturity", args);
8160 if (mLureMaturityString != "")
8161 {
8162 msg.append(llformat(" (%s)", mLureMaturityString.c_str()));
8163 }
8164 LLChat chat(msg);
8165 LLFloaterChat::addChat(chat);
8166 }
8167}
8089 8168
8090// EOF 8169// 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 97deca0..3d8be5f 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -362,7 +362,7 @@ void request_initial_instant_messages()
362 static BOOL requested = FALSE; 362 static BOOL requested = FALSE;
363 if (!requested 363 if (!requested
364 && gMessageSystem 364 && gMessageSystem
365 && LLMuteList::getInstance()->isLoaded() 365 //&& LLMuteList::getInstance()->isLoaded() //We don't always want to have a mute list module
366 && gAgent.getAvatarObject()) 366 && gAgent.getAvatarObject())
367 { 367 {
368 // Auto-accepted inventory items may require the avatar object 368 // 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..9e6f323 100644
--- a/linden/indra/newview/llfloaterregioninfo.cpp
+++ b/linden/indra/newview/llfloaterregioninfo.cpp
@@ -1,3298 +1,3446 @@
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 // We only use this panel on Aurora-based sims -- MC
186 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 186 std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings");
187 187 if (!url.empty())
188 panel = new LLPanelRegionTextureInfo; 188 {
189 mInfoPanels.push_back(panel); 189 panel = new LLPanelRegionOpenSettingsInfo;
190 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml"); 190 mInfoPanels.push_back(panel);
191 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 191 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_open_region_settings.xml");
192 192 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
193 panel = new LLPanelRegionTerrainInfo; 193 }
194 mInfoPanels.push_back(panel); 194
195 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml"); 195 panel = new LLPanelRegionDebugInfo;
196 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 196 mInfoPanels.push_back(panel);
197 197 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.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 LLPanelRegionTextureInfo;
201 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 201 mInfoPanels.push_back(panel);
202 202 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.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 LLPanelRegionTerrainInfo;
206 mTab->addTabPanel(panel, panel->getLabel(), FALSE); 206 mInfoPanels.push_back(panel);
207 207 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml");
208 gMessageSystem->setHandlerFunc( 208 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
209 "EstateOwnerMessage", 209
210 &processEstateOwnerRequest); 210 panel = new LLPanelEstateInfo;
211 211 mInfoPanels.push_back(panel);
212 return TRUE; 212 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_estate.xml");
213} 213 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
214 214
215LLFloaterRegionInfo::~LLFloaterRegionInfo() 215 panel = new LLPanelEstateCovenant;
216{ 216 mInfoPanels.push_back(panel);
217} 217 LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_covenant.xml");
218 218 mTab->addTabPanel(panel, panel->getLabel(), FALSE);
219void LLFloaterRegionInfo::onOpen() 219
220{ 220 gMessageSystem->setHandlerFunc(
221 LLRect rect = gSavedSettings.getRect("FloaterRegionInfo"); 221 "EstateOwnerMessage",
222 S32 left, top; 222 &processEstateOwnerRequest);
223 gFloaterView->getNewFloaterPosition(&left, &top); 223
224 rect.translate(left,top); 224 return TRUE;
225 225}
226 refreshFromRegion(gAgent.getRegion()); 226
227 requestRegionInfo(); 227LLFloaterRegionInfo::~LLFloaterRegionInfo()
228 LLFloater::onOpen(); 228{
229} 229}
230 230
231// static 231void LLFloaterRegionInfo::onOpen()
232void LLFloaterRegionInfo::requestRegionInfo() 232{
233{ 233 LLRect rect = gSavedSettings.getRect("FloaterRegionInfo");
234 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels"); 234 S32 left, top;
235 235 gFloaterView->getNewFloaterPosition(&left, &top);
236 tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE); 236 rect.translate(left,top);
237 tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE); 237
238 tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE); 238 refreshFromRegion(gAgent.getRegion());
239 tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE); 239 requestRegionInfo();
240 240 LLFloater::onOpen();
241 // Must allow anyone to request the RegionInfo data 241}
242 // so non-owners/non-gods can see the values. 242
243 // Therefore can't use an EstateOwnerMessage JC 243// static
244 LLMessageSystem* msg = gMessageSystem; 244void LLFloaterRegionInfo::requestRegionInfo()
245 msg->newMessage("RequestRegionInfo"); 245{
246 msg->nextBlock("AgentData"); 246 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
247 msg->addUUID("AgentID", gAgent.getID()); 247
248 msg->addUUID("SessionID", gAgent.getSessionID()); 248 tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE);
249 gAgent.sendReliableMessage(); 249 tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE);
250} 250 tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE);
251 251 tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE);
252// static 252 tab->getChild<LLPanel>("RegionSettings")->setCtrlsEnabled(FALSE);
253void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) 253
254{ 254 // Must allow anyone to request the RegionInfo data
255 static LLDispatcher dispatch; 255 // so non-owners/non-gods can see the values.
256 if(!findInstance()) 256 // Therefore can't use an EstateOwnerMessage JC
257 { 257 LLMessageSystem* msg = gMessageSystem;
258 return; 258 msg->newMessage("RequestRegionInfo");
259 } 259 msg->nextBlock("AgentData");
260 260 msg->addUUID("AgentID", gAgent.getID());
261 if (!estate_dispatch_initialized) 261 msg->addUUID("SessionID", gAgent.getSessionID());
262 { 262 gAgent.sendReliableMessage();
263 LLPanelEstateInfo::initDispatch(dispatch); 263}
264 } 264
265 265// static
266 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels"); 266void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
267 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate"); 267{
268 268 static LLDispatcher dispatch;
269 // unpack the message 269 if(!findInstance())
270 std::string request; 270 {
271 LLUUID invoice; 271 return;
272 LLDispatcher::sparam_t strings; 272 }
273 LLDispatcher::unpackMessage(msg, request, invoice, strings); 273
274 if(invoice != getLastInvoice()) 274 if (!estate_dispatch_initialized)
275 { 275 {
276 llwarns << "Mismatched Estate message: " << request << llendl; 276 LLPanelEstateInfo::initDispatch(dispatch);
277 return; 277 }
278 } 278
279 279 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
280 //dispatch the message 280 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
281 dispatch.dispatch(request, invoice, strings); 281
282 282 // unpack the message
283 LLViewerRegion* region = gAgent.getRegion(); 283 std::string request;
284 panel->updateControls(region); 284 LLUUID invoice;
285} 285 LLDispatcher::sparam_t strings;
286 286 LLDispatcher::unpackMessage(msg, request, invoice, strings);
287 287 if(invoice != getLastInvoice())
288// static 288 {
289void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) 289 llwarns << "Mismatched Estate message: " << request << llendl;
290{ 290 return;
291 LLPanel* panel; 291 }
292 292
293 llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl; 293 //dispatch the message
294 if(!findInstance()) 294 dispatch.dispatch(request, invoice, strings);
295 { 295
296 return; 296 LLViewerRegion* region = gAgent.getRegion();
297 } 297 panel->updateControls(region);
298 298}
299 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels"); 299
300 300
301 LLViewerRegion* region = gAgent.getRegion(); 301// static
302 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 302void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
303 303{
304 // extract message 304 LLPanel* panel;
305 std::string sim_name; 305
306 std::string sim_type = LLTrans::getString("land_type_unknown"); 306 llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl;
307 U32 region_flags; 307 if(!findInstance())
308 U8 agent_limit; 308 {
309 F32 object_bonus_factor; 309 return;
310 U8 sim_access; 310 }
311 F32 water_height; 311
312 F32 terrain_raise_limit; 312 LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
313 F32 terrain_lower_limit; 313
314 BOOL use_estate_sun; 314 LLViewerRegion* region = gAgent.getRegion();
315 F32 sun_hour; 315 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
316 msg->getString("RegionInfo", "SimName", sim_name); 316
317 msg->getU32("RegionInfo", "RegionFlags", region_flags); 317 // extract message
318 msg->getU8("RegionInfo", "MaxAgents", agent_limit); 318 std::string sim_name;
319 msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor); 319 std::string sim_type = LLTrans::getString("land_type_unknown");
320 msg->getU8("RegionInfo", "SimAccess", sim_access); 320 U32 region_flags;
321 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height); 321 U8 agent_limit;
322 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit); 322 F32 object_bonus_factor;
323 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit); 323 U8 sim_access;
324 msg->getBOOL("RegionInfo", "UseEstateSun", use_estate_sun); 324 F32 water_height;
325 // actually the "last set" sun hour, not the current sun hour. JC 325 F32 terrain_raise_limit;
326 msg->getF32("RegionInfo", "SunHour", sun_hour); 326 F32 terrain_lower_limit;
327 // the only reasonable way to decide if we actually have any data is to 327 BOOL use_estate_sun;
328 // check to see if any of these fields have nonzero sizes 328 F32 sun_hour;
329 if (msg->getSize("RegionInfo2", "ProductSKU") > 0 || 329 msg->getString("RegionInfo", "SimName", sim_name);
330 msg->getSize("RegionInfo2", "ProductName") > 0) 330 msg->getU32("RegionInfo", "RegionFlags", region_flags);
331 { 331 msg->getU8("RegionInfo", "MaxAgents", agent_limit);
332 msg->getString("RegionInfo2", "ProductName", sim_type); 332 msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor);
333 } 333 msg->getU8("RegionInfo", "SimAccess", sim_access);
334 334 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height);
335 // GENERAL PANEL 335 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit);
336 panel = tab->getChild<LLPanel>("General"); 336 msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit);
337 panel->childSetValue("region_text", LLSD(sim_name)); 337 msg->getBOOL("RegionInfo", "UseEstateSun", use_estate_sun);
338 panel->childSetValue("region_type", LLSD(sim_type)); 338 // actually the "last set" sun hour, not the current sun hour. JC
339 panel->childSetValue("version_channel_text", gLastVersionChannel); 339 msg->getF32("RegionInfo", "SunHour", sun_hour);
340 340 // the only reasonable way to decide if we actually have any data is to
341 panel->childSetValue("block_terraform_check", (region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE ); 341 // check to see if any of these fields have nonzero sizes
342 panel->childSetValue("block_fly_check", (region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE ); 342 if (msg->getSize("RegionInfo2", "ProductSKU") > 0 ||
343 panel->childSetValue("allow_damage_check", (region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE ); 343 msg->getSize("RegionInfo2", "ProductName") > 0)
344 panel->childSetValue("restrict_pushobject", (region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE ); 344 {
345 panel->childSetValue("allow_land_resell_check", (region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE ); 345 msg->getString("RegionInfo2", "ProductName", sim_type);
346 panel->childSetValue("allow_parcel_changes_check", (region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE ); 346 }
347 panel->childSetValue("block_parcel_search_check", (region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE ); 347
348 panel->childSetValue("agent_limit_spin", LLSD((F32)agent_limit) ); 348 // GENERAL PANEL
349 panel->childSetValue("object_bonus_spin", LLSD(object_bonus_factor) ); 349 panel = tab->getChild<LLPanel>("General");
350 panel->childSetValue("access_combo", LLSD(sim_access) ); 350 panel->childSetValue("region_text", LLSD(sim_name));
351 351 panel->childSetValue("region_type", LLSD(sim_type));
352 352 panel->childSetValue("version_channel_text", gLastVersionChannel);
353 // detect teen grid for maturity 353
354 354 panel->childSetValue("block_terraform_check", (region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE );
355 U32 parent_estate_id; 355 panel->childSetValue("block_fly_check", (region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE );
356 msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id); 356 panel->childSetValue("allow_damage_check", (region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE );
357 BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that 357 panel->childSetValue("restrict_pushobject", (region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE );
358 panel->childSetEnabled("access_combo", gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); 358 panel->childSetValue("allow_land_resell_check", (region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE );
359 panel->setCtrlsEnabled(allow_modify); 359 panel->childSetValue("allow_parcel_changes_check", (region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE );
360 360 panel->childSetValue("block_parcel_search_check", (region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE );
361 361 panel->childSetValue("agent_limit_spin", LLSD((F32)agent_limit) );
362 // DEBUG PANEL 362 panel->childSetValue("object_bonus_spin", LLSD(object_bonus_factor) );
363 panel = tab->getChild<LLPanel>("Debug"); 363 panel->childSetValue("access_combo", LLSD(sim_access) );
364 364
365 panel->childSetValue("region_text", LLSD(sim_name) ); 365
366 panel->childSetValue("disable_scripts_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) ); 366 // detect teen grid for maturity
367 panel->childSetValue("disable_collisions_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) ); 367
368 panel->childSetValue("disable_physics_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) ); 368 U32 parent_estate_id;
369 panel->setCtrlsEnabled(allow_modify); 369 msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id);
370 370 BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that
371 // TERRAIN PANEL 371 panel->childSetEnabled("access_combo", gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid));
372 panel = tab->getChild<LLPanel>("Terrain"); 372 panel->setCtrlsEnabled(allow_modify);
373 373
374 panel->childSetValue("region_text", LLSD(sim_name)); 374 // RegionSettings PANEL
375 panel->childSetValue("water_height_spin", LLSD(water_height)); 375 panel = tab->getChild<LLPanel>("RegionSettings");
376 panel->childSetValue("terrain_raise_spin", LLSD(terrain_raise_limit)); 376 panel->setCtrlsEnabled(allow_modify);
377 panel->childSetValue("terrain_lower_spin", LLSD(terrain_lower_limit)); 377
378 panel->childSetValue("use_estate_sun_check", LLSD(use_estate_sun)); 378 // DEBUG PANEL
379 379 panel = tab->getChild<LLPanel>("Debug");
380 panel->childSetValue("fixed_sun_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED))); 380
381 panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun); 381 panel->childSetValue("region_text", LLSD(sim_name) );
382 panel->childSetValue("sun_hour_slider", LLSD(sun_hour)); 382 panel->childSetValue("disable_scripts_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) );
383 panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun); 383 panel->childSetValue("disable_collisions_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) );
384 panel->setCtrlsEnabled(allow_modify); 384 panel->childSetValue("disable_physics_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) );
385 385 panel->setCtrlsEnabled(allow_modify);
386 getInstance()->refreshFromRegion( gAgent.getRegion() ); 386
387} 387 // TERRAIN PANEL
388 388 panel = tab->getChild<LLPanel>("Terrain");
389// static 389
390LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate() 390 panel->childSetValue("region_text", LLSD(sim_name));
391{ 391 panel->childSetValue("water_height_spin", LLSD(water_height));
392 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); 392 panel->childSetValue("terrain_raise_spin", LLSD(terrain_raise_limit));
393 if (!floater) return NULL; 393 panel->childSetValue("terrain_lower_spin", LLSD(terrain_lower_limit));
394 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); 394 panel->childSetValue("use_estate_sun_check", LLSD(use_estate_sun));
395 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate"); 395
396 return panel; 396 panel->childSetValue("fixed_sun_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED)));
397} 397 panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun);
398 398 panel->childSetValue("sun_hour_slider", LLSD(sun_hour));
399// static 399 panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun);
400LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() 400 panel->setCtrlsEnabled(allow_modify);
401{ 401
402 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); 402 getInstance()->refreshFromRegion( gAgent.getRegion() );
403 if (!floater) return NULL; 403}
404 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); 404
405 LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)tab->getChild<LLPanel>("Covenant"); 405// static
406 return panel; 406LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate()
407} 407{
408 408 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
409void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) 409 if (!floater) return NULL;
410{ 410 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
411 // call refresh from region on all panels 411 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
412 std::for_each( 412 return panel;
413 mInfoPanels.begin(), 413}
414 mInfoPanels.end(), 414
415 llbind2nd( 415// static
416#if LL_WINDOWS 416LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant()
417 std::mem_fun1(&LLPanelRegionInfo::refreshFromRegion), 417{
418#else 418 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
419 std::mem_fun(&LLPanelRegionInfo::refreshFromRegion), 419 if (!floater) return NULL;
420#endif 420 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
421 region)); 421 LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)tab->getChild<LLPanel>("Covenant");
422} 422 return panel;
423 423}
424// public 424
425void LLFloaterRegionInfo::refresh() 425// static
426{ 426LLPanelRegionOpenSettingsInfo* LLFloaterRegionInfo::getPanelOpenSettings()
427 for(info_panels_t::iterator iter = mInfoPanels.begin(); 427{
428 iter != mInfoPanels.end(); ++iter) 428 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
429 { 429 if (floater)
430 (*iter)->refresh(); 430 {
431 } 431 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
432} 432 LLPanelRegionOpenSettingsInfo* panel = (LLPanelRegionOpenSettingsInfo*)tab->getChild<LLPanel>("RegionSettings", FALSE, FALSE);
433 433 if (panel)
434 434 {
435///---------------------------------------------------------------------------- 435 return panel;
436/// Local class implementation 436 }
437///---------------------------------------------------------------------------- 437 }
438 438 return NULL;
439// 439}
440// LLPanelRegionInfo 440
441// 441void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
442 442{
443// static 443 // call refresh from region on all panels
444void LLPanelRegionInfo::onBtnSet(void* user_data) 444 std::for_each(
445{ 445 mInfoPanels.begin(),
446 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data; 446 mInfoPanels.end(),
447 if(!panel) return; 447 llbind2nd(
448 if (panel->sendUpdate()) 448#if LL_WINDOWS
449 { 449 std::mem_fun1(&LLPanelRegionInfo::refreshFromRegion),
450 panel->disableButton("apply_btn"); 450#else
451 } 451 std::mem_fun(&LLPanelRegionInfo::refreshFromRegion),
452} 452#endif
453 453 region));
454//static 454}
455void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl, void* user_data) 455
456{ 456// public
457 if (ctrl) 457void LLFloaterRegionInfo::refresh()
458 { 458{
459 LLPanelRegionInfo* panel = (LLPanelRegionInfo*) ctrl->getParent(); 459 for(info_panels_t::iterator iter = mInfoPanels.begin();
460 panel->updateChild(ctrl); 460 iter != mInfoPanels.end(); ++iter)
461 } 461 {
462} 462 (*iter)->refresh();
463 463 }
464// static 464}
465// Enables the "set" button if it is not already enabled 465
466void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data) 466
467{ 467///----------------------------------------------------------------------------
468 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data; 468/// Local class implementation
469 if(panel) 469///----------------------------------------------------------------------------
470 { 470
471 panel->enableButton("apply_btn"); 471//
472 panel->refresh(); 472// LLPanelRegionInfo
473 } 473//
474} 474
475 475// static
476// static 476void LLPanelRegionInfo::onBtnSet(void* user_data)
477// Enables set button on change to line editor 477{
478void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) 478 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data;
479{ 479 if(!panel) return;
480 // reuse the previous method 480 if (panel->sendUpdate())
481 onChangeAnything(0, user_data); 481 {
482} 482 panel->disableButton("apply_btn");
483 483 }
484 484}
485// virtual 485
486BOOL LLPanelRegionInfo::postBuild() 486//static
487{ 487void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl, void* user_data)
488 childSetAction("apply_btn", onBtnSet, this); 488{
489 childDisable("apply_btn"); 489 if (ctrl)
490 refresh(); 490 {
491 return TRUE; 491 LLPanelRegionInfo* panel = (LLPanelRegionInfo*) ctrl->getParent();
492} 492 panel->updateChild(ctrl);
493 493 }
494// virtual 494}
495void LLPanelRegionInfo::updateChild(LLUICtrl* child_ctr) 495
496{ 496// static
497} 497// Enables the "set" button if it is not already enabled
498 498void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data)
499// virtual 499{
500bool LLPanelRegionInfo::refreshFromRegion(LLViewerRegion* region) 500 LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data;
501{ 501 if(panel)
502 if (region) mHost = region->getHost(); 502 {
503 return true; 503 panel->enableButton("apply_btn");
504} 504 panel->refresh();
505 505 }
506void LLPanelRegionInfo::sendEstateOwnerMessage( 506}
507 LLMessageSystem* msg, 507
508 const std::string& request, 508// static
509 const LLUUID& invoice, 509// Enables set button on change to line editor
510 const strings_t& strings) 510void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data)
511{ 511{
512 llinfos << "Sending estate request '" << request << "'" << llendl; 512 // reuse the previous method
513 msg->newMessage("EstateOwnerMessage"); 513 onChangeAnything(0, user_data);
514 msg->nextBlockFast(_PREHASH_AgentData); 514}
515 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 515
516 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 516
517 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 517// virtual
518 msg->nextBlock("MethodData"); 518BOOL LLPanelRegionInfo::postBuild()
519 msg->addString("Method", request); 519{
520 msg->addUUID("Invoice", invoice); 520 childSetAction("apply_btn", onBtnSet, this);
521 if(strings.empty()) 521 childDisable("apply_btn");
522 { 522 refresh();
523 msg->nextBlock("ParamList"); 523 return TRUE;
524 msg->addString("Parameter", NULL); 524}
525 } 525
526 else 526// virtual
527 { 527void LLPanelRegionInfo::updateChild(LLUICtrl* child_ctr)
528 strings_t::const_iterator it = strings.begin(); 528{
529 strings_t::const_iterator end = strings.end(); 529}
530 for(; it != end; ++it) 530
531 { 531// virtual
532 msg->nextBlock("ParamList"); 532bool LLPanelRegionInfo::refreshFromRegion(LLViewerRegion* region)
533 msg->addString("Parameter", *it); 533{
534 } 534 if (region) mHost = region->getHost();
535 } 535 return true;
536 msg->sendReliable(mHost); 536}
537} 537
538 538void LLPanelRegionInfo::sendEstateOwnerMessage(
539void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) 539 LLMessageSystem* msg,
540{ 540 const std::string& request,
541 childSetEnabled(btn_name, enable); 541 const LLUUID& invoice,
542} 542 const strings_t& strings)
543 543{
544void LLPanelRegionInfo::disableButton(const std::string& btn_name) 544 llinfos << "Sending estate request '" << request << "'" << llendl;
545{ 545 msg->newMessage("EstateOwnerMessage");
546 childDisable(btn_name); 546 msg->nextBlockFast(_PREHASH_AgentData);
547} 547 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
548 548 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
549void LLPanelRegionInfo::initCtrl(const std::string& name) 549 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
550{ 550 msg->nextBlock("MethodData");
551 childSetCommitCallback(name, onChangeAnything, this); 551 msg->addString("Method", request);
552} 552 msg->addUUID("Invoice", invoice);
553 553 if(strings.empty())
554void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert) 554 {
555{ 555 msg->nextBlock("ParamList");
556 childSetAction(name, onClickHelp, new std::string(xml_alert)); 556 msg->addString("Parameter", NULL);
557} 557 }
558 558 else
559// static 559 {
560void LLPanelRegionInfo::onClickHelp(void* data) 560 strings_t::const_iterator it = strings.begin();
561{ 561 strings_t::const_iterator end = strings.end();
562 std::string* xml_alert = (std::string*)data; 562 for(; it != end; ++it)
563 LLNotifications::instance().add(*xml_alert); 563 {
564} 564 msg->nextBlock("ParamList");
565 565 msg->addString("Parameter", *it);
566///////////////////////////////////////////////////////////////////////////// 566 }
567// LLPanelRegionGeneralInfo 567 }
568// 568 msg->sendReliable(mHost);
569bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) 569}
570{ 570
571 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 571void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable)
572 setCtrlsEnabled(allow_modify); 572{
573 childDisable("apply_btn"); 573 childSetEnabled(btn_name, enable);
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::disableButton(const std::string& btn_name)
577 childSetEnabled("kick_btn", allow_modify); 577{
578 childSetEnabled("kick_all_btn", allow_modify); 578 childDisable(btn_name);
579 childSetEnabled("im_btn", allow_modify); 579}
580 childSetEnabled("manage_telehub_btn", allow_modify); 580
581 581void LLPanelRegionInfo::initCtrl(const std::string& name)
582 // Data gets filled in by processRegionInfo 582{
583 583 childSetCommitCallback(name, onChangeAnything, this);
584 return LLPanelRegionInfo::refreshFromRegion(region); 584}
585} 585
586 586void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert)
587BOOL LLPanelRegionGeneralInfo::postBuild() 587{
588{ 588 childSetAction(name, onClickHelp, new std::string(xml_alert));
589 // Enable the "Apply" button if something is changed. JC 589}
590 initCtrl("block_terraform_check"); 590
591 initCtrl("block_fly_check"); 591// static
592 initCtrl("allow_damage_check"); 592void LLPanelRegionInfo::onClickHelp(void* data)
593 initCtrl("allow_land_resell_check"); 593{
594 initCtrl("allow_parcel_changes_check"); 594 std::string* xml_alert = (std::string*)data;
595 initCtrl("agent_limit_spin"); 595 LLNotifications::instance().add(*xml_alert);
596 initCtrl("object_bonus_spin"); 596}
597 initCtrl("access_combo"); 597
598 initCtrl("restrict_pushobject"); 598/////////////////////////////////////////////////////////////////////////////
599 initCtrl("block_parcel_search_check"); 599// LLPanelRegionGeneralInfo
600 600//
601 initHelpBtn("terraform_help", "HelpRegionBlockTerraform"); 601bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
602 initHelpBtn("fly_help", "HelpRegionBlockFly"); 602{
603 initHelpBtn("damage_help", "HelpRegionAllowDamage"); 603 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
604 initHelpBtn("agent_limit_help", "HelpRegionAgentLimit"); 604 setCtrlsEnabled(allow_modify);
605 initHelpBtn("object_bonus_help", "HelpRegionObjectBonus"); 605 childDisable("apply_btn");
606 initHelpBtn("access_help", "HelpRegionMaturity"); 606 childSetEnabled("access_text", allow_modify);
607 initHelpBtn("restrict_pushobject_help", "HelpRegionRestrictPushObject"); 607 // childSetEnabled("access_combo", allow_modify);
608 initHelpBtn("land_resell_help", "HelpRegionLandResell"); 608 // now set in processRegionInfo for teen grid detection
609 initHelpBtn("parcel_changes_help", "HelpParcelChanges"); 609 childSetEnabled("kick_btn", allow_modify);
610 initHelpBtn("parcel_search_help", "HelpRegionSearch"); 610 childSetEnabled("kick_all_btn", allow_modify);
611 611 childSetEnabled("im_btn", allow_modify);
612 childSetAction("kick_btn", onClickKick, this); 612 childSetEnabled("manage_telehub_btn", allow_modify);
613 childSetAction("kick_all_btn", onClickKickAll, this); 613
614 childSetAction("im_btn", onClickMessage, this); 614 // Data gets filled in by processRegionInfo
615 childSetAction("manage_telehub_btn", onClickManageTelehub, this); 615
616 616 return LLPanelRegionInfo::refreshFromRegion(region);
617 return LLPanelRegionInfo::postBuild(); 617}
618} 618
619 619BOOL LLPanelRegionGeneralInfo::postBuild()
620// static 620{
621void LLPanelRegionGeneralInfo::onClickKick(void* userdata) 621 // Enable the "Apply" button if something is changed. JC
622{ 622 initCtrl("block_terraform_check");
623 llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl; 623 initCtrl("block_fly_check");
624 LLPanelRegionGeneralInfo* panelp = (LLPanelRegionGeneralInfo*)userdata; 624 initCtrl("allow_damage_check");
625 625 initCtrl("allow_land_resell_check");
626 // this depends on the grandparent view being a floater 626 initCtrl("allow_parcel_changes_check");
627 // in order to set up floater dependency 627 initCtrl("agent_limit_spin");
628 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); 628 initCtrl("object_bonus_spin");
629 LLFloater* child_floater = LLFloaterAvatarPicker::show(onKickCommit, userdata, FALSE, TRUE); 629 initCtrl("access_combo");
630 parent_floater->addDependentFloater(child_floater); 630 initCtrl("restrict_pushobject");
631} 631 initCtrl("block_parcel_search_check");
632 632 initCtrl("minimum_agent_age");
633// static 633
634void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata) 634 initHelpBtn("terraform_help", "HelpRegionBlockTerraform");
635{ 635 initHelpBtn("fly_help", "HelpRegionBlockFly");
636 if (names.empty() || ids.empty()) return; 636 initHelpBtn("damage_help", "HelpRegionAllowDamage");
637 if(ids[0].notNull()) 637 initHelpBtn("agent_limit_help", "HelpRegionAgentLimit");
638 { 638 initHelpBtn("object_bonus_help", "HelpRegionObjectBonus");
639 LLPanelRegionGeneralInfo* self = (LLPanelRegionGeneralInfo*)userdata; 639 initHelpBtn("access_help", "HelpRegionMaturity");
640 if(!self) return; 640 initHelpBtn("restrict_pushobject_help", "HelpRegionRestrictPushObject");
641 strings_t strings; 641 initHelpBtn("land_resell_help", "HelpRegionLandResell");
642 // [0] = our agent id 642 initHelpBtn("parcel_changes_help", "HelpParcelChanges");
643 // [1] = target agent id 643 initHelpBtn("parcel_search_help", "HelpRegionSearch");
644 std::string buffer; 644
645 gAgent.getID().toString(buffer); 645 childSetAction("kick_btn", onClickKick, this);
646 strings.push_back(buffer); 646 childSetAction("kick_all_btn", onClickKickAll, this);
647 647 childSetAction("im_btn", onClickMessage, this);
648 ids[0].toString(buffer); 648 childSetAction("manage_telehub_btn", onClickManageTelehub, this);
649 strings.push_back(strings_t::value_type(buffer)); 649
650 650 return LLPanelRegionInfo::postBuild();
651 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 651}
652 self->sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", invoice, strings); 652
653 } 653// static
654} 654void LLPanelRegionGeneralInfo::onClickKick(void* userdata)
655 655{
656// static 656 llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl;
657void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata) 657 LLPanelRegionGeneralInfo* panelp = (LLPanelRegionGeneralInfo*)userdata;
658{ 658
659 llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl; 659 // this depends on the grandparent view being a floater
660 LLNotifications::instance().add("KickUsersFromRegion", 660 // in order to set up floater dependency
661 LLSD(), 661 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
662 LLSD(), 662 LLFloater* child_floater = LLFloaterAvatarPicker::show(onKickCommit, userdata, FALSE, TRUE);
663 boost::bind(&LLPanelRegionGeneralInfo::onKickAllCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2)); 663 parent_floater->addDependentFloater(child_floater);
664} 664}
665 665
666bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const LLSD& response) 666// static
667{ 667void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata)
668 S32 option = LLNotification::getSelectedOption(notification, response); 668{
669 if (option == 0) 669 if (names.empty() || ids.empty()) return;
670 { 670 if(ids[0].notNull())
671 strings_t strings; 671 {
672 // [0] = our agent id 672 LLPanelRegionGeneralInfo* self = (LLPanelRegionGeneralInfo*)userdata;
673 std::string buffer; 673 if(!self) return;
674 gAgent.getID().toString(buffer); 674 strings_t strings;
675 strings.push_back(buffer); 675 // [0] = our agent id
676 676 // [1] = target agent id
677 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 677 std::string buffer;
678 // historical message name 678 gAgent.getID().toString(buffer);
679 sendEstateOwnerMessage(gMessageSystem, "teleporthomeallusers", invoice, strings); 679 strings.push_back(buffer);
680 } 680
681 return false; 681 ids[0].toString(buffer);
682} 682 strings.push_back(strings_t::value_type(buffer));
683 683
684// static 684 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
685void LLPanelRegionGeneralInfo::onClickMessage(void* userdata) 685 self->sendEstateOwnerMessage(gMessageSystem, "teleporthomeuser", invoice, strings);
686{ 686 }
687 llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl; 687}
688 LLNotifications::instance().add("MessageRegion", 688
689 LLSD(), 689// static
690 LLSD(), 690void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata)
691 boost::bind(&LLPanelRegionGeneralInfo::onMessageCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2)); 691{
692} 692 llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl;
693 693 LLNotifications::instance().add("KickUsersFromRegion",
694// static 694 LLSD(),
695bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const LLSD& response) 695 LLSD(),
696{ 696 boost::bind(&LLPanelRegionGeneralInfo::onKickAllCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
697 if(LLNotification::getSelectedOption(notification, response) != 0) return false; 697}
698 698
699 std::string text = response["message"].asString(); 699bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const LLSD& response)
700 if (text.empty()) return false; 700{
701 701 S32 option = LLNotification::getSelectedOption(notification, response);
702 llinfos << "Message to everyone: " << text << llendl; 702 if (option == 0)
703 strings_t strings; 703 {
704 // [0] grid_x, unused here 704 strings_t strings;
705 // [1] grid_y, unused here 705 // [0] = our agent id
706 // [2] agent_id of sender 706 std::string buffer;
707 // [3] sender name 707 gAgent.getID().toString(buffer);
708 // [4] message 708 strings.push_back(buffer);
709 strings.push_back("-1"); 709
710 strings.push_back("-1"); 710 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
711 std::string buffer; 711 // historical message name
712 gAgent.getID().toString(buffer); 712 sendEstateOwnerMessage(gMessageSystem, "teleporthomeallusers", invoice, strings);
713 strings.push_back(buffer); 713 }
714 std::string name; 714 return false;
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()); 718void LLPanelRegionGeneralInfo::onClickMessage(void* userdata)
719 sendEstateOwnerMessage(gMessageSystem, "simulatormessage", invoice, strings); 719{
720 return false; 720 llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl;
721} 721 LLNotifications::instance().add("MessageRegion",
722 722 LLSD(),
723// static 723 LLSD(),
724void LLPanelRegionGeneralInfo::onClickManageTelehub(void* data) 724 boost::bind(&LLPanelRegionGeneralInfo::onMessageCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
725{ 725}
726 LLFloaterRegionInfo::getInstance()->close(); 726
727 727// static
728 LLFloaterTelehub::show(); 728bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
729} 729{
730 730 if(LLNotification::getSelectedOption(notification, response) != 0) return false;
731// setregioninfo 731
732// strings[0] = 'Y' - block terraform, 'N' - not 732 std::string text = response["message"].asString();
733// strings[1] = 'Y' - block fly, 'N' - not 733 if (text.empty()) return false;
734// strings[2] = 'Y' - allow damage, 'N' - not 734
735// strings[3] = 'Y' - allow land sale, 'N' - not 735 llinfos << "Message to everyone: " << text << llendl;
736// strings[4] = agent limit 736 strings_t strings;
737// strings[5] = object bonus 737 // [0] grid_x, unused here
738// strings[6] = sim access (0 = unknown, 13 = PG, 21 = Mature, 42 = Adult) 738 // [1] grid_y, unused here
739// strings[7] = restrict pushobject 739 // [2] agent_id of sender
740// strings[8] = 'Y' - allow parcel subdivide, 'N' - not 740 // [3] sender name
741// strings[9] = 'Y' - block parcel search, 'N' - allow 741 // [4] message
742BOOL LLPanelRegionGeneralInfo::sendUpdate() 742 strings.push_back("-1");
743{ 743 strings.push_back("-1");
744 llinfos << "LLPanelRegionGeneralInfo::sendUpdate()" << llendl; 744 std::string buffer;
745 745 gAgent.getID().toString(buffer);
746 // First try using a Cap. If that fails use the old method. 746 strings.push_back(buffer);
747 LLSD body; 747 std::string name;
748 std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo"); 748 gAgent.buildFullname(name);
749 if (!url.empty()) 749 strings.push_back(strings_t::value_type(name));
750 { 750 strings.push_back(strings_t::value_type(text));
751 body["block_terraform"] = childGetValue("block_terraform_check"); 751 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
752 body["block_fly"] = childGetValue("block_fly_check"); 752 sendEstateOwnerMessage(gMessageSystem, "simulatormessage", invoice, strings);
753 body["allow_damage"] = childGetValue("allow_damage_check"); 753 return false;
754 body["allow_land_resell"] = childGetValue("allow_land_resell_check"); 754}
755 body["agent_limit"] = childGetValue("agent_limit_spin"); 755
756 body["prim_bonus"] = childGetValue("object_bonus_spin"); 756// static
757 body["sim_access"] = childGetValue("access_combo"); 757void LLPanelRegionGeneralInfo::onClickManageTelehub(void* data)
758 body["restrict_pushobject"] = childGetValue("restrict_pushobject"); 758{
759 body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check"); 759 LLFloaterRegionInfo::getInstance()->close();
760 body["block_parcel_search"] = childGetValue("block_parcel_search_check"); 760
761 761 LLFloaterTelehub::show();
762 LLHTTPClient::post(url, body, new LLHTTPClient::Responder()); 762}
763 } 763
764 else 764// setregioninfo
765 { 765// strings[0] = 'Y' - block terraform, 'N' - not
766 strings_t strings; 766// strings[1] = 'Y' - block fly, 'N' - not
767 std::string buffer; 767// strings[2] = 'Y' - allow damage, 'N' - not
768 768// strings[3] = 'Y' - allow land sale, 'N' - not
769 buffer = llformat("%s", (childGetValue("block_terraform_check").asBoolean() ? "Y" : "N")); 769// strings[4] = agent limit
770 strings.push_back(strings_t::value_type(buffer)); 770// strings[5] = object bonus
771 771// strings[6] = sim access (0 = unknown, 13 = PG, 21 = Mature, 42 = Adult)
772 buffer = llformat("%s", (childGetValue("block_fly_check").asBoolean() ? "Y" : "N")); 772// strings[7] = restrict pushobject
773 strings.push_back(strings_t::value_type(buffer)); 773// strings[8] = 'Y' - allow parcel subdivide, 'N' - not
774 774// strings[9] = 'Y' - block parcel search, 'N' - allow
775 buffer = llformat("%s", (childGetValue("allow_damage_check").asBoolean() ? "Y" : "N")); 775BOOL LLPanelRegionGeneralInfo::sendUpdate()
776 strings.push_back(strings_t::value_type(buffer)); 776{
777 777 llinfos << "LLPanelRegionGeneralInfo::sendUpdate()" << llendl;
778 buffer = llformat("%s", (childGetValue("allow_land_resell_check").asBoolean() ? "Y" : "N")); 778
779 strings.push_back(strings_t::value_type(buffer)); 779 // First try using a Cap. If that fails use the old method.
780 780 LLSD body;
781 F32 value = (F32)childGetValue("agent_limit_spin").asReal(); 781 std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo");
782 buffer = llformat("%f", value); 782 if (!url.empty())
783 strings.push_back(strings_t::value_type(buffer)); 783 {
784 784 body["block_terraform"] = childGetValue("block_terraform_check");
785 value = (F32)childGetValue("object_bonus_spin").asReal(); 785 body["block_fly"] = childGetValue("block_fly_check");
786 buffer = llformat("%f", value); 786 body["allow_damage"] = childGetValue("allow_damage_check");
787 strings.push_back(strings_t::value_type(buffer)); 787 body["allow_land_resell"] = childGetValue("allow_land_resell_check");
788 788 body["agent_limit"] = childGetValue("agent_limit_spin");
789 buffer = llformat("%d", childGetValue("access_combo").asInteger()); 789 body["prim_bonus"] = childGetValue("object_bonus_spin");
790 strings.push_back(strings_t::value_type(buffer)); 790 body["sim_access"] = childGetValue("access_combo");
791 791 body["restrict_pushobject"] = childGetValue("restrict_pushobject");
792 buffer = llformat("%s", (childGetValue("restrict_pushobject").asBoolean() ? "Y" : "N")); 792 body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check");
793 strings.push_back(strings_t::value_type(buffer)); 793 body["block_parcel_search"] = childGetValue("block_parcel_search_check");
794 794 body["minimum_agent_age"] = childGetValue("minimum_agent_age");
795 buffer = llformat("%s", (childGetValue("allow_parcel_changes_check").asBoolean() ? "Y" : "N")); 795
796 strings.push_back(strings_t::value_type(buffer)); 796 LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
797 797 }
798 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 798 else
799 sendEstateOwnerMessage(gMessageSystem, "setregioninfo", invoice, strings); 799 {
800 } 800 strings_t strings;
801 801 std::string buffer;
802 // if we changed access levels, tell user about it 802
803 LLViewerRegion* region = gAgent.getRegion(); 803 buffer = llformat("%s", (childGetValue("block_terraform_check").asBoolean() ? "Y" : "N"));
804 if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) ) 804 strings.push_back(strings_t::value_type(buffer));
805 { 805
806 LLNotifications::instance().add("RegionMaturityChange"); 806 buffer = llformat("%s", (childGetValue("block_fly_check").asBoolean() ? "Y" : "N"));
807 } 807 strings.push_back(strings_t::value_type(buffer));
808 808
809 return TRUE; 809 buffer = llformat("%s", (childGetValue("allow_damage_check").asBoolean() ? "Y" : "N"));
810} 810 strings.push_back(strings_t::value_type(buffer));
811 811
812///////////////////////////////////////////////////////////////////////////// 812 buffer = llformat("%s", (childGetValue("allow_land_resell_check").asBoolean() ? "Y" : "N"));
813// LLPanelRegionDebugInfo 813 strings.push_back(strings_t::value_type(buffer));
814///////////////////////////////////////////////////////////////////////////// 814
815BOOL LLPanelRegionDebugInfo::postBuild() 815 F32 value = (F32)childGetValue("agent_limit_spin").asReal();
816{ 816 buffer = llformat("%f", value);
817 LLPanelRegionInfo::postBuild(); 817 strings.push_back(strings_t::value_type(buffer));
818 initCtrl("disable_scripts_check"); 818
819 initCtrl("disable_collisions_check"); 819 value = (F32)childGetValue("object_bonus_spin").asReal();
820 initCtrl("disable_physics_check"); 820 buffer = llformat("%f", value);
821 821 strings.push_back(strings_t::value_type(buffer));
822 initHelpBtn("disable_scripts_help", "HelpRegionDisableScripts"); 822
823 initHelpBtn("disable_collisions_help", "HelpRegionDisableCollisions"); 823 buffer = llformat("%d", childGetValue("access_combo").asInteger());
824 initHelpBtn("disable_physics_help", "HelpRegionDisablePhysics"); 824 strings.push_back(strings_t::value_type(buffer));
825 initHelpBtn("top_colliders_help", "HelpRegionTopColliders"); 825
826 initHelpBtn("top_scripts_help", "HelpRegionTopScripts"); 826 buffer = llformat("%s", (childGetValue("restrict_pushobject").asBoolean() ? "Y" : "N"));
827 initHelpBtn("restart_help", "HelpRegionRestart"); 827 strings.push_back(strings_t::value_type(buffer));
828 828
829 childSetAction("choose_avatar_btn", onClickChooseAvatar, this); 829 buffer = llformat("%s", (childGetValue("allow_parcel_changes_check").asBoolean() ? "Y" : "N"));
830 childSetAction("return_btn", onClickReturn, this); 830 strings.push_back(strings_t::value_type(buffer));
831 childSetAction("top_colliders_btn", onClickTopColliders, this); 831
832 childSetAction("top_scripts_btn", onClickTopScripts, this); 832 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
833 childSetAction("restart_btn", onClickRestart, this); 833 sendEstateOwnerMessage(gMessageSystem, "setregioninfo", invoice, strings);
834 childSetAction("cancel_restart_btn", onClickCancelRestart, this); 834 }
835 835
836 return TRUE; 836 // if we changed access levels, tell user about it
837} 837 LLViewerRegion* region = gAgent.getRegion();
838 838 if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) )
839// virtual 839 {
840bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) 840 LLNotifications::instance().add("RegionMaturityChange");
841{ 841 }
842 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 842
843 setCtrlsEnabled(allow_modify); 843 return TRUE;
844 childDisable("apply_btn"); 844}
845 childDisable("target_avatar_name"); 845
846 846/////////////////////////////////////////////////////////////////////////////
847 childSetEnabled("choose_avatar_btn", allow_modify); 847// LLPanelRegionOpenSettingsInfo
848 childSetEnabled("return_scripts", allow_modify && !mTargetAvatar.isNull()); 848//
849 childSetEnabled("return_other_land", allow_modify && !mTargetAvatar.isNull()); 849bool LLPanelRegionOpenSettingsInfo::refreshFromRegion(LLViewerRegion* region)
850 childSetEnabled("return_estate_wide", allow_modify && !mTargetAvatar.isNull()); 850{
851 childSetEnabled("return_btn", allow_modify && !mTargetAvatar.isNull()); 851 // Data gets filled in by hippo manager
852 childSetEnabled("top_colliders_btn", allow_modify); 852 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
853 childSetEnabled("top_scripts_btn", allow_modify); 853
854 childSetEnabled("restart_btn", allow_modify); 854 childSetValue("draw_distance", gAgent.mDrawDistance);
855 childSetEnabled("cancel_restart_btn", allow_modify); 855 childSetValue("force_draw_distance", gAgent.mLockedDrawDistance);
856 856 childSetValue("allow_minimap", LLSD(gHippoLimits->mAllowMinimap));
857 return LLPanelRegionInfo::refreshFromRegion(region); 857 childSetValue("allow_physical_prims", (gHippoLimits->mAllowPhysicalPrims == 1 ? TRUE : FALSE));
858} 858 childSetValue("max_drag_distance", LLSD(gHippoLimits->mMaxDragDistance));
859 859 childSetValue("min_hole_size", LLSD(gHippoLimits->mMinHoleSize));
860// virtual 860 childSetValue("max_hollow_size", LLSD(gHippoLimits->mMaxHollow));
861BOOL LLPanelRegionDebugInfo::sendUpdate() 861 childSetValue("max_inventory_items_transfer", LLSD(gHippoLimits->mMaxInventoryItemsTransfer));
862{ 862 childSetValue("max_link_count", LLSD(gHippoLimits->mMaxLinkedPrims));
863 llinfos << "LLPanelRegionDebugInfo::sendUpdate" << llendl; 863 childSetValue("max_link_count_phys", LLSD(gHippoLimits->mMaxPhysLinkedPrims));
864 strings_t strings; 864 childSetValue("max_phys_prim_scale", LLSD(gHippoLimits->mMaxPrimScale));//Todo:Fix
865 std::string buffer; 865 childSetValue("max_prim_scale", LLSD(gHippoLimits->mMaxPrimScale));
866 866 childSetValue("min_prim_scale", LLSD(gHippoLimits->mMinPrimScale));
867 buffer = llformat("%s", (childGetValue("disable_scripts_check").asBoolean() ? "Y" : "N")); 867 childSetValue("render_water", LLSD(gHippoLimits->mRenderWater));
868 strings.push_back(buffer); 868 childSetValue("show_tags", LLSD(gHippoLimits->mRenderName));
869 869 childSetValue("max_groups", LLSD(gHippoLimits->mMaxAgentGroups));
870 buffer = llformat("%s", (childGetValue("disable_collisions_check").asBoolean() ? "Y" : "N")); 870 childSetValue("allow_parcel_windlight", LLSD(gHippoLimits->mAllowParcelWindLight));
871 strings.push_back(buffer); 871 childSetValue("enable_teen_mode", LLSD(gHippoLimits->mEnableTeenMode));
872 872 childSetValue("enforce_max_build", LLSD(gHippoLimits->mEnforceMaxBuild));
873 buffer = llformat("%s", (childGetValue("disable_physics_check").asBoolean() ? "Y" : "N")); 873
874 strings.push_back(buffer); 874 setCtrlsEnabled(allow_modify);
875 875
876 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 876 return LLPanelRegionInfo::refreshFromRegion(region);
877 sendEstateOwnerMessage(gMessageSystem, "setregiondebug", invoice, strings); 877}
878 return TRUE; 878
879} 879BOOL LLPanelRegionOpenSettingsInfo::postBuild()
880 880{
881void LLPanelRegionDebugInfo::onClickChooseAvatar(void* data) 881 // Enable the "Apply" button if something is changed. JC
882{ 882 initCtrl("draw_distance");
883 LLFloaterAvatarPicker::show(callbackAvatarID, data, FALSE, TRUE); 883 initCtrl("force_draw_distance");
884} 884 initCtrl("max_drag_distance");
885 885 initCtrl("max_prim_scale");
886// static 886 initCtrl("min_prim_scale");
887void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data) 887 initCtrl("max_phys_prim_scale");
888{ 888 initCtrl("max_hollow_size");
889 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*) data; 889 initCtrl("min_hole_size");
890 if (ids.empty() || names.empty()) return; 890 initCtrl("max_link_count");
891 self->mTargetAvatar = ids[0]; 891 initCtrl("max_link_count_phys");
892 self->childSetValue("target_avatar_name", LLSD(names[0])); 892 initCtrl("max_inventory_items_transfer");
893 self->refreshFromRegion( gAgent.getRegion() ); 893 initCtrl("max_groups");
894} 894 initCtrl("render_water");
895 895 initCtrl("allow_minimap");
896// static 896 initCtrl("allow_physical_prims");
897void LLPanelRegionDebugInfo::onClickReturn(void* data) 897 initCtrl("enable_teen_mode");
898{ 898 initCtrl("show_tags");
899 LLPanelRegionDebugInfo* panelp = (LLPanelRegionDebugInfo*) data; 899 initCtrl("allow_parcel_windlight");
900 if (panelp->mTargetAvatar.isNull()) return; 900
901 901 initHelpBtn("force_draw_distance_help", "HelpForceDrawDistance");
902 LLSD args; 902 initHelpBtn("max_inventory_items_transfer_help", "HelpMaxInventoryItemsTransfer");
903 args["USER_NAME"] = panelp->childGetValue("target_avatar_name").asString(); 903 initHelpBtn("max_groups_help", "HelpMaxGroups");
904 LLSD payload; 904 initHelpBtn("render_water_help", "HelpRenderWater");
905 payload["avatar_id"] = panelp->mTargetAvatar; 905 initHelpBtn("allow_minimap_help", "HelpAllowMinimap");
906 906 initHelpBtn("allow_physical_prims_help", "HelpAllowPhysicalPrims");
907 U32 flags = SWD_ALWAYS_RETURN_OBJECTS; 907 initHelpBtn("enable_teen_mode_help", "HelpEnableTeenMode");
908 908 initHelpBtn("show_tags_help", "HelpShowTags");
909 if (panelp->childGetValue("return_scripts").asBoolean()) 909 initHelpBtn("allow_parcel_windlight_help", "HelpAllowParcelWindLight");
910 { 910
911 flags |= SWD_SCRIPTED_ONLY; 911 childSetAction("apply_ors_btn", sendUpdate, this);
912 } 912
913 913 refreshFromRegion(gAgent.getRegion());
914 if (panelp->childGetValue("return_other_land").asBoolean()) 914
915 { 915 return LLPanelRegionInfo::postBuild();
916 flags |= SWD_OTHERS_LAND_ONLY; 916}
917 } 917
918 payload["flags"] = int(flags); 918// setregioninfo
919 payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean(); 919// strings[0] = 'Y' - block terraform, 'N' - not
920 LLNotifications::instance().add("EstateObjectReturn", args, payload, 920// strings[1] = 'Y' - block fly, 'N' - not
921 boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2)); 921// strings[2] = 'Y' - allow damage, 'N' - not
922} 922// strings[3] = 'Y' - allow land sale, 'N' - not
923 923// strings[4] = agent limit
924bool LLPanelRegionDebugInfo::callbackReturn(const LLSD& notification, const LLSD& response) 924// strings[5] = object bonus
925{ 925// strings[6] = sim access (0 = unknown, 13 = PG, 21 = Mature, 42 = Adult)
926 S32 option = LLNotification::getSelectedOption(notification, response); 926// strings[7] = restrict pushobject
927 if (option != 0) return false; 927// strings[8] = 'Y' - allow parcel subdivide, 'N' - not
928 928// strings[9] = 'Y' - block parcel search, 'N' - allow
929 LLUUID target_avatar = notification["payload"]["avatar_id"].asUUID(); 929void LLPanelRegionOpenSettingsInfo::sendUpdate(void* userdata)
930 if (!target_avatar.isNull()) 930{
931 { 931 LLPanelRegionOpenSettingsInfo* self;
932 U32 flags = notification["payload"]["flags"].asInteger(); 932 self = (LLPanelRegionOpenSettingsInfo*)userdata;
933 bool return_estate_wide = notification["payload"]["return_estate_wide"]; 933
934 if (return_estate_wide) 934 llinfos << "LLPanelRegionOpenSettingsInfo::sendUpdate()" << llendl;
935 { 935
936 // send as estate message - routed by spaceserver to all regions in estate 936 LLSD body;
937 strings_t strings; 937 std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings");
938 strings.push_back(llformat("%d", flags)); 938 if (!url.empty())
939 strings.push_back(target_avatar.asString()); 939 {
940 940 body["draw_distance"] = self->childGetValue("draw_distance");
941 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 941 body["force_draw_distance"] = self->childGetValue("force_draw_distance");
942 942 body["allow_minimap"] = self->childGetValue("allow_minimap");
943 sendEstateOwnerMessage(gMessageSystem, "estateobjectreturn", invoice, strings); 943 body["allow_physical_prims"] = self->childGetValue("allow_physical_prims");
944 } 944 body["max_drag_distance"] = self->childGetValue("max_drag_distance");
945 else 945 body["min_hole_size"] = self->childGetValue("min_hole_size");
946 { 946 body["max_hollow_size"] = self->childGetValue("max_hollow_size");
947 // send to this simulator only 947 body["max_inventory_items_transfer"] = self->childGetValue("max_inventory_items_transfer");
948 send_sim_wide_deletes(target_avatar, flags); 948 body["max_link_count"] = self->childGetValue("max_link_count");
949 } 949 body["max_link_count_phys"] = self->childGetValue("max_link_count_phys");
950 } 950 body["max_phys_prim_scale"] = self->childGetValue("max_phys_prim_scale");
951 return false; 951 body["max_prim_scale"] = self->childGetValue("max_prim_scale");
952} 952 body["min_prim_scale"] = self->childGetValue("min_prim_scale");
953 953 body["render_water"] = self->childGetValue("render_water");
954 954 body["show_tags"] = self->childGetValue("show_tags");
955// static 955 body["max_groups"] = self->childGetValue("max_groups");
956void LLPanelRegionDebugInfo::onClickTopColliders(void* data) 956 body["allow_parcel_windlight"] = self->childGetValue("allow_parcel_windlight");
957{ 957 body["enable_teen_mode"] = self->childGetValue("enable_teen_mode");
958 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data; 958 body["enforce_max_build"] = self->childGetValue("enforce_max_build");
959 strings_t strings; 959
960 strings.push_back("1"); // one physics step 960 LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
961 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 961 }
962 LLFloaterTopObjects::show(); 962}
963 LLFloaterTopObjects::clearList(); 963
964 self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings); 964/////////////////////////////////////////////////////////////////////////////
965} 965// LLPanelRegionDebugInfo
966 966/////////////////////////////////////////////////////////////////////////////
967// static 967BOOL LLPanelRegionDebugInfo::postBuild()
968void LLPanelRegionDebugInfo::onClickTopScripts(void* data) 968{
969{ 969 LLPanelRegionInfo::postBuild();
970 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data; 970 initCtrl("disable_scripts_check");
971 strings_t strings; 971 initCtrl("disable_collisions_check");
972 strings.push_back("6"); // top 5 scripts 972 initCtrl("disable_physics_check");
973 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 973
974 LLFloaterTopObjects::show(); 974 initHelpBtn("disable_scripts_help", "HelpRegionDisableScripts");
975 LLFloaterTopObjects::clearList(); 975 initHelpBtn("disable_collisions_help", "HelpRegionDisableCollisions");
976 self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings); 976 initHelpBtn("disable_physics_help", "HelpRegionDisablePhysics");
977} 977 initHelpBtn("top_colliders_help", "HelpRegionTopColliders");
978 978 initHelpBtn("top_scripts_help", "HelpRegionTopScripts");
979// static 979 initHelpBtn("restart_help", "HelpRegionRestart");
980void LLPanelRegionDebugInfo::onClickRestart(void* data) 980 initHelpBtn("minimum_agent_age_help", "HelpRegionMinimumAge");
981{ 981
982 LLNotifications::instance().add("ConfirmRestart", LLSD(), LLSD(), 982
983 boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2)); 983 childSetAction("choose_avatar_btn", onClickChooseAvatar, this);
984} 984 childSetAction("return_btn", onClickReturn, this);
985 985 childSetAction("top_colliders_btn", onClickTopColliders, this);
986bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response) 986 childSetAction("top_scripts_btn", onClickTopScripts, this);
987{ 987 childSetAction("restart_btn", onClickRestart, this);
988 S32 option = LLNotification::getSelectedOption(notification, response); 988 childSetAction("cancel_restart_btn", onClickCancelRestart, this);
989 if (option != 0) return false; 989
990 990 return TRUE;
991 strings_t strings; 991}
992 strings.push_back("120"); 992
993 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 993// virtual
994 sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings); 994bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region)
995 return false; 995{
996} 996 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
997 997 setCtrlsEnabled(allow_modify);
998// static 998 childDisable("apply_btn");
999void LLPanelRegionDebugInfo::onClickCancelRestart(void* data) 999 childDisable("target_avatar_name");
1000{ 1000
1001 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data; 1001 childSetEnabled("choose_avatar_btn", allow_modify);
1002 strings_t strings; 1002 childSetEnabled("return_scripts", allow_modify && !mTargetAvatar.isNull());
1003 strings.push_back("-1"); 1003 childSetEnabled("return_other_land", allow_modify && !mTargetAvatar.isNull());
1004 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1004 childSetEnabled("return_estate_wide", allow_modify && !mTargetAvatar.isNull());
1005 self->sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings); 1005 childSetEnabled("return_btn", allow_modify && !mTargetAvatar.isNull());
1006} 1006 childSetEnabled("top_colliders_btn", allow_modify);
1007 1007 childSetEnabled("top_scripts_btn", allow_modify);
1008 1008 childSetEnabled("restart_btn", allow_modify);
1009///////////////////////////////////////////////////////////////////////////// 1009 childSetEnabled("cancel_restart_btn", allow_modify);
1010// LLPanelRegionTextureInfo 1010
1011// 1011 return LLPanelRegionInfo::refreshFromRegion(region);
1012LLPanelRegionTextureInfo::LLPanelRegionTextureInfo() : LLPanelRegionInfo() 1012}
1013{ 1013
1014 // nothing. 1014// virtual
1015} 1015BOOL LLPanelRegionDebugInfo::sendUpdate()
1016 1016{
1017bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region) 1017 llinfos << "LLPanelRegionDebugInfo::sendUpdate" << llendl;
1018{ 1018 strings_t strings;
1019 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); 1019 std::string buffer;
1020 setCtrlsEnabled(allow_modify); 1020
1021 childDisable("apply_btn"); 1021 buffer = llformat("%s", (childGetValue("disable_scripts_check").asBoolean() ? "Y" : "N"));
1022 1022 strings.push_back(buffer);
1023 if (region) 1023
1024 { 1024 buffer = llformat("%s", (childGetValue("disable_collisions_check").asBoolean() ? "Y" : "N"));
1025 childSetValue("region_text", LLSD(region->getName())); 1025 strings.push_back(buffer);
1026 } 1026
1027 else 1027 buffer = llformat("%s", (childGetValue("disable_physics_check").asBoolean() ? "Y" : "N"));
1028 { 1028 strings.push_back(buffer);
1029 childSetValue("region_text", LLSD("")); 1029
1030 } 1030 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1031 1031 sendEstateOwnerMessage(gMessageSystem, "setregiondebug", invoice, strings);
1032 if (!region) return LLPanelRegionInfo::refreshFromRegion(region); 1032 return TRUE;
1033 1033}
1034 LLVLComposition* compp = region->getComposition(); 1034
1035 LLTextureCtrl* texture_ctrl; 1035void LLPanelRegionDebugInfo::onClickChooseAvatar(void* data)
1036 std::string buffer; 1036{
1037 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1037 LLFloaterAvatarPicker::show(callbackAvatarID, data, FALSE, TRUE);
1038 { 1038}
1039 buffer = llformat("texture_detail_%d", i); 1039
1040 texture_ctrl = getChild<LLTextureCtrl>(buffer); 1040// static
1041 if(texture_ctrl) 1041void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
1042 { 1042{
1043 lldebugs << "Detail Texture " << i << ": " 1043 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*) data;
1044 << compp->getDetailTextureID(i) << llendl; 1044 if (ids.empty() || names.empty()) return;
1045 LLUUID tmp_id(compp->getDetailTextureID(i)); 1045 self->mTargetAvatar = ids[0];
1046 texture_ctrl->setImageAssetID(tmp_id); 1046 self->childSetValue("target_avatar_name", LLSD(names[0]));
1047 } 1047 self->refreshFromRegion( gAgent.getRegion() );
1048 } 1048}
1049 1049
1050 for(S32 i = 0; i < CORNER_COUNT; ++i) 1050// static
1051 { 1051void LLPanelRegionDebugInfo::onClickReturn(void* data)
1052 buffer = llformat("height_start_spin_%d", i); 1052{
1053 childSetValue(buffer, LLSD(compp->getStartHeight(i))); 1053 LLPanelRegionDebugInfo* panelp = (LLPanelRegionDebugInfo*) data;
1054 buffer = llformat("height_range_spin_%d", i); 1054 if (panelp->mTargetAvatar.isNull()) return;
1055 childSetValue(buffer, LLSD(compp->getHeightRange(i))); 1055
1056 } 1056 LLSD args;
1057 1057 args["USER_NAME"] = panelp->childGetValue("target_avatar_name").asString();
1058 // Call the parent for common book-keeping 1058 LLSD payload;
1059 return LLPanelRegionInfo::refreshFromRegion(region); 1059 payload["avatar_id"] = panelp->mTargetAvatar;
1060} 1060
1061 1061 U32 flags = SWD_ALWAYS_RETURN_OBJECTS;
1062 1062
1063BOOL LLPanelRegionTextureInfo::postBuild() 1063 if (panelp->childGetValue("return_scripts").asBoolean())
1064{ 1064 {
1065 LLPanelRegionInfo::postBuild(); 1065 flags |= SWD_SCRIPTED_ONLY;
1066 std::string buffer; 1066 }
1067 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1067
1068 { 1068 if (panelp->childGetValue("return_other_land").asBoolean())
1069 buffer = llformat("texture_detail_%d", i); 1069 {
1070 initCtrl(buffer); 1070 flags |= SWD_OTHERS_LAND_ONLY;
1071 } 1071 }
1072 1072 payload["flags"] = int(flags);
1073 for(S32 i = 0; i < CORNER_COUNT; ++i) 1073 payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean();
1074 { 1074 LLNotifications::instance().add("EstateObjectReturn", args, payload,
1075 buffer = llformat("height_start_spin_%d", i); 1075 boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2));
1076 initCtrl(buffer); 1076}
1077 buffer = llformat("height_range_spin_%d", i); 1077
1078 initCtrl(buffer); 1078bool LLPanelRegionDebugInfo::callbackReturn(const LLSD& notification, const LLSD& response)
1079 } 1079{
1080 1080 S32 option = LLNotification::getSelectedOption(notification, response);
1081// LLButton* btn = new LLButton("dump", LLRect(0, 20, 100, 0), "", onClickDump, this); 1081 if (option != 0) return false;
1082// btn->setFollows(FOLLOWS_TOP|FOLLOWS_LEFT); 1082
1083// addChild(btn); 1083 LLUUID target_avatar = notification["payload"]["avatar_id"].asUUID();
1084 1084 if (!target_avatar.isNull())
1085 return LLPanelRegionInfo::postBuild(); 1085 {
1086} 1086 U32 flags = notification["payload"]["flags"].asInteger();
1087 1087 bool return_estate_wide = notification["payload"]["return_estate_wide"];
1088BOOL LLPanelRegionTextureInfo::sendUpdate() 1088 if (return_estate_wide)
1089{ 1089 {
1090 llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl; 1090 // send as estate message - routed by spaceserver to all regions in estate
1091 1091 strings_t strings;
1092 // Make sure user hasn't chosen wacky textures. 1092 strings.push_back(llformat("%d", flags));
1093 if (!validateTextureSizes()) 1093 strings.push_back(target_avatar.asString());
1094 { 1094
1095 return FALSE; 1095 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1096 } 1096
1097 1097 sendEstateOwnerMessage(gMessageSystem, "estateobjectreturn", invoice, strings);
1098 LLTextureCtrl* texture_ctrl; 1098 }
1099 std::string buffer; 1099 else
1100 std::string id_str; 1100 {
1101 LLMessageSystem* msg = gMessageSystem; 1101 // send to this simulator only
1102 strings_t strings; 1102 send_sim_wide_deletes(target_avatar, flags);
1103 1103 }
1104 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1104 }
1105 1105 return false;
1106 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1106}
1107 { 1107
1108 buffer = llformat("texture_detail_%d", i); 1108
1109 texture_ctrl = getChild<LLTextureCtrl>(buffer); 1109// static
1110 if(texture_ctrl) 1110void LLPanelRegionDebugInfo::onClickTopColliders(void* data)
1111 { 1111{
1112 LLUUID tmp_id(texture_ctrl->getImageAssetID()); 1112 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data;
1113 tmp_id.toString(id_str); 1113 strings_t strings;
1114 buffer = llformat("%d %s", i, id_str.c_str()); 1114 strings.push_back("1"); // one physics step
1115 strings.push_back(buffer); 1115 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1116 } 1116 LLFloaterTopObjects::show();
1117 } 1117 LLFloaterTopObjects::clearList();
1118 sendEstateOwnerMessage(msg, "texturedetail", invoice, strings); 1118 self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings);
1119 strings.clear(); 1119}
1120 for(S32 i = 0; i < CORNER_COUNT; ++i) 1120
1121 { 1121// static
1122 buffer = llformat("height_start_spin_%d", i); 1122void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
1123 std::string buffer2 = llformat("height_range_spin_%d", i); 1123{
1124 std::string buffer3 = llformat("%d %f %f", i, (F32)childGetValue(buffer).asReal(), (F32)childGetValue(buffer2).asReal()); 1124 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data;
1125 strings.push_back(buffer3); 1125 strings_t strings;
1126 } 1126 strings.push_back("6"); // top 5 scripts
1127 sendEstateOwnerMessage(msg, "textureheights", invoice, strings); 1127 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1128 strings.clear(); 1128 LLFloaterTopObjects::show();
1129 sendEstateOwnerMessage(msg, "texturecommit", invoice, strings); 1129 LLFloaterTopObjects::clearList();
1130 return TRUE; 1130 self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings);
1131} 1131}
1132 1132
1133BOOL LLPanelRegionTextureInfo::validateTextureSizes() 1133// static
1134{ 1134void LLPanelRegionDebugInfo::onClickRestart(void* data)
1135 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) 1135{
1136 { 1136 LLNotifications::instance().add("ConfirmRestart", LLSD(), LLSD(),
1137 std::string buffer; 1137 boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2));
1138 buffer = llformat("texture_detail_%d", i); 1138}
1139 LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(buffer); 1139
1140 if (!texture_ctrl) continue; 1140bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response)
1141 1141{
1142 LLUUID image_asset_id = texture_ctrl->getImageAssetID(); 1142 S32 option = LLNotification::getSelectedOption(notification, response);
1143 LLViewerImage* img = gImageList.getImage(image_asset_id); 1143 if (option != 0) return false;
1144 S32 components = img->getComponents(); 1144
1145 // Must ask for highest resolution version's width. JC 1145 strings_t strings;
1146 S32 width = img->getWidth(0); 1146 strings.push_back("120");
1147 S32 height = img->getHeight(0); 1147 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1148 1148 sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings);
1149 //llinfos << "texture detail " << i << " is " << width << "x" << height << "x" << components << llendl; 1149 return false;
1150 1150}
1151 if (components != 3) 1151
1152 { 1152// static
1153 LLSD args; 1153void LLPanelRegionDebugInfo::onClickCancelRestart(void* data)
1154 args["TEXTURE_NUM"] = i+1; 1154{
1155 args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8); 1155 LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data;
1156 LLNotifications::instance().add("InvalidTerrainBitDepth", args); 1156 strings_t strings;
1157 return FALSE; 1157 strings.push_back("-1");
1158 } 1158 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1159 1159 self->sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings);
1160 if (width > 512 || height > 512) 1160}
1161 { 1161
1162 1162
1163 LLSD args; 1163/////////////////////////////////////////////////////////////////////////////
1164 args["TEXTURE_NUM"] = i+1; 1164// LLPanelRegionTextureInfo
1165 args["TEXTURE_SIZE_X"] = width; 1165//
1166 args["TEXTURE_SIZE_Y"] = height; 1166LLPanelRegionTextureInfo::LLPanelRegionTextureInfo() : LLPanelRegionInfo()
1167 LLNotifications::instance().add("InvalidTerrainSize", args); 1167{
1168 return FALSE; 1168 // nothing.
1169 1169}
1170 } 1170
1171 } 1171bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region)
1172 1172{
1173 return TRUE; 1173 BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
1174} 1174 setCtrlsEnabled(allow_modify);
1175 1175 childDisable("apply_btn");
1176 1176
1177// static 1177 if (region)
1178void LLPanelRegionTextureInfo::onClickDump(void* data) 1178 {
1179{ 1179 childSetValue("region_text", LLSD(region->getName()));
1180 llinfos << "LLPanelRegionTextureInfo::onClickDump()" << llendl; 1180 }
1181} 1181 else
1182 1182 {
1183 1183 childSetValue("region_text", LLSD(""));
1184///////////////////////////////////////////////////////////////////////////// 1184 }
1185// LLPanelRegionTerrainInfo 1185
1186///////////////////////////////////////////////////////////////////////////// 1186 if (!region) return LLPanelRegionInfo::refreshFromRegion(region);
1187BOOL LLPanelRegionTerrainInfo::postBuild() 1187
1188{ 1188 LLVLComposition* compp = region->getComposition();
1189 LLPanelRegionInfo::postBuild(); 1189 LLTextureCtrl* texture_ctrl;
1190 1190 std::string buffer;
1191 initHelpBtn("water_height_help", "HelpRegionWaterHeight"); 1191 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1192 initHelpBtn("terrain_raise_help", "HelpRegionTerrainRaise"); 1192 {
1193 initHelpBtn("terrain_lower_help", "HelpRegionTerrainLower"); 1193 buffer = llformat("texture_detail_%d", i);
1194 initHelpBtn("upload_raw_help", "HelpRegionUploadRaw"); 1194 texture_ctrl = getChild<LLTextureCtrl>(buffer);
1195 initHelpBtn("download_raw_help", "HelpRegionDownloadRaw"); 1195 if(texture_ctrl)
1196 initHelpBtn("use_estate_sun_help", "HelpRegionUseEstateSun"); 1196 {
1197 initHelpBtn("fixed_sun_help", "HelpRegionFixedSun"); 1197 lldebugs << "Detail Texture " << i << ": "
1198 initHelpBtn("bake_terrain_help", "HelpRegionBakeTerrain"); 1198 << compp->getDetailTextureID(i) << llendl;
1199 1199 LLUUID tmp_id(compp->getDetailTextureID(i));
1200 initCtrl("water_height_spin"); 1200 texture_ctrl->setImageAssetID(tmp_id);
1201 initCtrl("terrain_raise_spin"); 1201 }
1202 initCtrl("terrain_lower_spin"); 1202 }
1203 1203
1204 initCtrl("fixed_sun_check"); 1204 for(S32 i = 0; i < CORNER_COUNT; ++i)
1205 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this); 1205 {
1206 childSetCommitCallback("use_estate_sun_check", onChangeUseEstateTime, this); 1206 buffer = llformat("height_start_spin_%d", i);
1207 childSetCommitCallback("sun_hour_slider", onChangeSunHour, this); 1207 childSetValue(buffer, LLSD(compp->getStartHeight(i)));
1208 1208 buffer = llformat("height_range_spin_%d", i);
1209 childSetAction("download_raw_btn", onClickDownloadRaw, this); 1209 childSetValue(buffer, LLSD(compp->getHeightRange(i)));
1210 childSetAction("upload_raw_btn", onClickUploadRaw, this); 1210 }
1211 childSetAction("bake_terrain_btn", onClickBakeTerrain, this); 1211
1212 1212 // Call the parent for common book-keeping
1213 return TRUE; 1213 return LLPanelRegionInfo::refreshFromRegion(region);
1214} 1214}
1215 1215
1216// virtual 1216
1217bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) 1217BOOL LLPanelRegionTextureInfo::postBuild()
1218{ 1218{
1219 llinfos << "LLPanelRegionTerrainInfo::refreshFromRegion" << llendl; 1219 LLPanelRegionInfo::postBuild();
1220 1220 std::string buffer;
1221 BOOL owner_or_god = gAgent.isGodlike() 1221 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1222 || (region && (region->getOwner() == gAgent.getID())); 1222 {
1223 BOOL owner_or_god_or_manager = owner_or_god 1223 buffer = llformat("texture_detail_%d", i);
1224 || (region && region->isEstateManager()); 1224 initCtrl(buffer);
1225 setCtrlsEnabled(owner_or_god_or_manager); 1225 }
1226 childDisable("apply_btn"); 1226
1227 1227 for(S32 i = 0; i < CORNER_COUNT; ++i)
1228 childSetEnabled("download_raw_btn", owner_or_god); 1228 {
1229 childSetEnabled("upload_raw_btn", owner_or_god); 1229 buffer = llformat("height_start_spin_%d", i);
1230 childSetEnabled("bake_terrain_btn", owner_or_god); 1230 initCtrl(buffer);
1231 1231 buffer = llformat("height_range_spin_%d", i);
1232 return LLPanelRegionInfo::refreshFromRegion(region); 1232 initCtrl(buffer);
1233} 1233 }
1234 1234
1235// virtual 1235// LLButton* btn = new LLButton("dump", LLRect(0, 20, 100, 0), "", onClickDump, this);
1236BOOL LLPanelRegionTerrainInfo::sendUpdate() 1236// btn->setFollows(FOLLOWS_TOP|FOLLOWS_LEFT);
1237{ 1237// addChild(btn);
1238 llinfos << "LLPanelRegionTerrainInfo::sendUpdate" << llendl; 1238
1239 std::string buffer; 1239 return LLPanelRegionInfo::postBuild();
1240 strings_t strings; 1240}
1241 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1241
1242 1242BOOL LLPanelRegionTextureInfo::sendUpdate()
1243 buffer = llformat("%f", (F32)childGetValue("water_height_spin").asReal()); 1243{
1244 strings.push_back(buffer); 1244 llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl;
1245 buffer = llformat("%f", (F32)childGetValue("terrain_raise_spin").asReal()); 1245
1246 strings.push_back(buffer); 1246 // Make sure user hasn't chosen wacky textures.
1247 buffer = llformat("%f", (F32)childGetValue("terrain_lower_spin").asReal()); 1247 if (!validateTextureSizes())
1248 strings.push_back(buffer); 1248 {
1249 buffer = llformat("%s", (childGetValue("use_estate_sun_check").asBoolean() ? "Y" : "N")); 1249 return FALSE;
1250 strings.push_back(buffer); 1250 }
1251 buffer = llformat("%s", (childGetValue("fixed_sun_check").asBoolean() ? "Y" : "N")); 1251
1252 strings.push_back(buffer); 1252 LLTextureCtrl* texture_ctrl;
1253 buffer = llformat("%f", (F32)childGetValue("sun_hour_slider").asReal() ); 1253 std::string buffer;
1254 strings.push_back(buffer); 1254 std::string id_str;
1255 1255 LLMessageSystem* msg = gMessageSystem;
1256 // Grab estate information in case the user decided to set the 1256 strings_t strings;
1257 // region back to estate time. JC 1257
1258 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); 1258 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1259 if (!floater) return true; 1259
1260 1260 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1261 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); 1261 {
1262 if (!tab) return true; 1262 buffer = llformat("texture_detail_%d", i);
1263 1263 texture_ctrl = getChild<LLTextureCtrl>(buffer);
1264 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate"); 1264 if(texture_ctrl)
1265 if (!panel) return true; 1265 {
1266 1266 LLUUID tmp_id(texture_ctrl->getImageAssetID());
1267 BOOL estate_global_time = panel->getGlobalTime(); 1267 tmp_id.toString(id_str);
1268 BOOL estate_fixed_sun = panel->getFixedSun(); 1268 buffer = llformat("%d %s", i, id_str.c_str());
1269 F32 estate_sun_hour; 1269 strings.push_back(buffer);
1270 if (estate_global_time) 1270 }
1271 { 1271 }
1272 estate_sun_hour = 0.f; 1272 sendEstateOwnerMessage(msg, "texturedetail", invoice, strings);
1273 } 1273 strings.clear();
1274 else 1274 for(S32 i = 0; i < CORNER_COUNT; ++i)
1275 { 1275 {
1276 estate_sun_hour = panel->getSunHour(); 1276 buffer = llformat("height_start_spin_%d", i);
1277 } 1277 std::string buffer2 = llformat("height_range_spin_%d", i);
1278 1278 std::string buffer3 = llformat("%d %f %f", i, (F32)childGetValue(buffer).asReal(), (F32)childGetValue(buffer2).asReal());
1279 buffer = llformat("%s", (estate_global_time ? "Y" : "N") ); 1279 strings.push_back(buffer3);
1280 strings.push_back(buffer); 1280 }
1281 buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") ); 1281 sendEstateOwnerMessage(msg, "textureheights", invoice, strings);
1282 strings.push_back(buffer); 1282 strings.clear();
1283 buffer = llformat("%f", estate_sun_hour); 1283 sendEstateOwnerMessage(msg, "texturecommit", invoice, strings);
1284 strings.push_back(buffer); 1284 return TRUE;
1285 1285}
1286 sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings); 1286
1287 return TRUE; 1287BOOL LLPanelRegionTextureInfo::validateTextureSizes()
1288} 1288{
1289 1289 for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i)
1290// static 1290 {
1291void LLPanelRegionTerrainInfo::onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data) 1291 std::string buffer;
1292{ 1292 buffer = llformat("texture_detail_%d", i);
1293 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data; 1293 LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(buffer);
1294 if (!panel) return; 1294 if (!texture_ctrl) continue;
1295 BOOL use_estate_sun = panel->childGetValue("use_estate_sun_check").asBoolean(); 1295
1296 panel->childSetEnabled("fixed_sun_check", !use_estate_sun); 1296 LLUUID image_asset_id = texture_ctrl->getImageAssetID();
1297 panel->childSetEnabled("sun_hour_slider", !use_estate_sun); 1297 LLViewerImage* img = gImageList.getImage(image_asset_id);
1298 if (use_estate_sun) 1298 S32 components = img->getComponents();
1299 { 1299 // Must ask for highest resolution version's width. JC
1300 panel->childSetValue("fixed_sun_check", LLSD(FALSE)); 1300 S32 width = img->getWidth(0);
1301 panel->childSetValue("sun_hour_slider", LLSD(0.f)); 1301 S32 height = img->getHeight(0);
1302 } 1302
1303 panel->childEnable("apply_btn"); 1303 //llinfos << "texture detail " << i << " is " << width << "x" << height << "x" << components << llendl;
1304} 1304
1305 1305 if (components != 3)
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_BIT_DEPTH"] = llformat("%d",components * 8);
1310 if (!panel) return; 1310 LLNotifications::instance().add("InvalidTerrainBitDepth", args);
1311 // Just enable the apply button. We let the sun-hour slider be enabled 1311 return FALSE;
1312 // for both fixed-sun and non-fixed-sun. JC 1312 }
1313 panel->childEnable("apply_btn"); 1313
1314} 1314 if (width > 512 || height > 512)
1315 1315 {
1316// static 1316
1317void LLPanelRegionTerrainInfo::onChangeSunHour(LLUICtrl* ctrl, void*) 1317 LLSD args;
1318{ 1318 args["TEXTURE_NUM"] = i+1;
1319 // can't use userdata to get panel, slider uses it internally 1319 args["TEXTURE_SIZE_X"] = width;
1320 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) ctrl->getParent(); 1320 args["TEXTURE_SIZE_Y"] = height;
1321 if (!panel) return; 1321 LLNotifications::instance().add("InvalidTerrainSize", args);
1322 panel->childEnable("apply_btn"); 1322 return FALSE;
1323} 1323
1324 1324 }
1325// static 1325 }
1326void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data) 1326
1327{ 1327 return TRUE;
1328 LLFilePicker& picker = LLFilePicker::instance(); 1328}
1329 if (!picker.getSaveFile(LLFilePicker::FFSAVE_RAW, "terrain.raw")) 1329
1330 { 1330
1331 llwarns << "No file" << llendl; 1331// static
1332 return; 1332void LLPanelRegionTextureInfo::onClickDump(void* data)
1333 } 1333{
1334 std::string filepath = picker.getFirstFile(); 1334 llinfos << "LLPanelRegionTextureInfo::onClickDump()" << llendl;
1335 gXferManager->expectFileForRequest(filepath); 1335}
1336 1336
1337 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data; 1337
1338 strings_t strings; 1338/////////////////////////////////////////////////////////////////////////////
1339 strings.push_back("download filename"); 1339// LLPanelRegionTerrainInfo
1340 strings.push_back(filepath); 1340/////////////////////////////////////////////////////////////////////////////
1341 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1341BOOL LLPanelRegionTerrainInfo::postBuild()
1342 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); 1342{
1343} 1343 LLPanelRegionInfo::postBuild();
1344 1344
1345// static 1345 initHelpBtn("water_height_help", "HelpRegionWaterHeight");
1346void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data) 1346 initHelpBtn("terrain_raise_help", "HelpRegionTerrainRaise");
1347{ 1347 initHelpBtn("terrain_lower_help", "HelpRegionTerrainLower");
1348 LLFilePicker& picker = LLFilePicker::instance(); 1348 initHelpBtn("upload_raw_help", "HelpRegionUploadRaw");
1349 if (!picker.getOpenFile(LLFilePicker::FFLOAD_RAW)) 1349 initHelpBtn("download_raw_help", "HelpRegionDownloadRaw");
1350 { 1350 initHelpBtn("use_estate_sun_help", "HelpRegionUseEstateSun");
1351 llwarns << "No file" << llendl; 1351 initHelpBtn("fixed_sun_help", "HelpRegionFixedSun");
1352 return; 1352 initHelpBtn("bake_terrain_help", "HelpRegionBakeTerrain");
1353 } 1353
1354 std::string filepath = picker.getFirstFile(); 1354 initCtrl("water_height_spin");
1355 gXferManager->expectFileForTransfer(filepath); 1355 initCtrl("terrain_raise_spin");
1356 1356 initCtrl("terrain_lower_spin");
1357 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data; 1357
1358 strings_t strings; 1358 initCtrl("fixed_sun_check");
1359 strings.push_back("upload filename"); 1359 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this);
1360 strings.push_back(filepath); 1360 childSetCommitCallback("use_estate_sun_check", onChangeUseEstateTime, this);
1361 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1361 childSetCommitCallback("sun_hour_slider", onChangeSunHour, this);
1362 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); 1362
1363 1363 childSetAction("download_raw_btn", onClickDownloadRaw, this);
1364 LLNotifications::instance().add("RawUploadStarted"); 1364 childSetAction("upload_raw_btn", onClickUploadRaw, this);
1365} 1365 childSetAction("bake_terrain_btn", onClickBakeTerrain, this);
1366 1366
1367// static 1367 return TRUE;
1368void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data) 1368}
1369{ 1369
1370 LLNotifications::instance().add( 1370// virtual
1371 LLNotification::Params("ConfirmBakeTerrain") 1371bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
1372 .functor(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2))); 1372{
1373} 1373 llinfos << "LLPanelRegionTerrainInfo::refreshFromRegion" << llendl;
1374 1374
1375bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response) 1375 BOOL owner_or_god = gAgent.isGodlike()
1376{ 1376 || (region && (region->getOwner() == gAgent.getID()));
1377 S32 option = LLNotification::getSelectedOption(notification, response); 1377 BOOL owner_or_god_or_manager = owner_or_god
1378 if (option != 0) return false; 1378 || (region && region->isEstateManager());
1379 1379 setCtrlsEnabled(owner_or_god_or_manager);
1380 strings_t strings; 1380 childDisable("apply_btn");
1381 strings.push_back("bake"); 1381
1382 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 1382 childSetEnabled("download_raw_btn", owner_or_god);
1383 sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); 1383 childSetEnabled("upload_raw_btn", owner_or_god);
1384 return false; 1384 childSetEnabled("bake_terrain_btn", owner_or_god);
1385} 1385
1386 1386 return LLPanelRegionInfo::refreshFromRegion(region);
1387///////////////////////////////////////////////////////////////////////////// 1387}
1388// LLPanelEstateInfo 1388
1389// 1389// virtual
1390 1390BOOL LLPanelRegionTerrainInfo::sendUpdate()
1391LLPanelEstateInfo::LLPanelEstateInfo() 1391{
1392: LLPanelRegionInfo(), 1392 llinfos << "LLPanelRegionTerrainInfo::sendUpdate" << llendl;
1393 mEstateID(0) // invalid 1393 std::string buffer;
1394{ 1394 strings_t strings;
1395} 1395 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1396 1396
1397// static 1397 buffer = llformat("%f", (F32)childGetValue("water_height_spin").asReal());
1398void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch) 1398 strings.push_back(buffer);
1399{ 1399 buffer = llformat("%f", (F32)childGetValue("terrain_raise_spin").asReal());
1400 std::string name; 1400 strings.push_back(buffer);
1401 1401 buffer = llformat("%f", (F32)childGetValue("terrain_lower_spin").asReal());
1402// name.assign("setowner"); 1402 strings.push_back(buffer);
1403// static LLDispatchSetEstateOwner set_owner; 1403 buffer = llformat("%s", (childGetValue("use_estate_sun_check").asBoolean() ? "Y" : "N"));
1404// dispatch.addHandler(name, &set_owner); 1404 strings.push_back(buffer);
1405 1405 buffer = llformat("%s", (childGetValue("fixed_sun_check").asBoolean() ? "Y" : "N"));
1406 name.assign("estateupdateinfo"); 1406 strings.push_back(buffer);
1407 static LLDispatchEstateUpdateInfo estate_update_info; 1407 buffer = llformat("%f", (F32)childGetValue("sun_hour_slider").asReal() );
1408 dispatch.addHandler(name, &estate_update_info); 1408 strings.push_back(buffer);
1409 1409
1410 name.assign("setaccess"); 1410 // Grab estate information in case the user decided to set the
1411 static LLDispatchSetEstateAccess set_access; 1411 // region back to estate time. JC
1412 dispatch.addHandler(name, &set_access); 1412 LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
1413 1413 if (!floater) return true;
1414 estate_dispatch_initialized = true; 1414
1415} 1415 LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
1416 1416 if (!tab) return true;
1417// static 1417
1418// Disables the sun-hour slider and the use fixed time check if the use global time is check 1418 LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
1419void LLPanelEstateInfo::onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data) 1419 if (!panel) return true;
1420{ 1420
1421 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data; 1421 BOOL estate_global_time = panel->getGlobalTime();
1422 if (panel) 1422 BOOL estate_fixed_sun = panel->getFixedSun();
1423 { 1423 F32 estate_sun_hour;
1424 bool enabled = !panel->childGetValue("use_global_time_check").asBoolean(); 1424 if (estate_global_time)
1425 panel->childSetEnabled("sun_hour_slider", enabled); 1425 {
1426 panel->childSetEnabled("fixed_sun_check", enabled); 1426 estate_sun_hour = 0.f;
1427 panel->childSetValue("fixed_sun_check", LLSD(FALSE)); 1427 }
1428 panel->enableButton("apply_btn"); 1428 else
1429 } 1429 {
1430} 1430 estate_sun_hour = panel->getSunHour();
1431 1431 }
1432// Enables the sun-hour slider if the fixed-sun checkbox is set 1432
1433void LLPanelEstateInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data) 1433 buffer = llformat("%s", (estate_global_time ? "Y" : "N") );
1434{ 1434 strings.push_back(buffer);
1435 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data; 1435 buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") );
1436 if (panel) 1436 strings.push_back(buffer);
1437 { 1437 buffer = llformat("%f", estate_sun_hour);
1438 bool enabled = !panel->childGetValue("fixed_sun_check").asBoolean(); 1438 strings.push_back(buffer);
1439 panel->childSetEnabled("use_global_time_check", enabled); 1439
1440 panel->childSetValue("use_global_time_check", LLSD(FALSE)); 1440 sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings);
1441 panel->enableButton("apply_btn"); 1441 return TRUE;
1442 } 1442}
1443} 1443
1444 1444// static
1445 1445void LLPanelRegionTerrainInfo::onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data)
1446 1446{
1447 1447 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data;
1448//--------------------------------------------------------------------------- 1448 if (!panel) return;
1449// Add/Remove estate access button callbacks 1449 BOOL use_estate_sun = panel->childGetValue("use_estate_sun_check").asBoolean();
1450//--------------------------------------------------------------------------- 1450 panel->childSetEnabled("fixed_sun_check", !use_estate_sun);
1451void LLPanelEstateInfo::onClickEditSky(void* user_data) 1451 panel->childSetEnabled("sun_hour_slider", !use_estate_sun);
1452{ 1452 if (use_estate_sun)
1453 LLFloaterWindLight::show(); 1453 {
1454} 1454 panel->childSetValue("fixed_sun_check", LLSD(FALSE));
1455 1455 panel->childSetValue("sun_hour_slider", LLSD(0.f));
1456void LLPanelEstateInfo::onClickEditDayCycle(void* user_data) 1456 }
1457{ 1457 panel->childEnable("apply_btn");
1458 LLFloaterDayCycle::show(); 1458}
1459} 1459
1460 1460// static
1461// static 1461void LLPanelRegionTerrainInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data)
1462void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data) 1462{
1463{ 1463 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data;
1464 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1464 if (!panel) return;
1465 LLCtrlListInterface *list = self->childGetListInterface("allowed_avatar_name_list"); 1465 // Just enable the apply button. We let the sun-hour slider be enabled
1466 if (!list) return; 1466 // for both fixed-sun and non-fixed-sun. JC
1467 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) 1467 panel->childEnable("apply_btn");
1468 { 1468}
1469 //args 1469
1470 1470// static
1471 LLSD args; 1471void LLPanelRegionTerrainInfo::onChangeSunHour(LLUICtrl* ctrl, void*)
1472 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1472{
1473 LLNotifications::instance().add("MaxAllowedAgentOnRegion", args); 1473 // can't use userdata to get panel, slider uses it internally
1474 return; 1474 LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) ctrl->getParent();
1475 } 1475 if (!panel) return;
1476 accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd"); 1476 panel->childEnable("apply_btn");
1477} 1477}
1478 1478
1479// static 1479// static
1480void LLPanelEstateInfo::onClickRemoveAllowedAgent(void* user_data) 1480void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data)
1481{ 1481{
1482 accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list"); 1482 LLFilePicker& picker = LLFilePicker::instance();
1483} 1483 if (!picker.getSaveFile(LLFilePicker::FFSAVE_RAW, "terrain.raw"))
1484 1484 {
1485// static 1485 llwarns << "No file" << llendl;
1486void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data) 1486 return;
1487{ 1487 }
1488 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1488 std::string filepath = picker.getFirstFile();
1489 LLCtrlListInterface *list = self->childGetListInterface("allowed_group_name_list"); 1489 gXferManager->expectFileForRequest(filepath);
1490 if (!list) return; 1490
1491 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) 1491 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data;
1492 { 1492 strings_t strings;
1493 LLSD args; 1493 strings.push_back("download filename");
1494 args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1494 strings.push_back(filepath);
1495 LLNotifications::instance().add("MaxAllowedGroupsOnRegion", args); 1495 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1496 return; 1496 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
1497 } 1497}
1498 1498
1499 LLNotification::Params params("ChangeLindenAccess"); 1499// static
1500 params.functor(boost::bind(&LLPanelEstateInfo::addAllowedGroup, self, _1, _2)); 1500void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data)
1501 if (isLindenEstate()) 1501{
1502 { 1502 LLFilePicker& picker = LLFilePicker::instance();
1503 LLNotifications::instance().add(params); 1503 if (!picker.getOpenFile(LLFilePicker::FFLOAD_RAW))
1504 } 1504 {
1505 else 1505 llwarns << "No file" << llendl;
1506 { 1506 return;
1507 LLNotifications::instance().forceResponse(params, 0); 1507 }
1508 } 1508 std::string filepath = picker.getFirstFile();
1509} 1509 gXferManager->expectFileForTransfer(filepath);
1510 1510
1511bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response) 1511 LLPanelRegionTerrainInfo* self = (LLPanelRegionTerrainInfo*)data;
1512{ 1512 strings_t strings;
1513 S32 option = LLNotification::getSelectedOption(notification, response); 1513 strings.push_back("upload filename");
1514 if (option != 0) return false; 1514 strings.push_back(filepath);
1515 1515 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1516 LLFloater* parent_floater = gFloaterView->getParentFloater(this); 1516 self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
1517 1517
1518 LLFloaterGroupPicker* widget; 1518 LLNotifications::instance().add("RawUploadStarted");
1519 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); 1519}
1520 if (widget) 1520
1521 { 1521// static
1522 widget->setSelectCallback(addAllowedGroup2, NULL); 1522void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data)
1523 if (parent_floater) 1523{
1524 { 1524 LLNotifications::instance().add(
1525 LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget); 1525 LLNotification::Params("ConfirmBakeTerrain")
1526 widget->setOrigin(new_rect.mLeft, new_rect.mBottom); 1526 .functor(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2)));
1527 parent_floater->addDependentFloater(widget); 1527}
1528 } 1528
1529 } 1529bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response)
1530 1530{
1531 return false; 1531 S32 option = LLNotification::getSelectedOption(notification, response);
1532} 1532 if (option != 0) return false;
1533 1533
1534// static 1534 strings_t strings;
1535void LLPanelEstateInfo::onClickRemoveAllowedGroup(void* user_data) 1535 strings.push_back("bake");
1536{ 1536 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
1537 accessRemoveCore(ESTATE_ACCESS_ALLOWED_GROUP_REMOVE, "EstateAllowedGroupRemove", "allowed_group_name_list"); 1537 sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
1538} 1538 return false;
1539 1539}
1540// static 1540
1541void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data) 1541/////////////////////////////////////////////////////////////////////////////
1542{ 1542// LLPanelEstateInfo
1543 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1543//
1544 LLCtrlListInterface *list = self->childGetListInterface("banned_avatar_name_list"); 1544
1545 if (!list) return; 1545LLPanelEstateInfo::LLPanelEstateInfo()
1546 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) 1546: LLPanelRegionInfo(),
1547 { 1547 mEstateID(0) // invalid
1548 LLSD args; 1548{
1549 args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1549}
1550 LLNotifications::instance().add("MaxBannedAgentsOnRegion", args); 1550
1551 return; 1551// static
1552 } 1552void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
1553 accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd"); 1553{
1554} 1554 std::string name;
1555 1555
1556// static 1556// name.assign("setowner");
1557void LLPanelEstateInfo::onClickRemoveBannedAgent(void* user_data) 1557// static LLDispatchSetEstateOwner set_owner;
1558{ 1558// dispatch.addHandler(name, &set_owner);
1559 accessRemoveCore(ESTATE_ACCESS_BANNED_AGENT_REMOVE, "EstateBannedAgentRemove", "banned_avatar_name_list"); 1559
1560} 1560 name.assign("estateupdateinfo");
1561 1561 static LLDispatchEstateUpdateInfo estate_update_info;
1562// static 1562 dispatch.addHandler(name, &estate_update_info);
1563void LLPanelEstateInfo::onClickAddEstateManager(void* user_data) 1563
1564{ 1564 name.assign("setaccess");
1565 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; 1565 static LLDispatchSetEstateAccess set_access;
1566 LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list"); 1566 dispatch.addHandler(name, &set_access);
1567 if (!list) return; 1567
1568 if (list->getItemCount() >= ESTATE_MAX_MANAGERS) 1568 estate_dispatch_initialized = true;
1569 { // Tell user they can't add more managers 1569}
1570 LLSD args; 1570
1571 args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS); 1571// static
1572 LLNotifications::instance().add("MaxManagersOnRegion", args); 1572// Disables the sun-hour slider and the use fixed time check if the use global time is check
1573 } 1573void LLPanelEstateInfo::onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data)
1574 else 1574{
1575 { // Go pick managers to add 1575 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data;
1576 accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd"); 1576 if (panel)
1577 } 1577 {
1578} 1578 bool enabled = !panel->childGetValue("use_global_time_check").asBoolean();
1579 1579 panel->childSetEnabled("sun_hour_slider", enabled);
1580// static 1580 panel->childSetEnabled("fixed_sun_check", enabled);
1581void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data) 1581 panel->childSetValue("fixed_sun_check", LLSD(FALSE));
1582{ 1582 panel->enableButton("apply_btn");
1583 accessRemoveCore(ESTATE_ACCESS_MANAGER_REMOVE, "EstateManagerRemove", "estate_manager_name_list"); 1583 }
1584} 1584}
1585 1585
1586//--------------------------------------------------------------------------- 1586// Enables the sun-hour slider if the fixed-sun checkbox is set
1587// Kick from estate methods 1587void LLPanelEstateInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data)
1588//--------------------------------------------------------------------------- 1588{
1589struct LLKickFromEstateInfo 1589 LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data;
1590{ 1590 if (panel)
1591 LLPanelEstateInfo *mEstatePanelp; 1591 {
1592 LLUUID mAgentID; 1592 bool enabled = !panel->childGetValue("fixed_sun_check").asBoolean();
1593}; 1593 panel->childSetEnabled("use_global_time_check", enabled);
1594 1594 panel->childSetValue("use_global_time_check", LLSD(FALSE));
1595void LLPanelEstateInfo::onClickKickUser(void *user_data) 1595 panel->enableButton("apply_btn");
1596{ 1596 }
1597 LLPanelEstateInfo* panelp = (LLPanelEstateInfo*)user_data; 1597}
1598 1598
1599 // this depends on the grandparent view being a floater 1599
1600 // in order to set up floater dependency 1600
1601 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); 1601
1602 LLFloater* child_floater = LLFloaterAvatarPicker::show(LLPanelEstateInfo::onKickUserCommit, user_data, FALSE, TRUE); 1602//---------------------------------------------------------------------------
1603 parent_floater->addDependentFloater(child_floater); 1603// Add/Remove estate access button callbacks
1604} 1604//---------------------------------------------------------------------------
1605 1605void LLPanelEstateInfo::onClickEditSky(void* user_data)
1606void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata) 1606{
1607{ 1607 LLFloaterWindLight::show();
1608 if (names.empty() || ids.empty()) return; 1608}
1609 1609
1610 //check to make sure there is one valid user and id 1610void LLPanelEstateInfo::onClickEditDayCycle(void* user_data)
1611 if( (ids[0].isNull()) || 1611{
1612 (names[0].length() == 0) ) 1612 LLFloaterDayCycle::show();
1613 { 1613}
1614 return; 1614
1615 } 1615// static
1616 1616void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data)
1617 LLPanelEstateInfo* self = (LLPanelEstateInfo*)userdata; 1617{
1618 if(!self) return; 1618 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1619 1619 LLCtrlListInterface *list = self->childGetListInterface("allowed_avatar_name_list");
1620 //keep track of what user they want to kick and other misc info 1620 if (!list) return;
1621 LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo(); 1621 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
1622 kick_info->mEstatePanelp = self; 1622 {
1623 kick_info->mAgentID = ids[0]; 1623 //args
1624 1624
1625 //Bring up a confirmation dialog 1625 LLSD args;
1626 LLSD args; 1626 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1627 args["EVIL_USER"] = names[0]; 1627 LLNotifications::instance().add("MaxAllowedAgentOnRegion", args);
1628 LLSD payload; 1628 return;
1629 payload["agent_id"] = ids[0]; 1629 }
1630 LLNotifications::instance().add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2)); 1630 accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd");
1631 1631}
1632} 1632
1633 1633// static
1634bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& response) 1634void LLPanelEstateInfo::onClickRemoveAllowedAgent(void* user_data)
1635{ 1635{
1636 S32 option = LLNotification::getSelectedOption(notification, response); 1636 accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list");
1637 switch(option) 1637}
1638 { 1638
1639 case 0: 1639// static
1640 { 1640void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data)
1641 //Kick User 1641{
1642 strings_t strings; 1642 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1643 strings.push_back(notification["payload"]["agent_id"].asString()); 1643 LLCtrlListInterface *list = self->childGetListInterface("allowed_group_name_list");
1644 1644 if (!list) return;
1645 sendEstateOwnerMessage(gMessageSystem, "kickestate", LLFloaterRegionInfo::getLastInvoice(), strings); 1645 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
1646 break; 1646 {
1647 } 1647 LLSD args;
1648 default: 1648 args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1649 break; 1649 LLNotifications::instance().add("MaxAllowedGroupsOnRegion", args);
1650 } 1650 return;
1651 return false; 1651 }
1652} 1652
1653 1653 LLNotification::Params params("ChangeLindenAccess");
1654//--------------------------------------------------------------------------- 1654 params.functor(boost::bind(&LLPanelEstateInfo::addAllowedGroup, self, _1, _2));
1655// Core Add/Remove estate access methods 1655 if (isLindenEstate())
1656// TODO: INTERNATIONAL: don't build message text here; 1656 {
1657// instead, create multiple translatable messages and choose 1657 LLNotifications::instance().add(params);
1658// one based on the status. 1658 }
1659//--------------------------------------------------------------------------- 1659 else
1660std::string all_estates_text() 1660 {
1661{ 1661 LLNotifications::instance().forceResponse(params, 0);
1662 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1662 }
1663 if (!panel) return "(error)"; 1663}
1664 1664
1665 std::string owner = panel->getOwnerName(); 1665bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response)
1666 1666{
1667 LLViewerRegion* region = gAgent.getRegion(); 1667 S32 option = LLNotification::getSelectedOption(notification, response);
1668 if (gAgent.isGodlike()) 1668 if (option != 0) return false;
1669 { 1669
1670 return llformat("all estates\nowned by %s", owner.c_str()); 1670 LLFloater* parent_floater = gFloaterView->getParentFloater(this);
1671 } 1671
1672 else if (region && region->getOwner() == gAgent.getID()) 1672 LLFloaterGroupPicker* widget;
1673 { 1673 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
1674 return "all estates you own"; 1674 if (widget)
1675 } 1675 {
1676 else if (region && region->isEstateManager()) 1676 widget->setSelectCallback(addAllowedGroup2, NULL);
1677 { 1677 if (parent_floater)
1678 return llformat("all estates that\nyou manage for %s", owner.c_str()); 1678 {
1679 } 1679 LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, widget);
1680 else 1680 widget->setOrigin(new_rect.mLeft, new_rect.mBottom);
1681 { 1681 parent_floater->addDependentFloater(widget);
1682 return "(error)"; 1682 }
1683 } 1683 }
1684} 1684
1685 1685 return false;
1686// static 1686}
1687bool LLPanelEstateInfo::isLindenEstate() 1687
1688{ 1688// static
1689 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1689void LLPanelEstateInfo::onClickRemoveAllowedGroup(void* user_data)
1690 if (!panel) return false; 1690{
1691 1691 accessRemoveCore(ESTATE_ACCESS_ALLOWED_GROUP_REMOVE, "EstateAllowedGroupRemove", "allowed_group_name_list");
1692 U32 estate_id = panel->getEstateID(); 1692}
1693 return (estate_id <= ESTATE_LAST_LINDEN); 1693
1694} 1694// static
1695 1695void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data)
1696typedef std::vector<LLUUID> AgentOrGroupIDsVector; 1696{
1697struct LLEstateAccessChangeInfo 1697 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1698{ 1698 LLCtrlListInterface *list = self->childGetListInterface("banned_avatar_name_list");
1699 LLEstateAccessChangeInfo(const LLSD& sd) 1699 if (!list) return;
1700 { 1700 if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS)
1701 mDialogName = sd["dialog_name"].asString(); 1701 {
1702 mOperationFlag = (U32)sd["operation"].asInteger(); 1702 LLSD args;
1703 LLSD::array_const_iterator end_it = sd["allowed_ids"].endArray(); 1703 args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1704 for (LLSD::array_const_iterator id_it = sd["allowed_ids"].beginArray(); 1704 LLNotifications::instance().add("MaxBannedAgentsOnRegion", args);
1705 id_it != end_it; 1705 return;
1706 ++id_it) 1706 }
1707 { 1707 accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd");
1708 mAgentOrGroupIDs.push_back(id_it->asUUID()); 1708}
1709 } 1709
1710 } 1710// static
1711 1711void LLPanelEstateInfo::onClickRemoveBannedAgent(void* user_data)
1712 const LLSD asLLSD() const 1712{
1713 { 1713 accessRemoveCore(ESTATE_ACCESS_BANNED_AGENT_REMOVE, "EstateBannedAgentRemove", "banned_avatar_name_list");
1714 LLSD sd; 1714}
1715 sd["name"] = mDialogName; 1715
1716 sd["operation"] = (S32)mOperationFlag; 1716// static
1717 for (AgentOrGroupIDsVector::const_iterator it = mAgentOrGroupIDs.begin(); 1717void LLPanelEstateInfo::onClickAddEstateManager(void* user_data)
1718 it != mAgentOrGroupIDs.end(); 1718{
1719 ++it) 1719 LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data;
1720 { 1720 LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list");
1721 sd["allowed_ids"].append(*it); 1721 if (!list) return;
1722 } 1722 if (list->getItemCount() >= ESTATE_MAX_MANAGERS)
1723 return sd; 1723 { // Tell user they can't add more managers
1724 } 1724 LLSD args;
1725 1725 args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS);
1726 U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc. 1726 LLNotifications::instance().add("MaxManagersOnRegion", args);
1727 std::string mDialogName; 1727 }
1728 AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change 1728 else
1729}; 1729 { // Go pick managers to add
1730 1730 accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
1731// Special case callback for groups, since it has different callback format than names 1731 }
1732// static 1732}
1733void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data) 1733
1734{ 1734// static
1735 LLSD payload; 1735void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data)
1736 payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD; 1736{
1737 payload["dialog_name"] = "EstateAllowedGroupAdd"; 1737 accessRemoveCore(ESTATE_ACCESS_MANAGER_REMOVE, "EstateManagerRemove", "estate_manager_name_list");
1738 payload["allowed_ids"].append(id); 1738}
1739 1739
1740 LLSD args; 1740//---------------------------------------------------------------------------
1741 args["ALL_ESTATES"] = all_estates_text(); 1741// Kick from estate methods
1742 1742//---------------------------------------------------------------------------
1743 LLNotification::Params params("EstateAllowedGroupAdd"); 1743struct LLKickFromEstateInfo
1744 params.payload(payload) 1744{
1745 .substitutions(args) 1745 LLPanelEstateInfo *mEstatePanelp;
1746 .functor(accessCoreConfirm); 1746 LLUUID mAgentID;
1747 if (isLindenEstate()) 1747};
1748 { 1748
1749 LLNotifications::instance().forceResponse(params, 0); 1749void LLPanelEstateInfo::onClickKickUser(void *user_data)
1750 } 1750{
1751 else 1751 LLPanelEstateInfo* panelp = (LLPanelEstateInfo*)user_data;
1752 { 1752
1753 LLNotifications::instance().add(params); 1753 // this depends on the grandparent view being a floater
1754 } 1754 // in order to set up floater dependency
1755} 1755 LLFloater* parent_floater = gFloaterView->getParentFloater(panelp);
1756 1756 LLFloater* child_floater = LLFloaterAvatarPicker::show(LLPanelEstateInfo::onKickUserCommit, user_data, FALSE, TRUE);
1757// static 1757 parent_floater->addDependentFloater(child_floater);
1758void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dialog_name) 1758}
1759{ 1759
1760 LLSD payload; 1760void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata)
1761 payload["operation"] = (S32)operation_flag; 1761{
1762 payload["dialog_name"] = dialog_name; 1762 if (names.empty() || ids.empty()) return;
1763 // agent id filled in after avatar picker 1763
1764 1764 //check to make sure there is one valid user and id
1765 LLNotification::Params params("ChangeLindenAccess"); 1765 if( (ids[0].isNull()) ||
1766 params.payload(payload) 1766 (names[0].length() == 0) )
1767 .functor(accessAddCore2); 1767 {
1768 1768 return;
1769 if (isLindenEstate()) 1769 }
1770 { 1770
1771 LLNotifications::instance().add(params); 1771 LLPanelEstateInfo* self = (LLPanelEstateInfo*)userdata;
1772 } 1772 if(!self) return;
1773 else 1773
1774 { 1774 //keep track of what user they want to kick and other misc info
1775 // same as clicking "OK" 1775 LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo();
1776 LLNotifications::instance().forceResponse(params, 0); 1776 kick_info->mEstatePanelp = self;
1777 } 1777 kick_info->mAgentID = ids[0];
1778} 1778
1779 1779 //Bring up a confirmation dialog
1780// static 1780 LLSD args;
1781bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response) 1781 args["EVIL_USER"] = names[0];
1782{ 1782 LLSD payload;
1783 S32 option = LLNotification::getSelectedOption(notification, response); 1783 payload["agent_id"] = ids[0];
1784 if (option != 0) 1784 LLNotifications::instance().add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2));
1785 { 1785
1786 // abort change 1786}
1787 return false; 1787
1788 } 1788bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& response)
1789 1789{
1790 LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]); 1790 S32 option = LLNotification::getSelectedOption(notification, response);
1791 // avatar picker yes multi-select, yes close-on-select 1791 switch(option)
1792 LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, TRUE, TRUE); 1792 {
1793 return false; 1793 case 0:
1794} 1794 {
1795 1795 //Kick User
1796// static 1796 strings_t strings;
1797void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data) 1797 strings.push_back(notification["payload"]["agent_id"].asString());
1798{ 1798
1799 LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data; 1799 sendEstateOwnerMessage(gMessageSystem, "kickestate", LLFloaterRegionInfo::getLastInvoice(), strings);
1800 if (!change_info) return; 1800 break;
1801 if (ids.empty()) 1801 }
1802 { 1802 default:
1803 // User didn't select a name. 1803 break;
1804 delete change_info; 1804 }
1805 change_info = NULL; 1805 return false;
1806 return; 1806}
1807 } 1807
1808 // User did select a name. 1808//---------------------------------------------------------------------------
1809 change_info->mAgentOrGroupIDs = ids; 1809// Core Add/Remove estate access methods
1810 // Can't put estate owner on ban list 1810// TODO: INTERNATIONAL: don't build message text here;
1811 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1811// instead, create multiple translatable messages and choose
1812 if (!panel) return; 1812// one based on the status.
1813 LLViewerRegion* region = gAgent.getRegion(); 1813//---------------------------------------------------------------------------
1814 if (!region) return; 1814std::string all_estates_text()
1815 1815{
1816 if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD) 1816 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
1817 { 1817 if (!panel) return "(error)";
1818 LLCtrlListInterface *list = panel->childGetListInterface("allowed_avatar_name_list"); 1818
1819 int currentCount = (list ? list->getItemCount() : 0); 1819 std::string owner = panel->getOwnerName();
1820 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) 1820
1821 { 1821 LLViewerRegion* region = gAgent.getRegion();
1822 LLSD args; 1822 if (gAgent.isGodlike())
1823 args["NUM_ADDED"] = llformat("%d",ids.size()); 1823 {
1824 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1824 return llformat("all estates\nowned by %s", owner.c_str());
1825 args["LIST_TYPE"] = "Allowed Residents"; 1825 }
1826 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); 1826 else if (region && region->getOwner() == gAgent.getID())
1827 LLNotifications::instance().add("MaxAgentOnRegionBatch", args); 1827 {
1828 delete change_info; 1828 return "all estates you own";
1829 return; 1829 }
1830 } 1830 else if (region && region->isEstateManager())
1831 } 1831 {
1832 if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD) 1832 return llformat("all estates that\nyou manage for %s", owner.c_str());
1833 { 1833 }
1834 LLCtrlListInterface *list = panel->childGetListInterface("banned_avatar_name_list"); 1834 else
1835 int currentCount = (list ? list->getItemCount() : 0); 1835 {
1836 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) 1836 return "(error)";
1837 { 1837 }
1838 LLSD args; 1838}
1839 args["NUM_ADDED"] = llformat("%d",ids.size()); 1839
1840 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); 1840// static
1841 args["LIST_TYPE"] = "Banned Residents"; 1841bool LLPanelEstateInfo::isLindenEstate()
1842 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); 1842{
1843 LLNotifications::instance().add("MaxAgentOnRegionBatch", args); 1843 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
1844 delete change_info; 1844 if (!panel) return false;
1845 return; 1845
1846 } 1846 U32 estate_id = panel->getEstateID();
1847 } 1847 return (estate_id <= ESTATE_LAST_LINDEN);
1848 1848}
1849 LLSD args; 1849
1850 args["ALL_ESTATES"] = all_estates_text(); 1850typedef std::vector<LLUUID> AgentOrGroupIDsVector;
1851 1851struct LLEstateAccessChangeInfo
1852 LLNotification::Params params(change_info->mDialogName); 1852{
1853 params.substitutions(args) 1853 LLEstateAccessChangeInfo(const LLSD& sd)
1854 .payload(change_info->asLLSD()) 1854 {
1855 .functor(accessCoreConfirm); 1855 mDialogName = sd["dialog_name"].asString();
1856 1856 mOperationFlag = (U32)sd["operation"].asInteger();
1857 if (isLindenEstate()) 1857 LLSD::array_const_iterator end_it = sd["allowed_ids"].endArray();
1858 { 1858 for (LLSD::array_const_iterator id_it = sd["allowed_ids"].beginArray();
1859 // just apply to this estate 1859 id_it != end_it;
1860 LLNotifications::instance().forceResponse(params, 0); 1860 ++id_it)
1861 } 1861 {
1862 else 1862 mAgentOrGroupIDs.push_back(id_it->asUUID());
1863 { 1863 }
1864 // ask if this estate or all estates with this owner 1864 }
1865 LLNotifications::instance().add(params); 1865
1866 } 1866 const LLSD asLLSD() const
1867} 1867 {
1868 1868 LLSD sd;
1869// static 1869 sd["name"] = mDialogName;
1870void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name) 1870 sd["operation"] = (S32)mOperationFlag;
1871{ 1871 for (AgentOrGroupIDsVector::const_iterator it = mAgentOrGroupIDs.begin();
1872 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 1872 it != mAgentOrGroupIDs.end();
1873 if (!panel) return; 1873 ++it)
1874 LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>(list_ctrl_name); 1874 {
1875 if (!name_list) return; 1875 sd["allowed_ids"].append(*it);
1876 1876 }
1877 std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected(); 1877 return sd;
1878 if (list_vector.size() == 0) 1878 }
1879 return; 1879
1880 1880 U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc.
1881 LLSD payload; 1881 std::string mDialogName;
1882 payload["operation"] = (S32)operation_flag; 1882 AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change
1883 payload["dialog_name"] = dialog_name; 1883};
1884 1884
1885 for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin(); 1885// Special case callback for groups, since it has different callback format than names
1886 iter != list_vector.end(); 1886// static
1887 iter++) 1887void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data)
1888 { 1888{
1889 LLScrollListItem *item = (*iter); 1889 LLSD payload;
1890 payload["allowed_ids"].append(item->getUUID()); 1890 payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
1891 } 1891 payload["dialog_name"] = "EstateAllowedGroupAdd";
1892 1892 payload["allowed_ids"].append(id);
1893 LLNotification::Params params("ChangeLindenAccess"); 1893
1894 params.payload(payload) 1894 LLSD args;
1895 .functor(accessRemoveCore2); 1895 args["ALL_ESTATES"] = all_estates_text();
1896 1896
1897 if (isLindenEstate()) 1897 LLNotification::Params params("EstateAllowedGroupAdd");
1898 { 1898 params.payload(payload)
1899 // warn on change linden estate 1899 .substitutions(args)
1900 LLNotifications::instance().add(params); 1900 .functor(accessCoreConfirm);
1901 } 1901 if (isLindenEstate())
1902 else 1902 {
1903 { 1903 LLNotifications::instance().forceResponse(params, 0);
1904 // just proceed, as if clicking OK 1904 }
1905 LLNotifications::instance().forceResponse(params, 0); 1905 else
1906 } 1906 {
1907} 1907 LLNotifications::instance().add(params);
1908 1908 }
1909// static 1909}
1910bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response) 1910
1911{ 1911// static
1912 S32 option = LLNotification::getSelectedOption(notification, response); 1912void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dialog_name)
1913 if (option != 0) 1913{
1914 { 1914 LLSD payload;
1915 // abort 1915 payload["operation"] = (S32)operation_flag;
1916 return false; 1916 payload["dialog_name"] = dialog_name;
1917 } 1917 // agent id filled in after avatar picker
1918 1918
1919 // If Linden estate, can only apply to "this" estate, not all estates 1919 LLNotification::Params params("ChangeLindenAccess");
1920 // owned by NULL. 1920 params.payload(payload)
1921 if (isLindenEstate()) 1921 .functor(accessAddCore2);
1922 { 1922
1923 accessCoreConfirm(notification, response); 1923 if (isLindenEstate())
1924 } 1924 {
1925 else 1925 LLNotifications::instance().add(params);
1926 { 1926 }
1927 LLSD args; 1927 else
1928 args["ALL_ESTATES"] = all_estates_text(); 1928 {
1929 LLNotifications::instance().add(notification["payload"]["dialog_name"], 1929 // same as clicking "OK"
1930 args, 1930 LLNotifications::instance().forceResponse(params, 0);
1931 notification["payload"], 1931 }
1932 accessCoreConfirm); 1932}
1933 } 1933
1934 return false; 1934// static
1935} 1935bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response)
1936 1936{
1937// Used for both access add and remove operations, depending on the mOperationFlag 1937 S32 option = LLNotification::getSelectedOption(notification, response);
1938// passed in (ESTATE_ACCESS_BANNED_AGENT_ADD, ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, etc.) 1938 if (option != 0)
1939// static 1939 {
1940bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response) 1940 // abort change
1941{ 1941 return false;
1942 S32 option = LLNotification::getSelectedOption(notification, response); 1942 }
1943 const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger(); 1943
1944 1944 LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]);
1945 LLViewerRegion* region = gAgent.getRegion(); 1945 // avatar picker yes multi-select, yes close-on-select
1946 1946 LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, TRUE, TRUE);
1947 LLSD::array_const_iterator end_it = notification["payload"]["allowed_ids"].endArray(); 1947 return false;
1948 1948}
1949 for (LLSD::array_const_iterator iter = notification["payload"]["allowed_ids"].beginArray(); 1949
1950 iter != end_it; 1950// static
1951 iter++) 1951void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
1952 { 1952{
1953 U32 flags = originalFlags; 1953 LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data;
1954 if (iter + 1 != end_it) 1954 if (!change_info) return;
1955 flags |= ESTATE_ACCESS_NO_REPLY; 1955 if (ids.empty())
1956 1956 {
1957 const LLUUID id = iter->asUUID(); 1957 // User didn't select a name.
1958 if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD) 1958 delete change_info;
1959 && region && (region->getOwner() == id)) 1959 change_info = NULL;
1960 { 1960 return;
1961 LLNotifications::instance().add("OwnerCanNotBeDenied"); 1961 }
1962 break; 1962 // User did select a name.
1963 } 1963 change_info->mAgentOrGroupIDs = ids;
1964 switch(option) 1964 // Can't put estate owner on ban list
1965 { 1965 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
1966 case 0: 1966 if (!panel) return;
1967 // This estate 1967 LLViewerRegion* region = gAgent.getRegion();
1968 sendEstateAccessDelta(flags, id); 1968 if (!region) return;
1969 break; 1969
1970 case 1: 1970 if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD)
1971 { 1971 {
1972 // All estates, either than I own or manage for this owner. 1972 LLCtrlListInterface *list = panel->childGetListInterface("allowed_avatar_name_list");
1973 // This will be verified on simulator. JC 1973 int currentCount = (list ? list->getItemCount() : 0);
1974 if (!region) break; 1974 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
1975 if (region->getOwner() == gAgent.getID() 1975 {
1976 || gAgent.isGodlike()) 1976 LLSD args;
1977 { 1977 args["NUM_ADDED"] = llformat("%d",ids.size());
1978 flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES; 1978 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1979 sendEstateAccessDelta(flags, id); 1979 args["LIST_TYPE"] = "Allowed Residents";
1980 } 1980 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
1981 else if (region->isEstateManager()) 1981 LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
1982 { 1982 delete change_info;
1983 flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES; 1983 return;
1984 sendEstateAccessDelta(flags, id); 1984 }
1985 } 1985 }
1986 break; 1986 if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD)
1987 } 1987 {
1988 case 2: 1988 LLCtrlListInterface *list = panel->childGetListInterface("banned_avatar_name_list");
1989 default: 1989 int currentCount = (list ? list->getItemCount() : 0);
1990 break; 1990 if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS)
1991 } 1991 {
1992 } 1992 LLSD args;
1993 return false; 1993 args["NUM_ADDED"] = llformat("%d",ids.size());
1994} 1994 args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
1995 1995 args["LIST_TYPE"] = "Banned Residents";
1996// key = "estateaccessdelta" 1996 args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
1997// str(estate_id) will be added to front of list by forward_EstateOwnerRequest_to_dataserver 1997 LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
1998// str[0] = str(agent_id) requesting the change 1998 delete change_info;
1999// str[1] = str(flags) (ESTATE_ACCESS_DELTA_*) 1999 return;
2000// str[2] = str(agent_id) to add or remove 2000 }
2001// static 2001 }
2002void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_group_id) 2002
2003{ 2003 LLSD args;
2004 LLMessageSystem* msg = gMessageSystem; 2004 args["ALL_ESTATES"] = all_estates_text();
2005 msg->newMessage("EstateOwnerMessage"); 2005
2006 msg->nextBlockFast(_PREHASH_AgentData); 2006 LLNotification::Params params(change_info->mDialogName);
2007 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2007 params.substitutions(args)
2008 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 2008 .payload(change_info->asLLSD())
2009 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 2009 .functor(accessCoreConfirm);
2010 2010
2011 msg->nextBlock("MethodData"); 2011 if (isLindenEstate())
2012 msg->addString("Method", "estateaccessdelta"); 2012 {
2013 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); 2013 // just apply to this estate
2014 2014 LLNotifications::instance().forceResponse(params, 0);
2015 std::string buf; 2015 }
2016 gAgent.getID().toString(buf); 2016 else
2017 msg->nextBlock("ParamList"); 2017 {
2018 msg->addString("Parameter", buf); 2018 // ask if this estate or all estates with this owner
2019 2019 LLNotifications::instance().add(params);
2020 buf = llformat("%u", flags); 2020 }
2021 msg->nextBlock("ParamList"); 2021}
2022 msg->addString("Parameter", buf); 2022
2023 2023// static
2024 agent_or_group_id.toString(buf); 2024void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name)
2025 msg->nextBlock("ParamList"); 2025{
2026 msg->addString("Parameter", buf); 2026 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
2027 2027 if (!panel) return;
2028 2028 LLNameListCtrl* name_list = panel->getChild<LLNameListCtrl>(list_ctrl_name);
2029 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 2029 if (!name_list) return;
2030 2030
2031 if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | 2031 std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected();
2032 ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_BANNED_AGENT_REMOVE)) 2032 if (list_vector.size() == 0)
2033 { 2033 return;
2034 2034
2035 panel->clearAccessLists(); 2035 LLSD payload;
2036 } 2036 payload["operation"] = (S32)operation_flag;
2037 2037 payload["dialog_name"] = dialog_name;
2038 gAgent.sendReliableMessage(); 2038
2039} 2039 for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin();
2040 2040 iter != list_vector.end();
2041void LLPanelEstateInfo::updateControls(LLViewerRegion* region) 2041 iter++)
2042{ 2042 {
2043 BOOL god = gAgent.isGodlike(); 2043 LLScrollListItem *item = (*iter);
2044 BOOL owner = (region && (region->getOwner() == gAgent.getID())); 2044 payload["allowed_ids"].append(item->getUUID());
2045 BOOL manager = (region && region->isEstateManager()); 2045 }
2046 setCtrlsEnabled(god || owner || manager); 2046
2047 2047 LLNotification::Params params("ChangeLindenAccess");
2048 childDisable("apply_btn"); 2048 params.payload(payload)
2049 childSetEnabled("add_allowed_avatar_btn", god || owner || manager); 2049 .functor(accessRemoveCore2);
2050 childSetEnabled("remove_allowed_avatar_btn", god || owner || manager); 2050
2051 childSetEnabled("add_allowed_group_btn", god || owner || manager); 2051 if (isLindenEstate())
2052 childSetEnabled("remove_allowed_group_btn", god || owner || manager); 2052 {
2053 childSetEnabled("add_banned_avatar_btn", god || owner || manager); 2053 // warn on change linden estate
2054 childSetEnabled("remove_banned_avatar_btn", god || owner || manager); 2054 LLNotifications::instance().add(params);
2055 childSetEnabled("message_estate_btn", god || owner || manager); 2055 }
2056 childSetEnabled("kick_user_from_estate_btn", god || owner || manager); 2056 else
2057#if ELAR_ENABLED 2057 {
2058 childSetEnabled("abuse_email_address", god || owner || manager); 2058 // just proceed, as if clicking OK
2059#else 2059 LLNotifications::instance().forceResponse(params, 0);
2060 childSetEnabled("abuse_email_address", false); 2060 }
2061#endif 2061}
2062 2062
2063 // estate managers can't add estate managers 2063// static
2064 childSetEnabled("add_estate_manager_btn", god || owner); 2064bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response)
2065 childSetEnabled("remove_estate_manager_btn", god || owner); 2065{
2066 childSetEnabled("estate_manager_name_list", god || owner); 2066 S32 option = LLNotification::getSelectedOption(notification, response);
2067} 2067 if (option != 0)
2068 2068 {
2069bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) 2069 // abort
2070{ 2070 return false;
2071 updateControls(region); 2071 }
2072 2072
2073 // let the parent class handle the general data collection. 2073 // If Linden estate, can only apply to "this" estate, not all estates
2074 bool rv = LLPanelRegionInfo::refreshFromRegion(region); 2074 // owned by NULL.
2075 2075 if (isLindenEstate())
2076 // We want estate info. To make sure it works across region 2076 {
2077 // boundaries and multiple packets, we add a serial number to the 2077 accessCoreConfirm(notification, response);
2078 // integers and track against that on update. 2078 }
2079 strings_t strings; 2079 else
2080 //integers_t integers; 2080 {
2081 //LLFloaterRegionInfo::incrementSerial(); 2081 LLSD args;
2082 LLFloaterRegionInfo::nextInvoice(); 2082 args["ALL_ESTATES"] = all_estates_text();
2083 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 2083 LLNotifications::instance().add(notification["payload"]["dialog_name"],
2084 //integers.push_back(LLFloaterRegionInfo::());::getPanelEstate(); 2084 args,
2085 2085 notification["payload"],
2086 2086 accessCoreConfirm);
2087 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 2087 }
2088 panel->clearAccessLists(); 2088 return false;
2089 2089}
2090 2090
2091 sendEstateOwnerMessage(gMessageSystem, "getinfo", invoice, strings); 2091// Used for both access add and remove operations, depending on the mOperationFlag
2092 2092// passed in (ESTATE_ACCESS_BANNED_AGENT_ADD, ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, etc.)
2093 refresh(); 2093// static
2094 2094bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response)
2095 return rv; 2095{
2096} 2096 S32 option = LLNotification::getSelectedOption(notification, response);
2097 2097 const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger();
2098void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) 2098
2099{ 2099 LLViewerRegion* region = gAgent.getRegion();
2100 if (checkRemovalButton(child_ctrl->getName())) 2100
2101 { 2101 LLSD::array_const_iterator end_it = notification["payload"]["allowed_ids"].endArray();
2102 // do nothing 2102
2103 } 2103 for (LLSD::array_const_iterator iter = notification["payload"]["allowed_ids"].beginArray();
2104 else if (checkSunHourSlider(child_ctrl)) 2104 iter != end_it;
2105 { 2105 iter++)
2106 // do nothing 2106 {
2107 } 2107 U32 flags = originalFlags;
2108} 2108 if (iter + 1 != end_it)
2109 2109 flags |= ESTATE_ACCESS_NO_REPLY;
2110bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) 2110
2111{ 2111 const LLUUID id = iter->asUUID();
2112 llinfos << "LLPanelEstateInfo::estateUpdate()" << llendl; 2112 if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD)
2113 return false; 2113 && region && (region->getOwner() == id))
2114} 2114 {
2115 2115 LLNotifications::instance().add("OwnerCanNotBeDenied");
2116 2116 break;
2117BOOL LLPanelEstateInfo::postBuild() 2117 }
2118{ 2118 switch(option)
2119 // set up the callbacks for the generic controls 2119 {
2120 initCtrl("externally_visible_check"); 2120 case 0:
2121 initCtrl("use_global_time_check"); 2121 // This estate
2122 initCtrl("fixed_sun_check"); 2122 sendEstateAccessDelta(flags, id);
2123 initCtrl("allow_direct_teleport"); 2123 break;
2124 initCtrl("limit_payment"); 2124 case 1:
2125 initCtrl("limit_age_verified"); 2125 {
2126 initCtrl("voice_chat_check"); 2126 // All estates, either than I own or manage for this owner.
2127 childSetCommitCallback("abuse_email_address", onChangeAnything, this); 2127 // This will be verified on simulator. JC
2128 childSetKeystrokeCallback("abuse_email_address", onChangeText, this); 2128 if (!region) break;
2129 2129 if (region->getOwner() == gAgent.getID()
2130 initHelpBtn("estate_manager_help", "HelpEstateEstateManager"); 2130 || gAgent.isGodlike())
2131 initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime"); 2131 {
2132 initHelpBtn("fixed_sun_help", "HelpEstateFixedSun"); 2132 flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES;
2133 initHelpBtn("WLEditSkyHelp", "HelpEditSky"); 2133 sendEstateAccessDelta(flags, id);
2134 initHelpBtn("WLEditDayCycleHelp", "HelpEditDayCycle"); 2134 }
2135 2135 else if (region->isEstateManager())
2136 initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible"); 2136 {
2137 initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport"); 2137 flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES;
2138 initHelpBtn("allow_resident_help", "HelpEstateAllowResident"); 2138 sendEstateAccessDelta(flags, id);
2139 initHelpBtn("allow_group_help", "HelpEstateAllowGroup"); 2139 }
2140 initHelpBtn("ban_resident_help", "HelpEstateBanResident"); 2140 break;
2141 initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress"); 2141 }
2142 initHelpBtn("voice_chat_help", "HelpEstateVoiceChat"); 2142 case 2:
2143 2143 default:
2144 // set up the use global time checkbox 2144 break;
2145 childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this); 2145 }
2146 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this); 2146 }
2147 childSetCommitCallback("sun_hour_slider", onChangeChildCtrl, this); 2147 return false;
2148 2148}
2149 childSetCommitCallback("allowed_avatar_name_list", onChangeChildCtrl, this); 2149
2150 LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); 2150// key = "estateaccessdelta"
2151 if (avatar_name_list) 2151// str(estate_id) will be added to front of list by forward_EstateOwnerRequest_to_dataserver
2152 { 2152// str[0] = str(agent_id) requesting the change
2153 avatar_name_list->setCommitOnSelectionChange(TRUE); 2153// str[1] = str(flags) (ESTATE_ACCESS_DELTA_*)
2154 avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); 2154// str[2] = str(agent_id) to add or remove
2155 } 2155// static
2156 2156void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_group_id)
2157 childSetAction("add_allowed_avatar_btn", onClickAddAllowedAgent, this); 2157{
2158 childSetAction("remove_allowed_avatar_btn", onClickRemoveAllowedAgent, this); 2158 LLMessageSystem* msg = gMessageSystem;
2159 2159 msg->newMessage("EstateOwnerMessage");
2160 childSetCommitCallback("allowed_group_name_list", onChangeChildCtrl, this); 2160 msg->nextBlockFast(_PREHASH_AgentData);
2161 LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list"); 2161 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2162 if (group_name_list) 2162 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
2163 { 2163 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
2164 group_name_list->setCommitOnSelectionChange(TRUE); 2164
2165 group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); 2165 msg->nextBlock("MethodData");
2166 } 2166 msg->addString("Method", "estateaccessdelta");
2167 2167 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
2168 childSetAction("add_allowed_group_btn", onClickAddAllowedGroup, this); 2168
2169 childSetAction("remove_allowed_group_btn", onClickRemoveAllowedGroup, this); 2169 std::string buf;
2170 2170 gAgent.getID().toString(buf);
2171 childSetCommitCallback("banned_avatar_name_list", onChangeChildCtrl, this); 2171 msg->nextBlock("ParamList");
2172 LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list"); 2172 msg->addString("Parameter", buf);
2173 if (banned_name_list) 2173
2174 { 2174 buf = llformat("%u", flags);
2175 banned_name_list->setCommitOnSelectionChange(TRUE); 2175 msg->nextBlock("ParamList");
2176 banned_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); 2176 msg->addString("Parameter", buf);
2177 } 2177
2178 2178 agent_or_group_id.toString(buf);
2179 childSetAction("add_banned_avatar_btn", onClickAddBannedAgent, this); 2179 msg->nextBlock("ParamList");
2180 childSetAction("remove_banned_avatar_btn", onClickRemoveBannedAgent, this); 2180 msg->addString("Parameter", buf);
2181 2181
2182 childSetCommitCallback("estate_manager_name_list", onChangeChildCtrl, this); 2182
2183 LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list"); 2183 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
2184 if (manager_name_list) 2184
2185 { 2185 if (flags & (ESTATE_ACCESS_ALLOWED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE |
2186 manager_name_list->setCommitOnSelectionChange(TRUE); 2186 ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_BANNED_AGENT_REMOVE))
2187 manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue 2187 {
2188 } 2188
2189 2189 panel->clearAccessLists();
2190 childSetAction("add_estate_manager_btn", onClickAddEstateManager, this); 2190 }
2191 childSetAction("remove_estate_manager_btn", onClickRemoveEstateManager, this); 2191
2192 childSetAction("message_estate_btn", onClickMessageEstate, this); 2192 gAgent.sendReliableMessage();
2193 childSetAction("kick_user_from_estate_btn", onClickKickUser, this); 2193}
2194 2194
2195 childSetAction("WLEditSky", onClickEditSky, this); 2195void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
2196 childSetAction("WLEditDayCycle", onClickEditDayCycle, this); 2196{
2197 2197 BOOL god = gAgent.isGodlike();
2198 return LLPanelRegionInfo::postBuild(); 2198 BOOL owner = (region && (region->getOwner() == gAgent.getID()));
2199} 2199 BOOL manager = (region && region->isEstateManager());
2200 2200 setCtrlsEnabled(god || owner || manager);
2201void LLPanelEstateInfo::refresh() 2201
2202{ 2202 childDisable("apply_btn");
2203 bool public_access = childGetValue("externally_visible_check").asBoolean(); 2203 childSetEnabled("add_allowed_avatar_btn", god || owner || manager);
2204 childSetEnabled("Only Allow", public_access); 2204 childSetEnabled("remove_allowed_avatar_btn", god || owner || manager);
2205 childSetEnabled("limit_payment", public_access); 2205 childSetEnabled("add_allowed_group_btn", god || owner || manager);
2206 childSetEnabled("limit_age_verified", public_access); 2206 childSetEnabled("remove_allowed_group_btn", god || owner || manager);
2207 // if this is set to false, then the limit fields are meaningless and should be turned off 2207 childSetEnabled("add_banned_avatar_btn", god || owner || manager);
2208 if (public_access == false) 2208 childSetEnabled("remove_banned_avatar_btn", god || owner || manager);
2209 { 2209 childSetEnabled("message_estate_btn", god || owner || manager);
2210 childSetValue("limit_payment", false); 2210 childSetEnabled("kick_user_from_estate_btn", god || owner || manager);
2211 childSetValue("limit_age_verified", false); 2211 childSetEnabled("abuse_email_address", god || owner || manager);
2212 } 2212
2213} 2213 // estate managers can't add estate managers
2214 2214 childSetEnabled("add_estate_manager_btn", god || owner);
2215BOOL LLPanelEstateInfo::sendUpdate() 2215 childSetEnabled("remove_estate_manager_btn", god || owner);
2216{ 2216 childSetEnabled("estate_manager_name_list", god || owner);
2217 llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl; 2217}
2218 2218
2219 LLNotification::Params params("ChangeLindenEstate"); 2219bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
2220 params.functor(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2)); 2220{
2221 2221 updateControls(region);
2222 if (getEstateID() <= ESTATE_LAST_LINDEN) 2222
2223 { 2223 // let the parent class handle the general data collection.
2224 // trying to change reserved estate, warn 2224 bool rv = LLPanelRegionInfo::refreshFromRegion(region);
2225 LLNotifications::instance().add(params); 2225
2226 } 2226 // We want estate info. To make sure it works across region
2227 else 2227 // boundaries and multiple packets, we add a serial number to the
2228 { 2228 // integers and track against that on update.
2229 // for normal estates, just make the change 2229 strings_t strings;
2230 LLNotifications::instance().forceResponse(params, 0); 2230 //integers_t integers;
2231 } 2231 //LLFloaterRegionInfo::incrementSerial();
2232 return TRUE; 2232 LLFloaterRegionInfo::nextInvoice();
2233} 2233 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
2234 2234 //integers.push_back(LLFloaterRegionInfo::());::getPanelEstate();
2235bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response) 2235
2236{ 2236
2237 S32 option = LLNotification::getSelectedOption(notification, response); 2237 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
2238 switch(option) 2238 panel->clearAccessLists();
2239 { 2239
2240 case 0: 2240
2241 // send the update 2241 sendEstateOwnerMessage(gMessageSystem, "getinfo", invoice, strings);
2242 if (!commitEstateInfoCaps()) 2242
2243 { 2243 refresh();
2244 // the caps method failed, try the old way 2244
2245 LLFloaterRegionInfo::nextInvoice(); 2245 return rv;
2246 commitEstateInfoDataserver(); 2246}
2247 } 2247
2248 // we don't want to do this because we'll get it automatically from the sim 2248void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl)
2249 // after the spaceserver processes it 2249{
2250// else 2250 if (checkRemovalButton(child_ctrl->getName()))
2251// { 2251 {
2252// // caps method does not automatically send this info 2252 // do nothing
2253// LLFloaterRegionInfo::requestRegionInfo(); 2253 }
2254// } 2254 else if (checkSunHourSlider(child_ctrl))
2255 break; 2255 {
2256 case 1: 2256 // do nothing
2257 default: 2257 }
2258 // do nothing 2258}
2259 break; 2259
2260 } 2260bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg)
2261 return false; 2261{
2262} 2262 llinfos << "LLPanelEstateInfo::estateUpdate()" << llendl;
2263 2263 return false;
2264 2264}
2265/* 2265
2266// Request = "getowner" 2266
2267// SParam[0] = "" (empty string) 2267BOOL LLPanelEstateInfo::postBuild()
2268// IParam[0] = serial 2268{
2269void LLPanelEstateInfo::getEstateOwner() 2269 // set up the callbacks for the generic controls
2270{ 2270 initCtrl("externally_visible_check");
2271 // TODO -- disable the panel 2271 initCtrl("use_global_time_check");
2272 // and call this function whenever we cross a region boundary 2272 initCtrl("fixed_sun_check");
2273 // re-enable when owner matches, and get new estate info 2273 initCtrl("allow_direct_teleport");
2274 LLMessageSystem* msg = gMessageSystem; 2274 initCtrl("limit_payment");
2275 msg->newMessageFast(_PREHASH_EstateOwnerRequest); 2275 initCtrl("limit_age_verified");
2276 msg->nextBlockFast(_PREHASH_AgentData); 2276 initCtrl("voice_chat_check");
2277 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2277 childSetCommitCallback("abuse_email_address", onChangeAnything, this);
2278 2278 childSetKeystrokeCallback("abuse_email_address", onChangeText, this);
2279 msg->nextBlockFast(_PREHASH_RequestData); 2279
2280 msg->addStringFast(_PREHASH_Request, "getowner"); 2280 initHelpBtn("estate_manager_help", "HelpEstateEstateManager");
2281 2281 initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime");
2282 // we send an empty string so that the variable block is not empty 2282 initHelpBtn("fixed_sun_help", "HelpEstateFixedSun");
2283 msg->nextBlockFast(_PREHASH_StringData); 2283 initHelpBtn("WLEditSkyHelp", "HelpEditSky");
2284 msg->addStringFast(_PREHASH_SParam, ""); 2284 initHelpBtn("WLEditDayCycleHelp", "HelpEditDayCycle");
2285 2285
2286 msg->nextBlockFast(_PREHASH_IntegerData); 2286 initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible");
2287 msg->addS32Fast(_PREHASH_IParam, LLFloaterRegionInfo::getSerial()); 2287 initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport");
2288 2288 initHelpBtn("allow_resident_help", "HelpEstateAllowResident");
2289 gAgent.sendMessage(); 2289 initHelpBtn("allow_group_help", "HelpEstateAllowGroup");
2290} 2290 initHelpBtn("ban_resident_help", "HelpEstateBanResident");
2291*/ 2291 initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress");
2292 2292 initHelpBtn("voice_chat_help", "HelpEstateVoiceChat");
2293class LLEstateChangeInfoResponder : public LLHTTPClient::Responder 2293
2294{ 2294 // set up the use global time checkbox
2295public: 2295 childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this);
2296 LLEstateChangeInfoResponder(void* userdata) : mpPanel((LLPanelEstateInfo*)userdata) {}; 2296 childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this);
2297 2297 childSetCommitCallback("sun_hour_slider", onChangeChildCtrl, this);
2298 // if we get a normal response, handle it here 2298
2299 virtual void result(const LLSD& content) 2299 childSetCommitCallback("allowed_avatar_name_list", onChangeChildCtrl, this);
2300 { 2300 LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
2301 // refresh the panel from the database 2301 if (avatar_name_list)
2302 mpPanel->refresh(); 2302 {
2303 } 2303 avatar_name_list->setCommitOnSelectionChange(TRUE);
2304 2304 avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
2305 // if we get an error response 2305 }
2306 virtual void error(U32 status, const std::string& reason) 2306
2307 { 2307 childSetAction("add_allowed_avatar_btn", onClickAddAllowedAgent, this);
2308 llinfos << "LLEstateChangeInfoResponder::error " 2308 childSetAction("remove_allowed_avatar_btn", onClickRemoveAllowedAgent, this);
2309 << status << ": " << reason << llendl; 2309
2310 } 2310 childSetCommitCallback("allowed_group_name_list", onChangeChildCtrl, this);
2311private: 2311 LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list");
2312 LLPanelEstateInfo* mpPanel; 2312 if (group_name_list)
2313}; 2313 {
2314 2314 group_name_list->setCommitOnSelectionChange(TRUE);
2315// tries to send estate info using a cap; returns true if it succeeded 2315 group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
2316bool LLPanelEstateInfo::commitEstateInfoCaps() 2316 }
2317{ 2317
2318 std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo"); 2318 childSetAction("add_allowed_group_btn", onClickAddAllowedGroup, this);
2319 2319 childSetAction("remove_allowed_group_btn", onClickRemoveAllowedGroup, this);
2320 if (url.empty()) 2320
2321 { 2321 childSetCommitCallback("banned_avatar_name_list", onChangeChildCtrl, this);
2322 // whoops, couldn't find the cap, so bail out 2322 LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
2323 return false; 2323 if (banned_name_list)
2324 } 2324 {
2325 2325 banned_name_list->setCommitOnSelectionChange(TRUE);
2326 LLSD body; 2326 banned_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS);
2327 body["estate_name"] = getEstateName(); 2327 }
2328 2328
2329 body["is_externally_visible"] = childGetValue("externally_visible_check").asBoolean(); 2329 childSetAction("add_banned_avatar_btn", onClickAddBannedAgent, this);
2330 body["allow_direct_teleport"] = childGetValue("allow_direct_teleport").asBoolean(); 2330 childSetAction("remove_banned_avatar_btn", onClickRemoveBannedAgent, this);
2331 body["is_sun_fixed" ] = childGetValue("fixed_sun_check").asBoolean(); 2331
2332 body["deny_anonymous" ] = childGetValue("limit_payment").asBoolean(); 2332 childSetCommitCallback("estate_manager_name_list", onChangeChildCtrl, this);
2333 body["deny_age_unverified" ] = childGetValue("limit_age_verified").asBoolean(); 2333 LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list");
2334 body["allow_voice_chat" ] = childGetValue("voice_chat_check").asBoolean(); 2334 if (manager_name_list)
2335 body["invoice" ] = LLFloaterRegionInfo::getLastInvoice(); 2335 {
2336 2336 manager_name_list->setCommitOnSelectionChange(TRUE);
2337 // block fly is in estate database but not in estate UI, so we're not supporting it 2337 manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
2338 //body["block_fly" ] = childGetValue("").asBoolean(); 2338 }
2339 2339
2340 F32 sun_hour = getSunHour(); 2340 childSetAction("add_estate_manager_btn", onClickAddEstateManager, this);
2341 if (childGetValue("use_global_time_check").asBoolean()) 2341 childSetAction("remove_estate_manager_btn", onClickRemoveEstateManager, this);
2342 { 2342 childSetAction("message_estate_btn", onClickMessageEstate, this);
2343 sun_hour = 0.f; // 0 = global time 2343 childSetAction("kick_user_from_estate_btn", onClickKickUser, this);
2344 } 2344
2345 body["sun_hour"] = sun_hour; 2345 childSetAction("WLEditSky", onClickEditSky, this);
2346 2346 childSetAction("WLEditDayCycle", onClickEditDayCycle, this);
2347 body["owner_abuse_email"] = childGetValue("abuse_email_address").asString(); 2347
2348 2348 return LLPanelRegionInfo::postBuild();
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
2351 return true; 2351void LLPanelEstateInfo::refresh()
2352} 2352{
2353 2353 bool public_access = childGetValue("externally_visible_check").asBoolean();
2354/* This is the old way of doing things, is deprecated, and should be 2354 childSetEnabled("Only Allow", public_access);
2355 deleted when the dataserver model can be removed */ 2355 childSetEnabled("limit_payment", public_access);
2356// key = "estatechangeinfo" 2356 childSetEnabled("limit_age_verified", public_access);
2357// strings[0] = str(estate_id) (added by simulator before relay - not here) 2357 // if this is set to false, then the limit fields are meaningless and should be turned off
2358// strings[1] = estate_name 2358 if (public_access == false)
2359// strings[2] = str(estate_flags) 2359 {
2360// strings[3] = str((S32)(sun_hour * 1024.f)) 2360 childSetValue("limit_payment", false);
2361void LLPanelEstateInfo::commitEstateInfoDataserver() 2361 childSetValue("limit_age_verified", false);
2362{ 2362 }
2363 LLMessageSystem* msg = gMessageSystem; 2363}
2364 msg->newMessage("EstateOwnerMessage"); 2364
2365 msg->nextBlockFast(_PREHASH_AgentData); 2365BOOL LLPanelEstateInfo::sendUpdate()
2366 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2366{
2367 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 2367 llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl;
2368 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 2368
2369 2369 LLNotification::Params params("ChangeLindenEstate");
2370 msg->nextBlock("MethodData"); 2370 params.functor(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2));
2371 msg->addString("Method", "estatechangeinfo"); 2371
2372 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); 2372 if (getEstateID() <= ESTATE_LAST_LINDEN)
2373 2373 {
2374 msg->nextBlock("ParamList"); 2374 // trying to change reserved estate, warn
2375 msg->addString("Parameter", getEstateName()); 2375 LLNotifications::instance().add(params);
2376 2376 }
2377 std::string buffer; 2377 else
2378 buffer = llformat("%u", computeEstateFlags()); 2378 {
2379 msg->nextBlock("ParamList"); 2379 // for normal estates, just make the change
2380 msg->addString("Parameter", buffer); 2380 LLNotifications::instance().forceResponse(params, 0);
2381 2381 }
2382 F32 sun_hour = getSunHour(); 2382 return TRUE;
2383 if (childGetValue("use_global_time_check").asBoolean()) 2383}
2384 { 2384
2385 sun_hour = 0.f; // 0 = global time 2385bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response)
2386 } 2386{
2387 2387 S32 option = LLNotification::getSelectedOption(notification, response);
2388 buffer = llformat("%d", (S32)(sun_hour*1024.0f)); 2388 switch(option)
2389 msg->nextBlock("ParamList"); 2389 {
2390 msg->addString("Parameter", buffer); 2390 case 0:
2391 2391 // send the update
2392 gAgent.sendMessage(); 2392 if (!commitEstateInfoCaps())
2393} 2393 {
2394 2394 // the caps method failed, try the old way
2395void LLPanelEstateInfo::setEstateFlags(U32 flags) 2395 LLFloaterRegionInfo::nextInvoice();
2396{ 2396 commitEstateInfoDataserver();
2397 childSetValue("externally_visible_check", LLSD(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE) ); 2397 }
2398 childSetValue("fixed_sun_check", LLSD(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE) ); 2398 // we don't want to do this because we'll get it automatically from the sim
2399 childSetValue( 2399 // after the spaceserver processes it
2400 "voice_chat_check", 2400// else
2401 LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE)); 2401// {
2402 childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) ); 2402// // caps method does not automatically send this info
2403 childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) ); 2403// LLFloaterRegionInfo::requestRegionInfo();
2404 childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) ); 2404// }
2405 2405 break;
2406 refresh(); 2406 case 1:
2407} 2407 default:
2408 2408 // do nothing
2409U32 LLPanelEstateInfo::computeEstateFlags() 2409 break;
2410{ 2410 }
2411 U32 flags = 0; 2411 return false;
2412 2412}
2413 if (childGetValue("externally_visible_check").asBoolean()) 2413
2414 { 2414
2415 flags |= REGION_FLAGS_EXTERNALLY_VISIBLE; 2415/*
2416 } 2416// Request = "getowner"
2417 2417// SParam[0] = "" (empty string)
2418 if ( childGetValue("voice_chat_check").asBoolean() ) 2418// IParam[0] = serial
2419 { 2419void LLPanelEstateInfo::getEstateOwner()
2420 flags |= REGION_FLAGS_ALLOW_VOICE; 2420{
2421 } 2421 // TODO -- disable the panel
2422 2422 // and call this function whenever we cross a region boundary
2423 if (childGetValue("allow_direct_teleport").asBoolean()) 2423 // re-enable when owner matches, and get new estate info
2424 { 2424 LLMessageSystem* msg = gMessageSystem;
2425 flags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT; 2425 msg->newMessageFast(_PREHASH_EstateOwnerRequest);
2426 } 2426 msg->nextBlockFast(_PREHASH_AgentData);
2427 2427 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2428 if (childGetValue("fixed_sun_check").asBoolean()) 2428
2429 { 2429 msg->nextBlockFast(_PREHASH_RequestData);
2430 flags |= REGION_FLAGS_SUN_FIXED; 2430 msg->addStringFast(_PREHASH_Request, "getowner");
2431 } 2431
2432 2432 // we send an empty string so that the variable block is not empty
2433 if (childGetValue("limit_payment").asBoolean()) 2433 msg->nextBlockFast(_PREHASH_StringData);
2434 { 2434 msg->addStringFast(_PREHASH_SParam, "");
2435 flags |= REGION_FLAGS_DENY_ANONYMOUS; 2435
2436 } 2436 msg->nextBlockFast(_PREHASH_IntegerData);
2437 2437 msg->addS32Fast(_PREHASH_IParam, LLFloaterRegionInfo::getSerial());
2438 if (childGetValue("limit_age_verified").asBoolean()) 2438
2439 { 2439 gAgent.sendMessage();
2440 flags |= REGION_FLAGS_DENY_AGEUNVERIFIED; 2440}
2441 } 2441*/
2442 2442
2443 2443class LLEstateChangeInfoResponder : public LLHTTPClient::Responder
2444 return flags; 2444{
2445} 2445public:
2446 2446 LLEstateChangeInfoResponder(void* userdata) : mpPanel((LLPanelEstateInfo*)userdata) {};
2447BOOL LLPanelEstateInfo::getGlobalTime() 2447
2448{ 2448 // if we get a normal response, handle it here
2449 return childGetValue("use_global_time_check").asBoolean(); 2449 virtual void result(const LLSD& content)
2450} 2450 {
2451 2451 // refresh the panel from the database
2452void LLPanelEstateInfo::setGlobalTime(bool b) 2452 mpPanel->refresh();
2453{ 2453 }
2454 childSetValue("use_global_time_check", LLSD(b)); 2454
2455 childSetEnabled("fixed_sun_check", LLSD(!b)); 2455 // if we get an error response
2456 childSetEnabled("sun_hour_slider", LLSD(!b)); 2456 virtual void error(U32 status, const std::string& reason)
2457 if (b) 2457 {
2458 { 2458 llinfos << "LLEstateChangeInfoResponder::error "
2459 childSetValue("sun_hour_slider", LLSD(0.f)); 2459 << status << ": " << reason << llendl;
2460 } 2460 }
2461} 2461private:
2462 2462 LLPanelEstateInfo* mpPanel;
2463 2463};
2464BOOL LLPanelEstateInfo::getFixedSun() 2464
2465{ 2465// tries to send estate info using a cap; returns true if it succeeded
2466 return childGetValue("fixed_sun_check").asBoolean(); 2466bool LLPanelEstateInfo::commitEstateInfoCaps()
2467} 2467{
2468 2468 std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo");
2469void LLPanelEstateInfo::setSunHour(F32 sun_hour) 2469
2470{ 2470 if (url.empty())
2471 if(sun_hour < 6.0f) 2471 {
2472 { 2472 // whoops, couldn't find the cap, so bail out
2473 sun_hour = 24.0f + sun_hour; 2473 return false;
2474 } 2474 }
2475 childSetValue("sun_hour_slider", LLSD(sun_hour)); 2475
2476} 2476 LLSD body;
2477 2477 body["estate_name"] = getEstateName();
2478F32 LLPanelEstateInfo::getSunHour() 2478
2479{ 2479 body["is_externally_visible"] = childGetValue("externally_visible_check").asBoolean();
2480 if (childIsEnabled("sun_hour_slider")) 2480 body["allow_direct_teleport"] = childGetValue("allow_direct_teleport").asBoolean();
2481 { 2481 body["is_sun_fixed" ] = childGetValue("fixed_sun_check").asBoolean();
2482 return (F32)childGetValue("sun_hour_slider").asReal(); 2482 body["deny_anonymous" ] = childGetValue("limit_payment").asBoolean();
2483 } 2483 body["deny_age_unverified" ] = childGetValue("limit_age_verified").asBoolean();
2484 return 0.f; 2484 body["allow_voice_chat" ] = childGetValue("voice_chat_check").asBoolean();
2485} 2485 body["invoice" ] = LLFloaterRegionInfo::getLastInvoice();
2486 2486
2487const std::string LLPanelEstateInfo::getEstateName() const 2487 // block fly is in estate database but not in estate UI, so we're not supporting it
2488{ 2488 //body["block_fly" ] = childGetValue("").asBoolean();
2489 return childGetValue("estate_name").asString(); 2489
2490} 2490 F32 sun_hour = getSunHour();
2491 2491 if (childGetValue("use_global_time_check").asBoolean())
2492void LLPanelEstateInfo::setEstateName(const std::string& name) 2492 {
2493{ 2493 sun_hour = 0.f; // 0 = global time
2494 childSetValue("estate_name", LLSD(name)); 2494 }
2495} 2495 body["sun_hour"] = sun_hour;
2496 2496
2497const std::string LLPanelEstateInfo::getOwnerName() const 2497 body["owner_abuse_email"] = childGetValue("abuse_email_address").asString();
2498{ 2498
2499 return childGetValue("estate_owner").asString(); 2499 // we use a responder so that we can re-get the data after committing to the database
2500} 2500 LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder((void*)this));
2501 2501 return true;
2502void LLPanelEstateInfo::setOwnerName(const std::string& name) 2502}
2503{ 2503
2504 childSetValue("estate_owner", LLSD(name)); 2504/* This is the old way of doing things, is deprecated, and should be
2505} 2505 deleted when the dataserver model can be removed */
2506 2506// key = "estatechangeinfo"
2507const std::string LLPanelEstateInfo::getAbuseEmailAddress() const 2507// strings[0] = str(estate_id) (added by simulator before relay - not here)
2508{ 2508// strings[1] = estate_name
2509 return childGetValue("abuse_email_address").asString(); 2509// strings[2] = str(estate_flags)
2510} 2510// strings[3] = str((S32)(sun_hour * 1024.f))
2511 2511void LLPanelEstateInfo::commitEstateInfoDataserver()
2512void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address) 2512{
2513{ 2513 LLMessageSystem* msg = gMessageSystem;
2514 childSetValue("abuse_email_address", LLSD(address)); 2514 msg->newMessage("EstateOwnerMessage");
2515} 2515 msg->nextBlockFast(_PREHASH_AgentData);
2516 2516 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2517void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, 2517 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
2518 bool enable_group, 2518 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
2519 bool enable_ban) 2519
2520{ 2520 msg->nextBlock("MethodData");
2521 childSetEnabled("allow_resident_label", enable_agent); 2521 msg->addString("Method", "estatechangeinfo");
2522 childSetEnabled("allowed_avatar_name_list", enable_agent); 2522 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
2523 childSetVisible("allowed_avatar_name_list", enable_agent); 2523
2524 childSetEnabled("add_allowed_avatar_btn", enable_agent); 2524 msg->nextBlock("ParamList");
2525 childSetEnabled("remove_allowed_avatar_btn", enable_agent); 2525 msg->addString("Parameter", getEstateName());
2526 2526
2527 // Groups 2527 std::string buffer;
2528 childSetEnabled("allow_group_label", enable_group); 2528 buffer = llformat("%u", computeEstateFlags());
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 F32 sun_hour = getSunHour();
2533 2533 if (childGetValue("use_global_time_check").asBoolean())
2534 // Ban 2534 {
2535 childSetEnabled("ban_resident_label", enable_ban); 2535 sun_hour = 0.f; // 0 = global time
2536 childSetEnabled("banned_avatar_name_list", enable_ban); 2536 }
2537 childSetVisible("banned_avatar_name_list", enable_ban); 2537
2538 childSetEnabled("add_banned_avatar_btn", enable_ban); 2538 buffer = llformat("%d", (S32)(sun_hour*1024.0f));
2539 childSetEnabled("remove_banned_avatar_btn", enable_ban); 2539 msg->nextBlock("ParamList");
2540 2540 msg->addString("Parameter", buffer);
2541 // Update removal buttons if needed 2541
2542 if (enable_agent) 2542 gAgent.sendMessage();
2543 { 2543}
2544 checkRemovalButton("allowed_avatar_name_list"); 2544
2545 } 2545void LLPanelEstateInfo::setEstateFlags(U32 flags)
2546 2546{
2547 if (enable_group) 2547 childSetValue("externally_visible_check", LLSD(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE) );
2548 { 2548 childSetValue("fixed_sun_check", LLSD(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE) );
2549 checkRemovalButton("allowed_group_name_list"); 2549 childSetValue(
2550 } 2550 "voice_chat_check",
2551 2551 LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE));
2552 if (enable_ban) 2552 childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) );
2553 { 2553 childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) );
2554 checkRemovalButton("banned_avatar_name_list"); 2554 childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) );
2555 } 2555
2556} 2556 refresh();
2557 2557}
2558// static 2558
2559void LLPanelEstateInfo::callbackCacheName( 2559U32 LLPanelEstateInfo::computeEstateFlags()
2560 const LLUUID& id, 2560{
2561 const std::string& first, 2561 U32 flags = 0;
2562 const std::string& last, 2562
2563 BOOL is_group, 2563 if (childGetValue("externally_visible_check").asBoolean())
2564 void*) 2564 {
2565{ 2565 flags |= REGION_FLAGS_EXTERNALLY_VISIBLE;
2566 LLPanelEstateInfo* self = LLFloaterRegionInfo::getPanelEstate(); 2566 }
2567 if (!self) return; 2567
2568 2568 if ( childGetValue("voice_chat_check").asBoolean() )
2569 std::string name; 2569 {
2570 2570 flags |= REGION_FLAGS_ALLOW_VOICE;
2571 if (id.isNull()) 2571 }
2572 { 2572
2573 name = "(none)"; 2573 if (childGetValue("allow_direct_teleport").asBoolean())
2574 } 2574 {
2575 else 2575 flags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT;
2576 { 2576 }
2577 name = first + " " + last; 2577
2578 } 2578 if (childGetValue("fixed_sun_check").asBoolean())
2579 2579 {
2580 self->setOwnerName(name); 2580 flags |= REGION_FLAGS_SUN_FIXED;
2581} 2581 }
2582 2582
2583void LLPanelEstateInfo::clearAccessLists() 2583 if (childGetValue("limit_payment").asBoolean())
2584{ 2584 {
2585 LLNameListCtrl* name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); 2585 flags |= REGION_FLAGS_DENY_ANONYMOUS;
2586 if (name_list) 2586 }
2587 { 2587
2588 name_list->deleteAllItems(); 2588 if (childGetValue("limit_age_verified").asBoolean())
2589 } 2589 {
2590 2590 flags |= REGION_FLAGS_DENY_AGEUNVERIFIED;
2591 name_list = getChild<LLNameListCtrl>("banned_avatar_name_list"); 2591 }
2592 if (name_list) 2592
2593 { 2593
2594 name_list->deleteAllItems(); 2594 return flags;
2595 } 2595}
2596} 2596
2597 2597BOOL LLPanelEstateInfo::getGlobalTime()
2598// enables/disables the "remove" button for the various allow/ban lists 2598{
2599BOOL LLPanelEstateInfo::checkRemovalButton(std::string name) 2599 return childGetValue("use_global_time_check").asBoolean();
2600{ 2600}
2601 std::string btn_name = ""; 2601
2602 if (name == "allowed_avatar_name_list") 2602void LLPanelEstateInfo::setGlobalTime(bool b)
2603 { 2603{
2604 btn_name = "remove_allowed_avatar_btn"; 2604 childSetValue("use_global_time_check", LLSD(b));
2605 } 2605 childSetEnabled("fixed_sun_check", LLSD(!b));
2606 else if (name == "allowed_group_name_list") 2606 childSetEnabled("sun_hour_slider", LLSD(!b));
2607 { 2607 if (b)
2608 btn_name = "remove_allowed_group_btn"; 2608 {
2609 } 2609 childSetValue("sun_hour_slider", LLSD(0.f));
2610 else if (name == "banned_avatar_name_list") 2610 }
2611 { 2611}
2612 btn_name = "remove_banned_avatar_btn"; 2612
2613 } 2613
2614 else if (name == "estate_manager_name_list") 2614BOOL LLPanelEstateInfo::getFixedSun()
2615 { 2615{
2616 //ONLY OWNER CAN ADD /DELET ESTATE MANAGER 2616 return childGetValue("fixed_sun_check").asBoolean();
2617 LLViewerRegion* region = gAgent.getRegion(); 2617}
2618 if (region && (region->getOwner() == gAgent.getID())) 2618
2619 { 2619void LLPanelEstateInfo::setSunHour(F32 sun_hour)
2620 btn_name = "remove_estate_manager_btn"; 2620{
2621 } 2621 if(sun_hour < 6.0f)
2622 } 2622 {
2623 2623 sun_hour = 24.0f + sun_hour;
2624 // enable the remove button if something is selected 2624 }
2625 LLNameListCtrl* name_list = getChild<LLNameListCtrl>(name); 2625 childSetValue("sun_hour_slider", LLSD(sun_hour));
2626 childSetEnabled(btn_name, name_list && name_list->getFirstSelected() ? TRUE : FALSE); 2626}
2627 2627
2628 return (btn_name != ""); 2628F32 LLPanelEstateInfo::getSunHour()
2629} 2629{
2630 2630 if (childIsEnabled("sun_hour_slider"))
2631BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl) 2631 {
2632{ 2632 return (F32)childGetValue("sun_hour_slider").asReal();
2633 BOOL found_child_ctrl = FALSE; 2633 }
2634 if (child_ctrl->getName() == "sun_hour_slider") 2634 return 0.f;
2635 { 2635}
2636 enableButton("apply_btn"); 2636
2637 found_child_ctrl = TRUE; 2637const std::string LLPanelEstateInfo::getEstateName() const
2638 } 2638{
2639 return found_child_ctrl; 2639 return childGetValue("estate_name").asString();
2640} 2640}
2641 2641
2642// static 2642void LLPanelEstateInfo::setEstateName(const std::string& name)
2643void LLPanelEstateInfo::onClickMessageEstate(void* userdata) 2643{
2644{ 2644 childSetValue("estate_name", 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::getOwnerName() const
2648 2648{
2649bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& response) 2649 return childGetValue("estate_owner").asString();
2650{ 2650}
2651 S32 option = LLNotification::getSelectedOption(notification, response); 2651
2652 std::string text = response["message"].asString(); 2652void LLPanelEstateInfo::setOwnerName(const std::string& name)
2653 if(option != 0) return false; 2653{
2654 if(text.empty()) return false; 2654 childSetValue("estate_owner", LLSD(name));
2655 llinfos << "Message to everyone: " << text << llendl; 2655}
2656 strings_t strings; 2656
2657 //integers_t integers; 2657const std::string LLPanelEstateInfo::getAbuseEmailAddress() const
2658 std::string name; 2658{
2659 gAgent.buildFullname(name); 2659 return childGetValue("abuse_email_address").asString();
2660 strings.push_back(strings_t::value_type(name)); 2660}
2661 strings.push_back(strings_t::value_type(text)); 2661
2662 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); 2662void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address)
2663 sendEstateOwnerMessage(gMessageSystem, "instantmessage", invoice, strings); 2663{
2664 return false; 2664 childSetValue("abuse_email_address", LLSD(address));
2665} 2665}
2666 2666
2667LLPanelEstateCovenant::LLPanelEstateCovenant() 2667void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent,
2668: mCovenantID(LLUUID::null) 2668 bool enable_group,
2669{ 2669 bool enable_ban)
2670} 2670{
2671 2671 childSetEnabled("allow_resident_label", enable_agent);
2672// virtual 2672 childSetEnabled("allowed_avatar_name_list", enable_agent);
2673bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region) 2673 childSetVisible("allowed_avatar_name_list", enable_agent);
2674{ 2674 childSetEnabled("add_allowed_avatar_btn", enable_agent);
2675 LLTextBox* region_name = getChild<LLTextBox>("region_name_text"); 2675 childSetEnabled("remove_allowed_avatar_btn", enable_agent);
2676 if (region_name) 2676
2677 { 2677 // Groups
2678 region_name->setText(region->getName()); 2678 childSetEnabled("allow_group_label", enable_group);
2679 } 2679 childSetEnabled("allowed_group_name_list", enable_group);
2680 2680 childSetVisible("allowed_group_name_list", enable_group);
2681 LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); 2681 childSetEnabled("add_allowed_group_btn", enable_group);
2682 if (resellable_clause) 2682 childSetEnabled("remove_allowed_group_btn", enable_group);
2683 { 2683
2684 if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) 2684 // Ban
2685 { 2685 childSetEnabled("ban_resident_label", enable_ban);
2686 resellable_clause->setText(getString("can_not_resell")); 2686 childSetEnabled("banned_avatar_name_list", enable_ban);
2687 } 2687 childSetVisible("banned_avatar_name_list", enable_ban);
2688 else 2688 childSetEnabled("add_banned_avatar_btn", enable_ban);
2689 { 2689 childSetEnabled("remove_banned_avatar_btn", enable_ban);
2690 resellable_clause->setText(getString("can_resell")); 2690
2691 } 2691 // Update removal buttons if needed
2692 } 2692 if (enable_agent)
2693 2693 {
2694 LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause"); 2694 checkRemovalButton("allowed_avatar_name_list");
2695 if (changeable_clause) 2695 }
2696 { 2696
2697 if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES) 2697 if (enable_group)
2698 { 2698 {
2699 changeable_clause->setText(getString("can_change")); 2699 checkRemovalButton("allowed_group_name_list");
2700 } 2700 }
2701 else 2701
2702 { 2702 if (enable_ban)
2703 changeable_clause->setText(getString("can_not_change")); 2703 {
2704 } 2704 checkRemovalButton("banned_avatar_name_list");
2705 } 2705 }
2706 2706}
2707 LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text"); 2707
2708 if (region_maturity) 2708// static
2709 { 2709void LLPanelEstateInfo::callbackCacheName(
2710 region_maturity->setText(region->getSimAccessString()); 2710 const LLUUID& id,
2711 } 2711 const std::string& first,
2712 2712 const std::string& last,
2713 LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text"); 2713 BOOL is_group,
2714 if (region_landtype) 2714 void*)
2715 { 2715{
2716 region_landtype->setText(region->getSimProductName()); 2716 LLPanelEstateInfo* self = LLFloaterRegionInfo::getPanelEstate();
2717 } 2717 if (!self) return;
2718 2718
2719 2719 std::string name;
2720 // let the parent class handle the general data collection. 2720
2721 bool rv = LLPanelRegionInfo::refreshFromRegion(region); 2721 if (id.isNull())
2722 LLMessageSystem *msg = gMessageSystem; 2722 {
2723 msg->newMessage("EstateCovenantRequest"); 2723 name = "(none)";
2724 msg->nextBlockFast(_PREHASH_AgentData); 2724 }
2725 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2725 else
2726 msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID()); 2726 {
2727 msg->sendReliable(region->getHost()); 2727 name = first + " " + last;
2728 return rv; 2728 }
2729} 2729
2730 2730 self->setOwnerName(name);
2731// virtual 2731}
2732bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg) 2732
2733{ 2733void LLPanelEstateInfo::clearAccessLists()
2734 llinfos << "LLPanelEstateCovenant::estateUpdate()" << llendl; 2734{
2735 return true; 2735 LLNameListCtrl* name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
2736} 2736 if (name_list)
2737 2737 {
2738// virtual 2738 name_list->deleteAllItems();
2739BOOL LLPanelEstateCovenant::postBuild() 2739 }
2740{ 2740
2741 initHelpBtn("covenant_help", "HelpEstateCovenant"); 2741 name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
2742 mEstateNameText = getChild<LLTextBox>("estate_name_text"); 2742 if (name_list)
2743 mEstateOwnerText = getChild<LLTextBox>("estate_owner_text"); 2743 {
2744 mLastModifiedText = getChild<LLTextBox>("covenant_timestamp_text"); 2744 name_list->deleteAllItems();
2745 mEditor = getChild<LLViewerTextEditor>("covenant_editor"); 2745 }
2746 if (mEditor) mEditor->setHandleEditKeysDirectly(TRUE); 2746}
2747 LLButton* reset_button = getChild<LLButton>("reset_covenant"); 2747
2748 reset_button->setEnabled(gAgent.canManageEstate()); 2748// enables/disables the "remove" button for the various allow/ban lists
2749 reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, NULL); 2749BOOL LLPanelEstateInfo::checkRemovalButton(std::string name)
2750 2750{
2751 return LLPanelRegionInfo::postBuild(); 2751 std::string btn_name = "";
2752} 2752 if (name == "allowed_avatar_name_list")
2753 2753 {
2754// virtual 2754 btn_name = "remove_allowed_avatar_btn";
2755void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl) 2755 }
2756{ 2756 else if (name == "allowed_group_name_list")
2757} 2757 {
2758 2758 btn_name = "remove_allowed_group_btn";
2759// virtual 2759 }
2760BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, 2760 else if (name == "banned_avatar_name_list")
2761 EDragAndDropType cargo_type, 2761 {
2762 void* cargo_data, 2762 btn_name = "remove_banned_avatar_btn";
2763 EAcceptance* accept, 2763 }
2764 std::string& tooltip_msg) 2764 else if (name == "estate_manager_name_list")
2765{ 2765 {
2766 LLInventoryItem* item = (LLInventoryItem*)cargo_data; 2766 //ONLY OWNER CAN ADD /DELET ESTATE MANAGER
2767 2767 LLViewerRegion* region = gAgent.getRegion();
2768 if (!gAgent.canManageEstate()) 2768 if (region && (region->getOwner() == gAgent.getID()))
2769 { 2769 {
2770 *accept = ACCEPT_NO; 2770 btn_name = "remove_estate_manager_btn";
2771 return TRUE; 2771 }
2772 } 2772 }
2773 2773
2774 switch(cargo_type) 2774 // enable the remove button if something is selected
2775 { 2775 LLNameListCtrl* name_list = getChild<LLNameListCtrl>(name);
2776 case DAD_NOTECARD: 2776 childSetEnabled(btn_name, name_list && name_list->getFirstSelected() ? TRUE : FALSE);
2777 *accept = ACCEPT_YES_COPY_SINGLE; 2777
2778 if (item && drop) 2778 return (btn_name != "");
2779 { 2779}
2780 LLSD payload; 2780
2781 payload["item_id"] = item->getUUID(); 2781BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl)
2782 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), payload, 2782{
2783 LLPanelEstateCovenant::confirmChangeCovenantCallback); 2783 BOOL found_child_ctrl = FALSE;
2784 } 2784 if (child_ctrl->getName() == "sun_hour_slider")
2785 break; 2785 {
2786 default: 2786 enableButton("apply_btn");
2787 *accept = ACCEPT_NO; 2787 found_child_ctrl = TRUE;
2788 break; 2788 }
2789 } 2789 return found_child_ctrl;
2790 2790}
2791 return TRUE; 2791
2792} 2792// static
2793 2793void LLPanelEstateInfo::onClickMessageEstate(void* userdata)
2794// static 2794{
2795bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response) 2795 llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl;
2796{ 2796 LLNotifications::instance().add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2));
2797 S32 option = LLNotification::getSelectedOption(notification, response); 2797}
2798 LLInventoryItem* item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); 2798
2799 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant(); 2799bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
2800 2800{
2801 if (!item || !self) return false; 2801 S32 option = LLNotification::getSelectedOption(notification, response);
2802 2802 std::string text = response["message"].asString();
2803 switch(option) 2803 if(option != 0) return false;
2804 { 2804 if(text.empty()) return false;
2805 case 0: 2805 llinfos << "Message to everyone: " << text << llendl;
2806 self->loadInvItem(item); 2806 strings_t strings;
2807 break; 2807 //integers_t integers;
2808 default: 2808 std::string name;
2809 break; 2809 gAgent.buildFullname(name);
2810 } 2810 strings.push_back(strings_t::value_type(name));
2811 return false; 2811 strings.push_back(strings_t::value_type(text));
2812} 2812 LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
2813 2813 sendEstateOwnerMessage(gMessageSystem, "instantmessage", invoice, strings);
2814// static 2814 return false;
2815void LLPanelEstateCovenant::resetCovenantID(void* userdata) 2815}
2816{ 2816
2817 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback); 2817LLPanelEstateCovenant::LLPanelEstateCovenant()
2818} 2818: mCovenantID(LLUUID::null)
2819 2819{
2820// static 2820}
2821bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notification, const LLSD& response) 2821
2822{ 2822// virtual
2823 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant(); 2823bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)
2824 if (!self) return false; 2824{
2825 2825 LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
2826 S32 option = LLNotification::getSelectedOption(notification, response); 2826 if (region_name)
2827 switch(option) 2827 {
2828 { 2828 region_name->setText(region->getName());
2829 case 0: 2829 }
2830 self->loadInvItem(NULL); 2830
2831 break; 2831 LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
2832 default: 2832 if (resellable_clause)
2833 break; 2833 {
2834 } 2834 if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
2835 return false; 2835 {
2836} 2836 resellable_clause->setText(getString("can_not_resell"));
2837 2837 }
2838void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp) 2838 else
2839{ 2839 {
2840 const BOOL high_priority = TRUE; 2840 resellable_clause->setText(getString("can_resell"));
2841 if (itemp) 2841 }
2842 { 2842 }
2843 gAssetStorage->getInvItemAsset(gAgent.getRegionHost(), 2843
2844 gAgent.getID(), 2844 LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
2845 gAgent.getSessionID(), 2845 if (changeable_clause)
2846 itemp->getPermissions().getOwner(), 2846 {
2847 LLUUID::null, 2847 if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
2848 itemp->getUUID(), 2848 {
2849 itemp->getAssetUUID(), 2849 changeable_clause->setText(getString("can_change"));
2850 itemp->getType(), 2850 }
2851 onLoadComplete, 2851 else
2852 (void*)this, 2852 {
2853 high_priority); 2853 changeable_clause->setText(getString("can_not_change"));
2854 mAssetStatus = ASSET_LOADING; 2854 }
2855 } 2855 }
2856 else 2856
2857 { 2857 LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");
2858 mAssetStatus = ASSET_LOADED; 2858 if (region_maturity)
2859 setCovenantTextEditor("There is no Covenant provided for this Estate."); 2859 {
2860 sendChangeCovenantID(LLUUID::null); 2860 region_maturity->setText(region->getSimAccessString());
2861 } 2861 }
2862} 2862
2863 2863 LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
2864// static 2864 if (region_landtype)
2865void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, 2865 {
2866 const LLUUID& asset_uuid, 2866 region_landtype->setText(region->getSimProductName());
2867 LLAssetType::EType type, 2867 }
2868 void* user_data, S32 status, LLExtStat ext_status) 2868
2869{ 2869
2870 llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl; 2870 // let the parent class handle the general data collection.
2871 LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data; 2871 bool rv = LLPanelRegionInfo::refreshFromRegion(region);
2872 if( panelp ) 2872 LLMessageSystem *msg = gMessageSystem;
2873 { 2873 msg->newMessage("EstateCovenantRequest");
2874 if(0 == status) 2874 msg->nextBlockFast(_PREHASH_AgentData);
2875 { 2875 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2876 LLVFile file(vfs, asset_uuid, type, LLVFile::READ); 2876 msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
2877 2877 msg->sendReliable(region->getHost());
2878 S32 file_length = file.getSize(); 2878 return rv;
2879 2879}
2880 char* buffer = new char[file_length+1]; 2880
2881 if (buffer == NULL) 2881// virtual
2882 { 2882bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg)
2883 llerrs << "Memory Allocation Failed" << llendl; 2883{
2884 return; 2884 llinfos << "LLPanelEstateCovenant::estateUpdate()" << llendl;
2885 } 2885 return true;
2886 2886}
2887 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */ 2887
2888 // put a EOS at the end 2888// virtual
2889 buffer[file_length] = 0; 2889BOOL LLPanelEstateCovenant::postBuild()
2890 2890{
2891 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) 2891 initHelpBtn("covenant_help", "HelpEstateCovenant");
2892 { 2892 mEstateNameText = getChild<LLTextBox>("estate_name_text");
2893 if( !panelp->mEditor->importBuffer( buffer, file_length+1 ) ) 2893 mEstateOwnerText = getChild<LLTextBox>("estate_owner_text");
2894 { 2894 mLastModifiedText = getChild<LLTextBox>("covenant_timestamp_text");
2895 llwarns << "Problem importing estate covenant." << llendl; 2895 mEditor = getChild<LLViewerTextEditor>("covenant_editor");
2896 LLNotifications::instance().add("ProblemImportingEstateCovenant"); 2896 if (mEditor) mEditor->setHandleEditKeysDirectly(TRUE);
2897 } 2897 LLButton* reset_button = getChild<LLButton>("reset_covenant");
2898 else 2898 reset_button->setEnabled(gAgent.canManageEstate());
2899 { 2899 reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, NULL);
2900 panelp->sendChangeCovenantID(asset_uuid); 2900
2901 } 2901 return LLPanelRegionInfo::postBuild();
2902 } 2902}
2903 else 2903
2904 { 2904// virtual
2905 // Version 0 (just text, doesn't include version number) 2905void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl)
2906 panelp->sendChangeCovenantID(asset_uuid); 2906{
2907 } 2907}
2908 delete[] buffer; 2908
2909 } 2909// virtual
2910 else 2910BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
2911 { 2911 EDragAndDropType cargo_type,
2912 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); 2912 void* cargo_data,
2913 2913 EAcceptance* accept,
2914 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || 2914 std::string& tooltip_msg)
2915 LL_ERR_FILE_EMPTY == status) 2915{
2916 { 2916 LLInventoryItem* item = (LLInventoryItem*)cargo_data;
2917 LLNotifications::instance().add("MissingNotecardAssetID"); 2917
2918 } 2918 if (!gAgent.canManageEstate())
2919 else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) 2919 {
2920 { 2920 *accept = ACCEPT_NO;
2921 LLNotifications::instance().add("NotAllowedToViewNotecard"); 2921 return TRUE;
2922 } 2922 }
2923 else 2923
2924 { 2924 switch(cargo_type)
2925 LLNotifications::instance().add("UnableToLoadNotecardAsset"); 2925 {
2926 } 2926 case DAD_NOTECARD:
2927 2927 *accept = ACCEPT_YES_COPY_SINGLE;
2928 llwarns << "Problem loading notecard: " << status << llendl; 2928 if (item && drop)
2929 } 2929 {
2930 panelp->mAssetStatus = ASSET_LOADED; 2930 LLSD payload;
2931 panelp->setCovenantID(asset_uuid); 2931 payload["item_id"] = item->getUUID();
2932 } 2932 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), payload,
2933} 2933 LLPanelEstateCovenant::confirmChangeCovenantCallback);
2934 2934 }
2935// key = "estatechangecovenantid" 2935 break;
2936// strings[0] = str(estate_id) (added by simulator before relay - not here) 2936 default:
2937// strings[1] = str(covenant_id) 2937 *accept = ACCEPT_NO;
2938void LLPanelEstateCovenant::sendChangeCovenantID(const LLUUID &asset_id) 2938 break;
2939{ 2939 }
2940 if (asset_id != getCovenantID()) 2940
2941 { 2941 return TRUE;
2942 setCovenantID(asset_id); 2942}
2943 2943
2944 LLMessageSystem* msg = gMessageSystem; 2944// static
2945 msg->newMessage("EstateOwnerMessage"); 2945bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response)
2946 msg->nextBlockFast(_PREHASH_AgentData); 2946{
2947 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 2947 S32 option = LLNotification::getSelectedOption(notification, response);
2948 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 2948 LLInventoryItem* item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
2949 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used 2949 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
2950 2950
2951 msg->nextBlock("MethodData"); 2951 if (!item || !self) return false;
2952 msg->addString("Method", "estatechangecovenantid"); 2952
2953 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); 2953 switch(option)
2954 2954 {
2955 msg->nextBlock("ParamList"); 2955 case 0:
2956 msg->addString("Parameter", getCovenantID().asString()); 2956 self->loadInvItem(item);
2957 gAgent.sendReliableMessage(); 2957 break;
2958 } 2958 default:
2959} 2959 break;
2960 2960 }
2961// virtual 2961 return false;
2962BOOL LLPanelEstateCovenant::sendUpdate() 2962}
2963{ 2963
2964 return TRUE; 2964// static
2965} 2965void LLPanelEstateCovenant::resetCovenantID(void* userdata)
2966 2966{
2967const std::string& LLPanelEstateCovenant::getEstateName() const 2967 LLNotifications::instance().add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback);
2968{ 2968}
2969 return mEstateNameText->getText(); 2969
2970} 2970// static
2971 2971bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notification, const LLSD& response)
2972void LLPanelEstateCovenant::setEstateName(const std::string& name) 2972{
2973{ 2973 LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
2974 mEstateNameText->setText(name); 2974 if (!self) return false;
2975} 2975
2976 2976 S32 option = LLNotification::getSelectedOption(notification, response);
2977// static 2977 switch(option)
2978void LLPanelEstateCovenant::updateCovenantText(const std::string& string, const LLUUID& asset_id) 2978 {
2979{ 2979 case 0:
2980 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 2980 self->loadInvItem(NULL);
2981 if( panelp ) 2981 break;
2982 { 2982 default:
2983 panelp->mEditor->setText(string); 2983 break;
2984 panelp->setCovenantID(asset_id); 2984 }
2985 } 2985 return false;
2986} 2986}
2987 2987
2988// static 2988void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
2989void LLPanelEstateCovenant::updateEstateName(const std::string& name) 2989{
2990{ 2990 const BOOL high_priority = TRUE;
2991 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 2991 if (itemp)
2992 if( panelp ) 2992 {
2993 { 2993 gAssetStorage->getInvItemAsset(gAgent.getRegionHost(),
2994 panelp->mEstateNameText->setText(name); 2994 gAgent.getID(),
2995 } 2995 gAgent.getSessionID(),
2996} 2996 itemp->getPermissions().getOwner(),
2997 2997 LLUUID::null,
2998// static 2998 itemp->getUUID(),
2999void LLPanelEstateCovenant::updateLastModified(const std::string& text) 2999 itemp->getAssetUUID(),
3000{ 3000 itemp->getType(),
3001 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 3001 onLoadComplete,
3002 if( panelp ) 3002 (void*)this,
3003 { 3003 high_priority);
3004 panelp->mLastModifiedText->setText(text); 3004 mAssetStatus = ASSET_LOADING;
3005 } 3005 }
3006} 3006 else
3007 3007 {
3008// static 3008 mAssetStatus = ASSET_LOADED;
3009void LLPanelEstateCovenant::updateEstateOwnerName(const std::string& name) 3009 setCovenantTextEditor("There is no Covenant provided for this Estate.");
3010{ 3010 sendChangeCovenantID(LLUUID::null);
3011 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant(); 3011 }
3012 if( panelp ) 3012}
3013 { 3013
3014 panelp->mEstateOwnerText->setText(name); 3014// static
3015 } 3015void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
3016} 3016 const LLUUID& asset_uuid,
3017 3017 LLAssetType::EType type,
3018const std::string& LLPanelEstateCovenant::getOwnerName() const 3018 void* user_data, S32 status, LLExtStat ext_status)
3019{ 3019{
3020 return mEstateOwnerText->getText(); 3020 llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl;
3021} 3021 LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data;
3022 3022 if( panelp )
3023void LLPanelEstateCovenant::setOwnerName(const std::string& name) 3023 {
3024{ 3024 if(0 == status)
3025 mEstateOwnerText->setText(name); 3025 {
3026} 3026 LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
3027 3027
3028void LLPanelEstateCovenant::setCovenantTextEditor(const std::string& text) 3028 S32 file_length = file.getSize();
3029{ 3029
3030 mEditor->setText(text); 3030 char* buffer = new char[file_length+1];
3031} 3031 if (buffer == NULL)
3032 3032 {
3033// key = "estateupdateinfo" 3033 llerrs << "Memory Allocation Failed" << llendl;
3034// strings[0] = estate name 3034 return;
3035// strings[1] = str(owner_id) 3035 }
3036// strings[2] = str(estate_id) 3036
3037// strings[3] = str(estate_flags) 3037 file.read((U8*)buffer, file_length); /* Flawfinder: ignore */
3038// strings[4] = str((S32)(sun_hour * 1024)) 3038 // put a EOS at the end
3039// strings[5] = str(parent_estate_id) 3039 buffer[file_length] = 0;
3040// strings[6] = str(covenant_id) 3040
3041// strings[7] = str(covenant_timestamp) 3041 if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) )
3042// strings[8] = str(send_to_agent_only) 3042 {
3043// strings[9] = str(abuse_email_addr) 3043 if( !panelp->mEditor->importBuffer( buffer, file_length+1 ) )
3044bool LLDispatchEstateUpdateInfo::operator()( 3044 {
3045 const LLDispatcher* dispatcher, 3045 llwarns << "Problem importing estate covenant." << llendl;
3046 const std::string& key, 3046 LLNotifications::instance().add("ProblemImportingEstateCovenant");
3047 const LLUUID& invoice, 3047 }
3048 const sparam_t& strings) 3048 else
3049{ 3049 {
3050 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 3050 panelp->sendChangeCovenantID(asset_uuid);
3051 if (!panel) return true; 3051 }
3052 3052 }
3053 // NOTE: LLDispatcher extracts strings with an extra \0 at the 3053 else
3054 // end. If we pass the std::string direct to the UI/renderer 3054 {
3055 // it draws with a weird character at the end of the string. 3055 // Version 0 (just text, doesn't include version number)
3056 std::string estate_name = strings[0].c_str(); // preserve c_str() call! 3056 panelp->sendChangeCovenantID(asset_uuid);
3057 panel->setEstateName(estate_name); 3057 }
3058 3058 delete[] buffer;
3059#if ELAR_ENABLED 3059 }
3060 if (strings.size() > 9) 3060 else
3061 { 3061 {
3062 std::string abuse_email = strings[9].c_str(); // preserve c_str() call! 3062 LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
3063 panel->setAbuseEmailAddress(abuse_email); 3063
3064 } 3064 if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
3065 else 3065 LL_ERR_FILE_EMPTY == status)
3066#endif 3066 {
3067 { 3067 LLNotifications::instance().add("MissingNotecardAssetID");
3068 panel->setAbuseEmailAddress(panel->getString("email_unsupported")); 3068 }
3069 } 3069 else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
3070 3070 {
3071 LLViewerRegion* regionp = gAgent.getRegion(); 3071 LLNotifications::instance().add("NotAllowedToViewNotecard");
3072 3072 }
3073 LLUUID owner_id(strings[1]); 3073 else
3074 regionp->setOwner(owner_id); 3074 {
3075 // Update estate owner name in UI 3075 LLNotifications::instance().add("UnableToLoadNotecardAsset");
3076 const BOOL is_group = FALSE; 3076 }
3077 gCacheName->get(owner_id, is_group, LLPanelEstateInfo::callbackCacheName); 3077
3078 3078 llwarns << "Problem loading notecard: " << status << llendl;
3079 U32 estate_id = strtoul(strings[2].c_str(), NULL, 10); 3079 }
3080 panel->setEstateID(estate_id); 3080 panelp->mAssetStatus = ASSET_LOADED;
3081 3081 panelp->setCovenantID(asset_uuid);
3082 U32 flags = strtoul(strings[3].c_str(), NULL, 10); 3082 }
3083 panel->setEstateFlags(flags); 3083}
3084 3084
3085 F32 sun_hour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f; 3085// key = "estatechangecovenantid"
3086 if(sun_hour == 0 && (flags & REGION_FLAGS_SUN_FIXED ? FALSE : TRUE)) 3086// strings[0] = str(estate_id) (added by simulator before relay - not here)
3087 { 3087// strings[1] = str(covenant_id)
3088 panel->setGlobalTime(TRUE); 3088void LLPanelEstateCovenant::sendChangeCovenantID(const LLUUID &asset_id)
3089 } 3089{
3090 else 3090 if (asset_id != getCovenantID())
3091 { 3091 {
3092 panel->setGlobalTime(FALSE); 3092 setCovenantID(asset_id);
3093 panel->setSunHour(sun_hour); 3093
3094 } 3094 LLMessageSystem* msg = gMessageSystem;
3095 3095 msg->newMessage("EstateOwnerMessage");
3096 bool visible_from_mainland = (bool)(flags & REGION_FLAGS_EXTERNALLY_VISIBLE); 3096 msg->nextBlockFast(_PREHASH_AgentData);
3097 bool god = gAgent.isGodlike(); 3097 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
3098 bool linden_estate = (estate_id <= ESTATE_LAST_LINDEN); 3098 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3099 3099 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
3100 // If visible from mainland, disable the access allowed 3100
3101 // UI, as anyone can teleport there. 3101 msg->nextBlock("MethodData");
3102 // However, gods need to be able to edit the access list for 3102 msg->addString("Method", "estatechangecovenantid");
3103 // linden estates, regardless of visibility, to allow object 3103 msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
3104 // and L$ transfers. 3104
3105 bool enable_agent = (!visible_from_mainland || (god && linden_estate)); 3105 msg->nextBlock("ParamList");
3106 bool enable_group = enable_agent; 3106 msg->addString("Parameter", getCovenantID().asString());
3107 bool enable_ban = !linden_estate; 3107 gAgent.sendReliableMessage();
3108 panel->setAccessAllowedEnabled(enable_agent, enable_group, enable_ban); 3108 }
3109 3109}
3110 return true; 3110
3111} 3111// virtual
3112 3112BOOL LLPanelEstateCovenant::sendUpdate()
3113 3113{
3114// key = "setaccess" 3114 return TRUE;
3115// strings[0] = str(estate_id) 3115}
3116// strings[1] = str(packed_access_lists) 3116
3117// strings[2] = str(num allowed agent ids) 3117const std::string& LLPanelEstateCovenant::getEstateName() const
3118// strings[3] = str(num allowed group ids) 3118{
3119// strings[4] = str(num banned agent ids) 3119 return mEstateNameText->getText();
3120// strings[5] = str(num estate manager agent ids) 3120}
3121// strings[6] = bin(uuid) 3121
3122// strings[7] = bin(uuid) 3122void LLPanelEstateCovenant::setEstateName(const std::string& name)
3123// strings[8] = bin(uuid) 3123{
3124// ... 3124 mEstateNameText->setText(name);
3125bool LLDispatchSetEstateAccess::operator()( 3125}
3126 const LLDispatcher* dispatcher, 3126
3127 const std::string& key, 3127// static
3128 const LLUUID& invoice, 3128void LLPanelEstateCovenant::updateCovenantText(const std::string& string, const LLUUID& asset_id)
3129 const sparam_t& strings) 3129{
3130{ 3130 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant();
3131 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); 3131 if( panelp )
3132 if (!panel) return true; 3132 {
3133 3133 panelp->mEditor->setText(string);
3134 S32 index = 1; // skip estate_id 3134 panelp->setCovenantID(asset_id);
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::updateEstateName(const std::string& name)
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->mEstateNameText->setText(name);
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::updateLastModified(const std::string& text)
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->mLastModifiedText->setText(text);
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)) 3158// static
3159 { 3159void LLPanelEstateCovenant::updateEstateOwnerName(const std::string& name)
3160 llwarns << "non-zero count for managers, but no corresponding flag" << llendl; 3160{
3161 } 3161 LLPanelEstateCovenant* panelp = LLFloaterRegionInfo::getPanelCovenant();
3162 3162 if( panelp )
3163 // grab the UUID's out of the string fields 3163 {
3164 if (access_flags & ESTATE_ACCESS_ALLOWED_AGENTS) 3164 panelp->mEstateOwnerText->setText(name);
3165 { 3165 }
3166 LLNameListCtrl* allowed_agent_name_list; 3166}
3167 allowed_agent_name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list"); 3167
3168 3168const std::string& LLPanelEstateCovenant::getOwnerName() const
3169 int totalAllowedAgents = num_allowed_agents; 3169{
3170 3170 return mEstateOwnerText->getText();
3171 if (allowed_agent_name_list) 3171}
3172 { 3172
3173 totalAllowedAgents += allowed_agent_name_list->getItemCount(); 3173void LLPanelEstateCovenant::setOwnerName(const std::string& name)
3174 } 3174{
3175 3175 mEstateOwnerText->setText(name);
3176 std::string msg = llformat("Allowed residents: (%d, max %d)", 3176}
3177 totalAllowedAgents, 3177
3178 ESTATE_MAX_ACCESS_IDS); 3178void LLPanelEstateCovenant::setCovenantTextEditor(const std::string& text)
3179 panel->childSetValue("allow_resident_label", LLSD(msg)); 3179{
3180 3180 mEditor->setText(text);
3181 if (allowed_agent_name_list) 3181}
3182 { 3182
3183 //allowed_agent_name_list->deleteAllItems(); 3183// key = "estateupdateinfo"
3184 for (S32 i = 0; i < num_allowed_agents && i < ESTATE_MAX_ACCESS_IDS; i++) 3184// strings[0] = estate name
3185 { 3185// strings[1] = str(owner_id)
3186 LLUUID id; 3186// strings[2] = str(estate_id)
3187 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3187// strings[3] = str(estate_flags)
3188 allowed_agent_name_list->addNameItem(id); 3188// strings[4] = str((S32)(sun_hour * 1024))
3189 } 3189// strings[5] = str(parent_estate_id)
3190 panel->childSetEnabled("remove_allowed_avatar_btn", allowed_agent_name_list->getFirstSelected() ? TRUE : FALSE); 3190// strings[6] = str(covenant_id)
3191 allowed_agent_name_list->sortByColumnIndex(0, TRUE); 3191// strings[7] = str(covenant_timestamp)
3192 } 3192// strings[8] = str(send_to_agent_only)
3193 } 3193// strings[9] = str(abuse_email_addr)
3194 3194bool LLDispatchEstateUpdateInfo::operator()(
3195 if (access_flags & ESTATE_ACCESS_ALLOWED_GROUPS) 3195 const LLDispatcher* dispatcher,
3196 { 3196 const std::string& key,
3197 LLNameListCtrl* allowed_group_name_list; 3197 const LLUUID& invoice,
3198 allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list"); 3198 const sparam_t& strings)
3199 3199{
3200 std::string msg = llformat("Allowed groups: (%d, max %d)", 3200 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
3201 num_allowed_groups, 3201 if (!panel) return true;
3202 (S32) ESTATE_MAX_GROUP_IDS); 3202
3203 panel->childSetValue("allow_group_label", LLSD(msg)); 3203 // NOTE: LLDispatcher extracts strings with an extra \0 at the
3204 3204 // end. If we pass the std::string direct to the UI/renderer
3205 if (allowed_group_name_list) 3205 // it draws with a weird character at the end of the string.
3206 { 3206 std::string estate_name = strings[0].c_str(); // preserve c_str() call!
3207 allowed_group_name_list->deleteAllItems(); 3207 panel->setEstateName(estate_name);
3208 for (S32 i = 0; i < num_allowed_groups && i < ESTATE_MAX_GROUP_IDS; i++) 3208
3209 { 3209 if (strings.size() > 3)
3210 LLUUID id; 3210 {
3211 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3211 std::string abuse_email = strings[9].c_str(); // preserve c_str() call!
3212 allowed_group_name_list->addGroupNameItem(id); 3212 panel->setAbuseEmailAddress(abuse_email);
3213 } 3213 }
3214 panel->childSetEnabled("remove_allowed_group_btn", allowed_group_name_list->getFirstSelected() ? TRUE : FALSE); 3214 else
3215 allowed_group_name_list->sortByColumnIndex(0, TRUE); 3215 {
3216 } 3216 panel->setAbuseEmailAddress(panel->getString("email_unsupported"));
3217 } 3217 }
3218 3218
3219 if (access_flags & ESTATE_ACCESS_BANNED_AGENTS) 3219 LLViewerRegion* regionp = gAgent.getRegion();
3220 { 3220
3221 LLNameListCtrl* banned_agent_name_list; 3221 LLUUID owner_id(strings[1]);
3222 banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list"); 3222 regionp->setOwner(owner_id);
3223 3223 // Update estate owner name in UI
3224 int totalBannedAgents = num_banned_agents; 3224 const BOOL is_group = FALSE;
3225 3225 gCacheName->get(owner_id, is_group, LLPanelEstateInfo::callbackCacheName);
3226 if (banned_agent_name_list) 3226
3227 { 3227 U32 estate_id = strtoul(strings[2].c_str(), NULL, 10);
3228 totalBannedAgents += banned_agent_name_list->getItemCount(); 3228 panel->setEstateID(estate_id);
3229 } 3229
3230 3230 U32 flags = strtoul(strings[3].c_str(), NULL, 10);
3231 3231 panel->setEstateFlags(flags);
3232 std::string msg = llformat("Banned residents: (%d, max %d)", 3232
3233 totalBannedAgents, 3233 F32 sun_hour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f;
3234 ESTATE_MAX_ACCESS_IDS); 3234 if(sun_hour == 0 && (flags & REGION_FLAGS_SUN_FIXED ? FALSE : TRUE))
3235 panel->childSetValue("ban_resident_label", LLSD(msg)); 3235 {
3236 3236 panel->setGlobalTime(TRUE);
3237 if (banned_agent_name_list) 3237 }
3238 { 3238 else
3239 //banned_agent_name_list->deleteAllItems(); 3239 {
3240 for (S32 i = 0; i < num_banned_agents && i < ESTATE_MAX_ACCESS_IDS; i++) 3240 panel->setGlobalTime(FALSE);
3241 { 3241 panel->setSunHour(sun_hour);
3242 LLUUID id; 3242 }
3243 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3243
3244 banned_agent_name_list->addNameItem(id); 3244 bool visible_from_mainland = (bool)(flags & REGION_FLAGS_EXTERNALLY_VISIBLE);
3245 } 3245 bool god = gAgent.isGodlike();
3246 panel->childSetEnabled("remove_banned_avatar_btn", banned_agent_name_list->getFirstSelected() ? TRUE : FALSE); 3246 bool linden_estate = (estate_id <= ESTATE_LAST_LINDEN);
3247 banned_agent_name_list->sortByColumnIndex(0, TRUE); 3247
3248 } 3248 // If visible from mainland, disable the access allowed
3249 } 3249 // UI, as anyone can teleport there.
3250 3250 // However, gods need to be able to edit the access list for
3251 if (access_flags & ESTATE_ACCESS_MANAGERS) 3251 // linden estates, regardless of visibility, to allow object
3252 { 3252 // and L$ transfers.
3253 std::string msg = llformat("Estate Managers: (%d, max %d)", 3253 bool enable_agent = (!visible_from_mainland || (god && linden_estate));
3254 num_estate_managers, 3254 bool enable_group = enable_agent;
3255 ESTATE_MAX_MANAGERS); 3255 bool enable_ban = !linden_estate;
3256 panel->childSetValue("estate_manager_label", LLSD(msg)); 3256 panel->setAccessAllowedEnabled(enable_agent, enable_group, enable_ban);
3257 3257
3258 LLNameListCtrl* estate_manager_name_list = 3258 return true;
3259 panel->getChild<LLNameListCtrl>("estate_manager_name_list"); 3259}
3260 if (estate_manager_name_list) 3260
3261 { 3261
3262 estate_manager_name_list->deleteAllItems(); // Clear existing entries 3262// key = "setaccess"
3263 3263// strings[0] = str(estate_id)
3264 // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't 3264// strings[1] = str(packed_access_lists)
3265 // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused, 3265// strings[2] = str(num allowed agent ids)
3266 // and they can still remove them. 3266// strings[3] = str(num allowed group ids)
3267 for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++) 3267// strings[4] = str(num banned agent ids)
3268 { 3268// strings[5] = str(num estate manager agent ids)
3269 LLUUID id; 3269// strings[6] = bin(uuid)
3270 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 3270// strings[7] = bin(uuid)
3271 estate_manager_name_list->addNameItem(id); 3271// strings[8] = bin(uuid)
3272 } 3272// ...
3273 panel->childSetEnabled("remove_estate_manager_btn", estate_manager_name_list->getFirstSelected() ? TRUE : FALSE); 3273bool LLDispatchSetEstateAccess::operator()(
3274 estate_manager_name_list->sortByColumnIndex(0, TRUE); 3274 const LLDispatcher* dispatcher,
3275 } 3275 const std::string& key,
3276 } 3276 const LLUUID& invoice,
3277 3277 const sparam_t& strings)
3278 return true; 3278{
3279} 3279 LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
3280 3280 if (!panel) return true;
3281// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) 3281
3282void LLFloaterRegionInfo::open() 3282 S32 index = 1; // skip estate_id
3283{ 3283 U32 access_flags = strtoul(strings[index++].c_str(), NULL,10);
3284 // We'll allow access to the estate tools for estate managers (and for the sim owner) 3284 S32 num_allowed_agents = strtol(strings[index++].c_str(), NULL, 10);
3285 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) 3285 S32 num_allowed_groups = strtol(strings[index++].c_str(), NULL, 10);
3286 { 3286 S32 num_banned_agents = strtol(strings[index++].c_str(), NULL, 10);
3287 LLViewerRegion* pRegion = gAgent.getRegion(); 3287 S32 num_estate_managers = strtol(strings[index++].c_str(), NULL, 10);
3288 if (!pRegion) 3288
3289 return; 3289 // sanity ckecks
3290 3290 if (num_allowed_agents > 0
3291 // Should be able to call LLRegion::canManageEstate() but then we can fake god like 3291 && !(access_flags & ESTATE_ACCESS_ALLOWED_AGENTS))
3292 if ( (!pRegion->isEstateManager()) && (pRegion->getOwner() != gAgent.getID()) ) 3292 {
3293 return; 3293 llwarns << "non-zero count for allowed agents, but no corresponding flag" << llendl;
3294 } 3294 }
3295 3295 if (num_allowed_groups > 0
3296 LLFloater::open(); 3296 && !(access_flags & ESTATE_ACCESS_ALLOWED_GROUPS))
3297} 3297 {
3298// [/RLVa:KB] 3298 llwarns << "non-zero count for allowed groups, but no corresponding flag" << llendl;
3299 }
3300 if (num_banned_agents > 0
3301 && !(access_flags & ESTATE_ACCESS_BANNED_AGENTS))
3302 {
3303 llwarns << "non-zero count for banned agents, but no corresponding flag" << llendl;
3304 }
3305 if (num_estate_managers > 0
3306 && !(access_flags & ESTATE_ACCESS_MANAGERS))
3307 {
3308 llwarns << "non-zero count for managers, but no corresponding flag" << llendl;
3309 }
3310
3311 // grab the UUID's out of the string fields
3312 if (access_flags & ESTATE_ACCESS_ALLOWED_AGENTS)
3313 {
3314 LLNameListCtrl* allowed_agent_name_list;
3315 allowed_agent_name_list = panel->getChild<LLNameListCtrl>("allowed_avatar_name_list");
3316
3317 int totalAllowedAgents = num_allowed_agents;
3318
3319 if (allowed_agent_name_list)
3320 {
3321 totalAllowedAgents += allowed_agent_name_list->getItemCount();
3322 }
3323
3324 std::string msg = llformat("Allowed residents: (%d, max %d)",
3325 totalAllowedAgents,
3326 ESTATE_MAX_ACCESS_IDS);
3327 panel->childSetValue("allow_resident_label", LLSD(msg));
3328
3329 if (allowed_agent_name_list)
3330 {
3331 //allowed_agent_name_list->deleteAllItems();
3332 for (S32 i = 0; i < num_allowed_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
3333 {
3334 LLUUID id;
3335 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3336 allowed_agent_name_list->addNameItem(id);
3337 }
3338 panel->childSetEnabled("remove_allowed_avatar_btn", allowed_agent_name_list->getFirstSelected() ? TRUE : FALSE);
3339 allowed_agent_name_list->sortByColumnIndex(0, TRUE);
3340 }
3341 }
3342
3343 if (access_flags & ESTATE_ACCESS_ALLOWED_GROUPS)
3344 {
3345 LLNameListCtrl* allowed_group_name_list;
3346 allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
3347
3348 std::string msg = llformat("Allowed groups: (%d, max %d)",
3349 num_allowed_groups,
3350 (S32) ESTATE_MAX_GROUP_IDS);
3351 panel->childSetValue("allow_group_label", LLSD(msg));
3352
3353 if (allowed_group_name_list)
3354 {
3355 allowed_group_name_list->deleteAllItems();
3356 for (S32 i = 0; i < num_allowed_groups && i < ESTATE_MAX_GROUP_IDS; i++)
3357 {
3358 LLUUID id;
3359 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3360 allowed_group_name_list->addGroupNameItem(id);
3361 }
3362 panel->childSetEnabled("remove_allowed_group_btn", allowed_group_name_list->getFirstSelected() ? TRUE : FALSE);
3363 allowed_group_name_list->sortByColumnIndex(0, TRUE);
3364 }
3365 }
3366
3367 if (access_flags & ESTATE_ACCESS_BANNED_AGENTS)
3368 {
3369 LLNameListCtrl* banned_agent_name_list;
3370 banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list");
3371
3372 int totalBannedAgents = num_banned_agents;
3373
3374 if (banned_agent_name_list)
3375 {
3376 totalBannedAgents += banned_agent_name_list->getItemCount();
3377 }
3378
3379
3380 std::string msg = llformat("Banned residents: (%d, max %d)",
3381 totalBannedAgents,
3382 ESTATE_MAX_ACCESS_IDS);
3383 panel->childSetValue("ban_resident_label", LLSD(msg));
3384
3385 if (banned_agent_name_list)
3386 {
3387 //banned_agent_name_list->deleteAllItems();
3388 for (S32 i = 0; i < num_banned_agents && i < ESTATE_MAX_ACCESS_IDS; i++)
3389 {
3390 LLUUID id;
3391 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3392 banned_agent_name_list->addNameItem(id);
3393 }
3394 panel->childSetEnabled("remove_banned_avatar_btn", banned_agent_name_list->getFirstSelected() ? TRUE : FALSE);
3395 banned_agent_name_list->sortByColumnIndex(0, TRUE);
3396 }
3397 }
3398
3399 if (access_flags & ESTATE_ACCESS_MANAGERS)
3400 {
3401 std::string msg = llformat("Estate Managers: (%d, max %d)",
3402 num_estate_managers,
3403 ESTATE_MAX_MANAGERS);
3404 panel->childSetValue("estate_manager_label", LLSD(msg));
3405
3406 LLNameListCtrl* estate_manager_name_list =
3407 panel->getChild<LLNameListCtrl>("estate_manager_name_list");
3408 if (estate_manager_name_list)
3409 {
3410 estate_manager_name_list->deleteAllItems(); // Clear existing entries
3411
3412 // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't
3413 // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused,
3414 // and they can still remove them.
3415 for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++)
3416 {
3417 LLUUID id;
3418 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
3419 estate_manager_name_list->addNameItem(id);
3420 }
3421 panel->childSetEnabled("remove_estate_manager_btn", estate_manager_name_list->getFirstSelected() ? TRUE : FALSE);
3422 estate_manager_name_list->sortByColumnIndex(0, TRUE);
3423 }
3424 }
3425
3426 return true;
3427}
3428
3429// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
3430void LLFloaterRegionInfo::open()
3431{
3432 // We'll allow access to the estate tools for estate managers (and for the sim owner)
3433 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
3434 {
3435 LLViewerRegion* pRegion = gAgent.getRegion();
3436 if (!pRegion)
3437 return;
3438
3439 // Should be able to call LLRegion::canManageEstate() but then we can fake god like
3440 if ( (!pRegion->isEstateManager()) && (pRegion->getOwner() != gAgent.getID()) )
3441 return;
3442 }
3443
3444 LLFloater::open();
3445}
3446// [/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 8d88601..f3a124a 100644
--- a/linden/indra/newview/llfloatertos.cpp
+++ b/linden/indra/newview/llfloatertos.cpp
@@ -1,279 +1,305 @@
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 LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("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 LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("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 web_browser->addObserver(this); 169 std::string token = "http://";
170 gResponsePtr = LLIamHereTOS::build( this ); 170 std::string::size_type iIndex = mMessage.rfind(token);
171 LLHTTPClient::head( getString( "real_url" ), gResponsePtr ); 171 //IF it has http:// in it, we use the web browser
172 } 172 if(iIndex != std::string::npos && mMessage.length() >= 2)
173 173 {
174 return TRUE; 174 // it exists
175} 175 use_web_browser = true;
176 176 }
177void LLFloaterTOS::setSiteIsAlive( bool alive ) 177 else if (gHippoGridManager->getConnectedGrid()->isSecondLife())
178{ 178 {
179 // only do this for TOS pages 179 //Its SL, use the browser for it as thats what it should do
180 if ( mType == TOS_TOS ) 180 use_web_browser = true;
181 { 181 }
182 LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); 182
183 // if the contents of the site was retrieved 183 if ( web_browser && use_web_browser)
184 if ( alive ) 184 {
185 { 185 // hide the SL text widget if we're displaying TOS with using a browser widget.
186 if ( web_browser ) 186 LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
187 { 187 editor->setVisible( FALSE );
188 // navigate to the "real" page 188
189 web_browser->navigateTo( getString( "real_url" ) ); 189 // disable Agree to TOS radio button until the page has fully loaded
190 }; 190 tos_agreement->setEnabled( false );
191 } 191
192 else 192 // Reenable the web browser
193 { 193 web_browser->setVisible( TRUE );
194 // normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads) 194
195 // but if the page is unavailable, we need to do this now 195 web_browser->addObserver(this);
196 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); 196 gResponsePtr = LLIamHereTOS::build( this );
197 tos_agreement->setEnabled( true ); 197 LLHTTPClient::head( getString( "real_url" ), gResponsePtr );
198 }; 198 }
199 }; 199
200} 200 return TRUE;
201 201}
202LLFloaterTOS::~LLFloaterTOS() 202
203{ 203void LLFloaterTOS::setSiteIsAlive( bool alive )
204 204{
205 // tell the responder we're not here anymore 205 // only do this for TOS pages
206 if ( gResponsePtr ) 206 if ( mType == TOS_TOS )
207 gResponsePtr->setParent( 0 ); 207 {
208 208 LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html");
209 LLFloaterTOS::sInstance = NULL; 209 // if the contents of the site was retrieved
210} 210 if ( alive )
211 211 {
212// virtual 212 if ( web_browser )
213void LLFloaterTOS::draw() 213 {
214{ 214 // navigate to the "real" page
215 // draw children 215 web_browser->navigateTo( getString( "real_url" ) );
216 LLModalDialog::draw(); 216 };
217} 217 }
218 218 else
219// static 219 {
220void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata ) 220 // normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads)
221{ 221 // but if the page is unavailable, we need to do this now
222 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 222 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
223 bool agree = self->childGetValue("agree_chk").asBoolean(); 223 tos_agreement->setEnabled( true );
224 self->childSetEnabled("Continue", agree); 224 };
225} 225 };
226 226}
227// static 227
228void LLFloaterTOS::onContinue( void* userdata ) 228LLFloaterTOS::~LLFloaterTOS()
229{ 229{
230 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 230
231 llinfos << "User agrees with TOS." << llendl; 231 // tell the responder we're not here anymore
232 if (self->mType == TOS_TOS) 232 if ( gResponsePtr )
233 { 233 gResponsePtr->setParent( 0 );
234 gAcceptTOS = TRUE; 234
235 } 235 LLFloaterTOS::sInstance = NULL;
236 else 236}
237 { 237
238 gAcceptCriticalMessage = TRUE; 238// virtual
239 } 239void LLFloaterTOS::draw()
240 240{
241 // Testing TOS dialog 241 // draw children
242 #if ! LL_RELEASE_FOR_DOWNLOAD 242 LLModalDialog::draw();
243 if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT ) 243}
244 { 244
245 LLStartUp::setStartupState( STATE_LOGIN_SHOW ); 245// static
246 } 246void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata )
247 else 247{
248 #endif 248 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
249 249 bool agree = self->childGetValue("agree_chk").asBoolean();
250 LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication 250 self->childSetEnabled("Continue", agree);
251 self->close(); // destroys this object 251}
252} 252
253 253// static
254// static 254void LLFloaterTOS::onContinue( void* userdata )
255void LLFloaterTOS::onCancel( void* userdata ) 255{
256{ 256 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
257 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 257 llinfos << "User agrees with TOS." << llendl;
258 llinfos << "User disagrees with TOS." << llendl; 258 if (self->mType == TOS_TOS)
259 LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done); 259 {
260 LLStartUp::setStartupState( STATE_LOGIN_SHOW ); 260 gAcceptTOS = TRUE;
261 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS 261 }
262 self->close(); // destroys this object 262 else
263} 263 {
264 264 gAcceptCriticalMessage = TRUE;
265//virtual 265 }
266void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) 266
267{ 267 // Testing TOS dialog
268 if(event == MEDIA_EVENT_NAVIGATE_COMPLETE) 268 #if ! LL_RELEASE_FOR_DOWNLOAD
269 { 269 if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT )
270 // skip past the loading screen navigate complete 270 {
271 if ( ++mLoadCompleteCount == 2 ) 271 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
272 { 272 }
273 llinfos << "NAVIGATE COMPLETE" << llendl; 273 else
274 // enable Agree to TOS radio button now that page has loaded 274 #endif
275 LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); 275
276 tos_agreement->setEnabled( true ); 276 LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
277 } 277 self->close(); // destroys this object
278 } 278}
279} 279
280// static
281void LLFloaterTOS::onCancel( void* userdata )
282{
283 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
284 llinfos << "User disagrees with TOS." << llendl;
285 LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
286 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
287 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
288 self->close(); // destroys this object
289}
290
291//virtual
292void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event)
293{
294 if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
295 {
296 // skip past the loading screen navigate complete
297 if ( ++mLoadCompleteCount == 2 )
298 {
299 llinfos << "NAVIGATE COMPLETE" << llendl;
300 // enable Agree to TOS radio button now that page has loaded
301 LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
302 tos_agreement->setEnabled( true );
303 }
304 }
305}
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 56a1c67..0d53e82 100644
--- a/linden/indra/newview/llselectmgr.cpp
+++ b/linden/indra/newview/llselectmgr.cpp
@@ -1864,7 +1864,7 @@ BOOL LLSelectMgr::selectionAllPCode(LLPCode code)
1864 f(const LLPCode& t) : mCode(t) {} 1864 f(const LLPCode& t) : mCode(t) {}
1865 virtual bool apply(LLViewerObject* object) 1865 virtual bool apply(LLViewerObject* object)
1866 { 1866 {
1867 if (object->getPCode() != mCode) 1867 if (object->getPCode() != mCode && !gSavedSettings.getBOOL("AllowEditingOfTrees"))
1868 { 1868 {
1869 return FALSE; 1869 return FALSE;
1870 } 1870 }
diff --git a/linden/indra/newview/llsurface.cpp b/linden/indra/newview/llsurface.cpp
index 578b565..aaafe0d 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
@@ -296,7 +297,7 @@ void LLSurface::initTextures()
296 // 297 //
297 // Water texture 298 // Water texture
298 // 299 //
299 if (gSavedSettings.getBOOL("RenderWater") ) 300 if (gSavedSettings.getBOOL("RenderWater") && gHippoLimits->mRenderWater)
300 { 301 {
301 createWaterTexture(); 302 createWaterTexture();
302 mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp); 303 mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
@@ -307,6 +308,29 @@ void LLSurface::initTextures()
307 } 308 }
308} 309}
309 310
311//static
312void LLSurface::rebuildWater()
313{
314 //lldebugs << "Rebuilding Water...";
315 if(!mWaterObjp.isNull())
316 {
317 //lldebugs << "Removing Water";
318 //Remove the old
319 gObjectList.killObject(mWaterObjp);
320 }
321
322 if (gSavedSettings.getBOOL("RenderWater") && gHippoLimits->mRenderWater)
323 {
324 //lldebugs << "Building Water";
325 createWaterTexture();
326 mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
327 gPipeline.createObject(mWaterObjp);
328 LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
329 water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
330 mWaterObjp->setPositionGlobal(water_pos_global);
331 }
332 //lldebugs << "Rebuilding Water Complete";
333}
310 334
311void LLSurface::setOriginGlobal(const LLVector3d &origin_global) 335void LLSurface::setOriginGlobal(const LLVector3d &origin_global)
312{ 336{
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/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 308a19d..ace0bcb 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -120,6 +120,8 @@
120#include "llfloaterland.h" 120#include "llfloaterland.h"
121#include "llfloaterlandholdings.h" 121#include "llfloaterlandholdings.h"
122#include "llfloatermap.h" 122#include "llfloatermap.h"
123#include "llfloatermessagebuilder.h"
124#include "llfloatermessagelog.h"
123#include "llfloatermute.h" 125#include "llfloatermute.h"
124#include "llfloateropenobject.h" 126#include "llfloateropenobject.h"
125#include "llfloaterpermissionsmgr.h" 127#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",
@@ -3289,6 +3298,16 @@ void process_grant_godlike_powers(LLMessageSystem* msg, void**)
3289 } 3298 }
3290} 3299}
3291 3300
3301
3302void handle_open_message_log(void*)
3303{
3304 LLFloaterMessageLog::show();
3305}
3306
3307void handle_open_message_builder(void*)
3308{
3309 LLFloaterMessageBuilder::show("");
3310}
3292/* 3311/*
3293class LLHaveCallingcard : public LLInventoryCollectFunctor 3312class LLHaveCallingcard : public LLInventoryCollectFunctor
3294{ 3313{
@@ -8676,6 +8695,30 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t
8676 8695
8677 8696
8678 8697
8698/////////////////////////
8699// MESSAGE LOG/BUILDER //
8700/////////////////////////
8701
8702
8703class LLMessageLogBuilder : public view_listener_t
8704{
8705 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8706 {
8707 std::string info_type = userdata.asString();
8708 if ("MessageLog" == info_type)
8709 {
8710 handle_open_message_log(NULL);
8711 }
8712 else if ("MessageBuilder" == info_type)
8713 {
8714 handle_open_message_builder(NULL);
8715 }
8716 return true;
8717 }
8718};
8719
8720
8721
8679/////////////////////////////// 8722///////////////////////////////
8680// RELOAD SETTINGS OVERRIDES // 8723// RELOAD SETTINGS OVERRIDES //
8681/////////////////////////////// 8724///////////////////////////////
@@ -11264,6 +11307,8 @@ void initialize_menus()
11264 addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole"); 11307 addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole");
11265 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); 11308 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole");
11266 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); 11309 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole");
11310 addMenu(new LLMessageLogBuilder(), "Advanced.MessageLog");
11311 addMenu(new LLMessageLogBuilder(), "Advanced.MessageBuilder");
11267 addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); 11312 addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides");
11268 addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); 11313 addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit");
11269 addMenu(new LLAdvancedCheckSit(), "Advanced.CheckSit"); 11314 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 e6455f2..743e0d9 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 77796e2..d93c425 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,10 @@ 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 // Aurora settings -- MC
1426 capabilityNames.append("DispatchOpenRegionSettings");
1419 capabilityNames.append("DispatchRegionInfo"); 1427 capabilityNames.append("DispatchRegionInfo");
1428 capabilityNames.append("DispatchWindLightSettings");
1420 capabilityNames.append("EstateChangeInfo"); 1429 capabilityNames.append("EstateChangeInfo");
1421 capabilityNames.append("EventQueueGet"); 1430 capabilityNames.append("EventQueueGet");
1422 capabilityNames.append("FetchInventory"); 1431 capabilityNames.append("FetchInventory");
@@ -1436,6 +1445,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
1436 capabilityNames.append("ProvisionVoiceAccountRequest"); 1445 capabilityNames.append("ProvisionVoiceAccountRequest");
1437 capabilityNames.append("RemoteParcelRequest"); 1446 capabilityNames.append("RemoteParcelRequest");
1438 capabilityNames.append("RequestTextureDownload"); 1447 capabilityNames.append("RequestTextureDownload");
1448 capabilityNames.append("RetrieveWindLightSettings");
1439 capabilityNames.append("SearchStatRequest"); 1449 capabilityNames.append("SearchStatRequest");
1440 capabilityNames.append("SearchStatTracking"); 1450 capabilityNames.append("SearchStatTracking");
1441 capabilityNames.append("SendPostcard"); 1451 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 f039ade..c4a4dee 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -95,7 +95,7 @@
95#include "boost/lexical_cast.hpp" 95#include "boost/lexical_cast.hpp"
96#endif 96#endif
97#include "hippoLimits.h"// getMaxPrimScale 97#include "hippoLimits.h"// getMaxPrimScale
98 98#include "llstartup.h"
99// [RLVa:KB] 99// [RLVa:KB]
100#include "rlvhandler.h" 100#include "rlvhandler.h"
101// [/RLVa:KB] 101// [/RLVa:KB]
@@ -3667,7 +3667,6 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
3667 } 3667 }
3668// [/RLVa:KB] 3668// [/RLVa:KB]
3669 3669
3670
3671 BOOL need_comma = FALSE; 3670 BOOL need_comma = FALSE;
3672 3671
3673 static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true); 3672 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 077d812..9da0da0 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_message_builder.xml b/linden/indra/newview/skins/default/xui/en-us/floater_message_builder.xml
new file mode 100644
index 0000000..c7c49d8
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_message_builder.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="Message Builder" title="Message Builder" width="400" min_width="400" height="600" min_height="600" can_close="true" can_resize="true" can_minimize="true">
3 <scroll_list column_padding="0" draw_heading="false" follows="left|top|right" left="10" top="-25"
4 name="net_list" search_column="0" right="-10" bottom="450">
5 <column dynamicwidth="true" name="text" label="text" />
6 <column name="state" label="state" width="24" />
7 </scroll_list>
8 <combo_box name="untrusted_message_combo" allow_text_entry="false" follows="left|top" left="10" top="-150" right="-370" bottom="433" tool_tip="No trust">
9 </combo_box>
10 <combo_box name="trusted_message_combo" allow_text_entry="false" follows="left|top" left="30" top="-150" right="-350" bottom="433" tool_tip="Trust">
11 </combo_box>
12 <text_editor name="message_edit" follows="left|top|right|bottom" left="10" top="-168" bottom="30" right="-10" max_length="65535">
13 </text_editor>
14 <button name="send_btn" follows="right|bottom" left="310" top="-570" right="-10" bottom="10" label="Send" tool_tip="Send (Ctrl+Enter)"/>
15</floater>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_message_log.xml b/linden/indra/newview/skins/default/xui/en-us/floater_message_log.xml
new file mode 100644
index 0000000..e1ebfe2
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_message_log.xml
@@ -0,0 +1,31 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="Message Log" title="Message Log" width="400" min_width="400" height="600" min_height="600" can_close="true" can_resize="true" can_minimize="true">
3 <scroll_list column_padding="0" draw_heading="false" follows="left|top|right" left="10" top="-25"
4 name="net_list" search_column="0" right="-10" bottom="450">
5 <column dynamicwidth="true" name="text" label="text" />
6 <column name="icon0" label="icon0" width="24" />
7 <column name="icon1" label="icon1" width="24" />
8 </scroll_list>
9 <button name="filter_choice_btn" follows="left|top" left="10" top="-150" right="-370" bottom="430" label="…"/>
10 <line_editor name="filter_edit" follows="left|top|right" left="30" top="-149" right="-28" bottom="430" max_length="65535"/>
11 <button name="filter_apply_btn" follows="top|right" left="370" top="-150" right="-9" bottom="430" label="✔"/>
12 <button name="clear_log_btn" follows="top|right" left="370" top="-170" right="-9" bottom="410" label="C"/>
13 <scroll_list column_padding="0" draw_heading="false" follows="left|top|right" left="10" top="-190"
14 name="message_log" search_column="0" right="-10" bottom="200">
15 <column name="sequence" label="sequence" width="48"/>
16 <column name="type" label="type" width="32"/>
17 <column name="direction" label="direction" width="32"/>
18 <column name="net" label="net" width="100"/>
19 <column name="name" label="name" width="128"/>
20 <!--<column name="flag_zer" label="zer" width="8"/>
21 <column name="flag_rel" label="rel" width="8"/>
22 <column name="flag_rsd" label="rsd" width="8"/>
23 <column name="flag_ack" label="ack" width="8"/>-->
24 <column name="summary" label="summary" dynamicwidth="true"/>
25 </scroll_list>
26 <text name="log_status_text" follows="left|top|right" left="10" top="-172" right="-10" height="20">
27 </text>
28 <text_editor name="net_info" follows="left|top|right|bottom" left="10" top="-400" bottom="30" right="-10" enabled="false" max_length="65535">
29 </text_editor>
30 <button name="send_to_message_builder_btn" follows="right|bottom" left="210" top="-570" right="-10" bottom="10" label="Send to Message Builder" enabled="false"/>
31</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 9c265d2..b8f3fcb 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 d3ce9f2..f1892fc 100755
--- a/linden/indra/newview/viewer_manifest.py
+++ b/linden/indra/newview/viewer_manifest.py
@@ -867,7 +867,6 @@ class LinuxManifest(ViewerManifest):
867 self.path("wrapper.sh","imprudence") 867 self.path("wrapper.sh","imprudence")
868 self.path("handle_secondlifeprotocol.sh") 868 self.path("handle_secondlifeprotocol.sh")
869 self.path("register_secondlifeprotocol.sh") 869 self.path("register_secondlifeprotocol.sh")
870 self.path("getvoice.sh")
871 self.end_prefix("linux_tools") 870 self.end_prefix("linux_tools")
872 871
873 self.gather_documents() 872 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