Merge branch 'DRTVWR-503-maint' of https://bitbucket.org/lindenlab/viewer

# Conflicts:
#	indra/llmessage/llcoproceduremanager.cpp
#	indra/newview/llinventorypanel.cpp
#	indra/newview/llpanelmaininventory.cpp
#	indra/newview/skins/default/xui/en/panel_main_inventory.xml
#	indra/newview/skins/default/xui/en/strings.xml
master
Ansariel 2020-09-09 19:34:33 +02:00
commit fe10f171d3
34 changed files with 231 additions and 288 deletions

View File

@ -2375,16 +2375,16 @@
<key>archive</key>
<map>
<key>hash</key>
<string>8501cbaa7e0f254614694da784a9c61c</string>
<string>b677ee43822212f0a27c838dc8bf3623</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64944/606925/llca-202008010216.546021-common-546021.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/67622/646614/llca-202009010215.548269-common-548269.tar.bz2</string>
</map>
<key>name</key>
<string>common</string>
</map>
</map>
<key>version</key>
<string>202008010216.546021</string>
<string>202009010215.548269</string>
</map>
<key>llphysicsextensions_source</key>
<map>

View File

@ -77,12 +77,12 @@ public:
///
inline size_t countActive() const
{
return mActiveCoprocs.size();
return mActiveCoprocsCount;
}
/// Returns the total number of coprocedures either queued or in active processing.
///
inline size_t count() const
inline S32 count() const
{
return countPending() + countActive();
}
@ -113,12 +113,10 @@ private:
// because the consuming coroutine might outlive this LLCoprocedurePool
// instance.
typedef boost::shared_ptr<CoprocQueue_t> CoprocQueuePtr;
typedef std::map<LLUUID, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t> ActiveCoproc_t;
std::string mPoolName;
size_t mPoolSize, mPending{0};
size_t mPoolSize, mActiveCoprocsCount, mPending;
CoprocQueuePtr mPendingCoprocs;
ActiveCoproc_t mActiveCoprocs;
LLTempBoundListener mStatusListener;
typedef std::map<std::string, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t> CoroAdapterMap_t;
@ -281,6 +279,8 @@ void LLCoprocedureManager::close(const std::string &pool)
LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
mPoolName(poolName),
mPoolSize(size),
mActiveCoprocsCount(0),
mPending(0),
mPendingCoprocs(boost::make_shared<CoprocQueue_t>(DEFAULT_QUEUE_SIZE)),
mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mCoroMapping()
@ -406,8 +406,7 @@ void LLCoprocedurePool::coprocedureInvokerCoro(
}
// we actually popped an item
--mPending;
ActiveCoproc_t::iterator itActive = mActiveCoprocs.insert(ActiveCoproc_t::value_type(coproc->mId, httpAdapter)).first;
mActiveCoprocsCount++;
LL_DEBUGS("CoProcMgr") << "Dequeued and invoking coprocedure(" << coproc->mName << ") with id=" << coproc->mId.asString() << " in pool \"" << mPoolName << "\" (" << mPending << " left)" << LL_ENDL;
@ -415,12 +414,10 @@ void LLCoprocedurePool::coprocedureInvokerCoro(
{
coproc->mProc(httpAdapter, coproc->mId);
}
catch (const LLCoros::Stop &)
catch (const LLCoros::Stop &e)
{
LL_INFOS("CoProcMgr") << "Viewer is shutting Down. Stopping coprocedure('" << coproc->mName
<< "', id=" << coproc->mId.asString()
<< ") in pool '" << mPoolName << "'" << LL_ENDL;
mActiveCoprocs.erase(itActive);
LL_INFOS("LLCoros") << "coprocedureInvokerCoro terminating because "
<< e.what() << LL_ENDL;
throw; // let toplevel handle this as LLContinueError
}
catch (...)
@ -429,14 +426,14 @@ void LLCoprocedurePool::coprocedureInvokerCoro(
<< "', id=" << coproc->mId.asString()
<< ") in pool '" << mPoolName << "'"));
// must NOT omit this or we deplete the pool
mActiveCoprocs.erase(itActive);
mActiveCoprocsCount--;
continue;
}
// Nicky: This is super spammy. Consider using LL_DEBUGS here?
LL_DEBUGS("CoProcMgr") << "Finished coprocedure(" << coproc->mName << ")" << " in pool \"" << mPoolName << "\"" << LL_ENDL;
mActiveCoprocs.erase(itActive);
mActiveCoprocsCount--;
}
}

View File

