repo statusicon: add error type: 'project not found'

This commit is contained in:
Hylke Bons 2012-11-23 00:20:43 +00:00
parent cf5587c76b
commit 63fde5a7d9
4 changed files with 13 additions and 5 deletions

View file

@ -671,6 +671,9 @@ namespace SparkleLib.Git {
} else if (line.StartsWith ("error: Disk space exceeded")) {
Error = ErrorStatus.DiskSpaceExcedeed;
} else if (line.EndsWithWith ("does not appear to be a git repository")) {
Error = ErrorStatus.NotFound;
}
if (Error != ErrorStatus.None) {

View file

@ -38,7 +38,8 @@ namespace SparkleLib {
HostIdentityChanged,
AuthenticationFailed,
DiskSpaceExcedeed,
LockedFiles
LockedFiles,
NotFound
}

View file

@ -155,10 +155,11 @@ namespace SparkleShare {
this.folder_item = new NSMenuItem () {
Title = "SparkleShare",
Image = this.sparkleshare_image,
Image.Size = new SizeF (16, 16),
Enabled = true
}
};
this.folder_item.Image = this.sparkleshare_image;
this.folder_item.Image.Size = new SizeF (16, 16);
this.add_item = new NSMenuItem () {
Title = "Add Hosted Project…",

View file

@ -272,9 +272,12 @@ namespace SparkleShare {
} else if (repo.Error == ErrorStatus.DiskSpaceExcedeed) {
FolderErrors [i] = "Host is out of disk space";
} else if (repo.Error == ErrorStatus.LockedFiles) {
FolderErrors [i] = "Some local files are locked or in use";
} else if (repo.Error == ErrorStatus.NotFound) {
FolderErrors [i] = "No such project found";
} else {
FolderErrors [i] = "";