aboutsummaryrefslogtreecommitdiff
path: root/git-gui/lib/blame.tcl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-13 16:48:24 -0800
committerJunio C Hamano <gitster@pobox.com>2011-12-13 16:48:24 -0800
commit73c6b3575bc638b7096ec913bd91193707e2265d (patch)
tree385a31f761e2cad5c25531f218c10f3c29c62afa /git-gui/lib/blame.tcl
parent57526fde5df201a99afa6d122c3266b3a1c5673a (diff)
parent942e6baa92846e5628752c65a22bc4957d8de4d0 (diff)
downloadgit-73c6b3575bc638b7096ec913bd91193707e2265d.tar.gz
git-73c6b3575bc638b7096ec913bd91193707e2265d.tar.xz
Merge branch 'master' of git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui: (28 commits) git-gui 0.16 git-gui: handle shell script text filters when loading for blame. git-gui: Set both 16x16 and 32x32 icons on X to pacify Xming. git-gui: added config gui.gcwarning to disable the gc hint message git-gui: set whitespace warnings appropriate to this project git-gui: don't warn for detached head when rebasing git-gui: make config gui.warndetachedcommit a boolean git-gui: add config value gui.diffopts for passing additional diff options git-gui: sort the numeric ansi codes git-gui: support underline style when parsing diff output git-gui: fix spelling error in sshkey.tcl git-gui: include the file path in guitools confirmation dialog git-gui: span widgets over the full file output area in the blame view git-gui: use a tristate to control the case mode in the searchbar git-gui: set suitable extended window manager hints. git-gui: fix display of path in browser title git-gui: enable the smart case sensitive search only if gui.search.smartcase is true git-gui: catch invalid or complete regular expressions and treat as no match. git-gui: theme the search and line-number entry fields on blame screen git-gui: include the number of untracked files to stage when asking the user ...
Diffstat (limited to 'git-gui/lib/blame.tcl')
-rw-r--r--git-gui/lib/blame.tcl29
1 files changed, 15 insertions, 14 deletions
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 691941e95..324f7744c 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -219,7 +219,8 @@ constructor new {i_commit i_path i_jump} {
eval grid $w_columns $w.file_pane.out.sby -sticky nsew
grid conf \
$w.file_pane.out.sbx \
- -column [expr {[llength $w_columns] - 1}] \
+ -column 0 \
+ -columnspan [expr {[llength $w_columns] + 1}] \
-sticky we
grid columnconfigure \
$w.file_pane.out \
@@ -229,12 +230,14 @@ constructor new {i_commit i_path i_jump} {
set finder [::searchbar::new \
$w.file_pane.out.ff $w_file \
- -column [expr {[llength $w_columns] - 1}] \
+ -column 0 \
+ -columnspan [expr {[llength $w_columns] + 1}] \
]
set gotoline [::linebar::new \
$w.file_pane.out.lf $w_file \
- -column [expr {[llength $w_columns] - 1}] \
+ -column 0 \
+ -columnspan [expr {[llength $w_columns] + 1}] \
]
set w_cviewer $w.file_pane.cm.t
@@ -473,14 +476,7 @@ method _load {jump} {
}
if {$commit eq {}} {
if {$do_textconv ne 0} {
- # Run textconv with sh -c "..." to allow it to
- # contain command + arguments. On windows, just
- # call the filter command.
- if {![file executable [shellpath]]} {
- set fd [open |[linsert $textconv end $path] r]
- } else {
- set fd [open |[list [shellpath] -c "$textconv \"\$0\"" $path] r]
- }
+ set fd [open_cmd_pipe $textconv $path]
} else {
set fd [open $path r]
}
@@ -572,7 +568,11 @@ method _read_file {fd jump} {
foreach i $w_columns {$i conf -state disabled}
if {[eof $fd]} {
- close $fd
+ fconfigure $fd -blocking 1; # enable error reporting on close
+ if {[catch {close $fd} err]} {
+ tk_messageBox -icon error -title [mc Error] \
+ -message $err
+ }
# If we don't force Tk to update the widgets *right now*
# none of our jump commands will cause a change in the UI.
@@ -1062,7 +1062,7 @@ method _gitkcommit {} {
set radius [get_config gui.blamehistoryctx]
set cmdline [list --select-commit=$cmit]
- if {$radius > 0} {
+ if {$radius > 0} {
set author_time {}
set committer_time {}
@@ -1170,7 +1170,7 @@ method _read_diff_load_commit {fd cparent new_path tline} {
}
if {[eof $fd]} {
- close $fd;
+ close $fd
set current_fd {}
_load_new_commit $this \
@@ -1201,6 +1201,7 @@ method _open_tooltip {cur_w} {
_hide_tooltip $this
set tooltip_wm [toplevel $cur_w.tooltip -borderwidth 1]
+ catch {wm attributes $tooltip_wm -type tooltip}
wm overrideredirect $tooltip_wm 1
wm transient $tooltip_wm [winfo toplevel $cur_w]
set tooltip_t $tooltip_wm.label