X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=lib%2Ferror.tcl;h=75650157e551e34dab650d89f3fa6d25afc91d6a;hb=fbbdaa5f425417e7fee83f543b1d03806f034cab;hp=45800d54932bf1367cff81db040d1a14b87a9ab5;hpb=f4d93486aea3a3c20ddef409e5bfd8a60efdc512;p=git.git diff --git a/lib/error.tcl b/lib/error.tcl index 45800d549..75650157e 100644 --- a/lib/error.tcl +++ b/lib/error.tcl @@ -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 \