[sawfish] window-ops-menu: handle matchers (make entries insensitive)
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish] window-ops-menu: handle matchers (make entries insensitive)
- Date: Sat, 16 Oct 2010 08:54:23 +0000 (UTC)
commit 343f2b176c3e9af3192564068ab8b3d0a645e054
Author: Christopher Roy Bratusek <zanghar freenet de>
Date: Sat Oct 16 10:53:37 2010 +0200
window-ops-menu: handle matchers (make entries insensitive)
lisp/sawfish/wm/menus.jl | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/lisp/sawfish/wm/menus.jl b/lisp/sawfish/wm/menus.jl
index 64e2444..dd8bfc7 100644
--- a/lisp/sawfish/wm/menus.jl
+++ b/lisp/sawfish/wm/menus.jl
@@ -88,17 +88,25 @@ before killing it.")
(defvar window-ops-menu
`((,(_ "Mi_nimize") iconify-window
(insensitive . ,(lambda (w)
- (not (window-iconifiable-p w)))))
+ (not (or (window-iconifiable-p w)
+ (not (window-get w 'never-iconify)))))))
(,(lambda (w)
(if (window-maximized-p w)
(_ "Unma_ximize")
(_ "Ma_ximize"))) maximize-window-toggle
(insensitive . ,(lambda (w)
(not (or (window-maximized-p w)
- (window-maximizable-p w))))))
- (,(_ "_Move") move-window-interactively)
- (,(_ "_Resize") resize-window-interactively)
- (,(_ "_Close") delete-window)
+ (window-maximizable-p w)
+ (not (window-get w 'never-maximize)))))))
+ (,(_ "_Move") move-window-interactively
+ (insensitive . ,(lambda (w)
+ (window-get w 'fixed-position))))
+ (,(_ "_Resize") resize-window-interactively
+ (insensitive . ,(lambda (w)
+ (window-get w 'fixed-size))))
+ (,(_ "_Close") delete-window
+ (insensitive . ,(lambda (w)
+ (window-get w 'never-delete))))
()
(,(_ "_Toggle") . window-ops-toggle-menu)
(,(_ "In _group") . window-group-menu)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]