From c9fe843c3fbcfce83de4688d93e7cec2acd046a0 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 6 Dec 2010 19:54:55 +0000 Subject: [PATCH] CtrlLib: Tuning FileSel icons... git-svn-id: svn://ultimatepp.org/upp/trunk@2893 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/FileSel.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/uppsrc/CtrlLib/FileSel.cpp b/uppsrc/CtrlLib/FileSel.cpp index 4970c1997..bd6abf4f6 100644 --- a/uppsrc/CtrlLib/FileSel.cpp +++ b/uppsrc/CtrlLib/FileSel.cpp @@ -372,19 +372,22 @@ void LazyFileIcons::Do() return; } const FileList::File& f = list->Get(pos); - int t0 = GetTickCount(); - String n = f.name; + if(ToLower(GetFileExt(f.name)) == ".exe") { + int t0 = GetTickCount(); + DDUMP(f.name); #ifdef PLATFORM_WIN32 - Image img = GetFileIcon(AppendFileName(dir, f.name), f.isdir, f.unixexe, false, quick); + Image img = GetFileIcon(AppendFileName(dir, f.name), f.isdir, f.unixexe, false, quick); #else - Image img = GetFileIcon(dir, f.name, f.isdir, f.unixexe, false); + Image img = GetFileIcon(dir, f.name, f.isdir, f.unixexe, false); #endif - WhenIcon(f.isdir, f.name, img); - if(f.hidden) - img = Contrast(img, 200); - list->SetIcon(pos, img); - if(GetTickCount() - t0 > 100 || GetTickCount() - start > 1500) - return; + WhenIcon(f.isdir, f.name, img); + if(f.hidden) + img = Contrast(img, 200); + list->SetIcon(pos, img); + DDUMP(GetTickCount() - t0); + if(GetTickCount() - t0 > 500/* || GetTickCount() - start > 1500*/) + return; + } pos++; } }