summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 53fb01aec3..04eb8164f8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1215,8 +1215,9 @@ bool highlight_offered_object(const LLUUID& obj_id)
void inventory_offer_mute_callback(const LLUUID& blocked_id,
const std::string& first_name,
const std::string& last_name,
- BOOL is_group, LLOfferInfo* offer = NULL)
+ BOOL is_group, boost::shared_ptr<LLNotificationResponderInterface> offer_ptr)
{
+ LLOfferInfo* offer = dynamic_cast<LLOfferInfo*>(offer_ptr.get());
std::string from_name;
LLMute::EType type;
if (is_group)
@@ -1406,7 +1407,13 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// * we can't build two messages at once.
if (2 == button) // Block
{
- gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
+ LLNotificationPtr notification_ptr = LLNotifications::instance().find(notification["id"].asUUID());
+
+ llassert(notification_ptr != NULL);
+ if (notification_ptr != NULL)
+ {
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4, notification_ptr->getResponderPtr()));
+ }
}
std::string from_string; // Used in the pop-up.
@@ -1540,7 +1547,13 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
// * we can't build two messages at once.
if (2 == button)
{
- gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
+ LLNotificationPtr notification_ptr = LLNotifications::instance().find(notification["id"].asUUID());
+
+ llassert(notification_ptr != NULL);
+ if (notification_ptr != NULL)
+ {
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4, notification_ptr->getResponderPtr()));
+ }
}
LLMessageSystem* msg = gMessageSystem;
@@ -5093,7 +5106,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
void process_alert_core(const std::string& message, BOOL modal)
{
- // HACK -- handle callbacks for specific alerts
+ // HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml
if ( message == "You died and have been teleported to your home location")
{
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);