Skip to content

Commit 27c1dbe

Browse files
committed
Merge branch 'maint'
* maint: (46 commits) git-gui: Changed blame header bar background to match main window git-gui: Favor the original annotations over the recent ones git-gui: Improve our labeling of blame annotation types git-gui: Use three colors for the blame viewer background git-gui: Jump to original line in blame viewer git-gui: Display both commits in our tooltips git-gui: Run blame twice on the same file and display both outputs git-gui: Display the "Loading annotation..." message in italic git-gui: Rename fields in blame viewer to better descriptions git-gui: Label the uncommitted blame history entry git-gui: Switch internal blame structure to Tcl lists git-gui: Cleanup redundant column management in blame viewer git-gui: Better document our blame variables git-gui: Remove unused commit_list from blame viewer git-gui: Automatically expand the line number column as needed git-gui: Make the line number column slightly wider in blame git-gui: Use lighter colors in blame view git-gui: Remove unnecessary space between columns in blame viewer git-gui: Remove the loaded column from the blame viewer git-gui: Clip the commit summaries in the blame history menu ...
2 parents cd030c3 + c288a2f commit 27c1dbe

File tree

5 files changed

+825
-219
lines changed

5 files changed

+825
-219
lines changed

git-gui/git-gui.sh

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@ You should have received a copy of the GNU General Public License
2020
along with this program; if not, write to the Free Software
2121
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA}
2222

23+
######################################################################
24+
##
25+
## Tcl/Tk sanity check
26+
27+
if {[catch {package require Tcl 8.4} err]
28+
|| [catch {package require Tk 8.4} err]
29+
} {
30+
catch {wm withdraw .}
31+
tk_messageBox \
32+
-icon error \
33+
-type ok \
34+
-title "git-gui: fatal error" \
35+
-message $err
36+
exit 1
37+
}
38+
2339
######################################################################
2440
##
2541
## configure our library
@@ -1008,6 +1024,7 @@ proc incr_font_size {font {amt 1}} {
10081024
incr sz $amt
10091025
font configure $font -size $sz
10101026
font configure ${font}bold -size $sz
1027+
font configure ${font}italic -size $sz
10111028
}
10121029

10131030
######################################################################
@@ -1200,12 +1217,14 @@ catch {
12001217
destroy .dummy
12011218
}
12021219

1220+
font create font_uiitalic
12031221
font create font_uibold
12041222
font create font_diffbold
1223+
font create font_diffitalic
12051224

12061225
foreach class {Button Checkbutton Entry Label
12071226
Labelframe Listbox Menu Message
1208-
Radiobutton Text} {
1227+
Radiobutton Spinbox Text} {
12091228
option add *$class.font font_ui
12101229
}
12111230
unset class
@@ -1233,8 +1252,10 @@ proc apply_config {} {
12331252
}
12341253
foreach {cn cv} [font configure $font] {
12351254
font configure ${font}bold $cn $cv
1255+
font configure ${font}italic $cn $cv
12361256
}
12371257
font configure ${font}bold -weight bold
1258+
font configure ${font}italic -slant italic
12381259
}
12391260
}
12401261

@@ -1600,7 +1621,7 @@ unset browser doc_path doc_url
16001621

16011622
# -- Standard bindings
16021623
#
1603-
bind . <Destroy> do_quit
1624+
bind . <Destroy> {if {{%W} eq {.}} do_quit}
16041625
bind all <$M1B-Key-q> do_quit
16051626
bind all <$M1B-Key-Q> do_quit
16061627
bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
@@ -1715,7 +1736,7 @@ pack .vpane -anchor n -side top -fill both -expand 1
17151736
#
17161737
frame .vpane.files.index -height 100 -width 200
17171738
label .vpane.files.index.title -text {Staged Changes (Will Be Committed)} \
1718-
-background green
1739+
-background lightgreen
17191740
text $ui_index -background white -borderwidth 0 \
17201741
-width 20 -height 10 \
17211742
-wrap none \
@@ -1735,7 +1756,7 @@ pack $ui_index -side left -fill both -expand 1
17351756
#
17361757
frame .vpane.files.workdir -height 100 -width 200
17371758
label .vpane.files.workdir.title -text {Unstaged Changes (Will Not Be Committed)} \
1738-
-background red
1759+
-background lightsalmon
17391760
text $ui_workdir -background white -borderwidth 0 \
17401761
-width 20 -height 10 \
17411762
-wrap none \
@@ -1752,10 +1773,8 @@ pack $ui_workdir -side left -fill both -expand 1
17521773
.vpane.files add .vpane.files.workdir -sticky nsew
17531774

17541775
foreach i [list $ui_index $ui_workdir] {
1755-
$i tag conf in_diff -font font_uibold
1756-
$i tag conf in_sel \
1757-
-background [$i cget -foreground] \
1758-
-foreground [$i cget -background]
1776+
$i tag conf in_diff -background lightgray
1777+
$i tag conf in_sel -background lightgray
17591778
}
17601779
unset i
17611780

@@ -1913,18 +1932,18 @@ proc trace_current_diff_path {varname args} {
19131932
}
19141933
trace add variable current_diff_path write trace_current_diff_path
19151934

1916-
frame .vpane.lower.diff.header -background orange
1935+
frame .vpane.lower.diff.header -background gold
19171936
label .vpane.lower.diff.header.status \
1918-
-background orange \
1937+
-background gold \
19191938
-width $max_status_desc \
19201939
-anchor w \
19211940
-justify left
19221941
label .vpane.lower.diff.header.file \
1923-
-background orange \
1942+
-background gold \
19241943
-anchor w \
19251944
-justify left
19261945
label .vpane.lower.diff.header.path \
1927-
-background orange \
1946+
-background gold \
19281947
-anchor w \
19291948
-justify left
19301949
pack .vpane.lower.diff.header.status -side left
@@ -2038,17 +2057,17 @@ lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
20382057
$ctxm add separator
20392058
$ctxm add command \
20402059
-label {Show Less Context} \
2041-
-command {if {$repo_config(gui.diffcontext) >= 2} {
2060+
-command {if {$repo_config(gui.diffcontext) >= 1} {
20422061
incr repo_config(gui.diffcontext) -1
20432062
reshow_diff
20442063
}}
20452064
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
20462065
$ctxm add command \
20472066
-label {Show More Context} \
2048-
-command {
2067+
-command {if {$repo_config(gui.diffcontext) < 99} {
20492068
incr repo_config(gui.diffcontext)
20502069
reshow_diff
2051-
}
2070+
}}
20522071
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
20532072
$ctxm add separator
20542073
$ctxm add command -label {Options...} \

0 commit comments

Comments
 (0)