diff options
author | Jeremie Laval <jeremie.laval@gmail.com> | 2012-04-18 19:50:56 +0400 |
---|---|---|
committer | Jeremie Laval <jeremie.laval@gmail.com> | 2012-04-18 19:50:56 +0400 |
commit | ac89a6aec040d35ed85e30ff11439a8089a856bc (patch) | |
tree | ea912af420bbe87b71e4b76d46e9cdba64b05da6 /AppDelegate.cs | |
parent | 404046a34da47426a0cf9ce6b43f5ca20f0a246e (diff) |
[build] Disable automatic apple doc wizard build in Makefile
Diffstat (limited to 'AppDelegate.cs')
-rw-r--r-- | AppDelegate.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/AppDelegate.cs b/AppDelegate.cs index 585c3a6..d495192 100644 --- a/AppDelegate.cs +++ b/AppDelegate.cs @@ -98,12 +98,16 @@ namespace macdoc && File.Exists (mergeToolPath)) { Task.Factory.StartNew (() => { AppleDocHandler.AppleDocInformation infos; - return AppleDocHandler.CheckAppleDocFreshness (AppleDocHandler.IosAtomFeed, out infos) || AppleDocHandler.CheckMergedDocumentationFreshness (infos); + bool mergeOutdated = false; + bool docOutdated = AppleDocHandler.CheckAppleDocFreshness (AppleDocHandler.IosAtomFeed, out infos); + if (!docOutdated) + mergeOutdated = AppleDocHandler.CheckMergedDocumentationFreshness (infos); + return Tuple.Create (docOutdated || mergeOutdated, docOutdated, mergeOutdated); }).ContinueWith (t => { Console.WriteLine ("Merged status {0}", t.Result); - if (!t.Result) + if (!t.Result.Item1) return; - BeginInvokeOnMainThread (LaunchDocumentationUpdate); + BeginInvokeOnMainThread (() => LaunchDocumentationUpdate (t.Result.Item2, t.Result.Item3)); }); } } @@ -186,7 +190,7 @@ namespace macdoc BookmarkManager.SaveBookmarks (); } - void LaunchDocumentationUpdate () + void LaunchDocumentationUpdate (bool docOutdated, bool mergeOutdated) { var infoDialog = new NSAlert { AlertStyle = NSAlertStyle.Informational, @@ -205,7 +209,7 @@ namespace macdoc // Launching AppleDocWizard as root // First get the directory try { - RootLauncher.LaunchExternalTool (mergeToolPath, "--force-download"); + RootLauncher.LaunchExternalTool (mergeToolPath, docOutdated ? new string[] { "--force-download" } : (string[])null); } catch (RootLauncherException ex) { var alertDialog = new NSAlert { AlertStyle = NSAlertStyle.Critical, |