summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
commitdb5cda26676f376f18816013c0c5e3fbad5b20d0 (patch)
treeb50e52262d34f55b4eaf35a3a1952007ef0a69de /indra/newview/llpanelprofile.cpp
parent3c85899ee0db4a90d03ec687e514a31c1befe34e (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1211 https://svn.aws.productengine.com/secondlife/pe/stable-1@1228 -> viewer-2.0.0-3
QA: New movement and camera controls. Test all movement and camera behavior against spec and expected behaviors, including sitting & standing. Many other changes to the bottom bar. Changes to local chat behavior.
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r--indra/newview/llpanelprofile.cpp48
1 files changed, 29 insertions, 19 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index deca08050b..f97105caa8 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -35,6 +35,8 @@
#include "lltabcontainer.h"
#include "llpanelpicks.h"
#include "llagent.h"
+#include "llcommandhandler.h"
+#include "llavataractions.h"
static const std::string PANEL_PICKS = "panel_picks";
static const std::string PANEL_NOTES = "panel_notes";
@@ -44,6 +46,33 @@ static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile(PANEL_P
static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks(PANEL_PICKS);
+class LLAgentHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLAgentHandler() : LLCommandHandler("agent", true) { }
+
+ bool handle(const LLSD& params, const LLSD& query_map,
+ LLWebBrowserCtrl* web)
+ {
+ if (params.size() < 2) return false;
+ LLUUID agent_id;
+ if (!agent_id.set(params[0], FALSE))
+ {
+ return false;
+ }
+
+ if (params[1].asString() == "about")
+ {
+ LLAvatarActions::showProfile(agent_id);
+ return true;
+ }
+ return false;
+ }
+};
+LLAgentHandler gAgentHandler;
+
+
LLPanelProfile::LLPanelProfile()
: LLPanel(),
mTabContainer(NULL)
@@ -68,25 +97,6 @@ BOOL LLPanelProfile::postBuild()
return TRUE;
}
-void LLPanelProfile::onOpen(const LLSD& key)
-{
- //*NOTE LLUUID::null in this context means Agent related stuff
- LLUUID id(key.has("id") ? key["id"].asUUID() : gAgentID);
- if (key.has("open_tab_name"))
- mTabContainer->selectTabByName(key["open_tab_name"]);
-
- if(id.notNull() && mAvatarId.notNull() && mAvatarId != id)
- {
- mTabs[PANEL_PROFILE]->clear();
- mTabs[PANEL_PICKS]->clear();
- mTabs[PANEL_NOTES]->clear();
- }
-
- mAvatarId = id;
-
- mTabContainer->getCurrentPanel()->onOpen(mAvatarId);
-}
-
//*TODO redo panel toggling
void LLPanelProfile::togglePanel(LLPanel* panel)
{