diff dwtx/jface/wizard/WizardDialog.d @ 70:46a6e0e6ccd4

Merge with d-fied sources of 3.4M7
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 01:36:46 +0200
parents ea8ff534f622
children 4878bef4a38e
line wrap: on
line diff
--- a/dwtx/jface/wizard/WizardDialog.d	Mon May 19 13:41:06 2008 +0200
+++ b/dwtx/jface/wizard/WizardDialog.d	Thu May 22 01:36:46 2008 +0200
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -888,14 +888,14 @@
      *            the control
      * @param h
      *            the map (key type: <code>String</code>, element type:
-     *            <code>bool</code>)
+     *            <code>Boolean</code>)
      * @param key
      *            the key
      * @see #saveEnableStateAndSet
      */
     private void restoreEnableState(Control w, Map!(Object,Object) h, String key) {
         if (w !is null) {
-            auto b = cast(Boolean) h.get(stringcast(key));
+            Boolean b = (Boolean) h.get(stringcast(key));
             if (b !is null) {
                 w.setEnabled(b.booleanValue());
             }
@@ -972,7 +972,7 @@
      *            the control, or <code>null</code> if none
      * @param h
      *            the map (key type: <code>String</code>, element type:
-     *            <code>bool</code>)
+     *            <code>Boolean</code>)
      * @param key
      *            the key
      * @param enabled
@@ -1220,7 +1220,7 @@
      * @see #aboutToStart
      */
     private void stopped(Object savedState) {
-        if (getShell() !is null) {
+        if (getShell() !is null && !getShell().isDisposed()) {
             if (wizard.needsProgressMonitor()) {
                 progressMonitorPart.setVisible(false);
                 progressMonitorPart.removeFromCancelComponent(cancelButton);
@@ -1235,7 +1235,7 @@
             arrowCursor.dispose();
             arrowCursor = null;
             Control focusControl = cast(Control) state.get(stringcast(FOCUS_CONTROL));
-            if (focusControl !is null) {
+            if (focusControl !is null && !focusControl.isDisposed()) {
                 focusControl.setFocus();
             }
         }