comparison lisp/vm/vm-toolbar.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 05472e90ae02
children c0c698873ce1
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
1 ;;; Toolbar related functions and commands 1 ;;; Toolbar related functions and commands
2 ;;; Copyright (C) 1995-1997 Kyle E. Jones 2 ;;; Copyright (C) 1995 Kyle E. Jones
3 ;;; 3 ;;;
4 ;;; This program is free software; you can redistribute it and/or modify 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 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) 6 ;;; the Free Software Foundation; either version 1, or (at your option)
7 ;;; any later version. 7 ;;; any later version.
16 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
18 (provide 'vm-toolbar) 18 (provide 'vm-toolbar)
19 19
20 (defvar vm-toolbar-specifier nil) 20 (defvar vm-toolbar-specifier nil)
21 (defvar vm-toolbar nil)
21 22
22 (defvar vm-toolbar-next-button 23 (defvar vm-toolbar-next-button
23 [vm-toolbar-next-icon 24 [vm-toolbar-next-icon
24 vm-toolbar-next-command 25 vm-toolbar-next-command
25 (vm-toolbar-any-messages-p) 26 (vm-toolbar-any-messages-p)
26 "Go to the next message.\n 27 "Go to the next message.\n
27 The command `vm-toolbar-next-command' is run, which is normally 28 The command `vm-toolbar-next-command' is run, which is normally
28 fbound to `vm-next-message'. 29 bound to `vm-next-message'.
29 You can make this button run some other command by using a Lisp 30 You can make this button run some other command by using a Lisp
30 s-expression like this one in your .vm file: 31 s-expression like this one in your .vm file:
31 (fset 'vm-toolbar-next-command 'some-other-command)"]) 32 (fset 'vm-toolbar-next-command 'some-other-command)"])
32 (defvar vm-toolbar-next-icon nil) 33 (defvar vm-toolbar-next-icon nil)
33 (or (fboundp 'vm-toolbar-next-command) 34 (or (fboundp 'vm-toolbar-next-command)
37 [vm-toolbar-previous-icon 38 [vm-toolbar-previous-icon
38 vm-toolbar-previous-command 39 vm-toolbar-previous-command
39 (vm-toolbar-any-messages-p) 40 (vm-toolbar-any-messages-p)
40 "Go to the previous message.\n 41 "Go to the previous message.\n
41 The command `vm-toolbar-previous-command' is run, which is normally 42 The command `vm-toolbar-previous-command' is run, which is normally
42 fbound to `vm-previous-message'. 43 bound to `vm-previous-message'.
43 You can make this button run some other command by using a Lisp 44 You can make this button run some other command by using a Lisp
44 s-expression like this one in your .vm file: 45 s-expression like this one in your .vm file:
45 (fset 'vm-toolbar-previous-command 'some-other-command)"]) 46 (fset 'vm-toolbar-previous-command 'some-other-command)"])
46 (defvar vm-toolbar-previous-icon nil) 47 (defvar vm-toolbar-previous-icon nil)
47 (or (fboundp 'vm-toolbar-previous-command) 48 (or (fboundp 'vm-toolbar-previous-command)
56 57
57 (defvar vm-toolbar-file-button 58 (defvar vm-toolbar-file-button
58 [vm-toolbar-file-icon vm-toolbar-file-command (vm-toolbar-any-messages-p) 59 [vm-toolbar-file-icon vm-toolbar-file-command (vm-toolbar-any-messages-p)
59 "Save the current message to a folder.\n 60 "Save the current message to a folder.\n
60 The command `vm-toolbar-file-command' is run, which is normally 61 The command `vm-toolbar-file-command' is run, which is normally
61 fbound to `vm-save-message'. 62 bound to `vm-save-message'.
62 You can make this button run some other command by using a Lisp 63 You can make this button run some other command by using a Lisp
63 s-expression like this one in your .vm file: 64 s-expression like this one in your .vm file:
64 (fset 'vm-toolbar-file-command 'some-other-command)"]) 65 (fset 'vm-toolbar-file-command 'some-other-command)"])
65 (defvar vm-toolbar-file-icon nil) 66 (defvar vm-toolbar-file-icon nil)
66 (or (fboundp 'vm-toolbar-file-command) 67 (or (fboundp 'vm-toolbar-file-command)
67 (fset 'vm-toolbar-file-command 'vm-save-message)) 68 (fset 'vm-toolbar-file-command 'vm-save-message))
68 69
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
74 fbound to `vm-get-new-mail'.
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
82 (defvar vm-toolbar-print-button 70 (defvar vm-toolbar-print-button
83 [vm-toolbar-print-icon 71 [vm-toolbar-print-icon
84 vm-toolbar-print-command 72 vm-toolbar-print-command
85 (vm-toolbar-any-messages-p) 73 (vm-toolbar-any-messages-p)
86 "Print the current message.\n 74 "Print the current message.\n
87 The command `vm-toolbar-print-command' is run, which is normally 75 The command `vm-toolbar-print-command' is run, which is normally
88 fbound to `vm-print-message'. 76 bound to `vm-print-message'.
89 You can make this button run some other command by using a Lisp 77 You can make this button run some other command by using a Lisp
90 s-expression like this one in your .vm file: 78 s-expression like this one in your .vm file:
91 (fset 'vm-toolbar-print-command 'some-other-command)"]) 79 (fset 'vm-toolbar-print-command 'some-other-command)"])
92 (defvar vm-toolbar-print-icon nil) 80 (defvar vm-toolbar-print-icon nil)
93 (or (fboundp 'vm-toolbar-print-command) 81 (or (fboundp 'vm-toolbar-print-command)
95 83
96 (defvar vm-toolbar-visit-button 84 (defvar vm-toolbar-visit-button
97 [vm-toolbar-visit-icon vm-toolbar-visit-command t 85 [vm-toolbar-visit-icon vm-toolbar-visit-command t
98 "Visit a different folder.\n 86 "Visit a different folder.\n
99 The command `vm-toolbar-visit-command' is run, which is normally 87 The command `vm-toolbar-visit-command' is run, which is normally
100 fbound to `vm-visit-folder'. 88 bound to `vm-visit-folder'.
101 You can make this button run some other command by using a Lisp 89 You can make this button run some other command by using a Lisp
102 s-expression like this one in your .vm file: 90 s-expression like this one in your .vm file:
103 (fset 'vm-toolbar-visit-command 'some-other-command)"]) 91 (fset 'vm-toolbar-visit-command 'some-other-command)"])
104 (defvar vm-toolbar-visit-icon nil) 92 (defvar vm-toolbar-visit-icon nil)
105 (or (fboundp 'vm-toolbar-visit-command) 93 (or (fboundp 'vm-toolbar-visit-command)
109 [vm-toolbar-reply-icon 97 [vm-toolbar-reply-icon
110 vm-toolbar-reply-command 98 vm-toolbar-reply-command
111 (vm-toolbar-any-messages-p) 99 (vm-toolbar-any-messages-p)
112 "Reply to the current message.\n 100 "Reply to the current message.\n
113 The command `vm-toolbar-reply-command' is run, which is normally 101 The command `vm-toolbar-reply-command' is run, which is normally
114 fbound to `vm-followup-include-text'. 102 bound to `vm-followup-include-text'.
115 You can make this button run some other command by using a Lisp 103 You can make this button run some other command by using a Lisp
116 s-expression like this one in your .vm file: 104 s-expression like this one in your .vm file:
117 (fset 'vm-toolbar-reply-command 'some-other-command)"]) 105 (fset 'vm-toolbar-reply-command 'some-other-command)"])
118 (defvar vm-toolbar-reply-icon nil) 106 (defvar vm-toolbar-reply-icon nil)
119 (or (fboundp 'vm-toolbar-reply-command) 107 (or (fboundp 'vm-toolbar-reply-command)
121 109
122 (defvar vm-toolbar-compose-button 110 (defvar vm-toolbar-compose-button
123 [vm-toolbar-compose-icon vm-toolbar-compose-command t 111 [vm-toolbar-compose-icon vm-toolbar-compose-command t
124 "Compose a new message.\n 112 "Compose a new message.\n
125 The command `vm-toolbar-compose-command' is run, which is normally 113 The command `vm-toolbar-compose-command' is run, which is normally
126 fbound to `vm-mail'. 114 bound to `vm-mail'.
127 You can make this button run some other command by using a Lisp 115 You can make this button run some other command by using a Lisp
128 s-expression like this one in your .vm file: 116 s-expression like this one in your .vm file:
129 (fset 'vm-toolbar-compose-command 'some-other-command)"]) 117 (fset 'vm-toolbar-compose-command 'some-other-command)"])
130 (defvar vm-toolbar-compose-icon nil) 118 (defvar vm-toolbar-compose-icon nil)
131 (or (fboundp 'vm-toolbar-compose-command) 119 (or (fboundp 'vm-toolbar-compose-command)
132 (fset 'vm-toolbar-compose-command 'vm-mail)) 120 (fset 'vm-toolbar-compose-command 'vm-mail))
133 121
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
144 fbound to `vm-decode-mime-messages'.
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
152 (defvar vm-toolbar-delete-icon nil) 122 (defvar vm-toolbar-delete-icon nil)
153 123
154 (defvar vm-toolbar-undelete-icon nil) 124 (defvar vm-toolbar-undelete-icon nil)
155 125
156 (defvar vm-toolbar-delete/undelete-button 126 (defvar vm-toolbar-delete/undelete-button
167 137
168 (defvar vm-toolbar-helper-icon nil) 138 (defvar vm-toolbar-helper-icon nil)
169 (make-variable-buffer-local 'vm-toolbar-helper-icon) 139 (make-variable-buffer-local 'vm-toolbar-helper-icon)
170 140
171 (defvar vm-toolbar-help-button 141 (defvar vm-toolbar-help-button
172 [vm-toolbar-helper-icon vm-toolbar-helper-command 142 [vm-toolbar-helper-icon vm-toolbar-helper-command t
173 (vm-toolbar-can-help-p)
174 "Don't Panic.\n 143 "Don't Panic.\n
175 VM uses this button to offer help if you're in trouble. 144 VM uses this button to offer help if you're in trouble.
176 Under normal circumstances, this button runs `vm-help'.\n 145 Under normal circumstances, this button runs `vm-help'.\n
177 If the current folder looks out-of-date relative to its auto-save 146 If the current folder looks out-of-date relative to its auto-save
178 file then this button will run `recover-file'."]) 147 file then this button will run `recover-file'."])
184 (interactive) 153 (interactive)
185 (setq this-command vm-toolbar-helper-command) 154 (setq this-command vm-toolbar-helper-command)
186 (call-interactively vm-toolbar-helper-command)) 155 (call-interactively vm-toolbar-helper-command))
187 156
188 (defvar vm-toolbar-quit-button 157 (defvar vm-toolbar-quit-button
189 [vm-toolbar-quit-icon vm-toolbar-quit-command 158 [vm-toolbar-quit-icon vm-toolbar-quit-command t
190 (vm-toolbar-can-quit-p) 159 "Quit VM.\n
191 "Quit visiting this folder.\n
192 The command `vm-toolbar-quit-command' is run, which is normally 160 The command `vm-toolbar-quit-command' is run, which is normally
193 fbound to `vm-quit'. 161 bound to `vm-quit'.
194 You can make this button run some other command by using a Lisp 162 You can make this button run some other command by using a Lisp
195 s-expression like this one in your .vm file: 163 s-expression like this one in your .vm file:
196 (fset 'vm-toolbar-quit-command 'some-other-command)"]) 164 (fset 'vm-toolbar-quit-command 'some-other-command)"])
197 (defvar vm-toolbar-quit-icon nil) 165 (defvar vm-toolbar-quit-icon nil)
198 (or (fboundp 'vm-toolbar-quit-command) 166 (or (fboundp 'vm-toolbar-quit-command)
199 (fset 'vm-toolbar-quit-command 'vm-quit)) 167 (fset 'vm-toolbar-quit-command 'vm-quit))
200 168
201 (defun vm-toolbar-any-messages-p () 169 (defun vm-toolbar-any-messages-p ()
202 (condition-case nil 170 (save-excursion
203 (save-excursion 171 (vm-check-for-killed-folder)
204 (vm-check-for-killed-folder) 172 (vm-select-folder-buffer)
205 (vm-select-folder-buffer) 173 vm-message-list))
206 vm-message-list)
207 (error nil)))
208 174
209 (defun vm-toolbar-delete/undelete-message (&optional prefix-arg) 175 (defun vm-toolbar-delete/undelete-message (&optional prefix-arg)
210 (interactive "P") 176 (interactive "P")
211 (vm-follow-summary-cursor) 177 (vm-follow-summary-cursor)
212 (vm-select-folder-buffer) 178 (vm-select-folder-buffer)
218 (call-interactively 'vm-undelete-message) 184 (call-interactively 'vm-undelete-message)
219 (call-interactively 'vm-delete-message)))) 185 (call-interactively 'vm-delete-message))))
220 186
221 (defun vm-toolbar-can-autofile-p () 187 (defun vm-toolbar-can-autofile-p ()
222 (interactive) 188 (interactive)
223 (condition-case nil 189 (save-excursion
224 (save-excursion 190 (vm-check-for-killed-folder)
225 (vm-check-for-killed-folder) 191 (vm-select-folder-buffer)
226 (vm-select-folder-buffer) 192 (and vm-message-pointer
227 (and vm-message-pointer 193 (vm-auto-select-folder vm-message-pointer vm-auto-folder-alist))))
228 (vm-auto-select-folder vm-message-pointer vm-auto-folder-alist)))
229 (error nil)))
230 194
231 (defun vm-toolbar-autofile-message () 195 (defun vm-toolbar-autofile-message ()
232 (interactive) 196 (interactive)
233 (vm-follow-summary-cursor) 197 (vm-follow-summary-cursor)
234 (vm-select-folder-buffer) 198 (vm-select-folder-buffer)
241 (vm-save-message file 1) 205 (vm-save-message file 1)
242 (message "Message saved to %s" file)) 206 (message "Message saved to %s" file))
243 (error "No match for message in vm-auto-folder-alist.")))) 207 (error "No match for message in vm-auto-folder-alist."))))
244 208
245 (defun vm-toolbar-can-recover-p () 209 (defun vm-toolbar-can-recover-p ()
246 (condition-case nil 210 (save-excursion
247 (save-excursion 211 (vm-check-for-killed-folder)
248 (vm-select-folder-buffer) 212 (vm-select-folder-buffer)
249 (and vm-folder-read-only 213 (and vm-folder-read-only
250 buffer-file-name 214 buffer-file-name
251 buffer-auto-save-file-name 215 buffer-auto-save-file-name
252 (null (buffer-modified-p)) 216 (null (buffer-modified-p))
253 (file-newer-than-file-p 217 (file-newer-than-file-p
254 buffer-auto-save-file-name 218 buffer-auto-save-file-name
255 buffer-file-name))) 219 buffer-file-name))))
256 (error nil)))
257
258 (defun vm-toolbar-can-decode-mime-p ()
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)))
269
270 (defun vm-toolbar-can-quit-p ()
271 (condition-case nil
272 (save-excursion
273 (vm-select-folder-buffer)
274 (memq major-mode '(vm-mode vm-virtual-mode)))
275 (error nil)))
276
277 (defun vm-toolbar-mail-waiting-p ()
278 (condition-case nil
279 (save-excursion
280 (vm-select-folder-buffer)
281 vm-spooled-mail-waiting)
282 (error nil)))
283
284 (fset 'vm-toolbar-can-help-p 'vm-toolbar-can-quit-p)
285 220
286 (defun vm-toolbar-update-toolbar () 221 (defun vm-toolbar-update-toolbar ()
287 (if (and vm-message-pointer (vm-deleted-flag (car vm-message-pointer))) 222 (if (and vm-message-pointer (vm-deleted-flag (car vm-message-pointer)))
288 (setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon) 223 (setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon)
289 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)) 224 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon))
290 (cond ((vm-toolbar-can-recover-p) 225 (cond ((vm-toolbar-can-recover-p)
291 (setq vm-toolbar-helper-command 'recover-file 226 (setq vm-toolbar-helper-command 'recover-file
292 vm-toolbar-helper-icon vm-toolbar-recover-icon)) 227 vm-toolbar-helper-icon vm-toolbar-recover-icon))
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))
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))
299 (t 228 (t
300 (setq vm-toolbar-helper-command 'vm-help 229 (setq vm-toolbar-helper-command 'vm-help
301 vm-toolbar-helper-icon vm-toolbar-help-icon))) 230 vm-toolbar-helper-icon vm-toolbar-help-icon)))
302 (if vm-summary-buffer 231 (if vm-summary-buffer
303 (vm-copy-local-variables vm-summary-buffer 232 (vm-copy-local-variables vm-summary-buffer
304 'vm-toolbar-delete/undelete-icon 233 'vm-toolbar-delete/undelete-icon
305 'vm-toolbar-helper-command 234 'vm-toolbar-helper-command
306 'vm-toolbar-helper-icon)) 235 'vm-toolbar-helper-icon))
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))
312 (and vm-toolbar-specifier 236 (and vm-toolbar-specifier
313 (progn 237 (progn
314 (set-specifier vm-toolbar-specifier (cons (current-buffer) nil)) 238 (let ((locale (if (memq 'vm-delete-buffer-frame kill-buffer-hook)
315 (set-specifier vm-toolbar-specifier (cons (current-buffer) 239 (selected-frame)
316 vm-toolbar))))) 240 (current-buffer))))
241 (set-specifier vm-toolbar-specifier (cons locale nil))
242 (set-specifier vm-toolbar-specifier (cons locale vm-toolbar))))))
317 243
318 (defun vm-toolbar-install-toolbar () 244 (defun vm-toolbar-install-toolbar ()
319 (vm-toolbar-initialize) 245 (vm-toolbar-initialize)
320 (let ((height (+ 4 (glyph-height (car vm-toolbar-help-icon)))) 246 (let ((toolbar (vm-toolbar-make-toolbar-spec))
247 (height (+ 4 (glyph-height (car vm-toolbar-help-icon))))
321 (width (+ 4 (glyph-width (car vm-toolbar-help-icon)))) 248 (width (+ 4 (glyph-width (car vm-toolbar-help-icon))))
322 (frame (selected-frame)) 249 (locale (if (memq 'vm-delete-buffer-frame kill-buffer-hook)
323 (buffer (current-buffer)) 250 (selected-frame)
324 (tag-set '(win)) 251 (current-buffer))))
325 (myframe (vm-created-this-frame-p)) 252 (setq vm-toolbar toolbar)
326 toolbar )
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))
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))
339 (cond ((eq vm-toolbar-orientation 'right) 253 (cond ((eq vm-toolbar-orientation 'right)
340 (setq vm-toolbar-specifier right-toolbar) 254 (setq vm-toolbar-specifier right-toolbar)
341 (if myframe 255 (set-specifier right-toolbar (cons locale toolbar))
342 (set-specifier right-toolbar toolbar frame tag-set)) 256 (set-specifier right-toolbar-width (cons (selected-frame) width)))
343 (set-specifier right-toolbar toolbar buffer)
344 (set-specifier right-toolbar-width width frame tag-set))
345 ((eq vm-toolbar-orientation 'left) 257 ((eq vm-toolbar-orientation 'left)
346 (setq vm-toolbar-specifier left-toolbar) 258 (setq vm-toolbar-specifier left-toolbar)
347 (if myframe 259 (set-specifier left-toolbar (cons locale toolbar))
348 (set-specifier left-toolbar toolbar frame tag-set)) 260 (set-specifier left-toolbar-width (cons (selected-frame) width)))
349 (set-specifier left-toolbar toolbar buffer)
350 (set-specifier left-toolbar-width width frame tag-set))
351 ((eq vm-toolbar-orientation 'bottom) 261 ((eq vm-toolbar-orientation 'bottom)
352 (setq vm-toolbar-specifier bottom-toolbar) 262 (setq vm-toolbar-specifier bottom-toolbar)
353 (if myframe 263 (set-specifier bottom-toolbar (cons locale toolbar))
354 (set-specifier bottom-toolbar toolbar frame tag-set)) 264 (set-specifier bottom-toolbar-height (cons (selected-frame)
355 (set-specifier bottom-toolbar toolbar buffer) 265 height)))
356 (set-specifier bottom-toolbar-height height frame tag-set))
357 (t 266 (t
358 (setq vm-toolbar-specifier top-toolbar) 267 (setq vm-toolbar-specifier top-toolbar)
359 (if myframe 268 (set-specifier top-toolbar (cons locale toolbar))
360 (set-specifier top-toolbar toolbar frame tag-set)) 269 (set-specifier top-toolbar-height (cons (selected-frame)
361 (set-specifier top-toolbar toolbar buffer) 270 height))))))
362 (set-specifier top-toolbar-height height frame tag-set)))))
363 271
364 (defun vm-toolbar-make-toolbar-spec () 272 (defun vm-toolbar-make-toolbar-spec ()
365 (let ((button-alist '( 273 (let ((button-alist '(
366 (autofile . vm-toolbar-autofile-button) 274 (autofile . vm-toolbar-autofile-button)
367 (compose . vm-toolbar-compose-button) 275 (compose . vm-toolbar-compose-button)
368 (delete/undelete . vm-toolbar-delete/undelete-button) 276 (delete/undelete . vm-toolbar-delete/undelete-button)
369 (file . vm-toolbar-file-button) 277 (file . vm-toolbar-file-button)
370 (getmail . vm-toolbar-getmail-button)
371 (help . vm-toolbar-help-button) 278 (help . vm-toolbar-help-button)
372 (mime . vm-toolbar-decode-mime-button)
373 (next . vm-toolbar-next-button) 279 (next . vm-toolbar-next-button)
374 (previous . vm-toolbar-previous-button) 280 (previous . vm-toolbar-previous-button)
375 (print . vm-toolbar-print-button) 281 (print . vm-toolbar-print-button)
376 (quit . vm-toolbar-quit-button) 282 (quit . vm-toolbar-quit-button)
377 (reply . vm-toolbar-reply-button) 283 (reply . vm-toolbar-reply-button)
398 (require 'vm-summary) 304 (require 'vm-summary)
399 (cond 305 (cond
400 ((null vm-toolbar-help-icon) 306 ((null vm-toolbar-help-icon)
401 (let ((tuples 307 (let ((tuples
402 (if (featurep 'xpm) 308 (if (featurep 'xpm)
403 (list 309 '(
404 (if (and (device-on-window-system-p) 310 (vm-toolbar-next-icon "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
405 (>= (device-bitplanes) 16)) 311 (vm-toolbar-previous-icon "previous-up.xpm" "previous-dn.xpm"
406 '(vm-toolbar-decode-mime-icon "mime-colorful-up.xpm"
407 "mime-colorful-dn.xpm"
408 "mime-colorful-xx.xpm")
409 '(vm-toolbar-decode-mime-icon "mime-simple-up.xpm"
410 "mime-simple-dn.xpm"
411 "mime-simple-xx.xpm"))
412 '(vm-toolbar-next-icon "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
413 '(vm-toolbar-previous-icon "previous-up.xpm" "previous-dn.xpm"
414 "previous-dn.xpm") 312 "previous-dn.xpm")
415 '(vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm") 313 (vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
416 '(vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm" 314 (vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm"
417 "undelete-dn.xpm") 315 "undelete-dn.xpm")
418 '(vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm" 316 (vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm"
419 "autofile-dn.xpm") 317 "autofile-dn.xpm")
420 '(vm-toolbar-getmail-icon "getmail-up.xpm" "getmail-dn.xpm" "getmail-dn.xpm") 318 (vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
421 '(vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm") 319 (vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
422 '(vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm") 320 (vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
423 '(vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm") 321 (vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
424 '(vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm") 322 (vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
425 '(vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm") 323 (vm-toolbar-quit-icon "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm")
426 '(vm-toolbar-quit-icon "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm") 324 (vm-toolbar-help-icon "help-up.xpm" "help-dn.xpm" "help-dn.xpm")
427 '(vm-toolbar-help-icon "help-up.xpm" "help-dn.xpm" "help-dn.xpm") 325 (vm-toolbar-recover-icon "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
428 '(vm-toolbar-recover-icon "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
429 ) 326 )
430 '( 327 '(
431 (vm-toolbar-decode-mime-icon "mime-up.xbm" "mime-dn.xbm" "mime-xx.xbm")
432 (vm-toolbar-next-icon "next-up.xbm" "next-dn.xbm" "next-xx.xbm") 328 (vm-toolbar-next-icon "next-up.xbm" "next-dn.xbm" "next-xx.xbm")
433 (vm-toolbar-previous-icon "previous-up.xbm" "previous-dn.xbm" 329 (vm-toolbar-previous-icon "previous-up.xbm" "previous-dn.xbm"
434 "previous-xx.xbm") 330 "previous-xx.xbm")
435 (vm-toolbar-delete-icon "delete-up.xbm" "delete-dn.xbm" "delete-xx.xbm") 331 (vm-toolbar-delete-icon "delete-up.xbm" "delete-dn.xbm" "delete-xx.xbm")
436 (vm-toolbar-undelete-icon "undelete-up.xbm" "undelete-dn.xbm" 332 (vm-toolbar-undelete-icon "undelete-up.xbm" "undelete-dn.xbm"
437 "undelete-xx.xbm") 333 "undelete-xx.xbm")
438 (vm-toolbar-autofile-icon "autofile-up.xbm" "autofile-dn.xbm" 334 (vm-toolbar-autofile-icon "autofile-up.xbm" "autofile-dn.xbm"
439 "autofile-xx.xbm") 335 "autofile-xx.xbm")
440 (vm-toolbar-getmail-icon "getmail-up.xbm" "getmail-dn.xbm" "getmail-xx.xbm")
441 (vm-toolbar-file-icon "file-up.xbm" "file-dn.xbm" "file-xx.xbm") 336 (vm-toolbar-file-icon "file-up.xbm" "file-dn.xbm" "file-xx.xbm")
442 (vm-toolbar-reply-icon "reply-up.xbm" "reply-dn.xbm" "reply-xx.xbm") 337 (vm-toolbar-reply-icon "reply-up.xbm" "reply-dn.xbm" "reply-xx.xbm")
443 (vm-toolbar-compose-icon "compose-up.xbm" "compose-dn.xbm" "compose-xx.xbm") 338 (vm-toolbar-compose-icon "compose-up.xbm" "compose-dn.xbm" "compose-xx.xbm")
444 (vm-toolbar-print-icon "print-up.xbm" "print-dn.xbm" "print-xx.xbm") 339 (vm-toolbar-print-icon "print-up.xbm" "print-dn.xbm" "print-xx.xbm")
445 (vm-toolbar-visit-icon "visit-up.xbm" "visit-dn.xbm" "visit-xx.xbm") 340 (vm-toolbar-visit-icon "visit-up.xbm" "visit-dn.xbm" "visit-xx.xbm")
461 (make-glyph 356 (make-glyph
462 (expand-file-name f vm-toolbar-pixmap-directory)))) 357 (expand-file-name f vm-toolbar-pixmap-directory))))
463 files)) 358 files))
464 (setq tuples (cdr tuples))))))) 359 (setq tuples (cdr tuples)))))))
465 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon) 360 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
466 (setq-default vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
467 (setq vm-toolbar-helper-command 'vm-help) 361 (setq vm-toolbar-helper-command 'vm-help)
468 (setq vm-toolbar-helper-icon vm-toolbar-help-icon) 362 (setq vm-toolbar-helper-icon vm-toolbar-help-icon))
469 (setq-default vm-toolbar-helper-icon vm-toolbar-help-icon))