[go: up one dir, main page]

File: testutils.tcl

package info (click to toggle)
tile 0.8.2-2.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 3,152 kB
  • ctags: 3,093
  • sloc: ansic: 18,144; tcl: 4,607; makefile: 398; sh: 71
file content (20 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# testutils.tcl,v 1.2 2006/11/24 19:42:28 jenglish Exp
#
# Miscellaneous utilities for interactive tests.
#


# Global binding: <Alt-KeyPress-t> cycles the current theme.
#
variable currentTheme alt
proc CycleTheme {} {
    variable currentTheme
    set themes [tile::availableThemes]
    set i [expr {([lsearch $themes $currentTheme] + 1) % [llength $themes]}]
    tile::setTheme [set currentTheme [lindex $themes $i]]
    puts "Theme: $currentTheme"
}
bind all <Alt-KeyPress-t> { CycleTheme }

lappend auto_path /usr/local/lib