@ -86,15 +86,15 @@ const F64 LLExperienceCache::DEFAULT_EXPIRATION = 600.0;
const S32 LLExperienceCache::DEFAULT_QUOTA = 128; // this is megabytes
const int LLExperienceCache::SEARCH_PAGE_SIZE = 30;
bool LLExperienceCache::sShutdown = false;
//=========================================================================
LLExperienceCache::LLExperienceCache():
mShutdown(false)
LLExperienceCache::LLExperienceCache()
{
}
LLExperienceCache::~LLExperienceCache()
{
}
void LLExperienceCache::initSingleton()
@ -128,7 +128,7 @@ void LLExperienceCache::cleanup()
{
cache_stream << (*this);
}
mShutdown = true;
sShutdown = true;
}
//-------------------------------------------------------------------------
@ -350,7 +350,7 @@ void LLExperienceCache::requestExperiences()
ostr << urlBase << "?page_size=" << PAGE_SIZE1;
RequestQueue_t requests;
while (!mRequestQueue.empty())
while (!mRequestQueue.empty() && !sShutdown)
{
RequestQueue_t::iterator it = mRequestQueue.begin();
LLUUID key = (*it);
@ -404,8 +404,6 @@ void LLExperienceCache::idleCoro()
LL_INFOS("ExperienceCache") << "Launching Experience cache idle coro." << LL_ENDL;
do
{
llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS);
if (mEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT))
{
eraseExpired();
@ -416,7 +414,9 @@ void LLExperienceCache::idleCoro()
requestExperiences();
}
} while (!mShutdown);
llcoro::suspendUntilTimeout(SECS_BETWEEN_REQUESTS);
} while (!sShutdown);
// The coroutine system will likely be shut down by the time we get to this point
// (or at least no further cycling will occur on it since the user has decided to quit.)

View File

@ -142,7 +142,7 @@ private:
LLFrameTimer mEraseExpiredTimer; // Periodically clean out expired entries from the cache
CapabilityQuery_t mCapability;
std::string mCacheFileName;
bool mShutdown;
static bool sShutdown; // control for coroutines, they exist out of LLExperienceCache's scope, so they need a static control
void idleCoro();
void eraseExpired();

View File

@ -246,8 +246,6 @@ public:
void dumpSelectionInformation();
virtual S32 notify(const LLSD& info) ;
void setShowEmptyMessage(bool show_msg) { mShowEmptyMessage = show_msg; }
bool useLabelSuffix() { return mUseLabelSuffix; }
virtual void updateMenu();

View File

@ -256,7 +256,7 @@ LLNotificationForm::LLNotificationForm(const LLSD& sd)
}
else
{
LL_WARNS() << "Invalid form data " << sd << LL_ENDL;
LL_WARNS("Notifications") << "Invalid form data " << sd << LL_ENDL;
mFormData = LLSD::emptyArray();
}
}
@ -449,11 +449,11 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mUniqueContext.push_back(context.value);
}
LL_DEBUGS() << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL;
LL_DEBUGS("Notifications") << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL;
BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags)
{
LL_DEBUGS() << " tag \"" << std::string(tag.value) << "\"" << LL_ENDL;
LL_DEBUGS("Notifications") << " tag \"" << std::string(tag.value) << "\"" << LL_ENDL;
mTags.push_back(tag.value);
}
@ -1407,8 +1407,14 @@ void LLNotifications::initSingleton()
createDefaultChannels();
}
void LLNotifications::cleanupSingleton()
{
clear();
}
void LLNotifications::createDefaultChannels()
{
LL_INFOS("Notifications") << "Generating default notification channels" << LL_ENDL;
// now construct the various channels AFTER loading the notifications,
// because the history channel is going to rewrite the stored notifications file
mDefaultChannels.push_back(new LLNotificationChannel("Enabled", "",
@ -1464,7 +1470,7 @@ void LLNotifications::forceResponse(const LLNotification::Params& params, S32 op
if (selected_item.isUndefined())
{
LL_WARNS() << "Invalid option" << option << " for notification " << (std::string)params.name << LL_ENDL;
LL_WARNS("Notifications") << "Invalid option" << option << " for notification " << (std::string)params.name << LL_ENDL;
return;
}
response[selected_item["name"].asString()] = true;
@ -1498,12 +1504,12 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements)
if (found != replacements.end())
{
replacement = found->second;
LL_DEBUGS() << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << LL_ENDL;
LL_DEBUGS("Notifications") << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << LL_ENDL;
it->second->setValue(replacement);
}
else
{
LL_WARNS() << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << LL_ENDL;
LL_WARNS("Notifications") << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << LL_ENDL;
}
}
}
@ -1542,7 +1548,7 @@ void addPathIfExists(const std::string& new_path, std::vector<std::string>& path
bool LLNotifications::loadTemplates()
{
LL_INFOS() << "Reading notifications template" << LL_ENDL;
LL_INFOS("Notifications") << "Reading notifications template" << LL_ENDL;
// Passing findSkinnedFilenames(constraint=LLDir::ALL_SKINS) makes it
// output all relevant pathnames instead of just the ones from the most
// specific skin.
@ -1613,7 +1619,7 @@ bool LLNotifications::loadTemplates()
mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification));
}
LL_INFOS() << "...done" << LL_ENDL;
LL_INFOS("Notifications") << "...done" << LL_ENDL;
return true;
}
@ -1841,7 +1847,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
for(it = mVisibilityRules.begin(); it != mVisibilityRules.end(); it++)
{
// An empty type/tag/name string will match any notification, so only do the comparison when the string is non-empty in the rule.
LL_DEBUGS()
LL_DEBUGS("Notifications")
<< "notification \"" << n->getName() << "\" "
<< "testing against " << ((*it)->mVisible?"show":"hide") << " rule, "
<< "name = \"" << (*it)->mName << "\" "
@ -1886,7 +1892,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
if((*it)->mResponse.empty())
{
// Response property is empty. Cancel this notification.
LL_DEBUGS() << "cancelling notification " << n->getName() << LL_ENDL;
LL_DEBUGS("Notifications") << "cancelling notification " << n->getName() << LL_ENDL;
cancel(n);
}
@ -1897,7 +1903,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
// TODO: verify that the response template has an item with the correct name
response[(*it)->mResponse] = true;
LL_DEBUGS() << "responding to notification " << n->getName() << " with response = " << response << LL_ENDL;
LL_DEBUGS("Notifications") << "responding to notification " << n->getName() << " with response = " << response << LL_ENDL;
n->respond(response);
}
@ -1909,7 +1915,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
break;
}
LL_DEBUGS() << "allowing notification " << n->getName() << LL_ENDL;
LL_DEBUGS("Notifications") << "allowing notification " << n->getName() << LL_ENDL;
return true;
}
@ -1971,7 +1977,7 @@ void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id,
// from PE merge - we should figure out if this is the right thing to do
if (name.empty())
{
LL_WARNS() << "Empty name received for Id: " << agent_id << LL_ENDL;
LL_WARNS("Notifications") << "Empty name received for Id: " << agent_id << LL_ENDL;
name = SYSTEM_FROM;
}

