Add notebook list menu

This commit is contained in:
Takafumi Arakaki 2012-09-01 19:17:41 +02:00
parent 7eee1e8cda
commit ed813c2b8e
2 changed files with 10 additions and 2 deletions

View file

@ -517,7 +517,7 @@ v0.2
don't need to save it. You can use try any code without saving
junks in your notebook. Use the command
:el:symbol:`ein:notebook-scratchsheet-open` to open scratch sheet.
* Menu support in notebook mode.
* Menu support in notebook mode and notebook list mode.
* Auto-connection support.
The new function :el:symbol:`ein:connect-to-default-notebook` can be
added to :el:symbol:`python-mode-hook` to automatically connect

View file

@ -411,7 +411,15 @@ See also:
(define-key map "g" 'ein:notebooklist-reload)
(define-key map "p" 'ein:notebooklist-prev-item)
(define-key map "n" 'ein:notebooklist-next-item)
(define-key map "q" 'bury-buffer))
(define-key map "q" 'bury-buffer)
(easy-menu-define ein:notebooklist-menu map "EIN Notebook List Mode Menu"
`("EIN Notebook List"
,@(ein:generate-menu
'(("Reload" ein:notebooklist-reload)
("New Notebook" ein:notebooklist-new-notebook)
("New Notebook (with name)"
ein:notebooklist-new-notebook-with-name)
("New Junk Notebook" ein:junk-new))))))
(provide 'ein-notebooklist)