X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FWin32.java;h=314089867cdcabb126dedfa42b3fe2f2ade8583f;hb=d602d58d0fa307be96122e2fe4e0606015bd5d00;hp=ddad00108f331fdfb575c2571b812ddffa0aea05;hpb=8d5c8bc003e624cb59618a516367e1f1e68382fe;p=org.ibex.core.git diff --git a/src/org/xwt/plat/Win32.java b/src/org/xwt/plat/Win32.java index ddad001..3140898 100644 --- a/src/org/xwt/plat/Win32.java +++ b/src/org/xwt/plat/Win32.java @@ -1,4 +1,4 @@ -// Copyright 2003 Adam Megacz, see the COPYING file for licensing [LGPL] +// Copyright 2004 Adam Megacz, see the COPYING file for licensing [LGPL] package org.xwt.plat; import org.xwt.*; @@ -43,16 +43,7 @@ public class Win32 extends GCJ { public Win32() { } - public void init() { - String logfile = getTempPath() + "xwt-log.txt"; - try { - PrintStream ps = new PrintStream(new FileOutputStream(logfile)); - System.setOut(ps); - System.setErr(ps); - } catch (Throwable e) { - criticalAbort("Exception while attempting to redirect logging to " + logfile + " -- " + e); - } - + public void postInit() { new Thread() { public void run() { natInit(); } }.start(); messagePumpStarted.block(); } @@ -79,21 +70,21 @@ public class Win32 extends GCJ { protected synchronized HTTP.Proxy _detectProxy() { String[] container = new String[] { null, null, null }; - if (Log.on) Log.log(this, "accessing Win32 registry"); + if (Log.on) Log.info(this, "accessing Win32 registry"); __detectProxy(container); if (container[2] == null && container[0] == null) { - if (Log.on) Log.log(this, "no proxy settings in the Win32 registry"); + if (Log.on) Log.info(this, "no proxy settings in the Win32 registry"); return null; } - if (Log.on) Log.log(this, "PAC Script URL: " + container[2]); - if (Log.on) Log.log(this, "Proxy Server String: " + container[0]); - if (Log.on) Log.log(this, "Proxy Override String: " + container[1]); + if (Log.on) Log.info(this, "PAC Script URL: " + container[2]); + if (Log.on) Log.info(this, "Proxy Server String: " + container[0]); + if (Log.on) Log.info(this, "Proxy Override String: " + container[1]); HTTP.Proxy ret = new HTTP.Proxy(); if (container[2] != null) { - ret.proxyAutoConfigJSFunction = HTTP.Proxy.getProxyAutoConfigJSFunction(container[2]); - if (ret.proxyAutoConfigJSFunction != null) return ret; + ret.proxyAutoConfigFunction = HTTP.Proxy.getProxyAutoConfigFunction(container[2]); + if (ret.proxyAutoConfigFunction != null) return ret; } if (container[0] == null) return null; @@ -138,7 +129,7 @@ public class Win32 extends GCJ { protected native boolean _newBrowserWindow_(String url); protected void _newBrowserWindow(String url) { if (!_newBrowserWindow_(url)) - if (Log.on) Log.log(this, "ShellExecuteEx() failed trying to open url " + url); + if (Log.on) Log.info(this, "ShellExecuteEx() failed trying to open url " + url); } // Win32Surface //////////////////////////////////////////////////////////////////////////// @@ -268,7 +259,7 @@ public class Win32 extends GCJ { drawPicture(source, dx, dy, cx1, cy1, cx2, cy2, 0, false); } public void drawGlyph(org.xwt.Font.Glyph source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb) { - Win32Picture p = ((Win32Picture)((DefaultGlyph)source).getPicture()); + Win32Picture p = ((Win32Picture)((Platform.DefaultGlyph)source).getPicture()); p.init(); drawPicture(p, dx, dy, cx1, cy1, cx2, cy2, rgb, true); }