diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2024-12-23 23:59:45 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2025-11-27 19:36:10 +0100 |
| commit | b9703b29819b619037cc282d719c187e51bacd30 (patch) | |
| tree | bd6d73e5fb6bcb6eb307844103b3dff185f2ac9a /UCore.pas | |
| parent | a9634b933f71a9045e61d29c486f2d51d39fd1e2 (diff) | |
| download | tuxcmd-b9703b29819b619037cc282d719c187e51bacd30.tar.xz | |
Port to g-i generated glib2 bindings
Includes switch to FPC -Mobjfpc and related pointer style fixes.
Diffstat (limited to 'UCore.pas')
| -rw-r--r-- | UCore.pas | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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)]); |
