Update to foo_tutorial1. The component now queries and uses the global setting for showing keyboard shortcuts in menus. Only the on_contextmenu method in steps 3 and 4 is affected.
Before: // Create a menu_manager that will build the context menu.
service_ptr_t<contextmenu_manager> cmm;
contextmenu_manager::g_create(cmm);
// Set up flags for contextmenu_manager::init_context.
// Initialize menu_manager for using a context menu.
cmm->init_context(items, contextmenu_manager::FLAG_SHOW_SHORTCUTS);
After: // Create a menu_manager that will build the context menu.
service_ptr_t<contextmenu_manager> cmm;
contextmenu_manager::g_create(cmm);
// Query setting for showing keyboard shortcuts.
const bool show_shortcuts = config_object::g_get_data_bool_simple(standard_config_objects::bool_show_keyboard_shortcuts_in_menus, false);
// Set up flags for contextmenu_manager::init_context.
unsigned flags = show_shortcuts ? contextmenu_manager::FLAG_SHOW_SHORTCUTS : 0;
// Initialize menu_manager for using a context menu.
cmm->init_context(items, flags);