implemented Task EXT-2304 Offer Notifications should include a link that highlights the landmark or item in the appropriate side panel
Changes: This task had been already implemented. llurlentyinventory and llurlregistry have been changed to correct parsing of offer url --HG-- branch : product-engine
parent
96a11910b1
commit
83c8f43f8d
|
|
@ -386,36 +386,24 @@ 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
|
||||
// secondlife:///app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select
|
||||
//
|
||||
LLUrlEntryInventory::LLUrlEntryInventory()
|
||||
{
|
||||
mPattern = boost::regex("secondlife:///app/inventory/[\\da-f-]+/\\w+",
|
||||
//*TODO: add supporting of inventory item names with whitespaces
|
||||
//this pattern cann't parse for example
|
||||
//secondlife:///app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select?name=name with spaces¶m2=value
|
||||
mPattern = boost::regex("secondlife:///app/inventory/[\\da-f-]+/\\w+\\S*",
|
||||
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(); */
|
||||
std::string label = getStringAfterToken(url, "name=");
|
||||
return label.empty() ? url : label;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,
|
||||
/// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about
|
||||
|
|
|
|||
|
|
@ -53,9 +53,11 @@ LLUrlRegistry::LLUrlRegistry()
|
|||
registerUrl(new LLUrlEntryTeleport());
|
||||
registerUrl(new LLUrlEntryWorldMap());
|
||||
registerUrl(new LLUrlEntryPlace());
|
||||
registerUrl(new LLUrlEntryInventory());
|
||||
//LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,
|
||||
//so it should be registered in the end of list
|
||||
registerUrl(new LLUrlEntrySL());
|
||||
registerUrl(new LLUrlEntrySLLabel());
|
||||
registerUrl(new LLUrlEntryInventory());
|
||||
}
|
||||
|
||||
LLUrlRegistry::~LLUrlRegistry()
|
||||
|
|
|
|||
Loading…
Reference in New Issue