[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/wid-edit.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/wid-edit.el |
Date: |
Tue, 27 Nov 2001 00:04:13 -0500 |
Index: emacs/lisp/wid-edit.el
diff -u emacs/lisp/wid-edit.el:1.101 emacs/lisp/wid-edit.el:1.102
--- emacs/lisp/wid-edit.el:1.101 Sat Nov 10 06:01:54 2001
+++ emacs/lisp/wid-edit.el Tue Nov 27 00:04:13 2001
@@ -1996,9 +1996,18 @@
(defun widget-toggle-value-create (widget)
"Insert text representing the `on' and `off' states."
(if (widget-value widget)
- (widget-image-insert widget
- (widget-get widget :on)
- (widget-get widget :on-glyph))
+ (progn
+ (and (display-graphic-p)
+ (listp (widget-get widget :on-glyph))
+ (widget-put widget :on-glyph
+ (eval (widget-get widget :on-glyph))))
+ (widget-image-insert widget
+ (widget-get widget :on)
+ (widget-get widget :on-glyph)))
+ (and (display-graphic-p)
+ (listp (widget-get widget :off-glyph))
+ (widget-put widget :off-glyph
+ (eval (widget-get widget :off-glyph))))
(widget-image-insert widget
(widget-get widget :off)
(widget-get widget :off-glyph))))
@@ -2020,19 +2029,19 @@
;; 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 (create-image "\000\066\076\034\076\066\000"
- 'xbm t :width 7 :height 7
- :background "grey75" ; like default mode line
- :foreground "black"
- :relief -3
- :ascent 'center)
- :off "[ ]"
- :off-glyph (create-image (make-string 7 0)
+ :on-glyph '(create-image "\000\066\076\034\076\066\000"
'xbm t :width 7 :height 7
- :background "grey75"
+ :background "grey75" ; like default mode line
:foreground "black"
- :relief 3
+ :relief -3
:ascent 'center)
+ :off "[ ]"
+ :off-glyph '(create-image (make-string 7 0)
+ 'xbm t :width 7 :height 7
+ :background "grey75"
+ :foreground "black"
+ :relief 3
+ :ascent 'center)
:help-echo "Toggle this item."
:action 'widget-checkbox-action)