summaryrefslogtreecommitdiff
path: root/libgtk_kylix/GTKControls.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2024-12-23 12:09:37 +0100
committerTomas Bzatek <tbzatek@redhat.com>2024-12-23 12:09:37 +0100
commit585635371a182d2b3cd5400f6d26d8e20ade6dbd (patch)
treefe4d71d71ac7aec633488546e939fcca8a754ccd /libgtk_kylix/GTKControls.pas
parent6475cd8e422b88e8d0fa3499195e6392bd3bbf12 (diff)
downloadtuxcmd-585635371a182d2b3cd5400f6d26d8e20ade6dbd.tar.xz
Drop Application.GTKVersion_2_xxx_Up
...and related quirks along with it. Assume latest gtk2 release.
Diffstat (limited to 'libgtk_kylix/GTKControls.pas')
-rw-r--r--libgtk_kylix/GTKControls.pas16
1 files changed, 3 insertions, 13 deletions
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;