예제 #1
0
        protected override bool OnDragDrop(Gdk.DragContext context, int x, int y, uint time)
        {
            Wrapper.ActionPaletteItem dropped = DND.Drop(context, null, time) as Wrapper.ActionPaletteItem;
            if (dropped == null)
            {
                return(false);
            }

            if (dropped.Node.Action.ActionGroup != group)
            {
                using (dropped.Node.Action.UndoManager.AtomicChange) {
                    dropped.Node.Action.ActionGroup.Actions.Remove(dropped.Node.Action);
                    group.Actions.Add(dropped.Node.Action);
                }
            }

            return(base.OnDragDrop(context, x, y, time));
        }
예제 #2
0
		public virtual void ProcessDragBegin (Gdk.DragContext ctx, Gdk.EventMotion evt)
		{
			editOnRelease = false;
			ActionPaletteItem item = new ActionPaletteItem (node);
			if (ctx != null)
				DND.Drag (parentMenu.Widget, ctx, item);
			else
				DND.Drag (parentMenu.Widget, evt, item);
		}