(FILECREATED " 2-Feb-87 19:45:26" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH192.;3 3054   

      changes to:  (FNS NC.UnfileNoteCard)
		   (VARS RHTPATCH192COMS)

      previous date: " 2-Feb-87 19:37:45" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH192.;1)


(* Copyright (c) 1987 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT RHTPATCH192COMS)

(RPAQQ RHTPATCH192COMS ((* * Fixed bug #416: Amounted to a total overhaul of NC.UnfileNoteCard.)
			  (* * Change to NCCARDS)
			  (FNS NC.UnfileNoteCard)))
(* * Fixed bug #416: Amounted to a total overhaul of NC.UnfileNoteCard.)

(* * Change to NCCARDS)

(DEFINEQ

(NC.UnfileNoteCard
  (LAMBDA (WindowOrTextStream)                               (* rht: " 2-Feb-87 19:45")
                                                             (* Take a notecard out of a file box.
							     Called fom title bar menu.)

          (* * fgh 11/12/85 Updated to handle Card objects.)



          (* * fgh 6/9/86 Added code to check to make sure that another operation is not in progress on this card when this 
	  fn is called.)



          (* * pmi 12/5/86: Modified message to NC.SelectNoteCards to mention SHIFT-selection.)



          (* * pmi 12/12/86: Removed obsolete ReturnLinksFlg argument in call to NC.SelectNoteCards.)



          (* * rht 2/2/87: Fixed bug #418: Trashed all the stuff about opening PropListEditor on the fromlinks.
	  Now just uses SelectNoteCards to choose the fileboxes to delete from.)


    (DECLARE (GLOBALVARS NC.SelectingParentsMenu))
    (LET ((Card (NC.CoerceToCard WindowOrTextStream))
	  OperationInProgress)
         (if (SETQ OperationInProgress (NC.OperationInProgress Card))
	     then 

          (* * Another interaction operation is in progress on this card and we have to interact with the user.
	  Can't do.)


		    (NC.PrintOperationInProgressMsg (NC.FetchWindow Card)
						      "Unfile" OperationInProgress)
	   else (NC.ProtectedCardOperation Card Unfile
					     (LET* ((FromLinks (NC.FetchFromLinks Card))
						    (Parents (for FromLink in FromLinks
								when (FMEMB (fetch
										  (Link Label)
										   of FromLink)
										(QUOTE
										  (FiledCard SubBox)))
								collect (fetch (Link SourceCard)
									     of FromLink))))
					           (for Box
						      in (NC.SelectNoteCards
							     NIL
							     (FUNCTION (LAMBDA (Box)
								 (AND (NC.FileBoxP Box)
									(FMEMB Box Parents))))
							     NC.SelectingParentsMenu Card 
			  "Please shift-select the file box(es) from which to remove this card. ")
						      do (for FromLink in FromLinks
							      when (NC.SameCardP
								       Box
								       (fetch (Link SourceCard)
									  of FromLink))
							      do (NC.DeleteLink FromLink T))))))))
)
)
(PUTPROPS RHTPATCH192 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (617 2972 (NC.UnfileNoteCard 627 . 2970)))))
STOP