Mercurial > hg > xemacs-beta
annotate tests/gtk/toolbar-test.el @ 4709:db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
are missing. This is done with Bill Perry's stated permission, in private
email to me.
author | Jerry James <james@xemacs.org> |
---|---|
date | Mon, 05 Oct 2009 11:08:59 -0600 |
parents | 0784d089fdc9 |
children | ba07c880114a |
rev | line source |
---|---|
4709
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
1 ;; This file is part of XEmacs. |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
2 ;; |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
3 ;; XEmacs is free software; you can redistribute it and/or modify it |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
4 ;; under the terms of the GNU General Public License as published by the |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
5 ;; Free Software Foundation; either version 2, or (at your option) any |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
6 ;; later version. |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
7 ;; |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
8 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
9 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
10 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
11 ;; for more details. |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
12 ;; |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
13 ;; You should have received a copy of the GNU General Public License |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
14 ;; along with XEmacs; see the file COPYING. If not, write to |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
15 ;; the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
16 ;; Boston, MA 02111-1301, USA. */ |
db7068430402
Add explicit GPL v2 or later notices to Bill Perry's code, where such notices
Jerry James <james@xemacs.org>
parents:
462
diff
changeset
|
17 |
462 | 18 (require 'gtk-widgets) |
19 (require 'gnome-widgets) | |
20 | |
21 (defvar gnomeified-toolbar | |
22 ;; [CAPTION TOOLTIP ICON CALLBACK ENABLED] | |
23 '(["Open" "Open a file" new toolbar-open t] | |
24 ["Dired" "Edit a directory" open toolbar-dired t] | |
25 ["Save" "Save buffer" save toolbar-save t] | |
26 ["Print" "Print Buffer" print toolbar-print t] | |
27 ["Cut" "Kill region" cut toolbar-cut t] | |
28 ["Copy" "Copy region" copy toolbar-copy t] | |
29 ["Paste" "Paste from clipboard" paste toolbar-paste t] | |
30 ["Undo" "Undo edit" undo toolbar-undo t] | |
31 ["Spell" "Check spelling" spellcheck toolbar-ispell t] | |
32 ["Replace" "Search & Replace" srchrpl toolbar-replace t] | |
33 ["Mail" "Read mail" mail toolbar-mail t] | |
34 ; info | |
35 ; compile | |
36 ; debug | |
37 ; news | |
38 )) | |
39 | |
40 (setq x (gtk-toolbar-new 'horizontal 'both)) | |
41 (gnome-app-set-toolbar (frame-property nil 'shell-widget) x) | |
42 | |
43 (mapc (lambda (descr) | |
44 (gtk-toolbar-append-item x | |
45 (aref descr 0) | |
46 (aref descr 1) | |
47 "" | |
48 (gnome-stock-pixmap-widget-new x (aref descr 2)) | |
49 `(lambda (&rest ignored) | |
50 (,(aref descr 3))))) | |
51 gnomeified-toolbar) |