diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2009-12-07 21:05:18 +0200 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2009-12-07 21:05:18 +0200 |
commit | eebbf52e5ed0663672fea899ab92574f482aab01 (patch) | |
tree | 0f2c95f40853845260cccc76afadfa80a0b7d741 | |
parent | 86c686e962a6fb7e282a0652eaff2b107c48a02d (diff) |
Implemented normal sub-task EXT-3142("new message" indicator for object chiclets)
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llscriptfloater.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llscriptfloater.h | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 088884178b..8de99a48aa 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -207,11 +207,22 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) return; } + // Need to indicate of "new message" for object chiclets according to requirements + // specified in the Message Bar design specification. See EXT-3142. + bool set_new_message = false; + // If an Object spawns more-than-one floater, only the newest one is shown. // The previous is automatically closed. script_notification_map_t::iterator it = mNotifications.find(object_id); if(it != mNotifications.end()) { + LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", it->second.notification_id); + if(floater) + { + // Generate chiclet with a "new message" indicator if a docked window was opened. See EXT-3142. + set_new_message = floater->isShown(); + } + onRemoveNotification(it->second.notification_id); } @@ -229,7 +240,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) LLBottomTray::getInstance()->getChicletPanel()->createChiclet<LLScriptChiclet>(object_id); } - toggleScriptFloater(object_id); + toggleScriptFloater(object_id, set_new_message); } void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) @@ -278,13 +289,13 @@ void LLScriptFloaterManager::removeNotificationByObjectId(const LLUUID& object_i } } -void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& object_id) +void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& object_id, bool set_new_message) { // hide "new message" icon from chiclet LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(object_id); if(chiclet) { - chiclet->setShowNewMessagesIcon(false); + chiclet->setShowNewMessagesIcon(set_new_message); } // kill toast diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 8b5a266691..8de7a28d0f 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -70,7 +70,7 @@ public: * Toggles script floater. * Removes "new message" icon from chiclet and removes notification toast. */ - void toggleScriptFloater(const LLUUID& object_id); + void toggleScriptFloater(const LLUUID& object_id, bool set_new_message = false); LLUUID findObjectId(const LLUUID& notification_id); |