public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* gitk bug: Disabling "Themed widgets" breaks preferences dialogue
@ 2025-08-28 14:02 Mark Hills
  2025-08-28 21:32 ` Johannes Sixt
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hills @ 2025-08-28 14:02 UTC (permalink / raw)
  To: git

I use Alpine Linux 3.22 (latest).

Recently gitk's preferences window refuses to open.

This seems to be a direct result of switching off the "Themed widgets" 
setting, which is my preferred choice.

Error message:

invalid command name "::combobox"
invalid command name "::combobox"
    while executing
"${NS}::combobox $page.wrapcomment -values {none char word} -state 
readonly  -textvariable wrapcomment"
    (procedure "prefspage_general" line 41)
    invoked from within
"prefspage_general $notebook"
    (procedure "doprefs" line 27)
    invoked from within
"doprefs"
    invoked from within
".#bar.#bar#edit invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tk::MenuInvoke" line 50)
    invoked from within
"tk::MenuInvoke .#bar.#bar#edit 1"
    (command bound to event)

Steps to reproduce:

  $ rm -f ~/.gitk ~/.config/git/gitk
  $ cd <git-repo>
  $ gitk
  Edit -> Preferences
  Uncheck "Use themed widgets"
  Ok
  File -> Quit
  $ gitk
  [error]
  Ok
  [empty preferences window opens]

$ cat /etc/alpine-release
3.22.1

$ apk info git tk tcl
git-2.49.1-r0 description:
Distributed version control system

git-2.49.1-r0 webpage:
https://www.git-scm.com/

git-2.49.1-r0 installed size:
6568 KiB

tcl-8.6.16-r0 description:
The Tcl scripting language

tcl-8.6.16-r0 webpage:
https://www.tcl-lang.org/

tcl-8.6.16-r0 installed size:
4244 KiB

tk-8.6.16-r0 description:
GUI toolkit for the Tcl scripting language

tk-8.6.16-r0 webpage:
https://www.tcl-lang.org/

tk-8.6.16-r0 installed size:
1926 KiB

-- 
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gitk bug: Disabling "Themed widgets" breaks preferences dialogue
  2025-08-28 14:02 gitk bug: Disabling "Themed widgets" breaks preferences dialogue Mark Hills
@ 2025-08-28 21:32 ` Johannes Sixt
  2025-09-09 20:53   ` Removal of classic Tk widgets (was Re: gitk bug: Disabling "Themed widgets" breaks preferences dialogue) Mark Hills
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2025-08-28 21:32 UTC (permalink / raw)
  To: Mark Hills; +Cc: git

Am 28.08.25 um 16:02 schrieb Mark Hills:
> I use Alpine Linux 3.22 (latest).
> 
> Recently gitk's preferences window refuses to open.
> 
> This seems to be a direct result of switching off the "Themed widgets" 
> setting, which is my preferred choice.
> 
> Error message:
> 
> invalid command name "::combobox"
> invalid command name "::combobox"
>     while executing
> "${NS}::combobox $page.wrapcomment -values {none char word} -state 
> readonly  -textvariable wrapcomment"
>     (procedure "prefspage_general" line 41)
This bug was introduced by 904b36b815ff, which is in Git 2.48.0 and was
fixed by daa364cfb7a1, available since Git 2.50.0.

-- Hannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Removal of classic Tk widgets (was Re: gitk bug: Disabling "Themed widgets" breaks preferences dialogue)
  2025-08-28 21:32 ` Johannes Sixt
@ 2025-09-09 20:53   ` Mark Hills
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Hills @ 2025-09-09 20:53 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git

On Thu, 28 Aug 2025, Johannes Sixt wrote:

> Am 28.08.25 um 16:02 schrieb Mark Hills:
> > I use Alpine Linux 3.22 (latest).
> > 
> > Recently gitk's preferences window refuses to open.
> > 
> > This seems to be a direct result of switching off the "Themed widgets" 
> > setting, which is my preferred choice.
> > 
> > Error message:
> > 
> > invalid command name "::combobox"
> > invalid command name "::combobox"
> >     while executing
> > "${NS}::combobox $page.wrapcomment -values {none char word} -state 
> > readonly  -textvariable wrapcomment"
> >     (procedure "prefspage_general" line 41)

> This bug was introduced by 904b36b815ff, which is in Git 2.48.0 and was
> fixed by daa364cfb7a1, available since Git 2.50.0.

Yes that commit does indeed fix the bug.

But then starting with commit cb9fa4d9ecd97 only a month later (v2.51.0) 
systematically strips out all support for this preference.

That seems a bit over-enthusiastic to me, considering how at least one 
user proactively submitted a patch when a bug got introduced.

The justification here seems to be that it's not the default; and 
therefore there's less code to maintain if it's removed -- however this 
would justify the removal of most features in most software...

commit cb9fa4d9ecd97b9e7e9bbd449c5106cad64215e8
Author: Mark Levedahl <mdl123@verizon•net>
Date:   Sun Jun 8 08:16:34 2025 -0400

    gitk: always use themed Tk (ttk)

    gitk added the option to used themed Tk (ttk) in 0cc08ff7dd ("gitk: Add
    a user preference to enable/disable use of themed widgets", 2009-09-05).
    Using ttk had to be optional as Tk 8.4, then in common use, does not
    have ttk. ttk is the default when available, so the ttk code paths are
    by now very well tested. gitk also has code paths for the older default
    widgets, increasing the maintenance burden. Let's make ttk non-optional
    to reduce code complexity in later commits.

    Signed-off-by: Mark Levedahl <mlevedahl@gmail•com>

-- 
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-09 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 14:02 gitk bug: Disabling "Themed widgets" breaks preferences dialogue Mark Hills
2025-08-28 21:32 ` Johannes Sixt
2025-09-09 20:53   ` Removal of classic Tk widgets (was Re: gitk bug: Disabling "Themed widgets" breaks preferences dialogue) Mark Hills

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox