summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a1c3feb)
raw | patch | inline | side by side (parent: a1c3feb)
author | Alexander Gavrilov <angavrilov@gmail.com> | |
Wed, 17 Sep 2008 21:07:36 +0000 (01:07 +0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 24 Sep 2008 19:48:32 +0000 (12:48 -0700) |
Allow dynamically changing the encoding from the blame
viewer as well.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
viewer as well.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/blame.tcl | patch | blob | history |
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 84d55b58287db4d62488c10b748424e1a896b8e4..eb61374d2db79a1199d455dfdda85e2d063bf1f6 100644 (file)
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
$w.ctxm add command \
-label [mc "Copy Commit"] \
-command [cb _copycommit]
+ $w.ctxm add separator
+ menu $w.ctxm.enc
+ build_encoding_menu $w.ctxm.enc [cb _setencoding]
+ $w.ctxm add cascade \
+ -label [mc "Encoding"] \
+ -menu $w.ctxm.enc
$w.ctxm add command \
-label [mc "Do Full Copy Detection"] \
-command [cb _fullcopyblame]
+ $w.ctxm add separator
$w.ctxm add command \
-label [mc "Show History Context"] \
-command [cb _gitkcommit]
_showcommit $this $cur_w $lno
}
+method _setencoding {enc} {
+ force_path_encoding $path $enc
+ _load $this [list \
+ $highlight_column \
+ $highlight_line \
+ [lindex [$w_file xview] 0] \
+ [lindex [$w_file yview] 0] \
+ ]
+}
+
method _load_commit {cur_w cur_d pos} {
upvar #0 $cur_d line_data
set lno [lindex [split [$cur_w index $pos] .] 0]