diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2012-02-14 19:20:53 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2012-02-14 19:20:53 +0400 |
commit | fbecd9df198f834bebe84aabed5066c33d6d8249 (patch) | |
tree | 57bf22ebb859c209418d1cc89d056cb5e9cca5e4 | |
parent | aa6453428cf04b0cbf347e7d5eb2013de0cc490a (diff) |
[VersionControl] Correctly populate the username in the Credentials Dialog
We should hook into the 'Changed' event before setting the default text, that
way the username item will be populated with the value too
-rw-r--r-- | main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/CredentialsDialog.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/CredentialsDialog.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/CredentialsDialog.cs index 58957a2b52..bd78d0e235 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/CredentialsDialog.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/CredentialsDialog.cs @@ -82,15 +82,15 @@ namespace MonoDevelop.VersionControl.Git e.ActivatesDefault = true; if (cred.IsValueSecure ()) e.Visibility = false; - if (c is CredentialItem.Username) - e.Text = uri.GetUser () ?? ""; - e.Changed += delegate { if (cred is CredentialItem.StringType) ((CredentialItem.StringType)cred).SetValue (e.Text); else ((CredentialItem.CharArrayType)cred).SetValue (e.Text.ToCharArray ()); }; + + if (c is CredentialItem.Username) + e.Text = uri.GetUser () ?? ""; } if (editor != null) { table.Attach (editor, 1, 2, r, r + 1); |