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/GTKControls.pas | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'libgtk_kylix/GTKControls.pas') diff --git a/libgtk_kylix/GTKControls.pas b/libgtk_kylix/GTKControls.pas index 35719a8..ceafe18 100644 --- a/libgtk_kylix/GTKControls.pas +++ b/libgtk_kylix/GTKControls.pas @@ -469,24 +469,14 @@ var TooltipsData : PGtkTooltipsData; begin text := nil; Result := ''; - if Application.GTKVersion_2_12_0_Up then begin - g_object_get(FWidget, 'tooltip-text', @text, nil); - if text <> nil then Result := string(text); - end else begin - TooltipsData := gtk_tooltips_data_get(FWidget); - if Assigned(TooltipsData) then Result := PgcharToString(TooltipsData^.tip_text); - end; + g_object_get(FWidget, 'tooltip-text', @text, nil); + if text <> nil then Result := string(text); end; procedure TGTKControl.SetTooltip(Value: string); var FParentForm : TCustomGTKForm; begin - if Application.GTKVersion_2_12_0_Up then - g_object_set(FWidget, 'tooltip-text', PChar(Value), nil) - else begin - FParentForm := GetParentForm(Self); - if FParentForm <> nil then gtk_tooltips_set_tip(FParentForm.Tooltips.FObject, FWidget, StringToPgchar(Value), nil); - end; + g_object_set(FWidget, 'tooltip-text', PChar(Value), nil) end; procedure TGTKControl.SetFocus; -- cgit v1.2.3