Japanese translation of message catalog for Sawfish Window-Manager
Revisão | 0d4c407c4faf1b7bfe0af56aaa6ebc4cb4e83566 (tree) |
---|---|
Hora | 2011-03-01 13:35:15 |
Autor | Teika kazura <teika@lava...> |
Commiter | Teika kazura |
Improvements in doc on apps-menu. One minor fix in filtering.
- In apps-menu-filter, it was attempted to accept a lisp expression.
- news.texi and OPTIONS are updated, too.
- It includes whitespace fix.
@@ -174,16 +174,10 @@ | ||
174 | 174 | ;; "Your own applications menu entries. It is followed by auto generated |
175 | 175 | ;: applications menu.") |
176 | 176 | |
177 | -;; (defvar-setq apps-menu-show-all nil | |
178 | -;; "Some entries are hidden from the menu, for example GNOME specific | |
179 | -;; applications like eog, nautilus or evince. | |
180 | -;; | |
181 | -;; Settings this variable to 'nil will generate | |
182 | -;; a menu that honours NoDisplay, Hidden OnlyShowIn and NotShowIn fields. | |
183 | -;; In other words it generates the same menu like GNOME or KDE. | |
184 | -;; If this variable is set to 'maybe the NoDisplay and Hidden fields are | |
185 | -;; ignored, while NotShowIn and OnlyShowIn are respected. | |
186 | -;; At last if you choose 't all four fields are ignored.") | |
177 | +;; (defvar-setq apps-menu-filter 'default | |
178 | +;; "The filter to use while generating `apps-menu'. It can be | |
179 | +;; a symbol `default', `some', a function, or nil. See the info manual | |
180 | +;; \"Applications Menu\" section for the full description.") | |
187 | 181 | |
188 | 182 | ;; (defvar-setq desktop-directory '("/usr/share/applications") |
189 | 183 | ;; "List of directories to look for *.desktop files") |
@@ -58,7 +58,7 @@ | ||
58 | 58 | sawfish.wm.menus |
59 | 59 | sawfish.wm.commands |
60 | 60 | sawfish.wm.commands.launcher) |
61 | - | |
61 | + | |
62 | 62 | (define-structure-alias apps-menu sawfish.wm.ext.apps-menu) |
63 | 63 | |
64 | 64 | ;; User Options |
@@ -73,11 +73,11 @@ applications menu.") | ||
73 | 73 | |
74 | 74 | (defvar apps-menu-filter 'default |
75 | 75 | "The filter to use while generating the `apps-menu'. The default filters |
76 | -include `fdo-toplevel-filter' `fdo-nodisplay-filter' `fdo-hidden-filter' | |
77 | -`fdo-onlyshowin-filter' and `fdo-notshowin-filter'. Can also be set with | |
78 | -'default or 'some, both of which are combinations of the default filters, | |
79 | -'default uses them all and 'some only uses `fdo-notshowin-filter' and | |
80 | -`fdo-onlyshowin-filter'. This can be set to 'nil or '() to perform no | |
76 | +include `fdo-toplevel-filter' `fdo-nodisplay-filter' `fdo-hidden-filter' | |
77 | +`fdo-onlyshowin-filter' and `fdo-notshowin-filter'. Can also be set with | |
78 | +'default or 'some, both of which are combinations of the default filters, | |
79 | +'default uses them all and 'some only uses `fdo-notshowin-filter' and | |
80 | +`fdo-onlyshowin-filter'. This can be set to 'nil or '() to perform no | |
81 | 81 | filtering on the `apps-menu'.") |
82 | 82 | |
83 | 83 | (defvar apps-menu-associate-categories t |
@@ -90,7 +90,7 @@ filtering on the `apps-menu'.") | ||
90 | 90 | "Sort the apps menu alphabetically.") |
91 | 91 | |
92 | 92 | (defvar apps-menu-lang nil |
93 | - "Language for applications menu, in string. Default is set from locale.") | |
93 | + "Human language for applications menu, in string. Default is set from locale.") | |
94 | 94 | |
95 | 95 | ;; The Master Category List |
96 | 96 |
@@ -130,7 +130,7 @@ filtering on the `apps-menu'.") | ||
130 | 130 | "FileManager" "X-FileSystemMount" "Compression")) |
131 | 131 | ("System" . ("X-SystemSchedule" "System" "X-SystemMemory" "Emulator" |
132 | 132 | "TerminalEmulator" "Printing" "Monitor" "Security")) |
133 | - ("Settings" . ("Settings" "HardwareSettings" "PackageManager" | |
133 | + ("Settings" . ("Settings" "HardwareSettings" "PackageManager" | |
134 | 134 | "X-GNOME-PersonalSettings" "DesktopSettings")) |
135 | 135 | ("Exiles" . ("Exile")))) |
136 | 136 |
@@ -144,7 +144,7 @@ filtering on the `apps-menu'.") | ||
144 | 144 | "Return `t' if `instring' should be skipped." |
145 | 145 | (or (eq (aref instring 0) ?#) |
146 | 146 | (eq (aref instring 0) ?\n))) |
147 | - | |
147 | + | |
148 | 148 | (define (check-if-desktop-stream instream) |
149 | 149 | "Check for the `[Desktop Entry]' line in `instream'" |
150 | 150 | (let ((line (read-line instream))) |
@@ -153,7 +153,7 @@ filtering on the `apps-menu'.") | ||
153 | 153 | 't |
154 | 154 | (when (fdo-skip-line-p line) |
155 | 155 | (check-if-desktop-stream instream)))))) |
156 | - | |
156 | + | |
157 | 157 | (define (desktop-file-p directory-file) |
158 | 158 | "Quickly check if `directory-file' is a `*.desktop' file." |
159 | 159 | (condition-case nil |
@@ -161,9 +161,9 @@ filtering on the `apps-menu'.") | ||
161 | 161 | (check-if-desktop-stream this-file)) |
162 | 162 | ;; unreadable -> return nil |
163 | 163 | (file-error))) |
164 | - | |
164 | + | |
165 | 165 | (define (get-key-value-pair instring) |
166 | - "Split a `*.desktop' file line into it's key-value pair. | |
166 | + "Split a `*.desktop' file line into its key-value pair. | |
167 | 167 | Returns (key . value)" |
168 | 168 | ;; Sorry, \\s doesn't work. Why?? |
169 | 169 | (if (string-match "^([^ \t=]+)[ \t]*=[ \t]*([^\n]+)" instring) |
@@ -172,11 +172,11 @@ Returns (key . value)" | ||
172 | 172 | (cons "" ""))) |
173 | 173 | |
174 | 174 | (define (fdo-group-p instring) |
175 | - (eq (aref instring 0) ?\[)) | |
175 | + (eq (aref instring 0) ?\[)) | |
176 | 176 | |
177 | 177 | (define (get-fdo-group instring) |
178 | 178 | (substring instring 1 (- (length instring) 2))) |
179 | - | |
179 | + | |
180 | 180 | (define (parse-fdo-file-line infile) |
181 | 181 | "Parse a `*.desktop' file list. |
182 | 182 | Returns (group1 (key1 . value1) ... group2 (keyA . valueA) ...)" |
@@ -194,9 +194,9 @@ Returns (group1 (key1 . value1) ... group2 (keyA . valueA) ...)" | ||
194 | 194 | (when (desktop-file-p infile) |
195 | 195 | (let ((d-file (open-file infile 'read))) |
196 | 196 | (parse-fdo-file-line d-file)))) |
197 | - | |
197 | + | |
198 | 198 | ;; desktop-file mapping |
199 | - | |
199 | + | |
200 | 200 | (define (map-desk-files in-desk-files in-directory #!optional (extension ".")) |
201 | 201 | "Given a list of filenames and a directory, will expand those |
202 | 202 | filenames to include the full path." |
@@ -205,7 +205,7 @@ filenames to include the full path." | ||
205 | 205 | (cons (expand-file-name (car in-desk-files) in-directory) |
206 | 206 | (map-desk-files (cdr in-desk-files) in-directory extension)) |
207 | 207 | (map-desk-files (cdr in-desk-files) in-directory extension)))) |
208 | - | |
208 | + | |
209 | 209 | (define (map-dir-files directories #!optional (extension ".")) |
210 | 210 | "Given a list of directory paths, will return a list of |
211 | 211 | files in those direcories with their full pathnames. Optionally |
@@ -227,7 +227,7 @@ files in those direcories with their full pathnames. Optionally | ||
227 | 227 | |
228 | 228 | (defmacro simplify-mlang (mlang mlevel) |
229 | 229 | `(and |
230 | - ,(cond | |
230 | + ,(cond | |
231 | 231 | ((or (= 0 mlevel) (not mlevel)) |
232 | 232 | `(or (string-looking-at "([a-z]*)(_?)([A-Z]*?)(@)([A-Z]*[a-z]*)?" ,mlang) |
233 | 233 | (string-looking-at "([a-z]*)(_..)|([a-z]*)?" ,mlang) |
@@ -242,10 +242,10 @@ files in those direcories with their full pathnames. Optionally | ||
242 | 242 | |
243 | 243 | (define (find-lang-string) |
244 | 244 | (let loop ((lang-vars '("LC_ALL" "LC_MESSAGES" "LANG"))) |
245 | - (and lang-vars | |
246 | - (let ((mlang (getenv (car lang-vars)))) | |
247 | - (if mlang (simplify-mlang mlang 0) | |
248 | - (loop (cdr lang-vars))))))) | |
245 | + (and lang-vars | |
246 | + (let ((mlang (getenv (car lang-vars)))) | |
247 | + (if mlang (simplify-mlang mlang 0) | |
248 | + (loop (cdr lang-vars))))))) | |
249 | 249 | |
250 | 250 | ;; Functions for categories |
251 | 251 |
@@ -258,55 +258,55 @@ files in those direcories with their full pathnames. Optionally | ||
258 | 258 | (define (merge-list input delimiter) |
259 | 259 | "Merge a cons list `input' into a string separated by `delimiter'" |
260 | 260 | (when input |
261 | - (concat (car input) delimiter | |
261 | + (concat (car input) delimiter | |
262 | 262 | (merge-list (cdr input) delimiter)))) |
263 | 263 | |
264 | 264 | (define (associate-categories fdol) |
265 | - "Associate the `Categories' value(s) with the category | |
265 | + "Associate the `Categories' value(s) with the category | |
266 | 266 | master list, `desktop-cat-alist'. Returns a modified desktop-file entry." |
267 | 267 | (when fdol |
268 | - (let* ((these-categories | |
269 | - (delete "" (string-split ";" (cdr (assoc "Categories" fdol))))) | |
270 | - (category-list '())) | |
268 | + (let* ((these-categories | |
269 | + (delete "" (string-split ";" (cdr (assoc "Categories" fdol))))) | |
270 | + (category-list '())) | |
271 | 271 | (let loop ((this-category these-categories)) |
272 | - (if (null this-category) | |
273 | - (let ((cat-string (merge-list (remove-duplicates category-list) ";"))) | |
274 | - (rplacd (assoc "Categories" fdol) | |
275 | - cat-string) | |
276 | - fdol) | |
277 | - (progn (mapc (lambda (ent) | |
278 | - (if (member (car this-category) ent) | |
279 | - (setq category-list | |
280 | - (append category-list (list (car ent)))))) | |
281 | - desktop-cat-alist) | |
282 | - (loop (cdr this-category)))))))) | |
272 | + (if (null this-category) | |
273 | + (let ((cat-string (merge-list (remove-duplicates category-list) ";"))) | |
274 | + (rplacd (assoc "Categories" fdol) | |
275 | + cat-string) | |
276 | + fdol) | |
277 | + (progn (mapc (lambda (ent) | |
278 | + (if (member (car this-category) ent) | |
279 | + (setq category-list | |
280 | + (append category-list (list (car ent)))))) | |
281 | + desktop-cat-alist) | |
282 | + (loop (cdr this-category)))))))) | |
283 | 283 | |
284 | 284 | (define (grab-category input cat) |
285 | - "Remove duplicate categories from a generated apps-menu list by | |
285 | + "Remove duplicate categories from a generated apps-menu list by | |
286 | 286 | category name." |
287 | 287 | (when input |
288 | 288 | (let ((cat-list '())) |
289 | 289 | (setq cat-list (append cat-list (list cat))) |
290 | 290 | (let loop ((this-line input)) |
291 | - (if (not this-line) cat-list | |
292 | - (progn (if (string= (caar this-line) cat) | |
293 | - (setq cat-list (append cat-list (list (cdr (car this-line)))))) | |
294 | - (loop (cdr this-line)))))))) | |
291 | + (if (not this-line) cat-list | |
292 | + (progn (if (string= (caar this-line) cat) | |
293 | + (setq cat-list (append cat-list (list (cdr (car this-line)))))) | |
294 | + (loop (cdr this-line)))))))) | |
295 | 295 | |
296 | 296 | (define (make-category-list input) |
297 | 297 | "Return a list of the categories to be used in the menu." |
298 | 298 | (when input |
299 | 299 | (cons (caar input) |
300 | 300 | (make-category-list (cdr input))))) |
301 | - | |
302 | - (define (consolodate-menu input) | |
303 | - "Reduce the menu down so that each menu entry is inside a | |
301 | + | |
302 | + (define (consolidate-menu input) | |
303 | + "Reduce the menu down so that each menu entry is inside a | |
304 | 304 | single category." |
305 | 305 | (when input |
306 | 306 | (let ((cat-list (remove-duplicates (make-category-list input))) |
307 | 307 | (out-menu nil)) |
308 | 308 | (mapc (lambda (x) |
309 | - (setq out-menu | |
309 | + (setq out-menu | |
310 | 310 | (append out-menu |
311 | 311 | (list (remove-duplicates (grab-category input x)))))) |
312 | 312 | cat-list) |
@@ -323,8 +323,8 @@ single category." | ||
323 | 323 | "Alphabetize the entries in the category menus." |
324 | 324 | (if saw-menu |
325 | 325 | (cons (cons (car (car saw-menu)) |
326 | - (sort (cdr (car saw-menu)) | |
327 | - (lambda (a b) | |
326 | + (sort (cdr (car saw-menu)) | |
327 | + (lambda (a b) | |
328 | 328 | (string< (string-downcase (car a)) (string-downcase (car b)))))) |
329 | 329 | (alphabetize-entries (cdr saw-menu))))) |
330 | 330 |
@@ -357,7 +357,7 @@ with caution, file may be corrupt.\n")) | ||
357 | 357 | (not (assoc (concat name-string apps-menu-lang "]") fdo-list))) |
358 | 358 | (setq fdo-list (append fdo-list (cons (cons "Name" "Unknown"))))) |
359 | 359 | fdo-list)) |
360 | - | |
360 | + | |
361 | 361 | (define (fdo-check-exile fdo-list) |
362 | 362 | "If `fdo-list' doesn't have a Categories, Exec, or Name field, |
363 | 363 | exile it." |
@@ -383,7 +383,7 @@ exile it." | ||
383 | 383 | (not (stringp (cdr (assoc "Category" fdo-list))))) |
384 | 384 | (rplacd (assoc "Category" fdo-list) "Exile")) |
385 | 385 | (append fdo-list (cons (cons "Category" "Exile"))))) |
386 | - fdo-list) | |
386 | + fdo-list) | |
387 | 387 | |
388 | 388 | (define (determine-desktop-name fdo-list) |
389 | 389 | "Get the correct Name[*] entry based on language settings." |
@@ -420,7 +420,7 @@ not present in the desktop-file-list" | ||
420 | 420 | (if (string-match "[Ff]" (cdr (assoc "NoDisplay" fdol))) |
421 | 421 | fdol) |
422 | 422 | fdol)) |
423 | - | |
423 | + | |
424 | 424 | (define (fdo-hidden-filter fdol) |
425 | 425 | "Return the desktop-file-list if Hidden is False, or if Hidden is |
426 | 426 | not present in the desktop-file-list" |
@@ -430,7 +430,7 @@ not present in the desktop-file-list" | ||
430 | 430 | fdol)) |
431 | 431 | |
432 | 432 | (define (fdo-onlyshowin-filter fdol) |
433 | - "Return the desktop-file-list if OnlyShowIn matches `desktop-environment', | |
433 | + "Return the desktop-file-list if OnlyShowIn matches `desktop-environment', | |
434 | 434 | or if OnlyShowIn is not present in the desktop-file-list" |
435 | 435 | (if (assoc "OnlyShowIn" fdol) |
436 | 436 | (if (string-match desktop-environment (string-downcase (cdr (assoc "OnlyShowIn" fdol)))) |
@@ -438,7 +438,7 @@ or if OnlyShowIn is not present in the desktop-file-list" | ||
438 | 438 | fdol)) |
439 | 439 | |
440 | 440 | (define (fdo-notshowin-filter fdol) |
441 | - "Return the desktop-file-list if NotShowIn does not match `desktop-environment', | |
441 | + "Return the desktop-file-list if NotShowIn does not match `desktop-environment', | |
442 | 442 | or if NotShowIn is not present in the desktop-file-list" |
443 | 443 | (if (assoc "NotShowIn" fdol) |
444 | 444 | (if (not (string-match desktop-environment (string-downcase (cdr (assoc "NotShowIn" fdol))))) |
@@ -454,7 +454,7 @@ desktop-entry through `fdo-associate-categories'." | ||
454 | 454 | fdol))) |
455 | 455 | |
456 | 456 | (define (fdo-toplevel-filter fdol) |
457 | - "Return the desktop-file-list if the `Category' is of the | |
457 | + "Return the desktop-file-list if the `Category' is of the | |
458 | 458 | Top-Level variety." |
459 | 459 | (when fdol |
460 | 460 | (if (not (equal "Top-Level" (cdr (assoc "Category" fdol)))) |
@@ -475,32 +475,30 @@ the NotShowIn and OnlyShowIn keys." | ||
475 | 475 | (fdo-notshowin-filter |
476 | 476 | (fdo-onlyshowin-filter fdol)))) |
477 | 477 | |
478 | - (define (fdo-filter-record fdol display-test) | |
479 | - "Return the result of `display-test' which can be a pre-set filter, | |
480 | -such as `default' or `some' or it can be a pre-defined function of | |
481 | -your choosing, which should either return the desktop-file-list or '(). | |
482 | -If `display-test' is not defined, will return the input desktop-file-list." | |
483 | - (if (not display-test) fdol | |
478 | + (define (fdo-filter-record fdol filter) | |
479 | +"Let `filter' process `fdol', a desktop file entry, and return the result. | |
480 | +`filter' can be a function, or a symbol 'default or 'some. If it isn't set, | |
481 | +return `fdol' as-is." | |
482 | + (if (not filter) fdol | |
484 | 483 | (condition-case nil |
485 | 484 | (let loop ((fdo-entry fdol)) |
486 | - (when (consp fdo-entry) | |
487 | - (cons | |
488 | - ;; Check if entry is valid | |
489 | - (fdo-double-check-category | |
490 | - (fdo-check-exile | |
491 | - ((cond | |
492 | - ;; default filter is chosen | |
493 | - ((equal display-test 'default) | |
494 | - fdo-default-filter) | |
495 | - ;; some flter is chosen | |
496 | - ((equal display-test 'some) | |
497 | - fdo-some-filter) | |
498 | - ;; user filter is chosen | |
499 | - ((closurep display-test) | |
500 | - display-test) | |
501 | - (t `progn)) | |
502 | - (car fdo-entry)))) | |
503 | - (loop (cdr fdo-entry))))) | |
485 | + (when (consp fdo-entry) | |
486 | + (cons | |
487 | + ;; Check if entry is valid | |
488 | + (fdo-double-check-category | |
489 | + (fdo-check-exile | |
490 | + ((cond | |
491 | + ;; default filter is chosen | |
492 | + ((equal filter 'default) | |
493 | + fdo-default-filter) | |
494 | + ;; some flter is chosen | |
495 | + ((equal filter 'some) | |
496 | + fdo-some-filter) | |
497 | + ;; user filter is chosen | |
498 | + ((closurep filter) | |
499 | + filter)) | |
500 | + (car fdo-entry)))) | |
501 | + (loop (cdr fdo-entry))))) | |
504 | 502 | (error fdol)))) |
505 | 503 | |
506 | 504 | (define (split-desktop-entry fdol) |
@@ -512,10 +510,10 @@ of the categories of the original." | ||
512 | 510 | (when (stringp category-string) |
513 | 511 | (let loop ((categories |
514 | 512 | (delete "" (string-split ";" category-string)))) |
515 | - (when categories | |
516 | - (append (list | |
517 | - (append new-fdol (list (cons "Category" (car categories))))) | |
518 | - (loop (cdr categories))))))))) | |
513 | + (when categories | |
514 | + (append (list | |
515 | + (append new-fdol (list (cons "Category" (car categories))))) | |
516 | + (loop (cdr categories))))))))) | |
519 | 517 | |
520 | 518 | ;; Sawfish-menu generation |
521 | 519 |
@@ -523,7 +521,7 @@ of the categories of the original." | ||
523 | 521 | "Return menu-entry list from a fdo-list." |
524 | 522 | ;; Generate the menu-entry list |
525 | 523 | (generate-menu-entry |
526 | - ;; Filter entry by pre-made or user function | |
524 | + ;; Filter entry by pre-made or user function | |
527 | 525 | (delete nil |
528 | 526 | (fdo-filter-record |
529 | 527 | ;; Split the desktop-entry by category |
@@ -539,9 +537,9 @@ of the categories of the original." | ||
539 | 537 | desktop file `desk-file'." |
540 | 538 | (when (car fdo-list) |
541 | 539 | (cons (list (cdr (assoc "Category" (car fdo-list))) |
542 | - (determine-desktop-name (car fdo-list)) | |
543 | - (determine-desktop-exec (car fdo-list))) | |
544 | - (generate-menu-entry (cdr fdo-list))))) | |
540 | + (determine-desktop-name (car fdo-list)) | |
541 | + (determine-desktop-exec (car fdo-list))) | |
542 | + (generate-menu-entry (cdr fdo-list))))) | |
545 | 543 | |
546 | 544 | (define (generate-apps-menu) |
547 | 545 | "Returns the list of applications menu which can be used for `apps-menu'." |
@@ -549,7 +547,7 @@ desktop file `desk-file'." | ||
549 | 547 | (setq apps-menu-lang (find-lang-string))) |
550 | 548 | (let ((desk-files (flatten (map-dir-files desktop-directory ".desktop"))) |
551 | 549 | (local-menu nil)) |
552 | - (mapc | |
550 | + (mapc | |
553 | 551 | (lambda (x) |
554 | 552 | (setq local-menu |
555 | 553 | (append local-menu |
@@ -557,8 +555,8 @@ desktop file `desk-file'." | ||
557 | 555 | (parse-fdo-file x))))) |
558 | 556 | desk-files) |
559 | 557 | (if apps-menu-alphabetize |
560 | - (alphabetize-entries (consolodate-menu (sort (delete nil local-menu) string<))) | |
561 | - (consolodate-menu (sort (delete nil local-menu) string<))))) | |
558 | + (alphabetize-entries (consolidate-menu (sort (delete nil local-menu) string<))) | |
559 | + (consolidate-menu (sort (delete nil local-menu) string<))))) | |
562 | 560 | |
563 | 561 | (define (init-apps-menu) |
564 | 562 | "If `apps-menu' is nil, then call `update-apps-menu'. This function |
@@ -575,4 +573,4 @@ append the auto generated one." | ||
575 | 573 | (setq apps-menu user-apps-menu))) |
576 | 574 | |
577 | 575 | (define-command 'update-apps-menu update-apps-menu) |
578 | - ) | |
\ No newline at end of file | ||
576 | + ) |
@@ -67,6 +67,8 @@ The @code{class} and @code{onfocused} parameters are now keys, so pass them as | ||
67 | 67 | #:class ''value'' or #:onfocused ''value''. Check @file{jump-or-exec.jl} for |
68 | 68 | more detailed examples. |
69 | 69 | |
70 | +@item Apps-menu options @code{apps-menu-show-all} is deleted. See below for more. | |
71 | + | |
70 | 72 | @item User option @code{focus-ignore-pointer-events} is deleted. [Teika kazura]@* |
71 | 73 | In fact, it's for internal use, and should not have been a user option. Use your favorite focus mode instead. |
72 | 74 |
@@ -143,7 +145,7 @@ configurator ``Edge Actions'' group. Options must be easy to | ||
143 | 145 | understand. |
144 | 146 | |
145 | 147 | ``Hot-spot'' lets you assign an action to each screen-edge and |
146 | --corner. An action has to be a function, and can be set in | |
148 | +-corner. An action has to be a lisp function, and can be set in | |
147 | 149 | @file{~/.sawfish/rc}, like this: |
148 | 150 | |
149 | 151 | @lisp |
@@ -216,6 +218,15 @@ more. | ||
216 | 218 | |
217 | 219 | When a lot of windows are open, they should now be more responsive. |
218 | 220 | |
221 | +@item Application menu is fully customizable [Matthew Love] | |
222 | + | |
223 | +With the new option @code{apps-menu-filter}, you can fully customize | |
224 | +the application menu. For the full description, see @xref{Applications | |
225 | +Menu}. | |
226 | + | |
227 | +It replaces former options like @code{apps-menu-show-all} or | |
228 | +@code{apps-menu-ignore-no-display}. | |
229 | + | |
219 | 230 | @item Per-window animation mode [Teika kazura] |
220 | 231 | |
221 | 232 | From the configurator ``Window Rules'' you can set the animation |
@@ -442,7 +453,8 @@ Applications menu now looks more like that of GNOME / KDE / XFCE if | ||
442 | 453 | one is running. (further improvements are planned) |
443 | 454 | |
444 | 455 | The user option @code{apps-menu-ignore-no-display} is now gone |
445 | -and replaced by @code{apps-menu-show-all}. | |
456 | +and replaced by @code{apps-menu-show-all}. [Note: After Sawfish-1.8.0, | |
457 | +this option is superseded by @code{apps-menu-filter}.] | |
446 | 458 | |
447 | 459 | If @code{apps-menu-show-all} is @code{nil} (default), the menu |
448 | 460 | looks much like that of GNOME / KDE / Xfce, by hiding some |
@@ -4998,7 +4998,7 @@ Note: this is just an example, not all functions in | ||
4998 | 4998 | ( defvar-setq top-right-corner-function |
4999 | 4999 | ( lambda () ( pager-unhide ) ) ) |
5000 | 5000 | |
5001 | -( defvar-setq bottom-right-corner-function | |
5001 | +( defvar-setq bottom-right-corner-function | |
5002 | 5002 | ( lambda () ( show-desktop ) ) ) |
5003 | 5003 | |
5004 | 5004 | ( defvar-setq bottom-left-corner-function |
@@ -5358,12 +5358,16 @@ You can modify menus. @xref{Popup Definitions}. | ||
5358 | 5358 | @cindex Menus, applications |
5359 | 5359 | |
5360 | 5360 | The applications menu lets you invoke installed applications. Sawfish |
5361 | -generates applications menu from @file{*.desktop} files at Sawfish startup. | |
5361 | +generates applications menu from @file{*.desktop} files (usually found | |
5362 | +in @file{/usr/share/applications/}) at Sawfish startup. | |
5363 | + | |
5364 | +Functions in this section are defined in the module | |
5365 | +@code{sawfish.wm.ext.apps-menu}. | |
5362 | 5366 | |
5363 | 5367 | @menu |
5364 | 5368 | * Applications Menu Variables:: |
5365 | 5369 | * Applications Menu Functions:: |
5366 | -* Applications Menu Filtering:: | |
5370 | +* Desktop File Processing:: | |
5367 | 5371 | @end menu |
5368 | 5372 | |
5369 | 5373 | @node Applications Menu Variables, Applications Menu Functions, Applications Menu, Applications Menu |
@@ -5373,37 +5377,49 @@ generates applications menu from @file{*.desktop} files at Sawfish startup. | ||
5373 | 5377 | |
5374 | 5378 | @defvar apps-menu-autogen |
5375 | 5379 | If non-nil, the applications menu is automatically generated from |
5376 | -@code{user-apps-menu} and @file{*.desktop} files, and stored in the | |
5377 | -variable @code{apps-menu}. | |
5378 | -Default is @code{t}. | |
5380 | +the variable @code{user-apps-menu} and @file{*.desktop} files, and | |
5381 | +stored in the variable @code{apps-menu}. Default is @code{t}. | |
5379 | 5382 | |
5380 | 5383 | If you set the applications menu manually to the variable |
5381 | 5384 | @code{apps-menu}, then it won't happen anyway. |
5382 | 5385 | @end defvar |
5383 | 5386 | |
5387 | +@defvar desktop-cat-alist | |
5388 | +Defines categorization of applications. For example, if a | |
5389 | +@file{*.desktop} file's category has an entry ``X-Desktop'', it'll be | |
5390 | +classified as ``Desktop'' by Sawfish default. | |
5391 | + | |
5392 | +If another option @code{apps-menu-associate-categories} is set to nil, | |
5393 | +then the original value defined in @file{*.desktop} is respected. | |
5394 | + | |
5395 | +If you want to customize this variable, see the file | |
5396 | +@file{lisp/sawfish/wm/ext/apps-menu.jl} for the default value. | |
5397 | +@end defvar | |
5398 | + | |
5384 | 5399 | @defvar apps-menu-associate-categories |
5385 | -Associate desktop entry categories with the category-master-list. | |
5386 | -Default is @code{t}. | |
5400 | +See the above. Default is @code{t}. | |
5387 | 5401 | @end defvar |
5388 | 5402 | |
5389 | 5403 | @defvar apps-menu-filter |
5390 | -The filter to use while generating the @code{apps-menu}. The default filters | |
5391 | -include @code{fdo-toplevel-filter} @code{fdo-nodisplay-filter} @code{fdo-hidden-filter} | |
5392 | -@code{fdo-onlyshowin-filter} and @code{fdo-notshowin-filter}. Can also be set with | |
5393 | -@code{'default} or @code{'some}, both of which are combinations of the default filters, | |
5394 | -@code{'default} uses them all and @code{'some} only uses @code{fdo-notshowin-filter} and | |
5395 | -@code{fdo-onlyshowin-filter}. This can be set to @code{'nil} or @code{'()} to perform no | |
5396 | -filtering on the @code{apps-menu}. | |
5397 | - | |
5398 | -Also, an arbitrary filter (or combination of filters) can be defined by the user. Set this | |
5399 | -variable to the name of the filter, or a lambda expression, and it will be used as the | |
5400 | -@code{apps-menu} filter. | |
5401 | -Default is @code{'default}. | |
5404 | +The filter to use while generating the @code{apps-menu}. For the details, | |
5405 | +see @xref{Desktop File Processing}. | |
5406 | + | |
5407 | +It can be a symbol @code{default}, @code{some}, or a function. | |
5408 | + | |
5409 | +The @code{default} filters include @code{fdo-toplevel-filter} | |
5410 | +@code{fdo-nodisplay-filter} @code{fdo-hidden-filter} | |
5411 | +@code{fdo-onlyshowin-filter} and @code{fdo-notshowin-filter}. This is | |
5412 | +the default value. | |
5413 | + | |
5414 | +The @code{some} filter only uses @code{fdo-notshowin-filter} and | |
5415 | +@code{fdo-onlyshowin-filter}. | |
5416 | + | |
5417 | +Or if it is set to nil, no filtering is done. | |
5402 | 5418 | @end defvar |
5403 | 5419 | |
5404 | 5420 | @defvar desktop-directory |
5405 | 5421 | List of directories to look for *.desktop files. Default is |
5406 | -@code{'("/usr/share/applications")}. | |
5422 | +@code{("/usr/share/applications")}. | |
5407 | 5423 | @end defvar |
5408 | 5424 | |
5409 | 5425 | @defvar kde-desktop-directories |
@@ -5411,13 +5427,13 @@ KDE specific directories where *.desktop files are stored. | ||
5411 | 5427 | @end defvar |
5412 | 5428 | |
5413 | 5429 | @defvar apps-menu-alphabetize |
5414 | -Sort the generated Applications menu alphabetically. | |
5430 | +Sort the generated applications menu alphabetically. | |
5415 | 5431 | Defaults is @code{t}. |
5416 | 5432 | @end defvar |
5417 | 5433 | |
5418 | 5434 | @defvar apps-menu-lang |
5419 | 5435 | Human language for applications menu generation, in |
5420 | -string, like ``en''. Default is set from the locale. | |
5436 | +string, like ``en'' for English. Default is set from the locale. | |
5421 | 5437 | @end defvar |
5422 | 5438 | |
5423 | 5439 | You can prepend anything to the applications menu, by setting the |
@@ -5440,9 +5456,11 @@ If you set value to @code{apps-menu}, Sawfish doesn't generate | ||
5440 | 5456 | applications menu from @file{*.desktop} files. |
5441 | 5457 | |
5442 | 5458 | @defvar apps-menu |
5443 | -The variable containing the definition of the applications menu. If | |
5444 | -you set this, it is exclusively used, and Sawfish doesn't generate | |
5445 | -its applications menu. | |
5459 | +The variable containing the definition of the applications menu. By default, | |
5460 | +Sawfish automatically sets this. | |
5461 | + | |
5462 | +If you set this variable manually, it is exclusively used, and Sawfish | |
5463 | +doesn't generate its applications menu. | |
5446 | 5464 | @end defvar |
5447 | 5465 | |
5448 | 5466 | @defvar user-apps-menu |
@@ -5450,7 +5468,7 @@ Your own applications menu entries. In the applications menu, this is | ||
5450 | 5468 | followed by auto generated applications menu. |
5451 | 5469 | @end defvar |
5452 | 5470 | |
5453 | -@node Applications Menu Functions, Applications Menu Filtering, Applications Menu Variables, Applications Menu | |
5471 | +@node Applications Menu Functions, Desktop File Processing, Applications Menu Variables, Applications Menu | |
5454 | 5472 | @subsection Applications Menu Functions |
5455 | 5473 | @cindex Applications menu functions |
5456 | 5474 | @cindex Functions, applications menu |
@@ -5469,142 +5487,150 @@ Return the applications menu (a list), generated from @file{*.desktop} | ||
5469 | 5487 | files which can be set to @code{apps-menu}. |
5470 | 5488 | @end defun |
5471 | 5489 | |
5472 | -@defun parse-fdo-file | |
5473 | -Parse a `*.desktop' file list. | |
5490 | +Here're functions to process each desktop file. See also the next | |
5491 | +section. (@pxref{Desktop File Processing}) | |
5492 | + | |
5493 | +@defun parse-fdo-file file | |
5494 | +Parse an *.desktop file @var{file} list. | |
5474 | 5495 | Returns @code{(group1 (key1 . value1) ... group2 (keyA . valueA) ...)} |
5475 | 5496 | @end defun |
5476 | 5497 | |
5477 | 5498 | @defun fdo-filter-record fdo-list filter |
5478 | -Return the result of @code{filter} which can be a pre-set filter, | |
5479 | -such as @code{default} or @code{some} or it can be a pre-defined function of | |
5480 | -your choosing, which should either return a @code{fdo-list} or @code{'()}. | |
5481 | -If @code{filter} is not defined, will return the input @code{fdo-list}. | |
5482 | -This can be useful for testing filters. | |
5499 | +Let @var{filter} process a desktop file entry @var{fdo-list}, and | |
5500 | +return the result. | |
5501 | + | |
5502 | +If @var{filter} is a function, it's executed with the argument | |
5503 | +@var{fdo-list}. If it's a symbol @code{default} or @code{some}, then | |
5504 | +@code{fdo-default-filter} or @code{fdo-some-filter} is exectuted, | |
5505 | +respectively. If @var{filter} is not defined, will return the input | |
5506 | +@code{fdo-list}. | |
5507 | + | |
5508 | +This can be useful for testing filters, and is also used internally. | |
5483 | 5509 | @end defun |
5484 | 5510 | |
5485 | -@node Applications Menu Filtering, , Applications Menu Functions, Applications Menu | |
5486 | -@subsection Applications Menu Filtering | |
5511 | +@node Desktop File Processing, , Applications Menu Functions, Applications Menu | |
5512 | +@subsection Desktop File Processing | |
5487 | 5513 | @cindex Applications menu filtering |
5488 | 5514 | @cindex Filtering, applications menu |
5489 | 5515 | |
5490 | -While building the applications menu, sawfish sends a desktop menu | |
5491 | -entry through a number of so-called filters. These filters perform | |
5492 | -various funtions on the desktop file entry, which is defined as a | |
5493 | -list. | |
5516 | +In this section it is shown how Sawfish processes desktop file entries | |
5517 | +while building the applications menu. Each entry passes through many | |
5518 | +@dfn{filters}, and they're what you may want to customize. | |
5494 | 5519 | |
5495 | -Here is an example of the desktop file entry using the | |
5520 | +Desktop file entries are expressed as a list. Here is an example of | |
5496 | 5521 | @file{emacs.desktop} file before any filters are performed: |
5497 | 5522 | |
5498 | 5523 | @lisp |
5499 | -(``Desktop Entry'' | |
5500 | - (``Name'' . ``Emacs Text Editor'') | |
5501 | - (``Name[de]'' . ``Emacs Texteditor'') | |
5502 | - (``GenericName'' . ``Text Editor'') | |
5503 | - (``Comment'' . ``Edit text'') | |
5504 | - (``Exec'' . ``emacs %f'') | |
5505 | - (``Icon'' . ``emacs-icon'') | |
5506 | - (``Type'' . ``Application'') | |
5507 | - (``Terminal'' . ``false'') | |
5508 | - (``Categories'' . ``Development;TextEditor;'') | |
5509 | - (``StartupWMClass'' . ``Emacs'')) | |
5524 | +("Desktop Entry" | |
5525 | + ("Name" . "Emacs Text Editor") | |
5526 | + ("Name[de]" . "Emacs Texteditor") | |
5527 | + ("GenericName" . "Text Editor") | |
5528 | + ("Comment" . "Edit text") | |
5529 | + ("Exec" . "emacs %f") | |
5530 | + ("Icon" . "emacs-icon") | |
5531 | + ("Type" . "Application") | |
5532 | + ("Terminal" . "false") | |
5533 | + ("Categories" . "Development;TextEditor;") | |
5534 | + ("StartupWMClass" . "Emacs")) | |
5510 | 5535 | @end lisp |
5511 | 5536 | |
5512 | -And here is the same example after the initial filters are | |
5513 | -performed, one of the first filters performed on the desktop | |
5514 | -entry list is a 'split filter, which splits the entry into | |
5515 | -multiple entries based on the number of categories that are | |
5516 | -included: | |
5537 | +It then gets split into two lists. The original ``Categories'' key | |
5538 | +contains several values, and each of new entries has ``Category'' key | |
5539 | +which contains only one of the original categories. | |
5517 | 5540 | |
5518 | 5541 | @lisp |
5519 | -(``Desktop Entry'' | |
5520 | - (``Name'' . ``Emacs Text Editor'') | |
5521 | - (``Name[de]'' . ``Emacs Texteditor'') | |
5522 | - (``GenericName'' . ``Text Editor'') | |
5523 | - (``Comment'' . ``Edit text'') | |
5524 | - (``Exec'' . ``emacs %f'') | |
5525 | - (``Icon'' . ``emacs-icon'') | |
5526 | - (``Type'' . ``Application'') | |
5527 | - (``Terminal'' . ``false'') | |
5528 | - (``Categories'' . ``Development;TextEditor;'') | |
5529 | - (``Cateogry'' . ``Development'') | |
5530 | - (``StartupWMClass'' . ``Emacs'')) | |
5531 | - | |
5532 | -(``Desktop Entry'' | |
5533 | - (``Name'' . ``Emacs Text Editor'') | |
5534 | - (``Name[de]'' . ``Emacs Texteditor'') | |
5535 | - (``GenericName'' . ``Text Editor'') | |
5536 | - (``Comment'' . ``Edit text'') | |
5537 | - (``Exec'' . ``emacs %f'') | |
5538 | - (``Icon'' . ``emacs-icon'') | |
5539 | - (``Type'' . ``Application'') | |
5540 | - (``Terminal'' . ``false'') | |
5541 | - (``Categories'' . ``Development;TextEditor;'') | |
5542 | - (``Cateogry'' . ``TextEditor'') | |
5543 | - (``StartupWMClass'' . ``Emacs'')) | |
5542 | +("Desktop Entry" | |
5543 | + ("Name" . "Emacs Text Editor") | |
5544 | + ("Name[de]" . "Emacs Texteditor") | |
5545 | + ("GenericName" . "Text Editor") | |
5546 | + ("Comment" . "Edit text") | |
5547 | + ("Exec" . "emacs %f") | |
5548 | + ("Icon" . "emacs-icon") | |
5549 | + ("Type" . "Application") | |
5550 | + ("Terminal" . "false") | |
5551 | + ("Categories" . "Development;TextEditor;") | |
5552 | + ("Cateogry" . "Development") ; Look here | |
5553 | + ("StartupWMClass" . "Emacs")) | |
5554 | + | |
5555 | +("Desktop Entry" | |
5556 | + ("Name" . "Emacs Text Editor") | |
5557 | + ("Name[de]" . "Emacs Texteditor") | |
5558 | + ("GenericName" . "Text Editor") | |
5559 | + ("Comment" . "Edit text") | |
5560 | + ("Exec" . "emacs %f") | |
5561 | + ("Icon" . "emacs-icon") | |
5562 | + ("Type" . "Application") | |
5563 | + ("Terminal" . "false") | |
5564 | + ("Categories" . "Development;TextEditor;") | |
5565 | + ("Cateogry" . "TextEditor") ; Look here | |
5566 | + ("StartupWMClass" . "Emacs")) | |
5544 | 5567 | @end lisp |
5545 | 5568 | |
5546 | 5569 | @noindent |
5547 | -This is the entry list format that is used in all of the later filters. | |
5548 | -All filtering functions should accept such an entry list as it's argument, | |
5549 | -and all filtering functions should either return @code{'()} or an entry list. | |
5570 | +This is the entry list format that is used in all of the later filters. | |
5571 | +All filtering functions should accept such an entry list as its argument, | |
5572 | +and all filtering functions should either return nil or an entry list. | |
5550 | 5573 | If @code{fdo-associate-categories} is @code{t} then the ``Category'' key will be |
5551 | 5574 | changed to the main category that will eventually show up in the @code{apps-menu}. |
5552 | -The keys that are used by the Applications Menu are currently, | |
5575 | +The keys that are used by the applications menu are currently, | |
5553 | 5576 | |
5554 | 5577 | @itemize @bullet |
5555 | 5578 | @item Name([]) |
5556 | 5579 | |
5557 | -The @code{Name} key in the desktop entry list specifies the name to be used | |
5558 | -in the top-level of the Applications Menu. If @code{apps-menu-lang} coincides | |
5559 | -with one of the Name[lang] keys in the entry list, then that will be the name used. | |
5580 | +The name to be displayed in the applications menu. If | |
5581 | +@code{apps-menu-lang} or the locale coincides with one of the | |
5582 | +Name[lang] keys in the entry list, then that will be the name used. | |
5583 | + | |
5560 | 5584 | @item Exec |
5561 | 5585 | |
5562 | -The @code{Exec} key in the desktop entry list specifies the command to be run | |
5563 | -when the entry is called. | |
5586 | +The command to be run when the entry is called. | |
5587 | + | |
5564 | 5588 | @item Terminal |
5565 | 5589 | |
5566 | -The @code{Terminal} key in the desktop entry list specifies whether or not to run | |
5567 | -the @code{Exec} value inside of a terminal or not, this will use the default terminal. | |
5590 | +Whether or not to run the @code{Exec} value inside of a terminal or | |
5591 | +not. If it's true, the terminal specified by @code{xterm-program} is | |
5592 | +used. | |
5593 | + | |
5568 | 5594 | @item Category |
5569 | 5595 | |
5570 | -The @code{Category} key in the desktop entry list specifies which top-level category | |
5571 | -to place the entry in. | |
5596 | +Which top-level category to place the entry in. | |
5597 | + | |
5572 | 5598 | @item Hidden |
5573 | 5599 | |
5574 | -The @code{Hidden} key in the desktop entry list specifies whether or not the entry | |
5575 | -should be hidden by default. | |
5600 | +Whether or not the entry should be hidden by default. | |
5601 | + | |
5576 | 5602 | @item NoDisplay |
5577 | 5603 | |
5578 | -The @code{NoDisplay} key in the desktop entry list specifies whether or not the entry | |
5579 | -should be displayed by default. | |
5604 | +Whether or not the entry should be displayed by default. | |
5605 | + | |
5580 | 5606 | @item NotShowIn |
5581 | 5607 | |
5582 | -The @code{NotShowIn} key in the desktop entry list, will determine if an item should | |
5583 | -not be shown by checking the current desktop enviroment against the value of this key. | |
5608 | +If an item should not be shown by checking the current desktop | |
5609 | +enviroment against the value of this key. | |
5610 | + | |
5584 | 5611 | @item OnlyShowIn |
5585 | 5612 | |
5586 | -The @code{OnlyShowIn} key in the desktop entry list, will determine if an item should | |
5587 | -be shown by checking the current desktop enviroment against the value of this key. | |
5613 | +If an item should be shown by checking the current desktop enviroment | |
5614 | +against the value of this key. | |
5588 | 5615 | @end itemize |
5589 | 5616 | |
5590 | -@noindent | |
5591 | -The filters can either be pre-defined filters, user-defined functions or a lambda | |
5592 | -expression, a user-defined function would likely look like one of the default filters | |
5593 | -described below. | |
5594 | - | |
5595 | -@noindent | |
5596 | -Filter examples | |
5617 | +@subsubheading Filters | |
5618 | +Filters are functions, either pre-defined or user-defined, which take | |
5619 | +one argument, a desktop file entry. You can set your filter to the | |
5620 | +@code{apps-menu-filter} variable. | |
5597 | 5621 | |
5598 | -@noindent | |
5599 | -A lambda expression, this example will move emacs to the 'util category: | |
5622 | +Here we show an example user-defined filter, and all pre-defined | |
5623 | +filters, which are also available to user codes. | |
5600 | 5624 | |
5601 | 5625 | @lisp |
5602 | -(setq apps-menu-filter | |
5626 | +;; This will move emacs to the ``util'' category, in addition to the | |
5627 | +;; operations done by default filter. | |
5628 | +(setq apps-menu-filter | |
5603 | 5629 | (lambda (ent) |
5604 | 5630 | (let ((ent (fdo-default-filter ent))) |
5605 | 5631 | (when ent |
5606 | - (cond ((string-match ``[Ee]macs'' (cdr (assoc "Name" ent)) nil t) | |
5607 | - (rplacd (assoc ``Category'' ent) ``util''))) | |
5632 | + (cond ((string-match "[Ee]macs" (cdr (assoc "Name" ent)) nil t) | |
5633 | + (rplacd (assoc "Category" ent) "util"))) | |
5608 | 5634 | ent)))) |
5609 | 5635 | @end lisp |
5610 | 5636 |
@@ -5613,54 +5639,55 @@ The pre-defined filters: | ||
5613 | 5639 | |
5614 | 5640 | @lisp |
5615 | 5641 | (define (fdo-nodisplay-filter fdol) |
5616 | - ``Return the desktop-file-list if NoDisplay is False, or if NoDisplay is | |
5617 | -not present in the desktop-file-list'' | |
5618 | - (if (assoc ``NoDisplay'' fdol) | |
5619 | - (if (string-match ``[Ff]'' (cdr (assoc ``NoDisplay'' fdol))) | |
5642 | + "Return the desktop-file-list if NoDisplay is False, or if NoDisplay is | |
5643 | +not present in the desktop-file-list" | |
5644 | + (if (assoc "NoDisplay" fdol) | |
5645 | + ;; [Ff] means match to "false" | |
5646 | + (if (string-match "[Ff]" (cdr (assoc "NoDisplay" fdol))) | |
5620 | 5647 | fdol) |
5621 | 5648 | fdol)) |
5622 | 5649 | |
5623 | 5650 | (define (fdo-hidden-filter fdol) |
5624 | - ``Return the desktop-file-list if Hidden is False, or if Hidden is | |
5625 | -not present in the desktop-file-list'' | |
5651 | + "Return the desktop-file-list if Hidden is False, or if Hidden is | |
5652 | +not present in the desktop-file-list" | |
5626 | 5653 | (if (assoc "Hidden" fdol) |
5627 | - (if (string-match ``[Ff]'' (string-downcase (cdr (assoc ``OnlyShowIn'' fdol)))) | |
5654 | + (if (string-match "[Ff]" (string-downcase (cdr (assoc "OnlyShowIn" fdol)))) | |
5628 | 5655 | fdol) |
5629 | 5656 | fdol)) |
5630 | 5657 | |
5631 | 5658 | (define (fdo-onlyshowin-filter fdol) |
5632 | - ``Return the desktop-file-list if OnlyShowIn matches `desktop-environment', | |
5633 | -or if OnlyShowIn is not present in the desktop-file-list'' | |
5634 | - (if (assoc ``OnlyShowIn'' fdol) | |
5635 | - (if (string-match desktop-environment (string-downcase (cdr (assoc ``OnlyShowIn'' fdol)))) | |
5659 | + "Return the desktop-file-list if OnlyShowIn matches `desktop-environment', | |
5660 | +or if OnlyShowIn is not present in the desktop-file-list" | |
5661 | + (if (assoc "OnlyShowIn" fdol) | |
5662 | + (if (string-match desktop-environment (string-downcase (cdr (assoc "OnlyShowIn" fdol)))) | |
5636 | 5663 | fdol) |
5637 | 5664 | fdol)) |
5638 | 5665 | |
5639 | 5666 | (define (fdo-notshowin-filter fdol) |
5640 | - ``Return the desktop-file-list if NotShowIn does not match `desktop-environment', | |
5641 | -or if NotShowIn is not present in the desktop-file-list'' | |
5642 | - (if (assoc ``NotShowIn'' fdol) | |
5643 | - (if (not (string-match desktop-environment (string-downcase (cdr (assoc ``NotShowIn'' fdol))))) | |
5667 | + "Return the desktop-file-list if NotShowIn does not match `desktop-environment', | |
5668 | +or if NotShowIn is not present in the desktop-file-list" | |
5669 | + (if (assoc "NotShowIn" fdol) | |
5670 | + (if (not (string-match desktop-environment (string-downcase (cdr (assoc "NotShowIn" fdol))))) | |
5644 | 5671 | fdol) |
5645 | 5672 | fdol)) |
5646 | 5673 | |
5647 | 5674 | (define (fdo-associate-categories-filter fdol) |
5648 | - ``If `apps-menu-associate-categories' is true, filter the | |
5649 | -desktop-entry through `fdo-associate-categories'.'' | |
5675 | + "If `apps-menu-associate-categories' is true, filter the | |
5676 | +desktop-entry through `fdo-associate-categories'." | |
5650 | 5677 | (when fdol |
5651 | 5678 | (if apps-menu-associate-categories |
5652 | 5679 | (associate-categories fdol) |
5653 | 5680 | fdol))) |
5654 | 5681 | |
5655 | 5682 | (define (fdo-toplevel-filter fdol) |
5656 | - ``Return the desktop-file-list if the `Category' is of the | |
5657 | -Top-Level variety.'' | |
5683 | + "Return the desktop-file-list if the `Category' is of the | |
5684 | +Top-Level variety." | |
5658 | 5685 | (when fdol |
5659 | - (if (not (equal ``Top-Level'' (cdr (assoc ``Category'' fdol)))) | |
5686 | + (if (not (equal "Top-Level" (cdr (assoc "Category" fdol)))) | |
5660 | 5687 | fdol))) |
5661 | 5688 | |
5662 | 5689 | (define (fdo-default-filter fdol) |
5663 | - ``The default fdo-filter, combines the above.'' | |
5690 | + "The default fdo-filter, combines the above." | |
5664 | 5691 | (fdo-toplevel-filter |
5665 | 5692 | (fdo-hidden-filter |
5666 | 5693 | (fdo-notshowin-filter |
@@ -5697,7 +5724,7 @@ The second element specifies the action to take. Possible choices are: | ||
5697 | 5724 | |
5698 | 5725 | @table @asis |
5699 | 5726 | @item Command |
5700 | -If it's a command name (a symbol), then that command is invoked. | |
5727 | +If it's a command name (a symbol), then that command is invoked. | |
5701 | 5728 | In the window operation menu, if that command takes a window as the |
5702 | 5729 | argument, it's passed. |
5703 | 5730 |
@@ -7104,7 +7131,7 @@ the @code{PATH} environmental variable. Example: | ||
7104 | 7131 | |
7105 | 7132 | @defun quit |
7106 | 7133 | @defunx restart |
7107 | -Quits and restart Sawfish. | |
7134 | +Quits and restart Sawfish. | |
7108 | 7135 | |
7109 | 7136 | Restart does exec (3), replacing the current process. All command line |
7110 | 7137 | arguments are used again, except that session management related ones |