View File

@ -963,6 +963,7 @@ public:
private:
/*virtual*/ void initSingleton();
/*virtual*/ void cleanupSingleton();
void loadPersistentNotifications();
@ -1078,6 +1079,7 @@ public:
LLPersistentNotificationChannel()
: LLNotificationChannel("Persistent", "Visible", &notificationFilter)
{}
virtual ~LLPersistentNotificationChannel() {}
typedef std::vector<LLNotificationPtr> history_list_t;
history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); }

View File

@ -369,10 +369,10 @@ attributedStringInfo getSegments(NSAttributedString *str)
callRightMouseDown(mMousePos, [theEvent modifierFlags]);
mSimulatedRightClick = true;
} else {
if ([theEvent clickCount] >= 2)
if ([theEvent clickCount] == 2)
{
callDoubleClick(mMousePos, [theEvent modifierFlags]);
} else if ([theEvent clickCount] == 1) {
} else if ([theEvent clickCount] >= 1) {
callLeftMouseDown(mMousePos, [theEvent modifierFlags]);
}
}

View File

@ -676,17 +676,6 @@
<key>Value</key>
<string></string>
</map>
<key>FavoritesFolder</key>
<map>
<key>Comment</key>
<string>User's chosen folder which will be shown in the Favorites tab (UUID)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>SnapshotBaseDir</key>
<map>
<key>Comment</key>

View File

@ -533,20 +533,20 @@ void LLAppCoreHttp::refreshSettings(bool initial)
LLCore::HttpStatus LLAppCoreHttp::sslVerify(const std::string &url,
const LLCore::HttpHandler::ptr_t &handler, void *appdata)
{
X509_STORE_CTX *ctx = static_cast<X509_STORE_CTX *>(appdata);
LLCore::HttpStatus result;
LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore("");
LLPointer<LLCertificateChain> chain = gSecAPIHandler->getCertificateChain(ctx);
LLSD validation_params = LLSD::emptyMap();
LLURI uri(url);
LLCore::HttpStatus result;
try
{
X509_STORE_CTX *ctx = static_cast<X509_STORE_CTX *>(appdata);
LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore("");
LLPointer<LLCertificateChain> chain = gSecAPIHandler->getCertificateChain(ctx);
LLSD validation_params = LLSD::emptyMap();
LLURI uri(url);
validation_params[CERT_HOSTNAME] = uri.hostName();
validation_params[CERT_HOSTNAME] = uri.hostName();
// *TODO: In the case of an exception while validating the cert, we need a way
// to pass the offending(?) cert back out. *Rider*
// *TODO: In the case of an exception while validating the cert, we need a way
// to pass the offending(?) cert back out. *Rider*
try
{
// don't validate hostname. Let libcurl do it instead. That way, it'll handle redirects
store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params);
}

View File

@ -3973,6 +3973,10 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
}
llcoro::suspend();
if (LLApp::isQuitting())
{
return;
}
S32 retryCount(0);
bool bRetry;
do
@ -4036,6 +4040,11 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData);
if (LLApp::isQuitting())
{
return;
}
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -4071,6 +4080,10 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
LL_WARNS("Avatar") << "Bake retry #" << retryCount << " in " << timeout << " seconds." << LL_ENDL;
llcoro::suspendUntilTimeout(timeout);
if (LLApp::isQuitting())
{
return;
}
bRetry = true;
continue;
}

