Merge branch 'maint'
* maint: git-gui: Ensure error dialogs always appear over all other windows
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
# git-gui branch (create/delete) support
|
# git-gui branch (create/delete) support
|
||||||
# Copyright (C) 2006, 2007 Shawn Pearce
|
# Copyright (C) 2006, 2007 Shawn Pearce
|
||||||
|
|
||||||
|
proc _error_parent {} {
|
||||||
|
return [grab current .]
|
||||||
|
}
|
||||||
|
|
||||||
proc error_popup {msg} {
|
proc error_popup {msg} {
|
||||||
set title [appname]
|
set title [appname]
|
||||||
if {[reponame] ne {}} {
|
if {[reponame] ne {}} {
|
||||||
@ -11,8 +15,8 @@ proc error_popup {msg} {
|
|||||||
-type ok \
|
-type ok \
|
||||||
-title [append "$title: " [mc "error"]] \
|
-title [append "$title: " [mc "error"]] \
|
||||||
-message $msg]
|
-message $msg]
|
||||||
if {[winfo ismapped .]} {
|
if {[winfo ismapped [_error_parent]]} {
|
||||||
lappend cmd -parent .
|
lappend cmd -parent [_error_parent]
|
||||||
}
|
}
|
||||||
eval $cmd
|
eval $cmd
|
||||||
}
|
}
|
||||||
@ -27,13 +31,13 @@ proc warn_popup {msg} {
|
|||||||
-type ok \
|
-type ok \
|
||||||
-title [append "$title: " [mc "warning"]] \
|
-title [append "$title: " [mc "warning"]] \
|
||||||
-message $msg]
|
-message $msg]
|
||||||
if {[winfo ismapped .]} {
|
if {[winfo ismapped [_error_parent]]} {
|
||||||
lappend cmd -parent .
|
lappend cmd -parent [_error_parent]
|
||||||
}
|
}
|
||||||
eval $cmd
|
eval $cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
proc info_popup {msg {parent .}} {
|
proc info_popup {msg} {
|
||||||
set title [appname]
|
set title [appname]
|
||||||
if {[reponame] ne {}} {
|
if {[reponame] ne {}} {
|
||||||
append title " ([reponame])"
|
append title " ([reponame])"
|
||||||
@ -56,8 +60,8 @@ proc ask_popup {msg} {
|
|||||||
-type yesno \
|
-type yesno \
|
||||||
-title $title \
|
-title $title \
|
||||||
-message $msg]
|
-message $msg]
|
||||||
if {[winfo ismapped .]} {
|
if {[winfo ismapped [_error_parent]]} {
|
||||||
lappend cmd -parent .
|
lappend cmd -parent [_error_parent]
|
||||||
}
|
}
|
||||||
eval $cmd
|
eval $cmd
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user