From: Konstantin Khomoutov <kostix+git@007spb.ru>
To: git@jessiehernandez.com
Cc: "David Shrader" <dshrader@lanl.gov>,
git@vger.kernel.org, Pat Thoyts <patthoyts@users.sourceforge.net>
Subject: Re: ttk error when starting git gui
Date: Fri, 31 Mar 2017 17:34:35 +0300 [thread overview]
Message-ID: <20170331173435.c822389c9fc7ebe15c20ed00@domain007.com> (raw)
In-Reply-To: <2db3bf6de4e169f0c116ba77b74998b4.squirrel@mail.jessiehernandez.com>
On Fri, 31 Mar 2017 13:29:04 +0200
"Jessie Hernandez" <git@jessiehernandez.com> wrote:
> > On Fri, 31 Mar 2017 09:53:38 +0200
> > "Jessie Hernandez" <git@jessiehernandez.com> wrote:
> >
> > [...]
> >> >> It's possible to have ttk with 8.5 as well (say, here on Debian
> >> >> 8.5 ships with ttk enabled).
> >> >>
> >> >> A proper patch would be
> >> >>
> >> >> -set default_config(gui.usettk) 1
> >> >> +set default_config(gui.usettk) [namespace exists ::ttk]
> >> >>
> >> >> Could you please test it on your system?
> >> >>
> >> >
> >> > Yeah that seems to work.
> >> > Thanks for this.
> >> >
> >> > I have tried it with git 2.12.2
> > [...]
> >> I spoke to soon. :(
> >> It does not work. I forgot to do a install when testing.
> >> Sorry for the confusion.
> >
> > Care to elaborate on the exact error, please?
> >
>
> The error I get is the following
>
> Error in startup script: wrong # args: should be "ttk::style theme
> use theme" while executing
> "ttk::style theme use"
> (procedure "ttext" line 4)
> invoked from within
> "ttext $ui_workdir -background white -foreground black \
> -borderwidth 0 \
> -width 20 -height 10 \
> -wrap none \
> -takefocus 1 -highlightthickness 1\
> ..."
> (file "/usr/libexec/git-core/git-gui" line 3190)
Too bad: the git-gui relies on the [ttk::style theme use] command --
that is, the two-argument invocation of [ttk::style] -- to return
the theme being currently in use, and this feature was implemented
on 2008-05-27 [1] by Pat Thoyts.
Judging from the output of
fossil descendants e83b7dd29ddae998f96538584afb518849ac1e2c
the first Tk release to have this change was 8.6b2.
So the proper fix appears to be more involved:
set default_config(gui.usettk) \
[expr {[package vcompare [info patchlevel] 8.6b2] >= 0}]
(The slash+newline sequence is not needed -- it's here mostly
for pretty-printing.)
1. http://core.tcl.tk/tk/info/e83b7dd29ddae998
next prev parent reply other threads:[~2017-03-31 14:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 17:01 ttk error when starting git gui David Shrader
2017-03-30 19:54 ` Peter van der Does
2017-03-30 20:44 ` Dennis Kaarsemaker
2017-03-30 21:33 ` David Shrader
2017-03-31 6:44 ` Jessie Hernandez
2017-03-31 7:33 ` Konstantin Khomoutov
2017-03-31 7:45 ` Jessie Hernandez
2017-03-31 7:53 ` Jessie Hernandez
2017-03-31 7:58 ` Konstantin Khomoutov
2017-03-31 11:29 ` Jessie Hernandez
2017-03-31 14:34 ` Konstantin Khomoutov [this message]
2017-03-31 7:56 ` Konstantin Khomoutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170331173435.c822389c9fc7ebe15c20ed00@domain007.com \
--to=kostix+git@007spb.ru \
--cc=dshrader@lanl.gov \
--cc=git@jessiehernandez.com \
--cc=git@vger.kernel.org \
--cc=patthoyts@users.sourceforge.net \
/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.
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 NNTP newsgroup(s).