mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 09:19:39 +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:
|
Params: hWnd:
|
||||||
bEnable:
|
bEnable:
|
||||||
Returns:
|
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;
|
function TGtk2WidgetSet.EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean;
|
||||||
begin
|
begin
|
||||||
Assert(False, Format('Trace: [TGtk2WidgetSet.EnableWindow] hWnd: 0x%x, Enable: %s', [hwnd, BOOL_TEXT[bEnable]]));
|
Assert(False, Format('Trace: [TGtk2WidgetSet.EnableWindow] hWnd: 0x%x, Enable: %s', [hwnd, BOOL_TEXT[bEnable]]));
|
||||||
|
Result := False;
|
||||||
if hWnd <> 0 then
|
if hWnd <> 0 then
|
||||||
gtk_widget_set_sensitive(pgtkwidget(hWnd), bEnable);
|
begin
|
||||||
Result:=true;
|
Result := not GTK_WIDGET_SENSITIVE(PGtkWidget(HWND));
|
||||||
|
gtk_widget_set_sensitive(PGtkWidget(hWnd), bEnable);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user