annotate lisp/toolbar-items.el @ 393:2e030b8965b1

Added tag r21-2-11 for changeset 1f50e6fe4f3f
author cvs
date Mon, 13 Aug 2007 11:10:52 +0200
parents 8626e4521993
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1 ;;; toolbar-items.el -- Static initialization of XEmacs toolbar
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
2
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
3 ;; Copyright (C) 1997 Free Software Foundation, Inc.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
4 ;; Copyright (C) 1994 Andy Piper <andyp@parallax.demon.co.uk>
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995 Board of Trustees, University of Illinois
298
70ad99077275 Import from CVS: tag r21-0b47
cvs
parents: 288
diff changeset
6 ;; Copyright (C) 1996 Ben Wing <ben@xemacs.org>
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
7
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
8 ;; Maintainer: XEmacs development team
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
9 ;; Keywords: frames, dumped
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
10
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
11 ;; This file is part of XEmacs.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
12
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
13 ;; XEmacs is free software; you can redistribute it and/or modify it
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
14 ;; under the terms of the GNU General Public License as published by
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
15 ;; the Free Software Foundation; either version 2, or (at your option)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
16 ;; any later version.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
17
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
18 ;; XEmacs is distributed in the hope that it will be useful, but
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
21 ;; General Public License for more details.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
22
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
23 ;; You should have received a copy of the GNU General Public License
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
24 ;; along with XEmacs; see the file COPYING. If not, write to the
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
26 ;; Boston, MA 02111-1307, USA.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
27
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
28 ;;; Synched up: Not in FSF
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
29
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
30 ;;; Commentary:
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
31
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
32 ;; This file is dumped with XEmacs (when window system and toolbar support
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
33 ;; is compiled in).
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
34
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
35 ;; Miscellaneous toolbar functions, useful for users to redefine, in
380
8626e4521993 Import from CVS: tag r21-2-5
cvs
parents: 371
diff changeset
36 ;; order to get different behavior.
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
37
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
38 ;;; Code:
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
39
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
40 ;; Suppress warning message from bytecompiler
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
41 (eval-when-compile
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
42 (defvar pending-delete-mode)
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
43 ;; #### The compiler still warns about missing
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
44 ;; `pending-delete-pre-hook'. Any way to get rid of the warning?
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
45 )
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
46
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
47 (defgroup toolbar nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
48 "Configure XEmacs Toolbar functions and properties"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
49 :group 'environment)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
50
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
51 ;; #### The following function is slightly obnoxious as it stands. I
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
52 ;; think it should print a message like "Toolbar not configured; press
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
53 ;; me again to configure it", and when the button is pressed again
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
54 ;; (within a reasonable period of time), `customize-variable' should
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
55 ;; be invoked for the appropriate variable.
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
56
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
57 (defun toolbar-not-configured ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
58 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
59 ;; Note: we don't use `susbtitute-command-keys' here, because
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
60 ;; Customize is bound to `C-h C' by default, and that binding is not
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
61 ;; familiar to people. This is more descriptive.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
62 (error
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
63 "Configure the item via `M-x customize RET toolbar RET'"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
64
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
65 (defcustom toolbar-open-function 'find-file
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
66 "*Function to call when the open icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
67 :type '(radio (function-item find-file)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
68 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
69 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
70
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
71 (defun toolbar-open ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
72 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
73 (call-interactively toolbar-open-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
74
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
75 (defcustom toolbar-dired-function 'dired
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
76 "*Function to call when the dired icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
77 :type '(radio (function-item dired)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
78 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
79 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
80
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
81 (defun toolbar-dired ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
82 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
83 (call-interactively toolbar-dired-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
84
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
85 (defcustom toolbar-save-function 'save-buffer
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
86 "*Function to call when the save icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
87 :type '(radio (function-item save-buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
88 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
89 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
90
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
91 (defun toolbar-save ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
92 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
93 (call-interactively toolbar-save-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
94
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
95 (defcustom toolbar-print-function 'lpr-buffer
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
96 "*Function to call when the print icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
97 :type '(radio (function-item lpr-buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
98 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
99 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
100
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
101 (defun toolbar-print ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
102 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
103 (call-interactively toolbar-print-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
104
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
105 (defcustom toolbar-cut-function 'kill-primary-selection
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
106 "*Function to call when the cut icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
107 :type '(radio (function-item kill-primary-selection)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
108 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
109 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
110
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
111 (defun toolbar-cut ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
112 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
113 (call-interactively toolbar-cut-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
114
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
115 (defcustom toolbar-copy-function 'copy-primary-selection
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
116 "*Function to call when the copy icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
117 :type '(radio (function-item copy-primary-selection)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
118 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
119 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
120
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
121 (defun toolbar-copy ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
122 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
123 (call-interactively toolbar-copy-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
124
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
125 (defcustom toolbar-paste-function 'yank-clipboard-selection
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
126 "*Function to call when the paste icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
127 :type '(radio (function-item yank-clipboard-selection)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
128 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
129 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
130
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
131 (defun toolbar-paste ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
132 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
133 ;; This horrible kludge is for pending-delete to work correctly.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
134 (and (boundp 'pending-delete-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
135 pending-delete-mode
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
136 (let ((this-command toolbar-paste-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
137 (pending-delete-pre-hook)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
138 (call-interactively toolbar-paste-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
139
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
140 (defcustom toolbar-undo-function 'undo
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
141 "*Function to call when the undo icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
142 :type '(radio (function-item undo)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
143 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
144 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
145
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
146 (defun toolbar-undo ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
147 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
148 (call-interactively toolbar-undo-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
149
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
150 (defcustom toolbar-replace-function 'query-replace
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
151 "*Function to call when the replace icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
152 :type '(radio (function-item query-replace)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
153 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
154 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
155
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
156 (defun toolbar-replace ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
157 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
158 (call-interactively toolbar-replace-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
159
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
160 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
161 ;; toolbar ispell variables and defuns
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
162 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
163
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
164 (defun toolbar-ispell-internal ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
165 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
166 (cond
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
167 ((region-active-p) (ispell-region (region-beginning) (region-end)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
168 ((eq major-mode 'mail-mode) (ispell-message))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
169 ((eq major-mode 'message-mode) (ispell-message))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
170 (t (ispell-buffer))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
171
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
172 (defcustom toolbar-ispell-function 'toolbar-ispell-internal
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
173 "*Function to call when the ispell icon is selected."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
174 :type '(radio (function-item toolbar-ispell-internal)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
175 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
176 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
177
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
178 (defun toolbar-ispell ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
179 "Intelligently spell the region or buffer."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
180 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
181 (call-interactively toolbar-ispell-function))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
182
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
183 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
184 ;; toolbar mail variables and defuns
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
185 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
186
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
187 ;; This used to be a macro that expanded its arguments to a form that
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
188 ;; called `call-process'. With the advent of customize, it's better
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
189 ;; to have it as a defun, to make customization easier.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
190 (defun toolbar-external (process &rest args)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
191 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
192 (apply 'call-process process nil 0 nil args))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
193
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
194 (defcustom toolbar-mail-commands-alist
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
195 `((not-configured . toolbar-not-configured)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
196 (vm . vm)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
197 (gnus . gnus-no-server)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
198 (rmail . rmail)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
199 (mh . mh-rmail)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
200 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag*
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
201 (elm . (toolbar-external "xterm" "-e" "elm"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
202 (mutt . (toolbar-external "xterm" "-e" "mutt"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
203 (exmh . (toolbar-external "exmh"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
204 (netscape . (toolbar-external "netscape" "mailbox:"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
205 (send . mail))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
206 "*Alist of mail readers and their commands.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
207 The car of each alist element is the mail reader, and the cdr is the form
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
208 used to start it."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
209 :type '(repeat (cons :format "%v"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
210 (symbol :tag "Mailer") (function :tag "Start with")))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
211 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
212
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
213 (defcustom toolbar-mail-reader 'not-configured
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
214 "*Mail reader toolbar will invoke.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
215 The legal values are the keys from `toolbar-mail-command-alist', which
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
216 should be used to add new mail readers.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
217 Mail readers known by default are vm, gnus, rmail, mh, pine, elm,
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
218 mutt, exmh, netscape and send."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
219 :type '(choice (const :tag "Not Configured" not-configured)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
220 (const vm) (const gnus) (const rmail) (const mh)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
221 (const pine) (const elm) (const mutt) (const exmh)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
222 (const netscape)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
223 (const send)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
224 (symbol :tag "Other"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
225 :validate (lambda (wid)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
226 (if (assq (widget-value wid)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
227 toolbar-mail-commands-alist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
228 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
229 (widget-put wid :error
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
230 "Unknown mail reader")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
231 wid))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
232 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
233
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
234
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
235 (defun toolbar-mail ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
236 "Run mail in a separate frame."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
237 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
238 (let ((command (cdr (assq toolbar-mail-reader toolbar-mail-commands-alist))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
239 (or command
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
240 (error "Uknown mail reader %s" toolbar-mail-reader))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
241 (if (symbolp command)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
242 (call-interactively command)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
243 (eval command))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
244
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
245 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
246 ;; toolbar info variables and defuns
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
247 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
248
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
249 (defcustom toolbar-info-use-separate-frame t
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
250 "*Whether Info is invoked in a separate frame."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
251 :type 'boolean
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
252 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
253
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
254 (defcustom toolbar-info-frame-plist
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
255 ;; Info pages are 80 characters wide, so it makes a good default.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
256 `(width 80 ,@(let ((h (plist-get default-frame-plist 'height)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
257 (and h `(height ,h))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
258 "*The properties of the frame in which news is displayed."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
259 :type 'plist
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
260 :group 'info)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
261
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
262 (define-obsolete-variable-alias 'Info-frame-plist
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
263 'toolbar-info-frame-plist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
264
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
265 (defvar toolbar-info-frame nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
266 "The frame in which info is displayed.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
267
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
268 (defun toolbar-info ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
269 "Run info in a separate frame."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
270 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
271 (when toolbar-info-use-separate-frame
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
272 (cond ((or (not toolbar-info-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
273 (not (frame-live-p toolbar-info-frame)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
274 ;; We used to raise frame here, but it's a bad idea,
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
275 ;; because raising is a matter of WM policy. However, we
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
276 ;; *must* select it, to ensure that the info buffer goes to
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
277 ;; the right frame.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
278 (setq toolbar-info-frame (make-frame toolbar-info-frame-plist))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
279 (select-frame toolbar-info-frame))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
280 (t
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
281 ;; However, if the frame already exists, and the user
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
282 ;; clicks on info, it's OK to raise it.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
283 (select-frame toolbar-info-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
284 (raise-frame toolbar-info-frame)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
285 (when (frame-iconified-p toolbar-info-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
286 (deiconify-frame toolbar-info-frame)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
287 (info))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
288
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
289 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
290 ;; toolbar debug variables and defuns
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
291 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
292
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
293 (defun toolbar-debug ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
294 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
295 (if (featurep 'eos-debugger)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
296 (call-interactively 'eos::start-debugger)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
297 (require 'gdbsrc)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
298 (call-interactively 'gdbsrc)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
299
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
300 (defvar compile-command)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
301 (defvar toolbar-compile-already-run nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
302
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
303 (defun toolbar-compile ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
304 "Run compile without having to touch the keyboard."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
305 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
306 (require 'compile)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
307 (if toolbar-compile-already-run
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
308 (compile compile-command)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
309 (setq toolbar-compile-already-run t)
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
310 (if (should-use-dialog-box-p)
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
311 (popup-dialog-box
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
312 `(,(concat "Compile:\n " compile-command)
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
313 ["Compile" (compile compile-command) t]
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
314 ["Edit command" compile t]
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
315 nil
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
316 ["Cancel" (message "Quit") t]))
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
317 (compile compile-command))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
318
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
319 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
320 ;; toolbar news variables and defuns
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
321 ;;
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
322
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
323 (defcustom toolbar-news-commands-alist
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
324 `((not-configured . toolbar-not-configured)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
325 (gnus . toolbar-gnus) ; M-x all-hail-gnus
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
326 (rn . (toolbar-external "xterm" "-e" "rn"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
327 (nn . (toolbar-external "xterm" "-e" "nn"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
328 (trn . (toolbar-external "xterm" "-e" "trn"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
329 (xrn . (toolbar-external "xrn"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
330 (slrn . (toolbar-external "xterm" "-e" "slrn"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
331 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag*
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
332 (tin . (toolbar-external "xterm" "-e" "tin")) ; *gag*
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
333 (netscape . (toolbar-external "netscape" "news:")))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
334 "*Alist of news readers and their commands.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
335 The car of each alist element the pair is the news reader, and the cdr
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
336 is the form used to start it."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
337 :type '(repeat (cons :format "%v"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
338 (symbol :tag "Reader") (sexp :tag "Start with")))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
339 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
340
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
341 (defcustom toolbar-news-reader 'gnus
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
342 "*News reader toolbar will invoke.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
343 The legal values are the keys from `toolbar-news-command-alist', which should
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
344 be used to add new news readers.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
345 Newsreaders known by default are gnus, rn, nn, trn, xrn, slrn, pine
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
346 and netscape."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
347 :type '(choice (const :tag "Not Configured" not-configured)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
348 (const gnus) (const rn) (const nn) (const trn)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
349 (const xrn) (const slrn) (const pine) (const tin)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
350 (const netscape)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
351 (symbol :tag "Other"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
352 :validate (lambda (wid)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
353 (if (assq (widget-value wid)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
354 toolbar-news-commands-alist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
355 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
356 (widget-put wid :error
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
357 "Unknown news reader")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
358 wid))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
359 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
360
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
361 (defcustom toolbar-news-use-separate-frame t
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
362 "*Whether Gnus is invoked in a separate frame."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
363 :type 'boolean
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
364 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
365
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
366 (defvar toolbar-news-frame nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
367 "The frame in which news is displayed.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
368
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
369 (defcustom toolbar-news-frame-plist nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
370 "*The properties of the frame in which news is displayed."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
371 :type 'plist
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
372 :group 'toolbar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
373
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
374 (define-obsolete-variable-alias 'toolbar-news-frame-properties
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
375 'toolbar-news-frame-plist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
376
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
377 (defun toolbar-gnus ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
378 "Run Gnus in a separate frame."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
379 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
380 (if (not toolbar-news-use-separate-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
381 (gnus)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
382 (unless (frame-live-p toolbar-news-frame)
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
383 (setq toolbar-news-frame (make-frame toolbar-news-frame-plist))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
384 (add-hook 'gnus-exit-gnus-hook
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
385 (lambda ()
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
386 (when (frame-live-p toolbar-news-frame)
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
387 (if (cdr (frame-list))
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
388 (delete-frame toolbar-news-frame))
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
389 (setq toolbar-news-frame nil))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
390 (select-frame toolbar-news-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
391 (gnus))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
392 (when (framep toolbar-news-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
393 (when (frame-iconified-p toolbar-news-frame)
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
394 (deiconify-frame toolbar-news-frame))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
395 (select-frame toolbar-news-frame)
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 367
diff changeset
396 (raise-frame toolbar-news-frame))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
397
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
398 (defun toolbar-news ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
399 "Run News."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
400 (interactive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
401 (let ((command (cdr-safe
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
402 (assq toolbar-news-reader toolbar-news-commands-alist))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
403 (or command
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
404 (error "Unkown news reader %s" toolbar-news-reader))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
405 (if (symbolp command)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
406 (call-interactively command)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
407 (eval command))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
408
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
409 (defvar toolbar-last-win-icon nil "A `last-win' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
410 (defvar toolbar-next-win-icon nil "A `next-win' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
411 (defvar toolbar-file-icon nil "A `file' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
412 (defvar toolbar-folder-icon nil "A `folder' icon set")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
413 (defvar toolbar-disk-icon nil "A `disk' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
414 (defvar toolbar-printer-icon nil "A `printer' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
415 (defvar toolbar-cut-icon nil "A `cut' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
416 (defvar toolbar-copy-icon nil "A `copy' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
417 (defvar toolbar-paste-icon nil "A `paste' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
418 (defvar toolbar-undo-icon nil "An `undo' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
419 (defvar toolbar-spell-icon nil "A `spell' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
420 (defvar toolbar-replace-icon nil "A `replace' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
421 (defvar toolbar-mail-icon nil "A `mail' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
422 (defvar toolbar-info-icon nil "An `info' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
423 (defvar toolbar-compile-icon nil "A `compile' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
424 (defvar toolbar-debug-icon nil "A `debugger' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
425 (defvar toolbar-news-icon nil "A `news' icon set.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
426
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
427 ;;; each entry maps a variable to the prefix used.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
428
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
429 (defvar init-x-toolbar-list
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
430 '((toolbar-last-win-icon . "last-win")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
431 (toolbar-next-win-icon . "next-win")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
432 (toolbar-file-icon . "file")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
433 (toolbar-folder-icon . "folder")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
434 (toolbar-disk-icon . "disk")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
435 (toolbar-printer-icon . "printer")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
436 (toolbar-cut-icon . "cut")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
437 (toolbar-copy-icon . "copy")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
438 (toolbar-paste-icon . "paste")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
439 (toolbar-undo-icon . "undo")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
440 (toolbar-spell-icon . "spell")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
441 (toolbar-replace-icon . "replace")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
442 (toolbar-mail-icon . "mail")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
443 (toolbar-info-icon . "info-def")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
444 (toolbar-compile-icon . "compile")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
445 (toolbar-debug-icon . "debug")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
446 (toolbar-news-icon . "news")))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
447
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
448 (defun init-x-toolbar ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
449 (toolbar-add-item-data init-x-toolbar-list )
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
450 ;; do this now because errors will occur if the icon symbols
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
451 ;; are not initted
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
452 (set-specifier default-toolbar initial-toolbar-spec))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
453
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
454 (defun toolbar-add-item-data ( icon-list &optional icon-dir )
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
455 (if (eq icon-dir nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
456 (setq icon-dir toolbar-icon-directory))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
457 (mapcar
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
458 (lambda (cons)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
459 (let ((prefix (expand-file-name (cdr cons) icon-dir)))
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
460 ;; #### This should use a better mechanism for finding the
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
461 ;; glyphs, allowing for formats other than x[pb]m. Look at
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
462 ;; `widget-glyph-find' for an example how it might be done.
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
463 (set (car cons)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
464 (if (featurep 'xpm)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
465 (toolbar-make-button-list
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
466 (concat prefix "-up.xpm")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
467 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
468 (concat prefix "-xx.xpm")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
469 (concat prefix "-cap-up.xpm")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
470 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
471 (concat prefix "-cap-xx.xpm"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
472 (toolbar-make-button-list
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
473 (concat prefix "-up.xbm")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
474 (concat prefix "-dn.xbm")
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
475 (concat prefix "-xx.xbm"))))))
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
476 icon-list))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
477
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
478 (defvar toolbar-vector-open
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
479 [toolbar-file-icon toolbar-open t "Open a file"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
480 "Define the vector for the \"Open\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
481
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
482 (defvar toolbar-vector-dired
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
483 [toolbar-folder-icon toolbar-dired t "Edit a directory"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
484 "Define the vector for the \"Dired\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
485
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
486 (defvar toolbar-vector-save
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
487 [toolbar-disk-icon toolbar-save t "Save buffer"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
488 "Define the vector for the \"Save\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
489
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
490 (defvar toolbar-vector-print
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
491 [toolbar-printer-icon toolbar-print t "Print buffer"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
492 "Define the vector for the \"Printer\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
493
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
494 (defvar toolbar-vector-cut
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
495 [toolbar-cut-icon toolbar-cut t "Kill region"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
496 "Define the vector for the \"Cut\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
497
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
498 (defvar toolbar-vector-copy
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
499 [toolbar-copy-icon toolbar-copy t "Copy region"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
500 "Define the vector for the \"Copy\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
501
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
502 (defvar toolbar-vector-paste
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
503 [toolbar-paste-icon toolbar-paste t "Paste from clipboard"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
504 "Define the vector for the \"Paste\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
505
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
506 (defvar toolbar-vector-undo
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
507 [toolbar-undo-icon toolbar-undo t "Undo edit"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
508 "Define the vector for the \"Undo\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
509
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
510 (defvar toolbar-vector-spell
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
511 [toolbar-spell-icon toolbar-ispell t "Check spelling"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
512 "Define the vector for the \"Spell\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
513
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
514 (defvar toolbar-vector-replace
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
515 [toolbar-replace-icon toolbar-replace t "Search & Replace"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
516 "Define the vector for the \"Replace\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
517
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
518 (defvar toolbar-vector-mail
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
519 [toolbar-mail-icon toolbar-mail t "Read mail"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
520 "Define the vector for the \"Mail\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
521
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
522 (defvar toolbar-vector-info
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
523 [toolbar-info-icon toolbar-info t "Info documentation"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
524 "Define the vector for the \"Info\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
525
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
526 (defvar toolbar-vector-compile
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
527 [toolbar-compile-icon toolbar-compile t "Start a compilation"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
528 "Define the vector for the \"Compile\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
529
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
530 (defvar toolbar-vector-debug
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
531 [toolbar-debug-icon toolbar-debug t "Start a debugger"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
532 "Define the vector for the \"Debug\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
533
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
534 (defvar toolbar-vector-news
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 284
diff changeset
535 [toolbar-news-icon toolbar-news t "Read news"]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
536 "Define the vector for the \"News\" toolbar button")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
537
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
538 (defvar initial-toolbar-spec
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
539 (list
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
540 ;;[toolbar-last-win-icon pop-window-configuration
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
541 ;;(frame-property (selected-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
542 ;; 'window-config-stack) t "Most recent window config"]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
543 ;; #### Illicit knowledge?
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
544 ;; #### These don't work right - not consistent!
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
545 ;; I don't know what's wrong; perhaps `selected-frame' is wrong
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
546 ;; sometimes when this is evaluated. Note that I even tried to
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
547 ;; kludge-fix this by calls to `set-specifier-dirty-flag' in
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
548 ;; pop-window-configuration and such.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
549
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
550 ;;[toolbar-next-win-icon unpop-window-configuration
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
551 ;;(frame-property (selected-frame)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
552 ;; 'window-config-unpop-stack) t "Undo \"Most recent window config\""]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
553 ;; #### Illicit knowledge?
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
554 toolbar-vector-open
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
555 toolbar-vector-dired
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
556 toolbar-vector-save
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
557 toolbar-vector-print
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
558 toolbar-vector-cut
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
559 toolbar-vector-copy
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
560 toolbar-vector-paste
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
561 toolbar-vector-undo
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
562 toolbar-vector-spell
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
563 toolbar-vector-replace
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
564 toolbar-vector-mail
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
565 toolbar-vector-info
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
566 toolbar-vector-compile
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
567 toolbar-vector-debug
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
568 toolbar-vector-news
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
569 )
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
570 "The initial toolbar for a buffer.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
571
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
572 (defun x-init-toolbar-from-resources (locale)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
573 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
574 top-toolbar-height 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
575 '("topToolBarHeight" . "TopToolBarHeight"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
576 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
577 bottom-toolbar-height 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
578 '("bottomToolBarHeight" . "BottomToolBarHeight"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
579 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
580 left-toolbar-width 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
581 '("leftToolBarWidth" . "LeftToolBarWidth"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
582 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
583 right-toolbar-width 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
584 '("rightToolBarWidth" . "RightToolBarWidth"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
585 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
586 top-toolbar-border-width 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
587 '("topToolBarBorderWidth" . "TopToolBarBorderWidth"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
588 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
589 bottom-toolbar-border-width 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
590 '("bottomToolBarBorderWidth" . "BottomToolBarBorderWidth"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
591 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
592 left-toolbar-border-width 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
593 '("leftToolBarBorderWidth" . "LeftToolBarBorderWidth"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
594 (x-init-specifier-from-resources
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
595 right-toolbar-border-width 'natnum locale
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
596 '("rightToolBarBorderWidth" . "RightToolBarBorderWidth")))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
597
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
598 ;;; toolbar-items.el ends here