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.cpp59
1 files changed, 20 insertions, 39 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d6ce356c4b..9240833632 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -630,7 +630,6 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
delete_context_data = FALSE;
LLSD args;
args["NAME"] = name;
- args["INVITE"] = message;
LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification["payload"]);
}
}
@@ -906,7 +905,7 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f
if ("inventory_handler" == from_name)
{
//we have to filter inventory_handler messages to avoid notification displaying
- LLSideTray::getInstance()->showPanel("panel_places",
+ LLSideTray::getInstance()->showPanel("panel_places",
LLSD().with("type", "landmark").with("id", item->getUUID()));
}
else if("group_offer" == from_name)
@@ -925,8 +924,9 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f
args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown");
LLNotificationsUtil::add("LandmarkCreated", args);
// Created landmark is passed to Places panel to allow its editing. In fact panel should be already displayed.
+ // If the panel is closed we don't reopen it until created landmark is loaded.
//TODO*:: dserduk(7/12/09) remove LLPanelPlaces dependency from here
- LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", LLSD()));
+ LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->getPanel("panel_places"));
if (places_panel)
{
// we are creating a landmark
@@ -1434,31 +1434,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
return false;
}
-std::string get_display_name(const std::string& name)
-{
- // We receive landmark name as \'<n>@name\' where <n> is a number
- // LLViewerInventoryItem::getDisplayName will remove \'<n>@ though we need the \'
- // Lets save all chars preceding @ and insert them back after <n>@ was removed
-
- std::string saved;
-
- if(std::string::npos != name.find(LLViewerInventoryItem::getSeparator()))
- {
- int n = 0;
- while(!isdigit(name[n]) && LLViewerInventoryItem::getSeparator() != name[n])
- {
- ++n;
- }
- saved = name.substr(0, n);
- }
-
- std::string d_name = LLViewerInventoryItem::getDisplayName(name);
- d_name.insert(0, saved);
- LLStringUtil::trim(d_name);
-
- return d_name;
-}
-
void inventory_offer_handler(LLOfferInfo* info)
{
//Until throttling is implmented, busy mode should reject inventory instead of silently
@@ -1496,11 +1471,6 @@ void inventory_offer_handler(LLOfferInfo* info)
LLStringUtil::truncate(msg, indx);
}
- if(LLAssetType::AT_LANDMARK == info->mType)
- {
- msg = get_display_name(msg);
- }
-
LLSD args;
args["[OBJECTNAME]"] = msg;
@@ -1932,7 +1902,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if (has_inventory)
{
- info = new LLOfferInfo;
+ info = new LLOfferInfo();
info->mIM = IM_GROUP_NOTICE;
info->mFromID = from_id;
@@ -1986,6 +1956,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLPanelGroup::showNotice(subj,mes,group_id,has_inventory,item_name,info);
}
+ else
+ {
+ delete info;
+ }
}
break;
case IM_GROUP_INVITATION:
@@ -2046,6 +2020,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if (sizeof(offer_agent_bucket_t) != binary_bucket_size)
{
LL_WARNS("Messaging") << "Malformed inventory offer from agent" << LL_ENDL;
+ delete info;
break;
}
bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
@@ -2057,6 +2032,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if (sizeof(S8) != binary_bucket_size)
{
LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL;
+ delete info;
break;
}
info->mType = (LLAssetType::EType) binary_bucket[0];
@@ -2236,7 +2212,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
payload["SESSION_NAME"] = session_name;
if (from_group)
{
- payload["groupowned"] = "true";
+ payload["group_owned"] = "true";
}
LLNotificationsUtil::add("ServerObjectMessage", substitutions, payload);
}
@@ -2538,7 +2514,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// Object owner for objects
msg->getUUID("ChatData", "OwnerID", owner_id);
-
+
msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp);
chat.mSourceType = (EChatSourceType)source_temp;
@@ -2567,7 +2543,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
if (chatter)
{
chat.mPosAgent = chatter->getPositionAgent();
-
+
// Make swirly things only for talking objects. (not script debug messages, though)
if (chat.mSourceType == CHAT_SOURCE_OBJECT
&& chat.mChatType != CHAT_TYPE_DEBUG_MSG)
@@ -2712,8 +2688,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
chat.mMuted = is_muted && !is_linden;
- LLNotificationsUI::LLNotificationManager::instance().onChat(
- chat, LLNotificationsUI::NT_NEARBYCHAT);
+ // pass owner_id to chat so that we can display the remote
+ // object inspect for an object that is chatting with you
+ LLSD args;
+ args["type"] = LLNotificationsUI::NT_NEARBYCHAT;
+ args["owner_id"] = owner_id;
+
+ LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args);
}
}