From 48a75e9963d6e4f857fa14232ee5d7847f57c329 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Tue, 1 Dec 2009 18:17:38 +0200 Subject: implemented normal task EXT-2471 llLoadURL should be handled also by Chiclet subsystem along with Notificaton subsystem --HG-- branch : product-engine --- indra/newview/llscriptfloater.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llscriptfloater.cpp') diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index c58caf9c60..7c4f3d3608 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -41,6 +41,7 @@ #include "llscreenchannel.h" #include "lltoastnotifypanel.h" #include "llviewerwindow.h" +#include "llimfloater.h" ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -212,6 +213,8 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) mNotifications.insert(std::make_pair(object_id, nd)); LLBottomTray::getInstance()->getChicletPanel()->createChiclet(object_id); + + toggleScriptFloater(object_id); } void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) -- cgit v1.2.3 From 06d5706cdcc690c713dcd832a878e830afbb4a59 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 1 Dec 2009 22:30:04 +0200 Subject: Implemented normal sub-task EXT-2478(Implement a chiclet for the llGiveInventory() processing) --HG-- branch : product-engine --- indra/newview/llscriptfloater.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llscriptfloater.cpp') diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 7c4f3d3608..155172128b 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -212,7 +212,16 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) LLNotificationData nd = {notification_id}; mNotifications.insert(std::make_pair(object_id, nd)); - LLBottomTray::getInstance()->getChicletPanel()->createChiclet(object_id); + // Create inventory offer chiclet for offer type notifications + LLNotificationPtr notification = LLNotifications::getInstance()->find(notification_id); + if( notification && notification->getType() == "offer" ) + { + LLBottomTray::instance().getChicletPanel()->createChiclet(object_id); + } + else + { + LLBottomTray::getInstance()->getChicletPanel()->createChiclet(object_id); + } toggleScriptFloater(object_id); } -- cgit v1.2.3 From 963c2240f4584f16b5e003b506c8c608331d8585 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 2 Dec 2009 16:53:13 +0200 Subject: Update for normal task EXT-2081 - Object IM chiclets art needs to be hooked up to LLDialog chiclets. Disabled notification toast. --HG-- branch : product-engine --- indra/newview/llscriptfloater.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llscriptfloater.cpp') diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 155172128b..ad95c8b06e 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -62,7 +62,7 @@ LLUUID notification_id_to_object_id(const LLUUID& notification_id) ////////////////////////////////////////////////////////////////////////// LLScriptFloater::LLScriptFloater(const LLSD& key) -: LLTransientDockableFloater(NULL, true, key) +: LLDockableFloater(NULL, true, key) , mScriptForm(NULL) , mObjectId(key.asUUID()) { @@ -161,14 +161,14 @@ void LLScriptFloater::onClose(bool app_quitting) void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */) { - LLTransientDockableFloater::setDocked(docked, pop_on_undock); + LLDockableFloater::setDocked(docked, pop_on_undock); hideToastsIfNeeded(); } void LLScriptFloater::setVisible(BOOL visible) { - LLTransientDockableFloater::setVisible(visible); + LLDockableFloater::setVisible(visible); hideToastsIfNeeded(); } -- cgit v1.2.3 From 7dce1bad0c4e7d3f9cebd11173146fc775f687f3 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 3 Dec 2009 17:55:17 +0200 Subject: Fixed normal bug EXT-3021 - Viewer crashes on receiving notification for creating script(offer) chiclet for same object in second time. --HG-- branch : product-engine --- indra/newview/llscriptfloater.cpp | 46 +++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 11 deletions(-) (limited to 'indra/newview/llscriptfloater.cpp') diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index ad95c8b06e..088884178b 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -64,13 +64,13 @@ LLUUID notification_id_to_object_id(const LLUUID& notification_id) LLScriptFloater::LLScriptFloater(const LLSD& key) : LLDockableFloater(NULL, true, key) , mScriptForm(NULL) -, mObjectId(key.asUUID()) { } bool LLScriptFloater::toggle(const LLUUID& object_id) { - LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", object_id); + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); + LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", notification_id); // show existing floater if(floater) @@ -97,7 +97,10 @@ bool LLScriptFloater::toggle(const LLUUID& object_id) LLScriptFloater* LLScriptFloater::show(const LLUUID& object_id) { - LLScriptFloater* floater = LLFloaterReg::showTypedInstance("script_floater", object_id); + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); + + LLScriptFloater* floater = LLFloaterReg::showTypedInstance("script_floater", notification_id); + floater->setObjectId(object_id); floater->createForm(object_id); if (floater->getDockControl() == NULL) @@ -156,7 +159,10 @@ void LLScriptFloater::createForm(const LLUUID& object_id) void LLScriptFloater::onClose(bool app_quitting) { - LLScriptFloaterManager::getInstance()->removeNotificationByObjectId(getObjectId()); + if(getObjectId().notNull()) + { + LLScriptFloaterManager::getInstance()->removeNotificationByObjectId(getObjectId()); + } } void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */) @@ -206,7 +212,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) script_notification_map_t::iterator it = mNotifications.find(object_id); if(it != mNotifications.end()) { - onRemoveNotification(notification_id); + onRemoveNotification(it->second.notification_id); } LLNotificationData nd = {notification_id}; @@ -228,7 +234,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) { - LLUUID object_id = notification_id_to_object_id(notification_id); + LLUUID object_id = findObjectId(notification_id); if(object_id.isNull()) { llwarns << "Invalid notification, no object id" << llendl; @@ -241,22 +247,24 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) LLUUID channel_id(gSavedSettings.getString("NotificationChannelUUID")); LLScreenChannel* channel = dynamic_cast (LLChannelManager::getInstance()->findChannelByID(channel_id)); - if(channel) + LLUUID n_toast_id = findNotificationToastId(object_id); + if(channel && n_toast_id.notNull()) { - channel->killToastByNotificationID(findNotificationToastId(object_id)); + channel->killToastByNotificationID(n_toast_id); } - mNotifications.erase(object_id); - // remove related chiclet LLBottomTray::getInstance()->getChicletPanel()->removeChiclet(object_id); // close floater - LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", object_id); + LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", notification_id); if(floater) { + floater->setObjectId(LLUUID::null); floater->closeFloater(); } + + mNotifications.erase(object_id); } void LLScriptFloaterManager::removeNotificationByObjectId(const LLUUID& object_id) @@ -301,6 +309,22 @@ void LLScriptFloaterManager::setNotificationToastId(const LLUUID& object_id, con } } +LLUUID LLScriptFloaterManager::findObjectId(const LLUUID& notification_id) +{ + if(notification_id.notNull()) + { + script_notification_map_t::const_iterator it = mNotifications.begin(); + for(; mNotifications.end() != it; ++it) + { + if(notification_id == it->second.notification_id) + { + return it->first; + } + } + } + return LLUUID::null; +} + LLUUID LLScriptFloaterManager::findNotificationId(const LLUUID& object_id) { script_notification_map_t::const_iterator it = mNotifications.find(object_id); -- cgit v1.2.3