mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-04 21:59:39 +01:00
lazbuild: replaced some MessageDlg with IDEMessageDialog
git-svn-id: trunk@36680 -
This commit is contained in:
parent
bdef003197
commit
2ec91c5b8e
@ -49,7 +49,7 @@ uses
|
|||||||
InterfaceBase, Themes, CheckLst, Menus, ComCtrls, DividerBevel,
|
InterfaceBase, Themes, CheckLst, Menus, ComCtrls, DividerBevel,
|
||||||
DefineTemplates,
|
DefineTemplates,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
LazIDEIntf, IDEMsgIntf, IDEHelpIntf, IDEImagesIntf, IDEWindowIntf,
|
LazIDEIntf, IDEMsgIntf, IDEHelpIntf, IDEImagesIntf, IDEWindowIntf, IDEDialogs,
|
||||||
// IDE
|
// IDE
|
||||||
LazarusIDEStrConsts, TransferMacros, LazConf, IDEProcs, DialogProcs, MainBar,
|
LazarusIDEStrConsts, TransferMacros, LazConf, IDEProcs, DialogProcs, MainBar,
|
||||||
InputHistory, ExtToolDialog, ExtToolEditDlg, EnvironmentOpts,
|
InputHistory, ExtToolDialog, ExtToolEditDlg, EnvironmentOpts,
|
||||||
@ -214,10 +214,10 @@ function MakeLazarus(Profile: TBuildLazarusProfile;
|
|||||||
begin
|
begin
|
||||||
if DirectoryIsWritableCached(Dir) then exit(true);
|
if DirectoryIsWritableCached(Dir) then exit(true);
|
||||||
Result:=false;
|
Result:=false;
|
||||||
MessageDlg(lisBuildingLazarusFailed,
|
IDEMessageDialog(lisBuildingLazarusFailed,
|
||||||
Format(lisThisSetOfOptionsToBuildLazarusIsNotSupportedByThis,
|
Format(lisThisSetOfOptionsToBuildLazarusIsNotSupportedByThis,
|
||||||
[#13, '"', Dir, '"', #13]),
|
[#13, '"', Dir, '"', #13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure CleanLazarusSrcDir(Dir: string; Recursive: boolean = true);
|
procedure CleanLazarusSrcDir(Dir: string; Recursive: boolean = true);
|
||||||
@ -280,10 +280,10 @@ begin
|
|||||||
if (Tool.Filename='') or (not FileExistsUTF8(Tool.Filename)) then begin
|
if (Tool.Filename='') or (not FileExistsUTF8(Tool.Filename)) then begin
|
||||||
Tool.Filename:=FindDefaultMakePath;
|
Tool.Filename:=FindDefaultMakePath;
|
||||||
if (Tool.Filename='') or (not FileExistsUTF8(Tool.Filename)) then begin
|
if (Tool.Filename='') or (not FileExistsUTF8(Tool.Filename)) then begin
|
||||||
MessageDlg(lisMakeNotFound,
|
IDEMessageDialog(lisMakeNotFound,
|
||||||
Format(lisTheProgramMakeWasNotFoundThisToolIsNeededToBuildLa,
|
Format(lisTheProgramMakeWasNotFoundThisToolIsNeededToBuildLa,
|
||||||
['"', '"', #13, #13]),
|
['"', '"', #13, #13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -690,10 +690,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
Result:=MessageDlg(lisLazBuildErrorWritingFile,
|
Result:=IDEMessageDialog(lisLazBuildErrorWritingFile,
|
||||||
Format(lisLazBuildUnableToWriteFile, [Filename, #13])
|
Format(lisLazBuildUnableToWriteFile, [Filename, #13])
|
||||||
+E.Message,
|
+E.Message,
|
||||||
mtError,[mbCancel,mbAbort],0);
|
mtError,[mbCancel,mbAbort]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -257,7 +257,7 @@ begin
|
|||||||
DumpStack;
|
DumpStack;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
s:='';
|
s:='';
|
||||||
//IDEMessageDlg('Unknown Macro','Macro not defined: "'+s+'".',mtError,[mbAbort],0);
|
//IDEMessageDialog('Unknown Macro','Macro not defined: "'+s+'".',mtError,[mbAbort],0);
|
||||||
Handled:=true;
|
Handled:=true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -1475,8 +1475,8 @@ begin
|
|||||||
ACaption:=lisDeleteFileFailed;
|
ACaption:=lisDeleteFileFailed;
|
||||||
AText:=Format(lisUnableToRemoveOldBackupFile, ['"',
|
AText:=Format(lisUnableToRemoveOldBackupFile, ['"',
|
||||||
CounterFilename, '"']);
|
CounterFilename, '"']);
|
||||||
Result:=MessageDlg(ACaption,AText,mtError,
|
Result:=IDEMessageDialog(ACaption,AText,mtError,
|
||||||
[mbAbort,mbRetry,mbIgnore],0);
|
[mbAbort,mbRetry,mbIgnore]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
if Result=mrIgnore then Result:=mrOk;
|
if Result=mrIgnore then Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
@ -1493,8 +1493,8 @@ begin
|
|||||||
ACaption:=lisRenameFileFailed;
|
ACaption:=lisRenameFileFailed;
|
||||||
AText:=Format(lisUnableToRenameFileTo, ['"', BackupFilename+IntToStr
|
AText:=Format(lisUnableToRenameFileTo, ['"', BackupFilename+IntToStr
|
||||||
(i), '"', '"', BackupFilename+IntToStr(i+1), '"']);
|
(i), '"', '"', BackupFilename+IntToStr(i+1), '"']);
|
||||||
Result:=MessageDlg(ACaption,AText,mtError,
|
Result:=IDEMessageDialog(ACaption,AText,mtError,
|
||||||
[mbAbort,mbRetry,mbIgnore],0);
|
[mbAbort,mbRetry,mbIgnore]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
if Result=mrIgnore then Result:=mrOk;
|
if Result=mrIgnore then Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -34,8 +34,8 @@ uses
|
|||||||
Classes, SysUtils, FileUtil, Laz2_XMLCfg, LazLogger, LResources, Forms,
|
Classes, SysUtils, FileUtil, Laz2_XMLCfg, LazLogger, LResources, Forms,
|
||||||
Controls, Graphics, Dialogs, ExtCtrls, Buttons, StdCtrls, ComCtrls, Contnrs,
|
Controls, Graphics, Dialogs, ExtCtrls, Buttons, StdCtrls, ComCtrls, Contnrs,
|
||||||
ButtonPanel, DefineTemplates, IDEImagesIntf, IDEMsgIntf, IDEHelpIntf,
|
ButtonPanel, DefineTemplates, IDEImagesIntf, IDEMsgIntf, IDEHelpIntf,
|
||||||
LazarusIDEStrConsts, LazConf, InterfaceBase, IDEProcs, TransferMacros,
|
IDEDialogs, LazarusIDEStrConsts, LazConf, InterfaceBase, IDEProcs,
|
||||||
CompilerOptions;
|
TransferMacros, CompilerOptions;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -596,9 +596,9 @@ begin
|
|||||||
i := ProfilesListbox.ItemIndex;
|
i := ProfilesListbox.ItemIndex;
|
||||||
if i<0 then exit;
|
if i<0 then exit;
|
||||||
// Remove the item from selected list.
|
// Remove the item from selected list.
|
||||||
if MessageDlg(lisLazBuildConfirmDeletion,
|
if IDEMessageDialog(lisLazBuildConfirmDeletion,
|
||||||
lisLazBuildAreYouSureYouWantToDeleteThisBuildProfile, mtConfirmation,
|
lisLazBuildAreYouSureYouWantToDeleteThisBuildProfile, mtConfirmation,
|
||||||
[mbYes, mbNo], 0)=mrYes then
|
[mbYes, mbNo])=mrYes then
|
||||||
begin
|
begin
|
||||||
SelI:=fProfsToManage.Selected.IndexOf(fProfsToManage[i].fName);
|
SelI:=fProfsToManage.Selected.IndexOf(fProfsToManage[i].fName);
|
||||||
if SelI>-1 then
|
if SelI>-1 then
|
||||||
|
|||||||
@ -40,7 +40,7 @@ uses
|
|||||||
PascalParserTool,
|
PascalParserTool,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
IDECommands, TextTools, SrcEditorIntf, MenuIntf, IDEWindowIntf, LazIDEIntf,
|
IDECommands, TextTools, SrcEditorIntf, MenuIntf, IDEWindowIntf, LazIDEIntf,
|
||||||
IDEHelpIntf,
|
IDEHelpIntf, IDEDialogs,
|
||||||
// IDE
|
// IDE
|
||||||
IDEProcs, InputHistory, LazarusIDEStrConsts, EditorOptions, CodeMacroSelect,
|
IDEProcs, InputHistory, LazarusIDEStrConsts, EditorOptions, CodeMacroSelect,
|
||||||
CodeMacroPrompt;
|
CodeMacroPrompt;
|
||||||
@ -917,7 +917,7 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
AText:=Format(lisCodeTemplATokenAlreadyExists, ['"', TokenEdit.Text, '"']);
|
AText:=Format(lisCodeTemplATokenAlreadyExists, ['"', TokenEdit.Text, '"']);
|
||||||
ACaption:=lisCodeTemplError;
|
ACaption:=lisCodeTemplError;
|
||||||
MessageDlg(ACaption,AText,mterror,[mbok],0);
|
IDEMessageDialog(ACaption,AText,mterror,[mbok]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1022,9 +1022,10 @@ begin
|
|||||||
SynAutoComplete.AutoCompleteList.SaveToFile(
|
SynAutoComplete.AutoCompleteList.SaveToFile(
|
||||||
UTF8ToSys(EditorOpts.CodeTemplateFileName));
|
UTF8ToSys(EditorOpts.CodeTemplateFileName));
|
||||||
except
|
except
|
||||||
res:=MessageDlg(' Unable to write code templates to file '''
|
res:=IDEMessageDialog(lisCCOErrorCaption, 'Unable to write code '
|
||||||
|
+'templates to file '''
|
||||||
+EditorOpts.CodeTemplateFileName+'''! ',mtError
|
+EditorOpts.CodeTemplateFileName+'''! ',mtError
|
||||||
,[mbAbort, mbIgnore, mbRetry],0);
|
,[mbAbort, mbIgnore, mbRetry]);
|
||||||
if res=mrAbort then exit;
|
if res=mrAbort then exit;
|
||||||
end;
|
end;
|
||||||
until Res<>mrRetry;
|
until Res<>mrRetry;
|
||||||
@ -1084,10 +1085,10 @@ begin
|
|||||||
a := PtrInt(TemplateListBox.Items.Objects[idx]);
|
a := PtrInt(TemplateListBox.Items.Objects[idx]);
|
||||||
if a < 0 then exit;
|
if a < 0 then exit;
|
||||||
|
|
||||||
if MessageDlg(dlgDelTemplate
|
if IDEMessageDialog(lisConfirm, dlgDelTemplate
|
||||||
+'"'+SynAutoComplete.Completions[a]+' - '
|
+'"'+SynAutoComplete.Completions[a]+' - '
|
||||||
+SynAutoComplete.CompletionComments[a]+'"'
|
+SynAutoComplete.CompletionComments[a]+'"'
|
||||||
+'?',mtConfirmation,[mbOk,mbCancel],0)=mrOK
|
+'?',mtConfirmation,[mbOk,mbCancel])=mrOK
|
||||||
then begin
|
then begin
|
||||||
SynAutoComplete.DeleteCompletion(a);
|
SynAutoComplete.DeleteCompletion(a);
|
||||||
LastTemplate := -1; // to prevent the saving of the deleted template
|
LastTemplate := -1; // to prevent the saving of the deleted template
|
||||||
|
|||||||
@ -525,8 +525,8 @@ begin
|
|||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
MessageDlg(lisFileLinkError,
|
IDEMessageDialog(lisFileLinkError,
|
||||||
E.Message,mtError,[mbCancel],0);
|
E.Message,mtError,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -63,7 +63,7 @@ uses
|
|||||||
// codetools
|
// codetools
|
||||||
LinkScanner, CodeToolManager,
|
LinkScanner, CodeToolManager,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
IDECommands, SrcEditorIntf, IDEOptionsIntf,
|
IDECommands, SrcEditorIntf, IDEOptionsIntf, IDEDialogs,
|
||||||
// IDE
|
// IDE
|
||||||
LazarusIDEStrConsts, IDEProcs, KeyMapping, LazConf, typinfo;
|
LazarusIDEStrConsts, IDEProcs, KeyMapping, LazConf, typinfo;
|
||||||
|
|
||||||
@ -3304,9 +3304,9 @@ procedure TEditorMouseOptions.ImportFromXml(aXMLConfig: TRttiXMLConfig; aPath: S
|
|||||||
MActions.AssertNoConflict(MAct);
|
MActions.AssertNoConflict(MAct);
|
||||||
except
|
except
|
||||||
MActions.Delete(MActions.Count-1);
|
MActions.Delete(MActions.Count-1);
|
||||||
MessageDlg(dlgMouseOptErrorDup, dlgMouseOptErrorDupText + LineEnding
|
IDEMessageDialog(dlgMouseOptErrorDup, dlgMouseOptErrorDupText + LineEnding
|
||||||
+ Path + 'M' + IntToStr(i) + LineEnding + MAct.DisplayName,
|
+ Path + 'M' + IntToStr(i) + LineEnding + MAct.DisplayName,
|
||||||
mtError, [mbOk], 0);
|
mtError, [mbOk]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Mact.Free;
|
Mact.Free;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ uses
|
|||||||
Dialogs, LazConfigStorage, Laz2_XMLCfg,
|
Dialogs, LazConfigStorage, Laz2_XMLCfg,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
ProjectIntf, ObjectInspector, IDEWindowIntf, IDEOptionsIntf,
|
ProjectIntf, ObjectInspector, IDEWindowIntf, IDEOptionsIntf,
|
||||||
CompOptsIntf, IDEExternToolIntf,
|
CompOptsIntf, IDEExternToolIntf, IDEDialogs,
|
||||||
// IDE
|
// IDE
|
||||||
IDEProcs, LazarusIDEStrConsts, IDETranslations, LazConf,
|
IDEProcs, LazarusIDEStrConsts, IDETranslations, LazConf,
|
||||||
IDEOptionDefs, TransferMacros, Debugger;
|
IDEOptionDefs, TransferMacros, Debugger;
|
||||||
@ -698,8 +698,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if (not FileIsExecutable(Filename)) then begin
|
if (not FileIsExecutable(Filename)) then begin
|
||||||
if MessageDlg(ErrorCaption,Format(ErrorMsg,[Filename]),
|
if IDEMessageDialog(ErrorCaption,Format(ErrorMsg,[Filename]),
|
||||||
mtWarning,[mbIgnore,mbCancel],0)=mrCancel
|
mtWarning,[mbIgnore,mbCancel])=mrCancel
|
||||||
then begin
|
then begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
@ -710,8 +710,8 @@ function CheckDirPathExists(const Dir,
|
|||||||
ErrorCaption, ErrorMsg: string): TModalResult;
|
ErrorCaption, ErrorMsg: string): TModalResult;
|
||||||
begin
|
begin
|
||||||
if not DirPathExists(Dir) then begin
|
if not DirPathExists(Dir) then begin
|
||||||
Result:=MessageDlg(ErrorCaption,Format(ErrorMsg,[Dir]),mtWarning,
|
Result:=IDEMessageDialog(ErrorCaption,Format(ErrorMsg,[Dir]),mtWarning,
|
||||||
[mbIgnore,mbCancel],0);
|
[mbIgnore,mbCancel]);
|
||||||
end else
|
end else
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -46,7 +46,7 @@ uses
|
|||||||
LCLType, Controls, Forms, Buttons, StdCtrls,
|
LCLType, Controls, Forms, Buttons, StdCtrls,
|
||||||
Dialogs, ExtCtrls, LCLProc, ButtonPanel,
|
Dialogs, ExtCtrls, LCLProc, ButtonPanel,
|
||||||
IDEMsgIntf, IDEExternToolIntf, IDEHelpIntf,
|
IDEMsgIntf, IDEExternToolIntf, IDEHelpIntf,
|
||||||
PropEdits, TransferMacros, LazarusIDEStrConsts,
|
PropEdits, IDEDialogs, TransferMacros, LazarusIDEStrConsts,
|
||||||
EditMsgScannersDlg;
|
EditMsgScannersDlg;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -363,9 +363,9 @@ begin
|
|||||||
if (TitleEdit.Text<>'') and (FilenameEdit.Text<>'') then
|
if (TitleEdit.Text<>'') and (FilenameEdit.Text<>'') then
|
||||||
SaveToOptions
|
SaveToOptions
|
||||||
else begin
|
else begin
|
||||||
MessageDlg(lisEdtExtToolTitleAndFilenameRequired,
|
IDEMessageDialog(lisEdtExtToolTitleAndFilenameRequired,
|
||||||
lisEdtExtToolAValidToolNeedsAtLeastATitleAndAFilename,
|
lisEdtExtToolAValidToolNeedsAtLeastATitleAndAFilename,
|
||||||
mtError, [mbCancel], 0);
|
mtError, [mbCancel]);
|
||||||
ModalResult:=mrCancel;
|
ModalResult:=mrCancel;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -31,7 +31,7 @@ uses
|
|||||||
Classes, SysUtils, Math, Forms, Controls, Dialogs, Buttons, StdCtrls,
|
Classes, SysUtils, Math, Forms, Controls, Dialogs, Buttons, StdCtrls,
|
||||||
FileUtil, LResources,
|
FileUtil, LResources,
|
||||||
// IDE
|
// IDE
|
||||||
LazarusIDEStrConsts, TransferMacros, InputHistory, IDEProcs;
|
LazarusIDEStrConsts, TransferMacros, InputHistory, IDEProcs, IDEDialogs;
|
||||||
|
|
||||||
type
|
type
|
||||||
TInputFileFlag = (iftDirectory, iftFilename, iftCmdLine,
|
TInputFileFlag = (iftDirectory, iftFilename, iftCmdLine,
|
||||||
@ -134,10 +134,10 @@ begin
|
|||||||
CurEdit:=GetInputEdit(i);
|
CurEdit:=GetInputEdit(i);
|
||||||
CurEdit.Text:=CurEdit.Text;
|
CurEdit.Text:=CurEdit.Text;
|
||||||
if not FilenameIsValidForFileIndex(CurEdit.Text,i) then begin
|
if not FilenameIsValidForFileIndex(CurEdit.Text,i) then begin
|
||||||
if MessageDlg(lisA2PInvalidFile,
|
if IDEMessageDialog(lisA2PInvalidFile,
|
||||||
Format(lisCodeToolsDefsValueIsInvalid, [GetGroupBox(i).Caption, #13,
|
Format(lisCodeToolsDefsValueIsInvalid, [GetGroupBox(i).Caption, #13,
|
||||||
CurEdit.Text]), mtInformation,
|
CurEdit.Text]), mtInformation,
|
||||||
[mbCancel,mbAbort],0)=mrAbort
|
[mbCancel,mbAbort])=mrAbort
|
||||||
then
|
then
|
||||||
ModalResult:=mrCancel
|
ModalResult:=mrCancel
|
||||||
else
|
else
|
||||||
|
|||||||
@ -33,7 +33,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs,
|
||||||
ExtCtrls, StdCtrls, LCLType,
|
ExtCtrls, StdCtrls, LCLType,
|
||||||
PropEdits, IDECommands, IDEWindowIntf,
|
PropEdits, IDECommands, IDEWindowIntf, IDEDialogs,
|
||||||
KeyMapping, LazarusIDEStrConsts, Buttons, ButtonPanel;
|
KeyMapping, LazarusIDEStrConsts, Buttons, ButtonPanel;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -362,10 +362,10 @@ begin
|
|||||||
else
|
else
|
||||||
ConflictName:=ConflictName
|
ConflictName:=ConflictName
|
||||||
+' ('+KeyAndShiftStateToEditorKeyString(ConflictRelation.ShortcutB);
|
+' ('+KeyAndShiftStateToEditorKeyString(ConflictRelation.ShortcutB);
|
||||||
case MessageDlg(lisPEConflictFound,
|
case IDEMessageDialog(lisPEConflictFound,
|
||||||
Format(lisTheKeyIsAlreadyAssignedToRemoveTheOldAssignmentAnd, [
|
Format(lisTheKeyIsAlreadyAssignedToRemoveTheOldAssignmentAnd, [
|
||||||
KeyAndShiftStateToEditorKeyString(Key), #13, ConflictName, #13, #13,
|
KeyAndShiftStateToEditorKeyString(Key), #13, ConflictName, #13, #13,
|
||||||
#13, CurName]), mtConfirmation, [mbYes, mbNo, mbCancel], 0)
|
#13, CurName]), mtConfirmation, [mbYes, mbNo, mbCancel])
|
||||||
of
|
of
|
||||||
mrYes: Result:=mrOK;
|
mrYes: Result:=mrOK;
|
||||||
mrCancel: Result:=mrCancel;
|
mrCancel: Result:=mrCancel;
|
||||||
|
|||||||
@ -2930,6 +2930,7 @@ resourcestring
|
|||||||
|
|
||||||
// Build lazarus dialog
|
// Build lazarus dialog
|
||||||
lisConfirmLazarusRebuild = 'Do you want to rebuild Lazarus with profile: %s ?';
|
lisConfirmLazarusRebuild = 'Do you want to rebuild Lazarus with profile: %s ?';
|
||||||
|
lisConfirmation = 'Confirmation';
|
||||||
lisConfirmBuildAllProfiles = 'Lazarus will be rebuilt with the following profiles:%sContinue?';
|
lisConfirmBuildAllProfiles = 'Lazarus will be rebuilt with the following profiles:%sContinue?';
|
||||||
lisNoBuildProfilesSelected = 'No profiles are selected to be built.';
|
lisNoBuildProfilesSelected = 'No profiles are selected to be built.';
|
||||||
lisCleanLazarusSource = 'Clean Lazarus Source';
|
lisCleanLazarusSource = 'Clean Lazarus Source';
|
||||||
|
|||||||
272
ide/main.pp
272
ide/main.pp
@ -1192,7 +1192,7 @@ var
|
|||||||
procedure WriteHelp(const AText: string);
|
procedure WriteHelp(const AText: string);
|
||||||
begin
|
begin
|
||||||
if TextRec(Output).Mode = fmClosed then
|
if TextRec(Output).Mode = fmClosed then
|
||||||
MessageDlg(AText, mtInformation, [mbOk], 0)
|
IDEMessageDialog(lisInformation, AText, mtInformation, [mbOk])
|
||||||
else
|
else
|
||||||
WriteLn(UTF8ToConsole(AText));
|
WriteLn(UTF8ToConsole(AText));
|
||||||
Application.Terminate;
|
Application.Terminate;
|
||||||
@ -3573,7 +3573,7 @@ function TMainIDE.OnIDEMessageDialog(const aCaption, aMsg: string;
|
|||||||
DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; const HelpKeyword: string
|
DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; const HelpKeyword: string
|
||||||
): Integer;
|
): Integer;
|
||||||
begin
|
begin
|
||||||
Result:=MessageDlg(aCaption,aMsg,DlgType,Buttons,HelpKeyword);
|
Result:=IDEMessageDialog(aCaption,aMsg,DlgType,Buttons,HelpKeyword);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.OnIDEQuestionDialog(const aCaption, aMsg: string;
|
function TMainIDE.OnIDEQuestionDialog(const aCaption, aMsg: string;
|
||||||
@ -4796,8 +4796,9 @@ procedure TMainIDE.mnuToolBuildLazarusClicked(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
with MiscellaneousOptions do
|
with MiscellaneousOptions do
|
||||||
if BuildLazProfiles.ConfirmBuild then
|
if BuildLazProfiles.ConfirmBuild then
|
||||||
if MessageDlg(Format(lisConfirmLazarusRebuild, [BuildLazProfiles.Current.Name]),
|
if IDEMessageDialog(lisConfirmation, Format(lisConfirmLazarusRebuild, [
|
||||||
mtConfirmation, mbYesNo, 0)<>mrYes then
|
BuildLazProfiles.Current.Name]),
|
||||||
|
mtConfirmation, mbYesNo)<>mrYes then
|
||||||
exit;
|
exit;
|
||||||
DoBuildLazarus([]);
|
DoBuildLazarus([]);
|
||||||
end;
|
end;
|
||||||
@ -4821,8 +4822,8 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if BuildLazProfiles.ConfirmBuild then
|
if BuildLazProfiles.ConfirmBuild then
|
||||||
if MessageDlg(Format(lisConfirmBuildAllProfiles, [s+sLineBreak]),
|
if IDEMessageDialog(lisConfirmation, Format(lisConfirmBuildAllProfiles, [s
|
||||||
mtConfirmation, mbYesNo, 0)<>mrYes then
|
+sLineBreak]), mtConfirmation, mbYesNo)<>mrYes then
|
||||||
exit;
|
exit;
|
||||||
DoBuildAdvancedLazarus(BuildLazProfiles.Selected);
|
DoBuildAdvancedLazarus(BuildLazProfiles.Selected);
|
||||||
end;
|
end;
|
||||||
@ -5166,10 +5167,10 @@ var
|
|||||||
if (OldTitle <> NewTitle) and (not AProject.TitleIsDefault) then
|
if (OldTitle <> NewTitle) and (not AProject.TitleIsDefault) then
|
||||||
if not CodeToolBoss.SetApplicationTitleStatement(AProject.MainUnitInfo.Source, NewTitle) then
|
if not CodeToolBoss.SetApplicationTitleStatement(AProject.MainUnitInfo.Source, NewTitle) then
|
||||||
begin
|
begin
|
||||||
MessageDlg(lisProjOptsError,
|
IDEMessageDialog(lisProjOptsError,
|
||||||
Format(lisUnableToChangeProjectTitleInSource, [#13, CodeToolBoss.
|
Format(lisUnableToChangeProjectTitleInSource, [#13, CodeToolBoss.
|
||||||
ErrorMessage]),
|
ErrorMessage]),
|
||||||
mtWarning, [mbOk], 0);
|
mtWarning, [mbOk]);
|
||||||
Result := False;
|
Result := False;
|
||||||
Exit;
|
Exit;
|
||||||
end;// set Application.Title:= statement
|
end;// set Application.Title:= statement
|
||||||
@ -5177,10 +5178,10 @@ var
|
|||||||
if (OldTitle <> '') and AProject.TitleIsDefault then
|
if (OldTitle <> '') and AProject.TitleIsDefault then
|
||||||
if not CodeToolBoss.RemoveApplicationTitleStatement(AProject.MainUnitInfo.Source) then
|
if not CodeToolBoss.RemoveApplicationTitleStatement(AProject.MainUnitInfo.Source) then
|
||||||
begin
|
begin
|
||||||
MessageDlg(lisProjOptsError,
|
IDEMessageDialog(lisProjOptsError,
|
||||||
Format(lisUnableToRemoveProjectTitleFromSource, [#13, CodeToolBoss.
|
Format(lisUnableToRemoveProjectTitleFromSource, [#13, CodeToolBoss.
|
||||||
ErrorMessage]),
|
ErrorMessage]),
|
||||||
mtWarning, [mbOk], 0);
|
mtWarning, [mbOk]);
|
||||||
Result := False;
|
Result := False;
|
||||||
Exit;
|
Exit;
|
||||||
end;// delete title
|
end;// delete title
|
||||||
@ -5213,9 +5214,9 @@ var
|
|||||||
if not CodeToolBoss.SetAllCreateFromStatements(AProject.MainUnitInfo.Source,
|
if not CodeToolBoss.SetAllCreateFromStatements(AProject.MainUnitInfo.Source,
|
||||||
AProject.TmpAutoCreatedForms) then
|
AProject.TmpAutoCreatedForms) then
|
||||||
begin
|
begin
|
||||||
MessageDlg(lisProjOptsError,
|
IDEMessageDialog(lisProjOptsError,
|
||||||
Format(lisProjOptsUnableToChangeTheAutoCreateFormList, [LineEnding]),
|
Format(lisProjOptsUnableToChangeTheAutoCreateFormList, [LineEnding]),
|
||||||
mtWarning, [mbOK], 0);
|
mtWarning, [mbOK]);
|
||||||
Result := False;
|
Result := False;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
@ -5235,7 +5236,8 @@ begin
|
|||||||
if AProject.ProjResources.Modified and (AProject.MainUnitID >= 0) then
|
if AProject.ProjResources.Modified and (AProject.MainUnitID >= 0) then
|
||||||
begin
|
begin
|
||||||
if not AProject.ProjResources.Regenerate(AProject.MainFilename, True, False, '') then
|
if not AProject.ProjResources.Regenerate(AProject.MainFilename, True, False, '') then
|
||||||
MessageDlg(AProject.ProjResources.Messages.Text, mtWarning, [mbOk], 0);
|
IDEMessageDialog(lisCCOWarningCaption, AProject.ProjResources.Messages.
|
||||||
|
Text, mtWarning, [mbOk]);
|
||||||
end;
|
end;
|
||||||
UpdateCaption;
|
UpdateCaption;
|
||||||
AProject.DefineTemplates.AllChanged;
|
AProject.DefineTemplates.AllChanged;
|
||||||
@ -6014,8 +6016,8 @@ begin
|
|||||||
if PropPath<>'' then
|
if PropPath<>'' then
|
||||||
AText := Atext + LineEnding + LineEnding + lisPathToInstance
|
AText := Atext + LineEnding + LineEnding + lisPathToInstance
|
||||||
+ LineEnding + PropPath;
|
+ LineEnding + PropPath;
|
||||||
Result:=MessageDlg(ACaption, AText, mtError,
|
Result:=IDEMessageDialog(ACaption, AText, mtError,
|
||||||
[mbAbort, mbRetry, mbIgnore], 0);
|
[mbAbort, mbRetry, mbIgnore]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
if Result=mrIgnore then Result:=mrOk;
|
if Result=mrIgnore then Result:=mrOk;
|
||||||
ComponentSavingOk:=false;
|
ComponentSavingOk:=false;
|
||||||
@ -6064,7 +6066,7 @@ begin
|
|||||||
ACaption:=lisResourceSaveError;
|
ACaption:=lisResourceSaveError;
|
||||||
AText:=Format(lisUnableToAddResourceHeaderCommentToResourceFile, [
|
AText:=Format(lisUnableToAddResourceHeaderCommentToResourceFile, [
|
||||||
#13, '"', LRSCode.FileName, '"', #13]);
|
#13, '"', LRSCode.FileName, '"', #13]);
|
||||||
Result:=MessageDlg(ACaption,AText,mtError,[mbIgnore,mbAbort],0);
|
Result:=IDEMessageDialog(ACaption,AText,mtError,[mbIgnore,mbAbort]);
|
||||||
if Result<>mrIgnore then exit;
|
if Result<>mrIgnore then exit;
|
||||||
end;
|
end;
|
||||||
// add resource to resource file
|
// add resource to resource file
|
||||||
@ -6077,7 +6079,7 @@ begin
|
|||||||
AnUnitInfo.ComponentName,
|
AnUnitInfo.ComponentName,
|
||||||
#13, '"', LRSCode.FileName, '"', #13]
|
#13, '"', LRSCode.FileName, '"', #13]
|
||||||
);
|
);
|
||||||
Result:=MessageDlg(ACaption, AText, mtError, [mbIgnore, mbAbort],0);
|
Result:=IDEMessageDialog(ACaption, AText, mtError, [mbIgnore, mbAbort]);
|
||||||
if Result<>mrIgnore then exit;
|
if Result<>mrIgnore then exit;
|
||||||
end else begin
|
end else begin
|
||||||
AnUnitInfo.ComponentResourceName:=AnUnitInfo.ComponentName;
|
AnUnitInfo.ComponentResourceName:=AnUnitInfo.ComponentName;
|
||||||
@ -6147,8 +6149,8 @@ begin
|
|||||||
lisUnableToTransformBinaryComponentStreamOfTIntoText, [
|
lisUnableToTransformBinaryComponentStreamOfTIntoText, [
|
||||||
AnUnitInfo.ComponentName, AnUnitInfo.ComponentName])
|
AnUnitInfo.ComponentName, AnUnitInfo.ComponentName])
|
||||||
+#13+E.Message;
|
+#13+E.Message;
|
||||||
Result:=MessageDlg(ACaption, AText, mtError,
|
Result:=IDEMessageDialog(ACaption, AText, mtError,
|
||||||
[mbAbort, mbRetry, mbIgnore], 0);
|
[mbAbort, mbRetry, mbIgnore]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
if Result=mrIgnore then Result:=mrOk;
|
if Result=mrIgnore then Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
@ -6307,8 +6309,8 @@ begin
|
|||||||
// -> remove lfm file, so that it will not be auto loaded on next open
|
// -> remove lfm file, so that it will not be auto loaded on next open
|
||||||
if (FileExistsUTF8(NewLFMFilename))
|
if (FileExistsUTF8(NewLFMFilename))
|
||||||
and (not DeleteFileUTF8(NewLFMFilename))
|
and (not DeleteFileUTF8(NewLFMFilename))
|
||||||
and (MessageDlg(lisPkgMangDeleteFailed, Format(lisDeletingOfFileFailed, [
|
and (IDEMessageDialog(lisPkgMangDeleteFailed, Format(lisDeletingOfFileFailed, [
|
||||||
'"', NewLFMFilename, '"']), mtError, [mbIgnore, mbCancel], 0)=mrCancel)
|
'"', NewLFMFilename, '"']), mtError, [mbIgnore, mbCancel])=mrCancel)
|
||||||
then
|
then
|
||||||
begin
|
begin
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
@ -6321,9 +6323,9 @@ begin
|
|||||||
NewSource:=CodeToolBoss.CreateFile(NewFilename);
|
NewSource:=CodeToolBoss.CreateFile(NewFilename);
|
||||||
NewSource.Source:=OldSourceCode;
|
NewSource.Source:=OldSourceCode;
|
||||||
if NewSource=nil then begin
|
if NewSource=nil then begin
|
||||||
Result:=MessageDlg(lisUnableToCreateFile,
|
Result:=IDEMessageDialog(lisUnableToCreateFile,
|
||||||
Format(lisCanNotCreateFile, ['"', NewFilename, '"']),
|
Format(lisCanNotCreateFile, ['"', NewFilename, '"']),
|
||||||
mtError,[mbCancel,mbAbort],0);
|
mtError,[mbCancel,mbAbort]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
// get final filename
|
// get final filename
|
||||||
@ -6342,10 +6344,10 @@ begin
|
|||||||
|
|
||||||
if SearchDirectoryInSearchPath(OldUnitPath,NewFilePath,1)<1 then begin
|
if SearchDirectoryInSearchPath(OldUnitPath,NewFilePath,1)<1 then begin
|
||||||
//DebugLn('TMainIDE.DoRenameUnit NewFilePath="',NewFilePath,'" OldUnitPath="',OldUnitPath,'"');
|
//DebugLn('TMainIDE.DoRenameUnit NewFilePath="',NewFilePath,'" OldUnitPath="',OldUnitPath,'"');
|
||||||
if MessageDlg(lisExtendUnitPath,
|
if IDEMessageDialog(lisExtendUnitPath,
|
||||||
Format(lisTheDirectoryIsNotYetInTheUnitPathAddIt, ['"', NewFilePath,
|
Format(lisTheDirectoryIsNotYetInTheUnitPathAddIt, ['"', NewFilePath,
|
||||||
'"', #13]),
|
'"', #13]),
|
||||||
mtConfirmation,[mbYes,mbNo],0)=mrYes then
|
mtConfirmation,[mbYes,mbNo])=mrYes then
|
||||||
begin
|
begin
|
||||||
Project1.CompilerOptions.OtherUnitFiles:=
|
Project1.CompilerOptions.OtherUnitFiles:=
|
||||||
Project1.CompilerOptions.OtherUnitFiles+';'
|
Project1.CompilerOptions.OtherUnitFiles+';'
|
||||||
@ -6495,8 +6497,8 @@ begin
|
|||||||
AmbiguousText:=
|
AmbiguousText:=
|
||||||
Format(lisThereAreOtherFilesInTheDirectoryWithTheSameName,
|
Format(lisThereAreOtherFilesInTheDirectoryWithTheSameName,
|
||||||
[#13, #13, AmbiguousFiles.Text, #13]);
|
[#13, #13, AmbiguousFiles.Text, #13]);
|
||||||
Result:=MessageDlg(lisAmbiguousFilesFound, AmbiguousText,
|
Result:=IDEMessageDialog(lisAmbiguousFilesFound, AmbiguousText,
|
||||||
mtWarning,[mbYes,mbNo,mbAbort],0);
|
mtWarning,[mbYes,mbNo,mbAbort]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
if Result=mrYes then begin
|
if Result=mrYes then begin
|
||||||
NewFilePath:=AppendPathDelim(ExtractFilePath(NewFilename));
|
NewFilePath:=AppendPathDelim(ExtractFilePath(NewFilename));
|
||||||
@ -6504,8 +6506,8 @@ begin
|
|||||||
AmbiguousFilename:=NewFilePath+AmbiguousFiles[i];
|
AmbiguousFilename:=NewFilePath+AmbiguousFiles[i];
|
||||||
if (FileExistsUTF8(AmbiguousFilename))
|
if (FileExistsUTF8(AmbiguousFilename))
|
||||||
and (not DeleteFileUTF8(AmbiguousFilename))
|
and (not DeleteFileUTF8(AmbiguousFilename))
|
||||||
and (MessageDlg(lisPkgMangDeleteFailed, Format(lisDeletingOfFileFailed,
|
and (IDEMessageDialog(lisPkgMangDeleteFailed, Format(lisDeletingOfFileFailed,
|
||||||
['"', AmbiguousFilename, '"']), mtError, [mbIgnore, mbCancel], 0)=
|
['"', AmbiguousFilename, '"']), mtError, [mbIgnore, mbCancel])=
|
||||||
mrCancel) then
|
mrCancel) then
|
||||||
begin
|
begin
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
@ -6530,10 +6532,10 @@ begin
|
|||||||
if (SearchDirectoryInSearchPath(
|
if (SearchDirectoryInSearchPath(
|
||||||
Project1.CompilerOptions.GetUnitPath(false),OldFilePath,1)<1)
|
Project1.CompilerOptions.GetUnitPath(false),OldFilePath,1)<1)
|
||||||
then begin
|
then begin
|
||||||
if MessageDlg(lisCleanUpUnitPath,
|
if IDEMessageDialog(lisCleanUpUnitPath,
|
||||||
Format(lisTheDirectoryIsNoLongerNeededInTheUnitPathRemoveIt, ['"',
|
Format(lisTheDirectoryIsNoLongerNeededInTheUnitPathRemoveIt, ['"',
|
||||||
OldFilePath, '"', #13]),
|
OldFilePath, '"', #13]),
|
||||||
mtConfirmation,[mbYes,mbNo],0)=mrYes then
|
mtConfirmation,[mbYes,mbNo])=mrYes then
|
||||||
begin
|
begin
|
||||||
Project1.CompilerOptions.OtherUnitFiles:=
|
Project1.CompilerOptions.OtherUnitFiles:=
|
||||||
RemoveSearchPaths(Project1.CompilerOptions.OtherUnitFiles,
|
RemoveSearchPaths(Project1.CompilerOptions.OtherUnitFiles,
|
||||||
@ -6546,9 +6548,9 @@ begin
|
|||||||
// delete old pas, .pp, .ppu
|
// delete old pas, .pp, .ppu
|
||||||
if (CompareFilenames(NewFilename,OldFilename)<>0)
|
if (CompareFilenames(NewFilename,OldFilename)<>0)
|
||||||
and OldFileExisted then begin
|
and OldFileExisted then begin
|
||||||
if MessageDlg(lisDeleteOldFile2,
|
if IDEMessageDialog(lisDeleteOldFile2,
|
||||||
Format(lisDeleteOldFile, ['"', OldFilename, '"']),
|
Format(lisDeleteOldFile, ['"', OldFilename, '"']),
|
||||||
mtConfirmation,[mbYes,mbNo],0)=mrYes then
|
mtConfirmation,[mbYes,mbNo])=mrYes then
|
||||||
begin
|
begin
|
||||||
Result:=DeleteFileInteractive(OldFilename,[mbAbort]);
|
Result:=DeleteFileInteractive(OldFilename,[mbAbort]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
@ -6650,16 +6652,16 @@ begin
|
|||||||
|
|
||||||
if ofOnlyIfExists in Flags
|
if ofOnlyIfExists in Flags
|
||||||
then begin
|
then begin
|
||||||
MessageDlg(lisFileNotFound, Format(lisFileNotFound2, ['"', AFilename, '"',
|
IDEMessageDialog(lisFileNotFound, Format(lisFileNotFound2, ['"', AFilename, '"',
|
||||||
#13]),
|
#13]),
|
||||||
mtInformation,[mbCancel],0);
|
mtInformation,[mbCancel]);
|
||||||
// cancel loading file
|
// cancel loading file
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if MessageDlg(lisFileNotFound,
|
if IDEMessageDialog(lisFileNotFound,
|
||||||
Format(lisFileNotFoundDoYouWantToCreateIt, ['"', AFilename, '"', #13, #13])
|
Format(lisFileNotFoundDoYouWantToCreateIt, ['"', AFilename, '"', #13, #13])
|
||||||
,mtInformation,[mbYes,mbNo],0)=mrYes then
|
,mtInformation,[mbYes,mbNo])=mrYes then
|
||||||
begin
|
begin
|
||||||
// create new file
|
// create new file
|
||||||
NewFlags:=[nfOpenInEditor,nfCreateDefaultSrc];
|
NewFlags:=[nfOpenInEditor,nfCreateDefaultSrc];
|
||||||
@ -6726,8 +6728,8 @@ begin
|
|||||||
AText:=Format(lisTheFileSeemsToBeAProgramCloseCurrentProject, ['"',
|
AText:=Format(lisTheFileSeemsToBeAProgramCloseCurrentProject, ['"',
|
||||||
AFilename, '"', #13, #13]);
|
AFilename, '"', #13, #13]);
|
||||||
ACaption:=lisProgramDetected;
|
ACaption:=lisProgramDetected;
|
||||||
if MessageDlg(ACaption, AText, mtConfirmation,
|
if IDEMessageDialog(ACaption, AText, mtConfirmation,
|
||||||
[mbYes, mbNo], 0)=mrYes then
|
[mbYes, mbNo])=mrYes then
|
||||||
begin
|
begin
|
||||||
Result:=DoCreateProjectForProgram(PreReadBuf);
|
Result:=DoCreateProjectForProgram(PreReadBuf);
|
||||||
Handled:=true;
|
Handled:=true;
|
||||||
@ -6865,9 +6867,9 @@ begin
|
|||||||
NewClassName,LCLVersion,MissingClasses);
|
NewClassName,LCLVersion,MissingClasses);
|
||||||
if (NewClassName='') or (LFMType='') then begin
|
if (NewClassName='') or (LFMType='') then begin
|
||||||
DebugLn(['TMainIDE.DoLoadLFM LFM file corrupt']);
|
DebugLn(['TMainIDE.DoLoadLFM LFM file corrupt']);
|
||||||
Result:=MessageDlg(lisLFMFileCorrupt,
|
Result:=IDEMessageDialog(lisLFMFileCorrupt,
|
||||||
Format(lisUnableToFindAValidClassnameIn, ['"', LFMBuf.Filename, '"']),
|
Format(lisUnableToFindAValidClassnameIn, ['"', LFMBuf.Filename, '"']),
|
||||||
mtError,[mbIgnore,mbCancel,mbAbort],0);
|
mtError,[mbIgnore,mbCancel,mbAbort]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6938,7 +6940,7 @@ begin
|
|||||||
ACaption:=lisFormatError;
|
ACaption:=lisFormatError;
|
||||||
AText:=Format(lisUnableToConvertTextFormDataOfFileIntoBinaryStream,
|
AText:=Format(lisUnableToConvertTextFormDataOfFileIntoBinaryStream,
|
||||||
[#13, '"', LFMBuf.Filename, '"', #13, E.Message]);
|
[#13, '"', LFMBuf.Filename, '"', #13, E.Message]);
|
||||||
Result:=MessageDlg(ACaption, AText, mtError, [mbOk, mbCancel], 0);
|
Result:=IDEMessageDialog(ACaption, AText, mtError, [mbOk, mbCancel]);
|
||||||
if Result=mrCancel then Result:=mrAbort;
|
if Result=mrCancel then Result:=mrAbort;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -7065,19 +7067,19 @@ begin
|
|||||||
if (DescendantClassName<>'')
|
if (DescendantClassName<>'')
|
||||||
and (SysUtils.CompareText(AComponentClassName,'TCustomForm')=0) then begin
|
and (SysUtils.CompareText(AComponentClassName,'TCustomForm')=0) then begin
|
||||||
// this is a common user mistake
|
// this is a common user mistake
|
||||||
MessageDlg(lisCodeTemplError, Format(
|
IDEMessageDialog(lisCodeTemplError, Format(
|
||||||
lisTheResourceClassDescendsFromProbablyThisIsATypoFor, ['"',
|
lisTheResourceClassDescendsFromProbablyThisIsATypoFor, ['"',
|
||||||
DescendantClassName, '"', '"', AComponentClassName, '"']),
|
DescendantClassName, '"', '"', AComponentClassName, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
Result:=false;
|
Result:=false;
|
||||||
exit;
|
exit;
|
||||||
end else if (DescendantClassName<>'')
|
end else if (DescendantClassName<>'')
|
||||||
and (SysUtils.CompareText(AComponentClassName,'TComponent')=0) then begin
|
and (SysUtils.CompareText(AComponentClassName,'TComponent')=0) then begin
|
||||||
// this is not yet implemented
|
// this is not yet implemented
|
||||||
MessageDlg(lisCodeTemplError, Format(
|
IDEMessageDialog(lisCodeTemplError, Format(
|
||||||
lisUnableToOpenDesignerTheClassDoesNotDescendFromADes, [#13,
|
lisUnableToOpenDesignerTheClassDoesNotDescendFromADes, [#13,
|
||||||
DescendantClassName]),
|
DescendantClassName]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
Result:=false;
|
Result:=false;
|
||||||
exit;
|
exit;
|
||||||
end else begin
|
end else begin
|
||||||
@ -8413,10 +8415,10 @@ begin
|
|||||||
// check program name
|
// check program name
|
||||||
NewProgramName:=ExtractFileNameOnly(AFilename);
|
NewProgramName:=ExtractFileNameOnly(AFilename);
|
||||||
if (NewProgramName='') or (not IsValidUnitName(NewProgramName)) then begin
|
if (NewProgramName='') or (not IsValidUnitName(NewProgramName)) then begin
|
||||||
Result:=MessageDlg(lisInvalidProjectFilename,
|
Result:=IDEMessageDialog(lisInvalidProjectFilename,
|
||||||
Format(lisisAnInvalidProjectNamePleaseChooseAnotherEGProject, ['"',
|
Format(lisisAnInvalidProjectNamePleaseChooseAnotherEGProject, ['"',
|
||||||
SaveDialog.Filename, '"', #13]),
|
SaveDialog.Filename, '"', #13]),
|
||||||
mtInformation,[mbRetry,mbAbort],0);
|
mtInformation,[mbRetry,mbAbort]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
continue; // try again
|
continue; // try again
|
||||||
end;
|
end;
|
||||||
@ -8450,7 +8452,7 @@ begin
|
|||||||
ACaption:=lisChooseADifferentName;
|
ACaption:=lisChooseADifferentName;
|
||||||
AText:=Format(lisTheProjectInfoFileIsEqualToTheProjectMainSource, [
|
AText:=Format(lisTheProjectInfoFileIsEqualToTheProjectMainSource, [
|
||||||
'"', NewLPIFilename, '"', #13]);
|
'"', NewLPIFilename, '"', #13]);
|
||||||
Result:=MessageDlg(ACaption, AText, mtError, [mbAbort,mbRetry],0);
|
Result:=IDEMessageDialog(ACaption, AText, mtError, [mbAbort,mbRetry]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
continue; // try again
|
continue; // try again
|
||||||
end;
|
end;
|
||||||
@ -8462,7 +8464,7 @@ begin
|
|||||||
ACaption:=lisUnitIdentifierExists;
|
ACaption:=lisUnitIdentifierExists;
|
||||||
AText:=Format(lisThereIsAUnitWithTheNameInTheProjectPleaseChoose, ['"',
|
AText:=Format(lisThereIsAUnitWithTheNameInTheProjectPleaseChoose, ['"',
|
||||||
NewProgramName, '"', #13]);
|
NewProgramName, '"', #13]);
|
||||||
Result:=MessageDlg(ACaption,AText,mtError,[mbRetry,mbAbort],0);
|
Result:=IDEMessageDialog(ACaption,AText,mtError,[mbRetry,mbAbort]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
continue; // try again
|
continue; // try again
|
||||||
end;
|
end;
|
||||||
@ -8484,7 +8486,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
ACaption:=lisOverwriteFile;
|
ACaption:=lisOverwriteFile;
|
||||||
AText:=Format(lisAFileAlreadyExistsReplaceIt, ['"', NewLPIFilename, '"', #13]);
|
AText:=Format(lisAFileAlreadyExistsReplaceIt, ['"', NewLPIFilename, '"', #13]);
|
||||||
Result:=MessageDlg(ACaption, AText, mtConfirmation, [mbOk, mbCancel], 0);
|
Result:=IDEMessageDialog(ACaption, AText, mtConfirmation, [mbOk, mbCancel]);
|
||||||
if Result=mrCancel then exit;
|
if Result=mrCancel then exit;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -8494,7 +8496,7 @@ begin
|
|||||||
ACaption:=lisOverwriteFile;
|
ACaption:=lisOverwriteFile;
|
||||||
AText:=Format(lisAFileAlreadyExistsReplaceIt, ['"', NewProgramFilename,
|
AText:=Format(lisAFileAlreadyExistsReplaceIt, ['"', NewProgramFilename,
|
||||||
'"', #13]);
|
'"', #13]);
|
||||||
Result:=MessageDlg(ACaption, AText, mtConfirmation,[mbOk,mbCancel],0);
|
Result:=IDEMessageDialog(ACaption, AText, mtConfirmation,[mbOk,mbCancel]);
|
||||||
if Result=mrCancel then exit;
|
if Result=mrCancel then exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -8538,8 +8540,8 @@ begin
|
|||||||
// switch MainUnitInfo.Source to new code
|
// switch MainUnitInfo.Source to new code
|
||||||
NewBuf := CodeToolBoss.CreateFile(NewProgramFilename);
|
NewBuf := CodeToolBoss.CreateFile(NewProgramFilename);
|
||||||
if NewBuf=nil then begin
|
if NewBuf=nil then begin
|
||||||
Result:=MessageDlg(lisErrorCreatingFile, Format(lisUnableToCreateFile3, [
|
Result:=IDEMessageDialog(lisErrorCreatingFile, Format(lisUnableToCreateFile3, [
|
||||||
#13, '"', NewProgramFilename, '"']), mtError, [mbCancel], 0);
|
#13, '"', NewProgramFilename, '"']), mtError, [mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -8678,18 +8680,18 @@ procedure TMainIDE.OnCopyError(const ErrorData: TCopyErrorData;
|
|||||||
begin
|
begin
|
||||||
case ErrorData.Error of
|
case ErrorData.Error of
|
||||||
ceSrcDirDoesNotExists:
|
ceSrcDirDoesNotExists:
|
||||||
MessageDlg(lisCopyError2,
|
IDEMessageDialog(lisCopyError2,
|
||||||
Format(lisSourceDirectoryDoesNotExist, ['"', ErrorData.Param1, '"']),
|
Format(lisSourceDirectoryDoesNotExist, ['"', ErrorData.Param1, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
ceCreatingDirectory:
|
ceCreatingDirectory:
|
||||||
MessageDlg(lisCopyError2,
|
IDEMessageDialog(lisCopyError2,
|
||||||
Format(lisUnableToCreateDirectory, ['"', ErrorData.Param1, '"']),
|
Format(lisUnableToCreateDirectory, ['"', ErrorData.Param1, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
ceCopyFileError:
|
ceCopyFileError:
|
||||||
MessageDlg(lisCopyError2,
|
IDEMessageDialog(lisCopyError2,
|
||||||
Format(lisUnableToCopyFileTo, ['"', ErrorData.Param1, '"', #13, '"',
|
Format(lisUnableToCopyFileTo, ['"', ErrorData.Param1, '"', #13, '"',
|
||||||
ErrorData.Param1, '"']),
|
ErrorData.Param1, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -8776,7 +8778,7 @@ begin
|
|||||||
try
|
try
|
||||||
NewSrcEdit.EditorComponent.FoldState := FoldState;
|
NewSrcEdit.EditorComponent.FoldState := FoldState;
|
||||||
except
|
except
|
||||||
MessageDlg(lisError, lisFailedToLoadFoldStat, mtError, [mbOK], 0);
|
IDEMessageDialog(lisError, lisFailedToLoadFoldStat, mtError, [mbOK]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
NewSrcEdit.EditorComponent.CaretXY:=NewCaretXY;
|
NewSrcEdit.EditorComponent.CaretXY:=NewCaretXY;
|
||||||
@ -9122,9 +9124,9 @@ begin
|
|||||||
// packages
|
// packages
|
||||||
PkgBoss.DoNewPackage;
|
PkgBoss.DoNewPackage;
|
||||||
end else begin
|
end else begin
|
||||||
MessageDlg(ueNotImplCap,
|
IDEMessageDialog(ueNotImplCap,
|
||||||
lisSorryThisTypeIsNotYetImplemented,
|
lisSorryThisTypeIsNotYetImplemented,
|
||||||
mtInformation,[mbOk],0);
|
mtInformation,[mbOk]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -9705,9 +9707,9 @@ begin
|
|||||||
AFileName:=DiskFilename;
|
AFileName:=DiskFilename;
|
||||||
if NewUnitInfo.IsVirtual then begin
|
if NewUnitInfo.IsVirtual then begin
|
||||||
if (not (ofQuiet in Flags)) then begin
|
if (not (ofQuiet in Flags)) then begin
|
||||||
MessageDlg(lisRevertFailed, Format(lisFileIsVirtual, ['"', AFilename,
|
IDEMessageDialog(lisRevertFailed, Format(lisFileIsVirtual, ['"', AFilename,
|
||||||
'"']),
|
'"']),
|
||||||
mtInformation,[mbCancel],0);
|
mtInformation,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
@ -9759,9 +9761,9 @@ begin
|
|||||||
if (ofRevert in Flags) then begin
|
if (ofRevert in Flags) then begin
|
||||||
// revert failed, due to missing file
|
// revert failed, due to missing file
|
||||||
if not (ofQuiet in Flags) then begin
|
if not (ofQuiet in Flags) then begin
|
||||||
MessageDlg(lisRevertFailed, Format(lisPkgMangFileNotFound, ['"',
|
IDEMessageDialog(lisRevertFailed, Format(lisPkgMangFileNotFound, ['"',
|
||||||
AFilename, '"']),
|
AFilename, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
@ -11143,7 +11145,7 @@ begin
|
|||||||
if not FileExistsUTF8(AFilename) then begin
|
if not FileExistsUTF8(AFilename) then begin
|
||||||
ACaption:=lisFileNotFound;
|
ACaption:=lisFileNotFound;
|
||||||
AText:=Format(lisPkgMangFileNotFound, ['"', AFilename, '"']);
|
AText:=Format(lisPkgMangFileNotFound, ['"', AFilename, '"']);
|
||||||
Result:=MessageDlg(ACaption, AText, mtError, [mbAbort], 0);
|
Result:=IDEMessageDialog(ACaption, AText, mtError, [mbAbort]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -11172,7 +11174,7 @@ begin
|
|||||||
ACaption:=lisFileNotText;
|
ACaption:=lisFileNotText;
|
||||||
AText:=Format(lisFileDoesNotLookLikeATextFileOpenItAnyway, ['"', AFilename,
|
AText:=Format(lisFileDoesNotLookLikeATextFileOpenItAnyway, ['"', AFilename,
|
||||||
'"', #13, #13]);
|
'"', #13, #13]);
|
||||||
Result:=MessageDlg(ACaption, AText, mtConfirmation, [mbYes, mbAbort], 0);
|
Result:=IDEMessageDialog(ACaption, AText, mtConfirmation, [mbYes, mbAbort]);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
end;
|
end;
|
||||||
if not FileReadable then begin
|
if not FileReadable then begin
|
||||||
@ -11488,9 +11490,9 @@ end;
|
|||||||
function TMainIDE.DoSaveProjectIfChanged: TModalResult;
|
function TMainIDE.DoSaveProjectIfChanged: TModalResult;
|
||||||
begin
|
begin
|
||||||
if SomethingOfProjectIsModified then begin
|
if SomethingOfProjectIsModified then begin
|
||||||
if MessageDlg(lisProjectChanged, Format(lisSaveChangesToProject,
|
if IDEMessageDialog(lisProjectChanged, Format(lisSaveChangesToProject,
|
||||||
[Project1.GetTitleOrName]),
|
[Project1.GetTitleOrName]),
|
||||||
mtconfirmation, [mbYes, mbNo, mbCancel], 0)=mrYes then
|
mtconfirmation, [mbYes, mbNo, mbCancel])=mrYes then
|
||||||
begin
|
begin
|
||||||
if DoSaveProject([])=mrAbort then begin
|
if DoSaveProject([])=mrAbort then begin
|
||||||
Result:=mrAbort;
|
Result:=mrAbort;
|
||||||
@ -11521,7 +11523,7 @@ begin
|
|||||||
else
|
else
|
||||||
s:=Format(lisTheFile, ['"', ActiveSourceEditor.PageName, '"']);
|
s:=Format(lisTheFile, ['"', ActiveSourceEditor.PageName, '"']);
|
||||||
s:=Format(lisisAlreadyPartOfTheProject, [s]);
|
s:=Format(lisisAlreadyPartOfTheProject, [s]);
|
||||||
MessageDlg(s,mtInformation,[mbOk],0);
|
IDEMessageDialog(lisInformation, s, mtInformation, [mbOk]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if not ActiveUnitInfo.IsVirtual then
|
if not ActiveUnitInfo.IsVirtual then
|
||||||
@ -11531,9 +11533,9 @@ begin
|
|||||||
if (ActiveUnitInfo.Unit_Name<>'')
|
if (ActiveUnitInfo.Unit_Name<>'')
|
||||||
and (Project1.IndexOfUnitWithName(ActiveUnitInfo.Unit_Name,true,ActiveUnitInfo)>=0) then
|
and (Project1.IndexOfUnitWithName(ActiveUnitInfo.Unit_Name,true,ActiveUnitInfo)>=0) then
|
||||||
begin
|
begin
|
||||||
MessageDlg(Format(
|
IDEMessageDialog(lisInformation, Format(
|
||||||
lisUnableToAddToProjectBecauseThereIsAlreadyAUnitWith, [s]),
|
lisUnableToAddToProjectBecauseThereIsAlreadyAUnitWith, [s]),
|
||||||
mtInformation, [mbOk], 0);
|
mtInformation, [mbOk]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -11576,7 +11578,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if MessageDlg(Format(lisAddToProject, [s]), mtConfirmation, [mbYes,mbCancel], 0) in [mrOk,mrYes]
|
if IDEMessageDialog(lisConfirmation, Format(lisAddToProject, [s]),
|
||||||
|
mtConfirmation, [mbYes, mbCancel]) in [mrOk, mrYes]
|
||||||
then begin
|
then begin
|
||||||
DependencyAdded:=false;
|
DependencyAdded:=false;
|
||||||
if FilenameIsPascalUnit(ActiveUnitInfo.Filename) then
|
if FilenameIsPascalUnit(ActiveUnitInfo.Filename) then
|
||||||
@ -11697,7 +11700,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if Project1=nil then Begin
|
if Project1=nil then Begin
|
||||||
MessageDlg(lisCreateAProjectFirst, mterror, [mbok], 0);
|
IDEMessageDialog(lisCCOErrorCaption, lisCreateAProjectFirst, mtError, [mbOK]);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -11731,15 +11734,16 @@ begin
|
|||||||
if (TestDir='')
|
if (TestDir='')
|
||||||
or (not DirPathExists(TestDir)) then begin
|
or (not DirPathExists(TestDir)) then begin
|
||||||
if (TestDir<>'') then begin
|
if (TestDir<>'') then begin
|
||||||
MessageDlg(Format(lisTheTestDirectoryCouldNotBeFoundSeeIDEOpt, [
|
IDEMessageDialog(lisCCOErrorCaption, Format(
|
||||||
|
lisTheTestDirectoryCouldNotBeFoundSeeIDEOpt, [
|
||||||
#13, '"', EnvironmentOptions.TestBuildDirectory, '"', #13]), mtError, [
|
#13, '"', EnvironmentOptions.TestBuildDirectory, '"', #13]), mtError, [
|
||||||
mbCancel], 0);
|
mbCancel]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Result:=MessageDlg(lisBuildNewProject,
|
Result:=IDEMessageDialog(lisBuildNewProject,
|
||||||
Format(lisTheProjectMustBeSavedBeforeBuildingIfYouSetTheTest, [#13, #13,
|
Format(lisTheProjectMustBeSavedBeforeBuildingIfYouSetTheTest, [#13, #13,
|
||||||
#13]), mtInformation, [mbYes, mbNo], 0);
|
#13]), mtInformation, [mbYes, mbNo]);
|
||||||
if Result<>mrYes then exit;
|
if Result<>mrYes then exit;
|
||||||
Result:=DoSaveAll([sfCheckAmbiguousFiles]);
|
Result:=DoSaveAll([sfCheckAmbiguousFiles]);
|
||||||
exit;
|
exit;
|
||||||
@ -11846,10 +11850,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
// reason is not handled
|
// reason is not handled
|
||||||
if Quiet then exit(mrCancel);
|
if Quiet then exit(mrCancel);
|
||||||
Result:=MessageDlg('Nothing to do',
|
Result:=IDEMessageDialog('Nothing to do',
|
||||||
'The project''s compiler options has no compile command.'#13
|
'The project''s compiler options has no compile command.'#13
|
||||||
+'See Project / Compiler Options ... / Compilation',mtInformation,
|
+'See Project / Compiler Options ... / Compilation',mtInformation,
|
||||||
[mbCancel,mbIgnore],0);
|
[mbCancel,mbIgnore]);
|
||||||
if Result=mrIgnore then
|
if Result=mrIgnore then
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
@ -11903,9 +11907,9 @@ begin
|
|||||||
CodeToolBoss.GetFPCVersionForDirectory(
|
CodeToolBoss.GetFPCVersionForDirectory(
|
||||||
ExtractFilePath(Project1.MainFilename),FPCVersion,FPCRelease,FPCPatch);
|
ExtractFilePath(Project1.MainFilename),FPCVersion,FPCRelease,FPCPatch);
|
||||||
if (FPCVersion=2) and (FPCRelease<4) then begin
|
if (FPCVersion=2) and (FPCRelease<4) then begin
|
||||||
MessageDlg(lisFPCTooOld,
|
IDEMessageDialog(lisFPCTooOld,
|
||||||
lisTheProjectUsesTheNewFPCResourcesWhichRequiresAtLea,
|
lisTheProjectUsesTheNewFPCResourcesWhichRequiresAtLea,
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit(mrCancel);
|
exit(mrCancel);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -12160,9 +12164,9 @@ begin
|
|||||||
DebugLn(['TMainIDE.DoInitProjectRun ProgramFilename=',ProgramFilename]);
|
DebugLn(['TMainIDE.DoInitProjectRun ProgramFilename=',ProgramFilename]);
|
||||||
if not FileExistsUTF8(ProgramFilename)
|
if not FileExistsUTF8(ProgramFilename)
|
||||||
then begin
|
then begin
|
||||||
MessageDlg(lisFileNotFound,
|
IDEMessageDialog(lisFileNotFound,
|
||||||
Format(lisNoProgramFileSFound, ['"', ProgramFilename, '"']),
|
Format(lisNoProgramFileSFound, ['"', ProgramFilename, '"']),
|
||||||
mtError,[mbCancel], 0);
|
mtError,[mbCancel]);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -12459,9 +12463,9 @@ var
|
|||||||
ProfileChanged: Boolean;
|
ProfileChanged: Boolean;
|
||||||
begin
|
begin
|
||||||
if ToolStatus<>itNone then begin
|
if ToolStatus<>itNone then begin
|
||||||
MessageDlg(lisNotNow,
|
IDEMessageDialog(lisNotNow,
|
||||||
lisYouCanNotBuildLazarusWhileDebuggingOrCompiling,
|
lisYouCanNotBuildLazarusWhileDebuggingOrCompiling,
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -12953,9 +12957,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
if not Quiet then
|
if not Quiet then
|
||||||
begin
|
begin
|
||||||
MessageDlg(lisNoLFMFile,
|
IDEMessageDialog(lisNoLFMFile,
|
||||||
lisThisFunctionNeedsAnOpenLfmFileInTheSourceEditor,
|
lisThisFunctionNeedsAnOpenLfmFileInTheSourceEditor,
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
@ -12969,10 +12973,10 @@ begin
|
|||||||
UnitFilename:='';
|
UnitFilename:='';
|
||||||
end;
|
end;
|
||||||
if UnitFilename='' then begin
|
if UnitFilename='' then begin
|
||||||
MessageDlg(lisNoPascalFile,
|
IDEMessageDialog(lisNoPascalFile,
|
||||||
Format(lisUnableToFindPascalUnitPasPpForLfmFile, [#13, '"',
|
Format(lisUnableToFindPascalUnitPasPpForLfmFile, [#13, '"',
|
||||||
LFMUnitInfo.Filename, '"']),
|
LFMUnitInfo.Filename, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -13448,9 +13452,9 @@ var
|
|||||||
|
|
||||||
procedure ShowErrorForCommandAfter;
|
procedure ShowErrorForCommandAfter;
|
||||||
begin
|
begin
|
||||||
MessageDlg(lisInvalidCommand,
|
IDEMessageDialog(lisInvalidCommand,
|
||||||
Format(lisTheCommandAfterIsNotExecutable, ['"', CmdAfterExe, '"']),
|
Format(lisTheCommandAfterIsNotExecutable, ['"', CmdAfterExe, '"']),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -13461,19 +13465,19 @@ begin
|
|||||||
DestDir:=TrimAndExpandDirectory(DestDirectory);
|
DestDir:=TrimAndExpandDirectory(DestDirectory);
|
||||||
SrcDir:=TrimAndExpandDirectory(SrcDirectory);
|
SrcDir:=TrimAndExpandDirectory(SrcDirectory);
|
||||||
if (DestDir='') then begin
|
if (DestDir='') then begin
|
||||||
MessageDlg('Invalid publishing Directory',
|
IDEMessageDialog('Invalid publishing Directory',
|
||||||
'Destination directory for publishing is empty.',mtError,
|
'Destination directory for publishing is empty.',mtError,
|
||||||
[mbCancel],0);
|
[mbCancel]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
//DebugLn('TMainIDE.DoPublishModule A SrcDir="',SrcDir,'" DestDir="',DestDir,'"');
|
//DebugLn('TMainIDE.DoPublishModule A SrcDir="',SrcDir,'" DestDir="',DestDir,'"');
|
||||||
if CompareFilenames(SrcDir,DestDir)=0
|
if CompareFilenames(SrcDir,DestDir)=0
|
||||||
then begin
|
then begin
|
||||||
MessageDlg(lisInvalidPublishingDirectory,
|
IDEMessageDialog(lisInvalidPublishingDirectory,
|
||||||
Format(lisSourceDirectoryAndDestinationDirectoryAreTheSameMa, ['"',
|
Format(lisSourceDirectoryAndDestinationDirectoryAreTheSameMa, ['"',
|
||||||
SrcDir, '"', #13, '"', DestDir, '"', #13, #13, #13, #13, #13]),
|
SrcDir, '"', #13, '"', DestDir, '"', #13, #13, #13, #13, #13]),
|
||||||
mtError, [mbCancel], 0);
|
mtError, [mbCancel]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -13499,9 +13503,9 @@ begin
|
|||||||
CmdAfterExe:=TempCmd;
|
CmdAfterExe:=TempCmd;
|
||||||
end;
|
end;
|
||||||
if not FileIsExecutableCached(CmdAfterExe) then begin
|
if not FileIsExecutableCached(CmdAfterExe) then begin
|
||||||
MessageDlg(lisCommandAfterInvalid,
|
IDEMessageDialog(lisCommandAfterInvalid,
|
||||||
Format(lisTheCommandAfterPublishingIsInvalid, [#13, '"', CmdAfterExe,
|
Format(lisTheCommandAfterPublishingIsInvalid, [#13, '"', CmdAfterExe,
|
||||||
'"']), mtError, [mbCancel], 0);
|
'"']), mtError, [mbCancel]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -13510,18 +13514,18 @@ begin
|
|||||||
// clear destination directory
|
// clear destination directory
|
||||||
if DirPathExists(DestDir) then begin
|
if DirPathExists(DestDir) then begin
|
||||||
// ask user, if destination can be delete
|
// ask user, if destination can be delete
|
||||||
if MessageDlg(lisClearDirectory,
|
if IDEMessageDialog(lisClearDirectory,
|
||||||
Format(lisInOrderToCreateACleanCopyOfTheProjectPackageAllFil, [#13, #13,
|
Format(lisInOrderToCreateACleanCopyOfTheProjectPackageAllFil, [#13, #13,
|
||||||
'"', DestDir, '"']), mtConfirmation,
|
'"', DestDir, '"']), mtConfirmation,
|
||||||
[mbYes,mbNo],0)<>mrYes
|
[mbYes,mbNo])<>mrYes
|
||||||
then
|
then
|
||||||
exit(mrCancel);
|
exit(mrCancel);
|
||||||
|
|
||||||
if (not DeleteDirectory(ChompPathDelim(DestDir),true)) then begin
|
if (not DeleteDirectory(ChompPathDelim(DestDir),true)) then begin
|
||||||
MessageDlg(lisUnableToCleanUpDestinationDirectory,
|
IDEMessageDialog(lisUnableToCleanUpDestinationDirectory,
|
||||||
Format(lisUnableToCleanUpPleaseCheckPermissions, ['"', DestDir, '"', #13]
|
Format(lisUnableToCleanUpPleaseCheckPermissions, ['"', DestDir, '"', #13]
|
||||||
),
|
),
|
||||||
mtError,[mbOk],0);
|
mtError,[mbOk]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -13912,13 +13916,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
if FilenameIsAbsolute(Filename) then begin
|
if FilenameIsAbsolute(Filename) then begin
|
||||||
MessageDlg(Format(lisUnableToFindFile, ['"', Filename, '"']),
|
IDEMessageDialog(lisInformation, Format(lisUnableToFindFile, ['"',
|
||||||
mtInformation,[mbOk],0)
|
Filename, '"']), mtInformation,[mbOk])
|
||||||
end else if Filename<>'' then begin
|
end else if Filename<>'' then begin
|
||||||
MessageDlg(Format(
|
IDEMessageDialog(lisInformation, Format(
|
||||||
lisUnableToFindFileCheckSearchPathInProjectCompilerOption, ['"',
|
lisUnableToFindFileCheckSearchPathInProjectCompilerOption, ['"',
|
||||||
Filename, '"', #13, #13]),
|
Filename, '"', #13, #13]),
|
||||||
mtInformation,[mbOk],0);
|
mtInformation,[mbOk]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -14024,13 +14028,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end else if AFilename<>'' then begin
|
end else if AFilename<>'' then begin
|
||||||
if FilenameIsAbsolute(AFilename) then begin
|
if FilenameIsAbsolute(AFilename) then begin
|
||||||
MessageDlg(Format(lisUnableToFindFile, ['"', AFilename, '"']),
|
IDEMessageDialog(lisInformation, Format(lisUnableToFindFile, ['"',
|
||||||
mtInformation,[mbOk],0)
|
AFilename, '"']), mtInformation,[mbOk]);
|
||||||
end else if AFileName<>'' then begin
|
end else if AFileName<>'' then begin
|
||||||
MessageDlg(Format(
|
IDEMessageDialog(lisInformation, Format(
|
||||||
lisUnableToFindFileCheckSearchPathInProjectCompilerOption, ['"',
|
lisUnableToFindFileCheckSearchPathInProjectCompilerOption, ['"',
|
||||||
AFilename, '"', #13, #13]),
|
AFilename, '"', #13, #13]),
|
||||||
mtInformation,[mbOk],0);
|
mtInformation,[mbOk]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;//if
|
end;//if
|
||||||
@ -14487,19 +14491,19 @@ begin
|
|||||||
// check if component class is registered
|
// check if component class is registered
|
||||||
ARegComp:=IDEComponentPalette.FindComponent(NewClassName);
|
ARegComp:=IDEComponentPalette.FindComponent(NewClassName);
|
||||||
if ARegComp=nil then begin
|
if ARegComp=nil then begin
|
||||||
MessageDlg(lisClassNotFound,
|
IDEMessageDialog(lisClassNotFound,
|
||||||
Format(lisClassIsNotARegisteredComponentClassUnableToPaste, ['"',
|
Format(lisClassIsNotARegisteredComponentClassUnableToPaste, ['"',
|
||||||
NewClassName, '"', #13]),
|
NewClassName, '"', #13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// check if there is a valid parent
|
// check if there is a valid parent
|
||||||
if (ParentControl=nil) and ARegComp.IsTControl then begin
|
if (ParentControl=nil) and ARegComp.IsTControl then begin
|
||||||
MessageDlg(lisControlNeedsParent,
|
IDEMessageDialog(lisControlNeedsParent,
|
||||||
Format(lisTheClassIsATControlAndCanNotBePastedOntoANonContro, ['"',
|
Format(lisTheClassIsATControlAndCanNotBePastedOntoANonContro, ['"',
|
||||||
NewClassName, '"', #13]),
|
NewClassName, '"', #13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -14510,10 +14514,10 @@ begin
|
|||||||
LRSObjectTextToBinary(TxtCompStream,BinCompStream);
|
LRSObjectTextToBinary(TxtCompStream,BinCompStream);
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
MessageDlg(lisConversionError,
|
IDEMessageDialog(lisConversionError,
|
||||||
Format(lisUnableToConvertComponentTextIntoBinaryFormat, [#13,
|
Format(lisUnableToConvertComponentTextIntoBinaryFormat, [#13,
|
||||||
E.Message]),
|
E.Message]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -15950,7 +15954,7 @@ begin
|
|||||||
NewSource, NewX, NewY, NewTopLine, [jfAddJumpPoint, jfFocusEditor]);
|
NewSource, NewX, NewY, NewTopLine, [jfAddJumpPoint, jfFocusEditor]);
|
||||||
end else begin
|
end else begin
|
||||||
if CodeToolBoss.ErrorMessage='' then begin
|
if CodeToolBoss.ErrorMessage='' then begin
|
||||||
MessageDlg(lisSuccess, lisAllBlocksLooksOk, mtInformation, [mbOk], 0);
|
IDEMessageDialog(lisSuccess, lisAllBlocksLooksOk, mtInformation, [mbOk]);
|
||||||
end else
|
end else
|
||||||
DoJumpToCodeToolBossError;
|
DoJumpToCodeToolBossError;
|
||||||
end;
|
end;
|
||||||
@ -16057,9 +16061,9 @@ begin
|
|||||||
|
|
||||||
// the codetools have calculated the maximum bounds
|
// the codetools have calculated the maximum bounds
|
||||||
if (StartCode=EndCode) and (CompareCaret(StartPos,EndPos)=0) then begin
|
if (StartCode=EndCode) and (CompareCaret(StartPos,EndPos)=0) then begin
|
||||||
MessageDlg(lisNoStringConstantFound,
|
IDEMessageDialog(lisNoStringConstantFound,
|
||||||
Format(lisHintTheMakeResourcestringFunctionExpectsAStringCon, [#13]),
|
Format(lisHintTheMakeResourcestringFunctionExpectsAStringCon, [#13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
// the user can shorten this range by selecting text
|
// the user can shorten this range by selecting text
|
||||||
@ -16071,9 +16075,9 @@ begin
|
|||||||
if (StartCode<>ActiveUnitInfo.Source)
|
if (StartCode<>ActiveUnitInfo.Source)
|
||||||
or (EndCode<>ActiveUnitInfo.Source)
|
or (EndCode<>ActiveUnitInfo.Source)
|
||||||
then begin
|
then begin
|
||||||
MessageDlg(lisNoStringConstantFound, Format(
|
IDEMessageDialog(lisNoStringConstantFound, Format(
|
||||||
lisInvalidExpressionHintTheMakeResourcestringFunction, [#13]),
|
lisInvalidExpressionHintTheMakeResourcestringFunction, [#13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
@ -16091,9 +16095,9 @@ begin
|
|||||||
if (CompareCaret(SelectedStartPos,StartPos)>0)
|
if (CompareCaret(SelectedStartPos,StartPos)>0)
|
||||||
or (CompareCaret(SelectedEndPos,EndPos)<0)
|
or (CompareCaret(SelectedEndPos,EndPos)<0)
|
||||||
then begin
|
then begin
|
||||||
MessageDlg(lisSelectionExceedsStringConstant,
|
IDEMessageDialog(lisSelectionExceedsStringConstant,
|
||||||
Format(lisHintTheMakeResourcestringFunctionExpectsAStringCon2, [#13]),
|
Format(lisHintTheMakeResourcestringFunctionExpectsAStringCon2, [#13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
StartPos:=SelectedStartPos;
|
StartPos:=SelectedStartPos;
|
||||||
@ -16109,9 +16113,9 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if CodeToolBoss.Positions.Count=0 then begin
|
if CodeToolBoss.Positions.Count=0 then begin
|
||||||
MessageDlg(lisNoResourceStringSectionFound,
|
IDEMessageDialog(lisNoResourceStringSectionFound,
|
||||||
lisUnableToFindAResourceStringSectionInThisOrAnyOfThe,
|
lisUnableToFindAResourceStringSectionInThisOrAnyOfThe,
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -17085,7 +17089,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
MessageDlg('Error',E.Message,mtError,[mbCancel],0);
|
IDEMessageDialog('Error',E.Message,mtError,[mbCancel]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -17710,10 +17714,10 @@ begin
|
|||||||
ShortDir:=CurDirectory;
|
ShortDir:=CurDirectory;
|
||||||
if (not Project1.IsVirtual) then
|
if (not Project1.IsVirtual) then
|
||||||
ShortDir:=CreateRelativePath(ShortDir,Project1.ProjectDirectory);
|
ShortDir:=CreateRelativePath(ShortDir,Project1.ProjectDirectory);
|
||||||
if MessageDlg(lisAddToUnitSearchPath,
|
if IDEMessageDialog(lisAddToUnitSearchPath,
|
||||||
Format(lisTheNewUnitIsNotYetInTheUnitSearchPathAddDirectory, [
|
Format(lisTheNewUnitIsNotYetInTheUnitSearchPathAddDirectory, [
|
||||||
#13, CurDirectory]),
|
#13, CurDirectory]),
|
||||||
mtConfirmation,[mbYes,mbNo],0)=mrYes
|
mtConfirmation,[mbYes,mbNo])=mrYes
|
||||||
then begin
|
then begin
|
||||||
Project1.CompilerOptions.OtherUnitFiles:=
|
Project1.CompilerOptions.OtherUnitFiles:=
|
||||||
MergeSearchPaths(Project1.CompilerOptions.OtherUnitFiles,ShortDir);
|
MergeSearchPaths(Project1.CompilerOptions.OtherUnitFiles,ShortDir);
|
||||||
@ -17763,10 +17767,10 @@ begin
|
|||||||
ShortDir:=CurDirectory;
|
ShortDir:=CurDirectory;
|
||||||
if (not Project1.IsVirtual) then
|
if (not Project1.IsVirtual) then
|
||||||
ShortDir:=CreateRelativePath(ShortDir,Project1.ProjectDirectory);
|
ShortDir:=CreateRelativePath(ShortDir,Project1.ProjectDirectory);
|
||||||
if MessageDlg(lisAddToIncludeSearchPath,
|
if IDEMessageDialog(lisAddToIncludeSearchPath,
|
||||||
Format(lisTheNewIncludeFileIsNotYetInTheIncludeSearchPathAdd, [#13,
|
Format(lisTheNewIncludeFileIsNotYetInTheIncludeSearchPathAdd, [#13,
|
||||||
CurDirectory]),
|
CurDirectory]),
|
||||||
mtConfirmation,[mbYes,mbNo],0)=mrYes
|
mtConfirmation,[mbYes,mbNo])=mrYes
|
||||||
then begin
|
then begin
|
||||||
Project1.CompilerOptions.IncludePath:=
|
Project1.CompilerOptions.IncludePath:=
|
||||||
MergeSearchPaths(Project1.CompilerOptions.IncludePath,ShortDir);
|
MergeSearchPaths(Project1.CompilerOptions.IncludePath,ShortDir);
|
||||||
@ -18314,10 +18318,10 @@ begin
|
|||||||
Result:=false;
|
Result:=false;
|
||||||
if (not (AParent is TControl))
|
if (not (AParent is TControl))
|
||||||
and (APersistentClass.InheritsFrom(TControl)) then begin
|
and (APersistentClass.InheritsFrom(TControl)) then begin
|
||||||
MessageDlg(lisCodeToolsDefsInvalidParent,
|
IDEMessageDialog(lisCodeToolsDefsInvalidParent,
|
||||||
Format(lisACanNotHoldTControlsYouCanOnlyPutNonVisualComponen, [
|
Format(lisACanNotHoldTControlsYouCanOnlyPutNonVisualComponen, [
|
||||||
AParent.ClassName, #13]),
|
AParent.ClassName, #13]),
|
||||||
mtError,[mbCancel],0);
|
mtError,[mbCancel]);
|
||||||
UpdateIDEComponentPalette;
|
UpdateIDEComponentPalette;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -60,7 +60,7 @@ uses
|
|||||||
LazarusIDEStrConsts, CompilerOptions,
|
LazarusIDEStrConsts, CompilerOptions,
|
||||||
TransferMacros, EditorOptions, IDEProcs, RunParamsOpts, ProjectDefs,
|
TransferMacros, EditorOptions, IDEProcs, RunParamsOpts, ProjectDefs,
|
||||||
FileReferenceList, EditDefineTree, PackageDefs, PackageSystem, IDEOptionsIntf,
|
FileReferenceList, EditDefineTree, PackageDefs, PackageSystem, IDEOptionsIntf,
|
||||||
SrcEditorIntf, SynEdit;
|
SrcEditorIntf, IDEDialogs, SynEdit;
|
||||||
|
|
||||||
type
|
type
|
||||||
TUnitInfo = class;
|
TUnitInfo = class;
|
||||||
@ -2834,10 +2834,10 @@ begin
|
|||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
DebugLn('Error: ', E.Message);
|
DebugLn('Error: ', E.Message);
|
||||||
MessageDlg(lisCodeToolsDefsWriteError,
|
IDEMessageDialog(lisCodeToolsDefsWriteError,
|
||||||
Format(lisUnableToWriteTheProjectInfoFileError, [#13, '"',
|
Format(lisUnableToWriteTheProjectInfoFileError, [#13, '"',
|
||||||
ProjectInfoFile, '"', #13, E.Message])
|
ProjectInfoFile, '"', #13, E.Message])
|
||||||
,mtError,[mbOk],0);
|
,mtError,[mbOk]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -2920,9 +2920,9 @@ begin
|
|||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
Result:=MessageDlg(lisCodeToolsDefsWriteError, Format(
|
Result:=IDEMessageDialog(lisCodeToolsDefsWriteError, Format(
|
||||||
lisUnableToWriteToFile, ['"', CfgFilename, '"']),
|
lisUnableToWriteToFile, ['"', CfgFilename, '"']),
|
||||||
mtError,[mbRetry,mbAbort],0);
|
mtError,[mbRetry,mbAbort]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if CompareFilenames(ProjectInfoFile,xmlconfig.Filename)=0 then begin
|
if CompareFilenames(ProjectInfoFile,xmlconfig.Filename)=0 then begin
|
||||||
@ -2959,10 +2959,10 @@ begin
|
|||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
DebugLn('ERROR: ',E.Message);
|
DebugLn('ERROR: ',E.Message);
|
||||||
MessageDlg(lisCodeToolsDefsWriteError,
|
IDEMessageDialog(lisCodeToolsDefsWriteError,
|
||||||
Format(lisUnableToWriteTheProjectSessionFileError, [#13,
|
Format(lisUnableToWriteTheProjectSessionFileError, [#13,
|
||||||
ProjectSessionFile, #13, E.Message])
|
ProjectSessionFile, #13, E.Message])
|
||||||
,mtError,[mbOk],0);
|
,mtError,[mbOk]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -2993,9 +2993,9 @@ begin
|
|||||||
SessionSaveResult:=mrOk;
|
SessionSaveResult:=mrOk;
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
SessionSaveResult:=MessageDlg(lisCodeToolsDefsWriteError,
|
SessionSaveResult:=IDEMessageDialog(lisCodeToolsDefsWriteError,
|
||||||
Format(lisUnableToWriteToFile2, [CurSessionFilename]),
|
Format(lisUnableToWriteToFile2, [CurSessionFilename]),
|
||||||
mtError,[mbRetry,mbAbort],0);
|
mtError,[mbRetry,mbAbort]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
@ -3346,10 +3346,10 @@ begin
|
|||||||
xmlconfig := TCodeBufXMLConfig.CreateWithCache(NewProjectInfoFile,true)
|
xmlconfig := TCodeBufXMLConfig.CreateWithCache(NewProjectInfoFile,true)
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
MessageDlg(lisUnableToReadLpi,
|
IDEMessageDialog(lisUnableToReadLpi,
|
||||||
Format(lisUnableToReadTheProjectInfoFile, [#13, '"',NewProjectInfoFile, '"'])+#13
|
Format(lisUnableToReadTheProjectInfoFile, [#13, '"',NewProjectInfoFile, '"'])+#13
|
||||||
+E.Message
|
+E.Message
|
||||||
,mtError,[mbOk],0);
|
,mtError,[mbOk]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -3373,10 +3373,10 @@ begin
|
|||||||
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject B done lpi');{$ENDIF}
|
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject B done lpi');{$ENDIF}
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
MessageDlg(lisUnableToReadLpi,
|
IDEMessageDialog(lisUnableToReadLpi,
|
||||||
Format(lisUnableToReadTheProjectInfoFile, [#13, '"',ProjectInfoFile, '"'])+#13
|
Format(lisUnableToReadTheProjectInfoFile, [#13, '"',ProjectInfoFile, '"'])+#13
|
||||||
+E.Message
|
+E.Message
|
||||||
,mtError,[mbOk],0);
|
,mtError,[mbOk]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -3399,9 +3399,9 @@ begin
|
|||||||
if (Fileversion=0) and (not LoadParts)
|
if (Fileversion=0) and (not LoadParts)
|
||||||
and (xmlconfig.GetValue(Path+'Units/Count',0)=0) then
|
and (xmlconfig.GetValue(Path+'Units/Count',0)=0) then
|
||||||
begin
|
begin
|
||||||
if MessageDlg(lisStrangeLpiFile,
|
if IDEMessageDialog(lisStrangeLpiFile,
|
||||||
Format(lisTheFileDoesNotLookLikeALpiFile, [ProjectInfoFile]),
|
Format(lisTheFileDoesNotLookLikeALpiFile, [ProjectInfoFile]),
|
||||||
mtConfirmation,[mbIgnore,mbAbort],0)<>mrIgnore then exit;
|
mtConfirmation,[mbIgnore,mbAbort])<>mrIgnore then exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not LoadParts then begin
|
if not LoadParts then begin
|
||||||
@ -3526,9 +3526,10 @@ begin
|
|||||||
OnLoadProjectInfo(Self,XMLConfig,true);
|
OnLoadProjectInfo(Self,XMLConfig,true);
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
MessageDlg(Format(lisUnableToReadTheProjectInfoFile2, [#13, '"',
|
IDEMessageDialog(lisCCOErrorCaption, Format(
|
||||||
|
lisUnableToReadTheProjectInfoFile2, [#13, '"',
|
||||||
ProjectInfoFile, '"'])
|
ProjectInfoFile, '"'])
|
||||||
,mtError,[mbOk],0);
|
,mtError,[mbOk]);
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -5000,10 +5001,10 @@ begin
|
|||||||
if IgnoreErrors then begin
|
if IgnoreErrors then begin
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end else begin
|
end else begin
|
||||||
Result:=MessageDlg(lisPkgMangErrorReadingFile,
|
Result:=IDEMessageDialog(lisPkgMangErrorReadingFile,
|
||||||
Format(lisProjMangUnableToReadStateFileOfProjectError, [StateFile,
|
Format(lisProjMangUnableToReadStateFileOfProjectError, [StateFile,
|
||||||
IDAsString, #13, E.Message]),
|
IDAsString, #13, E.Message]),
|
||||||
mtError,[mbAbort],0);
|
mtError,[mbAbort]);
|
||||||
end;
|
end;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -5042,10 +5043,10 @@ begin
|
|||||||
StateFlags:=StateFlags+[lpsfStateFileLoaded];
|
StateFlags:=StateFlags+[lpsfStateFileLoaded];
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
Result:=MessageDlg(lisPkgMangErrorWritingFile,
|
Result:=IDEMessageDialog(lisPkgMangErrorWritingFile,
|
||||||
Format(lisProjMangUnableToWriteStateFileForProjectError, [IDAsString,
|
Format(lisProjMangUnableToWriteStateFileForProjectError, [IDAsString,
|
||||||
#13, E.Message]),
|
#13, E.Message]),
|
||||||
mtError,[mbAbort,mbCancel],0);
|
mtError,[mbAbort,mbCancel]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -48,8 +48,8 @@ uses
|
|||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, LCLProc, Controls, Forms, Buttons, StdCtrls, ComCtrls,
|
Classes, SysUtils, LCLProc, Controls, Forms, Buttons, StdCtrls, ComCtrls,
|
||||||
Dialogs, ExtCtrls, BaseIDEIntf, IDEHelpIntf, ProjectIntf, IDEProcs,
|
Dialogs, ExtCtrls, BaseIDEIntf, IDEHelpIntf, ProjectIntf, IDEDialogs,
|
||||||
SysVarUserOverrideDlg, InputHistory, LazarusIDEStrConsts, FileUtil,
|
IDEProcs, SysVarUserOverrideDlg, InputHistory, LazarusIDEStrConsts, FileUtil,
|
||||||
Laz2_XMLCfg, ButtonPanel;
|
Laz2_XMLCfg, ButtonPanel;
|
||||||
|
|
||||||
{ The xml format version:
|
{ The xml format version:
|
||||||
@ -471,9 +471,9 @@ begin
|
|||||||
if OpenDialog.Execute then
|
if OpenDialog.Execute then
|
||||||
begin
|
begin
|
||||||
if (FileIsExecutable(OpenDialog.Filename)) or
|
if (FileIsExecutable(OpenDialog.Filename)) or
|
||||||
(MessageDlg(lisRunParamsFileNotExecutable,
|
(IDEMessageDialog(lisRunParamsFileNotExecutable,
|
||||||
Format(lisRunParamsTheHostApplicationIsNotExecutable,
|
Format(lisRunParamsTheHostApplicationIsNotExecutable,
|
||||||
['"', OpenDialog.Filename, '"']), mtWarning, [mbCancel, mbIgnore], 0) =
|
['"', OpenDialog.Filename, '"']), mtWarning, [mbCancel, mbIgnore]) =
|
||||||
mrIgnore) then
|
mrIgnore) then
|
||||||
begin
|
begin
|
||||||
HostApplicationEdit.Text := OpenDialog.Filename;
|
HostApplicationEdit.Text := OpenDialog.Filename;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user