diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-08-01 21:08:42 +0300 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-08-01 21:08:42 +0300 |
commit | 4cb1e766fcfcaba702c2638f4c7daa9dd17bcbd8 (patch) | |
tree | 19ddf8f23c2113c6a2e76b0b0abe4298fd85f974 /indra/newview/llimfloater.cpp | |
parent | 88e81f99293c992944787289699bf885568bf327 (diff) |
CHUI-268 (Transfer the common functionality from LLNearbyChat and LLIMFloater to LLIMConversation): Remove duplication of functionality from LLNearbyChat; transfer mChatHistory, mInputEditor and some its settings and callbacks to the base class.
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 1b08c454b7..3399a88c9e 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -66,11 +66,9 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) : LLIMConversation(session_id), mLastMessageIndex(-1), mDialog(IM_NOTHING_SPECIAL), - mInputEditor(NULL), mSavedTitle(), mTypingStart(), mShouldSendTypingState(false), - mChatHistory(NULL), mMeTyping(false), mOtherTyping(false), mTypingTimer(), @@ -80,6 +78,7 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) mStartConferenceInSameFloater(false) { mIsNearbyChat = false; + initIMSession(session_id); setOverlapsScreenChannel(true); @@ -313,9 +312,8 @@ void LLIMFloater::initIMFloater() //virtual BOOL LLIMFloater::postBuild() { - LLIMConversation::postBuild(); + BOOL result = LLIMConversation::postBuild(); - mInputEditor = getChild<LLChatEntry>("chat_editor"); mInputEditor->setMaxTextLength(1023); // enable line history support for instant message bar // XXX stinson TODO : resolve merge by adding autoreplace to text editors @@ -323,19 +321,11 @@ BOOL LLIMFloater::postBuild() // *TODO Establish LineEditor with autoreplace callback mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2)); #endif - - LLFontGL* font = LLViewerChat::getChatFont(); - mInputEditor->setFont(font); mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) ); mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) ); mInputEditor->setKeystrokeCallback( boost::bind(onInputEditorKeystroke, _1, this) ); - mInputEditor->setCommitOnFocusLost( FALSE ); - mInputEditor->setPassDelete( TRUE ); - mInputEditor->setCommitCallback(boost::bind(onSendMsg, _1, this)); - - mChatHistory = getChild<LLChatHistory>("chat_history"); setDocked(true); @@ -358,7 +348,7 @@ BOOL LLIMFloater::postBuild() LLIMFloaterContainer* im_box = LLIMFloaterContainer::getInstance(); im_box->addConversationListItem(getTitle(), getKey(), this); - return TRUE; + return result; } void LLIMFloater::onAddButtonClicked() @@ -1004,7 +994,7 @@ void LLIMFloater::onInputEditorKeystroke(LLTextEditor* caller, void* userdata) // Deleting all text counts as stopping typing. self->setTyping(!text.empty()); - } +} void LLIMFloater::setTyping(bool typing) { |