{"thread":{"id":"45571","subject":"[PATCH v2] git-gui: Error on systems with TK < 8.6.0","startedAt":"2017-03-31T18:36:14Z","lastAt":"2017-03-31T18:36:14Z","messageCount":1,"participants":["Peter van der Does"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"315944","messageId":"ca09fdf0-43e5-0bc6-1fe1-9331e3820d6a@avirtualhome.com","threadId":"45571","inReplyTo":null,"subject":"[PATCH v2] git-gui: Error on systems with TK < 8.6.0","fromName":"Peter van der Does","fromEmail":"peter@avirtualhome.com","sentAt":"2017-03-31T18:36:08Z","receivedAt":"2017-03-31T18:36:14Z","isPatch":true,"sender":{"key":"peter@avirtualhome.com","avatar":"https://avatars.githubusercontent.com/u/380071?v=4"},"body":"Using git-gui on systems that run a TK version below 8.6.0 results in a\ncrash when checking for the current theme.\n\nCatch the error on those systems and use a different command to check\nfor the current theme.\n\nSigned-off-by: Peter van der Does <peter@avirtualhome.com>\n---\n lib/themed.tcl | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/lib/themed.tcl b/lib/themed.tcl\nindex 351a712..bb4e8f2 100644\n--- a/lib/themed.tcl\n+++ b/lib/themed.tcl\n@@ -248,7 +248,11 @@ proc tspinbox {w args} {\n proc ttext {w args} {\n \tglobal use_ttk\n \tif {$use_ttk} {\n-\t\tswitch -- [ttk::style theme use] {\n+\t\t# Handle either current Tk or older versions of 8.5\n+\t\tif {[catch {set theme [ttk::style theme use]}]} {\n+\t\t\tset theme  $::ttk::currentTheme\n+\t\t}\n+\t\tswitch -- $theme {\n \t\t\t\"vista\" - \"xpnative\" {\n \t\t\t\tlappend args -highlightthickness 0 -borderwidth 0\n \t\t\t}\n-- \n2.12.2\n"}]}