Code cleanup

This commit is contained in:
Hylke Bons 2011-06-03 00:35:51 +01:00
parent e0b622b8ef
commit 85be7121ab
3 changed files with 28 additions and 35 deletions

View file

@ -34,14 +34,7 @@ namespace SparkleLib {
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 remote_timer = new Timer () { Interval = 60000 };
@ -51,6 +44,15 @@ namespace SparkleLib {
private bool has_changed = false;
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 string Identifier { get; }
public abstract string CurrentRevision { get; }

View file

@ -215,29 +215,23 @@ namespace SparkleShare {
AddressTextField.Enabled = (ServerType == 0);
switch (ServerType) {
case 0:
AddressTextField.StringValue = "";
FolderNameHelpLabel.StringValue = "e.g. rupert/website-design";
break;
case 1:
AddressTextField.StringValue = "ssh://git@github.com/";
FolderNameHelpLabel.StringValue = "e.g. rupert/website-design";
break;
case 2:
AddressTextField.StringValue = "ssh://git@gitorious.org/";
FolderNameHelpLabel.StringValue = "e.g. project/website-design";
break;
case 3:
AddressTextField.StringValue = "ssh://git@gnome.org/git/";
FolderNameHelpLabel.StringValue = "e.g. gnome-icon-theme";
break;
case 0:
AddressTextField.StringValue = "";
FolderNameHelpLabel.StringValue = "e.g. rupert/website-design";
break;
case 1:
AddressTextField.StringValue = "ssh://git@github.com/";
FolderNameHelpLabel.StringValue = "e.g. rupert/website-design";
break;
case 2:
AddressTextField.StringValue = "ssh://git@gitorious.org/";
FolderNameHelpLabel.StringValue = "e.g. project/website-design";
break;
case 3:
AddressTextField.StringValue = "ssh://git@gnome.org/git/";
FolderNameHelpLabel.StringValue = "e.g. gnome-icon-theme";
break;
}
}
@ -251,12 +245,9 @@ namespace SparkleShare {
SyncButton.Enabled = true;
} else {
} else {
SyncButton.Enabled = false;
}
}
});
};

View file

@ -30,6 +30,7 @@ namespace SparkleShare {
private DirectoryInfo last_changed;
public SparkleMacWatcher (string path)
{
Thread thread = new Thread (new ThreadStart (delegate {
@ -75,4 +76,3 @@ namespace SparkleShare {
}
}
}