aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/doc/contributions.txt3
-rw-r--r--linden/indra/cmake/CopyWinLibs.cmake8
-rw-r--r--linden/indra/cmake/GStreamer.cmake1
-rw-r--r--linden/indra/cmake/OPENAL.cmake3
-rw-r--r--linden/indra/llui/llclipboard.cpp41
-rw-r--r--linden/indra/llui/llclipboard.h11
-rw-r--r--linden/indra/llui/llfloater.cpp6
-rw-r--r--linden/indra/llui/llfloater.h2
-rw-r--r--linden/indra/llui/lllineeditor.cpp83
-rw-r--r--linden/indra/llui/lllineeditor.h13
-rw-r--r--linden/indra/llui/llscrolllistctrl.cpp12
-rw-r--r--linden/indra/llui/llscrolllistctrl.h1
-rw-r--r--linden/indra/llui/lltexteditor.cpp91
-rw-r--r--linden/indra/llui/lltexteditor.h8
-rw-r--r--linden/indra/llui/llview.cpp78
-rw-r--r--linden/indra/llui/llview.h4
-rw-r--r--linden/indra/llwindow/CMakeLists.txt1
-rw-r--r--linden/indra/llwindow/llmousehandler.cpp59
-rw-r--r--linden/indra/llwindow/llmousehandler.h21
-rw-r--r--linden/indra/llwindow/llwindow.cpp16
-rw-r--r--linden/indra/llwindow/llwindow.h6
-rw-r--r--linden/indra/llwindow/llwindowsdl.cpp570
-rw-r--r--linden/indra/llwindow/llwindowsdl.h13
-rw-r--r--linden/indra/newview/CMakeLists.txt8
-rw-r--r--linden/indra/newview/app_settings/settings.xml24
-rw-r--r--linden/indra/newview/jcfloater_animation_list.cpp462
-rw-r--r--linden/indra/newview/jcfloater_animation_list.h88
-rw-r--r--linden/indra/newview/llagent.cpp30
-rw-r--r--linden/indra/newview/llagent.h7
-rw-r--r--linden/indra/newview/llappviewer.cpp7
-rw-r--r--linden/indra/newview/llchatbar.cpp43
-rw-r--r--linden/indra/newview/llchatbar.h5
-rw-r--r--linden/indra/newview/llfloaterassetbrowser.cpp466
-rw-r--r--linden/indra/newview/llfloaterassetbrowser.h84
-rw-r--r--linden/indra/newview/llfloaterchat.cpp31
-rw-r--r--linden/indra/newview/llfloaterchat.h2
-rw-r--r--linden/indra/newview/llfloatertelehub.cpp1
-rw-r--r--linden/indra/newview/llfloatertools.cpp90
-rw-r--r--linden/indra/newview/llfloatertools.h4
-rw-r--r--linden/indra/newview/llpanelpermissions.cpp65
-rw-r--r--linden/indra/newview/llpanelpermissions.h1
-rw-r--r--linden/indra/newview/llprefschat.cpp20
-rw-r--r--linden/indra/newview/llprefsim.cpp2
-rw-r--r--linden/indra/newview/llstartup.cpp4
-rw-r--r--linden/indra/newview/lltool.cpp15
-rw-r--r--linden/indra/newview/lltool.h3
-rw-r--r--linden/indra/newview/lltoolbrush.cpp45
-rw-r--r--linden/indra/newview/lltoolbrush.h5
-rw-r--r--linden/indra/newview/lltoolpie.cpp2
-rw-r--r--linden/indra/newview/llviewermenu.cpp169
-rw-r--r--linden/indra/newview/llviewertexteditor.cpp79
-rw-r--r--linden/indra/newview/llviewertexteditor.h2
-rw-r--r--linden/indra/newview/llviewerwindow.cpp479
-rw-r--r--linden/indra/newview/llviewerwindow.h9
-rw-r--r--linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.pngbin0 -> 10714 bytes
-rw-r--r--linden/indra/newview/skins/default/html/en-us/loading/loading.html2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml74
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml29
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_tools.xml197
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml12
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml19
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml16
-rw-r--r--linden/install.xml12
-rw-r--r--linden/scripts/messages/message_template.msg10
66 files changed, 2513 insertions, 1179 deletions
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index 9886640..a1c8624 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -61,11 +61,14 @@ Alissa Sabre
61 VWR-7168 61 VWR-7168
62 VWR-7087 62 VWR-7087
63 VWR-7086 63 VWR-7086
64 VWR-9190
64 VWR-10728 65 VWR-10728
65Angus Boyd 66Angus Boyd
66 VWR-592 67 VWR-592
67Argent Stonecutter 68Argent Stonecutter
68 VWR-68 69 VWR-68
70Armin Weatherwax
71 VWR-8436
69Asuka Neely 72Asuka Neely
70 VWR-3434 73 VWR-3434
71Balp Allen 74Balp Allen
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake
index e10b0da..3adba60 100644
--- a/linden/indra/cmake/CopyWinLibs.cmake
+++ b/linden/indra/cmake/CopyWinLibs.cmake
@@ -26,6 +26,7 @@ set(debug_files
26 windbgdlg.exe 26 windbgdlg.exe
27 iconv.dll 27 iconv.dll
28 libxml2.dll 28 libxml2.dll
29 libcairo-2.dll
29 libgio-2.0-0.dll 30 libgio-2.0-0.dll
30 libglib-2.0-0.dll 31 libglib-2.0-0.dll
31 libgmodule-2.0-0.dll 32 libgmodule-2.0-0.dll
@@ -55,6 +56,8 @@ set(debug_files
55 libgstsdp.dll 56 libgstsdp.dll
56 libgsttag.dll 57 libgsttag.dll
57 libgstvideo.dll 58 libgstvideo.dll
59 libjpeg.dll
60 libmp3lame-0.dll
58 libneon-27.dll 61 libneon-27.dll
59 libogg-0.dll 62 libogg-0.dll
60 liboil-0.3-0.dll 63 liboil-0.3-0.dll
@@ -66,6 +69,7 @@ set(debug_files
66 libvorbis-0.dll 69 libvorbis-0.dll
67 libvorbisenc-2.dll 70 libvorbisenc-2.dll
68 libxml2-2.dll 71 libxml2-2.dll
72 glew32.dll
69 xvidcore.dll 73 xvidcore.dll
70 zlib1.dll 74 zlib1.dll
71 ) 75 )
@@ -97,6 +101,7 @@ set(release_files
97 xul.dll 101 xul.dll
98 iconv.dll 102 iconv.dll
99 libxml2.dll 103 libxml2.dll
104 libcairo-2.dll
100 libgio-2.0-0.dll 105 libgio-2.0-0.dll
101 libglib-2.0-0.dll 106 libglib-2.0-0.dll
102 libgmodule-2.0-0.dll 107 libgmodule-2.0-0.dll
@@ -126,6 +131,8 @@ set(release_files
126 libgstsdp.dll 131 libgstsdp.dll
127 libgsttag.dll 132 libgsttag.dll
128 libgstvideo.dll 133 libgstvideo.dll
134 libjpeg.dll
135 libmp3lame-0.dll
129 libneon-27.dll 136 libneon-27.dll
130 libogg-0.dll 137 libogg-0.dll
131 liboil-0.3-0.dll 138 liboil-0.3-0.dll
@@ -137,6 +144,7 @@ set(release_files
137 libvorbis-0.dll 144 libvorbis-0.dll
138 libvorbisenc-2.dll 145 libvorbisenc-2.dll
139 libxml2-2.dll 146 libxml2-2.dll
147 glew32.dll
140 xvidcore.dll 148 xvidcore.dll
141 zlib1.dll 149 zlib1.dll
142 ) 150 )
diff --git a/linden/indra/cmake/GStreamer.cmake b/linden/indra/cmake/GStreamer.cmake
index 880233e..29896d0 100644
--- a/linden/indra/cmake/GStreamer.cmake
+++ b/linden/indra/cmake/GStreamer.cmake
@@ -11,6 +11,7 @@ if (WINDOWS)
11 11
12 use_prebuilt_binary(libxml) 12 use_prebuilt_binary(libxml)
13 use_prebuilt_binary(iconv) 13 use_prebuilt_binary(iconv)
14 use_prebuilt_binary(glib)
14 use_prebuilt_binary(gstreamer-plugins) 15 use_prebuilt_binary(gstreamer-plugins)
15 set(GSTREAMER_FOUND ON FORCE BOOL) 16 set(GSTREAMER_FOUND ON FORCE BOOL)
16 set(GSTREAMER_INCLUDE_DIRS 17 set(GSTREAMER_INCLUDE_DIRS
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake
index 94fa75d..ad26d4c 100644
--- a/linden/indra/cmake/OPENAL.cmake
+++ b/linden/indra/cmake/OPENAL.cmake
@@ -11,7 +11,8 @@ if (OPENAL)
11 # message(STATUS "Building with OpenAL audio support") 11 # message(STATUS "Building with OpenAL audio support")
12 12
13 # OPENAL_LIB 13 # OPENAL_LIB
14 14 use_prebuilt_binary(openal)
15
15 if (WINDOWS) 16 if (WINDOWS)
16 find_library(OPENAL_LIB 17 find_library(OPENAL_LIB
17 NAMES openal32 18 NAMES openal32
diff --git a/linden/indra/llui/llclipboard.cpp b/linden/indra/llui/llclipboard.cpp
index d5255e7..f33f3fa 100644
--- a/linden/indra/llui/llclipboard.cpp
+++ b/linden/indra/llui/llclipboard.cpp
@@ -92,3 +92,44 @@ BOOL LLClipboard::canPasteString() const
92{ 92{
93 return LLView::getWindow()->isClipboardTextAvailable(); 93 return LLView::getWindow()->isClipboardTextAvailable();
94} 94}
95
96
97void LLClipboard::copyFromPrimarySubstring(const LLWString &src, S32 pos, S32 len, const LLUUID& source_id )
98{
99 mSourceID = source_id;
100 mString = src.substr(pos, len);
101 LLView::getWindow()->copyTextToPrimary( mString );
102}
103
104
105const LLWString& LLClipboard::getPastePrimaryWString( LLUUID* source_id )
106{
107 if( mSourceID.notNull() )
108 {
109 LLWString temp_string;
110 LLView::getWindow()->pasteTextFromPrimary(temp_string);
111
112 if( temp_string != mString )
113 {
114 mSourceID.setNull();
115 mString = temp_string;
116 }
117 }
118 else
119 {
120 LLView::getWindow()->pasteTextFromPrimary(mString);
121 }
122
123 if( source_id )
124 {
125 *source_id = mSourceID;
126 }
127
128 return mString;
129}
130
131
132BOOL LLClipboard::canPastePrimaryString() const
133{
134 return LLView::getWindow()->isPrimaryTextAvailable();
135}
diff --git a/linden/indra/llui/llclipboard.h b/linden/indra/llui/llclipboard.h
index 706ed2a..7117f84 100644
--- a/linden/indra/llui/llclipboard.h
+++ b/linden/indra/llui/llclipboard.h
@@ -43,10 +43,19 @@ public:
43 LLClipboard(); 43 LLClipboard();
44 ~LLClipboard(); 44 ~LLClipboard();
45 45
46 /* We support two flavors of clipboard. The default is the explicitly
47 copy-and-pasted clipboard. The second is the so-called 'primary' clipboard
48 which is implicitly copied upon selection on platforms which expect this
49 (i.e. X11/Linux). */
50
46 void copyFromSubstring(const LLWString &copy_from, S32 pos, S32 len, const LLUUID& source_id = LLUUID::null ); 51 void copyFromSubstring(const LLWString &copy_from, S32 pos, S32 len, const LLUUID& source_id = LLUUID::null );
47 BOOL canPasteString() const; 52 BOOL canPasteString() const;
48 const LLWString& getPasteWString(LLUUID* source_id = NULL); 53 const LLWString& getPasteWString(LLUUID* source_id = NULL);
49 54
55 void copyFromPrimarySubstring(const LLWString &copy_from, S32 pos, S32 len, const LLUUID& source_id = LLUUID::null );
56 BOOL canPastePrimaryString() const;
57 const LLWString& getPastePrimaryWString(LLUUID* source_id = NULL);
58
50private: 59private:
51 LLUUID mSourceID; 60 LLUUID mSourceID;
52 LLWString mString; 61 LLWString mString;
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index 2924c29..efe49eb 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -1187,6 +1187,12 @@ BOOL LLFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
1187 return was_minimized || LLPanel::handleRightMouseDown( x, y, mask ); 1187 return was_minimized || LLPanel::handleRightMouseDown( x, y, mask );
1188} 1188}
1189 1189
1190BOOL LLFloater::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
1191{
1192 bringToFront( x, y );
1193 return LLPanel::handleMiddleMouseDown( x, y, mask );
1194}
1195
1190 1196
1191// virtual 1197// virtual
1192BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask) 1198BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask)
diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h
index a6fe3cc..37081c2 100644
--- a/linden/indra/llui/llfloater.h
+++ b/linden/indra/llui/llfloater.h
@@ -178,7 +178,7 @@ public:
178 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); 178 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
179 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); 179 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
180 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); 180 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
181 181 virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
182 virtual void draw(); 182 virtual void draw();
183 183
184 virtual void onOpen() {} 184 virtual void onOpen() {}
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index 498ef26..f905774 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -493,6 +493,9 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
493 // delay cursor flashing 493 // delay cursor flashing
494 mKeystrokeTimer.reset(); 494 mKeystrokeTimer.reset();
495 495
496 // take selection to 'primary' clipboard
497 updatePrimary();
498
496 return TRUE; 499 return TRUE;
497} 500}
498 501
@@ -575,6 +578,17 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
575 return TRUE; 578 return TRUE;
576} 579}
577 580
581BOOL LLLineEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
582{
583 // llinfos << "MiddleMouseDown" << llendl;
584 setFocus( TRUE );
585 if( canPastePrimary() )
586 {
587 setCursorAtLocalPos(x);
588 pastePrimary();
589 }
590 return TRUE;
591}
578 592
579BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask) 593BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
580{ 594{
@@ -669,6 +683,9 @@ BOOL LLLineEditor::handleMouseUp(S32 x, S32 y, MASK mask)
669 { 683 {
670 // delay cursor flashing 684 // delay cursor flashing
671 mKeystrokeTimer.reset(); 685 mKeystrokeTimer.reset();
686
687 // take selection to 'primary' clipboard
688 updatePrimary();
672 } 689 }
673 690
674 return handled; 691 return handled;
@@ -872,7 +889,12 @@ BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask)
872 } 889 }
873 } 890 }
874 891
875 892 if(handled)
893 {
894 // take selection to 'primary' clipboard
895 updatePrimary();
896 }
897
876 return handled; 898 return handled;
877} 899}
878 900
@@ -945,20 +967,42 @@ BOOL LLLineEditor::canPaste() const
945 return !mReadOnly && gClipboard.canPasteString(); 967 return !mReadOnly && gClipboard.canPasteString();
946} 968}
947 969
948
949// paste from clipboard
950void LLLineEditor::paste() 970void LLLineEditor::paste()
951{ 971{
952 if (canPaste()) 972 bool is_primary = false;
973 pasteHelper(is_primary);
974}
975
976void LLLineEditor::pastePrimary()
977{
978 bool is_primary = true;
979 pasteHelper(is_primary);
980}
981
982// paste from primary (is_primary==true) or clipboard (is_primary==false)
983void LLLineEditor::pasteHelper(bool is_primary)
984{
985 bool can_paste_it;
986 if (is_primary)
987 can_paste_it = canPastePrimary();
988 else
989 can_paste_it = canPaste();
990
991 if (can_paste_it)
953 { 992 {
954 LLWString paste = gClipboard.getPasteWString(); 993 LLWString paste;
994 if (is_primary)
995 paste = gClipboard.getPastePrimaryWString();
996 else
997 paste = gClipboard.getPasteWString();
998
955 if (!paste.empty()) 999 if (!paste.empty())
956 { 1000 {
957 // Prepare for possible rollback 1001 // Prepare for possible rollback
958 LLLineEditorRollback rollback(this); 1002 LLLineEditorRollback rollback(this);
959 1003
960 // Delete any selected characters 1004 // Delete any selected characters
961 if (hasSelection()) 1005 if ((!is_primary) && hasSelection())
962 { 1006 {
963 deleteSelection(); 1007 deleteSelection();
964 } 1008 }
@@ -994,7 +1038,7 @@ void LLLineEditor::paste()
994 clean_string = clean_string.substr(0, wchars_that_fit); 1038 clean_string = clean_string.substr(0, wchars_that_fit);
995 reportBadKeystroke(); 1039 reportBadKeystroke();
996 } 1040 }
997 1041
998 mText.insert(getCursor(), clean_string); 1042 mText.insert(getCursor(), clean_string);
999 setCursor( getCursor() + (S32)clean_string.length() ); 1043 setCursor( getCursor() + (S32)clean_string.length() );
1000 deselect(); 1044 deselect();
@@ -1015,7 +1059,30 @@ void LLLineEditor::paste()
1015 } 1059 }
1016} 1060}
1017 1061
1018 1062// copy selection to primary
1063void LLLineEditor::copyPrimary()
1064{
1065 if( canCopy() )
1066 {
1067 S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
1068 S32 length = abs( mSelectionStart - mSelectionEnd );
1069 gClipboard.copyFromPrimarySubstring( mText.getWString(), left_pos, length );
1070 }
1071}
1072
1073BOOL LLLineEditor::canPastePrimary() const
1074{
1075 return !mReadOnly && gClipboard.canPastePrimaryString();
1076}
1077
1078void LLLineEditor::updatePrimary()
1079{
1080 if(canCopy() )
1081 {
1082 copyPrimary();
1083 }
1084}
1085
1019BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) 1086BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
1020{ 1087{
1021 BOOL handled = FALSE; 1088 BOOL handled = FALSE;
diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h
index 11cbcd9..b11f8b9 100644
--- a/linden/indra/llui/lllineeditor.h
+++ b/linden/indra/llui/lllineeditor.h
@@ -89,6 +89,7 @@ public:
89 /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); 89 /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
90 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); 90 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
91 /*virtual*/ BOOL handleDoubleClick(S32 x,S32 y,MASK mask); 91 /*virtual*/ BOOL handleDoubleClick(S32 x,S32 y,MASK mask);
92 /*virtual*/ BOOL handleMiddleMouseDown(S32 x,S32 y,MASK mask);
92 /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); 93 /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask );
93 /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char); 94 /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char);
94 /*virtual*/ void onMouseCaptureLost(); 95 /*virtual*/ void onMouseCaptureLost();
@@ -96,13 +97,16 @@ public:
96 // LLEditMenuHandler overrides 97 // LLEditMenuHandler overrides
97 virtual void cut(); 98 virtual void cut();
98 virtual BOOL canCut() const; 99 virtual BOOL canCut() const;
99
100 virtual void copy(); 100 virtual void copy();
101 virtual BOOL canCopy() const; 101 virtual BOOL canCopy() const;
102
103 virtual void paste(); 102 virtual void paste();
104 virtual BOOL canPaste() const; 103 virtual BOOL canPaste() const;
105 104
105 virtual void updatePrimary();
106 virtual void copyPrimary();
107 virtual void pastePrimary();
108 virtual BOOL canPastePrimary() const;
109
106 virtual void doDelete(); 110 virtual void doDelete();
107 virtual BOOL canDoDelete() const; 111 virtual BOOL canDoDelete() const;
108 112
@@ -219,6 +223,9 @@ public:
219 223
220private: 224private:
221 // private helper methods 225 // private helper methods
226
227 void pasteHelper(bool is_primary);
228
222 void removeChar(); 229 void removeChar();
223 void addChar(const llwchar c); 230 void addChar(const llwchar c);
224 void setCursorAtLocalPos(S32 local_mouse_x); 231 void setCursorAtLocalPos(S32 local_mouse_x);
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp
index 7dba55f..c6da2d7 100644
--- a/linden/indra/llui/llscrolllistctrl.cpp
+++ b/linden/indra/llui/llscrolllistctrl.cpp
@@ -703,6 +703,18 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
703 return ret; 703 return ret;
704} 704}
705 705
706LLDynamicArray<LLUUID> LLScrollListCtrl::getSelectedIDs()
707{
708 LLUUID selected_id;
709 LLDynamicArray<LLUUID> ids;
710 std::vector<LLScrollListItem*> selected = this->getAllSelected();
711 for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
712 {
713 ids.push_back((*itr)->getUUID());
714 }
715 return ids;
716}
717
706S32 LLScrollListCtrl::getFirstSelectedIndex() const 718S32 LLScrollListCtrl::getFirstSelectedIndex() const
707{ 719{
708 S32 CurSelectedIndex = 0; 720 S32 CurSelectedIndex = 0;
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h
index f276562..73f9a5b 100644
--- a/linden/indra/llui/llscrolllistctrl.h
+++ b/linden/indra/llui/llscrolllistctrl.h
@@ -517,6 +517,7 @@ public:
517 LLScrollListItem* getFirstSelected() const; 517 LLScrollListItem* getFirstSelected() const;
518 virtual S32 getFirstSelectedIndex() const; 518 virtual S32 getFirstSelectedIndex() const;
519 std::vector<LLScrollListItem*> getAllSelected() const; 519 std::vector<LLScrollListItem*> getAllSelected() const;
520 LLDynamicArray<LLUUID> getSelectedIDs();
520 LLScrollListItem* getLastSelectedItem() const { return mLastSelected; } 521 LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
521 522
522 // iterate over all items 523 // iterate over all items
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index 3813e76..95cce60 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -1203,6 +1203,18 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
1203} 1203}
1204 1204
1205 1205
1206BOOL LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
1207{
1208 setFocus( TRUE );
1209 if( canPastePrimary() )
1210 {
1211 setCursorAtLocalPos( x, y, TRUE );
1212 pastePrimary();
1213 }
1214 return TRUE;
1215}
1216
1217
1206BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) 1218BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)
1207{ 1219{
1208 BOOL handled = FALSE; 1220 BOOL handled = FALSE;
@@ -1323,6 +1335,9 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
1323 1335
1324 setCursorAtLocalPos( x, y, TRUE ); 1336 setCursorAtLocalPos( x, y, TRUE );
1325 endSelection(); 1337 endSelection();
1338
1339 // take selection to primary clipboard
1340 updatePrimary();
1326 } 1341 }
1327 1342
1328 if( !hasSelection() ) 1343 if( !hasSelection() )
@@ -1330,6 +1345,9 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
1330 handleMouseUpOverSegment( x, y, mask ); 1345 handleMouseUpOverSegment( x, y, mask );
1331 } 1346 }
1332 1347
1348 // take selection to 'primary' clipboard
1349 updatePrimary();
1350
1333 handled = TRUE; 1351 handled = TRUE;
1334 } 1352 }
1335 1353
@@ -1392,8 +1410,12 @@ BOOL LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
1392 // delay cursor flashing 1410 // delay cursor flashing
1393 resetKeystrokeTimer(); 1411 resetKeystrokeTimer();
1394 1412
1413 // take selection to 'primary' clipboard
1414 updatePrimary();
1415
1395 handled = TRUE; 1416 handled = TRUE;
1396 } 1417 }
1418
1397 return handled; 1419 return handled;
1398} 1420}
1399 1421
@@ -1689,6 +1711,12 @@ BOOL LLTextEditor::handleSelectionKey(const KEY key, const MASK mask)
1689 } 1711 }
1690 } 1712 }
1691 1713
1714 if( handled )
1715 {
1716 // take selection to 'primary' clipboard
1717 updatePrimary();
1718 }
1719
1692 return handled; 1720 return handled;
1693} 1721}
1694 1722
@@ -1868,22 +1896,46 @@ BOOL LLTextEditor::canPaste() const
1868 return !mReadOnly && gClipboard.canPasteString(); 1896 return !mReadOnly && gClipboard.canPasteString();
1869} 1897}
1870 1898
1871
1872// paste from clipboard 1899// paste from clipboard
1873void LLTextEditor::paste() 1900void LLTextEditor::paste()
1874{ 1901{
1875 if (!canPaste()) 1902 bool is_primary = false;
1903 pasteHelper(is_primary);
1904}
1905
1906// paste from primary
1907void LLTextEditor::pastePrimary()
1908{
1909 bool is_primary = true;
1910 pasteHelper(is_primary);
1911}
1912
1913// paste from primary (itsprimary==true) or clipboard (itsprimary==false)
1914void LLTextEditor::pasteHelper(bool is_primary)
1915{
1916 bool can_paste_it;
1917 if (is_primary)
1918 can_paste_it = canPastePrimary();
1919 else
1920 can_paste_it = canPaste();
1921
1922 if (!can_paste_it)
1876 { 1923 {
1877 return; 1924 return;
1878 } 1925 }
1879 LLUUID source_id; 1926 LLUUID source_id;
1880 LLWString paste = gClipboard.getPasteWString(&source_id); 1927 LLWString paste;
1928 if (is_primary)
1929 paste = gClipboard.getPastePrimaryWString(&source_id);
1930 else
1931 paste = gClipboard.getPasteWString(&source_id);
1932
1881 if (paste.empty()) 1933 if (paste.empty())
1882 { 1934 {
1883 return; 1935 return;
1884 } 1936 }
1885 // Delete any selected characters (the paste replaces them) 1937 // Delete any selected characters (the paste replaces them)
1886 if( hasSelection() ) 1938 if( (!is_primary) && hasSelection() )
1887 { 1939 {
1888 deleteSelection(TRUE); 1940 deleteSelection(TRUE);
1889 } 1941 }
@@ -1917,6 +1969,32 @@ void LLTextEditor::paste()
1917} 1969}
1918 1970
1919 1971
1972
1973// copy selection to primary
1974void LLTextEditor::copyPrimary()
1975{
1976 if( !canCopy() )
1977 {
1978 return;
1979 }
1980 S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
1981 S32 length = abs( mSelectionStart - mSelectionEnd );
1982 gClipboard.copyFromPrimarySubstring(mWText, left_pos, length, mSourceID);
1983}
1984
1985BOOL LLTextEditor::canPastePrimary() const
1986{
1987 return !mReadOnly && gClipboard.canPastePrimaryString();
1988}
1989
1990void LLTextEditor::updatePrimary()
1991{
1992 if (canCopy())
1993 {
1994 copyPrimary();
1995 }
1996}
1997
1920BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask) 1998BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask)
1921{ 1999{
1922 BOOL handled = FALSE; 2000 BOOL handled = FALSE;
@@ -1992,6 +2070,11 @@ BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask)
1992 } 2070 }
1993 } 2071 }
1994 2072
2073 if (handled)
2074 {
2075 updatePrimary();
2076 }
2077
1995 return handled; 2078 return handled;
1996} 2079}
1997 2080
diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h
index 643b7c3..0777e5f 100644
--- a/linden/indra/llui/lltexteditor.h
+++ b/linden/indra/llui/lltexteditor.h
@@ -82,6 +82,8 @@ public:
82 virtual BOOL handleHover(S32 x, S32 y, MASK mask); 82 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
83 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); 83 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
84 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask ); 84 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask );
85 virtual BOOL handleMiddleMouseDown(S32 x,S32 y,MASK mask);
86
85 virtual BOOL handleKeyHere(KEY key, MASK mask ); 87 virtual BOOL handleKeyHere(KEY key, MASK mask );
86 virtual BOOL handleUnicodeCharHere(llwchar uni_char); 88 virtual BOOL handleUnicodeCharHere(llwchar uni_char);
87 89
@@ -117,6 +119,10 @@ public:
117 virtual BOOL canCopy() const; 119 virtual BOOL canCopy() const;
118 virtual void paste(); 120 virtual void paste();
119 virtual BOOL canPaste() const; 121 virtual BOOL canPaste() const;
122 virtual void updatePrimary();
123 virtual void copyPrimary();
124 virtual void pastePrimary();
125 virtual BOOL canPastePrimary() const;
120 virtual void doDelete(); 126 virtual void doDelete();
121 virtual BOOL canDoDelete() const; 127 virtual BOOL canDoDelete() const;
122 virtual void selectAll(); 128 virtual void selectAll();
@@ -425,6 +431,8 @@ private:
425 // 431 //
426 // Methods 432 // Methods
427 // 433 //
434 void pasteHelper(bool is_primary);
435
428 void updateSegments(); 436 void updateSegments();
429 void pruneSegments(); 437 void pruneSegments();
430 438
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp
index 9cdf481..78bf168 100644
--- a/linden/indra/llui/llview.cpp
+++ b/linden/indra/llui/llview.cpp
@@ -981,6 +981,30 @@ BOOL LLView::handleRightMouseUp(S32 x, S32 y, MASK mask)
981 } 981 }
982 return handled; 982 return handled;
983} 983}
984
985BOOL LLView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
986{
987 LLView* handled_view = childrenHandleMiddleMouseDown( x, y, mask );
988 BOOL handled = (handled_view != NULL);
989 if( !handled && blockMouseEvent(x, y) )
990 {
991 handled = TRUE;
992 handled_view = this;
993 }
994
995 return handled;
996}
997
998BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
999{
1000 BOOL handled = childrenHandleMiddleMouseUp( x, y, mask ) != NULL;
1001 if( !handled && blockMouseEvent(x, y) )
1002 {
1003 handled = TRUE;
1004 }
1005 return handled;
1006}
1007
984 1008
985LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks) 1009LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks)
986{ 1010{
@@ -1142,6 +1166,34 @@ LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask)
1142 return handled_view; 1166 return handled_view;
1143} 1167}
1144 1168
1169LLView* LLView::childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask)
1170{
1171 LLView* handled_view = NULL;
1172
1173 if (getVisible() && getEnabled() )
1174 {
1175 for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
1176 {
1177 LLView* viewp = *child_it;
1178 S32 local_x = x - viewp->getRect().mLeft;
1179 S32 local_y = y - viewp->getRect().mBottom;
1180 if (viewp->pointInView(local_x, local_y) &&
1181 viewp->getVisible() &&
1182 viewp->getEnabled() &&
1183 viewp->handleMiddleMouseDown( local_x, local_y, mask ))
1184 {
1185 if (sDebugMouseHandling)
1186 {
1187 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1188 }
1189 handled_view = viewp;
1190 break;
1191 }
1192 }
1193 }
1194 return handled_view;
1195}
1196
1145LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask) 1197LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask)
1146{ 1198{
1147 LLView* handled_view = NULL; 1199 LLView* handled_view = NULL;
@@ -1227,6 +1279,32 @@ LLView* LLView::childrenHandleRightMouseUp(S32 x, S32 y, MASK mask)
1227 return handled_view; 1279 return handled_view;
1228} 1280}
1229 1281
1282LLView* LLView::childrenHandleMiddleMouseUp(S32 x, S32 y, MASK mask)
1283{
1284 LLView* handled_view = NULL;
1285 if( getVisible() && getEnabled() )
1286 {
1287 for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
1288 {
1289 LLView* viewp = *child_it;
1290 S32 local_x = x - viewp->getRect().mLeft;
1291 S32 local_y = y - viewp->getRect().mBottom;
1292 if (viewp->pointInView(local_x, local_y) &&
1293 viewp->getVisible() &&
1294 viewp->getEnabled() &&
1295 viewp->handleMiddleMouseUp( local_x, local_y, mask ))
1296 {
1297 if (sDebugMouseHandling)
1298 {
1299 sMouseHandlerMessage = std::string("->") + viewp->mName + sMouseHandlerMessage;
1300 }
1301 handled_view = viewp;
1302 break;
1303 }
1304 }
1305 }
1306 return handled_view;
1307}
1230 1308
1231void LLView::draw() 1309void LLView::draw()
1232{ 1310{
diff --git a/linden/indra/llui/llview.h b/linden/indra/llui/llview.h
index 80dd348..da7f164 100644
--- a/linden/indra/llui/llview.h
+++ b/linden/indra/llui/llview.h
@@ -463,6 +463,8 @@ public:
463 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); 463 /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
464 /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); 464 /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
465 /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); 465 /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
466 /*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
467 /*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
466 /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); 468 /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
467 /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); 469 /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
468 /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); 470 /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
@@ -596,6 +598,8 @@ protected:
596 LLView* childrenHandleHover(S32 x, S32 y, MASK mask); 598 LLView* childrenHandleHover(S32 x, S32 y, MASK mask);
597 LLView* childrenHandleMouseUp(S32 x, S32 y, MASK mask); 599 LLView* childrenHandleMouseUp(S32 x, S32 y, MASK mask);
598 LLView* childrenHandleMouseDown(S32 x, S32 y, MASK mask); 600 LLView* childrenHandleMouseDown(S32 x, S32 y, MASK mask);
601 LLView* childrenHandleMiddleMouseUp(S32 x, S32 y, MASK mask);
602 LLView* childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask);
599 LLView* childrenHandleDoubleClick(S32 x, S32 y, MASK mask); 603 LLView* childrenHandleDoubleClick(S32 x, S32 y, MASK mask);
600 LLView* childrenHandleScrollWheel(S32 x, S32 y, S32 clicks); 604 LLView* childrenHandleScrollWheel(S32 x, S32 y, S32 clicks);
601 LLView* childrenHandleRightMouseDown(S32 x, S32 y, MASK mask); 605 LLView* childrenHandleRightMouseDown(S32 x, S32 y, MASK mask);
diff --git a/linden/indra/llwindow/CMakeLists.txt b/linden/indra/llwindow/CMakeLists.txt
index 95e315f..afce0c0 100644
--- a/linden/indra/llwindow/CMakeLists.txt
+++ b/linden/indra/llwindow/CMakeLists.txt
@@ -46,6 +46,7 @@ set(llwindows_HEADER_FILES
46 46
47set(viewer_SOURCE_FILES 47set(viewer_SOURCE_FILES
48 llwindow.cpp 48 llwindow.cpp
49 llmousehandler.cpp
49 ) 50 )
50 51
51set(viewer_HEADER_FILES 52set(viewer_HEADER_FILES
diff --git a/linden/indra/llwindow/llmousehandler.cpp b/linden/indra/llwindow/llmousehandler.cpp
new file mode 100644
index 0000000..ae2f147
--- /dev/null
+++ b/linden/indra/llwindow/llmousehandler.cpp
@@ -0,0 +1,59 @@
1/**
2 * @file llmousehandler.cpp
3 * @brief LLMouseHandler class implementation
4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 *
7 * Copyright (c) 2001-2007, 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://secondlife.com/developers/opensource/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 http://secondlife.com/developers/opensource/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */
31
32#include "llmousehandler.h"
33
34//virtual
35BOOL LLMouseHandler::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
36{
37 BOOL handled = FALSE;
38 if (down)
39 {
40 switch (clicktype)
41 {
42 case CLICK_LEFT: handled = handleMouseDown(x, y, mask); break;
43 case CLICK_RIGHT: handled = handleRightMouseDown(x, y, mask); break;
44 case CLICK_MIDDLE: handled = handleMiddleMouseDown(x, y, mask); break;
45 case CLICK_DOUBLELEFT: handled = handleDoubleClick(x, y, mask); break;
46 }
47 }
48 else
49 {
50 switch (clicktype)
51 {
52 case CLICK_LEFT: handled = handleMouseUp(x, y, mask); break;
53 case CLICK_RIGHT: handled = handleRightMouseUp(x, y, mask); break;
54 case CLICK_MIDDLE: handled = handleMiddleMouseUp(x, y, mask); break;
55 case CLICK_DOUBLELEFT: handled = handleDoubleClick(x, y, mask); break;
56 }
57 }
58 return handled;
59}
diff --git a/linden/indra/llwindow/llmousehandler.h b/linden/indra/llwindow/llmousehandler.h
index dba1fc1..45f837b 100644
--- a/linden/indra/llwindow/llmousehandler.h
+++ b/linden/indra/llwindow/llmousehandler.h
@@ -32,9 +32,10 @@
32#ifndef LL_MOUSEHANDLER_H 32#ifndef LL_MOUSEHANDLER_H
33#define LL_MOUSEHANDLER_H 33#define LL_MOUSEHANDLER_H
34 34
35#include "llstring.h" 35#include "linden_common.h"
36#include "llrect.h"
36 37
37// Abstract interface. 38// Mostly-abstract interface.
38// Intended for use via multiple inheritance. 39// Intended for use via multiple inheritance.
39// A class may have as many interfaces as it likes, but never needs to inherit one more than once. 40// A class may have as many interfaces as it likes, but never needs to inherit one more than once.
40 41
@@ -48,13 +49,23 @@ public:
48 SHOW_IF_NOT_BLOCKED, 49 SHOW_IF_NOT_BLOCKED,
49 SHOW_ALWAYS, 50 SHOW_ALWAYS,
50 } EShowToolTip; 51 } EShowToolTip;
52 typedef enum {
53 CLICK_LEFT,
54 CLICK_MIDDLE,
55 CLICK_RIGHT,
56 CLICK_DOUBLELEFT
57 } EClickType;
58 virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down);
51 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) = 0; 59 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) = 0;
52 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) = 0; 60 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) = 0;
53 virtual BOOL handleHover(S32 x, S32 y, MASK mask) = 0; 61 virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) = 0;
54 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) = 0; 62 virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) = 0;
55 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
56 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) = 0; 63 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) = 0;
57 virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) = 0; 64 virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) = 0;
65 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
66
67 virtual BOOL handleHover(S32 x, S32 y, MASK mask) = 0;
68 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) = 0;
58 virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) = 0; 69 virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) = 0;
59 virtual EShowToolTip getShowToolTip() { return SHOW_IF_NOT_BLOCKED; }; 70 virtual EShowToolTip getShowToolTip() { return SHOW_IF_NOT_BLOCKED; };
60 virtual const std::string& getName() const = 0; 71 virtual const std::string& getName() const = 0;
diff --git a/linden/indra/llwindow/llwindow.cpp b/linden/indra/llwindow/llwindow.cpp
index 44908fb..b4c8ff0 100644
--- a/linden/indra/llwindow/llwindow.cpp
+++ b/linden/indra/llwindow/llwindow.cpp
@@ -307,6 +307,22 @@ void *LLWindow::getMediaWindow()
307 return getPlatformWindow(); 307 return getPlatformWindow();
308} 308}
309 309
310//virtual
311BOOL LLWindow::isPrimaryTextAvailable()
312{
313 return FALSE; // no
314}
315//virtual
316BOOL LLWindow::pasteTextFromPrimary(LLWString &dst)
317{
318 return FALSE; // fail
319}
320// virtual
321BOOL LLWindow::copyTextToPrimary(const LLWString &src)
322{
323 return FALSE; // fail
324}
325
310// static 326// static
311std::string LLWindow::getFontListSans() 327std::string LLWindow::getFontListSans()
312{ 328{
diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h
index ffc117f..821de2f 100644
--- a/linden/indra/llwindow/llwindow.h
+++ b/linden/indra/llwindow/llwindow.h
@@ -184,9 +184,15 @@ public:
184 virtual void captureMouse() = 0; 184 virtual void captureMouse() = 0;
185 virtual void releaseMouse() = 0; 185 virtual void releaseMouse() = 0;
186 virtual void setMouseClipping( BOOL b ) = 0; 186 virtual void setMouseClipping( BOOL b ) = 0;
187
187 virtual BOOL isClipboardTextAvailable() = 0; 188 virtual BOOL isClipboardTextAvailable() = 0;
188 virtual BOOL pasteTextFromClipboard(LLWString &dst) = 0; 189 virtual BOOL pasteTextFromClipboard(LLWString &dst) = 0;
189 virtual BOOL copyTextToClipboard(const LLWString &src) = 0; 190 virtual BOOL copyTextToClipboard(const LLWString &src) = 0;
191
192 virtual BOOL isPrimaryTextAvailable();
193 virtual BOOL pasteTextFromPrimary(LLWString &dst);
194 virtual BOOL copyTextToPrimary(const LLWString &src);
195
190 virtual void flashIcon(F32 seconds) = 0; 196 virtual void flashIcon(F32 seconds) = 0;
191 virtual F32 getGamma() = 0; 197 virtual F32 getGamma() = 0;
192 virtual BOOL setGamma(const F32 gamma) = 0; // Set the gamma 198 virtual BOOL setGamma(const F32 gamma) = 0; // Set the gamma
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp
index 8111aaf..5209e6f 100644
--- a/linden/indra/llwindow/llwindowsdl.cpp
+++ b/linden/indra/llwindow/llwindowsdl.cpp
@@ -188,11 +188,12 @@ Display* LLWindowSDL::get_SDL_Display(void)
188 188
189 189
190LLWindowSDL::LLWindowSDL(const std::string& title, S32 x, S32 y, S32 width, 190LLWindowSDL::LLWindowSDL(const std::string& title, S32 x, S32 y, S32 width,
191 S32 height, U32 flags, 191 S32 height, U32 flags,
192 BOOL fullscreen, BOOL clearBg, 192 BOOL fullscreen, BOOL clearBg,
193 BOOL disable_vsync, BOOL use_gl, 193 BOOL disable_vsync, BOOL use_gl,
194 BOOL ignore_pixel_depth, U32 fsaa_samples) 194 BOOL ignore_pixel_depth, U32 fsaa_samples)
195 : LLWindow(fullscreen, flags), mGamma(1.0f) 195 : LLWindow(fullscreen, flags), Lock_Display(NULL),
196 Unlock_Display(NULL), mGamma(1.0f)
196{ 197{
197 // Initialize the keyboard 198 // Initialize the keyboard
198 gKeyboard = new LLKeyboardSDL(); 199 gKeyboard = new LLKeyboardSDL();
@@ -717,9 +718,33 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
717#endif 718#endif
718 719
719#if LL_X11 720#if LL_X11
720 init_x11clipboard(); 721 /* Grab the window manager specific information */
722 SDL_SysWMinfo info;
723 SDL_VERSION(&info.version);
724 if ( SDL_GetWMInfo(&info) )
725 {
726 /* Save the information for later use */
727 if ( info.subsystem == SDL_SYSWM_X11 )
728 {
729 mSDL_Display = info.info.x11.display;
730 mSDL_XWindowID = info.info.x11.wmwindow;
731 Lock_Display = info.info.x11.lock_func;
732 Unlock_Display = info.info.x11.unlock_func;
733 }
734 else
735 {
736 llwarns << "We're not running under X11? Wild."
737 << llendl;
738 }
739 }
740 else
741 {
742 llwarns << "We're not running under any known WM. Wild."
743 << llendl;
744 }
721#endif // LL_X11 745#endif // LL_X11
722 746
747
723 //make sure multisampling is disabled by default 748 //make sure multisampling is disabled by default
724 glDisable(GL_MULTISAMPLE_ARB); 749 glDisable(GL_MULTISAMPLE_ARB);
725 750
@@ -763,8 +788,12 @@ BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL
763void LLWindowSDL::destroyContext() 788void LLWindowSDL::destroyContext()
764{ 789{
765 llinfos << "destroyContext begins" << llendl; 790 llinfos << "destroyContext begins" << llendl;
791
766#if LL_X11 792#if LL_X11
767 quit_x11clipboard(); 793 mSDL_Display = NULL;
794 mSDL_XWindowID = None;
795 Lock_Display = NULL;
796 Unlock_Display = NULL;
768#endif // LL_X11 797#endif // LL_X11
769 798
770 // Clean up remaining GL state before blowing away window 799 // Clean up remaining GL state before blowing away window
@@ -1212,523 +1241,125 @@ void LLWindowSDL::flashIcon(F32 seconds)
1212#endif // LL_X11 1241#endif // LL_X11
1213} 1242}
1214 1243
1215#if LL_X11 1244#if LL_GTK
1216/* Lots of low-level X11 stuff to handle X11 copy-and-paste */ 1245BOOL LLWindowSDL::isClipboardTextAvailable()
1217
1218/* Our X11 clipboard support is a bit bizarre in various
1219 organically-grown ways. Ideally it should be fixed to do
1220 real string-type negotiation (this would make pasting to
1221 xterm faster and pasting to UTF-8 emacs work properly), but
1222 right now it has the rare and desirable trait of being
1223 generally stable and working. */
1224
1225typedef Atom x11clipboard_type;
1226
1227/* PRIMARY and CLIPBOARD are the two main kinds of
1228 X11 clipboard. A third are the CUT_BUFFERs which an
1229 obsolete holdover from X10 days and use a quite orthogonal
1230 mechanism. CLIPBOARD is the type whose design most
1231 closely matches SL's own win32-alike explicit copy-and-paste
1232 paradigm.
1233
1234 Pragmatically we support all three to varying degrees. When
1235 we paste into SL, it is strictly from CLIPBOARD. When we copy,
1236 we support (to as full an extent as the clipboard content type
1237 allows) CLIPBOARD, PRIMARY, and CUT_BUFFER0.
1238 */
1239static x11clipboard_type get_x11_readwrite_clipboard_type(void)
1240{
1241 return XInternAtom(LLWindowSDL::get_SDL_Display(), "CLIPBOARD", False);
1242}
1243
1244static x11clipboard_type get_x11_write_clipboard_type(void)
1245{
1246 return XA_PRIMARY;
1247}
1248
1249/* This is where our own private cutbuffer goes - we don't use
1250 a regular cutbuffer (XA_CUT_BUFFER0 etc) for intermediate
1251 storage because their use isn't really defined for holding UTF8. */
1252static x11clipboard_type get_x11_cutbuffer_clipboard_type(void)
1253{
1254 return XInternAtom(LLWindowSDL::get_SDL_Display(), "SECONDLIFE_CUTBUFFER", False);
1255}
1256
1257/* Some X11 atom-generators */
1258static Atom get_x11_targets_atom(void)
1259{
1260 return XInternAtom(LLWindowSDL::get_SDL_Display(), "TARGETS", False);
1261}
1262
1263static Atom get_x11_text_atom(void)
1264{
1265 return XInternAtom(LLWindowSDL::get_SDL_Display(), "TEXT", False);
1266}
1267
1268/* These defines, and convert_data/convert_x11clipboard,
1269 mostly exist to support non-text or unusually-encoded
1270 clipboard data, which we don't really have a need for at
1271 the moment. */
1272#define SDLCLIPTYPE(A, B, C, D) (int)(((A)<<24)|((B)<<16)|((C)<<8)|((D)<<0))
1273#define FORMAT_PREFIX "SECONDLIFE_x11clipboard_0x"
1274
1275static
1276x11clipboard_type convert_format(int type)
1277{ 1246{
1278 if (!gWindowImplementation) 1247 if (ll_try_gtk_init())
1279 { 1248 {
1280 llwarns << "!gWindowImplementation in convert_format()" 1249 GtkClipboard * const clipboard =
1281 << llendl; 1250 gtk_clipboard_get(GDK_NONE);
1282 return XA_STRING; 1251 return gtk_clipboard_wait_is_text_available(clipboard) ?
1283 } 1252 TRUE : FALSE;
1284
1285 switch (type)
1286 {
1287 case SDLCLIPTYPE('T', 'E', 'X', 'T'):
1288 // old-style X11 clipboard, strictly only ISO 8859-1 encoding
1289 return XA_STRING;
1290 case SDLCLIPTYPE('U', 'T', 'F', '8'):
1291 // newer de-facto UTF8 clipboard atom
1292 return XInternAtom(gWindowImplementation->mSDL_Display,
1293 "UTF8_STRING", False);
1294 default:
1295 {
1296 /* completely arbitrary clipboard types... we don't actually use
1297 these right now, and support is skeletal. */
1298 char format[sizeof(FORMAT_PREFIX)+8+1]; /* Flawfinder: ignore */
1299
1300 snprintf(format, sizeof(format), "%s%08lx", FORMAT_PREFIX, (unsigned long)type);
1301 return XInternAtom(gWindowImplementation->mSDL_Display,
1302 format, False);
1303 } 1253 }
1304 } 1254 return FALSE; // failure
1305} 1255}
1306 1256
1307/* convert platform string to x11 clipboard format. for our 1257BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &text)
1308 purposes this is pretty trivial right now. */
1309static int
1310convert_data(int type, char *dst, const char *src, int srclen)
1311{ 1258{
1312 int dstlen; 1259 if (ll_try_gtk_init())
1313
1314 dstlen = 0;
1315 switch (type)
1316 { 1260 {
1317 case SDLCLIPTYPE('T', 'E', 'X', 'T'): 1261 GtkClipboard * const clipboard =
1318 case SDLCLIPTYPE('U', 'T', 'F', '8'): 1262 gtk_clipboard_get(GDK_NONE);
1319 if (src == NULL) 1263 gchar * const data = gtk_clipboard_wait_for_text(clipboard);
1320 { 1264 if (data)
1321 break;
1322 }
1323 if ( srclen == 0 )
1324 srclen = strlen(src); /* Flawfinder: ignore */
1325
1326 dstlen = srclen + 1;
1327
1328 if ( dst ) // assume caller made it big enough by asking us
1329 { 1265 {
1330 memcpy(dst, src, srclen); /* Flawfinder: ignore */ 1266 text = LLWString(utf8str_to_wstring(data));
1331 dst[srclen] = '\0'; 1267 g_free(data);
1268 return TRUE;
1332 } 1269 }
1333 break;
1334
1335 default:
1336 llwarns << "convert_data: Unknown medium type" << llendl;
1337 break;
1338 } 1270 }
1339 return(dstlen); 1271 return FALSE; // failure
1340} 1272}
1341 1273
1342/* Convert x11clipboard data to platform string. This too is 1274BOOL LLWindowSDL::copyTextToClipboard(const LLWString &text)
1343 pretty trivial for our needs right now, and just about identical
1344 to above. */
1345static int
1346convert_x11clipboard(int type, char *dst, const char *src, int srclen)
1347{ 1275{
1348 int dstlen; 1276 if (ll_try_gtk_init())
1349
1350 dstlen = 0;
1351 switch (type)
1352 { 1277 {
1353 case SDLCLIPTYPE('U', 'T', 'F', '8'): 1278 const std::string utf8 = wstring_to_utf8str(text);
1354 case SDLCLIPTYPE('T', 'E', 'X', 'T'): 1279 GtkClipboard * const clipboard =
1355 if (src == NULL) 1280 gtk_clipboard_get(GDK_NONE);
1356 { 1281 gtk_clipboard_set_text(clipboard, utf8.c_str(), utf8.length());
1357 break; 1282 return TRUE;
1358 }
1359 if ( srclen == 0 )
1360 srclen = strlen(src); /* Flawfinder: ignore */
1361
1362 dstlen = srclen + 1;
1363
1364 if ( dst ) // assume caller made it big enough by asking us
1365 {
1366 memcpy(dst, src, srclen); /* Flawfinder: ignore */
1367 dst[srclen] = '\0';
1368 }
1369 break;
1370
1371 default:
1372 llwarns << "convert_x11clipboard: Unknown medium type" << llendl;
1373 break;
1374 } 1283 }
1375 return dstlen; 1284 return FALSE; // failure
1376}
1377
1378int
1379LLWindowSDL::is_empty_x11clipboard(void)
1380{
1381 int retval;
1382
1383 maybe_lock_display();
1384 retval = ( XGetSelectionOwner(mSDL_Display, get_x11_readwrite_clipboard_type()) == None );
1385 maybe_unlock_display();
1386
1387 return(retval);
1388} 1285}
1389 1286
1390void 1287BOOL LLWindowSDL::isPrimaryTextAvailable()
1391LLWindowSDL::put_x11clipboard(int type, int srclen, const char *src)
1392{ 1288{
1393 x11clipboard_type format; 1289 if (ll_try_gtk_init())
1394 int dstlen;
1395 char *dst;
1396
1397 format = convert_format(type);
1398 dstlen = convert_data(type, NULL, src, srclen);
1399
1400 dst = (char *)malloc(dstlen);
1401 if ( dst != NULL )
1402 { 1290 {
1403 maybe_lock_display(); 1291 GtkClipboard * const clipboard =
1404 Window root = DefaultRootWindow(mSDL_Display); 1292 gtk_clipboard_get(GDK_SELECTION_PRIMARY);
1405 convert_data(type, dst, src, srclen); 1293 return gtk_clipboard_wait_is_text_available(clipboard) ?
1406 // Cutbuffers are only allowed to have STRING atom types, 1294 TRUE : FALSE;
1407 // but Emacs puts UTF8 inside them anyway. We cautiously
1408 // don't.
1409 if (type == SDLCLIPTYPE('T','E','X','T'))
1410 {
1411 // dstlen-1 so we don't include the trailing \0
1412 llinfos << "X11: Populating cutbuffer." <<llendl;
1413 XChangeProperty(mSDL_Display, root,
1414 XA_CUT_BUFFER0, XA_STRING, 8, PropModeReplace,
1415 (unsigned char*)dst, dstlen-1);
1416 } else {
1417 // Should we clear the cutbuffer if we can't put the selection in
1418 // it because it's a UTF8 selection? Eh, no great reason I think.
1419 //XDeleteProperty(SDL_Display, root, XA_CUT_BUFFER0);
1420 }
1421 // Private cutbuffer of an appropriate type.
1422 XChangeProperty(mSDL_Display, root,
1423 get_x11_cutbuffer_clipboard_type(), format, 8, PropModeReplace,
1424 (unsigned char*)dst, dstlen-1);
1425 free(dst);
1426
1427 /* Claim ownership of both PRIMARY and CLIPBOARD */
1428 XSetSelectionOwner(mSDL_Display, get_x11_readwrite_clipboard_type(),
1429 mSDL_XWindowID, CurrentTime);
1430 XSetSelectionOwner(mSDL_Display, get_x11_write_clipboard_type(),
1431 mSDL_XWindowID, CurrentTime);
1432
1433 maybe_unlock_display();
1434 } 1295 }
1296 return FALSE; // failure
1435} 1297}
1436 1298
1437void 1299BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &text)
1438LLWindowSDL::get_x11clipboard(int type, int *dstlen, char **dst)
1439{ 1300{
1440 x11clipboard_type format; 1301 if (ll_try_gtk_init())
1441
1442 *dstlen = 0;
1443 format = convert_format(type);
1444
1445 Window owner;
1446 Atom selection;
1447 Atom seln_type;
1448 int seln_format;
1449 unsigned long nbytes;
1450 unsigned long overflow;
1451 char *src;
1452
1453 maybe_lock_display();
1454 owner = XGetSelectionOwner(mSDL_Display, get_x11_readwrite_clipboard_type());
1455 maybe_unlock_display();
1456 if (owner == None)
1457 {
1458 // Fall right back to ancient X10 cut-buffers
1459 owner = DefaultRootWindow(mSDL_Display);
1460 selection = XA_CUT_BUFFER0;
1461 } else if (owner == mSDL_XWindowID)
1462 {
1463 // Use our own uncooked opaque string property
1464 owner = DefaultRootWindow(mSDL_Display);
1465 selection = get_x11_cutbuffer_clipboard_type();
1466 }
1467 else
1468 {
1469 // Use full-on X11-style clipboard negotiation with the owning app
1470 int selection_response = 0;
1471 SDL_Event event;
1472
1473 owner = mSDL_XWindowID;
1474 maybe_lock_display();
1475 selection = XInternAtom(mSDL_Display, "SDL_SELECTION", False);
1476 XConvertSelection(mSDL_Display, get_x11_readwrite_clipboard_type(), format,
1477 selection, owner, CurrentTime);
1478 maybe_unlock_display();
1479 llinfos << "X11: Waiting for clipboard to arrive." <<llendl;
1480 while ( ! selection_response )
1481 {
1482 // Only look for SYSWMEVENTs, or we may lose keypresses
1483 // etc.
1484 SDL_PumpEvents();
1485 if (1 == SDL_PeepEvents(&event, 1, SDL_GETEVENT,
1486 SDL_SYSWMEVENTMASK) )
1487 {
1488 if ( event.type == SDL_SYSWMEVENT )
1489 {
1490 XEvent xevent =
1491 event.syswm.msg->event.xevent;
1492
1493 if ( (xevent.type == SelectionNotify)&&
1494 (xevent.xselection.requestor == owner) )
1495 selection_response = 1;
1496 }
1497 } else {
1498 llinfos << "X11: Waiting for SYSWM event..." << llendl;
1499 }
1500 }
1501 llinfos << "X11: Clipboard arrived." <<llendl;
1502 }
1503
1504 maybe_lock_display();
1505 if ( XGetWindowProperty(mSDL_Display, owner, selection, 0, INT_MAX/4,
1506 False, format, &seln_type, &seln_format,
1507 &nbytes, &overflow, (unsigned char **)&src) == Success )
1508 { 1302 {
1509 if ( seln_type == format ) 1303 GtkClipboard * const clipboard =
1510 { 1304 gtk_clipboard_get(GDK_SELECTION_PRIMARY);
1511 *dstlen = convert_x11clipboard(type, NULL, src, nbytes); 1305 gchar * const data = gtk_clipboard_wait_for_text(clipboard);
1512 *dst = (char *)realloc(*dst, *dstlen); 1306 if (data)
1513 if ( *dst == NULL )
1514 *dstlen = 0;
1515 else
1516 convert_x11clipboard(type, *dst, src, nbytes);
1517 }
1518 XFree(src);
1519 }
1520 maybe_unlock_display();
1521}
1522
1523int clipboard_filter_callback(const SDL_Event *event)
1524{
1525 /* Post all non-window manager specific events */
1526 if ( event->type != SDL_SYSWMEVENT )
1527 {
1528 return(1);
1529 }
1530
1531 /* Handle window-manager specific clipboard events */
1532 switch (event->syswm.msg->event.xevent.type) {
1533 /* Copy the selection from SECONDLIFE_CUTBUFFER to the requested property */
1534 case SelectionRequest: {
1535 XSelectionRequestEvent *req;
1536 XEvent sevent;
1537 int seln_format;
1538 unsigned long nbytes;
1539 unsigned long overflow;
1540 unsigned char *seln_data;
1541
1542 req = &event->syswm.msg->event.xevent.xselectionrequest;
1543 sevent.xselection.type = SelectionNotify;
1544 sevent.xselection.display = req->display;
1545 sevent.xselection.selection = req->selection;
1546 sevent.xselection.target = None;
1547 sevent.xselection.property = None;
1548 sevent.xselection.requestor = req->requestor;
1549 sevent.xselection.time = req->time;
1550 if ( XGetWindowProperty(LLWindowSDL::get_SDL_Display(), DefaultRootWindow(LLWindowSDL::get_SDL_Display()),
1551 get_x11_cutbuffer_clipboard_type(), 0, INT_MAX/4, False, req->target,
1552 &sevent.xselection.target, &seln_format,
1553 &nbytes, &overflow, &seln_data) == Success )
1554 { 1307 {
1555 if ( sevent.xselection.target == req->target) 1308 text = LLWString(utf8str_to_wstring(data));
1556 { 1309 g_free(data);
1557 if ( sevent.xselection.target == XA_STRING || 1310 return TRUE;
1558 sevent.xselection.target ==
1559 convert_format(SDLCLIPTYPE('U','T','F','8')) )
1560 {
1561 if ( seln_data[nbytes-1] == '\0' )
1562 --nbytes;
1563 }
1564 XChangeProperty(LLWindowSDL::get_SDL_Display(), req->requestor, req->property,
1565 req->target, seln_format, PropModeReplace,
1566 seln_data, nbytes);
1567 sevent.xselection.property = req->property;
1568 } else if (get_x11_targets_atom() == req->target) {
1569 /* only advertise what we currently support */
1570 const int num_supported = 3;
1571 Atom supported[num_supported] = {
1572 XA_STRING, // will be over-written below
1573 get_x11_text_atom(),
1574 get_x11_targets_atom()
1575 };
1576 supported[0] = sevent.xselection.target;
1577 XChangeProperty(LLWindowSDL::get_SDL_Display(), req->requestor,
1578 req->property, XA_ATOM, 32, PropModeReplace,
1579 (unsigned char*)supported,
1580 num_supported);
1581 sevent.xselection.property = req->property;
1582 llinfos << "Clipboard: An app asked us what selections format we offer." << llendl;
1583 } else {
1584 llinfos << "Clipboard: An app requested an unsupported selection format " << req->target << ", we have " << sevent.xselection.target << llendl;
1585 sevent.xselection.target = None;
1586 }
1587 XFree(seln_data);
1588 } 1311 }
1589 int sendret =
1590 XSendEvent(LLWindowSDL::get_SDL_Display(),req->requestor,False,0,&sevent);
1591 if ((sendret==BadValue) || (sendret==BadWindow))
1592 llwarns << "Clipboard SendEvent failed" << llendl;
1593 XSync(LLWindowSDL::get_SDL_Display(), False);
1594 }
1595 break;
1596 } 1312 }
1597 1313 return FALSE; // failure
1598 /* Post the event for X11 clipboard reading above */
1599 return(1);
1600} 1314}
1601 1315
1602int 1316BOOL LLWindowSDL::copyTextToPrimary(const LLWString &text)
1603LLWindowSDL::init_x11clipboard(void)
1604{ 1317{
1605 SDL_SysWMinfo info; 1318 if (ll_try_gtk_init())
1606 int retval;
1607
1608 /* Grab the window manager specific information */
1609 retval = -1;
1610 SDL_SetError("SDL is not running on known window manager");
1611
1612 SDL_VERSION(&info.version);
1613 if ( SDL_GetWMInfo(&info) )
1614 { 1319 {
1615 /* Save the information for later use */ 1320 const std::string utf8 = wstring_to_utf8str(text);
1616 if ( info.subsystem == SDL_SYSWM_X11 ) 1321 GtkClipboard * const clipboard =
1617 { 1322 gtk_clipboard_get(GDK_SELECTION_PRIMARY);
1618 mSDL_Display = info.info.x11.display; 1323 gtk_clipboard_set_text(clipboard, utf8.c_str(), utf8.length());
1619 mSDL_XWindowID = info.info.x11.wmwindow; 1324 return TRUE;
1620 Lock_Display = info.info.x11.lock_func;
1621 Unlock_Display = info.info.x11.unlock_func;
1622
1623 /* Enable the special window hook events */
1624 SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
1625 SDL_SetEventFilter(clipboard_filter_callback);
1626
1627 retval = 0;
1628 }
1629 else
1630 {
1631 SDL_SetError("SDL is not running on X11");
1632 }
1633 } 1325 }
1634 return(retval); 1326 return FALSE; // failure
1635}
1636
1637void
1638LLWindowSDL::quit_x11clipboard(void)
1639{
1640 mSDL_Display = NULL;
1641 mSDL_XWindowID = None;
1642 Lock_Display = NULL;
1643 Unlock_Display = NULL;
1644
1645 SDL_SetEventFilter(NULL); // Stop custom event filtering
1646} 1327}
1647 1328
1648/************************************************/ 1329#else
1649 1330
1650BOOL LLWindowSDL::isClipboardTextAvailable() 1331BOOL LLWindowSDL::isClipboardTextAvailable()
1651{ 1332{
1652 return !is_empty_x11clipboard(); 1333 return FALSE; // unsupported
1653} 1334}
1654 1335
1655BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst) 1336BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst)
1656{ 1337{
1657 int cliplen; // seems 1 or 2 bytes longer than expected 1338 return FALSE; // unsupported
1658 char *cliptext = NULL;
1659 get_x11clipboard(SDLCLIPTYPE('U','T','F','8'), &cliplen, &cliptext);
1660 if (cliptext)
1661 {
1662 llinfos << "X11: Got UTF8 clipboard text." << llendl;
1663 // at some future time we can use cliplen instead of relying on \0,
1664 // if we ever grok non-ascii, non-utf8 encodings on the clipboard.
1665 std::string clip_str(cliptext);
1666 // we can't necessarily trust the incoming text to be valid UTF-8,
1667 // but utf8str_to_wstring() seems to do an appropriate level of
1668 // validation for avoiding over-reads.
1669 dst = utf8str_to_wstring(clip_str);
1670 /*llinfos << "X11 pasteTextFromClipboard: cliplen=" << cliplen <<
1671 " strlen(cliptext)=" << strlen(cliptext) <<
1672 " clip_str.length()=" << clip_str.length() <<
1673 " dst.length()=" << dst.length() <<
1674 llendl;*/
1675 free(cliptext);
1676 return TRUE; // success
1677 }
1678 get_x11clipboard(SDLCLIPTYPE('T','E','X','T'), &cliplen, &cliptext);
1679 if (cliptext)
1680 {
1681 llinfos << "X11: Got ISO 8859-1 clipboard text." << llendl;
1682 std::string clip_str(cliptext);
1683 std::string utf8_str = rawstr_to_utf8(clip_str);
1684 dst = utf8str_to_wstring(utf8_str);
1685 free(cliptext);
1686 }
1687 return FALSE; // failure
1688} 1339}
1340
1689 1341
1690BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s) 1342BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s)
1691{ 1343{
1692 std::string utf8text = wstring_to_utf8str(s); 1344 return FALSE; // unsupported
1693 const char* cstr = utf8text.c_str();
1694 if (cstr == NULL)
1695 {
1696 return FALSE;
1697 }
1698 int cstrlen = strlen(cstr); /* Flawfinder: ignore */
1699 int i;
1700 for (i=0; i<cstrlen; ++i)
1701 {
1702 if (0x80 & (unsigned char)cstr[i])
1703 {
1704 // Found an 8-bit character; use new-style UTF8 clipboard
1705 llinfos << "X11: UTF8 copyTextToClipboard" << llendl;
1706 put_x11clipboard(SDLCLIPTYPE('U','T','F','8'), cstrlen, cstr);
1707 return TRUE;
1708 }
1709 }
1710 // Didn't find any 8-bit characters; use old-style ISO 8859-1 clipboard
1711 llinfos << "X11: ISO 8859-1 copyTextToClipboard" << llendl;
1712 put_x11clipboard(SDLCLIPTYPE('T','E','X','T'), cstrlen, cstr);
1713 return TRUE;
1714} 1345}
1715#else
1716 1346
1717BOOL LLWindowSDL::isClipboardTextAvailable() 1347BOOL LLWindowSDL::isPrimaryTextAvailable()
1718{ 1348{
1719 return FALSE; // unsupported 1349 return FALSE; // unsupported
1720} 1350}
1721 1351
1722BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst) 1352BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
1723{ 1353{
1724 return FALSE; // unsupported 1354 return FALSE; // unsupported
1725} 1355}
1726 1356
1727BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s) 1357BOOL LLWindowSDL::copyTextToPrimary(const LLWString &s)
1728{ 1358{
1729 return FALSE; // unsupported 1359 return FALSE; // unsupported
1730} 1360}
1731#endif // LL_X11 1361
1362#endif // LL_GTK
1732 1363
1733LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_resolutions) 1364LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_resolutions)
1734{ 1365{
@@ -2538,8 +2169,7 @@ S32 OSMessageBoxSDL(const std::string& text, const std::string& caption, U32 typ
2538 buttons = GTK_BUTTONS_YES_NO; 2169 buttons = GTK_BUTTONS_YES_NO;
2539 break; 2170 break;
2540 } 2171 }
2541 win = gtk_message_dialog_new(NULL, flags, messagetype, buttons, "%s", 2172 win = gtk_message_dialog_new(NULL,flags, messagetype, buttons, "%s", text.c_str());
2542 text.c_str());
2543 2173
2544# if LL_X11 2174# if LL_X11
2545 // Make GTK tell the window manager to associate this 2175 // Make GTK tell the window manager to associate this
diff --git a/linden/indra/llwindow/llwindowsdl.h b/linden/indra/llwindow/llwindowsdl.h
index 36baec6..54baf01 100644
--- a/linden/indra/llwindow/llwindowsdl.h
+++ b/linden/indra/llwindow/llwindowsdl.h
@@ -79,9 +79,15 @@ public:
79 /*virtual*/ void captureMouse(); 79 /*virtual*/ void captureMouse();
80 /*virtual*/ void releaseMouse(); 80 /*virtual*/ void releaseMouse();
81 /*virtual*/ void setMouseClipping( BOOL b ); 81 /*virtual*/ void setMouseClipping( BOOL b );
82
82 /*virtual*/ BOOL isClipboardTextAvailable(); 83 /*virtual*/ BOOL isClipboardTextAvailable();
83 /*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst); 84 /*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
84 /*virtual*/ BOOL copyTextToClipboard(const LLWString & src); 85 /*virtual*/ BOOL copyTextToClipboard(const LLWString & src);
86
87 /*virtual*/ BOOL isPrimaryTextAvailable();
88 /*virtual*/ BOOL pasteTextFromPrimary(LLWString &dst);
89 /*virtual*/ BOOL copyTextToPrimary(const LLWString & src);
90
85 /*virtual*/ void flashIcon(F32 seconds); 91 /*virtual*/ void flashIcon(F32 seconds);
86 /*virtual*/ F32 getGamma(); 92 /*virtual*/ F32 getGamma();
87 /*virtual*/ BOOL setGamma(const F32 gamma); // Set the gamma 93 /*virtual*/ BOOL setGamma(const F32 gamma); // Set the gamma
@@ -123,7 +129,6 @@ public:
123 // Not great that these are public, but they have to be accessible 129 // Not great that these are public, but they have to be accessible
124 // by non-class code and it's better than making them global. 130 // by non-class code and it's better than making them global.
125#if LL_X11 131#if LL_X11
126 // These are set up by the X11 clipboard initialization code
127 Window mSDL_XWindowID; 132 Window mSDL_XWindowID;
128 Display *mSDL_Display; 133 Display *mSDL_Display;
129#endif 134#endif
@@ -206,12 +211,6 @@ protected:
206 211
207#if LL_X11 212#if LL_X11
208private: 213private:
209 // more X11 clipboard stuff
210 int init_x11clipboard(void);
211 void quit_x11clipboard(void);
212 int is_empty_x11clipboard(void);
213 void put_x11clipboard(int type, int srclen, const char *src);
214 void get_x11clipboard(int type, int *dstlen, char **dst);
215 void x11_set_urgent(BOOL urgent); 214 void x11_set_urgent(BOOL urgent);
216 BOOL mFlashing; 215 BOOL mFlashing;
217 LLTimer mFlashTimer; 216 LLTimer mFlashTimer;
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index bd38476..f224652 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -61,6 +61,7 @@ include_directories(
61 ) 61 )
62 62
63set(viewer_SOURCE_FILES 63set(viewer_SOURCE_FILES
64 jcfloater_animation_list.cpp
64 llagent.cpp 65 llagent.cpp
65 llagentdata.cpp 66 llagentdata.cpp
66 llagentlanguage.cpp 67 llagentlanguage.cpp
@@ -121,6 +122,7 @@ set(viewer_SOURCE_FILES
121 llfloaterabout.cpp 122 llfloaterabout.cpp
122 llfloateractivespeakers.cpp 123 llfloateractivespeakers.cpp
123 llfloateranimpreview.cpp 124 llfloateranimpreview.cpp
125 llfloaterassetbrowser.cpp
124 llfloaterauction.cpp 126 llfloaterauction.cpp
125 llfloateravatarinfo.cpp 127 llfloateravatarinfo.cpp
126 llfloateravatarpicker.cpp 128 llfloateravatarpicker.cpp
@@ -460,6 +462,7 @@ set(viewer_HEADER_FILES
460 CMakeLists.txt 462 CMakeLists.txt
461 ViewerInstall.cmake 463 ViewerInstall.cmake
462 464
465 jcfloater_animation_list.h
463 llagent.h 466 llagent.h
464 llagentdata.h 467 llagentdata.h
465 llagentlanguage.h 468 llagentlanguage.h
@@ -522,6 +525,7 @@ set(viewer_HEADER_FILES
522 llfloaterabout.h 525 llfloaterabout.h
523 llfloateractivespeakers.h 526 llfloateractivespeakers.h
524 llfloateranimpreview.h 527 llfloateranimpreview.h
528 llfloaterassetbrowser.h
525 llfloaterauction.h 529 llfloaterauction.h
526 llfloateravatarinfo.h 530 llfloateravatarinfo.h
527 llfloateravatarpicker.h 531 llfloateravatarpicker.h
@@ -1036,7 +1040,9 @@ set(viewer_XUI_FILES
1036 skins/default/xui/en-us/floater_about_land.xml 1040 skins/default/xui/en-us/floater_about_land.xml
1037 skins/default/xui/en-us/floater_about.xml 1041 skins/default/xui/en-us/floater_about.xml
1038 skins/default/xui/en-us/floater_active_speakers.xml 1042 skins/default/xui/en-us/floater_active_speakers.xml
1043 skins/default/xui/en-us/floater_animation_list.xml
1039 skins/default/xui/en-us/floater_animation_preview.xml 1044 skins/default/xui/en-us/floater_animation_preview.xml
1045 skins/default/xui/en-us/floater_asset_browser.xml
1040 skins/default/xui/en-us/floater_auction.xml 1046 skins/default/xui/en-us/floater_auction.xml
1041 skins/default/xui/en-us/floater_audio_volume.xml 1047 skins/default/xui/en-us/floater_audio_volume.xml
1042 skins/default/xui/en-us/floater_avatar_picker.xml 1048 skins/default/xui/en-us/floater_avatar_picker.xml
@@ -1398,6 +1404,7 @@ if (WINDOWS)
1398endif (WINDOWS) 1404endif (WINDOWS)
1399 1405
1400target_link_libraries(${VIEWER_BINARY_NAME} 1406target_link_libraries(${VIEWER_BINARY_NAME}
1407 ${NDOF_LIBRARY}
1401 ${LLAUDIO_LIBRARIES} 1408 ${LLAUDIO_LIBRARIES}
1402 ${LLCHARACTER_LIBRARIES} 1409 ${LLCHARACTER_LIBRARIES}
1403 ${LLIMAGE_LIBRARIES} 1410 ${LLIMAGE_LIBRARIES}
@@ -1427,7 +1434,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
1427 ${SDL_LIBRARY} 1434 ${SDL_LIBRARY}
1428 ${SMARTHEAP_LIBRARY} 1435 ${SMARTHEAP_LIBRARY}
1429 ${UI_LIBRARIES} 1436 ${UI_LIBRARIES}
1430 ${NDOF_LIBRARY}
1431 ${WINDOWS_LIBRARIES} 1437 ${WINDOWS_LIBRARIES}
1432 ${XMLRPCEPI_LIBRARIES} 1438 ${XMLRPCEPI_LIBRARIES}
1433 ${ELFIO_LIBRARIES} 1439 ${ELFIO_LIBRARIES}
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index ca9d53d..154fd5f 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -1204,6 +1204,17 @@
1204 <key>Value</key> 1204 <key>Value</key>
1205 <real>0.5</real> 1205 <real>0.5</real>
1206 </map> 1206 </map>
1207 <key>ChatChannelSelect</key>
1208 <map>
1209 <key>Comment</key>
1210 <string>Toggle custom channel controls in the chat bar</string>
1211 <key>Persist</key>
1212 <integer>1</integer>
1213 <key>Type</key>
1214 <string>Boolean</string>
1215 <key>Value</key>
1216 <integer>0</integer>
1217 </map>
1207 <key>ChatFontSize</key> 1218 <key>ChatFontSize</key>
1208 <map> 1219 <map>
1209 <key>Comment</key> 1220 <key>Comment</key>
@@ -2344,6 +2355,17 @@
2344 <key>Value</key> 2355 <key>Value</key>
2345 <integer>0</integer> 2356 <integer>0</integer>
2346 </map> 2357 </map>
2358 <key>DoubleClickTeleport</key>
2359 <map>
2360 <key>Comment</key>
2361 <string>Enable double-click teleport</string>
2362 <key>Persist</key>
2363 <integer>1</integer>
2364 <key>Type</key>
2365 <string>Boolean</string>
2366 <key>Value</key>
2367 <integer>1</integer>
2368 </map>
2347 <key>DragAndDropToolTipDelay</key> 2369 <key>DragAndDropToolTipDelay</key>
2348 <map> 2370 <map>
2349 <key>Comment</key> 2371 <key>Comment</key>
@@ -5895,7 +5917,7 @@
5895 <key>Persist</key> 5917 <key>Persist</key>
5896 <integer>1</integer> 5918 <integer>1</integer>
5897 <key>Type</key> 5919 <key>Type</key>
5898 <string>S32</string> 5920 <string>F32</string>
5899 <key>Value</key> 5921 <key>Value</key>
5900 <integer>0</integer> 5922 <integer>0</integer>
5901 </map> 5923 </map>
diff --git a/linden/indra/newview/jcfloater_animation_list.cpp b/linden/indra/newview/jcfloater_animation_list.cpp
new file mode 100644
index 0000000..9f5c9bb
--- /dev/null
+++ b/linden/indra/newview/jcfloater_animation_list.cpp
@@ -0,0 +1,462 @@
1/* Copyright (c) 2009
2 *
3 * Modular Systems Ltd. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or
6 * without modification, are permitted provided that the following
7 * conditions are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials provided
14 * with the distribution.
15 * 3. Neither the name Modular Systems Ltd nor the names of its contributors
16 * may be used to endorse or promote products derived from this
17 * software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS LTD AND CONTRIBUTORS “AS IS”
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 * THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include "llviewerprecompiledheaders.h"
33
34#include "lluuid.h"
35#include "lluictrlfactory.h"
36#include "llvoavatar.h"
37
38#include "llagent.h"
39
40#include "llscrolllistctrl.h"
41
42#include "llviewerobjectlist.h"
43
44#include "jcfloater_animation_list.h"
45
46#include "llviewercontrol.h"
47
48#include "llinventorymodel.h"
49
50#include "llcategory.h"
51
52#include "llfloaterchat.h"
53
54#include "llfloateravatarinfo.h"
55
56
57
58
59
60//std::map<LLUUID, AObjectData> JCFloaterAnimList::mObjectOwners;
61
62JCFloaterAnimList::JCFloaterAnimList(const LLSD& seed) :
63 LLFloater(std::string("animation list")),
64 mAnimList(0)
65{
66 BOOL no_open = FALSE;
67 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_animation_list.xml",&getFactoryMap(),no_open);
68}
69
70JCFloaterAnimList::~JCFloaterAnimList()
71{
72}
73
74//static
75bool JCFloaterAnimList::visible(LLFloater* instance, const LLSD& key)
76{
77 return VisibilityPolicy<LLFloater>::visible(instance, key);
78}
79
80//static
81void JCFloaterAnimList::show(LLFloater* instance, const LLSD& key)
82{
83 VisibilityPolicy<LLFloater>::show(instance, key);
84}
85
86//static
87void JCFloaterAnimList::hide(LLFloater* instance, const LLSD& key)
88{
89 VisibilityPolicy<LLFloater>::hide(instance, key);
90}
91
92void JCFloaterAnimList::onVisibilityChange(BOOL new_visibility)
93{
94 if(!new_visibility) {
95 // *HACK: clean up memory on hiding
96 mObjectOwners.clear();
97 }
98}
99
100BOOL JCFloaterAnimList::postBuild()
101{
102 mAnimList = getChild<LLScrollListCtrl>("animation_list");
103 mAnimList->setCallbackUserData(this);
104 mAnimList->setDoubleClickCallback(onDoubleClick);
105 mAnimList->sortByColumn("animation_uuid", TRUE);
106
107 childSetAction("Stop Selected",StopSelected,this);
108 childSetAction("Revoke Selected",RevokeSelected,this);
109 childSetAction("Stop+Revoke Selected",StopRevokeSelected,this);
110 childSetAction("Open Owner Profile",OpenProfile,this);
111
112 return 1;
113}
114
115void JCFloaterAnimList::StopSelected(void *userdata )
116{
117 JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
118 LLDynamicArray<LLUUID> ids;
119 std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
120 for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
121 {
122 LLScrollListItem *item = *itr;
123 const LLUUID &id = item->getColumn(LIST_ANIMATION_UUID)->getValue().asUUID();
124 if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
125 {
126 ids.put(id);
127 }
128 }
129 gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP);
130}
131
132void JCFloaterAnimList::RevokeSelected(void *userdata )
133{
134 JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
135 LLDynamicArray<LLUUID> ids;
136 std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
137 for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
138 {
139 LLScrollListItem *item = *itr;
140 const LLUUID &id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID();
141 if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
142 {
143 ids.put(id);
144 }
145 }
146 if( !ids.empty() )
147 {
148 for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
149 {
150 LLUUID id = *itr;
151 LLMessageSystem* msg = gMessageSystem;
152 msg->newMessageFast(_PREHASH_RevokePermissions);
153 msg->nextBlockFast(_PREHASH_AgentData);
154 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
155 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
156 msg->nextBlockFast(_PREHASH_Data);
157 msg->addUUIDFast(_PREHASH_ObjectID, id);
158 msg->addU32Fast(_PREHASH_ObjectPermissions, U32_MAX);
159 gAgent.sendReliableMessage();
160 }
161 }
162}
163
164void JCFloaterAnimList::StopRevokeSelected(void *userdata )
165{
166 StopSelected(userdata);
167 RevokeSelected(userdata);
168}
169
170void JCFloaterAnimList::OpenProfile(void *userdata )
171{
172 JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
173 std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
174 if(!items.empty())
175 {
176 //LLVOAvatar* avatarp = gAgent.getAvatarObject();
177 for(std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); ++itr)
178 {
179 LLScrollListItem *item = *itr;
180 const LLUUID &object_id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID();
181 LLFloaterAvatarInfo::showFromDirectory(self->mObjectOwners[object_id].owner_id);
182 }
183 }
184}
185
186/*void JCFloaterAnimList::ReturnSelected(void *userdata )
187{
188 JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
189 LLDynamicArray<LLUUID> ids = self->mAnimList->getSelectedIDs();
190 if(ids.size() > 0)
191 {
192 LLVOAvatar* avatarp = gAgent.getAvatarObject();
193 for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
194 {
195 LLUUID id = *itr;
196
197 }
198 }
199}*/
200
201void JCFloaterAnimList::draw()
202{
203 refresh();
204 LLFloater::draw();
205}
206//LLScrollListCtrl::getSelectedIDs();
207void JCFloaterAnimList::refresh()
208{
209 LLDynamicArray<LLUUID> selected = mAnimList->getSelectedIDs();
210 S32 scrollpos = mAnimList->getScrollPos();
211 mAnimList->deleteAllItems();
212 LLVOAvatar* avatarp = gAgent.getAvatarObject();
213 if (avatarp)
214 {
215 LLVOAvatar::AnimSourceIterator ai;
216
217 for(ai = avatarp->mAnimationSources.begin(); ai != avatarp->mAnimationSources.end(); ++ai)
218 {
219 LLSD element;
220 const LLUUID &aifirst = ai->first;
221 LLViewerInventoryItem* item = gInventory.getItem(findItemID(ai->second,0));
222
223 // *NOTE: conceal id to prevent bugs, use
224 // item->getColumn(LIST_ANIMATION_UUID)->getValue().asUUID()
225 // instead
226 element["id"] = LLUUID::null.combine(ai->second);
227 element["columns"][LIST_ANIMATION_NAME]["column"] = "Anim Name";
228 element["columns"][LIST_ANIMATION_NAME]["type"] = "text";
229 element["columns"][LIST_ANIMATION_NAME]["color"] = gColors.getColor("ScrollUnselectedColor").getValue();
230 if(item)
231 {
232 element["columns"][LIST_ANIMATION_NAME]["value"] = item->getName();//ai->second//"avatar_icon";
233 }else
234 {
235 element["columns"][LIST_ANIMATION_NAME]["value"] = "Not in Inventory";
236 }
237 element["columns"][LIST_ANIMATION_UUID]["column"] = "Animation UUID";
238 element["columns"][LIST_ANIMATION_UUID]["type"] = "text";
239 element["columns"][LIST_ANIMATION_UUID]["color"] = gColors.getColor("ScrollUnselectedColor").getValue();
240 element["columns"][LIST_ANIMATION_UUID]["value"] = ai->second;
241 element["columns"][LIST_OBJECT_UUID]["column"] = "Source Object UUID";
242 element["columns"][LIST_OBJECT_UUID]["type"] = "text";
243 element["columns"][LIST_OBJECT_UUID]["color"] = gColors.getColor("ScrollUnselectedColor").getValue();
244 element["columns"][LIST_OBJECT_UUID]["value"] = aifirst;
245 element["columns"][LIST_OBJECT_OWNER]["column"] = "Source Owner";
246 element["columns"][LIST_OBJECT_OWNER]["type"] = "text";
247 element["columns"][LIST_OBJECT_OWNER]["color"] = gColors.getColor("ScrollUnselectedColor").getValue();
248 std::string name("?");
249 LLViewerObject *object = gObjectList.findObject(aifirst);
250 bool is_first = ( mObjectOwners.count( aifirst ) == 0 );
251 bool just_shown = false;
252 LLUUID owner_id(LLUUID::null);
253
254 if( !is_first )
255 {
256 name = mObjectOwners[aifirst].owner_name;
257 owner_id = mObjectOwners[aifirst].owner_id;
258 }
259
260 if( object )
261 {
262 if( object->permYouOwner() )
263 {
264 owner_id = gAgent.getID();
265 gAgent.getName(name);
266 }
267 else
268 {
269 object = (LLViewerObject *) object->getRoot();
270 if( object->isAvatar() )
271 {
272 owner_id = object->getID();
273 name = ((LLVOAvatar *)object)->getFullname();
274 }
275 }
276 }
277
278 {
279 AObjectData &data = mObjectOwners[aifirst];
280 if( object )
281 {
282 if( !data.in_object_list )
283 {
284 just_shown = true;
285 data.in_object_list = true;
286 }
287 data.root_id = ( (LLViewerObject*)object->getRoot() )->getID();
288 }
289 data.owner_name = name;
290 data.owner_id = owner_id;
291 }
292
293 if( is_first || just_shown ) {
294 if( name == "?" && !aifirst.isNull()) {
295 LLMessageSystem* msg = gMessageSystem;
296 msg->newMessageFast(_PREHASH_RequestObjectPropertiesFamily);
297 msg->nextBlockFast(_PREHASH_AgentData);
298 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
299 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
300 msg->nextBlockFast(_PREHASH_ObjectData);
301 msg->addU32Fast(_PREHASH_RequestFlags, 0 );
302 if( object )
303 {
304 LL_INFOS("Avatar List") << "Sending RequestObjectPropertiesFamily packet for id( " << aifirst.asString() << " ) on object( " << object->getID().asString() << " )" << LL_ENDL;
305 msg->addUUIDFast(_PREHASH_ObjectID, object->getID());
306 }
307 else
308 {
309 LL_INFOS("Avatar List") << "Sending RequestObjectPropertiesFamily packet for id( " << aifirst.asString() << " )" << LL_ENDL;
310 msg->addUUIDFast(_PREHASH_ObjectID, aifirst);
311 }
312 gAgent.sendReliableMessage();
313 }
314 }
315 element["columns"][LIST_OBJECT_OWNER]["value"] = name;
316 mAnimList->addElement(element, ADD_BOTTOM);
317 //LLViewerObject* objectp = gObjectList.findObject(ai->first);
318 //if(objectp)
319 //{
320 // //objectp->
321 //}
322
323 //object_ids.insert(ai->first);
324 //animation_ids.insert(ai->second);
325 }
326 }
327
328 mAnimList->sortItems();
329 mAnimList->selectMultiple(selected);
330 mAnimList->setScrollPos(scrollpos);
331}
332
333void JCFloaterAnimList::callbackLoadOwnerName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data)
334{
335 LLUUID *oid = (LLUUID*)data;
336 JCFloaterAnimList *self = JCFloaterAnimList::getInstance(LLSD());
337 if(self->mObjectOwners.count( *oid ) > 0)
338 {
339 self->mObjectOwners[*oid].owner_name = first + " " + last;
340 }
341 delete oid;
342}
343
344void JCFloaterAnimList::processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data)
345{
346 if(!JCFloaterAnimList::instanceVisible(LLSD())) return;
347 JCFloaterAnimList *self = JCFloaterAnimList::getInstance(LLSD());
348 LLUUID object_id;
349 U32 request_flags;
350 LLUUID creator_id;
351 LLUUID owner_id;
352 LLUUID group_id;
353 LLUUID extra_id;
354 U32 base_mask, owner_mask, group_mask, everyone_mask, next_owner_mask;
355 LLSaleInfo sale_info;
356 LLCategory category;
357 msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_RequestFlags, request_flags );
358 msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_ObjectID, object_id );
359 msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, owner_id );
360 msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_GroupID, group_id );
361 msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_BaseMask, base_mask );
362 msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_OwnerMask, owner_mask );
363 msg->getU32Fast(_PREHASH_ObjectData,_PREHASH_GroupMask, group_mask );
364 msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_EveryoneMask, everyone_mask );
365 msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_NextOwnerMask, next_owner_mask);
366 sale_info.unpackMessage(msg, _PREHASH_ObjectData);
367 category.unpackMessage(msg, _PREHASH_ObjectData);
368 LLUUID last_owner_id;
369 msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_LastOwnerID, last_owner_id );
370 std::string name;
371 msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Name, name);
372 std::string desc;
373 msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Description, desc);
374
375 for( std::map<LLUUID, AObjectData>::iterator di = self->mObjectOwners.begin(); di != self->mObjectOwners.end(); di++ )
376 {
377 const LLUUID &id = di->first;
378 const AObjectData &data = di->second;
379
380 if(data.root_id == object_id || data.owner_id == object_id)
381 {
382 LLUUID* ref = new LLUUID(id);
383 self->mObjectOwners[id].owner_id = owner_id;
384 gCacheName->get(owner_id, FALSE, callbackLoadOwnerName, (void*)ref);
385 }
386 }
387}
388
389const LLUUID& JCFloaterAnimList::findItemID(const LLUUID& asset_id, BOOL copyable_only)
390{
391 LLViewerInventoryCategory::cat_array_t cats;
392 LLViewerInventoryItem::item_array_t items;
393 LLAssetIDMatches asset_id_matches(asset_id);
394 gInventory.collectDescendentsIf(LLUUID::null,
395 cats,
396 items,
397 LLInventoryModel::INCLUDE_TRASH,
398 asset_id_matches);
399
400 if (items.count())
401 {
402 // search for copyable version first
403 for (S32 i = 0; i < items.count(); i++)
404 {
405 LLInventoryItem* itemp = items[i];
406 LLPermissions item_permissions = itemp->getPermissions();
407 if (item_permissions.allowCopyBy(gAgent.getID(), gAgent.getGroupID()))
408 {
409 return itemp->getUUID();
410 }
411 }
412 // otherwise just return first instance, unless copyable requested
413 if (copyable_only)
414 {
415 return LLUUID::null;
416 }
417 else
418 {
419 return items[0]->getUUID();
420 }
421 }
422
423 return LLUUID::null;
424}
425
426/*void JCFloaterAnimList::onClickCopyAnimationUUID(void *userdata)
427{
428 LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata;
429 LLScrollListItem *item = self->mAvatarList->getFirstSelected();
430
431 if ( NULL == item ) return;
432
433 LLUUID agent_id = item->getUUID();
434
435 char buffer[UUID_STR_LENGTH];
436 agent_id.toString(buffer);
437
438 gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer));
439}*/
440
441void JCFloaterAnimList::onDoubleClick(void *userdata)
442{
443 //JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
444 //LLScrollListItem *item = self->mAnimList->getFirstSelected();
445 //if(!item)return;
446 //LLUUID agent_id = item->getUUID();
447
448 //gAgent.setFocusObject(gObjectList.findObject(agent_id));
449 //gAgent.setFocusOnAvatar(FALSE, TRUE);
450}
451
452void JCFloaterAnimList::close(bool app)
453{
454 //sInstance->setVisible(0);
455//#ifdef RECONSTRUCT_ON_TOGGLE
456// sInstance = NULL;
457 LLFloater::close(app);
458//#else
459// sInstance->setVisible(!(sInstance->getVisible()));
460//#endif
461}
462
diff --git a/linden/indra/newview/jcfloater_animation_list.h b/linden/indra/newview/jcfloater_animation_list.h
new file mode 100644
index 0000000..d8262f0
--- /dev/null
+++ b/linden/indra/newview/jcfloater_animation_list.h
@@ -0,0 +1,88 @@
1/* Copyright (c) 2009
2 *
3 * Modular Systems Ltd. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or
6 * without modification, are permitted provided that the following
7 * conditions are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials provided
14 * with the distribution.
15 * 3. Neither the name Modular Systems Ltd nor the names of its contributors
16 * may be used to endorse or promote products derived from this
17 * software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS LTD AND CONTRIBUTORS “AS IS”
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 * THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include "llfloater.h"
33#include "lluuid.h"
34#include "llstring.h"
35
36struct AObjectData
37{
38 std::string owner_name;
39 LLUUID owner_id;
40 LLUUID root_id;
41 bool in_object_list;
42};
43
44class JCFloaterAnimList : public LLFloater, public LLUISingleton<JCFloaterAnimList, JCFloaterAnimList>
45{
46public:
47 JCFloaterAnimList(const LLSD& seed);
48 virtual ~JCFloaterAnimList();
49
50 /*virtual*/ BOOL postBuild();
51 /*virtual*/ void draw();
52 /*virtual*/ void onVisibilityChange(BOOL new_visibility);
53
54 /*virtual*/ void close(bool app = 0);
55 void refresh();
56
57 const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only);
58
59 static void callbackLoadOwnerName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data);
60
61 static void processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data);
62
63 static bool visible(LLFloater* instance, const LLSD& key);
64 static void show(LLFloater* instance, const LLSD& key);
65 static void hide(LLFloater* instance, const LLSD& key);
66
67private:
68
69 enum ANIMATION_COLUMN_ORDER
70 {
71 LIST_ANIMATION_NAME,
72 LIST_ANIMATION_UUID,
73 LIST_OBJECT_UUID,
74 LIST_OBJECT_OWNER
75 };
76
77 LLScrollListCtrl* mAnimList;
78
79 std::map<LLUUID, AObjectData> mObjectOwners;
80
81 static void StopSelected(void *userdata );
82 static void RevokeSelected(void *userdata );
83 static void StopRevokeSelected(void *userdata );
84 static void OpenProfile(void *userdata );
85 static void onDoubleClick(void *userdata);
86
87};
88
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index e71f1b7..d73ddb6 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -232,6 +232,7 @@ LLAgent gAgent;
232// Statics 232// Statics
233// 233//
234BOOL LLAgent::sDebugDisplayTarget = FALSE; 234BOOL LLAgent::sDebugDisplayTarget = FALSE;
235BOOL LLAgent::sPhantom = FALSE;
235 236
236const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; 237const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f;
237 238
@@ -845,6 +846,35 @@ void LLAgent::toggleFlying()
845 846
846 847
847//----------------------------------------------------------------------------- 848//-----------------------------------------------------------------------------
849// togglePhantom()
850//-----------------------------------------------------------------------------
851void LLAgent::togglePhantom()
852{
853 BOOL phan = !(sPhantom);
854
855 setPhantom( phan );
856}
857
858
859//-----------------------------------------------------------------------------
860// setPhantom() lgg
861//-----------------------------------------------------------------------------
862void LLAgent::setPhantom(BOOL phantom)
863{
864 sPhantom = phantom;
865}
866
867
868//-----------------------------------------------------------------------------
869// getPhantom() lgg
870//-----------------------------------------------------------------------------
871BOOL LLAgent::getPhantom()
872{
873 return sPhantom;
874}
875
876
877//-----------------------------------------------------------------------------
848// setRegion() 878// setRegion()
849//----------------------------------------------------------------------------- 879//-----------------------------------------------------------------------------
850void LLAgent::setRegion(LLViewerRegion *regionp) 880void LLAgent::setRegion(LLViewerRegion *regionp)
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h
index f64bf95..d6854e4 100644
--- a/linden/indra/newview/llagent.h
+++ b/linden/indra/newview/llagent.h
@@ -375,6 +375,11 @@ public:
375 // Does this parcel allow you to fly? 375 // Does this parcel allow you to fly?
376 BOOL canFly(); 376 BOOL canFly();
377 377
378 //lgg crap
379 static BOOL getPhantom();// const { return emeraldPhantom; }
380 static void setPhantom(BOOL phantom);
381 static void togglePhantom();
382
378 // Animation functions 383 // Animation functions
379 void stopCurrentAnimations(); 384 void stopCurrentAnimations();
380 void requestStopMotion( LLMotion* motion ); 385 void requestStopMotion( LLMotion* motion );
@@ -805,6 +810,8 @@ private:
805 LLVector3d mCameraSmoothingLastPositionGlobal; 810 LLVector3d mCameraSmoothingLastPositionGlobal;
806 LLVector3d mCameraSmoothingLastPositionAgent; 811 LLVector3d mCameraSmoothingLastPositionAgent;
807 BOOL mCameraSmoothingStop; 812 BOOL mCameraSmoothingStop;
813
814 static BOOL sPhantom;
808 815
809 816
810 //Ventrella 817 //Ventrella
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 81c3f92..ab4d8a9 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -3126,7 +3126,12 @@ void LLAppViewer::idle()
3126 { 3126 {
3127 // Send avatar and camera info 3127 // Send avatar and camera info
3128 last_control_flags = gAgent.getControlFlags(); 3128 last_control_flags = gAgent.getControlFlags();
3129 send_agent_update(TRUE); 3129
3130 if(!gAgent.getPhantom())
3131 {
3132 send_agent_update(TRUE);
3133 }
3134
3130 agent_update_timer.reset(); 3135 agent_update_timer.reset();
3131 } 3136 }
3132 } 3137 }
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp
index eb1da05..1b1284d 100644
--- a/linden/indra/newview/llchatbar.cpp
+++ b/linden/indra/newview/llchatbar.cpp
@@ -53,6 +53,7 @@
53#include "llkeyboard.h" 53#include "llkeyboard.h"
54#include "lllineeditor.h" 54#include "lllineeditor.h"
55#include "llstatusbar.h" 55#include "llstatusbar.h"
56#include "llspinctrl.h"
56#include "lltextbox.h" 57#include "lltextbox.h"
57#include "lluiconstants.h" 58#include "lluiconstants.h"
58#include "llviewergesture.h" // for triggering gestures 59#include "llviewergesture.h" // for triggering gestures
@@ -101,6 +102,7 @@ private:
101 102
102LLChatBar::LLChatBar() 103LLChatBar::LLChatBar()
103: LLPanel(LLStringUtil::null, LLRect(), BORDER_NO), 104: LLPanel(LLStringUtil::null, LLRect(), BORDER_NO),
105 mChannelControl(FALSE),
104 mInputEditor(NULL), 106 mInputEditor(NULL),
105 mGestureLabelTimer(), 107 mGestureLabelTimer(),
106 mLastSpecialChatChannel(0), 108 mLastSpecialChatChannel(0),
@@ -154,6 +156,8 @@ BOOL LLChatBar::postBuild()
154 mInputEditor->setEnableLineHistory(TRUE); 156 mInputEditor->setEnableLineHistory(TRUE);
155 } 157 }
156 158
159 toggleChannelControl();
160
157 mIsBuilt = TRUE; 161 mIsBuilt = TRUE;
158 162
159 return TRUE; 163 return TRUE;
@@ -213,6 +217,7 @@ void LLChatBar::refresh()
213 217
214 childSetValue("History", LLFloaterChat::instanceVisible(LLSD())); 218 childSetValue("History", LLFloaterChat::instanceVisible(LLSD()));
215 219
220 childSetValue("channel_control",( 1.f * ((S32)(getChild<LLSpinCtrl>("channel_control")->get()))) );
216 childSetEnabled("Say", mInputEditor->getText().size() > 0); 221 childSetEnabled("Say", mInputEditor->getText().size() > 0);
217 childSetEnabled("Shout", mInputEditor->getText().size() > 0); 222 childSetEnabled("Shout", mInputEditor->getText().size() > 0);
218 223
@@ -373,8 +378,11 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
373 } 378 }
374 else 379 else
375 { 380 {
376 // This is normal chat. 381 if (!mChannelControl)
377 *channel = 0; 382 {
383 // This is normal chat.
384 *channel = 0;
385 }
378 return mesg; 386 return mesg;
379 } 387 }
380} 388}
@@ -390,7 +398,8 @@ void LLChatBar::sendChat( EChatType type )
390 // store sent line in history, duplicates will get filtered 398 // store sent line in history, duplicates will get filtered
391 if (mInputEditor) mInputEditor->updateHistory(); 399 if (mInputEditor) mInputEditor->updateHistory();
392 // Check if this is destined for another channel 400 // Check if this is destined for another channel
393 S32 channel = 0; 401 S32 channel = mChannelControl ? (S32)(getChild<LLSpinCtrl>("channel_control")->get()) : 0;
402
394 stripChannelNumber(text, &channel); 403 stripChannelNumber(text, &channel);
395 404
396 std::string utf8text = wstring_to_utf8str(text); 405 std::string utf8text = wstring_to_utf8str(text);
@@ -428,6 +437,31 @@ void LLChatBar::sendChat( EChatType type )
428 } 437 }
429} 438}
430 439
440void LLChatBar::toggleChannelControl()
441{
442 LLRect input_rect = mInputEditor->getRect();
443 S32 chan_width = getChild<LLSpinCtrl>("channel_control")->getRect().getWidth();
444 BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect");
445 BOOL control = getChild<LLSpinCtrl>("channel_control")->getVisible();
446
447 if (visible && !control)
448 {
449 input_rect.setLeftTopAndSize(input_rect.mLeft+chan_width, input_rect.mTop,
450 input_rect.getWidth()-chan_width, input_rect.getHeight());
451 }
452 else if (!visible && control)
453 {
454 input_rect.setLeftTopAndSize(input_rect.mLeft-chan_width, input_rect.mTop,
455 input_rect.getWidth()+chan_width, input_rect.getHeight());
456
457 }
458 mInputEditor->setRect(input_rect);
459
460 childSetVisible("channel_control", visible);
461 childSetEnabled("channel_control", visible);
462 mChannelControl = visible;
463}
464
431 465
432//----------------------------------------------------------------------- 466//-----------------------------------------------------------------------
433// Static functions 467// Static functions
@@ -581,7 +615,8 @@ void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type,
581void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) 615void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
582{ 616{
583 // Look for "/20 foo" channel chats. 617 // Look for "/20 foo" channel chats.
584 S32 channel = 0; 618 S32 channel = mChannelControl ? (S32)(getChild<LLSpinCtrl>("channel_control")->get()) : 0;
619 //S32 channel = (S32)(getChild<LLSpinCtrl>("ChatChannel")->get());
585 LLWString out_text = stripChannelNumber(wtext, &channel); 620 LLWString out_text = stripChannelNumber(wtext, &channel);
586 std::string utf8_out_text = wstring_to_utf8str(out_text); 621 std::string utf8_out_text = wstring_to_utf8str(out_text);
587 std::string utf8_text = wstring_to_utf8str(wtext); 622 std::string utf8_text = wstring_to_utf8str(wtext);
diff --git a/linden/indra/newview/llchatbar.h b/linden/indra/newview/llchatbar.h
index 72c797a..53ac233 100644
--- a/linden/indra/newview/llchatbar.h
+++ b/linden/indra/newview/llchatbar.h
@@ -93,6 +93,8 @@ public:
93 static void startChat(const char* line); 93 static void startChat(const char* line);
94 static void stopChat(); 94 static void stopChat();
95 95
96 void toggleChannelControl();
97
96protected: 98protected:
97 void sendChat(EChatType type); 99 void sendChat(EChatType type);
98 void updateChat(); 100 void updateChat();
@@ -109,6 +111,9 @@ protected:
109 LLComboBox* mGestureCombo; 111 LLComboBox* mGestureCombo;
110 112
111 LLChatBarGestureObserver* mObserver; 113 LLChatBarGestureObserver* mObserver;
114
115private:
116 BOOL mChannelControl;
112}; 117};
113 118
114extern LLChatBar *gChatBar; 119extern LLChatBar *gChatBar;
diff --git a/linden/indra/newview/llfloaterassetbrowser.cpp b/linden/indra/newview/llfloaterassetbrowser.cpp
new file mode 100644
index 0000000..615d21a
--- /dev/null
+++ b/linden/indra/newview/llfloaterassetbrowser.cpp
@@ -0,0 +1,466 @@
1/**
2 * @file llfloaterassetbrowser.cpp
3 * @brief LLFloaterAssetBrowser class implementation
4 * Phox wuz hurr
5 */
6
7#include "llviewerprecompiledheaders.h"
8#include "llfloaterassetbrowser.h"
9#include "llinventoryview.h"
10#include "llinventorymodel.h"
11#include "llviewerimagelist.h"
12#include "llbutton.h"
13#include "lltextbox.h"
14#include "llpreview.h"
15#include "llinventorybridge.h"
16#include "llagent.h"
17#include "lltooldraganddrop.h"
18#include "llfocusmgr.h"
19#include "llview.h"
20
21// Externs
22extern LLInventoryModel gInventory;
23
24// Statics
25LLFloaterAssetBrowser* LLFloaterAssetBrowser::sInstance = NULL;
26
27LLFloaterAssetBrowser::LLFloaterAssetBrowser()
28: LLFloater("floater_asset_browser")
29{
30 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_asset_browser.xml");
31
32 mInventoryPanel = getChild<LLInventoryPanel>("inventory panel");
33
34 //Open all folders and close them in order to make item list up-to-date
35 //if(gInventory.getItemCount()==0)
36 mInventoryPanel->openAllFolders();
37
38 //gInventory.startBackgroundFetch(gInventory.findCategoryUUIDForType(LLAssetType::AT_TEXTURE));
39
40
41 childSetAction("button next", onClickNext, this);
42 childSetAction("button previous", onClickPrevious, this);
43 childSetAction("button refresh", onClickRefresh, this);
44
45 initialize();
46 createThumbnails();
47 mInventoryPanel->closeAllFolders();
48}
49
50// static
51void LLFloaterAssetBrowser::show(void*)
52{
53 if (!sInstance)
54 sInstance = new LLFloaterAssetBrowser();
55
56 sInstance->open();
57}
58
59// virtual
60LLFloaterAssetBrowser::~LLFloaterAssetBrowser()
61{
62 clearAssetInfoTexts();
63 mTextureAssets.clear();
64 mMaxIndex = 0;
65 mFirstIndex = 0;
66 mMouseOverIndex = 0;
67 mMouseOverUUID = LLUUID::null;
68 mMouseOverAssetUUID = LLUUID::null;
69 mFloaterTitle = "";
70 clearNoAssetsText();
71 sInstance=NULL;
72}
73
74void LLFloaterAssetBrowser::initialize()
75{
76 mMaxIndex = ITEMS_PER_PAGE;
77 mFirstIndex = 0;
78 mAssetInfoLabelList.clear();
79 mAssetInfoIndex = 0;
80 mFloaterHeight = getRect().getHeight();
81 mFloaterWidth = getRect().getWidth();
82 mMouseOverIndex = 0;
83 mMouseOverUUID = LLUUID::null;
84 mMouseOverAssetUUID = LLUUID::null;
85 mFloaterTitle = "";
86
87 S32 image_top = getRect().getHeight();
88 S32 image_bottom = BTN_HEIGHT_SMALL;
89 S32 image_middle = (image_top + image_bottom) / 2;
90 S32 line_height = llround(LLFontGL::sSansSerifSmall->getLineHeight());
91
92 mNoAssetsLabel = new LLTextBox("mNoAssetsLabel.",
93 LLRect(getRect().getWidth()/2,
94 image_middle + line_height / 2,
95 getRect().getWidth(),
96 image_middle - line_height / 2 ),
97 "No assets found.",
98 LLFontGL::sSansSerifSmall );
99 mNoAssetsLabel->setFollowsAll();
100 addChild(mNoAssetsLabel);
101 mNoAssetsLabel->setVisible(FALSE);
102}
103
104void LLFloaterAssetBrowser::createThumbnails()
105{
106 LLViewerInventoryCategory::cat_array_t cats;
107 LLViewerInventoryItem::item_array_t items;
108 LLIsType isType(LLAssetType::AT_TEXTURE);
109
110 gInventory.collectDescendentsIf(LLUUID::null,
111 cats,
112 items,
113 LLInventoryModel::INCLUDE_TRASH,
114 isType);
115
116 //Get UUID, asset UUID and name
117 for(S32 i = 0; i < items.count(); i++)
118 {
119 LLInventoryItem* itemp = items[i];
120 LLAssetSelection temp;
121 temp.mAssetUUID = itemp->getAssetUUID();
122 temp.mUUID = itemp->getUUID();
123 temp.mName = itemp->getName();
124 temp.mTexturep = NULL;
125 temp.mAssetRect = LLRect::null;
126 mTextureAssets.push_back(temp);
127 }
128
129 //Get Texturep
130 for(S32 i = 0; i < items.count(); i++)
131 {
132 mTextureAssets[i].mTexturep = gImageList.getImage(mTextureAssets[i].mAssetUUID, MIPMAP_YES, IMMEDIATE_NO);
133 mTextureAssets[i].mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
134 //mTextureAssets[i].mTexturep->processTextureStats();
135 }
136
137 //Generate the asset info text
138 /*for(S32 i = 0; i < items.count(); i++)
139 {
140 LLString asset_info;
141 LLString dimensions;
142
143 asset_info.append(mTextureAssets[i].mName);
144
145 //if(mTextureAssets[i].mTexturep->mFullWidth == 0
146 //|| mTextureAssets[i].mTexturep->mFullHeight == 0)
147
148 dimensions = llformat("\n%d x %d",
149 mTextureAssets[i].mTexturep->mFullWidth,
150 mTextureAssets[i].mTexturep->mFullHeight);
151 asset_info.append(dimensions);
152
153 mTextureAssets[i].mAssetInfo = asset_info;
154 }*/
155
156 mFloaterTitle = llformat("Asset Browser (%d assets fetched)", mTextureAssets.size());
157 setTitle(mFloaterTitle);
158}
159
160// virtual
161BOOL LLFloaterAssetBrowser::handleHover(S32 x, S32 y, MASK mask)
162{
163 if(mTextureAssets.size() > 0)
164 {
165 for(U32 i = mFirstIndex; i < mMaxIndex; i++)
166 {
167 if(i < mTextureAssets.size())
168 {
169 if(mTextureAssets[i].mAssetRect.pointInRect(x,y))
170 {
171 mMouseOverUUID = mTextureAssets[i].mUUID;
172 mMouseOverIndex = i;
173
174 if(hasMouseCapture())
175 {
176 S32 screen_x;
177 S32 screen_y;
178 LLUUID mObjectUUID= LLUUID::null;
179 const LLViewerInventoryItem *item = gInventory.getItem(mMouseOverUUID);
180
181 localPointToScreen(x, y, &screen_x, &screen_y );
182
183 if(item && item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID())
184 && LLToolDragAndDrop::getInstance()->isOverThreshold(screen_x, screen_y))
185 {
186 EDragAndDropType type;
187 type = LLAssetType::lookupDragAndDropType(item->getType());
188 LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_LIBRARY;
189
190 if(!mObjectUUID.isNull())
191 {
192 src = LLToolDragAndDrop::SOURCE_WORLD;
193 }
194 else if(item->getPermissions().getOwner() == gAgent.getID())
195 {
196 src = LLToolDragAndDrop::SOURCE_AGENT;
197 }
198 LLToolDragAndDrop::getInstance()->beginDrag(type,
199 item->getUUID(),
200 src,
201 mObjectUUID);
202 return LLToolDragAndDrop::getInstance()->handleHover(x, y, mask);
203 }
204 return TRUE;
205 }
206 return LLFloater::handleHover(x, y, mask);
207 }
208 }
209 }
210 return LLFloater::handleHover(x, y, mask);
211 }
212 else
213 {
214 mMouseOverUUID = LLUUID::null;
215 return LLFloater::handleHover(x, y, mask);
216 }
217}
218
219// virtual
220BOOL LLFloaterAssetBrowser::handleMouseDown(S32 x, S32 y, MASK mask)
221{
222 if(mTextureAssets.size() > 0)
223 {
224 if(mTextureAssets[mMouseOverIndex].mAssetRect.pointInRect(x,y))
225 {
226 if(mMouseOverUUID.notNull())
227 {
228 gFocusMgr.setMouseCapture(this);
229 S32 screen_x;
230 S32 screen_y;
231 localPointToScreen(x, y, &screen_x, &screen_y);
232 LLToolDragAndDrop::getInstance()->setDragStart(screen_x, screen_y);
233 return TRUE;
234 }
235 }
236 }
237 return LLFloater::handleMouseDown(x, y, mask);
238}
239
240// virtual
241BOOL LLFloaterAssetBrowser::handleMouseUp(S32 x, S32 y, MASK mask)
242{
243 if(hasMouseCapture())
244 {
245 gFocusMgr.setMouseCapture(NULL);
246 return TRUE;
247 }
248 return LLFloater::handleMouseUp(x, y, mask);
249}
250
251// virtual
252BOOL LLFloaterAssetBrowser::handleDoubleClick(S32 x, S32 y, MASK mask)
253{
254 if(mTextureAssets.size() > 0)
255 {
256 if(mTextureAssets[mMouseOverIndex].mAssetRect.pointInRect(x,y))
257 {
258 if(mMouseOverUUID.notNull())
259 {
260 open_texture(mMouseOverUUID, mTextureAssets[mMouseOverIndex].mName, FALSE);
261 return TRUE;
262 }
263 }
264 }
265 return LLFloater::handleDoubleClick(x, y, mask);
266}
267
268// virtual
269void LLFloaterAssetBrowser::draw()
270{
271 LLFloater::draw();
272
273 if(mTextureAssets.size() > 0)
274 {
275 S32 hor_pos = 0;
276 S32 ver_pos = 0;
277 U32 items_per_row = 0;
278 S32 height = getRect().getHeight()/8;
279 S32 width = height;
280
281 for(U32 i = mFirstIndex; i < mMaxIndex; i++)
282 {
283 if(i < mTextureAssets.size())
284 {
285 mTexturep = NULL;
286 mImageAssetID = mTextureAssets[i].mAssetUUID;
287
288 if(mImageAssetID.notNull())
289 {
290 mTexturep = gImageList.getImage(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO);
291 //mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
292 mTexturep->processTextureStats();
293 mTextureAssets[i].mWidth = mTexturep->mFullWidth;
294 mTextureAssets[i].mHeight = mTexturep->mFullHeight;
295 }
296
297 if(isMinimized())
298 {
299 return;
300 }
301
302 //Border
303 LLRect border;
304 border.mLeft = START_POS + ver_pos;
305 border.mTop = getRect().getHeight() - LLFLOATER_HEADER_SIZE - BORDER_PAD - hor_pos;
306 border.mRight = border.mLeft + width;
307 border.mBottom = border.mTop - height;
308
309 //Save the rect for each thumbnail
310 mTextureAssets[i].mAssetRect = border;
311
312 //Asset info rect
313 LLRect info_rect;
314 info_rect.mLeft = border.mLeft;
315 info_rect.mTop = border.mBottom - 3;
316 info_rect.mRight = border.mLeft + 130;
317 info_rect.mBottom = border.mBottom - 2*llround(LLFontGL::sSansSerifSmall->getLineHeight());
318
319 gl_rect_2d(border, LLColor4::black, FALSE);
320
321 // Interior
322 LLRect interior = border;
323 interior.stretch(1);
324
325 //Draw the image
326 if(mTexturep)
327 {
328 if(mTexturep->getComponents() == 4)
329 {
330 gl_rect_2d_checkerboard(interior);
331 }
332
333 gl_draw_scaled_image(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep);
334 // Pump the priority
335 mTexturep->addTextureStats((F32)(interior.getWidth() * interior.getHeight()));
336
337 //Generate the asset info text
338 std::string asset_info;
339 asset_info.append(mTextureAssets[i].mName);
340 std::string dimensions = llformat("\n%d x %d",
341 mTexturep->mFullWidth /*mTextureAssets[i].mWidth*/,
342 mTexturep->mFullHeight /* mTextureAssets[i].mHeight*/);
343 asset_info.append(dimensions);
344
345 // Draw material info below the asset
346 // LLTextBox object has to be drawn only once, not non-stop like image
347 if(mAssetInfoIndex < ITEMS_PER_PAGE &&
348 mAssetInfoIndex < mTextureAssets.size() - mFirstIndex)
349 {
350 mAssetInfoLabel = new LLTextBox("Asset Info"/*mTextureAssets[i].mAssetInfo*/,
351 info_rect,
352 asset_info,
353 LLFontGL::sSansSerifSmall);
354 mAssetInfoLabel->setFollowsAll();
355 mAssetInfoLabelList.push_back(mAssetInfoLabel);
356 addChild(mAssetInfoLabelList[mAssetInfoIndex]);
357 mAssetInfoLabelList[mAssetInfoIndex]->setVisible(TRUE);
358 mAssetInfoIndex++;
359 }
360
361 }
362 else
363 {
364 // Draw X
365 gl_rect_2d(interior, LLColor4::grey, TRUE);
366 gl_draw_x(interior, LLColor4::black);
367 }
368 //Move to the right
369 ver_pos += getRect().getWidth()/6;
370 items_per_row++;
371
372 //Change the row
373 if(items_per_row % 4 == 0)
374 {
375 ver_pos = 0;
376 hor_pos += getRect().getHeight()/4;
377 }
378 }
379 }//for
380
381 //If the size of the floater has changed, clear the asset info texts
382 //in order to draw them again into the new position
383 if(getRect().getWidth() != mFloaterWidth || getRect().getHeight() != mFloaterHeight)
384 {
385 clearAssetInfoTexts();
386 //Save the size of the current floater
387 mFloaterWidth = getRect().getWidth();
388 mFloaterHeight = getRect().getHeight();
389 }
390 if(mMaxIndex >= mTextureAssets.size())
391 {
392 childDisable("button next");
393 childEnable("button previous");
394 }
395 else if(mFirstIndex <= 0)
396 {
397 childEnable("button next");
398 childDisable("button previous");
399 }
400 else
401 {
402 childEnable("button next");
403 childEnable("button previous");
404 }
405 }
406 else
407 {
408 //No assets found
409 mNoAssetsLabel->setVisible(TRUE);
410 childDisable("button next");
411 childDisable("button previous");
412 }
413}
414
415void LLFloaterAssetBrowser::clearAssetInfoTexts()
416{
417 for(U32 i = 0; i < mAssetInfoLabelList.size(); i++)
418 {
419 delete mAssetInfoLabelList[i];
420 mAssetInfoLabelList[i] = NULL;
421 }
422 mAssetInfoLabelList.clear();
423 mAssetInfoIndex = 0;
424}
425
426void LLFloaterAssetBrowser::clearNoAssetsText()
427{
428 if(mTextureAssets.size() > 0)
429 {
430 delete mNoAssetsLabel;
431 mNoAssetsLabel = NULL;
432 }
433}
434
435// static
436void LLFloaterAssetBrowser::onClickNext(void *userdata)
437{
438 LLFloaterAssetBrowser* self = (LLFloaterAssetBrowser*)userdata;
439 self->mFirstIndex = self->mMaxIndex;
440 self->mMaxIndex = self->mFirstIndex + ITEMS_PER_PAGE;
441 self->clearAssetInfoTexts();
442}
443
444// static
445void LLFloaterAssetBrowser::onClickPrevious(void *userdata)
446{
447 LLFloaterAssetBrowser* self = (LLFloaterAssetBrowser*)userdata;
448 self->mFirstIndex = self->mMaxIndex - (2 * ITEMS_PER_PAGE);
449 self->mMaxIndex = self->mMaxIndex - ITEMS_PER_PAGE;
450 self->clearAssetInfoTexts();
451}
452
453// static
454void LLFloaterAssetBrowser::onClickRefresh(void *userdata)
455{
456 LLFloaterAssetBrowser* self = (LLFloaterAssetBrowser*)userdata;
457 for(U32 i = 0; i < self->mTextureAssets.size(); i++)
458 {
459 self->mTextureAssets[i].mTexturep = NULL;
460 }
461
462 self->mTextureAssets.clear();
463 self->createThumbnails();
464 self->clearNoAssetsText();
465 self->clearAssetInfoTexts();
466}
diff --git a/linden/indra/newview/llfloaterassetbrowser.h b/linden/indra/newview/llfloaterassetbrowser.h
new file mode 100644
index 0000000..76eb3ba
--- /dev/null
+++ b/linden/indra/newview/llfloaterassetbrowser.h
@@ -0,0 +1,84 @@
1/**
2 * @file llfloaterassetbrowser.h
3 * @brief LLFloaterAssetBrowser class implementation
4 * Phox wuz hurr
5 */
6
7#ifndef LL_LLFLOATERASSETBROWSERVIEW_H
8#define LL_LLFLOATERASSETBROWSERVIEW_H
9
10#include "llfloater.h"
11#include "llinventorymodel.h"
12#include "llview.h"
13#include "llviewerimage.h"
14
15class LLInventoryPanel;
16
17struct LLAssetSelection
18{
19 LLUUID mUUID;
20 LLUUID mAssetUUID;
21 std::string mName;
22 std::string mAssetInfo;
23 S32 mWidth;
24 S32 mHeight;
25 LLTextBox* mAssetInfoTextBox;
26 LLPointer<LLViewerImage> mTexturep;
27 LLRect mAssetRect;
28};
29
30class LLFloaterAssetBrowser : public LLFloater
31{
32public:
33 LLFloaterAssetBrowser();
34
35 virtual ~LLFloaterAssetBrowser();
36
37 static void show(void*);
38
39 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
40 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
41 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
42 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
43 virtual void draw();
44
45 static LLFloaterAssetBrowser* getInstance(){ return sInstance; }
46
47private:
48 void initialize();
49 void createThumbnails();
50 void clearAssetInfoTexts();
51 void clearNoAssetsText();
52
53 static void onClickNext(void *userdata);
54 static void onClickPrevious(void *userdata);
55 static void onClickRefresh(void *userdata);
56
57 static LLFloaterAssetBrowser* sInstance;
58
59protected:
60 LLInventoryPanel* mInventoryPanel;
61 LLUUID mImageAssetID;
62 LLUUID mMouseOverUUID;
63 LLUUID mMouseOverAssetUUID;
64 LLPointer<LLViewerImage> mTexturep;
65 std::vector<LLAssetSelection> mTextureAssets;
66 std::vector<LLTextBox*> mAssetInfoLabelList;
67 U32 mLastIndex;
68 U32 mMaxIndex;
69 U32 mFirstIndex;
70 U32 mAssetInfoIndex;
71 S32 mFloaterHeight;
72 S32 mFloaterWidth;
73 S32 mMouseOverIndex;
74 LLTextBox* mNoAssetsLabel;
75 LLTextBox* mAssetInfoLabel;
76 std::string mFloaterTitle;
77};
78
79static const S32 HPAD = 4;
80static const S32 BORDER_PAD = HPAD;
81static const U32 ITEMS_PER_PAGE = 16;
82static const S32 START_POS = 250;
83
84#endif
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp
index 4cc721e..68aaceb 100644
--- a/linden/indra/newview/llfloaterchat.cpp
+++ b/linden/indra/newview/llfloaterchat.cpp
@@ -56,10 +56,11 @@
56#include "llfloaterchatterbox.h" 56#include "llfloaterchatterbox.h"
57#include "llfloatermute.h" 57#include "llfloatermute.h"
58#include "llkeyboard.h" 58#include "llkeyboard.h"
59//#include "lllineeditor.h" 59#include "lllineeditor.h"
60#include "llmutelist.h" 60#include "llmutelist.h"
61//#include "llresizehandle.h" 61//#include "llresizehandle.h"
62#include "llchatbar.h" 62#include "llchatbar.h"
63#include "llspinctrl.h"
63#include "llstatusbar.h" 64#include "llstatusbar.h"
64#include "llviewertexteditor.h" 65#include "llviewertexteditor.h"
65#include "llviewergesture.h" // for triggering gestures 66#include "llviewergesture.h" // for triggering gestures
@@ -227,6 +228,34 @@ void log_chat_text(const LLChat& chat)
227 228
228 LLLogChat::saveHistory(std::string("chat"),histstr); 229 LLLogChat::saveHistory(std::string("chat"),histstr);
229} 230}
231
232// static
233void LLFloaterChat::toggleHistoryChannelControl()
234{
235 LLFloaterChat* chat_floater = LLFloaterChat::getInstance(LLSD());
236 BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect");
237 BOOL control = chat_floater->getChild<LLSpinCtrl>("channel_control")->getVisible();
238
239 LLLineEditor* input = chat_floater->getChild<LLLineEditor>("Chat Editor");
240 LLRect input_rect = input->getRect();
241 S32 chan_width = chat_floater->getChild<LLSpinCtrl>("channel_control")->getRect().getWidth();
242
243 if (visible && !control)
244 {
245 input_rect.setLeftTopAndSize(input_rect.mLeft+chan_width+4, input_rect.mTop,
246 input_rect.getWidth()-chan_width, input_rect.getHeight());
247 }
248 else if (!visible && control)
249 {
250 input_rect.setLeftTopAndSize(input_rect.mLeft-chan_width-4, input_rect.mTop,
251 input_rect.getWidth()+chan_width, input_rect.getHeight());
252 }
253 input->setRect(input_rect);
254
255 chat_floater->childSetVisible("channel_control", visible);
256 chat_floater->childSetEnabled("channel_control", visible);
257}
258
230// static 259// static
231void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) 260void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
232{ 261{
diff --git a/linden/indra/newview/llfloaterchat.h b/linden/indra/newview/llfloaterchat.h
index 923fd9a..203a158 100644
--- a/linden/indra/newview/llfloaterchat.h
+++ b/linden/indra/newview/llfloaterchat.h
@@ -82,6 +82,8 @@ public:
82 static void* createSpeakersPanel(void* data); 82 static void* createSpeakersPanel(void* data);
83 static void* createChatPanel(void* data); 83 static void* createChatPanel(void* data);
84 84
85 static void toggleHistoryChannelControl();
86
85 // visibility policy for LLUISingleton 87 // visibility policy for LLUISingleton
86 static bool visible(LLFloater* instance, const LLSD& key); 88 static bool visible(LLFloater* instance, const LLSD& key);
87 static void show(LLFloater* instance, const LLSD& key); 89 static void show(LLFloater* instance, const LLSD& key);
diff --git a/linden/indra/newview/llfloatertelehub.cpp b/linden/indra/newview/llfloatertelehub.cpp
index 943bc36..062306b 100644
--- a/linden/indra/newview/llfloatertelehub.cpp
+++ b/linden/indra/newview/llfloatertelehub.cpp
@@ -68,7 +68,6 @@ void LLFloaterTelehub::show()
68 // Find tools floater, glue to bottom 68 // Find tools floater, glue to bottom
69 if (gFloaterTools) 69 if (gFloaterTools)
70 { 70 {
71 gFloaterTools->showMore(FALSE);
72 LLRect tools_rect = gFloaterTools->getRect(); 71 LLRect tools_rect = gFloaterTools->getRect();
73 S32 our_width = sInstance->getRect().getWidth(); 72 S32 our_width = sInstance->getRect().getWidth();
74 S32 our_height = sInstance->getRect().getHeight(); 73 S32 our_height = sInstance->getRect().getHeight();
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index 84a1edc..b63138f 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -54,6 +54,7 @@
54#include "llpanelobject.h" 54#include "llpanelobject.h"
55#include "llpanelvolume.h" 55#include "llpanelvolume.h"
56#include "llpanelpermissions.h" 56#include "llpanelpermissions.h"
57#include "llresmgr.h"
57#include "llselectmgr.h" 58#include "llselectmgr.h"
58#include "llslider.h" 59#include "llslider.h"
59#include "llstatusbar.h" 60#include "llstatusbar.h"
@@ -321,7 +322,7 @@ BOOL LLFloaterTools::postBuild()
321 322
322 mSliderDozerSize = getChild<LLSlider>("slider brush size"); 323 mSliderDozerSize = getChild<LLSlider>("slider brush size");
323 childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0); 324 childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0);
324 childSetValue( "slider brush size", gSavedSettings.getS32("LandBrushSize")); 325 childSetValue( "slider brush size", gSavedSettings.getF32("LandBrushSize"));
325 326
326 327
327 mSliderDozerForce = getChild<LLSlider>("slider force"); 328 mSliderDozerForce = getChild<LLSlider>("slider force");
@@ -329,14 +330,10 @@ BOOL LLFloaterTools::postBuild()
329 // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here 330 // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here
330 childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce"))); 331 childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce")));
331 332
332 childSetAction("button more", click_show_more, this);
333 childSetAction("button less", click_show_more, this);
334 mTab = getChild<LLTabContainer>("Object Info Tabs"); 333 mTab = getChild<LLTabContainer>("Object Info Tabs");
335 if(mTab) 334 if(mTab)
336 { 335 {
337 mTab->setVisible( gSavedSettings.getBOOL("ToolboxShowMore") );
338 mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); 336 mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
339 mTab->setVisible( gSavedSettings.getBOOL("ToolboxShowMore") );
340 mTab->setBorderVisible(FALSE); 337 mTab->setBorderVisible(FALSE);
341 mTab->selectFirstTab(); 338 mTab->selectFirstTab();
342 } 339 }
@@ -436,19 +433,6 @@ LLFloaterTools::LLFloaterTools()
436 factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo 433 factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo
437 434
438 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE); 435 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE);
439
440 mLargeHeight = getRect().getHeight();
441 mSmallHeight = mLargeHeight;
442 if (mTab) mSmallHeight -= mTab->getRect().getHeight();
443
444 // force a toggle initially. seems to be needed to correctly initialize
445 // both "more" and "less" cases. it also seems to be important to begin
446 // with the user's preference first so that it's initial position will
447 // be correct (SL-51192) -MG
448 BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference
449 gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below
450 showMore( !show_more ); // does the toggle
451 showMore( show_more ); // reset the real user's preference
452} 436}
453 437
454LLFloaterTools::~LLFloaterTools() 438LLFloaterTools::~LLFloaterTools()
@@ -492,6 +476,16 @@ void LLFloaterTools::refresh()
492 mTab->enableTabButton(idx_face, all_volume); 476 mTab->enableTabButton(idx_face, all_volume);
493 mTab->enableTabButton(idx_contents, all_volume); 477 mTab->enableTabButton(idx_contents, all_volume);
494 478
479 // Refresh object and prim count labels
480 LLLocale locale(LLLocale::USER_LOCALE);
481 std::string obj_count_string;
482 LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
483 childSetTextArg("obj_count", "[COUNT]", obj_count_string);
484 std::string prim_count_string;
485 LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());
486 childSetTextArg("prim_count", "[COUNT]", prim_count_string);
487
488 // Refresh child tabs
495 mPanelPermissions->refresh(); 489 mPanelPermissions->refresh();
496 mPanelObject->refresh(); 490 mPanelObject->refresh();
497 mPanelVolume->refresh(); 491 mPanelVolume->refresh();
@@ -799,8 +793,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
799 if (mSliderDozerSize) 793 if (mSliderDozerSize)
800 { 794 {
801 mSliderDozerSize ->setVisible( land_visible ); 795 mSliderDozerSize ->setVisible( land_visible );
802 childSetVisible("Brush:", land_visible); 796 childSetVisible("Bulldozer:", land_visible);
803 childSetVisible("Brush Size:", land_visible); 797 childSetVisible("Dozer Size:", land_visible);
804 } 798 }
805 if (mCheckShowOwners) 799 if (mCheckShowOwners)
806 { 800 {
@@ -812,13 +806,10 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
812 childSetVisible("Strength:", land_visible); 806 childSetVisible("Strength:", land_visible);
813 } 807 }
814 808
815 // 809 childSetVisible("obj_count", !land_visible);
816 // More panel visibility 810 childSetVisible("prim_count", !land_visible);
817 // 811 mTab->setVisible(!land_visible);
818 BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); 812 mPanelLandInfo->setVisible(land_visible);
819
820 mTab->setVisible(show_more && tool != LLToolBrushLand::getInstance() && tool != LLToolSelectLand::getInstance());
821 mPanelLandInfo->setVisible(show_more && (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance()));
822} 813}
823 814
824 815
@@ -873,46 +864,12 @@ void LLFloaterTools::onClose(bool app_quitting)
873 // gMenuBarView->arrange(); 864 // gMenuBarView->arrange();
874} 865}
875 866
876void LLFloaterTools::showMore(BOOL show_more)
877{
878 BOOL showing_more = gSavedSettings.getBOOL("ToolboxShowMore");
879 if (show_more == showing_more)
880 {
881 return;
882 }
883
884 gSavedSettings.setBOOL("ToolboxShowMore", show_more);
885
886 // Visibility updated next frame - JC
887 // mTab->setVisible(show_more);
888
889 if (show_more)
890 {
891 reshape( getRect().getWidth(), mLargeHeight, TRUE);
892 translate( 0, mSmallHeight - mLargeHeight );
893 }
894 else
895 {
896 reshape( getRect().getWidth(), mSmallHeight, TRUE);
897 translate( 0, mLargeHeight - mSmallHeight );
898 }
899 childSetVisible("button less", show_more);
900 childSetVisible("button more", !show_more);
901}
902
903void LLFloaterTools::showPanel(EInfoPanel panel) 867void LLFloaterTools::showPanel(EInfoPanel panel)
904{ 868{
905 llassert(panel >= 0 && panel < PANEL_COUNT); 869 llassert(panel >= 0 && panel < PANEL_COUNT);
906 mTab->selectTabByName(PANEL_NAMES[panel]); 870 mTab->selectTabByName(PANEL_NAMES[panel]);
907} 871}
908 872
909void click_show_more(void *userdata)
910{
911 LLFloaterTools *f = (LLFloaterTools *)userdata;
912 BOOL show_more = !gSavedSettings.getBOOL("ToolboxShowMore");
913 f->showMore( show_more );
914}
915
916void click_popup_info(void*) 873void click_popup_info(void*)
917{ 874{
918// gBuildView->setPropertiesPanelOpen(TRUE); 875// gBuildView->setPropertiesPanelOpen(TRUE);
@@ -997,8 +954,8 @@ void click_popup_dozer_mode(LLUICtrl *, void *user)
997 954
998void commit_slider_dozer_size(LLUICtrl *ctrl, void*) 955void commit_slider_dozer_size(LLUICtrl *ctrl, void*)
999{ 956{
1000 S32 size = (S32)ctrl->getValue().asInteger(); 957 F32 size = (F32)ctrl->getValue().asReal();
1001 gSavedSettings.setS32("LandBrushSize", size); 958 gSavedSettings.setF32("LandBrushSize", size);
1002} 959}
1003 960
1004void commit_slider_dozer_force(LLUICtrl *ctrl, void*) 961void commit_slider_dozer_force(LLUICtrl *ctrl, void*)
@@ -1086,15 +1043,15 @@ void LLFloaterTools::onFocusReceived()
1086 1043
1087void LLFloaterTools::updateTreeGrassCombo(bool visible) 1044void LLFloaterTools::updateTreeGrassCombo(bool visible)
1088{ 1045{
1046 LLTextBox* tree_grass_label = getChild<LLTextBox>("tree_grass_label");
1089 if (visible) 1047 if (visible)
1090 { 1048 {
1091 LLPCode pcode = LLToolPlacer::getObjectType(); 1049 LLPCode pcode = LLToolPlacer::getObjectType();
1092 std::map<std::string, S32>::iterator it, end; 1050 std::map<std::string, S32>::iterator it, end;
1093 std::string selected; 1051 std::string selected;
1094 LLTextBox* tree_grass_label = getChild<LLTextBox>("tree_grass_label");
1095 if (pcode == LLToolPlacerPanel::sTree) 1052 if (pcode == LLToolPlacerPanel::sTree)
1096 { 1053 {
1097 tree_grass_label->setVisible(true); 1054 tree_grass_label->setVisible(visible);
1098 LLButton* button = getChild<LLButton>("ToolTree"); 1055 LLButton* button = getChild<LLButton>("ToolTree");
1099 tree_grass_label->setText(button->getToolTip()); 1056 tree_grass_label->setText(button->getToolTip());
1100 1057
@@ -1104,7 +1061,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
1104 } 1061 }
1105 else if (pcode == LLToolPlacerPanel::sGrass) 1062 else if (pcode == LLToolPlacerPanel::sGrass)
1106 { 1063 {
1107 tree_grass_label->setVisible(true); 1064 tree_grass_label->setVisible(visible);
1108 LLButton* button = getChild<LLButton>("ToolGrass"); 1065 LLButton* button = getChild<LLButton>("ToolGrass");
1109 tree_grass_label->setText(button->getToolTip()); 1066 tree_grass_label->setText(button->getToolTip());
1110 1067
@@ -1140,6 +1097,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
1140 } 1097 }
1141 1098
1142 mComboTreesGrass->setVisible(visible); 1099 mComboTreesGrass->setVisible(visible);
1100 tree_grass_label->setVisible(visible);
1143} 1101}
1144 1102
1145// static 1103// static
diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h
index 8f88977..1b13b9f 100644
--- a/linden/indra/newview/llfloatertools.h
+++ b/linden/indra/newview/llfloatertools.h
@@ -95,14 +95,12 @@ public:
95 /*virtual*/ void draw(); 95 /*virtual*/ void draw();
96 96
97 void dirty(); 97 void dirty();
98 void showMore(BOOL show_more);
99 void showPanel(EInfoPanel panel); 98 void showPanel(EInfoPanel panel);
100 99
101 void setStatusText(const std::string& text); 100 void setStatusText(const std::string& text);
102 virtual void onFocusReceived(); 101 virtual void onFocusReceived();
103 static void setEditTool(void* data); 102 static void setEditTool(void* data);
104 void saveLastTool(); 103 void saveLastTool();
105
106private: 104private:
107 static void setObjectType( void* data ); 105 static void setObjectType( void* data );
108 106
@@ -198,8 +196,6 @@ public:
198 196
199private: 197private:
200 BOOL mDirty; 198 BOOL mDirty;
201 S32 mSmallHeight;
202 S32 mLargeHeight;
203 199
204 std::map<std::string, std::string> mStatusText; 200 std::map<std::string, std::string> mStatusText;
205 201
diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp
index 66c6cdd..24bbab6 100644
--- a/linden/indra/newview/llpanelpermissions.cpp
+++ b/linden/indra/newview/llpanelpermissions.cpp
@@ -84,6 +84,7 @@ BOOL LLPanelPermissions::postBuild()
84 84
85 85
86 this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this); 86 this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this);
87 this->childSetAction("button last owner profile",LLPanelPermissions::onClickLastOwner,this);
87 this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this); 88 this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this);
88 89
89 this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this); 90 this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this);
@@ -177,6 +178,11 @@ void LLPanelPermissions::refresh()
177 childSetEnabled("Owner Name",false); 178 childSetEnabled("Owner Name",false);
178 childSetEnabled("button owner profile",false); 179 childSetEnabled("button owner profile",false);
179 180
181 childSetEnabled("Last Owner:",false);
182 childSetText("Last Owner Name",LLStringUtil::null);
183 childSetEnabled("Last Owner Name",false);
184 childSetEnabled("button last owner profile",false);
185
180 childSetEnabled("Group:",false); 186 childSetEnabled("Group:",false);
181 childSetText("Group Name",LLStringUtil::null); 187 childSetText("Group Name",LLStringUtil::null);
182 childSetEnabled("Group Name",false); 188 childSetEnabled("Group Name",false);
@@ -190,9 +196,6 @@ void LLPanelPermissions::refresh()
190 childSetEnabled("Description:",false); 196 childSetEnabled("Description:",false);
191 childSetText("Object Description",LLStringUtil::null); 197 childSetText("Object Description",LLStringUtil::null);
192 childSetEnabled("Object Description",false); 198 childSetEnabled("Object Description",false);
193
194 childSetText("prim info",LLStringUtil::null);
195 childSetEnabled("prim info",false);
196 199
197 childSetEnabled("Permissions:",false); 200 childSetEnabled("Permissions:",false);
198 201
@@ -299,6 +302,8 @@ void LLPanelPermissions::refresh()
299 owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); 302 owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name);
300 303
301// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; 304// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl;
305 std::string last_owner_name;
306 LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name);
302 307
303 if (mOwnerID.isNull()) 308 if (mOwnerID.isNull())
304 { 309 {
@@ -309,8 +314,8 @@ void LLPanelPermissions::refresh()
309 else 314 else
310 { 315 {
311 // Display last owner if public 316 // Display last owner if public
312 std::string last_owner_name; 317 //std::string last_owner_name;
313 LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); 318 //LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name);
314 319
315 // It should never happen that the last owner is null and the owner 320 // It should never happen that the last owner is null and the owner
316 // is null, but it seems to be a bug in the simulator right now. JC 321 // is null, but it seems to be a bug in the simulator right now. JC
@@ -343,6 +348,19 @@ void LLPanelPermissions::refresh()
343 fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); 348 fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
344// [/RLVa:KB] 349// [/RLVa:KB]
345 350
351 if (owner_name != last_owner_name)
352 {
353 childSetText("Last Owner Name", last_owner_name);
354 childSetEnabled("Last Owner Name", TRUE);
355 childSetEnabled("button last owner profile", TRUE);
356 }
357 else
358 {
359 childSetText("Last Owner Name", LLStringUtil::null);
360 childSetEnabled("Last Owner Name", FALSE);
361 childSetEnabled("button last owner profile", FALSE);
362 }
363
346 // update group text field 364 // update group text field
347 childSetEnabled("Group:",true); 365 childSetEnabled("Group:",true);
348 childSetText("Group Name",LLStringUtil::null); 366 childSetText("Group Name",LLStringUtil::null);
@@ -405,33 +423,6 @@ void LLPanelPermissions::refresh()
405 childSetEnabled("Object Description",false); 423 childSetEnabled("Object Description",false);
406 } 424 }
407 425
408
409 // Pre-compute object info string
410 S32 prim_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
411 S32 obj_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
412
413 std::string object_info_string;
414 if (1 == obj_count)
415 {
416 object_info_string.assign("1 Object, ");
417 }
418 else
419 {
420 object_info_string = llformat( "%d Objects, ", obj_count);
421 }
422 if (1 == prim_count)
423 {
424 object_info_string.append("1 Primitive");
425 }
426 else
427 {
428 std::string buffer;
429 buffer = llformat( "%d Primitives", prim_count);
430 object_info_string.append(buffer);
431 }
432 childSetText("prim info",object_info_string);
433 childSetEnabled("prim info",true);
434
435 S32 total_sale_price = 0; 426 S32 total_sale_price = 0;
436 S32 individual_sale_price = 0; 427 S32 individual_sale_price = 0;
437 BOOL is_for_sale_mixed = FALSE; 428 BOOL is_for_sale_mixed = FALSE;
@@ -888,6 +879,16 @@ void LLPanelPermissions::onClickOwner(void *data)
888 } 879 }
889} 880}
890 881
882void LLPanelPermissions::onClickLastOwner(void *data)
883{
884 LLPanelPermissions *self = (LLPanelPermissions *)data;
885
886 if ( self->mLastOwnerID.notNull() )
887 {
888 LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID);
889 }
890}
891
891void LLPanelPermissions::onClickGroup(void* data) 892void LLPanelPermissions::onClickGroup(void* data)
892{ 893{
893 LLPanelPermissions* panelp = (LLPanelPermissions*)data; 894 LLPanelPermissions* panelp = (LLPanelPermissions*)data;
diff --git a/linden/indra/newview/llpanelpermissions.h b/linden/indra/newview/llpanelpermissions.h
index 3b73254..57339ed 100644
--- a/linden/indra/newview/llpanelpermissions.h
+++ b/linden/indra/newview/llpanelpermissions.h
@@ -68,6 +68,7 @@ protected:
68 static void onClickRelease(void*); 68 static void onClickRelease(void*);
69 static void onClickCreator(void*); 69 static void onClickCreator(void*);
70 static void onClickOwner(void*); 70 static void onClickOwner(void*);
71 static void onClickLastOwner(void*);
71 static void onClickGroup(void*); 72 static void onClickGroup(void*);
72 static void cbGroupID(LLUUID group_id, void* userdata); 73 static void cbGroupID(LLUUID group_id, void* userdata);
73 static void onClickDeedToGroup(void*); 74 static void onClickDeedToGroup(void*);
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index 4453751..f3b7278 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -32,6 +32,8 @@
32 32
33#include "llviewerprecompiledheaders.h" 33#include "llviewerprecompiledheaders.h"
34 34
35#include "llchatbar.h"
36#include "llfloaterchat.h"
35#include "llprefschat.h" 37#include "llprefschat.h"
36#include "lltexteditor.h" 38#include "lltexteditor.h"
37#include "llviewercontrol.h" 39#include "llviewercontrol.h"
@@ -69,11 +71,11 @@ protected:
69 BOOL mPlayTypingAnim; 71 BOOL mPlayTypingAnim;
70 BOOL mChatBubbles; 72 BOOL mChatBubbles;
71 BOOL mScriptErrorAsChat; 73 BOOL mScriptErrorAsChat;
74 BOOL mChatChannel;
72 F32 mConsoleOpacity; 75 F32 mConsoleOpacity;
73 F32 mBubbleOpacity; 76 F32 mBubbleOpacity;
74}; 77};
75 78
76
77LLPrefsChatImpl::LLPrefsChatImpl() 79LLPrefsChatImpl::LLPrefsChatImpl()
78 : LLPanel(std::string("Chat Panel")) 80 : LLPanel(std::string("Chat Panel"))
79{ 81{
@@ -101,6 +103,7 @@ LLPrefsChatImpl::LLPrefsChatImpl()
101 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth")); 103 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth"));
102 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn")); 104 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn"));
103 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); 105 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim"));
106 childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect"));
104 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); 107 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity"));
105 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); 108 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity"));
106 109
@@ -124,6 +127,7 @@ LLPrefsChatImpl::LLPrefsChatImpl()
124 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth"); 127 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth");
125 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn"); 128 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn");
126 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); 129 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim");
130 mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect");
127 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); 131 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity");
128 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); 132 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity");
129} 133}
@@ -149,6 +153,7 @@ void LLPrefsChatImpl::cancel()
149 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth); 153 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth);
150 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn); 154 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn);
151 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); 155 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim);
156 gSavedSettings.setBOOL("ChatChannelSelect", mChatChannel);
152 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); 157 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity);
153 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); 158 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity);
154} 159}
@@ -181,8 +186,21 @@ void LLPrefsChatImpl::apply()
181 186
182 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); 187 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal());
183 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); 188 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal());
189
190 BOOL chan_check = childGetValue("toggle_channel_control");
191 gSavedSettings.setBOOL("ChatChannelSelect", chan_check);
192 if (mChatChannel != chan_check)
193 {
194 if (gChatBar)
195 {
196 gChatBar->toggleChannelControl();
197 LLFloaterChat::toggleHistoryChannelControl();
198 }
199 mChatChannel = chan_check;
200 }
184} 201}
185 202
203
186//--------------------------------------------------------------------------- 204//---------------------------------------------------------------------------
187 205
188LLPrefsChat::LLPrefsChat() 206LLPrefsChat::LLPrefsChat()
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp
index 429bed9..5cb14fc 100644
--- a/linden/indra/newview/llprefsim.cpp
+++ b/linden/indra/newview/llprefsim.cpp
@@ -58,7 +58,7 @@ public:
58 void cancel(); 58 void cancel();
59 void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); 59 void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email);
60 void enableHistory(); 60 void enableHistory();
61 61
62 static void onClickLogPath(void* user_data); 62 static void onClickLogPath(void* user_data);
63 static void onCommitLogging(LLUICtrl* ctrl, void* user_data); 63 static void onCommitLogging(LLUICtrl* ctrl, void* user_data);
64 64
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 2dc4e74..8d5aa9e 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -2484,6 +2484,10 @@ bool idle_startup()
2484 2484
2485 // Have the agent start watching the friends list so we can update proxies 2485 // Have the agent start watching the friends list so we can update proxies
2486 gAgent.observeFriends(); 2486 gAgent.observeFriends();
2487
2488 // Start loading inventory
2489 gInventory.startBackgroundFetch();
2490
2487 if (gSavedSettings.getBOOL("LoginAsGod")) 2491 if (gSavedSettings.getBOOL("LoginAsGod"))
2488 { 2492 {
2489 gAgent.requestEnterGodMode(); 2493 gAgent.requestEnterGodMode();
diff --git a/linden/indra/newview/lltool.cpp b/linden/indra/newview/lltool.cpp
index 99dbe31..9dfd86b 100644
--- a/linden/indra/newview/lltool.cpp
+++ b/linden/indra/newview/lltool.cpp
@@ -64,7 +64,6 @@ LLTool::~LLTool()
64 } 64 }
65} 65}
66 66
67
68BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask) 67BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
69{ 68{
70 if (gDebugClicks) 69 if (gDebugClicks)
@@ -124,6 +123,20 @@ BOOL LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask)
124 // llinfos << "LLTool::handleRightMouseDown" << llendl; 123 // llinfos << "LLTool::handleRightMouseDown" << llendl;
125 return FALSE; 124 return FALSE;
126} 125}
126
127BOOL LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask)
128{
129 // by default, didn't handle it
130 // llinfos << "LLTool::handleMiddleMouseDown" << llendl;
131 return FALSE;
132}
133
134BOOL LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
135{
136 // by default, didn't handle it
137 // llinfos << "LLTool::handleMiddleMouseUp" << llendl;
138 return FALSE;
139}
127 140
128BOOL LLTool::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) 141BOOL LLTool::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen)
129{ 142{
diff --git a/linden/indra/newview/lltool.h b/linden/indra/newview/lltool.h
index cf97fb4..73463ba 100644
--- a/linden/indra/newview/lltool.h
+++ b/linden/indra/newview/lltool.h
@@ -56,6 +56,9 @@ public:
56 // Virtual functions inherited from LLMouseHandler 56 // Virtual functions inherited from LLMouseHandler
57 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); 57 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
58 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); 58 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
59 virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
60 virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
61
59 virtual BOOL handleHover(S32 x, S32 y, MASK mask); 62 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
60 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); 63 virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
61 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); 64 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
diff --git a/linden/indra/newview/lltoolbrush.cpp b/linden/indra/newview/lltoolbrush.cpp
index 46b36d9..d23e29d 100644
--- a/linden/indra/newview/lltoolbrush.cpp
+++ b/linden/indra/newview/lltoolbrush.cpp
@@ -96,7 +96,24 @@ LLToolBrushLand::LLToolBrushLand()
96 mGotHover(FALSE), 96 mGotHover(FALSE),
97 mBrushSelected(FALSE) 97 mBrushSelected(FALSE)
98{ 98{
99 mBrushIndex = gSavedSettings.getS32("LandBrushSize"); 99 mBrushSize = gSavedSettings.getF32("LandBrushSize");
100}
101
102
103U8 LLToolBrushLand::getBrushIndex()
104{
105 // find the best index for desired size
106 // (compatibility with old sims, brush_index is now depricated - DEV-8252)
107 U8 index = 0;
108 for (U8 i = 0; i < LAND_BRUSH_SIZE_COUNT; i++)
109 {
110 if (mBrushSize > LAND_BRUSH_SIZE[i])
111 {
112 index = i;
113 }
114 }
115
116 return index;
100} 117}
101 118
102void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, 119void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
@@ -157,7 +174,6 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
157 F32 seconds = (1.0f / gFPSClamped) * gSavedSettings.getF32("LandBrushForce"); 174 F32 seconds = (1.0f / gFPSClamped) * gSavedSettings.getF32("LandBrushForce");
158 F32 x_pos = (F32)pos_region.mV[VX]; 175 F32 x_pos = (F32)pos_region.mV[VX];
159 F32 y_pos = (F32)pos_region.mV[VY]; 176 F32 y_pos = (F32)pos_region.mV[VY];
160 U8 brush_size = (U8)mBrushIndex;
161 LLMessageSystem* msg = gMessageSystem; 177 LLMessageSystem* msg = gMessageSystem;
162 msg->newMessageFast(_PREHASH_ModifyLand); 178 msg->newMessageFast(_PREHASH_ModifyLand);
163 msg->nextBlockFast(_PREHASH_AgentData); 179 msg->nextBlockFast(_PREHASH_AgentData);
@@ -165,7 +181,7 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
165 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 181 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
166 msg->nextBlockFast(_PREHASH_ModifyBlock); 182 msg->nextBlockFast(_PREHASH_ModifyBlock);
167 msg->addU8Fast(_PREHASH_Action, (U8)action); 183 msg->addU8Fast(_PREHASH_Action, (U8)action);
168 msg->addU8Fast(_PREHASH_BrushSize, brush_size); 184 msg->addU8Fast(_PREHASH_BrushSize, getBrushIndex());
169 msg->addF32Fast(_PREHASH_Seconds, seconds); 185 msg->addF32Fast(_PREHASH_Seconds, seconds);
170 msg->addF32Fast(_PREHASH_Height, mStartingZ); 186 msg->addF32Fast(_PREHASH_Height, mStartingZ);
171 msg->nextBlockFast(_PREHASH_ParcelData); 187 msg->nextBlockFast(_PREHASH_ParcelData);
@@ -174,6 +190,8 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
174 msg->addF32Fast(_PREHASH_South, y_pos ); 190 msg->addF32Fast(_PREHASH_South, y_pos );
175 msg->addF32Fast(_PREHASH_East, x_pos ); 191 msg->addF32Fast(_PREHASH_East, x_pos );
176 msg->addF32Fast(_PREHASH_North, y_pos ); 192 msg->addF32Fast(_PREHASH_North, y_pos );
193 msg->nextBlock("ModifyBlockExtended");
194 msg->addF32("BrushSize", mBrushSize);
177 msg->sendMessage(regionp->getHost()); 195 msg->sendMessage(regionp->getHost());
178 } 196 }
179} 197}
@@ -294,7 +312,6 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
294 regionp->forceUpdate(); 312 regionp->forceUpdate();
295 313
296 // tell the simulator what we've done 314 // tell the simulator what we've done
297 U8 brush_size = (U8)mBrushIndex;
298 LLMessageSystem* msg = gMessageSystem; 315 LLMessageSystem* msg = gMessageSystem;
299 msg->newMessageFast(_PREHASH_ModifyLand); 316 msg->newMessageFast(_PREHASH_ModifyLand);
300 msg->nextBlockFast(_PREHASH_AgentData); 317 msg->nextBlockFast(_PREHASH_AgentData);
@@ -302,7 +319,7 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
302 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 319 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
303 msg->nextBlockFast(_PREHASH_ModifyBlock); 320 msg->nextBlockFast(_PREHASH_ModifyBlock);
304 msg->addU8Fast(_PREHASH_Action, (U8)action); 321 msg->addU8Fast(_PREHASH_Action, (U8)action);
305 msg->addU8Fast(_PREHASH_BrushSize, brush_size); 322 msg->addU8Fast(_PREHASH_BrushSize, getBrushIndex());
306 msg->addF32Fast(_PREHASH_Seconds, seconds); 323 msg->addF32Fast(_PREHASH_Seconds, seconds);
307 msg->addF32Fast(_PREHASH_Height, mStartingZ); 324 msg->addF32Fast(_PREHASH_Height, mStartingZ);
308 325
@@ -327,6 +344,9 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
327 msg->addF32Fast(_PREHASH_East, max_region.mV[VX] ); 344 msg->addF32Fast(_PREHASH_East, max_region.mV[VX] );
328 msg->addF32Fast(_PREHASH_North, max_region.mV[VY] ); 345 msg->addF32Fast(_PREHASH_North, max_region.mV[VY] );
329 } 346 }
347
348 msg->nextBlock("ModifyBlockExtended");
349 msg->addF32("BrushSize", mBrushSize);
330 350
331 msg->sendMessage(regionp->getHost()); 351 msg->sendMessage(regionp->getHost());
332 } 352 }
@@ -447,7 +467,8 @@ void LLToolBrushLand::render()
447 spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 ); 467 spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 );
448 spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 ); 468 spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 );
449 469
450 mBrushIndex = gSavedSettings.getS32("LandBrushSize"); 470 mBrushSize = gSavedSettings.getF32("LandBrushSize");
471
451 region_list_t regions; 472 region_list_t regions;
452 determineAffectedRegions(regions, spot); 473 determineAffectedRegions(regions, spot);
453 474
@@ -499,7 +520,7 @@ void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region
499 520
500 S32 i = (S32) pos_region.mV[VX]; 521 S32 i = (S32) pos_region.mV[VX];
501 S32 j = (S32) pos_region.mV[VY]; 522 S32 j = (S32) pos_region.mV[VY];
502 S32 half_edge = llfloor(LAND_BRUSH_SIZE[mBrushIndex]); 523 S32 half_edge = llfloor(mBrushSize);
503 S32 radioAction = gSavedSettings.getS32("RadioLandBrushAction"); 524 S32 radioAction = gSavedSettings.getS32("RadioLandBrushAction");
504 F32 force = gSavedSettings.getF32("LandBrushForce"); // .1 to 100? 525 F32 force = gSavedSettings.getF32("LandBrushForce"); // .1 to 100?
505 526
@@ -556,27 +577,27 @@ void LLToolBrushLand::determineAffectedRegions(region_list_t& regions,
556 const LLVector3d& spot ) const 577 const LLVector3d& spot ) const
557{ 578{
558 LLVector3d corner(spot); 579 LLVector3d corner(spot);
559 corner.mdV[VX] -= (LAND_BRUSH_SIZE[mBrushIndex] / 2); 580 corner.mdV[VX] -= (mBrushSize / 2);
560 corner.mdV[VY] -= (LAND_BRUSH_SIZE[mBrushIndex] / 2); 581 corner.mdV[VY] -= (mBrushSize / 2);
561 LLViewerRegion* region = NULL; 582 LLViewerRegion* region = NULL;
562 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); 583 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner);
563 if(region && regions.find(region) == regions.end()) 584 if(region && regions.find(region) == regions.end())
564 { 585 {
565 regions.insert(region); 586 regions.insert(region);
566 } 587 }
567 corner.mdV[VY] += LAND_BRUSH_SIZE[mBrushIndex]; 588 corner.mdV[VY] += mBrushSize;
568 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); 589 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner);
569 if(region && regions.find(region) == regions.end()) 590 if(region && regions.find(region) == regions.end())
570 { 591 {
571 regions.insert(region); 592 regions.insert(region);
572 } 593 }
573 corner.mdV[VX] += LAND_BRUSH_SIZE[mBrushIndex]; 594 corner.mdV[VX] += mBrushSize;
574 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); 595 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner);
575 if(region && regions.find(region) == regions.end()) 596 if(region && regions.find(region) == regions.end())
576 { 597 {
577 regions.insert(region); 598 regions.insert(region);
578 } 599 }
579 corner.mdV[VY] -= LAND_BRUSH_SIZE[mBrushIndex]; 600 corner.mdV[VY] -= mBrushSize;
580 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner); 601 region = LLWorld::getInstance()->getRegionFromPosGlobal(corner);
581 if(region && regions.find(region) == regions.end()) 602 if(region && regions.find(region) == regions.end())
582 { 603 {
diff --git a/linden/indra/newview/lltoolbrush.h b/linden/indra/newview/lltoolbrush.h
index 8df4b67..f25d6b9 100644
--- a/linden/indra/newview/lltoolbrush.h
+++ b/linden/indra/newview/lltoolbrush.h
@@ -95,11 +95,14 @@ protected:
95 F32 mStartingZ; 95 F32 mStartingZ;
96 S32 mMouseX; 96 S32 mMouseX;
97 S32 mMouseY; 97 S32 mMouseY;
98 S32 mBrushIndex; 98 F32 mBrushSize;
99 BOOL mGotHover; 99 BOOL mGotHover;
100 BOOL mBrushSelected; 100 BOOL mBrushSelected;
101 // Order doesn't matter and we do check for existance of regions, so use a set 101 // Order doesn't matter and we do check for existance of regions, so use a set
102 region_list_t mLastAffectedRegions; 102 region_list_t mLastAffectedRegions;
103
104private:
105 U8 getBrushIndex();
103}; 106};
104 107
105 108
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp
index 93f0254..5a21992 100644
--- a/linden/indra/newview/lltoolpie.cpp
+++ b/linden/indra/newview/lltoolpie.cpp
@@ -676,7 +676,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
676 llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; 676 llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl;
677 } 677 }
678 678
679 if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) 679 if (gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport"))
680 { 680 {
681 if (mPick.mPickType == LLPickInfo::PICK_LAND 681 if (mPick.mPickType == LLPickInfo::PICK_LAND
682 && !mPick.mPosGlobal.isExactlyZero()) 682 && !mPick.mPosGlobal.isExactlyZero())
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 1560414..e83bc2d 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -211,6 +211,9 @@
211#include "lltexlayer.h" 211#include "lltexlayer.h"
212#include "primbackup.h" 212#include "primbackup.h"
213 213
214#include "jcfloater_animation_list.h"
215#include "llfloaterassetbrowser.h"
216
214void init_client_menu(LLMenuGL* menu); 217void init_client_menu(LLMenuGL* menu);
215void init_server_menu(LLMenuGL* menu); 218void init_server_menu(LLMenuGL* menu);
216 219
@@ -2412,28 +2415,40 @@ bool handle_go_to()
2412 std::vector<std::string> strings; 2415 std::vector<std::string> strings;
2413 std::string val; 2416 std::string val;
2414 LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; 2417 LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
2415 val = llformat("%g", pos.mdV[VX]); 2418 if (gSavedSettings.getBOOL("DoubleClickTeleport"))
2416 strings.push_back(val);
2417 val = llformat("%g", pos.mdV[VY]);
2418 strings.push_back(val);
2419 val = llformat("%g", pos.mdV[VZ]);
2420 strings.push_back(val);
2421 send_generic_message("autopilot", strings);
2422
2423 LLViewerParcelMgr::getInstance()->deselectLand();
2424
2425 if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera"))
2426 { 2419 {
2427 gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); 2420 LLVector3d hips_offset(0.0f, 0.0f, 1.2f);
2421 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
2422 gAgent.teleportViaLocation(pos + hips_offset);
2428 } 2423 }
2429 else 2424 else
2430 { 2425 {
2431 // Snap camera back to behind avatar 2426 // JAMESDEBUG try simulator autopilot
2432 gAgent.setFocusOnAvatar(TRUE, ANIMATE); 2427 std::vector<std::string> strings;
2433 } 2428 std::string val;
2429 val = llformat("%g", pos.mdV[VX]);
2430 strings.push_back(val);
2431 val = llformat("%g", pos.mdV[VY]);
2432 strings.push_back(val);
2433 val = llformat("%g", pos.mdV[VZ]);
2434 strings.push_back(val);
2435 send_generic_message("autopilot", strings);
2434 2436
2435 // Could be first use 2437 LLViewerParcelMgr::getInstance()->deselectLand();
2436 LLFirstUse::useGoTo(); 2438
2439 if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera"))
2440 {
2441 gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID());
2442 }
2443 else
2444 {
2445 // Snap camera back to behind avatar
2446 gAgent.setFocusOnAvatar(TRUE, ANIMATE);
2447 }
2448
2449 // Could be first use
2450 LLFirstUse::useGoTo();
2451 }
2437 return true; 2452 return true;
2438} 2453}
2439 2454
@@ -5721,6 +5736,10 @@ class LLShowFloater : public view_listener_t
5721 { 5736 {
5722 LLFloaterActiveSpeakers::toggleInstance(LLSD()); 5737 LLFloaterActiveSpeakers::toggleInstance(LLSD());
5723 } 5738 }
5739 else if (floater_name == "animation list")
5740 {
5741 JCFloaterAnimList::toggleInstance(LLSD());
5742 }
5724 else if (floater_name == "inworld browser") 5743 else if (floater_name == "inworld browser")
5725 { 5744 {
5726 LLFloaterMediaBrowser::toggle(); 5745 LLFloaterMediaBrowser::toggle();
@@ -5927,7 +5946,6 @@ class LLLandEdit : public view_listener_t
5927 5946
5928 LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal ); 5947 LLViewerParcelMgr::getInstance()->selectParcelAt( LLToolPie::getInstance()->getPick().mPosGlobal );
5929 5948
5930 gFloaterTools->showMore(TRUE);
5931 gFloaterView->bringToFront( gFloaterTools ); 5949 gFloaterView->bringToFront( gFloaterTools );
5932 5950
5933 // Switch to land edit toolset 5951 // Switch to land edit toolset
@@ -8269,6 +8287,113 @@ class LLAdvancedCheckHUDInfo : public view_listener_t
8269}; 8287};
8270 8288
8271 8289
8290//////////////////////
8291// FORCE GROUND SIT //
8292//////////////////////
8293
8294class LLAdvancedToggleSit: public view_listener_t
8295{
8296 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8297 {
8298 LLChat chat;
8299 chat.mSourceType = CHAT_SOURCE_SYSTEM;
8300 if(!gAgent.getAvatarObject()->mIsSitting)
8301 {
8302 gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
8303 chat.mText = "Forcing Ground Sit";
8304 }
8305 else
8306 {
8307 gAgent.setControlFlags(!AGENT_CONTROL_SIT_ON_GROUND);
8308 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
8309 chat.mText = "Standing up";
8310 }
8311 LLFloaterChat::addChat(chat);
8312 return true;
8313 }
8314};
8315
8316class LLAdvancedCheckSit : public view_listener_t
8317{
8318 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8319 {
8320 if(gAgent.getAvatarObject()->mIsSitting)
8321 {
8322 gMenuHolder->findControl(userdata["control"].asString())->setValue(true);
8323 }
8324 else
8325 {
8326 gMenuHolder->findControl(userdata["control"].asString())->setValue(false);
8327 }
8328 return true;
8329 }
8330};
8331
8332
8333/////////////
8334// PHANTOM //
8335/////////////
8336
8337class LLAdvancedTogglePhantom: public view_listener_t
8338{
8339 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8340 {
8341 LLAgent::togglePhantom();
8342 BOOL ph = LLAgent::getPhantom();
8343 LLChat chat;
8344 chat.mSourceType = CHAT_SOURCE_SYSTEM;
8345 chat.mText = llformat("%s%s","Phantom ",(ph ? "On" : "Off"));
8346 LLFloaterChat::addChat(chat);
8347 //gMenuHolder->findControl(userdata["control"].asString())->setValue(ph);
8348 return true;
8349 }
8350
8351};
8352
8353class LLAdvancedCheckPhantom: public view_listener_t
8354{
8355 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8356 {
8357 gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAgent::getPhantom());
8358 return true;
8359 }
8360};
8361
8362
8363///////////////////
8364// ASSET BROWSER //
8365///////////////////
8366
8367class LLAdvancedToggleAssetBrowser: public view_listener_t
8368{
8369 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8370 {
8371 //open the floater
8372 LLFloaterAssetBrowser::show(0);
8373
8374 bool vis = false;
8375 if(LLFloaterAssetBrowser::getInstance())
8376 {
8377 vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible();
8378 }
8379 return true;
8380 }
8381};
8382
8383class LLAdvancedCheckAssetBrowser: public view_listener_t
8384{
8385 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8386 {
8387 bool vis = false;
8388 if(LLFloaterAssetBrowser::getInstance())
8389 {
8390 vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible();
8391 }
8392 gMenuHolder->findControl(userdata["control"].asString())->setValue(vis);
8393 return true;
8394 }
8395};
8396
8272 8397
8273/////////////////////// 8398///////////////////////
8274// CLEAR GROUP CACHE // 8399// CLEAR GROUP CACHE //
@@ -10483,6 +10608,12 @@ void initialize_menus()
10483 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); 10608 addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole");
10484 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); 10609 addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole");
10485 addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); 10610 addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides");
10611 addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit");
10612 addMenu(new LLAdvancedCheckSit(), "Emerald.CheckSit");
10613 addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom");
10614 addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom");
10615 addMenu(new LLAdvancedToggleAssetBrowser(),"Advanced.ToggleAssetBrowser");
10616 addMenu(new LLAdvancedCheckAssetBrowser(),"Advanced.CheckAssetBrowser");
10486 10617
10487 // Advanced > HUD Info 10618 // Advanced > HUD Info
10488 addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); 10619 addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo");
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp
index cef6926..76b752c 100644
--- a/linden/indra/newview/llviewertexteditor.cpp
+++ b/linden/indra/newview/llviewertexteditor.cpp
@@ -900,51 +900,9 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask)
900 900
901BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) 901BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
902{ 902{
903 BOOL handled = FALSE; 903 BOOL handled = FALSE;
904
905 // let scrollbar have first dibs
906 handled = LLView::childrenHandleMouseUp(x, y, mask) != NULL;
907
908 // Used to enable I Agree checkbox if the user scrolled through entire text
909 BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax());
910 if (mOnScrollEndCallback && was_scrolled_to_bottom)
911 {
912 mOnScrollEndCallback(mOnScrollEndData);
913 }
914
915 if( !handled && mTakesNonScrollClicks)
916 {
917 if( mIsSelecting )
918 {
919 // Finish selection
920 if( y > getTextRect().mTop )
921 {
922 mScrollbar->setDocPos( mScrollbar->getDocPos() - 1 );
923 }
924 else
925 if( y < getTextRect().mBottom )
926 {
927 mScrollbar->setDocPos( mScrollbar->getDocPos() + 1 );
928 }
929
930 setCursorAtLocalPos( x, y, TRUE );
931 endSelection();
932
933 updateScrollFromCursor();
934 }
935
936 if( !hasSelection() )
937 {
938 handleMouseUpOverSegment( x, y, mask );
939 }
940
941 handled = TRUE;
942 }
943
944 // Delay cursor flashing
945 resetKeystrokeTimer();
946 904
947 if( hasMouseCapture() ) 905 if( hasMouseCapture() )
948 { 906 {
949 if (mDragItem) 907 if (mDragItem)
950 { 908 {
@@ -963,8 +921,15 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
963 } 921 }
964 } 922 }
965 mDragItem = NULL; 923 mDragItem = NULL;
966 gFocusMgr.setMouseCapture( NULL ); 924 }
967 handled = TRUE; 925
926 handled = LLTextEditor::handleMouseUp(x,y,mask);
927
928 // Used to enable I Agree checkbox if the user scrolled through entire text
929 BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax());
930 if (mOnScrollEndCallback && was_scrolled_to_bottom)
931 {
932 mOnScrollEndCallback(mOnScrollEndData);
968 } 933 }
969 934
970 return handled; 935 return handled;
@@ -1006,6 +971,24 @@ BOOL LLViewerTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
1006 return handled; 971 return handled;
1007} 972}
1008 973
974BOOL LLViewerTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
975{
976 BOOL handled = FALSE;
977 handled = childrenHandleMiddleMouseDown(x, y, mask) != NULL;
978 if (!handled)
979 {
980 handled = LLTextEditor::handleMiddleMouseDown(x, y, mask);
981 }
982 return handled;
983}
984
985BOOL LLViewerTextEditor::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
986{
987 BOOL handled = childrenHandleMiddleMouseUp(x, y, mask) != NULL;
988
989 return handled;
990}
991
1009BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) 992BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
1010{ 993{
1011 BOOL handled = FALSE; 994 BOOL handled = FALSE;
@@ -1028,7 +1011,6 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
1028 } 1011 }
1029 } 1012 }
1030 } 1013 }
1031
1032 1014
1033 setCursorAtLocalPos( x, y, FALSE ); 1015 setCursorAtLocalPos( x, y, FALSE );
1034 deselect(); 1016 deselect();
@@ -1066,6 +1048,9 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
1066 // delay cursor flashing 1048 // delay cursor flashing
1067 resetKeystrokeTimer(); 1049 resetKeystrokeTimer();
1068 1050
1051 // take selection to 'primary' clipboard
1052 updatePrimary();
1053
1069 handled = TRUE; 1054 handled = TRUE;
1070 } 1055 }
1071 return handled; 1056 return handled;
diff --git a/linden/indra/newview/llviewertexteditor.h b/linden/indra/newview/llviewertexteditor.h
index 4cd5850..062808a 100644
--- a/linden/indra/newview/llviewertexteditor.h
+++ b/linden/indra/newview/llviewertexteditor.h
@@ -58,6 +58,8 @@ public:
58 // mousehandler overrides 58 // mousehandler overrides
59 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); 59 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
60 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); 60 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
61 virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
62 virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
61 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); 63 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
62 virtual BOOL handleHover(S32 x, S32 y, MASK mask); 64 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
63 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask ); 65 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask );
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 0ab4ab6..2240d44 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -547,19 +547,42 @@ bool LLViewerWindow::shouldShowToolTipFor(LLMouseHandler *mh)
547 return false; 547 return false;
548} 548}
549 549
550BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) 550BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
551{ 551{
552 std::string buttonname;
553 std::string buttonstatestr;
554 BOOL handled = FALSE;
552 S32 x = pos.mX; 555 S32 x = pos.mX;
553 S32 y = pos.mY; 556 S32 y = pos.mY;
554 x = llround((F32)x / mDisplayScale.mV[VX]); 557 x = llround((F32)x / mDisplayScale.mV[VX]);
555 y = llround((F32)y / mDisplayScale.mV[VY]); 558 y = llround((F32)y / mDisplayScale.mV[VY]);
556 559
557 LLView::sMouseHandlerMessage.clear(); 560 if (down)
558 561 buttonstatestr = "down" ;
559 if (gDebugClicks) 562 else
563 buttonstatestr = "up" ;
564
565 switch (clicktype)
560 { 566 {
561 llinfos << "ViewerWindow left mouse down at " << x << "," << y << llendl; 567 case LLMouseHandler::CLICK_LEFT:
568 mLeftMouseDown = down;
569 buttonname = "Left";
570 break;
571 case LLMouseHandler::CLICK_RIGHT:
572 mRightMouseDown = down;
573 buttonname = "Right";
574 break;
575 case LLMouseHandler::CLICK_MIDDLE:
576 mMiddleMouseDown = down;
577 buttonname = "Middle";
578 break;
579 case LLMouseHandler::CLICK_DOUBLELEFT:
580 mLeftMouseDown = down;
581 buttonname = "Left Double Click";
582 break;
562 } 583 }
584
585 LLView::sMouseHandlerMessage.clear();
563 586
564 if (gMenuBarView) 587 if (gMenuBarView)
565 { 588 {
@@ -567,7 +590,10 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
567 gMenuBarView->resetMenuTrigger(); 590 gMenuBarView->resetMenuTrigger();
568 } 591 }
569 592
570 mLeftMouseDown = TRUE; 593 if (gDebugClicks)
594 {
595 llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl;
596 }
571 597
572 // Make sure we get a coresponding mouseup event, even if the mouse leaves the window 598 // Make sure we get a coresponding mouseup event, even if the mouse leaves the window
573 mWindow->captureMouse(); 599 mWindow->captureMouse();
@@ -576,9 +602,9 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
576 gMouseIdleTimer.reset(); 602 gMouseIdleTimer.reset();
577 603
578 // Hide tooltips on mousedown 604 // Hide tooltips on mousedown
579 mToolTipBlocked = TRUE; 605 mToolTipBlocked = down;
580 606
581 // Also hide hover info on mousedown 607 // Also hide hover info on mousedown/mouseup
582 if (gHoverView) 608 if (gHoverView)
583 { 609 {
584 gHoverView->cancelHover(); 610 gHoverView->cancelHover();
@@ -587,7 +613,7 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
587 // Don't let the user move the mouse out of the window until mouse up. 613 // Don't let the user move the mouse out of the window until mouse up.
588 if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() ) 614 if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() )
589 { 615 {
590 mWindow->setMouseClipping(TRUE); 616 mWindow->setMouseClipping(down);
591 } 617 }
592 618
593 LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); 619 LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
@@ -598,10 +624,9 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
598 mouse_captor->screenPointToLocal( x, y, &local_x, &local_y ); 624 mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
599 if (LLView::sDebugMouseHandling) 625 if (LLView::sDebugMouseHandling)
600 { 626 {
601 llinfos << "Left Mouse Down handled by captor " << mouse_captor->getName() << llendl; 627 llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl;
602 } 628 }
603 629 return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down);
604 return mouse_captor->handleMouseDown(local_x, local_y, mask);
605 } 630 }
606 631
607 // Topmost view gets a chance before the hierarchy 632 // Topmost view gets a chance before the hierarchy
@@ -610,215 +635,95 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
610 { 635 {
611 S32 local_x, local_y; 636 S32 local_x, local_y;
612 top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); 637 top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
613 if (top_ctrl->pointInView(local_x, local_y)) 638 if (down)
614 { 639 {
615 return top_ctrl->handleMouseDown(local_x, local_y, mask); 640 if (top_ctrl->pointInView(local_x, local_y))
616 } 641 {
617 else 642 return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down) ;
618 { 643 }
619 gFocusMgr.setTopCtrl(NULL); 644 else
645 {
646 gFocusMgr.setTopCtrl(NULL);
647 }
620 } 648 }
621 } 649 else
650 handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask);
622 651
652
653 }
623 // Give the UI views a chance to process the click 654 // Give the UI views a chance to process the click
624 if( mRootView->handleMouseDown(x, y, mask) ) 655 if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) )
625 { 656 {
626 if (LLView::sDebugMouseHandling) 657 if (LLView::sDebugMouseHandling)
627 { 658 {
628 llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl; 659 llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl;
629 } 660 }
630 return TRUE; 661 return TRUE;
631 } 662 }
632 else if (LLView::sDebugMouseHandling) 663 else if (LLView::sDebugMouseHandling)
633 { 664 {
634 llinfos << "Left Mouse Down not handled by view" << llendl; 665 llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl;
635 }
636
637 if (gDisconnected)
638 {
639 return FALSE;
640 }
641
642 if(LLToolMgr::getInstance()->getCurrentTool()->handleMouseDown( x, y, mask ) )
643 {
644 // This is necessary to force clicks in the world to cause edit
645 // boxes that might have keyboard focus to relinquish it, and hence
646 // cause a commit to update their value. JC
647 gFocusMgr.setKeyboardFocus(NULL);
648 return TRUE;
649 }
650
651 return FALSE;
652}
653
654BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask)
655{
656 S32 x = pos.mX;
657 S32 y = pos.mY;
658 x = llround((F32)x / mDisplayScale.mV[VX]);
659 y = llround((F32)y / mDisplayScale.mV[VY]);
660
661 LLView::sMouseHandlerMessage.clear();
662
663 if (gDebugClicks)
664 {
665 llinfos << "ViewerWindow left mouse double-click at " << x << "," << y << llendl;
666 } 666 }
667 667 if (down)
668 mLeftMouseDown = TRUE;
669
670 // Hide tooltips
671 if( mToolTip )
672 { 668 {
673 mToolTip->setVisible( FALSE ); 669 if (gDisconnected)
674 }
675
676 LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
677 if( mouse_captor )
678 {
679 S32 local_x;
680 S32 local_y;
681 mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
682 if (LLView::sDebugMouseHandling)
683 { 670 {
684 llinfos << "Left Mouse Down handled by captor " << mouse_captor->getName() << llendl; 671 return FALSE;
685 }
686
687 return mouse_captor->handleDoubleClick(local_x, local_y, mask);
688 }
689
690 // Check for hit on UI.
691 LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
692 if (top_ctrl)
693 {
694 S32 local_x, local_y;
695 top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
696 if (top_ctrl->pointInView(local_x, local_y))
697 {
698 return top_ctrl->handleDoubleClick(local_x, local_y, mask);
699 } 672 }
700 else 673
674 if(LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
701 { 675 {
702 gFocusMgr.setTopCtrl(NULL); 676 // This is necessary to force clicks in the world to cause edit
677 // boxes that might have keyboard focus to relinquish it, and hence
678 // cause a commit to update their value. JC
679 gFocusMgr.setKeyboardFocus(NULL);
680 return TRUE;
703 } 681 }
704 } 682 }
705 683 else
706 if (mRootView->handleDoubleClick(x, y, mask))
707 { 684 {
708 if (LLView::sDebugMouseHandling) 685
686 mWindow->releaseMouse();
687
688 LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
689 if( !handled )
709 { 690 {
710 llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl; 691 handled = mRootView->handleAnyMouseClick(x, y, mask, clicktype, down);
692 }
693
694
695
696 if( !handled )
697 {
698 if (tool)
699 {
700 handled = tool->handleAnyMouseClick(x, y, mask, clicktype, down);
701 }
711 } 702 }
712 return TRUE;
713 }
714 else if (LLView::sDebugMouseHandling)
715 {
716 llinfos << "Left Mouse Down not handled by view" << llendl;
717 } 703 }
718 704
719 // Why is this here? JC 9/3/2002 705 return (!down);
720 if (gNoRender) 706}
721 {
722 return TRUE;
723 }
724 707
725 if(LLToolMgr::getInstance()->getCurrentTool()->handleDoubleClick( x, y, mask ) ) 708BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
726 { 709{
727 return TRUE; 710 BOOL down = TRUE;
728 } 711 return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down);
712}
729 713
730 // if we got this far and nothing handled a double click, pass a normal mouse down 714BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask)
731 return handleMouseDown(window, pos, mask); 715{
716 // try handling as a double-click first, then a single-click if that
717 // wasn't handled.
718 BOOL down = TRUE;
719 return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_DOUBLELEFT,down) ||
720 handleMouseDown(window, pos, mask);
732} 721}
733 722
734BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) 723BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
735{ 724{
736 S32 x = pos.mX; 725 BOOL down = FALSE;
737 S32 y = pos.mY; 726 return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down);
738 x = llround((F32)x / mDisplayScale.mV[VX]);
739 y = llround((F32)y / mDisplayScale.mV[VY]);
740
741 LLView::sMouseHandlerMessage.clear();
742
743 if (gDebugClicks)
744 {
745 llinfos << "ViewerWindow left mouse up" << llendl;
746 }
747
748 mLeftMouseDown = FALSE;
749
750 // Indicate mouse was active
751 gMouseIdleTimer.reset();
752
753 // Hide tooltips on mouseup
754 if( mToolTip )
755 {
756 mToolTip->setVisible( FALSE );
757 }
758
759 // Also hide hover info on mouseup
760 if (gHoverView) gHoverView->cancelHover();
761
762 BOOL handled = FALSE;
763
764 mWindow->releaseMouse();
765
766 LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
767
768 if( tool->clipMouseWhenDown() )
769 {
770 mWindow->setMouseClipping(FALSE);
771 }
772
773 LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
774 if( mouse_captor )
775 {
776 S32 local_x;
777 S32 local_y;
778 mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
779 if (LLView::sDebugMouseHandling)
780 {
781 llinfos << "Left Mouse Up handled by captor " << mouse_captor->getName() << llendl;
782 }
783
784 return mouse_captor->handleMouseUp(local_x, local_y, mask);
785 }
786
787 LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
788 if (top_ctrl)
789 {
790 S32 local_x, local_y;
791 top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
792 handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask);
793 }
794
795 if( !handled )
796 {
797 handled = mRootView->handleMouseUp(x, y, mask);
798 }
799
800 if (LLView::sDebugMouseHandling)
801 {
802 if (handled)
803 {
804 llinfos << "Left Mouse Up" << LLView::sMouseHandlerMessage << llendl;
805 }
806 else
807 {
808 llinfos << "Left Mouse Up not handled by view" << llendl;
809 }
810 }
811
812 if( !handled )
813 {
814 if (tool)
815 {
816 handled = tool->handleMouseUp(x, y, mask);
817 }
818 }
819
820 // Always handled as far as the OS is concerned.
821 return TRUE;
822} 727}
823 728
824 729
@@ -829,91 +734,10 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
829 x = llround((F32)x / mDisplayScale.mV[VX]); 734 x = llround((F32)x / mDisplayScale.mV[VX]);
830 y = llround((F32)y / mDisplayScale.mV[VY]); 735 y = llround((F32)y / mDisplayScale.mV[VY]);
831 736
832 LLView::sMouseHandlerMessage.clear(); 737 BOOL down = TRUE;
833 738 BOOL handle = handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down);
834 if (gDebugClicks) 739 if (handle)
835 { 740 return handle;
836 llinfos << "ViewerWindow right mouse down at " << x << "," << y << llendl;
837 }
838
839 if (gMenuBarView)
840 {
841 // stop ALT-key access to menu
842 gMenuBarView->resetMenuTrigger();
843 }
844
845 mRightMouseDown = TRUE;
846
847 // Make sure we get a coresponding mouseup event, even if the mouse leaves the window
848 mWindow->captureMouse();
849
850 // Hide tooltips
851 if( mToolTip )
852 {
853 mToolTip->setVisible( FALSE );
854 }
855
856 // Also hide hover info on mousedown
857 if (gHoverView)
858 {
859 gHoverView->cancelHover();
860 }
861
862 // Don't let the user move the mouse out of the window until mouse up.
863 if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() )
864 {
865 mWindow->setMouseClipping(TRUE);
866 }
867
868 LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
869 if( mouse_captor )
870 {
871 S32 local_x;
872 S32 local_y;
873 mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
874 if (LLView::sDebugMouseHandling)
875 {
876 llinfos << "Right Mouse Down handled by captor " << mouse_captor->getName() << llendl;
877 }
878 return mouse_captor->handleRightMouseDown(local_x, local_y, mask);
879 }
880
881 LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
882 if (top_ctrl)
883 {
884 S32 local_x, local_y;
885 top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
886 if (top_ctrl->pointInView(local_x, local_y))
887 {
888 return top_ctrl->handleRightMouseDown(local_x, local_y, mask);
889 }
890 else
891 {
892 gFocusMgr.setTopCtrl(NULL);
893 }
894 }
895
896 if( mRootView->handleRightMouseDown(x, y, mask) )
897 {
898 if (LLView::sDebugMouseHandling)
899 {
900 llinfos << "Right Mouse Down" << LLView::sMouseHandlerMessage << llendl;
901 }
902 return TRUE;
903 }
904 else if (LLView::sDebugMouseHandling)
905 {
906 llinfos << "Right Mouse Down not handled by view" << llendl;
907 }
908
909 if(LLToolMgr::getInstance()->getCurrentTool()->handleRightMouseDown( x, y, mask ) )
910 {
911 // This is necessary to force clicks in the world to cause edit
912 // boxes that might have keyboard focus to relinquish it, and hence
913 // cause a commit to update their value. JC
914 gFocusMgr.setKeyboardFocus(NULL);
915 return TRUE;
916 }
917 741
918 // *HACK: this should be rolled into the composite tool logic, not 742 // *HACK: this should be rolled into the composite tool logic, not
919 // hardcoded at the top level. 743 // hardcoded at the top level.
@@ -931,107 +755,27 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
931 755
932BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) 756BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
933{ 757{
934 S32 x = pos.mX; 758 BOOL down = FALSE;
935 S32 y = pos.mY; 759 return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down);
936 x = llround((F32)x / mDisplayScale.mV[VX]);
937 y = llround((F32)y / mDisplayScale.mV[VY]);
938
939 LLView::sMouseHandlerMessage.clear();
940
941 // Don't care about caps lock for mouse events.
942 if (gDebugClicks)
943 {
944 llinfos << "ViewerWindow right mouse up" << llendl;
945 }
946
947 mRightMouseDown = FALSE;
948
949 // Indicate mouse was active
950 gMouseIdleTimer.reset();
951
952 // Hide tooltips on mouseup
953 if( mToolTip )
954 {
955 mToolTip->setVisible( FALSE );
956 }
957
958 // Also hide hover info on mouseup
959 if (gHoverView) gHoverView->cancelHover();
960
961 BOOL handled = FALSE;
962
963 mWindow->releaseMouse();
964
965 LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
966
967 if( tool->clipMouseWhenDown() )
968 {
969 mWindow->setMouseClipping(FALSE);
970 }
971
972 LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
973 if( mouse_captor )
974 {
975 S32 local_x;
976 S32 local_y;
977 mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
978 if (LLView::sDebugMouseHandling)
979 {
980 llinfos << "Right Mouse Up handled by captor " << mouse_captor->getName() << llendl;
981 }
982 return mouse_captor->handleRightMouseUp(local_x, local_y, mask);
983 }
984
985 LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
986 if (top_ctrl)
987 {
988 S32 local_x, local_y;
989 top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
990 handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleRightMouseUp(local_x, local_y, mask);
991 }
992
993 if( !handled )
994 {
995 handled = mRootView->handleRightMouseUp(x, y, mask);
996 }
997
998 if (LLView::sDebugMouseHandling)
999 {
1000 if (handled)
1001 {
1002 llinfos << "Right Mouse Up" << LLView::sMouseHandlerMessage << llendl;
1003 }
1004 else
1005 {
1006 llinfos << "Right Mouse Up not handled by view" << llendl;
1007 }
1008 }
1009
1010 if( !handled )
1011 {
1012 if (tool)
1013 {
1014 handled = tool->handleRightMouseUp(x, y, mask);
1015 }
1016 }
1017
1018 // Always handled as far as the OS is concerned.
1019 return TRUE;
1020} 760}
1021 761
1022BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) 762BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
1023{ 763{
764 BOOL down = TRUE;
1024 gVoiceClient->middleMouseState(true); 765 gVoiceClient->middleMouseState(true);
1025 766 handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down);
1026 // Always handled as far as the OS is concerned. 767
768 // Always handled as far as the OS is concerned.
1027 return TRUE; 769 return TRUE;
1028} 770}
1029 771
1030BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) 772BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
1031{ 773{
774 BOOL down = FALSE;
1032 gVoiceClient->middleMouseState(false); 775 gVoiceClient->middleMouseState(false);
1033 776 handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down);
1034 // Always handled as far as the OS is concerned. 777
778 // Always handled as far as the OS is concerned.
1035 return TRUE; 779 return TRUE;
1036} 780}
1037 781
@@ -1404,6 +1148,7 @@ LLViewerWindow::LLViewerWindow(
1404 mWindowRect(0, height, width, 0), 1148 mWindowRect(0, height, width, 0),
1405 mVirtualWindowRect(0, height, width, 0), 1149 mVirtualWindowRect(0, height, width, 0),
1406 mLeftMouseDown(FALSE), 1150 mLeftMouseDown(FALSE),
1151 mMiddleMouseDown(FALSE),
1407 mRightMouseDown(FALSE), 1152 mRightMouseDown(FALSE),
1408 mToolTip(NULL), 1153 mToolTip(NULL),
1409 mToolTipBlocked(FALSE), 1154 mToolTipBlocked(FALSE),
diff --git a/linden/indra/newview/llviewerwindow.h b/linden/indra/newview/llviewerwindow.h
index ab2dd4e..40368f8 100644
--- a/linden/indra/newview/llviewerwindow.h
+++ b/linden/indra/newview/llviewerwindow.h
@@ -47,6 +47,7 @@
47#include "lltimer.h" 47#include "lltimer.h"
48#include "llstat.h" 48#include "llstat.h"
49#include "llalertdialog.h" 49#include "llalertdialog.h"
50#include "llmousehandler.h"
50 51
51class LLView; 52class LLView;
52class LLViewerObject; 53class LLViewerObject;
@@ -57,7 +58,6 @@ class LLVelocityBar;
57class LLTextBox; 58class LLTextBox;
58class LLImageRaw; 59class LLImageRaw;
59class LLHUDIcon; 60class LLHUDIcon;
60class LLMouseHandler;
61 61
62#define PICK_HALF_WIDTH 5 62#define PICK_HALF_WIDTH 5
63#define PICK_DIAMETER (2 * PICK_HALF_WIDTH + 1) 63#define PICK_DIAMETER (2 * PICK_HALF_WIDTH + 1)
@@ -81,7 +81,7 @@ public:
81 81
82 static bool isFlora(LLViewerObject* object); 82 static bool isFlora(LLViewerObject* object);
83 83
84 typedef enum e_pick_type 84 typedef enum
85 { 85 {
86 PICK_OBJECT, 86 PICK_OBJECT,
87 PICK_FLORA, 87 PICK_FLORA,
@@ -150,6 +150,7 @@ public:
150 /*virtual*/ BOOL handleTranslatedKeyUp(KEY key, MASK mask); 150 /*virtual*/ BOOL handleTranslatedKeyUp(KEY key, MASK mask);
151 /*virtual*/ void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level); 151 /*virtual*/ void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
152 /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended 152 /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended
153 /*virtual*/ BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down);
153 /*virtual*/ BOOL handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); 154 /*virtual*/ BOOL handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
154 /*virtual*/ BOOL handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); 155 /*virtual*/ BOOL handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
155 /*virtual*/ BOOL handleCloseRequest(LLWindow *window); 156 /*virtual*/ BOOL handleCloseRequest(LLWindow *window);
@@ -212,6 +213,7 @@ public:
212 LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; } 213 LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; }
213 LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; } 214 LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; }
214 BOOL getLeftMouseDown() const { return mLeftMouseDown; } 215 BOOL getLeftMouseDown() const { return mLeftMouseDown; }
216 BOOL getMiddleMouseDown() const { return mMiddleMouseDown; }
215 BOOL getRightMouseDown() const { return mRightMouseDown; } 217 BOOL getRightMouseDown() const { return mRightMouseDown; }
216 218
217 const LLPickInfo& getLastPick() const { return mLastPick; } 219 const LLPickInfo& getLastPick() const { return mLastPick; }
@@ -279,7 +281,7 @@ public:
279 281
280 // snapshot functionality. 282 // snapshot functionality.
281 // perhaps some of this should move to llfloatershapshot? -MG 283 // perhaps some of this should move to llfloatershapshot? -MG
282 typedef enum e_snapshot_type 284 typedef enum
283 { 285 {
284 SNAPSHOT_TYPE_COLOR, 286 SNAPSHOT_TYPE_COLOR,
285 SNAPSHOT_TYPE_DEPTH, 287 SNAPSHOT_TYPE_DEPTH,
@@ -397,6 +399,7 @@ protected:
397 LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame 399 LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame
398 LLStat mMouseVelocityStat; 400 LLStat mMouseVelocityStat;
399 BOOL mLeftMouseDown; 401 BOOL mLeftMouseDown;
402 BOOL mMiddleMouseDown;
400 BOOL mRightMouseDown; 403 BOOL mRightMouseDown;
401 404
402 LLProgressView *mProgressView; 405 LLProgressView *mProgressView;
diff --git a/linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.png b/linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.png
new file mode 100644
index 0000000..f9ea7a2
--- /dev/null
+++ b/linden/indra/newview/skins/default/html/en-us/loading/imprudence_loading.png
Binary files differ
diff --git a/linden/indra/newview/skins/default/html/en-us/loading/loading.html b/linden/indra/newview/skins/default/html/en-us/loading/loading.html
index 1c62d2f..97174b0 100644
--- a/linden/indra/newview/skins/default/html/en-us/loading/loading.html
+++ b/linden/indra/newview/skins/default/html/en-us/loading/loading.html
@@ -2,7 +2,7 @@
2<table width="100%" height="100%" border="0"> 2<table width="100%" height="100%" border="0">
3 <tr> 3 <tr>
4 <td align="center" valign="middle" style="font-size:0.8em;"> 4 <td align="center" valign="middle" style="font-size:0.8em;">
5 <img src="sl_logo_rotate_black.gif" align="absmiddle"><br/>&nbsp;&nbsp;&nbsp;loading... 5 <img src="imprudence_loading.png" align="absmiddle"><br/>&nbsp;&nbsp;&nbsp;loading...
6 </td> 6 </td>
7 </tr> 7 </tr>
8</table> 8</table>
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml b/linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml
new file mode 100644
index 0000000..be7de86
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_animation_list.xml
@@ -0,0 +1,74 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater
3 name="animation list"
4 title="Animation List"
5 can_resize="true"
6 can_minimize="true"
7 can_close="true"
8 can_drag_on_left="false"
9 rect_control="FloaterAnimationListRect"
10 min_width="1000"
11 min_height="275"
12 >
13 <scroll_list
14 name="animation_list"
15 left="10"
16 right="-10"
17 top="-20"
18 bottom="100"
19 column_padding="0"
20 can_resize="true"
21 follows="left|top|bottom|right"
22 draw_heading="true"
23 multi_select="true"
24 search_column="1"
25 tool_tip="Hold shift or control while clicking to select multiple thingers"
26 >
27 <!-- Icons relating to the avatar, currently: tracking, and marked -->
28 <column name="Anim Name" label="Anim Name" width="250"/>
29 <column name="Animation UUID" label="Animation UUID" width="250"/>
30 <!--<column name="object_name" label="Distance" dynamicwidth="true"/>-->
31 <column name="Source Object UUID" label="Source Object UUID" width="250"/>
32 <column name="Source Owner" label="Source Owner" width="250"/>
33 <!-- What the avatar is doing: producing sounds, rezzing, particles, etc -->
34 </scroll_list>
35 <panel
36 name="options"
37 left="10"
38 right="-10"
39 top="90"
40 bottom="10"
41 border="true"
42 mouse_opaque="true"
43 bevel_style="in"
44 background_visible="true"
45 background_opaque="true"
46 follows="left|right|bottom"
47 bg_opaque_color="0,0,0,0.3"
48 bg_alpha_color="blue"
49 can_resize="false"
50 >
51 </panel>
52
53 <button bottom="55" follows="left|bottom" font="SansSerifSmall" halign="center"
54 height="20" label="Stop Selected" left_delta="5"
55 mouse_opaque="true" name="Stop Selected"
56 tool_tip="Stop selected animations" width="150" />
57 <button bottom_delta="0" follows="left|bottom" font="SansSerifSmall" halign="center"
58 height="20" label="Revoke Selected" left_delta="155"
59 mouse_opaque="true" name="Revoke Selected"
60 tool_tip="Revokes animation permissions for object associated with the selections" width="150" />
61 <button bottom_delta="0" follows="left|bottom" font="SansSerifSmall" halign="center"
62 height="20" label="Stop+Revoke Selected" left_delta="155"
63 mouse_opaque="true" name="Stop+Revoke Selected"
64 tool_tip="Revokes animation permissions for object(s) associated with the selections, as well as stopping the anim" width="150" />
65 <button bottom_delta="0" follows="left|bottom" font="SansSerifSmall" halign="center"
66 height="20" label="Open Owner Profile" left_delta="155"
67 mouse_opaque="true" name="Open Owner Profile"
68 tool_tip="Opens profile of the owner(s) of object(s) associated with the selections" width="150" />
69 <button bottom_delta="-25" enabled="false" follows="left|bottom" font="SansSerifSmall" halign="center"
70 height="20" label="Return Object" left_delta="-465"
71 mouse_opaque="true" name="Return Object"
72 tool_tip="Returns object(s) selected, if you have land powers" width="150" />
73
74</floater> \ No newline at end of file
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml b/linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml
new file mode 100644
index 0000000..13c6b6c
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_asset_browser.xml
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2
3<floater bottom="-300" can_close="true" can_drag_on_left="false" can_minimize="true"
4 can_resize="true" enabled="true" follows="left|bottom" height="620"
5 hidden="false" left="300" min_height="420" min_width="630"
6 mouse_opaque="true" name="asset browser" title="Asset Browser" width="720">
7
8 <inventory_panel allow_multi_select="false" border="true" bottom="-299" enabled="true"
9 follows="left|top" height="280" hidden="false" left="10"
10 mouse_opaque="true" name="inventory panel"
11 sort_order="TexturePickerSortOrder" width="231"/>
12
13 <button bottom="-350" follows="left|top" font="SansSerifSmall"
14 halign="center" height="20" hidden="false" label="Next &gt;&gt;"
15 left="160" mouse_opaque="true" name="button next" scale_image="TRUE"
16 width="80"/>
17
18 <button bottom_delta="-30" follows="left|top" font="SansSerifSmall"
19 halign="center" height="20" hidden="false" label="&lt;&lt; Previous"
20 left_delta="0" mouse_opaque="true" name="button previous" scale_image="TRUE"
21 width="80"/>
22
23 <button bottom_delta="-30" follows="left|top" font="SansSerifSmall"
24 halign="center" height="20" hidden="false" label="Refresh"
25 left_delta="0" mouse_opaque="true" name="button refresh" scale_image="TRUE"
26 width="80"/>
27
28</floater>
29
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
index d32832c..dd66a83 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="27" can_close="true" can_drag_on_left="false" can_minimize="false" 2<floater bottom="27" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="true" can_tear_off="true" enabled="true" height="270" left="15" 3 can_resize="true" can_tear_off="true" enabled="true" height="270" left="15"
4 min_height="150" min_width="425" mouse_opaque="true" name="chat floater" 4 min_height="150" min_width="425" mouse_opaque="true" name="chat floater"
5 rect_control="FloaterChatRect" title="Local Chat" width="435"> 5 rect_control="FloaterChatRect" title="Local Chat" width="435">
@@ -59,10 +59,14 @@
59 <panel bottom="5" follows="left|right|bottom" left="5" name="chat_panel" right="-5" 59 <panel bottom="5" follows="left|right|bottom" left="5" name="chat_panel" right="-5"
60 tab_group="1" top="25"> 60 tab_group="1" top="25">
61 <string name="gesture_label">Gestures</string> 61 <string name="gesture_label">Gestures</string>
62 <spinner bottom="-22" decimal_digits="0" follows="left|bottom" height="20"
63 increment="1.00" initial_val="0" label="Channel" label_width="50" left="0"
64 max_val="2147483647" min_val="0" mouse_opaque="true" name="channel_control"
65 width="100" tool_tip="Set the default channel for inworld chat"/>
62 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" 66 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0"
63 enabled="true" follows="left|right|bottom" font="SansSerif" 67 enabled="true" follows="left|right|bottom" font="SansSerif"
64 handle_edit_keys_directly="false" height="20" label="Click here to chat." 68 handle_edit_keys_directly="false" height="20" label="Click here to chat."
65 left="0" max_length="254" mouse_opaque="true" name="Chat Editor" 69 left="105" max_length="254" mouse_opaque="true" name="Chat Editor"
66 right="-70" select_all_on_focus_received="false" select_on_focus="false" 70 right="-70" select_all_on_focus_received="false" select_on_focus="false"
67 tab_group="1" /> 71 tab_group="1" />
68 <flyout_button bottom="0" follows="right|bottom" height="20" label="Say" left="-65" 72 <flyout_button bottom="0" follows="right|bottom" height="20" label="Say" left="-65"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
index 18d56b4..bc18f44 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-359" can_close="true" can_drag_on_left="false" can_minimize="true" 2<floater bottom="-374" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" follows="left|top" height="550" 3 can_resize="false" follows="left|top" height="565"
4 left="308" min_height="100" min_width="100" mouse_opaque="true" 4 left="308" min_height="100" min_width="100" mouse_opaque="true"
5 name="toolbox floater" rect_control="ToolboxRect" sound_flags="0" title="" 5 name="toolbox floater" rect_control="ToolboxRect" sound_flags="0" title=""
6 short_title="Build" width="272"> 6 short_title="Build" width="272">
@@ -79,20 +79,24 @@
79 <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16" 79 <check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
80 initial_value="false" label="Select Faces to Texture" left="4" mouse_opaque="true" 80 initial_value="false" label="Select Faces to Texture" left="4" mouse_opaque="true"
81 name="radio select face" radio_style="true" width="114" /> 81 name="radio select face" radio_style="true" width="114" />
82 <check_box bottom_delta="-22" control_name="SnapEnabled" follows="left|top" 82 <check_box bottom_delta="-19" control_name="EditLinkedParts" follows="left|top"
83 font="SansSerifSmall" height="16" initial_value="true" label="Use Grid" 83 font="SansSerifSmall" height="16" initial_value="false"
84 left_delta="0" mouse_opaque="true" name="checkbox snap to grid" width="134" /> 84 label="Edit linked parts" left="4" mouse_opaque="true"
85 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" 85 name="checkbox edit linked parts" width="114" />
86 height="16" label="Options..." label_selected="Options..." left_delta="75" 86 <button bottom_delta="-19" follows="left|top" font="SansSerifSmall"
87 mouse_opaque="true" name="Options..." scale_image="TRUE" width="80" /> 87 halign="center" height="18" label="Link" label_selected="Link"
88 left="10" mouse_opaque="true" name="link_btn" width="68" />
89 <button bottom_delta="0" follows="left|top" font="SansSerifSmall"
90 halign="center" height="18" label="Unlink" label_selected="Unlink"
91 left_delta="75" mouse_opaque="true" name="unlink_btn" width="68" />
88 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 92 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
89 bottom_delta="-20" drop_shadow_visible="true" follows="left|top" 93 bottom_delta="-18" drop_shadow_visible="true" follows="left|top"
90 font="SansSerifSmall" h_pad="0" halign="left" height="14" left="6" 94 font="SansSerifSmall" h_pad="0" halign="left" height="14" left="6"
91 mouse_opaque="true" name="text ruler mode" v_pad="0" width="68"> 95 mouse_opaque="true" name="text ruler mode" v_pad="0" width="68">
92 Ruler mode: 96 Ruler:
93 </text> 97 </text>
94 <combo_box allow_text_entry="false" bottom_delta="-4" follows="left|top" height="20" 98 <combo_box allow_text_entry="false" bottom_delta="-4" follows="left|top" height="20"
95 left_delta="74" max_chars="20" mouse_opaque="true" 99 left_delta="40" max_chars="20" mouse_opaque="true"
96 name="combobox grid mode" width="86"> 100 name="combobox grid mode" width="86">
97 <combo_item name="World" value="World"> 101 <combo_item name="World" value="World">
98 World 102 World
@@ -112,16 +116,13 @@
112 font="SansSerifSmall" height="16" initial_value="true" 116 font="SansSerifSmall" height="16" initial_value="true"
113 label="Stretch Textures" left_delta="0" mouse_opaque="true" 117 label="Stretch Textures" left_delta="0" mouse_opaque="true"
114 name="checkbox stretch textures" width="134" /> 118 name="checkbox stretch textures" width="134" />
115 <check_box bottom_delta="-15" control_name="EditLinkedParts" follows="left|top" 119 <check_box bottom_delta="-19" control_name="SnapEnabled" follows="left|top"
116 font="SansSerifSmall" height="16" initial_value="false" 120 font="SansSerifSmall" height="16" initial_value="true" label="Use Grid"
117 label="Edit linked parts" left="143" mouse_opaque="true" 121 left_delta="0" mouse_opaque="true" name="checkbox snap to grid" width="134" />
118 name="checkbox edit linked parts" width="114" /> 122 <button bottom_delta="-19" follows="left|top" font="SansSerifSmall"
119 <button bottom_delta="-18" follows="left|top" font="SansSerifSmall" 123 halign="center" valign="center"
120 halign="center" height="18" label="Link" label_selected="Link" 124 height="20" label="Options..." label_selected="Options..." left_delta="20"
121 right="-5" mouse_opaque="true" name="link_btn" width="78" /> 125 mouse_opaque="true" name="Options..." scale_image="TRUE" width="80" />
122 <button bottom_delta="-20" follows="left|top" font="SansSerifSmall"
123 halign="center" height="18" label="Unlink" label_selected="Unlink"
124 right="-5" mouse_opaque="true" name="unlink_btn" width="78" />
125 126
126<!-- Help text --> 127<!-- Help text -->
127 128
@@ -289,18 +290,18 @@
289 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" 290 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false"
290 border_visible="false" bottom_delta="-16" drop_shadow_visible="true" enabled="true" 291 border_visible="false" bottom_delta="-16" drop_shadow_visible="true" enabled="true"
291 follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="118" 292 follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="118"
292 hidden="false" mouse_opaque="true" name="Brush:" v_pad="0" width="100"> 293 hidden="false" mouse_opaque="true" name="Bulldozer:" v_pad="0" width="100">
293 Brush: 294 Bulldozer:
294 </text> 295 </text>
295 296
296 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" 297 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false"
297 border_visible="false" bottom_delta="-18" drop_shadow_visible="true" enabled="true" 298 border_visible="false" bottom_delta="-18" drop_shadow_visible="true" enabled="true"
298 follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="132" 299 follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="132"
299 hidden="false" mouse_opaque="true" name="Brush Size:" v_pad="0" width="100"> 300 hidden="false" mouse_opaque="true" name="Dozer Size:" v_pad="0" width="100">
300 Size 301 Size
301 </text> 302 </text>
302 <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false" 303 <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false"
303 increment="1.0" initial_val="0.0" left="178" max_val="2.0" min_val="0.0" 304 increment="0.1" initial_val="2.0" left="178" max_val="11.0" min_val="1.0"
304 mouse_opaque="true" name="slider brush size" width="80" /> 305 mouse_opaque="true" name="slider brush size" width="80" />
305 306
306 307
@@ -312,21 +313,23 @@
312 </text> 313 </text>
313 <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false" 314 <volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false"
314 increment="0.1" initial_val="0.00" left="178" max_val="2.0" min_val="-1.0" 315 increment="0.1" initial_val="0.00" left="178" max_val="2.0" min_val="-1.0"
315 mouse_opaque="true" name="slider force" width="80" /> 316 mouse_opaque="true" name="slider force" width="80" />
316 317 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
317 318 bottom="-168" left="118" drop_shadow_visible="true" follows="left|top"
318 <button bottom="-163" follows="left|top" font="SansSerifSmall" halign="center" 319 font="SansSerifSmall" h_pad="0" halign="right" height="16"
319 height="20" label="More &gt;&gt;" left="186" mouse_opaque="true" 320 mouse_opaque="true" name="obj_count" v_pad="0" width="143">
320 name="button more" scale_image="TRUE" tool_tip="Advanced Options" 321 Selected objects: [COUNT]
321 width="80" /> 322 </text>
322 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" 323 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
323 height="20" label="&lt;&lt; Less" left_delta="0" mouse_opaque="true" 324 bottom="-181" left="118" drop_shadow_visible="true" follows="left|top"
324 name="button less" scale_image="TRUE" tool_tip="Advanced Options" 325 font="SansSerifSmall" h_pad="0" halign="right" height="16"
325 width="80" /> 326 mouse_opaque="true" name="prim_count" v_pad="0" width="143">
327 primitives: [COUNT]
328 </text>
326 329
327<!-- Sub-tabs --> 330<!-- Sub-tabs -->
328 331
329 <tab_container bottom="-550" follows="left|top" height="384" left="0" mouse_opaque="false" 332 <tab_container bottom="-565" follows="left|top" height="384" left="0" mouse_opaque="false"
330 name="Object Info Tabs" tab_max_width="52" tab_min_width="40" 333 name="Object Info Tabs" tab_max_width="52" tab_min_width="40"
331 tab_position="top" width="272"> 334 tab_position="top" width="272">
332 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" 335 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367"
@@ -364,7 +367,7 @@
364 Thrax Linden 367 Thrax Linden
365 </text> 368 </text>
366 <button bottom="-66" follows="top|right" font="SansSerifSmall" halign="center" 369 <button bottom="-66" follows="top|right" font="SansSerifSmall" halign="center"
367 height="16" label="Profile..." label_selected="Profile..." left_delta="94" 370 height="20" label="Profile..." label_selected="Profile..." left_delta="94"
368 mouse_opaque="true" name="button creator profile" scale_image="TRUE" 371 mouse_opaque="true" name="button creator profile" scale_image="TRUE"
369 width="78" /> 372 width="78" />
370 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 373 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
@@ -380,32 +383,42 @@
380 Thrax Linden 383 Thrax Linden
381 </text> 384 </text>
382 <button bottom="-86" follows="top|right" font="SansSerifSmall" halign="center" 385 <button bottom="-86" follows="top|right" font="SansSerifSmall" halign="center"
383 height="16" label="Profile..." label_selected="Profile..." left_delta="94" 386 height="20" label="Profile..." label_selected="Profile..." left_delta="94"
384 mouse_opaque="true" name="button owner profile" scale_image="TRUE" 387 mouse_opaque="true" name="button owner profile" scale_image="TRUE"
385 width="78" /> 388 width="78" />
389 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
390 bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
391 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
392 mouse_opaque="true" name="LastOwner:" v_pad="0" width="78">
393 Last Owner:
394 </text>
395 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
396 bottom_delta="0" drop_shadow_visible="true" follows="left|top"
397 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
398 mouse_opaque="true" name="Last Owner Name" v_pad="0" width="88">
399 Thrax Linden
400 </text>
401 <button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
402 height="20" label="Profile..." label_selected="Profile..." left_delta="94"
403 mouse_opaque="true" name="button last owner profile" scale_image="TRUE"
404 width="78" />
386 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 405 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
387 bottom="-106" drop_shadow_visible="true" follows="left|top" 406 bottom="-126" drop_shadow_visible="true" follows="left|top"
388 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" 407 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
389 mouse_opaque="true" name="Group:" v_pad="0" width="78"> 408 mouse_opaque="true" name="Group:" v_pad="0" width="78">
390 Group: 409 Group:
391 </text> 410 </text>
392 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 411 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
393 bottom="-106" drop_shadow_visible="true" follows="left|top" 412 bottom="-126" drop_shadow_visible="true" follows="left|top"
394 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78" 413 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
395 mouse_opaque="true" name="Group Name Proxy" v_pad="0" visible="false" 414 mouse_opaque="true" name="Group Name Proxy" v_pad="0" visible="false"
396 width="88"> 415 width="88">
397 The Lindens 416 The Lindens
398 </text> 417 </text>
399 <button bottom="-106" follows="top|right" font="SansSerifSmall" halign="center" 418 <button bottom="-126" follows="top|right" font="SansSerifSmall" halign="center"
400 height="16" label="Set..." label_selected="Set..." left_delta="94" 419 height="20" label="Set..." label_selected="Set..." left_delta="94"
401 mouse_opaque="true" name="button set group" scale_image="TRUE" width="78" /> 420 mouse_opaque="true" name="button set group" scale_image="TRUE" width="78" />
402 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 421 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
403 bottom="-126" drop_shadow_visible="true" follows="left|top"
404 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
405 mouse_opaque="true" name="prim info" v_pad="0" width="166">
406 1 Object, 1 Primitive
407 </text>
408 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
409 bottom_delta="-20" drop_shadow_visible="true" follows="left|top" 422 bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
410 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" 423 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
411 mouse_opaque="true" name="Permissions:" v_pad="0" width="85"> 424 mouse_opaque="true" name="Permissions:" v_pad="0" width="85">
@@ -420,7 +433,7 @@
420 <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16" 433 <check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
421 initial_value="false" label="Share with group" left="10" 434 initial_value="false" label="Share with group" left="10"
422 mouse_opaque="true" name="checkbox share with group" 435 mouse_opaque="true" name="checkbox share with group"
423 tool_tip="Allow group members to move, modify, copy and delete." 436 tool_tip="Allow all members of the set group to share and use your permissions for this object. You must Deed to enable role restrictions."
424 width="166" /> 437 width="166" />
425 <string name="text deed continued"> 438 <string name="text deed continued">
426 Deed... 439 Deed...
@@ -428,8 +441,8 @@
428 <string name="text deed"> 441 <string name="text deed">
429 Deed 442 Deed
430 </string> 443 </string>
431 <button bottom="-186" follows="top|right" font="SansSerifSmall" halign="center" 444 <button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
432 height="16" label="Deed..." label_selected="Deed..." left_delta="172" 445 height="20" label="Deed..." label_selected="Deed..." left_delta="172"
433 mouse_opaque="true" name="button deed" scale_image="TRUE" 446 mouse_opaque="true" name="button deed" scale_image="TRUE"
434 tool_tip="Group shared objects can be deeded by a group officer." 447 tool_tip="Group shared objects can be deeded by a group officer."
435 width="78" /> 448 width="78" />
@@ -517,37 +530,37 @@
517 </combo_item> 530 </combo_item>
518 </combo_box> 531 </combo_box>
519 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 532 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
520 bottom="-135" drop_shadow_visible="true" follows="left|top" 533 bottom="-115" drop_shadow_visible="true" follows="left|top"
521 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" 534 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88"
522 mouse_opaque="true" name="B:" v_pad="0" width="174"> 535 mouse_opaque="true" name="B:" v_pad="0" width="174">
523 B: 536 B:
524 </text> 537 </text>
525 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 538 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
526 bottom="-135" drop_shadow_visible="true" follows="left|top" 539 bottom="-115" drop_shadow_visible="true" follows="left|top"
527 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" 540 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50"
528 mouse_opaque="true" name="O:" v_pad="0" width="124"> 541 mouse_opaque="true" name="O:" v_pad="0" width="124">
529 O; 542 O;
530 </text> 543 </text>
531 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 544 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
532 bottom="-135" drop_shadow_visible="true" follows="left|top" 545 bottom="-115" drop_shadow_visible="true" follows="left|top"
533 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" 546 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50"
534 mouse_opaque="true" name="G:" v_pad="0" width="74"> 547 mouse_opaque="true" name="G:" v_pad="0" width="74">
535 G: 548 G:
536 </text> 549 </text>
537 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 550 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
538 bottom="-147" drop_shadow_visible="true" follows="left|top" 551 bottom="-127" drop_shadow_visible="true" follows="left|top"
539 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" 552 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88"
540 mouse_opaque="true" name="E:" v_pad="0" width="174"> 553 mouse_opaque="true" name="E:" v_pad="0" width="174">
541 E: 554 E:
542 </text> 555 </text>
543 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 556 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
544 bottom="-147" drop_shadow_visible="true" follows="left|top" 557 bottom="-127" drop_shadow_visible="true" follows="left|top"
545 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" 558 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50"
546 mouse_opaque="true" name="N:" v_pad="0" width="124"> 559 mouse_opaque="true" name="N:" v_pad="0" width="124">
547 N: 560 N:
548 </text> 561 </text>
549 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 562 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
550 bottom="-147" drop_shadow_visible="true" follows="left|top" 563 bottom="-127" drop_shadow_visible="true" follows="left|top"
551 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50" 564 font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="50"
552 mouse_opaque="true" name="F:" v_pad="0" width="74"> 565 mouse_opaque="true" name="F:" v_pad="0" width="74">
553 F: 566 F:
@@ -764,12 +777,12 @@
764 Skew 777 Skew
765 </text> 778 </text>
766 <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16" 779 <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16"
767 increment="5" initial_val="0" left="121" max_val="95" min_val="0" 780 increment="5" initial_val="0" left="121" max_val="95" min_val="0"
768 mouse_opaque="true" name="Scale 1" width="68" label=" " label_width="10"/> 781 mouse_opaque="true" name="Scale 1" width="68" />
769 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" 782 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16"
770 increment="0.05" initial_val="0" left_delta="73" max_val="0.95" label_width="10" 783 increment="0.05" initial_val="0" left_delta="73" max_val="0.95"
771 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" label=" " /> 784 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" />
772 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 785 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
773 bottom_delta="-15" drop_shadow_visible="true" follows="left|top" 786 bottom_delta="-15" drop_shadow_visible="true" follows="left|top"
774 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121" 787 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121"
775 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141"> 788 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141">
@@ -888,10 +901,10 @@
888 </text> 901 </text>
889 <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16" 902 <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16"
890 increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1" 903 increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1"
891 mouse_opaque="true" name="Radius Offset" width="68" label=" " label_width="10" /> 904 mouse_opaque="true" name="Radius Offset" width="68" />
892 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" 905 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16"
893 increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1" 906 increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1"
894 mouse_opaque="true" name="Revolutions" width="68" label=" " label_width="10" /> 907 mouse_opaque="true" name="Revolutions" width="68" />
895 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" 908 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true"
896 default_image_name="Default" follows="left|top" height="141" 909 default_image_name="Default" follows="left|top" height="141"
897 label="Sculpt Texture" left="121" mouse_opaque="true" 910 label="Sculpt Texture" left="121" mouse_opaque="true"
@@ -1192,7 +1205,7 @@
1192 initial_val="1" left="112" max_val="10" min_val="0.1" mouse_opaque="true" 1205 initial_val="1" left="112" max_val="10" min_val="0.1" mouse_opaque="true"
1193 name="rptctrl" width="68" /> 1206 name="rptctrl" width="68" />
1194 <button bottom="-256" follows="left|top" font="SansSerifSmall" halign="center" 1207 <button bottom="-256" follows="left|top" font="SansSerifSmall" halign="center"
1195 height="16" label="Apply" label_selected="Apply" left_delta="78" 1208 height="20" label="Apply" label_selected="Apply" left_delta="78"
1196 mouse_opaque="true" name="button apply" scale_image="TRUE" width="75" /> 1209 mouse_opaque="true" name="button apply" scale_image="TRUE" width="75" />
1197 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 1210 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1198 bottom="-288" drop_shadow_visible="true" follows="left|top" 1211 bottom="-288" drop_shadow_visible="true" follows="left|top"
@@ -1223,10 +1236,13 @@
1223 </panel> 1236 </panel>
1224 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" 1237 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367"
1225 label="Content" left="1" mouse_opaque="false" name="Contents" width="270"> 1238 label="Content" left="1" mouse_opaque="false" name="Contents" width="270">
1226 <button bottom="-30" follows="left|top" font="SansSerif" halign="center" height="20" 1239 <button bottom="-30" follows="left|top" font="SansSerif" halign="center" height="20"
1227 label="New Script..." label_selected="New Script..." 1240 label="New Script" label_selected="New Script..."
1228 left="10" mouse_opaque="true" name="button new script" scale_image="TRUE" 1241 left="10" mouse_opaque="true" name="button new script" scale_image="TRUE"
1229 width="130" /> 1242 width="100" />
1243 <!--<button bottom_delta="0" left_delta="110" width="100" height="20" follows="left|top"
1244 label="Permissions..." name="button permissions" font="SansSerif" halign="center"
1245 mouse_opaque="true" scale_image="TRUE" />-->
1230 <panel bottom_delta="-330" follows="left|top" height="325" left="10" 1246 <panel bottom_delta="-330" follows="left|top" height="325" left="10"
1231 mouse_opaque="true" name="ContentsInventory" width="252" /> 1247 mouse_opaque="true" name="ContentsInventory" width="252" />
1232 </panel> 1248 </panel>
@@ -1236,22 +1252,10 @@
1236 1252
1237 <panel bottom="-550" follows="left|top" height="384" left="0" mouse_opaque="true" 1253 <panel bottom="-550" follows="left|top" height="384" left="0" mouse_opaque="true"
1238 name="land info panel" width="272"> 1254 name="land info panel" width="272">
1255 <!-- Parcel Information -->
1239 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 1256 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1240 bottom="-40" drop_shadow_visible="true" follows="left|top" 1257 bottom="-40" drop_shadow_visible="true" follows="left|top"
1241 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" 1258 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40"
1242 mouse_opaque="true" name="label_parcel_modify" v_pad="0" width="150">
1243 Modify Parcel
1244 </text>
1245 <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center"
1246 height="20" label="Subdivide..." label_selected="Subdivide..." left="48"
1247 mouse_opaque="true" name="button subdivide land" scale_image="TRUE"
1248 width="112" />
1249 <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center"
1250 height="20" label="Join..." label_selected="Join..." left="48"
1251 mouse_opaque="true" name="button join land" scale_image="TRUE" width="112" />
1252 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1253 bottom_delta="-56" drop_shadow_visible="true" follows="left|top"
1254 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40"
1255 mouse_opaque="true" name="label_parcel_info" v_pad="0" width="150"> 1259 mouse_opaque="true" name="label_parcel_info" v_pad="0" width="150">
1256 Parcel Information 1260 Parcel Information
1257 </text> 1261 </text>
@@ -1271,12 +1275,27 @@
1271 height="20" label="About Land..." label_selected="About Land..." left="48" 1275 height="20" label="About Land..." label_selected="About Land..." left="48"
1272 mouse_opaque="true" name="button about land" scale_image="TRUE" width="112" /> 1276 mouse_opaque="true" name="button about land" scale_image="TRUE" width="112" />
1273 <check_box bottom_delta="-24" control_name="ShowParcelOwners" follows="left|top" 1277 <check_box bottom_delta="-24" control_name="ShowParcelOwners" follows="left|top"
1274 tool_tip="Colour parcels according to their status" font="SansSerifSmall" 1278 tool_tip="Colour parcels according to their ownership" font="SansSerifSmall"
1275 height="16" initial_value="false" label="Show Status" left="48" 1279 height="16" initial_value="false" label="Show owners" left="48"
1276 mouse_opaque="true" name="checkbox show owners" width="100" /> 1280 mouse_opaque="true" name="checkbox show owners" width="100" />
1277 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 1281 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
1278 height="18" label="?" label_selected="?" left_delta="94" 1282 height="18" label="?" label_selected="?" left_delta="94"
1279 mouse_opaque="true" name="button show owners help" width="18" /> 1283 mouse_opaque="true" name="button show owners help" width="18" />
1284 <!-- Modify Parcel -->
1285 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1286 bottom_delta="-56" drop_shadow_visible="true" follows="left|top"
1287 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40"
1288 mouse_opaque="true" name="label_parcel_modify" v_pad="0" width="150">
1289 Modify Parcel
1290 </text>
1291 <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center"
1292 height="20" label="Subdivide..." label_selected="Subdivide..." left="48"
1293 mouse_opaque="true" name="button subdivide land" scale_image="TRUE"
1294 width="112" />
1295 <button bottom_delta="-24" follows="left|top" font="SansSerif" halign="center"
1296 height="20" label="Join..." label_selected="Join..." left="48"
1297 mouse_opaque="true" name="button join land" scale_image="TRUE" width="112" />
1298 <!-- Land Transactions -->
1280 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 1299 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1281 bottom_delta="-56" drop_shadow_visible="true" follows="left|top" 1300 bottom_delta="-56" drop_shadow_visible="true" follows="left|top"
1282 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40" 1301 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="40"
@@ -1307,10 +1326,10 @@
1307 Click and drag to change view 1326 Click and drag to change view
1308 </string> 1327 </string>
1309 <string name="status_grab"> 1328 <string name="status_grab">
1310 Drag to move objects, Ctrl to lift, Ctrl-Shift to spin 1329 Drag to move, Ctrl to lift, Ctrl-Shift to rotate
1311 </string> 1330 </string>
1312 <string name="status_place"> 1331 <string name="status_place">
1313 Click in the world to create, shift-click to select 1332 Click inworld to build
1314 </string> 1333 </string>
1315 <string name="status_selectland"> 1334 <string name="status_selectland">
1316 Click and drag to select land 1335 Click and drag to select land
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
index ac3d359..15cdc9e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
@@ -44,7 +44,11 @@
44 <on_enable function="Object.EnableReturn" /> 44 <on_enable function="Object.EnableReturn" />
45 </menu_item_call> 45 </menu_item_call>
46 <pie_menu label="More &gt;" name="Rate Menu"> 46 <pie_menu label="More &gt;" name="Rate Menu">
47 <menu_item_separator /> 47 <menu_item_call label="Backup" enabled="false" hidden="false"
48 mouse_opaqu="true" name="Export">
49 <on_click function="Object.Export" />
50 <on_enable function="Object.EnableExport" />
51 </menu_item_call>
48 <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute"> 52 <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute">
49 <on_click function="Object.Mute" /> 53 <on_click function="Object.Mute" />
50 <on_enable function="Object.EnableMute" /> 54 <on_enable function="Object.EnableMute" />
@@ -54,10 +58,8 @@
54 <on_click function="Object.ReportAbuse" /> 58 <on_click function="Object.ReportAbuse" />
55 <on_enable function="Object.EnableReportAbuse" /> 59 <on_enable function="Object.EnableReportAbuse" />
56 </menu_item_call> 60 </menu_item_call>
57 <menu_item_call label="Backup" enabled="false" hidden="false" 61 <menu_item_call enabled="false" label="Go Here" mouse_opaque="true" name="Go Here">
58 mouse_opaqu="true" name="Export"> 62 <on_click function="GoToObject" />
59 <on_click function="Object.Export" />
60 <on_enable function="Object.EnableExport" />
61 </menu_item_call> 63 </menu_item_call>
62 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect"> 64 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
63 <on_click function="Object.Inspect" /> 65 <on_click function="Object.Inspect" />
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 3681b62..81c49e7 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
@@ -892,6 +892,25 @@
892 userdata="QuietSnapshotsToDisk" /> 892 userdata="QuietSnapshotsToDisk" />
893 <on_check control="QuietSnapshotsToDisk" /> 893 <on_check control="QuietSnapshotsToDisk" />
894 </menu_item_check> 894 </menu_item_check>
895 <menu_item_call label="Ground Sit" name="Ground Sit"
896 shortcut="control|alt|s">
897 <on_click function="Advanced.ToggleSit" userdata="" />
898 <on_Check function="Advanced.CheckSit" userdata="" />
899 </menu_item_call>
900 <menu_item_check label="Phantom Avatar" name="Phantom"
901 shortcut="control|alt|p">
902 <on_click function="Advanced.TogglePhantom" userdata="" />
903 <on_check function="Advanced.CheckPhantom" userdata="" />
904 </menu_item_check>
905 <menu_item_check label="Animation List" name="Animation List">
906 <on_click function="ShowFloater" userdata="animation list" />
907 <on_check function="FloaterVisible" userdata="animation list" />
908 </menu_item_check>
909 <menu_item_check label="Asset Browser" name="asset browser"
910 shortcut="alt|shift|a">
911 <on_click function="Advanced.ToggleAssetBrowser" userdata="" />
912 <on_check function="Advanced.CheckAssetBrowser" userdata="" />
913 </menu_item_check>
895 <menu_item_check name="Show Mouselook Crosshairs" 914 <menu_item_check name="Show Mouselook Crosshairs"
896 label="Show Mouselook Crosshairs"> 915 label="Show Mouselook Crosshairs">
897 <on_click function="ToggleControl" 916 <on_click function="ToggleControl"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
index 464ecac..ac3a74a 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
@@ -8,13 +8,17 @@
8 <button bottom="-23" follows="left|bottom" font="SansSerif" halign="center" height="20" 8 <button bottom="-23" follows="left|bottom" font="SansSerif" halign="center" height="20"
9 label="Local Chat" left="7" name="History" 9 label="Local Chat" left="7" name="History"
10 tool_tip="Click here to see what has been said" width="93" /> 10 tool_tip="Click here to see what has been said" width="93" />
11 <spinner bottom="-24" decimal_digits="0" follows="left|bottom" height="20"
12 increment="1.00" initial_val="0" label="Channel" label_width="50" left="107"
13 max_val="2147483647" min_val="0" mouse_opaque="true" name="channel_control"
14 width="100" tool_tip="Set the default channel for inworld chat"/>
11 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-23" 15 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-23"
12 follows="left|right|bottom" font="SansSerif" 16 follows="left|right|bottom" font="SansSerif"
13 handle_edit_keys_directly="false" height="20" label="Click here to chat." 17 handle_edit_keys_directly="false" height="20" label="Click here to chat."
14 left="107" max_length="254" name="Chat Editor" 18 left="212" max_length="254" name="Chat Editor"
15 select_all_on_focus_received="false" select_on_focus="false" tab_group="1" 19 select_all_on_focus_received="false" select_on_focus="false" tab_group="1"
16 tool_tip="Press Enter to say, Ctrl-Enter to shout." width="105" /> 20 tool_tip="Press Enter to say, Ctrl-Enter to shout." width="5" />
17 <flyout_button bottom="-23" follows="right|bottom" height="20" label="Say" left_delta="109" 21 <flyout_button bottom="-23" follows="right|bottom" height="20" label="Say" left_delta="4"
18 list_position="above" mouse_opaque="true" name="Say" tool_tip="(Enter)" 22 list_position="above" mouse_opaque="true" name="Say" tool_tip="(Enter)"
19 width="80"> 23 width="80">
20 <flyout_button_item value="shout" name="shout_item"> 24 <flyout_button_item value="shout" name="shout_item">
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 24753d1..b0384cf 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
@@ -131,30 +131,34 @@
131 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 131 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
132 label="Close chat bar after hitting return" left="148" mouse_opaque="true" 132 label="Close chat bar after hitting return" left="148" mouse_opaque="true"
133 name="close_chat_on_return_check" radio_style="false" width="237" /> 133 name="close_chat_on_return_check" radio_style="false" width="237" />
134 <check_box bottom_delta="-20" enabled="true" 134 <check_box bottom_delta="-18" enabled="true"
135 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 135 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
136 label="Arrow keys always move avatar when chatting" left="148" 136 label="Arrow keys always move avatar when chatting" left="148"
137 mouse_opaque="true" name="arrow_keys_move_avatar_check" radio_style="false" 137 mouse_opaque="true" name="arrow_keys_move_avatar_check" radio_style="false"
138 width="237" /> 138 width="237" />
139 <check_box bottom_delta="-20" enabled="true" 139 <check_box bottom_delta="-18" enabled="true"
140 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 140 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
141 label="Show timestamps in Local Chat" left="148" mouse_opaque="true" 141 label="Show timestamps in Local Chat" left="148" mouse_opaque="true"
142 name="show_timestamps_check" radio_style="false" width="237" /> 142 name="show_timestamps_check" radio_style="false" width="237" />
143 <check_box bottom_delta="-20" enabled="true" 143 <check_box bottom_delta="-18" enabled="true"
144 follows="left|top" font="SansSerifSmall" height="16" initial_value="true" 144 follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
145 label="Play typing animation when chatting" left="148" mouse_opaque="true" 145 label="Play typing animation when chatting" left="148" mouse_opaque="true"
146 name="play_typing_animation" radio_style="false" width="237" /> 146 name="play_typing_animation" radio_style="false" width="237" />
147 <check_box bottom_delta="-18" enabled="true" follows="left|top"
148 font="SansSerifSmall" height="16" initial_value="false"
149 label="Show custom chat channel" left="148" mouse_opaque="true"
150 name="toggle_channel_control" radio_style="false" width="237" />
147 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 151 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
148 bottom="-369" drop_shadow_visible="true" enabled="true" follows="left|top" 152 bottom="-379" drop_shadow_visible="true" enabled="true" follows="left|top"
149 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" 153 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12"
150 mouse_opaque="false" name="text_box7" v_pad="0" width="128"> 154 mouse_opaque="false" name="text_box7" v_pad="0" width="128">
151 Bubble Chat: 155 Bubble Chat:
152 </text> 156 </text>
153 <check_box bottom="-376" control_name="UseChatBubbles" enabled="true" follows="left|top" 157 <check_box bottom="-386" control_name="UseChatBubbles" enabled="true" follows="left|top"
154 font="SansSerifSmall" height="16" initial_value="false" 158 font="SansSerifSmall" height="16" initial_value="false"
155 label="Show chat bubbles" left="148" mouse_opaque="true" 159 label="Show chat bubbles" left="148" mouse_opaque="true"
156 name="bubble_text_chat" radio_style="false" width="237" /> 160 name="bubble_text_chat" radio_style="false" width="237" />
157 <slider bottom="-392" can_edit_text="false" control_name="ChatBubbleOpacity" 161 <slider bottom="-402" can_edit_text="false" control_name="ChatBubbleOpacity"
158 decimal_digits="3" enabled="true" follows="left|top" height="12" 162 decimal_digits="3" enabled="true" follows="left|top" height="12"
159 increment="0.05" initial_val="1" label="Opacity" left="148" max_val="1" 163 increment="0.05" initial_val="1" label="Opacity" left="148" max_val="1"
160 min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true" 164 min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true"
diff --git a/linden/install.xml b/linden/install.xml
index b213b94..a713b0e 100644
--- a/linden/install.xml
+++ b/linden/install.xml
@@ -589,9 +589,9 @@
589 <key>windows</key> 589 <key>windows</key>
590 <map> 590 <map>
591 <key>md5sum</key> 591 <key>md5sum</key>
592 <string>f8db21e781735ba5dd84f3043d20e882</string> 592 <string>70ffd9d5e1c45a634be1beed70371784</string>
593 <key>url</key> 593 <key>url</key>
594 <uri>http://imprudenceviewer.org/download/libs/gstreamer-0.10.22-windows-04172009.tar.bz2</uri> 594 <uri>http://imprudenceviewer.org/download/libs/gstreamer-0.10.22-windows-20090903.tar.bz2</uri>
595 </map> 595 </map>
596 </map> 596 </map>
597 </map> 597 </map>
@@ -604,9 +604,9 @@
604 <key>windows</key> 604 <key>windows</key>
605 <map> 605 <map>
606 <key>md5sum</key> 606 <key>md5sum</key>
607 <string>9693550810903d5bca10e018fccd7994</string> 607 <string>77b954b9313459cb7cd6046bf91de296</string>
608 <key>url</key> 608 <key>url</key>
609 <uri>http://imprudenceviewer.org/download/libs/gstreamer-plugins-windows-20090608.tar.bz2</uri> 609 <uri>http://imprudenceviewer.org/download/libs/gstreamer-plugins-windows-20090903.tar.bz2</uri>
610 </map> 610 </map>
611 </map> 611 </map>
612 </map> 612 </map>
@@ -1459,9 +1459,9 @@ anguage Infrstructure (CLI) international standard</string>
1459 <key>windows</key> 1459 <key>windows</key>
1460 <map> 1460 <map>
1461 <key>md5sum</key> 1461 <key>md5sum</key>
1462 <string>9cb8990204da692fd2a9b6530091d9a8</string> 1462 <string>0efbf671a0d686bb0141895e91fbfc46</string>
1463 <key>url</key> 1463 <key>url</key>
1464 <uri>http://imprudenceviewer.org/download/libs/zlib-1.1.4-windows-20090608.tar.bz2</uri> 1464 <uri>http://imprudenceviewer.org/download/libs/zlib-1.1.4-windows-20090829.tar.bz2</uri>
1465 </map> 1465 </map>
1466 </map> 1466 </map>
1467 </map> 1467 </map>
diff --git a/linden/scripts/messages/message_template.msg b/linden/scripts/messages/message_template.msg
index 6d90622..4a16cf8 100644
--- a/linden/scripts/messages/message_template.msg
+++ b/linden/scripts/messages/message_template.msg
@@ -594,7 +594,7 @@ version 2.0
594// global x,y,z. Otherwise, use center of the AABB. 594// global x,y,z. Otherwise, use center of the AABB.
595// reliable 595// reliable
596{ 596{
597 PlacesReply Low 30 Trusted Zerocoded 597 PlacesReply Low 30 Trusted Zerocoded UDPDeprecated
598 { 598 {
599 AgentData Single 599 AgentData Single
600 { AgentID LLUUID } 600 { AgentID LLUUID }
@@ -1036,7 +1036,7 @@ version 2.0
1036// dataserver -> simulator -> viewer 1036// dataserver -> simulator -> viewer
1037// reliable 1037// reliable
1038{ 1038{
1039 DirLandReply Low 50 Trusted Zerocoded 1039 DirLandReply Low 50 Trusted Zerocoded UDPDeprecated
1040 { 1040 {
1041 AgentData Single 1041 AgentData Single
1042 { AgentID LLUUID } 1042 { AgentID LLUUID }
@@ -2589,6 +2589,10 @@ version 2.0
2589 { East F32 } 2589 { East F32 }
2590 { North F32 } 2590 { North F32 }
2591 } 2591 }
2592 {
2593 ModifyBlockExtended Variable
2594 { BrushSize F32 }
2595 }
2592} 2596}
2593 2597
2594 2598
@@ -8717,7 +8721,7 @@ version 2.0
8717 8721
8718// spaceserver -> simulator 8722// spaceserver -> simulator
8719{ 8723{
8720 RpcScriptRequestInboundForward Low 416 Trusted Unencoded 8724 RpcScriptRequestInboundForward Low 416 Trusted Unencoded UDPDeprecated
8721 { 8725 {
8722 DataBlock Single 8726 DataBlock Single
8723 { RPCServerIP IPADDR } 8727 { RPCServerIP IPADDR }