Mercurial > emacs
comparison lisp/cus-edit.el @ 112175:e09ac5ef1fe4
Fix r99654 change -- rename :on/off-image widget props to :on/off-glyph.
* wid-edit.el (visibility): Replace :on-image and :off-image
widget properties with :on-glyph and :off-glyph, for consistency
with the `visibility' widget.
(widget-toggle-value-create, widget-visibility-value-create):
Merge into a single function `widget-toggle-value-create'.
* cus-edit.el (custom-variable-value-create, custom-visibility)
(custom-face-edit-value-create, custom-face-value-create): Replace
:on-image and :off-image widget properties with :on-glyph and
:off-glyph, for consistency with the `visibility' widget.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 09 Jan 2011 16:05:53 -0500 |
parents | c00190a8c8ef |
children | 417b1e4d63cd |
comparison
equal
deleted
inserted
replaced
112174:efdf56b1332d | 112175:e09ac5ef1fe4 |
---|---|
2549 ((eq state 'hidden) | 2549 ((eq state 'hidden) |
2550 ;; Indicate hidden value. | 2550 ;; Indicate hidden value. |
2551 (push (widget-create-child-and-convert | 2551 (push (widget-create-child-and-convert |
2552 widget 'custom-visibility | 2552 widget 'custom-visibility |
2553 :help-echo "Show the value of this option." | 2553 :help-echo "Show the value of this option." |
2554 :on-image "down" | 2554 :on-glyph "down" |
2555 :on "Hide" | 2555 :on "Hide" |
2556 :off-image "right" | 2556 :off-glyph "right" |
2557 :off "Show Value" | 2557 :off "Show Value" |
2558 :action 'custom-toggle-hide-variable | 2558 :action 'custom-toggle-hide-variable |
2559 nil) | 2559 nil) |
2560 buttons) | 2560 buttons) |
2561 (insert " ") | 2561 (insert " ") |
2571 (push (widget-create-child-and-convert | 2571 (push (widget-create-child-and-convert |
2572 widget 'custom-visibility | 2572 widget 'custom-visibility |
2573 :help-echo "Hide the value of this option." | 2573 :help-echo "Hide the value of this option." |
2574 :on "Hide" | 2574 :on "Hide" |
2575 :off "Show" | 2575 :off "Show" |
2576 :on-image "down" | 2576 :on-glyph "down" |
2577 :off-image "right" | 2577 :off-glyph "right" |
2578 :action 'custom-toggle-hide-variable | 2578 :action 'custom-toggle-hide-variable |
2579 t) | 2579 t) |
2580 buttons) | 2580 buttons) |
2581 (insert " ") | 2581 (insert " ") |
2582 (let* ((value (cond ((get symbol 'saved-value) | 2582 (let* ((value (cond ((get symbol 'saved-value) |
2601 (push (widget-create-child-and-convert | 2601 (push (widget-create-child-and-convert |
2602 widget 'custom-visibility | 2602 widget 'custom-visibility |
2603 :help-echo "Hide or show this option." | 2603 :help-echo "Hide or show this option." |
2604 :on "Hide" | 2604 :on "Hide" |
2605 :off "Show" | 2605 :off "Show" |
2606 :on-image "down" | 2606 :on-glyph "down" |
2607 :off-image "right" | 2607 :off-glyph "right" |
2608 :action 'custom-toggle-hide-variable | 2608 :action 'custom-toggle-hide-variable |
2609 t) | 2609 t) |
2610 buttons) | 2610 buttons) |
2611 (insert " ") | 2611 (insert " ") |
2612 (let* ((format (widget-get type :format)) | 2612 (let* ((format (widget-get type :format)) |
3054 "Show or hide a documentation string." | 3054 "Show or hide a documentation string." |
3055 :button-face 'custom-visibility | 3055 :button-face 'custom-visibility |
3056 :pressed-face 'custom-visibility | 3056 :pressed-face 'custom-visibility |
3057 :mouse-face 'highlight | 3057 :mouse-face 'highlight |
3058 :pressed-face 'highlight | 3058 :pressed-face 'highlight |
3059 :on-image nil | 3059 :on-glyph nil |
3060 :off-image nil) | 3060 :off-glyph nil) |
3061 | 3061 |
3062 (defface custom-visibility | 3062 (defface custom-visibility |
3063 '((t :height 0.8 :inherit link)) | 3063 '((t :height 0.8 :inherit link)) |
3064 "Face for the `custom-visibility' widget." | 3064 "Face for the `custom-visibility' widget." |
3065 :version "23.1" | 3065 :version "23.1" |
3118 :help-echo "Show or hide all face attributes." | 3118 :help-echo "Show or hide all face attributes." |
3119 :button-face 'custom-visibility | 3119 :button-face 'custom-visibility |
3120 :pressed-face 'custom-visibility | 3120 :pressed-face 'custom-visibility |
3121 :mouse-face 'highlight | 3121 :mouse-face 'highlight |
3122 :on "Hide Unused Attributes" :off "Show All Attributes" | 3122 :on "Hide Unused Attributes" :off "Show All Attributes" |
3123 :on-image nil :off-image nil | 3123 :on-glyph nil :off-glyph nil |
3124 :always-active t | 3124 :always-active t |
3125 :action 'custom-face-edit-value-visibility-action | 3125 :action 'custom-face-edit-value-visibility-action |
3126 show-all) | 3126 show-all) |
3127 buttons) | 3127 buttons) |
3128 (insert ?\n) | 3128 (insert ?\n) |
3473 ;; Visibility indicator. | 3473 ;; Visibility indicator. |
3474 (push (widget-create-child-and-convert | 3474 (push (widget-create-child-and-convert |
3475 widget 'custom-visibility | 3475 widget 'custom-visibility |
3476 :help-echo "Hide or show this face." | 3476 :help-echo "Hide or show this face." |
3477 :on "Hide" :off "Show" | 3477 :on "Hide" :off "Show" |
3478 :on-image "down" :off-image "right" | 3478 :on-glyph "down" :off-glyph "right" |
3479 :action 'custom-toggle-hide-face | 3479 :action 'custom-toggle-hide-face |
3480 (not hiddenp)) | 3480 (not hiddenp)) |
3481 buttons) | 3481 buttons) |
3482 ;; Face name (tag). | 3482 ;; Face name (tag). |
3483 (insert " " tag) | 3483 (insert " " tag) |