From: Victor Wagner Date: Wed, 3 Oct 2012 18:01:20 +0000 (+0400) Subject: fixed file names under tk 8.5 and above X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=c3bcb0bdb509bb9b79646b31c4664b4e3d225755;p=oss%2Ffubar.git fixed file names under tk 8.5 and above --- 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