From 06375fba9bbfe99bb7888d6cf59938faa303f17d Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 5 Jan 2014 11:38:57 +0000 Subject: [PATCH] cocoa: fix formatting git-svn-id: trunk@43649 - --- lcl/interfaces/cocoa/cocoawinapi.inc | 12 +++++------ lcl/interfaces/cocoa/cocoawsmenus.pas | 30 +++++++++++++-------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/lcl/interfaces/cocoa/cocoawinapi.inc b/lcl/interfaces/cocoa/cocoawinapi.inc index c732372d56..49c483792e 100644 --- a/lcl/interfaces/cocoa/cocoawinapi.inc +++ b/lcl/interfaces/cocoa/cocoawinapi.inc @@ -925,14 +925,12 @@ function TCocoaWidgetSet.GetWindowRelativePosition(Handle: hwnd; var Left, Top: begin Result := Handle <> 0; if Result then - begin + begin if TCocoaWindowContent(handle).isembedded then - TCocoaWindowContent(handle).lclRelativePos(Left, Top) - else - begin - TCocoaWindowContent(handle).window.lclRelativePos(Left, Top); - end; - end + TCocoaWindowContent(handle).lclRelativePos(Left, Top) + else + TCocoaWindowContent(handle).window.lclRelativePos(Left, Top); + end end; function TCocoaWidgetSet.GetWindowSize(Handle: hwnd; var Width, Height: Integer): boolean; diff --git a/lcl/interfaces/cocoa/cocoawsmenus.pas b/lcl/interfaces/cocoa/cocoawsmenus.pas index dcc600be2b..5dcdfb168b 100644 --- a/lcl/interfaces/cocoa/cocoawsmenus.pas +++ b/lcl/interfaces/cocoa/cocoawsmenus.pas @@ -185,22 +185,22 @@ end; ------------------------------------------------------------------------------} class procedure TCocoaWSMenuItem.DestroyHandle(const AMenuItem: TMenuItem); var - callback: IMenuItemCallback; - callbackObject: TObject; - item : TCocoaMenuItem; + callback: IMenuItemCallback; + callbackObject: TObject; + item: TCocoaMenuItem; begin - if AMenuItem.Caption <> '-' then - begin - item:=TCocoaMenuItem(AMenuItem.Handle); - callback := item.lclGetCallback; - if Assigned(callback) then - begin - callbackObject := callback.GetCallbackObject; - callback := nil; - item.lclClearCallback; - callbackObject.Free; - end; - end; + if AMenuItem.Caption <> '-' then + begin + item := TCocoaMenuItem(AMenuItem.Handle); + callback := item.lclGetCallback; + if Assigned(callback) then + begin + callbackObject := callback.GetCallbackObject; + callback := nil; + item.lclClearCallback; + callbackObject.Free; + end; + end; end; {------------------------------------------------------------------------------