@@ -415,8 +415,6 @@ TAppSettings = class(TObject)
415415 function GetExecutableBits : Byte;
416416 procedure Help (Sender: TObject; Anchor: String);
417417 function PortOpen (Port: Word): Boolean;
418- function IsValidFilePath (FilePath: String): Boolean;
419- // function FileIsWritable(FilePath: String): Boolean;
420418 // function GetProductInfo(dwOSMajorVersion, dwOSMinorVersion, dwSpMajorVersion, dwSpMinorVersion: DWORD; out pdwReturnedProductType: DWORD): BOOL stdcall; external kernel32 delayed;
421419 // function GetCurrentPackageFullName(out Len: Cardinal; Name: PWideChar): Integer; stdcall; external kernel32 delayed;
422420 function GetThemeColor (Color: TColor): TColor;
@@ -1479,7 +1477,7 @@ procedure FixVT(VT: TVirtualStringTree; MultiLineCount: Word=1);
14791477 VT.TextMargin := 6 ;
14801478 VT.Margin := 2 ;
14811479 // Disable hottracking in non-Vista mode, looks ugly in XP, but nice in Vista
1482- if (toUseExplorerTheme in VT.TreeOptions.PaintOptions) { $IfDef WINDOWS } and true { $EndIf } then
1480+ if (toUseExplorerTheme in VT.TreeOptions.PaintOptions) then
14831481 VT.TreeOptions.PaintOptions := VT.TreeOptions.PaintOptions + [toHotTrack]
14841482 else
14851483 VT.TreeOptions.PaintOptions := VT.TreeOptions.PaintOptions - [toHotTrack];
@@ -2871,39 +2869,6 @@ function PortOpen(Port: Word): Boolean;
28712869 { $EndIf}
28722870end ;
28732871
2874- function IsValidFilePath (FilePath: String): Boolean;
2875- var
2876- Pieces: TStringList;
2877- i: Integer;
2878- begin
2879- // Check file path for invalid characters. See http://www.heidisql.com/forum.php?t=20873
2880- Result := True;
2881- Pieces := TStringList.Create;
2882- SplitRegExpr(' [\\\/]' , FilePath, Pieces);
2883- // Todo: implement cross platformic
2884- { for i:=1 to Pieces.Count-1 do begin
2885- Result := Result and TPath.HasValidFileNameChars(Pieces[i], False);
2886- end;}
2887- Pieces.Free;
2888- end ;
2889-
2890-
2891- { function FileIsWritable(FilePath: String): Boolean;
2892- var
2893- hFile: DWORD;
2894- begin
2895- // Check if file is writable
2896- // replaced through LazFileUtils.FileIsWritable
2897- if not FileExists(FilePath) then begin
2898- // Return true if file does not exist
2899- Result := True;
2900- end else begin
2901- hFile := CreateFile(PChar(FilePath), GENERIC_WRITE, 0, nil, OPEN_EXISTING, 0, 0);
2902- Result := hFile <> INVALID_HANDLE_VALUE;
2903- CloseHandle(hFile);
2904- end;
2905- end;}
2906-
29072872
29082873function GetThemeColor (Color: TColor): TColor;
29092874begin
@@ -3155,7 +3120,7 @@ function GetApplicationName: String;
31553120
31563121procedure CopyImageList (SourceList, TargetList: TImageList);
31573122var
3158- i, j, ResIdx, ResWidth: Integer;
3123+ i, ResIdx, ResWidth: Integer;
31593124 TempBitmap: TBitmap;
31603125 TempBitmapList: Array of TRasterImage;
31613126const
0 commit comments