Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-06-11 03:50:21 +0000
committerEike Stepper2012-06-11 03:50:21 +0000
commit912124f7f602c766f25ededa9af1e51c459503be (patch)
tree1671432224b64731f807dd4bcd2178c3518ab0d6 /plugins/org.eclipse.net4j.util.ui
parentc692bce3beebd46f853b63649ac309f7ed54b5bb (diff)
downloadcdo-912124f7f602c766f25ededa9af1e51c459503be.tar.gz
cdo-912124f7f602c766f25ededa9af1e51c459503be.tar.xz
cdo-912124f7f602c766f25ededa9af1e51c459503be.zip
[380629] Design a default Security model
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380629
Diffstat (limited to 'plugins/org.eclipse.net4j.util.ui')
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java
index 57adda365b..8eafa1861a 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java
@@ -36,9 +36,9 @@ public class CredentialsDialog extends BaseDialog<Viewer>
private static final String MESSAGE = Messages.getString("CredentialsDialog_1"); //$NON-NLS-1$
- private static final int WIDTH = 300;
+ private static final int WIDTH = 310;
- private static final int HEIGHT = 220;
+ private static final int HEIGHT = 225;
private Text userIDControl;
@@ -57,12 +57,19 @@ public class CredentialsDialog extends BaseDialog<Viewer>
super.configureShell(newShell);
Composite parent = newShell.getParent();
- Rectangle bounds = parent.getBounds();
-
- int x = bounds.x + (bounds.width >> 1) - (WIDTH >> 1);
- int y = bounds.y + (bounds.height >> 1) - (HEIGHT >> 1);
-
- newShell.setBounds(x, y, WIDTH, HEIGHT);
+ if (parent != null)
+ {
+ Rectangle bounds = parent.getBounds();
+
+ int x = bounds.x + (bounds.width >> 1) - (WIDTH >> 1);
+ int y = bounds.y + (bounds.height >> 1) - (HEIGHT >> 1);
+
+ newShell.setBounds(x, y, WIDTH, HEIGHT);
+ }
+ else
+ {
+ newShell.setSize(WIDTH, HEIGHT);
+ }
}
public IPasswordCredentials getCredentials()

Back to the top