summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llurlentry.cpp31
-rw-r--r--indra/llui/llurlentry.h12
-rw-r--r--indra/llui/llurlregistry.cpp1
-rw-r--r--indra/newview/llchathistory.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml7
6 files changed, 62 insertions, 2 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index e8e3459673..2f93ab0f04 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -493,6 +493,35 @@ std::string LLUrlEntryInventory::getLabel(const std::string &url, const LLUrlLab
return LLURI::unescape(label.empty() ? url : label);
}
+//
+// LLUrlEntryObjectIM Describes a Second Life inspector for the object Url, e.g.,
+// secondlife:///app/objectim/7bcd7864-da6b-e43f-4486-91d28a28d95b?name=Object&owner=3de548e1-57be-cfea-2b78-83ae3ad95998&slurl=Danger!%20Danger!/200/200/30/&groupowned=1
+//
+LLUrlEntryObjectIM::LLUrlEntryObjectIM()
+{
+ mPattern = boost::regex("secondlife:///app/objectim/[\\da-f-]+\?.*",
+ boost::regex::perl|boost::regex::icase);
+ mMenuName = "menu_url_objectim.xml";
+}
+
+std::string LLUrlEntryObjectIM::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+{
+ LLURI uri(url);
+ LLSD query_map = uri.queryMap();
+ if (query_map.has("name"))
+ return query_map["name"];
+ return unescapeUrl(url);
+}
+
+std::string LLUrlEntryObjectIM::getLocation(const std::string &url) const
+{
+ LLURI uri(url);
+ LLSD query_map = uri.queryMap();
+ if (query_map.has("slurl"))
+ return query_map["slurl"];
+ return LLUrlEntryBase::getLocation(url);
+}
+
///
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,
/// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about
@@ -515,7 +544,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC
//
LLUrlEntryPlace::LLUrlEntryPlace()
{
- mPattern = boost::regex("secondlife://\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?",
+ mPattern = boost::regex("secondlife://(?!/)\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 84d0968779..29575d752c 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -201,6 +201,18 @@ public:
private:
};
+///
+/// LLUrlEntryObjectIM Describes a Second Life inspector for the object Url, e.g.,
+/// secondlife:///app/objectim/7bcd7864-da6b-e43f-4486-91d28a28d95b?name=Object&owner=3de548e1-57be-cfea-2b78-83ae3ad95998&slurl=Danger!%20Danger!/200/200/30/&groupowned=1
+///
+class LLUrlEntryObjectIM : public LLUrlEntryBase
+{
+public:
+ LLUrlEntryObjectIM();
+ /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+ /*virtual*/ std::string getLocation(const std::string &url) const;
+private:
+};
///
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index faa02e1904..7e09a5a919 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -55,6 +55,7 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntryWorldMap());
registerUrl(new LLUrlEntryPlace());
registerUrl(new LLUrlEntryInventory());
+ registerUrl(new LLUrlEntryObjectIM());
//LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,
//so it should be registered in the end of list
registerUrl(new LLUrlEntrySL());
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index ec5e61f384..68c31d87fa 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -93,7 +93,7 @@ public:
payload["object_id"] = object_id;
payload["owner_id"] = query_map["owner"];
payload["name"] = query_map["name"];
- payload["slurl"] = query_map["slurl"];
+ payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]);
payload["group_owned"] = query_map["groupowned"];
LLFloaterReg::showInstance("inspect_remote_object", payload);
return true;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3a6aed01ce..7bdec010ee 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5330,6 +5330,16 @@ class LLWorldCreateLandmark : public view_listener_t
}
};
+class LLWorldPlaceProfile : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
+
+ return true;
+ }
+};
+
void handle_look_at_selection(const LLSD& param)
{
const F32 PADDING_FACTOR = 1.75f;
@@ -7739,6 +7749,7 @@ void initialize_menus()
commit.add("World.Chat", boost::bind(&handle_chat, (void*)NULL));
view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
+ view_listener_t::addMenu(new LLWorldPlaceProfile(), "World.PlaceProfile");
view_listener_t::addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation");
view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome");
view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway");
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index ac31636ed2..551e49daf5 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -252,6 +252,13 @@
name="Land"
tear_off="true">
<menu_item_call
+ label="Place Profile"
+ layout="topleft"
+ name="Place Profile">
+ <menu_item_call.on_click
+ function="World.PlaceProfile" />
+ </menu_item_call>
+ <menu_item_call
label="About Land"
layout="topleft"
name="About Land">