Japanese translation of message catalog for Sawfish Window-Manager
Revision | 99de52ea6dcdbf9a8cf4d444ac66525b7d2a4cee (tree) |
---|---|
Time | 2012-06-10 17:55:05 |
Author | Christopher Roy Bratusek <nano@tuxf...> |
Commiter | Christopher Roy Bratusek |
added missing hunk for new-window-as-tab feature
@@ -48,9 +48,9 @@ | ||
48 | 48 | sawfish.wm.util.groups |
49 | 49 | sawfish.wm.commands.groups |
50 | 50 | sawfish.wm.workspace) |
51 | - | |
51 | + | |
52 | 52 | (define-structure-alias tabgroup sawfish.wm.tabs.tabgroup) |
53 | - | |
53 | + | |
54 | 54 | (define current-win nil) |
55 | 55 | (define all-wins nil) |
56 | 56 | (define oldgroup nil) |
@@ -123,7 +123,7 @@ | ||
123 | 123 | (if (eq elem (car list)) |
124 | 124 | 0 |
125 | 125 | (+ 1 (tab-rank elem (cdr list))))) |
126 | - | |
126 | + | |
127 | 127 | (define (tab-delete-window-from-group win index) |
128 | 128 | "Remove WIN from the group at given index." |
129 | 129 | (let* ((old (nth index tab-groups)) |
@@ -243,7 +243,7 @@ sticky, unsticky, fixed-position." | ||
243 | 243 | (make-window-unsticky w)) unfocus)) |
244 | 244 | ((eq prop 'shade) |
245 | 245 | (mapcar (lambda (w) |
246 | - (shade-window w)) unfocus)) | |
246 | + (shade-window w)) unfocus)) | |
247 | 247 | ((eq prop 'unshade) |
248 | 248 | (mapcar (lambda (w) |
249 | 249 | (unshade-window w)) unfocus)))) |
@@ -253,7 +253,7 @@ sticky, unsticky, fixed-position." | ||
253 | 253 | (define (tab-group-window w win) |
254 | 254 | "Add window W to tabgroup containing WIN." |
255 | 255 | ;; 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 | |
257 | 257 | ;; is not a "normal" window (e.g. dock panel ...) |
258 | 258 | (when (and (not (cdr (window-get win 'workspaces))) |
259 | 259 | (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." | ||
322 | 322 | (set-input-focus w) |
323 | 323 | (if (not (window-tabbed-p win)) (window-put win 'tabbed t)) |
324 | 324 | (window-put w 'tabbed t))))))) |
325 | - | |
325 | + | |
326 | 326 | (define (tab-release-window w) |
327 | 327 | "Release the window from its group." |
328 | 328 | (setq release-window nil) |
329 | 329 | (tab-delete-window-from-tab-groups w) |
330 | 330 | (tab-make-new-group w)) |
331 | - | |
331 | + | |
332 | 332 | (define-command 'tab-release-window tab-release-window #:spec "%f") |
333 | - | |
333 | + | |
334 | 334 | (define (tab-group-offset win n) |
335 | 335 | "Return the window at position (pos+n) in window's group." |
336 | 336 | (let* ((gr (tab-group-window-list (tab-find-window win))) |
337 | 337 | (size (length gr)) |
338 | 338 | (r (tab-rank win gr))) |
339 | 339 | (nth (modulo (+ r n) size) gr))) |
340 | - | |
340 | + | |
341 | 341 | (define (tab-same-group-p w1 w2) |
342 | 342 | "Predicate : true <=> w1 and w2 are grouped together." |
343 | 343 | (member w1 (tab-group-window-list (tab-find-window w2)))) |
@@ -421,7 +421,7 @@ sticky, unsticky, fixed-position." | ||
421 | 421 | (setq all-wins nil) |
422 | 422 | (setq current-win nil)) |
423 | 423 | (setq tab-refresh-lock t) |
424 | - (when (window-tabbed-p win) | |
424 | + (when (window-tabbed-p win) | |
425 | 425 | (tab-refresh-group win 'move) |
426 | 426 | (tab-refresh-group win 'frame)))) |
427 | 427 |
@@ -429,14 +429,20 @@ sticky, unsticky, fixed-position." | ||
429 | 429 | (setq last-unmap-id (window-id win))) |
430 | 430 | |
431 | 431 | (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) | |
433 | 433 | 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))))) | |
440 | 446 | |
441 | 447 | (define (remove-from-tab-group win) |
442 | 448 | "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" | ||
466 | 472 | ((eq 'stacking args) |
467 | 473 | (tab-refresh-group win 'depth) |
468 | 474 | (tab-refresh-group win 'frame)))))) |
469 | - | |
475 | + | |
470 | 476 | (add-hook 'focus-in-hook (lambda (win) (tab-group-raise win))) |
471 | 477 | (when (eq move-outline-mode 'opaque) |
472 | 478 | (add-hook 'before-move-hook (lambda (win) (if (window-tabbed-p win) (before-move-resize win))))) |