@matheusbsbs / matheus-bagliano / commits / 3963678da9
Fork 0

git-gui: Rename difffont/mainfont variables.

I found difffont to be a very awkward varible name, due to the use of three f's in a row. So use easier to read variable names. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Nov 11, 2006 at 18:46 UTC 3963678da9e78e87fa9b57f2f3ad75ba1c70e589
1 file changed +55 -55
git-gui
+55 -55
@@ -1044,17 +1044,17 @@ proc load_all_remotes {} {
1044 }
1045
1046 proc populate_remote_menu {m pfx op} {
1047 - global all_remotes mainfont
1047 + global all_remotes font_ui
1048
1049 foreach remote $all_remotes {
1050 $m add command -label "$pfx $remote..." \
1051 -command [list $op $remote] \
1052 - -font $mainfont
1052 + -font $font_ui
1053 }
1054 }
1055
1056 proc populate_pull_menu {m} {
1057 - global gitdir repo_config all_remotes mainfont disable_on_lock
1057 + global gitdir repo_config all_remotes font_ui disable_on_lock
1058
1059 foreach remote $all_remotes {
1060 set rb {}
@@ -1082,7 +1082,7 @@ proc populate_pull_menu {m} {
1082 $m add command \
1083 -label "Branch $rb_short from $remote..." \
1084 -command [list pull_remote $remote $rb] \
1085 - -font $mainfont
1085 + -font $font_ui
1086 lappend disable_on_lock \
1087 [list $m entryconf [$m index last] -state]
1088 }
@@ -1212,13 +1212,13 @@ proc error_popup {msg} {
1212 }
1213
1214 proc show_msg {w top msg} {
1215 - global gitdir appname mainfont
1215 + global gitdir appname font_ui
1216
1217 message $w.m -text $msg -justify left -aspect 400
1218 pack $w.m -side top -fill x -padx 5 -pady 10
1219 button $w.ok -text OK \
1220 -width 15 \
1221 - -font $mainfont \
1221 + -font $font_ui \
1222 -command "destroy $top"
1223 pack $w.ok -side bottom
1224 bind $top <Visibility> "grab $top; focus $top"
@@ -1230,7 +1230,7 @@ proc show_msg {w top msg} {
1230 }
1231
1232 proc hook_failed_popup {hook msg} {
1233 - global gitdir mainfont difffont appname
1233 + global gitdir font_ui font_diff appname
1234
1235 set w .hookfail
1236 toplevel $w
@@ -1240,18 +1240,18 @@ proc hook_failed_popup {hook msg} {
1240 label $w.m.l1 -text "$hook hook failed:" \
1241 -anchor w \
1242 -justify left \
1243 - -font [concat $mainfont bold]
1243 + -font [concat $font_ui bold]
1244 text $w.m.t \
1245 -background white -borderwidth 1 \
1246 -relief sunken \
1247 -width 80 -height 10 \
1248 - -font $difffont \
1248 + -font $font_diff \
1249 -yscrollcommand [list $w.m.sby set]
1250 label $w.m.l2 \
1251 -text {You must correct the above errors before committing.} \
1252 -anchor w \
1253 -justify left \
1254 - -font [concat $mainfont bold]
1254 + -font [concat $font_ui bold]
1255 scrollbar $w.m.sby -command [list $w.m.t yview]
1256 pack $w.m.l1 -side top -fill x
1257 pack $w.m.l2 -side bottom -fill x
@@ -1264,7 +1264,7 @@ proc hook_failed_popup {hook msg} {
1264
1265 button $w.ok -text OK \
1266 -width 15 \
1267 - -font $mainfont \
1267 + -font $font_ui \
1268 -command "destroy $w"
1269 pack $w.ok -side bottom
1270
@@ -1287,7 +1287,7 @@ proc new_console {short_title long_title} {
1287
1288 proc console_init {w} {
1289 global console_cr console_data
1290 - global gitdir appname mainfont difffont
1290 + global gitdir appname font_ui font_diff
1291
1292 set console_cr($w) 1.0
1293 toplevel $w
@@ -1295,17 +1295,17 @@ proc console_init {w} {
1295 label $w.m.l1 -text "[lindex $console_data($w) 1]:" \
1296 -anchor w \
1297 -justify left \
1298 - -font [concat $mainfont bold]
1298 + -font [concat $font_ui bold]
1299 text $w.m.t \
1300 -background white -borderwidth 1 \
1301 -relief sunken \
1302 -width 80 -height 10 \
1303 - -font $difffont \
1303 + -font $font_diff \
1304 -state disabled \
1305 -yscrollcommand [list $w.m.sby set]
1306 label $w.m.s -anchor w \
1307 -justify left \
1308 - -font [concat $mainfont bold]
1308 + -font [concat $font_ui bold]
1309 scrollbar $w.m.sby -command [list $w.m.t yview]
1310 pack $w.m.l1 -side top -fill x
1311 pack $w.m.s -side bottom -fill x
@@ -1315,7 +1315,7 @@ proc console_init {w} {
1315
1316 button $w.ok -text {Running...} \
1317 -width 15 \
1318 - -font $mainfont \
1318 + -font $font_ui \
1319 -state disabled \
1320 -command "destroy $w"
1321 pack $w.ok -side bottom
@@ -1548,8 +1548,8 @@ proc unclick {w x y} {
1548 ##
1549 ## ui init
1550
1551 -set mainfont {Helvetica 10}
1552 -set difffont {Courier 10}
1551 +set font_ui {Helvetica 10}
1552 +set font_diff {Courier 10}
1553 set maincursor [. cget -cursor]
1554
1555 switch -glob -- "$tcl_platform(platform),$tcl_platform(os)" {
@@ -1573,14 +1573,14 @@ menu .mbar -tearoff 0
1573 menu .mbar.project
1574 .mbar.project add command -label Visualize \
1575 -command do_gitk \
1576 - -font $mainfont
1576 + -font $font_ui
1577 .mbar.project add command -label {Repack Database} \
1578 -command do_repack \
1579 - -font $mainfont
1579 + -font $font_ui
1580 .mbar.project add command -label Quit \
1581 -command do_quit \
1582 -accelerator $M1T-Q \
1583 - -font $mainfont
1583 + -font $font_ui
1584
1585 # -- Edit Menu
1586 #
@@ -1588,61 +1588,61 @@ menu .mbar.edit
1588 .mbar.edit add command -label Undo \
1589 -command {catch {[focus] edit undo}} \
1590 -accelerator $M1T-Z \
1591 - -font $mainfont
1591 + -font $font_ui
1592 .mbar.edit add command -label Redo \
1593 -command {catch {[focus] edit redo}} \
1594 -accelerator $M1T-Y \
1595 - -font $mainfont
1595 + -font $font_ui
1596 .mbar.edit add separator
1597 .mbar.edit add command -label Cut \
1598 -command {catch {tk_textCut [focus]}} \
1599 -accelerator $M1T-X \
1600 - -font $mainfont
1600 + -font $font_ui
1601 .mbar.edit add command -label Copy \
1602 -command {catch {tk_textCopy [focus]}} \
1603 -accelerator $M1T-C \
1604 - -font $mainfont
1604 + -font $font_ui
1605 .mbar.edit add command -label Paste \
1606 -command {catch {tk_textPaste [focus]; [focus] see insert}} \
1607 -accelerator $M1T-V \
1608 - -font $mainfont
1608 + -font $font_ui
1609 .mbar.edit add command -label Delete \
1610 -command {catch {[focus] delete sel.first sel.last}} \
1611 -accelerator Del \
1612 - -font $mainfont
1612 + -font $font_ui
1613 .mbar.edit add separator
1614 .mbar.edit add command -label {Select All} \
1615 -command {catch {[focus] tag add sel 0.0 end}} \
1616 -accelerator $M1T-A \
1617 - -font $mainfont
1617 + -font $font_ui
1618
1619 # -- Commit Menu
1620 menu .mbar.commit
1621 .mbar.commit add command -label Rescan \
1622 -command do_rescan \
1623 -accelerator F5 \
1624 - -font $mainfont
1624 + -font $font_ui
1625 lappend disable_on_lock \
1626 [list .mbar.commit entryconf [.mbar.commit index last] -state]
1627 .mbar.commit add command -label {Amend Last Commit} \
1628 -command do_amend_last \
1629 - -font $mainfont
1629 + -font $font_ui
1630 lappend disable_on_lock \
1631 [list .mbar.commit entryconf [.mbar.commit index last] -state]
1632 .mbar.commit add command -label {Include All Files} \
1633 -command do_include_all \
1634 -accelerator $M1T-I \
1635 - -font $mainfont
1635 + -font $font_ui
1636 lappend disable_on_lock \
1637 [list .mbar.commit entryconf [.mbar.commit index last] -state]
1638 .mbar.commit add command -label {Sign Off} \
1639 -command do_signoff \
1640 -accelerator $M1T-S \
1641 - -font $mainfont
1641 + -font $font_ui
1642 .mbar.commit add command -label Commit \
1643 -command do_commit \
1644 -accelerator $M1T-Return \
1645 - -font $mainfont
1645 + -font $font_ui
1646 lappend disable_on_lock \
1647 [list .mbar.commit entryconf [.mbar.commit index last] -state]
1648
@@ -1673,10 +1673,10 @@ pack .vpane -anchor n -side top -fill both -expand 1
1673 frame .vpane.files.index -height 100 -width 400
1674 label .vpane.files.index.title -text {Modified Files} \
1675 -background green \
1676 - -font $mainfont
1676 + -font $font_ui
1677 text $ui_index -background white -borderwidth 0 \
1678 -width 40 -height 10 \
1679 - -font $mainfont \
1679 + -font $font_ui \
1680 -yscrollcommand {.vpane.files.index.sb set} \
1681 -cursor $maincursor \
1682 -state disabled
@@ -1690,10 +1690,10 @@ pack $ui_index -side left -fill both -expand 1
1690 frame .vpane.files.other -height 100 -width 100
1691 label .vpane.files.other.title -text {Untracked Files} \
1692 -background red \
1693 - -font $mainfont
1693 + -font $font_ui
1694 text $ui_other -background white -borderwidth 0 \
1695 -width 40 -height 10 \
1696 - -font $mainfont \
1696 + -font $font_ui \
1697 -yscrollcommand {.vpane.files.other.sb set} \
1698 -cursor $maincursor \
1699 -state disabled
@@ -1703,8 +1703,8 @@ pack .vpane.files.other.sb -side right -fill y
1703 pack $ui_other -side left -fill both -expand 1
1704 .vpane.files add .vpane.files.other -sticky nsew
1705
1706 -$ui_index tag conf in_diff -font [concat $mainfont bold]
1707 -$ui_other tag conf in_diff -font [concat $mainfont bold]
1706 +$ui_index tag conf in_diff -font [concat $font_ui bold]
1707 +$ui_other tag conf in_diff -font [concat $font_ui bold]
1708
1709 # -- Diff and Commit Area
1710 frame .vpane.lower -height 400 -width 400
@@ -1719,36 +1719,36 @@ frame .vpane.lower.commarea.buttons
1719 label .vpane.lower.commarea.buttons.l -text {} \
1720 -anchor w \
1721 -justify left \
1722 - -font $mainfont
1722 + -font $font_ui
1723 pack .vpane.lower.commarea.buttons.l -side top -fill x
1724 pack .vpane.lower.commarea.buttons -side left -fill y
1725
1726 button .vpane.lower.commarea.buttons.rescan -text {Rescan} \
1727 -command do_rescan \
1728 - -font $mainfont
1728 + -font $font_ui
1729 pack .vpane.lower.commarea.buttons.rescan -side top -fill x
1730 lappend disable_on_lock {.vpane.lower.commarea.buttons.rescan conf -state}
1731
1732 button .vpane.lower.commarea.buttons.amend -text {Amend Last} \
1733 -command do_amend_last \
1734 - -font $mainfont
1734 + -font $font_ui
1735 pack .vpane.lower.commarea.buttons.amend -side top -fill x
1736 lappend disable_on_lock {.vpane.lower.commarea.buttons.amend conf -state}
1737
1738 button .vpane.lower.commarea.buttons.incall -text {Include All} \
1739 -command do_include_all \
1740 - -font $mainfont
1740 + -font $font_ui
1741 pack .vpane.lower.commarea.buttons.incall -side top -fill x
1742 lappend disable_on_lock {.vpane.lower.commarea.buttons.incall conf -state}
1743
1744 button .vpane.lower.commarea.buttons.signoff -text {Sign Off} \
1745 -command do_signoff \
1746 - -font $mainfont
1746 + -font $font_ui
1747 pack .vpane.lower.commarea.buttons.signoff -side top -fill x
1748
1749 button .vpane.lower.commarea.buttons.commit -text {Commit} \
1750 -command do_commit \
1751 - -font $mainfont
1751 + -font $font_ui
1752 pack .vpane.lower.commarea.buttons.commit -side top -fill x
1753 lappend disable_on_lock {.vpane.lower.commarea.buttons.commit conf -state}
1754
@@ -1759,7 +1759,7 @@ set ui_coml .vpane.lower.commarea.buffer.l
1759 label $ui_coml -text {Commit Message:} \
1760 -anchor w \
1761 -justify left \
1762 - -font $mainfont
1762 + -font $font_ui
1763 trace add variable commit_type write {uplevel #0 {
1764 switch -glob $commit_type \
1765 initial {$ui_coml conf -text {Initial Commit Message:}} \
@@ -1773,7 +1773,7 @@ text $ui_comm -background white -borderwidth 1 \
1773 -autoseparators true \
1774 -relief sunken \
1775 -width 75 -height 9 -wrap none \
1776 - -font $difffont \
1776 + -font $font_diff \
1777 -yscrollcommand {.vpane.lower.commarea.buffer.sby set} \
1778 -cursor $maincursor
1779 scrollbar .vpane.lower.commarea.buffer.sby -command [list $ui_comm yview]
@@ -1788,21 +1788,21 @@ set ui_fstatus_value {}
1788 frame .vpane.lower.diff.header -background orange
1789 label .vpane.lower.diff.header.l1 -text {File:} \
1790 -background orange \
1791 - -font $mainfont
1791 + -font $font_ui
1792 label .vpane.lower.diff.header.l2 -textvariable ui_fname_value \
1793 -background orange \
1794 -anchor w \
1795 -justify left \
1796 - -font $mainfont
1796 + -font $font_ui
1797 label .vpane.lower.diff.header.l3 -text {Status:} \
1798 -background orange \
1799 - -font $mainfont
1799 + -font $font_ui
1800 label .vpane.lower.diff.header.l4 -textvariable ui_fstatus_value \
1801 -background orange \
1802 -width $max_status_desc \
1803 -anchor w \
1804 -justify left \
1805 - -font $mainfont
1805 + -font $font_ui
1806 pack .vpane.lower.diff.header.l1 -side left
1807 pack .vpane.lower.diff.header.l2 -side left -fill x
1808 pack .vpane.lower.diff.header.l4 -side right
@@ -1813,7 +1813,7 @@ frame .vpane.lower.diff.body
1813 set ui_diff .vpane.lower.diff.body.t
1814 text $ui_diff -background white -borderwidth 0 \
1815 -width 80 -height 15 -wrap none \
1816 - -font $difffont \
1816 + -font $font_diff \
1817 -xscrollcommand {.vpane.lower.diff.body.sbx set} \
1818 -yscrollcommand {.vpane.lower.diff.body.sby set} \
1819 -cursor $maincursor \
@@ -1830,10 +1830,10 @@ pack .vpane.lower.diff.body -side bottom -fill both -expand 1
1830
1831 $ui_diff tag conf dm -foreground red
1832 $ui_diff tag conf dp -foreground blue
1833 -$ui_diff tag conf da -font [concat $difffont bold]
1833 +$ui_diff tag conf da -font [concat $font_diff bold]
1834 $ui_diff tag conf di -foreground "#00a000"
1835 $ui_diff tag conf dni -foreground "#a000a0"
1836 -$ui_diff tag conf bold -font [concat $difffont bold]
1836 +$ui_diff tag conf bold -font [concat $font_diff bold]
1837
1838 # -- Status Bar
1839 set ui_status_value {Initializing...}
@@ -1842,7 +1842,7 @@ label .status -textvariable ui_status_value \
1842 -justify left \
1843 -borderwidth 1 \
1844 -relief sunken \
1845 - -font $mainfont
1845 + -font $font_ui
1846 pack .status -anchor w -side bottom -fill x
1847
1848 # -- Load geometry