annotate lisp/x11/x-toolbar.el @ 79:5b0a5bbffab6

Added tag r20-0b34 for changeset c7528f8e288d
author cvs
date Mon, 13 Aug 2007 09:05:44 +0200
parents c0c698873ce1
children 1ce6082ce73f
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 ;;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;; toolbar ispell variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 (defun toolbar-ispell ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 "Intelligently spell the region or buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 (interactive)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
30 (if (region-active-p)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
31 (ispell-region (region-beginning) (region-end))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
32 (ispell-buffer)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;; toolbar mail variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
38 (defvar toolbar-use-separate-mail-frame nil
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
39 "If non-nil run mail in a separate frame.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
41 (defvar toolbar-mail-frame nil
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
42 "The frame in which mail is displayed.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
44 (defvar toolbar-mail-command 'vm
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
45 "The mail reader to run.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (defun toolbar-mail ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 "Run mail in a separate frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (interactive)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
50 (if (not toolbar-use-separate-mail-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
51 (funcall toolbar-mail-command)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
52 (if (or (not toolbar-mail-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
53 (not (frame-live-p toolbar-mail-frame)))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
54 (progn
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
55 (setq toolbar-mail-frame (make-frame))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
56 (add-hook 'vm-quit-hook
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
57 (lambda ()
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
58 (save-excursion
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
59 (if (frame-live-p toolbar-mail-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
60 (delete-frame toolbar-mail-frame)))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
61 (select-frame toolbar-mail-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
62 (raise-frame toolbar-mail-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
63 (funcall toolbar-mail-command)))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
64 (if (frame-iconified-p toolbar-mail-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
65 (deiconify-frame toolbar-mail-frame))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
66 (select-frame toolbar-mail-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
67 (raise-frame toolbar-mail-frame)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 ;; toolbar info variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (defvar toolbar-info-frame nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 "The frame in which info is displayed.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (defun toolbar-info ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 "Run info in a separate frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 (if (or (not toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (not (frame-live-p toolbar-info-frame)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (setq toolbar-info-frame (make-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (select-frame toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (raise-frame toolbar-info-frame)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 (if (frame-iconified-p toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (deiconify-frame toolbar-info-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (select-frame toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (raise-frame toolbar-info-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (info))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 ;; toolbar debug variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (defun toolbar-debug ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (if (featurep 'eos-debugger)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (call-interactively 'eos::start-debugger)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (require 'gdbsrc)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 (call-interactively 'gdbsrc))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (defvar compile-command)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (defun toolbar-compile ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 "Run compile without having to touch the keyboard."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (require 'compile)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
109 (popup-dialog-box
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
110 `(,(concat "Compile:\n " compile-command)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
111 ["Compile" (compile compile-command) t]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
112 ["Edit command" compile t]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
113 nil
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
114 ["Cancel" (message "Quit") t])))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 ;; toolbar news variables and defuns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (defvar toolbar-news-frame nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 "The frame in which news is displayed.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (defun toolbar-news ()
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
124 "Run Gnus in a separate frame."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (interactive)
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
126 (when (or (not toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
127 (not (frame-live-p toolbar-news-frame)))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
128 (setq toolbar-news-frame (make-frame))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
129 (add-hook 'gnus-exit-gnus-hook
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
130 (lambda ()
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
131 (when (frame-live-p toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
132 (if (cdr (frame-list))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
133 (delete-frame toolbar-news-frame))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
134 (setq toolbar-news-frame nil))))
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
135 (select-frame toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
136 (raise-frame toolbar-news-frame)
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
137 (gnus))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (if (frame-iconified-p toolbar-news-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (deiconify-frame toolbar-news-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (select-frame toolbar-news-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (raise-frame toolbar-news-frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 (defvar toolbar-last-win-icon nil "A `last-win' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (defvar toolbar-next-win-icon nil "A `next-win' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (defvar toolbar-file-icon nil "A `file' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (defvar toolbar-folder-icon nil "A `folder' icon set")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (defvar toolbar-disk-icon nil "A `disk' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (defvar toolbar-printer-icon nil "A `printer' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 (defvar toolbar-cut-icon nil "A `cut' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (defvar toolbar-copy-icon nil "A `copy' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (defvar toolbar-paste-icon nil "A `paste' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 (defvar toolbar-undo-icon nil "An `undo' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 (defvar toolbar-spell-icon nil "A `spell' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 (defvar toolbar-replace-icon nil "A `replace' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 (defvar toolbar-mail-icon nil "A `mail' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (defvar toolbar-info-icon nil "An `info' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 (defvar toolbar-compile-icon nil "A `compile' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (defvar toolbar-debug-icon nil "A `debugger' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (defvar toolbar-news-icon nil "A `news' icon set.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 ;;; each entry maps a variable to the prefix used.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 (defvar init-x-toolbar-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 '((toolbar-last-win-icon . "last-win")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (toolbar-next-win-icon . "next-win")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (toolbar-file-icon . "file")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (toolbar-folder-icon . "folder")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 (toolbar-disk-icon . "disk")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (toolbar-printer-icon . "printer")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (toolbar-cut-icon . "cut")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (toolbar-copy-icon . "copy")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (toolbar-paste-icon . "paste")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (toolbar-undo-icon . "undo")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (toolbar-spell-icon . "spell")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (toolbar-replace-icon . "replace")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (toolbar-mail-icon . "mail")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (toolbar-info-icon . "info-def")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (toolbar-compile-icon . "compile")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (toolbar-debug-icon . "debug")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (toolbar-news-icon . "news")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (defun init-x-toolbar ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (mapcar
10
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
184 (lambda (cons)
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
185 (let ((prefix (expand-file-name (cdr cons) toolbar-icon-directory)))
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
186 (set (car cons)
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
187 (if (featurep 'xpm)
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
188 (toolbar-make-button-list
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
189 (concat prefix "-up.xpm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
190 nil
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
191 (concat prefix "-xx.xpm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
192 (concat prefix "-cap-up.xpm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
193 nil
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
194 (concat prefix "-cap-xx.xpm"))
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
195 (toolbar-make-button-list
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
196 (concat prefix "-up.xbm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
197 (concat prefix "-dn.xbm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
198 (concat prefix "-xx.xbm")
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 4
diff changeset
199 )))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 init-x-toolbar-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 ;; do this now because errors will occur if the icon symbols
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 ;; are not initted
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 (set-specifier default-toolbar initial-toolbar-spec))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (defvar initial-toolbar-spec
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
206 '(;;[toolbar-last-win-icon pop-window-configuration
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
207 ;;(frame-property (selected-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
208 ;; 'window-config-stack) t "Most recent window config"]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
209 ;; #### Illicit knowledge?
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
210 ;; #### These don't work right - not consistent!
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
211 ;; I don't know what's wrong; perhaps `selected-frame' is wrong
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
212 ;; sometimes when this is evaluated. Note that I even tried to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
213 ;; kludge-fix this by calls to `set-specifier-dirty-flag' in
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
214 ;; pop-window-configuration and such.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
215
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
216 ;;[toolbar-next-win-icon unpop-window-configuration
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
217 ;;(frame-property (selected-frame)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
218 ;; 'window-config-unpop-stack) t "Undo \"Most recent window config\""]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
219 ;; #### Illicit knowledge?
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
220
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
221 [toolbar-file-icon find-file t "Open a file" ]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
222 [toolbar-folder-icon dired t "View directory"]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
223 [toolbar-disk-icon save-buffer t "Save buffer" ]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
224 [toolbar-printer-icon lpr-buffer t "Print buffer" ]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
225 [toolbar-cut-icon x-kill-primary-selection t "Kill region"]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
226 [toolbar-copy-icon x-copy-primary-selection t "Copy region"]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
227 [toolbar-paste-icon x-yank-clipboard-selection t
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
228 "Paste from clipboard"]
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
229 [toolbar-undo-icon undo t "Undo edit" ]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 [toolbar-spell-icon toolbar-ispell t "Spellcheck" ]
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 22
diff changeset
231 [toolbar-replace-icon query-replace t "Replace text" ]
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 [toolbar-mail-icon toolbar-mail t "Mail" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 [toolbar-info-icon toolbar-info t "Information" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 [toolbar-compile-icon toolbar-compile t "Compile" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 [toolbar-debug-icon toolbar-debug t "Debug" ]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 [toolbar-news-icon toolbar-news t "News" ])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 "The initial toolbar for a buffer.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 (defun x-init-toolbar-from-resources (locale)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 top-toolbar-height 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 '("topToolBarHeight" . "TopToolBarHeight"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 bottom-toolbar-height 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 '("bottomToolBarHeight" . "BottomToolBarHeight"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 left-toolbar-width 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 '("leftToolBarWidth" . "LeftToolBarWidth"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 (x-init-specifier-from-resources
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 right-toolbar-width 'natnum locale
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 '("rightToolBarWidth" . "RightToolBarWidth")))