foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
catch {unset $v}
}
- set refd [open [list | git ls-remote [gitdir]] r]
+ set refd [open [list | git show-ref] r]
while {0 <= [set n [gets $refd line]]} {
- if {![regexp {^([0-9a-f]{40}) refs/([^^]*)$} $line \
+ if {![regexp {^([0-9a-f]{40}) refs/([^^]*)$} $line \
match id path]} {
continue
}
panedwindow .ctop -orient vertical
# possibly use assumed geometry
- if {![info exists geometry(topheight)]} {
+ if {![info exists geometry(pwsash0)]} {
set geometry(topheight) [expr {15 * $linespc}]
set geometry(topwidth) [expr {80 * $charspc}]
set geometry(botheight) [expr {15 * $linespc}]
set geometry(botwidth) [expr {50 * $charspc}]
- set geometry(canv) [expr {40 * $charspc}]
- set geometry(canv2) [expr {20 * $charspc}]
- set geometry(canv3) [expr {20 * $charspc}]
+ set geometry(pwsash0) "[expr {40 * $charspc}] 2"
+ set geometry(pwsash1) "[expr {60 * $charspc}] 2"
}
# the upper half will have a paned window, a scroll bar to the right, and some stuff below
# create three canvases
set cscroll .tf.histframe.csb
set canv .tf.histframe.pwclist.canv
- canvas $canv -width $geometry(canv) \
+ canvas $canv \
-background $bgcolor -bd 0 \
-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
.tf.histframe.pwclist add $canv
set canv2 .tf.histframe.pwclist.canv2
- canvas $canv2 -width $geometry(canv2) \
+ canvas $canv2 \
-background $bgcolor -bd 0 -yscrollincr $linespc
.tf.histframe.pwclist add $canv2
set canv3 .tf.histframe.pwclist.canv3
- canvas $canv3 -width $geometry(canv3) \
+ canvas $canv3 \
-background $bgcolor -bd 0 -yscrollincr $linespc
.tf.histframe.pwclist add $canv3
+ eval .tf.histframe.pwclist sash place 0 $geometry(pwsash0)
+ eval .tf.histframe.pwclist sash place 1 $geometry(pwsash1)
# a scroll bar to rule them
scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0
pack .tf.bar -in .tf -side bottom -fill x
pack .tf.histframe -fill both -side top -expand 1
.ctop add .tf
+ .ctop paneconfigure .tf -height $geometry(topheight)
+ .ctop paneconfigure .tf -width $geometry(topwidth)
# now build up the bottom
panedwindow .pwbottom -orient horizontal
$ctext tag conf found -back yellow
.pwbottom add .bleft
+ .pwbottom paneconfigure .bleft -width $geometry(botwidth)
# lower right
frame .bright
bind . <Control-KP_Add> {incrfont 1}
bind . <Control-minus> {incrfont -1}
bind . <Control-KP_Subtract> {incrfont -1}
- bind . <Destroy> {savestuff %W}
+ wm protocol . WM_DELETE_WINDOW doquit
bind . <Button-1> "click %W"
bind $fstring <Key-Return> dofind
bind $sha1entry <Key-Return> gotocommit
puts $f [list set colors $colors]
puts $f [list set diffcolors $diffcolors]
- puts $f "set geometry(main) [winfo geometry .]"
+ puts $f "set geometry(main) [wm geometry .]"
puts $f "set geometry(topwidth) [winfo width .tf]"
puts $f "set geometry(topheight) [winfo height .tf]"
- puts $f "set geometry(canv) [expr {[winfo width $canv]-0}]"
- puts $f "set geometry(canv2) [expr {[winfo width $canv2]-0}]"
- puts $f "set geometry(canv3) [expr {[winfo width $canv3]-0}]"
+ puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\""
+ puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sash coord 1]\""
puts $f "set geometry(botwidth) [winfo width .bleft]"
puts $f "set geometry(botheight) [winfo height .bleft]"
proc doquit {} {
global stopped
set stopped 100
+ savestuff .
destroy .
}