diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-10-20 17:03:36 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-10-20 17:03:36 -0400 |
commit | dd1b70f712849b7d0c96f0720e28453121b2bf1e (patch) | |
tree | 92a046fed3c4f7099697fe799cba9618b57d3855 /indra | |
parent | 5ef8545f63221db002d14cdcd1c7bac2e96a5e0a (diff) |
SOCIAL-84, SOCIAL-85 WIP
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llavataractions.cpp | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llpanelpicks.cpp | 75 | ||||
-rwxr-xr-x | indra/newview/llpanelprofile.cpp | 2 |
3 files changed, 65 insertions, 14 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 219fca66bd..811d07418c 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -323,7 +323,7 @@ void LLAvatarActions::showProfile(const LLUUID& id) std::string agent_name = first_name + "." + last_name; llinfos << "opening web profile for " << agent_name << llendl; std::string url = getProfileURL(agent_name); - LLWeb::loadURL(url); + LLWeb::loadURLInternal(url); } else { diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 27787ac211..e70c7be728 100644..100755 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -70,6 +70,39 @@ static const std::string CLASSIFIED_NAME("classified_name"); static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks("panel_picks"); +class LLPickHandler : public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLPickHandler() : LLCommandHandler("pick", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() < 1) return false; + const std::string verb = params[0]; + + if (verb == "create") + { + // Open "create pick" in side tab. + } + else if (verb == "edit") + { + // How to identify the pick? + llwarns << "how to identify pick?" << llendl; + } + else + { + llwarns << "unknown verb " << verb << llendl; + return false; + } + + return true; + } +}; + +LLPickHandler gPickHandler; + class LLClassifiedHandler : public LLCommandHandler, public LLAvatarPropertiesObserver @@ -80,6 +113,8 @@ public: std::set<LLUUID> mClassifiedIds; + std::string mRequestVerb; + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) { // handle app/classified/create urls first @@ -107,6 +142,15 @@ public: const std::string verb = params[1].asString(); if (verb == "about") { + mRequestVerb = verb; + mClassifiedIds.insert(classified_id); + LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID(), this); + LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(classified_id); + return true; + } + else if (verb == "edit") + { + mRequestVerb = verb; mClassifiedIds.insert(classified_id); LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID(), this); LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(classified_id); @@ -128,18 +172,25 @@ public: void openClassified(LLAvatarClassifiedInfo* c_info) { - // open the classified info panel on the Me > Picks sidetray - LLSD params; - params["id"] = c_info->creator_id; - params["open_tab_name"] = "panel_picks"; - params["show_tab_panel"] = "classified_details"; - params["classified_id"] = c_info->classified_id; - params["classified_creator_id"] = c_info->creator_id; - params["classified_snapshot_id"] = c_info->snapshot_id; - params["classified_name"] = c_info->name; - params["classified_desc"] = c_info->description; - params["from_search"] = true; - LLSideTray::getInstance()->showPanel("panel_profile_view", params); + if (mRequestVerb == "about") + { + // open the classified info panel on the Me > Picks sidetray + LLSD params; + params["id"] = c_info->creator_id; + params["open_tab_name"] = "panel_picks"; + params["show_tab_panel"] = "classified_details"; + params["classified_id"] = c_info->classified_id; + params["classified_creator_id"] = c_info->creator_id; + params["classified_snapshot_id"] = c_info->snapshot_id; + params["classified_name"] = c_info->name; + params["classified_desc"] = c_info->description; + params["from_search"] = true; + LLSideTray::getInstance()->showPanel("panel_profile_view", params); + } + else if (mRequestVerb == "edit") + { + llwarns << "edit in progress" << llendl; + } } /*virtual*/ void processProperties(void* data, EAvatarProcessorType type) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 38683ab5f7..1268c181ad 100755 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -61,7 +61,7 @@ public: std::string agent_name = params[0]; llinfos << "Profile, agent_name " << agent_name << llendl; std::string url = getProfileURL(agent_name); - LLWeb::loadURL(url); + LLWeb::loadURLInternal(url); return true; } |