diff options
Diffstat (limited to 'linden/indra')
39 files changed, 1258 insertions, 845 deletions
diff --git a/linden/indra/llcommon/llchat.h b/linden/indra/llcommon/llchat.h index 6c75a25..4ec9a08 100644 --- a/linden/indra/llcommon/llchat.h +++ b/linden/indra/llcommon/llchat.h | |||
@@ -42,7 +42,8 @@ typedef enum e_chat_source_type | |||
42 | { | 42 | { |
43 | CHAT_SOURCE_SYSTEM = 0, | 43 | CHAT_SOURCE_SYSTEM = 0, |
44 | CHAT_SOURCE_AGENT = 1, | 44 | CHAT_SOURCE_AGENT = 1, |
45 | CHAT_SOURCE_OBJECT = 2 | 45 | CHAT_SOURCE_OBJECT = 2, |
46 | CHAT_SOURCE_OBJECT_IM = 3 | ||
46 | } EChatSourceType; | 47 | } EChatSourceType; |
47 | 48 | ||
48 | typedef enum e_chat_type | 49 | typedef enum e_chat_type |
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 5603a9c..9aa02ee 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp | |||
@@ -2198,10 +2198,16 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, | |||
2198 | S32 requested_sizeS = 0; | 2198 | S32 requested_sizeS = 0; |
2199 | S32 requested_sizeT = 0; | 2199 | S32 requested_sizeT = 0; |
2200 | 2200 | ||
2201 | sculpt_calc_mesh_resolution(sculpt_width, sculpt_height, sculpt_type, mDetail, requested_sizeS, requested_sizeT); | 2201 | // create oblong sculpties with high LOD always |
2202 | F32 sculpt_detail = mDetail; | ||
2203 | if (sculpt_width != sculpt_height && sculpt_detail < 4.0) | ||
2204 | { | ||
2205 | sculpt_detail = 4.0; | ||
2206 | } | ||
2207 | sculpt_calc_mesh_resolution(sculpt_width, sculpt_height, sculpt_type, sculpt_detail, requested_sizeS, requested_sizeT); | ||
2202 | 2208 | ||
2203 | mPathp->generate(mParams.getPathParams(), mDetail, 0, TRUE, requested_sizeS); | 2209 | mPathp->generate(mParams.getPathParams(), sculpt_detail, 0, TRUE, requested_sizeS); |
2204 | mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), mDetail, 0, TRUE, requested_sizeT); | 2210 | mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), sculpt_detail, 0, TRUE, requested_sizeT); |
2205 | 2211 | ||
2206 | S32 sizeS = mPathp->mPath.size(); // we requested a specific size, now see what we really got | 2212 | S32 sizeS = mPathp->mPath.size(); // we requested a specific size, now see what we really got |
2207 | S32 sizeT = mProfilep->mProfile.size(); // we requested a specific size, now see what we really got | 2213 | S32 sizeT = mProfilep->mProfile.size(); // we requested a specific size, now see what we really got |
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h index 51a8c37..8d2e756 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.h +++ b/linden/indra/llmedia/llmediaimplgstreamer.h | |||
@@ -40,12 +40,13 @@ | |||
40 | ///#if LL_GSTREAMER_ENABLED | 40 | ///#if LL_GSTREAMER_ENABLED |
41 | 41 | ||
42 | extern "C" { | 42 | extern "C" { |
43 | #include <stdio.h> | ||
44 | #include <gst/gst.h> | 43 | #include <gst/gst.h> |
44 | } | ||
45 | 45 | ||
46 | #include <stdio.h> | ||
46 | #include "apr_pools.h" | 47 | #include "apr_pools.h" |
47 | #include "apr_dso.h" | 48 | #include "apr_dso.h" |
48 | } | 49 | |
49 | 50 | ||
50 | #include "llmediaimplgstreamervidplug.h" | 51 | #include "llmediaimplgstreamervidplug.h" |
51 | #include "llgstplaythread.h" | 52 | #include "llgstplaythread.h" |
diff --git a/linden/indra/llui/llkeywords.cpp b/linden/indra/llui/llkeywords.cpp index b7e7d87..3580567 100644 --- a/linden/indra/llui/llkeywords.cpp +++ b/linden/indra/llui/llkeywords.cpp | |||
@@ -380,9 +380,9 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS | |||
380 | seg_start = cur - base; | 380 | seg_start = cur - base; |
381 | cur += cur_delimiter->getLength(); | 381 | cur += cur_delimiter->getLength(); |
382 | 382 | ||
383 | if( cur_delimiter->getType() == LLKeywordToken::TWO_SIDED_DELIMITER || LLKeywordToken::TWO_SIDED_DELIMITER_ESC) | 383 | LLKeywordToken::TOKEN_TYPE type = cur_delimiter->getType(); |
384 | if (type == LLKeywordToken::TWO_SIDED_DELIMITER || type == LLKeywordToken::TWO_SIDED_DELIMITER_ESC) | ||
384 | { | 385 | { |
385 | llassert( cur_delimiter->getDelimiter() != NULL ); | ||
386 | while( *cur && !cur_delimiter->isTail(cur)) | 386 | while( *cur && !cur_delimiter->isTail(cur)) |
387 | { | 387 | { |
388 | // Check for an escape sequence. | 388 | // Check for an escape sequence. |
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index e993564..3db96c4 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -856,6 +856,7 @@ set(viewer_HEADER_FILES | |||
856 | randgauss.h | 856 | randgauss.h |
857 | VertexCache.h | 857 | VertexCache.h |
858 | VorbisFramework.h | 858 | VorbisFramework.h |
859 | rlvdefines.h | ||
859 | rlvevent.h | 860 | rlvevent.h |
860 | rlvhandler.h | 861 | rlvhandler.h |
861 | rlvhelper.h | 862 | rlvhelper.h |
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 7cc10af..f167840 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -100,6 +100,50 @@ | |||
100 | <key>Value</key> | 100 | <key>Value</key> |
101 | <integer>0</integer> | 101 | <integer>0</integer> |
102 | </map> | 102 | </map> |
103 | <key>WarnFirstRLVDetach</key> | ||
104 | <map> | ||
105 | <key>Comment</key> | ||
106 | <string>Enables FirstRLVDetach warning dialog</string> | ||
107 | <key>Persist</key> | ||
108 | <integer>1</integer> | ||
109 | <key>Type</key> | ||
110 | <string>Boolean</string> | ||
111 | <key>Value</key> | ||
112 | <integer>1</integer> | ||
113 | </map> | ||
114 | <key>WarnFirstRLVEnableWear</key> | ||
115 | <map> | ||
116 | <key>Comment</key> | ||
117 | <string>Enables RLVEnableWear warning dialog</string> | ||
118 | <key>Persist</key> | ||
119 | <integer>1</integer> | ||
120 | <key>Type</key> | ||
121 | <string>Boolean</string> | ||
122 | <key>Value</key> | ||
123 | <integer>1</integer> | ||
124 | </map> | ||
125 | <key>WarnFirstRLVFartouch</key> | ||
126 | <map> | ||
127 | <key>Comment</key> | ||
128 | <string>Enables FirstRLVFartouch warning dialog</string> | ||
129 | <key>Persist</key> | ||
130 | <integer>1</integer> | ||
131 | <key>Type</key> | ||
132 | <string>Boolean</string> | ||
133 | <key>Value</key> | ||
134 | <integer>1</integer> | ||
135 | </map> | ||
136 | <key>WarnFirstRLVGiveToRLV</key> | ||
137 | <map> | ||
138 | <key>Comment</key> | ||
139 | <string>Enables FirstRLVGiveToRLV warning dialog</string> | ||
140 | <key>Persist</key> | ||
141 | <integer>1</integer> | ||
142 | <key>Type</key> | ||
143 | <string>Boolean</string> | ||
144 | <key>Value</key> | ||
145 | <integer>1</integer> | ||
146 | </map> | ||
103 | <key>AFKTimeout</key> | 147 | <key>AFKTimeout</key> |
104 | <map> | 148 | <map> |
105 | <key>Comment</key> | 149 | <key>Comment</key> |
@@ -5044,6 +5088,28 @@ | |||
5044 | <key>Value</key> | 5088 | <key>Value</key> |
5045 | <integer>1</integer> | 5089 | <integer>1</integer> |
5046 | </map> | 5090 | </map> |
5091 | <key>MiniMapNotifyChatRange</key> | ||
5092 | <map> | ||
5093 | <key>Comment</key> | ||
5094 | <string>Notify when avatars enter chat range</string> | ||
5095 | <key>Persist</key> | ||
5096 | <integer>1</integer> | ||
5097 | <key>Type</key> | ||
5098 | <string>Boolean</string> | ||
5099 | <key>Value</key> | ||
5100 | <integer>1</integer> | ||
5101 | </map> | ||
5102 | <key>MiniMapNotifySimRange</key> | ||
5103 | <map> | ||
5104 | <key>Comment</key> | ||
5105 | <string>Notify when avatars enters the current sim</string> | ||
5106 | <key>Persist</key> | ||
5107 | <integer>1</integer> | ||
5108 | <key>Type</key> | ||
5109 | <string>Boolean</string> | ||
5110 | <key>Value</key> | ||
5111 | <integer>0</integer> | ||
5112 | </map> | ||
5047 | <key>MiniMapPrimMaxRadius</key> | 5113 | <key>MiniMapPrimMaxRadius</key> |
5048 | <map> | 5114 | <map> |
5049 | <key>Comment</key> | 5115 | <key>Comment</key> |
@@ -5449,6 +5515,22 @@ | |||
5449 | <real>1</real> | 5515 | <real>1</real> |
5450 | </array> | 5516 | </array> |
5451 | </map> | 5517 | </map> |
5518 | <key>ObjectIMColor</key> | ||
5519 | <map> | ||
5520 | <key>Comment</key> | ||
5521 | <string>Color of IMs from objects</string> | ||
5522 | <key>Persist</key> | ||
5523 | <integer>1</integer> | ||
5524 | <key>Type</key> | ||
5525 | <string>Color4</string> | ||
5526 | <key>Value</key> | ||
5527 | <array> | ||
5528 | <real>0.699999988079</real> | ||
5529 | <real>0.899999976158</real> | ||
5530 | <real>0.699999988079</real> | ||
5531 | <real>1</real> | ||
5532 | </array> | ||
5533 | </map> | ||
5452 | <key>OpenDebugStatAdvanced</key> | 5534 | <key>OpenDebugStatAdvanced</key> |
5453 | <map> | 5535 | <map> |
5454 | <key>Comment</key> | 5536 | <key>Comment</key> |
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index b807b17..7c611a3 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp | |||
@@ -44,6 +44,10 @@ | |||
44 | #include "llappviewer.h" | 44 | #include "llappviewer.h" |
45 | #include "lltracker.h" | 45 | #include "lltracker.h" |
46 | 46 | ||
47 | // [RLVa:KB] - Version: 1.22.11 | ||
48 | #include "llviewerwindow.h" | ||
49 | // [/RLVa:KB] | ||
50 | |||
47 | // static | 51 | // static |
48 | std::set<std::string> LLFirstUse::sConfigVariables; | 52 | std::set<std::string> LLFirstUse::sConfigVariables; |
49 | 53 | ||
@@ -287,3 +291,36 @@ void LLFirstUse::useMedia() | |||
287 | LLNotifyBox::showXml("FirstMedia"); | 291 | LLNotifyBox::showXml("FirstMedia"); |
288 | } | 292 | } |
289 | } | 293 | } |
294 | |||
295 | // [RLVa:KB] - Version: 1.22.11 | Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a | ||
296 | |||
297 | // SL-1.22.11 doesn't seem to have a way to check which notifications are currently open :( | ||
298 | bool rlvHasVisibleFirstUseNotification() | ||
299 | { | ||
300 | return false; | ||
301 | } | ||
302 | |||
303 | void LLFirstUse::showRlvFirstUseNotification(const std::string& strName) | ||
304 | { | ||
305 | if ( (gSavedSettings.getWarning(strName)) && (!rlvHasVisibleFirstUseNotification()) ) | ||
306 | { | ||
307 | gSavedSettings.setWarning(strName, FALSE); | ||
308 | LLNotifyBox::showXml(strName); | ||
309 | } | ||
310 | } | ||
311 | |||
312 | void LLFirstUse::warnRlvGiveToRLV() | ||
313 | { | ||
314 | if ( (gSavedSettings.getWarning(RLV_SETTING_FIRSTUSE_GIVETORLV)) && (RlvSettings::getForbidGiveToRLV()) ) | ||
315 | gViewerWindow->alertXml(RLV_SETTING_FIRSTUSE_GIVETORLV, LLStringUtil::format_map_t(), &LLFirstUse::onRlvGiveToRLVConfirmation, NULL); | ||
316 | } | ||
317 | |||
318 | void LLFirstUse::onRlvGiveToRLVConfirmation(S32 idxOption, void* /*pUserParam*/) | ||
319 | { | ||
320 | gSavedSettings.setWarning(RLV_SETTING_FIRSTUSE_GIVETORLV, FALSE); | ||
321 | |||
322 | if ( (0 == idxOption) || (1 == idxOption) ) | ||
323 | gSavedSettings.setBOOL(RLV_SETTING_FORBIDGIVETORLV, (idxOption == 1)); | ||
324 | } | ||
325 | |||
326 | // [/RLVa:KB] | ||
diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h index cbb31ab..7460067 100644 --- a/linden/indra/newview/llfirstuse.h +++ b/linden/indra/newview/llfirstuse.h | |||
@@ -35,6 +35,10 @@ | |||
35 | #include <vector> | 35 | #include <vector> |
36 | #include "llstring.h" | 36 | #include "llstring.h" |
37 | 37 | ||
38 | // [RLVa:KB] | ||
39 | #include "rlvdefines.h" | ||
40 | // [/RLVa:KB] | ||
41 | |||
38 | /* | 42 | /* |
39 | 1. On first use of 'sit here', explain how to get up and rotate view. | 43 | 1. On first use of 'sit here', explain how to get up and rotate view. |
40 | 44 | ||
@@ -109,6 +113,19 @@ public: | |||
109 | 113 | ||
110 | protected: | 114 | protected: |
111 | static std::set<std::string> sConfigVariables; | 115 | static std::set<std::string> sConfigVariables; |
116 | |||
117 | // [RLVa:KB] - Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a | ||
118 | public: | ||
119 | static void showRlvFirstUseNotification(const std::string& strName); | ||
120 | |||
121 | static void useRlvDetach() { showRlvFirstUseNotification(RLV_SETTING_FIRSTUSE_DETACH); } | ||
122 | static void useRlvEnableWear() { showRlvFirstUseNotification(RLV_SETTING_FIRSTUSE_ENABLEWEAR); } | ||
123 | static void useRlvFartouch() { showRlvFirstUseNotification(RLV_SETTING_FIRSTUSE_FARTOUCH); } | ||
124 | |||
125 | static void warnRlvGiveToRLV(); | ||
126 | protected: | ||
127 | static void onRlvGiveToRLVConfirmation(S32 idxOption, void* pUserParam); | ||
128 | // [/RLVa:KB] | ||
112 | }; | 129 | }; |
113 | 130 | ||
114 | #endif | 131 | #endif |
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 1f34ad0..79c4aa6 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp | |||
@@ -213,11 +213,23 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& | |||
213 | } | 213 | } |
214 | 214 | ||
215 | // If the chat line has an associated url, link it up to the name. | 215 | // If the chat line has an associated url, link it up to the name. |
216 | if (!chat.mURL.empty() | 216 | if ((!chat.mURL.empty() && line.length() > chat.mFromName.length()) && |
217 | && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) | 217 | (line.find(chat.mFromName,0) == 0 || (line.find(chat.mFromName,0) == 4 && |
218 | color == gSavedSettings.getColor4("ObjectIMColor")))) // hack to make sure IMs in chat history don't hightlight | ||
218 | { | 219 | { |
219 | std::string start_line = line.substr(0, chat.mFromName.length() + 1); | 220 | std::string start_line; |
220 | line = line.substr(chat.mFromName.length() + 1); | 221 | if (line.find(chat.mFromName,0) == 4) // IMs are prefaced with "IM: " |
222 | { | ||
223 | start_line = line.substr(4, chat.mFromName.length() + 1); | ||
224 | std::string source = line.substr(0, 4); | ||
225 | edit->appendColoredText(source, false, prepend_newline, color); | ||
226 | line = line.substr(chat.mFromName.length() + 5); | ||
227 | } | ||
228 | else | ||
229 | { | ||
230 | start_line = line.substr(0, chat.mFromName.length() + 1); | ||
231 | line = line.substr(chat.mFromName.length() + 1); | ||
232 | } | ||
221 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL); | 233 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL); |
222 | edit->appendStyledText(start_line, false, prepend_newline, sourceStyle); | 234 | edit->appendStyledText(start_line, false, prepend_newline, sourceStyle); |
223 | prepend_newline = false; | 235 | prepend_newline = false; |
@@ -536,6 +548,9 @@ LLColor4 get_text_color(const LLChat& chat) | |||
536 | text_color = gSavedSettings.getColor4("ObjectChatColor"); | 548 | text_color = gSavedSettings.getColor4("ObjectChatColor"); |
537 | } | 549 | } |
538 | break; | 550 | break; |
551 | case CHAT_SOURCE_OBJECT_IM: | ||
552 | text_color = gSavedSettings.getColor4("ObjectIMColor"); | ||
553 | break; | ||
539 | default: | 554 | default: |
540 | text_color.setToWhite(); | 555 | text_color.setToWhite(); |
541 | } | 556 | } |
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 6d23ab4..0ee0f2b 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp | |||
@@ -43,8 +43,10 @@ | |||
43 | #include "lluictrlfactory.h" | 43 | #include "lluictrlfactory.h" |
44 | 44 | ||
45 | // radar | 45 | // radar |
46 | #include "llchat.h" | ||
46 | #include "llfirstuse.h" | 47 | #include "llfirstuse.h" |
47 | #include "llfloateravatarinfo.h" | 48 | #include "llfloateravatarinfo.h" |
49 | #include "llfloaterchat.h" | ||
48 | #include "llfloaterfriends.h" | 50 | #include "llfloaterfriends.h" |
49 | #include "llfloatergroupinvite.h" | 51 | #include "llfloatergroupinvite.h" |
50 | #include "llfloatergroups.h" | 52 | #include "llfloatergroups.h" |
@@ -69,13 +71,16 @@ LLFloaterMap::LLFloaterMap(const LLSD& key) | |||
69 | : | 71 | : |
70 | LLFloater(std::string("minimap")), | 72 | LLFloater(std::string("minimap")), |
71 | mPanelMap(NULL), | 73 | mPanelMap(NULL), |
72 | mUpdate(TRUE) | 74 | mUpdate(TRUE), |
75 | mSelectedAvatar(LLUUID::null) | ||
76 | |||
73 | { | 77 | { |
74 | LLCallbackMap::map_t factory_map; | 78 | LLCallbackMap::map_t factory_map; |
75 | factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this); | 79 | factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this); |
76 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); | 80 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); |
77 | 81 | ||
78 | mSelectedAvatar.setNull(); | 82 | mChatAvatars.clear(); |
83 | mTypingAvatars.clear(); | ||
79 | } | 84 | } |
80 | 85 | ||
81 | 86 | ||
@@ -194,6 +199,21 @@ void LLFloaterMap::open() | |||
194 | */ | 199 | */ |
195 | 200 | ||
196 | //static | 201 | //static |
202 | bool LLFloaterMap::isImpDev(LLUUID agent_id) | ||
203 | { | ||
204 | // We use strings here as avatar keys change across grids. | ||
205 | // Feel free to add/remove yourself. | ||
206 | std::string agent_name = getSelectedName(agent_id); | ||
207 | if (agent_name == "McCabe Maxsted" || | ||
208 | agent_name == "Jacek Antonelli" || | ||
209 | agent_name == "Armin Weatherwax") | ||
210 | { | ||
211 | return true; | ||
212 | } | ||
213 | return false; | ||
214 | } | ||
215 | |||
216 | //static | ||
197 | void LLFloaterMap::updateRadar() | 217 | void LLFloaterMap::updateRadar() |
198 | { | 218 | { |
199 | LLFloaterMap::getInstance()->populateRadar(); | 219 | LLFloaterMap::getInstance()->populateRadar(); |
@@ -217,78 +237,257 @@ void LLFloaterMap::populateRadar() | |||
217 | 237 | ||
218 | S32 scroll_pos = mRadarList->getScrollPos(); | 238 | S32 scroll_pos = mRadarList->getScrollPos(); |
219 | 239 | ||
220 | LLVector3d current_pos = gAgent.getPositionGlobal(); | 240 | // clear count |
241 | std::stringstream avatar_count; | ||
242 | avatar_count.str(""); | ||
221 | 243 | ||
222 | // find what avatars you can see | 244 | // find what avatars you can see |
245 | F32 range = gSavedSettings.getF32("NearMeRange"); | ||
246 | LLVector3d current_pos = gAgent.getPositionGlobal(); | ||
223 | std::vector<LLUUID> avatar_ids; | 247 | std::vector<LLUUID> avatar_ids; |
224 | std::vector<LLVector3d> positions; | 248 | std::vector<LLVector3d> positions; |
225 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, current_pos, gSavedSettings.getF32("NearMeRange")); | 249 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); |
226 | 250 | ||
227 | LLSD element; | 251 | LLSD element; |
228 | 252 | ||
229 | mRadarList->deleteAllItems(); | 253 | mRadarList->deleteAllItems(); |
230 | 254 | ||
231 | for (U32 i=0; i<avatar_ids.size(); i++) | 255 | if (!avatar_ids.empty()) |
232 | { | 256 | { |
233 | if (avatar_ids[i] == gAgent.getID() || | 257 | for (U32 i=0; i<avatar_ids.size(); i++) |
234 | avatar_ids[i].isNull()) | ||
235 | { | 258 | { |
236 | continue; | 259 | if (avatar_ids[i] == gAgent.getID() || |
237 | } | 260 | avatar_ids[i].isNull()) |
261 | { | ||
262 | continue; | ||
263 | } | ||
238 | 264 | ||
239 | // Add to list only if we get their name | 265 | // Add to list only if we get their name |
240 | std::string fullname = getSelectedName(avatar_ids[i]); | 266 | std::string fullname = getSelectedName(avatar_ids[i]); |
241 | if (!fullname.empty()) | 267 | if (!fullname.empty()) |
242 | { | ||
243 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 | ||
244 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
245 | { | 268 | { |
246 | fullname = gRlvHandler.getAnonym(fullname); | 269 | bool notify_chat = gSavedSettings.getBOOL("MiniMapNotifyChatRange"); |
270 | bool notify_sim = gSavedSettings.getBOOL("MiniMapNotifySimRange"); | ||
271 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 | ||
272 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
273 | { | ||
274 | fullname = gRlvHandler.getAnonym(fullname); | ||
275 | notify_chat = false; | ||
276 | notify_sim = false; | ||
277 | } | ||
278 | // [/RLVa:KB] | ||
279 | |||
280 | // check if they're in certain ranges and notify user if we've enabled that | ||
281 | LLVector3d temp = positions[i] - current_pos; | ||
282 | F32 distance = llround((F32)temp.magVec(), 0.1f); | ||
283 | /*char dist[32]; | ||
284 | sprintf(dist, "%.1f", distance); | ||
285 | std::string dist_string = dist;*/ | ||
286 | std::string dist_string = llformat("%.1f", distance); | ||
287 | |||
288 | if (notify_chat) | ||
289 | { | ||
290 | if (distance < 20.0f) | ||
291 | { | ||
292 | if (!getInChatList(avatar_ids[i])) | ||
293 | { | ||
294 | addToChatList(avatar_ids[i], dist_string); | ||
295 | } | ||
296 | } | ||
297 | else | ||
298 | { | ||
299 | if (getInChatList(avatar_ids[i])) | ||
300 | { | ||
301 | removeFromChatList(avatar_ids[i]); | ||
302 | } | ||
303 | } | ||
304 | updateChatList(avatar_ids); | ||
305 | } | ||
306 | else if (!mChatAvatars.empty()) | ||
307 | { | ||
308 | mChatAvatars.clear(); | ||
309 | } | ||
310 | |||
311 | if (notify_sim) | ||
312 | { | ||
313 | if (!getInChatList(avatar_ids[i]) && !getInSimAvList(avatar_ids[i])) | ||
314 | { | ||
315 | LLViewerObject *av_obj = gObjectList.findObject(avatar_ids[i]); | ||
316 | if (av_obj != NULL && av_obj->isAvatar()) | ||
317 | { | ||
318 | LLVOAvatar* avatarp = (LLVOAvatar*)av_obj; | ||
319 | if (avatarp != NULL) | ||
320 | { | ||
321 | if (avatarp->getRegion() == gAgent.getRegion()) | ||
322 | { | ||
323 | addToSimAvList(avatar_ids[i], dist_string); | ||
324 | } | ||
325 | } | ||
326 | } | ||
327 | } | ||
328 | updateSimAvList(avatar_ids); | ||
329 | } | ||
330 | else if (!mSimAvatars.empty()) | ||
331 | { | ||
332 | mSimAvatars.clear(); | ||
333 | } | ||
334 | |||
335 | // only display avatars in range | ||
336 | if (distance <= range) | ||
337 | { | ||
338 | // append typing string | ||
339 | std::string typing = ""; | ||
340 | if (getIsTyping(avatar_ids[i])) | ||
341 | { | ||
342 | typing = getString("is_typing")+ " "; | ||
343 | } | ||
344 | |||
345 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("is_muted") : ""; | ||
346 | element["id"] = avatar_ids[i]; | ||
347 | element["columns"][0]["column"] = "avatar_name"; | ||
348 | element["columns"][0]["type"] = "text"; | ||
349 | element["columns"][0]["value"] = typing + fullname + " " + mute_text; | ||
350 | element["columns"][1]["column"] = "avatar_distance"; | ||
351 | element["columns"][1]["type"] = "text"; | ||
352 | element["columns"][1]["value"] = dist_string+"m"; | ||
353 | |||
354 | mRadarList->addElement(element, ADD_BOTTOM); | ||
355 | } | ||
247 | } | 356 | } |
248 | // [/RLVa:KB] | 357 | } |
249 | 358 | ||
250 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("muted") : ""; | 359 | mRadarList->sortItems(); |
251 | element["id"] = avatar_ids[i]; | 360 | mRadarList->setScrollPos(scroll_pos); |
252 | element["columns"][0]["column"] = "avatar_name"; | 361 | if (mSelectedAvatar.notNull()) |
253 | element["columns"][0]["type"] = "text"; | 362 | { |
254 | element["columns"][0]["value"] = fullname + " " + mute_text; | 363 | mRadarList->selectByID(mSelectedAvatar); |
255 | element["columns"][1]["column"] = "avatar_distance"; | ||
256 | element["columns"][1]["type"] = "text"; | ||
257 | |||
258 | LLVector3d temp = positions[i] - current_pos; | ||
259 | F32 distance = (F32)temp.magVec(); | ||
260 | char dist[32]; | ||
261 | snprintf(dist, sizeof(dist), "%.1f", distance); | ||
262 | element["columns"][1]["value"] = strcat(dist,"m"); | ||
263 | |||
264 | mRadarList->addElement(element, ADD_BOTTOM); | ||
265 | } | 364 | } |
365 | avatar_count << (int)avatar_ids.size(); | ||
366 | } | ||
367 | else | ||
368 | { | ||
369 | mTypingAvatars.clear(); | ||
370 | mRadarList->addCommentText(getString("no_one_near"), ADD_TOP); | ||
371 | avatar_count << "0"; | ||
266 | } | 372 | } |
267 | 373 | ||
268 | mRadarList->sortItems(); | 374 | childSetText("lblAvatarCount", avatar_count.str()); |
269 | mRadarList->setScrollPos(scroll_pos); | 375 | |
270 | if (mSelectedAvatar.notNull()) | 376 | toggleButtons(); |
377 | |||
378 | //llinfos << "mSelectedAvatar: " << mSelectedAvatar.asString() << llendl; | ||
379 | } | ||
380 | |||
381 | void LLFloaterMap::updateChatList(std::vector<LLUUID> agent_ids) | ||
382 | { | ||
383 | std::set<LLUUID>::iterator it; | ||
384 | std::vector<LLUUID>::iterator result; | ||
385 | for (it = mChatAvatars.begin(); it != mChatAvatars.end(); ) | ||
271 | { | 386 | { |
272 | mRadarList->selectByID(mSelectedAvatar); | 387 | result = find(agent_ids.begin(), agent_ids.end(), *it); |
388 | if (result == agent_ids.end()) | ||
389 | { | ||
390 | mChatAvatars.erase(it++); | ||
391 | } | ||
392 | else | ||
393 | { | ||
394 | it++; | ||
395 | } | ||
273 | } | 396 | } |
397 | } | ||
274 | 398 | ||
275 | // set count | 399 | bool LLFloaterMap::getInChatList(LLUUID agent_id) |
276 | std::stringstream avatar_count; | 400 | { |
277 | avatar_count.str(""); | 401 | if (mChatAvatars.count(agent_id) > 0) |
278 | if (avatar_ids.empty()) | ||
279 | { | 402 | { |
280 | mRadarList->addCommentText(getString("no_one_near"), ADD_TOP); | 403 | return true; |
281 | avatar_count << "0"; | 404 | } |
405 | return false; | ||
406 | } | ||
407 | |||
408 | void LLFloaterMap::addToChatList(LLUUID agent_id, std::string distance) | ||
409 | { | ||
410 | mChatAvatars.insert(agent_id); | ||
411 | LLChat chat; | ||
412 | |||
413 | LLUIString notify = getString("entering_chat_range"); | ||
414 | notify.setArg("[NAME]", getSelectedName(agent_id)); | ||
415 | notify.setArg("[DISTANCE]", distance); | ||
416 | |||
417 | chat.mText = notify; | ||
418 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
419 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
420 | } | ||
421 | |||
422 | void LLFloaterMap::removeFromChatList(LLUUID agent_id) | ||
423 | { | ||
424 | // Do we want to add a notice? | ||
425 | mChatAvatars.erase(agent_id); | ||
426 | } | ||
427 | |||
428 | bool LLFloaterMap::getIsTyping(LLUUID agent_id) | ||
429 | { | ||
430 | if (mTypingAvatars.count(agent_id) > 0) | ||
431 | { | ||
432 | return true; | ||
433 | } | ||
434 | return false; | ||
435 | } | ||
436 | |||
437 | void LLFloaterMap::updateTypingList(LLUUID agent_id, bool remove) | ||
438 | { | ||
439 | if (remove) | ||
440 | { | ||
441 | if (getIsTyping(agent_id)) | ||
442 | { | ||
443 | mTypingAvatars.erase(agent_id); | ||
444 | } | ||
282 | } | 445 | } |
283 | else | 446 | else |
284 | { | 447 | { |
285 | avatar_count << (int)avatar_ids.size(); | 448 | mTypingAvatars.insert(agent_id); |
286 | } | 449 | } |
287 | childSetText("lblAvatarCount", avatar_count.str()); | 450 | } |
288 | 451 | ||
289 | toggleButtons(); | 452 | void LLFloaterMap::updateSimAvList(std::vector<LLUUID> agent_ids) |
453 | { | ||
454 | std::set<LLUUID>::iterator it; | ||
455 | std::vector<LLUUID>::iterator result; | ||
456 | for (it = mSimAvatars.begin(); it != mSimAvatars.end(); ) | ||
457 | { | ||
458 | result = find(agent_ids.begin(), agent_ids.end(), *it); | ||
459 | if (result == agent_ids.end()) | ||
460 | { | ||
461 | mSimAvatars.erase(it++); | ||
462 | } | ||
463 | else | ||
464 | { | ||
465 | it++; | ||
466 | } | ||
467 | } | ||
468 | } | ||
290 | 469 | ||
291 | //llinfos << "mSelectedAvatar: " << mSelectedAvatar.asString() << llendl; | 470 | void LLFloaterMap::addToSimAvList(LLUUID agent_id, std::string distance) |
471 | { | ||
472 | mSimAvatars.insert(agent_id); | ||
473 | LLChat chat; | ||
474 | |||
475 | LLUIString notify = getString("entering_sim_range"); | ||
476 | notify.setArg("[NAME]", getSelectedName(agent_id)); | ||
477 | notify.setArg("[DISTANCE]", distance); | ||
478 | |||
479 | chat.mText = notify; | ||
480 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
481 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
482 | } | ||
483 | |||
484 | bool LLFloaterMap::getInSimAvList(LLUUID agent_id) | ||
485 | { | ||
486 | if (mSimAvatars.count(agent_id) > 0) | ||
487 | { | ||
488 | return true; | ||
489 | } | ||
490 | return false; | ||
292 | } | 491 | } |
293 | 492 | ||
294 | void LLFloaterMap::toggleButtons() | 493 | void LLFloaterMap::toggleButtons() |
diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h index 81e4159..af4d1cc 100644 --- a/linden/indra/newview/llfloatermap.h +++ b/linden/indra/newview/llfloatermap.h | |||
@@ -49,6 +49,11 @@ public: | |||
49 | 49 | ||
50 | static void updateRadar(); | 50 | static void updateRadar(); |
51 | static LLUUID getSelected(); | 51 | static LLUUID getSelected(); |
52 | // returns true if agent_id belongs to a developer listed in llfloatermap.cpp | ||
53 | static bool isImpDev(LLUUID agent_id); | ||
54 | |||
55 | bool getIsTyping(LLUUID agent_id); | ||
56 | void updateTypingList(LLUUID agent_id, bool remove); | ||
52 | 57 | ||
53 | BOOL postBuild(); | 58 | BOOL postBuild(); |
54 | 59 | ||
@@ -62,12 +67,20 @@ public: | |||
62 | 67 | ||
63 | 68 | ||
64 | private: | 69 | private: |
70 | |||
65 | LLFloaterMap(const LLSD& key = LLSD()); | 71 | LLFloaterMap(const LLSD& key = LLSD()); |
66 | 72 | ||
67 | LLNetMap* mPanelMap; | 73 | LLNetMap* mPanelMap; |
68 | LLScrollListCtrl* mRadarList; | 74 | LLScrollListCtrl* mRadarList; |
69 | LLUUID mSelectedAvatar; | 75 | LLUUID mSelectedAvatar; |
70 | bool mUpdate; | 76 | |
77 | // TODO: move all this info into its own object. It's stupid | ||
78 | // and bug-prone to keep it all in separate containers, but | ||
79 | // I want to get this out for 1.2 -- McCabe | ||
80 | std::set<LLUUID> mChatAvatars; | ||
81 | std::set<LLUUID> mTypingAvatars; | ||
82 | std::set<LLUUID> mSimAvatars; | ||
83 | bool mUpdate; | ||
71 | 84 | ||
72 | static void onList(LLUICtrl* ctrl, void* user_data); | 85 | static void onList(LLUICtrl* ctrl, void* user_data); |
73 | static void onRangeChange(LLFocusableElement* focus, void* user_data); | 86 | static void onRangeChange(LLFocusableElement* focus, void* user_data); |
@@ -76,6 +89,15 @@ private: | |||
76 | void toggleButtons(); | 89 | void toggleButtons(); |
77 | void populateRadar(); | 90 | void populateRadar(); |
78 | 91 | ||
92 | void updateChatList(std::vector<LLUUID> agent_ids); | ||
93 | bool getInChatList(LLUUID agent_id); | ||
94 | void addToChatList(LLUUID agent_id, std::string distance); | ||
95 | void removeFromChatList(LLUUID agent_id); | ||
96 | |||
97 | bool getInSimAvList(LLUUID agent_id); | ||
98 | void addToSimAvList(LLUUID agent_id, std::string distance); | ||
99 | void updateSimAvList(std::vector<LLUUID> agent_ids); | ||
100 | |||
79 | static void onClickProfile(void* user_data); | 101 | static void onClickProfile(void* user_data); |
80 | static void onClickIM(void* user_data); | 102 | static void onClickIM(void* user_data); |
81 | static void onClickAddFriend(void* user_data); | 103 | static void onClickAddFriend(void* user_data); |
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 618c4f9..0d5625c 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -3505,7 +3505,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3505 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment()) ) | 3505 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment()) ) |
3506 | { | 3506 | { |
3507 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); | 3507 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); |
3508 | if ( (!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt->getObject())) ) | 3508 | if ( (!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt)) ) |
3509 | disabled_items.push_back(std::string("Object Wear")); | 3509 | disabled_items.push_back(std::string("Object Wear")); |
3510 | } | 3510 | } |
3511 | // [/RLVa:KB] | 3511 | // [/RLVa:KB] |
@@ -4057,7 +4057,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata ) | |||
4057 | for (S32 idxObj = obj_item_array.count() - 1; idxObj >= 0; idxObj--) | 4057 | for (S32 idxObj = obj_item_array.count() - 1; idxObj >= 0; idxObj--) |
4058 | { | 4058 | { |
4059 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(obj_item_array.get(idxObj).get(), true); | 4059 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(obj_item_array.get(idxObj).get(), true); |
4060 | if ( ((!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt->getObject()))) ) | 4060 | if ( ((!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt))) ) |
4061 | obj_item_array.remove(idxObj); | 4061 | obj_item_array.remove(idxObj); |
4062 | } | 4062 | } |
4063 | obj_count = obj_item_array.count(); | 4063 | obj_count = obj_item_array.count(); |
@@ -4245,7 +4245,7 @@ void wear_attachments_on_avatar(const std::set<LLUUID>& item_ids, BOOL remove) | |||
4245 | // [RLVa:KB] - Checked: 2009-09-11 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c | 4245 | // [RLVa:KB] - Checked: 2009-09-11 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c |
4246 | LLViewerJointAttachment* pAttachPt = NULL; | 4246 | LLViewerJointAttachment* pAttachPt = NULL; |
4247 | if ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment()) || | 4247 | if ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment()) || |
4248 | (((pAttachPt = gRlvHandler.getAttachPoint(item, true)) != NULL) && (gRlvHandler.isDetachable(pAttachPt->getObject()))) ) | 4248 | (((pAttachPt = gRlvHandler.getAttachPoint(item, true)) != NULL) && (gRlvHandler.isDetachable(pAttachPt))) ) |
4249 | { | 4249 | { |
4250 | items.put(item); | 4250 | items.put(item); |
4251 | } | 4251 | } |
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index f055dbc..5aaee1a 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -344,8 +344,9 @@ void LLNetMap::draw() | |||
344 | LLColor4 friend_color = gColors.getColor( "MapFriend" ); | 344 | LLColor4 friend_color = gColors.getColor( "MapFriend" ); |
345 | LLColor4 muted_color = gColors.getColor( "MapMuted" ); | 345 | LLColor4 muted_color = gColors.getColor( "MapMuted" ); |
346 | LLColor4 selected_color = gColors.getColor( "MapSelected" ); | 346 | LLColor4 selected_color = gColors.getColor( "MapSelected" ); |
347 | LLColor4 imp_dev_color = gColors.getColor( "MapImpDev" ); | ||
347 | LLColor4 glyph_color; | 348 | LLColor4 glyph_color; |
348 | F32 glyph_radius; | 349 | int selected = -1; |
349 | 350 | ||
350 | std::vector<LLUUID> avatar_ids; | 351 | std::vector<LLUUID> avatar_ids; |
351 | std::vector<LLVector3d> positions; | 352 | std::vector<LLVector3d> positions; |
@@ -356,19 +357,23 @@ void LLNetMap::draw() | |||
356 | // just be careful to sort the avatar IDs along with the positions. -MG | 357 | // just be careful to sort the avatar IDs along with the positions. -MG |
357 | pos_map = globalPosToView(positions[i], rotate_map); | 358 | pos_map = globalPosToView(positions[i], rotate_map); |
358 | 359 | ||
360 | // Save this entry to draw last | ||
359 | if (LLFloaterMap::getSelected() == avatar_ids[i]) | 361 | if (LLFloaterMap::getSelected() == avatar_ids[i]) |
360 | { | 362 | { |
361 | glyph_radius = mDotRadius * 1.7f; | 363 | selected = i; |
362 | glyph_color = selected_color; | 364 | continue; |
363 | } | 365 | } |
364 | else | 366 | else |
365 | { | 367 | { |
366 | glyph_radius = mDotRadius; | ||
367 | // Show them muted even if they're friends | 368 | // Show them muted even if they're friends |
368 | if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) | 369 | if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) |
369 | { | 370 | { |
370 | glyph_color = muted_color; | 371 | glyph_color = muted_color; |
371 | } | 372 | } |
373 | else if (LLFloaterMap::isImpDev(avatar_ids[i])) | ||
374 | { | ||
375 | glyph_color = imp_dev_color; | ||
376 | } | ||
372 | else if (is_agent_friend(avatar_ids[i])) | 377 | else if (is_agent_friend(avatar_ids[i])) |
373 | { | 378 | { |
374 | glyph_color = friend_color; | 379 | glyph_color = friend_color; |
@@ -392,7 +397,7 @@ void LLNetMap::draw() | |||
392 | pos_map.mV[VX], pos_map.mV[VY], | 397 | pos_map.mV[VX], pos_map.mV[VY], |
393 | glyph_color, | 398 | glyph_color, |
394 | pos_map.mV[VZ], | 399 | pos_map.mV[VZ], |
395 | glyph_radius); | 400 | mDotRadius); |
396 | 401 | ||
397 | F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); | 402 | F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); |
398 | if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) | 403 | if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) |
@@ -402,6 +407,27 @@ void LLNetMap::draw() | |||
402 | } | 407 | } |
403 | } | 408 | } |
404 | 409 | ||
410 | // Draw dot for selected avatar last | ||
411 | if (selected >= 0 && avatar_ids[selected].notNull()) | ||
412 | { | ||
413 | pos_map = globalPosToView(positions[selected], rotate_map); | ||
414 | F32 glyph_radius = mDotRadius * 1.7f; | ||
415 | glyph_color = selected_color; | ||
416 | |||
417 | LLWorldMapView::drawAvatar( | ||
418 | pos_map.mV[VX], pos_map.mV[VY], | ||
419 | glyph_color, | ||
420 | pos_map.mV[VZ], | ||
421 | glyph_radius); | ||
422 | |||
423 | F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); | ||
424 | if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) | ||
425 | { | ||
426 | closest_dist = dist_to_cursor; | ||
427 | mClosestAgentToCursor = avatar_ids[selected]; | ||
428 | } | ||
429 | } | ||
430 | |||
405 | // Draw dot for autopilot target | 431 | // Draw dot for autopilot target |
406 | if (gAgent.getAutoPilot()) | 432 | if (gAgent.getAutoPilot()) |
407 | { | 433 | { |
diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index e416401..04b7afe 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp | |||
@@ -60,6 +60,8 @@ BOOL LLPanelGeneral::postBuild() | |||
60 | childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames")); | 60 | childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames")); |
61 | childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); | 61 | childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); |
62 | childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout")); | 62 | childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout")); |
63 | childSetValue("mini_map_notify_chat", gSavedSettings.getBOOL("MiniMapNotifyChatRange")); | ||
64 | childSetValue("mini_map_notify_sim", gSavedSettings.getBOOL("MiniMapNotifySimRange")); | ||
63 | childSetValue("notify_money_change_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange")); | 65 | childSetValue("notify_money_change_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange")); |
64 | childSetValue("use_system_color_picker_checkbox", gSavedSettings.getBOOL("UseDefaultColorPicker")); | 66 | childSetValue("use_system_color_picker_checkbox", gSavedSettings.getBOOL("UseDefaultColorPicker")); |
65 | childSetValue("show_search_panel", gSavedSettings.getBOOL("ShowSearchBar")); | 67 | childSetValue("show_search_panel", gSavedSettings.getBOOL("ShowSearchBar")); |
@@ -97,6 +99,8 @@ void LLPanelGeneral::apply() | |||
97 | gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox")); | 99 | gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox")); |
98 | gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); | 100 | gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); |
99 | gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal()); | 101 | gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal()); |
102 | gSavedSettings.setBOOL("MiniMapNotifyChatRange", childGetValue("mini_map_notify_chat")); | ||
103 | gSavedSettings.setBOOL("MiniMapNotifySimRange", childGetValue("mini_map_notify_sim")); | ||
100 | gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox")); | 104 | gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox")); |
101 | gSavedSettings.setBOOL("UseDefaultColorPicker", childGetValue("use_system_color_picker_checkbox")); | 105 | gSavedSettings.setBOOL("UseDefaultColorPicker", childGetValue("use_system_color_picker_checkbox")); |
102 | gSavedSettings.setBOOL("ShowSearchBar", childGetValue("show_search_panel")); | 106 | gSavedSettings.setBOOL("ShowSearchBar", childGetValue("show_search_panel")); |
diff --git a/linden/indra/newview/lltooldraganddrop.cpp b/linden/indra/newview/lltooldraganddrop.cpp index c99ccbf..178bde6 100644 --- a/linden/indra/newview/lltooldraganddrop.cpp +++ b/linden/indra/newview/lltooldraganddrop.cpp | |||
@@ -2014,10 +2014,10 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( | |||
2014 | return ACCEPT_NO; | 2014 | return ACCEPT_NO; |
2015 | } | 2015 | } |
2016 | 2016 | ||
2017 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | 2017 | // [RLVa:KB] - Checked: 2009-09-08 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c |
2018 | LLViewerJointAttachment* pAttachPt = NULL; | 2018 | LLViewerJointAttachment* pAttachPt = NULL; |
2019 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) && (!RlvSettings::getEnableWear()) && | 2019 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) && (!RlvSettings::getEnableWear()) && |
2020 | ( ((pAttachPt = gRlvHandler.getAttachPoint(item, true)) == NULL) || (!gRlvHandler.isDetachable(pAttachPt->getObject())) ) ) | 2020 | ( ((pAttachPt = gRlvHandler.getAttachPoint(item, true)) == NULL) || (!gRlvHandler.isDetachable(pAttachPt)) ) ) |
2021 | { | 2021 | { |
2022 | return ACCEPT_NO_LOCKED; | 2022 | return ACCEPT_NO_LOCKED; |
2023 | } | 2023 | } |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index f9ae401..ceb5d5f 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -494,6 +494,7 @@ BOOL enable_detach(void*); | |||
494 | BOOL enable_region_owner(void*); | 494 | BOOL enable_region_owner(void*); |
495 | void menu_toggle_attached_lights(void* user_data); | 495 | void menu_toggle_attached_lights(void* user_data); |
496 | void menu_toggle_attached_particles(void* user_data); | 496 | void menu_toggle_attached_particles(void* user_data); |
497 | static void handle_go_to_callback(S32 option, void *userdata); | ||
497 | 498 | ||
498 | class LLMenuParcelObserver : public LLParcelObserver | 499 | class LLMenuParcelObserver : public LLParcelObserver |
499 | { | 500 | { |
@@ -952,7 +953,7 @@ void init_client_menu(LLMenuGL* menu) | |||
952 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e | 953 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e |
953 | #ifdef RLV_ADVANCED_TOGGLE_RLVA | 954 | #ifdef RLV_ADVANCED_TOGGLE_RLVA |
954 | if (gSavedSettings.controlExists(RLV_SETTING_MAIN)) | 955 | if (gSavedSettings.controlExists(RLV_SETTING_MAIN)) |
955 | menu->append(new LLMenuItemCheckGL("Restrained Life API", &rlvDbgToggleEnabled, NULL, &rlvDbgGetEnabled, NULL)); | 956 | menu->append(new LLMenuItemCheckGL("Restrained Life API", &rlvToggleEnabled, NULL, &rlvGetEnabled, NULL)); |
956 | #endif // RLV_ADVANCED_TOGGLE_RLVA | 957 | #endif // RLV_ADVANCED_TOGGLE_RLVA |
957 | // [/RLVa:KB] | 958 | // [/RLVa:KB] |
958 | 959 | ||
@@ -1406,30 +1407,24 @@ void init_debug_baked_texture_menu(LLMenuGL* menu) | |||
1406 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g | 1407 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g |
1407 | void init_debug_rlva_menu(LLMenuGL* menu) | 1408 | void init_debug_rlva_menu(LLMenuGL* menu) |
1408 | { | 1409 | { |
1409 | // Experimental feature toggles | 1410 | // Debug options |
1410 | { | 1411 | { |
1411 | /* | 1412 | LLMenuGL* pDbgMenu = new LLMenuGL("Debug"); |
1412 | #ifdef RLV_EXPERIMENTAL | ||
1413 | LLMenuGL* sub_menu = new LLMenuGL("Experimental"); | ||
1414 | 1413 | ||
1415 | menu->appendMenu(sub_menu); | 1414 | if (gSavedSettings.controlExists(RLV_SETTING_DEBUG)) |
1416 | #endif // RLV_EXPERIMENTAL | 1415 | pDbgMenu->append(new LLMenuItemCheckGL("Show Debug Messages", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_DEBUG)); |
1417 | */ | 1416 | pDbgMenu->appendSeparator(); |
1418 | } | 1417 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) |
1418 | pDbgMenu->append(new LLMenuItemCheckGL("Enable Legacy Naming", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLELEGACYNAMING)); | ||
1419 | 1419 | ||
1420 | // Unit tests | 1420 | menu->appendMenu(pDbgMenu); |
1421 | { | 1421 | menu->appendSeparator(); |
1422 | #ifdef RLV_DEBUG_TESTS | ||
1423 | init_debug_rlva_tests_menu(menu); | ||
1424 | #endif // RLV_DEBUG_TESTS | ||
1425 | } | 1422 | } |
1426 | 1423 | ||
1427 | #ifdef RLV_EXTENSION_ENABLE_WEAR | 1424 | #ifdef RLV_EXTENSION_ENABLE_WEAR |
1428 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLEWEAR)) | 1425 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLEWEAR)) |
1429 | { | ||
1430 | menu->append(new LLMenuItemCheckGL("Enable Wear", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLEWEAR)); | 1426 | menu->append(new LLMenuItemCheckGL("Enable Wear", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLEWEAR)); |
1431 | menu->appendSeparator(); | 1427 | menu->appendSeparator(); |
1432 | } | ||
1433 | #endif // RLV_EXTENSION_ENABLE_WEAR | 1428 | #endif // RLV_EXTENSION_ENABLE_WEAR |
1434 | 1429 | ||
1435 | #ifdef RLV_EXTENSION_HIDELOCKED | 1430 | #ifdef RLV_EXTENSION_HIDELOCKED |
@@ -1443,6 +1438,12 @@ void init_debug_rlva_menu(LLMenuGL* menu) | |||
1443 | } | 1438 | } |
1444 | #endif // RLV_EXTENSION_HIDELOCKED | 1439 | #endif // RLV_EXTENSION_HIDELOCKED |
1445 | 1440 | ||
1441 | if (gSavedSettings.controlExists(RLV_SETTING_FORBIDGIVETORLV)) | ||
1442 | menu->append(new LLMenuItemCheckGL("Forbid Give to #RLV", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_FORBIDGIVETORLV)); | ||
1443 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) | ||
1444 | menu->append(new LLMenuItemCheckGL("Show Name Tags", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_SHOWNAMETAGS)); | ||
1445 | menu->appendSeparator(); | ||
1446 | |||
1446 | #ifdef RLV_EXTENSION_FLOATER_RESTRICTIONS | 1447 | #ifdef RLV_EXTENSION_FLOATER_RESTRICTIONS |
1447 | // TODO-RLVa: figure out a way to tell if floater_rlv_behaviour.xml exists | 1448 | // TODO-RLVa: figure out a way to tell if floater_rlv_behaviour.xml exists |
1448 | menu->append(new LLMenuItemCallGL("Restrictions...", RlvFloaterBehaviour::show, NULL, NULL)); | 1449 | menu->append(new LLMenuItemCallGL("Restrictions...", RlvFloaterBehaviour::show, NULL, NULL)); |
@@ -2392,45 +2393,63 @@ bool handle_go_to() | |||
2392 | } | 2393 | } |
2393 | // [/RLVa:KB] | 2394 | // [/RLVa:KB] |
2394 | 2395 | ||
2395 | // JAMESDEBUG try simulator autopilot | ||
2396 | std::vector<std::string> strings; | ||
2397 | std::string val; | ||
2398 | LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; | ||
2399 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) | 2396 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) |
2400 | { | 2397 | { |
2401 | LLVector3d hips_offset(0.0f, 0.0f, 1.2f); | 2398 | gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance()); |
2402 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | ||
2403 | gAgent.teleportViaLocation(pos + hips_offset); | ||
2404 | } | 2399 | } |
2405 | else | 2400 | else if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) |
2401 | { | ||
2402 | gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance()); | ||
2403 | } | ||
2404 | return true; | ||
2405 | } | ||
2406 | |||
2407 | //static | ||
2408 | void handle_go_to_callback(S32 option, void *userdata) | ||
2409 | { | ||
2410 | if (option == 0) | ||
2406 | { | 2411 | { |
2412 | LLToolPie* pie = (LLToolPie*)userdata; | ||
2413 | |||
2407 | // JAMESDEBUG try simulator autopilot | 2414 | // JAMESDEBUG try simulator autopilot |
2408 | std::vector<std::string> strings; | 2415 | std::vector<std::string> strings; |
2409 | std::string val; | 2416 | std::string val; |
2410 | val = llformat("%g", pos.mdV[VX]); | 2417 | LLVector3d pos = pie->getPick().mPosGlobal; |
2411 | strings.push_back(val); | 2418 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) |
2412 | val = llformat("%g", pos.mdV[VY]); | ||
2413 | strings.push_back(val); | ||
2414 | val = llformat("%g", pos.mdV[VZ]); | ||
2415 | strings.push_back(val); | ||
2416 | send_generic_message("autopilot", strings); | ||
2417 | |||
2418 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
2419 | |||
2420 | if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) | ||
2421 | { | 2419 | { |
2422 | 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); | ||
2423 | } | 2423 | } |
2424 | else | 2424 | else |
2425 | { | 2425 | { |
2426 | // Snap camera back to behind avatar | 2426 | // JAMESDEBUG try simulator autopilot |
2427 | gAgent.setFocusOnAvatar(TRUE, ANIMATE); | 2427 | std::vector<std::string> strings; |
2428 | } | 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); | ||
2436 | |||
2437 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
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 | } | ||
2429 | 2448 | ||
2430 | // Could be first use | 2449 | // Could be first use |
2431 | LLFirstUse::useGoTo(); | 2450 | LLFirstUse::useGoTo(); |
2451 | } | ||
2432 | } | 2452 | } |
2433 | return true; | ||
2434 | } | 2453 | } |
2435 | 2454 | ||
2436 | class LLGoToObject : public view_listener_t | 2455 | class LLGoToObject : public view_listener_t |
@@ -6026,9 +6045,9 @@ private: | |||
6026 | 6045 | ||
6027 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6046 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
6028 | if ( (rlv_handler_t::isEnabled()) && | 6047 | if ( (rlv_handler_t::isEnabled()) && |
6029 | ( ((index == 0) && (gRlvHandler.hasLockedAttachment())) || // Can't wear on default attach point | 6048 | ( ((index == 0) && (gRlvHandler.hasLockedAttachment())) || // Can't wear on default attach point |
6030 | ((index > 0) && (!gRlvHandler.isDetachable(attachment_point->getObject()))) || // Can't replace locked attachment | 6049 | ((index > 0) && (!gRlvHandler.isDetachable(attachment_point))) || // Can't replace locked attachment |
6031 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take" | 6050 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take" |
6032 | { | 6051 | { |
6033 | setObjectSelection(NULL); // Clear the selection or it'll get stuck | 6052 | setObjectSelection(NULL); // Clear the selection or it'll get stuck |
6034 | return true; | 6053 | return true; |
@@ -6315,6 +6334,8 @@ class LLAttachmentEnableDrop : public view_listener_t | |||
6315 | { | 6334 | { |
6316 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6335 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
6317 | { | 6336 | { |
6337 | if (gDisconnected) | ||
6338 | return true; | ||
6318 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); | 6339 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); |
6319 | BOOL can_build = gAgent.isGodlike() || (parcel && parcel->getAllowModify()); | 6340 | BOOL can_build = gAgent.isGodlike() || (parcel && parcel->getAllowModify()); |
6320 | 6341 | ||
@@ -6365,7 +6386,6 @@ class LLAttachmentEnableDrop : public view_listener_t | |||
6365 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | 6386 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) |
6366 | bool new_value = enable_detach(NULL) && can_build && item && (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)); | 6387 | bool new_value = enable_detach(NULL) && can_build && item && (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)); |
6367 | // [/RLVa:KB] | 6388 | // [/RLVa:KB] |
6368 | |||
6369 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 6389 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
6370 | return true; | 6390 | return true; |
6371 | } | 6391 | } |
@@ -6430,9 +6450,9 @@ BOOL object_selected_and_point_valid(void *user_data) | |||
6430 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / right-click / "Attach >" [user_data == pAttachPt] | 6450 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / right-click / "Attach >" [user_data == pAttachPt] |
6431 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / Edit menu / "Attach Object" [user_data == pAttachPt] | 6451 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / Edit menu / "Attach Object" [user_data == pAttachPt] |
6432 | LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data; | 6452 | LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data; |
6433 | if ( ((!pAttachPt) && (gRlvHandler.hasLockedAttachment())) || // Don't allow attach to default attach point | 6453 | if ( ((!pAttachPt) && (gRlvHandler.hasLockedAttachment())) || // Don't allow attach to default attach point |
6434 | ((pAttachPt) && (!gRlvHandler.isDetachable(pAttachPt->getObject()))) || // Don't allow replacing of locked attachment | 6454 | ((pAttachPt) && (!gRlvHandler.isDetachable(pAttachPt))) || // Don't allow replacing of locked attachment |
6435 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take" | 6455 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take" |
6436 | { | 6456 | { |
6437 | return FALSE; | 6457 | return FALSE; |
6438 | } | 6458 | } |
@@ -10357,7 +10377,7 @@ class RLVaMainToggle : public view_listener_t | |||
10357 | { | 10377 | { |
10358 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 10378 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
10359 | { | 10379 | { |
10360 | rlvDbgToggleEnabled(NULL); | 10380 | rlvToggleEnabled(NULL); |
10361 | return true; | 10381 | return true; |
10362 | } | 10382 | } |
10363 | }; | 10383 | }; |
@@ -10366,7 +10386,7 @@ class RLVaMainCheck : public view_listener_t | |||
10366 | { | 10386 | { |
10367 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 10387 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
10368 | { | 10388 | { |
10369 | bool new_value = rlvDbgGetEnabled(NULL); | 10389 | bool new_value = rlvGetEnabled(NULL); |
10370 | std::string control_name = userdata["control"].asString(); | 10390 | std::string control_name = userdata["control"].asString(); |
10371 | gMenuHolder->findControl(control_name)->setValue(new_value); | 10391 | gMenuHolder->findControl(control_name)->setValue(new_value); |
10372 | return true; | 10392 | return true; |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index d900cd9..88f6b36 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -78,6 +78,7 @@ | |||
78 | #include "llfloatergroupinfo.h" | 78 | #include "llfloatergroupinfo.h" |
79 | #include "llfloaterimagepreview.h" | 79 | #include "llfloaterimagepreview.h" |
80 | #include "llfloaterland.h" | 80 | #include "llfloaterland.h" |
81 | #include "llfloatermap.h" | ||
81 | #include "llfloaterregioninfo.h" | 82 | #include "llfloaterregioninfo.h" |
82 | #include "llfloaterlandholdings.h" | 83 | #include "llfloaterlandholdings.h" |
83 | #include "llurldispatcher.h" | 84 | #include "llurldispatcher.h" |
@@ -837,9 +838,9 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) | |||
837 | //if we are throttled, don't display them - Gigs | 838 | //if we are throttled, don't display them - Gigs |
838 | if (check_offer_throttle(from_name, false)) | 839 | if (check_offer_throttle(from_name, false)) |
839 | { | 840 | { |
840 | // I'm not sure this is a good idea. JC - Definitely a bad idea. HB | 841 | // I'm not sure this is a good idea. JC |
841 | //bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID(); | 842 | bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID(); |
842 | bool show_keep_discard = true; | 843 | //bool show_keep_discard = true; |
843 | switch(asset_type) | 844 | switch(asset_type) |
844 | { | 845 | { |
845 | case LLAssetType::AT_NOTECARD: | 846 | case LLAssetType::AT_NOTECARD: |
@@ -1821,6 +1822,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1821 | } | 1822 | } |
1822 | else | 1823 | else |
1823 | { | 1824 | { |
1825 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-09-10 (RLVa-1.0.3a) | ||
1826 | if ( (rlv_handler_t::isEnabled()) && (dialog == IM_TASK_INVENTORY_OFFERED) && | ||
1827 | (info->mDesc.find(RLV_PUTINV_PREFIX) == 1) && (gRlvHandler.getSharedRoot()) ) | ||
1828 | { | ||
1829 | LLFirstUse::warnRlvGiveToRLV(); | ||
1830 | } | ||
1831 | // [/RLVa:KB] | ||
1832 | |||
1824 | inventory_offer_handler(info, dialog == IM_TASK_INVENTORY_OFFERED); | 1833 | inventory_offer_handler(info, dialog == IM_TASK_INVENTORY_OFFERED); |
1825 | } | 1834 | } |
1826 | } | 1835 | } |
@@ -1929,7 +1938,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1929 | { | 1938 | { |
1930 | return; | 1939 | return; |
1931 | } | 1940 | } |
1932 | chat.mText = name + separator_string + message.substr(message_offset); | 1941 | chat.mText = std::string("IM: ") + name + separator_string + message.substr(message_offset); |
1933 | chat.mFromName = name; | 1942 | chat.mFromName = name; |
1934 | 1943 | ||
1935 | // Build a link to open the object IM info window. | 1944 | // Build a link to open the object IM info window. |
@@ -1966,7 +1975,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1966 | 1975 | ||
1967 | // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because | 1976 | // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because |
1968 | // IMs from objcts don't open IM sessions. | 1977 | // IMs from objcts don't open IM sessions. |
1969 | chat.mSourceType = CHAT_SOURCE_OBJECT; | 1978 | chat.mSourceType = CHAT_SOURCE_OBJECT_IM; |
1970 | LLFloaterChat::addChat(chat, FALSE, FALSE); | 1979 | LLFloaterChat::addChat(chat, FALSE, FALSE); |
1971 | } | 1980 | } |
1972 | break; | 1981 | break; |
@@ -2436,6 +2445,32 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2436 | is_owned_by_me = chatter->permYouOwner(); | 2445 | is_owned_by_me = chatter->permYouOwner(); |
2437 | } | 2446 | } |
2438 | 2447 | ||
2448 | if(chat.mSourceType == CHAT_SOURCE_OBJECT | ||
2449 | && chat.mChatType != CHAT_TYPE_DEBUG_MSG | ||
2450 | && !owner_id.isNull() | ||
2451 | && owner_id != gAgent.getID()) | ||
2452 | { | ||
2453 | std::string tempname = from_name; | ||
2454 | |||
2455 | size_t found = tempname.find(" "); | ||
2456 | while(found != std::string::npos) | ||
2457 | { | ||
2458 | tempname.replace(found, 1, ""); | ||
2459 | found = tempname.find(" "); | ||
2460 | } | ||
2461 | |||
2462 | if (tempname.length() < 1) | ||
2463 | { | ||
2464 | from_name = "no name"; | ||
2465 | chat.mFromName = from_name; | ||
2466 | } | ||
2467 | |||
2468 | // std::string ownername; | ||
2469 | // if(gCacheName->getFullName(owner_id,ownername)) | ||
2470 | // from_name += (" (" + ownername + ")"); | ||
2471 | chat.mURL = llformat("secondlife:///app/agent/%s/about",owner_id.asString().c_str()); | ||
2472 | } | ||
2473 | |||
2439 | if (is_audible) | 2474 | if (is_audible) |
2440 | { | 2475 | { |
2441 | BOOL visible_in_chat_bubble = FALSE; | 2476 | BOOL visible_in_chat_bubble = FALSE; |
@@ -2513,6 +2548,12 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2513 | { | 2548 | { |
2514 | ((LLVOAvatar*)chatter)->startTyping(); | 2549 | ((LLVOAvatar*)chatter)->startTyping(); |
2515 | } | 2550 | } |
2551 | |||
2552 | if (LLFloaterMap::getInstance()) | ||
2553 | { | ||
2554 | LLFloaterMap::getInstance()->updateTypingList(from_id, false); | ||
2555 | } | ||
2556 | |||
2516 | return; | 2557 | return; |
2517 | } | 2558 | } |
2518 | else if (CHAT_TYPE_STOP == chat.mChatType) | 2559 | else if (CHAT_TYPE_STOP == chat.mChatType) |
@@ -2524,6 +2565,15 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2524 | { | 2565 | { |
2525 | ((LLVOAvatar*)chatter)->stopTyping(); | 2566 | ((LLVOAvatar*)chatter)->stopTyping(); |
2526 | } | 2567 | } |
2568 | |||
2569 | if (LLFloaterMap::getInstance()) | ||
2570 | { | ||
2571 | if (LLFloaterMap::getInstance()->getIsTyping(from_id)) | ||
2572 | { | ||
2573 | LLFloaterMap::getInstance()->updateTypingList(from_id, true); | ||
2574 | } | ||
2575 | } | ||
2576 | |||
2527 | return; | 2577 | return; |
2528 | } | 2578 | } |
2529 | 2579 | ||
@@ -2553,18 +2603,16 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2553 | verb = " " + LLTrans::getString("whisper") + " "; | 2603 | verb = " " + LLTrans::getString("whisper") + " "; |
2554 | break; | 2604 | break; |
2555 | case CHAT_TYPE_OWNER: | 2605 | case CHAT_TYPE_OWNER: |
2556 | // [RLVa:KB] - Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | 2606 | // [RLVa:KB] - Checked: 2009-08-28 (RLVa-1.0.2a) | Modified: RLVa-1.0.2a |
2557 | if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) ) | 2607 | if ( (rlv_handler_t::isEnabled()) && (mesg.length() > 3) && (RLV_CMD_PREFIX == mesg[0]) && (CHAT_TYPE_OWNER == chat.mChatType) ) |
2558 | { | 2608 | { |
2559 | mesg.erase(0, 1); | 2609 | mesg.erase(0, 1); |
2560 | LLStringUtil::toLower(mesg); | 2610 | LLStringUtil::toLower(mesg); |
2561 | 2611 | ||
2562 | std::string strExecuted, strFailed, strRetained, *pstr; | 2612 | std::string strExecuted, strFailed, strRetained, *pstr; |
2563 | 2613 | ||
2564 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | 2614 | boost_tokenizer tokens(mesg, boost::char_separator<char>(",", "", boost::drop_empty_tokens)); |
2565 | boost::char_separator<char> sep(",", "", boost::drop_empty_tokens); | 2615 | for (boost_tokenizer::const_iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) |
2566 | tokenizer tokens(mesg, sep); | ||
2567 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | ||
2568 | { | 2616 | { |
2569 | if (LLStartUp::getStartupState() == STATE_STARTED) | 2617 | if (LLStartUp::getStartupState() == STATE_STARTED) |
2570 | { | 2618 | { |
@@ -4371,7 +4419,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) | |||
4371 | LLUUID tid; | 4419 | LLUUID tid; |
4372 | msg->getUUID("MoneyData", "TransactionID", tid); | 4420 | msg->getUUID("MoneyData", "TransactionID", tid); |
4373 | static std::deque<LLUUID> recent; | 4421 | static std::deque<LLUUID> recent; |
4374 | if(!desc.empty() && gSavedSettings.getBOOL("NotifyMoneyChange") | 4422 | if(!desc.empty() && gSavedSettings.getBOOL("NotifyMoneyChange") && !gDisconnected |
4375 | && (std::find(recent.rbegin(), recent.rend(), tid) == recent.rend())) | 4423 | && (std::find(recent.rbegin(), recent.rend(), tid) == recent.rend())) |
4376 | { | 4424 | { |
4377 | // Make the user confirm the transaction, since they might | 4425 | // Make the user confirm the transaction, since they might |
diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp index 0ba0879..2179c0b 100644 --- a/linden/indra/newview/llviewerregion.cpp +++ b/linden/indra/newview/llviewerregion.cpp | |||
@@ -917,10 +917,12 @@ bool LLViewerRegion::isAlive() | |||
917 | 917 | ||
918 | BOOL LLViewerRegion::isOwnedSelf(const LLVector3& pos) | 918 | BOOL LLViewerRegion::isOwnedSelf(const LLVector3& pos) |
919 | { | 919 | { |
920 | if (mParcelOverlay) | 920 | if (mParcelOverlay && !gDisconnected) |
921 | { | 921 | { |
922 | return mParcelOverlay->isOwnedSelf(pos); | 922 | return mParcelOverlay->isOwnedSelf(pos); |
923 | } else { | 923 | } |
924 | else | ||
925 | { | ||
924 | return FALSE; | 926 | return FALSE; |
925 | } | 927 | } |
926 | } | 928 | } |
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 99bbb2a..df10b4f 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -596,7 +596,14 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK | |||
596 | } | 596 | } |
597 | 597 | ||
598 | // 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 |
599 | mWindow->captureMouse(); | 599 | if (down) |
600 | { | ||
601 | mWindow->captureMouse(); | ||
602 | } | ||
603 | else | ||
604 | { | ||
605 | mWindow->releaseMouse(); | ||
606 | } | ||
600 | 607 | ||
601 | // Indicate mouse was active | 608 | // Indicate mouse was active |
602 | gMouseIdleTimer.reset(); | 609 | gMouseIdleTimer.reset(); |
diff --git a/linden/indra/newview/rlvevent.h b/linden/indra/newview/rlvevent.h index c3d9c45..a98996f 100644 --- a/linden/indra/newview/rlvevent.h +++ b/linden/indra/newview/rlvevent.h | |||
@@ -10,11 +10,8 @@ | |||
10 | #include "rlvhelper.h" | 10 | #include "rlvhelper.h" |
11 | 11 | ||
12 | // ============================================================================ | 12 | // ============================================================================ |
13 | /* | 13 | // RlvEvent - Passed to observer event handlers (contains the same paramaters as RlvHandler::processXXXCommand) |
14 | * RlvEvent | 14 | // |
15 | * ======== | ||
16 | * Passed to observer event handlers (contains the same paramaters as RlvHandler::processXXXCommand) | ||
17 | */ | ||
18 | 15 | ||
19 | class RlvEvent | 16 | class RlvEvent |
20 | { | 17 | { |
@@ -63,6 +60,7 @@ public: | |||
63 | 60 | ||
64 | virtual BOOL onAddCommand(const EventType& rlvEvent) { return FALSE; } | 61 | virtual BOOL onAddCommand(const EventType& rlvEvent) { return FALSE; } |
65 | virtual BOOL onRemoveCommand(const EventType& rlvEvent) { return FALSE; } | 62 | virtual BOOL onRemoveCommand(const EventType& rlvEvent) { return FALSE; } |
63 | virtual BOOL onClearCommand(const EventType& rlvEvent) { return FALSE; } | ||
66 | virtual BOOL onReplyCommand(const EventType& rlvEvent) { return FALSE; } | 64 | virtual BOOL onReplyCommand(const EventType& rlvEvent) { return FALSE; } |
67 | virtual BOOL onForceCommand(const EventType& rlvEvent) { return FALSE; } | 65 | virtual BOOL onForceCommand(const EventType& rlvEvent) { return FALSE; } |
68 | }; | 66 | }; |
@@ -168,11 +166,16 @@ public: | |||
168 | 166 | ||
169 | void changed(const RlvCommand& rlvCmd, bool fInternal) | 167 | void changed(const RlvCommand& rlvCmd, bool fInternal) |
170 | { | 168 | { |
171 | if ( (fInternal) || ((RLV_TYPE_ADD != rlvCmd.getParamType()) && (RLV_TYPE_REMOVE != rlvCmd.getParamType())) ) | 169 | if (fInternal) |
172 | return; | 170 | return; |
173 | 171 | ||
174 | std::string strCmd = rlvCmd.asString(); | 172 | std::string strCmd = rlvCmd.asString(), strNotify; ERlvParamType eCmdType = rlvCmd.getParamType(); |
175 | std::string strNotify = llformat("/%s=%c", strCmd.c_str(), (RLV_TYPE_ADD == rlvCmd.getParamType()) ? 'n' : 'y'); | 173 | if ( (RLV_TYPE_ADD == eCmdType) || (RLV_TYPE_REMOVE == eCmdType) ) |
174 | strNotify = llformat("/%s=%s", strCmd.c_str(), rlvCmd.getParam().c_str()); | ||
175 | else if (RLV_TYPE_CLEAR == eCmdType) | ||
176 | strNotify = llformat("/%s", strCmd.c_str()); | ||
177 | else | ||
178 | return; | ||
176 | 179 | ||
177 | for (std::multimap<LLUUID, notifyData>::const_iterator itNotify = m_Notifications.begin(); | 180 | for (std::multimap<LLUUID, notifyData>::const_iterator itNotify = m_Notifications.begin(); |
178 | itNotify != m_Notifications.end(); ++itNotify) | 181 | itNotify != m_Notifications.end(); ++itNotify) |
diff --git a/linden/indra/newview/rlvextensions.cpp b/linden/indra/newview/rlvextensions.cpp index 6f79636..10d1c46 100644 --- a/linden/indra/newview/rlvextensions.cpp +++ b/linden/indra/newview/rlvextensions.cpp | |||
@@ -1,5 +1,6 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | 1 | #include "llviewerprecompiledheaders.h" |
2 | #include "llagent.h" | 2 | #include "llagent.h" |
3 | #include "llfloaterwindlight.h" | ||
3 | #include "llviewercontrol.h" | 4 | #include "llviewercontrol.h" |
4 | #include "llviewerwindow.h" | 5 | #include "llviewerwindow.h" |
5 | #include "llvoavatar.h" | 6 | #include "llvoavatar.h" |
@@ -221,8 +222,18 @@ void RlvExtGetSet::onSetDebug(std::string strSetting, const std::string& strValu | |||
221 | } | 222 | } |
222 | } | 223 | } |
223 | 224 | ||
225 | // Checked: 2009-09-16 (RLVa-1.0.3c) | Modified: RLVa-1.0.3c | ||
224 | std::string RlvExtGetSet::onGetEnv(std::string strSetting) | 226 | std::string RlvExtGetSet::onGetEnv(std::string strSetting) |
225 | { | 227 | { |
228 | // HACK: - create a LLFloaterWindLight instance if there isn't one already | ||
229 | // - isOpen() is actually instanceExists() | ||
230 | // - creating an instance results in showing the floater which is why we need to ->close() it | ||
231 | if (!LLFloaterWindLight::isOpen()) | ||
232 | { | ||
233 | LLFloaterWindLight::instance()->close(); | ||
234 | LLFloaterWindLight::instance()->syncMenu(); | ||
235 | } | ||
236 | |||
226 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | 237 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); |
227 | 238 | ||
228 | F32 nValue = 0.0f; | 239 | F32 nValue = 0.0f; |
@@ -238,7 +249,7 @@ std::string RlvExtGetSet::onGetEnv(std::string strSetting) | |||
238 | else if ("cloudscale" == strSetting) nValue = pWLParams->mCloudScale; | 249 | else if ("cloudscale" == strSetting) nValue = pWLParams->mCloudScale; |
239 | else if ("cloudscrollx" == strSetting) nValue = pWLParams->mCurParams.getCloudScrollX() - 10.0f; | 250 | else if ("cloudscrollx" == strSetting) nValue = pWLParams->mCurParams.getCloudScrollX() - 10.0f; |
240 | else if ("cloudscrolly" == strSetting) nValue = pWLParams->mCurParams.getCloudScrollY() - 10.0f; | 251 | else if ("cloudscrolly" == strSetting) nValue = pWLParams->mCurParams.getCloudScrollY() - 10.0f; |
241 | else if ("densitymultiplier" == strSetting) nValue = pWLParams->mDensityMult * 1000; | 252 | else if ("densitymultiplier" == strSetting) nValue = pWLParams->mDensityMult.x * pWLParams->mDensityMult.mult; |
242 | else if ("distancemultiplier" == strSetting) nValue = pWLParams->mDistanceMult; | 253 | else if ("distancemultiplier" == strSetting) nValue = pWLParams->mDistanceMult; |
243 | else if ("eastangle" == strSetting) nValue = pWLParams->mCurParams.getEastAngle() / F_TWO_PI; | 254 | else if ("eastangle" == strSetting) nValue = pWLParams->mCurParams.getEastAngle() / F_TWO_PI; |
244 | else if ("hazedensity" == strSetting) nValue = pWLParams->mHazeDensity.r; | 255 | else if ("hazedensity" == strSetting) nValue = pWLParams->mHazeDensity.r; |
@@ -260,7 +271,7 @@ std::string RlvExtGetSet::onGetEnv(std::string strSetting) | |||
260 | if ( ('r' == ch) || ('g' == ch) || ('b' == ch) || ('i' == ch) ) | 271 | if ( ('r' == ch) || ('g' == ch) || ('b' == ch) || ('i' == ch) ) |
261 | { | 272 | { |
262 | WLColorControl* pColour = NULL; | 273 | WLColorControl* pColour = NULL; |
263 | strSetting.erase(strSetting.length() - 2, 1); | 274 | strSetting.erase(strSetting.length() - 1, 1); |
264 | 275 | ||
265 | if ("ambient" == strSetting) pColour = &pWLParams->mAmbient; | 276 | if ("ambient" == strSetting) pColour = &pWLParams->mAmbient; |
266 | else if ("bluedensity" == strSetting) pColour = &pWLParams->mBlueDensity; | 277 | else if ("bluedensity" == strSetting) pColour = &pWLParams->mBlueDensity; |
@@ -272,10 +283,10 @@ std::string RlvExtGetSet::onGetEnv(std::string strSetting) | |||
272 | 283 | ||
273 | if (pColour) | 284 | if (pColour) |
274 | { | 285 | { |
275 | if ('r' == ch) nValue = pColour->b; | 286 | if ('r' == ch) nValue = pColour->r; |
276 | else if ('g' == ch) nValue = pColour->b; | 287 | else if ('g' == ch) nValue = pColour->g; |
277 | else if ('b' == ch) nValue = pColour->b; | 288 | else if ('b' == ch) nValue = pColour->b; |
278 | else if (('i' == ch) && (pColour->hasSliderName)) nValue = pColour->i; | 289 | else if (('i' == ch) && (pColour->hasSliderName)) nValue = llmax(pColour->r, pColour->g, pColour->b); |
279 | 290 | ||
280 | if (pColour->isBlueHorizonOrDensity) nValue /= 2.0f; | 291 | if (pColour->isBlueHorizonOrDensity) nValue /= 2.0f; |
281 | else if (pColour->isSunOrAmbientColor) nValue /= 3.0f; | 292 | else if (pColour->isSunOrAmbientColor) nValue /= 3.0f; |
@@ -286,8 +297,16 @@ std::string RlvExtGetSet::onGetEnv(std::string strSetting) | |||
286 | return llformat("%f", nValue); | 297 | return llformat("%f", nValue); |
287 | } | 298 | } |
288 | 299 | ||
300 | // Checked: 2009-09-16 (RLVa-1.0.3c) | Modified: RLVa-1.0.3c | ||
289 | void RlvExtGetSet::onSetEnv(std::string strSetting, const std::string& strValue) | 301 | void RlvExtGetSet::onSetEnv(std::string strSetting, const std::string& strValue) |
290 | { | 302 | { |
303 | // HACK: see RlvExtGetSet::onGetEnv | ||
304 | if (!LLFloaterWindLight::isOpen()) | ||
305 | { | ||
306 | LLFloaterWindLight::instance()->close(); | ||
307 | LLFloaterWindLight::instance()->syncMenu(); | ||
308 | } | ||
309 | |||
291 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | 310 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); |
292 | WLFloatControl* pFloat = NULL; | 311 | WLFloatControl* pFloat = NULL; |
293 | WLColorControl* pColour = NULL; | 312 | WLColorControl* pColour = NULL; |
@@ -405,7 +424,7 @@ void RlvExtGetSet::onSetEnv(std::string strSetting, const std::string& strValue) | |||
405 | 424 | ||
406 | if ( ('r' == ch) || ('g' == ch) || ('b' == ch) || ('i' == ch) ) | 425 | if ( ('r' == ch) || ('g' == ch) || ('b' == ch) || ('i' == ch) ) |
407 | { | 426 | { |
408 | strSetting.erase(strSetting.length() - 2, 1); | 427 | strSetting.erase(strSetting.length() - 1, 1); |
409 | 428 | ||
410 | if ("ambient" == strSetting) pColour = &pWLParams->mAmbient; | 429 | if ("ambient" == strSetting) pColour = &pWLParams->mAmbient; |
411 | else if ("bluedensity" == strSetting) pColour = &pWLParams->mBlueDensity; | 430 | else if ("bluedensity" == strSetting) pColour = &pWLParams->mBlueDensity; |
diff --git a/linden/indra/newview/rlvhandler.cpp b/linden/indra/newview/rlvhandler.cpp index 2915002..6044aa9 100644 --- a/linden/indra/newview/rlvhandler.cpp +++ b/linden/indra/newview/rlvhandler.cpp | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | 1 | #include "llviewerprecompiledheaders.h" |
2 | #include "llagent.h" | 2 | #include "llagent.h" |
3 | #include "lldrawpoolalpha.h" | 3 | #include "lldrawpoolalpha.h" |
4 | #include "llfirstuse.h" | ||
4 | #include "llfloaterbeacons.h" | 5 | #include "llfloaterbeacons.h" |
5 | #include "llfloaterchat.h" | 6 | #include "llfloaterchat.h" |
6 | #include "llfloaterdaycycle.h" | 7 | #include "llfloaterdaycycle.h" |
@@ -93,10 +94,10 @@ inline bool rlvIsWearingItem(const LLInventoryItem* pItem) | |||
93 | static bool rlvParseNotifyOption(const std::string& strOption, S32& nChannel, std::string& strFilter) | 94 | static bool rlvParseNotifyOption(const std::string& strOption, S32& nChannel, std::string& strFilter) |
94 | { | 95 | { |
95 | boost_tokenizer tokens(strOption, boost::char_separator<char>(";", "", boost::keep_empty_tokens)); | 96 | boost_tokenizer tokens(strOption, boost::char_separator<char>(";", "", boost::keep_empty_tokens)); |
96 | boost_tokenizer::iterator itTok = tokens.begin(); | 97 | boost_tokenizer::const_iterator itTok = tokens.begin(); |
97 | 98 | ||
98 | // Extract and sanity check the first token (required) which is the channel | 99 | // Extract and sanity check the first token (required) which is the channel |
99 | if ( (itTok == tokens.end()) || (!LLStringUtil::convertToS32(*itTok, nChannel)) || (!rlvIsValidChannel(nChannel)) ) | 100 | if ( (itTok == tokens.end()) || (!LLStringUtil::convertToS32(*itTok, nChannel)) || (!rlvIsValidReplyChannel(nChannel)) ) |
100 | return false; | 101 | return false; |
101 | 102 | ||
102 | // Second token (optional) is the filter | 103 | // Second token (optional) is the filter |
@@ -274,7 +275,7 @@ bool RlvHandler::isDetachableExcept(S32 idxAttachPt, LLViewerObject *pObj) const | |||
274 | return true; | 275 | return true; |
275 | } | 276 | } |
276 | 277 | ||
277 | // Checked: 2009-05-31 (RLVa-0.2.0e) | Modified: RLVa-0.2.0e | 278 | // Checked: 2009-09-06 (RLVa-1.0.2b) | Modified: RLVa-1.0.2b |
278 | bool RlvHandler::setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDetachable) | 279 | bool RlvHandler::setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDetachable) |
279 | { | 280 | { |
280 | // Sanity check - make sure it's an object we know about | 281 | // Sanity check - make sure it's an object we know about |
@@ -284,20 +285,16 @@ bool RlvHandler::setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDe | |||
284 | 285 | ||
285 | if (!fDetachable) | 286 | if (!fDetachable) |
286 | { | 287 | { |
287 | // Sanity check - make sure it's not already marked undetachable by this object (NOTE: m_Attachments is a *multimap*, not a map) | 288 | #ifdef RLV_EXPERIMENTAL_FIRSTUSE |
288 | for (rlv_detach_map_t::const_iterator itAttach = m_Attachments.lower_bound(idxAttachPt), | 289 | LLFirstUse::useRlvDetach(); |
289 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | 290 | #endif // RLV_EXPERIMENTAL_FIRSTUSE |
290 | { | ||
291 | if (itObj->second.m_UUID == itAttach->second) | ||
292 | return false; | ||
293 | } | ||
294 | 291 | ||
292 | // NOTE: m_Attachments can contain duplicate <idxAttachPt, idRlvObj> pairs (ie @detach:spine=n,detach=n from an attachment on spine) | ||
295 | m_Attachments.insert(std::pair<S32, LLUUID>(idxAttachPt, itObj->second.m_UUID)); | 293 | m_Attachments.insert(std::pair<S32, LLUUID>(idxAttachPt, itObj->second.m_UUID)); |
296 | return true; | 294 | return true; |
297 | } | 295 | } |
298 | else | 296 | else |
299 | { | 297 | { |
300 | // NOTE: m_Attachments is a *multimap*, not a map | ||
301 | for (rlv_detach_map_t::iterator itAttach = m_Attachments.lower_bound(idxAttachPt), | 298 | for (rlv_detach_map_t::iterator itAttach = m_Attachments.lower_bound(idxAttachPt), |
302 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | 299 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) |
303 | { | 300 | { |
@@ -325,11 +322,11 @@ bool RlvHandler::setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDe | |||
325 | LLViewerInventoryItem* pItem = gInventory.getItem(idItem); | 322 | LLViewerInventoryItem* pItem = gInventory.getItem(idItem); |
326 | if (pItem) | 323 | if (pItem) |
327 | { | 324 | { |
328 | if (-1 != pItem->getName().find(RLV_FOLDER_FLAG_NOSTRIP)) | 325 | if (std::string::npos != pItem->getName().find(RLV_FOLDER_FLAG_NOSTRIP)) |
329 | return false; | 326 | return false; |
330 | 327 | ||
331 | LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID()); | 328 | LLViewerInventoryCategory* pFolder = gInventory.getCategory(pItem->getParentUUID()); |
332 | if ( (pFolder) && (-1 != pFolder->getName().find(RLV_FOLDER_FLAG_NOSTRIP)) ) | 329 | if ( (pFolder) && (std::string::npos != pFolder->getName().find(RLV_FOLDER_FLAG_NOSTRIP)) ) |
333 | return false; | 330 | return false; |
334 | } | 331 | } |
335 | } | 332 | } |
@@ -477,6 +474,10 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
477 | } | 474 | } |
478 | } | 475 | } |
479 | break; | 476 | break; |
477 | case RLV_TYPE_CLEAR: | ||
478 | fRet = processClearCommand(uuid, rlvCmd); | ||
479 | notifyBehaviourObservers(rlvCmd, !fFromObj); | ||
480 | break; | ||
480 | case RLV_TYPE_FORCE: // Checked: | 481 | case RLV_TYPE_FORCE: // Checked: |
481 | fRet = processForceCommand(uuid, rlvCmd); | 482 | fRet = processForceCommand(uuid, rlvCmd); |
482 | break; | 483 | break; |
@@ -484,32 +485,6 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
484 | fRet = processReplyCommand(uuid, rlvCmd); | 485 | fRet = processReplyCommand(uuid, rlvCmd); |
485 | break; | 486 | break; |
486 | case RLV_TYPE_UNKNOWN: // Checked: | 487 | case RLV_TYPE_UNKNOWN: // Checked: |
487 | { | ||
488 | if ("clear" == rlvCmd.getBehaviour()) | ||
489 | { | ||
490 | const std::string& strFilter = rlvCmd.getParam(); std::string strCmdRem; | ||
491 | |||
492 | rlv_object_map_t::const_iterator itObj = m_Objects.find(uuid); | ||
493 | if (itObj != m_Objects.end()) // No sense in @clear'ing if we don't have any commands for this object | ||
494 | { | ||
495 | const RlvObject& rlvObj = itObj->second; bool fContinue = true; | ||
496 | for (rlv_command_list_t::const_iterator itCmd = rlvObj.m_Commands.begin(), itCurCmd; | ||
497 | ((fContinue) && (itCmd != rlvObj.m_Commands.end())); ) | ||
498 | { | ||
499 | itCurCmd = itCmd++; // Point itCmd ahead so it won't get invalidated if/when we erase a command | ||
500 | |||
501 | const RlvCommand& rlvCmdRem = *itCurCmd; | ||
502 | if ( (strFilter.empty()) || (-1 != rlvCmdRem.asString().find(strFilter)) ) | ||
503 | { | ||
504 | fContinue = (rlvObj.m_Commands.size() > 1); // rlvObj will become invalid once we remove the last command | ||
505 | strCmdRem = rlvCmdRem.getBehaviour() + ":" + rlvCmdRem.getOption() + "=y"; | ||
506 | processCommand(uuid, strCmdRem, false); | ||
507 | } | ||
508 | } | ||
509 | fRet = TRUE; | ||
510 | } | ||
511 | } | ||
512 | } | ||
513 | break; | 488 | break; |
514 | #ifdef LL_GNUC | 489 | #ifdef LL_GNUC |
515 | default: | 490 | default: |
@@ -671,6 +646,13 @@ BOOL RlvHandler::processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) | |||
671 | LLFloaterChat::getInstance()->childSetVisible("active_speakers_panel", false); | 646 | LLFloaterChat::getInstance()->childSetVisible("active_speakers_panel", false); |
672 | } | 647 | } |
673 | break; | 648 | break; |
649 | case RLV_BHVR_FARTOUCH: | ||
650 | { | ||
651 | #ifdef RLV_EXPERIMENTAL_FIRSTUSE | ||
652 | LLFirstUse::useRlvFartouch(); | ||
653 | #endif // RLV_EXPERIMENTAL_FIRSTUSE | ||
654 | } | ||
655 | break; | ||
674 | case RLV_BHVR_FLY: // @fly=n - Checked: 2009-07-05 (RLVa-1.0.0c) | 656 | case RLV_BHVR_FLY: // @fly=n - Checked: 2009-07-05 (RLVa-1.0.0c) |
675 | { | 657 | { |
676 | // If currently flying, simulate clicking the Fly button [see LLToolBar::onClickFly()] | 658 | // If currently flying, simulate clicking the Fly button [see LLToolBar::onClickFly()] |
@@ -780,22 +762,15 @@ BOOL RlvHandler::processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvC | |||
780 | { | 762 | { |
781 | case RLV_BHVR_DETACH: // @detach[:<option>]=y - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | 763 | case RLV_BHVR_DETACH: // @detach[:<option>]=y - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d |
782 | { | 764 | { |
783 | S32 idxAttachPt; | 765 | S32 idxAttachPt = 0; |
784 | if (strOption.empty()) // @detach=y | 766 | if (strOption.empty()) // @detach=y |
785 | { | 767 | { |
786 | // The object may or may not (if it got detached) still exist so clean up the hard way | 768 | // The object may or may not (if it got detached) still exist |
787 | if (m_Objects.find(uuid) != m_Objects.end()) | 769 | rlv_object_map_t::const_iterator itObj = m_Objects.find(uuid); |
788 | { | 770 | if (itObj != m_Objects.end()) |
789 | for (rlv_detach_map_t::const_iterator itAttach = m_Attachments.begin(), endAttach = m_Attachments.end(); | 771 | idxAttachPt = itObj->second.m_idxAttachPt; |
790 | itAttach != endAttach; ++itAttach) | 772 | if (idxAttachPt) |
791 | { | 773 | setDetachable(idxAttachPt, uuid, true); |
792 | if (itAttach->second == uuid) | ||
793 | { | ||
794 | setDetachable(itAttach->first, uuid, true); // <- invalidates our iterators on return | ||
795 | break; | ||
796 | } | ||
797 | } | ||
798 | } | ||
799 | } | 774 | } |
800 | else if ((idxAttachPt = getAttachPointIndex(strOption, true))) // @detach:<attachpt>=y | 775 | else if ((idxAttachPt = getAttachPointIndex(strOption, true))) // @detach:<attachpt>=y |
801 | { | 776 | { |
@@ -915,6 +890,35 @@ BOOL RlvHandler::processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvC | |||
915 | return TRUE; // Remove commands don't fail, doesn't matter what we return here | 890 | return TRUE; // Remove commands don't fail, doesn't matter what we return here |
916 | } | 891 | } |
917 | 892 | ||
893 | BOOL RlvHandler::processClearCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) | ||
894 | { | ||
895 | const std::string& strFilter = rlvCmd.getParam(); std::string strCmdRem; | ||
896 | |||
897 | rlv_object_map_t::const_iterator itObj = m_Objects.find(idObj); | ||
898 | if (itObj != m_Objects.end()) // No sense in clearing if we don't have any commands for this object | ||
899 | { | ||
900 | const RlvObject& rlvObj = itObj->second; bool fContinue = true; | ||
901 | for (rlv_command_list_t::const_iterator itCmd = rlvObj.m_Commands.begin(), itCurCmd; | ||
902 | ((fContinue) && (itCmd != rlvObj.m_Commands.end())); ) | ||
903 | { | ||
904 | itCurCmd = itCmd++; // Point itCmd ahead so it won't get invalidated if/when we erase a command | ||
905 | |||
906 | const RlvCommand& rlvCmdRem = *itCurCmd; strCmdRem = rlvCmdRem.asString(); | ||
907 | if ( (strFilter.empty()) || (std::string::npos != strCmdRem.find(strFilter)) ) | ||
908 | { | ||
909 | fContinue = (rlvObj.m_Commands.size() > 1); // rlvObj will become invalid once we remove the last command | ||
910 | processCommand(idObj, strCmdRem.append("=y"), false); | ||
911 | } | ||
912 | } | ||
913 | } | ||
914 | |||
915 | // Let our observers know about clear commands | ||
916 | RlvEvent rlvEvent(idObj, rlvCmd); | ||
917 | m_Emitter.update(&RlvObserver::onClearCommand, rlvEvent); | ||
918 | |||
919 | return TRUE; // Don't fail clear commands even if the object didn't exist since it confuses people | ||
920 | } | ||
921 | |||
918 | BOOL RlvHandler::processForceCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) const | 922 | BOOL RlvHandler::processForceCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) const |
919 | { | 923 | { |
920 | const std::string& strOption = rlvCmd.getOption(); | 924 | const std::string& strOption = rlvCmd.getOption(); |
@@ -946,10 +950,8 @@ BOOL RlvHandler::processForceCommand(const LLUUID& idObj, const RlvCommand& rlvC | |||
946 | { | 950 | { |
947 | LLVector3d posGlobal; | 951 | LLVector3d posGlobal; |
948 | 952 | ||
949 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | 953 | boost_tokenizer tokens(strOption, boost::char_separator<char>("/", "", boost::keep_empty_tokens)); int idx = 0; |
950 | boost::char_separator<char> sep("/", "", boost::keep_empty_tokens); | 954 | for (boost_tokenizer::const_iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) |
951 | tokenizer tokens(strOption, sep); int idx = 0; | ||
952 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | ||
953 | { | 955 | { |
954 | if (idx < 3) | 956 | if (idx < 3) |
955 | LLStringUtil::convertToF64(*itToken, posGlobal[idx++]); | 957 | LLStringUtil::convertToF64(*itToken, posGlobal[idx++]); |
@@ -1165,7 +1167,7 @@ BOOL RlvHandler::processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCm | |||
1165 | case RLV_BHVR_GETINVWORN: // @getinvworn[:path]=<channel> - Checked: | 1167 | case RLV_BHVR_GETINVWORN: // @getinvworn[:path]=<channel> - Checked: |
1166 | onGetInvWorn(rlvCmd.getOption(), strReply); | 1168 | onGetInvWorn(rlvCmd.getOption(), strReply); |
1167 | break; | 1169 | break; |
1168 | case RLV_BHVR_FINDFOLDER: // @findfolder:<criteria>=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | 1170 | case RLV_BHVR_FINDFOLDER: // @findfolder:<criteria>=<channel> - Checked: 2009-08-26 (RLVa-1.0.2a) | Modified: RLVa-1.0.2a |
1169 | { | 1171 | { |
1170 | // COMPAT-RLV: RLV 1.16.1 returns the first random folder it finds (probably tries to match "" to a folder name?) | 1172 | // COMPAT-RLV: RLV 1.16.1 returns the first random folder it finds (probably tries to match "" to a folder name?) |
1171 | // (just going to stick with what's there for now... no option => no folder) | 1173 | // (just going to stick with what's there for now... no option => no folder) |
@@ -1173,7 +1175,8 @@ BOOL RlvHandler::processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCm | |||
1173 | if ( (!strOption.empty()) && (findSharedFolders(strOption, folders)) ) | 1175 | if ( (!strOption.empty()) && (findSharedFolders(strOption, folders)) ) |
1174 | { | 1176 | { |
1175 | // We need to return an "in depth" result so whoever has the most '/' is our lucky winner | 1177 | // We need to return an "in depth" result so whoever has the most '/' is our lucky winner |
1176 | int maxSlashes = 0, curSlashes; std::string strFolderName; | 1178 | // (maxSlashes needs to be initialized to -1 since children of the #RLV folder won't have '/' in their shared path) |
1179 | int maxSlashes = -1, curSlashes; std::string strFolderName; | ||
1177 | for (S32 idxFolder = 0, cntFolder = folders.count(); idxFolder < cntFolder; idxFolder++) | 1180 | for (S32 idxFolder = 0, cntFolder = folders.count(); idxFolder < cntFolder; idxFolder++) |
1178 | { | 1181 | { |
1179 | strFolderName = getSharedPath(folders.get(idxFolder)); | 1182 | strFolderName = getSharedPath(folders.get(idxFolder)); |
@@ -1307,6 +1310,9 @@ void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded) | |||
1307 | rlv_object_map_t::iterator itObj = m_Objects.find(pObj->getID()); | 1310 | rlv_object_map_t::iterator itObj = m_Objects.find(pObj->getID()); |
1308 | if (itObj != m_Objects.end()) | 1311 | if (itObj != m_Objects.end()) |
1309 | { | 1312 | { |
1313 | // Save the attachment point index | ||
1314 | itObj->second.m_idxAttachPt = idxAttachPt; | ||
1315 | |||
1310 | // If it's an attachment we processed commands for but that only just rezzed in we need to mark it as existing in gObjectList | 1316 | // If it's an attachment we processed commands for but that only just rezzed in we need to mark it as existing in gObjectList |
1311 | if (!itObj->second.m_fLookup) | 1317 | if (!itObj->second.m_fLookup) |
1312 | itObj->second.m_fLookup = true; | 1318 | itObj->second.m_fLookup = true; |
@@ -1315,7 +1321,7 @@ void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded) | |||
1315 | if (itObj->second.hasBehaviour(RLV_BHVR_DETACH)) | 1321 | if (itObj->second.hasBehaviour(RLV_BHVR_DETACH)) |
1316 | { | 1322 | { |
1317 | // (Copy/paste from processAddCommand) | 1323 | // (Copy/paste from processAddCommand) |
1318 | setDetachable(pObj, pObj->getID(), false); | 1324 | setDetachable(idxAttachPt, pObj->getID(), false); |
1319 | 1325 | ||
1320 | if (pObj->isHUDAttachment()) | 1326 | if (pObj->isHUDAttachment()) |
1321 | LLPipeline::sShowHUDAttachments = TRUE; // Prevents hiding of locked HUD attachments | 1327 | LLPipeline::sShowHUDAttachments = TRUE; // Prevents hiding of locked HUD attachments |
@@ -1365,29 +1371,15 @@ void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded) | |||
1365 | (!getAttachPoint(pFolder, true)) ) | 1371 | (!getAttachPoint(pFolder, true)) ) |
1366 | { | 1372 | { |
1367 | // It's no mod and its parent folder doesn't contain an attach point | 1373 | // It's no mod and its parent folder doesn't contain an attach point |
1368 | LLInventoryModel::cat_array_t* pFolders; | 1374 | if ( (1 == rlvGetDirectDescendentsCount(pFolder, LLAssetType::AT_OBJECT)) && (NEW_CATEGORY_NAME == pFolder->getName()) ) |
1369 | LLInventoryModel::item_array_t* pItems; | ||
1370 | gInventory.getDirectDescendentsOf(pFolder->getUUID(), pFolders, pItems); | ||
1371 | |||
1372 | if (pItems) | ||
1373 | { | 1375 | { |
1374 | int cntObjects = 0; | ||
1375 | for (S32 idxItem = 0, cntItem = pItems->size(); idxItem < cntItem; idxItem++) | ||
1376 | { | ||
1377 | if (LLAssetType::AT_OBJECT == pItems->get(idxItem)->getType()) | ||
1378 | cntObjects++; | ||
1379 | } | ||
1380 | |||
1381 | // Only rename if there's exactly 1 object/attachment inside of it [see LLFolderBridge::renameItem()] | 1376 | // Only rename if there's exactly 1 object/attachment inside of it [see LLFolderBridge::renameItem()] |
1382 | if ( (1 == cntObjects) && (NEW_CATEGORY_NAME == pFolder->getName()) ) | 1377 | std::string strName = ".(" + strAttachPt + ")"; |
1383 | { | ||
1384 | std::string strName = ".(" + strAttachPt + ")"; | ||
1385 | 1378 | ||
1386 | pFolder->rename(strName); | 1379 | pFolder->rename(strName); |
1387 | pFolder->updateServer(FALSE); | 1380 | pFolder->updateServer(FALSE); |
1388 | gInventory.updateCategory(pFolder); | 1381 | gInventory.updateCategory(pFolder); |
1389 | //gInventory.notifyObservers(); <- done further down in LLVOAvatar::attachObject() | 1382 | //gInventory.notifyObservers(); <- done further down in LLVOAvatar::attachObject() |
1390 | } | ||
1391 | } | 1383 | } |
1392 | } | 1384 | } |
1393 | } | 1385 | } |
@@ -1864,10 +1856,8 @@ LLViewerInventoryCategory* RlvHandler::getSharedFolder(const std::string& strPat | |||
1864 | return NULL; | 1856 | return NULL; |
1865 | 1857 | ||
1866 | // Walk the path (starting at the root) | 1858 | // Walk the path (starting at the root) |
1867 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | 1859 | boost_tokenizer tokens(strPath, boost::char_separator<char>("/", "", boost::drop_empty_tokens)); |
1868 | boost::char_separator<char> sep("/", "", boost::drop_empty_tokens); | 1860 | for (boost_tokenizer::const_iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) |
1869 | tokenizer tokens(strPath, sep); | ||
1870 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | ||
1871 | { | 1861 | { |
1872 | pFolder = getSharedFolder(pFolder->getUUID(), *itToken); | 1862 | pFolder = getSharedFolder(pFolder->getUUID(), *itToken); |
1873 | if (!pFolder) | 1863 | if (!pFolder) |
@@ -2102,15 +2092,10 @@ void RlvHandler::onForceRemOutfit(const LLUUID& idObj, const std::string& strOpt | |||
2102 | for (int idxType = 0; idxType < WT_COUNT; idxType++) | 2092 | for (int idxType = 0; idxType < WT_COUNT; idxType++) |
2103 | { | 2093 | { |
2104 | type = (EWearableType)idxType; | 2094 | type = (EWearableType)idxType; |
2095 | if (LLAssetType::AT_CLOTHING != LLWearable::typeToAssetType(type)) | ||
2096 | continue; // Only strip clothing, not bodyparts | ||
2105 | 2097 | ||
2106 | // Only strip clothing (that's currently worn and not marked "nostrip") | 2098 | if ( ((typeOption == type) || (strOption.empty())) && (gAgent.getWearable(type)) && (isStrippable(gAgent.getWearableItem(type))) ) |
2107 | if ( (LLAssetType::AT_CLOTHING != LLWearable::typeToAssetType(type)) || | ||
2108 | (!gAgent.getWearable(type)) || (!isStrippable(gAgent.getWearableItem(type))) ) | ||
2109 | { | ||
2110 | continue; | ||
2111 | } | ||
2112 | |||
2113 | if ( (typeOption == type) || (strOption.empty()) ) | ||
2114 | { | 2099 | { |
2115 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | 2100 | #ifdef RLV_EXPERIMENTAL_COMPOSITES |
2116 | // If we're stripping something that's part of a composite folder then we should @detachthis instead | 2101 | // If we're stripping something that's part of a composite folder then we should @detachthis instead |
@@ -2238,7 +2223,7 @@ void RlvHandler::onForceWear(const std::string& strPath, bool fAttach, bool fMat | |||
2238 | // Simulate wearing an object to a specific attachment point (copy/paste to suppress replacement dialog) | 2223 | // Simulate wearing an object to a specific attachment point (copy/paste to suppress replacement dialog) |
2239 | // LLAttachObject::handleEvent() => rez_attachment() | 2224 | // LLAttachObject::handleEvent() => rez_attachment() |
2240 | LLViewerJointAttachment* pAttachPt = getAttachPoint(pItem, true); | 2225 | LLViewerJointAttachment* pAttachPt = getAttachPoint(pItem, true); |
2241 | if ( (pAttachPt) && (isDetachable(pAttachPt->getObject())) ) | 2226 | if ( (pAttachPt) && (isDetachable(pAttachPt)) ) |
2242 | { | 2227 | { |
2243 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | 2228 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 |
2244 | LLAttachmentRezAction* rez_action = new LLAttachmentRezAction; | 2229 | LLAttachmentRezAction* rez_action = new LLAttachmentRezAction; |
@@ -2498,7 +2483,7 @@ BOOL RlvHandler::setEnabled(BOOL fEnable) | |||
2498 | 2483 | ||
2499 | BOOL RlvHandler::canDisable() | 2484 | BOOL RlvHandler::canDisable() |
2500 | { | 2485 | { |
2501 | return TRUE; | 2486 | return FALSE; |
2502 | } | 2487 | } |
2503 | 2488 | ||
2504 | void RlvHandler::clearState() | 2489 | void RlvHandler::clearState() |
diff --git a/linden/indra/newview/rlvhandler.h b/linden/indra/newview/rlvhandler.h index df3ff9b..4470632 100644 --- a/linden/indra/newview/rlvhandler.h +++ b/linden/indra/newview/rlvhandler.h | |||
@@ -14,17 +14,11 @@ | |||
14 | #include "rlvmultistringsearch.h" | 14 | #include "rlvmultistringsearch.h" |
15 | 15 | ||
16 | // ============================================================================ | 16 | // ============================================================================ |
17 | /* | ||
18 | * RlvHandler | ||
19 | * ========== | ||
20 | * | ||
21 | */ | ||
22 | 17 | ||
23 | typedef std::map<LLUUID, RlvObject> rlv_object_map_t; | 18 | typedef std::map<LLUUID, RlvObject> rlv_object_map_t; |
24 | typedef std::multimap<S32, LLUUID> rlv_detach_map_t; | 19 | typedef std::multimap<S32, LLUUID> rlv_detach_map_t; |
25 | typedef std::map<S32, LLUUID> rlv_reattach_map_t; | 20 | typedef std::map<S32, LLUUID> rlv_reattach_map_t; |
26 | typedef std::multimap<LLUUID, ERlvBehaviour> rlv_exception_map_t; | 21 | typedef std::multimap<LLUUID, ERlvBehaviour> rlv_exception_map_t; |
27 | typedef std::map<S32, RlvRedirInfo> rlv_redir_map_t; | ||
28 | 22 | ||
29 | class RlvHandler | 23 | class RlvHandler |
30 | { | 24 | { |
@@ -73,6 +67,7 @@ public: | |||
73 | // Returns TRUE if the specified attachment point is detachable | 67 | // Returns TRUE if the specified attachment point is detachable |
74 | bool isDetachable(S32 idxAttachPt) const { return (idxAttachPt) && (m_Attachments.find(idxAttachPt) == m_Attachments.end()); } | 68 | bool isDetachable(S32 idxAttachPt) const { return (idxAttachPt) && (m_Attachments.find(idxAttachPt) == m_Attachments.end()); } |
75 | bool isDetachable(const LLInventoryItem* pItem) const; | 69 | bool isDetachable(const LLInventoryItem* pItem) const; |
70 | bool isDetachable(LLViewerJointAttachment* pAttachPt) const; | ||
76 | bool isDetachable(LLViewerObject* pObj) const; | 71 | bool isDetachable(LLViewerObject* pObj) const; |
77 | // Returns TRUE if the specified attachment point is set undetachable by anything other than pObj (or one of its children) | 72 | // Returns TRUE if the specified attachment point is set undetachable by anything other than pObj (or one of its children) |
78 | bool isDetachableExcept(S32 idxAttachPt, LLViewerObject* pObj) const; | 73 | bool isDetachableExcept(S32 idxAttachPt, LLViewerObject* pObj) const; |
@@ -194,6 +189,7 @@ public: | |||
194 | protected: | 189 | protected: |
195 | BOOL processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); | 190 | BOOL processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); |
196 | BOOL processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); | 191 | BOOL processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); |
192 | BOOL processClearCommand(const LLUUID& idObj, const RlvCommand& rlvCmd); | ||
197 | BOOL processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; | 193 | BOOL processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; |
198 | BOOL processForceCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; | 194 | BOOL processForceCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; |
199 | 195 | ||
@@ -234,7 +230,6 @@ protected: | |||
234 | rlv_retained_list_t m_Retained; | 230 | rlv_retained_list_t m_Retained; |
235 | rlv_reattach_map_t m_AttachPending; | 231 | rlv_reattach_map_t m_AttachPending; |
236 | rlv_reattach_map_t m_DetachPending; | 232 | rlv_reattach_map_t m_DetachPending; |
237 | rlv_redir_map_t m_Redirections; | ||
238 | RlvGCTimer* m_pGCTimer; | 233 | RlvGCTimer* m_pGCTimer; |
239 | RlvWLSnapshot* m_pWLSnapshot; | 234 | RlvWLSnapshot* m_pWLSnapshot; |
240 | 235 | ||
@@ -370,6 +365,14 @@ inline bool RlvHandler::hasBehaviourExcept(ERlvBehaviour eBehaviour, const LLUUI | |||
370 | } | 365 | } |
371 | #endif // RLV_EXPERIMENTAL_COMPOSITES | 366 | #endif // RLV_EXPERIMENTAL_COMPOSITES |
372 | 367 | ||
368 | // Checked: 2009-09-08 (RLVa-1.0.2c) | Added: RLVa-1.0.2c | ||
369 | inline bool RlvHandler::isDetachable(LLViewerJointAttachment *pAttachPt) const | ||
370 | { | ||
371 | // If there's an attached object it's faster to just use that; otherwise look up the attachment index because it might be locked empty | ||
372 | return (pAttachPt == NULL) || | ||
373 | ( (pAttachPt->getObject() != NULL) && isDetachable(pAttachPt->getObject()) ) || (isDetachable(getAttachPointIndex(pAttachPt))); | ||
374 | } | ||
375 | |||
373 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | 376 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d |
374 | inline bool RlvHandler::isDetachable(LLViewerObject* pObj) const | 377 | inline bool RlvHandler::isDetachable(LLViewerObject* pObj) const |
375 | { | 378 | { |
diff --git a/linden/indra/newview/rlvhelper.cpp b/linden/indra/newview/rlvhelper.cpp index 6b2a1a0..f495384 100644 --- a/linden/indra/newview/rlvhelper.cpp +++ b/linden/indra/newview/rlvhelper.cpp | |||
@@ -1,5 +1,6 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | 1 | #include "llviewerprecompiledheaders.h" |
2 | #include "llagent.h" | 2 | #include "llagent.h" |
3 | #include "llfloaterwindlight.h" | ||
3 | #include "llviewerobject.h" | 4 | #include "llviewerobject.h" |
4 | #include "llviewerstats.h" | 5 | #include "llviewerstats.h" |
5 | #include "llviewerwindow.h" | 6 | #include "llviewerwindow.h" |
@@ -14,31 +15,33 @@ | |||
14 | // Static variable initialization | 15 | // Static variable initialization |
15 | // | 16 | // |
16 | 17 | ||
17 | RlvMultiStringSearch RlvCommand::m_BhvrLookup; | 18 | RlvCommand::RlvBhvrTable RlvCommand::m_BhvrMap; |
18 | 19 | ||
19 | // ============================================================================ | 20 | // ============================================================================ |
21 | // RlvCommmand | ||
22 | // | ||
20 | 23 | ||
21 | // Checked: | 24 | // Checked: 2009-09-10 (RLVa-1.0.3a) | Modified: RLVa-1.0.3a |
22 | RlvCommand::RlvCommand(const std::string& strCommand) | 25 | RlvCommand::RlvCommand(const std::string& strCommand) |
23 | : m_eBehaviour(RLV_BHVR_UNKNOWN), m_eParamType(RLV_TYPE_UNKNOWN) | 26 | : m_eBehaviour(RLV_BHVR_UNKNOWN), m_eParamType(RLV_TYPE_UNKNOWN) |
24 | { | 27 | { |
25 | if ((m_fValid = parseCommand(strCommand, m_strBehaviour, m_strOption, m_strParam))) | 28 | if ((m_fValid = parseCommand(strCommand, m_strBehaviour, m_strOption, m_strParam))) |
26 | { | 29 | { |
30 | S32 nTemp = 0; | ||
27 | if ( ("n" == m_strParam) || ("add" == m_strParam) ) | 31 | if ( ("n" == m_strParam) || ("add" == m_strParam) ) |
28 | m_eParamType = RLV_TYPE_ADD; | 32 | m_eParamType = RLV_TYPE_ADD; |
29 | else if ( ("y" == m_strParam) || ("rem" == m_strParam) ) | 33 | else if ( ("y" == m_strParam) || ("rem" == m_strParam) ) |
30 | m_eParamType = RLV_TYPE_REMOVE; | 34 | m_eParamType = RLV_TYPE_REMOVE; |
31 | else if ("force" == m_strParam) | 35 | else if ("force" == m_strParam) |
32 | m_eParamType = RLV_TYPE_FORCE; | 36 | m_eParamType = RLV_TYPE_FORCE; |
37 | else if (LLStringUtil::convertToS32(m_strParam, nTemp)) // Assume it's a reply command if we can convert <param> to an S32 | ||
38 | m_eParamType = RLV_TYPE_REPLY; | ||
39 | else if (m_strBehaviour == "clear") // clear is the odd one out so just make it its own type | ||
40 | m_eParamType = RLV_TYPE_CLEAR; | ||
33 | else | 41 | else |
34 | { | 42 | { |
35 | m_eParamType = RLV_TYPE_REPLY; // Assume it's a reply command until we encounter a non-digit | 43 | m_eParamType = RLV_TYPE_UNKNOWN; |
36 | 44 | m_fValid = false; | |
37 | if ( (m_strParam.empty()) || (-1 != m_strParam.find_first_not_of("0123456789")) ) | ||
38 | { | ||
39 | m_eParamType = RLV_TYPE_UNKNOWN; | ||
40 | m_fValid = ("clear" == m_strBehaviour); | ||
41 | } | ||
42 | } | 45 | } |
43 | } | 46 | } |
44 | 47 | ||
@@ -48,50 +51,16 @@ RlvCommand::RlvCommand(const std::string& strCommand) | |||
48 | return; | 51 | return; |
49 | } | 52 | } |
50 | 53 | ||
51 | U16 nBehaviour; | 54 | RlvBhvrTable::const_iterator itBhvr = m_BhvrMap.find(m_strBehaviour); |
52 | if (m_BhvrLookup.getExactMatchParam(m_strBehaviour, nBehaviour)) | 55 | if (itBhvr != m_BhvrMap.end()) |
53 | { | 56 | m_eBehaviour = itBhvr->second; |
54 | m_eBehaviour = (ERlvBehaviour)nBehaviour; | ||
55 | } | ||
56 | } | 57 | } |
57 | 58 | ||
58 | RlvCommand::RlvCommand(const RlvCommand& rlvCmd) | ||
59 | : m_fValid(rlvCmd.m_fValid), | ||
60 | m_strBehaviour(rlvCmd.m_strBehaviour), m_eBehaviour(rlvCmd.m_eBehaviour), | ||
61 | m_strOption(rlvCmd.m_strOption), | ||
62 | m_strParam(rlvCmd.m_strParam), m_eParamType(rlvCmd.m_eParamType) | ||
63 | { | ||
64 | } | ||
65 | 59 | ||
66 | // ============================================================================ | 60 | bool RlvCommand::parseCommand(const std::string& strCommand, std::string& strBehaviour, std::string& strOption, std::string& strParam) |
67 | |||
68 | /* | ||
69 | * ------------------------------ | ||
70 | * Command | RLV | RLVa | ||
71 | * ------------------------------ | ||
72 | * : | F | F (missing behaviour) | ||
73 | * :option | F | F (missing behaviour) | ||
74 | * := | T | F (missing behaviour) | ||
75 | * :option= | T | F (missing behaviour) | ||
76 | * :option=param | T | F (missing behaviour) | ||
77 | * = | T | F (missing behaviour) | ||
78 | * =param | T | F (missing behaviour) | ||
79 | * cmd | F | F (missing param) [T if <behaviour> == "clear"] | ||
80 | * cmd: | F | F (missing param) | ||
81 | * cmd:option | F | F (missing param) | ||
82 | * cmd:= | T | F (missing param) [1] | ||
83 | * cmd:option= | T | F (missing param) [1] | ||
84 | * cmd= | T | F (missing param) [1] | ||
85 | * cmd:option=param | T | T | ||
86 | * cmd=param | T | T | ||
87 | * cmd:=param | T | T | ||
88 | * | ||
89 | * [1] 'clear:=', 'clear:option=' and 'clear=' are "valid" variations of 'clear' | ||
90 | */ | ||
91 | |||
92 | BOOL RlvCommand::parseCommand(/*[in]*/ const std::string& strCommand, | ||
93 | /*[out]*/ std::string& strBehaviour, /*[out]*/ std::string& strOption, /*[out]*/ std::string& strParam) | ||
94 | { | 61 | { |
62 | // (See behaviour notes for the command parsing truth table) | ||
63 | |||
95 | // Format: <behaviour>[:<option>]=<param> | 64 | // Format: <behaviour>[:<option>]=<param> |
96 | int idxParam = strCommand.find('='); | 65 | int idxParam = strCommand.find('='); |
97 | int idxOption = (idxParam > 0) ? strCommand.find(':') : -1; | 66 | int idxOption = (idxParam > 0) ? strCommand.find(':') : -1; |
@@ -100,7 +69,7 @@ BOOL RlvCommand::parseCommand(/*[in]*/ const std::string& strCommand, | |||
100 | 69 | ||
101 | // If <behaviour> is missing it's always an improperly formatted command | 70 | // If <behaviour> is missing it's always an improperly formatted command |
102 | if ( (0 == idxOption) || (0 == idxParam) ) | 71 | if ( (0 == idxOption) || (0 == idxParam) ) |
103 | return FALSE; | 72 | return false; |
104 | 73 | ||
105 | strBehaviour = strCommand.substr(0, (-1 != idxOption) ? idxOption : idxParam); | 74 | strBehaviour = strCommand.substr(0, (-1 != idxOption) ? idxOption : idxParam); |
106 | strOption = strParam = ""; | 75 | strOption = strParam = ""; |
@@ -111,15 +80,15 @@ BOOL RlvCommand::parseCommand(/*[in]*/ const std::string& strCommand, | |||
111 | // Unless "<behaviour> == "clear" AND (idxOption == 0)" | 80 | // Unless "<behaviour> == "clear" AND (idxOption == 0)" |
112 | // OR <behaviour> == "clear" AND (idxParam != 0) [see table above] | 81 | // OR <behaviour> == "clear" AND (idxParam != 0) [see table above] |
113 | if ( ("clear" == strBehaviour) && ( (!idxOption) || (idxParam) ) ) | 82 | if ( ("clear" == strBehaviour) && ( (!idxOption) || (idxParam) ) ) |
114 | return TRUE; | 83 | return true; |
115 | return FALSE; | 84 | return false; |
116 | } | 85 | } |
117 | 86 | ||
118 | if ( (-1 != idxOption) && (idxOption + 1 != idxParam) ) | 87 | if ( (-1 != idxOption) && (idxOption + 1 != idxParam) ) |
119 | strOption = strCommand.substr(idxOption + 1, idxParam - idxOption - 1); | 88 | strOption = strCommand.substr(idxOption + 1, idxParam - idxOption - 1); |
120 | strParam = strCommand.substr(idxParam + 1); | 89 | strParam = strCommand.substr(idxParam + 1); |
121 | 90 | ||
122 | return TRUE; | 91 | return true; |
123 | } | 92 | } |
124 | 93 | ||
125 | void RlvCommand::initLookupTable() | 94 | void RlvCommand::initLookupTable() |
@@ -127,57 +96,61 @@ void RlvCommand::initLookupTable() | |||
127 | static bool fInitialized = false; | 96 | static bool fInitialized = false; |
128 | if (!fInitialized) | 97 | if (!fInitialized) |
129 | { | 98 | { |
130 | // NOTE: keep this match with the enumeration at all times | 99 | // NOTE: keep this matched with the enumeration at all times |
131 | std::string arBehaviours[RLV_BHVR_COUNT] = | 100 | std::string arBehaviours[RLV_BHVR_COUNT] = |
132 | { | 101 | { |
133 | "version", "detach", "redirchat", "rediremote", "sendim", "recvchat", "recvemote", "recvim", "tploc", "tplure", | 102 | "version", "detach", "sendchat", "emote", "chatshout", "chatnormal", "chatwhisper", "redirchat", "rediremote", |
134 | "sittp", "edit", "rez", "addoutfit", "remoutfit", "getoutfit", "getattach", "showinv", "unsit", "sit", | 103 | "sendim", "recvchat", "recvemote", "recvim", "tplm", "tploc", "tplure", "sittp", "edit", "rez", "addoutfit", |
135 | "getstatus", "getstatusall", "getinv", "getinvworn", "findfolder", "findfolders", "attach", "attachall", "detachall", | 104 | "remoutfit", "getoutfit", "getattach", "showinv", "viewnote", "unsit", "sit", "sendchannel", "getstatus", "getstatusall", |
136 | "getpath", "attachthis", "attachallthis", "detachthis", "detachallthis", "fartouch", "showworldmap", "showminimap", | 105 | "getinv", "getinvworn", "findfolder", "findfolders", "attach", "attachall", "detachall", "getpath", "attachthis", |
137 | "showloc", "tpto", "accepttp", "shownames", "fly", "getsitid", "setdebug", "setenv", "detachme", | 106 | "attachallthis", "detachthis", "detachallthis", "fartouch", "showworldmap", "showminimap", "showloc", "tpto", "accepttp", |
138 | "showhovertextall", "showhovertextworld", "showhovertexthud", "showhovertext", "notify" | 107 | "shownames", "fly", "getsitid", "setdebug", "setenv", "detachme", "showhovertextall", "showhovertextworld", |
108 | "showhovertexthud", "showhovertext", "notify" | ||
139 | }; | 109 | }; |
140 | 110 | ||
141 | for (int idxBvhr = 0; idxBvhr < RLV_BHVR_COUNT; idxBvhr++) | 111 | for (int idxBvhr = 0; idxBvhr < RLV_BHVR_COUNT; idxBvhr++) |
142 | m_BhvrLookup.addKeyword(arBehaviours[idxBvhr], idxBvhr); | 112 | m_BhvrMap.insert(std::pair<std::string, ERlvBehaviour>(arBehaviours[idxBvhr], (ERlvBehaviour)idxBvhr)); |
143 | 113 | ||
144 | fInitialized = true; | 114 | fInitialized = true; |
145 | } | 115 | } |
146 | } | 116 | } |
147 | 117 | ||
148 | // Checked: 2009-06-07 (RLVa-0.2.1c) | 118 | // ========================================================================= |
149 | std::string RlvCommand::asString() const | 119 | // RlvObject |
120 | // | ||
121 | |||
122 | RlvObject::RlvObject(const LLUUID& idObj) : m_UUID(idObj), m_nLookupMisses(0) | ||
150 | { | 123 | { |
151 | return (!m_strOption.empty()) ? (std::string(m_strBehaviour)).append(":").append(m_strOption) : (std::string(m_strBehaviour)); | 124 | LLViewerObject* pObj = gObjectList.findObject(idObj); |
125 | m_fLookup = (NULL != pObj); | ||
126 | m_idxAttachPt = (pObj) ? ATTACHMENT_ID_FROM_STATE(pObj->getState()) : 0; | ||
152 | } | 127 | } |
153 | 128 | ||
154 | // ========================================================================= | 129 | bool RlvObject::addCommand(const RlvCommand& rlvCmd) |
155 | |||
156 | BOOL RlvObject::addCommand(const RlvCommand& rlvCmd) | ||
157 | { | 130 | { |
158 | // Sanity checking | 131 | // Sanity checking |
159 | if (RLV_TYPE_ADD != rlvCmd.getParamType()) | 132 | if (RLV_TYPE_ADD != rlvCmd.getParamType()) |
160 | return FALSE; | 133 | return false; |
161 | 134 | ||
162 | // Don't add duplicate commands for this object (ie @detach=n followed by another @detach=n later on) | 135 | // Don't add duplicate commands for this object (ie @detach=n followed by another @detach=n later on) |
163 | BOOL fDuplicate = | 136 | bool fDuplicate = |
164 | (RLV_BHVR_UNKNOWN != rlvCmd.getBehaviourType()) | 137 | (RLV_BHVR_UNKNOWN != rlvCmd.getBehaviourType()) |
165 | ? hasBehaviour(rlvCmd.getBehaviourType(), rlvCmd.getOption()) | 138 | ? hasBehaviour(rlvCmd.getBehaviourType(), rlvCmd.getOption()) |
166 | : hasBehaviour(rlvCmd.getBehaviour(), rlvCmd.getOption()); | 139 | : hasBehaviour(rlvCmd.getBehaviour(), rlvCmd.getOption()); |
167 | if (fDuplicate) | 140 | if (fDuplicate) |
168 | return FALSE; | 141 | return false; |
169 | 142 | ||
170 | // Now that we know it's not a duplicate, add it to the end of the list | 143 | // Now that we know it's not a duplicate, add it to the end of the list |
171 | m_Commands.push_back(rlvCmd); | 144 | m_Commands.push_back(rlvCmd); |
172 | 145 | ||
173 | return TRUE; | 146 | return true; |
174 | } | 147 | } |
175 | 148 | ||
176 | BOOL RlvObject::removeCommand(const RlvCommand& rlvCmd) | 149 | bool RlvObject::removeCommand(const RlvCommand& rlvCmd) |
177 | { | 150 | { |
178 | // Sanity checking | 151 | // Sanity checking |
179 | if (RLV_TYPE_REMOVE != rlvCmd.getParamType()) | 152 | if (RLV_TYPE_REMOVE != rlvCmd.getParamType()) |
180 | return FALSE; | 153 | return false; |
181 | 154 | ||
182 | for (rlv_command_list_t::iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | 155 | for (rlv_command_list_t::iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) |
183 | { | 156 | { |
@@ -185,42 +158,42 @@ BOOL RlvObject::removeCommand(const RlvCommand& rlvCmd) | |||
185 | if ( (itCmd->getBehaviour() == rlvCmd.getBehaviour()) && (itCmd->getOption() == rlvCmd.getOption()) ) | 158 | if ( (itCmd->getBehaviour() == rlvCmd.getBehaviour()) && (itCmd->getOption() == rlvCmd.getOption()) ) |
186 | { | 159 | { |
187 | m_Commands.erase(itCmd); | 160 | m_Commands.erase(itCmd); |
188 | return TRUE; | 161 | return true; |
189 | } | 162 | } |
190 | } | 163 | } |
191 | return FALSE; // Command was never added so nothing to remove now | 164 | return false; // Command was never added so nothing to remove now |
192 | } | 165 | } |
193 | 166 | ||
194 | BOOL RlvObject::hasBehaviour(ERlvBehaviour eBehaviour) const | 167 | bool RlvObject::hasBehaviour(ERlvBehaviour eBehaviour) const |
195 | { | 168 | { |
196 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | 169 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) |
197 | if ( (itCmd->getBehaviourType() == eBehaviour) && (itCmd->getOption().empty()) ) | 170 | if ( (itCmd->getBehaviourType() == eBehaviour) && (itCmd->getOption().empty()) ) |
198 | return TRUE; | 171 | return true; |
199 | return FALSE; | 172 | return false; |
200 | } | 173 | } |
201 | 174 | ||
202 | BOOL RlvObject::hasBehaviour(const std::string& strBehaviour) const | 175 | bool RlvObject::hasBehaviour(const std::string& strBehaviour) const |
203 | { | 176 | { |
204 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | 177 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) |
205 | if ( (itCmd->getBehaviour() == strBehaviour) && (itCmd->getOption().empty()) ) | 178 | if ( (itCmd->getBehaviour() == strBehaviour) && (itCmd->getOption().empty()) ) |
206 | return TRUE; | 179 | return true; |
207 | return FALSE; | 180 | return false; |
208 | } | 181 | } |
209 | 182 | ||
210 | BOOL RlvObject::hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const | 183 | bool RlvObject::hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const |
211 | { | 184 | { |
212 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | 185 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) |
213 | if ( (itCmd->getBehaviourType() == eBehaviour) && (itCmd->getOption() == strOption) ) | 186 | if ( (itCmd->getBehaviourType() == eBehaviour) && (itCmd->getOption() == strOption) ) |
214 | return TRUE; | 187 | return true; |
215 | return FALSE; | 188 | return false; |
216 | } | 189 | } |
217 | 190 | ||
218 | BOOL RlvObject::hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const | 191 | bool RlvObject::hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const |
219 | { | 192 | { |
220 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) | 193 | for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd) |
221 | if ( (itCmd->getBehaviour() == strBehaviour) && (itCmd->getOption() == strOption) ) | 194 | if ( (itCmd->getBehaviour() == strBehaviour) && (itCmd->getOption() == strOption) ) |
222 | return TRUE; | 195 | return true; |
223 | return FALSE; | 196 | return false; |
224 | } | 197 | } |
225 | 198 | ||
226 | // Checked: 2009-06-07 (RLVa-0.2.1c) | 199 | // Checked: 2009-06-07 (RLVa-0.2.1c) |
@@ -242,31 +215,9 @@ std::string RlvObject::getStatusString(const std::string& strMatch) const | |||
242 | return strStatus; | 215 | return strStatus; |
243 | } | 216 | } |
244 | 217 | ||
245 | // ========================================================================= | 218 | // ============================================================================ |
246 | /* | 219 | // RlvWearableItemCollector |
247 | * Various helper classes/timers/functors | 220 | // |
248 | * | ||
249 | */ | ||
250 | |||
251 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
252 | S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType::EType type) | ||
253 | { | ||
254 | S32 cntType = 0; | ||
255 | if (pFolder) | ||
256 | { | ||
257 | LLInventoryModel::cat_array_t* pFolders; | ||
258 | LLInventoryModel::item_array_t* pItems; | ||
259 | gInventory.getDirectDescendentsOf(pFolder->getUUID(), pFolders, pItems); | ||
260 | |||
261 | if (pItems) | ||
262 | { | ||
263 | for (S32 idxItem = 0, cntItem = pItems->count(); idxItem < cntItem; idxItem++) | ||
264 | if (pItems->get(idxItem)->getType() == type) | ||
265 | cntType++; | ||
266 | } | ||
267 | } | ||
268 | return cntType; | ||
269 | } | ||
270 | 221 | ||
271 | // Checked: 2009-05-30 (RLVa-0.2.0e) | Added: RLVa-0.2.0e | 222 | // Checked: 2009-05-30 (RLVa-0.2.0e) | Added: RLVa-0.2.0e |
272 | const LLUUID& RlvWearableItemCollector::getFoldedParent(const LLUUID& idFolder) const | 223 | const LLUUID& RlvWearableItemCollector::getFoldedParent(const LLUUID& idFolder) const |
@@ -365,57 +316,72 @@ bool RlvWearableItemCollector::operator()(LLInventoryCategory* pFolder, LLInvent | |||
365 | return (pFolder) ? onCollectFolder(pFolder) : ( (pItem) ? onCollectItem(pItem) : false ); | 316 | return (pFolder) ? onCollectFolder(pFolder) : ( (pItem) ? onCollectItem(pItem) : false ); |
366 | } | 317 | } |
367 | 318 | ||
368 | // Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0f | 319 | // ============================================================================ |
369 | bool RlvSelectHasLockedAttach::apply(LLSelectNode* pNode) | 320 | // RlvWLSnapshot |
370 | { | 321 | // |
371 | return (pNode->getObject()) ? !gRlvHandler.isDetachable(pNode->getObject()) : false; | ||
372 | } | ||
373 | |||
374 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0f | ||
375 | bool RlvSelectIsOwnedByOrGroupOwned::apply(LLSelectNode* pNode) | ||
376 | { | ||
377 | return (pNode->mPermissions->isGroupOwned()) || (pNode->mPermissions->getOwner() == m_idAgent); | ||
378 | } | ||
379 | 322 | ||
380 | // Checked: 2009-05-31 (RLVa-0.2.0f) | Modified: RLVa-0.2.0f | 323 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h |
381 | bool RlvSelectIsSittingOn::apply(LLSelectNode* pNode) | 324 | void RlvWLSnapshot::restoreSnapshot(const RlvWLSnapshot* pWLSnapshot) |
382 | { | 325 | { |
383 | return (pNode->getObject()) && (pNode->getObject()->getRootEdit() == m_pObject); | 326 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); |
327 | if ( (pWLSnapshot) && (pWLParams) ) | ||
328 | { | ||
329 | pWLParams->mAnimator.mIsRunning = pWLSnapshot->fIsRunning; | ||
330 | pWLParams->mAnimator.mUseLindenTime = pWLSnapshot->fUseLindenTime; | ||
331 | pWLParams->mCurParams = pWLSnapshot->WLParams; | ||
332 | pWLParams->propagateParameters(); | ||
333 | } | ||
384 | } | 334 | } |
385 | 335 | ||
386 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0g | 336 | // Checked: 2009-09-16 (RLVa-1.0.3c) | Modified: RLVa-1.0.3c |
387 | bool rlvCanDeleteOrReturn() | 337 | RlvWLSnapshot* RlvWLSnapshot::takeSnapshot() |
388 | { | 338 | { |
389 | bool fIsAllowed = true; | 339 | // HACK: see RlvExtGetSet::onGetEnv |
390 | 340 | if (!LLFloaterWindLight::isOpen()) | |
391 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
392 | { | 341 | { |
393 | // We'll allow if none of the prims are owned by the avie or group owned | 342 | LLFloaterWindLight::instance()->close(); |
394 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | 343 | LLFloaterWindLight::instance()->syncMenu(); |
395 | RlvSelectIsOwnedByOrGroupOwned func(gAgent.getID()); | ||
396 | if ( (handleSel.notNull()) && ((0 == handleSel->getRootObjectCount()) || (NULL != handleSel->getFirstRootNode(&func, FALSE))) ) | ||
397 | fIsAllowed = false; | ||
398 | } | 344 | } |
399 | 345 | ||
400 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) ) | 346 | RlvWLSnapshot* pWLSnapshot = NULL; |
347 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | ||
348 | if (pWLParams) | ||
401 | { | 349 | { |
402 | // We'll allow if the avie isn't sitting on any of the selected objects | 350 | pWLSnapshot = new RlvWLSnapshot(); |
403 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | 351 | pWLSnapshot->fIsRunning = pWLParams->mAnimator.mIsRunning; |
404 | RlvSelectIsSittingOn func(gAgent.getAvatarObject()->getRoot()); | 352 | pWLSnapshot->fUseLindenTime = pWLParams->mAnimator.mUseLindenTime; |
405 | if ( (handleSel.notNull()) && (handleSel->getFirstRootNode(&func, TRUE)) ) | 353 | pWLSnapshot->WLParams = pWLParams->mCurParams; |
406 | fIsAllowed = false; | ||
407 | } | 354 | } |
408 | 355 | return pWLSnapshot; | |
409 | return fIsAllowed; | ||
410 | } | 356 | } |
411 | 357 | ||
412 | // Checked: 2009-07-05 (RLVa-1.0.0c) | 358 | // ========================================================================= |
413 | BOOL rlvAttachToEnabler(void* pParam) | 359 | // RlvSettings |
414 | { | 360 | // |
415 | // Enables/disables an option on the "Attach to (HUD)" submenu depending on whether it is (un)detachable | 361 | |
416 | LLViewerJointAttachment* pAttachment = (LLViewerJointAttachment*)pParam; | 362 | BOOL RlvSettings::fShowNameTags = FALSE; |
417 | return (!pAttachment) || (gRlvHandler.isDetachable(pAttachment->getObject())); | 363 | |
418 | } | 364 | #ifdef RLV_EXTENSION_STARTLOCATION |
365 | // Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1d | ||
366 | void RlvSettings::updateLoginLastLocation() | ||
367 | { | ||
368 | if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) | ||
369 | { | ||
370 | BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || | ||
371 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && | ||
372 | (gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->mIsSitting) ); | ||
373 | if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) | ||
374 | { | ||
375 | gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); | ||
376 | gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); | ||
377 | } | ||
378 | } | ||
379 | } | ||
380 | #endif // RLV_EXTENSION_STARTLOCATION | ||
381 | |||
382 | // ========================================================================= | ||
383 | // Various helper classes/timers/functors | ||
384 | // | ||
419 | 385 | ||
420 | BOOL RlvGCTimer::tick() | 386 | BOOL RlvGCTimer::tick() |
421 | { | 387 | { |
@@ -454,63 +420,84 @@ void RlvCurrentlyWorn::fetchWorn() | |||
454 | f.fetchItems(idItems); | 420 | f.fetchItems(idItems); |
455 | } | 421 | } |
456 | 422 | ||
457 | // ========================================================================= | 423 | // Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0f |
424 | bool RlvSelectHasLockedAttach::apply(LLSelectNode* pNode) | ||
425 | { | ||
426 | return (pNode->getObject()) ? !gRlvHandler.isDetachable(pNode->getObject()) : false; | ||
427 | } | ||
458 | 428 | ||
459 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h | 429 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0f |
460 | void RlvWLSnapshot::restoreSnapshot(const RlvWLSnapshot* pWLSnapshot) | 430 | bool RlvSelectIsOwnedByOrGroupOwned::apply(LLSelectNode* pNode) |
461 | { | 431 | { |
462 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | 432 | return (pNode->mPermissions->isGroupOwned()) || (pNode->mPermissions->getOwner() == m_idAgent); |
463 | if ( (pWLSnapshot) && (pWLParams) ) | ||
464 | { | ||
465 | pWLParams->mAnimator.mIsRunning = pWLSnapshot->fIsRunning; | ||
466 | pWLParams->mAnimator.mUseLindenTime = pWLSnapshot->fUseLindenTime; | ||
467 | pWLParams->mCurParams = pWLSnapshot->WLParams; | ||
468 | pWLParams->propagateParameters(); | ||
469 | } | ||
470 | } | 433 | } |
471 | 434 | ||
472 | // Checked: 2009-06-03 (RLVa-0.2.0h) | Added: RLVa-0.2.0h | 435 | // Checked: 2009-05-31 (RLVa-0.2.0f) | Modified: RLVa-0.2.0f |
473 | RlvWLSnapshot* RlvWLSnapshot::takeSnapshot() | 436 | bool RlvSelectIsSittingOn::apply(LLSelectNode* pNode) |
474 | { | 437 | { |
475 | RlvWLSnapshot* pWLSnapshot = NULL; | 438 | return (pNode->getObject()) && (pNode->getObject()->getRootEdit() == m_pObject); |
476 | LLWLParamManager* pWLParams = LLWLParamManager::instance(); | 439 | } |
477 | if (pWLParams) | 440 | |
441 | // ============================================================================ | ||
442 | // Various helper functions | ||
443 | // | ||
444 | |||
445 | // Checked: 2009-09-08 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c | ||
446 | BOOL rlvAttachToEnabler(void* pParam) | ||
447 | { | ||
448 | // Enables/disables an option on the "Attach to (HUD)" submenu depending on whether it is (un)detachable | ||
449 | return gRlvHandler.isDetachable((LLViewerJointAttachment*)pParam); | ||
450 | } | ||
451 | |||
452 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0g | ||
453 | bool rlvCanDeleteOrReturn() | ||
454 | { | ||
455 | bool fIsAllowed = true; | ||
456 | |||
457 | if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
478 | { | 458 | { |
479 | pWLSnapshot = new RlvWLSnapshot(); | 459 | // We'll allow if none of the prims are owned by the avie or group owned |
480 | pWLSnapshot->fIsRunning = pWLParams->mAnimator.mIsRunning; | 460 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); |
481 | pWLSnapshot->fUseLindenTime = pWLParams->mAnimator.mUseLindenTime; | 461 | RlvSelectIsOwnedByOrGroupOwned func(gAgent.getID()); |
482 | pWLSnapshot->WLParams = pWLParams->mCurParams; | 462 | if ( (handleSel.notNull()) && ((0 == handleSel->getRootObjectCount()) || (NULL != handleSel->getFirstRootNode(&func, FALSE))) ) |
463 | fIsAllowed = false; | ||
483 | } | 464 | } |
484 | return pWLSnapshot; | ||
485 | } | ||
486 | 465 | ||
487 | // ========================================================================= | 466 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) ) |
467 | { | ||
468 | // We'll allow if the avie isn't sitting on any of the selected objects | ||
469 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | ||
470 | RlvSelectIsSittingOn func(gAgent.getAvatarObject()->getRoot()); | ||
471 | if ( (handleSel.notNull()) && (handleSel->getFirstRootNode(&func, TRUE)) ) | ||
472 | fIsAllowed = false; | ||
473 | } | ||
488 | 474 | ||
489 | BOOL RlvSettings::fShowNameTags = FALSE; | 475 | return fIsAllowed; |
476 | } | ||
490 | 477 | ||
491 | #ifdef RLV_EXTENSION_STARTLOCATION | 478 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d |
492 | // Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1d | 479 | S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType::EType type) |
493 | void RlvSettings::updateLoginLastLocation() | 480 | { |
481 | S32 cntType = 0; | ||
482 | if (pFolder) | ||
494 | { | 483 | { |
495 | if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) | 484 | LLInventoryModel::cat_array_t* pFolders; |
485 | LLInventoryModel::item_array_t* pItems; | ||
486 | gInventory.getDirectDescendentsOf(pFolder->getUUID(), pFolders, pItems); | ||
487 | |||
488 | if (pItems) | ||
496 | { | 489 | { |
497 | BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || | 490 | for (S32 idxItem = 0, cntItem = pItems->count(); idxItem < cntItem; idxItem++) |
498 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && | 491 | if (pItems->get(idxItem)->getType() == type) |
499 | (gAgent.getAvatarObject()) && (!gAgent.getAvatarObject()->mIsSitting) ); | 492 | cntType++; |
500 | if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue) | ||
501 | { | ||
502 | gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue); | ||
503 | gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); | ||
504 | } | ||
505 | } | 493 | } |
506 | } | 494 | } |
507 | #endif // RLV_EXTENSION_STARTLOCATION | 495 | return cntType; |
508 | 496 | } | |
509 | // ========================================================================= | ||
510 | 497 | ||
511 | #ifdef RLV_ADVANCED_TOGGLE_RLVA | 498 | #ifdef RLV_ADVANCED_TOGGLE_RLVA |
512 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-1.0.0h | 499 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-1.0.0h |
513 | void rlvDbgToggleEnabled(void*) | 500 | void rlvToggleEnabled(void*) |
514 | { | 501 | { |
515 | gSavedSettings.setBOOL(RLV_SETTING_MAIN, !rlv_handler_t::isEnabled()); | 502 | gSavedSettings.setBOOL(RLV_SETTING_MAIN, !rlv_handler_t::isEnabled()); |
516 | 503 | ||
@@ -527,7 +514,7 @@ BOOL RlvSettings::fShowNameTags = FALSE; | |||
527 | #endif | 514 | #endif |
528 | } | 515 | } |
529 | // Checked: 2009-07-08 (RLVa-1.0.0e) | 516 | // Checked: 2009-07-08 (RLVa-1.0.0e) |
530 | BOOL rlvDbgGetEnabled(void*) | 517 | BOOL rlvGetEnabled(void*) |
531 | { | 518 | { |
532 | return rlv_handler_t::isEnabled(); | 519 | return rlv_handler_t::isEnabled(); |
533 | } | 520 | } |
@@ -569,7 +556,7 @@ void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLU | |||
569 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | 556 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e |
570 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply) | 557 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply) |
571 | { | 558 | { |
572 | if (!rlvIsValidChannel(nChannel)) | 559 | if (!rlvIsValidReplyChannel(nChannel)) |
573 | return false; | 560 | return false; |
574 | 561 | ||
575 | // Copy/paste from send_chat_from_viewer() | 562 | // Copy/paste from send_chat_from_viewer() |
@@ -672,3 +659,7 @@ std::string rlvGetLastParenthesisedText(const std::string& strText, std::string: | |||
672 | } | 659 | } |
673 | 660 | ||
674 | // ========================================================================= | 661 | // ========================================================================= |
662 | // Debug helper functions | ||
663 | // | ||
664 | |||
665 | // ========================================================================= | ||
diff --git a/linden/indra/newview/rlvhelper.h b/linden/indra/newview/rlvhelper.h index a0e040e..f36989b 100644 --- a/linden/indra/newview/rlvhelper.h +++ b/linden/indra/newview/rlvhelper.h | |||
@@ -7,263 +7,90 @@ | |||
7 | #include "llviewercontrol.h" | 7 | #include "llviewercontrol.h" |
8 | #include "llviewerobjectlist.h" | 8 | #include "llviewerobjectlist.h" |
9 | #include "llwlparamset.h" | 9 | #include "llwlparamset.h" |
10 | 10 | #include "rlvdefines.h" | |
11 | #include "rlvmultistringsearch.h" | ||
12 | 11 | ||
13 | // ============================================================================ | 12 | // ============================================================================ |
14 | // Extensions | 13 | // RlvCommand |
15 | // | 14 | // |
16 | 15 | ||
17 | // Comment out if you don't want the Advanced / RLVa menu (may prevent enabling some extensions or experimental features - see below) | ||
18 | #define RLV_ADVANCED_MENU | ||
19 | // Comment out if you provide your own way to enable/disable RLVa | ||
20 | #define RLV_ADVANCED_TOGGLE_RLVA | ||
21 | |||
22 | // Provides access to "advanced" feature through the RLVa debug menu | ||
23 | #define RLV_EXTENSION_ENABLE_WEAR // "Enable Wear" | ||
24 | #define RLV_EXTENSION_HIDELOCKED // "Hide locked layers", "Hide locked attachments" and "Hide locked inventory" | ||
25 | #define RLV_EXTENSION_FLOATER_RESTRICTIONS // Enables the Advanced / RLVa / Restrictions... floater | ||
26 | |||
27 | // Extensions | ||
28 | #define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx | ||
29 | #define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders:<option>=<channel> - @findfolder with multiple results | ||
30 | #define RLV_EXTENSION_FLAG_NOSTRIP // Layers and attachments marked as "nostrip" are exempt from @detach/@remoutfit | ||
31 | #define RLV_EXTENSION_STARTLOCATION // Reenables "Start Location" at login if not @tploc=n or @unsit=n restricted at last logoff | ||
32 | #define RLV_EXPERIMENTAL // Enables/disables experimental features en masse | ||
33 | |||
34 | // Experimental features | ||
35 | #ifdef RLV_EXPERIMENTAL | ||
36 | // Stable (will mature to RLV_EXTENSION_XXX in next release if no bugs are found) | ||
37 | #define RLV_EXPERIMENTAL_FARTOUCH_FEEDBACK // Enables "cleaner" UI responses when fartouch blocks something | ||
38 | |||
39 | // Under testing (stable, but requires further testing - safe for public release but may be quirky) | ||
40 | |||
41 | // Under development (don't include in public release) | ||
42 | #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
43 | #endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
44 | #endif // RLV_EXPERIMENTAL | ||
45 | |||
46 | // ============================================================================ | ||
47 | // Defines | ||
48 | // | ||
49 | |||
50 | // Version of the specifcation we support | ||
51 | const S32 RLV_VERSION_MAJOR = 1; | ||
52 | const S32 RLV_VERSION_MINOR = 20; | ||
53 | const S32 RLV_VERSION_PATCH = 0; | ||
54 | |||
55 | // Implementation version | ||
56 | const S32 RLVa_VERSION_MAJOR = 1; | ||
57 | const S32 RLVa_VERSION_MINOR = 0; | ||
58 | const S32 RLVa_VERSION_PATCH = 1; | ||
59 | const S32 RLVa_VERSION_BUILD = 7; | ||
60 | |||
61 | // The official viewer version we're patching against | ||
62 | #define RLV_MAKE_TARGET(x, y, z) ((x << 16) | (y << 8) | z) | ||
63 | #define RLV_TARGET RLV_MAKE_TARGET(1, 22, 11) | ||
64 | |||
65 | // Defining these makes it easier if we ever need to change our tag | ||
66 | #define RLV_WARNS LL_WARNS("RLV") | ||
67 | #define RLV_INFOS LL_INFOS("RLV") | ||
68 | #define RLV_DEBUGS LL_DEBUGS("RLV") | ||
69 | |||
70 | #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
71 | // Turn on extended debugging information | ||
72 | #define RLV_DEBUG | ||
73 | // Make sure we halt execution on errors | ||
74 | #define RLV_ERRS LL_ERRS("RLV") | ||
75 | // Uncomment to enable the Advanced / RLVa / Unit Tests menu (non-public) | ||
76 | //#define RLV_DEBUG_TESTS | ||
77 | #else | ||
78 | // Uncomment if you want extended debugging information on release builds | ||
79 | //#define RLV_DEBUG | ||
80 | // Don't halt execution on errors in release | ||
81 | #define RLV_ERRS LL_WARNS("RLV") | ||
82 | #endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | ||
83 | |||
84 | #define RLV_ROOT_FOLDER "#RLV" | ||
85 | #define RLV_CMD_PREFIX '@' | ||
86 | #define RLV_PUTINV_PREFIX "#RLV/~" | ||
87 | #define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90° with the rest of SL | ||
88 | |||
89 | #define RLV_FOLDER_FLAG_NOSTRIP "nostrip" | ||
90 | #define RLV_FOLDER_PREFIX_HIDDEN '.' | ||
91 | #define RLV_FOLDER_PREFIX_PUTINV '~' | ||
92 | |||
93 | // ============================================================================ | ||
94 | // Enumeration declarations | ||
95 | // | ||
96 | |||
97 | // NOTE: * any changes to this enumeration should be reflected in initLookupTable() | ||
98 | // * only uncomment the ones we actually use in a switch() to keep the size of the lookup table down | ||
99 | enum ERlvBehaviour { | ||
100 | RLV_BHVR_VERSION = 0, // "version" | ||
101 | RLV_BHVR_DETACH, // "detach" | ||
102 | // RLV_BHVR_SENDCHAT, // "sendchat" | ||
103 | // RLV_BHVR_EMOTE, // "emote" | ||
104 | // RLV_BHVR_CHATSHOUT, // "chatshout" | ||
105 | // RLV_BHVR_CHATNORMAL, // "chatnormal" | ||
106 | // RLV_BHVR_CHATWHISPER, // "chatwhisper" | ||
107 | RLV_BHVR_REDIRCHAT, // "redirchat" | ||
108 | RLV_BHVR_REDIREMOTE, // "rediremote" | ||
109 | RLV_BHVR_SENDIM, // "sendim" | ||
110 | RLV_BHVR_RECVCHAT, // "recvchat" | ||
111 | RLV_BHVR_RECVEMOTE, // "recvemote" | ||
112 | RLV_BHVR_RECVIM, // "recvim" | ||
113 | // RLV_BHVR_TPLM, // "tplm" | ||
114 | RLV_BHVR_TPLOC, // "tploc" | ||
115 | RLV_BHVR_TPLURE, // "tplure" | ||
116 | RLV_BHVR_SITTP, // "sittp" | ||
117 | // RLV_BHVR_CLEAR, // "clear" | ||
118 | RLV_BHVR_EDIT, // "edit" | ||
119 | RLV_BHVR_REZ, // "rez" | ||
120 | RLV_BHVR_ADDOUTFIT, // "addoutfit" | ||
121 | RLV_BHVR_REMOUTFIT, // "remoutfit" | ||
122 | RLV_BHVR_GETOUTFIT, // "getoutfit" | ||
123 | RLV_BHVR_GETATTACH, // "getattach" | ||
124 | RLV_BHVR_SHOWINV, // "showinv" | ||
125 | // RLV_BHVR_VIEWNOTE, // "viewnote" | ||
126 | RLV_BHVR_UNSIT, // "unsit" | ||
127 | RLV_BHVR_SIT, // "sit" | ||
128 | // RLV_BHVR_SENDCHANNEL, // "sendchannel" | ||
129 | RLV_BHVR_GETSTATUS, // "getstatus" | ||
130 | RLV_BHVR_GETSTATUSALL, // "getstatusall" | ||
131 | RLV_BHVR_GETINV, // "getinv" | ||
132 | RLV_BHVR_GETINVWORN, // "getinvworn" | ||
133 | RLV_BHVR_FINDFOLDER, // "findfolder" | ||
134 | RLV_BHVR_FINDFOLDERS, // "findfolders" | ||
135 | RLV_BHVR_ATTACH, // "attach" | ||
136 | RLV_BHVR_ATTACHALL, // "attachall" | ||
137 | RLV_BHVR_DETACHALL, // "detachall" | ||
138 | RLV_BHVR_GETPATH, // "getpath" | ||
139 | RLV_BHVR_ATTACHTHIS, // "attachthis" | ||
140 | RLV_BHVR_ATTACHALLTHIS, // "attachallthis" | ||
141 | RLV_BHVR_DETACHTHIS, // "detachthis" | ||
142 | RLV_BHVR_DETACHALLTHIS, // "detachallthis" | ||
143 | RLV_BHVR_FARTOUCH, // "fartouch" | ||
144 | RLV_BHVR_SHOWWORLDMAP, // "showworldmap" | ||
145 | RLV_BHVR_SHOWMINIMAP, // "showminimap" | ||
146 | RLV_BHVR_SHOWLOC, // "showloc" | ||
147 | RLV_BHVR_TPTO, // "tpto" | ||
148 | RLV_BHVR_ACCEPTTP, // "accepttp" | ||
149 | RLV_BHVR_SHOWNAMES, // "shownames" | ||
150 | RLV_BHVR_FLY, // "fly" | ||
151 | RLV_BHVR_GETSITID, // "getsitid" | ||
152 | RLV_BHVR_SETDEBUG, // "setdebug" | ||
153 | RLV_BHVR_SETENV, // "setenv" | ||
154 | RLV_BHVR_DETACHME, // "detachme" | ||
155 | RLV_BHVR_SHOWHOVERTEXTALL, // "showhovertextall" | ||
156 | RLV_BHVR_SHOWHOVERTEXTWORLD, // "showhovertextworld" | ||
157 | RLV_BHVR_SHOWHOVERTEXTHUD, // "showhovertexthud" | ||
158 | RLV_BHVR_SHOWHOVERTEXT, // "showhovertext" | ||
159 | RLV_BHVR_NOTIFY, // "notify" | ||
160 | |||
161 | RLV_BHVR_COUNT, | ||
162 | RLV_BHVR_UNKNOWN | ||
163 | }; | ||
164 | |||
165 | enum ERlvParamType { | ||
166 | RLV_TYPE_UNKNOWN, | ||
167 | RLV_TYPE_ADD, // <param> == "n"|"add" | ||
168 | RLV_TYPE_REMOVE, // <param> == "y"|"rem" | ||
169 | RLV_TYPE_FORCE, // <param> == "force" | ||
170 | RLV_TYPE_REPLY // <param> == <number> | ||
171 | }; | ||
172 | |||
173 | enum ERlvCmdRet { | ||
174 | RLV_RET_NOERROR, // Command executed succesfully | ||
175 | RLV_RET_RETAINED, // Command was retained | ||
176 | RLV_RET_FAILED, // Command failed (general failure) | ||
177 | RLV_RET_FAILED_SYNTAX, // Command failed (syntax error) | ||
178 | RLV_RET_FAILED_UNSET, // Command failed (unset restriction) | ||
179 | RLV_RET_FAILED_DUPLICATE, // Command failed (duplicate) | ||
180 | RLV_RET_FAILED_OPTION, // Command failed (invalid option) | ||
181 | RLV_RET_UNKNOWN // Command unkown | ||
182 | }; | ||
183 | |||
184 | // ============================================================================ | ||
185 | /* | ||
186 | * RlvCommand | ||
187 | * ========== | ||
188 | * Encapsulates an "RLV command" (duh :p) | ||
189 | * | ||
190 | */ | ||
191 | |||
192 | class RlvCommand | 16 | class RlvCommand |
193 | { | 17 | { |
194 | public: | 18 | public: |
195 | /* | ||
196 | * Constructors | ||
197 | */ | ||
198 | explicit RlvCommand(const std::string& strCommand); | 19 | explicit RlvCommand(const std::string& strCommand); |
199 | RlvCommand(const RlvCommand& rlvCmd); | ||
200 | 20 | ||
201 | /* | 21 | /* |
202 | * Accessors | 22 | * Member functions |
203 | */ | 23 | */ |
204 | BOOL isValid() const { return m_fValid; } | 24 | public: |
25 | std::string asString() const; | ||
26 | const std::string& getBehaviour() const { return m_strBehaviour; } | ||
27 | ERlvBehaviour getBehaviourType() const { return m_eBehaviour; } | ||
28 | const std::string& getOption() const { return m_strOption; } | ||
29 | const std::string& getParam() const { return m_strParam; } | ||
30 | ERlvParamType getParamType() const { return m_eParamType; } | ||
31 | bool isValid() const { return m_fValid; } | ||
205 | 32 | ||
206 | const std::string& getBehaviour() const { return m_strBehaviour; } | 33 | static ERlvBehaviour getBehaviourFromString(const std::string& strBhvr); |
207 | ERlvBehaviour getBehaviourType() const { return m_eBehaviour; } | 34 | static const std::string& getStringFromBehaviour(ERlvBehaviour eBhvr); |
208 | const std::string& getOption() const { return m_strOption; } | ||
209 | const std::string& getParam() const { return m_strParam; } | ||
210 | ERlvParamType getParamType() const { return m_eParamType; } | ||
211 | 35 | ||
212 | std::string asString() const; | 36 | static void initLookupTable(); |
37 | protected: | ||
38 | static bool parseCommand(const std::string& strCommand, std::string& strBehaviour, std::string& strOption, std::string& strParam); | ||
213 | 39 | ||
214 | /* | 40 | /* |
215 | * Operators | 41 | * Operators |
216 | */ | 42 | */ |
43 | public: | ||
217 | bool operator ==(const RlvCommand&) const; | 44 | bool operator ==(const RlvCommand&) const; |
218 | 45 | ||
219 | // Parses an RLV command into its "tokens" | ||
220 | static BOOL parseCommand(/*[in]*/ const std::string& strCommand, | ||
221 | /*[out]*/ std::string& strBehaviour, /*[out]*/ std::string& strOption, /*[out]*/ std::string& strParam); | ||
222 | static void initLookupTable(); | ||
223 | |||
224 | /* | 46 | /* |
225 | * Member variables | 47 | * Member variables |
226 | */ | 48 | */ |
227 | protected: | 49 | protected: |
228 | BOOL m_fValid; | 50 | bool m_fValid; |
229 | std::string m_strBehaviour; | 51 | std::string m_strBehaviour; |
230 | ERlvBehaviour m_eBehaviour; | 52 | ERlvBehaviour m_eBehaviour; |
231 | std::string m_strOption; | 53 | std::string m_strOption; |
232 | std::string m_strParam; | 54 | std::string m_strParam; |
233 | ERlvParamType m_eParamType; | 55 | ERlvParamType m_eParamType; |
234 | 56 | ||
235 | static RlvMultiStringSearch m_BhvrLookup; | 57 | typedef std::map<std::string, ERlvBehaviour> RlvBhvrTable; |
58 | static RlvBhvrTable m_BhvrMap; | ||
59 | |||
236 | friend class RlvHandler; | 60 | friend class RlvHandler; |
237 | }; | 61 | }; |
62 | typedef std::list<RlvCommand> rlv_command_list_t; | ||
238 | 63 | ||
239 | // ============================================================================ | 64 | // ============================================================================ |
240 | /* | 65 | // RlvObject |
241 | * RlvObject | 66 | // |
242 | * ========= | ||
243 | * Encapsulates an "RLV Object" (= an object that has issued an RLV command) | ||
244 | * | ||
245 | */ | ||
246 | |||
247 | typedef std::list<RlvCommand> rlv_command_list_t; | ||
248 | 67 | ||
249 | class RlvObject | 68 | class RlvObject |
250 | { | 69 | { |
251 | public: | 70 | public: |
252 | RlvObject(const LLUUID& uuid) : m_UUID(uuid), m_nLookupMisses(0) { m_fLookup = (NULL != gObjectList.findObject(uuid)); } | 71 | RlvObject(const LLUUID& idObj); |
253 | 72 | ||
254 | BOOL addCommand(const RlvCommand& rlvCmd); | 73 | /* |
255 | BOOL removeCommand(const RlvCommand& rlvCmd); | 74 | * Member functions |
256 | 75 | */ | |
257 | BOOL hasBehaviour(ERlvBehaviour eBehaviour) const; | 76 | public: |
258 | BOOL hasBehaviour(const std::string& strBehaviour) const; | 77 | bool addCommand(const RlvCommand& rlvCmd); |
259 | BOOL hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const; | 78 | bool removeCommand(const RlvCommand& rlvCmd); |
260 | BOOL hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const; | ||
261 | 79 | ||
262 | std::string getStatusString(const std::string& strMatch) const; | 80 | std::string getStatusString(const std::string& strMatch) const; |
81 | bool hasBehaviour(ERlvBehaviour eBehaviour) const; | ||
82 | bool hasBehaviour(const std::string& strBehaviour) const; | ||
83 | bool hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption) const; | ||
84 | bool hasBehaviour(const std::string& strBehaviour, const std::string& strOption) const; | ||
263 | 85 | ||
264 | const rlv_command_list_t* getCommandList() const { return &m_Commands; } | 86 | const rlv_command_list_t* getCommandList() const { return &m_Commands; } |
87 | |||
88 | /* | ||
89 | * Member variables | ||
90 | */ | ||
265 | protected: | 91 | protected: |
266 | LLUUID m_UUID; // The object's UUID | 92 | LLUUID m_UUID; // The object's UUID |
93 | S32 m_idxAttachPt; // The object's attachment point (or 0 if it's not an attachment) | ||
267 | bool m_fLookup; // TRUE if the object existed in gObjectList at one point in time | 94 | bool m_fLookup; // TRUE if the object existed in gObjectList at one point in time |
268 | S16 m_nLookupMisses; // Count of unsuccessful lookups in gObjectList by the GC | 95 | S16 m_nLookupMisses; // Count of unsuccessful lookups in gObjectList by the GC |
269 | rlv_command_list_t m_Commands; // List of behaviours held by this object (in the order they were received) | 96 | rlv_command_list_t m_Commands; // List of behaviours held by this object (in the order they were received) |
@@ -272,23 +99,24 @@ protected: | |||
272 | }; | 99 | }; |
273 | 100 | ||
274 | // ============================================================================ | 101 | // ============================================================================ |
275 | /* | 102 | // RlvCriteriaCategoryCollector - Criteria based folder matching filter used by @findfolder and @findfolders |
276 | * RlvCriteriaCategoryCollector | 103 | // |
277 | * ============================ | ||
278 | * Criteria based folder matching filter used by @findfolder and @findfolders | ||
279 | * | ||
280 | */ | ||
281 | 104 | ||
282 | class RlvCriteriaCategoryCollector : public LLInventoryCollectFunctor | 105 | class RlvCriteriaCategoryCollector : public LLInventoryCollectFunctor |
283 | { | 106 | { |
284 | public: | 107 | public: |
285 | RlvCriteriaCategoryCollector(const std::string& strCriteria) | 108 | RlvCriteriaCategoryCollector(const std::string& strCriteria) |
286 | { | 109 | { |
287 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer; | 110 | std::string::size_type idxIt, idxLast = 0; |
288 | boost::char_separator<char> sep("&&", "", boost::drop_empty_tokens); | 111 | while (idxLast < strCriteria.length()) |
289 | tokenizer tokens(strCriteria, sep); | 112 | { |
290 | for (tokenizer::iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken) | 113 | idxIt = strCriteria.find("&&", idxLast); |
291 | m_Criteria.push_back(*itToken); | 114 | if (std::string::npos == idxIt) |
115 | idxIt = strCriteria.length(); | ||
116 | if (idxIt != idxLast) | ||
117 | m_Criteria.push_back(strCriteria.substr(idxLast, idxIt - idxLast)); | ||
118 | idxLast = idxIt + 2; | ||
119 | } | ||
292 | } | 120 | } |
293 | virtual ~RlvCriteriaCategoryCollector() {} | 121 | virtual ~RlvCriteriaCategoryCollector() {} |
294 | 122 | ||
@@ -304,7 +132,7 @@ public: | |||
304 | return false; | 132 | return false; |
305 | 133 | ||
306 | for (std::list<std::string>::const_iterator itCrit = m_Criteria.begin(); itCrit != m_Criteria.end(); ++itCrit) | 134 | for (std::list<std::string>::const_iterator itCrit = m_Criteria.begin(); itCrit != m_Criteria.end(); ++itCrit) |
307 | if (-1 == strFolderName.find(*itCrit)) // Return false on the first mismatch | 135 | if (std::string::npos == strFolderName.find(*itCrit)) // Return false on the first mismatch |
308 | return false; | 136 | return false; |
309 | return true; | 137 | return true; |
310 | } | 138 | } |
@@ -314,12 +142,8 @@ protected: | |||
314 | }; | 142 | }; |
315 | 143 | ||
316 | // ============================================================================ | 144 | // ============================================================================ |
317 | /* | 145 | // RlvWearableItemCollector - Inventory item filter used by attach/detach/attachall/detachall/getinvworn |
318 | * RlvWearableItemCollector | 146 | // |
319 | * ======================== | ||
320 | * Inventory item filter used by attach/detach/attachall/detachall/getinvworn (also used by "Add/Replace Outfit" and "Take Off Items") | ||
321 | * | ||
322 | */ | ||
323 | 147 | ||
324 | class RlvWearableItemCollector : public LLInventoryCollectFunctor | 148 | class RlvWearableItemCollector : public LLInventoryCollectFunctor |
325 | { | 149 | { |
@@ -349,11 +173,8 @@ protected: | |||
349 | }; | 173 | }; |
350 | 174 | ||
351 | // ============================================================================ | 175 | // ============================================================================ |
352 | /* | 176 | // RlvRetainedCommand |
353 | * RlvRetainedCommand | 177 | // |
354 | * ================== | ||
355 | * | ||
356 | */ | ||
357 | 178 | ||
358 | struct RlvRetainedCommand | 179 | struct RlvRetainedCommand |
359 | { | 180 | { |
@@ -369,11 +190,8 @@ private: | |||
369 | typedef std::list<RlvRetainedCommand> rlv_retained_list_t; | 190 | typedef std::list<RlvRetainedCommand> rlv_retained_list_t; |
370 | 191 | ||
371 | // ============================================================================ | 192 | // ============================================================================ |
372 | /* | 193 | // RlvWLSnapshot |
373 | * RlvWLSnapshot | 194 | // |
374 | * ============= | ||
375 | * | ||
376 | */ | ||
377 | 195 | ||
378 | struct RlvWLSnapshot | 196 | struct RlvWLSnapshot |
379 | { | 197 | { |
@@ -389,24 +207,8 @@ private: | |||
389 | }; | 207 | }; |
390 | 208 | ||
391 | // ============================================================================ | 209 | // ============================================================================ |
392 | /* | 210 | // RlvSettings |
393 | * RlvSettings | 211 | // |
394 | * =========== | ||
395 | * | ||
396 | */ | ||
397 | |||
398 | #define RLV_SETTING_MAIN "RestrainedLife" | ||
399 | #define RLV_SETTING_DEBUG "RestrainedLifeDebug" | ||
400 | #define RLV_SETTING_NOSETENV "RestrainedLifeNoSetEnv" | ||
401 | #define RLV_SETTING_FORBIDGIVETORLV "RestrainedLifeForbidGiveToRLV" | ||
402 | |||
403 | #define RLV_SETTING_ENABLEWEAR "RLVaEnableWear" | ||
404 | #define RLV_SETTING_ENABLELEGACYNAMING "RLVaEnableLegacyNaming" | ||
405 | #define RLV_SETTING_HIDELOCKEDLAYER "RLVaHideLockedLayers" | ||
406 | #define RLV_SETTING_HIDELOCKEDATTACH "RLVaHideLockedAttachments" | ||
407 | #define RLV_SETTING_HIDELOCKEDINVENTORY "RLVaHideLockedInventory" | ||
408 | #define RLV_SETTING_LOGINLASTLOCATION "RLVaLoginLastLocation" | ||
409 | #define RLV_SETTING_SHOWNAMETAGS "RLVaShowNameTags" | ||
410 | 212 | ||
411 | inline BOOL rlvGetSettingBOOL(const std::string& strSetting, BOOL fDefault) | 213 | inline BOOL rlvGetSettingBOOL(const std::string& strSetting, BOOL fDefault) |
412 | { | 214 | { |
@@ -427,6 +229,7 @@ public: | |||
427 | static BOOL getHideLockedLayers() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDLAYER, FALSE); } | 229 | static BOOL getHideLockedLayers() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDLAYER, FALSE); } |
428 | static BOOL getHideLockedAttach() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDATTACH, FALSE); } | 230 | static BOOL getHideLockedAttach() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDATTACH, FALSE); } |
429 | static BOOL getHideLockedInventory() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDINVENTORY, FALSE); } | 231 | static BOOL getHideLockedInventory() { return rlvGetSettingBOOL(RLV_SETTING_HIDELOCKEDINVENTORY, FALSE); } |
232 | static BOOL getShowNameTags() { return fShowNameTags; } | ||
430 | 233 | ||
431 | #ifdef RLV_EXTENSION_STARTLOCATION | 234 | #ifdef RLV_EXTENSION_STARTLOCATION |
432 | static BOOL getLoginLastLocation() { return rlvGetPerUserSettingsBOOL(RLV_SETTING_LOGINLASTLOCATION, TRUE); } | 235 | static BOOL getLoginLastLocation() { return rlvGetPerUserSettingsBOOL(RLV_SETTING_LOGINLASTLOCATION, TRUE); } |
@@ -437,34 +240,12 @@ public: | |||
437 | }; | 240 | }; |
438 | 241 | ||
439 | // ============================================================================ | 242 | // ============================================================================ |
440 | /* | 243 | // State keeping classes/structure |
441 | * State keeping classes/structure | 244 | // |
442 | * | ||
443 | */ | ||
444 | |||
445 | struct RlvRedirInfo | ||
446 | { | ||
447 | S16 nRedirChat; | ||
448 | S16 nRedirEmote; | ||
449 | |||
450 | RlvRedirInfo() : nRedirChat(0), nRedirEmote(0) {} | ||
451 | bool isActive() { return (nRedirChat + nRedirEmote) != 0; } | ||
452 | }; | ||
453 | |||
454 | struct RlvReattachInfo | ||
455 | { | ||
456 | LLUUID idItem; | ||
457 | bool fInInventory; | ||
458 | bool fAssetSaved; | ||
459 | |||
460 | RlvReattachInfo() : idItem(), fInInventory(false), fAssetSaved(false) {} | ||
461 | }; | ||
462 | 245 | ||
463 | // ============================================================================ | 246 | // ============================================================================ |
464 | /* | 247 | // Various helper classes/timers/functors |
465 | * Various helper classes/timers/functors | 248 | // |
466 | * | ||
467 | */ | ||
468 | 249 | ||
469 | class RlvGCTimer : public LLEventTimer | 250 | class RlvGCTimer : public LLEventTimer |
470 | { | 251 | { |
@@ -504,16 +285,14 @@ struct RlvSelectIsSittingOn : public LLSelectedNodeFunctor | |||
504 | }; | 285 | }; |
505 | 286 | ||
506 | // ============================================================================ | 287 | // ============================================================================ |
507 | /* | 288 | // Various helper functions |
508 | * Various helper functions | 289 | // |
509 | * | ||
510 | */ | ||
511 | 290 | ||
512 | BOOL rlvAttachToEnabler(void* pParam); | 291 | BOOL rlvAttachToEnabler(void* pParam); |
513 | bool rlvCanDeleteOrReturn(); | 292 | bool rlvCanDeleteOrReturn(); |
514 | S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType::EType type); | 293 | S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType::EType type); |
515 | bool rlvIsEmote(const std::string& strUTF8Text); | 294 | bool rlvIsEmote(const std::string& strUTF8Text); |
516 | bool rlvIsValidChannel(S32 nChannel); | 295 | bool rlvIsValidReplyChannel(S32 nChannel); |
517 | bool rlvIsWearingItem(const LLInventoryItem* pItem); | 296 | bool rlvIsWearingItem(const LLInventoryItem* pItem); |
518 | 297 | ||
519 | void rlvForceDetach(LLViewerJointAttachment* pAttachPt); | 298 | void rlvForceDetach(LLViewerJointAttachment* pAttachPt); |
@@ -521,20 +300,33 @@ void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLU | |||
521 | bool rlvSendChatReply(const std::string& strChannel, const std::string& strReply); | 300 | bool rlvSendChatReply(const std::string& strChannel, const std::string& strReply); |
522 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply); | 301 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply); |
523 | 302 | ||
524 | void rlvStringReplace(std::string& strText, std::string strFrom, const std::string& strTo); | ||
525 | std::string rlvGetFirstParenthesisedText(const std::string& strText, std::string::size_type* pidxMatch = NULL); | 303 | std::string rlvGetFirstParenthesisedText(const std::string& strText, std::string::size_type* pidxMatch = NULL); |
526 | std::string rlvGetLastParenthesisedText(const std::string& strText, std::string::size_type* pidxStart = NULL); | 304 | std::string rlvGetLastParenthesisedText(const std::string& strText, std::string::size_type* pidxStart = NULL); |
305 | void rlvStringReplace(std::string& strText, std::string strFrom, const std::string& strTo); | ||
527 | 306 | ||
528 | #ifdef RLV_ADVANCED_TOGGLE_RLVA | 307 | #ifdef RLV_ADVANCED_TOGGLE_RLVA |
529 | // "Advanced / RLVa / Enable RLV" menu option | 308 | // "Advanced / RLVa / Enable RLV" menu option |
530 | void rlvDbgToggleEnabled(void*); | 309 | void rlvToggleEnabled(void*); |
531 | BOOL rlvDbgGetEnabled(void*); | 310 | BOOL rlvGetEnabled(void*); |
532 | #endif // RLV_ADVANCED_TOGGLE_RLVA | 311 | #endif // RLV_ADVANCED_TOGGLE_RLVA |
533 | 312 | ||
534 | // ============================================================================ | 313 | // ============================================================================ |
314 | // Debug helper functions | ||
315 | // | ||
316 | |||
317 | // ============================================================================ | ||
535 | // Inlined class member functions | 318 | // Inlined class member functions |
536 | // | 319 | // |
537 | 320 | ||
321 | // Checked: 2009-09-19 (RLVa-1.0.3d) | ||
322 | inline std::string RlvCommand::asString() const | ||
323 | { | ||
324 | // NOTE: @clear=<param> should be represented as clear:<param> | ||
325 | return (m_eParamType != RLV_TYPE_CLEAR) | ||
326 | ? (!m_strOption.empty()) ? (std::string(m_strBehaviour)).append(":").append(m_strOption) : (std::string(m_strBehaviour)) | ||
327 | : (!m_strParam.empty()) ? (std::string(m_strBehaviour)).append(":").append(m_strParam) : (std::string(m_strBehaviour)); | ||
328 | } | ||
329 | |||
538 | inline bool RlvCommand::operator ==(const RlvCommand& rhs) const | 330 | inline bool RlvCommand::operator ==(const RlvCommand& rhs) const |
539 | { | 331 | { |
540 | // The specification notes that "@detach=n" is semantically identical to "@detach=add" (same for "y" and "rem" | 332 | // The specification notes that "@detach=n" is semantically identical to "@detach=add" (same for "y" and "rem" |
@@ -561,10 +353,10 @@ inline bool rlvIsEmote(const std::string& strUTF8Text) | |||
561 | return (strUTF8Text.length() > 4) && ( (strUTF8Text.compare(0, 4, "/me ") == 0) || (strUTF8Text.compare(0, 4, "/me'") == 0) ); | 353 | return (strUTF8Text.length() > 4) && ( (strUTF8Text.compare(0, 4, "/me ") == 0) || (strUTF8Text.compare(0, 4, "/me'") == 0) ); |
562 | } | 354 | } |
563 | 355 | ||
564 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.0e | 356 | // Checked: 2009-09-05 (RLVa-1.0.2a) | Added: RLVa-1.0.2a |
565 | inline bool rlvIsValidChannel(S32 nChannel) | 357 | inline bool rlvIsValidReplyChannel(S32 nChannel) |
566 | { | 358 | { |
567 | return (nChannel >= 0) && (CHAT_CHANNEL_DEBUG != nChannel); | 359 | return (nChannel > 0) && (CHAT_CHANNEL_DEBUG != nChannel); |
568 | } | 360 | } |
569 | 361 | ||
570 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.0e | 362 | // Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.0e |
diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 8f0fc29..b90f8aa 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml | |||
@@ -162,7 +162,9 @@ | |||
162 | <MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color --> | 162 | <MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color --> |
163 | <MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color --> | 163 | <MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color --> |
164 | <MapMuted value="128, 128, 128, 255" /> <!-- Muted avatars' glyph color --> | 164 | <MapMuted value="128, 128, 128, 255" /> <!-- Muted avatars' glyph color --> |
165 | <MapSelected value="255, 0, 0, 255" /> <!-- Selected avatars' glyph color --> | 165 | <MapSelected value="255, 0, 0, 255" /> <!-- Selected avatars' glyph color --> |
166 | <MapImpDev value="90, 45, 101, 255" /> <!-- Imprudence developers glyph color --> | ||
167 | <MapPartner value="214, 40, 107, 255" /> <!-- (unused) Your avatar's partner's glyph color --> | ||
166 | 168 | ||
167 | <!-- MINI-MAP --> | 169 | <!-- MINI-MAP --> |
168 | <NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background --> | 170 | <NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background --> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index acac138..edfe62c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml | |||
@@ -5093,7 +5093,37 @@ Would you like to visit the Second Life website to set this up? | |||
5093 | </message> | 5093 | </message> |
5094 | </alert> | 5094 | </alert> |
5095 | 5095 | ||
5096 | <alert modal="true" name="ConfirmTeleportHome"> | 5096 | <alert modal="true" name="ConfirmAutoPilot"> |
5097 | <message name="message"> | ||
5098 | Are you sure you want to move here? | ||
5099 | </message> | ||
5100 | <ignore name="ignore"> | ||
5101 | When using auto-pilot | ||
5102 | </ignore> | ||
5103 | <option name="Move"> | ||
5104 | Move | ||
5105 | </option> | ||
5106 | <option name="Cancel"> | ||
5107 | Cancel | ||
5108 | </option> | ||
5109 | </alert> | ||
5110 | |||
5111 | <alert modal="true" name="ConfirmDoubleClickTP"> | ||
5112 | <message name="message"> | ||
5113 | Are you sure you want to teleport here? | ||
5114 | </message> | ||
5115 | <ignore name="ignore"> | ||
5116 | When double-click teleporting | ||
5117 | </ignore> | ||
5118 | <option name="Teleport"> | ||
5119 | Teleport | ||
5120 | </option> | ||
5121 | <option name="Cancel"> | ||
5122 | Cancel | ||
5123 | </option> | ||
5124 | </alert> | ||
5125 | |||
5126 | <alert modal="true" name="ConfirmTeleportHome"> | ||
5097 | <message name="message"> | 5127 | <message name="message"> |
5098 | Are you sure you want to teleport home? | 5128 | Are you sure you want to teleport home? |
5099 | </message> | 5129 | </message> |
@@ -5192,5 +5222,22 @@ WARNING: Don't restore if you aren't sure where the object will go! | |||
5192 | </option> | 5222 | </option> |
5193 | </alert> | 5223 | </alert> |
5194 | 5224 | ||
5225 | <!-- [RLVa:KB] --> | ||
5226 | <alert modal="true" name="FirstRLVGiveToRLV"> | ||
5227 | <message name="message"> | ||
5228 | Folders starting with '#RLV/~' can automatically be placed under your #RLV shared folder after you accept the inventory offer. | ||
5229 | |||
5230 | Please note that - if enabled - the accepted inventory items will instantly be available to scripts and will have full use of the RLV API which may cause unexpected or undesirable situations. | ||
5231 | |||
5232 | Do you want to enable this feature? | ||
5233 | </message> | ||
5234 | <option name="Yes"> | ||
5235 | Yes | ||
5236 | </option> | ||
5237 | <option name="No"> | ||
5238 | No | ||
5239 | </option> | ||
5240 | </alert> | ||
5241 | <!-- [/RLVa:KB] --> | ||
5195 | </alerts> | 5242 | </alerts> |
5196 | 5243 | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml b/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml index 09c4f31..fe04ad3 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml | |||
@@ -1,11 +1,11 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" |
3 | can_resize="true" height="570" min_height="570" min_width="780" | 3 | can_resize="true" height="590" min_height="590" min_width="780" |
4 | name="directory" rect_control="FloaterFindRect2" title="Search Second Life" | 4 | name="directory" rect_control="FloaterFindRect2" title="Search Second Life" |
5 | width="780"> | 5 | width="780"> |
6 | <tab_container bottom="-570" follows="left|top|right|bottom" height="550" left="0" | 6 | <tab_container bottom="-590" follows="left|top|right|bottom" height="570" left="0" |
7 | mouse_opaque="false" name="Directory Tabs" tab_position="top" width="780"> | 7 | mouse_opaque="false" name="Directory Tabs" tab_position="top" width="780"> |
8 | <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" | 8 | <panel border="true" bottom="-569" follows="left|top|right|bottom" height="553" |
9 | label="All" left="1" mouse_opaque="false" name="find_all_panel" width="778"> | 9 | label="All" left="1" mouse_opaque="false" name="find_all_panel" width="778"> |
10 | <string name="searching_text"> | 10 | <string name="searching_text"> |
11 | Searching... | 11 | Searching... |
@@ -67,7 +67,7 @@ | |||
67 | </string> | 67 | </string> |
68 | <string name="default_search_page">"http://secondlife.com/app/search/index.php?"</string> | 68 | <string name="default_search_page">"http://secondlife.com/app/search/index.php?"</string> |
69 | </panel> | 69 | </panel> |
70 | <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" | 70 | <panel border="true" bottom="-569" follows="left|top|right|bottom" height="553" |
71 | label="Classifieds" left="1" left_delta="68" mouse_opaque="false" | 71 | label="Classifieds" left="1" left_delta="68" mouse_opaque="false" |
72 | name="classified_panel" width="778"> | 72 | name="classified_panel" width="778"> |
73 | <button bottom="-533" follows="left|bottom" font="SansSerif" halign="center" | 73 | <button bottom="-533" follows="left|bottom" font="SansSerif" halign="center" |
@@ -140,7 +140,7 @@ | |||
140 | <button bottom="-533" follows="left|bottom" font="SansSerif" halign="center" | 140 | <button bottom="-533" follows="left|bottom" font="SansSerif" halign="center" |
141 | height="20" label="Delete" label_selected="Delete" left="80" | 141 | height="20" label="Delete" label_selected="Delete" left="80" |
142 | mouse_opaque="true" name="Delete" width="80" /> | 142 | mouse_opaque="true" name="Delete" width="80" /> |
143 | <scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true" draw_heading="true" follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true" | 143 | <scroll_list background_visible="true" bottom="-533" column_padding="0" draw_border="true" draw_heading="true" follows="left|top|right|bottom" height="484" left="4" mouse_opaque="true" |
144 | multi_select="false" name="results" search_column="2" width="339"> | 144 | multi_select="false" name="results" search_column="2" width="339"> |
145 | <column label="" name="icon" width="24" /> | 145 | <column label="" name="icon" width="24" /> |
146 | <column label="" name="type" width="-1" /> | 146 | <column label="" name="type" width="-1" /> |
@@ -152,8 +152,8 @@ | |||
152 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" | 152 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" |
153 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> | 153 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> |
154 | </panel> | 154 | </panel> |
155 | <panel border="true" bottom="-549" default_tab_group="1" | 155 | <panel border="true" bottom="-569" default_tab_group="1" |
156 | follows="left|top|right|bottom" height="533" label="Events" left="1" | 156 | follows="left|top|right|bottom" height="553" label="Events" left="1" |
157 | mouse_opaque="false" name="events_panel" width="778"> | 157 | mouse_opaque="false" name="events_panel" width="778"> |
158 | <string name="searching_text"> | 158 | <string name="searching_text"> |
159 | Searching... | 159 | Searching... |
@@ -251,8 +251,8 @@ | |||
251 | <button bottom="-533" follows="left|bottom" font="SansSerif" halign="center" | 251 | <button bottom="-533" follows="left|bottom" font="SansSerif" halign="center" |
252 | height="20" label="Delete" label_selected="Delete" left="80" | 252 | height="20" label="Delete" label_selected="Delete" left="80" |
253 | mouse_opaque="true" name="Delete" width="80" /> | 253 | mouse_opaque="true" name="Delete" width="80" /> |
254 | <scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true" draw_heading="true" | 254 | <scroll_list background_visible="true" bottom="-533" column_padding="0" draw_border="true" draw_heading="true" |
255 | follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true" | 255 | follows="left|top|right|bottom" height="484" left="4" mouse_opaque="true" |
256 | multi_select="false" name="results" search_column="2" width="339"> | 256 | multi_select="false" name="results" search_column="2" width="339"> |
257 | <column label="" name="icon" width="24" /> | 257 | <column label="" name="icon" width="24" /> |
258 | <column label="" name="type" width="-1" /> | 258 | <column label="" name="type" width="-1" /> |
@@ -272,7 +272,7 @@ | |||
272 | height="20" label="< Prev" label_selected="< Prev" | 272 | height="20" label="< Prev" label_selected="< Prev" |
273 | mouse_opaque="true" name="< Prev" right="258" width="80" /> | 273 | mouse_opaque="true" name="< Prev" right="258" width="80" /> |
274 | </panel> | 274 | </panel> |
275 | <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" | 275 | <panel border="true" bottom="-569" follows="left|top|right|bottom" height="553" |
276 | label="Showcase" left="1" mouse_opaque="false" name="showcase_panel" | 276 | label="Showcase" left="1" mouse_opaque="false" name="showcase_panel" |
277 | width="778"> | 277 | width="778"> |
278 | <string name="searching_text">Searching...</string> | 278 | <string name="searching_text">Searching...</string> |
@@ -304,7 +304,7 @@ | |||
304 | <string name="redirect_404_url">http://secondlife.com/app/search/notfound.html</string> | 304 | <string name="redirect_404_url">http://secondlife.com/app/search/notfound.html</string> |
305 | <string name="default_search_page">"http://secondlife.com/app/showcase/index.php?"</string> | 305 | <string name="default_search_page">"http://secondlife.com/app/showcase/index.php?"</string> |
306 | </panel> | 306 | </panel> |
307 | <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" | 307 | <panel border="true" bottom="-569" follows="left|top|right|bottom" height="553" |
308 | label="Land Sales" left="1" mouse_opaque="false" name="land_sales_panel" | 308 | label="Land Sales" left="1" mouse_opaque="false" name="land_sales_panel" |
309 | width="778"> | 309 | width="778"> |
310 | <string name="searching_text"> | 310 | <string name="searching_text"> |
@@ -370,8 +370,8 @@ | |||
370 | Land can be bought direct for Linden Dollars (L$) or at auction for either L$ or US$. | 370 | Land can be bought direct for Linden Dollars (L$) or at auction for either L$ or US$. |
371 | To buy direct, visit the land and click on the place name in the title bar. | 371 | To buy direct, visit the land and click on the place name in the title bar. |
372 | </text> | 372 | </text> |
373 | <scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true" draw_heading="true" | 373 | <scroll_list background_visible="true" bottom="-533" column_padding="0" draw_border="true" draw_heading="true" |
374 | follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true" | 374 | follows="left|top|right|bottom" height="484" left="4" mouse_opaque="true" |
375 | multi_select="false" name="results" search_column="2" width="387"> | 375 | multi_select="false" name="results" search_column="2" width="387"> |
376 | <column label="" name="icon" width="24" /> | 376 | <column label="" name="icon" width="24" /> |
377 | <column label="" name="type" width="-1" /> | 377 | <column label="" name="type" width="-1" /> |
@@ -385,7 +385,7 @@ To buy direct, visit the land and click on the place name in the title bar. | |||
385 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" | 385 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" |
386 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> | 386 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> |
387 | </panel> | 387 | </panel> |
388 | <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" | 388 | <panel border="true" bottom="-569" follows="left|top|right|bottom" height="553" |
389 | label="Places" left="1" mouse_opaque="false" name="places_panel" | 389 | label="Places" left="1" mouse_opaque="false" name="places_panel" |
390 | width="778"> | 390 | width="778"> |
391 | <string name="searching_text"> | 391 | <string name="searching_text"> |
@@ -458,10 +458,10 @@ To buy direct, visit the land and click on the place name in the title bar. | |||
458 | <button bottom="-26" follows="left|top" font="SansSerif" halign="center" height="20" | 458 | <button bottom="-26" follows="left|top" font="SansSerif" halign="center" height="20" |
459 | label="Search" label_selected="Search" left_delta="136" mouse_opaque="true" | 459 | label="Search" label_selected="Search" left_delta="136" mouse_opaque="true" |
460 | name="Search" width="70" /> | 460 | name="Search" width="70" /> |
461 | <scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true" | 461 | <scroll_list background_visible="true" bottom="-533" column_padding="0" draw_border="true" |
462 | draw_heading="true" | 462 | draw_heading="true" |
463 | 463 | ||
464 | follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true" | 464 | follows="left|top|right|bottom" height="484" left="4" mouse_opaque="true" |
465 | multi_select="false" name="results" search_column="2" width="339"> | 465 | multi_select="false" name="results" search_column="2" width="339"> |
466 | <column label="" name="icon" width="24" /> | 466 | <column label="" name="icon" width="24" /> |
467 | <column label="" name="type" width="-1" /> | 467 | <column label="" name="type" width="-1" /> |
@@ -473,7 +473,7 @@ To buy direct, visit the land and click on the place name in the title bar. | |||
473 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" | 473 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" |
474 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> | 474 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> |
475 | </panel> | 475 | </panel> |
476 | <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" | 476 | <panel border="true" bottom="-569" follows="left|top|right|bottom" height="553" |
477 | label="People" left="1" mouse_opaque="false" name="people_panel" | 477 | label="People" left="1" mouse_opaque="false" name="people_panel" |
478 | width="778"> | 478 | width="778"> |
479 | <string name="searching_text"> | 479 | <string name="searching_text"> |
@@ -500,10 +500,10 @@ To buy direct, visit the land and click on the place name in the title bar. | |||
500 | <button bottom="-26" follows="left|top" font="SansSerif" halign="center" height="20" | 500 | <button bottom="-26" follows="left|top" font="SansSerif" halign="center" height="20" |
501 | label="Search" label_selected="Search" left_delta="210" mouse_opaque="true" | 501 | label="Search" label_selected="Search" left_delta="210" mouse_opaque="true" |
502 | name="Search" width="70" /> | 502 | name="Search" width="70" /> |
503 | <scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true" | 503 | <scroll_list background_visible="true" bottom="-533" column_padding="0" draw_border="true" |
504 | draw_heading="true" | 504 | draw_heading="true" |
505 | 505 | ||
506 | follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true" | 506 | follows="left|top|right|bottom" height="484" left="4" mouse_opaque="true" |
507 | multi_select="false" name="results" search_column="2" width="326"> | 507 | multi_select="false" name="results" search_column="2" width="326"> |
508 | <column label="" name="icon" width="24" /> | 508 | <column label="" name="icon" width="24" /> |
509 | <column label="" name="type" width="-1" /> | 509 | <column label="" name="type" width="-1" /> |
@@ -514,7 +514,7 @@ To buy direct, visit the land and click on the place name in the title bar. | |||
514 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" | 514 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" |
515 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> | 515 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> |
516 | </panel> | 516 | </panel> |
517 | <panel border="true" bottom="-549" follows="left|top|right|bottom" height="533" | 517 | <panel border="true" bottom="-569" follows="left|top|right|bottom" height="553" |
518 | label="Groups" left="1" mouse_opaque="false" | 518 | label="Groups" left="1" mouse_opaque="false" |
519 | name="groups_panel" | 519 | name="groups_panel" |
520 | width="778"> | 520 | width="778"> |
@@ -580,19 +580,19 @@ To buy direct, visit the land and click on the place name in the title bar. | |||
580 | <string name="default_search_page">"http://secondlife.com/app/search/index_groups.php?"</string> | 580 | <string name="default_search_page">"http://secondlife.com/app/search/index_groups.php?"</string> |
581 | </panel> | 581 | </panel> |
582 | </tab_container> | 582 | </tab_container> |
583 | <panel bottom="-560" follows="right|top" height="470" left="340" | 583 | <panel bottom="-580" follows="right|top" height="490" left="340" |
584 | name="classified_details_panel" width="440" /> | 584 | name="classified_details_panel" width="440" /> |
585 | <panel bottom="-560" follows="right|top" height="486" left="350" name="Panel Avatar" | 585 | <panel bottom="-580" follows="right|top" height="506" left="350" name="Panel Avatar" |
586 | width="430" /> | 586 | width="430" /> |
587 | <panel bottom="-560" follows="right|top" height="470" left="340" | 587 | <panel bottom="-560" follows="right|top" height="490" left="340" |
588 | name="event_details_panel" width="440" /> | 588 | name="event_details_panel" width="440" /> |
589 | <panel bottom="-580" follows="right|top" height="515" left="350" | 589 | <panel bottom="-600" follows="right|top" height="535" left="350" |
590 | name="group_details_panel_holder" width="430"> | 590 | name="group_details_panel_holder" width="430"> |
591 | <panel bottom="0" follows="right|top" height="470" left="0" name="group_details_panel" | 591 | <panel bottom="0" follows="right|top" height="490" left="0" name="group_details_panel" |
592 | width="430" /> | 592 | width="430" /> |
593 | </panel> | 593 | </panel> |
594 | <panel bottom="20" follows="right|top" height="470" left="340" | 594 | <panel bottom="20" follows="right|top" height="490" left="340" |
595 | name="place_details_panel" width="440" /> | 595 | name="place_details_panel" width="440" /> |
596 | <panel bottom="20" follows="right|top" height="470" left="385" | 596 | <panel bottom="20" follows="right|top" height="490" left="385" |
597 | name="place_details_small_panel" width="395" /> | 597 | name="place_details_small_panel" width="395" /> |
598 | </floater> | 598 | </floater> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml index 3ae02e7..3baec3f 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml | |||
@@ -92,7 +92,16 @@ | |||
92 | <string name="no_one_near"> | 92 | <string name="no_one_near"> |
93 | No avatars within range | 93 | No avatars within range |
94 | </string> | 94 | </string> |
95 | <string name="muted"> | 95 | <string name="is_muted"> |
96 | (muted) | 96 | (muted) |
97 | </string> | 97 | </string> |
98 | <string name="is_typing"> | ||
99 | (typing) | ||
100 | </string> | ||
101 | <string name="entering_chat_range"> | ||
102 | [NAME] has entered chat range ([DISTANCE]m) | ||
103 | </string> | ||
104 | <string name="entering_sim_range"> | ||
105 | [NAME] has entered the sim ([DISTANCE]m) | ||
106 | </string> | ||
98 | </floater> | 107 | </floater> |
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 00f3f3e..880ba85 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 | |||
@@ -530,37 +530,37 @@ | |||
530 | </combo_item> | 530 | </combo_item> |
531 | </combo_box> | 531 | </combo_box> |
532 | <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" |
533 | bottom="-115" drop_shadow_visible="true" follows="left|top" | 533 | bottom="-135" drop_shadow_visible="true" follows="left|top" |
534 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" | 534 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" |
535 | mouse_opaque="true" name="B:" v_pad="0" width="174"> | 535 | mouse_opaque="true" name="B:" v_pad="0" width="174"> |
536 | B: | 536 | B: |
537 | </text> | 537 | </text> |
538 | <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" |
539 | bottom="-115" drop_shadow_visible="true" follows="left|top" | 539 | bottom="-135" drop_shadow_visible="true" follows="left|top" |
540 | 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" |
541 | mouse_opaque="true" name="O:" v_pad="0" width="124"> | 541 | mouse_opaque="true" name="O:" v_pad="0" width="124"> |
542 | O; | 542 | O; |
543 | </text> | 543 | </text> |
544 | <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" |
545 | bottom="-115" drop_shadow_visible="true" follows="left|top" | 545 | bottom="-135" drop_shadow_visible="true" follows="left|top" |
546 | 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" |
547 | mouse_opaque="true" name="G:" v_pad="0" width="74"> | 547 | mouse_opaque="true" name="G:" v_pad="0" width="74"> |
548 | G: | 548 | G: |
549 | </text> | 549 | </text> |
550 | <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" |
551 | bottom="-127" drop_shadow_visible="true" follows="left|top" | 551 | bottom="-147" drop_shadow_visible="true" follows="left|top" |
552 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" | 552 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="88" |
553 | mouse_opaque="true" name="E:" v_pad="0" width="174"> | 553 | mouse_opaque="true" name="E:" v_pad="0" width="174"> |
554 | E: | 554 | E: |
555 | </text> | 555 | </text> |
556 | <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" |
557 | bottom="-127" drop_shadow_visible="true" follows="left|top" | 557 | bottom="-147" drop_shadow_visible="true" follows="left|top" |
558 | 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" |
559 | mouse_opaque="true" name="N:" v_pad="0" width="124"> | 559 | mouse_opaque="true" name="N:" v_pad="0" width="124"> |
560 | N: | 560 | N: |
561 | </text> | 561 | </text> |
562 | <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" |
563 | bottom="-127" drop_shadow_visible="true" follows="left|top" | 563 | bottom="-147" drop_shadow_visible="true" follows="left|top" |
564 | 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" |
565 | mouse_opaque="true" name="F:" v_pad="0" width="74"> | 565 | mouse_opaque="true" name="F:" v_pad="0" width="74"> |
566 | F: | 566 | F: |
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 b1d16a2..e962a8a 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 | |||
@@ -29,21 +29,22 @@ | |||
29 | <on_click function="Object.Delete" /> | 29 | <on_click function="Object.Delete" /> |
30 | <on_enable function="Object.EnableDelete" /> | 30 | <on_enable function="Object.EnableDelete" /> |
31 | </menu_item_call> | 31 | </menu_item_call> |
32 | <menu_item_call enabled="false" label="Wear" mouse_opaque="true" name="Wear"> | 32 | <menu_item_call enabled="false" label="Build" mouse_opaque="true" name="Create"> |
33 | <on_click function="Object.AttachToAvatar" /> | 33 | <on_click function="Object.Build" /> |
34 | <on_enable function="Object.EnableWear" /> | 34 | <on_enable function="EnableEdit" /> |
35 | </menu_item_call> | 35 | </menu_item_call> |
36 | <menu_item_call enabled="false" label="Take Copy" mouse_opaque="true" name="Take Copy"> | 36 | |
37 | <on_click function="Tools.TakeCopy" /> | 37 | <menu_item_call enabled="false" label="Take Copy" mouse_opaque="true" name="Take Copy"> |
38 | <on_enable function="Tools.EnableTakeCopy" /> | 38 | <on_click function="Tools.TakeCopy" /> |
39 | </menu_item_call> | 39 | <on_enable function="Tools.EnableTakeCopy" /> |
40 | <pie_menu label="Attach HUD >" name="Object Attach HUD" /> | 40 | </menu_item_call> |
41 | <pie_menu label="Attach >" name="Object Attach" /> | 41 | <pie_menu label="Attach HUD >" name="Object Attach HUD" /> |
42 | <menu_item_call enabled="false" label="Return..." mouse_opaque="true" name="Return..."> | 42 | <pie_menu label="Attach >" name="Object Attach" /> |
43 | <on_click function="Object.Return" /> | 43 | <menu_item_call enabled="false" label="Wear" mouse_opaque="true" name="Wear"> |
44 | <on_enable function="Object.EnableReturn" /> | 44 | <on_click function="Object.AttachToAvatar" /> |
45 | </menu_item_call> | 45 | <on_enable function="Object.EnableWear" /> |
46 | <pie_menu label="More >" name="Rate Menu"> | 46 | </menu_item_call> |
47 | <pie_menu label="More >" name="Rate Menu"> | ||
47 | <menu_item_call label="Export" enabled="false" hidden="false" | 48 | <menu_item_call label="Export" enabled="false" hidden="false" |
48 | mouse_opaqu="true" name="Export"> | 49 | mouse_opaqu="true" name="Export"> |
49 | <on_click function="Object.Export" /> | 50 | <on_click function="Object.Export" /> |
@@ -74,10 +75,10 @@ | |||
74 | <on_click function="Tools.Unlink" userdata="" /> | 75 | <on_click function="Tools.Unlink" userdata="" /> |
75 | <on_enable function="Tools.EnableUnlink" /> | 76 | <on_enable function="Tools.EnableUnlink" /> |
76 | </menu_item_call> | 77 | </menu_item_call> |
77 | </pie_menu> | 78 | </pie_menu> |
78 | <menu_item_call enabled="false" label="Create" mouse_opaque="true" name="Create"> | 79 | <menu_item_call enabled="false" label="Return..." mouse_opaque="true" name="Return..."> |
79 | <on_click function="Object.Build" /> | 80 | <on_click function="Object.Return" /> |
80 | <on_enable function="EnableEdit" /> | 81 | <on_enable function="Object.EnableReturn" /> |
81 | </menu_item_call> | 82 | </menu_item_call> |
82 | </pie_menu> | 83 | </pie_menu> |
83 | <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit..."> | 84 | <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit..."> |
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 9da0ec5..8d55a3b 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 | |||
@@ -1402,11 +1402,33 @@ | |||
1402 | 1402 | ||
1403 | <menu name="RLVa" drop_shadow="true" opaque="true" tear_off="true"> | 1403 | <menu name="RLVa" drop_shadow="true" opaque="true" tear_off="true"> |
1404 | 1404 | ||
1405 | <menu name="Debug" drop_shadow="true" opaque="true" tear_off="true"> | ||
1406 | |||
1407 | <menu_item_check name="Show Debug Messages" | ||
1408 | label="Show Debug Messages"> | ||
1409 | <on_click function="ToggleControl" userdata="RestrainedLifeDebug" /> | ||
1410 | <on_check control="RestrainedLifeDebug" /> | ||
1411 | </menu_item_check> | ||
1412 | |||
1413 | <menu_item_separator /> | ||
1414 | |||
1415 | <menu_item_check name="Enable Legacy Naming" | ||
1416 | label="Enable Legacy Naming"> | ||
1417 | <on_click function="ToggleControl" userdata="RLVaEnableLegacyNaming" /> | ||
1418 | <on_check control="RLVaEnableLegacyNaming" /> | ||
1419 | </menu_item_check> | ||
1420 | |||
1421 | </menu> | ||
1422 | |||
1423 | <menu_item_separator /> | ||
1424 | |||
1405 | <menu_item_check name="Enable Wear" label="Enable Wear"> | 1425 | <menu_item_check name="Enable Wear" label="Enable Wear"> |
1406 | <on_click function="ToggleControl" userdata="RLVaEnableWear" /> | 1426 | <on_click function="ToggleControl" userdata="RLVaEnableWear" /> |
1407 | <on_check control="RLVaEnableWear" /> | 1427 | <on_check control="RLVaEnableWear" /> |
1408 | </menu_item_check> | 1428 | </menu_item_check> |
1409 | 1429 | ||
1430 | <menu_item_separator /> | ||
1431 | |||
1410 | <menu_item_check name="Hide locked layers" label="Hide locked layers"> | 1432 | <menu_item_check name="Hide locked layers" label="Hide locked layers"> |
1411 | <on_click function="ToggleControl" userdata="RLVaHideLockedLayers" /> | 1433 | <on_click function="ToggleControl" userdata="RLVaHideLockedLayers" /> |
1412 | <on_check control="RLVaHideLockedLayers" /> | 1434 | <on_check control="RLVaHideLockedLayers" /> |
@@ -1428,6 +1450,22 @@ | |||
1428 | </menu_item_check> | 1450 | </menu_item_check> |
1429 | --> | 1451 | --> |
1430 | 1452 | ||
1453 | <menu_item_separator /> | ||
1454 | |||
1455 | <menu_item_check name="Forbid Give to #RLV" label="Forbid Give to #RLV"> | ||
1456 | <on_click function="ToggleControl" | ||
1457 | userdata="RestrainedLifeForbidGiveToRLV" /> | ||
1458 | <on_check control="RestrainedLifeForbidGiveToRLV" /> | ||
1459 | </menu_item_check> | ||
1460 | |||
1461 | <menu_item_check name="Show Name Tags" label="Show Name Tags"> | ||
1462 | <on_click function="ToggleControl" | ||
1463 | userdata="RLVaShowNameTags" /> | ||
1464 | <on_check control="RLVaShowNameTags" /> | ||
1465 | </menu_item_check> | ||
1466 | |||
1467 | <menu_item_separator /> | ||
1468 | |||
1431 | <menu_item_call name="Restrictions..." label="Restrictions..."> | 1469 | <menu_item_call name="Restrictions..." label="Restrictions..."> |
1432 | <on_click function="RLVa.Behaviors.Show" userdata="" /> | 1470 | <on_click function="RLVa.Behaviors.Show" userdata="" /> |
1433 | </menu_item_call> | 1471 | </menu_item_call> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/notify.xml b/linden/indra/newview/skins/default/xui/en-us/notify.xml index 01e2546..2716f25 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notify.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notify.xml | |||
@@ -923,7 +923,24 @@ You can find example sculpted textures in the inventory library. | |||
923 | You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust. | 923 | You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust. |
924 | </message> | 924 | </message> |
925 | </notify> | 925 | </notify> |
926 | <notify name="MaxListSelectMessage" tip="true"> | 926 | <!-- [RLVa:KB] --> |
927 | <notify name="FirstRLVDetach" tip="false"> | ||
928 | <message name="message"> | ||
929 | One of your attachments was made nondetachable using Restrained Life. | ||
930 | Please note that this also disables the 'Wear' option on all prim attachments in your inventory unless they are properly named. | ||
931 | |||
932 | For more information search for 'Restrained Life' on the SL wiki. | ||
933 | </message> | ||
934 | </notify> | ||
935 | <notify name="FirstRLVFartouch" tip="false"> | ||
936 | <message name="message"> | ||
937 | You have been fartouch restricted: you will be unable to touch objects farther than 1.5m from your avatar until the restriction is lifted. | ||
938 | |||
939 | Tip: if an object is out of range the mouse cursor will not change as you hover over it and you'll hear an error sound if you try to right-click it. | ||
940 | </message> | ||
941 | </notify> | ||
942 | <!-- [/RLVa:KB] --> | ||
943 | <notify name="MaxListSelectMessage" tip="true"> | ||
927 | <message name="message"> | 944 | <message name="message"> |
928 | You may only select up to [MAX_SELECT] items | 945 | You may only select up to [MAX_SELECT] items |
929 | from this list. | 946 | from this list. |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml index b811a66..921cd8e 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml | |||
@@ -71,7 +71,7 @@ | |||
71 | label_selected="Mute" left_delta="0" mouse_opaque="true" name="Mute" | 71 | label_selected="Mute" left_delta="0" mouse_opaque="true" name="Mute" |
72 | width="145" /> | 72 | width="145" /> |
73 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 73 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
74 | bottom_delta="-29" drop_shadow_visible="true" follows="left|top" | 74 | bottom_delta="-25" drop_shadow_visible="true" follows="left|top" |
75 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-12" | 75 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-12" |
76 | mouse_opaque="true" name="label" v_pad="0" width="145"> | 76 | mouse_opaque="true" name="label" v_pad="0" width="145"> |
77 | Born: | 77 | Born: |
@@ -84,17 +84,17 @@ | |||
84 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 84 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
85 | bottom_delta="-24" drop_shadow_visible="true" follows="left|top" | 85 | bottom_delta="-24" drop_shadow_visible="true" follows="left|top" |
86 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-12" | 86 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-12" |
87 | mouse_opaque="true" name="label2" v_pad="0" width="345"> | 87 | mouse_opaque="true" name="label2" v_pad="0" width="145"> |
88 | Account: | 88 | Account: |
89 | </text> | 89 | </text> |
90 | <view_border bevel_style="in" bottom_delta="-48" follows="left|top" height="50" right="-12" | 90 | <view_border bevel_style="in" bottom_delta="-52" follows="left|top" height="52" right="-12" |
91 | mouse_opaque="false" name="acct_border" width="145" /> | 91 | mouse_opaque="false" name="acct_border" width="145" /> |
92 | <text bg_visible="false" border_drop_shadow_visible="false" | 92 | <text bg_visible="false" border_drop_shadow_visible="false" |
93 | border_visible="true" bottom_delta="0" drop_shadow_visible="true" | 93 | border_visible="true" bottom_delta="0" drop_shadow_visible="true" |
94 | follows="left|top" font="SansSerifSmall" height="48" left="264" | 94 | follows="left|top" font="SansSerifSmall" height="48" left="264" |
95 | mouse_opaque="false" name="acct" width="121" /> | 95 | mouse_opaque="false" name="acct" width="121" /> |
96 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 96 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
97 | bottom_delta="-24" drop_shadow_visible="true" follows="left|top" | 97 | bottom_delta="-25" drop_shadow_visible="true" follows="left|top" |
98 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-12" | 98 | font="SansSerifSmall" h_pad="0" halign="left" height="16" right="-12" |
99 | mouse_opaque="true" name="partner_label" | 99 | mouse_opaque="true" name="partner_label" |
100 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" | 100 | tool_tip="Second Life partner. For more info on how to set, see www.secondlife.com/partner" |
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 b0384cf..6233cbe 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 | |||
@@ -33,44 +33,49 @@ | |||
33 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" | 33 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" |
34 | can_apply_immediately="true" color="1 1 1 1" control_name="UserChatColor" | 34 | can_apply_immediately="true" color="1 1 1 1" control_name="UserChatColor" |
35 | enabled="true" follows="left|top" height="56" label="You" left="148" | 35 | enabled="true" follows="left|top" height="56" label="You" left="148" |
36 | mouse_opaque="true" name="user" width="44" /> | 36 | mouse_opaque="true" name="user" width="54" /> |
37 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" | 37 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" |
38 | can_apply_immediately="true" color="1 1 1 1" control_name="AgentChatColor" | 38 | can_apply_immediately="true" color="1 1 1 1" control_name="AgentChatColor" |
39 | enabled="true" follows="left|top" height="56" label="Others" left_delta="48" | 39 | enabled="true" follows="left|top" height="56" label="Others" left_delta="68" |
40 | mouse_opaque="true" name="agent" width="44" /> | 40 | mouse_opaque="true" name="agent" width="54" /> |
41 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" | 41 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" |
42 | can_apply_immediately="true" color="0.6 0.6 1 1" | 42 | can_apply_immediately="true" color="0.6 0.6 1 1" |
43 | enabled="true" follows="left|top" height="56" label="IM" left_delta="48" | 43 | enabled="true" follows="left|top" height="56" label="IMs" left_delta="68" |
44 | mouse_opaque="true" name="im" width="44" /> | 44 | mouse_opaque="true" name="im" width="54" /> |
45 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" | 45 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" |
46 | can_apply_immediately="true" color="0.8 1 1 1" | 46 | can_apply_immediately="true" color="0.8 1 1 1" |
47 | enabled="true" follows="left|top" | 47 | enabled="true" follows="left|top" |
48 | height="56" label="System" left_delta="48" mouse_opaque="true" | 48 | height="56" label="System" left_delta="68" mouse_opaque="true" |
49 | name="system" width="44" /> | 49 | name="system" width="54" /> |
50 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" | 50 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-108" |
51 | can_apply_immediately="true" color="0.82 0.82 0.99 1" | 51 | can_apply_immediately="true" color="0.82 0.82 0.99 1" |
52 | control_name="ScriptErrorColor" enabled="true" follows="left|top" | 52 | control_name="ScriptErrorColor" enabled="true" follows="left|top" |
53 | height="56" label="Errors" left_delta="48" mouse_opaque="true" | 53 | height="56" label="Errors" left_delta="68" mouse_opaque="true" |
54 | name="script_error" width="44" /> | 54 | name="script_error" width="54" /> |
55 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" | 55 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" |
56 | can_apply_immediately="true" color="0.7 0.9 0.7 1" | 56 | can_apply_immediately="true" color="0.7 0.9 0.7 1" |
57 | control_name="ObjectChatColor" enabled="true" follows="left|top" | 57 | control_name="ObjectChatColor" enabled="true" follows="left|top" |
58 | height="56" label="Objects" left="148" mouse_opaque="true" | 58 | height="56" label="Objects" left="148" mouse_opaque="true" |
59 | name="objects" width="44" /> | 59 | name="objects" width="54" /> |
60 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" | 60 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" |
61 | can_apply_immediately="true" color="0.7 0.9 0.7 1" | 61 | can_apply_immediately="true" color="0.7 0.9 0.7 1" |
62 | control_name="ObjectIMColor" enabled="true" follows="left|top" | ||
63 | height="56" label="Object IMs" left_delta="68" mouse_opaque="true" | ||
64 | name="object_ims" width="54" /> | ||
65 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" | ||
66 | can_apply_immediately="true" color="0.7 0.9 0.7 1" | ||
62 | enabled="true" follows="left|top" | 67 | enabled="true" follows="left|top" |
63 | height="56" label="Owner" left_delta="48" mouse_opaque="true" name="owner" | 68 | height="56" label="Owner" left_delta="68" mouse_opaque="true" name="owner" |
64 | width="44" /> | 69 | width="54" /> |
65 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" | 70 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" |
66 | can_apply_immediately="true" color="0 0 0 1" | 71 | can_apply_immediately="true" color="0 0 0 1" |
67 | enabled="true" follows="left|top" | 72 | enabled="true" follows="left|top" |
68 | height="56" label="Bubble" left_delta="48" mouse_opaque="true" | 73 | height="56" label="Bubble" left_delta="68" mouse_opaque="true" |
69 | name="background" width="44" /> | 74 | name="background" width="54" /> |
70 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" | 75 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-165" |
71 | can_apply_immediately="true" color="0.6 0.6 1 1" | 76 | can_apply_immediately="true" color="0.6 0.6 1 1" |
72 | enabled="true" follows="left|top" height="56" | 77 | enabled="true" follows="left|top" height="56" |
73 | label="URLs" left_delta="48" mouse_opaque="true" name="links" width="44" /> | 78 | label="URLs" left_delta="68" mouse_opaque="true" name="links" width="54" /> |
74 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 79 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
75 | bottom="-185" drop_shadow_visible="true" enabled="true" follows="left|top" | 80 | bottom="-185" drop_shadow_visible="true" enabled="true" follows="left|top" |
76 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" | 81 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml index bb1c5ee..0c18a62 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml | |||
@@ -77,6 +77,22 @@ | |||
77 | follows="left|top" height="16" increment="1" initial_val="300" | 77 | follows="left|top" height="16" increment="1" initial_val="300" |
78 | label="Away Timeout:" label_width="141" left="10" max_val="600" | 78 | label="Away Timeout:" label_width="141" left="10" max_val="600" |
79 | min_val="30" mouse_opaque="true" name="afk_timeout_spinner" width="202" /> | 79 | min_val="30" mouse_opaque="true" name="afk_timeout_spinner" width="202" /> |
80 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
81 | bottom_delta="-25" drop_shadow_visible="true" enabled="true" follows="left|top" | ||
82 | font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" | ||
83 | mouse_opaque="true" name="UI Size:" v_pad="0" width="128"> | ||
84 | Mini-map notify: | ||
85 | </text> | ||
86 | <check_box bottom_delta="0" enabled="true" | ||
87 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | ||
88 | label="Entering chat range" left="151" | ||
89 | mouse_opaque="true" name="mini_map_notify_chat" radio_style="false" | ||
90 | width="256" /> | ||
91 | <check_box bottom_delta="0" enabled="true" | ||
92 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | ||
93 | label="Entering sim" left="330" | ||
94 | mouse_opaque="true" name="mini_map_notify_sim" radio_style="false" | ||
95 | width="256" /> | ||
80 | <check_box bottom="-304" enabled="true" | 96 | <check_box bottom="-304" enabled="true" |
81 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | 97 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" |
82 | label="Notify when Linden dollars (L$) spent or received" left="151" | 98 | label="Notify when Linden dollars (L$) spent or received" left="151" |
diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml index 6a94489..f9bf283 100644 --- a/linden/indra/newview/skins/silver/colors_base.xml +++ b/linden/indra/newview/skins/silver/colors_base.xml | |||
@@ -162,6 +162,9 @@ | |||
162 | <MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color --> | 162 | <MapAvatar value="0, 255, 0, 255" /> <!-- Your avatar's glyph color --> |
163 | <MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color --> | 163 | <MapFriend value="255, 255, 0, 255" /> <!-- Your friends' glyph color --> |
164 | <MapMuted value="128, 128, 128, 255" /> <!-- Muted avatars' glyph color --> | 164 | <MapMuted value="128, 128, 128, 255" /> <!-- Muted avatars' glyph color --> |
165 | <MapSelected value="255, 0, 0, 255" /> <!-- Selected avatars' glyph color --> | ||
166 | <MapImpDev value="90, 45, 101, 255" /> <!-- Imprudence developers glyph color --> | ||
167 | <MapPartner value="214, 40, 107, 255" /> <!-- (unused) Your avatar's partner's glyph color --> | ||
165 | 168 | ||
166 | <!-- MINI-MAP --> | 169 | <!-- MINI-MAP --> |
167 | <NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background --> | 170 | <NetMapBackgroundColor value="0, 0, 0, 77" /> <!-- Mini-map floater background --> |
diff --git a/linden/indra/newview/skins/silver/xui/en-us/floater_chatterbox.xml b/linden/indra/newview/skins/silver/xui/en-us/floater_chatterbox.xml deleted file mode 100644 index 025a616..0000000 --- a/linden/indra/newview/skins/silver/xui/en-us/floater_chatterbox.xml +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <multi_floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" | ||
3 | height="390" name="floater_chatterbox" | ||
4 | rect_control="ChatterboxRect" title="Communicate" width="392"> | ||
5 | <icon enabled="false" image_name="tabarea.tga" | ||
6 | bg_alpha_color="blue" color="DefaultShadowLight" border="false" | ||
7 | bottom="-389" follows="left|right|bottom" height="17" left="1" scale_image="true" | ||
8 | mouse_opaque="false" name="chatterbox_tab_container" width="391"></icon> | ||
9 | <tab_container bottom="2" follows="left|right|top|bottom" height="370" left="0" | ||
10 | name="chatterbox_tabs" tab_position="bottom" tab_width="80" width="395" /> | ||
11 | </multi_floater> | ||
12 | |||
diff --git a/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml b/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml index 11859cc..d801251 100644 --- a/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml +++ b/linden/indra/newview/skins/silver/xui/en-us/floater_windlight_options.xml | |||
@@ -4,29 +4,35 @@ | |||
4 | min_width="400" mouse_opaque="true" name="WindLight floater" | 4 | min_width="400" mouse_opaque="true" name="WindLight floater" |
5 | rect_control="FloaterAdvancedSkyRect" title="Advanced Sky Editor" | 5 | rect_control="FloaterAdvancedSkyRect" title="Advanced Sky Editor" |
6 | width="700"> | 6 | width="700"> |
7 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 7 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
8 | bottom="-50" drop_shadow_visible="true" follows="left|top|right" | 8 | bottom="-50" drop_shadow_visible="true" follows="left|top|right" |
9 | font="SansSerif" h_pad="0" halign="left" height="16" | 9 | font="SansSerif" h_pad="0" halign="left" height="16" |
10 | left="10" mouse_opaque="true" name="KeyFramePresetsText" v_pad="0" | 10 | left="10" mouse_opaque="true" name="KeyFramePresetsText" v_pad="0" |
11 | width="110"> | 11 | width="110"> |
12 | Sky Presets: | 12 | Sky Presets: |
13 | </text> | 13 | </text> |
14 | <combo_box allow_text_entry="false" bottom="-50" follows="left|top" height="18" | 14 | <combo_box allow_text_entry="false" bottom="-52" follows="left|top" height="18" |
15 | left_delta="110" max_chars="20" mouse_opaque="true" name="WLPresetsCombo" | 15 | left_delta="110" max_chars="20" mouse_opaque="true" name="WLPresetsCombo" |
16 | width="150" /> | 16 | width="150" /> |
17 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" | ||
18 | label="" label_selected="" left_delta="-25" image_overlay="arrow_left.tga" | ||
19 | mouse_opaque="true" name="prev" scale_image="true" width="20" /> | ||
20 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" | ||
21 | label="" label_selected="" left_delta="180" image_overlay="arrow_right.tga" | ||
22 | mouse_opaque="true" name="next" scale_image="true" width="20" /> | ||
17 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" | 23 | <button bottom="-53" enabled="true" font="SansSerif" halign="center" height="20" |
18 | label="New" label_selected="New" left_delta="170" | 24 | label="New" label_selected="New" left_delta="40" |
19 | mouse_opaque="true" name="WLNewPreset" scale_image="true" width="70" /> | 25 | mouse_opaque="true" name="WLNewPreset" scale_image="true" width="70" /> |
20 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" | 26 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" |
21 | label="Save" label_selected="Save" left_delta="80" | 27 | label="Save" label_selected="Save" left_delta="70" |
22 | mouse_opaque="true" name="WLSavePreset" scale_image="true" width="70" /> | 28 | mouse_opaque="true" name="WLSavePreset" scale_image="true" width="70" /> |
23 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" | 29 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" |
24 | label="Delete" label_selected="Delete" left_delta="80" | 30 | label="Delete" label_selected="Delete" left_delta="70" |
25 | mouse_opaque="true" name="WLDeletePreset" scale_image="true" width="70" /> | 31 | mouse_opaque="true" name="WLDeletePreset" scale_image="true" width="70" /> |
26 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" | 32 | <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20" |
27 | label="Day Cycle Editor" label_selected="Day Cycle Editor" | 33 | label="Day Cycle Editor" label_selected="Day Cycle Editor" |
28 | left_delta="120" mouse_opaque="true" name="WLDayCycleMenuButton" | 34 | left_delta="100" mouse_opaque="true" name="WLDayCycleMenuButton" |
29 | scale_image="true" width="120" /> | 35 | scale_image="true" width="125" /> |
30 | <tab_container bottom="-220" follows="left|top" height="160" left="0" | 36 | <tab_container bottom="-220" follows="left|top" height="160" left="0" |
31 | mouse_opaque="false" name="WindLight Tabs" tab_position="top" width="700"> | 37 | mouse_opaque="false" name="WindLight Tabs" tab_position="top" width="700"> |
32 | <panel border="true" bottom="-220" follows="left|top|right|bottom" height="160" | 38 | <panel border="true" bottom="-220" follows="left|top|right|bottom" height="160" |