comparison lisp/vm/vm-toolbar.el @ 24:4103f0995bd7 r19-15b95

Import from CVS: tag r19-15b95
author cvs
date Mon, 13 Aug 2007 08:51:03 +0200
parents 859a2309aef8
children 05472e90ae02
comparison
equal deleted inserted replaced
23:0edd3412f124 24:4103f0995bd7
64 (fset 'vm-toolbar-file-command 'some-other-command)"]) 64 (fset 'vm-toolbar-file-command 'some-other-command)"])
65 (defvar vm-toolbar-file-icon nil) 65 (defvar vm-toolbar-file-icon nil)
66 (or (fboundp 'vm-toolbar-file-command) 66 (or (fboundp 'vm-toolbar-file-command)
67 (fset 'vm-toolbar-file-command 'vm-save-message)) 67 (fset 'vm-toolbar-file-command 'vm-save-message))
68 68
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 bound 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
69 (defvar vm-toolbar-print-button 82 (defvar vm-toolbar-print-button
70 [vm-toolbar-print-icon 83 [vm-toolbar-print-icon
71 vm-toolbar-print-command 84 vm-toolbar-print-command
72 (vm-toolbar-any-messages-p) 85 (vm-toolbar-any-messages-p)
73 "Print the current message.\n 86 "Print the current message.\n
252 (save-excursion 265 (save-excursion
253 (vm-check-for-killed-folder) 266 (vm-check-for-killed-folder)
254 (vm-select-folder-buffer) 267 (vm-select-folder-buffer)
255 (memq major-mode '(vm-mode vm-virtual-mode)))) 268 (memq major-mode '(vm-mode vm-virtual-mode))))
256 269
270 (defun vm-toolbar-mail-waiting-p ()
271 (save-excursion
272 (vm-check-for-killed-folder)
273 (vm-select-folder-buffer)
274 vm-spooled-mail-waiting))
275
257 (fset 'vm-toolbar-can-help-p 'vm-toolbar-can-quit-p) 276 (fset 'vm-toolbar-can-help-p 'vm-toolbar-can-quit-p)
258 277
259 (defun vm-toolbar-update-toolbar () 278 (defun vm-toolbar-update-toolbar ()
260 (if (and vm-message-pointer (vm-deleted-flag (car vm-message-pointer))) 279 (if (and vm-message-pointer (vm-deleted-flag (car vm-message-pointer)))
261 (setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon) 280 (setq vm-toolbar-delete/undelete-icon vm-toolbar-undelete-icon)
262 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon)) 281 (setq vm-toolbar-delete/undelete-icon vm-toolbar-delete-icon))
263 (cond ((vm-toolbar-can-recover-p) 282 (cond ((vm-toolbar-can-recover-p)
264 (setq vm-toolbar-helper-command 'recover-file 283 (setq vm-toolbar-helper-command 'recover-file
265 vm-toolbar-helper-icon vm-toolbar-recover-icon)) 284 vm-toolbar-helper-icon vm-toolbar-recover-icon))
285 ((vm-toolbar-mail-waiting-p)
286 (setq vm-toolbar-helper-command 'vm-get-new-mail
287 vm-toolbar-helper-icon vm-toolbar-getmail-icon))
266 ((vm-toolbar-can-decode-mime-p) 288 ((vm-toolbar-can-decode-mime-p)
267 (setq vm-toolbar-helper-command 'vm-decode-mime-message 289 (setq vm-toolbar-helper-command 'vm-decode-mime-message
268 vm-toolbar-helper-icon vm-toolbar-decode-mime-icon)) 290 vm-toolbar-helper-icon vm-toolbar-decode-mime-icon))
269 (t 291 (t
270 (setq vm-toolbar-helper-command 'vm-help 292 (setq vm-toolbar-helper-command 'vm-help
384 '(vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm") 406 '(vm-toolbar-delete-icon "delete-up.xpm" "delete-dn.xpm" "delete-dn.xpm")
385 '(vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm" 407 '(vm-toolbar-undelete-icon "undelete-up.xpm" "undelete-dn.xpm"
386 "undelete-dn.xpm") 408 "undelete-dn.xpm")
387 '(vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm" 409 '(vm-toolbar-autofile-icon "autofile-up.xpm" "autofile-dn.xpm"
388 "autofile-dn.xpm") 410 "autofile-dn.xpm")
411 '(vm-toolbar-getmail-icon "getmail-up.xpm" "getmail-dn.xpm" "getmail-dn.xpm")
389 '(vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm") 412 '(vm-toolbar-file-icon "file-up.xpm" "file-dn.xpm" "file-dn.xpm")
390 '(vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm") 413 '(vm-toolbar-reply-icon "reply-up.xpm" "reply-dn.xpm" "reply-dn.xpm")
391 '(vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm") 414 '(vm-toolbar-compose-icon "compose-up.xpm" "compose-dn.xpm" "compose-dn.xpm")
392 '(vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm") 415 '(vm-toolbar-print-icon "print-up.xpm" "print-dn.xpm" "print-dn.xpm")
393 '(vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm") 416 '(vm-toolbar-visit-icon "visit-up.xpm" "visit-dn.xpm" "visit-dn.xpm")
403 (vm-toolbar-delete-icon "delete-up.xbm" "delete-dn.xbm" "delete-xx.xbm") 426 (vm-toolbar-delete-icon "delete-up.xbm" "delete-dn.xbm" "delete-xx.xbm")
404 (vm-toolbar-undelete-icon "undelete-up.xbm" "undelete-dn.xbm" 427 (vm-toolbar-undelete-icon "undelete-up.xbm" "undelete-dn.xbm"
405 "undelete-xx.xbm") 428 "undelete-xx.xbm")
406 (vm-toolbar-autofile-icon "autofile-up.xbm" "autofile-dn.xbm" 429 (vm-toolbar-autofile-icon "autofile-up.xbm" "autofile-dn.xbm"
407 "autofile-xx.xbm") 430 "autofile-xx.xbm")
431 (vm-toolbar-getmail-icon "getmail-up.xbm" "getmail-dn.xbm" "getmail-xx.xbm")
408 (vm-toolbar-file-icon "file-up.xbm" "file-dn.xbm" "file-xx.xbm") 432 (vm-toolbar-file-icon "file-up.xbm" "file-dn.xbm" "file-xx.xbm")
409 (vm-toolbar-reply-icon "reply-up.xbm" "reply-dn.xbm" "reply-xx.xbm") 433 (vm-toolbar-reply-icon "reply-up.xbm" "reply-dn.xbm" "reply-xx.xbm")
410 (vm-toolbar-compose-icon "compose-up.xbm" "compose-dn.xbm" "compose-xx.xbm") 434 (vm-toolbar-compose-icon "compose-up.xbm" "compose-dn.xbm" "compose-xx.xbm")
411 (vm-toolbar-print-icon "print-up.xbm" "print-dn.xbm" "print-xx.xbm") 435 (vm-toolbar-print-icon "print-up.xbm" "print-dn.xbm" "print-xx.xbm")
412 (vm-toolbar-visit-icon "visit-up.xbm" "visit-dn.xbm" "visit-xx.xbm") 436 (vm-toolbar-visit-icon "visit-up.xbm" "visit-dn.xbm" "visit-xx.xbm")