Skip to content

Commit

Permalink
Fix build with GTK+ 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcor committed Nov 15, 2017
1 parent 21620da commit c1c9c2c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/gtk/dataview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1c9c2c

Please sign in to comment.