# HG changeset patch # User dadubrow # Date 1266505491 21600 # Node ID c848ffa5a500b7ae5180a33200a7fd9e746a1810 # Parent a514fb7b20325906dcc31cd52a8e2c59e1e2584e New launch wizard UI tweaks based on demo feedback diff -r a514fb7b2032 -r c848ffa5a500 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/AbstractLaunchSettingsDialog.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/AbstractLaunchSettingsDialog.java Wed Feb 17 12:52:01 2010 -0800 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/AbstractLaunchSettingsDialog.java Thu Feb 18 09:04:51 2010 -0600 @@ -30,6 +30,8 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; +import com.nokia.carbide.cpp.ui.CarbideUIPlugin; +import com.nokia.carbide.cpp.ui.ICarbideSharedImages; import com.nokia.cdt.internal.debug.launch.LaunchPlugin; import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils; @@ -62,6 +64,7 @@ protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText(Messages.getString("AbstractLaunchSettingsDialog.Title")); //$NON-NLS-1$ + setTitleImage(CarbideUIPlugin.getSharedImages().getImage(ICarbideSharedImages.IMG_NEW_LAUNCH_CONFIG_WIZARD_BANNER)); } protected Composite initDialogArea(Composite parent, String title, String helpId) { diff -r a514fb7b2032 -r c848ffa5a500 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/AbstractLaunchWizardSection.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/AbstractLaunchWizardSection.java Wed Feb 17 12:52:01 2010 -0800 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/AbstractLaunchWizardSection.java Thu Feb 18 09:04:51 2010 -0600 @@ -113,24 +113,24 @@ GridLayoutFactory.fillDefaults().numColumns(2).margins(6, 0).applyTo(composite); + // spacing + Label spacer = new Label(composite, SWT.NONE); + GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(spacer); + Label titleLabel = new Label(composite, SWT.NONE); titleLabel.setText(sectionName); titleLabel.setFont(JFaceResources.getBannerFont()); GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(titleLabel); - // spacing - Label spacer = new Label(composite, SWT.NONE); - GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(spacer); - descriptionLabel = new Label(composite, SWT.WRAP); - GridDataFactory.fillDefaults().grab(true, true).indent(INDENT, 0).applyTo(descriptionLabel); + GridDataFactory.fillDefaults().grab(true, true).indent(INDENT, 0).hint(350, SWT.DEFAULT).applyTo(descriptionLabel); String label = MessageFormat.format("{0}&{1}", //$NON-NLS-1$ CHANGE_LABEL.substring(0, acceleratorIndex), CHANGE_LABEL.substring(acceleratorIndex)); changeButton = new Button(composite, SWT.PUSH); changeButton.setText(label); Point minSize = changeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); - GridDataFactory.defaultsFor(changeButton).grab(false, false).hint(minSize.x + INDENT, SWT.DEFAULT).applyTo(changeButton); + GridDataFactory.defaultsFor(changeButton).grab(false, false).hint(minSize.x + INDENT, SWT.DEFAULT).indent(6, 0).applyTo(changeButton); changeButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { diff -r a514fb7b2032 -r c848ffa5a500 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.java Wed Feb 17 12:52:01 2010 -0800 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.java Thu Feb 18 09:04:51 2010 -0600 @@ -141,9 +141,6 @@ SettingsWizard wizard = new SettingsWizard(null, data.getService()); wizard.open(composite.getShell()); IConnection connection = wizard.getConnectionToEdit(); - // note: refresh ASAP so the selection will be valid; but endure a listener event - // which will redo this - refreshUI(); setViewerInput(connection); } }); @@ -242,15 +239,15 @@ } public void connectionAdded(IConnection connection) { - refreshUI(); + refreshUI(null); } public void connectionRemoved(IConnection connection) { - refreshUI(); + refreshUI(null); } public void currentConnectionSet(IConnection connection) { - refreshUI(); + refreshUI(connection); } private Set getCompatibleConnectionTypes() { @@ -301,11 +298,12 @@ return (IConnection) ((IStructuredSelection) selection).getFirstElement(); } - private void refreshUI() { + private void refreshUI(final IConnection connection) { Display.getDefault().syncExec(new Runnable() { public void run() { if (viewer != null && viewer.getContentProvider() != null) { - setViewerInput(getConnectionFromSelection(viewer.getSelection())); + IConnection connectionToSet = connection == null ? getConnectionFromSelection(viewer.getSelection()) : connection; + setViewerInput(connectionToSet); } } }); diff -r a514fb7b2032 -r c848ffa5a500 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceSection.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceSection.java Wed Feb 17 12:52:01 2010 -0800 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceSection.java Thu Feb 18 09:04:51 2010 -0600 @@ -94,6 +94,7 @@ descriptionLabel.setText(msg); launchOptionsPage.changed(); + launchOptionsPage.getWizard().getContainer().getShell().pack(); } @Override diff -r a514fb7b2032 -r c848ffa5a500 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/LaunchWizard.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/LaunchWizard.java Wed Feb 17 12:52:01 2010 -0800 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/LaunchWizard.java Thu Feb 18 09:04:51 2010 -0600 @@ -38,6 +38,8 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; +import com.nokia.carbide.cpp.ui.CarbideUIPlugin; +import com.nokia.carbide.cpp.ui.ICarbideSharedImages; import com.nokia.carbide.remoteconnections.interfaces.IService; import com.nokia.cdt.internal.debug.launch.LaunchPlugin; import com.nokia.cdt.internal.debug.launch.wizard.ILaunchCreationWizard; @@ -98,7 +100,7 @@ if (parent != null) { advancedButton = new Button(parent, SWT.CHECK); - GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(advancedButton); + GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER).indent(6, 0).applyTo(advancedButton); ((GridLayout) parent.getLayout()).numColumns++; advancedButton.moveBelow(parent.getChildren()[0]); @@ -198,6 +200,7 @@ } public void init() { + setDefaultPageImageDescriptor(CarbideUIPlugin.getSharedImages().getImageDescriptor(ICarbideSharedImages.IMG_NEW_LAUNCH_CONFIG_WIZARD_BANNER)); } public int openWizard(Shell shell) { diff -r a514fb7b2032 -r c848ffa5a500 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/messages.properties --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/messages.properties Wed Feb 17 12:52:01 2010 -0800 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/messages.properties Thu Feb 18 09:04:51 2010 -0600 @@ -8,7 +8,7 @@ ConnectToDeviceDialog.ServiceNotAvailWarning=The selected connection may not be usable for debugging:\n {0} ConnectToDeviceDialog.ServiceNotSupportedError=The selected connection does not support {0} ConnectToDeviceDialog.Title=Change connection -ConnectToDeviceSection.CurrentConnectionLabel=The current connection is now ''{0}''. +ConnectToDeviceSection.CurrentConnectionLabel=The current connection is ''{0}''. ConnectToDeviceSection.NoConnectionMsg=No current connection is defined or detected. ConnectToDeviceSection.StdPNPMsg=You may plug in a device over USB or activate it over WLAN, or create a new connection now for your device. ConnectToDeviceSection.Title=Connect to device