diff --git a/docs/OrthoStreamXP-UserGuide.pdf b/docs/OrthoStreamXP-UserGuide.pdf
index e1ae80f..8bc941a 100644
Binary files a/docs/OrthoStreamXP-UserGuide.pdf and b/docs/OrthoStreamXP-UserGuide.pdf differ
diff --git a/release-notes/v1.3.1.md b/release-notes/v1.3.1.md
new file mode 100644
index 0000000..7f96ec4
--- /dev/null
+++ b/release-notes/v1.3.1.md
@@ -0,0 +1,13 @@
+## What's new
+
+- **Esri first, if you prefer it.** In **Settings › Pictures and download**, **Where the pictures come from** has a new choice: **Esri (ArcGIS), then Bing where Esri has no picture**. In some regions Esri's photos are newer or clearer than Bing's; Bing then fills the gaps. Bing first stays the recommended choice.
+- **Check for updates.** A new **Check for updates** button at the top of the **Home** page looks for a new version straight away, without waiting for the regular check. When one is found, it is downloaded and offered as usual; otherwise OrthoStreamXP tells you that you already have the newest version, or why it could not look.
+
+## Fixes
+
+- A new version ready to install is now shown at the top of the **Home** page, above the status card, instead of further down where it was easy to miss.
+- Sliders on the **Settings** page, and the values next to them, now look greyed out when they cannot be changed (while the scenery is streaming, or when their setting is off), like the switches already did.
+
+## Good to know
+
+- Your choice of where the pictures come from is not changed by the update. Like every setting, it can be changed only while OrthoStreamXP is stopped, and applies from the next start.
diff --git a/src/OrthoStreamXP/Gui/MainWindow.xaml.cs b/src/OrthoStreamXP/Gui/MainWindow.xaml.cs
index c0f7d0a..b3cac5b 100644
--- a/src/OrthoStreamXP/Gui/MainWindow.xaml.cs
+++ b/src/OrthoStreamXP/Gui/MainWindow.xaml.cs
@@ -19,6 +19,9 @@ public MainWindow(MainViewModel main)
{
if (new UpdateDialog(offer) { Owner = this }.ShowDialog() == true) _main.Home.InstallConfirmedUpdate();
};
+ // The Home page's Check for updates button found nothing to install.
+ _main.Home.UpdateCheckReported += (_, message) =>
+ MessageBox.Show(this, message, "OrthoStreamXP", MessageBoxButton.OK, MessageBoxImage.Information);
var tray = new TrayIcon(this);
_main.Home.XPlaneStarted += async (_, _) => await HandOverToXPlaneAsync(tray).ConfigureAwait(true);
// The flight is over: back on the Home page, with Stop and (once stopped) the flight's report.
diff --git a/src/OrthoStreamXP/Gui/ViewModels/HomeViewModel.cs b/src/OrthoStreamXP/Gui/ViewModels/HomeViewModel.cs
index f24dde6..2641cbd 100644
--- a/src/OrthoStreamXP/Gui/ViewModels/HomeViewModel.cs
+++ b/src/OrthoStreamXP/Gui/ViewModels/HomeViewModel.cs
@@ -50,8 +50,9 @@ public HomeViewModel(MainViewModel main)
_updateTimer.Tick += async (_, _) =>
{
_updateTimer.Interval = TimeSpan.FromHours(6);
- if (await _updates.CheckAsync().ConfigureAwait(true)) Notices = BuildNotices();
+ if (await _updates.CheckAsync().ConfigureAwait(true) == UpdateCheck.Downloaded) Notices = BuildNotices();
};
+ CheckForUpdates = new RelayCommand(() => _ = CheckForUpdatesAsync(), () => !_updates.IsChecking);
_updateTimer.Start();
Mount.PropertyChanged += (_, e) =>
{
@@ -115,6 +116,34 @@ private void OfferUpdate()
UpdateOffered?.Invoke(this, new UpdateOffer(version, _updates.CurrentVersion, ReleaseNotes.Parse(_updates.ReadyNotes), AppUpdates.ReleasePage(version)));
}
+ /// Looks for a new version now: one found is shown as the update notice, otherwise the window says why there is none.
+ public ICommand CheckForUpdates { get; }
+
+ /// A look asked for by the person found no update to show (up to date, failed, not installed): the window tells them.
+ public event EventHandler? UpdateCheckReported;
+
+ public string CheckForUpdatesText => _updates.IsChecking ? "Checking…" : "Check for updates";
+
+ private async Task CheckForUpdatesAsync()
+ {
+ Task check = _updates.CheckAsync();
+ Raise(nameof(CheckForUpdatesText));
+ CommandManager.InvalidateRequerySuggested();
+ UpdateCheck result = await check.ConfigureAwait(true);
+ Raise(nameof(CheckForUpdatesText));
+ CommandManager.InvalidateRequerySuggested();
+ Notices = BuildNotices();
+ string? message = result switch
+ {
+ UpdateCheck.UpToDate => $"No updates are available. You have the newest version of OrthoStreamXP ({_updates.CurrentVersion}).",
+ UpdateCheck.InProgress => "OrthoStreamXP is already looking for a new version. Try again in a moment.",
+ UpdateCheck.Failed => "OrthoStreamXP could not look for a new version. Check your internet connection and try again; the details are in the log.",
+ UpdateCheck.NotInstalled => "No updates are available: this copy of OrthoStreamXP was not installed, so it does not update itself.",
+ _ => null, // Downloaded or already ready: the update notice shows it.
+ };
+ if (message is not null) UpdateCheckReported?.Invoke(this, message);
+ }
+
/// Installs the downloaded version and restarts, once confirmed; not while the scenery streams.
public void InstallConfirmedUpdate()
{
@@ -546,6 +575,14 @@ private void MeasureSpeed()
private List BuildNotices()
{
var notices = new List();
+ // A new version first: it heads the page.
+ if (_updates.ReadyVersion is { } version)
+ notices.Add(Mount.State == MountState.Stopped
+ ? new Notice(Severity.Info, $"OrthoStreamXP {version} is ready to install",
+ $"A new version was downloaded (you have {_updates.CurrentVersion}). See what's new and install it when you choose; your settings, cache and flight history stay.",
+ "Update…", InstallUpdate)
+ : new Notice(Severity.Info, $"OrthoStreamXP {version} is ready to install",
+ $"A new version was downloaded (you have {_updates.CurrentVersion}). Stop the streaming when you have finished flying, and install it from here."));
if (Mount.State == MountState.Stopped && !ShowReview)
{
if (_tuningNotice is not null) notices.Add(_tuningNotice);
@@ -556,13 +593,6 @@ private List BuildNotices()
notices.Add(new Notice(Severity.Success, $"{PresetName(suited.Level)} suits your PC and connection",
$"OrthoStreamXP watched {suited.MinutesInFlight:0} minutes of flying and found nothing to tune."));
}
- if (_updates.ReadyVersion is { } version)
- notices.Add(Mount.State == MountState.Stopped
- ? new Notice(Severity.Info, $"OrthoStreamXP {version} is ready to install",
- $"A new version was downloaded (you have {_updates.CurrentVersion}). See what's new and install it when you choose; your settings, cache and flight history stay.",
- "Update…", InstallUpdate)
- : new Notice(Severity.Info, $"OrthoStreamXP {version} is ready to install",
- $"A new version was downloaded (you have {_updates.CurrentVersion}). Stop the streaming when you have finished flying, and install it from here."));
if (_xplaneProblem is not null) notices.Add(_xplaneProblem);
if (Mount.Problem is { } problem)
notices.Add(new Notice(Severity.Error, problem.Title, problem.Message, problem.ActionLabel,
diff --git a/src/OrthoStreamXP/Gui/ViewModels/SettingsViewModel.cs b/src/OrthoStreamXP/Gui/ViewModels/SettingsViewModel.cs
index 813e0f2..684244f 100644
--- a/src/OrthoStreamXP/Gui/ViewModels/SettingsViewModel.cs
+++ b/src/OrthoStreamXP/Gui/ViewModels/SettingsViewModel.cs
@@ -28,6 +28,7 @@ public SettingsViewModel(MainViewModel main)
Providers =
[
new Choice("Bing, then Esri where Bing has no picture (recommended)", "bing,esri"),
+ new Choice("Esri (ArcGIS), then Bing where Esri has no picture", "esri,bing"),
new Choice("Bing only", "bing"),
new Choice("Geoportal in Poland (national orthophoto), Bing and Esri elsewhere", "geoportal,bing,esri"),
];
diff --git a/src/OrthoStreamXP/Gui/Views/HomeView.xaml b/src/OrthoStreamXP/Gui/Views/HomeView.xaml
index f4b40e2..d419520 100644
--- a/src/OrthoStreamXP/Gui/Views/HomeView.xaml
+++ b/src/OrthoStreamXP/Gui/Views/HomeView.xaml
@@ -53,7 +53,19 @@
-
+
+
+
+
+
+
+
@@ -113,8 +125,6 @@
-
-
diff --git a/src/OrthoStreamXP/Gui/Views/SettingsView.xaml b/src/OrthoStreamXP/Gui/Views/SettingsView.xaml
index c71f436..21405b7 100644
--- a/src/OrthoStreamXP/Gui/Views/SettingsView.xaml
+++ b/src/OrthoStreamXP/Gui/Views/SettingsView.xaml
@@ -3,6 +3,26 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
+
+
+
+
+
-
+
@@ -227,7 +247,7 @@
-
+
@@ -247,7 +267,7 @@
-
+
@@ -353,7 +373,7 @@
-
+
@@ -404,7 +424,7 @@
-
+
@@ -427,7 +447,7 @@
-
+
diff --git a/src/OrthoStreamXP/Setup/Installation/AppUpdates.cs b/src/OrthoStreamXP/Setup/Installation/AppUpdates.cs
index 5ab6517..636c9b9 100644
--- a/src/OrthoStreamXP/Setup/Installation/AppUpdates.cs
+++ b/src/OrthoStreamXP/Setup/Installation/AppUpdates.cs
@@ -51,14 +51,23 @@ public AppUpdates()
/// The GitHub Release page of a version.
public static string ReleasePage(string version) => $"{Repository}/releases/tag/v{version}";
- /// Looks for a newer version and downloads it; true when one became ready. Problems (offline, GitHub busy) are only logged.
- public async Task CheckAsync()
+ /// A look for a new version (and its download) is under way.
+ public bool IsChecking => _checking;
+
+ /// Looks for a newer version and downloads it. Problems (offline, GitHub busy) are only logged.
+ public async Task CheckAsync()
{
- if (_manager is null || _checking || Ready is not null) return false;
+ if (_manager is null) return UpdateCheck.NotInstalled;
+ if (Ready is not null) return UpdateCheck.AlreadyReady;
+ if (_checking) return UpdateCheck.InProgress;
_checking = true;
try
{
- if (await _manager.CheckForUpdatesAsync().ConfigureAwait(true) is not { } update) return false;
+ if (await _manager.CheckForUpdatesAsync().ConfigureAwait(true) is not { } update)
+ {
+ Log.Info($"OrthoStreamXP {CurrentVersion} is the newest version");
+ return UpdateCheck.UpToDate;
+ }
Log.Info($"OrthoStreamXP {update.TargetFullRelease.Version} is available (this is {CurrentVersion}); downloading it");
await _manager.DownloadUpdatesAsync(update).ConfigureAwait(true);
string? notes = update.TargetFullRelease.NotesMarkdown;
@@ -67,12 +76,12 @@ public async Task CheckAsync()
: notes;
Ready = update;
Log.Step($"OrthoStreamXP {ReadyVersion} is downloaded and ready to install");
- return true;
+ return UpdateCheck.Downloaded;
}
catch (Exception ex)
{
Log.Info($"Could not look for a new version: {ex.Message}");
- return false;
+ return UpdateCheck.Failed;
}
finally
{
diff --git a/src/OrthoStreamXP/Setup/Installation/UpdateCheck.cs b/src/OrthoStreamXP/Setup/Installation/UpdateCheck.cs
new file mode 100644
index 0000000..6155b8c
--- /dev/null
+++ b/src/OrthoStreamXP/Setup/Installation/UpdateCheck.cs
@@ -0,0 +1,23 @@
+namespace OrthoStreamXP.Setup;
+
+/// What one look for a new version found.
+internal enum UpdateCheck
+{
+ /// A newer version was found and downloaded: it is ready to install.
+ Downloaded,
+
+ /// A newer version was already downloaded before this look.
+ AlreadyReady,
+
+ /// This is the newest version.
+ UpToDate,
+
+ /// Another look is under way.
+ InProgress,
+
+ /// The look failed (offline, GitHub busy); the reason is in the log.
+ Failed,
+
+ /// The program was not installed (a build run from the source): it does not look.
+ NotInstalled,
+}