Tweaks to fix the channel stuff, save a bit of processing.
A few options I missed with the last commit, and some minor patching because it's in the same file.
This commit is contained in:
@@ -1516,7 +1516,7 @@ void LLInventoryModel::bulkFetch(std::string url)
|
||||
if (cat)
|
||||
{
|
||||
// <edit> Pre-emptive strike
|
||||
if(!(gInventory.isObjectDescendentOf(cat->getUUID(), gLocalInventoryRoot)))
|
||||
if(!(gInventory.isObjectDescendentOf(cat->getUUID(), gSystemFolderRoot)))
|
||||
{
|
||||
// </edit>
|
||||
if ( LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
|
||||
@@ -2047,7 +2047,7 @@ bool LLInventoryModel::isCategoryComplete(const LLUUID& cat_id) const
|
||||
}
|
||||
|
||||
// <edit>
|
||||
if((cat_id == gLocalInventoryRoot) || gInventory.isObjectDescendentOf(cat_id, gLocalInventoryRoot)) return true;
|
||||
if((cat_id == gSystemFolderRoot) || gInventory.isObjectDescendentOf(cat_id, gSystemFolderRoot)) return true;
|
||||
// </edit>
|
||||
|
||||
return false;
|
||||
@@ -3382,14 +3382,6 @@ void LLInventoryModel::processSaveAssetIntoInventory(LLMessageSystem* msg,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct InventoryCallbackInfo
|
||||
{
|
||||
InventoryCallbackInfo(U32 callback, const LLUUID& inv_id) :
|
||||
|
||||
@@ -667,14 +667,24 @@ void LLInventoryView::draw()
|
||||
{
|
||||
if (LLInventoryModel::isEverythingFetched())
|
||||
{
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
std::ostringstream title;
|
||||
title << "Inventory";
|
||||
std::string item_count_string;
|
||||
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
||||
title << " (" << item_count_string << " items)";
|
||||
title << mFilterText;
|
||||
setTitle(title.str());
|
||||
S32 item_count = gInventory.getItemCount();
|
||||
|
||||
//don't let llfloater work more than necessary
|
||||
if (item_count != mOldItemCount || mOldFilterText != mFilterText)
|
||||
{
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
std::ostringstream title;
|
||||
title << "Inventory"; //*TODO: make translatable
|
||||
std::string item_count_string;
|
||||
LLResMgr::getInstance()->getIntegerString(item_count_string, item_count);
|
||||
title << " (" << item_count_string << " items)";
|
||||
title << mFilterText;
|
||||
setTitle(title.str());
|
||||
}
|
||||
|
||||
mOldFilterText = mFilterText;
|
||||
mOldItemCount = item_count;
|
||||
|
||||
}
|
||||
if (mActivePanel && mSearchEditor)
|
||||
{
|
||||
@@ -835,7 +845,7 @@ void LLInventoryView::changed(U32 mask)
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
std::string item_count_string;
|
||||
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
||||
|
||||
|
||||
//Displays a progress indication for loading the inventory, but not if it hasn't been loaded before on this PC, or we load more than expected - rkeast
|
||||
if(mItemCount == -1)
|
||||
{
|
||||
@@ -852,7 +862,10 @@ void LLInventoryView::changed(U32 mask)
|
||||
else title << " (Fetched " << item_count_string << " items of ~" << total_items << " - ~" << items_remaining << " remaining...)";
|
||||
}
|
||||
}
|
||||
else gSavedPerAccountSettings.setS32("rkeastInventoryPreviousCount", gInventory.getItemCount());
|
||||
else
|
||||
{
|
||||
gSavedPerAccountSettings.setS32("rkeastInventoryPreviousCount", gInventory.getItemCount());
|
||||
}
|
||||
title << mFilterText;
|
||||
setTitle(title.str());
|
||||
|
||||
@@ -2041,6 +2054,7 @@ void LLInventoryPanel::buildNewViews(const LLInventoryObject* objectp)
|
||||
{
|
||||
llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
|
||||
<< ((S32) objectp->getType())
|
||||
<< "Named " << objectp->getName()
|
||||
<< " (shouldn't happen)" << llendl;
|
||||
}
|
||||
else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category
|
||||
|
||||
@@ -322,9 +322,10 @@ protected:
|
||||
LLSaveFolderState* mSavedFolderState;
|
||||
|
||||
std::string mFilterText;
|
||||
std::string mOldFilterText;
|
||||
|
||||
S32 mItemCount;
|
||||
|
||||
S32 mOldItemCount;
|
||||
|
||||
// This container is used to hold all active inventory views. This
|
||||
// is here to support the inventory toggle show button.
|
||||
|
||||
@@ -247,6 +247,9 @@ void LLStatusBar::draw()
|
||||
// Per-frame updates of visibility
|
||||
void LLStatusBar::refresh()
|
||||
{
|
||||
if(gDisconnected)
|
||||
return; //or crash if the sim crashes; because: already ~LLMenuBarGL()
|
||||
|
||||
// Adding Net Stat Meter back in
|
||||
F32 bwtotal = gViewerThrottle.getMaxBandwidth() / 1000.f;
|
||||
mSGBandwidth->setMin(0.f);
|
||||
|
||||
@@ -64,12 +64,7 @@ void LLTranslate::translateMessage(LLHTTPClient::ResponderPtr &result, const std
|
||||
getTranslateUrl(url, fromLang, toLang, mesg);
|
||||
|
||||
//<edit>
|
||||
std::string user_agent = llformat("%s %d.%d.%d (%d)",
|
||||
LL_CHANNEL,
|
||||
LL_VERSION_MAJOR,
|
||||
LL_VERSION_MINOR,
|
||||
LL_VERSION_PATCH,
|
||||
LL_VERSION_BUILD );
|
||||
std::string user_agent = gCurrentVersion;
|
||||
//</edit>
|
||||
|
||||
if (!m_Header.size())
|
||||
|
||||
@@ -130,22 +130,8 @@ void LLUserAuth::authenticate(
|
||||
XMLRPC_VectorAppendString(params, "last", lastname.c_str(), 0);
|
||||
XMLRPC_VectorAppendString(params, "web_login_key", web_login_key.getString().c_str(), 0);
|
||||
XMLRPC_VectorAppendString(params, "start", start.c_str(), 0);
|
||||
// <edit>
|
||||
//XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name
|
||||
//XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0);
|
||||
|
||||
//WOW NEIL YOU ARE SO AWESOME!!
|
||||
|
||||
XMLRPC_VectorAppendString(params, "version", std::string(
|
||||
llformat("%s", LL_CHANNEL) + " " +
|
||||
llformat("%d", LL_VERSION_MAJOR) + "." +
|
||||
llformat("%d", LL_VERSION_MINOR) + "." +
|
||||
llformat("%d", LL_VERSION_PATCH) + "." +
|
||||
llformat("%d", LL_VERSION_BUILD)
|
||||
).c_str(), 0); // Includes channel name
|
||||
|
||||
XMLRPC_VectorAppendString(params, "channel", std::string(LL_CHANNEL).c_str(), 0);
|
||||
|
||||
XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name
|
||||
XMLRPC_VectorAppendString(params, "channel", LL_CHANNEL, 0);
|
||||
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
|
||||
|
||||
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);
|
||||
@@ -232,18 +218,8 @@ void LLUserAuth::authenticate(
|
||||
XMLRPC_VectorAppendString(params, "last", lastname.c_str(), 0);
|
||||
XMLRPC_VectorAppendString(params, "passwd", dpasswd.c_str(), 0);
|
||||
XMLRPC_VectorAppendString(params, "start", start.c_str(), 0);
|
||||
//Partially correct but I'm very skeptical of the gSavedSettings part. Imprudence does it, but that doesn't mean it's right... -HgB
|
||||
//XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name
|
||||
//XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0);
|
||||
XMLRPC_VectorAppendString(params, "version", std::string(
|
||||
llformat("%s", LL_CHANNEL) + " " +
|
||||
llformat("%d", LL_VERSION_MAJOR) + "." +
|
||||
llformat("%d", LL_VERSION_MINOR) + "." +
|
||||
llformat("%d", LL_VERSION_PATCH) + "." +
|
||||
llformat("%d", LL_VERSION_BUILD)
|
||||
).c_str(), 0); // Includes channel name
|
||||
|
||||
XMLRPC_VectorAppendString(params, "channel", std::string(LL_CHANNEL).c_str(), 0);
|
||||
XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name
|
||||
XMLRPC_VectorAppendString(params, "channel", LL_CHANNEL, 0);
|
||||
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
|
||||
|
||||
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
// <edit>
|
||||
#include "llappviewer.h" // gLocalInventoryRoot
|
||||
#include "llappviewer.h" // System Folders
|
||||
// </edit>
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
@@ -152,7 +152,7 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& ne
|
||||
void LLViewerInventoryItem::removeFromServer()
|
||||
{
|
||||
// <edit> this check is ghetto
|
||||
if((mParentUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)))
|
||||
if((mParentUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -181,7 +181,7 @@ void LLViewerInventoryItem::updateServer(BOOL is_new) const
|
||||
// // *FIX: deal with this better.
|
||||
// llwarns << "LLViewerInventoryItem::updateServer() - for unowned item"
|
||||
// << llendl;
|
||||
if((mParentUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)))
|
||||
if((mParentUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot)))
|
||||
{
|
||||
// </edit>
|
||||
return;
|
||||
@@ -335,7 +335,7 @@ bool LLViewerInventoryItem::exportFileLocal(LLFILE* fp) const
|
||||
void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const
|
||||
{
|
||||
// <edit>
|
||||
if(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)) return;
|
||||
if(gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot)) return;
|
||||
// </edit>
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_MoveInventoryItem);
|
||||
@@ -407,7 +407,7 @@ void LLViewerInventoryCategory::copyViewerCategory(const LLViewerInventoryCatego
|
||||
void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const
|
||||
{
|
||||
// <edit>
|
||||
if(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)) return;
|
||||
if(gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot)) return;
|
||||
// </edit>
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
msg->newMessageFast(_PREHASH_MoveInventoryFolder);
|
||||
@@ -471,7 +471,7 @@ void LLViewerInventoryCategory::removeFromServer( void )
|
||||
bool LLViewerInventoryCategory::fetchDescendents()
|
||||
{
|
||||
// <edit>
|
||||
if((mUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot))) return false;
|
||||
if((mUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot))) return false;
|
||||
// </edit>
|
||||
if((VERSION_UNKNOWN == mVersion)
|
||||
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
|
||||
|
||||
Reference in New Issue
Block a user