summaryrefslogtreecommitdiff
path: root/indra/llui/llurlentry.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-24 22:11:24 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-24 22:11:24 -0500
commitccf6cb3f9ba387117720d700b73ac8e05dbf1f75 (patch)
tree71163fde19389893c8951ebb723ddf9379318518 /indra/llui/llurlentry.cpp
parent2369fa96c24bafbd032c85b58767502cfd37ebaf (diff)
parent5b5354c933aa7b1ceeb307853c24fba28d4e31bf (diff)
viewer-2.0 automated merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/llui/llurlentry.cpp')
-rw-r--r--indra/llui/llurlentry.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 219fae84be..b51709e208 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -34,6 +34,7 @@
#include "linden_common.h"
#include "llurlentry.h"
#include "lluri.h"
+
#include "llcachename.h"
#include "lltrans.h"
#include "lluicolortable.h"
@@ -383,6 +384,38 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa
}
}
+//
+// LLUrlEntryInventory Describes a Second Life inventory Url, e.g.,
+// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select
+//
+LLUrlEntryInventory::LLUrlEntryInventory()
+{
+ mPattern = boost::regex("secondlife:///app/inventory/[\\da-f-]+/\\w+",
+ boost::regex::perl|boost::regex::icase);
+ mMenuName = "menu_url_inventory.xml";
+}
+
+std::string LLUrlEntryInventory::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+{
+ return unescapeUrl(url);
+ // TODO: Figure out if we can somehow access the inventory from here to get the actual item name
+ /*
+ std::string inventory_id_string = getIDStringFromUrl(url);
+ if (inventory_id_string.empty())
+ {
+ // something went wrong, give raw url
+ return unescapeUrl(url);
+ }
+ LLUUID inventory_id(inventory_id_string);
+ LLInventoryItem* item = gInventory.getItem(inventory_id);
+ if(!item)
+ {
+ return unescapeUrl(url);
+ }
+ return item->getName(); */
+}
+
+
///
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,
/// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about