diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterchat.cpp | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index cb74dda..89d60ad 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -164,10 +164,16 @@ void LLFloaterChat::onVisibilityChange(BOOL new_visibility) | |||
164 | { | 164 | { |
165 | // Hide the chat overlay when our history is visible. | 165 | // Hide the chat overlay when our history is visible. |
166 | gConsole->setVisible( !new_visibility ); | 166 | gConsole->setVisible( !new_visibility ); |
167 | |||
168 | // stop chat history tab from flashing when it appears | ||
169 | if (new_visibility) | ||
170 | { | ||
171 | LLFloaterChatterBox::getInstance()->setFloaterFlashing(this, FALSE); | ||
172 | } | ||
173 | |||
167 | LLFloater::onVisibilityChange(new_visibility); | 174 | LLFloater::onVisibilityChange(new_visibility); |
168 | } | 175 | } |
169 | 176 | ||
170 | |||
171 | void add_timestamped_line(LLViewerTextEditor* edit, const LLString& line, const LLColor4& color) | 177 | void add_timestamped_line(LLViewerTextEditor* edit, const LLString& line, const LLColor4& color) |
172 | { | 178 | { |
173 | bool prepend_newline = true; | 179 | bool prepend_newline = true; |
@@ -238,6 +244,12 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) | |||
238 | { | 244 | { |
239 | chat_floater->mPanel->setSpeaker(chat.mFromID, chat.mFromName, LLSpeaker::STATUS_NOT_IN_CHANNEL, LLSpeaker::SPEAKER_OBJECT); | 245 | chat_floater->mPanel->setSpeaker(chat.mFromID, chat.mFromName, LLSpeaker::STATUS_NOT_IN_CHANNEL, LLSpeaker::SPEAKER_OBJECT); |
240 | } | 246 | } |
247 | |||
248 | // start tab flashing on incoming text from other users (ignoring system text, etc) | ||
249 | if (!chat_floater->isInVisibleChain() && chat.mSourceType == CHAT_SOURCE_AGENT) | ||
250 | { | ||
251 | LLFloaterChatterBox::getInstance()->setFloaterFlashing(chat_floater, TRUE); | ||
252 | } | ||
241 | } | 253 | } |
242 | 254 | ||
243 | // static | 255 | // static |
@@ -246,8 +258,14 @@ void LLFloaterChat::setHistoryCursorAndScrollToEnd() | |||
246 | LLViewerTextEditor* history_editor = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor", TRUE); | 258 | LLViewerTextEditor* history_editor = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor", TRUE); |
247 | LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor with mute", TRUE); | 259 | LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor with mute", TRUE); |
248 | 260 | ||
249 | history_editor->setCursorAndScrollToEnd(); | 261 | if (history_editor) |
250 | history_editor_with_mute->setCursorAndScrollToEnd(); | 262 | { |
263 | history_editor->setCursorAndScrollToEnd(); | ||
264 | } | ||
265 | if (history_editor_with_mute) | ||
266 | { | ||
267 | history_editor_with_mute->setCursorAndScrollToEnd(); | ||
268 | } | ||
251 | } | 269 | } |
252 | 270 | ||
253 | 271 | ||
@@ -269,7 +287,7 @@ void LLFloaterChat::onClickMute(void *data) | |||
269 | 287 | ||
270 | if (gFloaterMute) | 288 | if (gFloaterMute) |
271 | { | 289 | { |
272 | gFloaterMute->show(); | 290 | LLFloaterMute::showInstance(); |
273 | } | 291 | } |
274 | } | 292 | } |
275 | 293 | ||
@@ -433,7 +451,7 @@ void* LLFloaterChat::createSpeakersPanel(void* data) | |||
433 | //static | 451 | //static |
434 | void* LLFloaterChat::createChatPanel(void* data) | 452 | void* LLFloaterChat::createChatPanel(void* data) |
435 | { | 453 | { |
436 | LLChatBar* chatp = new LLChatBar("floating_chat_bar"); | 454 | LLChatBar* chatp = new LLChatBar(); |
437 | return chatp; | 455 | return chatp; |
438 | } | 456 | } |
439 | 457 | ||
@@ -441,7 +459,7 @@ void* LLFloaterChat::createChatPanel(void* data) | |||
441 | void LLFloaterChat::hideInstance(const LLSD& id) | 459 | void LLFloaterChat::hideInstance(const LLSD& id) |
442 | { | 460 | { |
443 | LLFloaterChat* floaterp = LLFloaterChat::getInstance(LLSD()); | 461 | LLFloaterChat* floaterp = LLFloaterChat::getInstance(LLSD()); |
444 | // don't do anything when hosted in the chatterbox | 462 | |
445 | if(floaterp->getHost()) | 463 | if(floaterp->getHost()) |
446 | { | 464 | { |
447 | LLFloaterChatterBox::hideInstance(LLSD()); | 465 | LLFloaterChatterBox::hideInstance(LLSD()); |