// item can be deleted already in the model
int GetIndexOf( const wxDataViewItem &parent, const wxDataViewItem &item );
- virtual void OnInternalIdle();
+ void OnInternalIdle();
protected:
void InitTree();
// Take care to not use GetOwner() here if the label is empty, we can be
// called from ctor when GetOwner() is still NULL in this case.
- g_value_set_string( &gvalue,
- m_label.empty() ? ""
- : wxGTK_CONV_FONT(m_label,
- GetOwner()->GetOwner()->GetFont())
- );
+ wxScopedCharBuffer buf;
+ if ( m_label.empty() )
+ buf = wxScopedCharBuffer::CreateNonOwned("");
+ else
+ buf = wxGTK_CONV_FONT(m_label, GetOwner()->GetOwner()->GetFont());
+
+ g_value_set_string( &gvalue, buf);
g_object_set_property( G_OBJECT(m_renderer), "text", &gvalue );
g_value_unset( &gvalue );
iter->stamp = m_gtk_model->stamp;
// user_data is just the index +1
- iter->user_data = (gpointer) (i+1);
+ iter->user_data = wxUIntToPtr(i+1);
return TRUE;
}
}
// user_data is just the index +1 (+2 because we need the next)
- iter->user_data = (gpointer) (n+2);
+ iter->user_data = wxUIntToPtr(n+2);
}
else
{
iter->stamp = m_gtk_model->stamp;
// user_data is just the index +1
- iter->user_data = (gpointer) (n+1);
+ iter->user_data = wxUIntToPtr(n+1);
return TRUE;
}