From c3bcb0bdb509bb9b79646b31c4664b4e3d225755 Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Wed, 3 Oct 2012 22:01:20 +0400 Subject: [PATCH] fixed file names under tk 8.5 and above --- plugins/acpi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.5