X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Ffubar.git;a=blobdiff_plain;f=plugins%2Facpi;fp=plugins%2Facpi;h=d4be264e4097349c975703ca15455b41cb472180;hp=5040d45ddd7b13b8e4a122e44b5fd7fc808c616e;hb=c3bcb0bdb509bb9b79646b31c4664b4e3d225755;hpb=640b7f02bd93e0c3473c5581b62a695ea79810fd diff --git a/plugins/acpi b/plugins/acpi index 5040d45..d4be264 100644 --- a/plugins/acpi +++ b/plugins/acpi @@ -83,6 +83,13 @@ if {[file exists /proc/apm]} { } 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 @@ -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 -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