[Esbox-commits] r2109 - branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard
andregomes at garage.maemo.org
andregomes at garage.maemo.org
Fri Sep 4 23:34:12 EEST 2009
Author: andregomes
Date: 2009-09-04 23:34:10 +0300 (Fri, 04 Sep 2009)
New Revision: 2109
Modified:
branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java
branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java
Log:
Fixing bug #4439
Modified: branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java 2009-09-04 18:51:05 UTC (rev 2108)
+++ branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java 2009-09-04 20:34:10 UTC (rev 2109)
@@ -24,7 +24,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
@@ -74,6 +73,8 @@
private Scratchbox1InstallerWorkPage workPage;
private boolean canFinish =false;
+
+ private boolean success = false;
/**
* Constructs a new target wizard for the given SDK (from the target
@@ -92,6 +93,13 @@
}
/**
+ * @return the success
+ */
+ public boolean isSuccess() {
+ return success;
+ }
+
+ /**
* Constructs a new target wizard for the given SDK (from the target
* configuration page).
*
@@ -186,7 +194,7 @@
patchAutotools();
doReboot();
}
-
+ this.success = installedNew;
return goOn;
}
@@ -321,8 +329,8 @@
Shell parent = activeWorkbenchWindow.getShell();
WizardDialog dialog = new WizardDialog(parent, wizard);
dialog.create();
- int result = dialog.open();
- if (result == Window.CANCEL)
+ dialog.open();
+ if (!wizard.isSuccess())
return Activator.createStatus(IStatus.CANCEL, "Scratchbox 1 SDK installation was canceled");
else
return Activator.createStatus(IStatus.OK, "Scratchbox 1 SDK has finished");
Modified: branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java 2009-09-04 18:51:05 UTC (rev 2108)
+++ branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java 2009-09-04 20:34:10 UTC (rev 2109)
@@ -21,7 +21,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
@@ -64,6 +63,8 @@
private Scratchbox1InstallerWorkPage workPage;
private boolean suppressNokiaBinariesWizard;
+
+ private boolean success;
/**
* Constructs a new target wizard.
@@ -77,6 +78,13 @@
this.buildMachine = buildMachines[0];
initialize();
}
+
+ /**
+ * @return the success
+ */
+ public boolean isSuccess() {
+ return success;
+ }
/**
* Control whether this wizard will ask the user to install the Nokia Binaries
@@ -173,6 +181,7 @@
promptInstallNokiaBinaries(false);
}
+ this.success = success;
return goOn;
}
@@ -273,8 +282,8 @@
Shell parent = activeWorkbenchWindow.getShell();
WizardDialog dialog = new WizardDialog(parent, wizard);
dialog.create();
- int result = dialog.open();
- if (result == Window.CANCEL)
+ dialog.open();
+ if (!wizard.isSuccess())
return Activator.createStatus(IStatus.CANCEL, "Scratchbox 1 target installation was canceled");
// now install Nokia binaries synchronously
More information about the Esbox-commits
mailing list