BuildIntf: Rename LazMessageDialog as LazMessageWorker to avoid name clash and to be more accurate. Same for LazQuestionDialog.

git-svn-id: trunk@63997 -
This commit is contained in:
juha 2020-10-13 11:27:28 +00:00
parent 39b5106525
commit f6ffe865a0
9 changed files with 31 additions and 30 deletions

2
.gitattributes vendored
View File

@ -573,7 +573,7 @@ components/buildintf/languages/buildstrconsts.pot svneol=native#text/plain
components/buildintf/languages/buildstrconsts.pt_BR.po svneol=native#text/plain
components/buildintf/languages/buildstrconsts.ru.po svneol=native#text/plain
components/buildintf/languages/buildstrconsts.uk.po svneol=native#text/plain
components/buildintf/lazmsgdialogs.pas svneol=native#text/pascal
components/buildintf/lazmsgworker.pas svneol=native#text/pascal
components/buildintf/macrodefintf.pas svneol=native#text/plain
components/buildintf/macrointf.pas svneol=native#text/pascal
components/buildintf/newitemintf.pas svneol=native#text/pascal

View File

@ -42,8 +42,8 @@
<UnitName Value="IDEOptionsIntf"/>
</Item>
<Item>
<Filename Value="lazmsgdialogs.pas"/>
<UnitName Value="LazMsgDialogs"/>
<Filename Value="lazmsgworker.pas"/>
<UnitName Value="LazMsgWorker"/>
</Item>
<Item>
<Filename Value="macrodefintf.pas"/>

View File

@ -9,7 +9,7 @@ interface
uses
BaseIDEIntf, BuildStrConsts, CompOptsIntf, FppkgIntf, IDEExternToolIntf,
IDEOptionsIntf, LazMsgDialogs, MacroDefIntf, MacroIntf, NewItemIntf,
IDEOptionsIntf, LazMsgWorker, MacroDefIntf, MacroIntf, NewItemIntf,
PackageDependencyIntf, PackageIntf, PackageLinkIntf, ProjectIntf,
ProjectResourcesIntf, ProjPackIntf, LazarusPackageIntf;

View File

@ -47,7 +47,7 @@ begin
t.Dependencies.AddUnit('fppkgintf');
t.Dependencies.AddUnit('ideexterntoolintf');
t.Dependencies.AddUnit('ideoptionsintf');
t.Dependencies.AddUnit('lazmsgdialogs');
t.Dependencies.AddUnit('lazmsgworker');
t.Dependencies.AddUnit('macrodefintf');
t.Dependencies.AddUnit('macrointf');
t.Dependencies.AddUnit('newitemintf');
@ -64,7 +64,7 @@ begin
T:=P.Targets.AddUnit('fppkgintf.pas');
T:=P.Targets.AddUnit('ideexterntoolintf.pas');
T:=P.Targets.AddUnit('ideoptionsintf.pas');
T:=P.Targets.AddUnit('lazmsgdialogs.pas');
T:=P.Targets.AddUnit('lazmsgworker.pas');
T:=P.Targets.AddUnit('macrodefintf.pas');
T:=P.Targets.AddUnit('macrointf.pas');
T:=P.Targets.AddUnit('newitemintf.pas');

View File

