From: ueno Date: Sun, 19 Oct 2003 06:33:19 +0000 (+0000) Subject: * riece-menu.el (riece-menu-create-layouts-menu): New function. X-Git-Tag: riece-0_1_4~5 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4742b6b7de260ce59b460a33973c3a599454f0e2;p=elisp%2Friece.git * riece-menu.el (riece-menu-create-layouts-menu): New function. (riece-menu-items): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a109e84..8e854f7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2003-10-19 Daiki Ueno + * riece-menu.el (riece-menu-create-layouts-menu): New function. + (riece-menu-items): Use it. + * riece-server.el (riece-server-process-opened): New function. (riece-server-opened): Use it. diff --git a/lisp/riece-menu.el b/lisp/riece-menu.el index 7aede3a..41cc01f 100644 --- a/lisp/riece-menu.el +++ b/lisp/riece-menu.el @@ -33,8 +33,7 @@ `("Riece" ["Version" riece-version t] "----" - ["Change Window Layout" - riece-command-change-layout t] + ("Change Window Layout..." :filter riece-menu-create-layouts-menu) ["Toggle Freeze Channel Buffer" riece-command-toggle-freeze t] ["Toggle Freeze Channel Buffer Until Next Message" @@ -54,6 +53,12 @@ ("Servers" :filter riece-menu-create-servers-menu)) "Menu used in command mode.") +(defun riece-menu-create-layouts-menu (menu) + (mapcar (lambda (entry) + (vector (car entry) (list 'riece-command-change-layout (car entry)) + t)) + riece-layout-alist)) + (defun riece-menu-create-channels-menu (menu) (mapcar (lambda (channel) (list (riece-format-identity channel)