From daa364cfb7a1cda324ec5c5cdaf92bcad429cfbd Mon Sep 17 00:00:00 2001 From: YOKOTA Hiroshi Date: Mon, 5 May 2025 02:57:07 +0900 Subject: gitk: Legacy widgets doesn't have combobox Use "proc makedroplist" function to support combobox on legacy widgets mode. "proc makedroplist" uses "ttk::combobox" for themed mode, and uses "tk_optionMenu" for legacy mode to get rid of the problem. Signed-off-by: YOKOTA Hiroshi Signed-off-by: Johannes Sixt --- gitk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gitk b/gitk index 11ad639d06..966833a19e 100755 --- a/gitk +++ b/gitk @@ -11736,13 +11736,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"] \ -- cgit v1.3 From 9f27318f148f7dbf6d837caea094dbd6490b8baa Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Tue, 13 May 2025 22:38:41 +0200 Subject: gitk: place file name arguments after options in msgfmt call The build process fails in POSIXLY_CORRECT mode: $ gitk@master:1005> POSIXLY_CORRECT=1 make * new Tcl/Tk interpreter location GEN gitk-wish Generating catalog po/zh_cn.msg msgfmt --statistics --tcl po/zh_cn.po -l zh_cn -d po/ msgfmt: --tcl requires a "-l locale" specification Try 'msgfmt --help' for more information. make: *** [Makefile:76: po/zh_cn.msg] Error 1 The reason is that option arguments cannot occur after the first non-option argument. Move the file name last. Reported-by: Nathan Royce Signed-off-by: Johannes Sixt --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3a3c56c318..cc32dcab4b 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ update-po:: $(PO_TEMPLATE) $(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; ) $(ALL_MSGFILES): %.msg : %.po @echo Generating catalog $@ - $(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@) + $(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< .PHONY: all install uninstall clean update-po .PHONY: FORCE -- cgit v1.3 From 9cad4a9dc0358c959db42186eb40736e5fb5e788 Mon Sep 17 00:00:00 2001 From: Alexander Ogorodov Date: Tue, 18 Mar 2025 13:27:04 +0700 Subject: gitk: do not hard-code color of search results in commit list A global variable exists that holds the color name used to highlight search results everywhere, except that in the commit list the color is still hard-coded to "yellow". Use the global variable there as well. Signed-off-by: Alexander Ogorodov --- gitk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitk b/gitk index bc9efa1856..02a8b8eb81 100755 --- a/gitk +++ b/gitk @@ -7139,7 +7139,7 @@ proc findselectline {l} { # mark the bits of a headline or author that match a find string proc markmatches {canv l str tag matches font row} { - global selectedline + global selectedline foundbgcolor set bbox [$canv bbox $tag] set x0 [lindex $bbox 0] @@ -7153,7 +7153,7 @@ proc markmatches {canv l str tag matches font row} { set xlen [font measure $font [string range $str 0 [expr {$end}]]] set t [$canv create rect [expr {$x0+$xoff}] $y0 \ [expr {$x0+$xlen+2}] $y1 \ - -outline {} -tags [list match$l matches] -fill yellow] + -outline {} -tags [list match$l matches] -fill $foundbgcolor] $canv lower $t if {$row == $selectedline} { $canv raise $t secsel -- cgit v1.3