fetcher: remove the Cloning prefix from the events to make more sense grammatically
This commit is contained in:
parent
92a1b1b627
commit
f07dd48d0d
|
@ -26,13 +26,13 @@ namespace SparkleLib {
|
|||
public class SparkleFetcher {
|
||||
|
||||
// TODO: remove 'cloning' prefix
|
||||
public delegate void CloningStartedEventHandler (object o, SparkleEventArgs args);
|
||||
public delegate void CloningFinishedEventHandler (object o, SparkleEventArgs args);
|
||||
public delegate void CloningFailedEventHandler (object o, SparkleEventArgs args);
|
||||
public delegate void StartedEventHandler (object o, SparkleEventArgs args);
|
||||
public delegate void FinishedEventHandler (object o, SparkleEventArgs args);
|
||||
public delegate void FailedEventHandler (object o, SparkleEventArgs args);
|
||||
|
||||
public event CloningStartedEventHandler CloningStarted;
|
||||
public event CloningFinishedEventHandler CloningFinished;
|
||||
public event CloningFailedEventHandler CloningFailed;
|
||||
public event StartedEventHandler Started;
|
||||
public event FinishedEventHandler Finished;
|
||||
public event FailedEventHandler Failed;
|
||||
|
||||
private string TargetFolder;
|
||||
private string RemoteOriginUrl;
|
||||
|
@ -54,8 +54,8 @@ namespace SparkleLib {
|
|||
Directory.Delete (TargetFolder, true);
|
||||
|
||||
|
||||
if (CloningStarted != null)
|
||||
CloningStarted (this, new SparkleEventArgs ("CloningStarted"));
|
||||
if (Started != null)
|
||||
Started (this, new SparkleEventArgs ("Started"));
|
||||
|
||||
SparkleGit git = new SparkleGit (SparklePaths.SparkleTmpPath,
|
||||
"clone \"" + RemoteOriginUrl + "\" " + "\"" + TargetFolder + "\"");
|
||||
|
@ -66,16 +66,16 @@ namespace SparkleLib {
|
|||
if (git.ExitCode != 0) {
|
||||
SparkleHelpers.DebugInfo ("Git", "[" + TargetFolder + "] Cloning failed");
|
||||
|
||||
if (CloningFailed != null)
|
||||
CloningFailed (this, new SparkleEventArgs ("CloningFailed"));
|
||||
if (Failed != null)
|
||||
Failed (this, new SparkleEventArgs ("CloningFailed"));
|
||||
} else {
|
||||
InstallConfiguration ();
|
||||
InstallExcludeRules ();
|
||||
|
||||
SparkleHelpers.DebugInfo ("Git", "[" + TargetFolder + "] Repository cloned");
|
||||
|
||||
if (CloningFinished != null)
|
||||
CloningFinished (this, new SparkleEventArgs ("CloningFinished"));
|
||||
if (Finished != null)
|
||||
Finished (this, new SparkleEventArgs ("Finished"));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -985,7 +985,7 @@ namespace SparkleShare {
|
|||
if (i > 1)
|
||||
target_folder_name += " (" + i + ")";
|
||||
|
||||
fetcher.CloningFinished += delegate {
|
||||
fetcher.Finished += delegate {
|
||||
EnableHostKeyCheckingForHost (host);
|
||||
|
||||
// Needed to do the moving
|
||||
|
@ -1009,7 +1009,7 @@ namespace SparkleShare {
|
|||
};
|
||||
|
||||
|
||||
fetcher.CloningFailed += delegate {
|
||||
fetcher.Failed += delegate {
|
||||
EnableHostKeyCheckingForHost (host);
|
||||
|
||||
if (Directory.Exists (tmp_folder)) {
|
||||
|
|
Loading…
Reference in a new issue