diff -r 41ebde60981f -r 271e901a9423 filebrowser/engine/FBFileUtils.cpp --- a/filebrowser/engine/FBFileUtils.cpp Fri May 14 15:15:12 2010 +0300 +++ b/filebrowser/engine/FBFileUtils.cpp Fri May 14 16:10:39 2010 +0300 @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include #include #include @@ -1960,46 +1962,48 @@ // if (dlgResult) // { // iEngine->EikonEnv()->BusyMsgL(_L("** Searching **"), TGulAlignment(EHCenterVTop)); -// -// iFileEntryList->Reset(); -// -// // if search dir is empty, find from all drives -// if (iSearchAttributes.iSearchDir == KNullDesC) -// { -// for (TInt i=0; iCount(); i++) -// { -// TDriveEntry driveEntry = iDriveEntryList->At(i); -// -// TBuf<10> driveRoot; -// driveRoot.Append(driveEntry.iLetter); -// driveRoot.Append(_L(":\\")); -// -// DoSearchFiles(iSearchAttributes.iWildCards, driveRoot); -// -// if (iSearchAttributes.iRecurse) -// DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, driveRoot); -// -// } -// -// } -// -// // otherwise just search from the selected directory -// else -// { -// DoSearchFiles(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir); -// -// if (iSearchAttributes.iRecurse) -// DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir); -// } -// + + + iEngine->FileBrowserUI()->ShowWaitDialog(_L("** Searching **")); + iFileEntryList->Reset(); + + // if search dir is empty, find from all drives + if (iSearchAttributes.iSearchDir == KNullDesC) + { + for (TInt i=0; iCount(); i++) + { + TDriveEntry driveEntry = iDriveEntryList->At(i); + + TBuf<10> driveRoot; + driveRoot.Append(driveEntry.iLetter); + driveRoot.Append(_L(":\\")); + + DoSearchFiles(iSearchAttributes.iWildCards, driveRoot); + + if (iSearchAttributes.iRecurse) + DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, driveRoot); + } + + } + + // otherwise just search from the selected directory + else + { + DoSearchFiles(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir); + + if (iSearchAttributes.iRecurse) + DoSearchFilesRecursiveL(iSearchAttributes.iWildCards, iSearchAttributes.iSearchDir); + } + // iEngine->EikonEnv()->BusyMsgCancel(); -// + iEngine->FileBrowserUI()->CancelWaitDialog(); + // TInt operations = iFileEntryList->Count(); -// -// iListingMode = ESearchResults; -// iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0); -// RefreshViewL(); -// + + iListingMode = ESearchResults; + // TODO iEngine->FileListContainer()->ListBox()->SetCurrentItemIndex(0); + RefreshViewL(); + // _LIT(KMessage, "%d entries found"); // TFileName noteMsg; // noteMsg.Format(KMessage, operations); @@ -2016,8 +2020,9 @@ CDir* dir; TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir); - while (err == KErrNone) + while (err == KErrNone && iAllowProcessing) { + iEngine->FileBrowserUI()->ProcessEvents(); for (TInt i=0; iCount(); i++) { TEntry entry = (*dir)[i]; @@ -3266,7 +3271,7 @@ CleanupClosePushL(file); iFindFileEntryList->Reset(); - iEngine->EikonEnv()->BusyMsgL(_L("** Generating **"), TGulAlignment(EHCenterVTop)); + iEngine->FileBrowserUI()->ShowWaitDialog(_L("** Generating **")); for (TInt i=0; iCount(); i++) { @@ -3291,12 +3296,14 @@ writeBuf.Copy(fileEntry.iPath); writeBuf.Append(fileEntry.iEntry.iName); + writeBuf.Append(_L(" - ")); + writeBuf.AppendNum(fileEntry.iEntry.iSize); + writeBuf.Append(_L(" B")); writeBuf.Append(KFileNewLine); - file.Write(writeBuf); } - iEngine->EikonEnv()->BusyMsgCancel(); + iEngine->FileBrowserUI()->CancelWaitDialog(); CleanupStack::PopAndDestroy(); //file iFindFileEntryList->Reset(); @@ -3325,8 +3332,9 @@ CDir* dir; TInt err = fileFinder.FindWildByPath(aFileName, &aPath, dir); - while (err == KErrNone) + while (err == KErrNone && iAllowProcessing) { + iEngine->FileBrowserUI()->ProcessEvents(); for (TInt i=0; iCount(); i++) { TEntry entry = (*dir)[i];