示例#1
0
文件: DND.cs 项目: mono/stetic
 static void FaultDrop(Stetic.Wrapper.Widget wrapper, int x, int y, Gtk.Widget targetWidget)
 {
     Fault fault = FindFault (x, y, targetWidget);
     if (fault != null) {
         fault.Owner.Drop (wrapper.Wrapped, fault.Id);
         wrapper.Select ();
     }
 }
示例#2
0
		void PlaceholderDrop (Placeholder ph, Stetic.Wrapper.Widget wrapper)
		{
			Gtk.Dialog parentDialog = Wrapped.Parent as Gtk.Dialog;
			if (showNonContainerWarning && (IsTopLevel || (parentDialog != null && parentDialog.VBox == Wrapped))) {
				if (nonContainers.Contains (wrapper.Wrapped.GetType ().ToString ())) {
					using (NonContainerWarningDialog dlg = new NonContainerWarningDialog ()) {
						int res = dlg.Run ();
						showNonContainerWarning = dlg.ShowAgain;
						if (res != (int) Gtk.ResponseType.Ok)
							return;
					}
				}
			}
			using (UndoManager.AtomicChange) {
				ReplaceChild (ph, wrapper.Wrapped, true);
				wrapper.Select ();
			}
		}