diff options
Diffstat (limited to 'linden/indra/newview/llchatbar.cpp')
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 971ffcd..59aa572 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2002-2008, Linden Research, Inc. | 7 | * Copyright (c) 2002-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -554,15 +554,17 @@ void LLChatBar::onInputEditorGainFocus( LLFocusableElement* caller, void* userda | |||
554 | // static | 554 | // static |
555 | void LLChatBar::onClickSay( LLUICtrl* ctrl, void* userdata ) | 555 | void LLChatBar::onClickSay( LLUICtrl* ctrl, void* userdata ) |
556 | { | 556 | { |
557 | LLChatBar* self = (LLChatBar*) userdata; | 557 | e_chat_type chat_type = CHAT_TYPE_NORMAL; |
558 | if (ctrl->getValue().asString() == "shout") | 558 | if (ctrl->getValue().asString() == "shout") |
559 | { | 559 | { |
560 | self->sendChat( CHAT_TYPE_SHOUT ); | 560 | chat_type = CHAT_TYPE_SHOUT; |
561 | } | 561 | } |
562 | else | 562 | else if (ctrl->getValue().asString() == "whisper") |
563 | { | 563 | { |
564 | self->sendChat( CHAT_TYPE_NORMAL ); | 564 | chat_type = CHAT_TYPE_WHISPER; |
565 | } | 565 | } |
566 | LLChatBar* self = (LLChatBar*) userdata; | ||
567 | self->sendChat(chat_type); | ||
566 | } | 568 | } |
567 | 569 | ||
568 | void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) | 570 | void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) |