{"thread":{"id":"7403","subject":"[PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.","startedAt":"2007-03-26T07:37:15Z","lastAt":"2007-03-26T10:16:10Z","messageCount":4,"participants":["Eygene Ryabinkin","Junio C Hamano","Frank Lichtenheld"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"38000","messageId":"20070326073715.GE44578@codelabs.ru","threadId":"7403","inReplyTo":null,"subject":"[PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-26T07:37:15Z","receivedAt":"2007-03-26T07:37:15Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n git-gui/git-gui.sh |   64 ++++++++++++++++++++++++++++++++++++---------------\n gitk               |   14 +++++++++++\n 2 files changed, 59 insertions(+), 19 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex 60e79ca..8157184 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -242,6 +242,8 @@ proc error_popup {msg} {\n \tif {[reponame] ne {}} {\n \t\tappend title \" ([reponame])\"\n \t}\n+\toption add *Dialog.msg.font font_ui\n+\toption add *Button.font font_ui\n \tset cmd [list tk_messageBox \\\n \t\t-icon error \\\n \t\t-type ok \\\n@@ -258,6 +260,8 @@ proc warn_popup {msg} {\n \tif {[reponame] ne {}} {\n \t\tappend title \" ([reponame])\"\n \t}\n+\toption add *Dialog.msg.font font_ui\n+\toption add *Button.font font_ui\n \tset cmd [list tk_messageBox \\\n \t\t-icon warning \\\n \t\t-type ok \\\n@@ -274,6 +278,8 @@ proc info_popup {msg {parent .}} {\n \tif {[reponame] ne {}} {\n \t\tappend title \" ([reponame])\"\n \t}\n+\toption add *Dialog.msg.font font_ui\n+\toption add *Button.font font_ui\n \ttk_messageBox \\\n \t\t-parent $parent \\\n \t\t-icon info \\\n@@ -287,6 +293,8 @@ proc ask_popup {msg} {\n \tif {[reponame] ne {}} {\n \t\tappend title \" ([reponame])\"\n \t}\n+\toption add *Dialog.msg.font font_ui\n+\toption add *Button.font font_ui\n \treturn [tk_messageBox \\\n \t\t-parent . \\\n \t\t-icon question \\\n@@ -2116,7 +2124,10 @@ proc do_create_branch {} {\n \t\t-value head \\\n \t\t-variable create_branch_revtype \\\n \t\t-font font_ui\n-\teval tk_optionMenu $w.from.head_m create_branch_head $all_heads\n+\tset lbranchm [eval tk_optionMenu $w.from.head_m create_branch_head \\\n+\t\t$all_heads]\n+\t$lbranchm configure -font font_ui\n+\t$w.from.head_m configure -font font_ui\n \tgrid $w.from.head_r $w.from.head_m -sticky w\n \tset all_trackings [all_tracking_branches]\n \tif {$all_trackings ne {}} {\n@@ -2126,9 +2137,11 @@ proc do_create_branch {} {\n \t\t\t-value tracking \\\n \t\t\t-variable create_branch_revtype \\\n \t\t\t-font font_ui\n-\t\teval tk_optionMenu $w.from.tracking_m \\\n+\t\tset tbranchm [eval tk_optionMenu $w.from.tracking_m \\\n \t\t\tcreate_branch_trackinghead \\\n-\t\t\t$all_trackings\n+\t\t\t$all_trackings]\n+\t\t$tbranchm configure -font font_ui\n+\t\t$w.from.tracking_m configure -font font_ui\n \t\tgrid $w.from.tracking_r $w.from.tracking_m -sticky w\n \t}\n \tset all_tags [load_all_tags]\n@@ -2139,9 +2152,11 @@ proc do_create_branch {} {\n \t\t\t-value tag \\\n \t\t\t-variable create_branch_revtype \\\n \t\t\t-font font_ui\n-\t\teval tk_optionMenu $w.from.tag_m \\\n+\t\tset tagsm [eval tk_optionMenu $w.from.tag_m \\\n \t\t\tcreate_branch_tag \\\n-\t\t\t$all_tags\n+\t\t\t$all_tags]\n+\t\t$tagsm configure -font font_ui\n+\t\t$w.from.tag_m configure -font font_ui\n \t\tgrid $w.from.tag_r $w.from.tag_m -sticky w\n \t}\n \tradiobutton $w.from.exp_r \\\n@@ -2335,7 +2350,11 @@ proc do_delete_branch {} {\n \t\t-value head \\\n \t\t-variable delete_branch_checktype \\\n \t\t-font font_ui\n-\teval tk_optionMenu $w.validate.head_m delete_branch_head $all_heads\n+\tset mergedlocalm [eval tk_optionMenu $w.validate.head_m \\\n+\t\tdelete_branch_head \\\n+\t\t$all_heads]\n+\t$mergedlocalm configure -font font_ui\n+\t$w.validate.head_m configure -font font_ui\n \tgrid $w.validate.head_r $w.validate.head_m -sticky w\n \tset all_trackings [all_tracking_branches]\n \tif {$all_trackings ne {}} {\n@@ -2345,9 +2364,11 @@ proc do_delete_branch {} {\n \t\t\t-value tracking \\\n \t\t\t-variable delete_branch_checktype \\\n \t\t\t-font font_ui\n-\t\teval tk_optionMenu $w.validate.tracking_m \\\n+\t\tset mergedtrackm [eval tk_optionMenu $w.validate.tracking_m \\\n \t\t\tdelete_branch_trackinghead \\\n-\t\t\t$all_trackings\n+\t\t\t$all_trackings]\n+\t\t$mergedtrackm configure -font font_ui\n+\t\t$w.validate.tracking_m configure -font font_ui\n \t\tgrid $w.validate.tracking_r $w.validate.tracking_m -sticky w\n \t}\n \tradiobutton $w.validate.always_r \\\n@@ -2721,7 +2742,10 @@ proc do_push_anywhere {} {\n \t\t\t-value remote \\\n \t\t\t-variable push_urltype \\\n \t\t\t-font font_ui\n-\t\teval tk_optionMenu $w.dest.remote_m push_remote $all_remotes\n+\t\tset remmenu [eval tk_optionMenu $w.dest.remote_m push_remote \\\n+\t\t\t$all_remotes]\n+\t\t$remmenu configure -font font_ui\n+\t\t$w.dest.remote_m configure -font font_ui\n \t\tgrid $w.dest.remote_r $w.dest.remote_m -sticky w\n \t\tif {[lsearch -sorted -exact $all_remotes origin] != -1} {\n \t\t\tset push_remote origin\n@@ -4686,9 +4710,11 @@ proc do_options {} {\n \t\tframe $w.global.$name\n \t\tlabel $w.global.$name.l -text \"$text:\" -font font_ui\n \t\tpack $w.global.$name.l -side left -anchor w -fill x\n-\t\teval tk_optionMenu $w.global.$name.family \\\n+\t\tset fontmenu [eval tk_optionMenu $w.global.$name.family \\\n \t\t\tglobal_config_new(gui.$font^^family) \\\n-\t\t\t$all_fonts\n+\t\t\t$all_fonts]\n+\t\t$w.global.$name.family configure -font font_ui\n+\t\t$fontmenu configure -font font_ui\n \t\tspinbox $w.global.$name.size \\\n \t\t\t-textvariable global_config_new(gui.$font^^size) \\\n \t\t\t-from 2 -to 80 -increment 1 \\\n@@ -5083,18 +5109,18 @@ set ui_comm {}\n # -- Menu Bar\n #\n menu .mbar -tearoff 0\n-.mbar add cascade -label Repository -menu .mbar.repository\n-.mbar add cascade -label Edit -menu .mbar.edit\n+.mbar add cascade -label Repository -menu .mbar.repository -font font_ui\n+.mbar add cascade -label Edit -menu .mbar.edit -font font_ui\n if {[is_enabled branch]} {\n-\t.mbar add cascade -label Branch -menu .mbar.branch\n+\t.mbar add cascade -label Branch -menu .mbar.branch -font font_ui\n }\n if {[is_enabled multicommit] || [is_enabled singlecommit]} {\n-\t.mbar add cascade -label Commit -menu .mbar.commit\n+\t.mbar add cascade -label Commit -menu .mbar.commit -font font_ui\n }\n if {[is_enabled transport]} {\n-\t.mbar add cascade -label Merge -menu .mbar.merge\n-\t.mbar add cascade -label Fetch -menu .mbar.fetch\n-\t.mbar add cascade -label Push -menu .mbar.push\n+\t.mbar add cascade -label Merge -menu .mbar.merge -font font_ui\n+\t.mbar add cascade -label Fetch -menu .mbar.fetch -font font_ui\n+\t.mbar add cascade -label Push -menu .mbar.push -font font_ui\n }\n . configure -menu .mbar\n \n@@ -5370,7 +5396,7 @@ if {[is_MacOSX]} {\n \n # -- Help Menu\n #\n-.mbar add cascade -label Help -menu .mbar.help\n+.mbar add cascade -label Help -menu .mbar.help -font font_ui\n menu .mbar.help\n \n if {![is_MacOSX]} {\ndiff --git a/gitk b/gitk\nindex 1cd2a8f..e4d3bf4 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@@ -5813,6 +5821,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 +5835,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 +5848,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 +5861,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 +5890,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"},{"id":"38010","messageId":"7vr6rcxv5x.fsf@assigned-by-dhcp.cox.net","threadId":"7403","inReplyTo":"20070326073715.GE44578@codelabs.ru","subject":"Re: [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-26T08:31:54Z","receivedAt":"2007-03-26T08:31:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I think this is sane in general, but please\n\n (1) do not make a combined patch that covers gitk and git-gui\n     at the same time;\n\n (2) address gitk patches to Paul Mackerras <paulus@samba.org>,\n     with cc: the list;\n\n (3) address git-gui patches to Shawn Pearce <spearce@spearce.org>\n     with cc: the list.\n\nThanks.\n"},{"id":"38023","messageId":"20070326100635.GN8017@planck.djpig.de","threadId":"7403","inReplyTo":"7vr6rcxv5x.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-26T10:06:35Z","receivedAt":"2007-03-26T10:06:35Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Mon, Mar 26, 2007 at 01:31:54AM -0700, Junio C Hamano wrote:\n>  (2) address gitk patches to Paul Mackerras <paulus@samba.org>,\n>      with cc: the list;\n> \n>  (3) address git-gui patches to Shawn Pearce <spearce@spearce.org>\n>      with cc: the list.\n\nMaybe such information could be added to\nDocumentation/SubmittingPatches? Currently it only talks about\ncontrib/ vs. everything else and not e.g. about gitk and git-gui.\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"38025","messageId":"20070326101610.GX14837@codelabs.ru","threadId":"7403","inReplyTo":"7vr6rcxv5x.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-26T10:16:10Z","receivedAt":"2007-03-26T10:16:10Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Junio,\n\nMon, Mar 26, 2007 at 01:31:54AM -0700, Junio C Hamano wrote:\n> I think this is sane in general, but please\n> \n>  (1) do not make a combined patch that covers gitk and git-gui\n>      at the same time;\n\nI assume this does not the general rule, but it is just a consequence\nof a gitk and git-gui being maintained by the different programmers?\nI've always thought that the logically related changes should go\ninto the same commit.\n\n>  (2) address gitk patches to Paul Mackerras <paulus@samba.org>,\n>      with cc: the list;\n> \n>  (3) address git-gui patches to Shawn Pearce <spearce@spearce.org>\n>      with cc: the list.\n\nOK, will do.\n\nProbably the RTFM question: can I redo my patches to split them up\nto the different pieces for the gitk and git-gui in some automated\nway?  Or I will need to do it manually?\n\nThanks!\n-- \nEygene\n"}]}