1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Patch for bug 187423 by Jason Montojo - translated string truncated in Content Assist preference page

This commit is contained in:
Vivian Kong 2007-05-17 20:29:26 +00:00
parent 8ead195aa7
commit 37073b19b7
2 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2006 QNX Software Systems and others. * Copyright (c) 2002, 2007 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -7,6 +7,7 @@
* *
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* IBM Corporation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.ui.preferences; package org.eclipse.cdt.internal.ui.preferences;
@ -105,6 +106,8 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I
} }
}; };
protected static final int NO_TEXT_LIMIT = -1;
protected Button addRadioButton(Composite parent, String label, String key, int indentation) { protected Button addRadioButton(Composite parent, String label, String key, int indentation) {
Button radioButton = new Button(parent, SWT.RADIO); Button radioButton = new Button(parent, SWT.RADIO);
radioButton.setText(label); radioButton.setText(label);
@ -181,9 +184,11 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I
Combo comboControl = new Combo(composite, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY); // TODO: When will the combo be disposed? Combo comboControl = new Combo(composite, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY); // TODO: When will the combo be disposed?
gd = new GridData(GridData.HORIZONTAL_ALIGN_END); gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
gd.widthHint = convertWidthInCharsToPixels(textLimit + 1); if (textLimit != NO_TEXT_LIMIT) {
gd.widthHint = convertWidthInCharsToPixels(textLimit + 1);
comboControl.setTextLimit(textLimit);
}
comboControl.setLayoutData(gd); comboControl.setLayoutData(gd);
comboControl.setTextLimit(textLimit);
fComboBoxes.put(comboControl, key); fComboBoxes.put(comboControl, key);
comboControl.addModifyListener(fComboBoxListener); // TODO: When will the listener be removed? comboControl.addModifyListener(fComboBoxListener); // TODO: When will the listener be removed?

View file

@ -8,6 +8,7 @@
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* Anton Leherbauer (Wind River Systems) * Anton Leherbauer (Wind River Systems)
* IBM Corporation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.ui.preferences; package org.eclipse.cdt.internal.ui.preferences;
@ -110,7 +111,7 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage {
// addCheckBox(sortingGroup, label, ContentAssistPreference.ORDER_PROPOSALS, 0); // addCheckBox(sortingGroup, label, ContentAssistPreference.ORDER_PROPOSALS, 0);
label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_proposalFilterSelect ; label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_proposalFilterSelect ;
addComboBox(sortingGroup, label, ContentAssistPreference.PROPOSALS_FILTER, 20, 0); addComboBox(sortingGroup, label, ContentAssistPreference.PROPOSALS_FILTER, NO_TEXT_LIMIT, 0);
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// The following items are grouped for Auto Activation // The following items are grouped for Auto Activation