Merge
commit
cf53c157fe
|
|
@ -449,7 +449,10 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const
|
|||
//
|
||||
LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL()
|
||||
{
|
||||
mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?\\/\\S*",
|
||||
mPattern = boost::regex("((http://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com)"
|
||||
"|"
|
||||
"(https://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?))"
|
||||
"\\/\\S*",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
|
||||
mIcon = "Hand";
|
||||
|
|
|
|||
|
|
@ -215,7 +215,6 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
|
|||
// did we find a match? if so, return its details in the match object
|
||||
if (match_entry)
|
||||
{
|
||||
|
||||
// Skip if link is an email with an empty username (starting with @). See MAINT-5371.
|
||||
if (match_start > 0 && text.substr(match_start - 1, 1) == "@")
|
||||
return false;
|
||||
|
|
@ -224,7 +223,8 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
|
|||
std::string url = text.substr(match_start, match_end - match_start + 1);
|
||||
|
||||
LLUrlEntryBase *stripped_entry = NULL;
|
||||
if(match_entry != mUrlEntryNoLink && LLStringUtil::containsNonprintable(url))
|
||||
if((match_entry != mUrlEntryNoLink) && (match_entry != mUrlEntryHTTPLabel) && (match_entry !=mUrlEntrySLLabel)
|
||||
&& LLStringUtil::containsNonprintable(url))
|
||||
{
|
||||
LLStringUtil::stripNonprintable(url);
|
||||
|
||||
|
|
|
|||
|
|
@ -838,17 +838,21 @@ namespace tut
|
|||
"search something https://marketplace.secondlife.com/products/search on marketplace and test the https",
|
||||
"https://marketplace.secondlife.com/products/search");
|
||||
|
||||
testRegex("match urls with port", url,
|
||||
"let's specify some port http://secondlife.com:888/status",
|
||||
"http://secondlife.com:888/status");
|
||||
testRegex("match HTTPS urls with port", url,
|
||||
"let's specify some port https://secondlife.com:888/status",
|
||||
"https://secondlife.com:888/status");
|
||||
|
||||
testRegex("don't match HTTP urls with port", url,
|
||||
"let's specify some port for HTTP http://secondlife.com:888/status",
|
||||
"");
|
||||
|
||||
testRegex("don't match urls w/o protocol", url,
|
||||
"looks like an url something www.marketplace.secondlife.com/products but no https prefix",
|
||||
"");
|
||||
|
||||
testRegex("but with a protocol www is fine", url,
|
||||
"so let's add a protocol http://www.marketplace.secondlife.com:8888/products",
|
||||
"http://www.marketplace.secondlife.com:8888/products");
|
||||
"so let's add a protocol https://www.marketplace.secondlife.com:8888/products",
|
||||
"https://www.marketplace.secondlife.com:8888/products");
|
||||
|
||||
testRegex("don't match urls w/o protocol", url,
|
||||
"and even no www something secondlife.com/status",
|
||||
|
|
|
|||
|
|
@ -655,11 +655,12 @@ void LLFavoritesBarCtrl::changed(U32 mask)
|
|||
LLInventoryModel::cat_array_t cats;
|
||||
LLIsType is_type(LLAssetType::AT_LANDMARK);
|
||||
gInventory.collectDescendentsIf(mFavoriteFolderId, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
|
||||
|
||||
|
||||
for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().getSLURL((*i)->getAssetUUID());
|
||||
}
|
||||
|
||||
updateButtons();
|
||||
if (!mItemsChangedTimer.getStarted())
|
||||
{
|
||||
|
|
@ -751,7 +752,11 @@ void LLFavoritesBarCtrl::updateButtons()
|
|||
|
||||
if(mGetPrevItems)
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().mPrevFavorites = mItems;
|
||||
for (LLInventoryModel::item_array_t::iterator it = mItems.begin(); it != mItems.end(); it++)
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().mFavoriteNames[(*it)->getUUID()]= (*it)->getName();
|
||||
}
|
||||
LLFavoritesOrderStorage::instance().mPrevFavorites = mItems;
|
||||
mGetPrevItems = false;
|
||||
}
|
||||
|
||||
|
|
@ -778,7 +783,7 @@ void LLFavoritesBarCtrl::updateButtons()
|
|||
const LLViewerInventoryItem *item = mItems[first_changed_item_index].get();
|
||||
if (item)
|
||||
{
|
||||
// an child's order and mItems should be same
|
||||
// an child's order and mItems should be same
|
||||
if (button->getLandmarkId() != item->getUUID() // sort order has been changed
|
||||
|| button->getLabelSelected() != item->getName() // favorite's name has been changed
|
||||
|| button->getRect().mRight < rightest_point) // favbar's width has been changed
|
||||
|
|
@ -1783,10 +1788,20 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
|
|||
gInventory.collectDescendentsIf(favorite_folder, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
|
||||
|
||||
std::sort(items.begin(), items.end(), LLFavoritesSort());
|
||||
bool name_changed = false;
|
||||
|
||||
if((items != mPrevFavorites) || pref_changed)
|
||||
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
|
||||
{
|
||||
std::string filename = getStoredFavoritesFilename();
|
||||
if(mFavoriteNames[(*it)->getUUID()] != ((*it)->getName()))
|
||||
{
|
||||
mFavoriteNames[(*it)->getUUID()] = (*it)->getName();
|
||||
name_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if((items != mPrevFavorites) || name_changed || pref_changed)
|
||||
{
|
||||
std::string filename = getStoredFavoritesFilename();
|
||||
if (!filename.empty())
|
||||
{
|
||||
llifstream in_file;
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ public:
|
|||
const static S32 NO_INDEX;
|
||||
static bool mSaveOnExit;
|
||||
bool mUpdateRequired;
|
||||
std::map<LLUUID,std::string> mFavoriteNames;
|
||||
|
||||
private:
|
||||
friend class LLSingleton<LLFavoritesOrderStorage>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue