Skip to content

Commit

Permalink
git-gui: Allow users to set font weights to bold
Browse files Browse the repository at this point in the history
Previously we allowed users to tweak their font weight to be bold by
setting it manually in their ~/.gitconfig prior to starting git-gui.
This was broken in ae0754a when
Simon set the font weight to normal by default, overridding whatever
we found from the ~/.gitconfig file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Shawn O. Pearce committed Nov 1, 2007
1 parent 6ea1079 commit 48b8d2b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,15 @@ proc apply_config {} {
set name [lindex $option 0]
set font [lindex $option 1]
if {[catch {
set need_weight 1
foreach {cn cv} $repo_config(gui.$name) {
font configure $font $cn $cv -weight normal
if {$cn eq {-weight}} {
set need_weight 0
}
font configure $font $cn $cv
}
if {$need_weight} {
font configure $font -weight normal
}
} err]} {
error_popup [strcat [mc "Invalid font specified in %s:" "gui.$name"] "\n\n$err"]
Expand Down

0 comments on commit 48b8d2b

Please sign in to comment.