You've already forked lazarus-ccr
demos: use UTF8 file functions in advaced
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2561 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -21,7 +21,7 @@ uses
|
|||||||
Windows,
|
Windows,
|
||||||
{$endif}
|
{$endif}
|
||||||
LCLIntf, delphicompat, LCLType, SysUtils, Classes, ComCtrls, Graphics, Controls, Forms, Dialogs,
|
LCLIntf, delphicompat, LCLType, SysUtils, Classes, ComCtrls, Graphics, Controls, Forms, Dialogs,
|
||||||
VirtualTrees, StdCtrls, shlobjext, LResources;
|
VirtualTrees, StdCtrls, shlobjext, LResources, FileUtil;
|
||||||
|
|
||||||
type
|
type
|
||||||
TDrawTreeForm = class(TForm)
|
TDrawTreeForm = class(TForm)
|
||||||
@ -96,10 +96,10 @@ var
|
|||||||
SR: TSearchRec;
|
SR: TSearchRec;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := FindFirst(IncludeTrailingPathDelimiter(Folder) + {$ifdef Windows}'*.*'{$else}'*'{$endif},
|
Result := FindFirstUTF8(IncludeTrailingPathDelimiter(Folder) + {$ifdef Windows}'*.*'{$else}'*'{$endif},
|
||||||
faAnyFile, SR) = 0;
|
faAnyFile, SR) = 0;
|
||||||
if Result then
|
if Result then
|
||||||
FindClose(SR);
|
FindCloseUTF8(SR);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
@ -529,7 +529,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Data := Sender.GetNodeData(Node);
|
Data := Sender.GetNodeData(Node);
|
||||||
if FindFirst(IncludeTrailingPathDelimiter(Data.FullPath) + {$ifdef Windows}'*.*'{$else}'*'{$endif},
|
if FindFirstUTF8(IncludeTrailingPathDelimiter(Data.FullPath) + {$ifdef Windows}'*.*'{$else}'*'{$endif},
|
||||||
faAnyFile, SR) = 0 then
|
faAnyFile, SR) = 0 then
|
||||||
begin
|
begin
|
||||||
Screen.Cursor := crHourGlass;
|
Screen.Cursor := crHourGlass;
|
||||||
@ -554,14 +554,14 @@ begin
|
|||||||
Sender.ValidateNode(Node, False);
|
Sender.ValidateNode(Node, False);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
until FindNext(SR) <> 0;
|
until FindNextUTF8(SR) <> 0;
|
||||||
ChildCount := Sender.ChildCount[Node];
|
ChildCount := Sender.ChildCount[Node];
|
||||||
|
|
||||||
// finally sort node
|
// finally sort node
|
||||||
if ChildCount > 0 then
|
if ChildCount > 0 then
|
||||||
Sender.Sort(Node, 0, TVirtualStringTree(Sender).Header.SortDirection, False);
|
Sender.Sort(Node, 0, TVirtualStringTree(Sender).Header.SortDirection, False);
|
||||||
finally
|
finally
|
||||||
FindClose(SR);
|
FindCloseUTF8(SR);
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user