Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  git-gui: Ensure error dialogs always appear over all other windows
  • Loading branch information
Shawn O. Pearce committed Feb 21, 2008
2 parents cec8f51 + aba15f7 commit f4d9348
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lib/error.tcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# git-gui branch (create/delete) support
# Copyright (C) 2006, 2007 Shawn Pearce

proc _error_parent {} {
return [grab current .]
}

proc error_popup {msg} {
set title [appname]
if {[reponame] ne {}} {
Expand All @@ -11,8 +15,8 @@ proc error_popup {msg} {
-type ok \
-title [append "$title: " [mc "error"]] \
-message $msg]
if {[winfo ismapped .]} {
lappend cmd -parent .
if {[winfo ismapped [_error_parent]]} {
lappend cmd -parent [_error_parent]
}
eval $cmd
}
Expand All @@ -27,13 +31,13 @@ proc warn_popup {msg} {
-type ok \
-title [append "$title: " [mc "warning"]] \
-message $msg]
if {[winfo ismapped .]} {
lappend cmd -parent .
if {[winfo ismapped [_error_parent]]} {
lappend cmd -parent [_error_parent]
}
eval $cmd
}

proc info_popup {msg {parent .}} {
proc info_popup {msg} {
set title [appname]
if {[reponame] ne {}} {
append title " ([reponame])"
Expand All @@ -56,8 +60,8 @@ proc ask_popup {msg} {
-type yesno \
-title $title \
-message $msg]
if {[winfo ismapped .]} {
lappend cmd -parent .
if {[winfo ismapped [_error_parent]]} {
lappend cmd -parent [_error_parent]
}
eval $cmd
}
Expand Down

0 comments on commit f4d9348

Please sign in to comment.