[Esbox-commits] r2049 - branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards

eswartz at garage.maemo.org eswartz at garage.maemo.org
Fri Aug 28 22:14:19 EEST 2009


Author: eswartz
Date: 2009-08-28 22:14:18 +0300 (Fri, 28 Aug 2009)
New Revision: 2049

Modified:
   branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java
Log:
Merge rev 2048 from trunk

Modified: branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java	2009-08-28 19:11:27 UTC (rev 2048)
+++ branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java	2009-08-28 19:14:18 UTC (rev 2049)
@@ -222,33 +222,13 @@
 		GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER).span(4, 1)
 				.applyTo(separator);
 		
-		usePreviousDownloadButton = createButton(composite, SWT.CHECK,
-				"Use previous download");
-		GridDataFactory.swtDefaults().span(4, 1).align(SWT.LEFT, SWT.CENTER)
-				.applyTo(usePreviousDownloadButton);
-		usePreviousDownloadButton
-				.setToolTipText("If checked, continue from a previous download of the virtual image if possible; otherwise, always download.");
-		usePreviousDownloadButton.addSelectionListener(new SelectionAdapter() {
-
-			public void widgetSelected(SelectionEvent evt) {
-				boolean usePreviousDownload = usePreviousDownloadButton.getSelection();
-				downloadLatest.setEnabled(!usePreviousDownload);
-				virtualImagesTable.getTable().setEnabled(!usePreviousDownload && !downloadLatest.getSelection());
-				setAdvancedAreaEnablement(usePreviousDownload);
-				((NewMaemoSDKVMWizard) getWizard()).getInstallData()
-						.setUsePreviousInstallation(usePreviousDownload);
-				validatePage();
-			}
-
-		});
-
 		Label label = new Label(composite, SWT.NONE);
-		label.setText("Virtual image destination:");
+		label.setText("Install location:");
 		GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER)
 				.applyTo(label);
 
 		destinationTextField = new Text(composite, SWT.BORDER);
-		destinationTextField.setToolTipText("Specify the location of Maemo SDK Virtual Image.");
+		destinationTextField.setToolTipText("Specify the location to install Maemo SDK Virtual Image.");
 		GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(
 				destinationTextField);
 		destinationTextField.addListener(SWT.SELECTED, textFieldsValidator);
@@ -271,6 +251,7 @@
 				}
 			}
 		});
+		
 	}
 
 	/**
@@ -280,6 +261,7 @@
 	 *            the parent composite.
 	 */
 	private void createAdvancedContent(Composite composite) {
+		
 		Label label = new Label(composite, SWT.NONE);
 		GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER).span(4, 1)
 				.applyTo(label);
@@ -288,7 +270,6 @@
 		GridDataFactory.swtDefaults().span(4, 1).applyTo(advancedButton);
 		advancedButton.setText("Advanced >>");
 		advancedButton.setSelection(false);
-		advancedButton.setEnabled(false);
 
 		advancedContent = new Composite(composite, SWT.NONE);
 		GridLayoutFactory.fillDefaults().numColumns(4).applyTo(advancedContent);
@@ -297,12 +278,35 @@
 				advancedContent);
 		enableAdvancedContent(false);
 
+		usePreviousDownloadButton = createButton(advancedContent, SWT.CHECK,
+				"Use previous download");
+		GridDataFactory.swtDefaults().span(4, 1).align(SWT.LEFT, SWT.CENTER)
+				.applyTo(usePreviousDownloadButton);
+		usePreviousDownloadButton
+				.setToolTipText("If checked, continue from a previous download of the virtual image if possible; otherwise, always download.");
+		usePreviousDownloadButton.addSelectionListener(new SelectionAdapter() {
+
+			public void widgetSelected(SelectionEvent evt) {
+				boolean usePreviousDownload = usePreviousDownloadButton
+						.getSelection();
+				downloadLatest.setEnabled(!usePreviousDownload);
+				virtualImagesTable.getTable().setEnabled(
+						!usePreviousDownload && !downloadLatest.getSelection());
+				existingVirtualImageTextField.setEnabled(usePreviousDownload);
+				((NewMaemoSDKVMWizard) getWizard()).getInstallData()
+						.setUsePreviousInstallation(usePreviousDownload);
+				validatePage();
+			}
+
+		});
+		
 		label = new Label(advancedContent, SWT.NONE);
 		label.setText("Existing virtual image location:");
 		GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER)
 				.applyTo(label);
 
 		existingVirtualImageTextField = new Text(advancedContent, SWT.BORDER);
+		existingVirtualImageTextField.setEnabled(false);
 		existingVirtualImageTextField
 				.setToolTipText("Specify the location of existing compressed Maemo SDK Virtual Image.");
 		GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(
@@ -472,12 +476,6 @@
 		((GridData) advancedContent.getLayoutData()).exclude = !selection;
 		getShell().pack();
 	}
-
-
-	private void setAdvancedAreaEnablement(boolean isEnabled) {
-		advancedButton.setEnabled(isEnabled);
-		existingVirtualImageTextField.setEnabled(isEnabled);
-	}
 	
 	protected Listener createTextFieldValidatorListener(){
         return new Listener() {



More information about the Esbox-commits mailing list