Fixed Normal bug EXT-1959 - [BSI] emotes difficult to see in IM/Group chat
--HG-- branch : product-enginemeow-7.2.2
parent
f4f3903b60
commit
2afc64e6fa
|
|
@ -370,8 +370,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty
|
|||
appendWidget(p, view_text, false);
|
||||
|
||||
//Append the text message
|
||||
std::string message = chat.mText + '\n';
|
||||
appendText(message, FALSE, style_params);
|
||||
appendText(chat.mText, FALSE, style_params);
|
||||
|
||||
mLastFromName = chat.mFromName;
|
||||
blockUndo();
|
||||
|
|
|
|||
|
|
@ -479,11 +479,29 @@ void LLIMFloater::updateMessages()
|
|||
LLStyle::Params style_params;
|
||||
style_params.color(chat_color);
|
||||
|
||||
LLChat chat(message);
|
||||
LLChat chat;
|
||||
chat.mFromID = from_id;
|
||||
chat.mFromName = from;
|
||||
|
||||
mChatHistory->appendWidgetMessage(chat, style_params);
|
||||
//Handle IRC styled /me messages.
|
||||
std::string prefix = message.substr(0, 4);
|
||||
if (prefix == "/me " || prefix == "/me'")
|
||||
{
|
||||
if (from.size() > 0)
|
||||
{
|
||||
style_params.font.style = "ITALIC";
|
||||
chat.mText = from + " ";
|
||||
mChatHistory->appendWidgetMessage(chat, style_params);
|
||||
}
|
||||
message = message.substr(3);
|
||||
style_params.font.style = "UNDERLINE";
|
||||
mChatHistory->appendText(message, FALSE, style_params);
|
||||
}
|
||||
else
|
||||
{
|
||||
chat.mText = message;
|
||||
mChatHistory->appendWidgetMessage(chat, style_params);
|
||||
}
|
||||
|
||||
mLastMessageIndex = msg["index"].asInteger();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -651,22 +651,10 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
|
|||
|
||||
//local echo for the legacy communicate panel
|
||||
std::string history_echo;
|
||||
std::string utf8_copy = utf8_text;
|
||||
LLAgentUI::buildFullname(history_echo);
|
||||
|
||||
// Look for IRC-style emotes here.
|
||||
history_echo += ": " + utf8_text;
|
||||
|
||||
std::string prefix = utf8_copy.substr(0, 4);
|
||||
if (prefix == "/me " || prefix == "/me'")
|
||||
{
|
||||
utf8_copy.replace(0,3,"");
|
||||
}
|
||||
else
|
||||
{
|
||||
history_echo += ": ";
|
||||
}
|
||||
history_echo += utf8_copy;
|
||||
|
||||
LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(im_session_id);
|
||||
if (floater) floater->addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID());
|
||||
|
||||
|
|
@ -2337,15 +2325,6 @@ public:
|
|||
|
||||
BOOL is_linden = LLMuteList::getInstance()->isLinden(name);
|
||||
std::string separator_string(": ");
|
||||
int message_offset=0;
|
||||
|
||||
//Handle IRC styled /me messages.
|
||||
std::string prefix = message.substr(0, 4);
|
||||
if (prefix == "/me " || prefix == "/me'")
|
||||
{
|
||||
separator_string = "";
|
||||
message_offset = 3;
|
||||
}
|
||||
|
||||
chat.mMuted = is_muted && !is_linden;
|
||||
chat.mFromID = from_id;
|
||||
|
|
@ -2362,7 +2341,7 @@ public:
|
|||
{
|
||||
saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
|
||||
}
|
||||
std::string buffer = saved + message.substr(message_offset);
|
||||
std::string buffer = saved + message;
|
||||
|
||||
BOOL is_this_agent = FALSE;
|
||||
if(from_id == gAgentID)
|
||||
|
|
@ -2381,7 +2360,7 @@ public:
|
|||
ll_vector3_from_sd(message_params["position"]),
|
||||
true);
|
||||
|
||||
chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset);
|
||||
chat.mText = std::string("IM: ") + name + separator_string + saved + message;
|
||||
LLFloaterChat::addChat(chat, TRUE, is_this_agent);
|
||||
|
||||
//K now we want to accept the invitation
|
||||
|
|
|
|||
|
|
@ -50,7 +50,19 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
|
|||
mMessage = getChild<LLTextBox>("message");
|
||||
mReplyBtn = getChild<LLButton>("reply");
|
||||
|
||||
mMessage->setValue(p.message);
|
||||
LLStyle::Params style_params;
|
||||
//Handle IRC styled /me messages.
|
||||
std::string prefix = p.message.substr(0, 4);
|
||||
if (prefix == "/me " || prefix == "/me'")
|
||||
{
|
||||
mMessage->clear();
|
||||
style_params.font.style= "ITALIC";
|
||||
mMessage->appendText(p.from + " ", FALSE, style_params);
|
||||
style_params.font.style= "UNDERLINE";
|
||||
mMessage->appendText(p.message.substr(3), FALSE, style_params);
|
||||
}
|
||||
else
|
||||
mMessage->setValue(p.message);
|
||||
mUserName->setValue(p.from);
|
||||
mTime->setValue(p.time);
|
||||
mSessionID = p.session_id;
|
||||
|
|
|
|||
|
|
@ -1498,15 +1498,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
}
|
||||
|
||||
std::string separator_string(": ");
|
||||
int message_offset = 0;
|
||||
|
||||
//Handle IRC styled /me messages.
|
||||
std::string prefix = message.substr(0, 4);
|
||||
if (prefix == "/me " || prefix == "/me'")
|
||||
{
|
||||
separator_string = "";
|
||||
message_offset = 3;
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
switch(dialog)
|
||||
|
|
@ -1558,7 +1549,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
|
||||
// now store incoming IM in chat history
|
||||
|
||||
buffer = message.substr(message_offset);
|
||||
buffer = message;
|
||||
|
||||
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
|
||||
|
||||
|
|
@ -1576,7 +1567,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
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.substr(message_offset);
|
||||
chat.mText = std::string("IM: ") + name + separator_string + message;
|
||||
LLFloaterChat::addChat( chat, TRUE, TRUE );
|
||||
}
|
||||
else if (from_id.isNull())
|
||||
|
|
@ -1596,7 +1587,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
// Treat like a system message and put in chat history.
|
||||
// Claim to be from a local agent so it doesn't go into
|
||||
// console.
|
||||
chat.mText = name + separator_string + message.substr(message_offset);
|
||||
chat.mText = name + separator_string + message;
|
||||
|
||||
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
|
||||
if(nearby_chat)
|
||||
|
|
@ -1612,7 +1603,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
{
|
||||
saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
|
||||
}
|
||||
buffer = saved + message.substr(message_offset);
|
||||
buffer = saved + message;
|
||||
|
||||
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
|
||||
|
||||
|
|
@ -1634,7 +1625,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
region_id,
|
||||
position,
|
||||
true);
|
||||
chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset);
|
||||
chat.mText = std::string("IM: ") + name + separator_string + saved + message;
|
||||
|
||||
BOOL local_agent = FALSE;
|
||||
LLFloaterChat::addChat( chat, TRUE, local_agent );
|
||||
|
|
@ -1922,7 +1913,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
{
|
||||
saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
|
||||
}
|
||||
buffer = saved + message.substr(message_offset);
|
||||
buffer = saved + message;
|
||||
BOOL is_this_agent = FALSE;
|
||||
if(from_id == gAgentID)
|
||||
{
|
||||
|
|
@ -1940,7 +1931,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
position,
|
||||
true);
|
||||
|
||||
chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset);
|
||||
chat.mText = std::string("IM: ") + name + separator_string + saved + message;
|
||||
LLFloaterChat::addChat(chat, TRUE, is_this_agent);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1953,7 +1944,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
}
|
||||
|
||||
LLSD substitutions;
|
||||
substitutions["MSG"] = message.substr(message_offset);
|
||||
substitutions["MSG"] = message;
|
||||
LLNotifications::instance().add("ServerObjectMessage", substitutions);
|
||||
}
|
||||
break;
|
||||
|
|
@ -1978,7 +1969,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
else
|
||||
{
|
||||
// TODO: after LLTrans hits release, get "busy response" into translatable file
|
||||
buffer = llformat("%s (%s): %s", name.c_str(), "busy response", message.substr(message_offset).c_str());
|
||||
buffer = llformat("%s (%s): %s", name.c_str(), "busy response", message.c_str());
|
||||
gIMMgr->addMessage(session_id, from_id, name, buffer);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
text_color="white"
|
||||
top="33"
|
||||
use_ellipses="true"
|
||||
value="MESSAGE"
|
||||
value=""
|
||||
width="285"
|
||||
word_wrap="true"
|
||||
max_length="350" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue