Skip to content
Snippets Groups Projects
Commit 66de8ba9 authored by Richard Linden's avatar Richard Linden
Browse files

SOCIAL-551 WIP Add buttons to open people and profile windows

added LLAvatarActions::profileVisible and hideProfile
parent cc337162
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "llfloatergroups.h" #include "llfloatergroups.h"
#include "llfloaterreg.h" #include "llfloaterreg.h"
#include "llfloaterpay.h" #include "llfloaterpay.h"
#include "llfloaterwebcontent.h"
#include "llfloaterworldmap.h" #include "llfloaterworldmap.h"
#include "llgiveinventory.h" #include "llgiveinventory.h"
#include "llinventorybridge.h" #include "llinventorybridge.h"
...@@ -315,7 +316,7 @@ void LLAvatarActions::showProfile(const LLUUID& id) ...@@ -315,7 +316,7 @@ void LLAvatarActions::showProfile(const LLUUID& id)
std::string agent_name = LLCacheName::buildUsername(full_name); std::string agent_name = LLCacheName::buildUsername(full_name);
llinfos << "opening web profile for " << agent_name << llendl; llinfos << "opening web profile for " << agent_name << llendl;
std::string url = getProfileURL(agent_name); std::string url = getProfileURL(agent_name);
LLWeb::loadWebURLInternal(url); LLWeb::loadWebURLInternal(url, "", id.asString());
} }
else else
{ {
...@@ -336,6 +337,36 @@ void LLAvatarActions::showProfile(const LLUUID& id) ...@@ -336,6 +337,36 @@ void LLAvatarActions::showProfile(const LLUUID& id)
} }
} }
//static
bool LLAvatarActions::profileVisible(const LLUUID& id)
{
LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", id.asString()));
if (browser)
{
// PROFILES: open in webkit window
std::string full_name;
if (gCacheName->getFullName(id,full_name))
{
std::string agent_name = LLCacheName::buildUsername(full_name);
llinfos << "opening web profile for " << agent_name << llendl;
std::string url = getProfileURL(agent_name);
return url == browser->getURL();
}
}
return false;
}
//static
void LLAvatarActions::hideProfile(const LLUUID& id)
{
LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", id.asString()));
if (browser)
{
browser->closeFloater();
}
}
// static // static
void LLAvatarActions::showOnMap(const LLUUID& id) void LLAvatarActions::showOnMap(const LLUUID& id)
{ {
......
...@@ -93,6 +93,8 @@ class LLAvatarActions ...@@ -93,6 +93,8 @@ class LLAvatarActions
* Show avatar profile. * Show avatar profile.
*/ */
static void showProfile(const LLUUID& id); static void showProfile(const LLUUID& id);
static void hideProfile(const LLUUID& id);
static bool profileVisible(const LLUUID& id);
/** /**
* Show avatar on world map. * Show avatar on world map.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment