From f28778b8b803af65fc4097cc904cf49b9090795a Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Mon, 18 Jan 2010 17:50:19 +0200 Subject: work on EXT-4322 Remove the Communicate floater leave some LLFloaterChat usages commented for later review... --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 57 ++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 34 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4999ac000e..21ba0b1a95 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -54,7 +54,6 @@ #include "llfirstuse.h" #include "llfloaterbuycurrency.h" #include "llfloaterbuyland.h" -#include "llfloaterchat.h" #include "llfloaterland.h" #include "llfloaterregioninfo.h" #include "llfloaterlandholdings.h" @@ -834,9 +833,11 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } message << ", automatic preview disabled for " << OFFER_THROTTLE_TIME << " seconds."; - chat.mText = message.str(); + + //* TODO - cleanup or transfer to nearby chat + //chat.mText = message.str(); //this is kinda important, so actually put it on screen - LLFloaterChat::addChat(chat, FALSE, FALSE); + //LLFloaterChat::addChat(chat, FALSE, FALSE); throttle_logged=true; } return false; @@ -1177,8 +1178,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - chat.mText = log_message; - LLFloaterChat::addChatHistory(chat); + //* TODO - cleanup or transfer to nearby chat + //chat.mText = log_message; + //LLFloaterChat::addChatHistory(chat); } break; @@ -1350,9 +1352,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - chat.mText = log_message; - LLFloaterChat::addChatHistory(chat); + //* TODO - cleanup or transfer to nearby chat + //log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + //chat.mText = log_message; + //LLFloaterChat::addChatHistory(chat); } // we will want to open this item when it comes back. @@ -1394,13 +1397,17 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); + //* TODO - cleaup or transfer to nearby chat + /* log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; chat.mText = log_message; if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 { chat.mMuted = TRUE; } + LLFloaterChat::addChatHistory(chat); + */ if (busy && (!mFromGroup && !mFromObject)) { @@ -1762,10 +1769,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); - - // pretend this is chat generated by self, so it does not show up on screen - chat.mText = std::string("IM: ") + name + separator_string + message; - LLFloaterChat::addChat( chat, TRUE, TRUE ); } else if (from_id.isNull()) { @@ -1821,19 +1824,19 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message; - - BOOL local_agent = FALSE; - LLFloaterChat::addChat( chat, TRUE, local_agent ); } else { // muted user, so don't start an IM session, just record line in chat // history. Pretend the chat is from a local agent, // so it will go into the history but not be shown on screen. + + //* TODO - cleaup or transfer to nearby chat + /* chat.mText = buffer; BOOL local_agent = TRUE; LLFloaterChat::addChat( chat, TRUE, local_agent ); + */ } } break; @@ -2130,9 +2133,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); - - chat.mText = std::string("IM: ") + name + separator_string + saved + message; - LLFloaterChat::addChat(chat, TRUE, is_this_agent); } break; @@ -2637,22 +2637,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mMuted = is_muted && !is_linden; - if (!visible_in_chat_bubble - && (is_linden || !is_busy || is_owned_by_me)) - { - // show on screen and add to history - LLNotificationsUI::LLNotificationManager::instance().onChat( - chat, LLNotificationsUI::NT_NEARBYCHAT); - - LLFloaterChat::addChat(chat, FALSE, FALSE); - } - else - { - LLNotificationsUI::LLNotificationManager::instance().onChat( + LLNotificationsUI::LLNotificationManager::instance().onChat( chat, LLNotificationsUI::NT_NEARBYCHAT); - // adding temporarily - LLFloaterChat::addChatHistory(chat); - } } } @@ -3037,9 +3023,12 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (avatarp) { // Chat the "back" SLURL. (DEV-4907) + //* TODO - cleaup or transfer to nearby chat + /* LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); chat.mSourceType = CHAT_SOURCE_SYSTEM; LLFloaterChat::addChatHistory(chat); + */ // Set the new position avatarp->setPositionAgent(agent_pos); -- cgit v1.2.3 From a23277a6733da4789746b4ea7ce319015c5ff343 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 19 Jan 2010 11:25:25 +0200 Subject: a bit more to removing LLFloaterChat - add some system notifications --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 58 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 21ba0b1a95..13d9b761ab 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -834,10 +834,11 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) message << ", automatic preview disabled for " << OFFER_THROTTLE_TIME << " seconds."; - //* TODO - cleanup or transfer to nearby chat - //chat.mText = message.str(); - //this is kinda important, so actually put it on screen - //LLFloaterChat::addChat(chat, FALSE, FALSE); + //this is kinda important, so actually put it on screen + LLSD args; + args["MESSAGE"] = message; + LLNotificationsUtil::add("SystemMessage", args); + throttle_logged=true; } return false; @@ -1178,9 +1179,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //* TODO - cleanup or transfer to nearby chat - //chat.mText = log_message; - //LLFloaterChat::addChatHistory(chat); + LLSD args; + args["MESSAGE"] = log_message; + LLNotificationsUtil::add("SystemMessage", args); } break; @@ -1352,10 +1353,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - //* TODO - cleanup or transfer to nearby chat - //log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //chat.mText = log_message; - //LLFloaterChat::addChatHistory(chat); + log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + //TODO* should go to history only - how? + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); } // we will want to open this item when it comes back. @@ -1397,17 +1399,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); - //* TODO - cleaup or transfer to nearby chat - /* - log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; - chat.mText = log_message; - if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 - { - chat.mMuted = TRUE; - } - - LLFloaterChat::addChatHistory(chat); - */ + //TODO* should go to message history only... + //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); if (busy && (!mFromGroup && !mFromObject)) { @@ -1831,7 +1827,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // history. Pretend the chat is from a local agent, // so it will go into the history but not be shown on screen. - //* TODO - cleaup or transfer to nearby chat + //TODO* should go to message hisyory only + //and this is not system message... + //LLSD args; + //args["MESSAGE"] = buffer; + //LLNotificationsUtil::add("SystemMessage", args); + /* chat.mText = buffer; BOOL local_agent = TRUE; @@ -3023,12 +3024,11 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (avatarp) { // Chat the "back" SLURL. (DEV-4907) - //* TODO - cleaup or transfer to nearby chat - /* - LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); - chat.mSourceType = CHAT_SOURCE_SYSTEM; - LLFloaterChat::addChatHistory(chat); - */ + + //should go to history only so leave commented + //LLSD args; + //args["MESSAGE"] = message; + //LLNotificationsUtil::add("SystemMessage", args); // Set the new position avatarp->setPositionAgent(agent_pos); -- cgit v1.2.3 From 8bc11c7355573846e14cef30c9603161c9f88a08 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 19 Jan 2010 11:40:18 +0200 Subject: fix link error... --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 43 ++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 13d9b761ab..880892239e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -834,10 +834,11 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) message << ", automatic preview disabled for " << OFFER_THROTTLE_TIME << " seconds."; - //this is kinda important, so actually put it on screen - LLSD args; - args["MESSAGE"] = message; - LLNotificationsUtil::add("SystemMessage", args); + //this is kinda important, so actually put it on screen + std::string log_msg = message.str(); + LLSD args; + args["MESSAGE"] = log_msg; + LLNotificationsUtil::add("SystemMessage", args); throttle_logged=true; } @@ -1179,9 +1180,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - LLSD args; - args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLSD args; + args["MESSAGE"] = log_message; + LLNotificationsUtil::add("SystemMessage", args); } break; @@ -1353,11 +1354,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //TODO* should go to history only - how? - //LLSD args; - //args["MESSAGE"] = log_message; - //LLNotificationsUtil::add("SystemMessage", args); + log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + //TODO* should go to history only - how? + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); } // we will want to open this item when it comes back. @@ -1401,9 +1402,9 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //TODO* should go to message history only... //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; - //LLSD args; - //args["MESSAGE"] = log_message; - //LLNotificationsUtil::add("SystemMessage", args); + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); if (busy && (!mFromGroup && !mFromObject)) { @@ -1829,9 +1830,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) //TODO* should go to message hisyory only //and this is not system message... - //LLSD args; - //args["MESSAGE"] = buffer; - //LLNotificationsUtil::add("SystemMessage", args); + //LLSD args; + //args["MESSAGE"] = buffer; + //LLNotificationsUtil::add("SystemMessage", args); /* chat.mText = buffer; @@ -3026,9 +3027,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) // Chat the "back" SLURL. (DEV-4907) //should go to history only so leave commented - //LLSD args; - //args["MESSAGE"] = message; - //LLNotificationsUtil::add("SystemMessage", args); + //LLSD args; + //args["MESSAGE"] = message; + //LLNotificationsUtil::add("SystemMessage", args); // Set the new position avatarp->setPositionAgent(agent_pos); -- cgit v1.2.3