To add a menu item on-the-fly in bonobo-ui you apparently need to do something like
xml_item = g_strdup_printf ("<menuitem name=\"%u\" id=\"%s\" type=\"radio\" group=\"%s\"/>\n", index, command_name, VIEW_GROUP);bonobo_ui_component_set (ui, VIEW_PATH, xml_item, NULL);
Ugh