/[emacs]/emacs/lisp/tree-widget.el
ViewVC logotype

Diff of /emacs/lisp/tree-widget.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by dpe, Mon Aug 15 13:00:09 2005 UTC revision 1.10 by dpe, Mon Sep 19 09:51:31 2005 UTC
# Line 647  This hook should be local in the buffer Line 647  This hook should be local in the buffer
647            (when (and (not args) xpandr)            (when (and (not args) xpandr)
648              (setq args (mapcar 'widget-convert (funcall xpandr tree)))              (setq args (mapcar 'widget-convert (funcall xpandr tree)))
649              (widget-put tree :args args))              (widget-put tree :args args))
650              ;; Defer the node widget creation after icon creation.
651              (widget-put tree :node (widget-convert node))
652            ;; Create the icon widget for the expanded tree.            ;; Create the icon widget for the expanded tree.
653            (push (widget-create-child-and-convert            (push (widget-create-child-and-convert
654                   tree (widget-get tree (if args :open-icon :empty-icon))                   tree (widget-get tree (if args :open-icon :empty-icon)))
                  ;; At this point the node widget isn't yet created.  
                  :node (setq node (widget-convert node)))  
655                  buttons)                  buttons)
656            ;; Create the tree node widget.            ;; Create the tree node widget.
657            (push (widget-create-child tree node) children)            (push (widget-create-child tree (widget-get tree :node))
658                    children)
659            ;; Update the icon :node with the created node widget.            ;; Update the icon :node with the created node widget.
660            (widget-put (car buttons) :node (car children))            (widget-put (car buttons) :node (car children))
661            ;; Create the tree children.            ;; Create the tree children.
# Line 696  This hook should be local in the buffer Line 697  This hook should be local in the buffer
697                ;; Update the icon :node with the created node widget.                ;; Update the icon :node with the created node widget.
698                (widget-put (car buttons) :node (car children)))))                (widget-put (car buttons) :node (car children)))))
699  ;;;; Collapsed node.  ;;;; Collapsed node.
700          ;; Defer the node widget creation after icon creation.
701          (widget-put tree :node (widget-convert node))
702        ;; Create the icon widget for the collapsed tree.        ;; Create the icon widget for the collapsed tree.
703        (push (widget-create-child-and-convert        (push (widget-create-child-and-convert
704               tree (widget-get tree :close-icon)               tree (widget-get tree :close-icon))
              ;; At this point the node widget isn't yet created.  
              :node (setq node (widget-convert node)))  
705              buttons)              buttons)
706        ;; Create the tree node widget.        ;; Create the tree node widget.
707        (push (widget-create-child tree node) children)        (push (widget-create-child tree (widget-get tree :node))
708                children)
709        ;; Update the icon :node with the created node widget.        ;; Update the icon :node with the created node widget.
710        (widget-put (car buttons) :node (car children)))        (widget-put (car buttons) :node (car children)))
711      ;; Save widget children and buttons.  The tree-widget :node child      ;; Save widget children and buttons.  The tree-widget :node child

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26