| Summary: | [Patchattached] Tab order in CommitSetDialog seems backwards | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Brock Janiczak <brockj> |
| Component: | CVS | Assignee: | platform-cvs-inbox <platform-cvs-inbox> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | Keywords: | helpwanted |
| Version: | 3.1 | ||
| Target Milestone: | 3.1 M7 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Brock Janiczak
If the radio buttons are wrapped in a composite with the SWT.NO_RADIO_GROUP or a Group control the problem goes away. I guess this is standard SWT behaviour. The NO_RADIO_FOCUS this was bogus. SWT (on windows at least) will prefer radio
buttons over all other controls when giving the focus in a shell. You need to
wrap the buttons in a composite to stop this behaviour. It basically follows
the composite chain looking for a non composite control to give focus to.
Index: CommitSetDialog.java
===================================================================
RCS file:
/home/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java,v
retrieving revision 1.10
diff -u -r1.10 CommitSetDialog.java
--- CommitSetDialog.java 23 Mar 2005 14:11:56 -0000 1.10
+++ CommitSetDialog.java 31 Mar 2005 09:36:20 -0000
@@ -20,6 +20,7 @@
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ccvs.ui.*;
import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
@@ -154,8 +155,16 @@
}
private void createOptionsArea(Composite composite) {
- useTitleButton = createRadioButton(composite,
Policy.bind("CommitSetDialog.2")); //$NON-NLS-1$
- enterCommentButton = createRadioButton(composite,
Policy.bind("CommitSetDialog.3")); //$NON-NLS-1$
+ Composite radioArea = new Composite(composite, SWT.NONE);
+ RowLayout radioAreaLayout = new RowLayout(SWT.VERTICAL);
+ radioAreaLayout.marginLeft = 0;
+ radioAreaLayout.marginRight = 0;
+ radioAreaLayout.marginTop = 0;
+ radioAreaLayout.marginBottom = 0;
+ radioArea.setLayout(radioAreaLayout);
+
+ useTitleButton = createRadioButton(radioArea,
Policy.bind("CommitSetDialog.2")); //$NON-NLS-1$
+ enterCommentButton = createRadioButton(radioArea,
Policy.bind("CommitSetDialog.3")); //$NON-NLS-1$
SelectionAdapter listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
updateEnablements();
@@ -169,7 +178,6 @@
private Button createRadioButton(Composite parent, String label) {
Button button = new Button(parent, SWT.RADIO);
button.setText(label);
- button.setLayoutData(new GridData());
return button;
}
Thans for the patch. I'll have a look at it once M6 ships Patch committed to HEAD. Thanks again. Verified |