Japanese translation of message catalog for Sawfish Window-Manager
リビジョン | 4d6e27d749d9e24b9db25629aca08dbe501f4aca (tree) |
---|---|
日時 | 2013-04-16 04:28:09 |
作者 | Jose Antonio Ortega Ruiz <jao@gnu....> |
コミッター | Jose Antonio Ortega Ruiz |
New #:master predicate for wm.tile.tall/tall-tiling
One can now specify a predicate that will be used to select which
window(s) can occupay the master pane in tall tilings.
@@ -28,6 +28,9 @@ | ||
28 | 28 | automatically whenever a new window is created (default: #t). |
29 | 29 | - =right= A boolean indicating whether the main window should be |
30 | 30 | placed to the right rather than to the left side (default: #f). |
31 | + - =master= A function taking a window and returning a boolean | |
32 | + indicating whether the given window can occupy the main pane | |
33 | + (default: =(lambda () #t)=). | |
31 | 34 | |
32 | 35 | - *column tile* Divide the screen in the given number of columns and |
33 | 36 | distributed windows among them. All columns have the same width |
@@ -27,12 +27,13 @@ | ||
27 | 27 | |
28 | 28 | (define (tall-tiling n #!key |
29 | 29 | (width 2) (top 0) (bottom 0) (gap 0) |
30 | - (max 2) (auto t) (right #f)) | |
30 | + (max 2) (auto t) (right #f) (master #f)) | |
31 | 31 | (register-workspace-tiler n |
32 | 32 | tall-tiler |
33 | 33 | (list width top bottom gap max right) |
34 | 34 | auto |
35 | - 'tall-tiler)) | |
35 | + 'tall-tiler | |
36 | + master)) | |
36 | 37 | |
37 | 38 | (define (tall-tiler master ignore) |
38 | 39 | (let ((windows (tileable-windows ignore))) |
@@ -46,9 +46,9 @@ | ||
46 | 46 | (list (lambda () |
47 | 47 | (restore-windows current-workspace)))) |
48 | 48 | |
49 | - (define (register-workspace-tiler ws tiler args auto #!optional name) | |
49 | + (define (register-workspace-tiler ws tiler args auto #!optional name picker) | |
50 | 50 | (let ((curr (assoc ws %tilers)) |
51 | - (new (list tiler args auto name))) | |
51 | + (new (list tiler args auto name (or picker (lambda (w) #t))))) | |
52 | 52 | (if (null curr) |
53 | 53 | (setq %tilers (cons (list ws new null-tiler) %tilers)) |
54 | 54 | (setcdr curr (cons new (cdr curr)))))) |
@@ -79,6 +79,8 @@ | ||
79 | 79 | |
80 | 80 | (define (tiling-name ti) (nth 3 ti)) |
81 | 81 | |
82 | + (define (tiling-master-picker ti) (nth 4 ti)) | |
83 | + | |
82 | 84 | (define (tileable-windows #!optional ignore) |
83 | 85 | (let ((ws (tileable-workspace-windows ignore)) |
84 | 86 | (tp (nth 2 (tiling)))) |
@@ -86,11 +88,18 @@ | ||
86 | 88 | |
87 | 89 | (define (current-tiler-name) (tiling-name (tiling))) |
88 | 90 | |
91 | + (define (pick ti master ignore) | |
92 | + (let ((test (tiling-master-picker ti))) | |
93 | + (or (and master (not (eq master ignore)) (test master) master) | |
94 | + (let ((wl (tileable-workspace-windows ignore))) | |
95 | + (or (car (filter test wl)) master (car wl)))))) | |
96 | + | |
89 | 97 | (define (tile-workspace #!optional new-window destroyed-window) |
90 | 98 | (interactive) |
91 | 99 | (let ((ti (tiling))) |
92 | 100 | (when ti |
93 | - ((tiling-tiler ti) new-window destroyed-window)))) | |
101 | + ((tiling-tiler ti) (pick ti new-window destroyed-window) | |
102 | + destroyed-window)))) | |
94 | 103 | |
95 | 104 | (define (untile-window w) |
96 | 105 | (interactive "%f") |