- return GtkAddHelper(menu, pos, item);
-}
-
-void wxChoice::DoSetItemClientData( int n, void* clientData )
-{
- wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
-
- wxList::compatibility_iterator node = m_clientList.Item( n );
- wxCHECK_RET( node, wxT("invalid index in wxChoice::DoSetItemClientData") );
-
- node->SetData( (wxObject*) clientData );
-}
-
-void* wxChoice::DoGetItemClientData( int n ) const
-{
- wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid choice control") );
-
- wxList::compatibility_iterator node = m_clientList.Item( n );
- wxCHECK_MSG( node, NULL, wxT("invalid index in wxChoice::DoGetItemClientData") );
+ // We must set the selection so that it can be read back even if
+ // the user has not modified it since GTK+ will then select the
+ // first item so well return 0.
+ if ((count > 0) && (m_selection_hack==wxNOT_FOUND))
+ m_selection_hack = 0;