summaryrefslogtreecommitdiff
path: root/git-gui
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2006-11-07 02:57:46 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2006-11-07 03:05:18 -0500
commit07123f4002efdb881f6ce08c5c4411e17e34e141 (patch)
tree2a1eb096237810b85d923a4161294379dde65aaf /git-gui
parentgit-gui: Correctly handle CR vs. LF within the console of fetch. (diff)
downloadtgif-07123f4002efdb881f6ce08c5c4411e17e34e141.tar.xz
git-gui: Check for fetch or push command failure and denote it.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-xgit-gui37
1 files changed, 25 insertions, 12 deletions
diff --git a/git-gui b/git-gui
index 2645cd5d1a..0cd85e3c92 100755
--- a/git-gui
+++ b/git-gui
@@ -1020,8 +1020,12 @@ proc new_console {short_title long_title} {
-font $difffont \
-state disabled \
-yscrollcommand [list $w.m.sby set]
+ label $w.m.s -anchor w \
+ -justify left \
+ -font [concat $mainfont bold]
scrollbar $w.m.sby -command [list $w.m.t yview]
pack $w.m.l1 -side top -fill x
+ pack $w.m.s -side bottom -fill x
pack $w.m.sby -side right -fill y
pack $w.m.t -side left -fill both -expand 1
pack $w.m -side top -fill both -expand 1 -padx 5 -pady 10
@@ -1088,12 +1092,19 @@ proc console_read {w fd} {
$w.m.t conf -state disabled
$w.m.t see end
+ fconfigure $fd -blocking 1
if {[eof $fd]} {
- close $fd
+ if {[catch {close $fd}]} {
+ $w.m.s conf -background red -text {Error: Command Failed}
+ } else {
+ $w.m.s conf -background green -text {Success}
+ }
$w.ok conf -text Close
$w.ok conf -state normal
array unset console_cr $w
+ return
}
+ fconfigure $fd -blocking 0
}
######################################################################
@@ -1468,17 +1479,19 @@ pack .status -anchor w -side bottom -fill x
# -- Key Bindings
bind $ui_comm <$M1B-Key-Return> {do_commit;break}
-bind . <Destroy> do_quit
-bind . <Key-F5> do_rescan
-bind . <$M1B-Key-r> do_rescan
-bind . <$M1B-Key-R> do_rescan
-bind . <$M1B-Key-s> do_signoff
-bind . <$M1B-Key-S> do_signoff
-bind . <$M1B-Key-u> do_checkin_all
-bind . <$M1B-Key-U> do_checkin_all
-bind . <$M1B-Key-Return> do_commit
-bind . <$M1B-Key-q> do_quit
-bind . <$M1B-Key-Q> do_quit
+bind . <Destroy> do_quit
+bind all <Key-F5> do_rescan
+bind all <$M1B-Key-r> do_rescan
+bind all <$M1B-Key-R> do_rescan
+bind . <$M1B-Key-s> do_signoff
+bind . <$M1B-Key-S> do_signoff
+bind . <$M1B-Key-u> do_checkin_all
+bind . <$M1B-Key-U> do_checkin_all
+bind . <$M1B-Key-Return> do_commit
+bind all <$M1B-Key-q> do_quit
+bind all <$M1B-Key-Q> do_quit
+bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
+bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
foreach i [list $ui_index $ui_other] {
bind $i <Button-1> {click %W %x %y 1 %X %Y; break}
bind $i <Button-3> {click %W %x %y 3 %X %Y; break}