Japanese translation of message catalog for Sawfish Window-Manager
修訂 | 2e74ada9cdd651edd3c4bd7d0090a2c43dcd6405 (tree) |
---|---|
時間 | 2012-04-06 04:23:01 |
作者 | Christopher Roy Bratusek <nano@tuxf...> |
Commiter | Christopher Roy Bratusek |
Merge branch 'master' into local-master
@@ -22,7 +22,8 @@ | ||
22 | 22 | (define-structure sawfish.wm.commands.launcher |
23 | 23 | |
24 | 24 | (export xterm |
25 | - browser) | |
25 | + browser | |
26 | + filemanager) | |
26 | 27 | |
27 | 28 | (open rep |
28 | 29 | rep.system |
@@ -47,6 +48,12 @@ | ||
47 | 48 | :type string |
48 | 49 | :group (misc apps)) |
49 | 50 | |
51 | + | |
52 | + (defcustom filemanager-program "" | |
53 | + "The program launched by the 'filemanager' function. Interpreted by shell." | |
54 | + :type string | |
55 | + :group (misc apps)) | |
56 | + | |
50 | 57 | (define (xterm #!optional command) |
51 | 58 | "Start a new terminal specified by the option `xterm-program'. |
52 | 59 |
@@ -69,15 +76,24 @@ passed." | ||
69 | 76 | (system (format nil "%s %s >/dev/null 2>&1 </dev/null &" |
70 | 77 | browser-program url)))) |
71 | 78 | |
79 | + (define (filemanager #!optional url) | |
80 | + "Start a new filemanager instance." | |
81 | + (if (not url) | |
82 | + (system (format nil "%s >/dev/null 2>&1 </dev/null &" | |
83 | + filemanager-program)) | |
84 | + (system (format nil "%s %s >/dev/null 2>&1 </dev/null &" | |
85 | + filemanager-program url)))) | |
86 | + | |
72 | 87 | ;;###autoload |
73 | 88 | (define-command 'xterm xterm |
74 | 89 | #:spec "sCommand:" |
75 | 90 | #:type `(and (labelled ,(_ "Command:") string)) |
76 | - #:doc "Start a terminal. Optional command is passed with -e. The terminal is specified by variable `xterm-program' in Config -> Misc -> External Applications." | |
77 | - ) | |
91 | + #:doc "Start a terminal. Optional command is passed with -e. The terminal is specified by variable `xterm-program' in Config -> Misc -> External Applications.") | |
78 | 92 | (define-command 'browser browser |
79 | 93 | #:spec "sUrl:" |
80 | 94 | #:type `(and (labelled ,(_ "url:") string)) |
81 | - #:doc "Start browser. Url is optional. Browser program is specified by variable `browser-program' in Config -> Misc -> External Applications." | |
82 | - ) | |
83 | - ) | |
95 | + #:doc "Start browser. Url is optional. Browser program is specified by variable `browser-program' in Config -> Misc -> External Applications.") | |
96 | + (define-command 'filemanager filemanager | |
97 | + #:spec "sUrl:" | |
98 | + #:type `(and (labelled ,(_ "url:") string)) | |
99 | + #:doc "Start filemanager. Url is optional. filemanager program is specified by variable `filemanager-program' in Config -> Misc -> External Applications.")) |
@@ -45,6 +45,10 @@ | ||
45 | 45 | (unless (variable-customized-p 'browser-program) |
46 | 46 | (setq browser-program "gnome-www-browser")) |
47 | 47 | |
48 | + ;; use the GNOME filemanager | |
49 | + (unless (variable-customized-p 'filemanager-program) | |
50 | + (setq filemanager-program "nautilus")) | |
51 | + | |
48 | 52 | ;; add some GNOME menu-entries |
49 | 53 | (when (setq menu (assoc (_ "_Help") root-menu)) |
50 | 54 | (nconc menu `(() |
@@ -68,6 +72,7 @@ | ||
68 | 72 | ;; Returns nil if gnome is not found. |
69 | 73 | ;; If detected, returns t, and do also gnome support init. |
70 | 74 | (define (detect-gnome) |
71 | - (when (getenv "GNOME_DESKTOP_SESSION_ID") | |
75 | + (when (or (equal (getenv "XDG_CURRENT_DESKTOP") "GNOME") | |
76 | + (getenv "GNOME_DESKTOP_SESSION_ID")) | |
72 | 77 | (init) |
73 | 78 | t))) |
@@ -52,6 +52,10 @@ | ||
52 | 52 | (unless (variable-customized-p 'browser-program) |
53 | 53 | (setq browser-program "konqueror")) |
54 | 54 | |
55 | + ;; use the KDE filemanager | |
56 | + (unless (variable-customized-p 'filemanager-program) | |
57 | + (setq filemanager-program "dolphin")) | |
58 | + | |
55 | 59 | ;; add some KDE help menus |
56 | 60 | (when (setq menu (assoc (_ "_Help") root-menu)) |
57 | 61 | (nconc menu `(() |
@@ -80,11 +84,12 @@ | ||
80 | 84 | (system "qdbus org.kde.kded /org/freedesktop/PowerManagement Suspend &")) |
81 | 85 | (,(_ "_Hibernate from KDE") |
82 | 86 | (system "qdbus org.kde.kded /org/freedesktop/PowerManagement Hibernate &"))))))) |
83 | - | |
87 | + | |
84 | 88 | ;; Returns nil if kde is not found. |
85 | 89 | ;; If detected, returns t, and do also kde support init. |
86 | 90 | (define (detect-kde) |
87 | - (when (getenv "KDE_FULL_SESSION") | |
91 | + (when (or (equal (getenv "XDG_CURRENT_DESKTOP") KDE) | |
92 | + (getenv "KDE_FULL_SESSION")) | |
88 | 93 | (init) |
89 | 94 | t)) |
90 | 95 |
@@ -0,0 +1,73 @@ | ||
1 | +;; lxde.jl -- LXDE integration | |
2 | + | |
3 | +;; Copyright (C) 2012 Christopher Roy Bratusek <nano@tuxfamily.org> | |
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.integration.lxde | |
22 | + | |
23 | + (export detect-lxde) | |
24 | + | |
25 | + (open rep | |
26 | + rep.system | |
27 | + sawfish.wm.menus | |
28 | + sawfish.wm.misc | |
29 | + sawfish.wm.custom | |
30 | + sawfish.wm.windows | |
31 | + sawfish.wm.commands | |
32 | + sawfish.wm.commands.launcher) | |
33 | + | |
34 | + (define-structure-alias lxde-int sawfish.wm.integration.lxde) | |
35 | + | |
36 | + (define (init) | |
37 | + (let (menu) | |
38 | + (setq desktop-environment "lxde") | |
39 | + (setq want-poweroff-menu nil) | |
40 | + | |
41 | + ;; invoke the LXDE terminal instead of xterm | |
42 | + (unless (variable-customized-p 'xterm-program) | |
43 | + (setq xterm-program "lxterm")) | |
44 | + | |
45 | + ;; use the LXDE help browser and url launcher | |
46 | + ;; | |
47 | + ;; XXX LXDE does not come with a default browser | |
48 | + ;; XXX candidate for int: ?? | |
49 | + ;; | |
50 | + ;; (unless (variable-customized-p 'browser-program) | |
51 | + ;; (setq browser-program "lxde-www-browser")) | |
52 | + | |
53 | + ;; use the LXDE filemanager | |
54 | + (unless (variable-customized-p 'filemanager-program) | |
55 | + (setq filemanager-program "pcmanfm")) | |
56 | + | |
57 | + ;; add some LXDE menu-entries | |
58 | + (when (setq menu (assoc (_ "_Help") root-menu)) | |
59 | + (nconc menu `(() | |
60 | + (,(_ "LXDE _Website") (browser "http://www.lxde.org"))))) | |
61 | + | |
62 | + ;; add lxde-logout and customize menu-entries | |
63 | + (when (setq menu (assoc (_ "Sessi_on") root-menu)) | |
64 | + (nconc menu `(() | |
65 | + (,(_ "_LXSession Logout") (system "lxsession-logout &"))))) | |
66 | + | |
67 | + ;; Returns nil if lxde is not found. | |
68 | + ;; If detected, returns t, and do also lxde support init. | |
69 | + (define (detect-lxde) | |
70 | + (when (or (equal (getenv "XDG_CURRENT_DESKTKOP") "LXDE") | |
71 | + (equal (getenv "DESKTOP_SESSION") "LXDE")) | |
72 | + (init) | |
73 | + t))) |
@@ -45,6 +45,10 @@ | ||
45 | 45 | (unless (variable-customized-p 'browser-program) |
46 | 46 | (setq browser-program "mate-www-browser")) |
47 | 47 | |
48 | + ;; use the MATE filemanager | |
49 | + (unless (variable-customized-p 'filemanager-program) | |
50 | + (setq filemanager-program "caja")) | |
51 | + | |
48 | 52 | ;; add some MATE menu-entries |
49 | 53 | (when (setq menu (assoc (_ "_Help") root-menu)) |
50 | 54 | (nconc menu `(() |
@@ -68,6 +72,7 @@ | ||
68 | 72 | ;; Returns nil if mate is not found. |
69 | 73 | ;; If detected, returns t, and do also mate support init. |
70 | 74 | (define (detect-mate) |
71 | - (when (getenv "MATE_DESKTOP_SESSION_ID") | |
75 | + (when (or (equal (getenv "XDG_CURRENT_DESKTOP") "MATE") | |
76 | + (getenv "MATE_DESKTOP_SESSION_ID")) | |
72 | 77 | (init) |
73 | 78 | t))) |
@@ -31,7 +31,7 @@ | ||
31 | 31 | sawfish.wm.commands |
32 | 32 | sawfish.wm.commands.launcher) |
33 | 33 | |
34 | - (define-structure-alias razor-int sawfish.wm.integration.mate) | |
34 | + (define-structure-alias razor-int sawfish.wm.integration.razor) | |
35 | 35 | |
36 | 36 | (define (init) |
37 | 37 | (let (menu) |
@@ -54,6 +54,14 @@ | ||
54 | 54 | ;; (unless (variable-customized-p 'browser-program) |
55 | 55 | ;; (setq browser-program "razor-www-browser")) |
56 | 56 | |
57 | + ;; use the Razor-Qt filemanager | |
58 | + ;; | |
59 | + ;; XXX Razor-Qt does not come with a default filemanager | |
60 | + ;; XXX candidate: ?? | |
61 | + ;; | |
62 | + ;; (unless (variable-customized-p 'filemanager-program) | |
63 | + ;; (setq filemanager-program "razor-fm")) | |
64 | + | |
57 | 65 | ;; add some Razor-Qt menu-entries |
58 | 66 | (when (setq menu (assoc (_ "_Help") root-menu)) |
59 | 67 | (nconc menu `(() |
@@ -80,7 +88,8 @@ | ||
80 | 88 | ;; Returns nil if razor is not found. |
81 | 89 | ;; If detected, returns t, and do also razor support init. |
82 | 90 | (define (detect-razor) |
83 | - (when (or (equal (getenv "DESKTOP_SESSION") "razor") | |
91 | + (when (or (equal (getenv "XDG_CURRENT_DESKTKOP") "Razor") | |
92 | + (equal (getenv "DESKTOP_SESSION") "razor") | |
84 | 93 | (get-window-by-class "Razor-desktop" #:regex t)) |
85 | 94 | (init) |
86 | 95 | t))) |
@@ -45,6 +45,10 @@ | ||
45 | 45 | (unless (variable-customized-p 'browser-program) |
46 | 46 | (setq browser-program "midori")) |
47 | 47 | |
48 | + ;; use the XFCE filemanager | |
49 | + (unless (variable-customized-p 'filemanager-program) | |
50 | + (setq filemanager-program "thunar")) | |
51 | + | |
48 | 52 | ;; add some XFCE help menus |
49 | 53 | (when (setq menu (assoc (_ "_Help") root-menu)) |
50 | 54 | (nconc menu `(() |
@@ -77,6 +81,7 @@ | ||
77 | 81 | ;; Returns nil if xfce is not found. |
78 | 82 | ;; If detected, returns t, and do also xfce support init. |
79 | 83 | (define (detect-xfce) |
80 | - (when (get-x-property 'root '_DT_SAVE_MODE) | |
84 | + (when (or (get-x-property 'root '_DT_SAVE_MODE) | |
85 | + (equal (getenv "XDG_CURRENT_DESKTOP") "XFCE")) | |
81 | 86 | (init) |
82 | 87 | t))) |
@@ -55,7 +55,8 @@ | ||
55 | 55 | sawfish.wm.integration.gnome |
56 | 56 | sawfish.wm.integration.xfce |
57 | 57 | sawfish.wm.integration.mate |
58 | - sawfish.wm.integration.razor) | |
58 | + sawfish.wm.integration.razor | |
59 | + sawfish.wm.integration.lxde) | |
59 | 60 | |
60 | 61 | (set-binds)) |
61 | 62 |
@@ -63,10 +64,10 @@ | ||
63 | 64 | ;; apps-menu, too, or it will break. |
64 | 65 | (defvar desktop-environment "none" |
65 | 66 | "Running desktop environment, detected by Sawfish. |
66 | -Possible values are \"kde\", \"gnome\", \"mate\", \"xfce\", \"razor\" or \"none\".") | |
67 | +Possible values are \"kde\", \"gnome\", \"mate\", \"xfce\", \"razor\", \"lxde\" or \"none\".") | |
67 | 68 | |
68 | 69 | (defvar want-poweroff-menu t |
69 | - "Add poweroff menu if you don't use GNOME / KDE / XFCE.") | |
70 | + "Add poweroff menu if you don't use GNOME / KDE / XFCE / Razor-Qt / LXDE.") | |
70 | 71 | |
71 | 72 | (setq *user-structure* 'user) |
72 | 73 |
@@ -108,7 +109,8 @@ Possible values are \"kde\", \"gnome\", \"mate\", \"xfce\", \"razor\" or \"none\ | ||
108 | 109 | (sawfish.wm.integration.mate#detect-mate) |
109 | 110 | (sawfish.wm.integration.kde#detect-kde) |
110 | 111 | (sawfish.wm.integration.xfce#detect-xfce) |
111 | - (sawfish.wm.integration.razor#detect-razor)) | |
112 | + (sawfish.wm.integration.razor#detect-razor) | |
113 | + (sawfish.wm.integration.lxde#detect-lxde)) | |
112 | 114 | ) |
113 | 115 | |
114 | 116 | ;; Don't signal an error even if user "require" them. These modules |