Japanese translation of message catalog for Sawfish Window-Manager
修订版 | 9069e71dcd4dcd61ae901781a79766311cc94302 (tree) |
---|---|
时间 | 2012-06-10 17:56:15 |
作者 | Christopher Roy Bratusek <nano@tuxf...> |
Commiter | Christopher Roy Bratusek |
Merge branch 'misc-1.9' into local-master
@@ -47,15 +47,15 @@ | ||
47 | 47 | sawfish.wm.util.groups |
48 | 48 | sawfish.wm.commands.groups |
49 | 49 | sawfish.wm.workspace) |
50 | - | |
50 | + | |
51 | 51 | (define-structure-alias tabgroup sawfish.wm.tabs.tabgroup) |
52 | - | |
52 | + | |
53 | 53 | (define current-win nil) |
54 | 54 | (define all-wins nil) |
55 | 55 | (define oldgroup nil) |
56 | 56 | (define tab-groups nil) |
57 | 57 | (define tab-refresh-lock t) |
58 | - (define release-window nil) | |
58 | + (define release-window t) | |
59 | 59 | (define last-unmap-id nil) |
60 | 60 | (define in-tab-group-name nil) |
61 | 61 |
@@ -119,7 +119,7 @@ | ||
119 | 119 | (if (eq elem (car list)) |
120 | 120 | 0 |
121 | 121 | (+ 1 (tab-rank elem (cdr list))))) |
122 | - | |
122 | + | |
123 | 123 | (define (tab-delete-window-from-group win index) |
124 | 124 | "Remove WIN from the group at given index." |
125 | 125 | (let* ((old (nth index tab-groups)) |
@@ -135,8 +135,9 @@ | ||
135 | 135 | |
136 | 136 | (define (tab-delete-window-from-tab-groups w) |
137 | 137 | "Find window's group and remove it." |
138 | - (if (not release-window) | |
138 | + (if release-window | |
139 | 139 | (remove-from-tab-group w)) |
140 | + (setq release-window t) | |
140 | 141 | (when (window-tabbed-p w) |
141 | 142 | (tab-delete-window-from-group w (tab-window-group-index w)) |
142 | 143 | (window-put w 'fixed-position nil) |
@@ -237,7 +238,7 @@ sticky, unsticky, fixed-position." | ||
237 | 238 | (make-window-unsticky w)) unfocus)) |
238 | 239 | ((eq prop 'shade) |
239 | 240 | (mapcar (lambda (w) |
240 | - (shade-window w)) unfocus)) | |
241 | + (shade-window w)) unfocus)) | |
241 | 242 | ((eq prop 'unshade) |
242 | 243 | (mapcar (lambda (w) |
243 | 244 | (unshade-window w)) unfocus)))) |
@@ -247,8 +248,11 @@ sticky, unsticky, fixed-position." | ||
247 | 248 | (define (tab-group-window w win) |
248 | 249 | "Add window W to tabgroup containing WIN." |
249 | 250 | ;; don't add a window as tab, if it already |
250 | - ;; exists on another workspace | |
251 | - (when (not (cdr (window-get win 'workspaces))) | |
251 | + ;; exists on another workspace or window type | |
252 | + ;; is not a "normal" window (e.g. dock panel ...) | |
253 | + (when (and (not (cdr (window-get win 'workspaces))) | |
254 | + (equal (aref (nth 2 (get-x-property w '_NET_WM_WINDOW_TYPE)) 0) '_NET_WM_WINDOW_TYPE_NORMAL) | |
255 | + (equal (aref (nth 2 (get-x-property win '_NET_WM_WINDOW_TYPE)) 0) '_NET_WM_WINDOW_TYPE_NORMAL)) | |
252 | 256 | (let* ((index (tab-window-group-index win)) |
253 | 257 | (index2 (tab-window-group-index w)) |
254 | 258 | (pos (window-position win)) |
@@ -273,59 +277,62 @@ sticky, unsticky, fixed-position." | ||
273 | 277 | (when (not (eq index index2)) |
274 | 278 | ;; tabgroup to tabgroup |
275 | 279 | (when (window-tabbed-p w) |
276 | - (setq release-window t) | |
277 | - (tab-delete-window-from-tab-groups w) | |
278 | - (setq release-window nil)) | |
280 | + (setq release-window nil) | |
281 | + (tab-delete-window-from-tab-groups w)) | |
279 | 282 | (if (window-get win 'iconified) (uniconify-window win)) |
280 | - (if (window-get win 'shaded) (unshade-window win)) | |
281 | - (setq tab-refresh-lock nil) | |
282 | - (if (window-get w 'iconified) (uniconify-window w)) | |
283 | - (if (window-get w 'shaded) (unshade-window w)) | |
284 | - (window-put w 'frame-style group-frame-style) | |
285 | - (window-put w 'type group-frame-type) | |
286 | - (window-put w 'focus-mode group-frame-focus-mode) | |
287 | - (window-put w 'gravity group-frame-gravity) | |
288 | - (window-put w 'title-position group-frame-title-position) | |
289 | - (window-put w 'sticky group-frame-sticky) | |
290 | - (window-put w 'sticky-viewport group-frame-sticky-viewport) | |
291 | - (window-put w 'never-iconify group-frame-never-iconify) | |
292 | - (window-put w 'depth group-frame-depth) | |
293 | - (window-put w 'fixed-position group-frame-fixed-position) | |
294 | - (window-put w 'never-maximize group-frame-never-maximize) | |
295 | - (window-put w 'maximized-vertically group-frame-maximized-vertically) | |
296 | - (window-put w 'maximized-horizontally group-frame-maximized-horizontally) | |
297 | - (window-put w 'maximized-fullscreen group-frame-maximized-fullscreen) | |
298 | - (window-put w 'unmaximized-type group-frame-unmaximized-type) | |
299 | - (window-put w 'unmaximized-geometry group-frame-unmaximized-geometry) | |
300 | - ;; reframe w here, tab-refresh-group expectet | |
301 | - ;; the same frame for w and win | |
302 | - (reframe-window w) | |
303 | - (tab-put-window-in-group w index) | |
304 | - (tab-delete-window-from-group w index2) | |
305 | - (resize-window-to w (car dim) (cdr dim)) | |
306 | - (move-window-to w (car pos) (cdr pos)) | |
307 | - (setq tab-refresh-lock t) | |
308 | - (tab-refresh-group w 'frame) | |
309 | - (set-input-focus w) | |
310 | - (if (not (window-tabbed-p win)) (window-put win 'tabbed t)) | |
311 | - (window-put w 'tabbed t))))) | |
312 | - | |
283 | + (let ((group-frame-to-workspaces (car (window-workspaces win)))) | |
284 | + (if (window-get win 'shaded) (unshade-window win)) | |
285 | + (setq tab-refresh-lock nil) | |
286 | + (if (window-get w 'iconified) (uniconify-window w)) | |
287 | + (let ((group-frame-from-workspaces (car (window-workspaces w)))) | |
288 | + (if (window-get w 'shaded) (unshade-window w)) | |
289 | + (window-put w 'frame-style group-frame-style) | |
290 | + (window-put w 'type group-frame-type) | |
291 | + (window-put w 'focus-mode group-frame-focus-mode) | |
292 | + (window-put w 'gravity group-frame-gravity) | |
293 | + (window-put w 'title-position group-frame-title-position) | |
294 | + (window-put w 'sticky group-frame-sticky) | |
295 | + (window-put w 'sticky-viewport group-frame-sticky-viewport) | |
296 | + (window-put w 'never-iconify group-frame-never-iconify) | |
297 | + (window-put w 'depth group-frame-depth) | |
298 | + (window-put w 'fixed-position group-frame-fixed-position) | |
299 | + (window-put w 'never-maximize group-frame-never-maximize) | |
300 | + (window-put w 'maximized-vertically group-frame-maximized-vertically) | |
301 | + (window-put w 'maximized-horizontally group-frame-maximized-horizontally) | |
302 | + (window-put w 'maximized-fullscreen group-frame-maximized-fullscreen) | |
303 | + (window-put w 'unmaximized-type group-frame-unmaximized-type) | |
304 | + (window-put w 'unmaximized-geometry group-frame-unmaximized-geometry) | |
305 | + ;; reframe w here, tab-refresh-group expectet | |
306 | + ;; the same frame for w and win | |
307 | + (reframe-window w) | |
308 | + (tab-put-window-in-group w index) | |
309 | + (tab-delete-window-from-group w index2) | |
310 | + (resize-window-to w (car dim) (cdr dim)) | |
311 | + (move-window-to w (car pos) (cdr pos)) | |
312 | + (when (and group-frame-to-workspaces group-frame-from-workspaces | |
313 | + (not (eq group-frame-to-workspaces group-frame-from-workspaces))) | |
314 | + (move-window-to-workspace w group-frame-from-workspaces group-frame-to-workspaces)) | |
315 | + (setq tab-refresh-lock t) | |
316 | + (tab-refresh-group w 'frame) | |
317 | + (set-input-focus w) | |
318 | + (if (not (window-tabbed-p win)) (window-put win 'tabbed t)) | |
319 | + (window-put w 'tabbed t))))))) | |
320 | + | |
313 | 321 | (define (tab-release-window w) |
314 | 322 | "Release the window from its group." |
315 | - (setq release-window t) | |
316 | - (tab-delete-window-from-tab-groups w) | |
317 | 323 | (setq release-window nil) |
324 | + (tab-delete-window-from-tab-groups w) | |
318 | 325 | (tab-make-new-group w)) |
319 | - | |
326 | + | |
320 | 327 | (define-command 'tab-release-window tab-release-window #:spec "%f") |
321 | - | |
328 | + | |
322 | 329 | (define (tab-group-offset win n) |
323 | 330 | "Return the window at position (pos+n) in window's group." |
324 | 331 | (let* ((gr (tab-group-window-list (tab-find-window win))) |
325 | 332 | (size (length gr)) |
326 | 333 | (r (tab-rank win gr))) |
327 | 334 | (nth (modulo (+ r n) size) gr))) |
328 | - | |
335 | + | |
329 | 336 | (define (tab-same-group-p w1 w2) |
330 | 337 | "Predicate : true <=> w1 and w2 are grouped together." |
331 | 338 | (member w1 (tab-group-window-list (tab-find-window w2)))) |
@@ -409,7 +416,7 @@ sticky, unsticky, fixed-position." | ||
409 | 416 | (setq all-wins nil) |
410 | 417 | (setq current-win nil)) |
411 | 418 | (setq tab-refresh-lock t) |
412 | - (when (window-tabbed-p win) | |
419 | + (when (window-tabbed-p win) | |
413 | 420 | (tab-refresh-group win 'move) |
414 | 421 | (tab-refresh-group win 'frame)))) |
415 | 422 |
@@ -417,14 +424,20 @@ sticky, unsticky, fixed-position." | ||
417 | 424 | (setq last-unmap-id (window-id win))) |
418 | 425 | |
419 | 426 | (define (in-tab-group win) |
420 | - "Add a new window as tab if have one (the first created if more as one) | |
427 | + "Add a new window as tab if have one (the first created if more as one) | |
421 | 428 | of the windows the same 'tab-group property" |
422 | - (when (window-get win 'tab-group) | |
423 | - (setq in-tab-group-name (append in-tab-group-name (cons (cons (window-id win) (window-get win 'tab-group))))) | |
424 | - (let ((open-win-tabgroup (get-window-by-id (car (rassoc (window-get win 'tab-group) in-tab-group-name))))) | |
425 | - (if (and open-win-tabgroup | |
426 | - (not (eq win open-win-tabgroup))) | |
427 | - (tab-group-window win open-win-tabgroup))))) | |
429 | + (when (window-get win 'tab-group) | |
430 | + (setq in-tab-group-name (append in-tab-group-name (cons (cons (window-id win) (window-get win 'tab-group))))) | |
431 | + (let ((open-win-tabgroup (get-window-by-id (car (rassoc (window-get win 'tab-group) in-tab-group-name))))) | |
432 | + ;; unmap-notify-hook gets not always a window-id for all | |
433 | + ;; windows e.g. gimp (it will close more as one window and | |
434 | + ;; also not all call the unmap-notify-hook and/or we get the window-id). | |
435 | + ;; This next "if" will clean the list and remove the "ghosts". | |
436 | + (if (not (eq open-win-tabgroup nil)) | |
437 | + (if (not (eq win open-win-tabgroup)) | |
438 | + (tab-group-window win open-win-tabgroup)) | |
439 | + (setq in-tab-group-name (remove (rassoc (window-get win 'tab-group) in-tab-group-name) in-tab-group-name)) | |
440 | + (in-tab-group win))))) | |
428 | 441 | |
429 | 442 | (define (remove-from-tab-group win) |
430 | 443 | "Remove window from in-tab-group-name alist if it have a 'tab-group property" |
@@ -454,7 +467,7 @@ of the windows the same 'tab-group property" | ||
454 | 467 | ((eq 'stacking args) |
455 | 468 | (tab-refresh-group win 'depth) |
456 | 469 | (tab-refresh-group win 'frame)))))) |
457 | - | |
470 | + | |
458 | 471 | (add-hook 'focus-in-hook (lambda (win) (tab-group-raise win))) |
459 | 472 | (when (eq move-outline-mode 'opaque) |
460 | 473 | (add-hook 'before-move-hook (lambda (win) (if (window-tabbed-p win) (before-move-resize win))))) |