File: splash.tcl

package info (click to toggle)
apcupsd 3.14.12-1.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,676 kB
  • ctags: 8,109
  • sloc: ansic: 36,822; cpp: 9,414; sh: 3,975; makefile: 1,591; tcl: 368; objc: 281; php: 255
file content (17 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
proc DisplaySplash {} {
   wm withdraw .
   toplevel .splash -borderwidth 4 -relief raised
   wm overrideredirect .splash 1
   after idle {
      update idletasks
      set xmax [winfo screenwidth .splash]
      set ymax [winfo screenheight .splash]
      set x0 [expr ($xmax-[winfo reqwidth .splash])/2]
      set y0 [expr ($ymax-[winfo reqheight .splash])/2]
      wm geometry .splash "+$x0+$y0"
   }
   image create photo .splash.image -file "apcupsd_logo.gif"
   label .splash.label -image .splash.image
   pack  .splash.label
   update
}