It is also possible to have submenus, remove menus and use gnome-stock icons on the menus.
To do submenus, you have to first call applet_widget_register_callback_dir, which only takes the callback name and the menu text. The callback name should end with '/'. The callback name works as a "path" for the submenus.
So to add a submenu "Foo" and in item "Bar" (into the submenu "Foo") you would do:
To delete a menu item, just call applet_widget_unregister_callback or applet_widget_unregister_callback_dir, with the proper callback name.
You use the _stock derivatives of the callback functions and pass an extra argument with the GNOME_STOCK_MENU_* type. For example to add an about menu item: