]> asedeno.scripts.mit.edu Git - git.git/blobdiff - lib/error.tcl
git-gui: add a part about format strings in po/README
[git.git] / lib / error.tcl
index 45800d54932bf1367cff81db040d1a14b87a9ab5..75650157e551e34dab650d89f3fa6d25afc91d6a 100644 (file)
@@ -2,7 +2,11 @@
 # Copyright (C) 2006, 2007 Shawn Pearce
 
 proc _error_parent {} {
-       return [grab current .]
+       set p [grab current .]
+       if {$p eq {}} {
+               return .
+       }
+       return $p
 }
 
 proc error_popup {msg} {
@@ -43,7 +47,7 @@ proc info_popup {msg} {
                append title " ([reponame])"
        }
        tk_messageBox \
-               -parent $parent \
+               -parent [_error_parent] \
                -icon info \
                -type ok \
                -title $title \
@@ -76,7 +80,9 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
                -justify left \
                -font font_uibold
        text $w.m.t \
-               -background white -borderwidth 1 \
+               -background white \
+               -foreground black \
+               -borderwidth 1 \
                -relief sunken \
                -width 80 -height 10 \
                -font font_diff \