diff options
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; |
