]> www.wagner.pp.ru Git - oss/fubar.git/commitdiff
fixed file names under tk 8.5 and above
authorVictor Wagner <vitus@wagner.pp.ru>
Wed, 3 Oct 2012 18:01:20 +0000 (22:01 +0400)
committerVictor Wagner <vitus@wagner.pp.ru>
Wed, 3 Oct 2012 18:01:20 +0000 (22:01 +0400)
plugins/acpi

index 5040d45ddd7b13b8e4a122e44b5fd7fc808c616e..d4be264e4097349c975703ca15455b41cb472180 100644 (file)
@@ -83,6 +83,13 @@ if {[file exists /proc/apm]} {
                }
                return [list [expr 100*$now/$full] $ac $st {}]
        }
                }
                return [list [expr 100*$now/$full] $ac $st {}]
        }
+}
+proc bmp_ext {} {
+ if {$::tk_version >= 8.5} {
+       return ".xbm"
+ } else {
+       return ".bmp"
+ }
 }
        variable colors
        variable help
 }
        variable colors
        variable help
@@ -98,7 +105,7 @@ if {[file exists /proc/apm]} {
        $c create rectangle 10 3 30 13 -outline black
        $c create rectangle 30 6 33 10 -outline black -fill black
 
        $c create rectangle 10 3 30 13 -outline black
        $c create rectangle 30 6 33 10 -outline black -fill black
 
-       $c create rectangle 10 3 30 13 -outline black -stipple @[file join $tk_library demos images gray25.bmp] -fill black -tag energy
+       $c create rectangle 10 3 30 13 -outline black -stipple @[file join $tk_library demos images gray25[bmp_ext]] -fill black -tag energy
 
        $c create polygon 2 1 6 8 3 8 8 15 6 9 9 9 5 1  -outline red -fill red -tag power
 
 
        $c create polygon 2 1 6 8 3 8 8 15 6 9 9 9 5 1  -outline red -fill red -tag power