Code cleanup
This commit is contained in:
parent
8439e6096f
commit
1dcecf13a6
|
@ -34,14 +34,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public abstract class SparkleRepoBase {
|
public abstract class SparkleRepoBase {
|
||||||
|
|
||||||
public readonly SparkleBackend Backend;
|
|
||||||
public readonly string LocalPath;
|
|
||||||
public readonly string Name;
|
|
||||||
|
|
||||||
protected SyncStatus status;
|
|
||||||
protected bool is_buffering = false;
|
|
||||||
protected bool is_polling = true;
|
|
||||||
protected bool server_online = true;
|
|
||||||
|
|
||||||
private Timer local_timer = new Timer () { Interval = 250 };
|
private Timer local_timer = new Timer () { Interval = 250 };
|
||||||
private Timer remote_timer = new Timer () { Interval = 60000 };
|
private Timer remote_timer = new Timer () { Interval = 60000 };
|
||||||
|
@ -51,6 +44,15 @@ namespace SparkleLib {
|
||||||
private bool has_changed = false;
|
private bool has_changed = false;
|
||||||
private Object change_lock = new Object ();
|
private Object change_lock = new Object ();
|
||||||
|
|
||||||
|
protected SyncStatus status;
|
||||||
|
protected bool is_buffering = false;
|
||||||
|
protected bool is_polling = true;
|
||||||
|
protected bool server_online = true;
|
||||||
|
|
||||||
|
public readonly SparkleBackend Backend;
|
||||||
|
public readonly string LocalPath;
|
||||||
|
public readonly string Name;
|
||||||
|
|
||||||
public abstract bool AnyDifferences { get; }
|
public abstract bool AnyDifferences { get; }
|
||||||
public abstract string Identifier { get; }
|
public abstract string Identifier { get; }
|
||||||
public abstract string CurrentRevision { get; }
|
public abstract string CurrentRevision { get; }
|
||||||
|
|
|
@ -215,29 +215,23 @@ namespace SparkleShare {
|
||||||
AddressTextField.Enabled = (ServerType == 0);
|
AddressTextField.Enabled = (ServerType == 0);
|
||||||
|
|
||||||
switch (ServerType) {
|
switch (ServerType) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
AddressTextField.StringValue = "";
|
AddressTextField.StringValue = "";
|
||||||
FolderNameHelpLabel.StringValue = "e.g. ‘rupert/website-design’";
|
FolderNameHelpLabel.StringValue = "e.g. ‘rupert/website-design’";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
AddressTextField.StringValue = "ssh://git@github.com/";
|
AddressTextField.StringValue = "ssh://git@github.com/";
|
||||||
FolderNameHelpLabel.StringValue = "e.g. ‘rupert/website-design’";
|
FolderNameHelpLabel.StringValue = "e.g. ‘rupert/website-design’";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
AddressTextField.StringValue = "ssh://git@gitorious.org/";
|
AddressTextField.StringValue = "ssh://git@gitorious.org/";
|
||||||
FolderNameHelpLabel.StringValue = "e.g. ‘project/website-design’";
|
FolderNameHelpLabel.StringValue = "e.g. ‘project/website-design’";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
AddressTextField.StringValue = "ssh://git@gnome.org/git/";
|
AddressTextField.StringValue = "ssh://git@gnome.org/git/";
|
||||||
FolderNameHelpLabel.StringValue = "e.g. ‘gnome-icon-theme’";
|
FolderNameHelpLabel.StringValue = "e.g. ‘gnome-icon-theme’";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,11 +246,8 @@ namespace SparkleShare {
|
||||||
SyncButton.Enabled = true;
|
SyncButton.Enabled = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
SyncButton.Enabled = false;
|
SyncButton.Enabled = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
private DirectoryInfo last_changed;
|
private DirectoryInfo last_changed;
|
||||||
|
|
||||||
|
|
||||||
public SparkleMacWatcher (string path)
|
public SparkleMacWatcher (string path)
|
||||||
{
|
{
|
||||||
Thread thread = new Thread (new ThreadStart (delegate {
|
Thread thread = new Thread (new ThreadStart (delegate {
|
||||||
|
@ -75,4 +76,3 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue