lazdatadict: fixed compilation

git-svn-id: trunk@45132 -
This commit is contained in:
mattias 2014-05-21 11:06:50 +00:00
parent 5049a0d73d
commit 865f8fbc22
3 changed files with 37 additions and 3 deletions

View File

@ -55,7 +55,12 @@ Var
implementation
uses inifiles,BaseIDEIntf,idemsgintf;
uses
inifiles, IDEMsgIntf,
{$IFDEF EnableNewExtTools}
IDEExternToolIntf,
{$ENDIF}
BaseIDEIntf;
Const
// Do not localize
@ -176,7 +181,11 @@ end;
procedure TIDEDataDictionary.DDProgress(Sender : TObject; Const Msg : String);
begin
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,SLoadingDataDict+Msg);
{$ELSE}
IDEMessagesWindow.AddMsg(SLoadingDataDict+Msg,'',2);
{$ENDIF}
end;
procedure TIDEDataDictionary.SetFileName(const AValue: String);
@ -273,13 +282,20 @@ procedure TIDEDataDictionary.Load;
begin
If (FFileName<>'') and Active then
begin
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,SLoadingDataDict+SFromfile+FFileName);
{$ELSE}
IDEMessagesWindow.BeginBlock(False);
Try
IDEMessagesWindow.AddMsg(SLoadingDataDict+SFromfile+FFileName,'',2);
{$ENDIF}
FDataDict.LoadFromFile(UTF8ToSys(FFileName));
{$IFDEF EnableNewExtTools}
{$ELSE}
Finally
IDEMessagesWindow.EndBlock;
end;
{$ENDIF}
end;
end;

View File

@ -73,7 +73,12 @@ implementation
{$R reglazdatadict.res}
uses forms, dialogs, controls, idemsgintf, ldd_consts;
uses forms, dialogs, controls,
IDEMsgIntf,
{$IFDEF EnableNewExtTools}
IDEExternToolIntf,
{$ENDIF}
ldd_consts;
@ -274,12 +279,18 @@ begin
ASelection:=TPersistentSelectionList.Create;
try
GlobalDesignHook.GetSelection(ASelection);
{$IFNDEF EnableNewExtTools}
IDEMessagesWindow.BeginBlock(True);
{$ENDIF}
For I:=0 to ASelection.Count-1 do
if (ASelection[i] is TDataset) then
begin
DS:=TDataset(ASelection[i]);
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,Format(SApplyingDDToDataset,[DS.Name]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format(SApplyingDDToDataset,[DS.Name]),'',i+1);
{$ENDIF}
IDEDataDictionary.Dictionary.ApplyToDataset(DS,@ApplyDDToField);
end;
finally
@ -293,10 +304,18 @@ begin
If (FD<>Nil) then
begin
If VerboseApply then
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,Format(SApplyingDDToField,[F.FieldName]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format(SApplyingDDToField,[F.FieldName]),'',-1)
{$ENDIF}
end
else
{$IFDEF EnableNewExtTools}
IDEMessagesWindow.AddCustomMessage(mluImportant,Format(SWarningNoDDForField,[F.FieldName]));
{$ELSE}
IDEMessagesWindow.AddMsg(Format(SWarningNoDDForField,[F.FieldName]),'',-1);
{$ENDIF}
end;
Procedure TIDEDataDictCommandHandler.DesignSQL(Sender : TObject);

View File

@ -7750,7 +7750,6 @@ begin
if ProfInd<>-1 then begin
// Set current profile temporarily, used by the codetools functions.
BuildLazProfiles.CurrentIndex:=ProfInd;
// does not show message: IDEMessagesWindow.AddMsg('Building: '+BuildLazProfiles.Current.Name,'',-1);
LazSrcTemplate:=
CodeToolBoss.DefineTree.FindDefineTemplateByName(StdDefTemplLazarusSources,true);
if Assigned(LazSrcTemplate) then begin