[Esbox-commits] r2358 - branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv
fabricioepa at garage.maemo.org
fabricioepa at garage.maemo.org
Wed Oct 28 21:10:09 EET 2009
Author: fabricioepa
Date: 2009-10-28 21:09:31 +0200 (Wed, 28 Oct 2009)
New Revision: 2358
Modified:
branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/X11ExecutionEnvironmentHandler.java
Log:
Fix bug #4741
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/X11ExecutionEnvironmentHandler.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/X11ExecutionEnvironmentHandler.java 2009-10-28 17:38:30 UTC (rev 2357)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/X11ExecutionEnvironmentHandler.java 2009-10-28 19:09:31 UTC (rev 2358)
@@ -16,6 +16,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.maemo.esbox.internal.api.maemosdk.core.tools.MaemoScriptLauncher;
import org.maemo.esbox.internal.api.maemosdk.core.tools.XLauncher;
@@ -34,7 +35,7 @@
*/
public class X11ExecutionEnvironmentHandler implements IExecutionEnvironmentHandler {
- public void establishEnvironment(Shell shell, IProject project, IProgressMonitor monitor)
+ public void establishEnvironment(final Shell shell, IProject project, IProgressMonitor monitor)
throws CoreException {
ISDKTarget sdkTarget;
try {
@@ -54,10 +55,18 @@
}
if (!serverRunning) {
-
- if (MessageDialog
- .openQuestion(shell, "Launch X Server?",
- "The X server is not running or is running with different parameters.\n\nWould you like to launch it now?")) {
+ final boolean launchX[] = new boolean[]{false};
+ Display.getDefault().syncExec(
+ new Runnable() {
+ public void run() {
+ launchX[0] = MessageDialog.openQuestion(shell,
+ "Launch X Server?",
+ "The X server is not running or is running with different parameters." +
+ "\n\nWould you like to launch it now?");
+ }
+ });
+
+ if (launchX[0]) {
Job job = MaemoScriptLauncher.getInstance().createStartXJob(sdkTarget);
job.schedule();
JobUtils.waitForJob(job, monitor, "Waiting for startup...");
More information about the Esbox-commits
mailing list