- mitem->m_id = id;
-
- mitem->m_text = item;
- size_t pos;
- do {
- pos = mitem->m_text.First( '&' );
- if (pos != wxString::npos) mitem->m_text.Remove( pos, 1 );
- } while (pos != wxString::npos);
-
- mitem->m_helpStr = helpStr;
- mitem->m_isCheckMenu = checkable;
- mitem->m_isEnabled = TRUE;
- if (checkable)
- mitem->m_menuItem = gtk_check_menu_item_new_with_label( WXSTRINGCAST(mitem->m_text) );
- else
- mitem->m_menuItem = gtk_menu_item_new_with_label( WXSTRINGCAST(mitem->m_text) );
-
- gtk_signal_connect( GTK_OBJECT(mitem->m_menuItem), "activate",
- GTK_SIGNAL_FUNC(gtk_menu_clicked_callback), (gpointer*)this );
-
- gtk_menu_append( GTK_MENU(m_menu), mitem->m_menuItem );
- gtk_widget_show( mitem->m_menuItem );
+ mitem->SetId(id);
+ mitem->SetText(item);
+ mitem->SetHelpString(helpStr);
+ mitem->SetCheckable(checkable);
+ const char *text = mitem->GetText();
+ GtkWidget *menuItem = checkable ? gtk_check_menu_item_new_with_label(text)
+ : gtk_menu_item_new_with_label(text);
+ mitem->SetMenuItem(menuItem);
+
+ gtk_signal_connect( GTK_OBJECT(menuItem), "activate",
+ GTK_SIGNAL_FUNC(gtk_menu_clicked_callback),
+ (gpointer*)this );
+
+ gtk_menu_append( GTK_MENU(m_menu), menuItem );
+ gtk_widget_show( menuItem );