Browse Source

SubversionAddIn: Fixed illegal cross-thread calls when showing the authentification dialogs. Fixed UI inconsistency in the LoginDialog.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2019 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Christian Hornung 19 years ago
parent
commit
36743ab771
  1. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/AuthentificationDialogs/LoginDialog.cs
  2. 8
      src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs

2
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/AuthentificationDialogs/LoginDialog.cs

@ -79,6 +79,7 @@ namespace ICSharpCode.Svn.Gui @@ -79,6 +79,7 @@ namespace ICSharpCode.Svn.Gui
this.Realm = realm;
this.MaySave = maySave;
((CheckBox)ControlDictionary["showPasswordCheckBox"]).CheckedChanged += new EventHandler(ShowPasswordCheckBoxCheckedChanged);
((TextBox)ControlDictionary["pwd1TextBox"]).PasswordChar = '*';
((TextBox)ControlDictionary["pwd2TextBox"]).PasswordChar = '*';
((TextBox)ControlDictionary["pwd1TextBox"]).TextChanged += new EventHandler(PasswordTextChanged);
@ -94,6 +95,7 @@ namespace ICSharpCode.Svn.Gui @@ -94,6 +95,7 @@ namespace ICSharpCode.Svn.Gui
((TextBox)ControlDictionary["pwd2TextBox"]).Enabled = false;
} else {
((TextBox)ControlDictionary["pwd1TextBox"]).PasswordChar = '*';
((TextBox)ControlDictionary["pwd2TextBox"]).Enabled = true;
}
}

8
src/AddIns/Misc/SubversionAddIn/Project/Src/SvnClient.cs

@ -242,7 +242,7 @@ namespace ICSharpCode.Svn @@ -242,7 +242,7 @@ namespace ICSharpCode.Svn
SimpleCredential PasswordPrompt(string realm, string userName, bool maySave)
{
using (LoginDialog loginDialog = new LoginDialog(realm, userName, maySave)) {
if (loginDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
if (WorkbenchSingleton.SafeThreadFunction<Form, DialogResult>(loginDialog.ShowDialog, WorkbenchSingleton.MainForm) == DialogResult.OK) {
return loginDialog.Credential;
}
}
@ -252,7 +252,7 @@ namespace ICSharpCode.Svn @@ -252,7 +252,7 @@ namespace ICSharpCode.Svn
SslServerTrustCredential SslServerTrustPrompt(string realm, SslFailures failures, SslServerCertificateInfo info, bool maySave)
{
using (SslServerTrustDialog sslServerTrustDialog = new SslServerTrustDialog(info, failures, maySave)) {
if (sslServerTrustDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
if (WorkbenchSingleton.SafeThreadFunction<Form, DialogResult>(sslServerTrustDialog.ShowDialog, WorkbenchSingleton.MainForm) == DialogResult.OK) {
return sslServerTrustDialog.Credential;
}
}
@ -262,7 +262,7 @@ namespace ICSharpCode.Svn @@ -262,7 +262,7 @@ namespace ICSharpCode.Svn
SslClientCertificatePasswordCredential ClientCertificatePasswordPrompt(string realm, bool maySave)
{
using (ClientCertPassphraseDialog clientCertPassphraseDialog = new ClientCertPassphraseDialog(realm, maySave)) {
if (clientCertPassphraseDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
if (WorkbenchSingleton.SafeThreadFunction<Form, DialogResult>(clientCertPassphraseDialog.ShowDialog, WorkbenchSingleton.MainForm) == DialogResult.OK) {
return clientCertPassphraseDialog.Credential;
}
}
@ -272,7 +272,7 @@ namespace ICSharpCode.Svn @@ -272,7 +272,7 @@ namespace ICSharpCode.Svn
SslClientCertificateCredential ClientCertificatePrompt(string realm, bool maySave)
{
using (ClientCertDialog clientCertDialog = new ClientCertDialog(realm, maySave)) {
if (clientCertDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
if (WorkbenchSingleton.SafeThreadFunction<Form, DialogResult>(clientCertDialog.ShowDialog, WorkbenchSingleton.MainForm) == DialogResult.OK) {
return clientCertDialog.Credential;
}
}

Loading…
Cancel
Save