From 73cae1c52c6d2c3a3715d65fc3773753f79d0c9a Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 06:48:54 +0000 Subject: [PATCH] 2002/07/15 23:16:42 darcs-hash:20040130064854-2ba56-3f50c7783714f5cd70ceef3ac3a602be68cfbb0e.gz --- CHANGES | 3 +++ src/org/xwt/SpecialBoxProperty.java | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index f2d0470..3dcf24f 100644 --- a/CHANGES +++ b/CHANGES @@ -258,3 +258,6 @@ 15-Jul megacz POSIX.cc: ignore SIGPIPE in case the browser that launched us closes + +15-Jul megacz SpecialBoxProperty.java: redirect property, + color/textcolor error message tweak. diff --git a/src/org/xwt/SpecialBoxProperty.java b/src/org/xwt/SpecialBoxProperty.java index cb64849..f3993cc 100644 --- a/src/org/xwt/SpecialBoxProperty.java +++ b/src/org/xwt/SpecialBoxProperty.java @@ -101,8 +101,8 @@ class SpecialBoxProperty { else if (s.equals("pink")) newcolor = pink; else if (s.equals("yellow")) newcolor = yellow; else if (s.equals("white")) newcolor = white; - else if (Log.on) Log.log(this, "invalid color " + s); - + else if (Log.on) Log.log(this, "invalid color \"" + s + "\" at " + + Context.enter().interpreterSourceFile + ":" + Context.enter().interpreterLine); if (newcolor == b.color) return; b.color = newcolor; b.dirty(); @@ -145,7 +145,8 @@ class SpecialBoxProperty { else if (s.equals("pink")) newtextcolor = pink; else if (s.equals("yellow")) newtextcolor = yellow; else if (s.equals("white")) newtextcolor = white; - else if (Log.on) Log.log(this, "invalid textcolor " + s); + else if (Log.on) Log.log(this, "invalid color \"" + s + "\" at " + + Context.enter().interpreterSourceFile + ":" + Context.enter().interpreterLine); if (newtextcolor == b.textcolor) return; b.textcolor = newtextcolor; @@ -646,6 +647,15 @@ class SpecialBoxProperty { b.set(dmax, 1, stosh(value)); } }); + + specialBoxProperties.put("redirect", new SpecialBoxProperty() { + public void put(Box b, Object value) { } + public Object get(Box b) { + if (b.redirect == null) return null; + if (b.redirect == b) return Boolean.TRUE; + return get(b.redirect); + } + }); } -- 1.7.10.4