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>
This commit is contained in:
parent
6f62b4f782
commit
2370164f3c
@ -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} {
|
||||
|
Loading…
Reference in New Issue
Block a user