diff dwt/browser/PromptDialog.d @ 288:4ee8c4237614

old branches... commit by mistake
author John Reimer<terminal.node@gmail.com>
date Tue, 05 Aug 2008 18:00:50 -0700
parents 93409d9838c5
children eec6ddb07873
line wrap: on
line diff
--- a/dwt/browser/PromptDialog.d	Tue Aug 05 10:12:22 2008 -0700
+++ b/dwt/browser/PromptDialog.d	Tue Aug 05 18:00:50 2008 -0700
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *      John Reimer <terminal.node@gmail.com>
  *******************************************************************************/
 module dwt.browser.PromptDialog;
 
@@ -27,19 +29,19 @@
 import dwt.widgets.Text;
 import dwt.widgets.Widget;
 
-class PromptDialog extends Dialog {
+class PromptDialog : Dialog {
     
-    PromptDialog(Shell parent, int style) {
+    this(Shell parent, int style) {
         super(parent, style);
     }
     
-    PromptDialog(Shell parent) {
+    this(Shell parent) {
         this(parent, 0);
     }
     
-    void alertCheck(String title, String text, String check, final int[] checkValue) {
+    void alertCheck(String title, String text, String check, /* final */ int[] checkValue) {
         Shell parent = getParent();
-        final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
+        /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
         if (title !is null) shell.setText(title);
         GridLayout gridLayout = new GridLayout();
         shell.setLayout(gridLayout);
@@ -82,9 +84,9 @@
         }
     }
 
-    void confirmEx(String title, String text, String check, String button0, String button1, String button2, int defaultIndex, final int[] checkValue, final int[] result) {
+    void confirmEx(String title, String text, String check, String button0, String button1, String button2, int defaultIndex, /* final */ int[] checkValue, /* final */ int[] result) {
         Shell parent = getParent();
-        final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
+        /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
         shell.setText(title);
         GridLayout gridLayout = new GridLayout();
         shell.setLayout(gridLayout);
@@ -162,9 +164,9 @@
         }
     }
     
-    void prompt(String title, String text, String check, final String[] value, final int[] checkValue, final int[] result) {
+    void prompt(String title, String text, String check, /* final */ String[] value, /* final */ int[] checkValue, /* final */ int[] result) {
         Shell parent = getParent();
-        final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
+        /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
         if (title !is null) shell.setText(title);
         GridLayout gridLayout = new GridLayout();
         shell.setLayout(gridLayout);
@@ -227,9 +229,9 @@
         }   
     }
 
-    void promptUsernameAndPassword(String title, String text, String check, final String[] user, final String[] pass, final int[] checkValue, final int[] result) {
+    void promptUsernameAndPassword(String title, String text, String check, /* final */ String[] user, /* final */ String[] pass, /* final */ int[] checkValue, /* final */ int[] result) {
         Shell parent = getParent();
-        final Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
+        /* final */ Shell shell = new Shell(parent, DWT.DIALOG_TRIM | DWT.APPLICATION_MODAL);
         shell.setText(title);
         GridLayout gridLayout = new GridLayout();
         shell.setLayout(gridLayout);