diff options
| author | Eugene Mutavchi <emutavchi@productengine.com> | 2009-10-28 16:14:52 +0200 |
|---|---|---|
| committer | Eugene Mutavchi <emutavchi@productengine.com> | 2009-10-28 16:14:52 +0200 |
| commit | a999e50a8ebb3ab641490294d67dbbd6eb0c8898 (patch) | |
| tree | b7c0043b470d96525d77ee84f481a813cecaef4e /indra/newview/llimfloater.cpp | |
| parent | 33af464c441717db855651b70acc4b3636c649a0 (diff) | |
Implemented major sub-task EXT-1912 ( Add handling restrictions of PSTN P2P calls in new IM Floaters )
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llimfloater.cpp')
| -rw-r--r-- | indra/newview/llimfloater.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index b8b0290b18..2f060acb50 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -240,6 +240,15 @@ BOOL LLIMFloater::postBuild() mTypingStart = LLTrans::getString("IM_typing_start_string"); + // Disable input editor if session cannot accept text + LLIMModel::LLIMSession* im_session = + LLIMModel::instance().findIMSession(mSessionID); + if( im_session && !im_session->mTextIMPossible ) + { + mInputEditor->setEnabled(FALSE); + mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label")); + } + //*TODO if session is not initialized yet, add some sort of a warning message like "starting session...blablabla" //see LLFloaterIMPanel for how it is done (IB) @@ -249,8 +258,6 @@ BOOL LLIMFloater::postBuild() // virtual void LLIMFloater::draw() { - - if ( mMeTyping ) { // Time out if user hasn't typed for a while. @@ -259,6 +266,7 @@ void LLIMFloater::draw() setTyping(false); } } + LLFloater::draw(); } @@ -474,9 +482,14 @@ void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void* { LLIMFloater* self= (LLIMFloater*) userdata; - //in disconnected state IM input editor should be disabled - self->mInputEditor->setEnabled(!gDisconnected); - + // Allow enabling the LLIMFloater input editor only if session can accept text + LLIMModel::LLIMSession* im_session = + LLIMModel::instance().findIMSession(self->mSessionID); + if( im_session && im_session->mTextIMPossible ) + { + //in disconnected state IM input editor should be disabled + self->mInputEditor->setEnabled(!gDisconnected); + } self->mChatHistory->setCursorAndScrollToEnd(); } |
