summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp84
1 files changed, 38 insertions, 46 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index c929e81ea4..31a18a2e98 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"
@@ -835,9 +834,13 @@ 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();
+
//this is kinda important, so actually put it on screen
- LLFloaterChat::addChat(chat, FALSE, FALSE);
+ std::string log_msg = message.str();
+ LLSD args;
+ args["MESSAGE"] = log_msg;
+ LLNotificationsUtil::add("SystemMessage", args);
+
throttle_logged=true;
}
return false;
@@ -905,6 +908,14 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f
LLSideTray::getInstance()->showPanel("panel_places",
LLSD().with("type", "landmark").with("id", item->getUUID()));
}
+ else if("group_offer" == from_name)
+ {
+ // do not open inventory when we open group notice attachment because
+ // we already opened landmark info panel
+ // "group_offer" is passed by LLOpenTaskGroupOffer
+
+ continue;
+ }
else if(from_name.empty())
{
// we receive a message from LLOpenTaskOffer, it mean that new landmark has been added.
@@ -1178,8 +1189,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);
+ LLSD args;
+ args["MESSAGE"] = log_message;
+ LLNotificationsUtil::add("SystemMessage", args);
}
break;
@@ -1352,8 +1364,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
if (check_offer_throttle(mFromName, true))
{
log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString(".");
- chat.mText = log_message;
- LLFloaterChat::addChatHistory(chat);
+ //TODO* CHAT: how to show this?
+ //LLSD args;
+ //args["MESSAGE"] = log_message;
+ //LLNotificationsUtil::add("SystemMessage", args);
}
// we will want to open this item when it comes back.
@@ -1395,13 +1409,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
// send the message
msg->sendReliable(mHost);
- 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* CHAT: how to show this?
+ //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +".";
+ //LLSD args;
+ //args["MESSAGE"] = log_message;
+ //LLNotificationsUtil::add("SystemMessage", args);
if (busy && (!mFromGroup && !mFromObject))
{
@@ -1763,10 +1775,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())
{
@@ -1822,19 +1830,18 @@ 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.
- chat.mText = buffer;
- BOOL local_agent = TRUE;
- LLFloaterChat::addChat( chat, TRUE, local_agent );
+
+ //TODO* CHAT: how to show this?
+ //and this is not system message...
+ //LLSD args;
+ //args["MESSAGE"] = buffer;
+ //LLNotificationsUtil::add("SystemMessage", args);
}
}
break;
@@ -2138,9 +2145,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;
@@ -2687,22 +2691,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(
+ LLNotificationsUI::LLNotificationManager::instance().onChat(
chat, LLNotificationsUI::NT_NEARBYCHAT);
-
- LLFloaterChat::addChat(chat, FALSE, FALSE);
- }
- else
- {
- LLNotificationsUI::LLNotificationManager::instance().onChat(
- chat, LLNotificationsUI::NT_NEARBYCHAT);
- // adding temporarily
- LLFloaterChat::addChatHistory(chat);
- }
}
}
@@ -3087,9 +3077,11 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
if (avatarp)
{
// Chat the "back" SLURL. (DEV-4907)
- LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL());
- chat.mSourceType = CHAT_SOURCE_SYSTEM;
- LLFloaterChat::addChatHistory(chat);
+
+ //TODO* CHAT: how to show this?
+ //LLSD args;
+ //args["MESSAGE"] = message;
+ //LLNotificationsUtil::add("SystemMessage", args);
// Set the new position
avatarp->setPositionAgent(agent_pos);