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

fabricioepa at garage.maemo.org fabricioepa at garage.maemo.org
Fri Aug 28 17:46:10 EEST 2009


Author: fabricioepa
Date: 2009-08-28 17:46:09 +0300 (Fri, 28 Aug 2009)
New Revision: 2042

Modified:
   branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java
Log:
Fixing BUG #4449

Modified: branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java	2009-08-28 14:45:47 UTC (rev 2041)
+++ branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java	2009-08-28 14:46:09 UTC (rev 2042)
@@ -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);
@@ -272,6 +252,7 @@
 				}
 			}
 		});
+		
 	}
 
 	/**
@@ -281,6 +262,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);
@@ -289,7 +271,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);
@@ -298,12 +279,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(
@@ -471,12 +475,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