diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fccd2b2e54..317eecb7a3 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -906,7 +906,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 +925,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 @@ -1365,10 +1366,9 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //TODO* CHAT: how to show this? - //LLSD args; - //args["MESSAGE"] = log_message; - //LLNotificationsUtil::add("SystemMessage", args); + LLSD args; + args["MESSAGE"] = log_message; + LLNotificationsUtil::add("SystemMessage", args); } // we will want to open this item when it comes back. @@ -1410,11 +1410,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); - //TODO* CHAT: how to show this? - //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; - //LLSD args; - //args["MESSAGE"] = log_message; - //LLNotificationsUtil::add("SystemMessage", args); + log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; + LLSD args; + args["MESSAGE"] = log_message; + LLNotificationsUtil::add("SystemMessage", args); if (busy && (!mFromGroup && !mFromObject)) { @@ -1473,11 +1472,6 @@ void inventory_offer_handler(LLOfferInfo* info) LLStringUtil::truncate(msg, indx); } - if(LLAssetType::AT_LANDMARK == info->mType) - { - msg = LLViewerInventoryItem::getDisplayName(msg); - } - LLSD args; args["[OBJECTNAME]"] = msg; @@ -1843,11 +1837,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // history. Pretend the chat is from a local agent, // so it will go into the history but not be shown on screen. - //TODO* CHAT: how to show this? - //and this is not system message... - //LLSD args; - //args["MESSAGE"] = buffer; - //LLNotificationsUtil::add("SystemMessage", args); + LLSD args; + args["MESSAGE"] = buffer; + LLNotificationsUtil::add("SystemMessageTip", args); } } break; @@ -1911,7 +1903,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; @@ -1965,6 +1957,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: @@ -2025,6 +2021,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]; @@ -2036,6 +2033,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]; @@ -2181,10 +2179,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) query_string["groupowned"] = "true"; } - std::ostringstream link; - link << "secondlife:///app/objectim/" << session_id << LLURI::mapToQueryString(query_string); - - chat.mURL = link.str(); + chat.mURL = LLSLURL("objectim", session_id, "").getSLURLString(); chat.mText = message; chat.mSourceType = CHAT_SOURCE_OBJECT; @@ -2215,7 +2210,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); } @@ -2517,7 +2512,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; @@ -2546,7 +2541,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) @@ -2691,8 +2686,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); } } @@ -3078,10 +3078,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { // Chat the "back" SLURL. (DEV-4907) - //TODO* CHAT: how to show this? - //LLSD args; - //args["MESSAGE"] = message; - //LLNotificationsUtil::add("SystemMessage", args); + LLSD args; + args["MESSAGE"] = "Teleport completed from " + gAgent.getTeleportSourceSLURL().getSLURLString(); + LLNotificationsUtil::add("SystemMessageTip", args); // Set the new position avatarp->setPositionAgent(agent_pos); |