aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatermap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloatermap.cpp')
-rw-r--r--linden/indra/newview/llfloatermap.cpp36
1 files changed, 34 insertions, 2 deletions
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
395bool LLFloaterMap::getIsTyping(LLUUID agent_id)
396{
397 if (mTypingAvatars.count(agent_id) > 0)
398 {
399 return true;
400 }
401 return false;
402}
403
404void 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
387void LLFloaterMap::toggleButtons() 419void LLFloaterMap::toggleButtons()
388{ 420{
389 BOOL enable = FALSE; 421 BOOL enable = FALSE;