Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Kuntz2020-01-14 08:09:32 +0000
committerBenedikt Kuntz2020-01-14 08:09:32 +0000
commit28599b500d1ee10067274aa32d359cb8d4b966a0 (patch)
tree942cffd52c4a93ea34fdb29760a4941454b92e30
parentbcbbe5ded811e361a5ed228f2ac0a870f05f089c (diff)
downloadeclipse.platform.ui.tools-28599b500d1ee10067274aa32d359cb8d4b966a0.tar.gz
eclipse.platform.ui.tools-28599b500d1ee10067274aa32d359cb8d4b966a0.tar.xz
eclipse.platform.ui.tools-28599b500d1ee10067274aa32d359cb8d4b966a0.zip
Bug 559117 - Add ToolbarItem command dialog should be centeredI20200114-1805
Don't persist dialog origin, set dialog bounds strategy to DIALOG_PERSISTSIZE only for all SaveDialogBoundsSettingsDialogs Change-Id: I92af7c37c47a3fff070c34fe5cd42c0a78738507 Signed-off-by: Benedikt Kuntz <benedikt.kuntz@airbus.com>
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java
index 39e29cbc..3299b14e 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java
@@ -25,8 +25,6 @@ import org.osgi.service.prefs.Preferences;
public abstract class SaveDialogBoundsSettingsDialog extends TitleAreaDialog {
- private static final String DIALOG_ORIGIN_X = "DIALOG_X_ORIGIN"; //$NON-NLS-1$
- private static final String DIALOG_ORIGIN_Y = "DIALOG_Y_ORIGIN"; //$NON-NLS-1$
private static final String DIALOG_WIDTH = "DIALOG_WIDTH"; //$NON-NLS-1$
private static final String DIALOG_HEIGHT = "DIALOG_HEIGHT"; //$NON-NLS-1$
private static final int DIALOG_MINIMUM_HEIGHT = 300;
@@ -41,15 +39,11 @@ public abstract class SaveDialogBoundsSettingsDialog extends TitleAreaDialog {
dialogSettings.put(DIALOG_HEIGHT, preferences.getInt(DIALOG_HEIGHT, -1));
dialogSettings.put(DIALOG_WIDTH, preferences.getInt(DIALOG_WIDTH, -1));
- dialogSettings.put(DIALOG_ORIGIN_X, preferences.getInt(DIALOG_ORIGIN_X, -1));
- dialogSettings.put(DIALOG_ORIGIN_Y, preferences.getInt(DIALOG_ORIGIN_Y, -1));
}
private void saveDialogSettings() {
preferences.put(DIALOG_HEIGHT, dialogSettings.get(DIALOG_HEIGHT));
preferences.put(DIALOG_WIDTH, dialogSettings.get(DIALOG_WIDTH));
- preferences.put(DIALOG_ORIGIN_X, dialogSettings.get(DIALOG_ORIGIN_X));
- preferences.put(DIALOG_ORIGIN_Y, dialogSettings.get(DIALOG_ORIGIN_Y));
try {
preferences.flush();
} catch (BackingStoreException e) {
@@ -80,6 +74,11 @@ public abstract class SaveDialogBoundsSettingsDialog extends TitleAreaDialog {
return dialogSettings;
}
+ @Override
+ protected int getDialogBoundsStrategy() {
+ return DIALOG_PERSISTSIZE;
+ }
+
public Preferences getPreferences() {
return preferences;
}

Back to the top