From 2445aea5ec8944917e90924db8b2b0871caf4347 Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 18 Dec 2009 15:02:02 +0000 Subject: [PATCH] IDE: added resourcestring git-svn-id: trunk@23186 - --- ide/customformeditor.pp | 20 ++++++++++---------- ide/lazarusidestrconsts.pas | 3 +++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index 048d4de151..dddc5610b3 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -254,7 +254,7 @@ each control that's dropped onto the form function CreateComponent(ParentCI: TIComponentInterface; TypeClass: TComponentClass; const AUnitName: shortstring; - X,Y,W,H: Integer): TIComponentInterface; override; + NewLeft,NewTop,NewWidth,NewHeight: Integer): TIComponentInterface; override; function CreateComponentFromStream(BinStream: TStream; AncestorType: TComponentClass; const NewUnitName: ShortString; @@ -1578,7 +1578,7 @@ begin end; function TCustomFormEditor.CreateComponent(ParentCI: TIComponentInterface; - TypeClass: TComponentClass; const AUnitName: shortstring; X, Y, W, H: Integer + TypeClass: TComponentClass; const AUnitName: shortstring; NewLeft, NewTop, NewWidth, NewHeight: Integer ): TIComponentInterface; const PreferredDistanceMin = 30; @@ -1622,7 +1622,7 @@ begin Mediator:=nil; FreeMediator:=false; try - //DebugLn(['[TCustomFormEditor.CreateComponent] Class="'+TypeClass.ClassName+'" ',X,',',Y,',',W,'x',H]); + //DebugLn(['[TCustomFormEditor.CreateComponent] Class="'+TypeClass.ClassName+'" ',NewLeft,',',NewTop,',',NewWidth,'x',NewHeight]); {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TCustomFormEditor.CreateComponent A');{$ENDIF} OwnerComponent:=nil; @@ -1712,9 +1712,9 @@ begin NewComponent.Name := NewComponentName; except on e: Exception do begin - MessageDlg('Error naming component', - 'Error setting the name of a component ' - +dbgsName(NewComponent)+' to '+NewComponentName, + MessageDlg(lisErrorNamingComponent, + Format(lisErrorSettingTheNameOfAComponentTo, [dbgsName(NewComponent), + NewComponentName]), mtError,[mbCancel],0); exit; end; @@ -1722,10 +1722,10 @@ begin try // set bounds - CompLeft:=X; - CompTop:=Y; - CompWidth:=W; - CompHeight:=H; + CompLeft:=NewLeft; + CompTop:=NewTop; + CompWidth:=NewWidth; + CompHeight:=NewHeight; if NewComponent is TControl then begin AControl := TControl(NewComponent); diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 87d617a3d5..6684b8f096 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -3907,6 +3907,9 @@ resourcestring lisHelpSelectorDialog = 'Help selector'; lisSelectAHelpItem = 'Select a help item:'; lisErrorMovingComponent = 'Error moving component'; + lisErrorNamingComponent = 'Error naming component'; + lisErrorSettingTheNameOfAComponentTo = 'Error setting the name of a ' + +'component %s to %s'; lisErrorMovingComponent2 = 'Error moving component %s:%s'; lisInstalledPackages = 'Installed Packages'; lisAvailablePackages = 'Available packages';