mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Bug #178603: externalization and resize
This commit is contained in:
parent
90bb8e6612
commit
d9ed709128
4 changed files with 14 additions and 10 deletions
|
@ -63,8 +63,8 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
public static final Image IMG_FS = CPluginImages.get(CPluginImages.IMG_FILESYSTEM);
|
public static final Image IMG_FS = CPluginImages.get(CPluginImages.IMG_FILESYSTEM);
|
||||||
public static final Image IMG_WS = CPluginImages.get(CPluginImages.IMG_WORKSPACE);
|
public static final Image IMG_WS = CPluginImages.get(CPluginImages.IMG_WORKSPACE);
|
||||||
public static final Image IMG_MK = CPluginImages.get(CPluginImages.IMG_OBJS_MACRO);
|
public static final Image IMG_MK = CPluginImages.get(CPluginImages.IMG_OBJS_MACRO);
|
||||||
private static final String ALL = "[All]"; //$NON-NLS-1$
|
private static final String ALL = UIMessages.getString("AbstractExportTab.0"); //$NON-NLS-1$
|
||||||
private static final String LIST = "[List]"; //$NON-NLS-1$
|
private static final String LIST = UIMessages.getString("AbstractExportTab.1"); //$NON-NLS-1$
|
||||||
private static Map names_l = new HashMap();
|
private static Map names_l = new HashMap();
|
||||||
private static Map names_t = new HashMap();
|
private static Map names_t = new HashMap();
|
||||||
private static String[] names_ls;
|
private static String[] names_ls;
|
||||||
|
@ -93,7 +93,7 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
usercomp.setLayout(new GridLayout(2, false));
|
usercomp.setLayout(new GridLayout(2, false));
|
||||||
table = new Table(usercomp, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.FULL_SELECTION);
|
table = new Table(usercomp, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.FULL_SELECTION);
|
||||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||||
gd.widthHint = 255;
|
gd.minimumWidth = 255;
|
||||||
table.setLayoutData(gd);
|
table.setLayoutData(gd);
|
||||||
table.setHeaderVisible(true);
|
table.setHeaderVisible(true);
|
||||||
table.setLinesVisible(true);
|
table.setLinesVisible(true);
|
||||||
|
@ -214,7 +214,7 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: // add
|
case 0: // add
|
||||||
dlg = new ExpDialog(usercomp.getShell(), true,
|
dlg = new ExpDialog(usercomp.getShell(), true,
|
||||||
"Create", EMPTY_STR, EMPTY_STR, cfg, //$NON-NLS-1$
|
UIMessages.getString("AbstractExportTab.2"), EMPTY_STR, EMPTY_STR, cfg, //$NON-NLS-1$
|
||||||
null, null, getKind(), names_ls, names_ts, namesList, false);
|
null, null, getKind(), names_ls, names_ts, namesList, false);
|
||||||
if (dlg.open()) {
|
if (dlg.open()) {
|
||||||
ent[0] = doAdd(dlg.text1.trim(), dlg.text2.trim(), dlg.check2);
|
ent[0] = doAdd(dlg.text1.trim(), dlg.text2.trim(), dlg.check2);
|
||||||
|
@ -243,7 +243,7 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
s1 = s2 = old.getName();
|
s1 = s2 = old.getName();
|
||||||
boolean isWsp = (old.entry.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH) != 0;
|
boolean isWsp = (old.entry.getFlags() & ICSettingEntry.VALUE_WORKSPACE_PATH) != 0;
|
||||||
dlg = new ExpDialog(usercomp.getShell(), false,
|
dlg = new ExpDialog(usercomp.getShell(), false,
|
||||||
"Edit", s1, s2, cfg, //$NON-NLS-1$
|
UIMessages.getString("AbstractExportTab.3"), s1, s2, cfg, //$NON-NLS-1$
|
||||||
id2name(old.setting.getCompatibleLanguageIds(), names_l),
|
id2name(old.setting.getCompatibleLanguageIds(), names_l),
|
||||||
id2name(old.setting.getCompatibleContentTypeIds(), names_t),
|
id2name(old.setting.getCompatibleContentTypeIds(), names_t),
|
||||||
getKind(), names_ls, names_ts, null, isWsp);
|
getKind(), names_ls, names_ts, null, isWsp);
|
||||||
|
|
|
@ -40,6 +40,8 @@ public abstract class AbstractPropertyDialog extends Dialog {
|
||||||
|
|
||||||
public AbstractPropertyDialog(Shell _parent, String title) {
|
public AbstractPropertyDialog(Shell _parent, String title) {
|
||||||
super(_parent, 0);
|
super(_parent, 0);
|
||||||
|
this.getStyle();
|
||||||
|
|
||||||
parent = _parent;
|
parent = _parent;
|
||||||
this.setText(title);
|
this.setText(title);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +61,7 @@ public abstract class AbstractPropertyDialog extends Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean open () {
|
public boolean open () {
|
||||||
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
|
shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE);
|
||||||
shell.setText(getText());
|
shell.setText(getText());
|
||||||
createDialogArea(shell);
|
createDialogArea(shell);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.eclipse.swt.events.ModifyEvent;
|
||||||
import org.eclipse.swt.events.ModifyListener;
|
import org.eclipse.swt.events.ModifyListener;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
|
@ -95,6 +94,7 @@ public class ExpDialog extends AbstractPropertyDialog {
|
||||||
txt1 = new Text(c, SWT.SINGLE | SWT.BORDER);
|
txt1 = new Text(c, SWT.SINGLE | SWT.BORDER);
|
||||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
gd.horizontalSpan = 3;
|
gd.horizontalSpan = 3;
|
||||||
|
gd.widthHint = 300;
|
||||||
txt1.setLayoutData(gd);
|
txt1.setLayoutData(gd);
|
||||||
txt1.addModifyListener(new ModifyListener() {
|
txt1.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
|
@ -108,6 +108,7 @@ public class ExpDialog extends AbstractPropertyDialog {
|
||||||
txt2 = new Text(c, SWT.SINGLE | SWT.BORDER);
|
txt2 = new Text(c, SWT.SINGLE | SWT.BORDER);
|
||||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
gd.horizontalSpan = 2;
|
gd.horizontalSpan = 2;
|
||||||
|
gd.widthHint = 300;
|
||||||
txt2.setLayoutData(gd);
|
txt2.setLayoutData(gd);
|
||||||
txt2.addModifyListener(new ModifyListener() {
|
txt2.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
|
@ -209,9 +210,6 @@ public class ExpDialog extends AbstractPropertyDialog {
|
||||||
|
|
||||||
c.getShell().setDefaultButton(b_ok);
|
c.getShell().setDefaultButton(b_ok);
|
||||||
c.pack();
|
c.pack();
|
||||||
Rectangle r = shell.getBounds();
|
|
||||||
r.width = 420;
|
|
||||||
shell.setBounds(r);
|
|
||||||
setButtons();
|
setButtons();
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -398,6 +398,10 @@ AbstractLangsListTab.2=Export
|
||||||
AbstractLangsListTab.3=\ [exp]
|
AbstractLangsListTab.3=\ [exp]
|
||||||
AbstractPrefPage.0=Preference settings will be applied to new projects\n
|
AbstractPrefPage.0=Preference settings will be applied to new projects\n
|
||||||
AbstractPrefPage.1=only in case when there was no toolchains selected.
|
AbstractPrefPage.1=only in case when there was no toolchains selected.
|
||||||
|
AbstractExportTab.0=[All]
|
||||||
|
AbstractExportTab.1=[List]
|
||||||
|
AbstractExportTab.2=Create
|
||||||
|
AbstractExportTab.3=Edit
|
||||||
CLocationTab.0=Filter (empty)
|
CLocationTab.0=Filter (empty)
|
||||||
CLocationTab.1=Filter (
|
CLocationTab.1=Filter (
|
||||||
CLocationTab.2=,
|
CLocationTab.2=,
|
||||||
|
|
Loading…
Add table
Reference in a new issue