diff options
| author | Callum Prentice <callum@lindenlab.com> | 2010-02-04 17:03:41 -0800 |
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2010-02-04 17:03:41 -0800 |
| commit | 259fa5fd0b67459145eb5463d79f37271ee7af0a (patch) | |
| tree | 27c7eaddb0c6f7dd406228e3a61fc89b6fedb159 /indra/newview/llscriptfloater.cpp | |
| parent | 80139d95adbcb2258c5541a4e0ace32f32b78ba5 (diff) | |
| parent | a4aed31ad9fd1874b134af87145ec93b283dbbfb (diff) | |
Merge with tip
Diffstat (limited to 'indra/newview/llscriptfloater.cpp')
| -rw-r--r-- | indra/newview/llscriptfloater.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index cf62d47362..0d9cf06bc3 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -72,6 +72,9 @@ LLScriptFloater::LLScriptFloater(const LLSD& key) bool LLScriptFloater::toggle(const LLUUID& object_id) { + // Force chiclet toggle on here because first onFocusReceived() will not toggle it on. + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(object_id, true); + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id); @@ -180,6 +183,15 @@ void LLScriptFloater::setVisible(BOOL visible) LLDockableFloater::setVisible(visible); hideToastsIfNeeded(); + + if(!visible) + { + LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getObjectId()); + if(chiclet) + { + chiclet->setToggleState(false); + } + } } void LLScriptFloater::onMouseDown() @@ -199,6 +211,20 @@ void LLScriptFloater::onMouseDown() } } +void LLScriptFloater::onFocusLost() +{ + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(getObjectId(), false); +} + +void LLScriptFloater::onFocusReceived() +{ + // first focus will be received before setObjectId() call - don't toggle chiclet + if(getObjectId().notNull()) + { + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(getObjectId(), true); + } +} + void LLScriptFloater::hideToastsIfNeeded() { using namespace LLNotificationsUI; |
