mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
[179937] Add the string "Note:" to the message that encoding for host can only be changed if all subsystems are disconnected.
This commit is contained in:
parent
cc9068c724
commit
6dce90afc5
3 changed files with 42 additions and 4 deletions
|
@ -1226,6 +1226,7 @@ public class SystemResources extends NLS
|
||||||
|
|
||||||
// Encoding
|
// Encoding
|
||||||
public static String RESID_HOST_ENCODING_GROUP_LABEL;
|
public static String RESID_HOST_ENCODING_GROUP_LABEL;
|
||||||
|
public static String RESID_HOST_ENCODING_SETTING_NOTE;
|
||||||
public static String RESID_HOST_ENCODING_SETTING_MSG;
|
public static String RESID_HOST_ENCODING_SETTING_MSG;
|
||||||
public static String RESID_HOST_ENCODING_REMOTE_LABEL;
|
public static String RESID_HOST_ENCODING_REMOTE_LABEL;
|
||||||
public static String RESID_HOST_ENCODING_REMOTE_TOOLTIP;
|
public static String RESID_HOST_ENCODING_REMOTE_TOOLTIP;
|
||||||
|
|
|
@ -1422,6 +1422,7 @@ RESID_DO_NOT_SHOW_MESSAGE_AGAIN_TOOLTIP = Select this option if you do not want
|
||||||
|
|
||||||
# Strings for Encodings
|
# Strings for Encodings
|
||||||
RESID_HOST_ENCODING_GROUP_LABEL=Default encoding
|
RESID_HOST_ENCODING_GROUP_LABEL=Default encoding
|
||||||
|
RESID_HOST_ENCODING_SETTING_NOTE=Note:
|
||||||
RESID_HOST_ENCODING_SETTING_MSG=This setting can only be changed when no subsystem is connected
|
RESID_HOST_ENCODING_SETTING_MSG=This setting can only be changed when no subsystem is connected
|
||||||
RESID_HOST_ENCODING_REMOTE_LABEL=Default from remote system
|
RESID_HOST_ENCODING_REMOTE_LABEL=Default from remote system
|
||||||
RESID_HOST_ENCODING_REMOTE_TOOLTIP=The default encoding of the platform obtained from the remote system
|
RESID_HOST_ENCODING_REMOTE_TOOLTIP=The default encoding of the platform obtained from the remote system
|
||||||
|
|
|
@ -36,6 +36,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||||
import org.eclipse.jface.operation.IRunnableContext;
|
import org.eclipse.jface.operation.IRunnableContext;
|
||||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
|
import org.eclipse.jface.resource.JFaceResources;
|
||||||
import org.eclipse.jface.wizard.IWizard;
|
import org.eclipse.jface.wizard.IWizard;
|
||||||
import org.eclipse.jface.wizard.IWizardPage;
|
import org.eclipse.jface.wizard.IWizardPage;
|
||||||
import org.eclipse.jface.wizard.WizardPage;
|
import org.eclipse.jface.wizard.WizardPage;
|
||||||
|
@ -66,6 +67,7 @@ import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.events.SelectionListener;
|
import org.eclipse.swt.events.SelectionListener;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
import org.eclipse.swt.widgets.Combo;
|
import org.eclipse.swt.widgets.Combo;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
@ -819,7 +821,7 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab
|
||||||
encodingGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts, 2, SystemResources.RESID_HOST_ENCODING_GROUP_LABEL);
|
encodingGroup = SystemWidgetHelpers.createGroupComposite(composite_prompts, 2, SystemResources.RESID_HOST_ENCODING_GROUP_LABEL);
|
||||||
GridData data = new GridData();
|
GridData data = new GridData();
|
||||||
data.horizontalSpan = 2;
|
data.horizontalSpan = 2;
|
||||||
data.horizontalAlignment = SWT.BEGINNING;
|
data.horizontalAlignment = SWT.FILL;
|
||||||
data.grabExcessHorizontalSpace = true;
|
data.grabExcessHorizontalSpace = true;
|
||||||
data.verticalAlignment = SWT.BEGINNING;
|
data.verticalAlignment = SWT.BEGINNING;
|
||||||
data.grabExcessVerticalSpace = false;
|
data.grabExcessVerticalSpace = false;
|
||||||
|
@ -832,7 +834,30 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SystemWidgetHelpers.createLabel(encodingGroup, SystemResources.RESID_HOST_ENCODING_SETTING_MSG, 2);
|
Composite messageComposite = new Composite(encodingGroup, SWT.NONE);
|
||||||
|
GridLayout messageLayout = new GridLayout();
|
||||||
|
messageLayout.numColumns = 2;
|
||||||
|
messageLayout.marginWidth = 0;
|
||||||
|
messageLayout.marginHeight = 0;
|
||||||
|
messageComposite.setLayout(messageLayout);
|
||||||
|
messageComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
|
||||||
|
|
||||||
|
Label noteLabel = new Label(messageComposite, SWT.BOLD);
|
||||||
|
noteLabel.setText(SystemResources.RESID_HOST_ENCODING_SETTING_NOTE);
|
||||||
|
noteLabel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT));
|
||||||
|
data = new GridData();
|
||||||
|
data.grabExcessHorizontalSpace = false;
|
||||||
|
noteLabel.setLayoutData(data);
|
||||||
|
|
||||||
|
Label messageLabel = new Label(messageComposite, SWT.NULL);
|
||||||
|
messageLabel.setText(SystemResources.RESID_HOST_ENCODING_SETTING_MSG);
|
||||||
|
data = new GridData();
|
||||||
|
data.horizontalAlignment = SWT.BEGINNING;
|
||||||
|
data.grabExcessHorizontalSpace = true;
|
||||||
|
data.horizontalIndent = 0;
|
||||||
|
messageLabel.setLayoutData(data);
|
||||||
|
|
||||||
|
SystemWidgetHelpers.createLabel(encodingGroup, ""); //$NON-NLS-1$
|
||||||
|
|
||||||
// remote encoding field
|
// remote encoding field
|
||||||
String defaultEncodingLabel = SystemResources.RESID_HOST_ENCODING_REMOTE_LABEL;
|
String defaultEncodingLabel = SystemResources.RESID_HOST_ENCODING_REMOTE_LABEL;
|
||||||
|
@ -840,18 +865,27 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab
|
||||||
remoteEncodingButton = SystemWidgetHelpers.createRadioButton(encodingGroup, null, defaultEncodingLabel, SystemResources.RESID_HOST_ENCODING_REMOTE_TOOLTIP);
|
remoteEncodingButton = SystemWidgetHelpers.createRadioButton(encodingGroup, null, defaultEncodingLabel, SystemResources.RESID_HOST_ENCODING_REMOTE_TOOLTIP);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalSpan = 2;
|
data.horizontalSpan = 2;
|
||||||
|
data.grabExcessHorizontalSpace = true;
|
||||||
remoteEncodingButton.setLayoutData(data);
|
remoteEncodingButton.setLayoutData(data);
|
||||||
remoteEncodingButton.addSelectionListener(buttonSelectionListener);
|
remoteEncodingButton.addSelectionListener(buttonSelectionListener);
|
||||||
|
|
||||||
|
Composite otherComposite = new Composite(encodingGroup, SWT.NONE);
|
||||||
|
GridLayout otherLayout = new GridLayout();
|
||||||
|
otherLayout.numColumns = 2;
|
||||||
|
otherLayout.marginWidth = 0;
|
||||||
|
otherLayout.marginHeight = 0;
|
||||||
|
otherComposite.setLayout(otherLayout);
|
||||||
|
otherComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
|
||||||
|
|
||||||
// other encoding field
|
// other encoding field
|
||||||
otherEncodingButton = SystemWidgetHelpers.createRadioButton(encodingGroup, null, SystemResources.RESID_HOST_ENCODING_OTHER_LABEL, SystemResources.RESID_HOST_ENCODING_OTHER_TOOLTIP);
|
otherEncodingButton = SystemWidgetHelpers.createRadioButton(otherComposite, null, SystemResources.RESID_HOST_ENCODING_OTHER_LABEL, SystemResources.RESID_HOST_ENCODING_OTHER_TOOLTIP);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.grabExcessHorizontalSpace = false;
|
data.grabExcessHorizontalSpace = false;
|
||||||
otherEncodingButton.setLayoutData(data);
|
otherEncodingButton.setLayoutData(data);
|
||||||
otherEncodingButton.addSelectionListener(buttonSelectionListener);
|
otherEncodingButton.addSelectionListener(buttonSelectionListener);
|
||||||
|
|
||||||
// other encoding combo
|
// other encoding combo
|
||||||
otherEncodingCombo = SystemWidgetHelpers.createCombo(encodingGroup, null, SystemResources.RESID_HOST_ENCODING_ENTER_TOOLTIP);
|
otherEncodingCombo = SystemWidgetHelpers.createCombo(otherComposite, null, SystemResources.RESID_HOST_ENCODING_ENTER_TOOLTIP);
|
||||||
data = new GridData();
|
data = new GridData();
|
||||||
data.horizontalAlignment = SWT.BEGINNING;
|
data.horizontalAlignment = SWT.BEGINNING;
|
||||||
data.grabExcessHorizontalSpace = true;
|
data.grabExcessHorizontalSpace = true;
|
||||||
|
@ -869,6 +903,8 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab
|
||||||
validateEncoding();
|
validateEncoding();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
SystemWidgetHelpers.createLabel(encodingGroup, ""); //$NON-NLS-1$
|
||||||
|
|
||||||
SystemWidgetHelpers.createLabel(composite_prompts, "", 2); //$NON-NLS-1$
|
SystemWidgetHelpers.createLabel(composite_prompts, "", 2); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue