2 # based on code from gitk, Copyright (C) Paul Mackerras
11 constructor new {i_w i_text args} {
17 ${NS}::label $w.l -text [mc "Goto Line:"]
19 -textvariable ${__this}::linenum \
20 -background lightgreen \
22 -validatecommand [cb _validate %P]
23 ${NS}::button $w.bn -text [mc Go] -command [cb _incrgoto]
26 pack $w.bn -side right
27 pack $w.ent -side left -expand 1 -fill x
29 eval grid conf $w -sticky we $args
32 bind $w.ent <Return> [cb _incrgoto]
33 bind $w.ent <Escape> [cb hide]
35 bind $w <Destroy> [list delete_this $this]
40 if {![visible $this]} {
47 if {[visible $this]} {
55 return [winfo ismapped $w]
62 method _validate {P} {
63 # only accept numbers as input