mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
IDE: replaced some MessageDlg with IDEMessageDialog
git-svn-id: trunk@41497 -
This commit is contained in:
parent
688a2e73fe
commit
efec9f2a26
@ -30,9 +30,9 @@ unit CleanDirDlg;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons,
|
||||
StdCtrls, FileUtil, Laz2_XMLCfg, LCLProc, SynRegExpr, ButtonPanel,
|
||||
IDEWindowIntf, IDEHelpIntf, LazarusIDEStrConsts, LazConf, IDEProcs,
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons, StdCtrls,
|
||||
FileUtil, Laz2_XMLCfg, LCLProc, SynRegExpr, ButtonPanel, IDEWindowIntf,
|
||||
IDEHelpIntf, IDEDialogs, LazarusIDEStrConsts, LazConf, IDEProcs,
|
||||
TransferMacros, InputHistory, ShowDeletingFilesDlg;
|
||||
|
||||
type
|
||||
@ -359,7 +359,7 @@ var
|
||||
s:=Format(lisTheFileMaskIsInvalid, [FilterAsText])
|
||||
else
|
||||
s:=Format(lisTheFileMaskIsNotAValidRegularExpression, [FilterAsText]);
|
||||
MessageDlg(lisInvalidMask, s, mtError, [mbCancel], 0);
|
||||
IDEMessageDialog(lisInvalidMask, s, mtError, [mbCancel]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -46,7 +46,7 @@ uses
|
||||
CodeCache, CodeTree, KeywordFuncLists, FindDeclarationTool, DirectivesTree,
|
||||
PascalParserTool,
|
||||
// IDE Intf
|
||||
LazIDEIntf, IDECommands, MenuIntf, SrcEditorIntf,
|
||||
LazIDEIntf, IDECommands, MenuIntf, SrcEditorIntf, IDEDialogs,
|
||||
// IDE
|
||||
KeyMapping, LazarusIDEStrConsts, EnvironmentOpts, IDEOptionDefs, InputHistory,
|
||||
IDEProcs, CodeExplOpts;
|
||||
@ -670,7 +670,7 @@ end;
|
||||
procedure TCodeExplorerView.RenameMenuItemClick(Sender: TObject);
|
||||
begin
|
||||
if not JumpToSelection then begin
|
||||
MessageDlg(lisCCOErrorCaption, lisTreeNeedsRefresh, mtError, [mbOk], 0);
|
||||
IDEMessageDialog(lisCCOErrorCaption, lisTreeNeedsRefresh, mtError, [mbOk]);
|
||||
Refresh(true);
|
||||
exit;
|
||||
end;
|
||||
|
@ -1218,9 +1218,9 @@ begin
|
||||
FPDocPackageName:='rtl';
|
||||
end else begin
|
||||
// no package/project found
|
||||
MessageDlg(lisProjAddPackageNotFound,
|
||||
IDEMessageDialog(lisProjAddPackageNotFound,
|
||||
Format(lisLDTheUnitIsNotOwnedBeAnyPackageOrProjectPleaseAddThe, [
|
||||
SrcFilename, #13, #13]), mtError, [mbCancel], 0);
|
||||
SrcFilename, #13, #13]), mtError, [mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
end else begin
|
||||
@ -1261,15 +1261,15 @@ begin
|
||||
// no valid directory found
|
||||
DebugLn(['TCodeHelpManager.DoCreateFPDocFileForSource FPDocPackageName="',FPDocPackageName,'" FPDocPaths="',FPDocPaths,'" ']);
|
||||
if IsInFPCSrc then
|
||||
MessageDlg(lisLDNoValidFPDocPath,
|
||||
IDEMessageDialog(lisLDNoValidFPDocPath,
|
||||
Format(lisTheUnitIsPartOfTheFPCSourcesButTheCorrespondingFpd, [
|
||||
SrcFilename, #13, #13, FPCDocsRepositoryURL, #13, #13])
|
||||
, mtError, [mbCancel], 0)
|
||||
, mtError, [mbCancel])
|
||||
else
|
||||
MessageDlg(lisLDNoValidFPDocPath,
|
||||
IDEMessageDialog(lisLDNoValidFPDocPath,
|
||||
Format(lisLDDoesNotHaveAnyValidFPDocPathUnableToCreateTheFpdo,
|
||||
[FPDocPackageName, LineEnding, SrcFilename]),
|
||||
mtError, [mbCancel], 0);
|
||||
mtError, [mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
// fpdoc directory found
|
||||
@ -1309,8 +1309,8 @@ begin
|
||||
end;
|
||||
Result:=CodeToolBoss.CreateFile(ExpandedFilename);
|
||||
if Result=nil then begin
|
||||
MessageDlg('Unable to create file',
|
||||
'Unable to create file '+ExpandedFilename,mtError,[mbCancel],0);
|
||||
IDEMessageDialog(lisUnableToCreateFile,
|
||||
Format(lisUnableToCreateFile4, [ExpandedFilename]), mtError, [mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -1459,9 +1459,9 @@ begin
|
||||
ADocFile.DocErrorMsg:='Error reading xml file "'+CurFilename+'" '+E.Message;
|
||||
DebugLn(['TCodeHelpManager.LoadFPDocFile '+ADocFile.DocErrorMsg]);
|
||||
if not (chofQuiet in Flags) then begin
|
||||
MessageDlg(lisErrorReadingXML,
|
||||
IDEMessageDialog(lisErrorReadingXML,
|
||||
Format(lisErrorReadingXmlFile, ['"', CurFilename, '"', LineEnding, E.Message]),
|
||||
mtError, [mbCancel], 0);
|
||||
mtError, [mbCancel]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -48,7 +48,7 @@ uses
|
||||
ComCtrls, LCLType, ExtCtrls, Menus, LCLProc, Graphics, Dialogs,
|
||||
SynEdit,
|
||||
CodeToolManager, DefineTemplates,
|
||||
IDEWindowIntf, IDEImagesIntf,
|
||||
IDEWindowIntf, IDEImagesIntf, IDEDialogs,
|
||||
LazarusIDEStrConsts, CodeToolsOptions, CodeToolsDefPreview, TransferMacros,
|
||||
EditorOptions, InputFileDialog, IDEOptionDefs, LazConf, IDEProcs,
|
||||
EditDefineTree;
|
||||
@ -441,9 +441,9 @@ begin
|
||||
if (SelTreeNode=nil) or (SelTreeNode.Parent=nil) then exit;
|
||||
SelDefNode:=TDefineTemplate(SelTreeNode.Data);
|
||||
if SelDefNode.IsAutoGenerated then begin
|
||||
MessageDlg(lisCodeToolsDefsNodeIsReadonly,
|
||||
IDEMessageDialog(lisCodeToolsDefsNodeIsReadonly,
|
||||
lisCodeToolsDefsAutoGeneratedNodesCanNotBeEdited,
|
||||
mtInformation,[mbCancel],0);
|
||||
mtInformation,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
// move node one lvl up in TreeView
|
||||
@ -470,15 +470,15 @@ begin
|
||||
SelDefNode:=TDefineTemplate(SelTreeNode.Data);
|
||||
PrevDefNode:=SelDefNode.Prior;
|
||||
if (SelDefNode.IsAutoGenerated) or (PrevDefNode.IsAutoGenerated) then begin
|
||||
MessageDlg(lisCodeToolsDefsNodeIsReadonly,
|
||||
IDEMessageDialog(lisCodeToolsDefsNodeIsReadonly,
|
||||
lisCodeToolsDefsAutoGeneratedNodesCanNotBeEdited,
|
||||
mtInformation,[mbCancel],0);
|
||||
mtInformation,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
if (not (PrevDefNode.Action in DefineActionBlocks)) then begin
|
||||
MessageDlg(lisCodeToolsDefsInvalidPreviousNode,
|
||||
IDEMessageDialog(lisCodeToolsDefsInvalidPreviousNode,
|
||||
lisCodeToolsDefsPreviousNodeCanNotContainChildNodes,
|
||||
mtInformation,[mbCancel],0);
|
||||
mtInformation,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
// move node one lvl down in TreeView
|
||||
@ -500,9 +500,9 @@ begin
|
||||
if (SelTreeNode=nil) then exit;
|
||||
SelDefNode:=TDefineTemplate(SelTreeNode.Data);
|
||||
if (SelDefNode.IsAutoGenerated) then begin
|
||||
MessageDlg(lisCodeToolsDefsNodeIsReadonly,
|
||||
IDEMessageDialog(lisCodeToolsDefsNodeIsReadonly,
|
||||
lisCodeToolsDefsAutoGeneratedNodesCanNotBeEdited,
|
||||
mtInformation,[mbCancel],0);
|
||||
mtInformation,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
if FLastSelectedNode=SelTreeNode then FLastSelectedNode:=nil;
|
||||
@ -524,9 +524,9 @@ begin
|
||||
if SelTreeNode=nil then exit;
|
||||
SelDefNode:=TDefineTemplate(SelTreeNode.Data);
|
||||
if (SelDefNode.IsAutoGenerated) then begin
|
||||
MessageDlg(lisCodeToolsDefsNodeIsReadonly,
|
||||
IDEMessageDialog(lisCodeToolsDefsNodeIsReadonly,
|
||||
lisCodeToolsDefsAutoGeneratedNodesCanNotBeEdited,
|
||||
mtInformation,[mbCancel],0);
|
||||
mtInformation,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
if Sender=ConvertActionToDefineMenuItem then NewAction:=da_Define
|
||||
@ -1219,17 +1219,17 @@ begin
|
||||
end;
|
||||
if (ParentNode<>nil) and (TDefineTemplate(ParentNode.Data).IsAutoGenerated)
|
||||
then begin
|
||||
MessageDlg(lisCodeToolsDefsInvalidParent,
|
||||
IDEMessageDialog(lisCodeToolsDefsInvalidParent,
|
||||
Format(lisCodeToolsDefsAutoCreatedNodesReadOnly, [LineEnding]),
|
||||
mtInformation, [mbCancel],0);
|
||||
mtInformation, [mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
if (ParentNode<>nil)
|
||||
and (not (TDefineTemplate(ParentNode.Data).Action in DefineActionBlocks)) then
|
||||
begin
|
||||
MessageDlg(lisCodeToolsDefsInvalidParentNode,
|
||||
IDEMessageDialog(lisCodeToolsDefsInvalidParentNode,
|
||||
lisCodeToolsDefsParentNodeCanNotContainCh,
|
||||
mtInformation,[mbCancel],0);
|
||||
mtInformation,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
NewName:=FindUniqueName;
|
||||
|
@ -663,10 +663,10 @@ begin
|
||||
and AskUserIfNotFound
|
||||
then begin
|
||||
|
||||
if MessageDlg(lisFileNotFound,
|
||||
if IDEMessageDialog(lisFileNotFound,
|
||||
Format(lisTheFileWasNotFoundDoYouWantToLocateItYourself,
|
||||
['"', SrcFile, '"', LineEnding, LineEnding, LineEnding])
|
||||
,mtConfirmation, [mbYes, mbNo], 0) <> mrYes
|
||||
,mtConfirmation, [mbYes, mbNo]) <> mrYes
|
||||
then Exit;
|
||||
|
||||
repeat
|
||||
@ -967,7 +967,7 @@ begin
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
MessageDlg(lisCCOErrorCaption, msg, mtError, [mbOk], 0)
|
||||
IDEMessageDialog(lisCCOErrorCaption, msg, mtError, [mbOk]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -3831,7 +3831,7 @@ procedure TEditorMouseOptions.LoadFromXml(aXMLConfig: TRttiXMLConfig;
|
||||
except
|
||||
MActions.Delete(MActions.Count-1);
|
||||
//if not ErrShown then
|
||||
// MessageDlg(dlgMouseOptErrorDup, dlgMouseOptErrorDupText, mtError, [mbOk], 0);
|
||||
// IDEMessageDialog(dlgMouseOptErrorDup, dlgMouseOptErrorDupText, mtError, [mbOk]);
|
||||
//ErrShown := True;
|
||||
end;
|
||||
end;
|
||||
|
@ -36,7 +36,7 @@ uses
|
||||
Dialogs, ExtCtrls, StdCtrls, ButtonPanel, SynEdit, SynHighlighterPas,
|
||||
CodeToolsStructs, CodeAtom, CodeCache, CodeToolManager, PascalParserTool,
|
||||
CodeTree,
|
||||
SrcEditorIntf, LazIDEIntf, PropEdits, CustomFormEditor, JitForms,
|
||||
SrcEditorIntf, LazIDEIntf, PropEdits, IDEDialogs, CustomFormEditor, JitForms,
|
||||
Project, LazarusIDEStrConsts, EditorOptions;
|
||||
|
||||
type
|
||||
@ -120,10 +120,10 @@ begin
|
||||
ErrMsg:='';
|
||||
LazarusIDE.DoJumpToCodeToolBossError;
|
||||
end else begin
|
||||
MessageDlg(lisEMDNoClass,
|
||||
IDEMessageDialog(lisEMDNoClass,
|
||||
Format(lisEMDNoClassAt, [Code.Filename, IntToStr(Caret.Y), IntToStr(
|
||||
Caret.X)]),
|
||||
mtError,[mbCancel],0);
|
||||
mtError,[mbCancel]);
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
@ -141,9 +141,9 @@ begin
|
||||
finally
|
||||
CodeToolBoss.FreeListOfPCodeXYPosition(ListOfPCodeXYPosition);
|
||||
if ErrMsg<>'' then begin
|
||||
MessageDlg(lisCCOErrorCaption,
|
||||
IDEMessageDialog(lisCCOErrorCaption,
|
||||
Format(lisEMDUnableToShowEmptyMethodsOfTheCurrentClassBecause,
|
||||
[LineEnding, ErrMsg]), mtError, [mbCancel], 0);
|
||||
[LineEnding, ErrMsg]), mtError, [mbCancel]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -601,10 +601,10 @@ procedure TExternalToolDialog.AddButtonClick(Sender: TObject);
|
||||
var NewTool: TExternalToolOptions;
|
||||
begin
|
||||
if fExtToolList.Count>=MaxExtTools then begin
|
||||
MessageDlg(lisExtToolMaximumToolsReached,
|
||||
IDEMessageDialog(lisExtToolMaximumToolsReached,
|
||||
Format(lisExtToolThereIsAMaximumOfTools, [IntToStr(MaxExtTools
|
||||
)]),
|
||||
mtInformation,[mbCancel],0);
|
||||
mtInformation,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
NewTool:=TExternalToolOptions.Create;
|
||||
|
@ -3542,6 +3542,7 @@ resourcestring
|
||||
|
||||
// file checks
|
||||
lisUnableToCreateFile = 'Unable to create file';
|
||||
lisUnableToCreateFile4 = 'Unable to create file %s';
|
||||
lisCanNotCreateFile = 'Can not create file %s%s%s';
|
||||
lisExtendUnitPath = 'Extend unit path?';
|
||||
lisTheDirectoryIsNotYetInTheUnitPathAddIt = 'The directory %s%s%s is not '
|
||||
|
@ -37,7 +37,7 @@ uses
|
||||
// synedit, codetools
|
||||
SynRegExpr, SourceLog, KeywordFuncLists, BasicCodeTools,
|
||||
// IDEIntf
|
||||
IDEWindowIntf, LazIDEIntf, SrcEditorIntf, MainIntf,
|
||||
IDEWindowIntf, LazIDEIntf, SrcEditorIntf, IDEDialogs, MainIntf,
|
||||
// ide
|
||||
LazarusIDEStrConsts, InputHistory, SearchResultView, Project;
|
||||
|
||||
@ -957,8 +957,8 @@ begin
|
||||
Cnt:= DoSearch;
|
||||
except
|
||||
on E: ERegExpr do
|
||||
MessageDlg(lisUEErrorInRegularExpression, E.Message,mtError,
|
||||
[mbCancel],0);
|
||||
IDEMessageDialog(lisUEErrorInRegularExpression, E.Message,mtError,
|
||||
[mbCancel]);
|
||||
end;
|
||||
finally
|
||||
ListPage.Caption:= Format('%s (%d)',[ListPage.Caption,Cnt]);
|
||||
|
@ -3051,7 +3051,7 @@ begin
|
||||
Result:=EditorComponent.SearchReplace(aFindText, aReplaceText, anOptions);
|
||||
except
|
||||
on E: ERegExpr do begin
|
||||
MessageDlg(lisUEErrorInRegularExpression, E.Message,mtError,[mbCancel],0);
|
||||
IDEMessageDialog(lisUEErrorInRegularExpression, E.Message,mtError,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -3068,7 +3068,7 @@ begin
|
||||
end
|
||||
else begin
|
||||
Again := False;
|
||||
MessageDlg(ACaption, AText, mtInformation, [mbOK], 0);
|
||||
IDEMessageDialog(ACaption, AText, mtInformation, [mbOK]);
|
||||
end;
|
||||
if not Again then
|
||||
Manager.DeleteLastJumpPointClicked(Self);
|
||||
@ -10395,9 +10395,9 @@ begin
|
||||
if ActEdit.ReadOnly and (ActEdit.CodeBuffer<>nil)
|
||||
and (not ActEdit.CodeBuffer.IsVirtual)
|
||||
and (not FileIsWritable(ActEdit.CodeBuffer.Filename)) then begin
|
||||
MessageDlg(ueFileROCap,
|
||||
IDEMessageDialog(ueFileROCap,
|
||||
ueFileROText1+ActEdit.CodeBuffer.Filename+ueFileROText2,
|
||||
mtError,[mbCancel],0);
|
||||
mtError,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
ActEdit.EditorComponent.ReadOnly := not(ActEdit.EditorComponent.ReadOnly);
|
||||
|
Loading…
Reference in New Issue
Block a user