diff options
| author | William Todd Stinson <stinson@lindenlab.com> | 2012-10-03 17:48:01 -0700 |
|---|---|---|
| committer | William Todd Stinson <stinson@lindenlab.com> | 2012-10-03 17:48:01 -0700 |
| commit | 36df0f8a06629c5a14358c07d0f12ce1019f066e (patch) | |
| tree | 7cf7bbbaeb351b84888032ff98627b04fd871b60 /indra/newview/llimconversation.cpp | |
| parent | 3d5e24d135bd5d2636f075f9ef12ffba2129c61f (diff) | |
| parent | 046e90a8f74f3c13107a7edc72e912799a5e62e9 (diff) | |
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra/newview/llimconversation.cpp')
| -rw-r--r-- | indra/newview/llimconversation.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index a2efe63546..2ad7f9b193 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -42,18 +42,19 @@ const F32 REFRESH_INTERVAL = 0.2f; -LLIMConversation::LLIMConversation(const LLUUID& session_id) +LLIMConversation::LLIMConversation(const LLSD& session_id) : LLTransientDockableFloater(NULL, true, session_id) , mIsP2PChat(false) , mExpandCollapseBtn(NULL) , mTearOffBtn(NULL) , mCloseBtn(NULL) - , mSessionID(session_id) + , mSessionID(session_id.asUUID()) , mParticipantList(NULL) , mChatHistory(NULL) , mInputEditor(NULL) , mInputEditorTopPad(0) , mRefreshTimer(new LLTimer()) + , mHasFocus(false) { mSession = LLIMModel::getInstance()->findIMSession(mSessionID); @@ -216,10 +217,10 @@ void LLIMConversation::onFocusReceived() LLTransientDockableFloater::onFocusReceived(); - mHasFocus = mHaveFocus; - mHaveFocus = true; + mHadFocus = mHasFocus; + mHasFocus = true; - if (! mHasFocus) + if (! mHadFocus) { LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance(); container->setConvItemSelect(mSessionID); @@ -229,7 +230,7 @@ void LLIMConversation::onFocusReceived() void LLIMConversation::onFocusLost() { setBackgroundOpaque(false); - mHaveFocus = false; + mHasFocus = false; LLTransientDockableFloater::onFocusLost(); } @@ -250,6 +251,14 @@ std::string LLIMConversation::appendTime() void LLIMConversation::appendMessage(const LLChat& chat, const LLSD &args) { + // Update the participant activity time + LLIMFloaterContainer* im_box = LLIMFloaterContainer::findInstance(); + if (im_box) + { + im_box->setTimeNow(mSessionID,chat.mFromID); + } + + LLChat& tmp_chat = const_cast<LLChat&>(chat); if(tmp_chat.mTimeStr.empty()) @@ -415,6 +424,7 @@ void LLIMConversation::updateHeaderAndToolbar() mExpandCollapseBtn->setEnabled(!is_torn_off || !mIsP2PChat); mTearOffBtn->setImageOverlay(getString(is_torn_off? "return_icon" : "tear_off_icon")); + mTearOffBtn->setToolTip(getString(!is_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window")); mCloseBtn->setVisible(!is_torn_off && !mIsNearbyChat); |
