public override void Dispose() { if (disposed) { return; } disposed = true; headerLabel.Changed -= OnGroupNameChanged; if (emptyLabel != null) { emptyLabel.ButtonPressEvent -= OnAddClicked; } foreach (ActionMenuItem aitem in items) { aitem.KeyPressEvent -= OnItemKeyPress; aitem.Node.Dispose(); aitem.Detach(); aitem.Destroy(); } items.Clear(); ActionGroup = null; project = null; headerLabel = null; if (darea != null) { darea.SelectionChanged -= OnSelectionChanged; darea = null; } base.Dispose(); }
public ActionGroupEditor() { changedEvent = new ObjectWrapperEventHandler (OnActionChanged); Gtk.Fixed fx = new Gtk.Fixed (); table = new Gtk.Table (0, 0, false); table.RowSpacing = 8; table.ColumnSpacing = 8; table.BorderWidth = 12; Gtk.EventBox ebox = new Gtk.EventBox (); ebox.ModifyBg (Gtk.StateType.Normal, this.Style.Backgrounds [0]); headerLabel = new EditableLabel (); headerLabel.MarkupTemplate = "<b>$TEXT</b>"; headerLabel.Changed += OnGroupNameChanged; Gtk.VBox vbox = new Gtk.VBox (); Gtk.Label grpLabel = new Gtk.Label (); grpLabel.Xalign = 0; grpLabel.Markup = "<small><i>Action Group</i></small>"; // vbox.PackStart (grpLabel, false, false, 0); vbox.PackStart (headerLabel, false, false, 3); vbox.BorderWidth = 12; ebox.Add (vbox); Gtk.VBox box = new Gtk.VBox (); box.Spacing = 6; box.PackStart (ebox, false, false, 0); box.PackStart (table, false, false, 0); fx.Put (box, 0, 0); Add (fx); ShowAll (); }
public ActionGroupEditor() { changedEvent = new ObjectWrapperEventHandler(OnActionChanged); Gtk.Fixed fx = new Gtk.Fixed(); table = new Gtk.Table(0, 0, false); table.RowSpacing = 8; table.ColumnSpacing = 8; table.BorderWidth = 12; Gtk.EventBox ebox = new Gtk.EventBox(); ebox.ModifyBg(Gtk.StateType.Normal, this.Style.Backgrounds [0]); headerLabel = new EditableLabel(); headerLabel.MarkupTemplate = "<b>$TEXT</b>"; headerLabel.Changed += OnGroupNameChanged; Gtk.VBox vbox = new Gtk.VBox(); Gtk.Label grpLabel = new Gtk.Label(); grpLabel.Xalign = 0; grpLabel.Markup = string.Format("<small><i>{0}</i></small>", Catalog.GetString("Action Group")); // vbox.PackStart (grpLabel, false, false, 0); vbox.PackStart(headerLabel, false, false, 3); vbox.BorderWidth = 12; ebox.Add(vbox); Gtk.VBox box = new Gtk.VBox(); box.Spacing = 6; box.PackStart(ebox, false, false, 0); box.PackStart(table, false, false, 0); fx.Put(box, 0, 0); Add(fx); ShowAll(); }
public override void Dispose () { if (disposed) return; disposed = true; headerLabel.Changed -= OnGroupNameChanged; if (emptyLabel != null) emptyLabel.ButtonPressEvent -= OnAddClicked; foreach (ActionMenuItem aitem in items) { aitem.KeyPressEvent -= OnItemKeyPress; aitem.Node.Dispose (); aitem.Detach (); aitem.Destroy (); } items.Clear (); ActionGroup = null; project = null; headerLabel = null; if (darea != null) { darea.SelectionChanged -= OnSelectionChanged; darea = null; } base.Dispose (); }