Changeset 7502


Ignore:
Timestamp:
Oct 23, 2007, 9:28:08 PM (14 years ago)
Author:
rme
Message:

Resolve ticket:111 (shouldn't be able to plain save in listener)

hemlock/src/bindings.lisp: In Listener mode, rebind c-x c-s to "Illegal"
and bind c-x c-w to "Save To File".

hemlock/src/filecoms.lisp: New command "Save To File".

Added Save To... item to File menu.

cocoa-listener.lisp: Arrange for Save and Save As... menu items to
be disabled when a listener window is main.

cocoa-editor.lisp: Add method hi::save-hemlock-document-to

Location:
trunk/ccl/cocoa-ide
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/cocoa-ide/cocoa-editor.lisp

    r7495 r7502  
    26242624   self (@selector #/saveDocumentAs:) +null-ptr+ t))
    26252625
     2626(defmethod hi::save-hemlock-document-to ((self hemlock-editor-document))
     2627  (#/performSelectorOnMainThread:withObject:waitUntilDone:
     2628   self (@selector #/saveDocumentTo:) +null-ptr+ t))
     2629
    26262630(defun initialize-user-interface ()
    26272631  (#/sharedDocumentController hemlock-document-controller)
  • trunk/ccl/cocoa-ide/cocoa-listener.lisp

    r7493 r7502  
    448448      (let* ((action (#/action item)))
    449449        (cond
    450           ((eql action (@selector #/revertDocumentToSaved:))
     450          ((or (eql action (@selector #/revertDocumentToSaved:))
     451               (eql action (@selector #/saveDocument:))
     452               (eql action (@selector #/saveDocumentAs:)))
    451453           (values t nil))
    452454          ((eql action (@selector #/interrupt:)) (values t t))
  • trunk/ccl/cocoa-ide/hemlock/src/bindings.lisp

    r7475 r7502  
    333333(bind-key "Reenter Interactive Input" #k"control-return" :mode "Listener")
    334334
     335;;; Make the user use C-x C-w to save the file, and take care
     336;;; not to associate the Listener document with any particular
     337;;; file or type.
     338(bind-key "Illegal" #k"control-x control-s" :mode "Listener")
     339(bind-key "Save To File" #k"control-x control-w" :mode "Listener")
     340
    335341(bind-key "Editor Evaluate Expression" #k"control-meta-escape")
    336342(bind-key "Editor Evaluate Expression" #k"meta-escape"  :mode "Editor")
  • trunk/ccl/cocoa-ide/hemlock/src/filecoms.lisp

    r7077 r7502  
    621621      (hi::save-hemlock-document-as document))))
    622622
     623(defcommand "Save To File" (p &optional (buffer (current-buffer)))
     624  "Writes the contents of Buffer, which defaults to the current buffer to
     625  the file named by Pathname.  The prefix argument is ignored."
     626  "Prompts for a file to write the contents of the current Buffer to.
     627  The prefix argument is ignored."
     628  (declare (ignore p))
     629  (let* ((document (hi::buffer-document buffer)))
     630    (when document
     631      (hi::save-hemlock-document-to document))))
     632
    623633(defcommand "Save File" (p &optional (buffer (current-buffer)))
    624634  "Writes the contents of the current buffer to the associated file.  If there
  • trunk/ccl/cocoa-ide/ide-contents/Resources/English.lproj/MainMenu.nib/info.nib

    r7493 r7502  
    99        <key>IBOpenObjects</key>
    1010        <array>
    11                 <integer>361</integer>
     11                <integer>334</integer>
    1212        </array>
    1313        <key>IBSystem Version</key>
Note: See TracChangeset for help on using the changeset viewer.