Mercurial > emacs
diff lisp/startup.el @ 111171:3b987881726e
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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 24 Oct 2010 19:40:55 -0400 |
parents | ccdc694ce7bd |
children | 050a28bd1797 |
line wrap: on
line diff
--- a/lisp/startup.el Sun Oct 24 15:45:10 2010 -0700 +++ b/lisp/startup.el Sun Oct 24 19:40:55 2010 -0400 @@ -1563,21 +1563,26 @@ (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.")))))