fix building/running with GTK+ 2.6

This commit is contained in:
Paul Cornett
2016-08-31 10:22:52 -07:00
parent 7986ccf039
commit 378aa9dc39

View File

@@ -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;
}