View File

@ -449,6 +449,13 @@ void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID paren
bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloater,
const LLPointer<LLViewerObject> &object, LLInventoryObject* inventory, LLEventPump &pump)
{
if (LLApp::isQuitting())
{
// Reply from coroutine came on shutdown
// We are quiting, don't start any more coroutines!
return true;
}
LLSD result;
LLCheckedHandle<LLFloaterCompileQueue> floater(hfloater);
// Dereferencing floater may fail. If they do they throw LLExeceptionStaleHandle.
@ -502,6 +509,8 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
}
// </FS:Ansariel>
floater.check();
if (result.has("timeout"))
{ // A timeout filed in the result will always be true if present.
LLStringUtil::format_map_t args;
@ -525,6 +534,12 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
}
if (!gAssetStorage)
{
// viewer likely is shutting down
return true;
}
{
// <FS:Ansariel> [LSL PreProc]
//HandleScriptUserData userData(pump.getName());
@ -609,6 +624,8 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSDMap("timeout", LLSD::Boolean(true)));
floater.check();
if (result.has("timeout"))
{ // A timeout filed in the result will always be true if present.
LLStringUtil::format_map_t args;
@ -1012,6 +1029,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L
// but offers no guarantee of doing so.
llcoro::suspend();
}
floater.check();
}
// <FS:Ansariel> Translation fixes

View File

@ -948,7 +948,7 @@ void LLFloaterReporter::takeNewSnapshot(bool refresh)
// Take a screenshot, but don't draw this floater.
setVisible(FALSE);
if (!gViewerWindow->rawSnapshot(mImageRaw, IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, gSavedSettings.getBOOL("RenderHUDInSnapshot"), TRUE, FALSE))
if (!gViewerWindow->rawSnapshot(mImageRaw,IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE /*UI*/, TRUE, FALSE))
{
LL_WARNS() << "Unable to take screenshot" << LL_ENDL;
setVisible(TRUE);

View File

@ -164,35 +164,6 @@ bool isMarketplaceSendAction(const std::string& action)
return ("send_to_marketplace" == action);
}
bool isPanelActive(const std::string& panel_name)
{
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
return (active_panel && (active_panel->getName() == panel_name));
}
bool isParentSystemFolder(const LLInventoryModel* model, const LLUUID& folder_id)
{
if (!model || folder_id.isNull()) return false;
LLViewerInventoryCategory* cat = model->getCategory(folder_id);
if (cat)
{
if (cat->getPreferredType() == LLFolderType::FT_ROOT_INVENTORY)
{
return false;
}
if (LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
return true;
}
else
{
return isParentSystemFolder(model, cat->getParentUUID());
}
}
return false;
}
// Used by LLFolderBridge as callback for directory fetching recursion
class LLRightClickInventoryFetchDescendentsObserver : public LLInventoryFetchDescendentsObserver
{
@ -996,7 +967,8 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
//}
// </FS>
if (!isPanelActive("All Items"))
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
if (active_panel && (active_panel->getName() != "All Items"))
{
items.push_back(std::string("Show in Main Panel"));
}
@ -1105,7 +1077,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items,
items.push_back(std::string("Delete"));
if (!isItemRemovable() || isPanelActive("Favorite Items"))
if (!isItemRemovable())
{
disabled_items.push_back(std::string("Delete"));
}
@ -4445,7 +4417,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
disabled_items.push_back(std::string("New Clothes"));
disabled_items.push_back(std::string("New Body Parts"));
disabled_items.push_back(std::string("upload_def"));
disabled_items.push_back(std::string("Set Favorites folder"));
}
if (favorites == mUUID)
{
@ -4473,7 +4444,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
disabled_items.push_back(std::string("New Clothes"));
disabled_items.push_back(std::string("New Body Parts"));
disabled_items.push_back(std::string("upload_def"));
disabled_items.push_back(std::string("Set Favorites folder"));
}
if (marketplace_listings_id == mUUID)
{
@ -4482,14 +4452,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
disabled_items.push_back(std::string("Cut"));
disabled_items.push_back(std::string("Delete"));
}
if (isPanelActive("Favorite Items"))
{
disabled_items.push_back(std::string("Delete"));
}
if(trash_id == mUUID)
{
bool is_recent_panel = isPanelActive("Recent Items");
bool is_recent_panel = false;
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
if (active_panel && (active_panel->getName() == "Recent Items"))
{
is_recent_panel = true;
}
// This is the trash.
items.push_back(std::string("Empty Trash"));
@ -4545,16 +4515,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
items.push_back(std::string("New Body Parts"));
items.push_back(std::string("New Settings"));
items.push_back(std::string("upload_def"));
if (!LLFolderType::lookupIsProtectedType(getPreferredType()) && !isParentSystemFolder(model, mUUID))
{
items.push_back(std::string("Set Favorites folder"));
}
if (!LLEnvironment::instance().isInventoryEnabled())
{
disabled_items.push_back("New Settings");
}
}
}
getClipboardEntries(false, items, disabled_items, flags);

