{"thread":{"id":"7428","subject":"[PATCH 1/2] Teach gitk to use the user-defined UI font everywhere.","startedAt":"2007-03-27T10:36:12Z","lastAt":"2007-03-27T10:36:12Z","messageCount":1,"participants":["Eygene Ryabinkin"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"38134","messageId":"20070327103611.GX14837@codelabs.ru","threadId":"7428","inReplyTo":null,"subject":"[PATCH 1/2] Teach gitk to use the user-defined UI font everywhere.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T10:36:12Z","receivedAt":"2007-03-27T10:36:12Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Some parts of gitk were not respecting the default GUI font. Most\nof them were catched and fixed.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n gitk |   29 +++++++++++++++++++++++------\n 1 files changed, 23 insertions(+), 6 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 1cd2a8f..f54ff27 100755\n--- a/gitk\n+++ b/gitk\n@@ -648,8 +648,10 @@ proc makewindow {} {\n     frame .bright.mode\n     radiobutton .bright.mode.patch -text \"Patch\" \\\n \t-command reselectline -variable cmitmode -value \"patch\"\n+    .bright.mode.patch configure -font $uifont\n     radiobutton .bright.mode.tree -text \"Tree\" \\\n \t-command reselectline -variable cmitmode -value \"tree\"\n+    .bright.mode.tree configure -font $uifont\n     grid .bright.mode.patch .bright.mode.tree -sticky ew\n     pack .bright.mode -side top -fill x\n     set cflist .bright.cfiles\n@@ -922,6 +924,7 @@ proc bindall {event action} {\n }\n \n proc about {} {\n+    global uifont\n     set w .about\n     if {[winfo exists $w]} {\n \traise $w\n@@ -937,11 +940,14 @@ Copyright ╘ 2005-2006 Paul Mackerras\n Use and redistribute under the terms of the GNU General Public License} \\\n \t    -justify center -aspect 400\n     pack $w.m -side top -fill x -padx 20 -pady 20\n+    $w.m configure -font $uifont\n     button $w.ok -text Close -command \"destroy $w\"\n     pack $w.ok -side bottom\n+    $w.ok configure -font $uifont\n }\n \n proc keys {} {\n+    global uifont\n     set w .keys\n     if {[winfo exists $w]} {\n \traise $w\n@@ -990,8 +996,10 @@ f\t\tScroll diff view to next file\n } \\\n \t    -justify left -bg white -border 2 -relief sunken\n     pack $w.m -side top -fill both\n+    $w.m configure -font $uifont\n     button $w.ok -text Close -command \"destroy $w\"\n     pack $w.ok -side bottom\n+    $w.ok configure -font $uifont\n }\n \n # Procedures for manipulating the file list window at the\n@@ -1457,20 +1465,21 @@ proc vieweditor {top n title} {\n     toplevel $top\n     wm title $top $title\n     label $top.nl -text \"Name\" -font $uifont\n-    entry $top.name -width 20 -textvariable newviewname($n)\n+    entry $top.name -width 20 -textvariable newviewname($n) -font $uifont\n     grid $top.nl $top.name -sticky w -pady 5\n-    checkbutton $top.perm -text \"Remember this view\" -variable newviewperm($n)\n+    checkbutton $top.perm -text \"Remember this view\" -variable newviewperm($n) \\\n+\t-font $uifont\n     grid $top.perm - -pady 5 -sticky w\n     message $top.al -aspect 1000 -font $uifont \\\n \t-text \"Commits to include (arguments to git rev-list):\"\n     grid $top.al - -sticky w -pady 5\n     entry $top.args -width 50 -textvariable newviewargs($n) \\\n-\t-background white\n+\t-background white -font $uifont\n     grid $top.args - -sticky ew -padx 5\n     message $top.l -aspect 1000 -font $uifont \\\n \t-text \"Enter files and directories to include, one per line:\"\n     grid $top.l - -sticky w\n-    text $top.t -width 40 -height 10 -background white\n+    text $top.t -width 40 -height 10 -background white -font $uifont\n     if {[info exists viewfiles($n)]} {\n \tforeach f $viewfiles($n) {\n \t    $top.t insert end $f\n@@ -1481,8 +1490,10 @@ proc vieweditor {top n title} {\n     }\n     grid $top.t - -sticky ew -padx 5\n     frame $top.buts\n-    button $top.buts.ok -text \"OK\" -command [list newviewok $top $n]\n-    button $top.buts.can -text \"Cancel\" -command [list destroy $top]\n+    button $top.buts.ok -text \"OK\" -command [list newviewok $top $n] \\\n+\t-font $uifont\n+    button $top.buts.can -text \"Cancel\" -command [list destroy $top] \\\n+\t-font $uifont\n     grid $top.buts.ok $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n     grid columnconfigure $top.buts 1 -weight 1 -uniform a\n@@ -5813,6 +5824,7 @@ proc doprefs {} {\n     global maxwidth maxgraphpct diffopts\n     global oldprefs prefstop showneartags\n     global bgcolor fgcolor ctext diffcolors\n+    global uifont\n \n     set top .gitkprefs\n     set prefstop $top\n@@ -5826,6 +5838,7 @@ proc doprefs {} {\n     toplevel $top\n     wm title $top \"Gitk preferences\"\n     label $top.ldisp -text \"Commit list display options\"\n+    $top.ldisp configure -font $uifont\n     grid $top.ldisp - -sticky w -pady 10\n     label $top.spacer -text \" \"\n     label $top.maxwidthl -text \"Maximum graph width (lines)\" \\\n@@ -5838,6 +5851,7 @@ proc doprefs {} {\n     grid x $top.maxpctl $top.maxpct -sticky w\n \n     label $top.ddisp -text \"Diff display options\"\n+    $top.ddisp configure -font $uifont\n     grid $top.ddisp - -sticky w -pady 10\n     label $top.diffoptl -text \"Options for diff program\" \\\n \t-font optionfont\n@@ -5850,6 +5864,7 @@ proc doprefs {} {\n     grid x $top.ntag -sticky w\n \n     label $top.cdisp -text \"Colors: press to choose\"\n+    $top.cdisp configure -font $uifont\n     grid $top.cdisp - -sticky w -pady 10\n     label $top.bg -padx 40 -relief sunk -background $bgcolor\n     button $top.bgbut -text \"Background\" -font optionfont \\\n@@ -5878,7 +5893,9 @@ proc doprefs {} {\n \n     frame $top.buts\n     button $top.buts.ok -text \"OK\" -command prefsok\n+    $top.buts.ok configure -font $uifont\n     button $top.buts.can -text \"Cancel\" -command prefscan\n+    $top.buts.can configure -font $uifont\n     grid $top.buts.ok $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n     grid columnconfigure $top.buts 1 -weight 1 -uniform a\n-- \n1.5.0.3-dirty\n"}]}