summaryrefslogtreecommitdiffstats
path: root/library/bgerror.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-01-25 18:21:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-01-25 18:21:40 (GMT)
commitee09dd0c7cfc65378fac95dd53067bcd72b390e9 (patch)
tree9b964605296b4f7dd7bd91a2baa6ebd8c0bf21bc /library/bgerror.tcl
parent2a147ca9e8cdff6b06499b16942dd0a9b8b92228 (diff)
downloadtk-ee09dd0c7cfc65378fac95dd53067bcd72b390e9.zip
tk-ee09dd0c7cfc65378fac95dd53067bcd72b390e9.tar.gz
tk-ee09dd0c7cfc65378fac95dd53067bcd72b390e9.tar.bz2
* library/bgerror.tcl: Updates to use Tcl 8.4 features. [Patch 1237759] * library/button.tcl:
* library/choosedir.tcl: * library/clrpick.tcl: * library/comdlg.tcl: * library/console.tcl: * library/dialog.tcl: * library/entry.tcl: * library/focus.tcl: * library/listbox.tcl: * library/menu.tcl: * library/msgbox.tcl: * library/palette.tcl: * library/panedwindow.tcl: * library/safetk.tcl: * library/scale.tcl: * library/scrlbar.tcl: * library/spinbox.tcl: * library/tearoff.tcl: * library/text.tcl: * library/tk.tcl: * library/tkfbox.tcl: * library/xmfbox.tcl:
Diffstat (limited to 'library/bgerror.tcl')
-rw-r--r--library/bgerror.tcl18
1 files changed, 10 insertions, 8 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index 40c708a..e3593fa 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -9,8 +9,8 @@
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.
#
-# RCS: @(#) $Id: bgerror.tcl,v 1.23.2.3 2005/07/28 21:37:48 hobbs Exp $
-# $Id: bgerror.tcl,v 1.23.2.3 2005/07/28 21:37:48 hobbs Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.23.2.4 2006/01/25 18:21:41 dgp Exp $
+# $Id: bgerror.tcl,v 1.23.2.4 2006/01/25 18:21:41 dgp Exp $
namespace eval ::tk::dialog::error {
namespace import -force ::tk::msgcat::*
@@ -88,8 +88,10 @@ proc ::tk::dialog::error::bgerror err {
# Ok the application's tkerror either failed or was not found
# we use the default dialog then :
+ set windowingsystem [tk windowingsystem]
+
if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ || ($windowingsystem eq "aqua")} {
set ok [mc Ok]
set messageFont system
set textRelief flat
@@ -130,7 +132,7 @@ proc ::tk::dialog::error::bgerror err {
# 1. Create the top-level window and divide it into top
# and bottom parts.
- catch {destroy .bgerrorDialog}
+ destroy .bgerrorDialog
toplevel .bgerrorDialog -class ErrorDialog
wm withdraw .bgerrorDialog
wm title .bgerrorDialog $title
@@ -138,13 +140,13 @@ proc ::tk::dialog::error::bgerror err {
wm protocol .bgerrorDialog WM_DELETE_WINDOW { }
if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ || ($windowingsystem eq "aqua")} {
::tk::unsupported::MacWindowStyle style .bgerrorDialog zoomDocProc
}
frame .bgerrorDialog.bot
frame .bgerrorDialog.top
- if {[tk windowingsystem] eq "x11"} {
+ if {$windowingsystem eq "x11"} {
.bgerrorDialog.bot configure -relief raised -bd 1
.bgerrorDialog.top configure -relief raised -bd 1
}
@@ -181,7 +183,7 @@ proc ::tk::dialog::error::bgerror err {
label .bgerrorDialog.msg -justify left -text $text -font $messageFont \
-wraplength $wrapwidth
if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ || ($windowingsystem eq "aqua")} {
# On the Macintosh, use the stop bitmap
label .bgerrorDialog.bitmap -bitmap stop
} else {
@@ -217,7 +219,7 @@ proc ::tk::dialog::error::bgerror err {
grid columnconfigure .bgerrorDialog.bot $i -weight 1
# We boost the size of some Mac buttons for l&f
if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ || ($windowingsystem eq "aqua")} {
if {($name eq "ok") || ($name eq "dismiss")} {
grid columnconfigure .bgerrorDialog.bot $i -minsize 79
}