View File

@ -575,11 +575,6 @@ const LLUUID LLInventoryModel::findUserDefinedCategoryUUIDForType(LLFolderType::
cat_id = LLUUID(gSavedPerAccountSettings.getString("AnimationUploadFolder"));
break;
}
case LLFolderType::FT_FAVORITE:
{
cat_id = LLUUID(gSavedPerAccountSettings.getString("FavoritesFolder"));
break;
}
default:
break;
}

View File

@ -190,7 +190,6 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2));
mCommitCallbackRegistrar.add("Inventory.SetFavoritesFolder", boost::bind(&LLInventoryPanel::setFavoritesFolder, this, _2));
mCommitCallbackRegistrar.add("Inventory.CustomAction", boost::bind(&LLInventoryPanel::onCustomAction, this, _2)); // <FS:Ansariel> Prevent warning "No callback found for: 'Inventory.CustomAction' in control: Find Links"
}
@ -1511,11 +1510,6 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)
}
}
void LLInventoryPanel::setFavoritesFolder(const LLSD& userdata)
{
gSavedPerAccountSettings.setString("FavoritesFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
}
void LLInventoryPanel::purgeSelectedItems()
{
if (!mFolderRoot.get()) return;
@ -1970,95 +1964,6 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params)
mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER;
}
static LLDefaultChildRegistry::Register<LLInventoryFavoriteItemsPanel> t_favorites_inventory_panel("favorites_inventory_panel");
LLInventoryFavoriteItemsPanel::LLInventoryFavoriteItemsPanel(const Params& params)
: LLInventoryPanel(params)
{
std::string ctrl_name = "FavoritesFolder";
if (gSavedPerAccountSettings.controlExists(ctrl_name))
{
LLPointer<LLControlVariable> cntrl_ptr = gSavedPerAccountSettings.getControl(ctrl_name);
if (cntrl_ptr.notNull())
{
mFolderChangedSignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&LLInventoryFavoriteItemsPanel::updateFavoritesRootFolder, this));
}
}
}
void LLInventoryFavoriteItemsPanel::setSelectCallback(const boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb)
{
if (mFolderRoot.get())
{
mFolderRoot.get()->setSelectCallback(cb);
mSelectionCallback = cb;
}
}
void LLInventoryFavoriteItemsPanel::initFromParams(const Params& p)
{
Params fav_params(p);
fav_params.start_folder.id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE);
LLInventoryPanel::initFromParams(fav_params);
updateFavoritesRootFolder();
}
void LLInventoryFavoriteItemsPanel::updateFavoritesRootFolder()
{
const LLUUID& folder_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE);
bool is_favorites_set = (folder_id != gInventory.findCategoryUUIDForTypeInRoot(LLFolderType::FT_FAVORITE, true, gInventory.getRootFolderID()));
if (!is_favorites_set || folder_id != getRootFolderID())
{
LLUUID root_id = folder_id;
if (mFolderRoot.get())
{
removeItemID(getRootFolderID());
mFolderRoot.get()->destroyView();
}
mCommitCallbackRegistrar.pushScope();
{
LLFolderView* folder_view = createFolderRoot(root_id);
mFolderRoot = folder_view->getHandle();
addItemID(root_id, mFolderRoot.get());
LLRect scroller_view_rect = getRect();
scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
LLScrollContainer::Params scroller_params(mParams.scroll());
scroller_params.rect(scroller_view_rect);
if (mScroller)
{
removeChild(mScroller);
delete mScroller;
mScroller = NULL;
}
mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params);
addChild(mScroller);
mScroller->addChild(mFolderRoot.get());
mFolderRoot.get()->setScrollContainer(mScroller);
mFolderRoot.get()->setFollowsAll();
mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox);
if (!mSelectionCallback.empty())
{
mFolderRoot.get()->setSelectCallback(mSelectionCallback);
}
}
mCommitCallbackRegistrar.popScope();
mFolderRoot.get()->setCallbackRegistrar(&mCommitCallbackRegistrar);
if (is_favorites_set)
{
buildNewViews(folder_id);
}
mFolderRoot.get()->setShowEmptyMessage(!is_favorites_set);
}
}
/************************************************************************/
/* Asset Pre-Filtered Inventory Panel related class */
/************************************************************************/

View File

@ -218,7 +218,6 @@ public:
void doCreate(const LLSD& userdata);
bool beginIMSession();
void fileUploadLocation(const LLSD& userdata);
void setFavoritesFolder(const LLSD& userdata);
void purgeSelectedItems();
bool attachObject(const LLSD& userdata);
static void idle(void* user_data);
@ -349,27 +348,6 @@ private:
bool mViewsInitialized; // Views have been generated
};
class LLInventoryFavoriteItemsPanel : public LLInventoryPanel
{
public:
struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params>
{};
void initFromParams(const Params& p);
bool isSelectionRemovable() { return false; }
void setSelectCallback(const boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb);
protected:
LLInventoryFavoriteItemsPanel(const Params& params);
~LLInventoryFavoriteItemsPanel() { mFolderChangedSignal.disconnect(); }
void updateFavoritesRootFolder();
boost::signals2::connection mFolderChangedSignal;
boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)> mSelectionCallback;
friend class LLUICtrlFactory;
};
/************************************************************************/
/* Asset Pre-Filtered Inventory Panel related class */
/* Exchanges filter's flexibility for speed of generation and */

