• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

Japanese translation of message catalog for Sawfish Window-Manager


コミットメタ情報

リビジョンf5498efa0c9375fb9f71242f4a2f86a7c70c77cd (tree)
日時2010-11-03 04:30:02
作者Christopher Roy Bratusek <zanghar@free...>
コミッターChristopher Roy Bratusek

ログメッセージ

added edge-actions
final preparative tasks in hot-spots, infinite-desktop and edge-flip

変更サマリ

差分

--- a/lisp/sawfish/wm/custom.jl
+++ b/lisp/sawfish/wm/custom.jl
@@ -497,6 +497,7 @@ the user."
497497 (defgroup placement "Placement" :group misc)
498498 (defgroup stacking "Stacking" :group misc)
499499 (defgroup workspace "Workspaces")
500+ (defgroup edge-actions "Edge Actions")
500501
501502 ;;; loading user's customisations
502503
--- /dev/null
+++ b/lisp/sawfish/wm/edge/actions.jl
@@ -0,0 +1,109 @@
1+;; edge-action.jl -- Edges taken to another dimension
2+
3+;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar@freenet.de>
4+
5+;; This file is part of sawfish.
6+
7+;; sawfish is free software; you can redistribute it and/or modify it
8+;; under the terms of the GNU General Public License as published by
9+;; the Free Software Foundation; either version 2, or (at your option)
10+;; any later version.
11+
12+;; sawfish is distributed in the hope that it will be useful, but
13+;; WITHOUT ANY WARRANTY; without even the implied warranty of
14+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+;; GNU General Public License for more details.
16+
17+;; You should have received a copy of the GNU General Public License
18+;; along with sawfish; see the file COPYING. If not, write to
19+;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20+
21+(define-structure sawfish.wm.edge.actions
22+
23+ (export edges-activate)
24+
25+ (open rep
26+ rep.system
27+ sawfish.wm.misc
28+ sawfish.wm.events
29+ sawfish.wm.custom
30+ sawfish.wm.edge.util
31+ sawfish.wm.edge.flip
32+ sawfish.wm.edge.hot-spots
33+ sawfish.wm.edge.infinite-desktop)
34+
35+ (define-structure-alias edge-actions sawfish.wm.edge.actions)
36+
37+ (define func nil)
38+
39+ (defcustom edge-actions-enabled nil
40+ "Activate the screen-edges."
41+ :group edge-actions
42+ :type boolean
43+ :after-set (lambda () edges-activate))
44+
45+ (defcustom edge-actions-delay 250
46+ "Delay (in miliseconds) before the edges are activated."
47+ :group edge-actions
48+ :type number
49+ :range (50 . nil))
50+
51+ (defcustom left-edge-func 'none
52+ "Action for the left screen-edge."
53+ :group edge-actions
54+ :type (choice hot-spot viewport-drag flip-workspace flip-viewport none))
55+
56+ (defcustom top-edge-func 'none
57+ "Action for the top screen-edge."
58+ :group edge-actions
59+ :type (choice hot-spot viewport-drag flip-workspace flip-viewport none))
60+
61+ (defcustom right-edge-func 'none
62+ "Action for the right screen-edge."
63+ :group edge-actions
64+ :type (choice hot-spot viewport-drag flip-workspace flip-viewport none))
65+
66+ (defcustom bottom-edge-func 'none
67+ "Action for the bottom screen-edge."
68+ :group edge-actions
69+ :type (choice hot-spot viewport-drag flip-workspace flip-viewport none))
70+
71+ (define (edge-action-call func edge)
72+ (case func
73+ ((hot-spot)
74+ (hot-spot-activate edge))
75+ ((viewport-drag)
76+ (infinite-desktop-activate edge))
77+ ((flip-workspace)
78+ (edge-flip-activate edge 'workspace))
79+ ((flip-viewport)
80+ (edge-flip-activate edge 'viewport))))
81+
82+ (define (edge-action-init)
83+ (let ((corner (get-active-corner))
84+ (edge (get-active-edge)))
85+ (if corner
86+ (hot-spot-activate corner)
87+ (setq func nil)
88+ (cond ((eq edge 'left)
89+ (edge-action-call left-edge-func edge))
90+ ((eq edge 'right)
91+ (edge-action-call right-edge-func edge))
92+ ((eq edge 'top)
93+ (edge-action-call top-edge-func edge))
94+ ((eq edge 'bottom)
95+ (edge-action-call bottom-edge-func edge))))))
96+
97+ (define (edges-activate)
98+ (if edge-actions-enabled
99+ (progn
100+ (flippers-activate t)
101+ (unless (in-hook-p 'enter-flipper-hook edge-action-init)
102+ (add-hook 'enter-flipper-hook edge-action-init))
103+ (unless (in-hook-p 'while-moving-hook edge-action-init)
104+ (add-hook 'while-moving-hook edge-action-init)))
105+ (flippers-activate nil)
106+ (if (in-hook-p 'enter-flipper-hook edge-action-init)
107+ (remove-hook 'enter-flipper-hook edge-action-init))
108+ (if (in-hook-p 'while-moving-hook edge-action-init)
109+ (remove-hook 'while-moving-hook edge-action-init)))))
\ No newline at end of file
--- a/lisp/sawfish/wm/edge/flip.jl
+++ b/lisp/sawfish/wm/edge/flip.jl
@@ -32,20 +32,12 @@
3232 sawfish.wm.viewport
3333 sawfish.wm.workspace
3434 sawfish.wm.commands.move-resize
35- sawfish.wm.ext.workspace-grid
36- sawfish.wm.edge.flippers
37- sawfish.wm.edge.util)
35+ sawfish.wm.ext.workspace-grid)
3836
3937 (define-structure-alias edge-flip sawfish.wm.edge.flip)
4038
4139 (define ef-current-edge nil)
4240
43- (defvar before-edge-flip-hook '()
44- "Hook called immediately before edge-flipping.")
45-
46- (defvar after-edge-flip-hook '()
47- "Hook called immediately after edge-flipping.")
48-
4941 (define (edge-flip-activate edge type)
5042 (let ((ptr (query-pointer t)))
5143 (before-flip)
--- a/lisp/sawfish/wm/edge/hot-spots.jl
+++ b/lisp/sawfish/wm/edge/hot-spots.jl
@@ -29,8 +29,7 @@
2929 sawfish.wm.windows
3030 sawfish.wm.misc
3131 sawfish.wm.events
32- sawfish.wm.workspace
33- sawfish.wm.edge.util)
32+ sawfish.wm.workspace)
3433
3534 (define-structure-alias hot-spots sawfish.wm.edge.hot-spots)
3635
@@ -58,51 +57,44 @@
5857 (defvar bottom-left-corner-program nil
5958 "The program launched when hitting the bottom-left-corner.")
6059
61- (define (hot-spot-activate)
62- (cond ((eq (get-active-corner) 'top-left)
63- (unless (eq top-left-corner-program nil)
64- (if (functionp top-left-corner-program)
65- (funcall top-left-corner-program)
66- (system (concat top-left-corner-program " &")))))
67-
68- ((eq (get-active-corner) 'top-right)
69- (unless (eq top-right-corner-program nil)
70- (if (functionp top-right-corner-program)
71- (funcall top-right-corner-program)
72- (system (concat top-right-corner-program " &")))))
73-
74- ((eq (get-active-corner) 'bottom-right)
75- (unless (eq bottom-right-corner-program nil)
76- (if (functionp bottom-right-corner-program)
77- (funcall bottom-right-corner-program)
78- (system (concat bottom-right-corner-program " &")))))
79-
80- ((eq (get-active-corner) 'bottom-left)
81- (unless (eq bottom-left-corner-program nil)
82- (if (functionp bottom-left-corner-program)
83- (funcall bottom-left-corner-program)
84- (system (concat bottom-left-corner-program " &")))))
85-
86- ((eq (get-active-edge) 'left)
87- (unless (eq left-edge-program nil)
88- (if (functionp left-edge-program)
89- (funcall left-edge-program)
90- (system (concat left-edge-program " &")))))
91-
92- ((eq (get-active-edge) 'top)
93- (unless (eq top-edge-program nil)
94- (if (functionp top-edge-program)
95- (funcall top-edge-program)
96- (system (concat top-edge-program " &")))))
97-
98- ((eq (get-active-edge) 'right)
99- (unless (eq right-edge-program nil)
100- (if (functionp right-edge-program)
101- (funcall right-edge-program)
102- (system (concat right-edge-program " &")))))
103-
104- ((eq (get-active-edge) 'bottom)
105- (unless (eq bottom-edge-program nil)
106- (if (functionp bottom-edge-program)
107- (funcall bottom-edge-program)
108- (system (concat bottom-edge-program " &"))))))))
60+ (define (hot-spot-activate spot)
61+ (case spot
62+ ((top-left)
63+ (if (functionp top-left-corner-program)
64+ (funcall top-left-corner-program)
65+ (system (concat top-left-corner-program " &"))))
66+
67+ ((top-right)
68+ (if (functionp top-right-corner-program)
69+ (funcall top-right-corner-program)
70+ (system (concat top-right-corner-program " &"))))
71+
72+ ((bottom-right)
73+ (if (functionp bottom-right-corner-program)
74+ (funcall bottom-right-corner-program)
75+ (system (concat bottom-right-corner-program " &"))))
76+
77+ ((bottom-left)
78+ (if (functionp bottom-left-corner-program)
79+ (funcall bottom-left-corner-program)
80+ (system (concat bottom-left-corner-program " &"))))
81+
82+ ((left)
83+ (if (functionp left-edge-program)
84+ (funcall left-edge-program)
85+ (system (concat left-edge-program " &"))))
86+
87+ ((top)
88+ (if (functionp top-edge-program)
89+ (funcall top-edge-program)
90+ (system (concat top-edge-program " &"))))
91+
92+ ((right)
93+ (if (functionp right-edge-program)
94+ (funcall right-edge-program)
95+ (system (concat right-edge-program " &"))))
96+
97+ ((bottom)
98+ (if (functionp bottom-edge-program)
99+ (funcall bottom-edge-program)
100+ (system (concat bottom-edge-program " &")))))))
\ No newline at end of file
--- a/lisp/sawfish/wm/edge/infinite-desktop.jl
+++ b/lisp/sawfish/wm/edge/infinite-desktop.jl
@@ -27,32 +27,24 @@
2727 sawfish.wm.misc
2828 sawfish.wm.custom
2929 sawfish.wm.commands.move-cursor
30- sawfish.wm.viewport
31- sawfish.wm.util.prompt
32- sawfish.wm.edge.flippers
33- sawfish.wm.edge.util)
30+ sawfish.wm.viewport)
3431
35- (define-structure-alias infinite-desktop sawfish.wm.edge.infinite-desktop)
36-
37- (defgroup infinite-desktop "Infinite Desktop" :group workspace)
38-
39- (defcustom infinite-desktop-move-distance 64
40- "Amount to move the viewport when the pointer hits the screen edge."
41- :group (workspace infinite-desktop)
32+ (defcustom viewport-drag-distance 64
33+ "Amount to drag the viewport when the pointer hits the screen edge."
34+ :group edge-actions
4235 :type number
4336 :range (1 . nil))
4437
45- (defcustom infinite-desktop-move-cursor-distance 32
46- "Amount to pull back the cursor after moving the viewport."
47- :group (workspace infinite-desktop)
38+ (defcustom viewport-drag-cursor-distance 32
39+ "Amount to pull back the cursor after dragging the viewport."
40+ :group edge-actions
4841 :type number
4942 :range (1 . nil))
5043
51- (define (infinite-desktop-move-right)
52- "Shifts the viewport `infinite-desktop-move-distance' pixels to the
53-right."
54- (let ((dist infinite-desktop-move-distance)
55- (cdist infinite-desktop-move-cursor-distance)
44+ (define (viewport-drag-right)
45+ "Shifts the viewport `viewport-drag-distance' pixels to the right."
46+ (let ((dist viewport-drag-distance)
47+ (cdist viewport-drag-cursor-distance)
5648 (maxx (* (screen-width) (1- (car viewport-dimensions)))))
5749 (if
5850 (and (viewport-honor-workspace-edges)
@@ -61,11 +53,10 @@ right."
6153 (set-viewport (+ viewport-x-offset dist) viewport-y-offset)
6254 (move-cursor (- (min dist cdist)) 0)))
6355
64- (define (infinite-desktop-move-left)
65- "Shifts the viewport `infinite-desktop-move-distance' pixels to the
66-left."
67- (let ((dist (- infinite-desktop-move-distance))
68- (cdist (- infinite-desktop-move-cursor-distance))
56+ (define (viewport-drag-left)
57+ "Shifts the viewport `viewport-drag-distance' pixels to the left."
58+ (let ((dist (- viewport-drag-distance))
59+ (cdist (- viewport-drag-cursor-distance))
6960 (minx 0))
7061 (if
7162 (and (viewport-honor-workspace-edges)
@@ -74,10 +65,10 @@ left."
7465 (set-viewport (+ viewport-x-offset dist) viewport-y-offset)
7566 (move-cursor (- (max dist cdist)) 0)))
7667
77- (define (infinite-desktop-move-top)
78- "Shifts the viewport `infinite-desktop-move-distance' pixels up."
79- (let ((dist (- infinite-desktop-move-distance))
80- (cdist (- infinite-desktop-move-cursor-distance))
68+ (define (viewport-drag-top)
69+ "Shifts the viewport `viewport-drag-distance' pixels up."
70+ (let ((dist (- viewport-drag-distance))
71+ (cdist (- viewport-drag-cursor-distance))
8172 (miny 0))
8273 (if
8374 (and (viewport-honor-workspace-edges)
@@ -86,10 +77,10 @@ left."
8677 (set-viewport viewport-x-offset (+ viewport-y-offset dist))
8778 (move-cursor 0 (- (max dist cdist)))))
8879
89- (define (infinite-desktop-move-bottom)
90- "Shifts the viewport `infinite-desktop-move-distance' pixels down."
91- (let ((dist infinite-desktop-move-distance)
92- (cdist infinite-desktop-move-cursor-distance)
80+ (define (viewport-drag-bottom)
81+ "Shifts the viewport `viewport-drag-distance' pixels down."
82+ (let ((dist viewport-drag-distance)
83+ (cdist viewport-drag-cursor-distance)
9384 (maxy (* (screen-height) (1- (cdr viewport-dimensions)))))
9485 (if
9586 (and (viewport-honor-workspace-edges)
@@ -98,10 +89,10 @@ left."
9889 (set-viewport viewport-x-offset (+ viewport-y-offset dist))
9990 (move-cursor 0 (- (min dist cdist)))))
10091
101- (define (infinite-desktop-activate)
92+ (define (infinite-desktop-activate edge)
10293 "Called when a desktop flipper is triggered to shift the visible desktop."
103- (let ((edge (get-active-edge)))
104- (cond ((eq edge 'right) (infinite-desktop-move-right))
105- ((eq edge 'left) (infinite-desktop-move-left))
106- ((eq edge 'bottom) (infinite-desktop-move-bottom))
107- ((eq edge 'top) (infinite-desktop-move-top))))))
94+ (case edge
95+ ((left) (viewport-drag-left))
96+ ((top) (viewport-drag-top))
97+ ((right) (viewport-drag-right))
98+ ((bottom) (viewport-drag-bottom)))))
--- a/lisp/sawfish/wm/edge/util.jl
+++ b/lisp/sawfish/wm/edge/util.jl
@@ -1,6 +1,6 @@
1-;; edge-util.jl -- common utils for EdgeFlip/InfiniteDesktop/HotSpots
1+;; edge-util.jl -- common utils for EdgeActions
22
3-;; Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk>
3+;; Copyright (C) 2010 Christopher Roy Bratusek <zanghar@freenet.de>
44
55 ;; This file is part of sawfish.
66
@@ -47,13 +47,11 @@
4747 (if (in-hook-p 'randr-change-notify-hook recreate-flippers)
4848 (remove-hook 'randr-change-notify-hook recreate-flippers))))
4949
50- (defgroup hot-spot "Hot Spots" :group workspace)
51-
5250 (defcustom hot-spots-area 50
5351 "Lenght in px (in both x and y direction) wich is used as hot-spots-area."
5452 :type number
5553 :range (5 . 500)
56- :group (workspace hot-spot))
54+ :group edge-actions)
5755
5856 (define (get-active-corner)
5957 (let ((cursor-x (car (query-pointer)))