diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
commit | c9868071b113b251e03d95163118b696e28bbe98 (patch) | |
tree | 8428d2e97f7a61b1a10e7e10494199a39969369d /indra/newview/llfolderviewitem.cpp | |
parent | e833e7ad442f5b59f95c6ccfcaaf1d103d247d69 (diff) | |
parent | e8659e0e13c65308ad2f036dc7e7ccff0e665976 (diff) |
Merge from trunk. Conflicts manually resolved in:
U indra/llui/lluictrlfactory.cpp
U indra/newview/llinventorybridge.cpp
U indra/newview/llviewertexture.cpp
U indra/newview/llviewertexture.h
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 9ae0c9100a..9d54aafd67 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -136,7 +136,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mListener(p.listener), mArrowImage(p.folder_arrow_image), mBoxImage(p.selection_image), - mDontShowInHierarchy(false), + mHidden(false), mShowLoadStatus(false) { refresh(); @@ -201,7 +201,7 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); // Skip over items that are invisible or are hidden from the UI. - while(itemp && (!itemp->getVisible() || itemp->getDontShowInHierarchy())) + while(itemp && (!itemp->getVisible() || itemp->getHidden())) { LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); if (itemp == next_itemp) @@ -392,10 +392,11 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo // makes sure that this view and it's children are the right size. S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) { + static LLUICachedControl<S32> indentation("FolderIndentation", 0); mIndentation = (getParentFolder() && getParentFolder()->getParentFolder() && getParentFolder()->getParentFolder()->getParentFolder()) - ? mParentFolder->getIndentation() + LEFT_INDENTATION + ? mParentFolder->getIndentation() + indentation : 0; if (mLabelWidthDirty) { @@ -418,7 +419,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) S32 LLFolderViewItem::getItemHeight() { - if (mDontShowInHierarchy) return 0; + if (mHidden) return 0; S32 icon_height = mIcon->getHeight(); S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); @@ -823,7 +824,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, void LLFolderViewItem::draw() { - if (mDontShowInHierarchy) return; + if (mHidden) return; static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); @@ -969,19 +970,33 @@ void LLFolderViewItem::draw() } + font->renderUTF8( mLabel, 0, text_left, y, color, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); + +// LLViewerInventoryCategory *item = 0; +// if (getListener()) +// item = gInventory.getCategory(getListener()->getUUID()); + bool root_is_loading = false; + if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(),gInventory.getRootFolderID())) + { + // Descendent of my inventory. + root_is_loading = gInventory.myInventoryFetchInProgress(); + } + if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(),gInventory.getLibraryRootFolderID())) + { + // Descendent of library + root_is_loading = gInventory.libraryFetchInProgress(); + } + if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) - || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) + || (LLInventoryModel::backgroundFetchActive() && root_is_loading && mShowLoadStatus) ) { - std::string load_string = LLTrans::getString("LoadingData") + " "; - font->renderUTF8(load_string, 0, text_left, y, sSearchStatusColor, + std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; + font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); - text_left = right_x; } - font->renderUTF8( mLabel, 0, text_left, y, color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); - if (!mLabelSuffix.empty()) { font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, @@ -1258,7 +1273,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) // filter self only on first pass through LLFolderViewItem::filter( filter ); } - if (mDontShowInHierarchy) + if (mHidden) { setOpen(); } |