summaryrefslogtreecommitdiff
path: root/git-gui
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-11-18 06:20:37 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2006-11-18 06:20:37 (GMT)
commitcbbaa28bc0a2b607b0f5e2e23f910d1619b52b0f (patch)
tree0985fbc9c366088fad6215ecf4a0d81f5e3c92f8 /git-gui
parent06c311157a045c2189acc5496fdc71a806c28f8c (diff)
downloadgit-cbbaa28bc0a2b607b0f5e2e23f910d1619b52b0f.zip
git-cbbaa28bc0a2b607b0f5e2e23f910d1619b52b0f.tar.gz
git-cbbaa28bc0a2b607b0f5e2e23f910d1619b52b0f.tar.bz2
git-gui: Display error dialog on Mac OS X when no .git found.
If we can't locate a .git directory for the given directory we need to show a message to the user to let them know the directory wasn't found. But since this is before we have shown our main application window we cannot use that as the parent for the error popup; on Mac OS X this causes an error and prevents the dialog from showing. Instead only add -parent . to the popup call if we have mapped (shown) the main window. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-xgit-gui9
1 files changed, 6 insertions, 3 deletions
diff --git a/git-gui b/git-gui
index 472bcb7..12a46e9 100755
--- a/git-gui
+++ b/git-gui
@@ -130,12 +130,15 @@ proc error_popup {msg} {
end]
append title {)}
}
- tk_messageBox \
- -parent . \
+ set cmd [list tk_messageBox \
-icon error \
-type ok \
-title "$title: error" \
- -message $msg
+ -message $msg]
+ if {[winfo ismapped .]} {
+ lappend cmd -parent .
+ }
+ eval $cmd
}
proc info_popup {msg} {