View File

@ -447,6 +447,7 @@ BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
}
mMouseCur = mMouseDown;
mAgentSelfAtAxis = gAgent.getAtAxis(); // no point checking if avatar was selected, just save the value
// Route future Mouse messages here preemptively. (Release on mouse up.)
setMouseCapture( TRUE );
@ -610,6 +611,26 @@ void LLManipRotate::drag( S32 x, S32 y )
else
{
object->setRotation(new_rot, damped);
LLVOAvatar* avatar = object->asAvatar();
if (avatar && avatar->isSelf()
&& LLSelectMgr::getInstance()->mAllowSelectAvatar
&& !object->getParent())
{
// Normal avatars use object's orienttion, but self uses
// separate LLCoordFrame
// See LVOAvatar::updateOrientation()
if (gAgentCamera.getFocusOnAvatar())
{
//Don't rotate camera with avatar
gAgentCamera.setFocusOnAvatar(false, false, false);
}
LLVector3 at_axis = mAgentSelfAtAxis;
at_axis *= mRotation;
at_axis.mV[VZ] = 0.f;
at_axis.normalize();
gAgent.resetAxes(at_axis);
}
rebuild(object);
}
@ -717,7 +738,7 @@ void LLManipRotate::drag( S32 x, S32 y )
LLViewerObject *root_object = (cur == NULL) ? NULL : cur->getRootEdit();
if( cur->permModify() && cur->permMove() && !cur->isPermanentEnforced() &&
((root_object == NULL) || !root_object->isPermanentEnforced()) &&
!cur->isAvatar())
(!cur->isAvatar() || LLSelectMgr::getInstance()->mAllowSelectAvatar))
{
selectNode->mLastRotation = cur->getRotation();
selectNode->mLastPositionLocal = cur->getPosition();

View File

@ -95,6 +95,7 @@ private:
LLVector3 mMouseDown;
LLVector3 mMouseCur;
LLVector3 mAgentSelfAtAxis; // Own agent uses separate rotation method
F32 mRadiusMeters;
LLVector3 mCenterToCam;

View File

@ -266,16 +266,6 @@ BOOL LLPanelMainInventory::postBuild()
}
// </FS:Ansariel>
}
mFavoriteItemsPanel = getChild<LLInventoryFavoriteItemsPanel>("Favorite Items");
if (mFavoriteItemsPanel)
{
LLInventoryFilter& recent_filter = mFavoriteItemsPanel->getFilter();
recent_filter.setEmptyLookupMessage("InventoryFavoritItemsNotSelected");
recent_filter.markDefault();
mFavoriteItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mFavoriteItemsPanel, _1, _2));
}
// <FS:Ansariel> Only if we actually have it!
//mSearchTypeCombo = getChild<LLComboBox>("search_type");
mSearchTypeCombo = findChild<LLComboBox>("search_type");
@ -1834,7 +1824,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
// </FS:Ansariel>
if (command_name == "delete")
{
return getActivePanel()->isSelectionRemovable() && (getActivePanel() != mFavoriteItemsPanel);
return getActivePanel()->isSelectionRemovable();
}
if (command_name == "save_texture")
{

View File

@ -38,7 +38,6 @@
class LLComboBox;
class LLFolderViewItem;
class LLInventoryPanel;
class LLInventoryFavoriteItemsPanel;
class LLSaveFolderState;
class LLFilterEditor;
class LLTabContainer;
@ -165,7 +164,6 @@ private:
LLHandle<LLFloater> mFinderHandle;
LLInventoryPanel* mActivePanel;
LLInventoryPanel* mWornItemsPanel;
LLInventoryFavoriteItemsPanel* mFavoriteItemsPanel;
bool mResortActivePanel;
LLSaveFolderState* mSavedFolderState;
std::string mFilterText;

View File

@ -258,7 +258,7 @@ void LLPanelPrimMediaControls::focusOnTarget()
LLViewerMediaImpl* media_impl = getTargetMediaImpl();
if(media_impl)
{
if (!media_impl->hasFocus() || isZoomDistExceeding())
if (!media_impl->hasFocus())
{
// The current target doesn't have media focus -- focus on it.
LLViewerObject* objectp = getTargetObject();

View File

@ -172,3 +172,10 @@ void LLCredential::authenticatorType(std::string &idType)
}
}
LLCertException::LLCertException(const LLSD& cert_data, const std::string& msg)
: LLException(msg),
mCertData(cert_data)
{
LL_WARNS("SECAPI") << "Certificate Error: " << msg << LL_ENDL;
}

View File

@ -75,6 +75,7 @@
#define CERT_EXTENDED_KEY_USAGE "extendedKeyUsage"
#define CERT_EKU_SERVER_AUTH SN_server_auth
#define CERT_EKU_TLS_SERVER_AUTH LN_server_auth
#define CERT_SUBJECT_KEY_IDENTFIER "subjectKeyIdentifier"
#define CERT_AUTHORITY_KEY_IDENTIFIER "authorityKeyIdentifier"
@ -334,17 +335,23 @@ std::ostream& operator <<(std::ostream& s, const LLCredential& cred);
class LLCertException: public LLException
{
public:
LLCertException(const LLSD& cert_data, const std::string& msg): LLException(msg),
mCertData(cert_data)
{
LL_WARNS("SECAPI") << "Certificate Error: " << msg << LL_ENDL;
}
LLCertException(const LLSD& cert_data, const std::string& msg);
virtual ~LLCertException() throw() {}
LLSD getCertData() const { return mCertData; }
protected:
LLSD mCertData;
};
class LLAllocationCertException : public LLCertException
{
public:
LLAllocationCertException(const LLSD& cert_data) : LLCertException(cert_data, "CertAllocationFailure")
{
}
virtual ~LLAllocationCertException() throw() {}
protected:
};
class LLInvalidCertificate : public LLCertException
{
public:

View File

@ -78,14 +78,16 @@ LLBasicCertificate::LLBasicCertificate(const std::string& pem_cert,
BIO * pem_bio = BIO_new_mem_buf((void*)pem_cert.c_str(), pem_cert.length());
if(pem_bio == NULL)
{
LL_ERRS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL;
LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL;
LLTHROW(LLAllocationCertException(LLSD::emptyMap()));
}
mCert = NULL;
PEM_read_bio_X509(pem_bio, &mCert, 0, NULL);
BIO_free(pem_bio);
if (!mCert)
{
LL_ERRS("SECAPI") << "Could not decode certificate to x509." << LL_ENDL;
LL_WARNS("SECAPI") << "Could not decode certificate to x509." << LL_ENDL;
LLTHROW(LLInvalidCertificate(LLSD::emptyMap()));
}
}
@ -930,9 +932,13 @@ void _validateCert(int validation_policy,
LLTHROW(LLCertKeyUsageValidationException(current_cert_info));
}
// only validate EKU if the cert has it
if(current_cert_info.has(CERT_EXTENDED_KEY_USAGE) && current_cert_info[CERT_EXTENDED_KEY_USAGE].isArray() &&
(!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE],
LLSD((std::string)CERT_EKU_SERVER_AUTH))))
if(current_cert_info.has(CERT_EXTENDED_KEY_USAGE)
&& current_cert_info[CERT_EXTENDED_KEY_USAGE].isArray()
&& (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE],
LLSD((std::string)CERT_EKU_TLS_SERVER_AUTH)))
&& (!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE],
LLSD((std::string)CERT_EKU_SERVER_AUTH)))
)
{
LLTHROW(LLCertKeyUsageValidationException(current_cert_info));
}

