diff options
author | Rider Linden <rider@lindenlab.com> | 2015-04-15 13:30:43 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-04-15 13:30:43 -0700 |
commit | e027fbb79f82e89400afd06e1ce817e5c18da34e (patch) | |
tree | 6bb6af0a6e690330845ecbdd1248de1c3405a2aa /indra | |
parent | 109e2db131514de43a2d61da1cc4ee78dc89f858 (diff) | |
parent | e611e35e033e99f619b0e4938f6879c8e387efd5 (diff) |
Merged lindenlab/viewer-tools-update into default
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 11 | ||||
-rwxr-xr-x | indra/newview/llfloaterpay.cpp | 23 | ||||
-rwxr-xr-x | indra/newview/llinventorymodelbackgroundfetch.cpp | 166 | ||||
-rwxr-xr-x | indra/newview/llinventorymodelbackgroundfetch.h | 3 | ||||
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 15 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/menu_viewer.xml | 10 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/notifications.xml | 11 |
7 files changed, 38 insertions, 201 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7a7498a154..845cb5ae96 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14703,17 +14703,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>UseHTTPInventory</key> - <map> - <key>Comment</key> - <string>Allow use of http inventory transfers instead of UDP</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>ClickToWalk</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 172f81d078..31245db344 100755 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -367,7 +367,8 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle<LLObjectSe LLSelectNode* node = selection->getFirstRootNode(); if (!node) { - //FIXME: notify user object no longer exists + // object no longer exists + LLNotificationsUtil::add("PayObjectFailed"); floater->closeFloater(); return; } @@ -491,12 +492,22 @@ void LLFloaterPay::onGive(void* data) } if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) { - LLUUID payee_id; - BOOL is_group; + LLUUID payee_id = LLUUID::null; + BOOL is_group = false; if (floater->mObjectSelection.notNull()) { LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); - node->mPermissions->getOwnership(payee_id, is_group); + if (node) + { + node->mPermissions->getOwnership(payee_id, is_group); + } + else + { + // object no longer exists + LLNotificationsUtil::add("PayObjectFailed"); + floater->closeFloater(); + return; + } } else { @@ -562,6 +573,10 @@ void LLFloaterPay::give(S32 amount) msg->sendReliable( region->getHost() ); } } + else + { + LLNotificationsUtil::add("PayObjectFailed"); + } } else { diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index f18832fe95..40edb13a80 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -181,8 +181,6 @@ private: }; -const S32 MAX_FETCH_RETRIES = 10; - const char * const LOG_INV("Inventory"); } // end of namespace anonymous @@ -199,10 +197,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch(): mAllFoldersFetched(FALSE), mRecursiveInventoryFetchStarted(FALSE), mRecursiveLibraryFetchStarted(FALSE), - mNumFetchRetries(0), - mMinTimeBetweenFetches(0.3f), - mMaxTimeBetweenFetches(10.f), - mTimelyFetchPending(FALSE) + mMinTimeBetweenFetches(0.3f) {} LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() @@ -351,164 +346,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (mBackgroundFetchActive && gAgent.getRegion() && gAgent.getRegion()->capabilitiesReceived()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - if (gSavedSettings.getBOOL("UseHTTPInventory")) - { - bulkFetch(); - return; - } - -#if 1 - //-------------------------------------------------------------------------------- - // DEPRECATED OLD CODE - // - - // No more categories to fetch, stop fetch process. - if (mFetchQueue.empty()) - { - setAllFoldersFetched(); - return; - } - - F32 fast_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.1f); - F32 slow_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.5f); - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() > slow_fetch_time) - { - // Double timeouts on failure. - mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f); - mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f); - LL_DEBUGS(LOG_INV) << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; - // fetch is no longer considered "timely" although we will wait for full time-out. - mTimelyFetchPending = FALSE; - } - - while(1) - { - if (mFetchQueue.empty()) - { - break; - } - - if (gDisconnected) - { - // Just bail if we are disconnected. - break; - } - - const FetchQueueInfo info = mFetchQueue.front(); - - if (info.mIsCategory) - { - - LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); - - // Category has been deleted, remove from queue. - if (!cat) - { - mFetchQueue.pop_front(); - continue; - } - - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && - LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - // Category exists but has no children yet, fetch the descendants - // for now, just request every time and rely on retry timer to throttle. - if (cat->fetch()) - { - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; - } - else - { - // The catagory also tracks if it has expired and here it says it hasn't - // yet. Get out of here because nothing is going to happen until we - // update the timers. - break; - } - } - // Do I have all my children? - else if (gInventory.isCategoryComplete(info.mUUID)) - { - // Finished with this category, remove from queue. - mFetchQueue.pop_front(); - - // Add all children to queue. - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) - { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); - } - - // We received a response in less than the fast time. - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) - { - // Shrink timeouts based on success. - mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); - mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); - LL_DEBUGS(LOG_INV) << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; - } - - mTimelyFetchPending = FALSE; - continue; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - // Received first packet, but our num descendants does not match db's num descendants - // so try again later. - mFetchQueue.pop_front(); - - if (mNumFetchRetries++ < MAX_FETCH_RETRIES) - { - // push on back of queue - mFetchQueue.push_back(info); - } - mTimelyFetchPending = FALSE; - mFetchTimer.reset(); - break; - } - - // Not enough time has elapsed to do a new fetch - break; - } - else - { - LLViewerInventoryItem* itemp = gInventory.getItem(info.mUUID); - - mFetchQueue.pop_front(); - if (!itemp) - { - continue; - } - - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches) - { - itemp->fetchFromServer(); - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; - } - else if (itemp->mIsComplete) - { - mTimelyFetchPending = FALSE; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - mFetchQueue.push_back(info); - mFetchTimer.reset(); - mTimelyFetchPending = FALSE; - } - // Not enough time has elapsed to do a new fetch - break; - } - } - - // - // DEPRECATED OLD CODE - //-------------------------------------------------------------------------------- -#endif + bulkFetch(); } } diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 2139f85519..19fbfc2ed3 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -87,12 +87,9 @@ private: BOOL mBackgroundFetchActive; bool mFolderFetchActive; S32 mFetchCount; - BOOL mTimelyFetchPending; - S32 mNumFetchRetries; LLFrameTimer mFetchTimer; F32 mMinTimeBetweenFetches; - F32 mMaxTimeBetweenFetches; struct FetchQueueInfo { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index bebbf4ea56..36dd778746 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2798,15 +2798,12 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("FlickrConnect"); capabilityNames.append("TwitterConnect"); - if (gSavedSettings.getBOOL("UseHTTPInventory")) - { - capabilityNames.append("FetchLib2"); - capabilityNames.append("FetchLibDescendents2"); - capabilityNames.append("FetchInventory2"); - capabilityNames.append("FetchInventoryDescendents2"); - capabilityNames.append("IncrementCOFVersion"); - AISCommand::getCapabilityNames(capabilityNames); - } + capabilityNames.append("FetchLib2"); + capabilityNames.append("FetchLibDescendents2"); + capabilityNames.append("FetchInventory2"); + capabilityNames.append("FetchInventoryDescendents2"); + capabilityNames.append("IncrementCOFVersion"); + AISCommand::getCapabilityNames(capabilityNames); capabilityNames.append("GetDisplayNames"); capabilityNames.append("GetMesh"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 658c716ee7..b75d614dcc 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3590,16 +3590,6 @@ function="ToggleControl" parameter="ImagePipelineUseHTTP" /> </menu_item_check> - <menu_item_check - label="HTTP Inventory" - name="HTTP Inventory"> - <menu_item_check.on_check - function="CheckControl" - parameter="UseHTTPInventory" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="UseHTTPInventory" /> - </menu_item_check> <menu_item_call label="Compress Images" name="Compress Images"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 632396d58c..28565a85c6 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5277,6 +5277,17 @@ Warning: The 'Pay object' click action has been set, but it will only <notification icon="alertmodal.tga" + name="PayObjectFailed" + type="alertmodal"> + Payment failed: object was not found. + <tag>fail</tag> + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="OpenObjectCannotCopy" type="alertmodal"> There are no items in this object that you are allowed to copy. |