summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rwxr-xr-xindra/newview/llavataractions.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 10fd6b739e..8ca621538f 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -302,6 +302,12 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids)
make_ui_sound("UISndStartIM");
}
+static const char* get_profile_floater_name(const LLUUID& avatar_id)
+{
+ // Use different floater XML for our profile to be able to save its rect.
+ return avatar_id == gAgentID ? "my_profile" : "profile";
+}
+
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
{
std::string username = av_name.mUsername;
@@ -314,15 +320,10 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
std::string url = getProfileURL(username);
// PROFILES: open in webkit window
- const bool show_chrome = false;
- static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
LLFloaterWebContent::Params p;
p.url(url).
- id(agent_id.asString()).
- show_chrome(show_chrome).
- window_class("profile").
- preferred_media_size(profile_rect);
- LLFloaterReg::showInstance("profile", p);
+ id(agent_id.asString());
+ LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p);
}
// static
@@ -339,14 +340,15 @@ bool LLAvatarActions::profileVisible(const LLUUID& id)
{
LLSD sd;
sd["id"] = id;
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
+ LLFloater* browser = getProfileFloater(id);
return browser && browser->isShown();
}
//static
LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id)
{
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", LLSD().with("id", id)));
+ LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*>
+ (LLFloaterReg::findInstance(get_profile_floater_name(id), LLSD().with("id", id)));
return browser;
}
@@ -355,7 +357,7 @@ void LLAvatarActions::hideProfile(const LLUUID& id)
{
LLSD sd;
sd["id"] = id;
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
+ LLFloater* browser = getProfileFloater(id);
if (browser)
{
browser->closeFloater();