summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-02-08 18:06:41 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-02-08 18:06:41 +0200
commitd2d6af3dfa0f8a423016f5972d44a9721b1be1ee (patch)
treeb67dc4d017c95c12a70965b6671736cfb1ad95ed /indra/newview/llchiclet.cpp
parenta35d61a6ec2545940f69b10e3e9111f21010a30a (diff)
Fixed critical bug EXT-4970 - Inventory offers by scripted objects are discarded when offered objects got the same name.
Had to do minor refactoring of LLScripFloaterManager in order to fix this issue. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r--indra/newview/llchiclet.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index db804c7c8b..8efa814a2e 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -1159,10 +1159,10 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
void object_chiclet_callback(const LLSD& data)
{
- LLUUID object_id = data["object_id"];
+ LLUUID notification_id = data["notification_id"];
bool new_message = data["new_message"];
- std::list<LLChiclet*> chiclets = LLIMChiclet::sFindChicletsSignal(object_id);
+ std::list<LLChiclet*> chiclets = LLIMChiclet::sFindChicletsSignal(notification_id);
std::list<LLChiclet *>::iterator iter;
for (iter = chiclets.begin(); iter != chiclets.end(); iter++)
{
@@ -1894,12 +1894,8 @@ void LLScriptChiclet::setSessionId(const LLUUID& session_id)
setShowNewMessagesIcon( getSessionId() != session_id );
LLIMChiclet::setSessionId(session_id);
- LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(session_id);
- LLNotificationPtr notification = LLNotifications::getInstance()->find(notification_id);
- if(notification)
- {
- setToolTip(notification->getSubstitutions()["TITLE"].asString());
- }
+
+ setToolTip(LLScriptFloaterManager::getObjectName(session_id));
}
void LLScriptChiclet::setCounter(S32 counter)
@@ -1948,13 +1944,10 @@ void LLInvOfferChiclet::setSessionId(const LLUUID& session_id)
{
setShowNewMessagesIcon( getSessionId() != session_id );
+ setToolTip(LLScriptFloaterManager::getObjectName(session_id));
+
LLIMChiclet::setSessionId(session_id);
- LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(session_id);
- LLNotificationPtr notification = LLNotifications::getInstance()->find(notification_id);
- if(notification)
- {
- setToolTip(notification->getSubstitutions()["TITLE"].asString());
- }
+ LLNotificationPtr notification = LLNotifications::getInstance()->find(session_id);
if ( notification && notification->getName() == INVENTORY_USER_OFFER )
{