• 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

修订版99de52ea6dcdbf9a8cf4d444ac66525b7d2a4cee (tree)
时间2012-06-10 17:55:05
作者Christopher Roy Bratusek <nano@tuxf...>
CommiterChristopher Roy Bratusek

Log Message

added missing hunk for new-window-as-tab feature

更改概述

差异

--- a/lisp/sawfish/wm/tabs/tabgroup.jl
+++ b/lisp/sawfish/wm/tabs/tabgroup.jl
@@ -48,9 +48,9 @@
4848 sawfish.wm.util.groups
4949 sawfish.wm.commands.groups
5050 sawfish.wm.workspace)
51-
51+
5252 (define-structure-alias tabgroup sawfish.wm.tabs.tabgroup)
53-
53+
5454 (define current-win nil)
5555 (define all-wins nil)
5656 (define oldgroup nil)
@@ -123,7 +123,7 @@
123123 (if (eq elem (car list))
124124 0
125125 (+ 1 (tab-rank elem (cdr list)))))
126-
126+
127127 (define (tab-delete-window-from-group win index)
128128 "Remove WIN from the group at given index."
129129 (let* ((old (nth index tab-groups))
@@ -243,7 +243,7 @@ sticky, unsticky, fixed-position."
243243 (make-window-unsticky w)) unfocus))
244244 ((eq prop 'shade)
245245 (mapcar (lambda (w)
246- (shade-window w)) unfocus))
246+ (shade-window w)) unfocus))
247247 ((eq prop 'unshade)
248248 (mapcar (lambda (w)
249249 (unshade-window w)) unfocus))))
@@ -253,7 +253,7 @@ sticky, unsticky, fixed-position."
253253 (define (tab-group-window w win)
254254 "Add window W to tabgroup containing WIN."
255255 ;; don't add a window as tab, if it already
256- ;; exists on another workspace or window type
256+ ;; exists on another workspace or window type
257257 ;; is not a "normal" window (e.g. dock panel ...)
258258 (when (and (not (cdr (window-get win 'workspaces)))
259259 (equal (aref (nth 2 (get-x-property w '_NET_WM_WINDOW_TYPE)) 0) '_NET_WM_WINDOW_TYPE_NORMAL)
@@ -322,22 +322,22 @@ sticky, unsticky, fixed-position."
322322 (set-input-focus w)
323323 (if (not (window-tabbed-p win)) (window-put win 'tabbed t))
324324 (window-put w 'tabbed t)))))))
325-
325+
326326 (define (tab-release-window w)
327327 "Release the window from its group."
328328 (setq release-window nil)
329329 (tab-delete-window-from-tab-groups w)
330330 (tab-make-new-group w))
331-
331+
332332 (define-command 'tab-release-window tab-release-window #:spec "%f")
333-
333+
334334 (define (tab-group-offset win n)
335335 "Return the window at position (pos+n) in window's group."
336336 (let* ((gr (tab-group-window-list (tab-find-window win)))
337337 (size (length gr))
338338 (r (tab-rank win gr)))
339339 (nth (modulo (+ r n) size) gr)))
340-
340+
341341 (define (tab-same-group-p w1 w2)
342342 "Predicate : true <=> w1 and w2 are grouped together."
343343 (member w1 (tab-group-window-list (tab-find-window w2))))
@@ -421,7 +421,7 @@ sticky, unsticky, fixed-position."
421421 (setq all-wins nil)
422422 (setq current-win nil))
423423 (setq tab-refresh-lock t)
424- (when (window-tabbed-p win)
424+ (when (window-tabbed-p win)
425425 (tab-refresh-group win 'move)
426426 (tab-refresh-group win 'frame))))
427427
@@ -429,14 +429,20 @@ sticky, unsticky, fixed-position."
429429 (setq last-unmap-id (window-id win)))
430430
431431 (define (in-tab-group win)
432- "Add a new window as tab if have one (the first created if more as one)
432+ "Add a new window as tab if have one (the first created if more as one)
433433 of the windows the same 'tab-group property"
434- (when (window-get win 'tab-group)
435- (setq in-tab-group-name (append in-tab-group-name (cons (cons (window-id win) (window-get win 'tab-group)))))
436- (let ((open-win-tabgroup (get-window-by-id (car (rassoc (window-get win 'tab-group) in-tab-group-name)))))
437- (if (and open-win-tabgroup
438- (not (eq win open-win-tabgroup)))
439- (tab-group-window win open-win-tabgroup)))))
434+ (when (window-get win 'tab-group)
435+ (setq in-tab-group-name (append in-tab-group-name (cons (cons (window-id win) (window-get win 'tab-group)))))
436+ (let ((open-win-tabgroup (get-window-by-id (car (rassoc (window-get win 'tab-group) in-tab-group-name)))))
437+ ;; unmap-notify-hook gets not always a window-id for all
438+ ;; windows e.g. gimp (it will close more as one window and
439+ ;; also not all call the unmap-notify-hook and/or we get the window-id).
440+ ;; This next "if" will clean the list and remove the "ghosts".
441+ (if (not (eq open-win-tabgroup nil))
442+ (if (not (eq win open-win-tabgroup))
443+ (tab-group-window win open-win-tabgroup))
444+ (setq in-tab-group-name (remove (rassoc (window-get win 'tab-group) in-tab-group-name) in-tab-group-name))
445+ (in-tab-group win)))))
440446
441447 (define (remove-from-tab-group win)
442448 "Remove window from in-tab-group-name alist if it have a 'tab-group property"
@@ -466,7 +472,7 @@ of the windows the same 'tab-group property"
466472 ((eq 'stacking args)
467473 (tab-refresh-group win 'depth)
468474 (tab-refresh-group win 'frame))))))
469-
475+
470476 (add-hook 'focus-in-hook (lambda (win) (tab-group-raise win)))
471477 (when (eq move-outline-mode 'opaque)
472478 (add-hook 'before-move-hook (lambda (win) (if (window-tabbed-p win) (before-move-resize win)))))