Japanese translation of message catalog for Sawfish Window-Manager
Revision | 5ddc22d62b2940df6cc7692aeda356b58561a913 (tree) |
---|---|
Time | 2014-08-28 03:21:43 |
Author | Christopher Roy Bratusek <nano@jpbe...> |
Commiter | Christopher Roy Bratusek |
more robustness for image widget aswell (only update the preview if the image actually exists),
also ensure set-wallpaper is only called, when init-wallpaper is set (might get called from sawfish-config :after-set even if init-wallpaper is unset),
check wallpaper-setter properly against program-exists-p or file-exists-p (the former check might be useful, when the value is set from ~.sawfish/rc with only the application name, without full path - the latter is the valid check when wallpaper-setter is set from sawfish-config)
@@ -53,7 +53,7 @@ | ||
53 | 53 | (when (not (eq x ())) |
54 | 54 | (when (and (file-exists-p x) x) |
55 | 55 | (gtk-file-chooser-select-filename selector x)) |
56 | - (when (and (stringp x) x) | |
56 | + (when (and (file-exists-p x) (stringp x) x) | |
57 | 57 | (gtk-image-set-from-pixbuf image-preview |
58 | 58 | (gdk-pixbuf-new-from-file-at-scale x 150 -1 t)))))) |
59 | 59 | ((clear) (lambda () |
@@ -26,8 +26,10 @@ | ||
26 | 26 | set-wallpaper-xfce) |
27 | 27 | |
28 | 28 | (open rep |
29 | + rep.regexp | |
29 | 30 | rep.system |
30 | 31 | rep.io.files |
32 | + rep.util.misc | |
31 | 33 | sawfish.wm |
32 | 34 | sawfish.wm.custom) |
33 | 35 |
@@ -89,7 +91,8 @@ | ||
89 | 91 | :after-set (lambda () (set-wallpaper))) |
90 | 92 | |
91 | 93 | (define (set-wallpaper) |
92 | - (when (file-exists-p root-wallpaper) | |
94 | + (when (and init-wallpaper | |
95 | + (file-exists-p root-wallpaper)) | |
93 | 96 | (when set-wallpaper-xfce4 |
94 | 97 | (set-wallpaper-xfce)) |
95 | 98 | (when set-wallpaper-gnome2 |
@@ -98,7 +101,8 @@ | ||
98 | 101 | (not (eq desktop-environment "gnome")) |
99 | 102 | (not (eq desktop-environment "xfce"))) |
100 | 103 | (setq wallpaper-filename (concat " \"" root-wallpaper "\"")) |
101 | - (when (program-exists-p wallpaper-setter) | |
104 | + (when (or (program-exists-p (cdr (string-split "/" wallpaper-setter))) | |
105 | + (file-exists-p wallpaper-setter)) | |
102 | 106 | (system (concat wallpaper-setter " " wallpaper-setter-args " " wallpaper-filename " &")))))) |
103 | 107 | |
104 | 108 | (defvar gnome-type nil) |