summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-07-18 02:45:53 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-07-18 02:45:53 (GMT)
commit2370164f3ceb833b9b4128d80bdfcc81e58682f9 (patch)
treeb2d02827c82c8c21592ce6fd9382022246e2bb75 /lib
parent6f62b4f782c51bdf0dfdef3da5b5049c9006ff70 (diff)
downloadgit-2370164f3ceb833b9b4128d80bdfcc81e58682f9.zip
git-2370164f3ceb833b9b4128d80bdfcc81e58682f9.tar.gz
git-2370164f3ceb833b9b4128d80bdfcc81e58682f9.tar.bz2
git-gui: Don't crash in ask_popup if we haven't mapped main window yet
If we have more than our desired number of objects and we try to open the "Do you want to repack now?" dialog we cannot include a -parent . argument if the main window has not been mapped yet. On Mac OS X it appears this window isn't mapped right away, so we had better hang avoid including it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/error.tcl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/error.tcl b/lib/error.tcl
index d0253ae..16a2218 100644
--- a/lib/error.tcl
+++ b/lib/error.tcl
@@ -51,12 +51,15 @@ proc ask_popup {msg} {
if {[reponame] ne {}} {
append title " ([reponame])"
}
- return [tk_messageBox \
- -parent . \
+ set cmd [list tk_messageBox \
-icon question \
-type yesno \
-title $title \
-message $msg]
+ if {[winfo ismapped .]} {
+ lappend cmd -parent .
+ }
+ eval $cmd
}
proc hook_failed_popup {hook msg} {