diff dwt/browser/WindowCreator2.d @ 305:c7c696cdfec2

Mozilla module progress; fixes to other browser modules; update XPCOM interfaces
author John Reimer<terminal.node@gmail.com>
date Sat, 16 Aug 2008 22:53:35 -0700
parents b72d84d1ba95
children 3f4a5c7d138f
line wrap: on
line diff
--- a/dwt/browser/WindowCreator2.d	Thu Aug 14 20:25:29 2008 -0700
+++ b/dwt/browser/WindowCreator2.d	Sat Aug 16 22:53:35 2008 -0700
@@ -114,7 +114,7 @@
 
         src = Mozilla.findBrowser (aParentNativeWindow);
     }
-    final Browser browser;
+    Browser browser;
     bool doit = true;
     if ((chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) !is 0) {
         /*
@@ -124,26 +124,30 @@
         */
         int style = DWT.DIALOG_TRIM;
         if ((chromeFlags & nsIWebBrowserChrome.CHROME_MODAL) !is 0) style |= DWT.APPLICATION_MODAL; 
-        final Shell shell = src is null ?
+        Shell shell = src is null ?
             new Shell (style) :
             new Shell (src.getShell(), style);
         shell.setLayout (new FillLayout ());
         browser = new Browser (shell, src is null ? DWT.MOZILLA : src.getStyle () & DWT.MOZILLA);
-        browser.addVisibilityWindowListener (new VisibilityWindowListener () {
+        browser.addVisibilityWindowListener (new class(shell) VisibilityWindowListener {
+            Shell sh;
+            this (Shell shell) { this.sh = shell; }
             public void hide (WindowEvent event) {
             }
             public void show (WindowEvent event) {
-                if (event.location !is null) shell.setLocation (event.location);
+                if (event.location !is null) sh.setLocation (event.location);
                 if (event.size !is null) {
                     Point size = event.size;
-                    shell.setSize (shell.computeSize (size.x, size.y));
+                    sh.setSize (sh.computeSize (size.x, size.y));
                 }
                 shell.open ();
             }
         });
-        browser.addCloseWindowListener (new CloseWindowListener () {
+        browser.addCloseWindowListener (new class(shell) CloseWindowListener {
+            Shell sh;
+            this (Shell shell) { this.shell = shell; }
             public void close (WindowEvent event) {
-                shell.close ();
+                sh.close ();
             }
         });
         if (uri !is null) {