View File

@ -1716,7 +1716,7 @@ bool idle_startup()
// If optional was skipped this case shouldn't
// be reached.
LL_INFOS() << "Forcing a quit due to update." << LL_ENDL;
LL_INFOS("LLStartup") << "Forcing a quit due to update." << LL_ENDL;
LLLoginInstance::getInstance()->disconnect();
LLAppViewer::instance()->forceQuit();
}
@ -1737,7 +1737,24 @@ bool idle_startup()
{
// This was a certificate error, so grab the certificate
// and throw up the appropriate dialog.
LLPointer<LLCertificate> certificate = gSecAPIHandler->getCertificate(response["certificate"]);
LLPointer<LLCertificate> certificate;
try
{
certificate = gSecAPIHandler->getCertificate(response["certificate"]);
}
catch (LLCertException &cert_exception)
{
LL_WARNS("LLStartup", "SECAPI") << "Caught " << cert_exception.what() << " certificate expception on getCertificate("<< response["certificate"] << ")" << LL_ENDL;
LLSD args;
args["REASON"] = LLTrans::getString(cert_exception.what());
LLNotificationsUtil::add("GeneralCertificateErrorShort", args, response,
general_cert_done);
reset_login();
gSavedSettings.setBOOL("AutoLogin", FALSE);
show_connect_box = true;
}
if(certificate)
{
LLSD args = transform_cert_args(certificate);

View File

@ -306,6 +306,11 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
// <FS:Ansariel> Fix seed cap retry count
//++mSeedCapAttempts;
if (LLApp::isExiting())
{
return;
}
regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
if (!regionp) //region was removed
{
@ -423,6 +428,11 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle)
break; // no retry
}
if (LLApp::isExiting())
{
break;
}
regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
if (!regionp) //region was removed
{
@ -526,6 +536,11 @@ void LLViewerRegionImpl::requestSimulatorFeatureCoro(std::string url, U64 region
continue;
}
if (LLApp::isExiting())
{
break;
}
// remove the http_result from the llsd
result.erase("http_result");

View File

@ -5054,7 +5054,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
draw_handles = FALSE;
}
if (tool == LLToolCompRotate::getInstance() && !all_selected_objects_move)
if (tool == LLToolCompRotate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected())
{
draw_handles = FALSE;
}

View File

@ -412,6 +412,7 @@ void LLVivoxVoiceClient::terminate()
}
else
{
mRelogRequested = false;
killGateway();
}
@ -711,12 +712,18 @@ void LLVivoxVoiceClient::voiceControlCoro()
U32 retry = 0;
while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
while (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && !LLApp::isExiting())
{
LL_DEBUGS("Voice") << "Suspending voiceControlCoro() momentarily for teleport. Tuning: " << mTuningMode << ". Relog: " << mRelogRequested << LL_ENDL;
llcoro::suspendUntilTimeout(1.0);
}
if (LLApp::isExiting())
{
mIsCoroutineActive = false;
return;
}
do
{
bool success = startAndConnectSession();
@ -1834,6 +1841,12 @@ bool LLVivoxVoiceClient::waitForChannel()
mIsProcessingChannels = true;
llcoro::suspend();
if (LLApp::isExiting())
{
mRelogRequested = false;
break;
}
if (mTuningMode)
{
performMicTuning();
@ -1881,6 +1894,13 @@ bool LLVivoxVoiceClient::waitForChannel()
{
llcoro::suspendUntilTimeout(1.0);
}
if (LLApp::isExiting())
{
mRelogRequested = false;
break;
}
} while (mVoiceEnabled && !mRelogRequested);
LL_DEBUGS("Voice")
@ -1910,7 +1930,7 @@ bool LLVivoxVoiceClient::waitForChannel()
<< " RelogRequested=" << mRelogRequested
<< " VoiceEnabled=" << mVoiceEnabled
<< LL_ENDL;
return true;
return !LLApp::isExiting();
}
bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)

