From: Peter van der Does <peter@avirtualhome.com>
To: git@vger.kernel.org
Cc: dshrader@lanl.gov, dennis@kaarsemaker.net,
git@jessiehernandez.com, kostix+git@007spb.ru
Subject: [PATCH] git-gui: Error on systems with TK < 8.6.0
Date: Fri, 31 Mar 2017 08:54:23 -0400 [thread overview]
Message-ID: <c56892f3-602c-d684-5d07-a3ce3bab8189@avirtualhome.com> (raw)
Using git-gui on systems that run a TK version below 8.6.0 results in a
crash when checking for the current theme.
Catch the error on those systems and use a different command to check
for the current theme.
---
git-gui/lib/themed.tcl | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/git-gui/lib/themed.tcl b/git-gui/lib/themed.tcl
index 351a712c8..bb4e8f25e 100644
--- a/git-gui/lib/themed.tcl
+++ b/git-gui/lib/themed.tcl
@@ -248,7 +248,11 @@ proc tspinbox {w args} {
proc ttext {w args} {
global use_ttk
if {$use_ttk} {
- switch -- [ttk::style theme use] {
+ # Handle either current Tk or older versions of 8.5
+ if {[catch {set theme [ttk::style theme use]}]} {
+ set theme $::ttk::currentTheme
+ }
+ switch -- $theme {
"vista" - "xpnative" {
lappend args -highlightthickness 0 -borderwidth 0
}
--
2.12.2
next reply other threads:[~2017-03-31 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 12:54 Peter van der Does [this message]
2017-03-31 17:19 ` [PATCH] git-gui: Error on systems with TK < 8.6.0 Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c56892f3-602c-d684-5d07-a3ce3bab8189@avirtualhome.com \
--to=peter@avirtualhome.com \
--cc=dennis@kaarsemaker.net \
--cc=dshrader@lanl.gov \
--cc=git@jessiehernandez.com \
--cc=git@vger.kernel.org \
--cc=kostix+git@007spb.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).