summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a950e9)
raw | patch | inline | side by side (parent: 3a950e9)
author | Paul Mackerras <paulus@samba.org> | |
Thu, 19 Apr 2007 01:39:12 +0000 (11:39 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Thu, 19 Apr 2007 01:39:12 +0000 (11:39 +1000) |
This adds a set of radiobuttons that select between displaying the full
diff (both - and + lines), the old file (suppressing the + lines) and the
new file (suppressing the - lines) in the diff display window.
Signed-off-by: Paul Mackerras <paulus@samba.org>
diff (both - and + lines), the old file (suppressing the + lines) and the
new file (suppressing the - lines) in the diff display window.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index b1c65d76806d1c26da0759569e6b83982a414bf1..a57e84cef7143839af954e2aa1fcb3d633befe41 100755 (executable)
--- a/gitk
+++ b/gitk
frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
}
frame .bleft.top
+ frame .bleft.mid
button .bleft.top.search -text "Search" -command dosearch \
-font $uifont
lappend entries $sstring
trace add variable searchstring write incrsearch
pack $sstring -side left -expand 1 -fill x
+ radiobutton .bleft.mid.diff -text "Diff" \
+ -command changediffdisp -variable diffelide -value {0 0}
+ radiobutton .bleft.mid.old -text "Old version" \
+ -command changediffdisp -variable diffelide -value {0 1}
+ radiobutton .bleft.mid.new -text "New version" \
+ -command changediffdisp -variable diffelide -value {1 0}
+ pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
set ctext .bleft.ctext
text $ctext -background $bgcolor -foreground $fgcolor \
-state disabled -font $textfont \
-yscrollcommand scrolltext -wrap none
scrollbar .bleft.sb -command "$ctext yview"
pack .bleft.top -side top -fill x
+ pack .bleft.mid -side top -fill x
pack .bleft.sb -side right -fill y
pack $ctext -side left -fill both -expand 1
lappend bglist $ctext
}
}
+proc changediffdisp {} {
+ global ctext diffelide
+
+ $ctext tag conf d0 -elide [lindex $diffelide 0]
+ $ctext tag conf d1 -elide [lindex $diffelide 1]
+}
+
proc prevfile {} {
global difffilestart ctext
set prev [lindex $difffilestart 0]
set searchdirn -forwards
set boldrows {}
set boldnamerows {}
+set diffelide {0 0}
set optim_delay 16