diff options
-rw-r--r-- | ChangeLog.txt | 8 | ||||
-rw-r--r-- | linden/indra/newview/llfloatermap.cpp | 36 | ||||
-rw-r--r-- | linden/indra/newview/llfloatermap.h | 6 | ||||
-rw-r--r-- | linden/indra/newview/llviewermessage.cpp | 16 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml | 5 |
5 files changed, 67 insertions, 4 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index e069050..540c56d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,5 +1,13 @@ | |||
1 | 2009-10-07 McCabe Maxsted <hakushakukun@gmail.com> | 1 | 2009-10-07 McCabe Maxsted <hakushakukun@gmail.com> |
2 | 2 | ||
3 | * Added typing info to mini-map radar. | ||
4 | |||
5 | modified: linden/indra/newview/llfloatermap.cpp | ||
6 | modified: linden/indra/newview/llfloatermap.h | ||
7 | modified: linden/indra/newview/llviewermessage.cpp | ||
8 | modified: linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml | ||
9 | |||
10 | |||
3 | * Fixed random mouseclicks on the edge of the window. | 11 | * Fixed random mouseclicks on the edge of the window. |
4 | 12 | ||
5 | modified: linden/indra/newview/llviewerwindow.cpp | 13 | modified: linden/indra/newview/llviewerwindow.cpp |
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index e90e3b4..ae5b2b6 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp | |||
@@ -80,6 +80,7 @@ LLFloaterMap::LLFloaterMap(const LLSD& key) | |||
80 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); | 80 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); |
81 | 81 | ||
82 | mChatAvatars.clear(); | 82 | mChatAvatars.clear(); |
83 | mTypingAvatars.clear(); | ||
83 | } | 84 | } |
84 | 85 | ||
85 | 86 | ||
@@ -303,11 +304,18 @@ void LLFloaterMap::populateRadar() | |||
303 | mChatAvatars.clear(); | 304 | mChatAvatars.clear(); |
304 | } | 305 | } |
305 | 306 | ||
306 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("muted") : ""; | 307 | // append typing string |
308 | std::string typing = ""; | ||
309 | if (getIsTyping(avatar_ids[i])) | ||
310 | { | ||
311 | typing = getString("is_typing")+ " "; | ||
312 | } | ||
313 | |||
314 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("is_muted") : ""; | ||
307 | element["id"] = avatar_ids[i]; | 315 | element["id"] = avatar_ids[i]; |
308 | element["columns"][0]["column"] = "avatar_name"; | 316 | element["columns"][0]["column"] = "avatar_name"; |
309 | element["columns"][0]["type"] = "text"; | 317 | element["columns"][0]["type"] = "text"; |
310 | element["columns"][0]["value"] = fullname + " " + mute_text; | 318 | element["columns"][0]["value"] = typing + fullname + " " + mute_text; |
311 | element["columns"][1]["column"] = "avatar_distance"; | 319 | element["columns"][1]["column"] = "avatar_distance"; |
312 | element["columns"][1]["type"] = "text"; | 320 | element["columns"][1]["type"] = "text"; |
313 | element["columns"][1]["value"] = dist_string+"m"; | 321 | element["columns"][1]["value"] = dist_string+"m"; |
@@ -384,6 +392,30 @@ void LLFloaterMap::removeFromChatList(LLUUID agent_id) | |||
384 | mChatAvatars.erase(agent_id); | 392 | mChatAvatars.erase(agent_id); |
385 | } | 393 | } |
386 | 394 | ||
395 | bool LLFloaterMap::getIsTyping(LLUUID agent_id) | ||
396 | { | ||
397 | if (mTypingAvatars.count(agent_id) > 0) | ||
398 | { | ||
399 | return true; | ||
400 | } | ||
401 | return false; | ||
402 | } | ||
403 | |||
404 | void LLFloaterMap::updateTypingList(LLUUID agent_id, bool remove) | ||
405 | { | ||
406 | if (remove) | ||
407 | { | ||
408 | if (getIsTyping(agent_id)) | ||
409 | { | ||
410 | mTypingAvatars.erase(agent_id); | ||
411 | } | ||
412 | } | ||
413 | else | ||
414 | { | ||
415 | mTypingAvatars.insert(agent_id); | ||
416 | } | ||
417 | } | ||
418 | |||
387 | void LLFloaterMap::toggleButtons() | 419 | void LLFloaterMap::toggleButtons() |
388 | { | 420 | { |
389 | BOOL enable = FALSE; | 421 | BOOL enable = FALSE; |
diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h index deb972b..6e44a1e 100644 --- a/linden/indra/newview/llfloatermap.h +++ b/linden/indra/newview/llfloatermap.h | |||
@@ -52,6 +52,9 @@ public: | |||
52 | // returns true if agent_id belongs to a developer listed in llfloatermap.cpp | 52 | // returns true if agent_id belongs to a developer listed in llfloatermap.cpp |
53 | static bool isImpDev(LLUUID agent_id); | 53 | static bool isImpDev(LLUUID agent_id); |
54 | 54 | ||
55 | bool getIsTyping(LLUUID agent_id); | ||
56 | void updateTypingList(LLUUID agent_id, bool remove); | ||
57 | |||
55 | BOOL postBuild(); | 58 | BOOL postBuild(); |
56 | 59 | ||
57 | /*virtual*/ void draw(); | 60 | /*virtual*/ void draw(); |
@@ -69,7 +72,8 @@ private: | |||
69 | LLNetMap* mPanelMap; | 72 | LLNetMap* mPanelMap; |
70 | LLScrollListCtrl* mRadarList; | 73 | LLScrollListCtrl* mRadarList; |
71 | LLUUID mSelectedAvatar; | 74 | LLUUID mSelectedAvatar; |
72 | std::set<LLUUID> mChatAvatars; | 75 | std::set<LLUUID> mChatAvatars; |
76 | std::set<LLUUID> mTypingAvatars; | ||
73 | bool mUpdate; | 77 | bool mUpdate; |
74 | 78 | ||
75 | static void onList(LLUICtrl* ctrl, void* user_data); | 79 | static void onList(LLUICtrl* ctrl, void* user_data); |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 464d687..c9e0f7f 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" |
@@ -2547,6 +2548,12 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2547 | { | 2548 | { |
2548 | ((LLVOAvatar*)chatter)->startTyping(); | 2549 | ((LLVOAvatar*)chatter)->startTyping(); |
2549 | } | 2550 | } |
2551 | |||
2552 | if (LLFloaterMap::getInstance()) | ||
2553 | { | ||
2554 | LLFloaterMap::getInstance()->updateTypingList(from_id, false); | ||
2555 | } | ||
2556 | |||
2550 | return; | 2557 | return; |
2551 | } | 2558 | } |
2552 | else if (CHAT_TYPE_STOP == chat.mChatType) | 2559 | else if (CHAT_TYPE_STOP == chat.mChatType) |
@@ -2558,6 +2565,15 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2558 | { | 2565 | { |
2559 | ((LLVOAvatar*)chatter)->stopTyping(); | 2566 | ((LLVOAvatar*)chatter)->stopTyping(); |
2560 | } | 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 | |||
2561 | return; | 2577 | return; |
2562 | } | 2578 | } |
2563 | 2579 | ||
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 2cb46b7..dd9c324 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,9 +92,12 @@ | |||
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> | ||
98 | <string name="entering_chat_range"> | 101 | <string name="entering_chat_range"> |
99 | [NAME] has entered chat range ([DISTANCE]m) | 102 | [NAME] has entered chat range ([DISTANCE]m) |
100 | </string> | 103 | </string> |