lcl: formatting

git-svn-id: trunk@19937 -
This commit is contained in:
paul 2009-05-12 05:59:22 +00:00
parent 3e258b4ef8
commit ae839602c2
4 changed files with 20 additions and 15 deletions

View File

@ -934,14 +934,14 @@ begin
Result := ResBtnCalendar; Result := ResBtnCalendar;
end; end;
procedure TDateEdit.DoButtonClick(Sender:TObject);//or onClick procedure TDateEdit.DoButtonClick(Sender: TObject);//or onClick
var var
PopupOrigin:TPoint; PopupOrigin: TPoint;
begin begin
inherited DoButtonClick(Sender); inherited DoButtonClick(Sender);
PopupOrigin:=ControlToScreen(Point(0, Height)); PopupOrigin := ControlToScreen(Point(0, Height));
if Trim(Text)=EmptyStr then if Trim(Text) = EmptyStr then
ShowCalendarPopup(PopupOrigin, Now, @CalendarPopupReturnDate) ShowCalendarPopup(PopupOrigin, Now, @CalendarPopupReturnDate)
else else
ShowCalendarPopup(PopupOrigin, Date, @CalendarPopupReturnDate) ShowCalendarPopup(PopupOrigin, Date, @CalendarPopupReturnDate)

View File

@ -879,15 +879,18 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TCustomForm.SetZOrder(Topmost: Boolean); procedure TCustomForm.SetZOrder(Topmost: Boolean);
begin begin
if Parent=nil then begin if Parent = nil then
if TopMost and HandleAllocated then begin begin
if (Screen.GetCurrentModalForm<>nil) if TopMost and HandleAllocated then
and (Screen.GetCurrentModalForm<>Self) then exit; begin
if (Screen.GetCurrentModalForm <> nil) and (Screen.GetCurrentModalForm <> Self) then
Exit;
//TODO: call TWSCustomFormClass(Widgetset).SetZORder. //TODO: call TWSCustomFormClass(Widgetset).SetZORder.
Screen.MoveFormToZFront(Self); Screen.MoveFormToZFront(Self);
SetForegroundWindow(Handle); SetForegroundWindow(Handle);
end; end;
end else end
else
inherited SetZOrder(Topmost); inherited SetZOrder(Topmost);
end; end;

View File

@ -3088,11 +3088,13 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TWin32WidgetSet.SetFocus(HWnd: HWND): HWND; function TWin32WidgetSet.SetFocus(HWnd: HWND): HWND;
begin begin
{ if Windows.GetFocus <> HWnd then {
if Windows.GetFocus <> HWnd then
begin begin
DebugLn(['TWin32WidgetSet.SetFocus ']); DebugLn(['TWin32WidgetSet.SetFocus ', ' Wnd = ', WndClassName(HWnd)]);
DumpStack; DumpStack;
end;} end;
}
Result := Windows.SetFocus(HWnd); Result := Windows.SetFocus(HWnd);
end; end;

View File

@ -1513,10 +1513,10 @@ begin
end; end;
procedure DumpStack; procedure DumpStack;
Begin begin
if assigned(DebugText) then if Assigned(DebugText) then
Dump_Stack(DebugText^, get_frame); Dump_Stack(DebugText^, get_frame);
End; end;
function GetStackTrace(UseCache: boolean): string; function GetStackTrace(UseCache: boolean): string;
var var