From 74f0f4dac0c31201a7c26ec1b6d645de5c8d288d Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 18 Dec 2009 13:10:38 -0500 Subject: EXT-3575 : Inernal selection spam when nothing selected in some folders Default selection will no longer try to select hidden folders. --- indra/newview/llfolderviewitem.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 9ae0c9100a..a6be866bb3 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -969,19 +969,24 @@ 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); + text_left = right_x; + if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) { - std::string load_string = LLTrans::getString("LoadingData") + " "; + 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; } - 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); - + font->renderUTF8( "BLAH BLAH ", 0, right_x, y, sSuffixColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, S32_MAX, &right_x, FALSE ); + if (!mLabelSuffix.empty()) { font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, -- cgit v1.2.3 From c624407ea791b61942694f456c8e3d7c5837716f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 18 Dec 2009 13:13:28 -0500 Subject: EXT-3567 : My Inventory shows as loading even when Library is loading This reformats "Loading... Inventory" into "Inventory (Loading...)" Took out accidental debug checkin. --- indra/newview/llfolderviewitem.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index a6be866bb3..cf3a126aef 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -983,10 +983,6 @@ void LLFolderViewItem::draw() text_left = right_x; } - font->renderUTF8( "BLAH BLAH ", 0, right_x, y, sSuffixColor, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, &right_x, FALSE ); - if (!mLabelSuffix.empty()) { font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, -- cgit v1.2.3 From c8c890021696ff468df4acd30b9f3c573e4af9ae Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 18 Dec 2009 14:08:17 -0500 Subject: EXT-3567 : My Inventory shows as loading even when Library is loading Fixed some highlight formatting issues. --- indra/newview/llfolderviewitem.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index cf3a126aef..bfd9d6dca7 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -972,15 +972,13 @@ 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); - text_left = right_x; if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) { std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; - font->renderUTF8(load_string, 0, text_left, y, sSearchStatusColor, + 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; } if (!mLabelSuffix.empty()) -- cgit v1.2.3 From 5aaaa4e9473615c06fde9e19f34d309aa7b9fb0f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 21 Dec 2009 12:56:52 -0500 Subject: EXT-3567 : Folders hsould show as "Loading..." when contents are being fetched Name change "DontShowInHierarchy"->"Hidden". --- indra/newview/llfolderviewitem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index bfd9d6dca7..0be449fc9f 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) @@ -418,7 +418,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 +823,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); @@ -1257,7 +1257,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) // filter self only on first pass through LLFolderViewItem::filter( filter ); } - if (mDontShowInHierarchy) + if (mHidden) { setOpen(); } -- cgit v1.2.3 From ced5b819d74fa70fc2050b13749bfe1387340583 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 21 Dec 2009 17:21:48 -0500 Subject: For EXT-3567: Folders should show as 'Loading...' when contents being fetched --- indra/newview/llfolderviewitem.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index bfd9d6dca7..c430dc96af 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -970,11 +970,26 @@ 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); + 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, right_x, y, sSearchStatusColor, -- cgit v1.2.3 From 4e901957f9414284fa26ca70122f952243e4122c Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 30 Dec 2009 15:46:53 -0800 Subject: EXT-3753 Made inventory subfolders indent more. Changed back to 8 pixel indent, as Ben Glenn was seeing confusion in user tests with lesser indents. Made it a setting, FolderIndentation in case we want to change in the future. Reviewed with Leyla. --- indra/newview/llfolderviewitem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 720c2c7b1a..9d54aafd67 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -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 indentation("FolderIndentation", 0); mIndentation = (getParentFolder() && getParentFolder()->getParentFolder() && getParentFolder()->getParentFolder()->getParentFolder()) - ? mParentFolder->getIndentation() + LEFT_INDENTATION + ? mParentFolder->getIndentation() + indentation : 0; if (mLabelWidthDirty) { -- cgit v1.2.3