From 378aa9dc39638ca2ace9f7e4757d88e75d769bcc Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 31 Aug 2016 10:22:52 -0700 Subject: [PATCH] fix building/running with GTK+ 2.6 --- src/gtk/listbox.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 2181bb926b..4f670f6336 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -763,14 +763,20 @@ int wxListBox::GetTopItem() const { int idx = wxNOT_FOUND; +#if GTK_CHECK_VERSION(2,8,0) wxGtkTreePath start; - if ( gtk_tree_view_get_visible_range(m_treeview, start.ByRef(), NULL) ) + if ( +#ifndef __WXGTK3__ + gtk_check_version(2,8,0) == NULL && +#endif + gtk_tree_view_get_visible_range(m_treeview, start.ByRef(), NULL)) { gint *ptr = gtk_tree_path_get_indices(start); if ( ptr ) idx = *ptr; } +#endif return idx; }