mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 18:39:09 +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
|
var
|
||||||
CTResult: Boolean;
|
CTResult: Boolean;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
s: String;
|
||||||
begin
|
begin
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
CTResult:=CodeToolBoss.FindMissingUnits(fPascalBuffer,fMissingUnits,true);
|
CTResult:=CodeToolBoss.FindMissingUnits(fPascalBuffer,fMissingUnits,true);
|
||||||
@ -759,13 +760,13 @@ var
|
|||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
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
|
if (fSettings.Target=ctLazarusWin) and Assigned(fMissingUnits) then begin
|
||||||
for i:=fMissingUnits.Count-1 downto 0 do
|
for i:=fMissingUnits.Count-1 downto 0 do begin
|
||||||
if LowerCase(fMissingUnits[i])='windows' then begin
|
s:=LowerCase(fMissingUnits[i]);
|
||||||
|
if (s='windows') or (s='variants') or (s='shellapi') then
|
||||||
fMissingUnits.Delete(i);
|
fMissingUnits.Delete(i);
|
||||||
Break;
|
end;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -673,16 +673,21 @@ var
|
|||||||
Trg: TConvertTarget;
|
Trg: TConvertTarget;
|
||||||
begin
|
begin
|
||||||
Trg:=TConvertTarget((Sender as TRadioGroup).ItemIndex);
|
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;
|
SameDFMCheckBox.Checked:=false;
|
||||||
end;
|
|
||||||
SameDFMCheckBox.Enabled:=Trg=ctLazarusAndDelphi;
|
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;
|
end;
|
||||||
|
|
||||||
procedure TConvertSettingsForm.SameDFMCheckBoxChange(Sender: TObject);
|
procedure TConvertSettingsForm.SameDFMCheckBoxChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if (Sender as TCheckBox).Checked then
|
if (Sender as TCheckBox).Checked then
|
||||||
VisualOffsEnableCheckBox.Checked:=False;
|
VisualOffsEnableCheckBox.Checked:=False;
|
||||||
|
VisualOffsEnableCheckBox.Enabled:=not (Sender as TCheckBox).Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Edit replacements in grids
|
// Edit replacements in grids
|
||||||
|
Loading…
Reference in New Issue
Block a user