0
|
1 ;;; Toolbar related functions and commands
|
98
|
2 ;;; Copyright (C) 1995-1997 Kyle E. Jones
|
0
|
3 ;;;
|
|
4 ;;; This program is free software; you can redistribute it and/or modify
|
|
5 ;;; it under the terms of the GNU General Public License as published by
|
|
6 ;;; the Free Software Foundation; either version 1, or (at your option)
|
|
7 ;;; any later version.
|
|
8 ;;;
|
|
9 ;;; This program is distributed in the hope that it will be useful,
|
|
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 ;;; GNU General Public License for more details.
|
|
13 ;;;
|
|
14 ;;; You should have received a copy of the GNU General Public License
|
|
15 ;;; along with this program; if not, write to the Free Software
|
|
16 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
17
|
|
18 (provide 'vm-toolbar)
|
|
19
|
|
20 (defvar vm-toolbar-specifier nil)
|
|
21
|
|
22 (defvar vm-toolbar-next-button
|
|
23 [vm-toolbar-next-icon
|
|
24 vm-toolbar-next-command
|
|
25 (vm-toolbar-any-messages-p)
|
|
26 "Go to the next message.\n
|
|
27 The command `vm-toolbar-next-command' is run, which is normally
|
118
|
28 fbound to `vm-next-message'.
|
0
|
29 You can make this button run some other command by using a Lisp
|
|
30 s-expression like this one in your .vm file:
|
|
31 (fset 'vm-toolbar-next-command 'some-other-command)"])
|
|
32 (defvar vm-toolbar-next-icon nil)
|
|
33 (or (fboundp 'vm-toolbar-next-command)
|
|
34 (fset 'vm-toolbar-next-command 'vm-next-message))
|
|
35
|
|
36 (defvar vm-toolbar-previous-button
|
|
37 [vm-toolbar-previous-icon
|
|
38 vm-toolbar-previous-command
|
|
39 (vm-toolbar-any-messages-p)
|
|
40 "Go to the previous message.\n
|
|
41 The command `vm-toolbar-previous-command' is run, which is normally
|
118
|
42 fbound to `vm-previous-message'.
|
0
|
43 You can make this button run some other command by using a Lisp
|
|
44 s-expression like this one in your .vm file:
|
|
45 (fset 'vm-toolbar-previous-command 'some-other-command)"])
|
|
46 (defvar vm-toolbar-previous-icon nil)
|
|
47 (or (fboundp 'vm-toolbar-previous-command)
|
|
48 (fset 'vm-toolbar-previous-command 'vm-previous-message))
|
|
49
|
|
50 (defvar vm-toolbar-autofile-button
|
|
51 [vm-toolbar-autofile-icon
|
|
52 vm-toolbar-autofile-message
|
|
53 (vm-toolbar-can-autofile-p)
|
|
54 "Save the current message to a folder selected using vm-auto-folder-alist."])
|
|
55 (defvar vm-toolbar-autofile-icon nil)
|
|
56
|
|
57 (defvar vm-toolbar-file-button
|
|
58 [vm-toolbar-file-icon vm-toolbar-file-command (vm-toolbar-any-messages-p)
|
|
59 "Save the current message to a folder.\n
|
|
60 The command `vm-toolbar-file-command' is run, which is normally
|
118
|
61 fbound to `vm-save-message'.
|
0
|
62 You can make this button run some other command by using a Lisp
|
|
63 s-expression like this one in your .vm file:
|
|
64 (fset 'vm-toolbar-file-command 'some-other-command)"])
|
|
65 (defvar vm-toolbar-file-icon nil)
|
|
66 (or (fboundp 'vm-toolbar-file-command)
|
|
67 (fset 'vm-toolbar-file-command 'vm-save-message))
|
|
68
|
100
|
69 (defvar vm-toolbar-getmail-button
|
|
70 [vm-toolbar-getmail-icon vm-toolbar-getmail-command
|
|
71 (vm-toolbar-mail-waiting-p)
|
|
72 "Retrieve spooled mail for the current folder.\n
|
|
73 The command `vm-toolbar-getmail-command' is run, which is normally
|
118
|
74 fbound to `vm-get-new-mail'.
|
100
|
75 You can make this button run some other command by using a Lisp
|
|
76 s-expression like this one in your .vm file:
|
|
77 (fset 'vm-toolbar-getmail-command 'some-other-command)"])
|
|
78 (defvar vm-toolbar-getmail-icon nil)
|
|
79 (or (fboundp 'vm-toolbar-getmail-command)
|
|
80 (fset 'vm-toolbar-getmail-command 'vm-get-new-mail))
|
|
81
|
0
|
82 (defvar vm-toolbar-print-button
|
|
83 [vm-toolbar-print-icon
|
|
84 vm-toolbar-print-command
|
|
85 (vm-toolbar-any-messages-p)
|
|
86 "Print the current message.\n
|
|
87 The command `vm-toolbar-print-command' is run, which is normally
|
118
|
88 fbound to `vm-print-message'.
|
0
|
89 You can make this button run some other command by using a Lisp
|
|
90 s-expression like this one in your .vm file:
|
|
91 (fset 'vm-toolbar-print-command 'some-other-command)"])
|
|
92 (defvar vm-toolbar-print-icon nil)
|
|
93 (or (fboundp 'vm-toolbar-print-command)
|
|
94 (fset 'vm-toolbar-print-command 'vm-print-message))
|
|
95
|
|
96 (defvar vm-toolbar-visit-button
|
|
97 [vm-toolbar-visit-icon vm-toolbar-visit-command t
|
|
98 "Visit a different folder.\n
|
|
99 The command `vm-toolbar-visit-command' is run, which is normally
|
118
|
100 fbound to `vm-visit-folder'.
|
0
|
101 You can make this button run some other command by using a Lisp
|
|
102 s-expression like this one in your .vm file:
|
|
103 (fset 'vm-toolbar-visit-command 'some-other-command)"])
|
|
104 (defvar vm-toolbar-visit-icon nil)
|
|
105 (or (fboundp 'vm-toolbar-visit-command)
|
|
106 (fset 'vm-toolbar-visit-command 'vm-visit-folder))
|
|
107
|
|
108 (defvar vm-toolbar-reply-button
|
|
109 [vm-toolbar-reply-icon
|
|
110 vm-toolbar-reply-command
|
|
111 (vm-toolbar-any-messages-p)
|
|
112 "Reply to the current message.\n
|
|
113 The command `vm-toolbar-reply-command' is run, which is normally
|
118
|
114 fbound to `vm-followup-include-text'.
|
0
|
115 You can make this button run some other command by using a Lisp
|
|
116 s-expression like this one in your .vm file:
|
|
117 (fset 'vm-toolbar-reply-command 'some-other-command)"])
|
|
118 (defvar vm-toolbar-reply-icon nil)
|
|
119 (or (fboundp 'vm-toolbar-reply-command)
|
|
120 (fset 'vm-toolbar-reply-command 'vm-followup-include-text))
|
|
121
|
|
122 (defvar vm-toolbar-compose-button
|
|
123 [vm-toolbar-compose-icon vm-toolbar-compose-command t
|
|
124 "Compose a new message.\n
|
|
125 The command `vm-toolbar-compose-command' is run, which is normally
|
118
|
126 fbound to `vm-mail'.
|
0
|
127 You can make this button run some other command by using a Lisp
|
|
128 s-expression like this one in your .vm file:
|
|
129 (fset 'vm-toolbar-compose-command 'some-other-command)"])
|
|
130 (defvar vm-toolbar-compose-icon nil)
|
|
131 (or (fboundp 'vm-toolbar-compose-command)
|
|
132 (fset 'vm-toolbar-compose-command 'vm-mail))
|
|
133
|
98
|
134 (defvar vm-toolbar-decode-mime-button
|
|
135 [vm-toolbar-decode-mime-icon vm-toolbar-decode-mime-command
|
|
136 (vm-toolbar-can-decode-mime-p)
|
|
137 "Decode the MIME objects in the current message.\n
|
|
138 The objects might be displayed immediately, or buttons might be
|
|
139 displayed that you need to click on to view the object. See the
|
|
140 documentation for the variables vm-mime-internal-content-types
|
|
141 and vm-mime-external-content-types-alist to see how to control
|
|
142 whether you see buttons or objects.\n
|
|
143 The command `vm-toolbar-decode-mime-command' is run, which is normally
|
118
|
144 fbound to `vm-decode-mime-messages'.
|
98
|
145 You can make this button run some other command by using a Lisp
|
|
146 s-expression like this one in your .vm file:
|
|
147 (fset 'vm-toolbar-decode-mime-command 'some-other-command)"])
|
|
148 (defvar vm-toolbar-decode-mime-icon nil)
|
|
149 (or (fboundp 'vm-toolbar-decode-mime-command)
|
|
150 (fset 'vm-toolbar-decode-mime-command 'vm-decode-mime-message))
|
|
151
|
0
|
152 (defvar vm-toolbar-delete-icon nil)
|
|
153
|
|
154 (defvar vm-toolbar-undelete-icon nil)
|
|
155
|
|
156 (defvar vm-toolbar-delete/undelete-button
|
|
157 [vm-toolbar-delete/undelete-icon
|
|
158 vm-toolbar-delete/undelete-message
|
|
159 (vm-toolbar-any-messages-p)
|
|
160 "Delete the current message, or undelete it if it is already deleted."])
|
|
161 (defvar vm-toolbar-delete/undelete-icon nil)
|
|
162 (make-variable-buffer-local 'vm-toolbar-delete/undelete-icon)
|
|
163
|
|
164 (defvar vm-toolbar-help-icon nil)
|
|
165
|
|
166 (defvar vm-toolbar-recover-icon nil)
|
|
167
|
|
168 (defvar vm-toolbar-helper-icon nil)
|
|
169 (make-variable-buffer-local 'vm-toolbar-helper-icon)
|
|
170
|
|
171 (defvar vm-toolbar-help-button
|
98
|
172 [vm-toolbar-helper-icon vm-toolbar-helper-command
|
|
173 (vm-toolbar-can-help-p)
|
0
|
174 "Don't Panic.\n
|
|
175 VM uses this button to offer help if you're in trouble.
|
|
176 Under normal circumstances, this button runs `vm-help'.\n
|
|
177 If the current folder looks out-of-date relative to its auto-save
|
|
178 file then this button will run `recover-file'."])
|
|
179
|
|
180 (defvar vm-toolbar-helper-command nil)
|
|
181 (make-variable-buffer-local 'vm-toolbar-helper-command)
|
|
182
|
|
183 (defun vm-toolbar-helper-command ()
|
|
184 (interactive)
|
|
185 (setq this-command vm-toolbar-helper-command)
|
|
186 (call-interactively vm-toolbar-helper-command))
|
|
187
|
|
188 (defvar vm-toolbar-quit-button
|
98
|
189 [vm-toolbar-quit-icon vm-toolbar-quit-command
|
|
190 (vm-toolbar-can-quit-p)
|
76
|
191 "Quit visiting this folder.\n
|
0
|
192 The command `vm-toolbar-quit-command' is run, which is normally
|
118
|
193 fbound to `vm-quit'.
|
0
|
194 You can make this button run some other command by using a Lisp
|
|
195 s-expression like this one in your .vm file:
|
|
196 (fset 'vm-toolbar-quit-command 'some-other-command)"])
|
|
197 (defvar vm-toolbar-quit-icon nil)
|
|
198 (or (fboundp 'vm-toolbar-quit-command)
|
|
199 (fset 'vm-toolbar-quit-command 'vm-quit))
|
|
200
|
|
201 (defun vm-toolbar-any-messages-p ()
|
126
|
202 (condition-case nil
|
|
203 (save-excursion
|
|
204 (vm-check-for-killed-folder)
|
|
205 (vm-select-folder-buffer)
|
|
206 vm-message-list)
|
|
207 (error nil)))
|
0
|
208
|
|
209 (defun vm-toolbar-delete/undelete-message (&optional prefix-arg)
|
|
210 (interactive "P")
|
|
211 (vm-follow-summary-cursor)
|
|
212 (vm-select-folder-buffer)
|
|
213 (vm-check-for-killed-summary)
|
|
214 (vm-error-if-folder-read-only)
|
|
215 (vm-error-if-folder-empty)
|
|
216 (let ((current-prefix-arg prefix-arg))
|
|
217 (if (vm-deleted-flag (car vm-message-pointer))
|
|
218 (call-interactively 'vm-undelete-message)
|
|
219 (call-interactively 'vm-delete-message))))
|
|
220
|
|
221 (defun vm-toolbar-can-autofile-p ()
|
|
222 (interactive)
|
126
|
223 (condition-case nil
|
|
224 (save-excursion
|
|
225 (vm-check-for-killed-folder)
|
|
226 (vm-select-folder-buffer)
|
|
227 (and vm-message-pointer
|
|
228 (vm-auto-select-folder vm-message-pointer vm-auto-folder-alist)))
|
|
229 (error nil)))
|
0
|
230
|
|
231 (defun vm-toolbar-autofile-message ()
|
|
232 (interactive)
|
|
233 (vm-follow-summary-cursor)
|
|
234 (vm-select-folder-buffer)
|
|
235 (vm-check-for-killed-summary)
|
|
236 (vm-error-if-folder-read-only)
|
|
237 (vm-error-if-folder-empty)
|
|
238 (let ((file (vm-auto-select-folder vm-message-pointer vm-auto-folder-alist)))
|
|
239 (if file
|
|
240 (progn
|
|
241 (vm-save-message file 1)
|
|
242 (message "Message saved to %s" file))
|
|
243 (error "No match for message in vm-auto-folder-alist."))))
|
|
244
|
|
245 (defun vm-toolbar-can-recover-p ()
|
126
|
246 (condition-case nil
|
|
247 (save-excursion
|
|
248 (vm-select-folder-buffer)
|
|
249 (and vm-folder-read-only
|
|
250 buffer-file-name
|
|
251 buffer-auto-save-file-name
|
|
252 (null (buffer-modified-p))
|
|
253 (file-newer-than-file-p
|
|
254 buffer-auto-save-file-name
|
|
255 buffer-file-name)))
|
|
256 (error nil)))
|
20
|
257
|
98
|
258 (defun vm-toolbar-can-decode-mime-p ()
|
126
|
259 (condition-case nil
|
|
260 (save-excursion
|
|
261 (vm-select-folder-buffer)
|
|
262 (and
|
|
263 vm-display-using-mime
|
|
264 vm-message-pointer
|
|
265 vm-presentation-buffer
|
|
266 (not vm-mime-decoded)
|
|
267 (not (vm-mime-plain-message-p (car vm-message-pointer)))))
|
|
268 (error nil)))
|
98
|
269
|
|
270 (defun vm-toolbar-can-quit-p ()
|
126
|
271 (condition-case nil
|
|
272 (save-excursion
|
|
273 (vm-select-folder-buffer)
|
|
274 (memq major-mode '(vm-mode vm-virtual-mode)))
|
|
275 (error nil)))
|
98
|
276
|
100
|
277 (defun vm-toolbar-mail-waiting-p ()
|
126
|
278 (condition-case nil
|
|
279 (save-excursion
|
|
280 (vm-select-folder-buffer)
|
|
281 vm-spooled-mail-waiting)
|
|
282 (error nil)))
|
100
|
283
|
98
|
284 (fset 'vm-toolbar-can-help-p 'vm-toolbar-can-quit-p)
|
|
285
|
0
|
286 (defun vm-toolbar-update-toolbar ()
|
|
287 (if (and vm-message-pointer (vm-deleted-flag (car vm-message-pointer)))
|
|
288 (setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon)
|
|
289 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon))
|
|
290 (cond ((vm-toolbar-can-recover-p)
|
|
291 (setq vm-toolbar-helper-command 'recover-file
|
|
292 vm-toolbar-helper-icon vm-toolbar-recover-icon))
|
100
|
293 ((vm-toolbar-mail-waiting-p)
|
|
294 (setq vm-toolbar-helper-command 'vm-get-new-mail
|
|
295 vm-toolbar-helper-icon vm-toolbar-getmail-icon))
|
98
|
296 ((vm-toolbar-can-decode-mime-p)
|
|
297 (setq vm-toolbar-helper-command 'vm-decode-mime-message
|
|
298 vm-toolbar-helper-icon vm-toolbar-decode-mime-icon))
|
0
|
299 (t
|
|
300 (setq vm-toolbar-helper-command 'vm-help
|
|
301 vm-toolbar-helper-icon vm-toolbar-help-icon)))
|
|
302 (if vm-summary-buffer
|
|
303 (vm-copy-local-variables vm-summary-buffer
|
|
304 'vm-toolbar-delete/undelete-icon
|
|
305 'vm-toolbar-helper-command
|
|
306 'vm-toolbar-helper-icon))
|
98
|
307 (if vm-presentation-buffer
|
|
308 (vm-copy-local-variables vm-presentation-buffer
|
|
309 'vm-toolbar-delete/undelete-icon
|
|
310 'vm-toolbar-helper-command
|
|
311 'vm-toolbar-helper-icon))
|
0
|
312 (and vm-toolbar-specifier
|
|
313 (progn
|
76
|
314 (set-specifier vm-toolbar-specifier (cons (current-buffer) nil))
|
|
315 (set-specifier vm-toolbar-specifier (cons (current-buffer)
|
|
316 vm-toolbar)))))
|
0
|
317
|
|
318 (defun vm-toolbar-install-toolbar ()
|
|
319 (vm-toolbar-initialize)
|
76
|
320 (let ((height (+ 4 (glyph-height (car vm-toolbar-help-icon))))
|
0
|
321 (width (+ 4 (glyph-width (car vm-toolbar-help-icon))))
|
146
|
322 (frame (selected-frame))
|
|
323 (buffer (current-buffer))
|
|
324 (tag-set '(win))
|
98
|
325 (myframe (vm-created-this-frame-p))
|
76
|
326 toolbar )
|
98
|
327 ;; glyph-width and glyph-height return 0 at startup sometimes
|
|
328 ;; use reasonable values if they fail.
|
|
329 (if (= width 4)
|
|
330 (setq width 68))
|
|
331 (if (= height 4)
|
|
332 (setq height 46))
|
76
|
333 ;; honor user setting of vm-toolbar if they are daring enough
|
|
334 ;; to set it.
|
|
335 (if vm-toolbar
|
|
336 (setq toolbar vm-toolbar)
|
|
337 (setq toolbar (vm-toolbar-make-toolbar-spec)
|
|
338 vm-toolbar toolbar))
|
0
|
339 (cond ((eq vm-toolbar-orientation 'right)
|
|
340 (setq vm-toolbar-specifier right-toolbar)
|
98
|
341 (if myframe
|
146
|
342 (set-specifier right-toolbar toolbar frame tag-set))
|
|
343 (set-specifier right-toolbar toolbar buffer)
|
175
|
344 (set-specifier right-toolbar-width width frame tag-set))
|
0
|
345 ((eq vm-toolbar-orientation 'left)
|
|
346 (setq vm-toolbar-specifier left-toolbar)
|
98
|
347 (if myframe
|
146
|
348 (set-specifier left-toolbar toolbar frame tag-set))
|
|
349 (set-specifier left-toolbar toolbar buffer)
|
175
|
350 (set-specifier left-toolbar-width width frame tag-set))
|
0
|
351 ((eq vm-toolbar-orientation 'bottom)
|
|
352 (setq vm-toolbar-specifier bottom-toolbar)
|
98
|
353 (if myframe
|
146
|
354 (set-specifier bottom-toolbar toolbar frame tag-set))
|
|
355 (set-specifier bottom-toolbar toolbar buffer)
|
175
|
356 (set-specifier bottom-toolbar-height height frame tag-set))
|
0
|
357 (t
|
|
358 (setq vm-toolbar-specifier top-toolbar)
|
98
|
359 (if myframe
|
146
|
360 (set-specifier top-toolbar toolbar frame tag-set))
|
|
361 (set-specifier top-toolbar toolbar buffer)
|
175
|
362 (set-specifier top-toolbar-height height frame tag-set)))))
|
0
|
363
|
|
364 (defun vm-toolbar-make-toolbar-spec ()
|
|
365 (let ((button-alist '(
|
|
366 (autofile . vm-toolbar-autofile-button)
|
|
367 (compose . vm-toolbar-compose-button)
|
|
368 (delete/undelete . vm-toolbar-delete/undelete-button)
|
|
369 (file . vm-toolbar-file-button)
|
|
370 (help . vm-toolbar-help-button)
|
98
|
371 (mime . vm-toolbar-decode-mime-button)
|
0
|
372 (next . vm-toolbar-next-button)
|
|
373 (previous . vm-toolbar-previous-button)
|
|
374 (print . vm-toolbar-print-button)
|
|
375 (quit . vm-toolbar-quit-button)
|
|
376 (reply . vm-toolbar-reply-button)
|
|
377 (visit . vm-toolbar-visit-button)
|
|
378 ))
|
|
379 (button-list vm-use-toolbar)
|
|
380 cons
|
|
381 (toolbar nil))
|
|
382 (while button-list
|
|
383 (if (null (car button-list))
|
|
384 (setq toolbar (cons nil toolbar))
|
|
385 (setq cons (assq (car button-list) button-alist))
|
|
386 (if cons
|
|
387 (setq toolbar (cons (symbol-value (cdr cons)) toolbar))))
|
|
388 (setq button-list (cdr button-list)))
|
|
389 (nreverse toolbar) ))
|
|
390
|
|
391 (defun vm-toolbar-initialize ()
|
|
392 ;; drag these in now instead of waiting for them to be
|
|
393 ;; autoloaded. the "loading..." messages could come at a bad
|
|
394 ;; moment and wipe an important echo area message, like "Auto
|
|
395 ;; save file is newer..."
|
|
396 (require 'vm-save)
|
|
397 (require 'vm-summary)
|
|
398 (cond
|
|
399 ((null vm-toolbar-help-icon)
|
|
400 (let ((tuples
|
|
401 (if (featurep 'xpm)
|
98
|
402 (list
|
146
|
403 (if (and (device-on-window-system-p)
|
|
404 (>= (device-bitplanes) 16))
|
98
|
405 '(vm-toolbar-decode-mime-icon "mime-colorful-up.xpm"
|
|
406 "mime-colorful-dn.xpm"
|
|
407 "mime-colorful-xx.xpm")
|
|
408 '(vm-toolbar-decode-mime-icon "mime-simple-up.xpm"
|
|
409 "mime-simple-dn.xpm"
|
|
410 "mime-simple-xx.xpm"))
|
|
411 '(vm-toolbar-next-icon "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
|
|
412 '(vm-toolbar-previous-icon "previous-up.xpm" "previous-dn.xpm"
|
0
|
413 "previous-dn.xpm")
|
98
|
414 '(vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
|
|
415 '(vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm"
|
0
|
416 "undelete-dn.xpm")
|
98
|
417 '(vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm"
|
0
|
418 "autofile-dn.xpm")
|
100
|
419 '(vm-toolbar-getmail-icon "getmail-up.xpm" "getmail-dn.xpm" "getmail-dn.xpm")
|
98
|
420 '(vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
|
|
421 '(vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
|
|
422 '(vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
|
|
423 '(vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
|
|
424 '(vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
|
|
425 '(vm-toolbar-quit-icon "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm")
|
|
426 '(vm-toolbar-help-icon "help-up.xpm" "help-dn.xpm" "help-dn.xpm")
|
|
427 '(vm-toolbar-recover-icon "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
|
0
|
428 )
|
|
429 '(
|
98
|
430 (vm-toolbar-decode-mime-icon "mime-up.xbm" "mime-dn.xbm" "mime-xx.xbm")
|
0
|
431 (vm-toolbar-next-icon "next-up.xbm" "next-dn.xbm" "next-xx.xbm")
|
|
432 (vm-toolbar-previous-icon "previous-up.xbm" "previous-dn.xbm"
|
|
433 "previous-xx.xbm")
|
|
434 (vm-toolbar-delete-icon "delete-up.xbm" "delete-dn.xbm" "delete-xx.xbm")
|
|
435 (vm-toolbar-undelete-icon "undelete-up.xbm" "undelete-dn.xbm"
|
|
436 "undelete-xx.xbm")
|
|
437 (vm-toolbar-autofile-icon "autofile-up.xbm" "autofile-dn.xbm"
|
|
438 "autofile-xx.xbm")
|
100
|
439 (vm-toolbar-getmail-icon "getmail-up.xbm" "getmail-dn.xbm" "getmail-xx.xbm")
|
0
|
440 (vm-toolbar-file-icon "file-up.xbm" "file-dn.xbm" "file-xx.xbm")
|
|
441 (vm-toolbar-reply-icon "reply-up.xbm" "reply-dn.xbm" "reply-xx.xbm")
|
|
442 (vm-toolbar-compose-icon "compose-up.xbm" "compose-dn.xbm" "compose-xx.xbm")
|
|
443 (vm-toolbar-print-icon "print-up.xbm" "print-dn.xbm" "print-xx.xbm")
|
|
444 (vm-toolbar-visit-icon "visit-up.xbm" "visit-dn.xbm" "visit-xx.xbm")
|
|
445 (vm-toolbar-quit-icon "quit-up.xbm" "quit-dn.xbm" "quit-xx.xbm")
|
|
446 (vm-toolbar-help-icon "help-up.xbm" "help-dn.xbm" "help-xx.xpm")
|
|
447 (vm-toolbar-recover-icon "recover-up.xbm" "recover-dn.xbm" "recover-xx.xpm")
|
|
448 )))
|
|
449 tuple files var)
|
|
450 (if (not (file-directory-p vm-toolbar-pixmap-directory))
|
|
451 (error "Bad toolbar pixmap directory: %s"
|
|
452 vm-toolbar-pixmap-directory)
|
|
453 (while tuples
|
|
454 (setq tuple (car tuples)
|
|
455 var (car tuple)
|
|
456 files (cdr tuple))
|
|
457 (set var (mapcar
|
|
458 (function
|
|
459 (lambda (f)
|
|
460 (make-glyph
|
|
461 (expand-file-name f vm-toolbar-pixmap-directory))))
|
|
462 files))
|
|
463 (setq tuples (cdr tuples)))))))
|
|
464 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
|
98
|
465 (setq-default vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
|
0
|
466 (setq vm-toolbar-helper-command 'vm-help)
|
98
|
467 (setq vm-toolbar-helper-icon vm-toolbar-help-icon)
|
|
468 (setq-default vm-toolbar-helper-icon vm-toolbar-help-icon))
|