Make wxDataViewCtrl::FromGTKColumn() public and rename
This function has to be called from a GTK+ callback, so make it public and also rename to GTKColumnToWX() to conform to the naming convention mandating the use of "GTK" prefix for the public methods which are not part of the public API.
This commit is contained in:
parent
11f80e3e34
commit
818d69f113
@ -185,6 +185,12 @@ public:
|
||||
// failed.
|
||||
wxDataViewItem GTKPathToItem(struct _GtkTreePath *path) const;
|
||||
|
||||
// Return wxDataViewColumn matching the given GtkTreeViewColumn.
|
||||
//
|
||||
// If the input argument is NULL, return NULL too. Otherwise we must find
|
||||
// the matching column and assert if we didn't.
|
||||
wxDataViewColumn* GTKColumnToWX(GtkTreeViewColumn *gtk_col) const;
|
||||
|
||||
virtual void OnInternalIdle() wxOVERRIDE;
|
||||
|
||||
int GTKGetUniformRowHeight() const { return m_uniformRowHeight; }
|
||||
@ -222,12 +228,6 @@ private:
|
||||
virtual wxDataViewItem DoGetCurrentItem() const wxOVERRIDE;
|
||||
virtual void DoSetCurrentItem(const wxDataViewItem& item) wxOVERRIDE;
|
||||
|
||||
// Return wxDataViewColumn matching the given GtkTreeViewColumn.
|
||||
//
|
||||
// If the input argument is NULL, return NULL too. Otherwise we must find
|
||||
// the matching column and assert if we didn't.
|
||||
wxDataViewColumn* FromGTKColumn(GtkTreeViewColumn *gtk_col) const;
|
||||
|
||||
friend class wxDataViewCtrlDCImpl;
|
||||
friend class wxDataViewColumn;
|
||||
friend class wxDataViewCtrlInternal;
|
||||
|
@ -4617,7 +4617,7 @@ wxDataViewCtrl::~wxDataViewCtrl()
|
||||
GtkTreeViewColumn *col;
|
||||
gtk_tree_view_get_cursor(GTK_TREE_VIEW(m_treeview), NULL, &col);
|
||||
|
||||
wxDataViewColumn * const wxcol = FromGTKColumn(col);
|
||||
wxDataViewColumn * const wxcol = GTKColumnToWX(col);
|
||||
if ( wxcol )
|
||||
{
|
||||
// This won't do anything if we're not editing it
|
||||
@ -4862,7 +4862,7 @@ unsigned int wxDataViewCtrl::GetColumnCount() const
|
||||
return m_cols.GetCount();
|
||||
}
|
||||
|
||||
wxDataViewColumn* wxDataViewCtrl::FromGTKColumn(GtkTreeViewColumn *gtk_col) const
|
||||
wxDataViewColumn* wxDataViewCtrl::GTKColumnToWX(GtkTreeViewColumn *gtk_col) const
|
||||
{
|
||||
if ( !gtk_col )
|
||||
return NULL;
|
||||
@ -4886,7 +4886,7 @@ wxDataViewColumn* wxDataViewCtrl::GetColumn( unsigned int pos ) const
|
||||
{
|
||||
GtkTreeViewColumn *gtk_col = gtk_tree_view_get_column( GTK_TREE_VIEW(m_treeview), pos );
|
||||
|
||||
return FromGTKColumn(gtk_col);
|
||||
return GTKColumnToWX(gtk_col);
|
||||
}
|
||||
|
||||
bool wxDataViewCtrl::DeleteColumn( wxDataViewColumn *column )
|
||||
@ -5058,7 +5058,7 @@ wxDataViewColumn *wxDataViewCtrl::GetCurrentColumn() const
|
||||
|
||||
GtkTreeViewColumn *col;
|
||||
gtk_tree_view_get_cursor(GTK_TREE_VIEW(m_treeview), NULL, &col);
|
||||
return FromGTKColumn(col);
|
||||
return GTKColumnToWX(col);
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::EditItem(const wxDataViewItem& item, const wxDataViewColumn *column)
|
||||
|
Loading…
Reference in New Issue
Block a user