• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Japanese translation of message catalog for Sawfish Window-Manager


Commit MetaInfo

修订版e23fced1ad164e1d42b17f3246dcffa43b68faab (tree)
时间2012-03-26 23:59:40
作者Christopher Roy Bratusek <nano@tuxf...>
CommiterChristopher Roy Bratusek

Log Message

tab-group feature

更改概述

差异

--- a/lisp/sawfish/wm/ext/match-window.jl
+++ b/lisp/sawfish/wm/ext/match-window.jl
@@ -109,6 +109,7 @@
109109 (ignored boolean)
110110 (group ,(lambda ()
111111 `(symbol ,@(delete-if-not symbolp (window-group-ids)))))
112+ (tab-group string)
112113 (ungrouped boolean)
113114 (cycle-skip boolean)
114115 (window-list-skip boolean)
@@ -274,7 +275,7 @@
274275 (remove-window-matcher-core (list (cons rules (car props)))
275276 (cdr props)))
276277 )
277-
278+
278279 (define (remove-window-matcher-core rules props)
279280 (let
280281 ((remove-from (lambda (slot)
@@ -515,6 +516,11 @@
515516 (set-screen-viewport col row)
516517 (set-window-viewport w col row))))))
517518
519+ (define-match-window-setter 'tab-group
520+ (lambda (w prop value)
521+ (declare (unused prop))
522+ (when value
523+ (window-put w 'tab-group (intern value)))))
518524
519525 (define-match-window-setter 'window-name
520526 (lambda (w prop value)
@@ -535,7 +541,7 @@
535541 ((eq value 'fullscreen)
536542 (window-put w 'queued-fullscreen-maximize t))
537543 ((eq value 'full-xinerama)
538- (window-put w 'queued-fullxinerama-maximize))
544+ (window-put w 'queued-fullxinerama-maximize t))
539545 )))
540546
541547 (define-match-window-setter 'keymap-trans
--- a/lisp/sawfish/wm/ext/window-history.jl
+++ b/lisp/sawfish/wm/ext/window-history.jl
@@ -73,7 +73,7 @@
7373
7474 ;; list of states in window-state-change-hook that should be tracked
7575 (defvar window-history-states '(sticky ignored never-focus type maximized
76- frame-style cycle-skip
76+ frame-style cycle-skip tab-group
7777 window-list-skip title-position))
7878
7979 ;; property matched on
--- a/lisp/sawfish/wm/tabs/tabgroup.jl
+++ b/lisp/sawfish/wm/tabs/tabgroup.jl
@@ -55,6 +55,9 @@
5555 (define oldgroup nil)
5656 (define tab-groups nil)
5757 (define tab-refresh-lock t)
58+ (define release-window nil)
59+ (define last-unmap-id nil)
60+ (define in-tab-group-name nil)
5861
5962 (define (window-tabbed-p w)
6063 (window-get w 'tabbed))
@@ -132,6 +135,8 @@
132135
133136 (define (tab-delete-window-from-tab-groups w)
134137 "Find window's group and remove it."
138+ (if (not release-window)
139+ (remove-from-tab-group w))
135140 (when (window-tabbed-p w)
136141 (tab-delete-window-from-group w (tab-window-group-index w))
137142 (window-put w 'fixed-position nil)
@@ -268,7 +273,9 @@ sticky, unsticky, fixed-position."
268273 (when (not (eq index index2))
269274 ;; tabgroup to tabgroup
270275 (when (window-tabbed-p w)
271- (tab-delete-window-from-tab-groups w))
276+ (setq release-window t)
277+ (tab-delete-window-from-tab-groups w)
278+ (setq release-window nil))
272279 (setq tab-refresh-lock nil)
273280 (if (window-get w 'shaded) (unshade-window w))
274281 (if (window-get win 'shaded) (unshade-window win))
@@ -303,7 +310,9 @@ sticky, unsticky, fixed-position."
303310
304311 (define (tab-release-window w)
305312 "Release the window from its group."
313+ (setq release-window t)
306314 (tab-delete-window-from-tab-groups w)
315+ (setq release-window nil)
307316 (tab-make-new-group w))
308317
309318 (define-command 'tab-release-window tab-release-window #:spec "%f")
@@ -402,7 +411,27 @@ sticky, unsticky, fixed-position."
402411 (tab-refresh-group win 'move)
403412 (tab-refresh-group win 'frame))))
404413
414+ (define (unmap-id win)
415+ (setq last-unmap-id (window-id win)))
416+
417+ (define (in-tab-group win)
418+ "Add a new window as tab if have one (the first created if more as one)
419+of the windows the same 'tab-group property"
420+ (when (window-get win 'tab-group)
421+ (setq in-tab-group-name (append in-tab-group-name (cons (cons (window-id win) (window-get win 'tab-group)))))
422+ (let ((open-win-tabgroup (get-window-by-id (car (rassoc (window-get win 'tab-group) in-tab-group-name)))))
423+ (if (and open-win-tabgroup
424+ (not (eq win open-win-tabgroup)))
425+ (tab-group-window win open-win-tabgroup)))))
426+
427+ (define (remove-from-tab-group win)
428+ "Remove window from in-tab-group-name alist if it have a 'tab-group property"
429+ (when (window-get win 'tab-group)
430+ (setq in-tab-group-name (remove (assoc last-unmap-id in-tab-group-name) in-tab-group-name))))
431+
405432 (unless batch-mode
433+ (add-hook 'after-add-window-hook in-tab-group)
434+ (add-hook 'unmap-notify-hook unmap-id)
406435 (add-hook 'window-state-change-hook
407436 (lambda (win args)
408437 (when (window-tabbed-p win)