Skip to content

Commit b02c1cd

Browse files
committed
Minor changes
1 parent b0f7294 commit b02c1cd

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

src/FinderXMain.pas

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ TMainForm = class(TForm)
168168
procedure RestoreMainForm();
169169
procedure StartIndexing(bg: Boolean);
170170

171-
procedure OnSearchResultsShellInfo(var Msg: TMessage); message WM_SearchResultsShellInfo_MSG;
171+
procedure OnSearchResultsShellInfo(var Msg: TMessage); message WM_SEARCHRESULTSSHELLINFO_MSG;
172172
procedure OnRestoreFormRemote(var Msg: TMessage); message WM_RESTORE_MAINFORM_MSG;
173173
procedure OnDEVICECHANGE(var Msg: TMessage); message WM_DEVICECHANGE;
174174
end;
@@ -221,9 +221,8 @@ procedure TMainForm.OnDEVICECHANGE(var Msg: TMessage);
221221
/// <summary>During search FileCache calls this callback function only for items that successfully passed filter.</summary>
222222
/// <remarks>Define this method to add filtered items into ListView. TCacheItem is a class therefore passed by reference.
223223
/// If you modify Item's fields, new data be stored and available for next searches. </remarks>
224-
/// <param name="FullPath">Full path that includes file name of the file being added</param>
225-
/// <param name="Item">Item that contains other file information: size, modified date etc.</param>
226-
/// <return> Returns False to stop filtering (for example when maximum number of items in ListView is reached). In other cases function should return True.</return>
224+
/// <param name="Item">Item that contains file information: size, modified date etc.</param>
225+
/// <return> Returns False to stop filtering (for example when maximum number of items in ListView is reached). In other cases function should return True.</return>
227226
function TMainForm.OnFileFound({FullPath: string;} Item: TCacheItem): Boolean;
228227
var
229228
ResultsItem: TSearchResultsItem;
@@ -266,7 +265,7 @@ function TMainForm.OnFileFound({FullPath: string;} Item: TCacheItem): Boolean;
266265
Result := True;
267266
end;
268267

269-
// processes WM_SearchResultsShellInfo_MSG messages received from another thread.
268+
// processes WM_SEARCHRESULTSSHELLINFO_MSG messages received from another thread.
270269
procedure TMainForm.OnSearchResultsShellInfo(var Msg: TMessage);
271270
var
272271
TmpItem: TCacheItemExt;
@@ -761,7 +760,7 @@ procedure TMainForm.ListView1Data(Sender: TObject; Item: TListItem);
761760
then if origItem.Item.FDenied
762761
then Item.SubItems.Add('N/A')
763762
else Item.SubItems.Add(origItem.Item.FFileCountStr)
764-
else Item.SubItems.Add(origItem.Item.FFileCountStr); //Item.SubItems.Add('-'); // for files
763+
else {Item.SubItems.Add(origItem.Item.FFileCountStr);} Item.SubItems.Add('-'); // for files
765764

766765
Item.SubItems.Add(origItem.Item.FOwner);
767766
end;
@@ -1338,13 +1337,13 @@ procedure TSearchResultsShellInfoThread.Execute;
13381337
then TmpI.FOwner := GetFileOwnerName(resItem.Item.FPath);
13391338

13401339
GetFileShellInfo(resItem.Item.FPath, TmpI); // we do not need to check function return value here
1341-
PostMessage(MainForm.Handle, WM_SearchResultsShellInfo_MSG, WPARAM(TmpI), LPARAM(i - 1));
1340+
PostMessage(MainForm.Handle, WM_SEARCHRESULTSSHELLINFO_MSG, WPARAM(TmpI), LPARAM(i - 1));
13421341
end;
13431342

13441343
end;
13451344
finally
13461345
// sending "notification" message that work has finished
1347-
PostMessage(MainForm.Handle, WM_SearchResultsShellInfo_MSG, WPARAM(nil), LPARAM(MainForm.FSearchResults.Count));
1346+
PostMessage(MainForm.Handle, WM_SEARCHRESULTSSHELLINFO_MSG, WPARAM(nil), LPARAM(MainForm.FSearchResults.Count));
13481347
MainForm.ListView1.Invalidate;
13491348
CoUninitialize;
13501349
TLogger.Log(LogPrefix + ' FINISHED. Time spent: ' + MillisecToStr(GetTickCount - start));

src/Functions.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ EBadFileFormat = class(Exception)
4141
// for each item we need make a call to ShGetFileInfo API function. It takes too much time and slows down search process.
4242
// it is possible to make searches during this bg process, but they will work a bit slowly because ShGetFileInfo will be called for search result item
4343
const
44-
WM_FileShellInfo_MSG = WM_APP + 1;
45-
WM_SearchResultsShellInfo_MSG = WM_APP + 2;
44+
//WM_FILESHELLINFO_MSG = WM_APP + 1;
45+
WM_SEARCHRESULTSSHELLINFO_MSG = WM_APP + 2;
4646
WM_RESTORE_MAINFORM_MSG = WM_APP + 3;
4747

4848
// split string to array of strings using Delim as delimiter

0 commit comments

Comments
 (0)