mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 04:39:28 +01:00
Gtk2: fixed result of TGtk2WidgetSet.EnableWindow()
git-svn-id: trunk@27547 -
This commit is contained in:
parent
04c2eb89db
commit
f80a1aaa04
@ -2666,15 +2666,18 @@ end;
|
||||
Params: hWnd:
|
||||
bEnable:
|
||||
Returns:
|
||||
|
||||
If the window was previously disabled, the return value is TRUE.
|
||||
If the window was not previously disabled, the return value is FALSE.
|
||||
------------------------------------------------------------------------------}
|
||||
function TGtk2WidgetSet.EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean;
|
||||
begin
|
||||
Assert(False, Format('Trace: [TGtk2WidgetSet.EnableWindow] hWnd: 0x%x, Enable: %s', [hwnd, BOOL_TEXT[bEnable]]));
|
||||
|
||||
Result := False;
|
||||
if hWnd <> 0 then
|
||||
gtk_widget_set_sensitive(pgtkwidget(hWnd), bEnable);
|
||||
Result:=true;
|
||||
begin
|
||||
Result := not GTK_WIDGET_SENSITIVE(PGtkWidget(HWND));
|
||||
gtk_widget_set_sensitive(PGtkWidget(hWnd), bEnable);
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user