Changeset 403 for trunk


Ignore:
Timestamp:
May 22, 2016, 2:09:18 PM (9 years ago)
Author:
RBRi
Message:

use stuff from the libs

Location:
trunk/Components
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/CanvasFontManager.pas

    r396 r403  
    140140  PmDev,
    141141  SysUtils,
     142
    142143  StringUtilsUnit;
    143144
  • trunk/Components/Components.spr

    r141 r403  
    11[Application Options]
    22
    3 ApplicationIcon=D:\Development\Sibyl\BIN\SIBYL.ICO
     3ApplicationIcon=D:\progs\develop\SIBYL_FP3\BIN\SIBYL.ICO
    44
    55[Breakpoints]
     
    106106[Component Library OS/2]
    107107
    108 CompLibName=D:\Development\Sibyl\bin\CompLib.dll
     108CompLibName=D:\progs\develop\SIBYL_FP3\bin\CompLib.dll
    109109
    110110[Debugger Options]
     
    120120LastDir=P:\NEWVIEW_DEV\COMPONENTS
    121121OutDir=P:\newview_dev\build\components
    122 LibDir=P:\newview_dev\build\sibyl\lib;P:\newview_dev\build\library;
     122LibDir=P:\newview_dev\build\sibyl\lib;P:\newview_dev\build\library
    123123LibSrcDir=P:\newview_dev\Sibyl\RTL;P:\newview_dev\Sibyl\SPCC;P:\newview_dev\library
    124124IncSrcDir=
     
    127127[Find History]
    128128
    129 Find0=Br
    130 Find1=.exec
    131 Find2=OnThreadTerminate
    132 Find3=onterminate
    133 Find4=jobproc
    134 Find5=onterm
    135 Find6=doterminate
    136 Find7=ontermin
    137 Find8=onjob
    138 Find9=.upda
    139 Find10=.synch
    140 Find11=syncho
    141 Find12=execute
    142 Find13=tthread.exe
    143 Find14=tthread
    144 Find15=.GetOffsetFromX
     129Find0=StringUtilsUnit
     130Find1=Br
     131Find2=.exec
     132Find3=OnThreadTerminate
     133Find4=onterminate
     134Find5=jobproc
     135Find6=onterm
     136Find7=doterminate
     137Find8=ontermin
     138Find9=onjob
     139Find10=.upda
     140Find11=.synch
     141Find12=syncho
     142Find13=execute
     143Find14=tthread.exe
     144Find15=tthread
    145145
    146146[General]
    147147
    148148Version=Sibyl Project Ver2.02
    149 ProjectName=P:\NEWVIEW_DEV\Components\Components.spr
     149ProjectName=P:\NEWVIEW_DEV\COMPONENTS\Components.spr
    150150ProjectType=Visual
    151 CompLibName=D:\Development\Sibyl\bin\CompLib.dll
    152 Win32CompLibName=D:\Development\Sibyl\bin\CompLib.dll
     151CompLibName=D:\progs\develop\SIBYL_FP3\bin\CompLib.dll
     152Win32CompLibName=D:\progs\develop\SIBYL_FP3\bin\CompLib.dll
    153153RunParameter=
    154154InActiveLanguages=
     
    170170File0.Left=-4
    171171File0.Bottom=-5
    172 File0.Width=1306
    173 File0.Height=548
     172File0.Width=1388
     173File0.Height=582
    174174File0.Column=1
    175175File0.Line=8
     
    177177File1.Left=-4
    178178File1.Bottom=-5
    179 File1.Width=1306
    180 File1.Height=548
     179File1.Width=1388
     180File1.Height=582
    181181File1.Column=56
    182182File1.Line=104
     
    184184File2.Left=-4
    185185File2.Bottom=-5
    186 File2.Width=1306
    187 File2.Height=548
     186File2.Width=1388
     187File2.Height=582
    188188File2.Column=21
    189189File2.Line=216
     190File3=.\CanvasFontManager.pas
     191File3.Left=-4
     192File3.Bottom=-5
     193File3.Width=1388
     194File3.Height=582
     195File3.Column=3
     196File3.Line=143
    190197
    191198[Linker Options]
     
    208215MainFile0=.\Components.pas
    209216MainFile0.Ext=.EXE
    210 MainFile0.Checksum=20992
     217MainFile0.Checksum=0
    211218MainFile0.Expanded=False
    212219MainFile0.File0=.\ACLDialogs.pas
     
    356363[Repository]
    357364
    358 Page0=Projects
     365Page0=[Object Repository]
    359366Page0.Installed=True
    360 Page0.Object0=SpeedSoft.AppExpert
    361 Page0.Object0.NewProject=False
    362 Page0.Object0.NewForm=False
    363 Page0.Object0.MainForm=False
    364 Page0.Object0.InPage=True
    365 Page0.Object0.Title=AppExpert
    366 Page0.Object0.Description=(C) 1997 SpeedSoft.
    367 Page0.Object0.Author=SpeedSoft
    368 Page1=[Object Repository]
    369 Page1.Installed=True
    370 Page1.Object0=SpeedSoft.AppExpert
    371 Page1.Object0.NewProject=False
    372 Page1.Object0.NewForm=False
    373 Page1.Object0.MainForm=False
    374 Page1.Object0.InPage=True
    375 Page1.Object0.Title=AppExpert
    376 Page1.Object0.Description=(C) 1997 SpeedSoft.
    377 Page1.Object0.Author=SpeedSoft
    378367
    379368[SCU]
     
    382371MainForm=ComponentsTestForm
    383372
    384 [Watch]
    385 
    386 Watch0=+font.pfacename^
    387 Watch1=+font.fonttype
    388 Watch2=+achild.fname^
    389 Watch3=+afont.ffontinfo.fsselection
    390 Watch4=+afont.ffontinfo.usweightclass
    391 Watch5=+afont.ffontinfo
    392 
    393373[Win32 Application Options]
    394374
    395 ApplicationIcon=D:\Development\Sibyl\BIN\SIBYL.ICO
     375ApplicationIcon=D:\progs\develop\SIBYL_FP3\BIN\SIBYL.ICO
    396376
    397377[Win32 Compiler Options]
  • trunk/Components/CustomFileControls.pas

    r15 r403  
    77
    88Uses
    9   Dos, SysUtils, Classes, Forms, StdCtrls, CustomListBox, Graphics;
     9  Dos,
     10  SysUtils,
     11  Classes,
     12  Forms,
     13  StdCtrls,
     14  CustomListBox,
     15  Graphics;
    1016
    1117
     
    337343
    338344Uses
    339 {$IFDEF OS2}
    340   BseDos, OS2Def, DriveInfoUnit,
    341   BseDev, BseErr,
    342 {$ENDIF}
    343 
    344 {$IFDEF Win95}
    345   WinBase,
    346 {$ENDIF}
     345  BseDos,
     346  OS2Def,
     347  BseDev,
     348  BseErr,
     349
    347350  Dialogs,
    348   ACLStringUtility, ACLUtility, ACLFileUtility, BitmapUtility;
     351  FileUtilsUnit,
     352  ACLUtility,
     353  BitmapUtility,
     354  StringUtilsUnit;
    349355
    350356var
     
    459465     While S<>'' Do
    460466     Begin
    461           NextFilter:=Pos(';',S);
     467          NextFilter:=Pos(PATH_SEPARATOR,S);
    462468          If NextFilter<>0 Then
    463469          Begin
     
    471477          End;
    472478
    473           Status := SysUtils.FindFirst(FDirectory + '\' + ThisFilter, Attr,Search);
     479          Status := SysUtils.FindFirst(FDirectory + DIRECTORY_SEPARATOR + ThisFilter, Attr,Search);
    474480          While Status = 0 Do
    475481          Begin
     
    484490     While S<>'' Do
    485491     Begin
    486           If Pos(';',S)<>0 Then
     492          If Pos(PATH_SEPARATOR,S)<>0 Then
    487493          Begin
    488494               s1:=S;
    489                Delete(s1,1,Pos(';',S));
    490                SetLength(S,Pos(';',S)-1);
     495               Delete(s1,1,Pos(PATH_SEPARATOR,S));
     496               SetLength(S,Pos(PATH_SEPARATOR,S)-1);
    491497          End
    492498          Else s1:='';
    493499
    494           Status := SysUtils.FindFirst(FDirectory + '\' + S, Attr,Search);
     500          Status := SysUtils.FindFirst(FDirectory + DIRECTORY_SEPARATOR + S, Attr,Search);
    495501          While Status = 0 Do
    496502          Begin
     
    554560          GetDir(Ord(UpCase(Drive))-Ord('A')+1,s);
    555561          {$I+}
    556           If (s[length(s)])='\' Then dec(s[0]);
    557           If not (NewDir[1] In ['/','\']) Then s:=s+'\';
     562          If (s[length(s)])=DIRECTORY_SEPARATOR Then dec(s[0]);
     563          If not (NewDir[1] In ['/',DIRECTORY_SEPARATOR]) Then s:=s+DIRECTORY_SEPARATOR;
    558564          NewDir:=s+NewDir;
    559565     End;
    560566
    561      If NewDir[Length(NewDir)] = '\' Then SetLength(NewDir,Length(NewDir)-1);
     567     If NewDir[Length(NewDir)] = DIRECTORY_SEPARATOR Then SetLength(NewDir,Length(NewDir)-1);
    562568     If FDirectory=NewDir Then exit;
    563569     FDirectory := NewDir;
     
    602608     Else Result := Items[ idx ];
    603609     s:=Directory;
    604      If s[Length(s)] In ['\','/'] Then dec(s[0]);
    605      If s<>'' Then If Result<>'' Then Result:=s+'\'+Result;
     610     If s[Length(s)] In [DIRECTORY_SEPARATOR,'/'] Then dec(s[0]);
     611     If s<>'' Then If Result<>'' Then Result:=s+DIRECTORY_SEPARATOR+Result;
    606612End;
    607613
     
    864870    Data:= longint( Items.Objects[ Index ] );
    865871    if ( Data and dfSubDir ) = 0 then
    866       FullPath:= AddSlash( S ) + FullPath;
     872      FullPath:= AddDirectorySeparator( S ) + FullPath;
    867873    dec( Index );
    868874  end;
     
    882888  IndentLevel: longint;
    883889  PathSoFar: string;
     890  tmpPathElements : TStringList;
     891  i : integer;
    884892Begin
    885893  Screen.Cursor := crHourGlass;
     
    897905  Path := Copy( Directory, 4, 255 );
    898906  PathSoFar := Copy( Directory, 1, 3 );
    899   While Path <> '' Do
    900   Begin
     907
     908  tmpPathElements := TStringList.Create;
     909  StrExtractStrings(tmpPathElements, Path, [DIRECTORY_SEPARATOR], #0);
     910
     911  for i := 0 to tmpPathElements.Count - 1 do
     912  begin
    901913    inc( IndentLevel );
    902     S:= ExtractNextValue( Path, '\' );
     914    S := tmpPathElements[i];
    903915
    904916    if not DirectoryExists( PathSoFar + S ) then
     
    909921    end;
    910922    Items.AddObject( S, pointer( IndentLevel ) );
    911     PathSoFar := PathSoFar + S + '\';
     923    PathSoFar := PathSoFar + S + DIRECTORY_SEPARATOR;
    912924  End;
    913925
     926  tmpPathElements.Destroy;
    914927  ItemIndex:= Items.Count - 1;
    915928
     
    918931  SubDirs:= TStringList.Create;
    919932
    920   Status := SysUtils.FindFirst( AddSlash( Directory ) + '*.*', faDirectory, Search);
     933  Status := SysUtils.FindFirst( AddDirectorySeparator( Directory ) + '*.*', faDirectory, Search);
    921934  While Status = 0 Do
    922935  Begin
     
    967980    GetDir(Ord(UpCase(Drive))-Ord('A')+1,s);
    968981    {$I+}
    969     S:= RemoveSlash( S );
    970     S:= AddSlash( S );
     982    S:= RemoveRightDirectorySeparator( S );
     983    S:= AddDirectorySeparator( S );
    971984    NewDir:=s+NewDir;
    972985  End;
    973986
    974   NewDir:= RemoveSlash( NewDir );
     987  NewDir:= RemoveRightDirectorySeparator( NewDir );
    975988
    976989  FDirectory := NewDir;
     
    11161129      begin
    11171130        try
    1118           DriveLabel := GetVolumeLabel( DriveNumberToLetter( DriveNumber ) );
     1131          DriveLabel := GetVolumeLabel( DriveNumberToDriveLetter( DriveNumber ) );
    11191132          DriveString := DriveString + DriveLabel;
    11201133        except
     
    11421155    on EInOutError do
    11431156      // Current drive inaccessible
    1144       Drive := GetBootDrive;
     1157      Drive := GetBootDriveLetter;
    11451158  end;
    11461159End;
     
    12611274                                // and the user doesn't want to retry,
    12621275                                // so go back to boot drive.
    1263                                 SetDrive( GetBootDrive );
     1276                                SetDrive(GetBootDriveLetter);
    12641277                                Screen.Cursor := crDefault;
    12651278                                Exit;
Note: See TracChangeset for help on using the changeset viewer.