# HG changeset patch # User Andrew Shadura # Date 2013-02-05 11:58:21 # Node ID 7365d031d45785e6cf7b908c6e61125451cda88a # Parent b31e0be96c79156b8236b12315a6f699c1bf992a 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. diff --git a/contrib/hgk b/contrib/hgk --- a/contrib/hgk +++ b/contrib/hgk @@ -109,7 +109,12 @@ bind all [list ::tk::MouseW # 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 }