* [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.
@ 2007-03-26 7:37 Eygene Ryabinkin
2007-03-26 8:31 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Eygene Ryabinkin @ 2007-03-26 7:37 UTC (permalink / raw)
To: git
Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
---
git-gui/git-gui.sh | 64 ++++++++++++++++++++++++++++++++++++---------------
gitk | 14 +++++++++++
2 files changed, 59 insertions(+), 19 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 60e79ca..8157184 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -242,6 +242,8 @@ proc error_popup {msg} {
if {[reponame] ne {}} {
append title " ([reponame])"
}
+ option add *Dialog.msg.font font_ui
+ option add *Button.font font_ui
set cmd [list tk_messageBox \
-icon error \
-type ok \
@@ -258,6 +260,8 @@ proc warn_popup {msg} {
if {[reponame] ne {}} {
append title " ([reponame])"
}
+ option add *Dialog.msg.font font_ui
+ option add *Button.font font_ui
set cmd [list tk_messageBox \
-icon warning \
-type ok \
@@ -274,6 +278,8 @@ proc info_popup {msg {parent .}} {
if {[reponame] ne {}} {
append title " ([reponame])"
}
+ option add *Dialog.msg.font font_ui
+ option add *Button.font font_ui
tk_messageBox \
-parent $parent \
-icon info \
@@ -287,6 +293,8 @@ proc ask_popup {msg} {
if {[reponame] ne {}} {
append title " ([reponame])"
}
+ option add *Dialog.msg.font font_ui
+ option add *Button.font font_ui
return [tk_messageBox \
-parent . \
-icon question \
@@ -2116,7 +2124,10 @@ proc do_create_branch {} {
-value head \
-variable create_branch_revtype \
-font font_ui
- eval tk_optionMenu $w.from.head_m create_branch_head $all_heads
+ set lbranchm [eval tk_optionMenu $w.from.head_m create_branch_head \
+ $all_heads]
+ $lbranchm configure -font font_ui
+ $w.from.head_m configure -font font_ui
grid $w.from.head_r $w.from.head_m -sticky w
set all_trackings [all_tracking_branches]
if {$all_trackings ne {}} {
@@ -2126,9 +2137,11 @@ proc do_create_branch {} {
-value tracking \
-variable create_branch_revtype \
-font font_ui
- eval tk_optionMenu $w.from.tracking_m \
+ set tbranchm [eval tk_optionMenu $w.from.tracking_m \
create_branch_trackinghead \
- $all_trackings
+ $all_trackings]
+ $tbranchm configure -font font_ui
+ $w.from.tracking_m configure -font font_ui
grid $w.from.tracking_r $w.from.tracking_m -sticky w
}
set all_tags [load_all_tags]
@@ -2139,9 +2152,11 @@ proc do_create_branch {} {
-value tag \
-variable create_branch_revtype \
-font font_ui
- eval tk_optionMenu $w.from.tag_m \
+ set tagsm [eval tk_optionMenu $w.from.tag_m \
create_branch_tag \
- $all_tags
+ $all_tags]
+ $tagsm configure -font font_ui
+ $w.from.tag_m configure -font font_ui
grid $w.from.tag_r $w.from.tag_m -sticky w
}
radiobutton $w.from.exp_r \
@@ -2335,7 +2350,11 @@ proc do_delete_branch {} {
-value head \
-variable delete_branch_checktype \
-font font_ui
- eval tk_optionMenu $w.validate.head_m delete_branch_head $all_heads
+ set mergedlocalm [eval tk_optionMenu $w.validate.head_m \
+ delete_branch_head \
+ $all_heads]
+ $mergedlocalm configure -font font_ui
+ $w.validate.head_m configure -font font_ui
grid $w.validate.head_r $w.validate.head_m -sticky w
set all_trackings [all_tracking_branches]
if {$all_trackings ne {}} {
@@ -2345,9 +2364,11 @@ proc do_delete_branch {} {
-value tracking \
-variable delete_branch_checktype \
-font font_ui
- eval tk_optionMenu $w.validate.tracking_m \
+ set mergedtrackm [eval tk_optionMenu $w.validate.tracking_m \
delete_branch_trackinghead \
- $all_trackings
+ $all_trackings]
+ $mergedtrackm configure -font font_ui
+ $w.validate.tracking_m configure -font font_ui
grid $w.validate.tracking_r $w.validate.tracking_m -sticky w
}
radiobutton $w.validate.always_r \
@@ -2721,7 +2742,10 @@ proc do_push_anywhere {} {
-value remote \
-variable push_urltype \
-font font_ui
- eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
+ set remmenu [eval tk_optionMenu $w.dest.remote_m push_remote \
+ $all_remotes]
+ $remmenu configure -font font_ui
+ $w.dest.remote_m configure -font font_ui
grid $w.dest.remote_r $w.dest.remote_m -sticky w
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
set push_remote origin
@@ -4686,9 +4710,11 @@ proc do_options {} {
frame $w.global.$name
label $w.global.$name.l -text "$text:" -font font_ui
pack $w.global.$name.l -side left -anchor w -fill x
- eval tk_optionMenu $w.global.$name.family \
+ set fontmenu [eval tk_optionMenu $w.global.$name.family \
global_config_new(gui.$font^^family) \
- $all_fonts
+ $all_fonts]
+ $w.global.$name.family configure -font font_ui
+ $fontmenu configure -font font_ui
spinbox $w.global.$name.size \
-textvariable global_config_new(gui.$font^^size) \
-from 2 -to 80 -increment 1 \
@@ -5083,18 +5109,18 @@ set ui_comm {}
# -- Menu Bar
#
menu .mbar -tearoff 0
-.mbar add cascade -label Repository -menu .mbar.repository
-.mbar add cascade -label Edit -menu .mbar.edit
+.mbar add cascade -label Repository -menu .mbar.repository -font font_ui
+.mbar add cascade -label Edit -menu .mbar.edit -font font_ui
if {[is_enabled branch]} {
- .mbar add cascade -label Branch -menu .mbar.branch
+ .mbar add cascade -label Branch -menu .mbar.branch -font font_ui
}
if {[is_enabled multicommit] || [is_enabled singlecommit]} {
- .mbar add cascade -label Commit -menu .mbar.commit
+ .mbar add cascade -label Commit -menu .mbar.commit -font font_ui
}
if {[is_enabled transport]} {
- .mbar add cascade -label Merge -menu .mbar.merge
- .mbar add cascade -label Fetch -menu .mbar.fetch
- .mbar add cascade -label Push -menu .mbar.push
+ .mbar add cascade -label Merge -menu .mbar.merge -font font_ui
+ .mbar add cascade -label Fetch -menu .mbar.fetch -font font_ui
+ .mbar add cascade -label Push -menu .mbar.push -font font_ui
}
. configure -menu .mbar
@@ -5370,7 +5396,7 @@ if {[is_MacOSX]} {
# -- Help Menu
#
-.mbar add cascade -label Help -menu .mbar.help
+.mbar add cascade -label Help -menu .mbar.help -font font_ui
menu .mbar.help
if {![is_MacOSX]} {
diff --git a/gitk b/gitk
index 1cd2a8f..e4d3bf4 100755
--- a/gitk
+++ b/gitk
@@ -648,8 +648,10 @@ proc makewindow {} {
frame .bright.mode
radiobutton .bright.mode.patch -text "Patch" \
-command reselectline -variable cmitmode -value "patch"
+ .bright.mode.patch configure -font $uifont
radiobutton .bright.mode.tree -text "Tree" \
-command reselectline -variable cmitmode -value "tree"
+ .bright.mode.tree configure -font $uifont
grid .bright.mode.patch .bright.mode.tree -sticky ew
pack .bright.mode -side top -fill x
set cflist .bright.cfiles
@@ -922,6 +924,7 @@ proc bindall {event action} {
}
proc about {} {
+ global uifont
set w .about
if {[winfo exists $w]} {
raise $w
@@ -937,11 +940,14 @@ Copyright ╘ 2005-2006 Paul Mackerras
Use and redistribute under the terms of the GNU General Public License} \
-justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
+ $w.m configure -font $uifont
button $w.ok -text Close -command "destroy $w"
pack $w.ok -side bottom
+ $w.ok configure -font $uifont
}
proc keys {} {
+ global uifont
set w .keys
if {[winfo exists $w]} {
raise $w
@@ -990,8 +996,10 @@ f Scroll diff view to next file
} \
-justify left -bg white -border 2 -relief sunken
pack $w.m -side top -fill both
+ $w.m configure -font $uifont
button $w.ok -text Close -command "destroy $w"
pack $w.ok -side bottom
+ $w.ok configure -font $uifont
}
# Procedures for manipulating the file list window at the
@@ -5813,6 +5821,7 @@ proc doprefs {} {
global maxwidth maxgraphpct diffopts
global oldprefs prefstop showneartags
global bgcolor fgcolor ctext diffcolors
+ global uifont
set top .gitkprefs
set prefstop $top
@@ -5826,6 +5835,7 @@ proc doprefs {} {
toplevel $top
wm title $top "Gitk preferences"
label $top.ldisp -text "Commit list display options"
+ $top.ldisp configure -font $uifont
grid $top.ldisp - -sticky w -pady 10
label $top.spacer -text " "
label $top.maxwidthl -text "Maximum graph width (lines)" \
@@ -5838,6 +5848,7 @@ proc doprefs {} {
grid x $top.maxpctl $top.maxpct -sticky w
label $top.ddisp -text "Diff display options"
+ $top.ddisp configure -font $uifont
grid $top.ddisp - -sticky w -pady 10
label $top.diffoptl -text "Options for diff program" \
-font optionfont
@@ -5850,6 +5861,7 @@ proc doprefs {} {
grid x $top.ntag -sticky w
label $top.cdisp -text "Colors: press to choose"
+ $top.cdisp configure -font $uifont
grid $top.cdisp - -sticky w -pady 10
label $top.bg -padx 40 -relief sunk -background $bgcolor
button $top.bgbut -text "Background" -font optionfont \
@@ -5878,7 +5890,9 @@ proc doprefs {} {
frame $top.buts
button $top.buts.ok -text "OK" -command prefsok
+ $top.buts.ok configure -font $uifont
button $top.buts.can -text "Cancel" -command prefscan
+ $top.buts.can configure -font $uifont
grid $top.buts.ok $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
--
1.5.0.3-dirty
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.
2007-03-26 7:37 [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools Eygene Ryabinkin
@ 2007-03-26 8:31 ` Junio C Hamano
2007-03-26 10:06 ` Frank Lichtenheld
2007-03-26 10:16 ` Eygene Ryabinkin
0 siblings, 2 replies; 4+ messages in thread
From: Junio C Hamano @ 2007-03-26 8:31 UTC (permalink / raw)
To: Eygene Ryabinkin; +Cc: git
I think this is sane in general, but please
(1) do not make a combined patch that covers gitk and git-gui
at the same time;
(2) address gitk patches to Paul Mackerras <paulus@samba.org>,
with cc: the list;
(3) address git-gui patches to Shawn Pearce <spearce@spearce.org>
with cc: the list.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.
2007-03-26 8:31 ` Junio C Hamano
@ 2007-03-26 10:06 ` Frank Lichtenheld
2007-03-26 10:16 ` Eygene Ryabinkin
1 sibling, 0 replies; 4+ messages in thread
From: Frank Lichtenheld @ 2007-03-26 10:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Eygene Ryabinkin, git
On Mon, Mar 26, 2007 at 01:31:54AM -0700, Junio C Hamano wrote:
> (2) address gitk patches to Paul Mackerras <paulus@samba.org>,
> with cc: the list;
>
> (3) address git-gui patches to Shawn Pearce <spearce@spearce.org>
> with cc: the list.
Maybe such information could be added to
Documentation/SubmittingPatches? Currently it only talks about
contrib/ vs. everything else and not e.g. about gitk and git-gui.
Gruesse,
--
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools.
2007-03-26 8:31 ` Junio C Hamano
2007-03-26 10:06 ` Frank Lichtenheld
@ 2007-03-26 10:16 ` Eygene Ryabinkin
1 sibling, 0 replies; 4+ messages in thread
From: Eygene Ryabinkin @ 2007-03-26 10:16 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio,
Mon, Mar 26, 2007 at 01:31:54AM -0700, Junio C Hamano wrote:
> I think this is sane in general, but please
>
> (1) do not make a combined patch that covers gitk and git-gui
> at the same time;
I assume this does not the general rule, but it is just a consequence
of a gitk and git-gui being maintained by the different programmers?
I've always thought that the logically related changes should go
into the same commit.
> (2) address gitk patches to Paul Mackerras <paulus@samba.org>,
> with cc: the list;
>
> (3) address git-gui patches to Shawn Pearce <spearce@spearce.org>
> with cc: the list.
OK, will do.
Probably the RTFM question: can I redo my patches to split them up
to the different pieces for the gitk and git-gui in some automated
way? Or I will need to do it manually?
Thanks!
--
Eygene
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-26 10:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-26 7:37 [PATCH 1/5] Consistently use user-defined UI font everywhere in GUI tools Eygene Ryabinkin
2007-03-26 8:31 ` Junio C Hamano
2007-03-26 10:06 ` Frank Lichtenheld
2007-03-26 10:16 ` Eygene Ryabinkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).