annotate lisp/toolbar-items.el @ 282:c42ec1d1cded r21-0b39

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