- if ( mitem->IsCheckable() )
- entry.item_type = "<CheckItem>";
- else
- entry.item_type = "<Item>";
+
+ wxString pathRadio;
+ const char *item_type;
+ switch ( mitem->GetKind() )
+ {
+ case wxITEM_CHECK:
+ item_type = "<CheckItem>";
+ break;
+
+ case wxITEM_RADIO:
+ if ( m_pathLastRadio.empty() )
+ {
+ // start of a new radio group
+ item_type = "<RadioItem>";
+ m_pathLastRadio = buf + 1;
+ }
+ else // continue the radio group
+ {
+ pathRadio = m_pathLastRadio;
+ pathRadio.Replace("_", "");
+ pathRadio.Prepend("<main>/");
+ item_type = pathRadio;
+ }
+
+ // continue the existing radio group, if any
+ endOfRadioGroup = FALSE;
+ break;
+
+ default:
+ wxFAIL_MSG( _T("unexpected menu item kind") );
+ // fall through
+
+ case wxITEM_NORMAL:
+ item_type = "<Item>";
+ break;
+ }
+
+ entry.item_type = (char *)item_type; // cast needed for GTK+