mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 07:15:39 +02:00
Bug #192187
This commit is contained in:
parent
5f0a6852c9
commit
fe8f413c4a
3 changed files with 5 additions and 16 deletions
|
@ -31,7 +31,6 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
private Button show_mng;
|
||||
private Button show_tool;
|
||||
private Button show_exp;
|
||||
private Button center_dlg;
|
||||
|
||||
private Button b_0;
|
||||
private Button b_1;
|
||||
|
@ -67,10 +66,6 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
show_exp.setText(UIMessages.getString("PropertyPageDefsTab.10")); //$NON-NLS-1$
|
||||
show_exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
||||
center_dlg = new Button(usercomp, SWT.CHECK);
|
||||
center_dlg.setText(UIMessages.getString("PropertyPageDefsTab.15")); //$NON-NLS-1$
|
||||
center_dlg.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
||||
Group saveGrp = new Group(usercomp, SWT.NONE);
|
||||
saveGrp.setText(UIMessages.getString("PropertyPageDefsTab.11")); //$NON-NLS-1$
|
||||
saveGrp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
@ -110,7 +105,6 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
show_mng.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOMNG));
|
||||
show_tool.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOTOOLM));
|
||||
show_exp.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_EXPORT));
|
||||
center_dlg.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOCENTER));
|
||||
|
||||
switch (CDTPrefUtil.getInt(CDTPrefUtil.KEY_DISC_NAMES)) {
|
||||
case CDTPrefUtil.DISC_NAMING_UNIQUE_OR_BOTH: b_0.setSelection(true); break;
|
||||
|
@ -132,7 +126,6 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOMNG, !show_mng.getSelection());
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOTOOLM, !show_tool.getSelection());
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_EXPORT, show_exp.getSelection());
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOCENTER, !center_dlg.getSelection());
|
||||
int x = 0;
|
||||
if (b_1.getSelection()) x = 1;
|
||||
else if (b_2.getSelection()) x = 2;
|
||||
|
@ -151,7 +144,6 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
show_mng.setSelection(true);
|
||||
show_tool.setSelection(true);
|
||||
show_exp.setSelection(false);
|
||||
center_dlg.setSelection(true);
|
||||
b_0.setSelection(true);
|
||||
b_1.setSelection(false);
|
||||
b_2.setSelection(false);
|
||||
|
|
|
@ -67,13 +67,11 @@ public abstract class AbstractPropertyDialog extends Dialog {
|
|||
createDialogArea(shell);
|
||||
|
||||
// center window
|
||||
if (!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOCENTER)) {
|
||||
Rectangle r1 = shell.getDisplay().getBounds();
|
||||
Rectangle r2 = shell.getBounds();
|
||||
int x = r1.width / 2 - r2.width / 2;
|
||||
int y = r1.height / 2 - r2.height / 2;
|
||||
shell.setBounds(x, y, r2.width, r2.height);
|
||||
}
|
||||
Rectangle r1 = parent.getBounds();
|
||||
Rectangle r2 = shell.getBounds();
|
||||
int x = r1.x + (r1.width - r2.width) / 2;
|
||||
int y = r1.y + (r1.height - r2.height) / 2;
|
||||
shell.setBounds(x, y, r2.width, r2.height);
|
||||
|
||||
shell.open();
|
||||
Display display = parent.getDisplay();
|
||||
|
|
|
@ -27,7 +27,6 @@ public class CDTPrefUtil {
|
|||
public static final String KEY_DTREE = "properties.data.hierarchy.enable"; //$NON-NLS-1$
|
||||
public static final String KEY_NOTOOLM = "properties.toolchain.modification.disable"; //$NON-NLS-1$
|
||||
public static final String KEY_EXPORT = "properties.export.page.enable"; //$NON-NLS-1$
|
||||
public static final String KEY_NOCENTER = "properties.dialog.center.disable"; //$NON-NLS-1$
|
||||
// string keys
|
||||
public static final String KEY_PREFTC = "wizard.preferred.toolchains"; //$NON-NLS-1$
|
||||
// integer keys
|
||||
|
|
Loading…
Add table
Reference in a new issue