Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adapt to some wx API changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/trunk@71583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
  • Loading branch information...
commit a656a230fc9a770b9ccb195ba491f6b51b237bc6 1 parent 6e47bba
@RobinD42 RobinD42 authored
Showing with 5 additions and 27 deletions.
  1. +5 −27 src/dataview.i
View
32 src/dataview.i
@@ -2673,10 +2673,10 @@ public:
int width = -1, wxAlignment align = wxALIGN_LEFT,
int flags = wxDATAVIEW_COL_RESIZABLE );
- void AppendItem( const wxVariantVector &values, wxClientData *data = NULL );
- void PrependItem( const wxVariantVector &values, wxClientData *data = NULL );
+ void AppendItem( const wxVariantVector &values, wxUIntPtr data = NULL );
+ void PrependItem( const wxVariantVector &values, wxUIntPtr data = NULL );
void InsertItem( unsigned int row, const wxVariantVector &values,
- wxClientData *data = NULL );
+ wxUIntPtr data = NULL );
void DeleteItem( unsigned row );
void DeleteAllItems();
@@ -2698,30 +2698,8 @@ public:
void SetToggleValue( bool value, unsigned int row, unsigned int col );
bool GetToggleValue( unsigned int row, unsigned int col ) const;
-
- %extend {
- PyObject* GetItemData(unsigned int row)
- {
- wxCHECK_MSG(row < self->GetStore()->m_data.size(), NULL, "Invalid row");
- wxDataViewListStoreLine* line = self->GetStore()->m_data[row];
- wxPyClientData* data = (wxPyClientData*)line->GetData();
- if (data) {
- Py_INCREF(data->m_obj);
- return data->m_obj;
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
- }
-
- void SetItemData(unsigned int row, PyObject* data)
- {
- wxCHECK_RET(row < self->GetStore()->m_data.size(), "Invalid row");
- wxDataViewListStoreLine* line = self->GetStore()->m_data[row];
- delete line->GetData();
- line->SetData(new wxPyClientData(data));
- }
- }
+ void SetItemData( const wxDataViewItem& item, wxUIntPtr data );
+ wxUIntPtr GetItemData( const wxDataViewItem& item ) const;
};
Please sign in to comment.
Something went wrong with that request. Please try again.