(FILECREATED " 4-Jun-86 17:18:34" {QV}<NOTECARDS>1.3K>FGHPATCH051.;1 2214   

      changes to:  (VARS FGHPATCH051COMS)
		   (FNS NC.ChangeCardTitleFromLinkIcon))


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

(PRETTYCOMPRINT FGHPATCH051COMS)

(RPAQQ FGHPATCH051COMS ((* * Fix to bug %# 7 -- screen messed up after changing title from link 
			     icon)
			  (FNS NC.ChangeCardTitleFromLinkIcon)))
(* * Fix to bug %# 7 -- screen messed up after changing title from link icon)

(DEFINEQ

(NC.ChangeCardTitleFromLinkIcon
  (LAMBDA (LinkIcon Window)                                  (* fgh: " 4-Jun-86 17:16")

          (* * From a link icon sitting in Window, change the title of the link's destination card.)



          (* * kirk 14Nov85: deleted use of PSA.Database)



          (* * fgh 6/4/86 Fixed so that moves card back to original location if moved to be on screen.
	  This fixes a bug in TEdit that'll mess up the screen if a window is mived under a ImageObj ButtonEventInFn.)


    (LET (Link Card DestinationCard OldTitle NewTitle)
         (RESETLST (RESETSAVE NIL (BQUOTE (MOVEW , Window , (LOWERLEFT (WINDOWPROP
										   Window
										   (QUOTE REGION))))
						))
		     (if (NC.LinkIconImageObjP LinkIcon)
			 then (SETQ Link (NC.FetchLinkFromLinkIcon LinkIcon))
				(SETQ Card (fetch (Link SourceCard) of Link))
				(SETQ DestinationCard (fetch (Link DestinationCard) of Link))
				(if (SETQ NewTitle (NC.AskUser
					  (CONCAT "Enter new title for card with title '"
						    (NC.RetrieveTitle DestinationCard)
						    "'"
						    (CHARACTER 13))
					  "-->  "
					  (if (AND (STREQUAL (SETQ OldTitle (
								       NC.RetrieveTitle 
										  DestinationCard))
								   "Untitled")
						       (NC.FetchNewCardFlg DestinationCard))
					      then NIL
					    else OldTitle)
					  T Window))
				    then (NC.AssignTitle DestinationCard NIL NewTitle)
					   (QUOTE CHANGED)))))))
)
(PUTPROPS FGHPATCH051 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (515 2132 (NC.ChangeCardTitleFromLinkIcon 525 . 2130)))))
STOP