Subject: [PATCH 1/3] gitk: fix text wrapping preferences for unthemed tk

From: "Christoph Sommer via GitGitGadget" <[email-masked]>
Date: Mon, 28 Apr 2025 15:56:11 +0000

From: Christoph Sommer <[email-masked]>

Use a widget factory that works for both plain Tk and themed Tk.

Signed-off-by: Christoph Sommer <[email-masked]>
---
 gitk-git/gitk | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index bc9efa18566..8cb17f39d41 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -11767,13 +11767,11 @@ proc prefspage_general {notebook} {
     grid x $page.tabstopl $page.tabstop -sticky w
 
     ${NS}::label $page.wrapcommentl -text [mc "Wrap comment text"]
-    ${NS}::combobox $page.wrapcomment -values {none char word} -state readonly \
-        -textvariable wrapcomment
+    makedroplist $page.wrapcomment wrapcomment "none" "char" "word"
     grid x $page.wrapcommentl $page.wrapcomment -sticky w
 
     ${NS}::label $page.wrapdefaultl -text [mc "Wrap other text"]
-    ${NS}::combobox $page.wrapdefault -values {none char word} -state readonly \
-        -textvariable wrapdefault
+    makedroplist $page.wrapdefault wrapdefault "none" "char" "word"
     grid x $page.wrapdefaultl $page.wrapdefault -sticky w
 
     ${NS}::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \
-- 
gitgitgadget