Tk Source Code

Check-in [48fe0012]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

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

Overview
Comment:Fix 3bd69eba99a395ee: 'make dist' fails when tclsh9.0 is on $PATH
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA1:48fe0012d457916abf57936fd8e1af62176f94c2
User & Date: jan.nijtmans 2016-06-01 15:11:01
Context
2016-06-11
14:50
Fixed [6976e4b3b2] - -undo options not correct for peers check-in: 09fa3e79 user: fvogel tags: core-8-6-branch
2016-06-09
12:13
Merge trunk. Various upstream androwish changes check-in: de0c4124 user: jan.nijtmans tags: androwish
2016-06-08
15:27
Fixed [6976e4b3b2] - -undo options not correct for peers check-in: 3ff41efa user: fvogel tags: bug-6976e4b3b2
2016-06-07
21:04
Possible solution for [1217222] - [.text edit undo/redo] return ranges of modified characters check-in: 6cd8c5d9 user: fvogel tags: tip-449
2016-06-01
15:12
Fix 3bd69eba99a395ee: 'make dist' fails when tclsh9.0 is on $PATH check-in: 89cd4b06 user: jan.nijtmans tags: trunk
15:11
Fix 3bd69eba99a395ee: 'make dist' fails when tclsh9.0 is on $PATH check-in: 48fe0012 user: jan.nijtmans tags: core-8-6-branch
15:08
Fix 3bd69eba99a395ee: 'make dist' fails when tclsh9.0 is on $PATH check-in: aa6515f7 user: jan.nijtmans tags: core-8-5-branch
2016-05-30
20:20
Fixed tests cases bad interactions and a forgotten mouse warping case (event generate {} <...> -warp 1 is valid) check-in: 2131f788 user: fvogel tags: core-8-6-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/ttk/ttkGenStubs.tcl.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# CHANGES:
#	+ Second argument to "declare" is used as a status guard
#	  instead of a platform guard.
#	+ Allow trailing semicolon in function declarations
#

package require Tcl 8.4

namespace eval genStubs {
    # libraryName --
    #
    #	The name of the entire library.  This value is used to compute
    #	the USE_*_STUBS macro and the name of the init file.

    variable libraryName "UNKNOWN"







<
<







14
15
16
17
18
19
20


21
22
23
24
25
26
27
#
# CHANGES:
#	+ Second argument to "declare" is used as a status guard
#	  instead of a platform guard.
#	+ Allow trailing semicolon in function declarations
#



namespace eval genStubs {
    # libraryName --
    #
    #	The name of the entire library.  This value is used to compute
    #	the USE_*_STUBS macro and the name of the init file.

    variable libraryName "UNKNOWN"

Changes to library/demos/ixset.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# ixset --
# A nice interface to "xset" to change X server settings
#
# History :
#   91/11/23 : pda@masi.ibp.fr, jt@ratp.fr : design
#   92/08/01 : pda@masi.ibp.fr : cleaning

package require Tcl 8.4
package require Tk

#
# Button actions
#

proc quit {} {







<







5
6
7
8
9
10
11

12
13
14
15
16
17
18
# ixset --
# A nice interface to "xset" to change X server settings
#
# History :
#   91/11/23 : pda@masi.ibp.fr, jt@ratp.fr : design
#   92/08/01 : pda@masi.ibp.fr : cleaning


package require Tk

#
# Button actions
#

proc quit {} {

Changes to library/demos/rmt.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
exec wish "$0" ${1+"$@"}

# rmt --
# This script implements a simple remote-control mechanism for
# Tk applications.  It allows you to select an application and
# then type commands to that application.

package require Tcl 8.4
package require Tk

wm title . "Tk Remote Controller"
wm iconname . "Tk Remote"
wm minsize . 1 1

# The global variable below keeps track of the remote application







<







3
4
5
6
7
8
9

10
11
12
13
14
15
16
exec wish "$0" ${1+"$@"}

# rmt --
# This script implements a simple remote-control mechanism for
# Tk applications.  It allows you to select an application and
# then type commands to that application.


package require Tk

wm title . "Tk Remote Controller"
wm iconname . "Tk Remote"
wm minsize . 1 1

# The global variable below keeps track of the remote application

Changes to library/demos/timer.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# timer --
# This script generates a counter with start and stop buttons.

package require Tcl 8.4
package require Tk

label .counter -text 0.00 -relief raised -width 10 -padx 2m -pady 1m
button .start -text Start -command {
    if {$stopped} {
	set stopped 0
	set startMoment [clock clicks -milliseconds]







<







1
2
3
4
5
6
7

8
9
10
11
12
13
14
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}

# timer --
# This script generates a counter with start and stop buttons.


package require Tk

label .counter -text 0.00 -relief raised -width 10 -padx 2m -pady 1m
button .start -text Start -command {
    if {$stopped} {
	set stopped 0
	set startMoment [clock clicks -milliseconds]

Changes to library/demos/widget.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This script demonstrates the various widgets provided by Tk, along with many
# of the features of the Tk toolkit. This file only contains code to generate
# the main window for the application, which invokes individual
# demonstrations. The code for the actual demonstrations is contained in
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.

package require Tcl	8.5
package require Tk	8.5
package require msgcat

eval destroy [winfo child .]
set tk_demoDirectory [file join [pwd] [file dirname [info script]]]
::msgcat::mcload $tk_demoDirectory
namespace import ::msgcat::mc







<







6
7
8
9
10
11
12

13
14
15
16
17
18
19
# This script demonstrates the various widgets provided by Tk, along with many
# of the features of the Tk toolkit. This file only contains code to generate
# the main window for the application, which invokes individual
# demonstrations. The code for the actual demonstrations is contained in
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.


package require Tk	8.5
package require msgcat

eval destroy [winfo child .]
set tk_demoDirectory [file join [pwd] [file dirname [info script]]]
::msgcat::mcload $tk_demoDirectory
namespace import ::msgcat::mc

Changes to library/tk.tcl.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.

# Insist on running with compatible version of Tcl
package require Tcl 8.6
# Verify that we have Tk binary and script components from the same release
package require -exact Tk  8.6.5
 
# Create a ::tk namespace
namespace eval ::tk {
    # Set up the msgcat commands
    namespace eval msgcat {







<
<







6
7
8
9
10
11
12


13
14
15
16
17
18
19
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.



# Verify that we have Tk binary and script components from the same release
package require -exact Tk  8.6.5
 
# Create a ::tk namespace
namespace eval ::tk {
    # Set up the msgcat commands
    namespace eval msgcat {

Changes to tests/all.tcl.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# in this directory.
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tcl 8.5
package require tcltest 2.2
package require Tk ;# This is the Tk test suite; fail early if no Tk!
tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
tcltest::configure -loadfile \
	[file join [tcltest::testsDirectory] constraints.tcl]
tcltest::configure -singleproc 1
tcltest::runAllTests







|

<






5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
# in this directory.
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tk ;# This is the Tk test suite; fail early if no Tk!
package require tcltest 2.2

tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
tcltest::configure -loadfile \
	[file join [tcltest::testsDirectory] constraints.tcl]
tcltest::configure -singleproc 1
tcltest::runAllTests

Changes to tests/constraints.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if {[namespace exists tk::test]} {
    deleteWindows
    wm geometry . {}
    raise .
    return
}

package require Tcl 8.4

package require Tk 8.4
tk appname tktest
wm title . tktest
# If the main window isn't already mapped (e.g. because the tests are
# being run automatically) , specify a precise size for it so that the
# user won't have to position it manually.








<
<







1
2
3
4
5
6
7


8
9
10
11
12
13
14
if {[namespace exists tk::test]} {
    deleteWindows
    wm geometry . {}
    raise .
    return
}



package require Tk 8.4
tk appname tktest
wm title . tktest
# If the main window isn't already mapped (e.g. because the tests are
# being run automatically) , specify a precise size for it so that the
# user won't have to position it manually.

Changes to tests/ttk/all.tcl.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# in this directory.
#
# Copyright (c) 2007 by the Tk developers.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tcl 8.5
package require tcltest 2.2
package require Tk ;# This is the Tk test suite; fail early if no Tk!
tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
tcltest::configure -loadfile \
    [file join [file dirname [tcltest::testsDirectory]] constraints.tcl]
tcltest::configure -singleproc 1
tcltest::runAllTests








|

<







5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
# in this directory.
#
# Copyright (c) 2007 by the Tk developers.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tk ;# This is the Tk test suite; fail early if no Tk!
package require tcltest 2.2

tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
tcltest::configure -loadfile \
    [file join [file dirname [tcltest::testsDirectory]] constraints.tcl]
tcltest::configure -singleproc 1
tcltest::runAllTests