• 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

修订版9069e71dcd4dcd61ae901781a79766311cc94302 (tree)
时间2012-06-10 17:56:15
作者Christopher Roy Bratusek <nano@tuxf...>
CommiterChristopher Roy Bratusek

Log Message

Merge branch 'misc-1.9' into local-master

更改概述

差异

--- a/lisp/sawfish/wm/tabs/tabgroup.jl
+++ b/lisp/sawfish/wm/tabs/tabgroup.jl
@@ -47,15 +47,15 @@
4747 sawfish.wm.util.groups
4848 sawfish.wm.commands.groups
4949 sawfish.wm.workspace)
50-
50+
5151 (define-structure-alias tabgroup sawfish.wm.tabs.tabgroup)
52-
52+
5353 (define current-win nil)
5454 (define all-wins nil)
5555 (define oldgroup nil)
5656 (define tab-groups nil)
5757 (define tab-refresh-lock t)
58- (define release-window nil)
58+ (define release-window t)
5959 (define last-unmap-id nil)
6060 (define in-tab-group-name nil)
6161
@@ -119,7 +119,7 @@
119119 (if (eq elem (car list))
120120 0
121121 (+ 1 (tab-rank elem (cdr list)))))
122-
122+
123123 (define (tab-delete-window-from-group win index)
124124 "Remove WIN from the group at given index."
125125 (let* ((old (nth index tab-groups))
@@ -135,8 +135,9 @@
135135
136136 (define (tab-delete-window-from-tab-groups w)
137137 "Find window's group and remove it."
138- (if (not release-window)
138+ (if release-window
139139 (remove-from-tab-group w))
140+ (setq release-window t)
140141 (when (window-tabbed-p w)
141142 (tab-delete-window-from-group w (tab-window-group-index w))
142143 (window-put w 'fixed-position nil)
@@ -237,7 +238,7 @@ sticky, unsticky, fixed-position."
237238 (make-window-unsticky w)) unfocus))
238239 ((eq prop 'shade)
239240 (mapcar (lambda (w)
240- (shade-window w)) unfocus))
241+ (shade-window w)) unfocus))
241242 ((eq prop 'unshade)
242243 (mapcar (lambda (w)
243244 (unshade-window w)) unfocus))))
@@ -247,8 +248,11 @@ sticky, unsticky, fixed-position."
247248 (define (tab-group-window w win)
248249 "Add window W to tabgroup containing WIN."
249250 ;; 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))
252256 (let* ((index (tab-window-group-index win))
253257 (index2 (tab-window-group-index w))
254258 (pos (window-position win))
@@ -273,59 +277,62 @@ sticky, unsticky, fixed-position."
273277 (when (not (eq index index2))
274278 ;; tabgroup to tabgroup
275279 (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))
279282 (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+
313321 (define (tab-release-window w)
314322 "Release the window from its group."
315- (setq release-window t)
316- (tab-delete-window-from-tab-groups w)
317323 (setq release-window nil)
324+ (tab-delete-window-from-tab-groups w)
318325 (tab-make-new-group w))
319-
326+
320327 (define-command 'tab-release-window tab-release-window #:spec "%f")
321-
328+
322329 (define (tab-group-offset win n)
323330 "Return the window at position (pos+n) in window's group."
324331 (let* ((gr (tab-group-window-list (tab-find-window win)))
325332 (size (length gr))
326333 (r (tab-rank win gr)))
327334 (nth (modulo (+ r n) size) gr)))
328-
335+
329336 (define (tab-same-group-p w1 w2)
330337 "Predicate : true <=> w1 and w2 are grouped together."
331338 (member w1 (tab-group-window-list (tab-find-window w2))))
@@ -409,7 +416,7 @@ sticky, unsticky, fixed-position."
409416 (setq all-wins nil)
410417 (setq current-win nil))
411418 (setq tab-refresh-lock t)
412- (when (window-tabbed-p win)
419+ (when (window-tabbed-p win)
413420 (tab-refresh-group win 'move)
414421 (tab-refresh-group win 'frame))))
415422
@@ -417,14 +424,20 @@ sticky, unsticky, fixed-position."
417424 (setq last-unmap-id (window-id win)))
418425
419426 (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)
421428 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)))))
428441
429442 (define (remove-from-tab-group win)
430443 "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"
454467 ((eq 'stacking args)
455468 (tab-refresh-group win 'depth)
456469 (tab-refresh-group win 'frame))))))
457-
470+
458471 (add-hook 'focus-in-hook (lambda (win) (tab-group-raise win)))
459472 (when (eq move-outline-mode 'opaque)
460473 (add-hook 'before-move-hook (lambda (win) (if (window-tabbed-p win) (before-move-resize win)))))