aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloateravatarinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloateravatarinfo.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/linden/indra/newview/llfloateravatarinfo.cpp b/linden/indra/newview/llfloateravatarinfo.cpp
index b4c23c2..2cd6ee2 100644
--- a/linden/indra/newview/llfloateravatarinfo.cpp
+++ b/linden/indra/newview/llfloateravatarinfo.cpp
@@ -15,12 +15,12 @@
15 * ("GPL"), unless you have obtained a separate licensing agreement 15 * ("GPL"), unless you have obtained a separate licensing agreement
16 * ("Other License"), formally executed by you and Linden Lab. Terms of 16 * ("Other License"), formally executed by you and Linden Lab. Terms of
17 * the GPL can be found in doc/GPL-license.txt in this distribution, or 17 * the GPL can be found in doc/GPL-license.txt in this distribution, or
18 * online at http://secondlife.com/developers/opensource/gplv2 18 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
19 * 19 *
20 * There are special exceptions to the terms and conditions of the GPL as 20 * There are special exceptions to the terms and conditions of the GPL as
21 * it is applied to this Source Code. View the full text of the exception 21 * it is applied to this Source Code. View the full text of the exception
22 * in the file doc/FLOSS-exception.txt in this software distribution, or 22 * in the file doc/FLOSS-exception.txt in this software distribution, or
23 * online at http://secondlife.com/developers/opensource/flossexception 23 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
24 * 24 *
25 * By copying, modifying or distributing this software, you acknowledge 25 * By copying, modifying or distributing this software, you acknowledge
26 * that you have read and understood your obligations described above, 26 * that you have read and understood your obligations described above,
@@ -79,7 +79,9 @@ LLMap< const LLUUID, LLFloaterAvatarInfo* > gAvatarInfoInstances;
79class LLAgentHandler : public LLCommandHandler 79class LLAgentHandler : public LLCommandHandler
80{ 80{
81public: 81public:
82 LLAgentHandler() : LLCommandHandler("agent") { } 82 // don't allow from external browsers
83 LLAgentHandler() : LLCommandHandler("agent", false) { }
84
83 bool handle(const LLSD& params, const LLSD& queryMap) 85 bool handle(const LLSD& params, const LLSD& queryMap)
84 { 86 {
85 if (params.size() < 2) return false; 87 if (params.size() < 2) return false;
@@ -224,6 +226,34 @@ void LLFloaterAvatarInfo::showFromFriend(const LLUUID& agent_id, BOOL online)
224} 226}
225 227
226 228
229// static
230void LLFloaterAvatarInfo::showFromProfile(const LLUUID &avatar_id, LLRect rect)
231{
232 if (avatar_id.isNull())
233 {
234 return;
235 }
236
237 LLFloaterAvatarInfo *floater;
238 if (gAvatarInfoInstances.checkData(avatar_id))
239 {
240 // ...bring that window to front
241 floater = gAvatarInfoInstances.getData(avatar_id);
242 }
243 else
244 {
245 floater = new LLFloaterAvatarInfo("avatarinfo", FAI_RECT,
246 avatar_id);
247 floater->translate(rect.mLeft - floater->mRect.mLeft + 16,
248 rect.mTop - floater->mRect.mTop - 16);
249 floater->mPanelAvatarp->setAvatarID(avatar_id, "", ONLINE_STATUS_NO);
250 }
251 if (floater)
252 {
253 floater->open();
254 }
255}
256
227void LLFloaterAvatarInfo::showProfileCallback(S32 option, void *userdata) 257void LLFloaterAvatarInfo::showProfileCallback(S32 option, void *userdata)
228{ 258{
229 if (option == 0) 259 if (option == 0)