From b9703b29819b619037cc282d719c187e51bacd30 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 23 Dec 2024 23:59:45 +0100 Subject: Port to g-i generated glib2 bindings Includes switch to FPC -Mobjfpc and related pointer style fixes. --- UCore.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'UCore.pas') diff --git a/UCore.pas b/UCore.pas index ea13f18..5ff1e0a 100644 --- a/UCore.pas +++ b/UCore.pas @@ -20,7 +20,7 @@ unit UCore; interface -uses glib2, Classes, GTKForms, GTKView, ULibc, UEngines, UCoreUtils, UVFSCore; +uses lazglib2, Classes, GTKForms, GTKView, ULibc, UEngines, UCoreUtils, UVFSCore; // Panel utilities @@ -59,10 +59,10 @@ type TGetDirSizeThread = class(TThread) private FCancelled: boolean; + FFinished: boolean; protected procedure Execute; override; public - Finished: boolean; Engine: TPanelEngine; Path: string; Result: Int64; @@ -739,7 +739,7 @@ end; procedure TGetDirSizeThread.Execute; begin Result := Engine.GetDirSize(Path); - Finished := True; + FFinished := True; end; constructor TGetDirSizeThread.Create; @@ -747,7 +747,7 @@ begin inherited Create(True); FreeOnTerminate := False; FCancelled := False; - Finished := False; + FFinished := False; Result := -1; end; @@ -788,7 +788,7 @@ var t: time_t; Thread.Engine := Engine; Thread.Resume; // Thread.Execute; - while not Thread.Finished do begin + while not Thread.FFinished do begin Sleep(ConstInternalProgressTimer); if not b and (__time(nil) >= t + 2) then begin FRemoteWait := TFRemoteWait.Create(Application); @@ -1119,7 +1119,7 @@ begin StatBuf := malloc(sizeof(Tstat64)); memset(StatBuf, 0, sizeof(Tstat64)); if lstat64(PChar(APath + string(Buf)), StatBuf) = 0 then - if __S_ISTYPE(StatBuf.st_mode, __S_IFDIR) + if __S_ISTYPE(StatBuf^.st_mode, __S_IFDIR) then PurgeDirectory(APath + string(Buf)) else begin // DebugMsg(['Removing ', APath + string(Buf)]); -- cgit v1.2.3