diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llavataractions.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 24 |
3 files changed, 53 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 742a20a849..a7d3b6436d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3854,6 +3854,17 @@ <key>Value</key> <string>http://search.secondlife.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD]</string> </map> + <key>WebProfileURL</key> + <map> + <key>Comment</key> + <string>URL for Web Profiles</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://profiles.secondlife.local/[AGENT_NAME]</string> + </map> <key>HighResSnapshot</key> <map> <key>Comment</key> diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 79b0c63b38..42701bcff9 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -59,6 +59,7 @@ #include "llrecentpeople.h" #include "llsidetray.h" #include "lltrans.h" +#include "llviewercontrol.h" #include "llviewerobjectlist.h" #include "llviewermessage.h" // for handle_lure #include "llviewerregion.h" @@ -314,6 +315,22 @@ void LLAvatarActions::showProfile(const LLUUID& id) params["id"] = id; params["open_tab_name"] = "panel_profile"; + // PROFILES: open in webkit window + std::string first_name,last_name; + if (gCacheName->getName(id,first_name,last_name)) + { + llinfos << "opening web profile for " << first_name << "." << last_name << llendl; + std::string url = gSavedSettings.getString("WebProfileURL"); + LLSD subs; + subs["AGENT_NAME"] = first_name + "." + last_name; + url = LLWeb::expandURLSubstitutions(url,subs); + LLWeb::loadURL(url); + } + else + { + llwarns << "no name info for agent id " << id << llendl; + } +#if 0 //Show own profile if(gAgent.getID() == id) { @@ -324,6 +341,7 @@ void LLAvatarActions::showProfile(const LLUUID& id) { LLSideTray::getInstance()->showPanel("panel_profile_view", params); } +#endif } } diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 4e63563979..00191b17bd 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -33,10 +33,34 @@ #include "llcommandhandler.h" #include "llpanelpicks.h" #include "lltabcontainer.h" +#include "llviewercontrol.h" static const std::string PANEL_PICKS = "panel_picks"; static const std::string PANEL_PROFILE = "panel_profile"; +class LLProfileHandler : public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLProfileHandler() : LLCommandHandler("profile", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() < 1) return false; + std::string agent_name = params[0]; + llinfos << "Profile, agent_name " << agent_name << llendl; + std::string url = gSavedSettings.getString("WebProfileURL"); + LLSD subs; + subs["AGENT_NAME"] = agent_name; + url = LLWeb::expandURLSubstitutions(url,subs); + LLWeb::loadURL(url); + + return true; + } +}; +LLProfileHandler gProfileHandler; + class LLAgentHandler : public LLCommandHandler { public: |