summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/images/checked.xpm20
-rw-r--r--etc/images/unchecked.xpm20
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/image.el15
-rw-r--r--lisp/startup.el35
-rw-r--r--lisp/wid-edit.el7
7 files changed, 80 insertions, 33 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index ce5ec4cdff9..4d074790f22 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-24 Chong Yidong <cyd@stupidchicken.com>
+
+ * images/checked.xpm:
+ * images/unchecked.xpm: New images.
+
2010-10-20 Richard Stallman <rms@gnu.org>
* DISTRIB: Update donation section.
diff --git a/etc/images/checked.xpm b/etc/images/checked.xpm
new file mode 100644
index 00000000000..4dbcb9e6fdd
--- /dev/null
+++ b/etc/images/checked.xpm
@@ -0,0 +1,20 @@
+/* XPM */
+static char * checked_xpm[] = {
+"12 12 5 1",
+" c None",
+". c gray20",
+"+ c white",
+"@ c gray70",
+"# c black",
+"............",
+"............",
+"..@@@@@@##+.",
+"..@@@@@@##+.",
+"..#@@@@##@+.",
+"..##@@@##@+.",
+"..###@##@@+.",
+"..@#####@@+.",
+"..@@###@@@+.",
+"..@++##++++.",
+".@+++++++++.",
+"............"};
diff --git a/etc/images/unchecked.xpm b/etc/images/unchecked.xpm
new file mode 100644
index 00000000000..85eec75230e
--- /dev/null
+++ b/etc/images/unchecked.xpm
@@ -0,0 +1,20 @@
+/* XPM */
+static char * unchecked_xpm[] = {
+"12 12 5 1",
+" c None",
+". c gray20",
+"+ c white",
+"@ c gray70",
+"# c black",
+"............",
+"............",
+"..@@@@@@@@+.",
+"..@@@@@@@@+.",
+"..@@@@@@@@+.",
+"..@@@@@@@@+.",
+"..@@@@@@@@+.",
+"..@@@@@@@@+.",
+"..@@@@@@@@+.",
+"..@++++++++.",
+".@+++++++++.",
+"............"};
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 026aa993afe..9fd13d49ca4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-24 Chong Yidong <cyd@stupidchicken.com>
+
+ * 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.
+
2010-10-24 Glenn Morris <rgm@gnu.org>
* term/ns-win.el (x-select-text): Doc fix.
diff --git a/lisp/image.el b/lisp/image.el
index 0afdc71cb9e..f93fd03fba3 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -723,21 +723,6 @@ shall be displayed."
(cons (concat "\\." extension "\\'") 'imagemagick)
image-type-file-name-regexps)))))
-
-;;; Inline stock images
-
-(defvar image-checkbox-checked
- (create-image "\300\300\141\143\067\076\034\030"
- 'xbm t :width 8 :height 8 :background "grey75"
- :foreground "black" :relief -2 :ascent 'center)
- "Image of a checked checkbox.")
-
-(defvar image-checkbox-unchecked
- (create-image (make-string 8 0)
- 'xbm t :width 8 :height 8 :background "grey75"
- :foreground "black" :relief -2 :ascent 'center)
- "Image of an unchecked checkbox.")
-
(provide 'image)
;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3
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.")))))
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 3b9a0372de5..e905e8f2a87 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -638,7 +638,8 @@ extension (xpm, xbm, gif, jpg, or png) located in
specs)
(dolist (elt widget-image-conversion)
(dolist (ext (cdr elt))
- (push (list :type (car elt) :file (concat image ext)) specs)))
+ (push (list :type (car elt) :file (concat image ext)
+ :ascent 'center) specs)))
(find-image (nreverse specs))))
(t
;; Oh well.
@@ -2195,9 +2196,9 @@ when he invoked the menu."
;; We could probably do the same job as the images using single
;; space characters in a boxed face with a stretch specification to
;; make them square.
- :on-glyph image-checkbox-checked
+ :on-glyph "checked"
:off "[ ]"
- :off-glyph image-checkbox-unchecked
+ :off-glyph "unchecked"
:help-echo "Toggle this item."
:action 'widget-checkbox-action)