master
skolb 2009-12-17 11:39:35 -08:00
commit 967652a705
4 changed files with 11 additions and 5 deletions

View File

@ -330,6 +330,7 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder)
else
{
mFolders.insert(mFolders.begin(), folder);
folder->setShowLoadStatus(true);
}
folder->setOrigin(0, 0);
folder->reshape(getRect().getWidth(), 0);

View File

@ -136,7 +136,8 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p)
mListener(p.listener),
mArrowImage(p.folder_arrow_image),
mBoxImage(p.selection_image),
mDontShowInHierarchy(false)
mDontShowInHierarchy(false),
mShowLoadStatus(false)
{
refresh();
}
@ -966,10 +967,11 @@ void LLFolderViewItem::draw()
}
if ( mIsLoading
&& mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") )
if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime"))
|| (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) )
{
font->renderUTF8(LLTrans::getString("LoadingData"), 0, text_left, y, sSearchStatusColor,
std::string load_string = LLTrans::getString("LoadingData") + " ";
font->renderUTF8(load_string, 0, text_left, y, sSearchStatusColor,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE);
text_left = right_x;
}

View File

@ -163,6 +163,7 @@ protected:
BOOL mIsLoading;
LLTimer mTimeSinceRequestStart;
bool mDontShowInHierarchy;
bool mShowLoadStatus;
// helper function to change the selection from the root.
void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected);
@ -254,6 +255,8 @@ public:
BOOL getIsCurSelection() { return mIsCurSelection; }
BOOL hasVisibleChildren() { return mHasVisibleChildren; }
void setShowLoadStatus(bool status) { mShowLoadStatus = status; }
// Call through to the viewed object and return true if it can be
// removed. Returns true if it's removed.

View File

@ -378,7 +378,7 @@
reference="White_25" />
<color
name="InventorySearchStatusColor"
reference="Black" />
reference="EmphasisColor" />
<color
name="LabelDisabledColor"
reference="White_25" />