From b79ccf9dd76104d53e4da6845b970bd13717ff8f Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Fri, 18 Nov 2011 20:02:54 +0200 Subject: EXP-1554 FIXED (Selecting More Info for more than one Classified section in Search floater, breaks the navigation history in Picks Floater) - For each classified info create a new instance of LLPanelClassifiedInfo - Added destructor for LLPanelProfile::ChildStack to avoid memory leak --- indra/newview/llpanelpicks.cpp | 11 ++++------- indra/newview/llpanelprofile.cpp | 17 +++++++++++++++++ indra/newview/llpanelprofile.h | 1 + 3 files changed, 22 insertions(+), 7 deletions(-) (limited to 'indra/newview') 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(); -- cgit v1.2.3 From 1543f98bab0ca7445c09e63644c8a5e428f9c5b1 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 18 Nov 2011 22:19:57 +0200 Subject: EXP-1501 FIX Specified help topic for the IM floater. --- indra/newview/skins/default/xui/en/floater_im_session.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') 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" -- cgit v1.2.3 From 649beed53bd44ae5b06cd36f40897ed561fe48ab Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 18 Nov 2011 22:23:09 +0200 Subject: EXP-1577 FIX Made agent profile position and size persistent. Enable My Profile to use saved_rect. Value of the "WebProfileRect" setting is ignored in this case. --- indra/newview/llavataractions.cpp | 31 +++++++++-- indra/newview/llviewerfloaterreg.cpp | 1 + indra/newview/llviewermenu.cpp | 2 +- .../default/xui/en/floater_my_web_profile.xml | 9 +++ .../skins/default/xui/en/panel_snapshot_local.xml | 65 ++++++++++++++++++++++ 5 files changed, 101 insertions(+), 7 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_my_web_profile.xml (limited to 'indra/newview') 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 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 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 (LLFloaterReg::findInstance("profile", sd)); + LLFloater* browser = getProfileFloater(id); return browser && browser->isShown(); } //static LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id) { - LLFloaterWebContent *browser = dynamic_cast (LLFloaterReg::findInstance("profile", LLSD().with("id", id))); + LLFloaterWebContent *browser = dynamic_cast + (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 (LLFloaterReg::findInstance("profile", sd)); + LLFloater* browser = getProfileFloater(id); if (browser) { browser->closeFloater(); 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); LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + 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_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 @@ + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml index 4d6c4bcdfa..a9b373430a 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml @@ -80,6 +80,7 @@ name="Custom" value="[i-1,i-1]" /> + + + +