diff --git a/branding/ui-icons/icons.py b/branding/ui-icons/icons.py
index 51aa85d7..2ecc1973 100644
--- a/branding/ui-icons/icons.py
+++ b/branding/ui-icons/icons.py
@@ -123,6 +123,10 @@ I["Triangle"] = (None, "M8 3 L13.5 12.5 H2.5 Z")
I["TriangleRight"] = (None, "M5 3 L12 8 L5 13 Z")
I["Cross"] = ("M4.5 4.5 L11.5 11.5 M11.5 4.5 L4.5 11.5", None)
+# Glyphs that point along the reading direction (arrows, chevrons, start-aligned text lines): mirrored in RTL.
+# Everything else (clocks, media controls, the ▶ rendered status, symmetric shapes) never mirrors.
+DIRECTIONAL = {"Back", "Forward", "ChevronLeft", "ChevronRight", "ExternalLink", "Jobs", "Logs", "ViewList"}
+
out = os.path.join(os.path.dirname(__file__), "..", "..", "src", "Titano.Ui", "Icons", "Icons.xaml")
with open(out, "w") as f:
f.write('\n')
f.write('\n')
diff --git a/docs/ui/DESIGN.md b/docs/ui/DESIGN.md
index 6bcfbea5..fbced7ab 100644
--- a/docs/ui/DESIGN.md
+++ b/docs/ui/DESIGN.md
@@ -84,7 +84,12 @@ Label column left of controls: 116 px in panels, 180 px in Settings.
16 px, 1.5 px strokes, round caps and joins, `currentColor`, drawn as `PathGeometry` /
`DrawingImage` resources in `Titano.App/Icons/Icons.xaml` (source SVGs in `branding/ui-icons/`
if generated by a tool). No icon fonts, no emoji in shipped UI (the mockups use a few glyphs
-only as placeholders: replace ⟳ ▾ ✕ ■ ❚❚ ≡ with drawn icons). Directional icons mirror in RTL.
+only as placeholders: replace ⟳ ▾ ✕ ■ ❚❚ ≡ with drawn icons). Directional icons mirror in RTL:
+`IconData.IsDirectional` marks the glyphs that point along the reading direction (back/forward, chevrons
+left/right, external link, start-aligned lines); `ui:Bidi.IsDirectional` overrides it for a subtree (a ▶ used
+as "next", a chevron on a left-to-right time axis). Every other glyph (clocks, media controls, the ▶ rendered
+status) and the brand mark keep their drawn orientation. Photos, previews, charts, numbers, paths and
+templates are left-to-right islands (`FlowDirection="LeftToRight"` on the smallest element holding them).
## 6. App icon (`branding/`)
diff --git a/i18n/en/Archive.resx b/i18n/en/Archive.resx
index 49dfd5a3..8e9dbc0e 100644
--- a/i18n/en/Archive.resx
+++ b/i18n/en/Archive.resx
@@ -4,7 +4,7 @@
2.0System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Copy into the layout…
+ Copy into archive…Index in place…{0:N0} sequence changed{0:N0} sequences changed
@@ -68,6 +68,7 @@
Close{0:N0} copy{0:N0} copies
+ The duplicate search stoppedlongFolder{0:N0} group{0:N0} groups
@@ -86,6 +87,11 @@
{0} changed after the plan was made.long: error sentenceThe card or folder {0} is no longer available.long: error sentenceThe archive changed after this plan was made.long: error sentence
+ Titano was denied access to the archive.long
+ A file of the archive could not be read or written.long
+ The sequence is no longer in the index.long
+ The index could not be read or written.long
+ RetryCancelNone foundFind
@@ -93,10 +99,13 @@
Every sequence verifiedEvery sequence analysed{0} missing · {1} damaged
+ {0:N0} duplicate group
+ {0:N0} duplicate groups{0:N0} duplicate frame{0:N0} duplicate framesAnalyseShow
+ Mark copiesFindBuildVerify
@@ -104,6 +113,7 @@
No duplicate frames{0:N0} sequence lacks proxies{0:N0} sequences lack proxies
+ No copies flagged{0:N0} sequence not analysed{0:N0} sequences not analysedEvery sequence has proxies
@@ -227,6 +237,7 @@
Restoring {0}…longArchive treeUndated
+ HealthMaintenanceViewOverview
diff --git a/i18n/en/Common.resx b/i18n/en/Common.resx
index 7df05c2e..43d62770 100644
--- a/i18n/en/Common.resx
+++ b/i18n/en/Common.resx
@@ -5,14 +5,21 @@
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Auto
+ Auto · {0}{0} advisor value
+ curvecontrol type read by screen readers, lower case
+ Point {0} of {1}: {2}{0} position; {1} point count; {2} coordinates (Common.CurveReadout)
+ {0} → {1}invariant; drawn left to right in every language; {0} horizontal value; {1} vertical value{0} d {1} h{0} h {1} m{0} min{0} s
+ More choicesn/aOpenOpen logs{0} %
+ Remove
+ Back to Auto{0} B{0} GB{0} KB
diff --git a/i18n/en/Jobs.resx b/i18n/en/Jobs.resx
index 9e6c4cd8..1bd5a967 100644
--- a/i18n/en/Jobs.resx
+++ b/i18n/en/Jobs.resx
@@ -67,6 +67,8 @@
queuedrunning{0} · {1}
+ {0} → {1}invariant; {0} sequence title; {1} export preset
+ {0} ← {1}invariant; right-to-left languages: the arrow points from the sequence to the presetthis PCWorkers {0} / {1}
diff --git a/i18n/en/Shell.resx b/i18n/en/Shell.resx
index a2ff72aa..af382003 100644
--- a/i18n/en/Shell.resx
+++ b/i18n/en/Shell.resx
@@ -6,7 +6,10 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089TitanoinvariantReady
+ Pause jobReady · {0} jobs queued
+ Ready · {0} job queued{0} count
+ Ready · {0} jobs queued{0} countAboutArchiveImport
@@ -37,4 +40,5 @@
Connect to a server{0} on this network · {1}Welcome to Titano
+ {0} — {1}{0} program name; {1} screen title
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index 4f3f4e08..bc7c40c1 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -44,6 +44,7 @@
Keep only the sequences with one tagQueue the light analysis of these sequencesFind the duplicate groups
+ Flag every copy after the first so renders skip it · runs maintenanceFind files and rows that do not matchQueue proxy generation for these sequencesRe-hash the originals of these sequences
@@ -74,6 +75,7 @@
Choose the new folder of an archive you moved; its sequences followMake exactly these changes to folders, sidecars and index · resumes after a crashChange the tags of these sequences in sidecars and index
+ Run the same action againIncremental scan: new, changed and removed files by modification time and sizeThe selected years and sequences (all when nothing is selected), narrowed by camera, status or tagRun the deep analysis on every sequence in the set
@@ -94,7 +96,9 @@
Move this sequence back into its folder and the library, with its settings and rendersRe-hash every original and report bit rot · reads the whole archive{0} · Right arrow opens the year, Left arrow closes it
+ {0} · Left arrow opens the year, Right arrow closes itDismiss
+ Close this notice · EscOpen the folder with the log filesReturn to the advisor's valueRead every frame again and refresh the analysis · Ctrl+Shift+A
diff --git a/i18n/it/Archive.it.resx b/i18n/it/Archive.it.resx
index 42e52d74..71c4a084 100644
--- a/i18n/it/Archive.it.resx
+++ b/i18n/it/Archive.it.resx
@@ -4,7 +4,7 @@
2.0System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Copia nella struttura…
+ Copia nell'archivio…Indicizza sul posto…{0:N0} sequenza modificata{0:N0} sequenze modificate
@@ -64,6 +64,7 @@
Chiudi{0:N0} copia{0:N0} copie
+ Ricerca dei doppioni interrottaCartella{0:N0} gruppo{0:N0} gruppi
@@ -81,6 +82,11 @@
{0} è cambiato dopo la creazione del piano.La scheda o cartella {0} non è più disponibile.L'archivio è cambiato dopo la creazione del piano.
+ Titano non ha accesso all'archivio.
+ Non è stato possibile leggere o scrivere un file dell'archivio.
+ La sequenza non è più nell'indice.
+ Non è stato possibile leggere o scrivere l'indice.
+ RiprovaAnnullaNessuno trovatoCerca
@@ -88,10 +94,13 @@
Tutte le sequenze verificateTutte le sequenze analizzate{0} mancanti · {1} danneggiati
+ {0:N0} gruppo di doppioni
+ {0:N0} gruppi di doppioni{0:N0} fotogramma doppio{0:N0} fotogrammi doppiAnalizzaMostra
+ Segna copieCercaCreaVerifica
@@ -99,6 +108,7 @@
Nessun fotogramma doppio{0:N0} sequenza senza proxy{0:N0} sequenze senza proxy
+ Nessuna copia segnata{0:N0} sequenza non analizzata{0:N0} sequenze non analizzateOgni sequenza ha i proxy
@@ -220,6 +230,7 @@
Ripristino di {0}…Albero dell'archivioSenza data
+ StatoManutenzioneVistaPanoramica
diff --git a/i18n/it/Common.it.resx b/i18n/it/Common.it.resx
index 8f944d39..674200b3 100644
--- a/i18n/it/Common.it.resx
+++ b/i18n/it/Common.it.resx
@@ -5,14 +5,21 @@
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Auto
+ Auto · {0}
+ curva
+ Punto {0} di {1}: {2}
+ {0} → {1}{0} g {1} h{0} h {1} m{0} min{0} s
+ Altre scelten/dApriApri log{0}%
+ Rimuovi
+ Torna ad Auto{0} byte{0} GB{0} KB
diff --git a/i18n/it/Shell.it.resx b/i18n/it/Shell.it.resx
index 6da87848..cea2f212 100644
--- a/i18n/it/Shell.it.resx
+++ b/i18n/it/Shell.it.resx
@@ -5,7 +5,10 @@
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Pronto
+ Pausa attivitàPronto · {0} attività in coda
+ Pronto · {0} attività in coda
+ Pronto · {0} attività in codaInformazioniArchivioImporta
@@ -36,4 +39,5 @@
Connettiti a un server{0} in questa rete · {1}Benvenuto in Titano
+ {0} — {1}
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index eedf92dc..fe47d697 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -44,6 +44,7 @@
Tieni solo le sequenze con un tagMetti in coda l'analisi rapida di queste sequenzeTrova i gruppi di doppioni
+ Segna ogni copia dopo la prima perché i render la saltino · esegue la manutenzioneTrova file e righe che non corrispondonoMetti in coda la creazione dei proxy per queste sequenzeRicalcola l'hash degli originali di queste sequenze
@@ -74,6 +75,7 @@
Scegli la nuova cartella di un archivio spostato; le sequenze lo seguonoApplica esattamente queste modifiche a cartelle, sidecar e indice · riprende dopo un arrestoCambia i tag di queste sequenze in sidecar e indice
+ Esegui di nuovo la stessa azioneScansione incrementale: file nuovi, modificati e rimossi per data e dimensioneAnni e sequenze selezionati (tutti se nulla è selezionato), ristretti per fotocamera, stato o tagEsegui l'analisi profonda su ogni sequenza della selezione
@@ -94,7 +96,9 @@
Riporta questa sequenza nella sua cartella e nella libreria, con impostazioni e renderRicalcola l'hash di ogni originale e segnala i danni · legge tutto l'archivio{0} · Freccia destra apre l'anno, freccia sinistra lo chiude
+ {0} · Freccia sinistra apre l'anno, freccia destra lo chiudeChiudi
+ Chiudi questo avviso · EscApri la cartella dei file di logTorna al valore consigliatoRilegge ogni fotogramma e aggiorna l’analisi · Ctrl+Maiusc+A
diff --git a/src/Titano.App/Archive/ArchiveDialogViewModels.cs b/src/Titano.App/Archive/ArchiveDialogViewModels.cs
index 98f9c303..9b938445 100644
--- a/src/Titano.App/Archive/ArchiveDialogViewModels.cs
+++ b/src/Titano.App/Archive/ArchiveDialogViewModels.cs
@@ -16,13 +16,15 @@ namespace Titano.App.Archiving;
///
/// An in-window dialog of the Archive screen: one primary action, one way out. While its action runs, the way out
/// stops it when it can be stopped, and is disabled otherwise; the close callback receives the dialog, so a late close
-/// never closes another one.
+/// never closes another one. A failure stays on screen as one sentence until the next attempt.
///
public abstract class ArchiveDialogViewModel : LocalizedViewModel
{
private readonly Action _close;
private bool _isBusy;
private string? _busyText;
+ private string? _errorText;
+ private string? _errorToolTip;
protected ArchiveDialogViewModel(Action close)
{
@@ -61,11 +63,32 @@ public abstract class ArchiveDialogViewModel : LocalizedViewModel
public string? BusyText { get => _busyText; protected set => Set(ref _busyText, value); }
+ /// Why the last dry run or apply stopped (); null when nothing failed.
+ public string? ErrorText { get => _errorText; private set => Set(ref _errorText, value); }
+
+ /// The failure as the engine reported it, for the tooltip.
+ public string? ErrorToolTip { get => _errorToolTip; private set => Set(ref _errorToolTip, value); }
+
protected void Close() => _close(this);
+
+ protected void ShowError(Exception ex)
+ {
+ ErrorText = ArchiveFailures.Cause(ex);
+ ErrorToolTip = ex.Message;
+ }
+
+ protected void ClearError()
+ {
+ ErrorText = null;
+ ErrorToolTip = null;
+ }
}
-/// A fact of the rebuild dialog ("Sidecars · 412").
-public sealed record DialogFact(string Label, string Value);
+/// A fact of the rebuild dialog ("Sidecars · 412"); a path stays left to right, a missing value says why in its tooltip.
+public sealed record DialogFact(string Label, string Value, bool IsPath = false, string? Reason = null)
+{
+ public string ToolTip => Reason ?? Value;
+}
///
/// "Rebuild index" (BRIEF §12.5): what the rebuild reads — the sidecars on disk, then a full metadata scan of folders
@@ -84,7 +107,7 @@ public sealed class RebuildDialogViewModel : ArchiveDialogViewModel
Archive = archive;
Availability = availability;
Indexed = indexed;
- _facts = Facts(null);
+ _facts = Facts(null, availability == ArchiveAvailability.Offline ? Loc.L("Archive.Error.Offline", Formatting.LeftToRight(archive.RootPath)) : null);
RebuildCommand = new AsyncRelayCommand(RebuildAsync, () => !IsBusy && availability == ArchiveAvailability.Online);
}
@@ -98,7 +121,10 @@ public sealed class RebuildDialogViewModel : ArchiveDialogViewModel
public string RebuildToolTip => Availability == ArchiveAvailability.Online ? Loc.L("Tooltips.Archive.RebuildStart") : Loc.L("Archive.Blocked.NotOnline");
- /// Counts sequence folders with and without a sidecar (a walk of the archive tree, off the UI thread).
+ ///
+ /// Counts sequence folders with and without a sidecar (a walk of the archive tree, off the UI thread). The counts
+ /// read "Counting…" only while the walk runs; an offline archive or a failed walk leaves "—" with the reason.
+ ///
public async Task CountAsync()
{
if (Availability == ArchiveAvailability.Offline) return;
@@ -107,11 +133,12 @@ public sealed class RebuildDialogViewModel : ArchiveDialogViewModel
{
var root = Archive.RootPath;
var folders = await Task.Run(() => ArchiveScanner.FindSequenceFolders(new ArchivePaths(root)));
- FactRows = Facts(folders);
+ FactRows = Facts(folders, null);
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
{
Log.Warning("archive", "Counting sidecars failed", ex);
+ FactRows = Facts(null, ArchiveFailures.Cause(ex));
}
finally
{
@@ -120,19 +147,24 @@ public sealed class RebuildDialogViewModel : ArchiveDialogViewModel
}
/// Shows counts computed elsewhere (capture).
- public void ShowFolders(IReadOnlyList folders) => FactRows = Facts(folders);
+ public void ShowFolders(IReadOnlyList folders) => FactRows = Facts(folders, null);
- private IReadOnlyList Facts(IReadOnlyList? folders)
+ /// The counted folders; null while counting or when they cannot be counted.
+ /// Why the folders cannot be counted; null while counting.
+ private IReadOnlyList Facts(IReadOnlyList? folders, string? uncounted)
{
- var waiting = Loc.L("Archive.Rebuild.Counting");
+ DialogFact Count(string label, Func counted) =>
+ folders is not null ? new(label, Formatting.Count(folders.Count(counted)))
+ : uncounted is not null ? new(label, "—", Reason: uncounted)
+ : new(label, Loc.L("Archive.Rebuild.Counting"));
return
[
new(Loc.L("Archive.Rebuild.Archive"), Archive.Name),
- new(Loc.L("Archive.Rebuild.Root"), Archive.RootPath),
+ new(Loc.L("Archive.Rebuild.Root"), Archive.RootPath, IsPath: true),
new(Loc.L("Archive.Rebuild.State"), Loc.L("Archive.Availability." + Availability)),
new(Loc.L("Archive.Rebuild.Indexed"), Loc.Plural("Shell.Status.Sequences", Indexed)),
- new(Loc.L("Archive.Rebuild.Sidecars"), folders is null ? waiting : Formatting.Count(folders.Count(f => f.Sidecar is not null))),
- new(Loc.L("Archive.Rebuild.Metadata"), folders is null ? waiting : Formatting.Count(folders.Count(f => f.Sidecar is null))),
+ Count(Loc.L("Archive.Rebuild.Sidecars"), f => f.Sidecar is not null),
+ Count(Loc.L("Archive.Rebuild.Metadata"), f => f.Sidecar is null),
];
}
@@ -163,6 +195,7 @@ public sealed class RenameDialogViewModel : ArchiveDialogViewModel
private readonly Func _applied;
private readonly DispatcherTimer _delay = new() { Interval = TimeSpan.FromMilliseconds(400) };
private RenamePlan? _plan;
+ private string? _planError;
private IReadOnlyList _rows = [];
private CancellationTokenSource? _planning;
@@ -196,7 +229,7 @@ public sealed class RenameDialogViewModel : ArchiveDialogViewModel
private string? ApplyBlocker =>
IsBusy ? Loc.L("Archive.Blocked.Applying")
: Template.Error is { } error ? error
- : _plan is null ? Loc.L("Archive.Blocked.Planning")
+ : _plan is null ? _planError ?? Loc.L("Archive.Blocked.Planning")
: _plan.Steps.Count == 0 ? Loc.L("Archive.Blocked.NoChanges")
: null;
@@ -221,14 +254,20 @@ public sealed class RenameDialogViewModel : ArchiveDialogViewModel
base.Dispose();
}
- /// The dry run of the current template (the engine's plan; nothing changes on disk).
- public async Task PlanAsync()
+ /// The dry run of the current template (the engine's plan; nothing changes on disk); it clears the last failure.
+ public Task PlanAsync()
+ {
+ ClearError();
+ return DryRunAsync();
+ }
+
+ private async Task DryRunAsync()
{
_planning?.Cancel();
_plan = null;
+ _planError = null;
Rows = [];
- OnPropertyChanged(nameof(SummaryText));
- OnPropertyChanged(nameof(ApplyToolTip));
+ OnPlanChanged();
if (Template.HasErrors) return;
var cts = _planning = new CancellationTokenSource();
var template = Template.Text;
@@ -240,41 +279,57 @@ public sealed class RenameDialogViewModel : ArchiveDialogViewModel
if (cts.IsCancellationRequested) return;
_plan = plan;
Rows = MassRename.Rows(plan, Mode);
- OnPropertyChanged(nameof(SummaryText));
- OnPropertyChanged(nameof(ApplyToolTip));
- CommandManager.InvalidateRequerySuggested();
}
catch (OperationCanceledException) when (cts.IsCancellationRequested)
{
+ return;
}
catch (Exception ex) when (ex is ArgumentException or DatabaseException or FormatException)
{
Log.Warning("archive", "Rename plan failed", ex);
- BusyText = ex.Message;
+ _planError = ArchiveFailures.Cause(ex);
+ ShowError(ex);
}
+ OnPlanChanged();
+ }
+
+ private void OnPlanChanged()
+ {
+ OnPropertyChanged(nameof(SummaryText));
+ OnPropertyChanged(nameof(ApplyToolTip));
+ CommandManager.InvalidateRequerySuggested();
}
private async Task ApplyAsync()
{
if (_plan is not { } plan) return;
+ ClearError();
IsBusy = true;
- var progress = new Progress(n => BusyText = Loc.L("Archive.Rename.Applying", Formatting.Count(n), Formatting.Count(plan.Steps.Count)));
+ // A tick posted before the apply ended must not bring its progress back.
+ var progress = new Progress(n =>
+ {
+ if (IsBusy) BusyText = Loc.L("Archive.Rename.Applying", Formatting.Count(n), Formatting.Count(plan.Steps.Count));
+ });
try
{
await Task.Run(() => _archives.ApplyRenameAsync(plan, progress));
Log.Info("archive", $"{Mode} applied to {plan.Steps.Count} sequence(s)");
await _applied(plan.Steps.Count);
Close();
+ return;
}
- catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or StaleRenamePlanException or ArchiveOfflineException)
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or StaleRenamePlanException or DatabaseException)
{
Log.Warning("archive", "Rename failed", ex);
- BusyText = ex.Message;
+ ShowError(ex);
}
finally
{
IsBusy = false;
+ BusyText = null;
}
+ // Part of the plan may have been applied, or the archive changed under it: the dry run shows what is left.
+ await DryRunAsync();
}
}
@@ -338,6 +393,7 @@ public sealed class RetagDialogViewModel : ArchiveDialogViewModel
var changes = Changes();
var run = _run = new CancellationTokenSource();
var done = 0;
+ ClearError();
IsBusy = true;
try
{
@@ -351,16 +407,17 @@ public sealed class RetagDialogViewModel : ArchiveDialogViewModel
await _applied(done);
Close();
}
- catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or ArgumentException or DatabaseException or ArchiveOfflineException)
+ catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or ArgumentException or DatabaseException)
{
Log.Warning("archive", "Retag failed", ex);
- BusyText = ex.Message;
+ ShowError(ex);
}
finally
{
_run = null;
run.Dispose();
IsBusy = false;
+ BusyText = null;
}
}
}
diff --git a/src/Titano.App/Archive/ArchiveDialogs.xaml b/src/Titano.App/Archive/ArchiveDialogs.xaml
index 2f458b81..66ba78f2 100644
--- a/src/Titano.App/Archive/ArchiveDialogs.xaml
+++ b/src/Titano.App/Archive/ArchiveDialogs.xaml
@@ -3,13 +3,42 @@
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
xmlns:ar="clr-namespace:Titano.App.Archiving"
+ xmlns:infra="clr-namespace:Titano.App.Infrastructure"
xmlns:shell="clr-namespace:Titano.App.Shell">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
-
-
diff --git a/src/Titano.App/Shell/ConfirmDialog.xaml b/src/Titano.App/Shell/ConfirmDialog.xaml
index d531860d..7ecc4838 100644
--- a/src/Titano.App/Shell/ConfirmDialog.xaml
+++ b/src/Titano.App/Shell/ConfirmDialog.xaml
@@ -5,14 +5,17 @@
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
Title="{l:Loc Shell.AppName}"
IsDialog="True" ResizeMode="NoResize" SizeToContent="Height" Width="460"
- WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
-
+ WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
+ AutomationProperties.Name="{Binding Heading}" AutomationProperties.HelpText="{Binding Message}">
+
-
+
@@ -20,7 +23,7 @@
AutomationProperties.Name="{Binding TypedPrompt}" TextChanged="OnTyped" />
-
+
diff --git a/src/Titano.App/Shell/ConfirmDialog.xaml.cs b/src/Titano.App/Shell/ConfirmDialog.xaml.cs
index 1ba9ac05..5e0a3f17 100644
--- a/src/Titano.App/Shell/ConfirmDialog.xaml.cs
+++ b/src/Titano.App/Shell/ConfirmDialog.xaml.cs
@@ -12,8 +12,17 @@ public sealed partial class ConfirmDialog : TitanoWindow
DataContext = request;
InitializeComponent();
Action.SetResourceReference(StyleProperty, request.IsDestructive ? "Button.Destructive" : "Button.Primary");
- if (!request.IsDetailMonospaced) DetailText.SetResourceReference(FontFamilyProperty, "Font.Ui");
- if (request.TypedConfirmation is null) return;
+ if (!request.IsDetailMonospaced)
+ {
+ // Names and sentences follow the reading direction; only fingerprints stay left to right.
+ DetailText.SetResourceReference(FontFamilyProperty, "Font.Ui");
+ DetailText.ClearValue(FlowDirectionProperty);
+ }
+ if (request.TypedConfirmation is null)
+ {
+ Loaded += (_, _) => Safe.Focus();
+ return;
+ }
Typing.Visibility = Visibility.Visible;
Loaded += (_, _) => Typed.Focus();
EnableAction(false);
diff --git a/src/Titano.App/Shell/ErrorText.cs b/src/Titano.App/Shell/ErrorText.cs
new file mode 100644
index 00000000..5c9dd313
--- /dev/null
+++ b/src/Titano.App/Shell/ErrorText.cs
@@ -0,0 +1,37 @@
+using System.Reflection;
+using Titano.Core.Archiving;
+using Titano.Core.Import;
+using Titano.Core.Localization;
+using Titano.Core.Render;
+using Titano.Data.Archiving;
+using Titano.Data.Sync;
+using Titano.Protocol.Client;
+
+namespace Titano.App.Shell;
+
+///
+/// The sentence an error toast shows (BRIEF §0.2: one sentence saying what happened plus one action). Only failures
+/// that carry a catalog sentence say what happened; anything else (framework and OS messages, often technical
+/// English) reads "Something went wrong." and stays in the log.
+///
+public static class ErrorText
+{
+ public static string For(Exception ex) => Describe(Unwrap(ex)) ?? Loc.L("Errors.Unexpected");
+
+ private static string? Describe(Exception ex) => ex switch
+ {
+ LeaseUnavailableException or ArchiveOfflineException or NewerFormatException or ImportSourceUnavailableException
+ or CopyVerificationException or StaleRenamePlanException or SyncConflictChangedException => ex.Message,
+ // The server words its errors in the client's language (Accept-Language).
+ TitanoApiException api when !string.IsNullOrWhiteSpace(api.Error.Message) => api.Error.Message,
+ RenderException render => Loc.Get(render.ReasonKey, Loc.Culture) is null ? null : Loc.L(render.ReasonKey, [.. render.Args]),
+ _ => null,
+ };
+
+ /// Awaited tasks and reflection wrap the real failure in one layer or more.
+ private static Exception Unwrap(Exception ex)
+ {
+ while (ex is AggregateException { InnerExceptions.Count: 1 } or TargetInvocationException && ex.InnerException is { } inner) ex = inner;
+ return ex;
+ }
+}
diff --git a/src/Titano.App/Shell/LoginDialog.xaml b/src/Titano.App/Shell/LoginDialog.xaml
index 119b339c..0e4fc295 100644
--- a/src/Titano.App/Shell/LoginDialog.xaml
+++ b/src/Titano.App/Shell/LoginDialog.xaml
@@ -5,11 +5,11 @@
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
Title="{l:Loc Shell.AppName}"
IsDialog="True" ResizeMode="NoResize" SizeToContent="Height" Width="440"
- WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
+ WindowStartupLocation="CenterOwner" ShowInTaskbar="False" AutomationProperties.Name="{l:Loc Server.Login.Title}">
-
+
diff --git a/src/Titano.App/Shell/LoginDialog.xaml.cs b/src/Titano.App/Shell/LoginDialog.xaml.cs
index 85f4e999..b0adb296 100644
--- a/src/Titano.App/Shell/LoginDialog.xaml.cs
+++ b/src/Titano.App/Shell/LoginDialog.xaml.cs
@@ -1,4 +1,6 @@
using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
using Titano.Ui.Controls;
namespace Titano.App.Shell;
@@ -6,7 +8,8 @@ namespace Titano.App.Shell;
///
/// The login form (BRIEF §12.7). It calls back the connection with the credentials and stays open with the
/// error sentence until the sign-in succeeds or the user cancels. The password never leaves the PasswordBox
-/// except for that call.
+/// except for that call. A failed sign-in is announced to screen readers and marks the password box (error border,
+/// sentence as its help text) until the next attempt.
///
public sealed partial class LoginDialog : TitanoWindow
{
@@ -40,6 +43,7 @@ public sealed partial class LoginDialog : TitanoWindow
{
SignIn.IsEnabled = false;
Error.Visibility = Visibility.Collapsed;
+ Field.SetError(Password, null);
try
{
var error = await _signIn(User.Text, Password.Password);
@@ -50,8 +54,11 @@ public sealed partial class LoginDialog : TitanoWindow
}
Error.Text = error;
Error.Visibility = Visibility.Visible;
+ Field.SetError(Password, error);
Password.Clear();
Password.Focus();
+ UIElementAutomationPeer.CreatePeerForElement(this)?.RaiseNotificationEvent(
+ AutomationNotificationKind.ActionCompleted, AutomationNotificationProcessing.ImportantMostRecent, error, "Titano.SignIn");
}
finally
{
diff --git a/src/Titano.App/Shell/MainWindow.xaml b/src/Titano.App/Shell/MainWindow.xaml
index e2d5156e..70b7a7e3 100644
--- a/src/Titano.App/Shell/MainWindow.xaml
+++ b/src/Titano.App/Shell/MainWindow.xaml
@@ -4,6 +4,7 @@
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
xmlns:shell="clr-namespace:Titano.App.Shell"
+ xmlns:infra="clr-namespace:Titano.App.Infrastructure"
xmlns:s="clr-namespace:Titano.App.Sections"
Title="{Binding WindowTitle}"
Width="1440" Height="900" MinWidth="1200" MinHeight="760"
@@ -14,8 +15,24 @@
-
-
+
+
+
+
+
-
+
-
-
+
+
@@ -61,18 +80,22 @@
-
+
-
-
-
-
+
+
-
+
+
+
+
diff --git a/src/Titano.App/Shell/MainWindow.xaml.cs b/src/Titano.App/Shell/MainWindow.xaml.cs
index bc7982ec..b5fc47f7 100644
--- a/src/Titano.App/Shell/MainWindow.xaml.cs
+++ b/src/Titano.App/Shell/MainWindow.xaml.cs
@@ -1,5 +1,9 @@
using System.Collections.Specialized;
using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Threading;
using Titano.App.Infrastructure;
using Titano.Ui.Controls;
@@ -14,21 +18,50 @@ public partial class MainWindow : TitanoWindow
_shell = shell;
DataContext = shell;
InitializeComponent();
- Rail.Width = shell.IsRailCollapsed ? 48 : 128;
UpdateConnection();
shell.PropertyChanged += (_, e) =>
{
- if (e.PropertyName is nameof(ShellViewModel.IsRailCollapsed) or "")
- Rail.Width = shell.IsRailCollapsed ? 48 : 128;
if (e.PropertyName is nameof(ShellViewModel.IsConnected) or "") UpdateConnection();
+ if (e.PropertyName is nameof(ShellViewModel.IsWelcomeOpen) or "") FocusWelcome();
};
shell.PendingToasts.CollectionChanged += OnToastRequested;
+ Loaded += (_, _) => FocusWelcome();
RestorePlacement();
Closing += (_, _) => SavePlacement();
}
+ /// F6 moves the keyboard to the newest notification (as in Windows apps), Esc there dismisses it.
+ protected override void OnKeyDown(KeyEventArgs e)
+ {
+ base.OnKeyDown(e);
+ if (!e.Handled && e.Key == Key.F6 && Keyboard.Modifiers == ModifierKeys.None) e.Handled = Toasts.FocusNewest();
+ }
+
private void UpdateConnection() =>
- Connection.SetResourceReference(System.Windows.Controls.TextBlock.ForegroundProperty, _shell.IsConnected ? "Brush.Accent" : "Brush.TextMuted");
+ Connection.SetResourceReference(TextBlock.ForegroundProperty, _shell.IsConnected ? "Brush.Accent" : "Brush.TextMuted");
+
+ /// The first-run dialog takes the keyboard on its chosen option once it is on screen.
+ private void FocusWelcome()
+ {
+ if (!_shell.IsWelcomeOpen) return;
+ Dispatcher.BeginInvoke(DispatcherPriority.Loaded, () =>
+ {
+ if (!_shell.IsWelcomeOpen || !IsLoaded) return;
+ if (FindChecked(WelcomeOverlay) is { } choice) choice.Focus();
+ else WelcomeOverlay.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));
+ });
+ }
+
+ private static RadioButton? FindChecked(DependencyObject root)
+ {
+ for (var i = 0; i < VisualTreeHelper.GetChildrenCount(root); i++)
+ {
+ var child = VisualTreeHelper.GetChild(root, i);
+ if (child is RadioButton { IsChecked: true } radio) return radio;
+ if (FindChecked(child) is { } nested) return nested;
+ }
+ return null;
+ }
private void OnToastRequested(object? sender, NotifyCollectionChangedEventArgs e)
{
diff --git a/src/Titano.App/Shell/ScreenCapture.cs b/src/Titano.App/Shell/ScreenCapture.cs
index 4322cbec..bcd6313d 100644
--- a/src/Titano.App/Shell/ScreenCapture.cs
+++ b/src/Titano.App/Shell/ScreenCapture.cs
@@ -7,6 +7,7 @@ using Titano.App.Archiving;
using Titano.App.DesignTime;
using Titano.App.Editor;
using Titano.App.Import;
+using Titano.App.Infrastructure;
using Titano.App.Library;
using Titano.App.Server;
using Titano.App.Settings;
@@ -18,7 +19,9 @@ namespace Titano.App.Shell;
///
/// Titano.exe --capture <dir>: renders every client screen at 1440×900 in the dark and light themes to
/// <screen>-<theme>.png from (first run on an empty index, then a populated
-/// one, then the sync table with transfers, a conflict and its confirmation), for visual review and phase reports (BRIEF §20.2), then exits.
+/// one, then the sync table with transfers, a conflict and its confirmation), plus the Library, the editor's Exposure
+/// tab and the import plan in Arabic (*-rtl-dark.png, right to left), for visual review and phase reports
+/// (BRIEF §20.2), then exits.
///
public static class ScreenCapture
{
@@ -82,6 +85,9 @@ public static class ScreenCapture
written += await SaveAsync(window, directory, "library-list", theme, waitForThumbnails: shell);
shell.Library.LayoutIndex = 0;
shell.Library.ClearSelectionCommand.Execute(null);
+ shell.IsRailCollapsed = true;
+ written += await SaveAsync(window, directory, "library-rail-collapsed", theme, waitForThumbnails: shell);
+ shell.IsRailCollapsed = false;
written += await CaptureLibraryScenesAsync(window, shell, directory, theme);
shell.Navigate(SectionKey.Jobs);
@@ -241,6 +247,8 @@ public static class ScreenCapture
foreach (var toast in window.Toasts.Toasts.ToList()) window.Toasts.Dismiss(toast);
}
+ written += await CaptureRightToLeftAsync(window, shell, editor, directory);
+
// Last, as it stays: an analysis of the sequence running (settings disabled, viewing tools live).
await sample.MarkAnalysingAsync(id);
await editor.AttachJobsAsync();
@@ -252,6 +260,41 @@ public static class ScreenCapture
return written;
}
+ ///
+ /// The Library, the editor's Exposure tab and the import plan in Arabic, dark: the layout mirrors while photos,
+ /// charts, the filmstrip and templates stay left to right. English is restored whatever happens.
+ ///
+ private static async Task CaptureRightToLeftAsync(MainWindow window, ShellViewModel shell, EditorViewModel editor, string directory)
+ {
+ var written = 0;
+ var frame = editor.CurrentIndex;
+ ThemeManager.Apply(AppTheme.Dark);
+ UiLanguage.Apply("ar");
+ try
+ {
+ DismissToasts(window);
+ shell.Navigate(SectionKey.Library);
+ written += await SaveAsync(window, directory, "library-rtl", AppTheme.Dark, waitForThumbnails: shell);
+
+ shell.Navigate(SectionKey.Sequence);
+ editor.SelectedTab = editor.Exposure;
+ editor.IsCompare = true;
+ editor.CurrentIndex = 45;
+ written += await SaveEditorAsync(window, editor, directory, "sequence-exposure-rtl", AppTheme.Dark);
+
+ await ImportScenes.ShowAsync(shell, "plan");
+ DismissToasts(window);
+ written += await SaveAsync(window, directory, "import-plan-rtl", AppTheme.Dark);
+ }
+ finally
+ {
+ UiLanguage.Apply("en");
+ }
+ shell.Navigate(SectionKey.Sequence);
+ editor.CurrentIndex = frame;
+ return written;
+ }
+
private static async Task SaveEditorAsync(Window window, EditorViewModel editor, string directory, string screen, AppTheme theme)
{
await Settle(window);
@@ -306,6 +349,7 @@ public static class ScreenCapture
return false;
}
var bitmap = new RenderTargetBitmap(width, height, dpi.PixelsPerInchX, dpi.PixelsPerInchY, PixelFormats.Pbgra32);
+ // A right-to-left window's content already renders mirrored, as on screen.
bitmap.Render(root);
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(bitmap));
diff --git a/src/Titano.App/Shell/ShellViewModel.cs b/src/Titano.App/Shell/ShellViewModel.cs
index ad645906..6a68c0e3 100644
--- a/src/Titano.App/Shell/ShellViewModel.cs
+++ b/src/Titano.App/Shell/ShellViewModel.cs
@@ -16,6 +16,7 @@ public sealed class ShellViewModel : LocalizedViewModel
private SectionViewModel _current;
private bool _isRailCollapsed;
private string? _jobText;
+ private string? _jobName;
private double _jobProgress;
private bool _jobActive;
private bool _jobIndeterminate;
@@ -85,12 +86,17 @@ public sealed class ShellViewModel : LocalizedViewModel
get => _welcome;
private set
{
- if (Set(ref _welcome, value)) OnPropertyChanged(nameof(IsWelcomeOpen));
+ if (!Set(ref _welcome, value)) return;
+ OnPropertyChanged(nameof(IsWelcomeOpen));
+ OnPropertyChanged(nameof(IsShellEnabled));
}
}
public bool IsWelcomeOpen => _welcome is not null;
+ /// The rail and the sections take input only while no first-run dialog covers them.
+ public bool IsShellEnabled => _welcome is null;
+
public SectionViewModel Current
{
get => _current;
@@ -105,7 +111,7 @@ public sealed class ShellViewModel : LocalizedViewModel
}
}
- public string WindowTitle => Current == Library ? "Titano" : "Titano — " + Current.Title;
+ public string WindowTitle => Current == Library ? Loc.L("Shell.AppName") : Loc.L("Shell.WindowTitle", Loc.L("Shell.AppName"), Current.Title);
public bool IsRailCollapsed
{
@@ -160,7 +166,7 @@ public sealed class ShellViewModel : LocalizedViewModel
// ---- Job bar ----
public string JobText => _jobActive && _jobText is not null
? _jobText
- : _queuedCount > 0 ? Loc.L("Shell.JobBar.Ready", _queuedCount) : Loc.L("Shell.JobBar.Idle");
+ : _queuedCount > 0 ? Loc.Plural("Shell.JobBar.Ready", _queuedCount) : Loc.L("Shell.JobBar.Idle");
public double JobProgress { get => _jobProgress; private set => Set(ref _jobProgress, value); }
public bool IsJobActive
@@ -179,14 +185,25 @@ public sealed class ShellViewModel : LocalizedViewModel
/// Pauses the job the bar shows.
public ICommand? StopJobCommand => Jobs.PauseCurrentCommand;
- /// Updates the global job bar (and the taskbar progress through the window).
- public void SetJob(string? text, double progress, bool indeterminate = false)
+ ///
+ /// What screen readers hear from the job bar: the job when one starts, the idle line when the last one ends; not its
+ /// progress, speed or time left, which change every second.
+ ///
+ public string JobAnnouncement => _jobActive && _jobName is not null ? _jobName : JobText;
+
+ ///
+ /// Updates the global job bar (and the taskbar progress through the window). says which job
+ /// it is without its progress ("Render: Harbour sunset"); null reads .
+ ///
+ public void SetJob(string? text, double progress, bool indeterminate = false, string? name = null)
{
_jobText = text;
+ _jobName = text is null ? null : name ?? text;
IsJobActive = text is not null;
JobProgress = progress;
IsJobIndeterminate = indeterminate;
OnPropertyChanged(nameof(JobText));
+ OnPropertyChanged(nameof(JobAnnouncement));
}
// ---- Status strip ----
@@ -222,6 +239,7 @@ public sealed class ShellViewModel : LocalizedViewModel
_queuedCount = queued;
OnPropertyChanged(nameof(JobsText));
OnPropertyChanged(nameof(JobText));
+ OnPropertyChanged(nameof(JobAnnouncement));
}
public void Navigate(SectionKey key)
@@ -250,14 +268,14 @@ public sealed class ShellViewModel : LocalizedViewModel
ActionCommand = action is null ? null : new RelayCommand(action),
});
- /// Errors are one sentence saying what happened plus one action (BRIEF §0.2 rule 6).
+ /// Errors are one sentence saying what happened plus one action (BRIEF §0.2 rule 6); the details go to the log.
public void ReportError(Exception ex)
{
Log.Error("ui", "Operation failed", ex);
ShowToast(new Toast
{
- Title = Loc.L("Errors.Unexpected"),
- Message = ex.Message,
+ Title = ErrorText.For(ex),
+ IsError = true,
ActionText = Loc.L("Common.OpenLogs"),
ActionToolTip = Loc.L("Tooltips.Common.OpenLogs"),
ActionCommand = new RelayCommand(() => ShellActions.Reveal(Services.Environment.LogDirectory)),
diff --git a/src/Titano.Data/Archiving/SequenceTrash.cs b/src/Titano.Data/Archiving/SequenceTrash.cs
index 5e9c321b..d3c7bd87 100644
--- a/src/Titano.Data/Archiving/SequenceTrash.cs
+++ b/src/Titano.Data/Archiving/SequenceTrash.cs
@@ -60,6 +60,12 @@ public sealed class StaleDeletePlanException(Guid sequenceId) : InvalidOperation
public Guid SequenceId { get; } = sequenceId;
}
+/// A trash entry cannot come back: the index already holds its sequence (restored before, or scanned again); nothing moved.
+public sealed class SequenceInLibraryException(Guid sequenceId, string title) : InvalidOperationException(Loc.L("Archive.Error.InLibrary", title))
+{
+ public Guid SequenceId { get; } = sequenceId;
+}
+
///
/// Deleting sequences without erasing anything (BRIEF §0.2 rule 8, §12.2, §12.5): is the dry
/// run; moves each sequence folder whole — originals, proxies, exports and its sidecars — into
@@ -188,7 +194,7 @@ public sealed class SequenceTrash
/// sequence's id, as a scan would adopt it, with the title, tags, rating and notes the record kept. Returns the
/// restored row. When it cannot be indexed, the folder goes back into the trash with its record.
///
- /// The index already holds that sequence.
+ /// The index already holds that sequence.
/// The entry is not in the trash.
public async Task RestoreAsync(Archive archive, string name, CancellationToken cancellationToken = default)
{
@@ -203,7 +209,7 @@ public sealed class SequenceTrash
throw new DirectoryNotFoundException($"{name} is not in the trash of {archive.Name}.");
var id = record.Sequence.Id;
if (await _db.Sequences.GetAsync(id, cancellationToken).ConfigureAwait(false) is not null)
- throw new InvalidOperationException(Loc.L("Archive.Error.InLibrary", record.Sequence.DisplayTitle));
+ throw new SequenceInLibraryException(id, record.Sequence.DisplayTitle);
var locations = (await _db.Sequences.ListLocationsAsync(archive.Id, cancellationToken).ConfigureAwait(false)).Select(l => l.Folder)
.ToHashSet(StringComparer.OrdinalIgnoreCase);
diff --git a/src/Titano.Data/Processing/ProcessingJobs.cs b/src/Titano.Data/Processing/ProcessingJobs.cs
index bc990d70..8f124c46 100644
--- a/src/Titano.Data/Processing/ProcessingJobs.cs
+++ b/src/Titano.Data/Processing/ProcessingJobs.cs
@@ -37,7 +37,10 @@ public static class ProcessingJobs
ArgumentNullException.ThrowIfNull(sequence);
ArgumentNullException.ThrowIfNull(export);
var parameters = Parameters(export, sourceWidth, sourceHeight, project?.ToJson(), useProxies);
- return new ArchiveJobRequest(JobKind.Render, [sequence.Id], $"{sequence.DisplayTitle} → {parameters.PresetName}",
+ // The label is stored as written, in the language of the moment like the preset name: its arrow points from the
+ // sequence to the preset in that language's reading direction.
+ var label = Loc.L(Loc.IsRightToLeft ? "Jobs.Target.RenderRtl" : "Jobs.Target.Render", sequence.DisplayTitle, parameters.PresetName);
+ return new ArchiveJobRequest(JobKind.Render, [sequence.Id], label,
JsonSerializer.Serialize(parameters, ProtocolJson.Default.RenderJobParameters), JobPriority.User);
}
diff --git a/src/Titano.Setup/Views/SetupWindow.xaml b/src/Titano.Setup/Views/SetupWindow.xaml
index 52af7fe6..fe8ffd5e 100644
--- a/src/Titano.Setup/Views/SetupWindow.xaml
+++ b/src/Titano.Setup/Views/SetupWindow.xaml
@@ -18,8 +18,7 @@
-
-
+
diff --git a/src/Titano.Setup/Views/SetupWindow.xaml.cs b/src/Titano.Setup/Views/SetupWindow.xaml.cs
index 17a292d2..6433f946 100644
--- a/src/Titano.Setup/Views/SetupWindow.xaml.cs
+++ b/src/Titano.Setup/Views/SetupWindow.xaml.cs
@@ -26,8 +26,6 @@ internal sealed partial class SetupWindow : TitanoWindow
_shownStage = model.Stage;
DataContext = model;
InitializeComponent();
- ApplyFlowDirection();
- Loc.CultureChanged += OnCultureChanged;
// Ahead of the chrome's own Close binding, which is always enabled.
CommandBindings.Insert(0, new CommandBinding(SystemCommands.CloseWindowCommand, null, OnCanClose));
model.PickFolder = initial => FolderPicker.Pick(new WindowInteropHelper(this).Handle, Loc.L("Setup.Field.Folder"), initial);
@@ -46,12 +44,6 @@ internal sealed partial class SetupWindow : TitanoWindow
base.OnClosing(e);
}
- protected override void OnClosed(EventArgs e)
- {
- Loc.CultureChanged -= OnCultureChanged;
- base.OnClosed(e);
- }
-
private void OnCanClose(object sender, CanExecuteRoutedEventArgs e)
{
if (!_model.IsWorking) return;
@@ -97,8 +89,4 @@ internal sealed partial class SetupWindow : TitanoWindow
var buttons = Footer.Children.OfType