diff --git a/converter/convertdelphi.pas b/converter/convertdelphi.pas index f76fa12fd3..e69d6ecdae 100644 --- a/converter/convertdelphi.pas +++ b/converter/convertdelphi.pas @@ -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; diff --git a/converter/convertsettings.pas b/converter/convertsettings.pas index 535a156cb8..5618e6c2fd 100755 --- a/converter/convertsettings.pas +++ b/converter/convertsettings.pas @@ -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