diff options
Diffstat (limited to 'library/msgbox.tcl')
-rw-r--r-- | library/msgbox.tcl | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/library/msgbox.tcl b/library/msgbox.tcl index 4f9badf..cfbd3e7 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -3,7 +3,7 @@ # Implements messageboxes for platforms that do not have native # messagebox support. # -# RCS: @(#) $Id: msgbox.tcl,v 1.26 2004/01/25 01:29:15 pspjuth Exp $ +# RCS: @(#) $Id: msgbox.tcl,v 1.27 2004/03/17 18:15:44 das Exp $ # # Copyright (c) 1994-1997 Sun Microsystems, Inc. # @@ -157,8 +157,7 @@ proc ::tk::MessageBox {args} { if {[lsearch -exact {info warning error question} $data(-icon)] == -1} { error "bad -icon value \"$data(-icon)\": must be error, info, question, or warning" } - if {[string equal [tk windowingsystem] "classic"] - || [string equal [tk windowingsystem] "aqua"]} { + if {[string equal [tk windowingsystem] "aqua"]} { switch -- $data(-icon) { "error" {set data(-icon) "stop"} "warning" {set data(-icon) "caution"} @@ -256,8 +255,7 @@ proc ::tk::MessageBox {args} { wm transient $w $data(-parent) } - if {[string equal [tk windowingsystem] "classic"] - || [string equal [tk windowingsystem] "aqua"]} { + if {[string equal [tk windowingsystem] "aqua"]} { unsupported::MacWindowStyle style $w dBoxProc } @@ -266,8 +264,7 @@ proc ::tk::MessageBox {args} { pack $w.bot -side bottom -fill both frame $w.top -background $bg pack $w.top -side top -fill both -expand 1 - if {![string equal [tk windowingsystem] "classic"] - && ![string equal [tk windowingsystem] "aqua"]} { + if {![string equal [tk windowingsystem] "aqua"]} { $w.bot configure -relief raised -bd 1 $w.top configure -relief raised -bd 1 } @@ -277,8 +274,7 @@ proc ::tk::MessageBox {args} { # overridden by the caller). option add *Dialog.msg.wrapLength 3i widgetDefault - if {[string equal [tk windowingsystem] "classic"] - || [string equal [tk windowingsystem] "aqua"]} { + if {[string equal [tk windowingsystem] "aqua"]} { option add *Dialog.msg.font system widgetDefault } else { option add *Dialog.msg.font {Times 18} widgetDefault @@ -287,8 +283,7 @@ proc ::tk::MessageBox {args} { label $w.msg -anchor nw -justify left -text $data(-message) \ -background $bg if {[string compare $data(-icon) ""]} { - if {([string equal [tk windowingsystem] "classic"] - || [string equal [tk windowingsystem] "aqua"]) + if {[string equal [tk windowingsystem] "aqua"] || ([winfo depth $w] < 4) || $tk_strictMotif} { label $w.bitmap -bitmap $data(-icon) -background $bg } else { |