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,19 +4919,25 @@ void wxDataViewCtrl::DoSetCurrentItem(const wxDataViewItem& item)
wxDataViewItem wxDataViewCtrl::GetTopItem() const 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; wxGtkTreePath start;
if ( !gtk_tree_view_get_visible_range if ( gtk_tree_view_get_visible_range
( (
GTK_TREE_VIEW(m_treeview), GTK_TREE_VIEW(m_treeview),
start.ByRef(), start.ByRef(),
NULL NULL
) ) ) )
{ {
return wxDataViewItem();
}
return GTKPathToItem(start); return GTKPathToItem(start);
} }
#endif
return wxDataViewItem();
}
int wxDataViewCtrl::GetCountPerPage() const int wxDataViewCtrl::GetCountPerPage() const
{ {