(FILECREATED " 8-Jun-86 23:54:05" {QV}<NOTECARDS>1.3K>FGHPATCH072.;2 3377   

      changes to:  (FNS NC.ListOfNoteFilesMenu)
		   (VARS FGHPATCH072COMS)

      previous date: " 8-Jun-86 23:50:27" {QV}<NOTECARDS>1.3K>FGHPATCH072.;1)


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

(PRETTYCOMPRINT FGHPATCH072COMS)

(RPAQQ FGHPATCH072COMS ((* * Fix to unnumbered bug about unnecessary confirm before open from NF 
			     list)
			  (FILES (FROM VALUEOF NOTECARDSDIRECTORIES)
				 FGHPATCH068)
			  (FNS NC.ListOfNoteFilesMenu)))
(* * Fix to unnumbered bug about unnecessary confirm before open from NF list)

(FILESLOAD (FROM VALUEOF NOTECARDSDIRECTORIES)
	   FGHPATCH068)
(DEFINEQ

(NC.ListOfNoteFilesMenu
  (LAMBDA (InterestedWindow)                                 (* fgh: " 8-Jun-86 23:53")

          (* * Bring up a menu of all notefiles found in the notefiles hash array. Also allow user to open a new notefile.)



          (* * kirk 23Jan86 Added AskYesOrNo and InterestedWindow parameter)



          (* * fgh 6/8/86 Added check to make sure NoteFile is open if it has a menu on the screen. Needed to handle case of 
	  liongering NF menus.)



          (* * fgh 6/8/86 Got rid of confirm before open a chosen NF from list.)


    (LET (Menu Selection NoteFileMenu FileName)
         (SETQ Menu
	   (create
	     MENU
	     ITEMS ←(BQUOTE
	       (,@(for NoteFile in (NC.ListOfNoteFiles) bind Stream FileName
		     collect (LIST (CONCAT (if (AND (STREAMP (SETQ Stream
									   (fetch (NoteFile Stream)
									      of NoteFile)))
							      (OPENP Stream))
						     then (if (WINDOWP
								    (WFROMMENU (fetch
										   (NoteFile Menu)
										    of NoteFile)))
								then "*"
							      else "$")
						   else "  ")
						 (FILENAMEFIELD (SETQ FileName
								    (fetch (NoteFile FullFileName)
								       of NoteFile))
								  (QUOTE NAME)))
				       NoteFile
				       (CONCAT "Open NoteFile " FileName " or bring up its menu.")))
		 ("-- Open new NoteFile --" (QUOTE OPEN)
					    "Open a new notefile - you'll be prompted for the name."
					    (SUBITEMS ("Create but don't open" (QUOTE CREATE)
									       
						      "Create a new notefile, but don't open it.")))))
	     ))
         (SELECTQ (SETQ Selection (MENU Menu))
		    (NIL NIL)
		    (OPEN (NC.OpenDatabaseFile NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL 
						 InterestedWindow))
		    (CREATE (NC.CreateDatabaseFile))
		    (if (type? NoteFile Selection)
			then (if (AND (type? MENU (SETQ NoteFileMenu (fetch (NoteFile
											  Menu)
										  of Selection)))
					    (NC.NoteFileOpenP Selection))
				   then (NC.SetUpNoteFileInterface Selection)
				 else (NC.OpenDatabaseFile (fetch (NoteFile FullFileName)
								  of Selection)
							       NIL NIL NIL NIL NIL NIL NIL NIL NIL 
							       InterestedWindow))
		      else (NC.ReportError "NC.NoteCardsIconButtonEventFn" (CONCAT "Notefile " 
											Selection 
									    " is not a notefile!")))))
    ))
)
(PUTPROPS FGHPATCH072 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (709 3295 (NC.ListOfNoteFilesMenu 719 . 3293)))))
STOP