. . . then just substitute this code for the existing contents of /usr/bin/mtpaintsnapshot.sh:
Code: Select all
#!/usr/bin/env tclsh
package require Gnocl
set now [gnocl::button -text "Capture Now!" -onClicked {
$win delete
update
exec mtpaint -s
}]
set can [gnocl::button -text "Cancel" -onClicked {$win delete}]
set nowbox [gnocl::box -orientation horizontal \
-children [list $now $can] -fill {1 1} -expand 1]
set wait [gnocl::button -text "Wait: " -onClicked snap]
set secs 10
set num [gnocl::spinButton -digits 0 -variable secs]
set blab [gnocl::label -text " seconds"]
set waitbox [gnocl::box -orientation horizontal \
-children [list $wait $num $blab] -fill {1 1} -expand 1]
set bigbox [gnocl::box -orientation vertical \
-children [list $nowbox $waitbox]]
set win [gnocl::window -child $bigbox -title "mtPaint Capture"]
proc snap {} {
$::wait configure -text "Waiting"
after [expr {$::secs * 1000}] {
$::win delete
update
exec mtpaint -s
}
}