From 11d0a26ff4d45e2ec722cb53d1ce3c8fa68993cd Mon Sep 17 00:00:00 2001 From: Kushal Munir < kmunir@ca.ibm.com> Date: Fri, 25 May 2007 02:54:26 +0000 Subject: [PATCH] [179937] Fix problem with not being able to set other encoding in some cases. --- .../ui/propertypages/SystemFilePropertyPage.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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);