Fix build with GTK+ 2.6

This commit is contained in:
Paul Cornett
2017-11-15 10:52:21 -08:00
parent 21620da3e5
commit c1c9c2c5e5

View File

@@ -4919,18 +4919,24 @@ void wxDataViewCtrl::DoSetCurrentItem(const wxDataViewItem& item)
wxDataViewItem wxDataViewCtrl::GetTopItem() const
{
#if GTK_CHECK_VERSION(2,8,0)
#ifndef __WXGTK3__
if (gtk_check_version(2,8,0))
return wxDataViewItem();
#endif
wxGtkTreePath start;
if ( !gtk_tree_view_get_visible_range
if ( gtk_tree_view_get_visible_range
(
GTK_TREE_VIEW(m_treeview),
start.ByRef(),
NULL
) )
{
return wxDataViewItem();
return GTKPathToItem(start);
}
#endif
return GTKPathToItem(start);
return wxDataViewItem();
}
int wxDataViewCtrl::GetCountPerPage() const