Changeset 54
- Timestamp:
- Dec 24, 2022, 7:17:24 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 18 added
- 12 deleted
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 6 6 Tunneler.dbg 7 7 tunneler.lps 8 *.res 8 9 heaptrclog.trc 9 10 Components/Common/Languages/*.mo 10 Components/CoolTranslator/Demo/lib 11
-
- Property svn:ignore
-
trunk/Languages/Tunneler.cs.po
r53 r54 167 167 168 168 #: uformmain.sround 169 #, fuzzy169 #, object-pascal-format, fuzzy 170 170 msgctxt "uformmain.sround" 171 171 msgid "%0:s of %1:s" 172 172 msgstr "%0:s z %1:s" 173 -
trunk/Packages/Common/Common.lpk
r53 r54 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 <Package Version=" 4">3 <Package Version="5"> 4 4 <PathDelim Value="\"/> 5 5 <Name Value="Common"/> … … 33 33 <Other> 34 34 <CompilerMessages> 35 <IgnoredMessages idx 5024="True"/>35 <IgnoredMessages idx6058="True" idx5071="True" idx5024="True" idx3124="True" idx3123="True"/> 36 36 </CompilerMessages> 37 37 </Other> … … 41 41 Source: https://svn.zdechov.net/PascalClassLibrary/Common/"/> 42 42 <License Value="Copy left."/> 43 <Version Minor=" 9"/>44 <Files Count=" 29">43 <Version Minor="10"/> 44 <Files Count="32"> 45 45 <Item1> 46 46 <Filename Value="StopWatch.pas"/> … … 171 171 <UnitName Value="UPixelPointer"/> 172 172 </Item29> 173 <Item30> 174 <Filename Value="UDataFile.pas"/> 175 <UnitName Value="UDataFile"/> 176 </Item30> 177 <Item31> 178 <Filename Value="UTestCase.pas"/> 179 <UnitName Value="UTestCase"/> 180 </Item31> 181 <Item32> 182 <Filename Value="UGenerics.pas"/> 183 <UnitName Value="UGenerics"/> 184 </Item32> 173 185 </Files> 186 <CompatibilityMode Value="True"/> 174 187 <i18n> 175 188 <EnableI18N Value="True"/> -
trunk/Packages/Common/Common.pas
r51 r54 14 14 UPersistentForm, UFindFile, UScaleDPI, UTheme, UStringTable, UMetaCanvas, 15 15 UGeometric, UTranslator, ULanguages, UFormAbout, UAboutDialog, 16 UPixelPointer, LazarusPackageIntf;16 UPixelPointer, UDataFile, UTestCase, UGenerics, LazarusPackageIntf; 17 17 18 18 implementation -
trunk/Packages/Common/Languages/UJobProgressView.cs.po
r51 r54 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 1.8.8\n"12 "X-Generator: Poedit 2.2\n" 13 13 14 14 #: ujobprogressview.sestimatedtime 15 #, object-pascal-format 15 16 msgid "Estimated time: %s" 16 17 msgstr "OdhadovanÃœ Äas: %s" … … 33 34 34 35 #: ujobprogressview.stotalestimatedtime 36 #, object-pascal-format 35 37 msgid "Total estimated time: %s" 36 38 msgstr "CelkovÃœ odhadovanÃœ Äas: %s" -
trunk/Packages/Common/Languages/UScaleDPI.cs.po
r38 r54 13 13 14 14 #: uscaledpi.swrongdpi 15 #, object-pascal-format 15 16 msgid "Wrong DPI [%d,%d]" 16 17 msgstr "Chybné DPI [%d,%d]" -
trunk/Packages/Common/Languages/UThreading.cs.po
r31 r54 11 11 12 12 #: uthreading.scurrentthreadnotfound 13 #, object-pascal-format 13 14 msgid "Current thread ID %d not found in virtual thread list." 14 15 msgstr "Aktuálnà vlákno ID %d nenalezeno v seznamu virtuálnÃch vláken." -
trunk/Packages/Common/StopWatch.pas
r31 r54 5 5 6 6 uses 7 {$IFDEF W indows}Windows,{$ENDIF}7 {$IFDEF WINDOWS}Windows,{$ENDIF} 8 8 SysUtils, DateUtils; 9 9 … … 32 32 end; 33 33 34 34 35 implementation 35 36 … … 40 41 fIsRunning := False; 41 42 42 {$IFDEF W indows}43 {$IFDEF WINDOWS} 43 44 fIsHighResolution := QueryPerformanceFrequency(fFrequency) ; 44 45 {$ELSE} -
trunk/Packages/Common/UAboutDialog.pas
r53 r54 1 1 unit UAboutDialog; 2 3 {$mode delphi}4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 9 StdCtrls,ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;7 ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout; 10 8 11 9 type -
trunk/Packages/Common/UApplicationInfo.pas
r51 r54 1 1 unit UApplicationInfo; 2 3 {$mode delphi}4 2 5 3 interface … … 59 57 procedure Register; 60 58 59 61 60 implementation 62 61 -
trunk/Packages/Common/UCommon.pas
r51 r54 1 1 unit UCommon; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 {$ ifdef Windows}Windows,{$endif}9 {$ ifdef Linux}baseunix,{$endif}10 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, 11 FileUtil ; //, ShFolder, ShellAPI;6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 {$IFDEF UNIX}baseunix,{$ENDIF} 8 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, Graphics, 9 FileUtil, Generics.Collections; //, ShFolder, ShellAPI; 12 10 13 11 type 14 12 TArrayOfByte = array of Byte; 15 TArrayOfString = array of string;16 13 TExceptionEvent = procedure(Sender: TObject; E: Exception) of object; 17 14 … … 35 32 DLLHandle1: HModule; 36 33 37 {$IFDEF Windows} 38 GetUserNameEx: procedure (NameFormat: DWORD; 39 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; 40 {$ENDIF} 34 {$IFDEF WINDOWS} 35 GetUserNameEx: procedure (NameFormat: DWORD; 36 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; 37 {$ENDIF} 38 39 const 40 clLightBlue = TColor($FF8080); 41 clLightGreen = TColor($80FF80); 42 clLightRed = TColor($8080FF); 41 43 42 44 function AddLeadingZeroes(const aNumber, Length : integer) : string; … … 51 53 function ComputerName: string; 52 54 procedure DeleteFiles(APath, AFileSpec: string); 55 function Explode(Separator: Char; Data: string): TStringArray; 53 56 procedure ExecuteProgram(Executable: string; Parameters: array of string); 54 57 procedure FileDialogUpdateFilterFileType(FileDialog: TOpenDialog); … … 62 65 function GetFileFilterItemExt(Filter: string; Index: Integer): string; 63 66 function IntToBin(Data: Int64; Count: Byte): string; 67 function Implode(Separator: Char; List: TList<string>): string; 64 68 function LastPos(const SubStr: String; const S: String): Integer; 65 69 function LoadFileToStr(const FileName: TFileName): AnsiString; 66 70 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 67 function MergeArray(A, B: array of string): T ArrayOfString;71 function MergeArray(A, B: array of string): TStringArray; 68 72 function OccurenceOfChar(What: Char; Where: string): Integer; 69 73 procedure OpenWebPage(URL: string); 74 procedure OpenEmail(Email: string); 70 75 procedure OpenFileInShell(FileName: string); 71 76 function PosFromIndex(SubStr: string; Text: string; … … 83 88 function SplitString(var Text: string; Count: Word): string; 84 89 function StripTags(const S: string): string; 85 function TryHexToInt(Data: string; varValue: Integer): Boolean;86 function TryBinToInt(Data: string; varValue: Integer): Boolean;90 function TryHexToInt(Data: string; out Value: Integer): Boolean; 91 function TryBinToInt(Data: string; out Value: Integer): Boolean; 87 92 procedure SortStrings(Strings: TStrings); 88 93 … … 246 251 end; 247 252 248 function TryHexToInt(Data: string; varValue: Integer): Boolean;253 function TryHexToInt(Data: string; out Value: Integer): Boolean; 249 254 var 250 255 I: Integer; … … 262 267 end; 263 268 264 function TryBinToInt(Data: string; varValue: Integer): Boolean;269 function TryBinToInt(Data: string; out Value: Integer): Boolean; 265 270 var 266 271 I: Integer; … … 290 295 end; 291 296 292 function Explode(Separator: char; Data: string): TArrayOfString; 293 begin 294 SetLength(Result, 0); 295 while Pos(Separator, Data) > 0 do begin 297 function Explode(Separator: Char; Data: string): TStringArray; 298 var 299 Index: Integer; 300 begin 301 Result := Default(TStringArray); 302 repeat 303 Index := Pos(Separator, Data); 304 if Index > 0 then begin 305 SetLength(Result, Length(Result) + 1); 306 Result[High(Result)] := Copy(Data, 1, Index - 1); 307 Delete(Data, 1, Index); 308 end else Break; 309 until False; 310 if Data <> '' then begin 296 311 SetLength(Result, Length(Result) + 1); 297 Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1); 298 Delete(Data, 1, Pos(Separator, Data)); 299 end; 300 SetLength(Result, Length(Result) + 1); 301 Result[High(Result)] := Data; 302 end; 303 304 {$IFDEF Windows} 312 Result[High(Result)] := Data; 313 end; 314 end; 315 316 function Implode(Separator: Char; List: TList<string>): string; 317 var 318 I: Integer; 319 begin 320 Result := ''; 321 for I := 0 to List.Count - 1 do begin 322 Result := Result + List[I]; 323 if I < List.Count - 1 then Result := Result + Separator; 324 end; 325 end; 326 327 {$IFDEF WINDOWS} 305 328 function GetUserName: string; 306 329 const … … 310 333 begin 311 334 L := MAX_USERNAME_LENGTH + 2; 335 Result := Default(string); 312 336 SetLength(Result, L); 313 337 if Windows.GetUserName(PChar(Result), L) and (L > 0) then begin … … 323 347 end; 324 348 end; 325 {$ endif}349 {$ENDIF} 326 350 327 351 function ComputerName: string; 328 {$ ifdef mswindows}352 {$IFDEF WINDOWS} 329 353 const 330 354 INFO_BUFFER_SIZE = 32767; … … 341 365 end; 342 366 end; 343 {$ endif}344 {$ ifdef unix}367 {$ENDIF} 368 {$IFDEF UNIX} 345 369 var 346 370 Name: UtsName; 347 371 begin 372 Name := Default(UtsName); 348 373 fpuname(Name); 349 374 Result := Name.Nodename; 350 375 end; 351 {$ endif}352 353 {$ ifdef windows}376 {$ENDIF} 377 378 {$IFDEF WINDOWS} 354 379 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 355 380 const … … 429 454 procedure LoadLibraries; 430 455 begin 431 {$IFDEF W indows}456 {$IFDEF WINDOWS} 432 457 DLLHandle1 := LoadLibrary('secur32.dll'); 433 458 if DLLHandle1 <> 0 then … … 440 465 procedure FreeLibraries; 441 466 begin 442 {$IFDEF W indows}467 {$IFDEF WINDOWS} 443 468 if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1); 444 469 {$ENDIF} … … 473 498 end; 474 499 500 procedure OpenEmail(Email: string); 501 begin 502 OpenURL('mailto:' + Email); 503 end; 504 475 505 procedure OpenFileInShell(FileName: string); 476 506 begin … … 501 531 end; 502 532 503 function MergeArray(A, B: array of string): TArrayOfString; 504 var 505 I: Integer; 506 begin 533 function MergeArray(A, B: array of string): TStringArray; 534 var 535 I: Integer; 536 begin 537 Result := Default(TStringArray); 507 538 SetLength(Result, Length(A) + Length(B)); 508 539 for I := 0 to Length(A) - 1 do -
trunk/Packages/Common/UDebugLog.pas
r38 r54 1 1 unit UDebugLog; 2 3 {$mode delphi}4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, FileUtil, fgl, SyncObjs;6 Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs; 9 7 10 8 type … … 15 13 Group: string; 16 14 Text: string; 15 end; 16 17 TDebugLogItems = class(TObjectList<TDebugLogItem>) 17 18 end; 18 19 … … 29 30 procedure SetMaxCount(const AValue: Integer); 30 31 public 31 Items: T FPGObjectList<TDebugLogItem>;32 Items: TDebugLogItems; 32 33 Lock: TCriticalSection; 33 34 procedure Add(Text: string; Group: string = ''); … … 44 45 45 46 procedure Register; 47 46 48 47 49 implementation … … 117 119 begin 118 120 inherited; 119 Items := T FPGObjectList<TDebugLogItem>.Create;121 Items := TDebugLogItems.Create; 120 122 Lock := TCriticalSection.Create; 121 123 MaxCount := 100; … … 126 128 destructor TDebugLog.Destroy; 127 129 begin 128 Items.Free;129 Lock.Free;130 FreeAndNil(Items); 131 FreeAndNil(Lock); 130 132 inherited; 131 133 end; -
trunk/Packages/Common/UDelay.pas
r31 r54 1 1 unit UDelay; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/Common/UFindFile.pas
r38 r54 35 35 private 36 36 s : TStringList; 37 38 37 fSubFolder : boolean; 39 38 fAttr: TFileAttrib; 40 39 fPath : string; 41 40 fFileMask : string; 42 43 41 procedure SetPath(Value: string); 44 42 procedure FileSearch(const inPath : string); … … 46 44 constructor Create(AOwner: TComponent); override; 47 45 destructor Destroy; override; 48 49 46 function SearchForFiles: TStringList; 50 47 published … … 59 56 FilterAll = '*.*'; 60 57 {$ENDIF} 61 {$IFDEF LINUX}58 {$IFDEF UNIX} 62 59 FilterAll = '*'; 63 60 {$ENDIF} 64 61 65 62 procedure Register; 63 66 64 67 65 implementation … … 87 85 begin 88 86 s.Free; 89 inherited Destroy;87 inherited; 90 88 end; 91 89 -
trunk/Packages/Common/UFormAbout.pas
r53 r54 1 1 unit UFormAbout; 2 3 {$mode delphi}4 2 5 3 interface … … 22 20 PanelButtons: TPanel; 23 21 procedure ButtonHomePageClick(Sender: TObject); 24 procedure FormCreate(Sender: TObject);25 22 procedure FormShow(Sender: TObject); 26 private27 { private declarations }28 23 public 29 24 AboutDialog: TObject; //TAboutDialog … … 79 74 end; 80 75 81 procedure TFormAbout.FormCreate(Sender: TObject);82 begin83 end;84 85 76 end. 86 77 -
trunk/Packages/Common/UGeometric.pas
r51 r54 1 1 unit UGeometric; 2 3 {$mode delphi}4 2 5 3 interface … … 26 24 function RectEnlarge(Rect: TRect; Value: Integer): TRect; 27 25 function ShiftRect(ARect: TRect; Delta: TPoint): TRect; 26 28 27 29 28 implementation … … 96 95 I: Integer; 97 96 begin 97 Result := Default(TPointArray); 98 98 SetLength(Result, Length(P)); 99 99 for I := 0 to High(P) do -
trunk/Packages/Common/UJobProgressView.lfm
r51 r54 1 1 object FormJobProgressView: TFormJobProgressView 2 2 Left = 467 3 Height = 3453 Height = 414 4 4 Top = 252 5 Width = 5395 Width = 647 6 6 BorderIcons = [biSystemMenu] 7 ClientHeight = 3458 ClientWidth = 5399 DesignTimePPI = 1 207 ClientHeight = 414 8 ClientWidth = 647 9 DesignTimePPI = 144 10 10 OnClose = FormClose 11 11 OnCloseQuery = FormCloseQuery 12 12 OnCreate = FormCreate 13 OnDestroy = FormDestroy14 13 OnHide = FormHide 15 14 OnShow = FormShow 16 15 Position = poScreenCenter 17 LCLVersion = '2. 0.2.0'16 LCLVersion = '2.2.0.4' 18 17 object PanelOperationsTitle: TPanel 19 18 Left = 0 20 Height = 3 219 Height = 38 21 20 Top = 0 22 Width = 53921 Width = 647 23 22 Align = alTop 24 23 BevelOuter = bvNone 25 ClientHeight = 3 226 ClientWidth = 53924 ClientHeight = 38 25 ClientWidth = 647 27 26 FullRepaint = False 28 27 TabOrder = 0 29 28 object LabelOperation: TLabel 30 Left = 831 Height = 2 032 Top = 833 Width = 7629 Left = 10 30 Height = 26 31 Top = 10 32 Width = 99 34 33 Caption = 'Operations:' 35 ParentColor = False36 34 ParentFont = False 37 35 end … … 39 37 object PanelLog: TPanel 40 38 Left = 0 41 Height = 1 3342 Top = 2 1243 Width = 53939 Height = 161 40 Top = 253 41 Width = 647 44 42 Align = alClient 45 43 BevelOuter = bvSpace 46 ClientHeight = 1 3347 ClientWidth = 53944 ClientHeight = 161 45 ClientWidth = 647 48 46 TabOrder = 1 49 47 object MemoLog: TMemo 50 Left = 851 Height = 1 1752 Top = 853 Width = 52348 Left = 10 49 Height = 141 50 Top = 10 51 Width = 627 54 52 Anchors = [akTop, akLeft, akRight, akBottom] 55 53 ReadOnly = True … … 60 58 object PanelProgress: TPanel 61 59 Left = 0 62 Height = 5463 Top = 1 0664 Width = 53960 Height = 65 61 Top = 126 62 Width = 647 65 63 Align = alTop 66 64 BevelOuter = bvNone 67 ClientHeight = 5468 ClientWidth = 53965 ClientHeight = 65 66 ClientWidth = 647 69 67 TabOrder = 2 70 68 object ProgressBarPart: TProgressBar 71 Left = 1 072 Height = 2 473 Top = 2 474 Width = 52369 Left = 12 70 Height = 29 71 Top = 29 72 Width = 628 75 73 Anchors = [akTop, akLeft, akRight] 76 74 TabOrder = 0 77 75 end 78 76 object LabelEstimatedTimePart: TLabel 79 Left = 880 Height = 2 077 Left = 10 78 Height = 26 81 79 Top = -2 82 Width = 1 0380 Width = 132 83 81 Caption = 'Estimated time:' 84 ParentColor = False85 82 end 86 83 end 87 84 object PanelOperations: TPanel 88 85 Left = 0 89 Height = 4290 Top = 6491 Width = 53986 Height = 50 87 Top = 76 88 Width = 647 92 89 Align = alTop 93 90 BevelOuter = bvNone 94 ClientHeight = 4295 ClientWidth = 53991 ClientHeight = 50 92 ClientWidth = 647 96 93 FullRepaint = False 97 94 TabOrder = 3 98 95 object ListViewJobs: TListView 99 Left = 8100 Height = 3 2101 Top = 5102 Width = 52396 Left = 10 97 Height = 38 98 Top = 6 99 Width = 627 103 100 Anchors = [akTop, akLeft, akRight, akBottom] 104 101 AutoWidthLastColumn = True … … 107 104 Columns = < 108 105 item 109 Width = 523106 Width = 614 110 107 end> 111 108 OwnerData = True … … 120 117 object PanelProgressTotal: TPanel 121 118 Left = 0 122 Height = 52123 Top = 1 60124 Width = 539119 Height = 62 120 Top = 191 121 Width = 647 125 122 Align = alTop 126 123 BevelOuter = bvNone 127 ClientHeight = 52128 ClientWidth = 539124 ClientHeight = 62 125 ClientWidth = 647 129 126 TabOrder = 4 130 127 object LabelEstimatedTimeTotal: TLabel 131 Left = 8132 Height = 2 0128 Left = 10 129 Height = 26 133 130 Top = 0 134 Width = 1 41131 Width = 178 135 132 Caption = 'Total estimated time:' 136 ParentColor = False137 133 end 138 134 object ProgressBarTotal: TProgressBar 139 Left = 8140 Height = 2 4141 Top = 2 4142 Width = 523135 Left = 10 136 Height = 29 137 Top = 29 138 Width = 627 143 139 Anchors = [akTop, akLeft, akRight] 144 140 TabOrder = 0 … … 147 143 object PanelText: TPanel 148 144 Left = 0 149 Height = 3 2150 Top = 3 2151 Width = 539145 Height = 38 146 Top = 38 147 Width = 647 152 148 Align = alTop 153 149 BevelOuter = bvNone 154 ClientHeight = 3 2155 ClientWidth = 539150 ClientHeight = 38 151 ClientWidth = 647 156 152 TabOrder = 5 157 153 object LabelText: TLabel 158 Left = 8159 Height = 2 4160 Top = 8161 Width = 525154 Left = 10 155 Height = 29 156 Top = 10 157 Width = 630 162 158 Anchors = [akTop, akLeft, akRight] 163 159 AutoSize = False 164 ParentColor = False165 160 end 166 161 end 167 162 object ImageList1: TImageList 168 BkColor = clForeground 169 left = 200 170 top = 8 163 Left = 240 164 Top = 10 171 165 Bitmap = { 172 4C69020000001000000010000000FF00FF00FF00FF00FF00FF00FF00FF00FF00 173 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 174 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 175 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 176 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 177 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 178 FF00000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 179 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000 180 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 181 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000 182 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 183 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000 184 00FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 185 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 186 00FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00 187 FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00 188 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FFFF00 189 FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00 190 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 191 00FFFF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00 192 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000 193 00FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00 194 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000 195 00FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00 196 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000 197 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 198 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 199 FF00000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 200 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 201 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 202 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 203 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 204 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 205 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 206 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 207 FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00 208 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 209 FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00 210 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 211 FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00 212 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 213 00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00 214 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 215 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000 216 00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 217 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 218 84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 219 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 220 FFFF000084FF000000FFFF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 221 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 222 84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 223 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000 224 00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 225 00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00 226 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 227 FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00 228 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 229 FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00 230 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 231 FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00 232 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 233 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 234 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 235 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 236 FF00FF00FF00FF00FF00FF00FF00 166 4C7A0200000010000000100000006A0000000000000078DAE593490E00100C45 167 7B78F72E5684A63A1142C382BE4F0708F89C955117F4B016BE67B5FC6E96DB97 168 B0D4B9F4CD949F36DED1DF922B0F1BD11FAB5AFC68DE5C44D40220A9FA779EC8 169 6A349FD5A435E43CADA1E3678D73F773F1DBF3EFADFFEEFEBBF97F6696BE9D36 237 170 } 238 171 end … … 241 174 Interval = 100 242 175 OnTimer = TimerUpdateTimer 243 left = 320244 top = 8176 Left = 384 177 Top = 10 245 178 end 246 179 end -
trunk/Packages/Common/UJobProgressView.pas
r51 r54 1 1 unit UJobProgressView; 2 3 {$MODE Delphi}4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, Syncobjs, 9 Dialogs, ComCtrls, StdCtrls, ExtCtrls, Contnrs, UThreading, Math,7 Dialogs, ComCtrls, StdCtrls, ExtCtrls, Generics.Collections, UThreading, Math, 10 8 DateUtils; 11 9 … … 71 69 end; 72 70 73 TJobs = class(TObjectList )71 TJobs = class(TObjectList<TJob>) 74 72 end; 75 73 … … 105 103 procedure ReloadJobList; 106 104 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 107 procedure FormDestroy(Sender: TObject);108 105 procedure ListViewJobsData(Sender: TObject; Item: TListItem); 109 106 procedure TimerUpdateTimer(Sender: TObject); … … 165 162 SExecuted = 'Executed'; 166 163 164 167 165 implementation 168 166 … … 286 284 end; 287 285 288 procedure TFormJobProgressView.FormDestroy(Sender:TObject);289 begin290 end;291 292 286 procedure TFormJobProgressView.ListViewJobsData(Sender: TObject; Item: TListItem); 293 287 begin 294 288 if (Item.Index >= 0) and (Item.Index < JobProgressView.Jobs.Count) then 295 with TJob(JobProgressView.Jobs[Item.Index])do begin289 with JobProgressView.Jobs[Item.Index] do begin 296 290 Item.Caption := Title; 297 291 if Item.Index = JobProgressView.CurrentJobIndex then Item.ImageIndex := 1 … … 405 399 I := 0; 406 400 while I < Jobs.Count do 407 with TJob(Jobs[I])do begin401 with Jobs[I] do begin 408 402 CurrentJobIndex := I; 409 CurrentJob := TJob(Jobs[I]);403 CurrentJob := Jobs[I]; 410 404 JobProgressChange(Self); 411 405 StartTime := Now; … … 420 414 Method(CurrentJob); 421 415 end else begin 416 Thread := TJobThread.Create(True); 422 417 try 423 Thread := TJobThread.Create(True);424 418 with Thread do begin 425 419 FreeOnTerminate := False; … … 494 488 if AValue = FTerminate then Exit; 495 489 for I := 0 to Jobs.Count - 1 do 496 TJob(Jobs[I]).Terminate := AValue;490 Jobs[I].Terminate := AValue; 497 491 FTerminate := AValue; 498 492 end; … … 620 614 procedure TProgress.Increment; 621 615 begin 622 try623 FLock.Acquire;616 FLock.Acquire; 617 try 624 618 Value := Value + 1; 625 619 finally … … 630 624 procedure TProgress.Reset; 631 625 begin 632 try633 FLock.Acquire;626 FLock.Acquire; 627 try 634 628 FValue := 0; 635 629 finally … … 647 641 begin 648 642 FLock.Free; 649 inherited Destroy;643 inherited; 650 644 end; 651 645 … … 678 672 destructor TJob.Destroy; 679 673 begin 680 Progress.Free;674 FreeAndNil(Progress); 681 675 inherited; 682 676 end; -
trunk/Packages/Common/ULanguages.pas
r53 r54 1 1 unit ULanguages; 2 2 3 {$mode delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, fgl;6 Classes, SysUtils, Generics.Collections; 9 7 10 8 type … … 17 15 { TLanguages } 18 16 19 TLanguages = class(T FPGObjectList<TLanguage>)17 TLanguages = class(TObjectList<TLanguage>) 20 18 function SearchByCode(ACode: string): TLanguage; 21 19 procedure AddNew(Code: string; Name: string); -
trunk/Packages/Common/ULastOpenedList.pas
r38 r54 1 1 unit ULastOpenedList; 2 3 {$mode delphi}4 2 5 3 interface … … 84 82 destructor TLastOpenedList.Destroy; 85 83 begin 86 Items.Free;84 FreeAndNil(Items); 87 85 inherited; 88 86 end; … … 94 92 begin 95 93 if Assigned(MenuItem) then begin 96 MenuItem.Clear; 94 while MenuItem.Count > Items.Count do 95 MenuItem.Delete(MenuItem.Count - 1); 96 while MenuItem.Count < Items.Count do begin 97 NewMenuItem := TMenuItem.Create(MenuItem); 98 MenuItem.Add(NewMenuItem); 99 end; 97 100 for I := 0 to Items.Count - 1 do begin 98 NewMenuItem := TMenuItem.Create(MenuItem); 99 NewMenuItem.Caption := Items[I]; 100 NewMenuItem.OnClick := ClickAction; 101 MenuItem.Add(NewMenuItem); 101 MenuItem.Items[I].Caption := Items[I]; 102 MenuItem.Items[I].OnClick := ClickAction; 102 103 end; 103 104 end; -
trunk/Packages/Common/UListViewSort.pas
r51 r54 2 2 3 3 // Date: 2019-05-17 4 5 {$mode delphi}6 4 7 5 interface … … 9 7 uses 10 8 {$IFDEF Windows}Windows, CommCtrl, LMessages, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils, 11 Controls, DateUtils, Dialogs, fgl,Forms, Grids, StdCtrls, ExtCtrls,12 LclIntf, LclType, LResources ;9 Controls, DateUtils, Dialogs, Forms, Grids, StdCtrls, ExtCtrls, 10 LclIntf, LclType, LResources, Generics.Collections, Generics.Defaults; 13 11 14 12 type … … 19 17 TCompareEvent = function (Item1, Item2: TObject): Integer of object; 20 18 TListFilterEvent = procedure (ListViewSort: TListViewSort) of object; 19 20 TObjects = TObjectList<TObject>; 21 21 22 22 { TListViewSort } … … 52 52 {$ENDIF} 53 53 public 54 List: TFPGObjectList<TObject>;55 Source: TFPGObjectList<TObject>;54 Source: TObjects; 55 List: TObjects; 56 56 constructor Create(AOwner: TComponent); override; 57 57 destructor Destroy; override; … … 149 149 destructor TListViewEx.Destroy; 150 150 begin 151 inherited Destroy;151 inherited; 152 152 end; 153 153 … … 338 338 ListViewSortCompare: TCompareEvent; 339 339 340 function ListViewCompare(const Item1, Item2: TObject): Integer;340 function ListViewCompare(constref Item1, Item2: TObject): Integer; 341 341 begin 342 342 Result := ListViewSortCompare(Item1, Item2); … … 349 349 ListViewSortCompare := Compare; 350 350 if (List.Count > 0) then 351 List.Sort( ListViewCompare);351 List.Sort(TComparer<TObject>.Construct(ListViewCompare)); 352 352 end; 353 353 … … 355 355 begin 356 356 if Assigned(FOnFilter) then FOnFilter(Self) 357 else if Assigned(Source) then 358 List.Assign(Source) else 357 else if Assigned(Source) then begin 359 358 List.Clear; 359 List.AddRange(Source); 360 end else List.Clear; 360 361 if ListView.Items.Count <> List.Count then 361 362 ListView.Items.Count := List.Count; … … 412 413 begin 413 414 inherited; 414 List := T FPGObjectList<TObject>.Create;415 List. FreeObjects := False;415 List := TObjects.Create; 416 List.OwnsObjects := False; 416 417 end; 417 418 418 419 destructor TListViewSort.Destroy; 419 420 begin 420 List.Free;421 FreeAndNil(List); 421 422 inherited; 422 423 end; -
trunk/Packages/Common/UMemory.pas
r51 r54 1 1 unit UMemory; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface … … 44 42 end; 45 43 44 46 45 implementation 47 46 … … 50 49 procedure TPositionMemory.SetSize(AValue: Integer); 51 50 begin 52 inherited SetSize(AValue);51 inherited; 53 52 if FPosition > FSize then FPosition := FSize; 54 53 end; … … 107 106 begin 108 107 Size := 0; 109 inherited Destroy;108 inherited; 110 109 end; 111 110 -
trunk/Packages/Common/UMetaCanvas.pas
r51 r54 1 1 unit UMetaCanvas; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Graphics, Types, fgl;6 Classes, SysUtils, Graphics, Types, Generics.Collections; 9 7 10 8 type … … 19 17 end; 20 18 21 TCanvasObjects = class(T FPGObjectList<TCanvasObject>)19 TCanvasObjects = class(TObjectList<TCanvasObject>) 22 20 end; 23 21 … … 142 140 procedure RoundRect(const Rect: TRect; RX,RY: Integer); overload; 143 141 procedure TextOut(X,Y: Integer; const Text: String); override; 144 procedure Polygon(Points: PPoint; NumPts: Integer; Winding: boolean = False); override;142 procedure Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean = False); override; 145 143 procedure Ellipse(x1, y1, x2, y2: Integer); override; 146 144 procedure StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic); override; … … 502 500 end; 503 501 504 procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: boolean502 procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean 505 503 ); 506 504 var … … 508 506 I: Integer; 509 507 begin 508 APoints := nil; 510 509 SetLength(APoints, NumPts); 511 510 for I := 0 to High(APoints) do -
trunk/Packages/Common/UPersistentForm.pas
r51 r54 1 1 unit UPersistentForm; 2 3 {$mode delphi}4 2 5 3 // Date: 2020-11-26 -
trunk/Packages/Common/UPixelPointer.pas
r51 r54 59 59 function Color32ToColor(Color: TColor32): TColor; 60 60 function ColorToColor32(Color: TColor): TColor32; 61 61 62 62 63 implementation -
trunk/Packages/Common/UPool.pas
r38 r54 1 1 unit UPool; 2 2 3 {$mode Delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, syncobjs, fgl, UThreading;6 Classes, SysUtils, syncobjs, Generics.Collections, UThreading; 9 7 10 8 type … … 22 20 function NewItemObject: TObject; virtual; 23 21 public 24 Items: T FPGObjectList<TObject>;25 FreeItems: T FPGObjectList<TObject>;22 Items: TObjectList<TObject>; 23 FreeItems: TObjectList<TObject>; 26 24 function Acquire: TObject; virtual; 27 25 procedure Release(Item: TObject); virtual; … … 108 106 constructor TThreadedPool.Create; 109 107 begin 110 inherited Create;108 inherited; 111 109 Lock := TCriticalSection.Create; 112 110 end; … … 116 114 TotalCount := 0; 117 115 Lock.Free; 118 inherited Destroy;116 inherited; 119 117 end; 120 118 … … 185 183 begin 186 184 inherited; 187 Items := T FPGObjectList<TObject>.Create;188 FreeItems := T FPGObjectList<TObject>.Create;189 FreeItems. FreeObjects := False;185 Items := TObjectList<TObject>.Create; 186 FreeItems := TObjectList<TObject>.Create; 187 FreeItems.OwnsObjects := False; 190 188 FReleaseEvent := TEvent.Create(nil, False, False, ''); 191 189 end; -
trunk/Packages/Common/UPrefixMultiplier.pas
r38 r54 2 2 3 3 // Date: 2010-06-01 4 5 {$mode delphi}6 4 7 5 interface -
trunk/Packages/Common/URegistry.pas
r50 r54 1 1 unit URegistry; 2 3 {$MODE delphi}4 2 5 3 interface … … 48 46 HKEY_CURRENT_CONFIG, HKEY_DYN_DATA); 49 47 48 50 49 implementation 51 52 50 53 51 { TRegistryContext } … … 132 130 function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean; 133 131 begin 134 {$IFDEF Linux}132 {$IFDEF UNIX} 135 133 //CloseKey; 136 134 {$ENDIF} … … 140 138 function TRegistryEx.GetCurrentContext: TRegistryContext; 141 139 begin 142 Result.Key := CurrentPath;140 Result.Key := String(CurrentPath); 143 141 Result.RootKey := RootKey; 144 142 end; -
trunk/Packages/Common/UResetableThread.pas
r38 r54 1 1 unit UResetableThread; 2 3 {$mode Delphi}{$H+}4 2 5 3 interface … … 167 165 FreeAndNil(FStopEvent); 168 166 FreeAndNil(FLock); 169 inherited Destroy;167 inherited; 170 168 end; 171 169 … … 286 284 constructor TThreadPool.Create; 287 285 begin 288 inherited Create;286 inherited; 289 287 end; 290 288 … … 293 291 TotalCount := 0; 294 292 WaitForEmpty; 295 inherited Destroy;293 inherited; 296 294 end; 297 295 -
trunk/Packages/Common/UScaleDPI.pas
r51 r54 3 3 { See: http://wiki.lazarus.freepascal.org/High_DPI } 4 4 5 {$mode delphi}{$H+}6 7 5 interface 8 6 9 7 uses 10 Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, StdCtrls,11 Contnrs;8 Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, 9 Generics.Collections; 12 10 13 11 type 12 TControlDimensions = class; 14 13 15 14 { TControlDimension } … … 18 17 BoundsRect: TRect; 19 18 FontHeight: Integer; 20 Controls: T ObjectList; // TList<TControlDimension>19 Controls: TControlDimensions; 21 20 // Class specifics 22 21 ButtonSize: TPoint; // TToolBar … … 26 25 constructor Create; 27 26 destructor Destroy; override; 27 end; 28 29 TControlDimensions = class(TObjectList<TControlDimension>) 28 30 end; 29 31 … … 73 75 constructor TControlDimension.Create; 74 76 begin 75 Controls := T ObjectList.Create;77 Controls := TControlDimensions.Create; 76 78 end; 77 79 … … 79 81 begin 80 82 FreeAndNil(Controls); 81 inherited Destroy;83 inherited; 82 84 end; 83 85 … … 212 214 TempBmp: TBitmap; 213 215 Temp: array of TBitmap; 214 NewWidth, NewHeight: integer; 216 NewWidth: Integer; 217 NewHeight: Integer; 215 218 I: Integer; 216 219 begin 217 220 ImgList.BeginUpdate; 218 NewWidth := ScaleX(ImgList.Width, FromDPI.X); 219 NewHeight := ScaleY(ImgList.Height, FromDPI.Y); 220 221 SetLength(Temp, ImgList.Count); 222 for I := 0 to ImgList.Count - 1 do 223 begin 224 TempBmp := TBitmap.Create; 225 TempBmp.PixelFormat := pf32bit; 226 ImgList.GetBitmap(I, TempBmp); 227 Temp[I] := TBitmap.Create; 228 Temp[I].SetSize(NewWidth, NewHeight); 229 {$IFDEF Linux} 230 Temp[I].PixelFormat := pf24bit; 231 {$ELSE} 232 Temp[I].PixelFormat := pf32bit; 233 {$ENDIF} 234 Temp[I].TransparentColor := TempBmp.TransparentColor; 235 //Temp[I].TransparentMode := TempBmp.TransparentMode; 236 Temp[I].Transparent := True; 237 Temp[I].Canvas.Brush.Style := bsSolid; 238 Temp[I].Canvas.Brush.Color := Temp[I].TransparentColor; 239 Temp[I].Canvas.FillRect(0, 0, Temp[I].Width, Temp[I].Height); 240 241 if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue; 242 Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp); 243 TempBmp.Free; 244 end; 245 246 ImgList.Clear; 247 ImgList.Width := NewWidth; 248 ImgList.Height := NewHeight; 249 250 for I := 0 to High(Temp) do 251 begin 252 ImgList.Add(Temp[I], nil); 253 Temp[i].Free; 254 end; 255 ImgList.EndUpdate; 221 try 222 NewWidth := ScaleX(ImgList.Width, FromDPI.X); 223 NewHeight := ScaleY(ImgList.Height, FromDPI.Y); 224 225 Temp := nil; 226 SetLength(Temp, ImgList.Count); 227 for I := 0 to ImgList.Count - 1 do 228 begin 229 TempBmp := TBitmap.Create; 230 try 231 TempBmp.PixelFormat := pf32bit; 232 ImgList.GetBitmap(I, TempBmp); 233 Temp[I] := TBitmap.Create; 234 Temp[I].SetSize(NewWidth, NewHeight); 235 {$IFDEF UNIX} 236 Temp[I].PixelFormat := pf24bit; 237 {$ELSE} 238 Temp[I].PixelFormat := pf32bit; 239 {$ENDIF} 240 Temp[I].TransparentColor := TempBmp.TransparentColor; 241 //Temp[I].TransparentMode := TempBmp.TransparentMode; 242 Temp[I].Transparent := True; 243 Temp[I].Canvas.Brush.Style := bsSolid; 244 Temp[I].Canvas.Brush.Color := Temp[I].TransparentColor; 245 Temp[I].Canvas.FillRect(0, 0, Temp[I].Width, Temp[I].Height); 246 247 if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue; 248 Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp); 249 finally 250 TempBmp.Free; 251 end; 252 end; 253 254 ImgList.Clear; 255 ImgList.Width := NewWidth; 256 ImgList.Height := NewHeight; 257 258 for I := 0 to High(Temp) do 259 begin 260 ImgList.Add(Temp[I], nil); 261 Temp[i].Free; 262 end; 263 finally 264 ImgList.EndUpdate; 265 end; 256 266 end; 257 267 … … 331 341 with TCoolBar(Control) do begin 332 342 BeginUpdate; 333 for I := 0 to Bands.Count - 1 do 334 with Bands[I] do begin 335 MinWidth := ScaleX(MinWidth, FromDPI.X); 336 MinHeight := ScaleY(MinHeight, FromDPI.Y); 337 // Workaround to bad band width auto sizing 338 //Width := ScaleX(Width, FromDPI.X); 339 Width := ScaleX(Control.Width + 28, FromDPI.X); 340 //Control.Invalidate; 343 try 344 for I := 0 to Bands.Count - 1 do 345 with Bands[I] do begin 346 MinWidth := ScaleX(MinWidth, FromDPI.X); 347 MinHeight := ScaleY(MinHeight, FromDPI.Y); 348 // Workaround to bad band width auto sizing 349 //Width := ScaleX(Width, FromDPI.X); 350 Width := ScaleX(Control.Width + 28, FromDPI.X); 351 //Control.Invalidate; 352 end; 353 // Workaround for bad autosizing of coolbar 354 if AutoSize then begin 355 AutoSize := False; 356 Height := ScaleY(Height, FromDPI.Y); 357 AutoSize := True; 341 358 end; 342 // Workaround for bad autosizing of coolbar 343 if AutoSize then begin 344 AutoSize := False; 345 Height := ScaleY(Height, FromDPI.Y); 346 AutoSize := True; 347 end; 348 EndUpdate; 359 finally 360 EndUpdate; 361 end; 349 362 end; 350 363 -
trunk/Packages/Common/UStringTable.pas
r38 r54 1 1 unit UStringTable; 2 3 {$mode objfpc}{$H+}4 2 5 3 interface -
trunk/Packages/Common/USyncCounter.pas
r34 r54 1 1 unit USyncCounter; 2 3 {$mode delphi}4 2 5 3 interface … … 25 23 procedure Assign(Source: TSyncCounter); 26 24 end; 25 27 26 28 27 implementation … … 69 68 begin 70 69 Lock.Free; 71 inherited Destroy;70 inherited; 72 71 end; 73 72 -
trunk/Packages/Common/UTheme.pas
r51 r54 5 5 uses 6 6 Classes, SysUtils, Graphics, ComCtrls, Controls, ExtCtrls, Menus, StdCtrls, 7 Spin, Forms, fgl, Grids;7 Spin, Forms, Generics.Collections, Grids; 8 8 9 9 type … … 19 19 { TThemes } 20 20 21 TThemes = class(T FPGObjectList<TTheme>)21 TThemes = class(TObjectList<TTheme>) 22 22 function AddNew(Name: string): TTheme; 23 23 function FindByName(Name: string): TTheme; … … 42 42 end; 43 43 44 const 45 ThemeNameSystem = 'System'; 46 ThemeNameLight = 'Light'; 47 ThemeNameDark = 'Dark'; 48 44 49 procedure Register; 50 45 51 46 52 implementation … … 105 111 inherited; 106 112 Themes := TThemes.Create; 107 with Themes.AddNew( 'System') do begin113 with Themes.AddNew(ThemeNameSystem) do begin 108 114 ColorWindow := clWindow; 109 115 ColorWindowText := clWindowText; … … 113 119 end; 114 120 Theme := TTheme(Themes.First); 115 with Themes.AddNew( 'Dark') do begin121 with Themes.AddNew(ThemeNameDark) do begin 116 122 ColorWindow := RGBToColor($20, $20, $20); 117 123 ColorWindowText := clWhite; … … 120 126 ColorControlSelected := RGBToColor(96, 125, 155); 121 127 end; 122 with Themes.AddNew( 'Light') do begin128 with Themes.AddNew(ThemeNameLight) do begin 123 129 ColorWindow := clWhite; 124 130 ColorWindowText := clBlack; … … 175 181 procedure TThemeManager.UseTheme(Form: TForm); 176 182 begin 177 if not Used and (FTheme.Name = 'System') then Exit;183 if not Used and (FTheme.Name = ThemeNameSystem) then Exit; 178 184 ApplyTheme(Form); 179 185 Used := True; -
trunk/Packages/Common/UThreading.pas
r51 r54 1 1 unit UThreading; 2 2 3 {$mode delphi}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, fgl, SyncObjs;6 Classes, SysUtils, Forms, Generics.Collections, SyncObjs; 9 7 10 8 type 11 9 TExceptionEvent = procedure (Sender: TObject; E: Exception) of object; 12 10 TMethodCall = procedure of object; 13 14 11 15 12 { TVirtualThread } … … 102 99 { TThreadList } 103 100 104 TThreadList = class(T FPGObjectList<TVirtualThread>)101 TThreadList = class(TObjectList<TVirtualThread>) 105 102 function FindById(Id: TThreadID): TVirtualThread; 106 103 constructor Create; virtual; … … 295 292 end; 296 293 FThread.Free; 297 inherited Destroy;294 inherited; 298 295 end; 299 296 … … 361 358 ThreadListLock := TCriticalSection.Create; 362 359 ThreadList := TThreadList.Create; 363 ThreadList. FreeObjects := False;360 ThreadList.OwnsObjects := False; 364 361 365 362 finalization -
trunk/Packages/Common/UTranslator.pas
r53 r54 1 1 unit UTranslator; 2 2 3 {$mode delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, ExtCtrls, Controls, fgl,LazFileUtils, LazUTF8,6 Classes, SysUtils, Forms, ExtCtrls, Controls, LazFileUtils, LazUTF8, 9 7 Translations, TypInfo, Dialogs, FileUtil, LCLProc, ULanguages, LCLType, 10 LCLVersion ;8 LCLVersion, Generics.Collections; 11 9 12 10 type 13 11 THandleStringEvent = function (AValue: string): string of object; 14 12 15 TPoFiles = class(T FPGObjectList<TPOFile>)13 TPoFiles = class(TObjectList<TPOFile>) 16 14 end; 17 15 … … 27 25 { TComponentExcludesList } 28 26 29 TComponentExcludesList = class(T FPGObjectList<TComponentExcludes>)27 TComponentExcludesList = class(TObjectList<TComponentExcludes>) 30 28 function FindByClassType(AClassType: TClass): TComponentExcludes; 31 29 procedure DumpToStrings(Strings: TStrings); … … 290 288 Item := Component.ClassType; 291 289 while Assigned(Item) do begin 292 //ShowMessage(Component.Name + ', ' + Component.ClassName + ', ' + Item.ClassName + ', ' + PropertyName);293 290 Excludes := ComponentExcludes.FindByClassType(Item.ClassType); 294 291 if Assigned(Excludes) then begin -
trunk/Packages/Common/UURI.pas
r38 r54 2 2 3 3 // Date: 2011-04-04 4 5 {$mode delphi}6 4 7 5 interface … … 85 83 end; 86 84 85 87 86 implementation 88 87 … … 183 182 begin 184 183 Items.Free; 185 inherited Destroy;184 inherited; 186 185 end; 187 186 … … 232 231 begin 233 232 Path.Free; 234 inherited Destroy;233 inherited; 235 234 end; 236 235 … … 243 242 Fragment := TURI(Source).Fragment; 244 243 Query := TURI(Source).Query; 245 end else inherited Assign(Source);244 end else inherited; 246 245 end; 247 246 … … 291 290 destructor TURL.Destroy; 292 291 begin 293 inherited Destroy;292 inherited; 294 293 end; 295 294 … … 344 343 begin 345 344 Directory.Free; 346 inherited Destroy; 347 end; 348 345 inherited; 346 end; 349 347 350 348 end. -
trunk/Packages/Common/UXMLUtils.pas
r38 r54 1 1 unit UXMLUtils; 2 3 {$mode delphi}4 2 5 3 interface -
trunk/Packages/CoolAudio/UCoolAudioConfig.inc
r51 r54 1 1 {$IFDEF Linux} 2 {$DEFINE AudioSystemDSP}2 // {$DEFINE AudioSystemDSP} 3 3 // {$DEFINE AudioSystemMAD} 4 4 {$ENDIF} -
trunk/Read me.txt
r51 r54 1 Developed using Lazarus 2. 0.12(http://www.lazarus-ide.org/)1 Developed using Lazarus 2.2.4 (http://www.lazarus-ide.org/) -
trunk/UCore.lfm
r51 r54 1 1 object Core: TCore 2 2 OldCreateOrder = False 3 Height = 7794 HorizontalOffset = 11035 VerticalOffset = 6036 Width = 10447 PPI = 1 443 Height = 676 4 HorizontalOffset = 564 5 VerticalOffset = 226 6 Width = 906 7 PPI = 125 8 8 object ThemeManager1: TThemeManager 9 Left = 2 5810 Top = 2 669 Left = 224 10 Top = 231 11 11 end 12 12 object ApplicationInfo: TApplicationInfo … … 541 541 0000000000000000000000000000000000000000000000000000 542 542 } 543 Left = 2 64544 Top = 432543 Left = 229 544 Top = 375 545 545 end 546 546 object Translator1: TTranslator 547 547 POFilesFolder = 'Languages' 548 Left = 660549 Top = 2 66548 Left = 573 549 Top = 231 550 550 end 551 551 end -
trunk/UCore.pas
r51 r54 6 6 7 7 uses 8 Classes, SysUtils, UTheme, UApplicationInfo, UTranslator ;8 Classes, SysUtils, UTheme, UApplicationInfo, UTranslator, UAboutDialog; 9 9 10 10 type -
trunk/tunneler.lpi
r53 r54 2 2 <CONFIG> 3 3 <ProjectOptions> 4 <Version Value="1 1"/>4 <Version Value="12"/> 5 5 <General> 6 <Flags> 7 <CompatibilityMode Value="True"/> 8 </Flags> 6 9 <SessionStorage Value="InProjectDir"/> 7 <MainUnit Value="0"/>8 10 <Scaled Value="True"/> 9 11 <ResourceType Value="res"/>
Note:
See TracChangeset
for help on using the changeset viewer.