mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 22:59:56 +02:00
Converter: improve logic and GUI for different conversion targets.
git-svn-id: trunk@27407 -
This commit is contained in:
parent
90df5d83ac
commit
ba3538c8d3
@ -751,6 +751,7 @@ var
|
||||
var
|
||||
CTResult: Boolean;
|
||||
i: Integer;
|
||||
s: String;
|
||||
begin
|
||||
Result:=mrOk;
|
||||
CTResult:=CodeToolBoss.FindMissingUnits(fPascalBuffer,fMissingUnits,true);
|
||||
@ -759,13 +760,13 @@ var
|
||||
Result:=mrCancel;
|
||||
exit;
|
||||
end;
|
||||
// Remove Windows unit from the list if target is "Windows only".
|
||||
// Remove Windows specific units from the list if target is "Windows only".
|
||||
if (fSettings.Target=ctLazarusWin) and Assigned(fMissingUnits) then begin
|
||||
for i:=fMissingUnits.Count-1 downto 0 do
|
||||
if LowerCase(fMissingUnits[i])='windows' then begin
|
||||
for i:=fMissingUnits.Count-1 downto 0 do begin
|
||||
s:=LowerCase(fMissingUnits[i]);
|
||||
if (s='windows') or (s='variants') or (s='shellapi') then
|
||||
fMissingUnits.Delete(i);
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -673,16 +673,21 @@ var
|
||||
Trg: TConvertTarget;
|
||||
begin
|
||||
Trg:=TConvertTarget((Sender as TRadioGroup).ItemIndex);
|
||||
if Trg<>ctLazarusAndDelphi then begin
|
||||
// Same DFM form file can be used only with "Lazarus and Delphi) target
|
||||
if Trg<>ctLazarusAndDelphi then
|
||||
SameDFMCheckBox.Checked:=false;
|
||||
end;
|
||||
SameDFMCheckBox.Enabled:=Trg=ctLazarusAndDelphi;
|
||||
//Function names are not replaced for Windows only target.
|
||||
if Trg=ctLazarusWin then
|
||||
FuncReplaceEnableCheckBox.Checked:=false;
|
||||
FuncReplaceEnableCheckBox.Enabled:=Trg<>ctLazarusWin;
|
||||
end;
|
||||
|
||||
procedure TConvertSettingsForm.SameDFMCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
if (Sender as TCheckBox).Checked then
|
||||
VisualOffsEnableCheckBox.Checked:=False;
|
||||
VisualOffsEnableCheckBox.Enabled:=not (Sender as TCheckBox).Checked;
|
||||
end;
|
||||
|
||||
// Edit replacements in grids
|
||||
|
Loading…
Reference in New Issue
Block a user