summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterworldmap.cpp30
-rw-r--r--indra/newview/llpanelprofile.cpp48
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_map.xml30
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_objectim.xml7
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_parcel.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_slurl.xml7
-rw-r--r--indra/newview/skins/default/xui/en/menu_url_teleport.xml9
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml5
8 files changed, 143 insertions, 2 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index b7e8835fb8..f3f600149f 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -45,6 +45,7 @@
#include "llcallingcard.h"
#include "llcombobox.h"
#include "llviewercontrol.h"
+#include "llcommandhandler.h"
#include "lldraghandle.h"
#include "llfirstuse.h"
#include "llfloaterreg.h" // getTypedInstance()
@@ -96,6 +97,35 @@ static const F32 SIM_COORD_DEFAULT = 128.f;
// Globals
//---------------------------------------------------------------------------
+// handle secondlife:///app/worldmap/{NAME}/{COORDS} URLs
+class LLWorldMapHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE) { }
+
+ bool handle(const LLSD& params, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ const std::string region_name = params[0].asString();
+ S32 x = (params.size() > 1) ? params[1].asInteger() : 128;
+ S32 y = (params.size() > 2) ? params[2].asInteger() : 128;
+ S32 z = (params.size() > 3) ? params[3].asInteger() : 0;
+
+ LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z);
+ LLFloaterReg::showInstance("world_map", "center");
+
+ return true;
+ }
+};
+LLWorldMapHandler gWorldMapHandler;
+
+
LLFloaterWorldMap* gFloaterWorldMap = NULL;
class LLMapInventoryObserver : public LLInventoryObserver
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index bec670cdaa..8147ff17f0 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -59,17 +59,61 @@ public:
return false;
}
- if (params[1].asString() == "about")
+ const std::string verb = params[1].asString();
+ if (verb == "about")
{
LLAvatarActions::showProfile(avatar_id);
return true;
}
- if (params[1].asString() == "inspect")
+ if (verb == "inspect")
{
LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", avatar_id));
return true;
}
+
+ if (verb == "im")
+ {
+ LLAvatarActions::startIM(avatar_id);
+ return true;
+ }
+
+ if (verb == "pay")
+ {
+ LLAvatarActions::pay(avatar_id);
+ return true;
+ }
+
+ if (verb == "offerteleport")
+ {
+ LLAvatarActions::offerTeleport(avatar_id);
+ return true;
+ }
+
+ if (verb == "requestfriend")
+ {
+ LLAvatarActions::requestFriendshipDialog(avatar_id);
+ return true;
+ }
+
+ if (verb == "mute")
+ {
+ if (! LLAvatarActions::isBlocked(avatar_id))
+ {
+ LLAvatarActions::toggleBlock(avatar_id);
+ }
+ return true;
+ }
+
+ if (verb == "unmute")
+ {
+ if (LLAvatarActions::isBlocked(avatar_id))
+ {
+ LLAvatarActions::toggleBlock(avatar_id);
+ }
+ return true;
+ }
+
return false;
}
};
diff --git a/indra/newview/skins/default/xui/en/menu_url_map.xml b/indra/newview/skins/default/xui/en/menu_url_map.xml
new file mode 100644
index 0000000000..2ca9e3b3fe
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_url_map.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<context_menu
+ layout="topleft"
+ name="Url Popup">
+ <menu_item_call
+ label="Show on Map"
+ layout="topleft"
+ name="show_on_map">
+ <menu_item_call.on_click
+ function="Url.Execute" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="Teleport to Location"
+ layout="topleft"
+ name="teleport_to_location">
+ <menu_item_call.on_click
+ function="Url.Teleport" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="Copy SLurl to clipboard"
+ layout="topleft"
+ name="url_copy">
+ <menu_item_call.on_click
+ function="Url.CopyUrl" />
+ </menu_item_call>
+</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
index 6f7e659f48..35c2269b0d 100644
--- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml
@@ -12,6 +12,13 @@
<menu_item_separator
layout="topleft" />
<menu_item_call
+ label="Show on Map"
+ layout="topleft"
+ name="show_on_map">
+ <menu_item_call.on_click
+ function="Url.ShowOnMap" />
+ </menu_item_call>
+ <menu_item_call
label="Teleport to Object Location"
layout="topleft"
name="teleport_to_object">
diff --git a/indra/newview/skins/default/xui/en/menu_url_parcel.xml b/indra/newview/skins/default/xui/en/menu_url_parcel.xml
index 3804f7f780..f477c310fb 100644
--- a/indra/newview/skins/default/xui/en/menu_url_parcel.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_parcel.xml
@@ -12,6 +12,15 @@
<menu_item_separator
layout="topleft" />
<menu_item_call
+ label="Show on Map"
+ layout="topleft"
+ name="show_on_map">
+ <menu_item_call.on_click
+ function="Url.ShowOnMap" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
label="Copy SLurl to clipboard"
layout="topleft"
name="url_copy">
diff --git a/indra/newview/skins/default/xui/en/menu_url_slurl.xml b/indra/newview/skins/default/xui/en/menu_url_slurl.xml
index 58714f1f42..98abc206a5 100644
--- a/indra/newview/skins/default/xui/en/menu_url_slurl.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_slurl.xml
@@ -12,6 +12,13 @@
<menu_item_separator
layout="topleft" />
<menu_item_call
+ label="Show on Map"
+ layout="topleft"
+ name="show_on_map">
+ <menu_item_call.on_click
+ function="Url.ShowOnMap" />
+ </menu_item_call>
+ <menu_item_call
label="Teleport to Location"
layout="topleft"
name="teleport_to_location">
diff --git a/indra/newview/skins/default/xui/en/menu_url_teleport.xml b/indra/newview/skins/default/xui/en/menu_url_teleport.xml
index ff52d7e109..289e32bcf4 100644
--- a/indra/newview/skins/default/xui/en/menu_url_teleport.xml
+++ b/indra/newview/skins/default/xui/en/menu_url_teleport.xml
@@ -12,6 +12,15 @@
<menu_item_separator
layout="topleft" />
<menu_item_call
+ label="Show on Map"
+ layout="topleft"
+ name="show_on_map">
+ <menu_item_call.on_click
+ function="Url.ShowOnMap" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
label="Copy SLurl to clipboard"
layout="topleft"
name="url_copy">
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index e842517853..0f7e8cb137 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -73,8 +73,13 @@
<string name="TooltipParcelUrl">Click to view this parcel's description</string>
<string name="TooltipTeleportUrl">Click to teleport to this location</string>
<string name="TooltipObjectIMUrl">Click to view this object's description</string>
+ <string name="TooltipMapUrl">Click to view this location on a map</string>
<string name="TooltipSLAPP">Click to run the secondlife:// command</string>
<string name="CurrentURL" value=" CurrentURL: [CurrentURL]" />
+
+ <!-- text for SLURL labels -->
+ <string name="SLurlLabelTeleport">Teleport to</string>
+ <string name="SLurlLabelShowOnMap">Show Map for</string>
<!-- ButtonToolTips, llfloater.cpp -->
<string name="BUTTON_CLOSE_DARWIN">Close (&#8984;W)</string>