mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Bug #192187
This commit is contained in:
parent
d32b854322
commit
2d15781430
4 changed files with 18 additions and 6 deletions
|
@ -31,6 +31,7 @@ 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;
|
||||
|
@ -66,6 +67,10 @@ 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));
|
||||
|
@ -105,6 +110,7 @@ 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;
|
||||
|
@ -126,6 +132,7 @@ 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;
|
||||
|
@ -144,6 +151,7 @@ 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,11 +67,13 @@ public abstract class AbstractPropertyDialog extends Dialog {
|
|||
createDialogArea(shell);
|
||||
|
||||
// center window
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
shell.open();
|
||||
Display display = parent.getDisplay();
|
||||
|
|
|
@ -26,7 +26,8 @@ public class CDTPrefUtil {
|
|||
public static final String KEY_MULTI = "properties.multi.config.enable"; //$NON-NLS-1$
|
||||
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_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
|
||||
|
|
|
@ -345,6 +345,7 @@ PropertyPageDefsTab.11=Save property dialog bounds
|
|||
PropertyPageDefsTab.12=Save size and position
|
||||
PropertyPageDefsTab.13=Save size only
|
||||
PropertyPageDefsTab.14=Do not save at all
|
||||
PropertyPageDefsTab.15=Center dialogs on screen
|
||||
PropertyPageDefsTab.2=Enable multiple configurations setting
|
||||
PropertyPageDefsTab.4=Display "Tool chain editor" tab
|
||||
PropertyPageDefsTab.5=Discovery profiles naming rule
|
||||
|
|
Loading…
Add table
Reference in a new issue