summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llavataractions.cpp34
-rw-r--r--indra/newview/llavataractions.h1
-rw-r--r--indra/newview/llfloateravatarpicker.cpp18
-rw-r--r--indra/newview/llfloaterbuyland.cpp3
-rw-r--r--indra/newview/llfloaterland.cpp6
-rw-r--r--indra/newview/llfloaterregioninfo.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp17
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml14
8 files changed, 41 insertions, 54 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 6534f7921c..89711de6f0 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -81,22 +81,13 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
}
LLSD args;
- args["NAME"] = LLSLURL("agent", id, "inspect").getSLURLString();
+ args["NAME"] = LLSLURL("agent", id, "completename").getSLURLString();
LLSD payload;
payload["id"] = id;
payload["name"] = name;
- // Look for server versions like: Second Life Server 1.24.4.95600
- if (gLastVersionChannel.find(" 1.24.") != std::string::npos)
- {
- // Old and busted server version, doesn't support friend
- // requests with messages.
- LLNotificationsUtil::add("AddFriend", args, payload, &callbackAddFriend);
- }
- else
- {
- LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
- }
-
+
+ LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
+
// add friend to recent people list
LLRecentPeople::instance().add(id);
}
@@ -716,23 +707,6 @@ bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& respo
}
return false;
}
-// static
-bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option == 0)
- {
- // Servers older than 1.25 require the text of the message to be the
- // calling card folder ID for the offering user. JC
- LLUUID calling_card_folder_id =
- gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD);
- std::string message = calling_card_folder_id.asString();
- requestFriendship(notification["payload"]["id"].asUUID(),
- notification["payload"]["name"].asString(),
- message);
- }
- return false;
-}
// static
void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message)
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index d106a83eea..2d69c01ffe 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -184,7 +184,6 @@ public:
private:
- static bool callbackAddFriend(const LLSD& notification, const LLSD& response);
static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
static bool handleRemove(const LLSD& notification, const LLSD& response);
static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id);
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index d9c580320a..b533e394ff 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -177,7 +177,20 @@ static void getSelectedAvatarData(const LLScrollListCtrl* from, uuid_vec_t& avat
if (item->getUUID().notNull())
{
avatar_ids.push_back(item->getUUID());
- avatar_names.push_back(sAvatarNameMap[item->getUUID()]);
+
+ std::map<LLUUID, LLAvatarName>::iterator iter = sAvatarNameMap.find(item->getUUID());
+ if (iter != sAvatarNameMap.end())
+ {
+ avatar_names.push_back(iter->second);
+ }
+ else
+ {
+ // the only case where it isn't in the name map is friends
+ // but it should be in the name cache
+ LLAvatarName av_name;
+ LLAvatarNameCache::get(item->getUUID(), &av_name);
+ avatar_names.push_back(av_name);
+ }
}
}
}
@@ -280,6 +293,8 @@ void LLFloaterAvatarPicker::populateNearMe()
element["columns"][0]["value"] = av_name.mDisplayName;
element["columns"][1]["column"] = "username";
element["columns"][1]["value"] = av_name.mUsername;
+
+ sAvatarNameMap[av] = av_name;
}
near_me_scroller->addElement(element);
empty = FALSE;
@@ -314,7 +329,6 @@ void LLFloaterAvatarPicker::populateFriend()
LLAvatarTracker::instance().applyFunctor(collector);
LLCollectAllBuddies::buddy_map_t::iterator it;
-
for(it = collector.mOnline.begin(); it!=collector.mOnline.end(); it++)
{
friends_scroller->addStringUUIDItem(it->first, it->second);
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 292c88441a..2faa9531c4 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -829,8 +829,7 @@ void LLFloaterBuyLandUI::updateNames()
}
else
{
- mParcelSellerName =
- LLSLURL("agent", parcelp->getOwnerID(), "inspect").getSLURLString();
+ mParcelSellerName = LLSLURL("agent", parcelp->getOwnerID(), "completename").getSLURLString();
}
}
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 167d4b09f7..2b24189813 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1390,7 +1390,7 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co
}
else
{
- args["NAME"] = LLSLURL("agent", owner_id, "inspect").getSLURLString();
+ args["NAME"] = LLSLURL("agent", owner_id, "completename").getSLURLString();
LLNotificationsUtil::add("OtherObjectsReturned", args);
}
send_return_objects_message(parcel->getLocalID(), RT_OWNER);
@@ -1719,7 +1719,7 @@ void LLPanelLandObjects::onClickReturnOwnerObjects(void* userdata)
}
else
{
- args["NAME"] = LLSLURL("agent", owner_id, "inspect").getSLURLString();
+ args["NAME"] = LLSLURL("agent", owner_id, "completename").getSLURLString();
LLNotificationsUtil::add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2));
}
}
@@ -1778,7 +1778,7 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
}
else
{
- args["NAME"] = LLSLURL("agent", owner_id, "inspect").getSLURLString();
+ args["NAME"] = LLSLURL("agent", owner_id, "completename").getSLURLString();
LLNotificationsUtil::add("ReturnObjectsNotOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
}
}
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index df400b65d6..590e14a362 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -1538,7 +1538,7 @@ void LLPanelEstateInfo::onKickUserCommit(const uuid_vec_t& ids)
//Bring up a confirmation dialog
LLSD args;
- args["EVIL_USER"] = LLSLURL("agent", ids[0], "inspect").getSLURLString();
+ args["EVIL_USER"] = LLSLURL("agent", ids[0], "completename").getSLURLString();
LLSD payload;
payload["agent_id"] = ids[0];
LLNotificationsUtil::add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, this, _1, _2));
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 704f4b4902..cca1415f9c 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2055,6 +2055,16 @@ static std::string clean_name_from_task_im(const std::string& msg,
return msg;
}
+void notification_display_name_callback(const LLUUID& id,
+ const LLAvatarName& av_name,
+ const std::string& name,
+ LLSD& substitutions,
+ const LLSD& payload)
+{
+ substitutions["NAME"] = av_name.mDisplayName;
+ LLNotificationsUtil::add(name, substitutions, payload);
+}
+
void process_improved_im(LLMessageSystem *msg, void **user_data)
{
if (gNoRender)
@@ -2817,7 +2827,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
args["NAME"] = name;
LLSD payload;
payload["from_id"] = from_id;
- LLNotificationsUtil::add("FriendshipAccepted", args, payload);
+ LLAvatarNameCache::get(from_id, boost::bind(&notification_display_name_callback,
+ _1,
+ _2,
+ "FriendshipAccepted",
+ args,
+ payload));
}
break;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 904084cfa7..5bae6271be 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2009,20 +2009,6 @@ You do not have permission to buy land for your active group.
<notification
icon="alertmodal.tga"
label="Add Friend"
- name="AddFriend"
- type="alertmodal">
-Friends can give permissions to track each other on the map and receive online status updates.
-
-Offer friendship to [NAME]?
- <usetemplate
- name="okcancelbuttons"
- notext="Cancel"
- yestext="OK"/>
- </notification>
-
- <notification
- icon="alertmodal.tga"
- label="Add Friend"
name="AddFriendWithMessage"
type="alertmodal">
Friends can give permissions to track each other on the map and receive online status updates.