mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 04:58:11 +02:00
EnvironmentOpts: remove dependency on DialogProcs
This commit is contained in:
parent
369e4e47a7
commit
4f9ed1191e
@ -121,6 +121,9 @@ function IfNotOkJumpToCodetoolErrorAndAskToAbort(Ok: boolean;
|
||||
function JumpToCodetoolErrorAndAskToAbort(Ask: boolean): TModalResult;
|
||||
procedure NotImplementedDialog(const Feature: string);
|
||||
|
||||
function SimpleDirectoryCheck(const OldDir, NewDir,
|
||||
NotFoundErrMsg: string; out StopChecking: boolean): boolean;
|
||||
|
||||
implementation
|
||||
|
||||
{$IFDEF Unix}
|
||||
@ -725,5 +728,29 @@ begin
|
||||
Format(lisNotImplementedYet, [LineEnding, Feature]), mtError, [mbCancel]);
|
||||
end;
|
||||
|
||||
function SimpleDirectoryCheck(const OldDir, NewDir,
|
||||
NotFoundErrMsg: string; out StopChecking: boolean): boolean;
|
||||
var
|
||||
SubResult: TModalResult;
|
||||
begin
|
||||
StopChecking:=true;
|
||||
if OldDir=NewDir then begin
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
SubResult:=CheckDirPathExists(NewDir,lisEnvOptDlgDirectoryNotFound,
|
||||
NotFoundErrMsg);
|
||||
if SubResult=mrIgnore then begin
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
if SubResult=mrCancel then begin
|
||||
Result:=false;
|
||||
exit;
|
||||
end;
|
||||
StopChecking:=false;
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -51,7 +51,7 @@ uses
|
||||
// DebuggerIntf
|
||||
DbgIntfDebuggerBase,
|
||||
// IDE
|
||||
IDEProcs, DialogProcs, LazarusIDEStrConsts, IDETranslations, LazConf,
|
||||
IDEProcs, LazarusIDEStrConsts, IDETranslations, LazConf,
|
||||
IDEOptionDefs, TransferMacros, ModeMatrixOpts,
|
||||
IdeCoolbarData, EditorToolbarStatic, IdeDebuggerOpts;
|
||||
|
||||
@ -1072,9 +1072,6 @@ function StrToIDEMultipleInstancesOption(const s: string): TIDEMultipleInstances
|
||||
function BackupTypeToName(b: TBackupType): string;
|
||||
function NameToBackupType(const s: string): TBackupType;
|
||||
|
||||
function SimpleDirectoryCheck(const OldDir, NewDir,
|
||||
NotFoundErrMsg: string; out StopChecking: boolean): boolean;
|
||||
|
||||
const
|
||||
DefaultMsgViewFocus = {$IFDEF Windows}true{$ELSE}false{$ENDIF};
|
||||
MaxComboBoxCount: integer = 20;
|
||||
@ -1163,30 +1160,6 @@ begin
|
||||
Result:=bakNone;
|
||||
end;
|
||||
|
||||
function SimpleDirectoryCheck(const OldDir, NewDir,
|
||||
NotFoundErrMsg: string; out StopChecking: boolean): boolean;
|
||||
var
|
||||
SubResult: TModalResult;
|
||||
begin
|
||||
StopChecking:=true;
|
||||
if OldDir=NewDir then begin
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
SubResult:=CheckDirPathExists(NewDir,lisEnvOptDlgDirectoryNotFound,
|
||||
NotFoundErrMsg);
|
||||
if SubResult=mrIgnore then begin
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
if SubResult=mrCancel then begin
|
||||
Result:=false;
|
||||
exit;
|
||||
end;
|
||||
StopChecking:=false;
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function dbgs(o: TEnvOptParseType): string;
|
||||
begin
|
||||
Result:=EnvOptParseTypeNames[o];
|
||||
|
Loading…
Reference in New Issue
Block a user