/// <summary> /// Populates the specified shell with sub-menus. /// </summary> /// <param name="manager">The manager.</param> /// <param name="shell">The shell.</param> public void Populate( ActionManager manager, MenuShell shell) { var separator = new MenuItem(); shell.Add(separator); }
/// <summary> /// Populates the specified shell with sub-menus. /// </summary> /// <param name="manager"></param> /// <param name="shell">The shell.</param> public void Populate( ActionManager manager, MenuShell shell) { // Get the action associated with this. Action action = manager.GetAction(ActionName); MenuItem menuItem; if (action == null) { // Create a placeholder menu item. menuItem = new MenuItem("<Unknown Action: " + ActionName + ">"); menuItem.Sensitive = false; // Add it to the errors. manager.Messages.Add( new SeverityMessage( Severity.Error, "Could not find action " + ActionName + " to add to menu.")); } else { // Create a menu item from this action. menuItem = new ActionMenuItem(manager, action); } // Add the resulting menu item to the list. shell.Add(menuItem); }