summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-11-01 00:31:36 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-11-01 00:31:36 -0400
commit48b8d2b3792339d4dbd37802db8ec797361dd1fe (patch)
treef00621150771cdbc73bb2ca8e2268875628789a8
parent6ea10797deb7699c35a2b097938bf02aabc29e45 (diff)
downloadgit-48b8d2b3792339d4dbd37802db8ec797361dd1fe.tar.gz
git-gui: Allow users to set font weights to bold
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 ae0754ac9a24afa2693246222fc078fe9c133b3a 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>
-rwxr-xr-xgit-gui.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/git-gui.sh b/git-gui.sh
index a7227ac1b6..b41e107d94 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -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"]