@ -1,4 +1,4 @@
unit LazMsgDialogs;
unit LazMsgWorker;
{$mode objfpc}{$H+}
@ -9,16 +9,16 @@ uses
UITypes;
type
TLazMessageDialog = function(const aCaption, aMsg: string;
TLazMessageWorker = function(const aCaption, aMsg: string;
DlgType: TMsgDlgType; Buttons: TMsgDlgButtons;
const HelpKeyword: string = ''): Integer of object;
TLazQuestionDialog = function(const aCaption, aMsg: string;
TLazQuestionWorker = function(const aCaption, aMsg: string;
DlgType: TMsgDlgType; Buttons: array of const;
const HelpKeyword: string = ''): Integer of object;
var // set by the IDE
LazMessageDialog: TLazMessageDialog = nil;
LazQuestionDialog: TLazQuestionDialog = nil;
LazMessageWorker: TLazMessageWorker = nil;
LazQuestionWorker: TLazQuestionWorker = nil;
implementation

View File

@ -23,7 +23,7 @@ uses
// LazUtils
UITypes, LazFileCache,
// BuildIntf
LazMsgDialogs;
LazMsgWorker;
type
@ -59,11 +59,11 @@ var // set by the IDE
// Wrapper function for LazIDESelectDirectory with a default parameter.
function LazSelectDirectory(const Title: string; const InitialDir: string = ''): string;
// Wrapper function for LazMessageDialog in LazMsgDialogs.
// Wrapper function for LazMessageWorker in LazMsgWorker.
function IDEMessageDialog(const aCaption, aMsg: string;
DlgType: TMsgDlgType; Buttons: TMsgDlgButtons;
const HelpKeyword: string = ''): Integer;
// Wrapper function for LazQuestionDialog in LazMsgDialogs.
// Wrapper function for LazQuestionWorker in LazMsgWorker.
function IDEQuestionDialog(const aCaption, aMsg: string;
DlgType: TMsgDlgType; Buttons: array of const;
const HelpKeyword: string = ''): Integer;
@ -121,14 +121,14 @@ function IDEMessageDialog(const aCaption, aMsg: string;
DlgType: TMsgDlgType; Buttons: TMsgDlgButtons;
const HelpKeyword: string = ''): Integer;
begin
Result := LazMessageDialog(aCaption, aMsg, DlgType, Buttons, HelpKeyword);
Result := LazMessageWorker(aCaption, aMsg, DlgType, Buttons, HelpKeyword);
end;
function IDEQuestionDialog(const aCaption, aMsg: string;
DlgType: TMsgDlgType; Buttons: array of const;
const HelpKeyword: string = ''): Integer;
begin
Result := LazQuestionDialog(aCaption, aMsg, DlgType, Buttons, HelpKeyword);
Result := LazQuestionWorker(aCaption, aMsg, DlgType, Buttons, HelpKeyword);
end;
function IDEMessageDialogAb(const aCaption, aMsg: string; DlgType: TMsgDlgType;

View File

@ -39,8 +39,8 @@ uses
// LazUtils
FileUtil, LazFileUtils, LazUtilities, LazLoggerBase, UTF8Process, LazUTF8,
UITypes, AvgLvlTree,
// IDEIntf
IDEExternToolIntf, BaseIDEIntf, MacroIntf, LazMsgDialogs,
// BuildIntf
IDEExternToolIntf, BaseIDEIntf, MacroIntf, LazMsgWorker,
// IDE
IDECmdLine, TransferMacros, LazarusIDEStrConsts;
@ -930,7 +930,7 @@ function TExternalTool.ResolveMacros: boolean;
if Result then exit;
if ErrorMessage='' then
ErrorMessage:=Format(lisInvalidMacrosIn, [aValue]);
LazMessageDialog(lisCCOErrorCaption, Format(lisInvalidMacrosInExternalTool,
LazMessageWorker(lisCCOErrorCaption, Format(lisInvalidMacrosInExternalTool,
[aValue, Title]),
mtError,[mbCancel]);
end;

View File

@ -37,8 +37,8 @@ uses
LCLPlatformDef, Forms,
// Codetools
CodeCache, CodeToolManager, DefineTemplates, FileProcs,
// IDEIntf
BaseIDEIntf, MacroIntf, PackageIntf, LazMsgDialogs, ProjectIntf, IDEExternToolIntf,
// BuildIntf
BaseIDEIntf, MacroIntf, PackageIntf, LazMsgWorker, ProjectIntf, IDEExternToolIntf,
CompOptsIntf, IDEOptionsIntf, PackageDependencyIntf,
// IDE
InitialSetupProc, ExtToolsConsole, CompilerOptions,
@ -1263,8 +1263,8 @@ end;
procedure TLazBuildApplication.SetupDialogs;
begin
LazMessageDialog:=@OnIDEMessageDialog;
LazQuestionDialog:=@OnIDEQuestionDialog;
LazMessageWorker:=@OnIDEMessageDialog;
LazQuestionWorker:=@OnIDEQuestionDialog;
end;
procedure TLazBuildApplication.StoreBaseSettings;

View File

@ -76,13 +76,14 @@ uses
LCLExceptionStacktrace,
// SynEdit
SynEdit, AllSynEdit, SynEditKeyCmds, SynEditMarks, SynEditHighlighter,
// BuildIntf
BaseIDEIntf, MacroIntf, NewItemIntf, IDEExternToolIntf, LazMsgWorker,
PackageIntf, ProjectIntf, CompOptsIntf, IDEOptionsIntf,
// IDE interface
IDEIntf, ObjectInspector, PropEdits, PropEditUtils, EditorSyntaxHighlighterDef,
MacroIntf, IDECommands, IDEWindowIntf, ComponentReg, IDEDialogs,
SrcEditorIntf, NewItemIntf, IDEExternToolIntf, IDEMsgIntf, LazMsgDialogs,
PackageIntf, ProjectIntf, CompOptsIntf, MenuIntf, BaseIDEIntf, LazIDEIntf,
IDEOptionsIntf, IDEOptEditorIntf, IDEImagesIntf, ComponentEditors, ToolBarIntf,
SelEdits,
IDECommands, IDEWindowIntf, ComponentReg, IDEDialogs, SrcEditorIntf, IDEMsgIntf,
MenuIntf, LazIDEIntf, IDEOptEditorIntf, IDEImagesIntf, ComponentEditors,
ToolBarIntf, SelEdits,
// protocol
IDEProtocol,
// compile
@ -2130,8 +2131,8 @@ begin
LazIDESelectDirectory:=@SelectDirectoryHandler;
InitIDEFileDialog:=@InitIDEFileDialogHandler;
StoreIDEFileDialog:=@StoreIDEFileDialogHandler;
LazMessageDialog:=@IDEMessageDialogHandler;
LazQuestionDialog:=@IDEQuestionDialogHandler;
LazMessageWorker:=@IDEMessageDialogHandler;
LazQuestionWorker:=@IDEQuestionDialogHandler;
TestCompilerOptions:=@CompilerOptionsDialogTest;
CheckCompOptsAndMainSrcForNewUnitEvent:=@CheckForNewUnit;
end;