Mercurial > projects > dwt-linux
diff dwt/browser/MozillaDelegate.d @ 340:3f4a5c7d138f
Fixes
author | John Reimer <terminal.node@gmail.com> |
---|---|
date | Sun, 26 Oct 2008 08:09:00 -0700 |
parents | 44258e0b6687 |
children | 942da4b6558a |
line wrap: on
line diff
--- a/dwt/browser/MozillaDelegate.d Sat Oct 25 21:01:54 2008 -0700 +++ b/dwt/browser/MozillaDelegate.d Sun Oct 26 08:09:00 2008 -0700 @@ -15,15 +15,19 @@ import dwt.dwthelper.utils; import dwt.DWT; -import dwt.internal.Callback; +//import dwt.internal.Callback; import dwt.internal.Converter; -import dwt.internal.gtk.GdkEvent; +//import dwt.internal.gtk.GdkEvent; import dwt.internal.gtk.OS; import dwt.widgets.Display; import dwt.widgets.Event; import dwt.widgets.Listener; import dwt.widgets.Widget; +import dwt.browser.Browser; + +import dwt.internal.c.glib_object; + class MozillaDelegate { Browser browser; gpointer mozillaHandle; @@ -35,7 +39,7 @@ static const gpointer STOP_PROPOGATE = cast(gpointer)1; static bool IsLinux; - static this { + static this () { String osName = System.getProperty ("os.name"); //$NON-NLS-1$ IsLinux = tango.text.Util.containsPattern(osName, "linux"); //$NON-NLS-1$ } @@ -54,7 +58,7 @@ parent = OS.gtk_widget_get_parent (parent); if (parent is null) return 0; Widget widget = Display.getCurrent ().findWidget (parent); - if (widget !is null && (cast(Browser)widget !is null) { + if (widget !is null && (cast(Browser)widget) !is null) { return (cast(Mozilla)(cast(Browser)widget).webBrowser).mozDelegate.gtk_event (handle, gdkEvent, pointer); } return 0; @@ -121,7 +125,7 @@ void handleFocus () { if (hasFocus) return; hasFocus = true; - listener = new Listener () { + listener = new class() Listener { public void handleEvent (Event event) { if (event.widget is browser) return; (cast(Mozilla)(browser.webBrowser)).Deactivate (); @@ -138,7 +142,7 @@ void handleMouseDown () { int shellStyle = browser.getShell ().getStyle (); if ((shellStyle & DWT.ON_TOP) !is 0 && (((shellStyle & DWT.NO_FOCUS) is 0) || ((browser.getStyle () & DWT.NO_FOCUS) is 0))) { - browser.getDisplay ().asyncExec (new Runnable () { + browser.getDisplay ().asyncExec (new class() Runnable { public void run () { if (browser is null || browser.isDisposed ()) return; (cast(Mozilla)(browser.webBrowser)).Activate ();