UPS: apcupsd clean sources
[tomato.git] / release / src / router / apcupsd / examples / gui / splash.tcl
blobcb7c7fe13203d1ae1ec690d7c8bb300c60534ab8
1 proc DisplaySplash {} {
2 wm withdraw .
3 toplevel .splash -borderwidth 4 -relief raised
4 wm overrideredirect .splash 1
5 after idle {
6 update idletasks
7 set xmax [winfo screenwidth .splash]
8 set ymax [winfo screenheight .splash]
9 set x0 [expr ($xmax-[winfo reqwidth .splash])/2]
10 set y0 [expr ($ymax-[winfo reqheight .splash])/2]
11 wm geometry .splash "+$x0+$y0"
13 image create photo .splash.image -file "apcupsd_logo.gif"
14 label .splash.label -image .splash.image
15 pack .splash.label
16 update