(FILECREATED " 1-May-87 17:40:46" {QV}<NOTECARDS>1.3K>NEXT>PMIPATCH034.;1 3731   

      changes to:  (VARS PMIPATCH034COMS)
		   (FNS NC.ResetNoteFileInterface))


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

(PRETTYCOMPRINT PMIPATCH034COMS)

(RPAQQ PMIPATCH034COMS ((* * pmi 5/1/87: Fixes bugs 459 and 460: Strange window behavior when 
			     MenuLingersAfterNoteFileClose is No, and NoteFile Icon needs placing.)
			  (* * Change to NCINTERFACE)
			  (FNS NC.ResetNoteFileInterface)))
(* * pmi 5/1/87: Fixes bugs 459 and 460: Strange window behavior when 
MenuLingersAfterNoteFileClose is No, and NoteFile Icon needs placing.)

(* * Change to NCINTERFACE)

(DEFINEQ

(NC.ResetNoteFileInterface
  (LAMBDA (NoteFile)                                         (* pmi: " 1-May-87 16:05")

          (* * Close up the control menu for a NoteFile)



          (* * rht 5/1/86: Now does nothing if NC.NoteFileMenuLingerFlg is non-nil.)



          (* * rht 5/6/86: Now smashes WhenSelectedFn and shades menu items if NC.NoteFileMenuLingerFlg is non-nil.)



          (* * pmi 2/18/87: Now deletes "RO:" in title of NoteFile menu if NoteFile was open Read-only)



          (* * pmi 3/20/87: Removed WhenSelectedFn when overhauling to have NewCards and ShowCards middlebutton menus appear 
	  when buttoned DOWN, instead of after the button comes back up. Everything is now done in the ButtonEventFn.)



          (* * pmi 5/1/87: Inserted call to NC.ClearMsg before the NoteFile's icon is deleted. Added Window arg to DELETEMENU
	  call. Also commented out the code that deletes the NoteFile's menu and removes the NoteFile from its window if 
	  NC.NoteFileMenuLingerFlg is NIL. That way if the NoteFile is reopened, it will remember the position for its icon.)


    (DECLARE (GLOBALVARS NC.NoteFileMenuLingerFlg))
    (LET ((Menu (fetch (NoteFile Menu) of NoteFile))
	  Window FullFileName)
         (if Menu
	     then (SETQ Window (WFROMMENU Menu))
		    (if NC.NoteFileMenuLingerFlg
			then (for Item in (fetch (MENU ITEMS) of Menu)
				  do (SHADEITEM Item Menu GRAYSHADE))

          (* * (replace (MENU WHENSELECTEDFN) of Menu with (FUNCTION NC.ClosedNoteFileMenuWhenSelectedFn)))



          (* * No longer need a WHENSELECTEDFN)


			       (if (NC.ReadOnlyNoteFileP NoteFile)
				   then (SETQ FullFileName (fetch (NoteFile FullFileName)
								  of NoteFile))
					  (replace (MENU TITLE) of Menu
					     with (CONCAT (FILENAMEFIELD FullFileName
									       (QUOTE NAME))
							      ";"
							      (FILENAMEFIELD FullFileName
									       (QUOTE VERSION))))
					  (replace (MENU IMAGE) of Menu with NIL) 
                                                             (* KLUDGE. Fetching the image height forces the menu 
							     package to recompute the menu image.)
					  (fetch (MENU IMAGEHEIGHT) of Menu)
					  (AND Window (REDISPLAYW Window)))
		      else (NC.ClearMsg Window T)        (* This code was removed so that if the NoteFile is 
							     reopened it will remember its position:)
                                                             (* (WINDOWPROP Window (QUOTE NoteFile) NIL))
                                                             (* (replace (NoteFile Menu) of NoteFile with NIL))
			     (WINDOWPROP Window (QUOTE CLOSEFN)
					   NIL)
			     (DELETEMENU Menu T Window))))))
)
(PUTPROPS PMIPATCH034 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (704 3649 (NC.ResetNoteFileInterface 714 . 3647)))))
STOP