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. --- UToolTips.pas | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'UToolTips.pas') diff --git a/UToolTips.pas b/UToolTips.pas index 96a0ec2..a9ed9fb 100644 --- a/UToolTips.pas +++ b/UToolTips.pas @@ -255,18 +255,15 @@ begin AListView := FMain.RightListView; end; - if not Application.GTKVersion_2_0_5_Up then gtk_tree_model_get(gtk_tree_view_get_model(data_panel), @iter, 0, @Data, -1) - else begin - TreePath := gtk_tree_path_new_from_string(PChar(IntToStr(gtk_tree_path_get_indices(data_row)^))); - if not Assigned(TreePath) then Exit; - AListView.ConvertPathToChild(TreePath); - if (TreePath = nil) or (gtk_tree_path_get_indices(TreePath)^ > DataList.Count - 1) then begin - FileListTipsHide; - Exit; - end; - Data := DataList[gtk_tree_path_get_indices(TreePath)^]; - gtk_tree_path_free(TreePath); + TreePath := gtk_tree_path_new_from_string(PChar(IntToStr(gtk_tree_path_get_indices(data_row)^))); + if not Assigned(TreePath) then Exit; + AListView.ConvertPathToChild(TreePath); + if (TreePath = nil) or (gtk_tree_path_get_indices(TreePath)^ > DataList.Count - 1) then begin + FileListTipsHide; + Exit; end; + Data := DataList[gtk_tree_path_get_indices(TreePath)^]; + gtk_tree_path_free(TreePath); if (Data = nil) or Data^.UpDir then begin FileListTipsHide; Exit; -- cgit v1.2.3