diff options
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 4a08eace62..a48e22bc73 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -90,7 +90,7 @@ public: } LLUUID object_id; - if (!object_id.set(params[0], FALSE)) + if (!object_id.set(params[0], false)) { return false; } @@ -155,7 +155,7 @@ public: } } - BOOL handleMouseUp(S32 x, S32 y, MASK mask) + bool handleMouseUp(S32 x, S32 y, MASK mask) { return LLPanel::handleMouseUp(x,y,mask); } @@ -423,7 +423,7 @@ public: if (mTime > 0) // have frame time { time_t current_time = time_corrected(); - time_t message_time = current_time - LLFrameTimer::getElapsedSeconds() + mTime; + time_t message_time = (time_t)(current_time - LLFrameTimer::getElapsedSeconds() + mTime); time_string = "[" + LLTrans::getString("TimeMonth") + "]/[" + LLTrans::getString("TimeDay") + "]/[" @@ -577,7 +577,7 @@ public: return false; } - BOOL postBuild() + bool postBuild() { setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this)); @@ -591,7 +591,7 @@ public: if (mInfoCtrl) { mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl)); - mInfoCtrl->setVisible(FALSE); + mInfoCtrl->setVisible(false); } else { @@ -619,12 +619,12 @@ public: return child->pointInView(local_x, local_y); } - BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) + bool handleRightMouseDown(S32 x, S32 y, MASK mask) { if(pointInChild("avatar_icon",x,y) || pointInChild("user_name",x,y)) { showContextMenu(x,y); - return TRUE; + return true; } return LLPanel::handleRightMouseDown(x,y,mask); @@ -693,9 +693,9 @@ public: mNeedsTimeBox = false; user_name->setValue(mFrom); updateMinUserNameWidth(); - LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor"); + LLUIColor sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor"); setTransparentColor(sep_color); - mTimeBoxTextBox->setVisible(FALSE); + mTimeBoxTextBox->setVisible(false); } else if (chat.mFromName.empty() || mSourceType == CHAT_SOURCE_SYSTEM) @@ -725,8 +725,8 @@ public: mSourceType == CHAT_SOURCE_AGENT) { //if it's an avatar name with a username add formatting - S32 username_start = chat.mFromName.rfind(" ("); - S32 username_end = chat.mFromName.rfind(')'); + auto username_start = chat.mFromName.rfind(" ("); + auto username_end = chat.mFromName.rfind(')'); if (username_start != std::string::npos && username_end == (chat.mFromName.length() - 1)) @@ -739,12 +739,12 @@ public: std::string username = chat.mFromName.substr(username_start + 2); username = username.substr(0, username.length() - 1); LLStyle::Params style_params_name; - LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); + LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); style_params_name.color(userNameColor); style_params_name.font.name("SansSerifSmall"); style_params_name.font.style("NORMAL"); style_params_name.readonly_color(userNameColor); - user_name->appendText(" - " + username, FALSE, style_params_name); + user_name->appendText(" - " + username, false, style_params_name); } } else @@ -830,7 +830,7 @@ public: user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight()); user_name->setRect(user_name_rect); - time_box->setVisible(TRUE); + time_box->setVisible(true); } LLPanel::draw(); @@ -982,7 +982,7 @@ protected: void hideInfoCtrl() { - mInfoCtrl->setVisible(FALSE); + mInfoCtrl->setVisible(false); } private: @@ -1037,12 +1037,12 @@ private: !av_name.isDisplayNameDefault()) { LLStyle::Params style_params_name; - LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); + LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor"); style_params_name.color(userNameColor); style_params_name.font.name("SansSerifSmall"); style_params_name.font.style("NORMAL"); style_params_name.readonly_color(userNameColor); - user_name->appendText(" - " + av_name.getUserName(), FALSE, style_params_name); + user_name->appendText(" - " + av_name.getUserName(), false, style_params_name); } setToolTip( av_name.getUserName() ); // name might have changed, update width @@ -1223,7 +1223,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (mNotifyAboutUnreadMsg && !mEditor->scrolledToEnd() && !from_me && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); - mMoreChatPanel->setVisible(TRUE); + mMoreChatPanel->setVisible(true); std::string chatters; for (const std::string& source : mUnreadChatSources) { @@ -1239,10 +1239,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mMoreChatPanel->reshape(mMoreChatPanel->getRect().getWidth(), height); } - LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); - LLColor4 name_color(txt_color); + F32 alpha = 1.f; + LLUIColor txt_color = LLUIColorTable::instance().getColor("White"); + LLUIColor name_color(txt_color); + LLViewerChat::getChatColor(chat, txt_color, alpha); - LLViewerChat::getChatColor(chat,txt_color); LLFontGL* fontp = LLViewerChat::getChatFont(); std::string font_name = LLFontGL::nameFromFont(fontp); std::string font_size = LLFontGL::sizeFromFont(fontp); @@ -1250,6 +1251,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL LLStyle::Params body_message_params; body_message_params.color(txt_color); body_message_params.readonly_color(txt_color); + body_message_params.alpha(alpha); body_message_params.font.name(font_name); body_message_params.font.size(font_size); body_message_params.font.style(input_append_params.font.style); @@ -1317,7 +1319,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { if (!message_from_log) { - LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor"); + LLUIColor timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor"); timestamp_style.color(timestamp_color); timestamp_style.readonly_color(timestamp_color); } @@ -1344,7 +1346,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // set the link for the object name to be the objectim SLapp // (don't let object names with hyperlinks override our objectim Url) LLStyle::Params link_params(body_message_params); - LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor"); + LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor"); link_params.color = link_color; link_params.readonly_color = link_color; link_params.is_link = true; @@ -1541,7 +1543,7 @@ void LLChatHistory::draw() if (mEditor->scrolledToEnd()) { mUnreadChatSources.clear(); - mMoreChatPanel->setVisible(FALSE); + mMoreChatPanel->setVisible(false); } LLUICtrl::draw(); |