(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP") (FILECREATED "30-May-88 15:35:38" {QV}<NOTECARDS>1.3LNEXT>RHTPATCH321.;1 9045 changes to%: (VARS RHTPATCH321COMS)) (* " Copyright (c) 1988 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT RHTPATCH321COMS) (RPAQQ RHTPATCH321COMS ((DECLARE%: DONTCOPY (PROPS (RHTPATCH321 MAKEFILE-ENVIRONMENT) (RHTPATCH321 FILETYPE))) (* ;; "Fixes bug reported by John Tang whereby setting UseDeletedLinkIconIndicators to No only worked for those links to the deleted card whose source cards were open at the time of deletion. Links from closed cards ended up with little %"deleted%" link icons as though the parameter was set to Yes.") (* ;; "Change to NCCARDS") (FNS NC.EditNoteCard) (* ;; "Change to NCLINKS") (FNS NC.DeleteBadLink))) (DECLARE%: DONTCOPY (PUTPROPS RHTPATCH321 MAKEFILE-ENVIRONMENT (:PACKAGE "INTERLISP" :READTABLE "INTERLISP")) (PUTPROPS RHTPATCH321 FILETYPE :TCOMPL) ) (* ;; "Fixes bug reported by John Tang whereby setting UseDeletedLinkIconIndicators to No only worked for those links to the deleted card whose source cards were open at the time of deletion. Links from closed cards ended up with little %"deleted%" link icons as though the parameter was set to Yes." ) (* ;; "Change to NCCARDS") (DEFINEQ (NC.EditNoteCard [LAMBDA (Card ReadOnly RegionOrPosition TypeSpecificArgs) (* ; "Edited 30-May-88 12:08 by Trigg") (* ;; "Bring the already created NoteCard specified by ID onto the screen at Region or Position specified by RegionOrPosition") (* ;; "fgh 11/11/85: Updated to handle new Card object.") (* ;; "fgh 2/5/86 Added call to NC.ApplyFn") (* ;; "kirk 15May86 Added call to NC.AttachNoteFileName") (* ;; "rht 7/13/86: Added TypeSpecificArgs arg.") (* ;; "kef 7/16/86: Added NC.ObtainCardEditPermission.") (* ;; "kef 8/7/86: Added check to make sure that applying the EditFn worked. If not, then release those write locks, thus keeping the writelock count consistent.") (* ;; "fgh 8/30/86 Converted APPLY* to NC.ApplyFn.") (* ;; "rht 10/6/86: Added checks before doing WINDOWPROP calls in case there was a recursive call to NC.EditNoteCard.") (* ;; "rg 3/30/87 added NC.ProtectedCardOperation wrapper") (* ;; "rht 5/13/87: Added call to new NC.InstallCopyButtonEventFn.") (* ;; "dsj 9/22/87: Included check for valid card type of destination card.") (* ;; "rg 11/4/87 added ReadOnly arg") (* ;; "pmi 12/30/87: Added dsj's change; see comment above.") (* ;; "pmi 2/10/88: Replaced bogus InterestedWindow argument with NIL in call to NCP.PrintMsg if card type definition is missing.") (* ;; "rht 5/30/88: Now deletes any links marked as Bad during running of EditFn.") (DECLARE (GLOBALVARS NC.ShowNoteFileOnCards)) (NC.ProtectedCardOperation Card "Edit NoteCard" NIL (RESETSAVE (CURSOR WAITINGCURSOR)) (LET ((NoteCardType (NC.RetrieveType Card)) (CardWindow (NCP.CardWindow Card))) (if (NCP.CardTypeP NoteCardType) then (PROG (Window Substance EditResult) [COND ((AND (NC.ActiveCardP Card) (NC.ObtainEditPermission Card)) (SETQ Substance (NC.FetchSubstance Card))) ((NC.ObtainEditPermission Card) (NC.GetNoteCard Card) (SETQ Substance (NC.FetchSubstance Card))) (T (RETURN (NC.CardPartBusy Card '(SUBSTANCE TOLINKS GLOBALTOLINKS PROPLIST] (COND ([AND (SETQ EditResult (ERSETQ (NC.ApplyFn EditFn Card Substance RegionOrPosition TypeSpecificArgs))) (WINDOWP (SETQ Window (CAR EditResult] (WINDOWADDPROP Window 'CLOSEFN (FUNCTION NC.QuitCard) 'FIRST) (OR (NC.CardP (WINDOWPROP Window 'NoteCardObject)) (WINDOWPROP Window 'NoteCardObject Card)) (NC.InstallCopyButtonEventFn Window) (if NC.ShowNoteFileOnCards then (NC.AttachNoteFileName Window)) (* ;; "Remove any bum links found while running the EditFn.") (for BadLink in (NC.FetchUserDataProp Card 'BadLinks) do (NC.DelReferencesToCard Card BadLink)) (NC.SetUserDataProp Card 'BadLinks NIL)) (T (* ; "At this point, we've obtain the write locks but the edit failed, so we'd better release them") (for CardPart in '(SUBSTANCE TOLINKS GLOBALTOLINKS PROPLIST) do (NC.ApplyFn ReleaseWritePermissionFn Card CardPart)) (RETURN))) (if ReadOnly then (NC.ApplyFn MakeReadOnlyFn Card)) (RETURN Window)) else (if CardWindow then (FLASHW CardWindow) (NCP.PrintMsg CardWindow T "Cannot open this card because card type definition " NoteCardType " not found." (CHARACTER 13) "First redefine card type " NoteCardType "." (CHARACTER 13)) else (NCP.PrintMsg NIL T "Cannot open this card because card type definition " NoteCardType " not found." (CHARACTER 13) "First redefine card type " NoteCardType "." (CHARACTER 13]) ) (* ;; "Change to NCLINKS") (DEFINEQ (NC.DeleteBadLink [LAMBDA (Link ImageObj ImageStream StreamType TextStream Scale) (* ; "Edited 30-May-88 12:07 by Trigg") (* ;; "pmi&rht 6/19/87: Deletes a bad link when it is discovered at display time. If the link icon being displayed is in the Show Links window, then find its corresponding real link and delete it. Otherwise, just delete the link.") (* ;; "rht 5/30/88: Now checks value of NC.UseDeletedLinkIconIndicatorsFlg. If nil, then marks the link for deletion.") (DECLARE (GLOBALVARS NC.UseDeletedLinkIconIndicatorsFlg)) (LET ((Card (fetch (Link SourceCard) of Link))) (COND ((LISTGET (fetch (Link UserData) of Link) 'InsidePropListEditor) (for RealLink in (NC.FetchFromLinks Card) when (NC.SameLinkP RealLink Link) do (NC.DeleteLink RealLink)) (for RealLink in (NC.FetchToLinks Card) when (NC.SameLinkP RealLink Link) do (NC.DeleteLink RealLink)) 'DON'T) (NC.UseDeletedLinkIconIndicatorsFlg (* ; "Change imageobj into deleted link icon.") (NC.DeleteLink Link NIL T) (NC.ReplaceWithDeletedLinkImageObj ImageObj) (APPLY* (IMAGEOBJPROP ImageObj 'DISPLAYFN) ImageObj ImageStream StreamType TextStream Scale) 'CHANGED) (T (* ;; "Mark the link as needing deletion. NC.EditNoteCard will remove it once we return from the card type's editfn.") (NC.SetUserDataProp Card 'BadLinks (CONS Link (NC.FetchUserDataProp Card 'BadLinks]) ) (PUTPROPS RHTPATCH321 COPYRIGHT ("Xerox Corporation" 1988)) (DECLARE%: DONTCOPY (FILEMAP (NIL (1585 7029 (NC.EditNoteCard 1595 . 7027)) (7065 8962 (NC.DeleteBadLink 7075 . 8960))))) STOP