protected internal override Gtk.ToolItem CreateToolItem(CommandManager manager) { if (manager.FindCommand (CommandId) == null) manager.RegisterCommand (cmd, ""); return base.CreateToolItem (manager); }
public MenuButtonEntry(Gtk.Entry entry, Gtk.Button button) { if (entry == null) entry = new Gtk.Entry (); if (button == null) button = new Gtk.Button (">"); this.entry = entry; manager = new CommandManager (); manager.RegisterGlobalHandler (this); PackStart (entry, true, true, 0); PackStart (button, false, false, 6); ActionCommand cmd = new ActionCommand ("InsertOption", "InsertOption", null); cmd.CommandArray = true; manager.RegisterCommand (cmd); entrySet = new CommandEntrySet (); entrySet.AddItem ("InsertOption"); button.Clicked += new EventHandler (ShowQuickInsertMenu); }