summaryrefslogtreecommitdiffstats
path: root/library/dialog.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/dialog.tcl')
-rw-r--r--library/dialog.tcl16
1 files changed, 10 insertions, 6 deletions
diff --git a/library/dialog.tcl b/library/dialog.tcl
index 8afcdfb..2eb425f 100644
--- a/library/dialog.tcl
+++ b/library/dialog.tcl
@@ -3,7 +3,7 @@
# This file defines the procedure tk_dialog, which creates a dialog
# box containing a bitmap, a message, and one or more buttons.
#
-# RCS: @(#) $Id: dialog.tcl,v 1.13 2002/06/12 23:08:12 mdejong Exp $
+# RCS: @(#) $Id: dialog.tcl,v 1.14 2002/08/31 06:12:28 das Exp $
#
# Copyright (c) 1992-1993 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -65,13 +65,14 @@ proc ::tk_dialog {w title text bitmap default args} {
wm transient $w [winfo toplevel [winfo parent $w]]
}
- if {[string equal $tcl_platform(platform) "macintosh"]} {
+ if {[string equal $tcl_platform(platform) "macintosh"]
+ || [string equal [tk windowingsystem] "aqua"]} {
::tk::unsupported::MacWindowStyle style $w dBoxProc
}
frame $w.bot
frame $w.top
- if {[string compare $tcl_platform(platform) "macintosh"]} {
+ if {[string equal [tk windowingsystem] "x11"]} {
$w.bot configure -relief raised -bd 1
$w.top configure -relief raised -bd 1
}
@@ -83,7 +84,8 @@ proc ::tk_dialog {w title text bitmap default args} {
# overridden by the caller).
option add *Dialog.msg.wrapLength 3i widgetDefault
- if {[string equal $tcl_platform(platform) "macintosh"]} {
+ if {[string equal $tcl_platform(platform) "macintosh"]
+ || [string equal [tk windowingsystem] "aqua"]} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 12} widgetDefault
@@ -92,7 +94,8 @@ proc ::tk_dialog {w title text bitmap default args} {
label $w.msg -justify left -text $text
pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m
if {[string compare $bitmap ""]} {
- if {[string equal $tcl_platform(platform) "macintosh"] && \
+ if {([string equal $tcl_platform(platform) "macintosh"]
+ || [string equal [tk windowingsystem] "aqua"]) &&\
[string equal $bitmap "error"]} {
set bitmap "stop"
}
@@ -114,7 +117,8 @@ proc ::tk_dialog {w title text bitmap default args} {
-padx 10 -pady 4
grid columnconfigure $w.bot $i
# We boost the size of some Mac buttons for l&f
- if {[string equal $tcl_platform(platform) "macintosh"]} {
+ if {[string equal $tcl_platform(platform) "macintosh"]
+ || [string equal [tk windowingsystem] "aqua"]} {
set tmp [string tolower $but]
if {[string equal $tmp "ok"] || [string equal $tmp "cancel"]} {
grid columnconfigure $w.bot $i -minsize [expr {59 + 20}]