summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjenglish <jenglish@noemail.net>2005-11-15 03:12:16 (GMT)
committerjenglish <jenglish@noemail.net>2005-11-15 03:12:16 (GMT)
commitfbd4f938b4c383a92c036847a924b85a0d25bd8e (patch)
treec53247000d7b7dbc8f889c2d85fc32ff9b7967c5 /library
parent842f06f5586de971b9c4fc8c1ab94b0377e8202c (diff)
downloadtk-fbd4f938b4c383a92c036847a924b85a0d25bd8e.zip
tk-fbd4f938b4c383a92c036847a924b85a0d25bd8e.tar.gz
tk-fbd4f938b4c383a92c036847a924b85a0d25bd8e.tar.bz2
bgerror dialog: Truncate error messages at 45 characters
instead of 30 [#1224235]. FossilOrigin-Name: 5f256ce2c0d3b0a088007b9fb7750f76f2561460
Diffstat (limited to 'library')
-rw-r--r--library/bgerror.tcl13
1 files changed, 7 insertions, 6 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index 8181cf2..a1837a2 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.28 2005/08/09 07:39:19 das Exp $
-# $Id: bgerror.tcl,v 1.28 2005/08/09 07:39:19 das Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.29 2005/11/15 03:12:18 jenglish Exp $
+# $Id: bgerror.tcl,v 1.29 2005/11/15 03:12:18 jenglish Exp $
namespace eval ::tk::dialog::error {
namespace import -force ::tk::msgcat::*
@@ -101,14 +101,15 @@ proc ::tk::dialog::error::bgerror err {
}
- # Truncate the message if it is too wide (longer than 30 characacters) or
- # too tall (more than 4 newlines). Truncation occurs at the first point at
+ # Truncate the message if it is too wide (>maxLine characters) or
+ # too tall (>4 lines). Truncation occurs at the first point at
# which one of those conditions is met.
set displayedErr ""
set lines 0
+ set maxLine 45
foreach line [split $err \n] {
- if { [string length $line] > 30 } {
- append displayedErr "[string range $line 0 29]..."
+ if { [string length $line] > $maxLine } {
+ append displayedErr "[string range $line 0 [expr {$maxLine-3}]]..."
break
}
if { $lines > 4 } {