Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java10
2 files changed, 9 insertions, 3 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java
index 6917da072..21c08f45f 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java
+++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizard.java
@@ -86,7 +86,7 @@ public final class IRCConnectWizard extends Wizard implements IConnectWizard {
page.saveComboItems();
new AsynchContainerConnectAction(container, targetID, connectContext, null, new Runnable() {
public void run() {
- cachePassword(connectID,password);
+ cachePassword(page.getPasswordKeyFromUserName(connectID),password);
}}).run();
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java
index 0c06d2bff..f23af546c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java
+++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java
@@ -55,7 +55,6 @@ final class IRCConnectWizardPage extends WizardPage {
private void verify() {
String text = connectText.getText();
- passwordText.setText("");
if (text.equals("")) { //$NON-NLS-1$
updateStatus(Messages.IRCConnectWizardPage_STATUS_MESSAGE_EMPTY);
} else if (text.indexOf('@') == -1) {
@@ -66,8 +65,14 @@ final class IRCConnectWizardPage extends WizardPage {
}
}
+ protected String getPasswordKeyFromUserName(String username) {
+ if (username == null || username.equals("")) return null;
+ else {
+ return username.substring(0,username.indexOf("/"));
+ }
+ }
protected void restorePassword(String username) {
- PasswordCacheHelper pwStorage = new PasswordCacheHelper(username);
+ PasswordCacheHelper pwStorage = new PasswordCacheHelper(getPasswordKeyFromUserName(username));
String pw = pwStorage.retrievePassword();
if (pw != null) {
passwordText.setText(pw);
@@ -94,6 +99,7 @@ final class IRCConnectWizardPage extends WizardPage {
verify();
}
public void widgetSelected(SelectionEvent e) {
+ passwordText.setText("");
verify();
}});

Back to the top