X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fcore%2FIbex.java;h=5efc608bb39f895335671f09fafdde962f4ccbca;hb=HEAD;hp=4110a8ddcb0f9f0388a0979c0aa1ab133041ffee;hpb=890000a10a0ccdc49f62946bddf1c0b840495a94;p=org.ibex.core.git diff --git a/src/org/ibex/core/Ibex.java b/src/org/ibex/core/Ibex.java index 4110a8d..5efc608 100644 --- a/src/org/ibex/core/Ibex.java +++ b/src/org/ibex/core/Ibex.java @@ -74,9 +74,9 @@ public final class Ibex extends JS.Obj implements JS.Cloneable { case "ui.font.wait": return METHOD; case "ui.font.width": return METHOD; case "ui.font.height": return METHOD; - case "ui.font.sansserif": return Main.builtin.get(JSU.S("fonts/vera/Vera.ttf")); - case "ui.font.monospace": return Main.builtin.get(JSU.S("fonts/vera/VeraMono.ttf")); - case "ui.font.serif": return Main.builtin.get(JSU.S("fonts/vera/VeraSe.ttf")); + case "ui.font.sansserif": return Main.vera; + case "ui.font.monospace": return Main.vera; + case "ui.font.serif": return Main.vera; case "ui.browser": return METHOD; case "ui.mouse": return getSub(name); case "ui.mouse.button": @@ -370,7 +370,7 @@ public final class Ibex extends JS.Obj implements JS.Cloneable { // FEATURE: move this into builtin.xwar public Blessing bless(JS b) throws JSExn { return new Ibex.Blessing(b, this, null, null); } // JS:FIXME: This doesn't properly handle traps - public static class Blessing extends JS.Obj { + public static class Blessing extends JS.Clone { private Ibex ibex; private Template t = null; public JS parentkey = null; @@ -378,16 +378,15 @@ public final class Ibex extends JS.Obj implements JS.Cloneable { public JS clonee; private Basket.Map cache = new Basket.Hash(); public Blessing(JS clonee, Ibex ibex, Blessing parent, JS parentkey) throws JSExn { - this.clonee = clonee; this.ibex = ibex; this.parentkey = parentkey; this.parent = parent; } + super(clonee); this.clonee = clonee; this.ibex = ibex; this.parentkey = parentkey; this.parent = parent; } public JS get(JS key) throws JSExn { if (JSU.isString(key) && JSU.toString(key).equals("")) return getStatic(); if (cache.get(key) != null) return (JS)cache.get(key); - JS ret = new Blessing(clonee.get(key), ibex, this, key); + JS ret = new Blessing(super.get(key), ibex, this, key); cache.put(key, ret); return ret; } public static Blessing getBlessing(JS js) { - // CHECKME: is unclone() good enough or do we need getClonee() in Cloneable? while (js instanceof JS.Clone && !(js instanceof Blessing)) js = js.unclone(); if (!(js instanceof Blessing)) return null; return (Blessing)js; @@ -440,8 +439,6 @@ public final class Ibex extends JS.Obj implements JS.Cloneable { if (t == null) throw new JSExn("No such template " + JSU.str(parentkey)); return t; } - // JS:FIXME: Blessing shouldn't need to roll its own JS.Clone implementation - //public InputStream getInputStream() throws JSExn, IOException { return clonee.getInputStream(); } } }