- wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
-
- gtk_option_menu_remove_menu( GTK_OPTION_MENU(m_widget) );
- GtkWidget *menu = gtk_menu_new();
- gtk_option_menu_set_menu( GTK_OPTION_MENU(m_widget), menu );
-
- if ( HasClientObjectData() )
- {
- // destroy the data (due to Robert's idea of using wxList<wxObject>
- // and not wxList<wxClientData> we can't just say
- // m_clientList.DeleteContents(TRUE) - this would crash!
- wxNode *node = m_clientList.GetFirst();
- while ( node )
- {
- delete (wxClientData *)node->GetData();
- node = node->GetNext();
- }
- }
- m_clientList.Clear();