# HG changeset patch # User Eugene Ostroukhov <eugeneo@symbian.org> # Date 1269024703 25200 # Node ID 890be734ebec15e8a8ba08e6ee2e8905a2122d21 # Parent 7cca3bcacbc1abf23b4866ff3d103ad4ff774c27 Bug 2304 - Hint the user that he should do search to deploy the application to bluetooth diff -r 7cca3bcacbc1 -r 890be734ebec org.symbian.tools.wrttools.product/plugin.xml --- a/org.symbian.tools.wrttools.product/plugin.xml Thu Mar 18 16:21:12 2010 -0700 +++ b/org.symbian.tools.wrttools.product/plugin.xml Fri Mar 19 11:51:43 2010 -0700 @@ -168,11 +168,11 @@ </property> <property name="startupProgressRect" - value="0,250,422,15"> + value="0,260,422,5"> </property> <property name="startupMessageRect" - value="7,230,441,20"> + value="0,240,441,20"> </property> <property name="appName" diff -r 7cca3bcacbc1 -r 890be734ebec org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeployWizardContext.java --- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeployWizardContext.java Thu Mar 18 16:21:12 2010 -0700 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeployWizardContext.java Fri Mar 19 11:51:43 2010 -0700 @@ -26,6 +26,7 @@ public class DeployWizardContext { private DeploymentTarget target; private final WRTProject project; + private boolean logging; public DeployWizardContext(WRTProject project) { this.project = project; @@ -50,4 +51,16 @@ public void doSearch(SubProgressMonitor monitor) throws CoreException { DeploymentTargetRegistry.getRegistry().doSearch(monitor); } + + public boolean didBluetoothLookup() { + return DeploymentTargetRegistry.getRegistry().didBluetoothLookup(); + } + + public void setLogging(boolean logging) { + this.logging = logging; + } + + public boolean isLogging() { + return logging; + } } diff -r 7cca3bcacbc1 -r 890be734ebec org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeploymentTargetRegistry.java --- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeploymentTargetRegistry.java Thu Mar 18 16:21:12 2010 -0700 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeploymentTargetRegistry.java Fri Mar 19 11:51:43 2010 -0700 @@ -55,7 +55,10 @@ } } + private boolean didLookup = false; + public synchronized void doSearch(IProgressMonitor monitor) throws CoreException { + didLookup = true; monitor.beginTask("Bluetooth search", IProgressMonitor.UNKNOWN); if (DeviceListProvider.isBloothToothConnected()) { loadDevices(monitor); @@ -119,4 +122,8 @@ return null; } + public boolean didBluetoothLookup() { + return didLookup; + } + } diff -r 7cca3bcacbc1 -r 890be734ebec org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeploymentTargetWizardPage.java --- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeploymentTargetWizardPage.java Thu Mar 18 16:21:12 2010 -0700 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/deploy/DeploymentTargetWizardPage.java Fri Mar 19 11:51:43 2010 -0700 @@ -23,6 +23,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.util.Policy; @@ -55,6 +56,7 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Text; import org.symbian.tools.wrttools.Activator; +import org.symbian.tools.wrttools.core.WRTImages; public class DeploymentTargetWizardPage extends WizardPage { public class EmulatorBluetoothLabelProvider extends LabelProvider implements ILabelProvider, IColorProvider { @@ -85,7 +87,6 @@ private final DeployWizardContext context; private TableViewer list; private Text description; - private Button enableLogging; private final DeploymentTarget prev; public DeploymentTargetWizardPage(DeployWizardContext context, DeploymentTarget prev) { @@ -134,15 +135,16 @@ doBluetoothSearch(search); } }); - search.setText("Search"); + search.setText("Discover"); + search.setImage(WRTImages.getBluetoothImage()); description = new Text(root, SWT.BORDER | SWT.READ_ONLY); - enableLogging = new Button(root, SWT.CHECK); + final Button enableLogging = new Button(root, SWT.CHECK); enableLogging.setText("Enable diagnostic logging"); enableLogging.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - toggleLogging(); + toggleLogging(enableLogging.getSelection()); } }); @@ -177,12 +179,15 @@ list.setSelection(new StructuredSelection(prev)); } + if (!context.didBluetoothLookup()) { + setMessage("Press \"Discover\" to find Bluetooth-enabled devices", IStatus.WARNING); + } + setControl(root); } - protected void toggleLogging() { - // TODO Auto-generated method stub - + protected void toggleLogging(boolean logging) { + context.setLogging(logging); } protected void doBluetoothSearch(final Button search) { @@ -222,12 +227,14 @@ context.setTarget(target); String desc = target.getDescription(); this.description.setText(desc); + setMessage(null); setErrorMessage(null); setPageComplete(true); } else { context.setTarget(null); description.setText(""); setPageComplete(false); + setMessage(null); setErrorMessage("Select device or emulator to deploy the application"); } }