hgk: support the old way of getting the current Ttk theme (issue3808) stable
authorAndrew Shadura <bugzilla@tut.by>
Tue, 05 Feb 2013 12:58:21 +0100
branchstable
changeset 18561 7365d031d457
parent 18555 b31e0be96c79
child 18562 37010a55922a
child 18563 6d098adc5a46
hgk: support the old way of getting the current Ttk theme (issue3808) It seems like the API has changed somewhere around 8.5.7, so the preferred way of getting the current theme is now [ttk::style theme use], while the deprecated (but still working) is $::ttk::currentTheme.
contrib/hgk
--- a/contrib/hgk	Mon Feb 04 23:41:11 2013 +0100
+++ b/contrib/hgk	Tue Feb 05 12:58:21 2013 +0100
@@ -109,7 +109,12 @@
 # end of win32 section
 } else {
 
-if {[ttk::style theme use] eq "default"} {
+if {[catch {
+    set theme [ttk::style theme use]
+}]} {
+    set theme $::ttk::currentTheme
+}
+if {$theme eq "default"} {
     ttk::style theme use clam
 }