summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-11-18 17:23:55 -0800
committerMerov Linden <merov@lindenlab.com>2011-11-18 17:23:55 -0800
commitf00211cb6649acdc4ccfd1d4ded921b1b05a899c (patch)
treebbd4bba7a0145d2877218d75be0e9f6c7a83eb93
parent7c2bbfc4fc905e8fff63d58f19f5e22cd755281c (diff)
parent7a29e9bb5a4d3cddd4021400a52327b18b24cbe7 (diff)
Pull from viewer-experience
-rw-r--r--autobuild.xml8
-rwxr-xr-xindra/newview/app_settings/settings.xml4
-rwxr-xr-xindra/newview/llavataractions.cpp31
-rwxr-xr-xindra/newview/llpanelpicks.cpp11
-rwxr-xr-xindra/newview/llpanelprofile.cpp17
-rwxr-xr-xindra/newview/llpanelprofile.h1
-rw-r--r--indra/newview/llviewerfloaterreg.cpp1
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_web_profile.xml9
10 files changed, 65 insertions, 20 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 1b8a61acad..bb6de76d7a 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1206,9 +1206,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c006dd7f1f7a9d4cb9e2bbf311dd1973</string>
+ <string>4b144790799df284f2ebe739a21aa4ec</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244983/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111110.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/245528/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111118.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1230,9 +1230,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>8e7bbe2ee0a281fdd9c8af0c8f75d206</string>
+ <string>60a36c75456eaffc4858bc11df1c49a9</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244983/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111110.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/245528/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111118.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8138643385..cf14886e9f 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12947,7 +12947,7 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>768</integer>
+ <integer>600</integer>
</map>
<key>WindowHeight</key>
<map>
@@ -12980,7 +12980,7 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>1024</integer>
+ <integer>960</integer>
</map>
<key>WindowWidth</key>
<map>
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 10fd6b739e..7f6abb0937 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -302,6 +302,25 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids)
make_ui_sound("UISndStartIM");
}
+static const LLRect& get_preferred_profile_rect(const LLUUID& avatar_id)
+{
+ if (avatar_id == gAgentID)
+ {
+ return LLRect::null; // no preference
+ }
+
+ // Preferred size for all residents' profiles except our own,
+ // for which saved_rect will be used.
+ static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
+ return profile_rect;
+}
+
+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;
@@ -315,14 +334,13 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
// 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);
+ preferred_media_size(get_preferred_profile_rect(agent_id));
+ LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p);
}
// static
@@ -339,14 +357,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 +374,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();
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 50dc66ed7c..244108162b 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -1048,13 +1048,10 @@ void LLPanelPicks::createPickInfoPanel()
void LLPanelPicks::createClassifiedInfoPanel()
{
- if(!mPanelClassifiedInfo)
- {
- mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
- mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
- mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
- mPanelClassifiedInfo->setVisible(FALSE);
- }
+ mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
+ mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
+ mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
+ mPanelClassifiedInfo->setVisible(FALSE);
}
void LLPanelPicks::createClassifiedEditPanel(LLPanelClassifiedEdit** panel)
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index c237bf1d06..b1eeabb028 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -167,6 +167,23 @@ LLPanelProfile::ChildStack::ChildStack()
{
}
+LLPanelProfile::ChildStack::~ChildStack()
+{
+ while (mStack.size() != 0)
+ {
+ view_list_t& top = mStack.back();
+ for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
+ {
+ LLView* viewp = *it;
+ if (viewp)
+ {
+ delete viewp;
+ }
+ }
+ mStack.pop_back();
+ }
+}
+
void LLPanelProfile::ChildStack::setParent(LLPanel* parent)
{
llassert_always(parent != NULL);
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index bd4457c240..d97f60ed22 100755
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -74,6 +74,7 @@ private:
LOG_CLASS(LLPanelProfile::ChildStack);
public:
ChildStack();
+ ~ChildStack();
void setParent(LLPanel* parent);
bool push();
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 273bf822bc..0ec8cc1d4e 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -285,6 +285,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
+ LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 22d95563d8..81311b03f5 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3122,7 +3122,7 @@ void handle_avatar_eject(const LLSD& avatar_id)
bool my_profile_visible()
{
- LLFloater* floaterp = LLFloaterReg::findInstance("profile", LLSD().with("id", gAgent.getID()));
+ LLFloater* floaterp = LLAvatarActions::getProfileFloater(gAgentID);
return floaterp && floaterp->isInVisibleChain();
}
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index cb7d91abb8..0ef6709f11 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -5,6 +5,7 @@
default_tab_group="1"
follows="all"
height="350"
+ help_topic="floater_im_box"
layout="topleft"
name="panel_im"
can_dock="false"
diff --git a/indra/newview/skins/default/xui/en/floater_my_web_profile.xml b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
new file mode 100644
index 0000000000..df46fc198f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_my_web_profile"
+ help_topic="web_profile"
+ width="780"
+ height="775"
+ save_rect="true"
+ single_instance="true"
+ reuse_instance="false"
+ filename="floater_web_content.xml"/> \ No newline at end of file