Add getSLURL function to group and avatar actions

This commit is contained in:
Lirusaito
2019-03-27 19:09:38 -04:00
parent 81862e30d1
commit 5272c48b7a
4 changed files with 20 additions and 0 deletions

View File

@@ -1267,3 +1267,8 @@ void LLAvatarActions::copyUUIDs(const uuid_vec_t& ids)
if (!ids_string.empty())
gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(ids_string));
}
std::string LLAvatarActions::getSLURL(const LLUUID& id)
{
return llformat("secondlife:///app/agent/%s/about", id.asString());
}

View File

@@ -241,6 +241,11 @@ public:
*/
static void copyUUIDs(const uuid_vec_t& id);
/**
* @return slurl string from agent ID
*/
static std::string getSLURL(const LLUUID& id);
private:
static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
static bool handleRemove(const LLSD& notification, const LLSD& response);

View File

@@ -601,3 +601,8 @@ LLFloaterGroupInfo* LLGroupActions::openGroupProfile(const LLUUID& group_id)
return fgi;
}
std::string LLGroupActions::getSLURL(const LLUUID& id)
{
return llformat("secondlife:///app/group/%s/about", id.asString());
}

View File

@@ -121,6 +121,11 @@ public:
*/
static bool isAvatarMemberOfGroup(const LLUUID& group_id, const LLUUID& avatar_id);
/**
* @return slurl string from group ID
*/
static std::string getSLURL(const LLUUID& id);
private:
static bool onJoinGroup(const LLSD& notification, const LLSD& response);
static bool onLeaveGroup(const LLSD& notification, const LLSD& response);