aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfolderview.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp
index eb9addc..7d309a0 100644
--- a/linden/indra/newview/llfolderview.cpp
+++ b/linden/indra/newview/llfolderview.cpp
@@ -108,6 +108,7 @@ LLColor4 LLFolderViewItem::sHighlightBgColor;
108LLColor4 LLFolderViewItem::sHighlightFgColor; 108LLColor4 LLFolderViewItem::sHighlightFgColor;
109LLColor4 LLFolderViewItem::sFilterBGColor; 109LLColor4 LLFolderViewItem::sFilterBGColor;
110LLColor4 LLFolderViewItem::sFilterTextColor; 110LLColor4 LLFolderViewItem::sFilterTextColor;
111LLColor4 LLFolderViewItem::sLoadingMessageTextColor;
111 112
112// Default constructor 113// Default constructor
113LLFolderViewItem::LLFolderViewItem( const LLString& name, LLViewerImage* icon, 114LLFolderViewItem::LLFolderViewItem( const LLString& name, LLViewerImage* icon,
@@ -132,7 +133,8 @@ LLFolderViewItem::LLFolderViewItem( const LLString& name, LLViewerImage* icon,
132 mStringMatchOffset(LLString::npos), 133 mStringMatchOffset(LLString::npos),
133 mControlLabelRotation(0.f), 134 mControlLabelRotation(0.f),
134 mRoot( root ), 135 mRoot( root ),
135 mDragAndDropTarget(FALSE) 136 mDragAndDropTarget(FALSE),
137 mIsLoading(FALSE)
136{ 138{
137 setIcon(icon); 139 setIcon(icon);
138 if( !LLFolderViewItem::sFont ) 140 if( !LLFolderViewItem::sFont )
@@ -151,6 +153,7 @@ LLFolderViewItem::LLFolderViewItem( const LLString& name, LLViewerImage* icon,
151 LLFolderViewItem::sHighlightFgColor = gColors.getColor( "MenuItemHighlightFgColor" ); 153 LLFolderViewItem::sHighlightFgColor = gColors.getColor( "MenuItemHighlightFgColor" );
152 LLFolderViewItem::sFilterBGColor = gColors.getColor( "FilterBackgroundColor" ); 154 LLFolderViewItem::sFilterBGColor = gColors.getColor( "FilterBackgroundColor" );
153 LLFolderViewItem::sFilterTextColor = gColors.getColor( "FilterTextColor" ); 155 LLFolderViewItem::sFilterTextColor = gColors.getColor( "FilterTextColor" );
156 LLFolderViewItem::sLoadingMessageTextColor = gColors.getColor( "FolderViewLoadingMessageTextColor" );
154 157
155 mArrowImage = gImageList.getImage(LLUUID(gViewerArt.getString("folder_arrow.tga")), MIPMAP_FALSE, TRUE); 158 mArrowImage = gImageList.getImage(LLUUID(gViewerArt.getString("folder_arrow.tga")), MIPMAP_FALSE, TRUE);
156 mBoxImage = gImageList.getImage(LLUUID(gViewerArt.getString("rounded_square.tga")), MIPMAP_FALSE, TRUE); 159 mBoxImage = gImageList.getImage(LLUUID(gViewerArt.getString("rounded_square.tga")), MIPMAP_FALSE, TRUE);
@@ -933,6 +936,14 @@ void LLFolderViewItem::draw()
933 text_left = right_x; 936 text_left = right_x;
934 } 937 }
935 938
939
940 if ( mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") )
941 {
942 sFont->renderUTF8( "Loading... ", 0, text_left, y, sLoadingMessageTextColor,
943 LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, S32_MAX, S32_MAX, &right_x, FALSE);
944 text_left = right_x;
945 }
946
936 sFont->renderUTF8( mLabel, 0, text_left, y, color, 947 sFont->renderUTF8( mLabel, 0, text_left, y, color,
937 LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, 948 LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle,
938 S32_MAX, S32_MAX, &right_x, FALSE ); 949 S32_MAX, S32_MAX, &right_x, FALSE );
@@ -2197,6 +2208,24 @@ void LLFolderViewFolder::draw()
2197 mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f)); 2208 mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f));
2198 } 2209 }
2199 2210
2211 bool possibly_has_children = false;
2212 bool up_to_date = mListener && mListener->isUpToDate();
2213 if(!up_to_date && mListener && mListener->hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter)
2214 {
2215 possibly_has_children = true;
2216 }
2217
2218
2219 BOOL loading = ( mIsOpen && possibly_has_children && !up_to_date );
2220
2221 if ( loading && !mIsLoading )
2222 {
2223 // Measure how long we've been in the loading state
2224 mTimeSinceRequestStart.reset();
2225 }
2226
2227 mIsLoading = loading;
2228
2200 LLFolderViewItem::draw(); 2229 LLFolderViewItem::draw();
2201 2230
2202 // draw children if root folder, or any other folder that is open or animating to closed state 2231 // draw children if root folder, or any other folder that is open or animating to closed state