X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=lib%2Ferror.tcl;h=13565b7ab02b22123f0b7b9000dc1f4a993994b0;hb=74e528bf44e715774e3a8e0003a6b2b250f4f0b9;hp=d0253ae2ffa72e491784434ff6ad98ed675ff10c;hpb=f0bc498ec17eeb046c3494126e2ff12339abde77;p=git.git diff --git a/lib/error.tcl b/lib/error.tcl index d0253ae2f..13565b7ab 100644 --- a/lib/error.tcl +++ b/lib/error.tcl @@ -9,7 +9,7 @@ proc error_popup {msg} { set cmd [list tk_messageBox \ -icon error \ -type ok \ - -title "$title: error" \ + -title [append "$title: " [mc "error"]] \ -message $msg] if {[winfo ismapped .]} { lappend cmd -parent . @@ -25,7 +25,7 @@ proc warn_popup {msg} { set cmd [list tk_messageBox \ -icon warning \ -type ok \ - -title "$title: warning" \ + -title [append "$title: " [mc "warning"]] \ -message $msg] if {[winfo ismapped .]} { lappend cmd -parent . @@ -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} { @@ -75,7 +78,7 @@ proc hook_failed_popup {hook msg} { -font font_diff \ -yscrollcommand [list $w.m.sby set] label $w.m.l2 \ - -text {You must correct the above errors before committing.} \ + -text [mc "You must correct the above errors before committing."] \ -anchor w \ -justify left \ -font font_uibold @@ -96,6 +99,6 @@ proc hook_failed_popup {hook msg} { bind $w "grab $w; focus $w" bind $w "destroy $w" - wm title $w "[appname] ([reponame]): error" + wm title $w [append "[appname] ([reponame]): " [mc "error"]] tkwait window $w }