Moved the code to kill the SSH Agent to the SparkleControllerBase instead
This commit is contained in:
parent
f6941873ce
commit
b2289fb65b
|
@ -1128,6 +1128,10 @@ namespace SparkleShare {
|
||||||
Environment.Exit (0);
|
Environment.Exit (0);
|
||||||
#else
|
#else
|
||||||
System.Windows.Forms.Application.Exit ();
|
System.Windows.Forms.Application.Exit ();
|
||||||
|
|
||||||
|
// Also kill the SSH_AGENT
|
||||||
|
int pid = Int32.Parse(System.Environment.GetEnvironmentVariable("SSH_AGENT_PID"));
|
||||||
|
Process.GetProcessById(pid).Kill();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1135,13 +1139,10 @@ namespace SparkleShare {
|
||||||
// Checks to see if an email address is valid
|
// Checks to see if an email address is valid
|
||||||
public bool IsValidEmail (string email)
|
public bool IsValidEmail (string email)
|
||||||
{
|
{
|
||||||
Regex regex = new Regex (@"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$", RegexOptions.IgnoreCase);
|
Regex regex = new Regex(@"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$", RegexOptions.IgnoreCase);
|
||||||
return regex.IsMatch (email);
|
return regex.IsMatch (email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void AddNoteToFolder (string folder_name, string revision, string note)
|
public void AddNoteToFolder (string folder_name, string revision, string note)
|
||||||
{
|
{
|
||||||
folder_name = folder_name.Replace ("%20", " ");
|
folder_name = folder_name.Replace ("%20", " ");
|
||||||
|
@ -1153,9 +1154,6 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private string [] tango_palette = new string [] {"#eaab00", "#e37222",
|
private string [] tango_palette = new string [] {"#eaab00", "#e37222",
|
||||||
"#3892ab", "#33c2cb", "#19b271", "#9eab05", "#8599a8", "#9ca696",
|
"#3892ab", "#33c2cb", "#19b271", "#9eab05", "#8599a8", "#9ca696",
|
||||||
"#b88454", "#cc0033", "#8f6678", "#8c6cd0", "#796cbf", "#4060af",
|
"#b88454", "#cc0033", "#8f6678", "#8c6cd0", "#796cbf", "#4060af",
|
||||||
|
|
|
@ -65,8 +65,6 @@ namespace SparkleShare {
|
||||||
System.Environment.SetEnvironmentVariable ("HOME", Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"));
|
System.Environment.SetEnvironmentVariable ("HOME", Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"));
|
||||||
|
|
||||||
StartSshAgent();
|
StartSshAgent();
|
||||||
// Start the agent but also make it stop when application is qutting
|
|
||||||
Application.ApplicationExit += new EventHandler(this.StopSshAgent);
|
|
||||||
|
|
||||||
base.Initialize ();
|
base.Initialize ();
|
||||||
}
|
}
|
||||||
|
@ -190,12 +188,6 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StopSshAgent (object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
int pid = Int32.Parse(System.Environment.GetEnvironmentVariable("SSH_AGENT_PID"));
|
|
||||||
Process.GetProcessById(pid).Kill();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue