[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-124-g9da793e

Philippe Brochard pbrochard at common-lisp.net
Thu Oct 4 07:44:08 UTC 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".

The branch, master has been updated
       via  9da793e806fb73c7abf62c8c9043e07d80531ab0 (commit)
      from  54950ffc1d508b968958b48aa3d93736e34f82cd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9da793e806fb73c7abf62c8c9043e07d80531ab0
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date:   Thu Oct 4 09:44:02 2012 +0200

    src/clfswm-menu.lisp (open-menu): Show key bindings also for menu entry.

diff --git a/ChangeLog b/ChangeLog
index e280b29..f0a05ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-04  Philippe Brochard  <pbrochard at common-lisp.net>
+
+	* src/clfswm-menu.lisp (open-menu): Show key bindings also for
+	menu entry.
+
 2012-10-03  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* src/clfswm-menu.lisp (open-menu): Show key bindings
diff --git a/src/bindings-second-mode.lisp b/src/bindings-second-mode.lisp
index 863164a..e1ca00a 100644
--- a/src/bindings-second-mode.lisp
+++ b/src/bindings-second-mode.lisp
@@ -51,8 +51,8 @@
   "Open the action by number menu"
   (open-menu (find-menu 'action-by-number-menu)))
 
-(defun open-frame-pack-menu ()
-  "Open the frame pack/fill/resize menu"
+(defun open-frame-movement-menu ()
+  "Open the frame movement menu (pack/fill/resize)"
   (open-menu (find-menu 'frame-movement-menu)))
 
 (defun open-root-menu ()
@@ -96,7 +96,7 @@
   (define-second-key ("w") 'open-window-menu)
   (define-second-key ("n") 'open-action-by-name-menu)
   (define-second-key ("u") 'open-action-by-number-menu)
-  (define-second-key ("p") 'open-frame-pack-menu)
+  (define-second-key ("p") 'open-frame-movement-menu)
   (define-second-key ("r") 'open-root-menu)
   (define-second-key ("c") 'open-child-menu)
   (define-second-key ("x") 'update-layout-managed-children-position)
diff --git a/src/clfswm-menu.lisp b/src/clfswm-menu.lisp
index 6ac0b2d..e4ae010 100644
--- a/src/clfswm-menu.lisp
+++ b/src/clfswm-menu.lisp
@@ -148,18 +148,27 @@
       (when menu
         (let ((action nil)
               (old-info-keys (copy-hash-table *info-keys*)))
-          (labels ((populate-menu ()
+          (labels ((menu-entry (item value)
+                     (list (list (format nil "~A" (menu-item-key item)) *menu-color-menu-key*)
+                           (list (format nil ": < ~A >" (menu-doc value)) *menu-color-submenu*)
+                           (list (format nil " ~A" (find-associated-key-bindings
+                                                    (create-symbol 'open- (menu-name value))))
+                                 *menu-key-bound-color*)))
+                   (menu-comment (item)
+                     (list (list (format nil "~A" (menu-item-value item)) *menu-color-comment*)))
+                   (menu-line (item value)
+                     (list (list (format nil "~A" (menu-item-key item)) *menu-color-key*)
+                           (format nil ": ~A" (documentation value 'function))
+                           (list (format nil " ~A" (find-associated-key-bindings value))
+                                 *menu-key-bound-color*)))
+                   (populate-menu ()
                      (let ((info-list nil))
                        (dolist (item (menu-item menu))
                          (let ((value (menu-item-value item)))
                            (push (typecase value
-                                   (menu (list (list (format nil "~A" (menu-item-key item)) *menu-color-menu-key*)
-                                               (list (format nil ": < ~A >" (menu-doc value)) *menu-color-submenu*)))
-                                   (string (list (list (format nil "~A" (menu-item-value item)) *menu-color-comment*)))
-                                   (t (list (list (format nil "~A" (menu-item-key item)) *menu-color-key*)
-                                            (format nil ": ~A" (documentation value 'function))
-                                            (list (format nil " ~A" (find-associated-key-bindings value))
-                                                  *menu-key-bound-color*))))
+                                   (menu (menu-entry item value))
+                                   (string (menu-comment item))
+                                   (t (menu-line item value)))
                                  info-list)
                            (when (menu-item-key item)
                              (define-info-key-fun (list (menu-item-key item))
diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp
index d10659d..6a298f3 100644
--- a/src/clfswm-util.lisp
+++ b/src/clfswm-util.lisp
@@ -976,11 +976,13 @@ For window: set current child to window or its parent according to window-parent
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (defmacro with-movement (&body body)
   `(when (frame-p (current-child))
-     , at body
-     (show-all-children)
-     (display-all-frame-info)
-     (draw-second-mode-window)
-     (open-menu (find-menu 'frame-movement-menu))))
+     (unwind-protect
+          (progn
+            , at body)
+       (show-all-children)
+       (display-all-frame-info)
+       (draw-second-mode-window)
+       (open-menu (find-menu 'frame-movement-menu)))))
 
 
 ;;; Pack
diff --git a/src/menu-def.lisp b/src/menu-def.lisp
index d2d6693..2358cd9 100644
--- a/src/menu-def.lisp
+++ b/src/menu-def.lisp
@@ -121,31 +121,31 @@
 (add-sub-menu 'frame-movement-menu "f" 'frame-fill-menu "Frame fill menu")
 (add-sub-menu 'frame-movement-menu "r" 'frame-resize-menu "Frame resize menu")
 (add-menu-key 'frame-movement-menu "c" 'center-current-frame)
-(add-menu-key 'frame-movement-menu "Right" 'with-movement-select-next-brother)
-(add-menu-key 'frame-movement-menu "Left" 'with-movement-select-previous-brother)
-(add-menu-key 'frame-movement-menu "Up" 'with-movement-select-next-level)
-(add-menu-key 'frame-movement-menu "Down" 'with-movement-select-previous-level)
-(add-menu-key 'frame-movement-menu "Tab" 'with-movement-select-next-child)
+(add-menu-key 'frame-movement-menu "R" 'with-movement-select-next-brother)
+(add-menu-key 'frame-movement-menu "L" 'with-movement-select-previous-brother)
+(add-menu-key 'frame-movement-menu "U" 'with-movement-select-next-level)
+(add-menu-key 'frame-movement-menu "D" 'with-movement-select-previous-level)
+(add-menu-key 'frame-movement-menu "T" 'with-movement-select-next-child)
 
 
-(add-menu-key 'frame-pack-menu "Up" 'current-frame-pack-up)
-(add-menu-key 'frame-pack-menu "Down" 'current-frame-pack-down)
-(add-menu-key 'frame-pack-menu "Left" 'current-frame-pack-left)
-(add-menu-key 'frame-pack-menu "Right" 'current-frame-pack-right)
+(add-menu-key 'frame-pack-menu "u" 'current-frame-pack-up)
+(add-menu-key 'frame-pack-menu "d" 'current-frame-pack-down)
+(add-menu-key 'frame-pack-menu "l" 'current-frame-pack-left)
+(add-menu-key 'frame-pack-menu "r" 'current-frame-pack-right)
 
 
-(add-menu-key 'frame-fill-menu "Up" 'current-frame-fill-up)
-(add-menu-key 'frame-fill-menu "Down" 'current-frame-fill-down)
-(add-menu-key 'frame-fill-menu "Left" 'current-frame-fill-left)
-(add-menu-key 'frame-fill-menu "Right" 'current-frame-fill-right)
+(add-menu-key 'frame-fill-menu "u" 'current-frame-fill-up)
+(add-menu-key 'frame-fill-menu "d" 'current-frame-fill-down)
+(add-menu-key 'frame-fill-menu "l" 'current-frame-fill-left)
+(add-menu-key 'frame-fill-menu "r" 'current-frame-fill-right)
 (add-menu-key 'frame-fill-menu "a" 'current-frame-fill-all-dir)
 (add-menu-key 'frame-fill-menu "v" 'current-frame-fill-vertical)
 (add-menu-key 'frame-fill-menu "h" 'current-frame-fill-horizontal)
 
-(add-menu-key 'frame-resize-menu "Up" 'current-frame-resize-up)
-(add-menu-key 'frame-resize-menu "Down" 'current-frame-resize-down)
-(add-menu-key 'frame-resize-menu "Left" 'current-frame-resize-left)
-(add-menu-key 'frame-resize-menu "Right" 'current-frame-resize-right)
+(add-menu-key 'frame-resize-menu "u" 'current-frame-resize-up)
+(add-menu-key 'frame-resize-menu "d" 'current-frame-resize-down)
+(add-menu-key 'frame-resize-menu "l" 'current-frame-resize-left)
+(add-menu-key 'frame-resize-menu "r" 'current-frame-resize-right)
 (add-menu-key 'frame-resize-menu "a" 'current-frame-resize-all-dir)
 (add-menu-key 'frame-resize-menu "m" 'current-frame-resize-all-dir-minimal)
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                     |    5 +++++
 src/bindings-second-mode.lisp |    6 +++---
 src/clfswm-menu.lisp          |   25 +++++++++++++++++--------
 src/clfswm-util.lisp          |   12 +++++++-----
 src/menu-def.lisp             |   34 +++++++++++++++++-----------------
 5 files changed, 49 insertions(+), 33 deletions(-)


hooks/post-receive
-- 
CLFSWM - A(nother) Common Lisp FullScreen Window Manager




More information about the clfswm-cvs mailing list