From: Alexander Gavrilov Date: Fri, 3 Oct 2008 07:36:54 +0000 (+0400) Subject: git-gui: Fix the blame viewer destroy handler. X-Git-Tag: v1.6.1-rc1~3^2~22 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c91cb5d0dd06aa5574234a3d651098393adb4fa;p=git.git git-gui: Fix the blame viewer destroy handler. It did not delete the object, which is not very good. Also, destroy may be fired up for subwindows, so we should check %W. Signed-off-by: Alexander Gavrilov Signed-off-by: Shawn O. Pearce --- diff --git a/lib/blame.tcl b/lib/blame.tcl index a45784c05..765d08c00 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -377,11 +377,18 @@ constructor new {i_commit i_path i_jump} { "if {{$w.file_pane} eq {%W}} {[cb _resize %h]}" wm protocol $top WM_DELETE_WINDOW "destroy $top" - bind $top [cb _kill] + bind $top [cb _handle_destroy %W] _load $this $i_jump } +method _handle_destroy {win} { + if {$win eq $w} { + _kill $this + delete_this + } +} + method _kill {} { if {$current_fd ne {}} { kill_file_process $current_fd