From 585635371a182d2b3cd5400f6d26d8e20ade6dbd Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 23 Dec 2024 12:09:37 +0100 Subject: Drop Application.GTKVersion_2_xxx_Up ...and related quirks along with it. Assume latest gtk2 release. --- libgtk_kylix/GTKMenus.pas | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libgtk_kylix/GTKMenus.pas') diff --git a/libgtk_kylix/GTKMenus.pas b/libgtk_kylix/GTKMenus.pas index 2534f4c..bf2c095 100644 --- a/libgtk_kylix/GTKMenus.pas +++ b/libgtk_kylix/GTKMenus.pas @@ -362,13 +362,8 @@ function TGTKMenuItem.GetTornOff: boolean; var b: gboolean; begin b := False; - if Application.GTKVersion_2_6_0_Up then begin - if FItemType = itTearOff then g_object_get(FWidget, 'tearoff-state', @b, nil) else - if Assigned(FMenu) and (Count > 0) then g_object_get(FMenu, 'tearoff-state', @b, nil); - end else begin - if FItemType = itTearOff then b := Boolean(torn_off(PGTKTearOffMenuItem(FWidget)^)) else - if Assigned(FMenu) and (Count > 0) then b := Boolean(torn_off(PGTKMenu(FMenu)^)); - end; + if FItemType = itTearOff then g_object_get(FWidget, 'tearoff-state', @b, nil) else + if Assigned(FMenu) and (Count > 0) then g_object_get(FMenu, 'tearoff-state', @b, nil); Result := b; end; -- cgit v1.2.3