@matheusbsbs / matheus-bagliano / commits / 0eab69a4a9
Fork 0

git-gui: Remove the loaded column from the blame viewer

Originally I had placed this loaded column between the line number and the file line data to help users know if a particular line has received annotation data or not yet. This way users would know if the line(s) they were interested in were ready for viewing, or if they still had to wait. It also was an entertaining way for the user to spend their time waiting for git-blame --incremental to compute the complete set of annotations. However it is completely useless now that we show the abbreviated commit SHA-1 and author initials in the leftmost column. That area is empty until we get the annotation data, and as soon as we get it in we display something there, indicating to the user that there is now blame data ready. Further with the tooltips the user is likely to see the data as soon as it comes in, as they are probably not keeping their mouse perfectly still. So I'm removing the field to save screen space for more useful things, like file content. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jun 2, 2007 at 02:38 UTC 0eab69a4a97294c9d6751fad17d1273e28f4a4cd
1 file changed +3 -27
lib/blame.tcl
+3 -27
@@ -14,7 +14,6 @@ field w_back ; # our back button
14 field w_path ; # label showing the current file path
15 field w_line ; # text column: all line numbers
16 field w_cgrp ; # text column: abbreviated commit SHA-1s
17 -field w_load ; # text column: loaded indicator
17 field w_file ; # text column: actual file data
18 field w_cmit ; # pane showing commit message
19 field status ; # text variable bound to status bar
@@ -113,16 +112,6 @@ constructor new {i_commit i_path} {
112 -height 25 \
113 -width 100
114
116 - set w_load $w.file_pane.out.loaded_t
117 - text $w_load \
118 - -background white -borderwidth 0 \
119 - -state disabled \
120 - -wrap none \
121 - -height 40 \
122 - -width 1 \
123 - -font font_diff
124 - $w_load tag conf annotated -background grey
125 -
115 set w_line $w.file_pane.out.linenumber_t
116 text $w_line \
117 -background white -borderwidth 0 \
@@ -165,7 +154,6 @@ constructor new {i_commit i_path} {
154 scrollbar $w.file_pane.out.sby \
155 -orient v \
156 -command [list scrollbar2many [list \
168 - $w_load \
157 $w_line \
158 $w_cgrp \
159 $w_file \
@@ -173,12 +161,11 @@ constructor new {i_commit i_path} {
161 grid \
162 $w_cgrp \
163 $w_line \
176 - $w_load \
164 $w_file \
165 $w.file_pane.out.sby \
166 -sticky nsew
180 - grid conf $w.file_pane.out.sbx -column 3 -sticky we
181 - grid columnconfigure $w.file_pane.out 3 -weight 1
167 + grid conf $w.file_pane.out.sbx -column 2 -sticky we
168 + grid columnconfigure $w.file_pane.out 2 -weight 1
169 grid rowconfigure $w.file_pane.out 0 -weight 1
170
171 set w_cmit $w.file_pane.cm.t
@@ -225,14 +212,12 @@ constructor new {i_commit i_path} {
212
213 foreach i [list \
214 $w_cgrp \
228 - $w_load \
215 $w_line \
216 $w_file] {
217 $i conf -cursor $cursor_ptr
218 $i conf -yscrollcommand \
219 [list many2scrollbar [list \
220 $w_cgrp \
235 - $w_load \
221 $w_line \
222 $w_file \
223 ] yview $w.file_pane.out.sby]
@@ -255,7 +240,6 @@ constructor new {i_commit i_path} {
240
241 foreach i [list \
242 $w_cgrp \
258 - $w_load \
243 $w_line \
244 $w_file \
245 $w_cmit] {
@@ -320,17 +304,14 @@ method _load {} {
304 array unset line_commit
305 array unset line_file
306
323 - $w_load conf -state normal
307 $w_cgrp conf -state normal
308 $w_line conf -state normal
309 $w_file conf -state normal
310
328 - $w_load delete 0.0 end
311 $w_cgrp delete 0.0 end
312 $w_line delete 0.0 end
313 $w_file delete 0.0 end
314
333 - $w_load conf -state disabled
315 $w_cgrp conf -state disabled
316 $w_line conf -state disabled
317 $w_file conf -state disabled
@@ -415,7 +396,6 @@ method _read_file {fd} {
396 return
397 }
398
418 - $w_load conf -state normal
399 $w_cgrp conf -state normal
400 $w_line conf -state normal
401 $w_file conf -state normal
@@ -424,7 +404,6 @@ method _read_file {fd} {
404 incr total_lines
405
406 if {$total_lines > 1} {
427 - $w_load insert end "\n"
407 $w_cgrp insert end "\n"
408 $w_line insert end "\n"
409 $w_file insert end "\n"
@@ -433,7 +412,6 @@ method _read_file {fd} {
412 $w_line insert end "$total_lines" linenumber
413 $w_file insert end "$line"
414 }
436 - $w_load conf -state disabled
415 $w_cgrp conf -state disabled
416 $w_line conf -state disabled
417 $w_file conf -state disabled
@@ -535,9 +513,7 @@ method _read_blame {fd} {
513
514 while {$n > 0} {
515 set lno_e "$lno.0 lineend + 1c"
538 - if {[catch {set g g$line_commit($lno)}]} {
539 - $w_load tag add annotated $lno.0 $lno_e
540 - } else {
516 + if {![catch {set g g$line_commit($lno)}]} {
517 $w_cgrp tag remove g$g $lno.0 $lno_e
518 $w_line tag remove g$g $lno.0 $lno_e
519 $w_file tag remove g$g $lno.0 $lno_e