annotate lisp/x11/x-toolbar.el @ 163:0132846995bd r20-3b8

Import from CVS: tag r20-3b8
author cvs
date Mon, 13 Aug 2007 09:43:35 +0200
parents cca96a509cfe
children 5a88923fcbfe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;; Toolbar support for X.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;; Copyright (C) 1994 Andy Piper <andyp@parallax.demon.co.uk>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Board of Trustees, University of Illinois
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; Copyright (C) 1996 Ben Wing <wing@666.com>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; XEmacs is distributed in the hope that it will be useful, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; You should have received a copy of the GNU General Public License
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
19 ;; along with XEmacs; see the file COPYING. If not, write to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
20 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
21 ;; Boston, MA 02111-1307, USA.
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
22
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
23 ;;
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
24 ;; Miscellaneous toolbar functions, useful for users to redefine, in
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
25 ;; order to get different behaviour.
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
26 ;;
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
27
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
28 (defgroup toolbar nil
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
29 "Configure XEmacs Toolbar functions and properties"
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
30 :group 'environment)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
31
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
32 (defcustom toolbar-open-function 'find-file
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
33 "*Function to call when the open icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
34 :type '(radio (function-item find-file)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
35 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
36 :group 'toolbar)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
37
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
38 (defun toolbar-open ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
39 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
40 (call-interactively toolbar-open-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
41
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
42 (defcustom toolbar-dired-function 'dired
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
43 "*Function to call when the dired icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
44 :type '(radio (function-item dired)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
45 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
46 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
47
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
48 (defun toolbar-dired ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
49 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
50 (call-interactively toolbar-dired-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
51
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
52 (defcustom toolbar-save-function 'save-buffer
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
53 "*Function to call when the save icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
54 :type '(radio (function-item save-buffer)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
55 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
56 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
57
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
58 (defun toolbar-save ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
59 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
60 (call-interactively toolbar-save-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
61
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
62 (defcustom toolbar-print-function 'lpr-buffer
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
63 "*Function to call when the print icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
64 :type '(radio (function-item lpr-buffer)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
65 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
66 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
67
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
68 (defun toolbar-print ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
69 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
70 (call-interactively toolbar-print-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
71
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
72 (defcustom toolbar-cut-function 'x-kill-primary-selection
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
73 "*Function to call when the cut icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
74 :type '(radio (function-item x-kill-primary-selection)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
75 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
76 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
77
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
78 (defun toolbar-cut ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
79 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
80 (call-interactively toolbar-cut-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
81
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
82 (defcustom toolbar-copy-function 'x-copy-primary-selection
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
83 "*Function to call when the copy icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
84 :type '(radio (function-item x-copy-primary-selection)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
85 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
86 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
87
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
88 (defun toolbar-copy ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
89 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
90 (call-interactively toolbar-copy-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
91
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
92 (defcustom toolbar-paste-function 'x-yank-clipboard-selection
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
93 "*Function to call when the paste icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
94 :type '(radio (function-item x-yank-primary-selection)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
95 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
96 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
97
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
98 (defun toolbar-paste ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
99 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
100 (call-interactively toolbar-paste-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
101
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
102 (defcustom toolbar-undo-function 'undo
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
103 "*Function to call when the undo icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
104 :type '(radio (function-item undo)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
105 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
106 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
107
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
108 (defun toolbar-undo ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
109 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
110 (call-interactively toolbar-undo-function))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
111
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
112 (defcustom toolbar-replace-function 'query-replace
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
113 "*Function to call when the replace icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
114 :type '(radio (function-item query-replace)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
115 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
116 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
117
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
118 (defun toolbar-replace ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
119 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
120 (call-interactively toolbar-replace-function))
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
121
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
122 ;;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 ;; toolbar ispell variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
126 (defun toolbar-ispell-internal ()
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
127 (interactive)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
128 (if (region-active-p)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
129 (ispell-region (region-beginning) (region-end))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
130 (ispell-buffer)))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
131
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
132 (defcustom toolbar-ispell-function 'toolbar-ispell-internal
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
133 "*Function to call when the ispell icon is selected."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
134 :type '(radio (function-item toolbar-ispell-internal)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
135 (function :tag "Other"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
136 :group 'toolbar)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
137
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (defun toolbar-ispell ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 "Intelligently spell the region or buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (interactive)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
141 (call-interactively toolbar-ispell-function))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 ;; toolbar mail variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
147 ;; This used to be a macro that expanded its arguments to a form that
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
148 ;; called `call-process'. With the advent of customize, it's better
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
149 ;; to have it as a defun, to make customization easier.
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
150 (defun toolbar-external (process &rest args)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
151 (interactive)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
152 (apply 'call-process process nil 0 nil args))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
154 (defcustom toolbar-mail-commands-alist
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
155 `((vm . vm)
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
156 (gnus . gnus-no-server)
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
157 (rmail . rmail)
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
158 (mh . mh-rmail)
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
159 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag*
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
160 (elm . (toolbar-external "xterm" "-e" "elm"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
161 (mutt . (toolbar-external "xterm" "-e" "mutt"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
162 (exmh . (toolbar-external "exmh"))
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
163 ;; How to turn on netscape mail, command-line??
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
164 (netscape . (toolbar-external "netscape")))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
165 "*Alist of mail readers and their commands.
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
166 The car of each alist element is the mail reader, and the cdr is the form
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
167 used to start it."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
168 :type '(repeat (cons (symbol :tag "Mailer") (function :tag "Start with")))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
169 :group 'toolbar)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
171 (defcustom toolbar-mail-reader 'vm
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
172 "*Mail reader toolbar will invoke.
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
173 The legal values are the keys from `toolbar-mail-command-alist', which should
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
174 be used to add new mail readers.
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
175
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
176 Mail readers known by default are vm, gnus, rmail, mh, pine, elm, mutt,
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
177 exmh and netscape."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
178 :type '(symbol :validate (lambda (wid)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
179 (if (assq (widget-value wid) toolbar-mail-commands-alist)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
180 nil
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
181 (widget-put wid :error "Unknown mail reader.")
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
182 wid)))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
183 :group 'toolbar)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
184
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (defun toolbar-mail ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 "Run mail in a separate frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 (interactive)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
189 (let ((command (assq toolbar-mail-reader toolbar-mail-commands-alist)))
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
190 (if (not command)
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
191 (error "Uknown mail reader %s" toolbar-mail-reader))
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
192 (funcall (cdr command))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 ;; toolbar info variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (defvar toolbar-info-frame nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 "The frame in which info is displayed.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (defun toolbar-info ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 "Run info in a separate frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (if (or (not toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (not (frame-live-p toolbar-info-frame)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (setq toolbar-info-frame (make-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 (select-frame toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 (raise-frame toolbar-info-frame)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 (if (frame-iconified-p toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 (deiconify-frame toolbar-info-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 (select-frame toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 (raise-frame toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (info))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 ;; toolbar debug variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (defun toolbar-debug ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 (if (featurep 'eos-debugger)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 (call-interactively 'eos::start-debugger)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 (require 'gdbsrc)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 (call-interactively 'gdbsrc))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 (defvar compile-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 (defun toolbar-compile ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 "Run compile without having to touch the keyboard."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 (require 'compile)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
234 (popup-dialog-box
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
235 `(,(concat "Compile:\n " compile-command)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
236 ["Compile" (compile compile-command) t]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
237 ["Edit command" compile t]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
238 nil
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
239 ["Cancel" (message "Quit") t])))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 ;; toolbar news variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
245 (defcustom toolbar-news-commands-alist
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
246 `((gnus . gnus) ; M-x all-hail-gnus
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
247 (rn . (toolbar-external "xterm" "-e" "rn"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
248 (nn . (toolbar-external "xterm" "-e" "nn"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
249 (trn . (toolbar-external "xterm" "-e" "trn"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
250 (xrn . (toolbar-external "xrn"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
251 (slrn . (toolbar-external "xterm" "-e" "slrn"))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
252 (pine . (toolbar-external "xterm" "-e" "pine")) ; *gag*
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
253 (tin . (toolbar-external "xterm" "-e" "tin")) ; *gag*
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
254 (netscape . (toolbar-external "netscape" "news:")))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
255 "*Alist of news readers and their commands.
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
256 The car of each alist element the pair is the news reader, and the cdr
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
257 is the form used to start it."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
258 :type '(repeat (cons (symbol :tag "Reader") (sexp :tag "Start with")))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
259 :group 'toolbar)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
260
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
261 (defcustom toolbar-news-reader 'gnus
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
262 "*News reader toolbar will invoke.
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
263 The legal values are the keys from `toolbar-news-command-alist', which should
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
264 be used to add new news readers.
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
265
120
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
266 Newsreaders known by default are gnus, rn, nn, trn, xrn, slrn, pine and
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
267 netscape."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
268 :type '(symbol :validate (lambda (wid)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
269 (if (assq (widget-value wid) toolbar-news-commands-alist)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
270 nil
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
271 (widget-put wid :error "Unknown newsreader.")
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
272 wid)))
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
273 :group 'toolbar)
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
274
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
275 (defcustom toolbar-news-use-separate-frame t
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
276 "*Whether Gnus is invoked in a separate frame."
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
277 :type 'boolean
cca96a509cfe Import from CVS: tag r20-1b12
cvs
parents: 98
diff changeset
278 :group 'toolbar)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
279
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 (defvar toolbar-news-frame nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 "The frame in which news is displayed.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 76
diff changeset
283 (defvar toolbar-news-frame-properties nil
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 76
diff changeset
284 "The properties of the frame in which news is displayed.")
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 76
diff changeset
285
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 (defun toolbar-news ()
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
287 "Run Gnus in a separate frame."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 (interactive)
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
289 (when (or (not toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
290 (not (frame-live-p toolbar-news-frame)))
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 76
diff changeset
291 (setq toolbar-news-frame (make-frame toolbar-news-frame-properties))
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
292 (add-hook 'gnus-exit-gnus-hook
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
293 (lambda ()
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
294 (when (frame-live-p toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
295 (if (cdr (frame-list))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
296 (delete-frame toolbar-news-frame))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
297 (setq toolbar-news-frame nil))))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
298 (select-frame toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
299 (raise-frame toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
300 (gnus))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 (if (frame-iconified-p toolbar-news-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 (deiconify-frame toolbar-news-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 (select-frame toolbar-news-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 (raise-frame toolbar-news-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 (defvar toolbar-last-win-icon nil "A `last-win' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 (defvar toolbar-next-win-icon nil "A `next-win' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 (defvar toolbar-file-icon nil "A `file' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 (defvar toolbar-folder-icon nil "A `folder' icon set")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 (defvar toolbar-disk-icon nil "A `disk' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 (defvar toolbar-printer-icon nil "A `printer' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 (defvar toolbar-cut-icon nil "A `cut' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 (defvar toolbar-copy-icon nil "A `copy' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 (defvar toolbar-paste-icon nil "A `paste' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 (defvar toolbar-undo-icon nil "An `undo' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 (defvar toolbar-spell-icon nil "A `spell' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 (defvar toolbar-replace-icon nil "A `replace' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 (defvar toolbar-mail-icon nil "A `mail' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 (defvar toolbar-info-icon nil "An `info' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 (defvar toolbar-compile-icon nil "A `compile' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 (defvar toolbar-debug-icon nil "A `debugger' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 (defvar toolbar-news-icon nil "A `news' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 ;;; each entry maps a variable to the prefix used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 (defvar init-x-toolbar-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 '((toolbar-last-win-icon . "last-win")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 (toolbar-next-win-icon . "next-win")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 (toolbar-file-icon . "file")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 (toolbar-folder-icon . "folder")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 (toolbar-disk-icon . "disk")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 (toolbar-printer-icon . "printer")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
333 (toolbar-cut-icon . "cut")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334 (toolbar-copy-icon . "copy")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 (toolbar-paste-icon . "paste")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 (toolbar-undo-icon . "undo")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 (toolbar-spell-icon . "spell")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 (toolbar-replace-icon . "replace")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 (toolbar-mail-icon . "mail")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 (toolbar-info-icon . "info-def")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 (toolbar-compile-icon . "compile")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342 (toolbar-debug-icon . "debug")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 (toolbar-news-icon . "news")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 (defun init-x-toolbar ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 (mapcar
10
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
347 (lambda (cons)
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
348 (let ((prefix (expand-file-name (cdr cons) toolbar-icon-directory)))
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
349 (set (car cons)
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
350 (if (featurep 'xpm)
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
351 (toolbar-make-button-list
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
352 (concat prefix "-up.xpm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
353 nil
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
354 (concat prefix "-xx.xpm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
355 (concat prefix "-cap-up.xpm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
356 nil
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
357 (concat prefix "-cap-xx.xpm"))
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
358 (toolbar-make-button-list
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
359 (concat prefix "-up.xbm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
360 (concat prefix "-dn.xbm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
361 (concat prefix "-xx.xbm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
362 )))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 init-x-toolbar-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 ;; do this now because errors will occur if the icon symbols
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 ;; are not initted
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 (set-specifier default-toolbar initial-toolbar-spec))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 (defvar initial-toolbar-spec
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
369 '(;;[toolbar-last-win-icon pop-window-configuration
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
370 ;;(frame-property (selected-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
371 ;; 'window-config-stack) t "Most recent window config"]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
372 ;; #### Illicit knowledge?
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
373 ;; #### These don't work right - not consistent!
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
374 ;; I don't know what's wrong; perhaps `selected-frame' is wrong
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
375 ;; sometimes when this is evaluated. Note that I even tried to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
376 ;; kludge-fix this by calls to `set-specifier-dirty-flag' in
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
377 ;; pop-window-configuration and such.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
378
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
379 ;;[toolbar-next-win-icon unpop-window-configuration
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
380 ;;(frame-property (selected-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
381 ;; 'window-config-unpop-stack) t "Undo \"Most recent window config\""]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
382 ;; #### Illicit knowledge?
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
383
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
384 [toolbar-file-icon toolbar-open t "Open a file" ]
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
385 [toolbar-folder-icon toolbar-dired t "View directory"]
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
386 [toolbar-disk-icon toolbar-save t "Save buffer" ]
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
387 [toolbar-printer-icon toolbar-print t "Print buffer" ]
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
388 [toolbar-cut-icon toolbar-cut t "Kill region"]
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
389 [toolbar-copy-icon toolbar-copy t "Copy region"]
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
390 [toolbar-paste-icon toolbar-paste t "Paste from clipboard"]
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
391 [toolbar-undo-icon toolbar-undo t "Undo edit" ]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392 [toolbar-spell-icon toolbar-ispell t "Spellcheck" ]
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 80
diff changeset
393 [toolbar-replace-icon toolbar-replace t "Replace text" ]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 [toolbar-mail-icon toolbar-mail t "Mail" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 [toolbar-info-icon toolbar-info t "Information" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 [toolbar-compile-icon toolbar-compile t "Compile" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 [toolbar-debug-icon toolbar-debug t "Debug" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398 [toolbar-news-icon toolbar-news t "News" ])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 "The initial toolbar for a buffer.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 (defun x-init-toolbar-from-resources (locale)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 top-toolbar-height 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404 '("topToolBarHeight" . "TopToolBarHeight"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 bottom-toolbar-height 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 '("bottomToolBarHeight" . "BottomToolBarHeight"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 left-toolbar-width 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410 '("leftToolBarWidth" . "LeftToolBarWidth"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 right-toolbar-width 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 '("rightToolBarWidth" . "RightToolBarWidth")))
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
414
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 88
diff changeset
415 ;;; x-toolbar.el ends here