void OnDoapDownloaderFinished (HttpDownloader obj)
{
if (obj.State.FailureException != null) {
if (verbose) {
DisplayMessage (Catalog.GetString ("Can't check for updates"),
Catalog.GetString ("We're currently not able to check if there's a new version available. Please try again later."), MessageType.Error);
}
} else {
var doap = XDocument.Load (temp_doap_path);
var ns_doap = XNamespace.Get ("http://usefulinc.com/ns/doap#");
unstable_version = doap.Descendants (ns_doap + "Version")
.Where (p => p.Element (ns_doap + "branch").Value.StartsWith ("master"))
.Select (p => new { Revision = p.Element (ns_doap + "revision").Value })
.First ()
.Revision;
// once we have the version information, the temporary local copy of doap may be deleted
File.Delete (temp_doap_path);
if (!String.IsNullOrEmpty (unstable_version) &&
Banshee.ServiceStack.Application.Version != "Unknown" &&
new Version (Banshee.ServiceStack.Application.Version) < new Version (unstable_version)) {
Gtk.Application.Invoke (delegate {
DisplayUpdateAvailableDialog ();
});
} else {
if (verbose) {
DisplayMessage (Catalog.GetString ("No update available"), Catalog.GetString ("You already have the latest version of Banshee installed."), MessageType.Info);
}
}
}
}