Bwidget Source Code
Check-in [8965272464]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:2010-12-14 Andreas Kupries <[email protected]> * tree.tcl [Bug 3106208]: Followup. Moved the fixed code of the last entry I did (2010-11-09) into a new command Tree::MergeFlag and call this from both Tree::itemconfigure and Tree::insert. Missing the place in Tree::insert caused another problem, found by Dustin Littau.
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: 8965272464ce514fecf704fb61cd81385d42552a
User & Date: oehhar 2010-12-14 21:24:15
Context
2010-12-14
22:14
packageIndex updated for 1.9.4 check-in: 2913e4c2db user: oehhar tags: bwidget
21:24
2010-12-14 Andreas Kupries <[email protected]> * tree.tcl [Bug 3106208]: Followup. Moved the fixed code of the last entry I did (2010-11-09) into a new command Tree::MergeFlag and call this from both Tree::itemconfigure and Tree::insert. Missing the place in Tree::insert caused another problem, found by Dustin Littau. check-in: 8965272464 user: oehhar tags: bwidget
2010-12-05
16:11
BWidget 1.9.3 Tagged check-in: d38f04ddb9 user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.













1
2
3
4
5
6
7
..
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41











2010-11-05 Harald Oehlmann <[email protected]>

	**** BWidget 1.9.3 tagged ****

2010-11-23 Harald Oehlmann <[email protected]>

	* scrollw.tcl Add theming support for ScrolledWindow widget.
................................................................................
	* tree.tcl (Tree::itemconfigure): Fix intermingling of node names
	and flag values which can cause an lsearch to fail, by mistaking a
	flag value as the node searched for, and then treating a node name
	as flags. As the upd,nodes value is a dictionary it should not be
	search as a list. Now using a temporary array for quicker check
	and append/replace [Bug 3106208].

	2010-11-09 Harald Oehlmann <[email protected]>

	* mainframe.tcl Menu text shows white on white on Mac aqua
	[Bug 3105665] reported by Scott Smedley fixed by Kevin Walzer.

2010-10-15 Harald Oehlmann <[email protected]>

	* label.tcl The frame surround the label gets under
>
>
>
>
>
>
>
>
>
>
>
>







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
2010-12-14 Harald Oehlmann <[email protected]>

	**** BWidget 1.9.4 tagged ****

2010-12-14  Andreas Kupries  <[email protected]>

	* tree.tcl [Bug 3106208]: Followup. Moved the fixed code of the
	last entry I did (2010-11-09) into a new command Tree::MergeFlag
	and call this from both Tree::itemconfigure and Tree::insert.
	Missing the place in Tree::insert caused another problem, found by
	Dustin Littau.

2010-11-05 Harald Oehlmann <[email protected]>

	**** BWidget 1.9.3 tagged ****

2010-11-23 Harald Oehlmann <[email protected]>

	* scrollw.tcl Add theming support for ScrolledWindow widget.
................................................................................
	* tree.tcl (Tree::itemconfigure): Fix intermingling of node names
	and flag values which can cause an lsearch to fail, by mistaking a
	flag value as the node searched for, and then treating a node name
	as flags. As the upd,nodes value is a dictionary it should not be
	search as a list. Now using a temporary array for quicker check
	and append/replace [Bug 3106208].

2010-11-09 Harald Oehlmann <[email protected]>

	* mainframe.tcl Menu text shows white on white on Mac aqua
	[Bug 3105665] reported by Scott Smedley fixed by Kevin Walzer.

2010-10-15 Harald Oehlmann <[email protected]>

	* label.tcl The frame surround the label gets under

Changes to tree.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
...
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416














417
418
419
420
421
422
423
# ----------------------------------------------------------------------------
#  tree.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: tree.tcl,v 1.60.2.2 2010/11/10 07:56:53 oehhar Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - Tree::create
#     - Tree::configure
#     - Tree::cget
#     - Tree::insert
#     - Tree::itemconfigure
................................................................................
    } elseif { [visible $path $parent] } {
        # parent is visible...
        if { [Widget::getMegawidgetOption $path.$parent -open] } {
            # ...and opened -> redraw whole
            _redraw_idle $path 3
        } else {
            # ...and closed -> redraw cross
            lappend data(upd,nodes) $parent 8
            _redraw_idle $path 2
        }
    }

    return $node
}

................................................................................
        }

	if {$data(upd,level) < 3 && [Widget::hasChanged $path.$node -padx x]} {
	    _redraw_idle $path 3
	}

	if { $data(upd,level) < 3 && $flag } {
            # data(upd,nodes) is a key-val list: emulate a dict by an array
            array set n $data(upd,nodes)
            if {![info exists n($node)]} {
                lappend data(upd,nodes) $node $flag
            } else {
                set n($node) [expr {$n($node) | $flag}]
                set data(upd,nodes) [array get n]
            }
            _redraw_idle $path 2
        }
    }
    return $result
}
















# ----------------------------------------------------------------------------
#  Command Tree::itemcget
# ----------------------------------------------------------------------------
proc Tree::itemcget { path node option } {
    # Instead of upvar'ing $path as data for this test, just directly refer to
    # it, as that is faster.


|







 







|







 







|
<
<
<
<
<
<
<






>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
...
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
...
396
397
398
399
400
401
402
403







404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# ----------------------------------------------------------------------------
#  tree.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: tree.tcl,v 1.60.2.3 2010/12/14 21:24:15 oehhar Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - Tree::create
#     - Tree::configure
#     - Tree::cget
#     - Tree::insert
#     - Tree::itemconfigure
................................................................................
    } elseif { [visible $path $parent] } {
        # parent is visible...
        if { [Widget::getMegawidgetOption $path.$parent -open] } {
            # ...and opened -> redraw whole
            _redraw_idle $path 3
        } else {
            # ...and closed -> redraw cross
            MergeFlag $path $parent 8
            _redraw_idle $path 2
        }
    }

    return $node
}

................................................................................
        }

	if {$data(upd,level) < 3 && [Widget::hasChanged $path.$node -padx x]} {
	    _redraw_idle $path 3
	}

	if { $data(upd,level) < 3 && $flag } {
	    MergeFlag $path $node $flag







            _redraw_idle $path 2
        }
    }
    return $result
}

proc Tree::MergeFlag { path node flag } {
    variable $path
    upvar 0  $path data

    # data(upd,nodes) is a key-val list: emulate a dict by an array
    array set n $data(upd,nodes)
    if {![info exists n($node)]} {
	lappend data(upd,nodes) $node $flag
    } else {
	set n($node) [expr {$n($node) | $flag}]
	set data(upd,nodes) [array get n]
    }
    return
}

# ----------------------------------------------------------------------------
#  Command Tree::itemcget
# ----------------------------------------------------------------------------
proc Tree::itemcget { path node option } {
    # Instead of upvar'ing $path as data for this test, just directly refer to
    # it, as that is faster.