diff options
author | Oleg Krasilnikov | 2007-06-13 10:17:23 +0000 |
---|---|---|
committer | Oleg Krasilnikov | 2007-06-13 10:17:23 +0000 |
commit | 2d157814307867e13980743ee4ddac2cffa7a77e (patch) | |
tree | b17740324ec97d4dceb3141ba9d2b10f9e81d2ef /core | |
parent | d32b85432246f16551d5f011e9ae2da845c0f9c5 (diff) | |
download | org.eclipse.cdt-2d157814307867e13980743ee4ddac2cffa7a77e.tar.gz org.eclipse.cdt-2d157814307867e13980743ee4ddac2cffa7a77e.tar.xz org.eclipse.cdt-2d157814307867e13980743ee4ddac2cffa7a77e.zip |
Bug #192187
Diffstat (limited to 'core')
3 files changed, 10 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java index 9123ed6e7ee..f8a8c27480f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPropertyDialog.java @@ -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(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CDTPrefUtil.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CDTPrefUtil.java index e1a4b57d735..aeba79a77ee 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CDTPrefUtil.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/CDTPrefUtil.java @@ -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 diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties index 6a637770598..d1c86f68760 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties @@ -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 |