(FILECREATED "18-Jul-85 17:06:31" {PHYLUM}<NOTECARDS>RELEASE1.2I>FGHPATCH019.;1 2753   

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


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

(PRETTYCOMPRINT FGHPATCH019COMS)

(RPAQQ FGHPATCH019COMS ((* * Redefined from NCCARDS fix for wrong titles in filedcadr links bug)
			(FNS NC.UnfileNoteCard)))
(* * Redefined from NCCARDS fix for wrong titles in filedcadr links bug)

(DEFINEQ

(NC.UnfileNoteCard
  (LAMBDA (WindowOrTextStream)                               (* fgh: "18-Jul-85 17:02")
                                                             (* Take a notecard out of a file box.
							     Called fom title bar menu.)
    (PROG (Links ID Window EditWindow FileBoxes)
          (SETQ Window (WINDOW.FROM.TEDIT.THING WindowOrTextStream))
          (SETQ ID (NC.IDFromWindow Window))
          (SETQ Links (bind SourceID for Link in (NC.FetchFromLinks ID)
			 when (EQ (fetch (NOTECARDLINK LINKLABEL) of Link)
				  NC.FiledCardLinkLabel)
			 collect (create NOTECARDLINK copying Link DISPLAYMODE ←(create 
										  LINKDISPLAYMODE
										   copying
										    (fetch
										      (NOTECARDLINK
											DISPLAYMODE)
										       of Link)
										    SHOWTITLEFLG ←(
										      QUOTE SOURCE))))
	    )
          (SETQ EditWindow (NC.OpenPropListEditor WindowOrTextStream (LIST (QUOTE FileBoxes)
									   Links)
						  "List of File Boxes" T T))
          (BLOCK)
          (SETQ FileBoxes (NC.SelectNoteCards NIL (FUNCTION (LAMBDA (LinkOrID)
						  (COND
						    ((LISTP LinkOrID)
						      (NC.ContentsCardP (fetch (NOTECARDLINK SOURCEID)
									   of LinkOrID)))
						    (T (NC.ContentsCardP LinkOrID)))))
					      NC.SelectingParentsMenu ID T 
				"Please select the file box(es) from which to remove this card. "))
          (NC.ClosePropListEditor EditWindow (QUOTE NoSave))
          (DISMISS)
          (NC.ClearMsg Window T)
          (for Box in FileBoxes do (NC.DelReferencesToCard (COND
							     ((LISTP Box)
							       (fetch (NOTECARDLINK SOURCEID)
								  of Box))
							     (T Box))
							   ID PSA.Database))
          (for Link in Links when (OR (FMEMB (fetch (NOTECARDLINK SOURCEID) of Link)
					     FileBoxes)
				      (MEMBER Link FileBoxes))
	     do (NC.DelToLink Link PSA.Database)
		(NC.DelFromLink Link PSA.Database)))))
)
(PUTPROPS FGHPATCH019 COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (479 2671 (NC.UnfileNoteCard 489 . 2669)))))
STOP