mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 08:56:01 +02:00
lazbuild: fixed using lcl questiondlg
git-svn-id: trunk@36201 -
This commit is contained in:
parent
cfae3de029
commit
2a90441323
@ -1074,7 +1074,7 @@ begin
|
||||
if (ANode<>nil) and (not IgnoreAll) then begin
|
||||
DebugLn(['TBuildManager.CheckUnitPathForAmbiguousPascalFiles CurUnitName="',CurUnitName,'" CurFilename="',CurFilename,'" OtherUnitName="',PUnitFile(ANode.Data)^.FileUnitName,'" OtherFilename="',PUnitFile(ANode.Data)^.Filename,'"']);
|
||||
// pascal unit exists twice
|
||||
Result:=QuestionDlg(lisAmbiguousUnitFound2,
|
||||
Result:=IDEQuestionDialog(lisAmbiguousUnitFound2,
|
||||
Format(lisTheUnitExistsTwiceInTheUnitPathOfThe, [CurUnitName,
|
||||
ContextDescription])
|
||||
+#13
|
||||
@ -1083,7 +1083,7 @@ begin
|
||||
+'2. "'+CurFilename+'"'#13
|
||||
+#13
|
||||
+lisHintCheckIfTwoPackagesContainAUnitWithTheSameName,
|
||||
mtWarning, [mrIgnore, mrYesToAll, lisIgnoreAll, mrAbort], 0);
|
||||
mtWarning, [mrIgnore, mrYesToAll, lisIgnoreAll, mrAbort]);
|
||||
case Result of
|
||||
mrIgnore: ;
|
||||
mrYesToAll: IgnoreAll:=true;
|
||||
|
@ -37,7 +37,7 @@ uses
|
||||
KeywordFuncLists, CodeToolManager, FileProcs, DefineTemplates,
|
||||
CodeToolsStructs,
|
||||
// IDEIntf
|
||||
ProjectIntf, MacroIntf, IDEExternToolIntf, LazIDEIntf,
|
||||
ProjectIntf, MacroIntf, IDEExternToolIntf, LazIDEIntf, IDEDialogs,
|
||||
// IDE
|
||||
Project, PackageSystem, ExtToolEditDlg, IDEProcs, EnvironmentOpts,
|
||||
LazarusIDEStrConsts, PackageDefs, CompilerOptions, TransferMacros, LazConf;
|
||||
@ -222,8 +222,8 @@ begin
|
||||
AddWarning(Title + ' ' + Warning);
|
||||
if ErrorMsg <> '' then
|
||||
begin
|
||||
Result := QuestionDlg(lisCCOInvalidSearchPath, Title + ' ' + ErrorMsg, mtError,
|
||||
[mrIgnore, lisCCOSkip, mrAbort], 0);
|
||||
Result := IDEQuestionDialog(lisCCOInvalidSearchPath, Title + ' ' + ErrorMsg, mtError,
|
||||
[mrIgnore, lisCCOSkip, mrAbort]);
|
||||
end else
|
||||
begin
|
||||
if Warning = '' then
|
||||
@ -263,9 +263,9 @@ begin
|
||||
CheckIfFileIsExecutable(CompilerFilename);
|
||||
except
|
||||
on e: Exception do begin
|
||||
Result:=QuestionDlg(lisCCOInvalidCompiler,
|
||||
Result:=IDEQuestionDialog(lisCCOInvalidCompiler,
|
||||
Format(lisCCOCompilerNotAnExe,[CompilerFilename,#13,E.Message]),
|
||||
mtError,[mrIgnore,lisCCOSkip,mrAbort],0);
|
||||
mtError,[mrIgnore,lisCCOSkip,mrAbort]);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
@ -343,12 +343,11 @@ begin
|
||||
if s = '' then
|
||||
Exit(mrOk);
|
||||
|
||||
MsgResult:=QuestionDlg(lisMissingEvents,
|
||||
MsgResult:=IDEQuestionDialog(lisMissingEvents,
|
||||
Format(lisTheFollowingMethodsUsedByAreNotInTheSourceRemoveTh, [DbgSName(
|
||||
RootComponent), #13, PascalBuffer.Filename, #13, #13, s, #13])
|
||||
,mtConfirmation,
|
||||
[mrYes, lisRemoveThem, mrIgnore, lisKeepThemAndContinue, mrCancel],
|
||||
0);
|
||||
[mrYes, lisRemoveThem, mrIgnore, lisKeepThemAndContinue, mrCancel]);
|
||||
if MsgResult=mrYes then begin
|
||||
ClearDanglingEvents(ListOfPInstancePropInfo);
|
||||
ComponentModified:=true;
|
||||
|
@ -47,8 +47,8 @@ uses
|
||||
// IDE
|
||||
LazarusIDEStrConsts, ControlSelection, Project, JITForms, MainIntf,
|
||||
CustomNonFormDesigner, NonControlDesigner, FrameDesigner, ComponentReg,
|
||||
IDEProcs, ComponentEditors, IDEOptionsIntf, KeyMapping, EditorOptions,
|
||||
EnvironmentOpts, DesignerProcs;
|
||||
IDEProcs, ComponentEditors, IDEOptionsIntf, IDEDialogs, KeyMapping,
|
||||
EditorOptions, EnvironmentOpts, DesignerProcs;
|
||||
|
||||
const
|
||||
OrdinalTypes = [tkInteger,tkChar,tkEnumeration,tkbool];
|
||||
@ -1832,7 +1832,6 @@ var
|
||||
aCaption, aMsg: string;
|
||||
DlgType: TMsgDlgType;
|
||||
Buttons: TMsgDlgButtons;
|
||||
HelpCtx: Longint;
|
||||
JITComponentList: TJITComponentList;
|
||||
StreamClass: TComponentClass;
|
||||
AnUnitInfo: TUnitInfo;
|
||||
@ -1844,8 +1843,7 @@ begin
|
||||
aMsg:='';
|
||||
DlgType:=mtError;
|
||||
Buttons:=[mbCancel];
|
||||
HelpCtx:=0;
|
||||
|
||||
|
||||
// get current lfm filename
|
||||
LFMFilename:='';
|
||||
if (JITComponentList.CurReadStreamClass<>nil)
|
||||
@ -1895,14 +1893,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
if Buttons=[mbIgnore,mbCancel] then begin
|
||||
Action:=QuestionDlg(aCaption,aMsg,DlgType,
|
||||
Action:=IDEQuestionDialog(aCaption,aMsg,DlgType,
|
||||
[mrIgnore, lisCFEContinueLoading,
|
||||
mrCancel, lisCFECancelLoadingThisResource,
|
||||
mrAbort, lisCFEStopAllLoading], HelpCtx);
|
||||
mrAbort, lisCFEStopAllLoading]);
|
||||
end else begin
|
||||
Action:=QuestionDlg(aCaption,aMsg,DlgType,
|
||||
Action:=IDEQuestionDialog(aCaption,aMsg,DlgType,
|
||||
[mrCancel, lisCFECancelLoadingThisResource,
|
||||
mrAbort, lisCFEStopAllLoading], HelpCtx);
|
||||
mrAbort, lisCFEStopAllLoading]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -2505,9 +2505,9 @@ begin
|
||||
and ((FindDebuggerClass(EnvironmentOptions.DebuggerConfig.DebuggerClass)=nil)
|
||||
or (not FileIsExecutable(EnvironmentOptions.DebuggerFilename)))
|
||||
then begin
|
||||
if QuestionDlg(lisDbgMangNoDebuggerSpecified,
|
||||
if IDEQuestionDialog(lisDbgMangNoDebuggerSpecified,
|
||||
Format(lisDbgMangThereIsNoDebuggerSpecifiedSettingBreakpointsHaveNo, [#13]),
|
||||
mtWarning, [mrCancel, mrIgnore, lisDbgMangSetTheBreakpointAnyway], 0)
|
||||
mtWarning, [mrCancel, mrIgnore, lisDbgMangSetTheBreakpointAnyway])
|
||||
<>mrIgnore
|
||||
then
|
||||
exit;
|
||||
@ -2525,9 +2525,9 @@ begin
|
||||
and ((FindDebuggerClass(EnvironmentOptions.DebuggerConfig.DebuggerClass)=nil)
|
||||
or (not FileIsExecutable(EnvironmentOptions.DebuggerFilename)))
|
||||
then begin
|
||||
if QuestionDlg(lisDbgMangNoDebuggerSpecified,
|
||||
if IDEQuestionDialog(lisDbgMangNoDebuggerSpecified,
|
||||
Format(lisDbgMangThereIsNoDebuggerSpecifiedSettingBreakpointsHaveNo, [#13]),
|
||||
mtWarning, [mrCancel, mrIgnore, lisDbgMangSetTheBreakpointAnyway], 0)
|
||||
mtWarning, [mrCancel, mrIgnore, lisDbgMangSetTheBreakpointAnyway])
|
||||
<>mrIgnore
|
||||
then
|
||||
exit;
|
||||
|
@ -440,10 +440,10 @@ begin
|
||||
end else begin
|
||||
// file already exists
|
||||
if WarnOverwrite then begin
|
||||
Result:=QuestionDlg(lisOverwriteFile,
|
||||
Result:=IDEQuestionDialog(lisOverwriteFile,
|
||||
Format(lisAFileAlreadyExistsReplaceIt, ['"', AFilename, '"', #13]),
|
||||
mtConfirmation,
|
||||
[mrYes, lisOverwriteFileOnDisk, mbCancel], 0);
|
||||
[mrYes, lisOverwriteFileOnDisk, mbCancel]);
|
||||
if Result=mrCancel then exit;
|
||||
end;
|
||||
if CreateBackup then begin
|
||||
@ -513,10 +513,10 @@ begin
|
||||
try
|
||||
TargetFilename:=ReadAllLinks(Filename,true);
|
||||
if TargetFilename<>Filename then begin
|
||||
case QuestionDlg(lisFileIsSymlink,
|
||||
case IDEQuestionDialog(lisFileIsSymlink,
|
||||
Format(lisTheFileIsASymlinkOpenInstead, ['"', Filename, '"', #13, #13,
|
||||
'"', TargetFilename, '"']),
|
||||
mtConfirmation, [mbYes, lisOpenTarget, mbNo, lisOpenSymlink, mbCancel], 0)
|
||||
mtConfirmation, [mbYes, lisOpenTarget, mbNo, lisOpenSymlink, mbCancel])
|
||||
of
|
||||
mrYes: Filename:=TargetFilename;
|
||||
mrNo: ;
|
||||
@ -709,9 +709,9 @@ begin
|
||||
ErrMsg:=CodeToolBoss.ErrorMessage;
|
||||
LazarusIDE.DoJumpToCodeToolBossError;
|
||||
if Ask then begin
|
||||
Result:=QuestionDlg(lisCCOErrorCaption,
|
||||
Result:=IDEQuestionDialog(lisCCOErrorCaption,
|
||||
Format(lisTheCodetoolsFoundAnError, [#13, ErrMsg, #13]),
|
||||
mtWarning, [mrIgnore, lisIgnoreAndContinue, mrAbort], 0);
|
||||
mtWarning, [mrIgnore, lisIgnoreAndContinue, mrAbort]);
|
||||
if Result=mrIgnore then Result:=mrCancel;
|
||||
end else begin
|
||||
Result:=mrCancel;
|
||||
|
@ -506,10 +506,10 @@ begin
|
||||
if ShortDescr<>'' then begin
|
||||
// the inherited entry already contains a description.
|
||||
// ask if it should be really replaced
|
||||
if QuestionDlg(lisCodeHelpConfirmreplace,
|
||||
if IDEQuestionDialog(lisCodeHelpConfirmreplace,
|
||||
GetContextTitle(Element)+' already contains the help:'+#13
|
||||
+ShortDescr,
|
||||
mtConfirmation,[mrYes,lisReplace,mrCancel],0)<>mrYes then exit;
|
||||
mtConfirmation,[mrYes,lisReplace,mrCancel])<>mrYes then exit;
|
||||
end;
|
||||
end;
|
||||
end else begin
|
||||
@ -1594,10 +1594,10 @@ begin
|
||||
if i<0 then exit;
|
||||
//DebugLn(['TFPDocEditForm.CopyFromInheritedButtonClick ']);
|
||||
if ShortEdit.Text<>'' then begin
|
||||
if QuestionDlg('Confirm replace',
|
||||
if IDEQuestionDialog('Confirm replace',
|
||||
GetContextTitle(fChain[0])+' already contains the help:'+#13
|
||||
+ShortEdit.Text,
|
||||
mtConfirmation,[mrYes,'Replace',mrCancel],0)<>mrYes then exit;
|
||||
mtConfirmation,[mrYes,'Replace',mrCancel])<>mrYes then exit;
|
||||
end;
|
||||
LoadGUIValues(fChain[i]);
|
||||
Modified:=true;
|
||||
|
@ -33,8 +33,9 @@ uses
|
||||
StdCtrls, Grids, LCLType, Buttons, ExtCtrls, Dialogs, ComCtrls, Menus,
|
||||
AvgLvlTree, SynEdit, SynHighlighterPas, SynEditKeyCmds, SynCompletion,
|
||||
KeywordFuncLists, CodeToolsCfgScript, IDEImagesIntf, IDECommands, ProjectIntf,
|
||||
PackageIntf, IDEOptionsIntf, MacroIntf, CompilerOptions, EditorOptions, CompOptsIntf,
|
||||
LazarusIDEStrConsts, CompOptsModes, SourceSynEditor, PackageDefs;
|
||||
PackageIntf, IDEOptionsIntf, MacroIntf, CompilerOptions, EditorOptions,
|
||||
CompOptsIntf, IDEDialogs, LazarusIDEStrConsts, CompOptsModes, SourceSynEditor,
|
||||
PackageDefs;
|
||||
|
||||
type
|
||||
TCBMNodeType = (
|
||||
@ -390,10 +391,10 @@ begin
|
||||
if (Prefix<>'') and (SysUtils.CompareText(Prefix,copy(S,1,length(Prefix)))<>0)
|
||||
then begin
|
||||
BetterName:=GetMacroNamePrefix(cbmpMedium)+S;
|
||||
DlgResult:=QuestionDlg(lisCCOWarningCaption,
|
||||
DlgResult:=IDEQuestionDialog(lisCCOWarningCaption,
|
||||
Format(lisTheMacroDoesNotBeginWith, [S, Prefix]),
|
||||
mtWarning, [mrCancel, mrYes, Format(lisRenameTo, [BetterName]),
|
||||
mrIgnore], 0);
|
||||
mrIgnore]);
|
||||
if DlgResult=mrIgnore then begin
|
||||
end else if DlgResult=mrYes then
|
||||
S:=BetterName
|
||||
|
@ -407,12 +407,12 @@ begin
|
||||
Result:=false;
|
||||
Duplicates.Delimiter:=#13;
|
||||
Duplicates.StrictDelimiter:=true;
|
||||
if QuestionDlg(lisDuplicateSearchPath,
|
||||
if IDEQuestionDialog(lisDuplicateSearchPath,
|
||||
Format(lisTheOtherSourcesContainsADirectoryWhichIsAlreadyInT, [#13#13,
|
||||
Duplicates.DelimitedText]),
|
||||
mtError,
|
||||
[mrCancel, mrYes, lisRemoveThePathsFromOtherSources, 'IsDefault'],
|
||||
0)=mrYes
|
||||
[mrCancel, mrYes, lisRemoveThePathsFromOtherSources, 'IsDefault']
|
||||
)=mrYes
|
||||
then begin
|
||||
// remove paths from SrcPath
|
||||
OldUnparsedSrcPath:=FCompilerOpts.SrcPath;
|
||||
|
@ -289,7 +289,7 @@ begin
|
||||
FLazarusPath:=CustomExe;
|
||||
end else begin
|
||||
// the custom exe is older => let user choose
|
||||
MsgResult:=QuestionDlg('Multiple lazarus found',
|
||||
MsgResult:=IDEQuestionDialog('Multiple lazarus found',
|
||||
'Which Lazarus should be started?'#13
|
||||
+#13
|
||||
+'The system default executable'#13
|
||||
|
85
ide/main.pp
85
ide/main.pp
@ -2177,10 +2177,10 @@ procedure TMainIDE.SetupStartProject;
|
||||
function AskIfLoadLastFailingProject: boolean;
|
||||
begin
|
||||
debugln(['AskIfLoadLastFailingProject START']);
|
||||
Result:=QuestionDlg(lisOpenProject2,
|
||||
Result:=IDEQuestionDialog(lisOpenProject2,
|
||||
Format(lisAnErrorOccuredAtLastStartupWhileLoadingLoadThisPro, [
|
||||
EnvironmentOptions.LastSavedProjectFile, #13, #13]), mtWarning,
|
||||
[mrYes, lisOpenProjectAgain, mrNoToAll, lisStartWithANewProject], 0)=
|
||||
[mrYes, lisOpenProjectAgain, mrNoToAll, lisStartWithANewProject])=
|
||||
mrYes;
|
||||
debugln(['AskIfLoadLastFailingProject END ',dbgs(Result)]);
|
||||
end;
|
||||
@ -3017,10 +3017,10 @@ begin
|
||||
end;
|
||||
if NeedSave = 1 then begin
|
||||
Ed := TSourceEditor(SourceEditorManager.UniqueSourceEditors[Idx]);
|
||||
r := QuestionDlg(lisSourceModified,
|
||||
r := IDEQuestionDialog(lisSourceModified,
|
||||
Format(lisSourceOfPageHasChangedSave, ['"', Ed.PageName, '"']),
|
||||
mtConfirmation,
|
||||
[mrYes, lisMenuSave, mrNo, lisDiscardChanges, mrAbort], 0);
|
||||
[mrYes, lisMenuSave, mrNo, lisDiscardChanges, mrAbort]);
|
||||
case r of
|
||||
mrYes: DoSaveEditorFile(Ed, [sfCheckAmbiguousFiles]);
|
||||
mrNo: ; // don't save
|
||||
@ -3033,12 +3033,12 @@ begin
|
||||
if CheckEditorNeedsSave(SourceEditorManager.UniqueSourceEditors[i], False) then begin
|
||||
dec(NeedSave);
|
||||
Ed := TSourceEditor(SourceEditorManager.UniqueSourceEditors[i]);
|
||||
r := QuestionDlg(lisSourceModified,
|
||||
r := IDEQuestionDialog(lisSourceModified,
|
||||
Format(lisSourceOfPageHasChangedSaveExtended, ['"', Ed.PageName, '"', NeedSave]),
|
||||
mtConfirmation,
|
||||
[mrYes, lisMenuSave, mrAll, lisSaveAll,
|
||||
mrNo, lisDiscardChanges, mrIgnore, lisDiscardChangesAll,
|
||||
mrAbort], 0);
|
||||
mrAbort]);
|
||||
case r of
|
||||
mrYes: DoSaveEditorFile(Ed, [sfCheckAmbiguousFiles]);
|
||||
mrNo: ; // don't save
|
||||
@ -3104,10 +3104,10 @@ begin
|
||||
end;
|
||||
if NeedSave = 1 then begin
|
||||
Ed := ActiveSrcNoteBook.Editors[Idx];
|
||||
r := QuestionDlg(lisSourceModified,
|
||||
r := IDEQuestionDialog(lisSourceModified,
|
||||
Format(lisSourceOfPageHasChangedSave, ['"', Ed.PageName, '"']),
|
||||
mtConfirmation,
|
||||
[mrYes, lisMenuSave, mrNo, lisDiscardChanges, mrAbort], 0);
|
||||
[mrYes, lisMenuSave, mrNo, lisDiscardChanges, mrAbort]);
|
||||
case r of
|
||||
mrYes: DoSaveEditorFile(Ed, [sfCheckAmbiguousFiles]);
|
||||
mrNo: ; // don't save
|
||||
@ -3120,12 +3120,12 @@ begin
|
||||
if CheckEditorNeedsSave(ActiveSrcNoteBook.Editors[i], True) then begin
|
||||
dec(NeedSave);
|
||||
Ed := ActiveSrcNoteBook.Editors[i];
|
||||
r := QuestionDlg(lisSourceModified,
|
||||
r := IDEQuestionDialog(lisSourceModified,
|
||||
Format(lisSourceOfPageHasChangedSaveExtended, ['"', Ed.PageName, '"', NeedSave]),
|
||||
mtConfirmation,
|
||||
[mrYes, lisMenuSave, mrAll, lisSaveAll,
|
||||
mrNo, lisDiscardChanges, mrIgnore, lisDiscardChangesAll,
|
||||
mrAbort], 0);
|
||||
mrAbort]);
|
||||
case r of
|
||||
mrYes: DoSaveEditorFile(Ed, [sfCheckAmbiguousFiles]);
|
||||
mrNo: ; // don't save
|
||||
@ -3829,9 +3829,9 @@ begin
|
||||
itDebugger:
|
||||
begin
|
||||
if (rfInteractive in AFlags)
|
||||
and (QuestionDlg(lisStopDebugging,
|
||||
and (IDEQuestionDialog(lisStopDebugging,
|
||||
lisStopTheDebugging, mtConfirmation,
|
||||
[mrYes, lisMenuStop, mrCancel, lisContinue], 0) <> mrYes)
|
||||
[mrYes, lisMenuStop, mrCancel, lisContinue]) <> mrYes)
|
||||
then exit;
|
||||
if (DebugBoss.DoStopProject = mrOK) and (ToolStatus = itDebugger) and (rfCloseOnDone in AFlags) then
|
||||
FWaitForClose := True;
|
||||
@ -4177,19 +4177,19 @@ begin
|
||||
// or it is not yet a lazarus project ;)
|
||||
LPIFilename:=ChangeFileExt(AFilename,'.lpi');
|
||||
if FileExistsUTF8(LPIFilename) then begin
|
||||
if QuestionDlg(lisProjectInfoFileDetected,
|
||||
if IDEQuestionDialog(lisProjectInfoFileDetected,
|
||||
Format(lisTheFileSeemsToBeTheProgramFileOfAnExistingLazarusP, [
|
||||
AFilename]), mtConfirmation,
|
||||
[mrOk, lisOpenProject2, mrCancel], 0)
|
||||
[mrOk, lisOpenProject2, mrCancel])
|
||||
<>mrOk
|
||||
then
|
||||
exit;
|
||||
AFilename:=LPIFilename;
|
||||
end else begin
|
||||
if QuestionDlg(lisFileHasNoProject,
|
||||
if IDEQuestionDialog(lisFileHasNoProject,
|
||||
Format(lisTheFileIsNotALazarusProjectCreateANewProjectForThi, [
|
||||
'"', AFilename, '"', #13, '"'+lowercase(SourceType)+'"']),
|
||||
mtConfirmation, [mrYes, lisCreateProject, mrCancel], 0)<>mrYes
|
||||
mtConfirmation, [mrYes, lisCreateProject, mrCancel])<>mrYes
|
||||
then
|
||||
exit;
|
||||
DoCreateProjectForProgram(PreReadBuf);
|
||||
@ -4219,11 +4219,10 @@ begin
|
||||
|
||||
// check project
|
||||
if SomethingOfProjectIsModified then begin
|
||||
DlgResult:=QuestionDlg(lisProjectChanged,
|
||||
DlgResult:=IDEQuestionDialog(lisProjectChanged,
|
||||
Format(lisSaveChangesToProject, [Project1.GetTitleOrName]), mtConfirmation,
|
||||
[mrYes, lisMenuSave, mrNoToAll, lisDiscardChanges,
|
||||
mrAbort, lisDoNotCloseTheProject],
|
||||
0);
|
||||
mrAbort, lisDoNotCloseTheProject]);
|
||||
case DlgResult of
|
||||
mrYes:
|
||||
if not (DoSaveProject([]) in [mrOk,mrIgnore]) then exit;
|
||||
@ -6004,11 +6003,11 @@ begin
|
||||
if LFMCode=nil then begin
|
||||
LFMCode:=CodeToolBoss.CreateFile(LFMFilename);
|
||||
if LFMCode=nil then begin
|
||||
Result:=QuestionDlg(lisUnableToCreateFile,
|
||||
Result:=IDEQuestionDialog(lisUnableToCreateFile,
|
||||
Format(lisUnableToCreateFile2, ['"', LFMFilename, '"']),
|
||||
mtWarning, [mrIgnore, lisContinueWithoutLoadingForm,
|
||||
mrCancel, lisCancelLoadingUnit,
|
||||
mrAbort, lisAbortAllLoading], 0);
|
||||
mrAbort, lisAbortAllLoading]);
|
||||
if Result<>mrIgnore then exit;
|
||||
end;
|
||||
end;
|
||||
@ -6530,12 +6529,11 @@ var
|
||||
begin
|
||||
if ofProjectLoading in Flags then begin
|
||||
// this is a file, that was loaded last time, but was removed from disk
|
||||
Result:=QuestionDlg(lisFileNotFound,
|
||||
Result:=IDEQuestionDialog(lisFileNotFound,
|
||||
Format(lisTheFileWasNotFoundIgnoreWillGoOnLoadingTheProject, ['"',
|
||||
AFilename, '"', #13, #13, #13]),
|
||||
mtError, [mrIgnore, lisSkipFileAndContinueLoading,
|
||||
mrAbort, lisAbortLoadingProject],
|
||||
0);
|
||||
mrAbort, lisAbortLoadingProject]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -6607,10 +6605,10 @@ begin
|
||||
// or it is not yet a lazarus project ;)
|
||||
LPIFilename:=ChangeFileExt(AFilename,'.lpi');
|
||||
if FileExistsUTF8(LPIFilename) then begin
|
||||
if QuestionDlg(lisProjectInfoFileDetected,
|
||||
if IDEQuestionDialog(lisProjectInfoFileDetected,
|
||||
Format(lisTheFileSeemsToBeTheProgramFileOfAnExistingLazarusP, [
|
||||
AFilename]), mtConfirmation,
|
||||
[mrOk, lisOpenProject2, mrCancel, lisOpenTheFileAsNormalSource], 0)
|
||||
[mrOk, lisOpenProject2, mrCancel, lisOpenTheFileAsNormalSource])
|
||||
=mrOk then
|
||||
begin
|
||||
Result:=DoOpenProjectFile(LPIFilename,[]);
|
||||
@ -7405,14 +7403,14 @@ var
|
||||
Project1.ConvertToLPIFilename(UsingFilename);
|
||||
UsedFilename:=UnitCode.Filename;
|
||||
Project1.ConvertToLPIFilename(UsedFilename);
|
||||
TheModalResult:=QuestionDlg(lisCodeTemplError,
|
||||
TheModalResult:=IDEQuestionDialog(lisCodeTemplError,
|
||||
Format(lisClassConflictsWithLfmFileTheUnitUsesTheUnitWhic, [#13,
|
||||
UsingFilename, #13, UsedFilename, #13, AComponentClassName, #13, #13,
|
||||
#13, AComponentClassName]),
|
||||
mtError,
|
||||
[mrCancel, lisCancelLoadingThisComponent,
|
||||
mrAbort, lisAbortWholeLoading,
|
||||
mrIgnore, lisIgnoreUseTFormAsAncestor], 0);
|
||||
mrIgnore, lisIgnoreUseTFormAsAncestor]);
|
||||
exit;
|
||||
end;
|
||||
// there is no .lfm file
|
||||
@ -7560,11 +7558,11 @@ begin
|
||||
|
||||
// check for circles
|
||||
if AnUnitInfo.LoadingComponent then begin
|
||||
Result:=QuestionDlg(lisCodeTemplError, Format(
|
||||
Result:=IDEQuestionDialog(lisCodeTemplError, Format(
|
||||
lisUnableToLoadTheComponentClassBecauseItDependsOnIts, ['"',
|
||||
AComponentClassName, '"']),
|
||||
mtError, [mrCancel, lisCancelLoadingThisComponent,
|
||||
mrAbort, lisAbortWholeLoading], 0);
|
||||
mrAbort, lisAbortWholeLoading]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -7619,12 +7617,12 @@ begin
|
||||
end;
|
||||
|
||||
// not found => tell the user
|
||||
Result:=QuestionDlg(lisCodeTemplError,
|
||||
Result:=IDEQuestionDialog(lisCodeTemplError,
|
||||
Format(lisUnableToFindTheLfmFileOfComponentClassNeededByUnit, [
|
||||
AComponentClassName, #13, #13, AnUnitInfo.Filename]),
|
||||
mtError, [mrCancel, lisCancelLoadingThisComponent,
|
||||
mrAbort, lisAbortWholeLoading,
|
||||
mrIgnore, lisIgnoreUseTFormAsAncestor], 0);
|
||||
mrIgnore, lisIgnoreUseTFormAsAncestor]);
|
||||
finally
|
||||
AnUnitInfo.LoadingComponent:=false;
|
||||
end;
|
||||
@ -9359,9 +9357,9 @@ begin
|
||||
AText:=Format(lisSourceOfPageHasChangedSave, ['"',
|
||||
TSourceEditor(AEditor).PageName, '"']);
|
||||
ACaption:=lisSourceModified;
|
||||
Result:=QuestionDlg(ACaption, AText,
|
||||
Result:=IDEQuestionDialog(ACaption, AText,
|
||||
mtConfirmation, [mrYes, lisMenuSave, mrNo, lisDiscardChanges, mrAbort
|
||||
], 0);
|
||||
]);
|
||||
end else
|
||||
Result:=mrYes;
|
||||
if Result=mrYes then begin
|
||||
@ -9563,9 +9561,9 @@ begin
|
||||
// check if file is a lazarus project (.lpi)
|
||||
if (CompareFileExt(AFilename,'.lpi',false)=0) then begin
|
||||
case
|
||||
QuestionDlg(
|
||||
IDEQuestionDialog(
|
||||
lisOpenProject, Format(lisOpenTheProject, [AFilename]), mtConfirmation,
|
||||
[mrYes, lisOpenProject2, mrNoToAll, lisOpenAsXmlFile, mrCancel], 0)
|
||||
[mrYes, lisOpenProject2, mrNoToAll, lisOpenAsXmlFile, mrCancel])
|
||||
of
|
||||
mrYes: begin
|
||||
Result:=DoOpenProjectFile(AFilename,[ofAddToRecent]);
|
||||
@ -9579,9 +9577,9 @@ begin
|
||||
// check if file is a lazarus package (.lpk)
|
||||
if (CompareFileExt(AFilename,'.lpk',false)=0) then begin
|
||||
case
|
||||
QuestionDlg(
|
||||
IDEQuestionDialog(
|
||||
lisOpenPackage, Format(lisOpenThePackage, [AFilename]), mtConfirmation,
|
||||
[mrYes, lisCompPalOpenPackage, mrNoToAll, lisOpenAsXmlFile, mrCancel], 0)
|
||||
[mrYes, lisCompPalOpenPackage, mrNoToAll, lisOpenAsXmlFile, mrCancel])
|
||||
of
|
||||
mrYes: begin
|
||||
Result:=PkgBoss.DoOpenPackageFile(AFilename,[pofAddToRecent],CanAbort);
|
||||
@ -11076,9 +11074,9 @@ begin
|
||||
if Result=mrAbort then exit;
|
||||
end;
|
||||
if not FileReadable then begin
|
||||
Result:=QuestionDlg(lisUnableToReadFile,
|
||||
Result:=IDEQuestionDialog(lisUnableToReadFile,
|
||||
Format(lisUnableToReadFilename, ['"', AFilename, '"']),
|
||||
mtError, [mrCancel, lisSkipFile, mrAbort, lisAbortAllLoading], 0);
|
||||
mtError, [mrCancel, lisSkipFile, mrAbort, lisAbortAllLoading]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -13382,7 +13380,7 @@ begin
|
||||
InvalidateFileStateCache;
|
||||
|
||||
if Project1.HasProjectInfoFileChangedOnDisk then begin
|
||||
if QuestionDlg(lisProjectChangedOnDisk,
|
||||
if IDEQuestionDialog(lisProjectChangedOnDisk,
|
||||
Format(lisTheProjectInformationFileHasChangedOnDisk, ['"',
|
||||
Project1.ProjectInfoFile, '"', #13]), mtConfirmation, [mrYes,
|
||||
lisReopenProject, mrIgnore], '')
|
||||
@ -17334,9 +17332,8 @@ begin
|
||||
end;
|
||||
|
||||
CloseAction := caHide;
|
||||
case QuestionDlg(lisCloseAllTabsTitle, lisCloseAllTabsQuestion, mtConfirmation,
|
||||
[mrYes, lisCloseAllTabsClose, mrNo, lisCloseAllTabsHide, mrCancel],
|
||||
0)
|
||||
case IDEQuestionDialog(lisCloseAllTabsTitle, lisCloseAllTabsQuestion, mtConfirmation,
|
||||
[mrYes, lisCloseAllTabsClose, mrNo, lisCloseAllTabsHide, mrCancel])
|
||||
of
|
||||
mrYes : begin
|
||||
SourceEditorManager.IncUpdateLock;
|
||||
|
@ -7420,9 +7420,9 @@ begin
|
||||
or (EditorOpts.DoNotWarnForFont<>CurFont.Name))
|
||||
then begin
|
||||
{$IFDEF HasMonoSpaceFonts}
|
||||
DummyResult:=QuestionDlg(lisUEFontWith,
|
||||
DummyResult:=IDEQuestionDialog(lisUEFontWith,
|
||||
Format(lisUETheCurre, [#13, #13]),
|
||||
mtWarning, [mrIgnore, mrYesToAll, lisUEDoNotSho], 0);
|
||||
mtWarning, [mrIgnore, mrYesToAll, lisUEDoNotSho]);
|
||||
{$ELSE}
|
||||
DummyResult:=mrYesToAll;
|
||||
{$ENDIF}
|
||||
|
@ -4592,10 +4592,10 @@ begin
|
||||
if (not Quiet) and DirPathExistsCached(PkgLinks.GetGlobalLinkDirectory)
|
||||
then begin
|
||||
// tell the user
|
||||
CurResult:=QuestionDlg(lisPkgSysPackageFileNotFound,
|
||||
CurResult:=IDEQuestionDialog(lisPkgSysPackageFileNotFound,
|
||||
Format(lisPkgSysThePackageIsInstalledButNoValidPackageFileWasFound, ['"',
|
||||
BrokenPackage.Name, '"', #13]),
|
||||
mtError,[mrOk,mrYesToAll,'Skip these warnings'],0);
|
||||
mtError,[mrOk,mrYesToAll,'Skip these warnings']);
|
||||
if CurResult=mrYesToAll then
|
||||
Quiet:=true;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user