@@ -70,7 +70,7 @@ proc repository_state {hdvar ctvar} {
70
70
proc update_status {{final Ready.}} {
71
71
global HEAD PARENT commit_type
72
72
global ui_index ui_other ui_status_value ui_comm
73
- global status_active file_states status_start
73
+ global status_active file_states
74
74
75
75
if {$status_active || ![lock_index read]} return
76
76
@@ -84,7 +84,6 @@ proc update_status {{final Ready.}} {
84
84
set commit_type $new_type
85
85
}
86
86
87
- set status_start [clock seconds]
88
87
array unset file_states
89
88
foreach w [list $ui_index $ui_other ] {
90
89
$w conf -state normal
@@ -231,7 +230,7 @@ proc read_ls_others {fd final} {
231
230
}
232
231
233
232
proc status_eof {fd buf final} {
234
- global status_active status_start $buf
233
+ global status_active $buf
235
234
global ui_fname_value ui_status_value file_states
236
235
237
236
if {[eof $fd ]} {
@@ -241,11 +240,7 @@ proc status_eof {fd buf final} {
241
240
if {[incr status_active -1] == 0} {
242
241
unlock_index
243
242
244
- set e1 [clock seconds]
245
243
display_all_files
246
- set e2 [clock seconds]
247
- puts " TIME [ expr $e1 - $status_start ] + [ expr $e2 - $e1 ] = [ expr $e2 - $status_start ] "
248
-
249
244
set ui_status_value $final
250
245
251
246
if {$ui_fname_value != {} && [array names file_states \
@@ -758,10 +753,10 @@ proc display_file {path state} {
758
753
if {$status_active } return
759
754
760
755
set s $file_states($path)
761
- set old_w [mapcol $old_m $path ]
762
- set new_w [mapcol $new_m $path ]
763
756
set new_m [lindex $s 0]
764
- set new_ico [mapicon $new_m $path ]
757
+ set new_w [mapcol $new_m $path ]
758
+ set old_w [mapcol $old_m $path ]
759
+ set new_icon [mapicon $new_m $path ]
765
760
766
761
if {$new_w != $old_w } {
767
762
set lno [bsearch $old_w $path ]
@@ -1498,101 +1493,56 @@ pack $ui_other -side left -fill both -expand 1
1498
1493
$ui_index tag conf in_diff -font [concat $mainfont bold]
1499
1494
$ui_other tag conf in_diff -font [concat $mainfont bold]
1500
1495
1501
- # -- Diff Header
1502
- set ui_fname_value {}
1503
- set ui_fstatus_value {}
1504
- frame .vpane.diff -height 200 -width 400
1505
- frame .vpane.diff.header
1506
- label .vpane.diff.header.l1 -text {File:} -font $mainfont
1507
- label .vpane.diff.header.l2 -textvariable ui_fname_value \
1508
- -anchor w \
1509
- -justify left \
1510
- -font $mainfont
1511
- label .vpane.diff.header.l3 -text {Status:} -font $mainfont
1512
- label .vpane.diff.header.l4 -textvariable ui_fstatus_value \
1513
- -width $max_status_desc \
1514
- -anchor w \
1515
- -justify left \
1516
- -font $mainfont
1517
- pack .vpane.diff.header.l1 -side left
1518
- pack .vpane.diff.header.l2 -side left -fill x
1519
- pack .vpane.diff.header.l4 -side right
1520
- pack .vpane.diff.header.l3 -side right
1521
-
1522
- # -- Diff Body
1523
- frame .vpane.diff.body
1524
- set ui_diff .vpane.diff.body.t
1525
- text $ui_diff -background white -borderwidth 0 \
1526
- -width 80 -height 15 -wrap none \
1527
- -font $difffont \
1528
- -xscrollcommand {.vpane.diff.body.sbx set} \
1529
- -yscrollcommand {.vpane.diff.body.sby set} \
1530
- -cursor $maincursor \
1531
- -state disabled
1532
- scrollbar .vpane.diff.body.sbx -orient horizontal \
1533
- -command [list $ui_diff xview]
1534
- scrollbar .vpane.diff.body.sby -orient vertical \
1535
- -command [list $ui_diff yview]
1536
- pack .vpane.diff.body.sbx -side bottom -fill x
1537
- pack .vpane.diff.body.sby -side right -fill y
1538
- pack $ui_diff -side left -fill both -expand 1
1539
- pack .vpane.diff.header -side top -fill x
1540
- pack .vpane.diff.body -side bottom -fill both -expand 1
1541
- .vpane add .vpane.diff -stick nsew
1542
-
1543
- $ui_diff tag conf dm -foreground red
1544
- $ui_diff tag conf dp -foreground blue
1545
- $ui_diff tag conf da -font [concat $difffont bold]
1546
- $ui_diff tag conf di -foreground " #00a000"
1547
- $ui_diff tag conf dni -foreground " #a000a0"
1548
- $ui_diff tag conf bold -font [concat $difffont bold]
1549
-
1550
- # -- Commit Area
1551
- frame .vpane.commarea -height 170
1552
- .vpane add .vpane.commarea -stick nsew
1496
+ # -- Diff and Commit Area
1497
+ frame .vpane.lower -height 400 -width 400
1498
+ frame .vpane.lower.commarea
1499
+ frame .vpane.lower.diff -relief sunken -borderwidth 1
1500
+ pack .vpane.lower.commarea -side top -fill x
1501
+ pack .vpane.lower.diff -side bottom -fill both -expand 1
1502
+ .vpane add .vpane.lower -stick nsew
1553
1503
1554
1504
# -- Commit Area Buttons
1555
- frame .vpane.commarea.buttons
1556
- label .vpane.commarea.buttons.l -text {} \
1505
+ frame .vpane.lower. commarea.buttons
1506
+ label .vpane.lower. commarea.buttons.l -text {} \
1557
1507
-anchor w \
1558
1508
-justify left \
1559
1509
-font $mainfont
1560
- pack .vpane.commarea.buttons.l -side top -fill x
1561
- pack .vpane.commarea.buttons -side left -fill y
1510
+ pack .vpane.lower. commarea.buttons.l -side top -fill x
1511
+ pack .vpane.lower. commarea.buttons -side left -fill y
1562
1512
1563
- button .vpane.commarea.buttons.rescan -text {Rescan} \
1513
+ button .vpane.lower. commarea.buttons.rescan -text {Rescan} \
1564
1514
-command do_rescan \
1565
1515
-font $mainfont
1566
- pack .vpane.commarea.buttons.rescan -side top -fill x
1567
- lappend disable_on_lock {.vpane.commarea.buttons.rescan conf -state}
1516
+ pack .vpane.lower. commarea.buttons.rescan -side top -fill x
1517
+ lappend disable_on_lock {.vpane.lower. commarea.buttons.rescan conf -state}
1568
1518
1569
- button .vpane.commarea.buttons.amend -text {Amend Last} \
1519
+ button .vpane.lower. commarea.buttons.amend -text {Amend Last} \
1570
1520
-command do_amend_last \
1571
1521
-font $mainfont
1572
- pack .vpane.commarea.buttons.amend -side top -fill x
1573
- lappend disable_on_lock {.vpane.commarea.buttons.amend conf -state}
1522
+ pack .vpane.lower. commarea.buttons.amend -side top -fill x
1523
+ lappend disable_on_lock {.vpane.lower. commarea.buttons.amend conf -state}
1574
1524
1575
- button .vpane.commarea.buttons.ciall -text {Check-in All} \
1525
+ button .vpane.lower. commarea.buttons.ciall -text {Check-in All} \
1576
1526
-command do_checkin_all \
1577
1527
-font $mainfont
1578
- pack .vpane.commarea.buttons.ciall -side top -fill x
1579
- lappend disable_on_lock {.vpane.commarea.buttons.ciall conf -state}
1528
+ pack .vpane.lower. commarea.buttons.ciall -side top -fill x
1529
+ lappend disable_on_lock {.vpane.lower. commarea.buttons.ciall conf -state}
1580
1530
1581
- button .vpane.commarea.buttons.signoff -text {Sign Off} \
1531
+ button .vpane.lower. commarea.buttons.signoff -text {Sign Off} \
1582
1532
-command do_signoff \
1583
1533
-font $mainfont
1584
- pack .vpane.commarea.buttons.signoff -side top -fill x
1534
+ pack .vpane.lower. commarea.buttons.signoff -side top -fill x
1585
1535
1586
- button .vpane.commarea.buttons.commit -text {Commit} \
1536
+ button .vpane.lower. commarea.buttons.commit -text {Commit} \
1587
1537
-command do_commit \
1588
1538
-font $mainfont
1589
- pack .vpane.commarea.buttons.commit -side top -fill x
1590
- lappend disable_on_lock {.vpane.commarea.buttons.commit conf -state}
1539
+ pack .vpane.lower. commarea.buttons.commit -side top -fill x
1540
+ lappend disable_on_lock {.vpane.lower. commarea.buttons.commit conf -state}
1591
1541
1592
1542
# -- Commit Message Buffer
1593
- frame .vpane.commarea.buffer
1594
- set ui_comm .vpane.commarea.buffer.t
1595
- set ui_coml .vpane.commarea.buffer.l
1543
+ frame .vpane.lower. commarea.buffer
1544
+ set ui_comm .vpane.lower. commarea.buffer.t
1545
+ set ui_coml .vpane.lower. commarea.buffer.l
1596
1546
label $ui_coml -text {Commit Message:} \
1597
1547
-anchor w \
1598
1548
-justify left \
@@ -1606,15 +1556,68 @@ trace add variable commit_type write {uplevel #0 {
1606
1556
}}
1607
1557
text $ui_comm -background white -borderwidth 1 \
1608
1558
-relief sunken \
1609
- -width 75 -height 10 -wrap none \
1559
+ -width 75 -height 9 -wrap none \
1610
1560
-font $difffont \
1611
- -yscrollcommand {.vpane.commarea.buffer.sby set} \
1561
+ -yscrollcommand {.vpane.lower. commarea.buffer.sby set} \
1612
1562
-cursor $maincursor
1613
- scrollbar .vpane.commarea.buffer.sby -command [list $ui_comm yview]
1563
+ scrollbar .vpane.lower. commarea.buffer.sby -command [list $ui_comm yview]
1614
1564
pack $ui_coml -side top -fill x
1615
- pack .vpane.commarea.buffer.sby -side right -fill y
1565
+ pack .vpane.lower. commarea.buffer.sby -side right -fill y
1616
1566
pack $ui_comm -side left -fill y
1617
- pack .vpane.commarea.buffer -side left -fill y
1567
+ pack .vpane.lower.commarea.buffer -side left -fill y
1568
+
1569
+ # -- Diff Header
1570
+ set ui_fname_value {}
1571
+ set ui_fstatus_value {}
1572
+ frame .vpane.lower.diff.header -background orange
1573
+ label .vpane.lower.diff.header.l1 -text {File:} \
1574
+ -background orange \
1575
+ -font $mainfont
1576
+ label .vpane.lower.diff.header.l2 -textvariable ui_fname_value \
1577
+ -background orange \
1578
+ -anchor w \
1579
+ -justify left \
1580
+ -font $mainfont
1581
+ label .vpane.lower.diff.header.l3 -text {Status:} \
1582
+ -background orange \
1583
+ -font $mainfont
1584
+ label .vpane.lower.diff.header.l4 -textvariable ui_fstatus_value \
1585
+ -background orange \
1586
+ -width $max_status_desc \
1587
+ -anchor w \
1588
+ -justify left \
1589
+ -font $mainfont
1590
+ pack .vpane.lower.diff.header.l1 -side left
1591
+ pack .vpane.lower.diff.header.l2 -side left -fill x
1592
+ pack .vpane.lower.diff.header.l4 -side right
1593
+ pack .vpane.lower.diff.header.l3 -side right
1594
+
1595
+ # -- Diff Body
1596
+ frame .vpane.lower.diff.body
1597
+ set ui_diff .vpane.lower.diff.body.t
1598
+ text $ui_diff -background white -borderwidth 0 \
1599
+ -width 80 -height 15 -wrap none \
1600
+ -font $difffont \
1601
+ -xscrollcommand {.vpane.lower.diff.body.sbx set} \
1602
+ -yscrollcommand {.vpane.lower.diff.body.sby set} \
1603
+ -cursor $maincursor \
1604
+ -state disabled
1605
+ scrollbar .vpane.lower.diff.body.sbx -orient horizontal \
1606
+ -command [list $ui_diff xview]
1607
+ scrollbar .vpane.lower.diff.body.sby -orient vertical \
1608
+ -command [list $ui_diff yview]
1609
+ pack .vpane.lower.diff.body.sbx -side bottom -fill x
1610
+ pack .vpane.lower.diff.body.sby -side right -fill y
1611
+ pack $ui_diff -side left -fill both -expand 1
1612
+ pack .vpane.lower.diff.header -side top -fill x
1613
+ pack .vpane.lower.diff.body -side bottom -fill both -expand 1
1614
+
1615
+ $ui_diff tag conf dm -foreground red
1616
+ $ui_diff tag conf dp -foreground blue
1617
+ $ui_diff tag conf da -font [concat $difffont bold]
1618
+ $ui_diff tag conf di -foreground " #00a000"
1619
+ $ui_diff tag conf dni -foreground " #a000a0"
1620
+ $ui_diff tag conf bold -font [concat $difffont bold]
1618
1621
1619
1622
# -- Status Bar
1620
1623
set ui_status_value {Initializing...}
0 commit comments