[Esbox-commits] r2146 - 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
Thu Sep 10 18:07:56 EEST 2009


Author: fabricioepa
Date: 2009-09-10 18:07:53 +0300 (Thu, 10 Sep 2009)
New Revision: 2146

Modified:
   branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMUncompressInfoWizardPage.java
Log:
fix BUG #4530

Modified: branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMUncompressInfoWizardPage.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMUncompressInfoWizardPage.java	2009-09-10 14:40:21 UTC (rev 2145)
+++ branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMUncompressInfoWizardPage.java	2009-09-10 15:07:53 UTC (rev 2146)
@@ -11,6 +11,7 @@
 package org.maemo.esbox.internal.vm.vmware.ui.wizards;
 
 import java.io.File;
+import java.text.MessageFormat;
 
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Platform;
@@ -20,13 +21,16 @@
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.program.Program;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Text;
 import org.maemo.esbox.internal.vm.vmware.Activator;
@@ -76,7 +80,7 @@
 		Label mainMessage = new Label(composite, SWT.WRAP);
 		mainMessage.setText("Maemo SDK Virtual Image wizard also uncompress the virtual machine for you. " +
 							"However, since Maemo SDK Virtual Images are considerable large, most of existing tools cannot uncompress them.\n" +
-							"This wizard uses 7zip tool for uncompression, please specify a valid path for 7zip tool bellow.");
+							"This wizard uses 7zip tool for uncompression, please specify a valid path for 7zip tool below.");
 		
 		GridData labelData = new GridData();
 		labelData.horizontalSpan = 4;
@@ -84,7 +88,7 @@
 	    Rectangle rect = getShell().getMonitor().getClientArea();
 	    labelData.widthHint = rect.width / 4;
 	    mainMessage.setLayoutData(labelData);
-
+	    
 		Label separator = new Label(composite, SWT.NONE);
 		GridDataFactory.swtDefaults().span(4, 1).align(SWT.LEFT, SWT.CENTER)
 				.applyTo(separator);
@@ -136,6 +140,28 @@
 			}
 		});
 		
+		
+		Link link = new Link(composite, SWT.WRAP);
+		final String url = "http://www.7-zip.org";
+		String msg = MessageFormat.format(
+				"(You can download 7zip tool from <a>{0}</a>)", url);
+		link.setText(msg);
+
+		link.addSelectionListener(new SelectionListener() {
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				Program.launch(url);
+			}
+		});
+		labelData = new GridData();
+		labelData.horizontalSpan = 4;
+		labelData.verticalSpan = 2;
+	    labelData.horizontalAlignment = SWT.CENTER;
+		link.setLayoutData(labelData);
+
 		validatePage();
 	}
 	



More information about the Esbox-commits mailing list