diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java index 2b3d4df1cdd..3f9f7537478 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java @@ -192,7 +192,7 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage data.grabExcessVerticalSpace = false; encodingGroup.setLayoutData(data); - SelectionAdapter buttonSelectionListener = new SelectionAdapter() { + SelectionAdapter defaultButtonSelectionListener = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateEncodingGroupState(defaultEncodingButton.getSelection()); updateValidState(); @@ -212,7 +212,7 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage data = new GridData(); data.horizontalSpan = 2; defaultEncodingButton.setLayoutData(data); - defaultEncodingButton.addSelectionListener(buttonSelectionListener); + defaultEncodingButton.addSelectionListener(defaultButtonSelectionListener); Composite otherComposite = new Composite(encodingGroup, SWT.NONE); GridLayout otherLayout = new GridLayout(); @@ -224,7 +224,15 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage // other encoding field otherEncodingButton = SystemWidgetHelpers.createRadioButton(otherComposite, null, SystemFileResources.RESID_PP_FILE_ENCODING_OTHER_LABEL, SystemFileResources.RESID_PP_FILE_ENCODING_OTHER_TOOLTIP); - otherEncodingButton.addSelectionListener(buttonSelectionListener); + + SelectionAdapter otherButtonSelectionListener = new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + updateEncodingGroupState(!otherEncodingButton.getSelection()); + updateValidState(); + } + }; + + otherEncodingButton.addSelectionListener(otherButtonSelectionListener); // other encoding combo otherEncodingCombo = SystemWidgetHelpers.createCombo(otherComposite, null, SystemFileResources.RESID_PP_FILE_ENCODING_ENTER_TOOLTIP);