View File

@ -401,13 +401,6 @@
parameter="model" />
</menu_item_call>
</menu>
<menu_item_call
label="Use as Favorites folder"
layout="topleft"
name="Set Favorites folder">
<menu_item_call.on_click
function="Inventory.SetFavoritesFolder"/>
</menu_item_call>
<menu
label="Change Type"
layout="topleft"

View File

@ -3800,6 +3800,17 @@ Could not teleport to [SLURL] as it's on a different grid ([GRID]) than the curr
yestext="OK"/>
</notification>
<notification icon="alertmodal.tga"
name="GeneralCertificateErrorShort"
type="alertmodal">
Could not connect to the server.
[REASON]
<tag>fail</tag>
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification icon="alertmodal.tga"
name="GeneralCertificateError"
type="alertmodal">

View File

@ -145,19 +145,6 @@
name="Worn Items"
show_item_link_overlays="true"
width="290" />
<favorites_inventory_panel
name="Favorite Items"
label="Favorites"
show_empty_message="false"
follows="all"
layout="topleft"
width="290"
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
background_visible="true"
border="false"
bevel_style="none"
scroll.reserve_scroll_corner="false"/>
</tab_container>
<panel
follows="left|right|bottom"

View File

@ -124,7 +124,9 @@ Voice Server Version: [VOICE_VERSION]
<string name="CertExpired">The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administrator.</string>
<string name="CertKeyUsage">The certificate returned by the server could not be used for SSL. Please contact your Grid administrator.</string>
<string name="CertBasicConstraints">Too many certificates were in the servers Certificate chain. Please contact your Grid administrator.</string>
<string name="CertInvalid">Could not load certificate. Please contact your Grid administrator.</string>
<string name="CertInvalidSignature">The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrator.</string>
<string name="CertAllocationFailure">Failed to allocate openssl memory for certificate.</string>
<string name="LoginFailedNoNetwork">Network error: Could not establish connection, please check your network connection.</string>
<string name="LoginFailed">Login failed.</string>
@ -753,7 +755,6 @@ http://www.firestormviewer.org/support for help fixing this problem.
<!-- inventory -->
<string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string>
<string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Show [secondlife:///app/inventory/filters Filters].</string>
<string name="InventoryFavoritItemsNotSelected">Click "Use as Favorites folder" on a folder of your choice. You can choose a different folder at any time. System folders cannot be used for Favorites.</string>
<string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string>
<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
<string name="MarketplaceNoMatchingItems">No items found. Check the spelling of your search string and try again.</string>

View File

@ -124,6 +124,14 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
S32 LLMachineID::init() { return 1; }
LLCertException::LLCertException(const LLSD& cert_data, const std::string& msg)
: LLException(msg),
mCertData(cert_data)
{
LL_WARNS("SECAPI") << "Certificate Error: " << msg << LL_ENDL;
}
// -------------------------------------------------------------------------------------------
// TUT
// -------------------------------------------------------------------------------------------