diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-10-24 19:40:55 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-10-24 19:40:55 -0400 |
commit | 01898dc200f1f8f6ee9f77b93aa0a0ed283bf84f (patch) | |
tree | 5345eb74ad3847f4ce7415b2686b6f0655f843bd /lisp/startup.el | |
parent | 7c051dd87f3bf202cb80f91bb3dab6465e368635 (diff) | |
download | emacs-01898dc200f1f8f6ee9f77b93aa0a0ed283bf84f.tar.gz |
Avoid inline image variables for checkboxes (Bug#7222).
* etc/images/checked.xpm:
* etc/images/unchecked.xpm: New images.
* image.el (image-checkbox-checked, image-checkbox-unchecked):
Deleted (Bug#7222).
* startup.el (fancy-startup-tail): Instead of using inline images,
refer to image files from etc/.
* wid-edit.el (checkbox): Likewise.
(widget-image-find): Center image specs.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index aa791f2a04a..a6ba865ce10 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1563,21 +1563,26 @@ a face or button specification." (kill-buffer "*GNU Emacs*"))) " ") (when (or user-init-file custom-file) - (insert-button - " " - :on-glyph image-checkbox-checked - :off-glyph image-checkbox-unchecked - 'checked nil 'display image-checkbox-unchecked 'follow-link t - 'action (lambda (button) - (if (overlay-get button 'checked) - (progn (overlay-put button 'checked nil) - (overlay-put button 'display - (overlay-get button :off-glyph)) - (setq startup-screen-inhibit-startup-screen nil)) - (overlay-put button 'checked t) - (overlay-put button 'display - (overlay-get button :on-glyph)) - (setq startup-screen-inhibit-startup-screen t)))) + (let ((checked (create-image "checked.xpm" + nil nil :ascent 'center)) + (unchecked (create-image "unchecked.xpm" + nil nil :ascent 'center))) + (insert-button + " " + :on-glyph checked + :off-glyph unchecked + 'checked nil 'display unchecked 'follow-link t + 'action (lambda (button) + (if (overlay-get button 'checked) + (progn (overlay-put button 'checked nil) + (overlay-put button 'display + (overlay-get button :off-glyph)) + (setq startup-screen-inhibit-startup-screen + nil)) + (overlay-put button 'checked t) + (overlay-put button 'display + (overlay-get button :on-glyph)) + (setq startup-screen-inhibit-startup-screen t))))) (fancy-splash-insert :face '(variable-pitch (:height 0.9)) " Never show it again."))))) |