diff dwtx/jface/dialogs/ProgressMonitorDialog.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 028aedd523ad
line wrap: on
line diff
--- a/dwtx/jface/dialogs/ProgressMonitorDialog.d	Mon May 19 13:41:06 2008 +0200
+++ b/dwtx/jface/dialogs/ProgressMonitorDialog.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
@@ -265,6 +265,8 @@
          * @see dwtx.core.runtime.IProgressMonitorWithBlocking#clearBlocked()
          */
         public void clearBlocked() {
+            if (getShell().isDisposed())
+                return;
             locked = false;
             updateForClearBlocked();
         }
@@ -275,6 +277,8 @@
          * @see dwtx.core.runtime.IProgressMonitorWithBlocking#setBlocked(dwtx.core.runtime.IStatus)
          */
         public void setBlocked(IStatus reason) {
+            if (getShell().isDisposed())
+                return;
             locked = true;
             updateForSetBlocked(reason);
         }
@@ -284,8 +288,10 @@
      * Clear blocked state from the receiver.
      */
     protected void updateForClearBlocked() {
+        progressIndicator.showNormal();
         setMessage(task, true);
         imageLabel.setImage(getImage());
+        
     }
 
     /**
@@ -295,8 +301,10 @@
      *            IStatus that gives the details
      */
     protected void updateForSetBlocked(IStatus reason) {
+        progressIndicator.showPaused();
         setMessage(reason.getMessage(), true);
         imageLabel.setImage(getImage());
+        
     }
 
     /**
@@ -310,10 +318,14 @@
     public this(Shell parent) {
         progressMonitor = new ProgressMonitor();
         super(parent);
-        setShellStyle(getDefaultOrientation() | DWT.BORDER | DWT.TITLE
-                | DWT.APPLICATION_MODAL); // no
-        // close
-        // button
+        // no close button on the shell style
+        if (isResizable()) {
+            setShellStyle(getDefaultOrientation() | DWT.BORDER | DWT.TITLE
+                    | DWT.APPLICATION_MODAL | DWT.RESIZE | DWT.MAX);
+        } else {
+            setShellStyle(getDefaultOrientation() | DWT.BORDER | DWT.TITLE
+                    | DWT.APPLICATION_MODAL);
+        }
         setBlockOnOpen(false);
     }
 
@@ -678,7 +690,8 @@
             }
         }
         int result = super.open();
-        // update message label just in case beginTask() has been invoked already
+        // update message label just in case beginTask() has been invoked
+        // already
         if (task is null || task.length is 0)
             setMessage(DEFAULT_TASKNAME, true);
         else