mberezhnoy 2013-05-17 00:06:10 +03:00
commit f159d1b053
7 changed files with 24 additions and 4 deletions

View File

@ -163,6 +163,18 @@ bool LLChatEntry::useLabel()
return !getLength() && !mLabel.empty();
}
void LLChatEntry::onFocusReceived()
{
LLUICtrl::onFocusReceived();
updateAllowingLanguageInput();
}
void LLChatEntry::onFocusLost()
{
LLTextEditor::focusLostHelper();
LLUICtrl::onFocusLost();
}
BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
{
BOOL handled = FALSE;

View File

@ -62,6 +62,8 @@ public:
virtual void draw();
virtual void onCommit();
/*virtual*/ void onFocusReceived();
/*virtual*/ void onFocusLost();
void enableSingleLineMode(bool single_line_mode);
boost::signals2::connection setTextExpandedCallback(const commit_signal_t::slot_type& cb);

View File

@ -1964,8 +1964,7 @@ void LLTextEditor::onFocusReceived()
updateAllowingLanguageInput();
}
// virtual, from LLView
void LLTextEditor::onFocusLost()
void LLTextEditor::focusLostHelper()
{
updateAllowingLanguageInput();
@ -1982,7 +1981,11 @@ void LLTextEditor::onFocusLost()
// Make sure cursor is shown again
getWindow()->showCursorFromMouseMove();
}
void LLTextEditor::onFocusLost()
{
focusLostHelper();
LLTextBase::onFocusLost();
}

View File

@ -255,6 +255,7 @@ protected:
S32 insert(S32 pos, const LLWString &wstr, bool group_with_next_op, LLTextSegmentPtr segment);
S32 remove(S32 pos, S32 length, bool group_with_next_op);
void focusLostHelper();
void updateAllowingLanguageInput();
BOOL hasPreeditString() const;

View File

@ -606,6 +606,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
//Don't show nearby toast, if conversation is visible and selected
if ((nearby_chat->hasFocus()) ||
(LLFloater::isVisible(nearby_chat) && nearby_chat->isTornOff() && !nearby_chat->isMinimized()) ||
((im_box->getSelectedSession().isNull() &&
((LLFloater::isVisible(im_box) && !im_box->isMinimized() && im_box->isFrontmost())
|| (LLFloater::isVisible(nearby_chat) && !nearby_chat->isMinimized() && nearby_chat->isFrontmost())))))

View File

@ -109,7 +109,7 @@ void LLFloaterIMSession::refresh()
void LLFloaterIMSession::onTearOffClicked()
{
LLFloaterIMSessionTab::onTearOffClicked();
mSpeakingIndicator->setVisible(mIsP2PChat);
if(mIsP2PChat)
{
if(isTornOff())

View File

@ -314,7 +314,8 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
// 4. Toast
if ((("toast" == user_preferences) &&
(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status))
(ON_TOP_AND_ITEM_IS_SELECTED != conversations_floater_status) &&
(!session_floater->isTornOff() || !LLFloater::isVisible(session_floater)))
|| !session_floater->isMessagePaneExpanded())
{