From 4742b6b7de260ce59b460a33973c3a599454f0e2 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 19 Oct 2003 06:33:19 +0000 Subject: [PATCH] * riece-menu.el (riece-menu-create-layouts-menu): New function. (riece-menu-items): Use it. --- lisp/ChangeLog | 3 +++ lisp/riece-menu.el | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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) -- 1.7.10.4