Skip to content

Commit b70a02d

Browse files
committed
Merge branch 'master' of https://github.com/j6t/gitk
* 'master' of https://github.com/j6t/gitk: gitk: l10n: make PO headers identify the Gitk project gitk: ignore generated POT file gitk: i18n: use "Gitk" as package name in POT file gitk: commit translation files without file information gitk: support link color in the Preferences dialog gitk: use config settings for head/tag colors
2 parents 7ff1e8d + c8c5df7 commit b70a02d

File tree

19 files changed

+187
-4509
lines changed

19 files changed

+187
-4509
lines changed

gitk-git/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/GIT-TCLTK-VARS
22
/gitk-wish
3+
po/gitk.pot

gitk-git/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,12 @@ gitk-wish: gitk GIT-TCLTK-VARS
6868
$(SHELL_PATH) ./generate-tcl.sh "$(TCLTK_PATH_SQ)" "$<" "$@"
6969

7070
$(PO_TEMPLATE): gitk
71-
$(XGETTEXT) -kmc -LTcl -o $@ gitk
71+
$(XGETTEXT) -kmc -LTcl --package-name=Gitk -o $@ gitk
7272
update-po:: $(PO_TEMPLATE)
73-
$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
73+
$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U --add-location $p $(PO_TEMPLATE) ; )
74+
@echo "Before committing changes, ensure that a clean-filter is installed:"; \
75+
echo; \
76+
echo " git config filter.gettext-no-location.clean \"msgcat --no-location -\""
7477
$(ALL_MSGFILES): %.msg : %.po
7578
@echo Generating catalog $@
7679
$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<

gitk-git/gitk

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6831,16 +6831,18 @@ proc drawtags {id x xt y1} {
68316831
} else {
68326832
# draw a head or other ref
68336833
if {[incr nheads -1] >= 0} {
6834-
set col $headbgcolor
6834+
set refoutlinecol $headoutlinecolor
6835+
set reffillcol $headbgcolor
68356836
if {$tag eq $mainhead} {
68366837
set font mainfontbold
68376838
}
68386839
} else {
6839-
set col "#ddddff"
6840+
set refoutlinecol black
6841+
set reffillcol "#ddddff"
68406842
}
68416843
set xl [expr {$xl - $delta/2}]
68426844
$canv create polygon $x $yt $xr $yt $xr $yb $x $yb \
6843-
-width 1 -outline black -fill $col -tags tag.$id
6845+
-width 1 -outline $refoutlinecol -fill $reffillcol -tags tag.$id
68446846
if {[regexp {^(remotes/[^/]*/|remotes/)} $tag match remoteprefix]} {
68456847
set rwid [font measure mainfont $remoteprefix]
68466848
set xi [expr {$x + 1}]
@@ -6850,7 +6852,8 @@ proc drawtags {id x xt y1} {
68506852
-width 0 -fill $remotebgcolor -tags tag.$id
68516853
}
68526854
}
6853-
set t [$canv create text $xl $y1 -anchor w -text $tag -fill $headfgcolor \
6855+
set textfgcolor [expr {$ntags >= 0 ? $tagfgcolor : $headfgcolor}]
6856+
set t [$canv create text $xl $y1 -anchor w -text $tag -fill $textfgcolor \
68546857
-font $font -tags [list tag.$id text]]
68556858
if {$ntags >= 0} {
68566859
$canv bind $t <1> $tagclick
@@ -11796,7 +11799,7 @@ proc prefspage_general {notebook} {
1179611799
1179711800
proc prefspage_colors {notebook} {
1179811801
global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
11799-
global diffbgcolors
11802+
global diffbgcolors linkfgcolor
1180011803
global themeloader
1180111804
1180211805
set page [create_prefs_page $notebook.colors]
@@ -11873,14 +11876,19 @@ proc prefspage_colors {notebook} {
1187311876
-command [list choosecolor selectbgcolor {} $page [mc "background"]]
1187411877
grid x $page.selbgbut $page.selbgsep -sticky w
1187511878
11879+
label $page.linkfg -padx 40 -relief sunk -background $linkfgcolor
11880+
ttk::button $page.linkfgbut -text [mc "Link"] \
11881+
-command [list choosecolor linkfgcolor {} $page [mc "link"]]
11882+
grid x $page.linkfgbut $page.linkfg -sticky w
11883+
1187611884
grid columnconfigure $page 2 -weight 1
1187711885
1187811886
return $page
1187911887
}
1188011888
1188111889
proc prefspage_set_colorswatches {page} {
1188211890
global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor
11883-
global diffbgcolors
11891+
global diffbgcolors linkfgcolor
1188411892
1188511893
$page.bg configure -background $bgcolor
1188611894
$page.fg configure -background $fgcolor
@@ -11891,6 +11899,7 @@ proc prefspage_set_colorswatches {page} {
1189111899
$page.hunksep configure -background [lindex $diffcolors 2]
1189211900
$page.markbgsep configure -background $markbgcolor
1189311901
$page.selbgsep configure -background $selectbgcolor
11902+
$page.linkfg configure -background $linkfgcolor
1189411903
}
1189511904
1189611905
proc prefspage_fonts {notebook} {

gitk-git/po/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*.po filter=gettext-no-location

gitk-git/po/bg.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: gitk master\n"
9+
"Project-Id-Version: Gitk master\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2025-07-22 18:34+0200\n"
1212
"PO-Revision-Date: 2025-07-28 13:38+0200\n"

0 commit comments

Comments
 (0)