1
;;; Toolbar related functions and commands
2
;;; Copyright (C) 1995-1997, 2000, 2001 Kyle E. Jones
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)
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.
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.
18
;;(provide 'vm-toolbar)
20
(defvar vm-toolbar-specifier nil)
22
(defvar vm-toolbar-next-button
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
28
fbound to `vm-next-message'.
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))
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
42
fbound to `vm-previous-message'.
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))
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)
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
61
fbound to `vm-save-message'.
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))
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))
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
88
fbound to `vm-print-message'.
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))
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
100
fbound to `vm-visit-folder'.
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))
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
114
fbound to `vm-followup-include-text'.
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))
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
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))
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))
152
;; The values of these two are used by the FSF Emacs toolbar
153
;; code. The values don't matter as long as they are different
154
;; (as compared with eq). Under XEmacs these values are ignored
156
(defvar vm-toolbar-delete-icon t)
157
(defvar vm-toolbar-undelete-icon nil)
159
(defvar vm-toolbar-delete/undelete-button
160
[vm-toolbar-delete/undelete-icon
161
vm-toolbar-delete/undelete-message
162
(vm-toolbar-any-messages-p)
163
"Delete the current message, or undelete it if it is already deleted."])
164
(defvar vm-toolbar-delete/undelete-icon nil)
165
(make-variable-buffer-local 'vm-toolbar-delete/undelete-icon)
167
(defvar vm-toolbar-help-icon nil)
169
(defvar vm-toolbar-recover-icon nil)
171
(defvar vm-toolbar-helper-icon nil)
172
(make-variable-buffer-local 'vm-toolbar-helper-icon)
174
(defvar vm-toolbar-help-button
175
[vm-toolbar-helper-icon vm-toolbar-helper-command
176
(vm-toolbar-can-help-p)
178
VM uses this button to offer help if you're in trouble.
179
Under normal circumstances, this button runs `vm-help'.
180
If the current folder looks out-of-date relative to its auto-save
181
file then this button will run `recover-file'
182
If there is mail waiting in one of the spool files associated
183
with the current folder, and the `getmail' button is not on the
184
toolbar, this button will run `vm-get-new-mail'.
185
If the current message needs to be MIME decoded then this button
186
will run 'vm-decode-mime-message'."])
188
(defvar vm-toolbar-helper-command nil)
189
(make-variable-buffer-local 'vm-toolbar-helper-command)
191
(defun vm-toolbar-helper-command ()
193
(setq this-command vm-toolbar-helper-command)
194
(call-interactively vm-toolbar-helper-command))
196
(defvar vm-toolbar-quit-button
197
[vm-toolbar-quit-icon vm-toolbar-quit-command
198
(vm-toolbar-can-quit-p)
199
"Quit visiting this folder.\n
200
The command `vm-toolbar-quit-command' is run, which is normally
202
You can make this button run some other command by using a Lisp
203
s-expression like this one in your .vm file:
204
(fset 'vm-toolbar-quit-command 'some-other-command)"])
205
(defvar vm-toolbar-quit-icon nil)
206
(or (fboundp 'vm-toolbar-quit-command)
207
(fset 'vm-toolbar-quit-command 'vm-quit))
209
(defun vm-toolbar-any-messages-p ()
212
(vm-check-for-killed-folder)
213
(vm-select-folder-buffer-if-possible)
217
(defun vm-toolbar-delete/undelete-message (&optional prefix-arg)
219
(vm-follow-summary-cursor)
220
(vm-select-folder-buffer)
221
(vm-check-for-killed-summary)
222
(vm-error-if-folder-read-only)
223
(vm-error-if-folder-empty)
224
(let ((current-prefix-arg prefix-arg))
225
(if (vm-deleted-flag (car vm-message-pointer))
226
(call-interactively 'vm-undelete-message)
227
(call-interactively 'vm-delete-message))))
229
(defun vm-toolbar-can-autofile-p ()
233
(vm-check-for-killed-folder)
234
(vm-select-folder-buffer-if-possible)
235
(and vm-message-pointer
236
(vm-auto-select-folder vm-message-pointer vm-auto-folder-alist)))
239
(defun vm-toolbar-autofile-message ()
241
(vm-follow-summary-cursor)
242
(vm-select-folder-buffer)
243
(vm-check-for-killed-summary)
244
(vm-error-if-folder-read-only)
245
(vm-error-if-folder-empty)
246
(let ((file (vm-auto-select-folder vm-message-pointer vm-auto-folder-alist)))
249
(vm-save-message file 1)
250
(message "Message saved to %s" file))
251
(error "No match for message in vm-auto-folder-alist."))))
253
(defun vm-toolbar-can-recover-p ()
256
(vm-select-folder-buffer)
257
(and vm-folder-read-only
259
buffer-auto-save-file-name
260
(null (buffer-modified-p))
261
(file-newer-than-file-p
262
buffer-auto-save-file-name
266
(defun vm-toolbar-can-decode-mime-p ()
269
(vm-select-folder-buffer)
271
vm-display-using-mime
273
vm-presentation-buffer
274
(not (vm-mime-plain-message-p (car vm-message-pointer)))))
277
(defun vm-toolbar-can-quit-p ()
280
(vm-select-folder-buffer)
281
(memq major-mode '(vm-mode vm-virtual-mode)))
284
(defun vm-toolbar-mail-waiting-p ()
287
(vm-select-folder-buffer)
288
(or (not (natnump vm-mail-check-interval))
289
vm-spooled-mail-waiting))
292
(fset 'vm-toolbar-can-help-p 'vm-toolbar-can-quit-p)
294
(defun vm-toolbar-update-toolbar ()
295
(if (and vm-message-pointer (vm-deleted-flag (car vm-message-pointer)))
296
(setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon)
297
(setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon))
298
(cond ((vm-toolbar-can-recover-p)
299
(setq vm-toolbar-helper-command 'recover-file
300
vm-toolbar-helper-icon vm-toolbar-recover-icon))
301
((and (vm-toolbar-mail-waiting-p)
302
(not (memq 'getmail vm-use-toolbar)))
303
(setq vm-toolbar-helper-command 'vm-get-new-mail
304
vm-toolbar-helper-icon vm-toolbar-getmail-icon))
305
((and (vm-toolbar-can-decode-mime-p) (not vm-mime-decoded)
306
(not (memq 'mime vm-use-toolbar)))
307
(setq vm-toolbar-helper-command 'vm-decode-mime-message
308
vm-toolbar-helper-icon vm-toolbar-decode-mime-icon))
310
(setq vm-toolbar-helper-command 'vm-help
311
vm-toolbar-helper-icon vm-toolbar-help-icon)))
312
(if vm-summary-buffer
313
(vm-copy-local-variables vm-summary-buffer
314
'vm-toolbar-delete/undelete-icon
315
'vm-toolbar-helper-command
316
'vm-toolbar-helper-icon))
317
(if vm-presentation-buffer
318
(vm-copy-local-variables vm-presentation-buffer
319
'vm-toolbar-delete/undelete-icon
320
'vm-toolbar-helper-command
321
'vm-toolbar-helper-icon))
322
(and vm-toolbar-specifier
324
(set-specifier vm-toolbar-specifier (cons (current-buffer) nil))
325
(set-specifier vm-toolbar-specifier (cons (current-buffer)
328
(defun vm-toolbar-install-or-uninstall-toolbar ()
329
(and (vm-toolbar-support-possible-p) vm-use-toolbar
330
(vm-toolbar-install-toolbar))
331
(if (and vm-fsfemacs-p (not vm-use-toolbar))
332
(vm-toolbar-fsfemacs-uninstall-toolbar)))
334
(defun vm-toolbar-install-toolbar ()
335
;; drag these in now instead of waiting for them to be
336
;; autoloaded. the "loading..." messages could come at a bad
337
;; moment and wipe an important echo area message, like "Auto
338
;; save file is newer..."
340
(require 'vm-summary)
342
(if (not vm-fsfemacs-toolbar-installed-p)
343
(vm-toolbar-fsfemacs-install-toolbar))
344
(if (not (and (stringp vm-toolbar-pixmap-directory)
345
(file-directory-p vm-toolbar-pixmap-directory)))
347
(message "Bad toolbar pixmap directory, can't setup toolbar.")
349
(vm-toolbar-initialize)
350
(let ((height (+ 4 (glyph-height (car vm-toolbar-help-icon))))
351
(width (+ 4 (glyph-width (car vm-toolbar-help-icon))))
352
(frame (selected-frame))
353
(buffer (current-buffer))
355
(myframe (vm-created-this-frame-p))
357
;; glyph-width and glyph-height return 0 at startup sometimes
358
;; use reasonable values if they fail.
363
;; honor user setting of vm-toolbar if they are daring enough
366
(setq toolbar vm-toolbar)
367
(setq toolbar (vm-toolbar-make-toolbar-spec)
369
(cond ((eq vm-toolbar-orientation 'right)
370
(setq vm-toolbar-specifier right-toolbar)
372
(set-specifier right-toolbar toolbar frame tag-set))
373
(set-specifier right-toolbar toolbar buffer)
374
(set-specifier right-toolbar-width width frame tag-set))
375
((eq vm-toolbar-orientation 'left)
376
(setq vm-toolbar-specifier left-toolbar)
378
(set-specifier left-toolbar toolbar frame tag-set))
379
(set-specifier left-toolbar toolbar buffer)
380
(set-specifier left-toolbar-width width frame tag-set))
381
((eq vm-toolbar-orientation 'bottom)
382
(setq vm-toolbar-specifier bottom-toolbar)
384
(set-specifier bottom-toolbar toolbar frame tag-set))
385
(set-specifier bottom-toolbar toolbar buffer)
386
(set-specifier bottom-toolbar-height height frame tag-set))
388
(setq vm-toolbar-specifier top-toolbar)
390
(set-specifier top-toolbar toolbar frame tag-set))
391
(set-specifier top-toolbar toolbar buffer)
392
(set-specifier top-toolbar-height height frame tag-set)))))))
394
(defun vm-toolbar-make-toolbar-spec ()
395
(let ((button-alist '(
396
(autofile . vm-toolbar-autofile-button)
397
(compose . vm-toolbar-compose-button)
398
(delete/undelete . vm-toolbar-delete/undelete-button)
399
(file . vm-toolbar-file-button)
400
(getmail . vm-toolbar-getmail-button)
401
(help . vm-toolbar-help-button)
402
(mime . vm-toolbar-decode-mime-button)
403
(next . vm-toolbar-next-button)
404
(previous . vm-toolbar-previous-button)
405
(print . vm-toolbar-print-button)
406
(quit . vm-toolbar-quit-button)
407
(reply . vm-toolbar-reply-button)
408
(visit . vm-toolbar-visit-button)
410
(button-list vm-use-toolbar)
414
(cond ((null (car button-list))
415
(setq toolbar (cons nil toolbar)))
416
((integerp (car button-list))
417
(if (< 0 (car button-list))
418
(setq toolbar (cons (vector ':size (car button-list)
422
(setq cons (assq (car button-list) button-alist))
424
(setq toolbar (cons (symbol-value (cdr cons)) toolbar)))))
425
(setq button-list (cdr button-list)))
426
(nreverse toolbar) ))
428
(defun vm-toolbar-initialize ()
431
((null vm-toolbar-help-icon)
435
(if (and (device-on-window-system-p)
436
(>= (device-bitplanes) 16))
437
'(vm-toolbar-decode-mime-icon "mime-colorful-up.xpm"
438
"mime-colorful-dn.xpm"
439
"mime-colorful-xx.xpm")
440
'(vm-toolbar-decode-mime-icon "mime-simple-up.xpm"
442
"mime-simple-xx.xpm"))
443
'(vm-toolbar-next-icon "next-up.xpm" "next-dn.xpm" "next-dn.xpm")
444
'(vm-toolbar-previous-icon "previous-up.xpm" "previous-dn.xpm"
446
'(vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
447
'(vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm"
449
'(vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm"
451
'(vm-toolbar-getmail-icon "getmail-up.xpm" "getmail-dn.xpm" "getmail-dn.xpm")
452
'(vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
453
'(vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
454
'(vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
455
'(vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
456
'(vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
457
'(vm-toolbar-quit-icon "quit-up.xpm" "quit-dn.xpm" "quit-dn.xpm")
458
'(vm-toolbar-help-icon "help-up.xpm" "help-dn.xpm" "help-dn.xpm")
459
'(vm-toolbar-recover-icon "recover-up.xpm" "recover-dn.xpm" "recover-dn.xpm")
462
(vm-toolbar-decode-mime-icon "mime-up.xbm" "mime-dn.xbm" "mime-xx.xbm")
463
(vm-toolbar-next-icon "next-up.xbm" "next-dn.xbm" "next-xx.xbm")
464
(vm-toolbar-previous-icon "previous-up.xbm" "previous-dn.xbm"
466
(vm-toolbar-delete-icon "delete-up.xbm" "delete-dn.xbm" "delete-xx.xbm")
467
(vm-toolbar-undelete-icon "undelete-up.xbm" "undelete-dn.xbm"
469
(vm-toolbar-autofile-icon "autofile-up.xbm" "autofile-dn.xbm"
471
(vm-toolbar-getmail-icon "getmail-up.xbm" "getmail-dn.xbm" "getmail-xx.xbm")
472
(vm-toolbar-file-icon "file-up.xbm" "file-dn.xbm" "file-xx.xbm")
473
(vm-toolbar-reply-icon "reply-up.xbm" "reply-dn.xbm" "reply-xx.xbm")
474
(vm-toolbar-compose-icon "compose-up.xbm" "compose-dn.xbm" "compose-xx.xbm")
475
(vm-toolbar-print-icon "print-up.xbm" "print-dn.xbm" "print-xx.xbm")
476
(vm-toolbar-visit-icon "visit-up.xbm" "visit-dn.xbm" "visit-xx.xbm")
477
(vm-toolbar-quit-icon "quit-up.xbm" "quit-dn.xbm" "quit-xx.xbm")
478
(vm-toolbar-help-icon "help-up.xbm" "help-dn.xbm" "help-xx.xpm")
479
(vm-toolbar-recover-icon "recover-up.xbm" "recover-dn.xbm" "recover-xx.xpm")
483
(setq tuple (car tuples)
490
(expand-file-name f vm-toolbar-pixmap-directory))))
492
(setq tuples (cdr tuples))))))
493
(setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
494
(setq-default vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)
495
(setq vm-toolbar-helper-command 'vm-help)
496
(setq vm-toolbar-helper-icon vm-toolbar-help-icon)
497
(setq-default vm-toolbar-helper-icon vm-toolbar-help-icon))
499
(defun vm-toolbar-fsfemacs-uninstall-toolbar ()
500
(define-key vm-mode-map [toolbar] nil)
501
(setq vm-fsfemacs-toolbar-installed-p nil))
503
(defun vm-toolbar-fsfemacs-install-toolbar ()
504
(let ((button-list (reverse vm-use-toolbar))
505
(dir vm-toolbar-pixmap-directory)
506
(extension (if (and (display-color-p)
507
(image-type-available-p 'xpm))
510
item t-spec sym name images)
511
(defvar tool-bar-map)
512
;; hide the toolbar entries that are in the global keymap so
513
;; VM has full control of the toolbar in its buffers.
514
(if (and (boundp 'tool-bar-map)
515
(consp tool-bar-map))
516
(let ((map (cdr tool-bar-map))
519
(aset v 1 (car (car map)))
520
(define-key vm-mode-map v 'undefined)
521
(setq map (cdr map)))))
523
(setq sym (car button-list))
525
;; can't do flushright in FSF Emacs
528
;; can't do separators in FSF Emacs
530
((memq sym '(autofile compose file getmail
531
mime next previous print quit reply visit))
532
(setq t-spec (symbol-value
533
(intern (format "vm-toolbar-%s-button"
537
(if (and (eq sym 'mime) (string= extension "xpm"))
538
(setq name "mime-colorful")
539
(setq name (symbol-name sym)))
540
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
542
(if (eq sym 'mime) nil 'heuristic)))
547
':enable (aref t-spec 2)
548
':button '(:toggle nil)
550
(define-key vm-mode-map (vector 'tool-bar sym) item))
551
((eq sym 'delete/undelete)
552
(setq t-spec vm-toolbar-delete/undelete-button)
554
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
555
name extension dir 'heuristic))
560
':visible '(eq vm-toolbar-delete/undelete-icon
561
vm-toolbar-delete-icon)
562
':enable (aref t-spec 2)
563
':button '(:toggle nil)
565
(define-key vm-mode-map (vector 'tool-bar 'delete) item)
566
(setq name "undelete")
567
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
568
name extension dir 'heuristic))
573
':visible '(eq vm-toolbar-delete/undelete-icon
574
vm-toolbar-undelete-icon)
575
':enable (aref t-spec 2)
576
':button '(:toggle nil)
578
(define-key vm-mode-map (vector 'tool-bar 'undelete) item))
580
(setq t-spec vm-toolbar-help-button)
582
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
583
name extension dir 'heuristic))
588
':visible '(eq vm-toolbar-helper-command 'vm-help)
589
':enable (aref t-spec 2)
590
':button '(:toggle nil)
592
(define-key vm-mode-map (vector 'tool-bar 'help-help) item)
593
(setq name "recover")
594
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
595
name extension dir 'heuristic))
600
':visible '(eq vm-toolbar-helper-command
602
':enable (aref t-spec 2)
603
':button '(:toggle nil)
605
(define-key vm-mode-map (vector 'tool-bar 'help-recover) item)
606
(setq name "getmail")
607
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
608
name extension dir 'heuristic))
613
':visible '(eq vm-toolbar-helper-command
615
':enable (aref t-spec 2)
616
':button '(:toggle nil)
618
(define-key vm-mode-map (vector 'tool-bar 'help-getmail) item)
619
(if (string= extension "xpm")
620
(setq name "mime-colorful")
622
(setq images (vm-toolbar-make-fsfemacs-toolbar-image-spec
623
name extension dir nil))
628
':visible '(eq vm-toolbar-helper-command
629
'vm-decode-mime-message)
630
':enable (aref t-spec 2)
631
':button '(:toggle nil)
633
(define-key vm-mode-map (vector 'tool-bar 'help-mime) item)))
634
(setq button-list (cdr button-list))))
635
(setq vm-fsfemacs-toolbar-installed-p t))
637
(defun vm-toolbar-make-fsfemacs-toolbar-image-spec (name extension dir mask)
638
(if (string= extension "xpm")
641
':type (intern extension)
643
':file (expand-file-name
648
':type (intern extension)
650
':file (expand-file-name
655
':type (intern extension)
657
':file (expand-file-name
662
':type (intern extension)
664
':file (expand-file-name
670
':type (intern extension)
672
':file (expand-file-name
677
':type (intern extension)
679
':file (expand-file-name
684
':type (intern extension)
686
':file (expand-file-name
691
':type (intern extension)
693
':file (expand-file-name
698
(provide 'vm-toolbar)