annotate lisp/vm/vm-toolbar.el @ 98:0d2f883870bc r20-1b1

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