diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2024-12-23 12:09:37 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2024-12-23 12:09:37 +0100 |
| commit | 585635371a182d2b3cd5400f6d26d8e20ade6dbd (patch) | |
| tree | fe4d71d71ac7aec633488546e939fcca8a754ccd /libgtk_kylix/GTKMenus.pas | |
| parent | 6475cd8e422b88e8d0fa3499195e6392bd3bbf12 (diff) | |
| download | tuxcmd-585635371a182d2b3cd5400f6d26d8e20ade6dbd.tar.xz | |
Drop Application.GTKVersion_2_xxx_Up
...and related quirks along with it.
Assume latest gtk2 release.
Diffstat (limited to 'libgtk_kylix/GTKMenus.pas')
| -rw-r--r-- | libgtk_kylix/GTKMenus.pas | 9 |
1 files changed, 2 insertions, 7 deletions
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; |
