git-gui: Check for fetch or push command failure and denote it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Nov 7, 2006 at 02:57 UTC
07123f4002efdb881f6ce08c5c4411e17e34e141
1 file changed
+25
-12
git-gui
+25
-12
@@ -1020,8 +1020,12 @@ proc new_console {short_title long_title} {
1020
-font $difffont \
1021
-state disabled \
1022
-yscrollcommand [list $w.m.sby set]
1023
+ label $w.m.s -anchor w \
1024
+ -justify left \
1025
+ -font [concat $mainfont bold]
1026
scrollbar $w.m.sby -command [list $w.m.t yview]
1027
pack $w.m.l1 -side top -fill x
1028
+ pack $w.m.s -side bottom -fill x
1029
pack $w.m.sby -side right -fill y
1030
pack $w.m.t -side left -fill both -expand 1
1031
pack $w.m -side top -fill both -expand 1 -padx 5 -pady 10
@@ -1088,12 +1092,19 @@ proc console_read {w fd} {
1092
$w.m.t conf -state disabled
1093
$w.m.t see end
1094
1095
+ fconfigure $fd -blocking 1
1096
if {[eof $fd]} {
1092
- close $fd
1097
+ if {[catch {close $fd}]} {
1098
+ $w.m.s conf -background red -text {Error: Command Failed}
1099
+ } else {
1100
+ $w.m.s conf -background green -text {Success}
1101
+ }
1102
$w.ok conf -text Close
1103
$w.ok conf -state normal
1104
array unset console_cr $w
1105
+ return
1106
}
1107
+ fconfigure $fd -blocking 0
1108
}
1109
1110
######################################################################
@@ -1468,17 +1479,19 @@ pack .status -anchor w -side bottom -fill x
1479
1480
# -- Key Bindings
1481
bind $ui_comm <$M1B-Key-Return> {do_commit;break}
1471
-bind . <Destroy> do_quit
1472
-bind . <Key-F5> do_rescan
1473
-bind . <$M1B-Key-r> do_rescan
1474
-bind . <$M1B-Key-R> do_rescan
1475
-bind . <$M1B-Key-s> do_signoff
1476
-bind . <$M1B-Key-S> do_signoff
1477
-bind . <$M1B-Key-u> do_checkin_all
1478
-bind . <$M1B-Key-U> do_checkin_all
1479
-bind . <$M1B-Key-Return> do_commit
1480
-bind . <$M1B-Key-q> do_quit
1481
-bind . <$M1B-Key-Q> do_quit
1482
+bind . <Destroy> do_quit
1483
+bind all <Key-F5> do_rescan
1484
+bind all <$M1B-Key-r> do_rescan
1485
+bind all <$M1B-Key-R> do_rescan
1486
+bind . <$M1B-Key-s> do_signoff
1487
+bind . <$M1B-Key-S> do_signoff
1488
+bind . <$M1B-Key-u> do_checkin_all
1489
+bind . <$M1B-Key-U> do_checkin_all
1490
+bind . <$M1B-Key-Return> do_commit
1491
+bind all <$M1B-Key-q> do_quit
1492
+bind all <$M1B-Key-Q> do_quit
1493
+bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
1494
+bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
1495
foreach i [list $ui_index $ui_other] {
1496
bind $i <Button-1> {click %W %x %y 1 %X %Y; break}
1497
bind $i <Button-3> {click %W %x %y 3 %X %Y; break}