diff --git a/Directory.Build.props b/Directory.Build.props
index cda20b1f..c0c906ca 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -43,6 +43,14 @@
+
+
+ false
+
+
+
+
+
true
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index df191f33..0bf18679 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -12,7 +12,7 @@ Companion to `docs/BRIEF.md` (scope, behaviour) and `docs/ui/DESIGN.md` (looks).
| `src/Titano.Data` | net10.0 | `IDatabase`, SQLite binding, PostgreSQL wire client, migrations, repositories, the job engine, the archive engine (`Archiving`), the analysis/render engine (`Processing`) and the client sync engine (`Sync`) |
| `src/Titano.Protocol` | net10.0 | API v1 DTOs, source-generated JSON context, typed `TitanoClient` with certificate pinning and bandwidth limiting |
| `src/Titano.Server` | net10.0 (Web SDK) | ASP.NET Core minimal API, auth, uploads, sync, jobs, render nodes, events, embedded admin panel, Windows service host |
-| `src/Titano.Ui` | net10.0-windows (WPF) | Theme (DESIGN tokens), icons, standard and custom controls, visuals (charts, filmstrip, preview, curve editor, virtualizing grid), `Loc` markup extension, MVVM helpers |
+| `src/Titano.Ui` | net10.0-windows (WPF) | Theme (DESIGN tokens), icons, standard and custom controls, visuals (charts, filmstrip, preview, curve editor, virtualizing grid), `Loc` markup extension, MVVM helpers, notification-area icon |
| `src/Titano.App` | WPF exe `Titano.exe` | Desktop client |
| `src/Titano.Uploader` | WPF exe | Uploader (tray, watch folders, resumable queue) |
| `src/Titano.Setup` | WPF exe | In-house installer/uninstaller (TPK1 payload) |
@@ -46,7 +46,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
| `Model` | Domain entities and enums (§5) shared by Data, Server and clients |
| `Packaging` | TPK1 installer payload writer/reader, staged install transaction |
| `Diagnostics` | `Log`, file sink, synthetic sequences, `SecretScrubber`, `DiagnosticsArchive` (scrubbed diagnostics zip) |
-| `Localization`, `IO`, `Hashing`, `Branding` | `Loc`/plural rules, `AtomicFile`, CRC-32/SHA helpers, brand mark geometry |
+| `Localization`, `IO`, `Hashing`, `Branding` | `Loc`/plural rules, `AtomicFile`, `StartupCommand` (sign-in entries of the programs, removed by the uninstaller), CRC-32/SHA helpers, brand mark geometry |
### 2.2 Titano.Data
@@ -64,15 +64,15 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
| Folder | Content |
|---|---|
-| `Shell` | `MainWindow`, `ShellViewModel` (rail, sections, first run), dialogs, `ErrorText` (the sentence of an error toast), `ScreenCapture` (`--capture` scenes), `SectionTemplates.xaml` (view model → view) |
+| `Shell` | `MainWindow` (rail and its shortcuts, taskbar progress), `ShellViewModel` (rail, sections, first run), `OsNotifications` (toasts as Windows notifications while the window is minimised or in the background), dialogs, `ErrorText` (the sentence of an error toast), `ScreenCapture` (`--capture` scenes), `SectionTemplates.xaml` (view model → view) |
| `Sections` | One `XxxView.xaml` + `XxxViewModel` per screen: Welcome, Library, Sequence (editor), Import, Archive, Jobs, Server, Settings, About |
| `Library` | Filter, facets, pager, timeline, saved views, quick and mass actions, remote cards and thumbnails, thumbnail cache, list export |
| `Editor` | `EditorSession` (project, undo/redo, saving, merges), `ISequenceSource` (`LocalSequenceSource`, `RemoteSequenceSource`), tabs (Frames, Exposure, Camera, Motion, Export), `PreviewRenderer`, `ExportPlanner`, `ExportSync`, `SavedCopies`, `SequenceJobs` |
| `Import` | `CardPool` (inserted cards, remembered cards, folders), camera profiles, plans and choices, destinations (archive, folder, server through `ServerImportSink`), card actions (verified delete, format, eject) |
| `Archive` | `CurrentArchive`, `ArchiveTree`, figures for the charts, maintenance reports, mass rename and move, delete and trash dialogs (`SequenceDeletion`, `DeletePlans`), `ArchiveFailures` |
| `Server` | `ServerSession`, `ConnectFlow` (trust on first use), `SyncHost` (sync engine, agent, metered hold, editor connections, Export Sync), sync table, `RemoteSequenceApi` |
-| `Jobs`, `Settings`, `About` | Job list and buffering; settings rows, encoder and format inventories, `ProcessingTuning` (Settings › Rendering and Analysis applied to each job), `InterfacePriority`, language catalog, naming preview; update check and download |
-| `Infrastructure` | `AppServices` (composition root), `AppSettings`, `AppEnvironment` (installed or portable), `AppClock` (today's date, frozen by `--capture`), `UiLanguage`, `LiveRegion`, `RenderNodeHost`, `DiagnosticsBundle`, `ShellActions` (BRIEF §8.6), device monitor |
+| `Jobs`, `Settings`, `About` | Job list and buffering, `JobNotices` (which job endings raise a toast; `JobEndings` lets a batch speak once); settings rows, encoder and format inventories, `ProcessingTuning` (Settings › Rendering and Analysis applied to each job), `InterfacePriority`, language catalog, naming preview; update check and download |
+| `Infrastructure` | `AppServices` (composition root), `AppSettings`, `AppEnvironment` (installed or portable), `AppClock` (today's date, frozen by `--capture`), `StartWithWindows` (this copy's sign-in entry), `UiLanguage`, `LiveRegion`, `RenderNodeHost`, `DiagnosticsBundle`, `ShellActions` (BRIEF §8.6), device monitor |
| `DesignTime` | `SampleData`: the archive, jobs and server the screenshots and smoke tests run on, dated from the fixed `SampleData.Now` |
### 2.4 Titano.Ui and Titano.Server
@@ -81,6 +81,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
|---|---|
| `Ui/Themes`, `Ui/Theming` | DESIGN tokens (light, dark), typography, control styles, `ThemeManager` |
| `Ui/Controls` | `TitanoWindow` (chrome, language direction), `NavRail`, `JobBar`, `ToastHost`, `Field` (placeholder, icon, error), `Chip`, `AutoSlider`, `StatusGlyph`, `EmptyState`, `Icon`, `Bidi` (right-to-left rules), `Motion` (animations off for screenshots) |
+| `Ui/Interop` | DWM calls of the window chrome; `TrayIcon` (`Shell_NotifyIconW`: the Uploader's tray, the client's Windows notifications) |
| `Ui/Visuals` | `DrawingElement` (hover readout, item keyboard and activation) and its charts (`BarChart`, `SeriesChart`, `StackedBar`, `HeatmapStrip`, `TimelineBands`), `Filmstrip`, `PreviewViewport`, `CurveEditor`, `SequenceCard`, `VirtualizingWrapPanel`, `SegmentedControl`, `SplitButton` |
| `Server/Api`, `Server/Events` | Endpoint groups (`XxxEndpoints.Map`), API errors, the WebSocket `EventHub` |
| `Server/Security` | Accounts, password hashing, tokens, session cookies, login guard, access rules, audit log |
diff --git a/i18n/ar/Shell.ar.resx b/i18n/ar/Shell.ar.resx
index 528d0290..856a83b5 100644
--- a/i18n/ar/Shell.ar.resx
+++ b/i18n/ar/Shell.ar.resx
@@ -39,7 +39,6 @@
ضم مجلد موجودتغيير…اختيار…
- ساعد في تحسين Titano بإحصاءات استخدام مجهولةمتابعةمُكتشَفإنشاء أرشيف محلي
diff --git a/i18n/ar/Tooltips.ar.resx b/i18n/ar/Tooltips.ar.resx
index 1a865acf..5feb78f1 100644
--- a/i18n/ar/Tooltips.ar.resx
+++ b/i18n/ar/Tooltips.ar.resx
@@ -200,7 +200,6 @@
جلب النسخ الوكيلة مجددًا وإعادة فتح التسلسل؛ ويُظهر شريط المهام الجارية التنزيلإيقاف مؤقت · مفتاح المسافةتشغيل الإطارات · مفتاح المسافة؛ ومفاتيح الأسهم تنتقل إطارًا واحدًا
- إظهار البكسلات بنسبة 1:1 دون استيفاء · Ctrl+1؛ Ctrl+0 للملاءمةتشغيل عشر ثوانٍ من إطارات الفيديو بالإعدادات الحاليةمقارنة بخط فاصل: الأصلي على اليسار والمصحَّح على اليمين؛ اسحب الخطتعتيم ما يقتطعه الإخراج (ما سأفقده)
@@ -561,7 +560,6 @@
تلقائي: ربع الذاكرة المثبتةالعودة إلى «تلقائي»: ربع الذاكرة المثبتةفتح مجلد البيانات في مستكشف الملفات
- اللغة، والسمة، وإحصاءات الاستخدامملف تعريف الجودة، وميزانية الذاكرة، والتوازي، والمرمّزاتالخادم الافتراضي، وعقدة التصيير، والشهادات الموثوقةمجلد التخزين المؤقت، والصور المصغرة في الذاكرة، وحد التخزين المؤقت
diff --git a/i18n/bg/Shell.bg.resx b/i18n/bg/Shell.bg.resx
index 5f26d1ef..9930dae6 100644
--- a/i18n/bg/Shell.bg.resx
+++ b/i18n/bg/Shell.bg.resx
@@ -31,7 +31,6 @@
Присъединяване на съществуваща папкаПромяна…Избор…
- Помогнете за подобряването на Titano с анонимна статистика за използванетоПродължаванеОткритСъздаване на локален архив
diff --git a/i18n/bg/Tooltips.bg.resx b/i18n/bg/Tooltips.bg.resx
index f8d1c859..afa48197 100644
--- a/i18n/bg/Tooltips.bg.resx
+++ b/i18n/bg/Tooltips.bg.resx
@@ -198,7 +198,6 @@
Изтегля отново прокси файловете и отваря серията наново; лентата с текущите задачи показва изтеглянетоПауза · ИнтервалВъзпроизвежда кадрите · Интервал; стрелките преместват с един кадър
- Показва пикселите 1:1 без интерполация · Ctrl+1; Ctrl+0 побира в прозорецаВъзпроизвежда десет секунди от кадрите на видеото с текущите настройкиСравнение с плъзгаща се линия: оригиналът е отляво, коригираният – отдясно; плъзнете линиятаЗатъмнява това, което изходът изрязва (какво губя)
@@ -531,7 +530,6 @@
Авто: една четвърт от инсталираната паметВръщане към „Авто“: една четвърт от инсталираната паметОтваря папката с данни във файловия мениджър
- Език, тема, статистика за използванеПрофил на качеството, бюджет на паметта, паралелизъм, кодериСървър по подразбиране, възел за рендериране, доверени сертификатиПапка на кеша, миниатюри в паметта, лимит на кеша
diff --git a/i18n/cs/Shell.cs.resx b/i18n/cs/Shell.cs.resx
index 2c4b79bc..f03fbdcc 100644
--- a/i18n/cs/Shell.cs.resx
+++ b/i18n/cs/Shell.cs.resx
@@ -35,7 +35,6 @@
Převzít existující složkuZměnit…Vybrat…
- Pomozte vylepšit Titano anonymními statistikami používáníPokračovatNalezenoVytvořit místní archiv
diff --git a/i18n/cs/Tooltips.cs.resx b/i18n/cs/Tooltips.cs.resx
index e2d5f579..19be8b7f 100644
--- a/i18n/cs/Tooltips.cs.resx
+++ b/i18n/cs/Tooltips.cs.resx
@@ -199,7 +199,6 @@
Znovu stáhne proxy a znovu otevře sekvenci; stahování je vidět na panelu úlohPozastaví přehrávání · MezerníkPřehraje snímky · Mezerník; šipky posunou o jeden snímek
- Zobrazí pixely v poměru 1:1 bez interpolace · Ctrl+1; Ctrl+0 přizpůsobí oknuPřehraje deset sekund snímků videa s aktuálním nastavenímPorovnání s předělem: originál vlevo, opravený obraz vpravo; táhněte dělicí čáruZtmaví, co výstup odřízne (co ztratím)
@@ -546,7 +545,6 @@
Auto: čtvrtina nainstalované pamětiZpět na Auto: čtvrtina nainstalované pamětiOtevře datovou složku v Průzkumníkovi
- Jazyk, motiv, statistiky používáníProfil kvality, limit paměti, paralelismus, kodéryVýchozí server, renderovací uzel, důvěryhodné certifikátySložka mezipaměti, miniatury v paměti, limit mezipaměti
diff --git a/i18n/da/Shell.da.resx b/i18n/da/Shell.da.resx
index cfdc32ee..bd1958d4 100644
--- a/i18n/da/Shell.da.resx
+++ b/i18n/da/Shell.da.resx
@@ -31,7 +31,6 @@
Overtag en eksisterende mappeSkift…Vælg…
- Hjælp med at forbedre Titano med anonym brugsstatistikFortsætFundetOpret et lokalt arkiv
diff --git a/i18n/da/Tooltips.da.resx b/i18n/da/Tooltips.da.resx
index 666a1dae..e482dc7b 100644
--- a/i18n/da/Tooltips.da.resx
+++ b/i18n/da/Tooltips.da.resx
@@ -198,7 +198,6 @@
Hent proxyerne igen, og genåbn sekvensen; jobbjælken viser downloadenPause · MellemrumAfspil billederne · Mellemrum; piletasterne går ét billede ad gangen
- Vis pixel i 1:1 uden interpolation · Ctrl+1; Ctrl+0 tilpasserAfspil ti sekunder af videoens billeder med de aktuelle indstillingerSammenligning med skillelinje: original til venstre, korrigeret til højre; træk i linjenDæmp det, som outputtet skærer væk (hvad jeg mister)
@@ -531,7 +530,6 @@
Auto: en fjerdedel af den installerede hukommelseTilbage til Auto: en fjerdedel af den installerede hukommelseÅbn datamappen i Stifinder
- Sprog, tema, brugsstatistikKvalitetsprofil, hukommelsesbudget, parallelitet, encodereStandardserver, renderingsnode, betroede certifikaterCachemappe, miniaturer i hukommelsen, cachegrænse
diff --git a/i18n/de/Shell.de.resx b/i18n/de/Shell.de.resx
index 142cbae4..82de2333 100644
--- a/i18n/de/Shell.de.resx
+++ b/i18n/de/Shell.de.resx
@@ -31,7 +31,6 @@
Vorhandenen Ordner einbindenÄndern…Auswählen…
- Helfen Sie, Titano mit anonymer Nutzungsstatistik zu verbessernWeiterGefundenLokales Archiv erstellen
diff --git a/i18n/de/Tooltips.de.resx b/i18n/de/Tooltips.de.resx
index b0f4c22c..4be9932d 100644
--- a/i18n/de/Tooltips.de.resx
+++ b/i18n/de/Tooltips.de.resx
@@ -198,7 +198,6 @@
Proxys erneut abrufen und die Sequenz neu öffnen; die Auftragsleiste zeigt den DownloadAnhalten · LeertasteFrames abspielen · Leertaste; Pfeiltasten gehen einen Frame weiter
- Pixel 1:1 ohne Interpolation anzeigen · Ctrl+1; Ctrl+0 passt einZehn Sekunden der Videoframes mit den aktuellen Einstellungen abspielenWischvergleich: Original links, korrigiert rechts; ziehen Sie die LinieAbdunkeln, was die Ausgabe abschneidet (was verloren geht)
@@ -531,7 +530,6 @@
Auto: ein Viertel des installierten ArbeitsspeichersZurück zu Auto: ein Viertel des installierten ArbeitsspeichersDatenordner im Explorer öffnen
- Sprache, Design, NutzungsstatistikQualitätsprofil, Arbeitsspeicher-Budget, Parallelität, EncoderStandardserver, Render-Knoten, vertrauenswürdige ZertifikateCache-Ordner, Miniaturansichten im Arbeitsspeicher, Cache-Limit
diff --git a/i18n/el/Shell.el.resx b/i18n/el/Shell.el.resx
index 2e3c714a..065ad238 100644
--- a/i18n/el/Shell.el.resx
+++ b/i18n/el/Shell.el.resx
@@ -31,7 +31,6 @@
Ενσωμάτωση υπάρχοντος φακέλουΑλλαγή…Επιλογή…
- Βοηθήστε στη βελτίωση του Titano με ανώνυμα στατιστικά χρήσηςΣυνέχειαΒρέθηκεΔημιουργία τοπικής αρχειοθήκης
diff --git a/i18n/el/Tooltips.el.resx b/i18n/el/Tooltips.el.resx
index c037cf84..b616b8c0 100644
--- a/i18n/el/Tooltips.el.resx
+++ b/i18n/el/Tooltips.el.resx
@@ -198,7 +198,6 @@
Νέα λήψη των proxy και νέο άνοιγμα της ακολουθίας. Η γραμμή προόδου εργασιών δείχνει τη λήψηΠαύση · πλήκτρο διαστήματοςΑναπαραγωγή των καρέ · πλήκτρο διαστήματος. Τα βέλη μετακινούν κατά ένα καρέ
- Εμφάνιση των pixel σε 1:1 χωρίς παρεμβολή · Ctrl+1. Με Ctrl+0 προσαρμόζεται στο παράθυροΑναπαραγωγή δέκα δευτερολέπτων από τα καρέ του βίντεο με τις τρέχουσες ρυθμίσειςΣύγκριση με διαχωριστική γραμμή: το πρωτότυπο αριστερά, το διορθωμένο δεξιά. Σύρετε τη γραμμήΣκίαση όσων αποκόπτει η έξοδος (τι χάνεται)
@@ -531,7 +530,6 @@
Αυτόματο: το ένα τέταρτο της εγκατεστημένης μνήμηςΕπαναφορά σε Αυτόματο: το ένα τέταρτο της εγκατεστημένης μνήμηςΆνοιγμα του φακέλου δεδομένων στην Εξερεύνηση αρχείων
- Γλώσσα, θέμα, στατιστικά χρήσηςΠροφίλ ποιότητας, όριο μνήμης, παραλληλισμός, κωδικοποιητέςΠροεπιλεγμένος διακομιστής, κόμβος απόδοσης, αξιόπιστα πιστοποιητικάΦάκελος κρυφής μνήμης, μικρογραφίες στη μνήμη, όριο κρυφής μνήμης
diff --git a/i18n/en/Settings.resx b/i18n/en/Settings.resx
index 5175d1c5..c70ea22d 100644
--- a/i18n/en/Settings.resx
+++ b/i18n/en/Settings.resx
@@ -83,6 +83,10 @@
Formats on this PCCheck on startLanguage
+ Notifications
+ Windows notifications
+ Start with Windows
+ StartupThemeDarkLight
diff --git a/i18n/en/Shell.resx b/i18n/en/Shell.resx
index 47ad54db..478c846a 100644
--- a/i18n/en/Shell.resx
+++ b/i18n/en/Shell.resx
@@ -5,6 +5,12 @@
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=b77a5c561934e089Titanoinvariant
+ Job finished
+ {0} job finished
+ {0} jobs finished
+ Job failed
+ {0} job failed
+ {0} jobs failedReadyPause jobReady · {0} jobs queued
@@ -29,10 +35,10 @@
{0:N0} photos{0:N0} sequence{0:N0} sequences
+ Show TitanoAdopt an existing folderChange…Choose…
- Help improve Titano with anonymous usage countslongContinueFoundCreate a local archive
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index 3275731e..85411194 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -199,7 +199,6 @@
Fetch the proxies again and reopen the sequence; the job bar shows the downloadPause · SpacePlay the frames · Space; arrows step one frame
- Show pixels at 1:1 without interpolation · Ctrl+1; Ctrl+0 fitsPlay ten seconds of the video’s frames with the current settingsWipe compare: original on the left, corrected on the right; drag the lineDim what the output cuts (what I lose)
@@ -207,6 +206,7 @@
Hide what the output cuts (how it will look)Close full screen · EscFull screen at native resolution · Esc closes
+ Show pixels at 1:1 without interpolation · Ctrl+Shift+1; Ctrl+0 fitsShow the sky and landscape boundary used by region deflickerShow or hide the shot dataOverlay the motion to the next frame measured by the engine
@@ -547,8 +547,9 @@
Analysis width, night and star thresholds, deep analysisArchive folder, naming templates, proxy and thumbnail size, rescansWhich decoder handles each format on this PC, codec install links
- Language, theme, usage counts
+ Language, theme, startup, notificationsSession rules, verification, duplicates, after-import actions
+ While Titano is minimised or in the background, inserted cards, finished jobs and server messages also appear as Windows notificationsQuality profile, memory budget, parallelism, encodersDefault server, render node, trusted certificatesCache folder, thumbnails in memory, cache limit
@@ -575,6 +576,7 @@
Speed on the synthetic 1280×720 test clipAlways the Microsoft software H.264 encoder; slower, identical everywhereStars per megapixel from which a night frame counts as a star field · Enter applies, Esc reverts
+ Start minimised when you sign in to Windows, so inserted cards are noticedDark interface (default)Light interfaceFollow the Windows app mode
diff --git a/i18n/es/Shell.es.resx b/i18n/es/Shell.es.resx
index f6e87daa..9e4d85e9 100644
--- a/i18n/es/Shell.es.resx
+++ b/i18n/es/Shell.es.resx
@@ -31,7 +31,6 @@
Incorporar una carpeta existenteCambiar…Elegir…
- Ayuda a mejorar Titano con recuentos de uso anónimosContinuarEncontradoCrear una fototeca local
diff --git a/i18n/es/Tooltips.es.resx b/i18n/es/Tooltips.es.resx
index 03521147..ade4257f 100644
--- a/i18n/es/Tooltips.es.resx
+++ b/i18n/es/Tooltips.es.resx
@@ -198,7 +198,6 @@
Vuelve a obtener los proxies y reabre la secuencia; la barra de tareas de Titano muestra la descargaPausa · EspacioReproduce los fotogramas · Espacio; las flechas avanzan de uno en uno
- Muestra los píxeles a 1:1 sin interpolación · Ctrl+1; Ctrl+0 ajusta a la ventanaReproduce diez segundos de fotogramas del vídeo con los ajustes actualesComparación con cortinilla: original a la izquierda, corregido a la derecha; arrastra la líneaAtenúa lo que corta la salida (lo que pierdo)
@@ -531,7 +530,6 @@
Auto: una cuarta parte de la memoria instaladaVolver a Auto: una cuarta parte de la memoria instaladaAbre la carpeta de datos en el Explorador
- Idioma, tema, estadísticas de usoPerfil de calidad, memoria asignada, paralelismo, codificadoresServidor predeterminado, nodo de renderizado, certificados de confianzaCarpeta de caché, miniaturas en memoria, límite de caché
diff --git a/i18n/et/Shell.et.resx b/i18n/et/Shell.et.resx
index a806fabd..c95b1c56 100644
--- a/i18n/et/Shell.et.resx
+++ b/i18n/et/Shell.et.resx
@@ -31,7 +31,6 @@
Võta olemasolev kaust üleMuuda…Vali…
- Aidake Titanot anonüümse kasutusstatistikaga paremaks muutaJätkaLeitudLoo kohalik arhiiv
diff --git a/i18n/et/Tooltips.et.resx b/i18n/et/Tooltips.et.resx
index 4a397d82..a958ea60 100644
--- a/i18n/et/Tooltips.et.resx
+++ b/i18n/et/Tooltips.et.resx
@@ -198,7 +198,6 @@
Hankige proksid uuesti ja avage jada taas; allalaadimist näitab tööde ribaPeatage · TühikEsitage kaadrid · Tühik; nooltega liigute kaadri kaupa
- Kuvage pikslid suhtes 1:1 ilma interpoleerimiseta · Ctrl+1; Ctrl+0 sobitabEsitage praeguste sätetega kümme sekundit video kaadreidLiugvõrdlus: originaal vasakul, korrigeeritud paremal; lohistage joontTumendage osa, mille väljund ära lõikab (mida ma kaotan)
@@ -531,7 +530,6 @@
Auto: veerand installitud mälustTagasi režiimile Auto: veerand installitud mälustAvage andmekaust failihalduris
- Keel, kujundus, kasutusstatistikaKvaliteediprofiil, mälueelarve, paralleelsus, kodeerijadVaikeserver, renderdussõlm, usaldatud sertifikaadidVahemälu kaust, pisipildid mälus, vahemälu piirang
diff --git a/i18n/fi/Shell.fi.resx b/i18n/fi/Shell.fi.resx
index db730a16..9f31b8e1 100644
--- a/i18n/fi/Shell.fi.resx
+++ b/i18n/fi/Shell.fi.resx
@@ -31,7 +31,6 @@
Sisällytä nykyinen kansioMuuta…Valitse…
- Auta kehittämään Titanoa nimettömillä käyttötilastoillaJatkaLöydettyLuo paikallinen arkisto
diff --git a/i18n/fi/Tooltips.fi.resx b/i18n/fi/Tooltips.fi.resx
index 14cdea9d..4350f2bb 100644
--- a/i18n/fi/Tooltips.fi.resx
+++ b/i18n/fi/Tooltips.fi.resx
@@ -198,7 +198,6 @@
Hae proxyt uudelleen ja avaa sarja uudestaan; työpalkissa näkyy latausKeskeytä · VälilyöntiToista kuvat · Välilyönti; nuolinäppäimet siirtävät yhden kuvan kerrallaan
- Näytä pikselit suhteessa 1:1 ilman interpolointia · Ctrl+1; Ctrl+0 sovittaaToista kymmenen sekuntia videon kuvia nykyisillä asetuksillaPyyhkäisyvertailu: alkuperäinen vasemmalla, korjattu oikealla; vedä viivaaHimmennä se, minkä tuloste rajaa pois (mitä menetän)
@@ -531,7 +530,6 @@
Automaattinen: neljännes asennetusta muististaPalauta automaattinen: neljännes asennetusta muististaAvaa datakansio Resurssienhallinnassa
- Kieli, teema, käyttötilastotLaatuprofiili, muistibudjetti, rinnakkaisuus, kooderitOletuspalvelin, renderöintisolmu, luotetut varmenteetVälimuistikansio, pikkukuvat muistissa, välimuistin raja
diff --git a/i18n/fr/Shell.fr.resx b/i18n/fr/Shell.fr.resx
index 52e8de32..a254b083 100644
--- a/i18n/fr/Shell.fr.resx
+++ b/i18n/fr/Shell.fr.resx
@@ -31,7 +31,6 @@
Adopter un dossier existantModifier…Choisir…
- Aider à améliorer Titano grâce à des statistiques d'utilisation anonymesContinuerTrouvéCréer une archive locale
diff --git a/i18n/fr/Tooltips.fr.resx b/i18n/fr/Tooltips.fr.resx
index 416d39e8..218f78c2 100644
--- a/i18n/fr/Tooltips.fr.resx
+++ b/i18n/fr/Tooltips.fr.resx
@@ -198,7 +198,6 @@
Récupérer de nouveau les proxys et rouvrir la séquence ; la barre de suivi des tâches affiche le téléchargementPause · EspaceLire les images · Espace ; les flèches avancent d'une image
- Afficher les pixels à 1:1 sans interpolation · Ctrl+1 ; Ctrl+0 ajuste à la fenêtreLire dix secondes des images de la vidéo avec les paramètres actuelsComparaison par volet : l'original à gauche, la version corrigée à droite ; faites glisser la ligneAssombrir ce que la sortie coupe (ce que je perds)
@@ -531,7 +530,6 @@
Auto : un quart de la mémoire installéeRevenir à Auto : un quart de la mémoire installéeOuvrir le dossier de données dans l'Explorateur
- Langue, thème, statistiques d'utilisationProfil de qualité, budget mémoire, parallélisme, encodeursServeur par défaut, nœud de rendu, certificats approuvésDossier du cache, miniatures en mémoire, limite du cache
diff --git a/i18n/he/Shell.he.resx b/i18n/he/Shell.he.resx
index e491455c..18e00362 100644
--- a/i18n/he/Shell.he.resx
+++ b/i18n/he/Shell.he.resx
@@ -35,7 +35,6 @@
אמץ תיקייה קיימתשנה…בחר…
- עזור לשפר את Titano באמצעות נתוני שימוש אנונימייםהמשךנמצאצור ארכיון מקומי
diff --git a/i18n/he/Tooltips.he.resx b/i18n/he/Tooltips.he.resx
index 1f59d5c7..0c218012 100644
--- a/i18n/he/Tooltips.he.resx
+++ b/i18n/he/Tooltips.he.resx
@@ -199,7 +199,6 @@
הורדה חוזרת של קובצי הפרוקסי ופתיחה מחדש של הרצף; סרגל המשימות מציג את ההורדההשהיה · רווחהפעלת הפריימים · רווח; מקשי החצים מזיזים פריים אחד בכל פעם
- הצגת הפיקסלים ב-1:1 ללא אינטרפולציה · Ctrl+1; Ctrl+0 מתאים לחלוןהפעלת עשר שניות מפריימי הסרטון עם ההגדרות הנוכחיותהשוואה במסך מפוצל: המקור משמאל, המתוקן מימין; יש לגרור את הקו המפרידהכהיית מה שהפלט חותך (מה שאאבד)
@@ -546,7 +545,6 @@
אוטומטי: רבע מהזיכרון המותקןחזרה לאוטומטי: רבע מהזיכרון המותקןפתיחת תיקיית הנתונים בסייר הקבצים
- שפה, ערכת נושא, נתוני שימושפרופיל איכות, תקציב זיכרון, מקביליות, מקודדיםשרת ברירת מחדל, צומת רינדור, תעודות מהימנותתיקיית מטמון, תמונות ממוזערות בזיכרון, מגבלת מטמון
diff --git a/i18n/hi/Shell.hi.resx b/i18n/hi/Shell.hi.resx
index 3f18e088..bfc6588c 100644
--- a/i18n/hi/Shell.hi.resx
+++ b/i18n/hi/Shell.hi.resx
@@ -31,7 +31,6 @@
मौजूदा फ़ोल्डर अपनाएँबदलें…चुनें…
- अनाम उपयोग गणना भेजकर Titano को बेहतर बनाने में मदद करेंजारी रखेंमिलास्थानीय संग्रह बनाएँ
diff --git a/i18n/hi/Tooltips.hi.resx b/i18n/hi/Tooltips.hi.resx
index 09e7d7c0..c960fff6 100644
--- a/i18n/hi/Tooltips.hi.resx
+++ b/i18n/hi/Tooltips.hi.resx
@@ -198,7 +198,6 @@
प्रॉक्सी फिर से प्राप्त करें और सीक्वेंस फिर से खोलें; कार्य बार डाउनलोड दिखाता हैविराम दें · Spaceफ़्रेम चलाएँ · Space; तीर एक-एक फ़्रेम आगे-पीछे करते हैं
- बिना इंटरपोलेशन के 1:1 पर पिक्सेल दिखाएँ · Ctrl+1; Ctrl+0 फ़िट करता हैवर्तमान सेटिंग्स के साथ वीडियो के दस सेकंड के फ़्रेम चलाएँवाइप तुलना: बाईं ओर मूल, दाईं ओर सुधारित; रेखा खींचेंआउटपुट जो काटता है उसे मंद करें (क्या खो जाएगा)
@@ -531,7 +530,6 @@
ऑटो: इंस्टॉल की गई मेमोरी का एक चौथाईऑटो पर लौटें: इंस्टॉल की गई मेमोरी का एक चौथाईडेटा फ़ोल्डर को एक्सप्लोरर में खोलें
- भाषा, थीम, उपयोग गणनागुणवत्ता प्रोफ़ाइल, मेमोरी बजट, समानांतरता, एनकोडरडिफ़ॉल्ट सर्वर, रेंडर नोड, विश्वसनीय प्रमाणपत्रकैश फ़ोल्डर, मेमोरी में थंबनेल, कैश सीमा
diff --git a/i18n/hr/Shell.hr.resx b/i18n/hr/Shell.hr.resx
index d8560c71..42363850 100644
--- a/i18n/hr/Shell.hr.resx
+++ b/i18n/hr/Shell.hr.resx
@@ -35,7 +35,6 @@
Usvoji postojeću mapuPromijeni…Odaberi…
- Pomozite poboljšati Titano anonimnom statistikom korištenjaNastaviPronađenStvori lokalnu arhivu
diff --git a/i18n/hr/Tooltips.hr.resx b/i18n/hr/Tooltips.hr.resx
index 91e4ba6b..a3c9074b 100644
--- a/i18n/hr/Tooltips.hr.resx
+++ b/i18n/hr/Tooltips.hr.resx
@@ -199,7 +199,6 @@
Ponovno preuzima proxy kopije i ponovno otvara sekvencu; traka zadataka prikazuje preuzimanjePauzira · razmaknicaReproducira kadrove · razmaknica; strelice pomiču za jedan kadar
- Prikazuje piksele u omjeru 1:1 bez interpolacije · Ctrl+1; Ctrl+0 prilagođava prikazReproducira deset sekundi kadrova videozapisa s trenutačnim postavkamaUsporedba brisanjem: izvornik lijevo, korigirano desno; povucite crtuZatamnjuje ono što izlaz odrezuje (što gubim)
@@ -546,7 +545,6 @@
Auto: četvrtina instalirane memorijeVraća na Auto: četvrtina instalirane memorijeOtvara mapu s podacima u Eksploreru za datoteke
- Jezik, tema, statistika korištenjaProfil kvalitete, dopuštena memorija, paralelizam, koderiZadani poslužitelj, čvor za renderiranje, pouzdani certifikatiMapa predmemorije, minijature u memoriji, ograničenje predmemorije
diff --git a/i18n/hu/Shell.hu.resx b/i18n/hu/Shell.hu.resx
index 9261a318..557e7443 100644
--- a/i18n/hu/Shell.hu.resx
+++ b/i18n/hu/Shell.hu.resx
@@ -31,7 +31,6 @@
Meglévő mappa átvételeMódosítás…Kiválasztás…
- Segítsen fejleszteni a Titanót névtelen használati statisztikávalFolytatásMegtalálvaHelyi archívum létrehozása
diff --git a/i18n/hu/Tooltips.hu.resx b/i18n/hu/Tooltips.hu.resx
index f86e6521..b48c5345 100644
--- a/i18n/hu/Tooltips.hu.resx
+++ b/i18n/hu/Tooltips.hu.resx
@@ -198,7 +198,6 @@
Újra lekéri a proxykat, és újra megnyitja a sorozatot; a letöltést a feladatsáv mutatjaSzüneteltetés · SzóközLejátssza a képkockákat · Szóköz; a nyilak egy képkockát léptetnek
- A képpontokat 1:1 arányban, interpoláció nélkül mutatja · Ctrl+1; Ctrl+0: igazítás az ablakhozLejátssza a videó tíz másodpercnyi képkockáját az aktuális beállításokkalOsztott összehasonlítás: balra az eredeti, jobbra a korrigált kép; húzza a vonalatElhalványítja, amit a kimenet levág (mi vész el)
@@ -531,7 +530,6 @@
Auto: a telepített memória negyedeVissza Auto értékre: a telepített memória negyedeMegnyitja az adatmappát a Fájlkezelőben
- Nyelv, téma, használati statisztikaMinőségi profil, memóriakeret, párhuzamosság, kódolókAlapértelmezett szerver, renderelő csomópont, megbízható tanúsítványokGyorsítótár mappája, miniatűrök a memóriában, gyorsítótár korlátja
diff --git a/i18n/id/Shell.id.resx b/i18n/id/Shell.id.resx
index 12a3a20d..b74244da 100644
--- a/i18n/id/Shell.id.resx
+++ b/i18n/id/Shell.id.resx
@@ -31,7 +31,6 @@
Adopsi folder yang adaUbah…Pilih…
- Bantu tingkatkan Titano dengan hitungan penggunaan anonimLanjutkanDitemukanBuat arsip lokal
diff --git a/i18n/id/Tooltips.id.resx b/i18n/id/Tooltips.id.resx
index 6312dc7e..d5ccc995 100644
--- a/i18n/id/Tooltips.id.resx
+++ b/i18n/id/Tooltips.id.resx
@@ -198,7 +198,6 @@
Ambil lagi proksi dan buka ulang sekuens; bilah status tugas menampilkan unduhannyaJeda · SpasiPutar bingkai · Spasi; tombol panah berpindah satu bingkai
- Tampilkan piksel 1:1 tanpa interpolasi · Ctrl+1; Ctrl+0 menyesuaikan ukuranPutar sepuluh detik bingkai video dengan pengaturan saat iniPerbandingan geser: asli di kiri, dikoreksi di kanan; seret garisnyaRedupkan bagian yang terpangkas dari output (yang hilang)
@@ -531,7 +530,6 @@
Otomatis: seperempat dari memori terpasangKembali ke Otomatis: seperempat dari memori terpasangBuka folder data di Explorer
- Bahasa, tema, hitungan penggunaanProfil kualitas, anggaran memori, paralelisme, encoderServer default, node render, sertifikat tepercayaFolder cache, gambar mini di memori, batas cache
diff --git a/i18n/it/Settings.it.resx b/i18n/it/Settings.it.resx
index 8a7369cf..2324fa9a 100644
--- a/i18n/it/Settings.it.resx
+++ b/i18n/it/Settings.it.resx
@@ -80,6 +80,10 @@
Formati su questo PCControlla all'avvioLingua
+ Notifiche
+ Notifiche di Windows
+ Avvia con Windows
+ AvvioTemaScuroChiaro
diff --git a/i18n/it/Shell.it.resx b/i18n/it/Shell.it.resx
index 4e62588a..417f41f4 100644
--- a/i18n/it/Shell.it.resx
+++ b/i18n/it/Shell.it.resx
@@ -4,6 +4,12 @@
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
+ Attività completata
+ {0} attività completata
+ {0} attività completate
+ Attività non riuscita
+ {0} attività non riuscita
+ {0} attività non riusciteProntoPausa attivitàPronto · {0} attività in coda
@@ -28,10 +34,10 @@
{0:N0} foto{0:N0} sequenza{0:N0} sequenze
+ Mostra TitanoAdotta una cartella esistenteCambia…Scegli…
- Aiuta a migliorare Titano con conteggi d'uso anonimiContinuaTrovatoCrea un archivio locale
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index fa89d2e0..8af5e677 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -199,7 +199,6 @@
Scarica di nuovo i proxy e riapri la sequenza; la barra delle attività mostra lo scaricamentoPausa · SpazioRiproduce i fotogrammi · Spazio; le frecce avanzano di uno
- Mostra i pixel 1:1 senza interpolazione · Ctrl+1; Ctrl+0 adattaRiproduce dieci secondi dei fotogrammi del video con le impostazioni attualiConfronto a tendina: originale a sinistra, corretto a destra; trascina la lineaScurisce ciò che l’uscita taglia (cosa perdo)
@@ -207,6 +206,7 @@
Nasconde ciò che l’uscita taglia (come apparirà)Chiudi schermo intero · EscSchermo intero alla risoluzione nativa · Esc chiude
+ Mostra i pixel 1:1 senza interpolazione · Ctrl+Maiusc+1; Ctrl+0 adattaMostra il confine tra cielo e paesaggio usato dal deflicker per regioniMostra o nasconde i dati di scattoSovrappone il movimento verso il fotogramma successivo misurato dal motore
@@ -547,8 +547,9 @@
Larghezza di analisi, soglie di notte e stelle, analisi profondaCartella dell'archivio, modelli dei nomi, dimensione di proxy e miniature, riscansioniQuale decodificatore legge ogni formato su questo PC, link per installare i codec
- Lingua, tema, statistiche d'uso
+ Lingua, tema, avvio, notificheRegole delle sessioni, verifica, duplicati, azioni dopo l'importazione
+ Quando Titano è ridotto a icona o in secondo piano, schede inserite, attività finite e messaggi del server compaiono anche come notifiche di WindowsProfilo di qualità, memoria, parallelismo, encoderServer predefinito, nodo di rendering, certificati attendibiliCartella della cache, miniature in memoria, limite della cache
@@ -575,6 +576,7 @@
Velocità sulla clip di prova sintetica 1280×720Sempre l'encoder software H.264 di Microsoft; più lento, identico ovunqueStelle per megapixel da cui un fotogramma notturno conta come campo stellare · Invio applica, Esc annulla
+ Avvia ridotto a icona all’accesso a Windows, così le schede inserite vengono notateInterfaccia scura (predefinita)Interfaccia chiaraSegui la modalità app di Windows
diff --git a/i18n/ja/Shell.ja.resx b/i18n/ja/Shell.ja.resx
index 2342591b..1ed74d63 100644
--- a/i18n/ja/Shell.ja.resx
+++ b/i18n/ja/Shell.ja.resx
@@ -31,7 +31,6 @@
既存のフォルダーを登録変更…選択…
- 匿名の利用状況の集計を送信して Titano の改善に協力する続行検出済みローカルアーカイブを作成
diff --git a/i18n/ja/Tooltips.ja.resx b/i18n/ja/Tooltips.ja.resx
index 9c05b606..7d00469d 100644
--- a/i18n/ja/Tooltips.ja.resx
+++ b/i18n/ja/Tooltips.ja.resx
@@ -198,7 +198,6 @@
プロキシをもう一度取得して、シーケンスを開き直します。ダウンロードの状況はジョブバーに表示されます。一時停止 · Spaceフレームを再生 · Space、矢印キーで 1 フレームずつ移動
- 補間せずにピクセルを 1:1 で表示 · Ctrl+1、Ctrl+0 で全体表示現在の設定で、動画の 10 秒分のフレームを再生します。ワイプ比較: 左がオリジナル、右が補正後です。線をドラッグしてください。出力で切り取られる部分 (失われる部分) を暗く表示します。
@@ -531,7 +530,6 @@
自動: 搭載メモリの 4 分の 1自動に戻す: 搭載メモリの 4 分の 1エクスプローラーでデータフォルダーを開きます。
- 言語、テーマ、利用状況の集計品質プロファイル、メモリ割り当て、並列処理、エンコーダー既定のサーバー、レンダリングノード、信頼済みの証明書キャッシュフォルダー、メモリ内のサムネイル、キャッシュの上限
diff --git a/i18n/ko/Shell.ko.resx b/i18n/ko/Shell.ko.resx
index 4fd7d651..afcaad3d 100644
--- a/i18n/ko/Shell.ko.resx
+++ b/i18n/ko/Shell.ko.resx
@@ -31,7 +31,6 @@
기존 폴더 등록변경…선택…
- 익명 사용 통계를 보내 Titano 개선에 도움 주기계속찾음로컬 아카이브 만들기
diff --git a/i18n/ko/Tooltips.ko.resx b/i18n/ko/Tooltips.ko.resx
index c88c44c0..7633037e 100644
--- a/i18n/ko/Tooltips.ko.resx
+++ b/i18n/ko/Tooltips.ko.resx
@@ -198,7 +198,6 @@
프록시를 다시 받고 시퀀스를 다시 엽니다. 다운로드 진행 상황은 작업 막대에 표시됩니다.일시 중지 · Space프레임을 재생합니다 · Space, 화살표 키로 한 프레임씩 이동
- 보간 없이 픽셀을 1:1로 표시합니다 · Ctrl+1, Ctrl+0으로 창에 맞춤현재 설정으로 영상 프레임 10초 분량을 재생합니다.와이프 비교: 왼쪽은 원본, 오른쪽은 보정 결과입니다. 선을 끌어 조정하십시오.출력에서 잘리는 부분을 어둡게 표시합니다(잃는 부분).
@@ -531,7 +530,6 @@
자동: 설치된 메모리의 4분의 1자동으로 되돌리기: 설치된 메모리의 4분의 1탐색기에서 데이터 폴더를 엽니다.
- 언어, 테마, 사용 통계품질 프로필, 메모리 한도, 병렬 처리, 인코더기본 서버, 렌더링 노드, 신뢰하는 인증서캐시 폴더, 메모리 내 썸네일, 캐시 한도
diff --git a/i18n/lt/Shell.lt.resx b/i18n/lt/Shell.lt.resx
index 121bc3e0..d7949b79 100644
--- a/i18n/lt/Shell.lt.resx
+++ b/i18n/lt/Shell.lt.resx
@@ -35,7 +35,6 @@
Perimti esamą aplankąKeisti…Pasirinkti…
- Padėkite tobulinti Titano siųsdami anoniminę naudojimo statistikąTęstiRastaKurti vietinį archyvą
diff --git a/i18n/lt/Tooltips.lt.resx b/i18n/lt/Tooltips.lt.resx
index c7d79a02..3b8cc808 100644
--- a/i18n/lt/Tooltips.lt.resx
+++ b/i18n/lt/Tooltips.lt.resx
@@ -199,7 +199,6 @@
Iš naujo gauti tarpines kopijas ir vėl atidaryti seką; atsisiuntimas rodomas užduočių juostojePristabdyti · TarpasLeisti kadrus · Tarpas; rodyklės pereina po vieną kadrą
- Rodyti pikselius 1:1 be interpoliacijos · Ctrl+1; Ctrl+0 pritaiko prie langoPaleisti dešimt sekundžių vaizdo įrašo kadrų su dabartiniais parametraisPalyginimas su slankiąja riba: originalas kairėje, pataisytas dešinėje; vilkite linijąPritemdyti tai, ką išvestis nukerpa (ką prarandu)
@@ -546,7 +545,6 @@
Auto: ketvirtadalis įdiegtos atmintiesGrįžti į Auto: ketvirtadalis įdiegtos atmintiesAtidaryti duomenų aplanką failų naršyklėje
- Kalba, tema, naudojimo statistikaKokybės profilis, atminties limitas, lygiagretumas, koduotuvaiNumatytasis serveris, atvaizdavimo mazgas, patikimi sertifikataiTalpyklos aplankas, miniatiūros atmintyje, talpyklos riba
diff --git a/i18n/lv/Shell.lv.resx b/i18n/lv/Shell.lv.resx
index 85119191..db58111c 100644
--- a/i18n/lv/Shell.lv.resx
+++ b/i18n/lv/Shell.lv.resx
@@ -35,7 +35,6 @@
Pārņemt esošu mapiMainīt…Izvēlēties…
- Palīdzēt uzlabot Titano ar anonīmu lietojuma statistikuTurpinātAtrastsIzveidot lokālu arhīvu
diff --git a/i18n/lv/Tooltips.lv.resx b/i18n/lv/Tooltips.lv.resx
index 438d99c8..93bbbf60 100644
--- a/i18n/lv/Tooltips.lv.resx
+++ b/i18n/lv/Tooltips.lv.resx
@@ -199,7 +199,6 @@
Vēlreiz saņemt proxy attēlus un atkārtoti atvērt secību; lejupielāde redzama darbu joslāPauzēt · AtstarpeAtskaņot kadrus · Atstarpe; bultiņas pārslēdz pa vienam kadram
- Rādīt pikseļus mērogā 1:1 bez interpolācijas · Ctrl+1; Ctrl+0 ietilpinaAtskaņot desmit video sekunžu kadrus ar pašreizējiem iestatījumiemSalīdzināšana ar dalījuma līniju: pa kreisi oriģināls, pa labi koriģētais; velciet līnijuAptumšot to, ko izvade nogriež (ko es zaudēju)
@@ -546,7 +545,6 @@
Auto: ceturtdaļa no instalētās atmiņasAtpakaļ uz Auto: ceturtdaļa no instalētās atmiņasAtvērt datu mapi failu pārlūkā
- Valoda, motīvs, lietojuma statistikaKvalitātes profils, atmiņas budžets, paralēlisms, kodētājiNoklusējuma serveris, renderēšanas mezgls, uzticamie sertifikātiKešatmiņas mape, sīktēli atmiņā, kešatmiņas ierobežojums
diff --git a/i18n/ms/Shell.ms.resx b/i18n/ms/Shell.ms.resx
index 558dad41..c753d096 100644
--- a/i18n/ms/Shell.ms.resx
+++ b/i18n/ms/Shell.ms.resx
@@ -31,7 +31,6 @@
Terima pakai folder sedia adaTukar…Pilih…
- Bantu tingkatkan Titano dengan kiraan penggunaan tanpa namaTeruskanDitemuiCipta arkib setempat
diff --git a/i18n/ms/Tooltips.ms.resx b/i18n/ms/Tooltips.ms.resx
index cb749353..fd91c52c 100644
--- a/i18n/ms/Tooltips.ms.resx
+++ b/i18n/ms/Tooltips.ms.resx
@@ -198,7 +198,6 @@
Ambil proksi sekali lagi dan buka semula jujukan; bar status tugas menunjukkan muat turunJeda · SpaceMainkan bingkai · Space; anak panah untuk melangkah satu bingkai
- Tunjukkan piksel pada 1:1 tanpa interpolasi · Ctrl+1; Ctrl+0 untuk muat ke skrinMainkan sepuluh saat bingkai video dengan tetapan semasaPerbandingan sapuan: asal di kiri, dibetulkan di kanan; seret garisanMalapkan bahagian yang dipotong oleh output (apa yang hilang)
@@ -531,7 +530,6 @@
Auto: satu perempat daripada memori yang dipasangKembali ke Auto: satu perempat daripada memori yang dipasangBuka folder data dalam Penjelajah Fail
- Bahasa, tema, kiraan penggunaanProfil kualiti, bajet memori, keselarian, pengekodPelayan lalai, nod render, sijil dipercayaiFolder cache, lakaran kecil dalam memori, had cache
diff --git a/i18n/nb/Shell.nb.resx b/i18n/nb/Shell.nb.resx
index a6997790..0e29cba2 100644
--- a/i18n/nb/Shell.nb.resx
+++ b/i18n/nb/Shell.nb.resx
@@ -31,7 +31,6 @@
Overta en eksisterende mappeEndre…Velg…
- Hjelp med å forbedre Titano med anonym bruksstatistikkFortsettFunnetOpprett et lokalt arkiv
diff --git a/i18n/nb/Tooltips.nb.resx b/i18n/nb/Tooltips.nb.resx
index 0ca5581a..779c82dd 100644
--- a/i18n/nb/Tooltips.nb.resx
+++ b/i18n/nb/Tooltips.nb.resx
@@ -198,7 +198,6 @@
Hent proxyene på nytt og åpne sekvensen igjen; jobblinjen viser nedlastingenPause · MellomromSpill av bildene · Mellomrom; piltastene går ett bilde om gangen
- Vis piksler i 1:1 uten interpolering · Ctrl+1; Ctrl+0 tilpasserSpill av ti sekunder av videoens bilder med gjeldende innstillingerSammenligning med skillelinje: originalen til venstre, korrigert til høyre; dra linjenDemp det som skjæres bort i utdataene (det jeg mister)
@@ -531,7 +530,6 @@
Auto: en firedel av det installerte minnetTilbake til Auto: en firedel av det installerte minnetÅpne datamappen i Filutforsker
- Språk, tema, bruksstatistikkKvalitetsprofil, minnebudsjett, parallellitet, kodereStandardserver, renderingsnode, klarerte sertifikaterHurtigbuffermappe, miniatyrbilder i minnet, hurtigbuffergrense
diff --git a/i18n/nl/Shell.nl.resx b/i18n/nl/Shell.nl.resx
index 5ba5bb82..fc90d1e7 100644
--- a/i18n/nl/Shell.nl.resx
+++ b/i18n/nl/Shell.nl.resx
@@ -31,7 +31,6 @@
Een bestaande map opnemenWijzigen…Kiezen…
- Help Titano te verbeteren met anonieme gebruikstellingenDoorgaanGevondenEen lokaal archief maken
diff --git a/i18n/nl/Tooltips.nl.resx b/i18n/nl/Tooltips.nl.resx
index 48cb65f4..0ee82ab6 100644
--- a/i18n/nl/Tooltips.nl.resx
+++ b/i18n/nl/Tooltips.nl.resx
@@ -198,7 +198,6 @@
Haal de proxy's opnieuw op en open de reeks opnieuw; de takenbalk toont de downloadOnderbreken · SpatiebalkSpeel de frames af · Spatiebalk; pijltoetsen gaan één frame verder of terug
- Toon pixels op 1:1 zonder interpolatie · Ctrl+1; Ctrl+0 past in het vensterSpeel tien seconden van de videoframes af met de huidige instellingenSchuifvergelijking: origineel links, gecorrigeerd rechts; sleep de lijnMaak donkerder wat de uitvoer wegsnijdt (wat ik verlies)
@@ -531,7 +530,6 @@
Auto: een kwart van het geïnstalleerde geheugenTerug naar Auto: een kwart van het geïnstalleerde geheugenOpen de gegevensmap in Verkenner
- Taal, thema, gebruikstellingenKwaliteitsprofiel, geheugenbudget, parallellisme, encodersStandaardserver, renderknooppunt, vertrouwde certificatenCachemap, miniaturen in geheugen, cachelimiet
diff --git a/i18n/pl/Shell.pl.resx b/i18n/pl/Shell.pl.resx
index c1f1542f..45d4c003 100644
--- a/i18n/pl/Shell.pl.resx
+++ b/i18n/pl/Shell.pl.resx
@@ -39,7 +39,6 @@
Dołącz istniejący folderZmień…Wybierz…
- Pomóż ulepszać Titano, wysyłając anonimowe statystyki użyciaKontynuujZnalezionoUtwórz archiwum lokalne
diff --git a/i18n/pl/Tooltips.pl.resx b/i18n/pl/Tooltips.pl.resx
index f2db21ee..d45697cd 100644
--- a/i18n/pl/Tooltips.pl.resx
+++ b/i18n/pl/Tooltips.pl.resx
@@ -200,7 +200,6 @@
Pobierz ponownie pliki proxy i otwórz sekwencję od nowa; pobieranie widać na pasku zadańWstrzymaj · SpacjaOdtwórz klatki · Spacja; strzałki przechodzą o jedną klatkę
- Pokaż piksele w skali 1:1 bez interpolacji · Ctrl+1; Ctrl+0 dopasowujeOdtwórz dziesięć sekund klatek wideo z bieżącymi ustawieniamiPorównanie z kurtyną: oryginał po lewej, wersja po korekcji po prawej; przeciągnij linięPrzyciemnij to, co wyjście odcina (co tracę)
@@ -561,7 +560,6 @@
Auto: jedna czwarta zainstalowanej pamięciPrzywróć Auto: jedna czwarta zainstalowanej pamięciOtwórz folder danych w Eksploratorze
- Język, motyw, statystyki użyciaProfil jakości, budżet pamięci, równoległość, enkoderySerwer domyślny, węzeł renderowania, zaufane certyfikatyFolder pamięci podręcznej, miniatury w pamięci, limit pamięci podręcznej
diff --git a/i18n/pt-BR/Shell.pt-BR.resx b/i18n/pt-BR/Shell.pt-BR.resx
index 08ce87a8..ed06d9db 100644
--- a/i18n/pt-BR/Shell.pt-BR.resx
+++ b/i18n/pt-BR/Shell.pt-BR.resx
@@ -31,7 +31,6 @@
Adotar uma pasta existenteAlterar…Escolher…
- Ajude a melhorar o Titano com contagens de uso anônimasContinuarEncontradoCriar um acervo local
diff --git a/i18n/pt-BR/Tooltips.pt-BR.resx b/i18n/pt-BR/Tooltips.pt-BR.resx
index ab90ad41..91b03d19 100644
--- a/i18n/pt-BR/Tooltips.pt-BR.resx
+++ b/i18n/pt-BR/Tooltips.pt-BR.resx
@@ -198,7 +198,6 @@
Baixa os proxies de novo e reabre a sequência; a barra inferior mostra o downloadPausa · EspaçoReproduz os quadros · Espaço; as setas avançam um quadro
- Mostra os pixels em 1:1 sem interpolação · Ctrl+1; Ctrl+0 ajusta à janelaReproduz dez segundos dos quadros do vídeo com as configurações atuaisComparação deslizante: original à esquerda, corrigido à direita; arraste a linhaEscurece o que a saída recorta (o que eu perco)
@@ -531,7 +530,6 @@
Auto: um quarto da memória instaladaVolta para Auto: um quarto da memória instaladaAbre a pasta de dados no Explorador de Arquivos
- Idioma, tema, contagens de usoPerfil de qualidade, limite de memória, paralelismo, codificadoresServidor padrão, nó de renderização, certificados confiáveisPasta do cache, miniaturas na memória, limite do cache
diff --git a/i18n/pt-PT/Shell.pt-PT.resx b/i18n/pt-PT/Shell.pt-PT.resx
index b8f0f008..123b9b94 100644
--- a/i18n/pt-PT/Shell.pt-PT.resx
+++ b/i18n/pt-PT/Shell.pt-PT.resx
@@ -31,7 +31,6 @@
Adotar uma pasta existenteAlterar…Escolher…
- Ajudar a melhorar o Titano com contagens de utilização anónimasContinuarEncontradosCriar um arquivo local
diff --git a/i18n/pt-PT/Tooltips.pt-PT.resx b/i18n/pt-PT/Tooltips.pt-PT.resx
index 483b5380..d362a031 100644
--- a/i18n/pt-PT/Tooltips.pt-PT.resx
+++ b/i18n/pt-PT/Tooltips.pt-PT.resx
@@ -198,7 +198,6 @@
Obter novamente os proxies e reabrir a sequência; a barra de tarefas do Titano mostra a transferênciaPausar · EspaçoReproduzir os fotogramas · Espaço; as setas avançam um fotograma
- Mostrar os píxeis a 1:1 sem interpolação · Ctrl+1; Ctrl+0 ajusta à janelaReproduzir dez segundos dos fotogramas do vídeo com as definições atuaisComparação com cortina: original à esquerda, corrigido à direita; arraste a linhaEscurecer o que a saída corta (o que perco)
@@ -531,7 +530,6 @@
Auto: um quarto da memória instaladaVoltar a Auto: um quarto da memória instaladaAbrir a pasta de dados no Explorador de Ficheiros
- Idioma, tema, contagens de utilizaçãoPerfil de qualidade, limite de memória, paralelismo, codificadoresServidor predefinido, nó de renderização, certificados fidedignosPasta da cache, miniaturas em memória, limite da cache
diff --git a/i18n/ro/Shell.ro.resx b/i18n/ro/Shell.ro.resx
index c5a6f846..a4938de9 100644
--- a/i18n/ro/Shell.ro.resx
+++ b/i18n/ro/Shell.ro.resx
@@ -35,7 +35,6 @@
Adoptare folder existentModificare…Alegere…
- Ajutați la îmbunătățirea Titano cu statistici de utilizare anonimeContinuareGăsitCreare arhivă locală
diff --git a/i18n/ro/Tooltips.ro.resx b/i18n/ro/Tooltips.ro.resx
index ae17f31f..408649d9 100644
--- a/i18n/ro/Tooltips.ro.resx
+++ b/i18n/ro/Tooltips.ro.resx
@@ -199,7 +199,6 @@
Preluați din nou proxy-urile și redeschideți secvența; bara de lucrări afișează descărcareaPauză · SpațiuRedați cadrele · Spațiu; săgețile avansează câte un cadru
- Afișați pixelii la 1:1 fără interpolare · Ctrl+1; Ctrl+0 potrivește în fereastrăRedați zece secunde din cadrele videoclipului cu setările curenteComparare cu cortină: originalul în stânga, varianta corectată în dreapta; trageți liniaEstompați ce taie ieșirea (ce se pierde)
@@ -546,7 +545,6 @@
Auto: un sfert din memoria instalatăRevenire la Auto: un sfert din memoria instalatăDeschideți folderul de date în Explorer
- Limbă, temă, statistici de utilizareProfil de calitate, limită de memorie, paralelism, codificatoareServer implicit, nod de randare, certificate de încredereFolderul cache, miniaturi în memorie, limita cache
diff --git a/i18n/ru/Shell.ru.resx b/i18n/ru/Shell.ru.resx
index 7ffd714f..30843e67 100644
--- a/i18n/ru/Shell.ru.resx
+++ b/i18n/ru/Shell.ru.resx
@@ -39,7 +39,6 @@
Присоединить имеющуюся папкуИзменить…Выбрать…
- Помогите улучшить Titano, отправляя анонимную статистику использованияПродолжитьНайденСоздать локальный архив
diff --git a/i18n/ru/Tooltips.ru.resx b/i18n/ru/Tooltips.ru.resx
index ed6358e1..70c08a34 100644
--- a/i18n/ru/Tooltips.ru.resx
+++ b/i18n/ru/Tooltips.ru.resx
@@ -200,7 +200,6 @@
Заново получить прокси и снова открыть серию; ход скачивания виден в панели заданийПауза · ПробелВоспроизвести кадры · Пробел; стрелки — на один кадр
- Показать пиксели 1:1 без интерполяции · Ctrl+1; Ctrl+0 — по размеру окнаВоспроизвести десять секунд кадров видео с текущими параметрамиСравнение шторкой: оригинал слева, после коррекции справа; перетащите линиюЗатемнить то, что обрезается при выводе (что теряется)
@@ -561,7 +560,6 @@
Авто: четверть установленной памятиВернуть «Авто»: четверть установленной памятиОткрыть папку данных в проводнике
- Язык, тема, статистика использованияПрофиль качества, лимит памяти, параллелизм, кодировщикиСервер по умолчанию, узел рендеринга, доверенные сертификатыПапка кэша, эскизы в памяти, лимит кэша
diff --git a/i18n/sk/Shell.sk.resx b/i18n/sk/Shell.sk.resx
index 85ca138e..ddcfcb30 100644
--- a/i18n/sk/Shell.sk.resx
+++ b/i18n/sk/Shell.sk.resx
@@ -35,7 +35,6 @@
Prevziať existujúci priečinokZmeniť…Vybrať…
- Pomôžte zlepšiť Titano anonymnými štatistikami používaniaPokračovaťNájdenéVytvoriť lokálny archív
diff --git a/i18n/sk/Tooltips.sk.resx b/i18n/sk/Tooltips.sk.resx
index f7219a62..d49e9914 100644
--- a/i18n/sk/Tooltips.sk.resx
+++ b/i18n/sk/Tooltips.sk.resx
@@ -199,7 +199,6 @@
Znova stiahne proxy a znova otvorí sekvenciu; sťahovanie sa zobrazuje v pruhu úlohPozastaví prehrávanie · medzerníkPrehrá snímky · medzerník; šípky posunú o jednu snímku
- Zobrazí pixely v pomere 1:1 bez interpolácie · Ctrl+1; Ctrl+0 prispôsobí veľkosťPrehrá desať sekúnd snímok videa s aktuálnymi nastaveniamiPorovnanie deliacou čiarou: originál vľavo, upravená verzia vpravo; čiaru môžete posúvaťStmaví časť, ktorú výstup oreže (čo sa stratí)
@@ -546,7 +545,6 @@
Auto: štvrtina nainštalovanej pamäteSpäť na Auto: štvrtina nainštalovanej pamäteOtvorí priečinok údajov v Prieskumníkovi
- Jazyk, motív, štatistiky používaniaProfil kvality, limit pamäte, paralelizmus, kodéryPredvolený server, renderovací uzol, dôveryhodné certifikátyPriečinok vyrovnávacej pamäte, miniatúry v pamäti, limit vyrovnávacej pamäte
diff --git a/i18n/sl/Shell.sl.resx b/i18n/sl/Shell.sl.resx
index 6b480c53..92d66260 100644
--- a/i18n/sl/Shell.sl.resx
+++ b/i18n/sl/Shell.sl.resx
@@ -35,7 +35,6 @@
Prevzemi obstoječo mapoSpremeni …Izberi …
- Pomagajte izboljšati Titano z anonimno statistiko uporabeNadaljujNajdenoUstvari lokalni arhiv
diff --git a/i18n/sl/Tooltips.sl.resx b/i18n/sl/Tooltips.sl.resx
index 87fd46fb..f4dacfcb 100644
--- a/i18n/sl/Tooltips.sl.resx
+++ b/i18n/sl/Tooltips.sl.resx
@@ -199,7 +199,6 @@
Znova prenesi proxyje in znova odpri sekvenco; prenos je prikazan v vrstici opravilZačasno ustavi · preslednicaPredvajaj sličice · preslednica; puščice premaknejo za eno sličico
- Pokaži slikovne pike v razmerju 1:1 brez interpolacije · Ctrl+1; Ctrl+0 prilagodiPredvajaj deset sekund video sličic s trenutnimi nastavitvamiPrimerjava z zaveso: izvirnik levo, popravljeno desno; povlecite črtoZatemni, kar izhod odreže (kaj izgubim)
@@ -546,7 +545,6 @@
Samodejno: četrtina nameščenega pomnilnikaNazaj na samodejno: četrtina nameščenega pomnilnikaOdpri mapo s podatki v Raziskovalcu
- Jezik, tema, statistika uporabeProfil kakovosti, omejitev pomnilnika, vzporednost, kodirnikiPrivzeti strežnik, vozlišče za upodabljanje, zaupanja vredna potrdilaMapa predpomnilnika, miniature v pomnilniku, omejitev predpomnilnika
diff --git a/i18n/sv/Shell.sv.resx b/i18n/sv/Shell.sv.resx
index 70ca90d7..877b1a3a 100644
--- a/i18n/sv/Shell.sv.resx
+++ b/i18n/sv/Shell.sv.resx
@@ -31,7 +31,6 @@
Införliva en befintlig mappÄndra…Välj…
- Hjälp till att förbättra Titano med anonym användningsstatistikFortsättHittadSkapa ett lokalt arkiv
diff --git a/i18n/sv/Tooltips.sv.resx b/i18n/sv/Tooltips.sv.resx
index 9f11a173..9935b17b 100644
--- a/i18n/sv/Tooltips.sv.resx
+++ b/i18n/sv/Tooltips.sv.resx
@@ -198,7 +198,6 @@
Hämta proxyerna igen och öppna sekvensen på nytt; jobbfältet visar nedladdningenPausa · BlankstegSpela upp bildrutorna · Blanksteg; piltangenterna flyttar en bildruta i taget
- Visa pixlar i 1:1 utan interpolering · Ctrl+1; Ctrl+0 anpassarSpela upp tio sekunder av videons bildrutor med de aktuella inställningarnaJämförelse med delad vy: originalet till vänster, korrigerat till höger; dra linjenTona ned det som utdatan skär bort (det som går förlorat)
@@ -531,7 +530,6 @@
Auto: en fjärdedel av det installerade minnetTillbaka till Auto: en fjärdedel av det installerade minnetÖppna datamappen i Utforskaren
- Språk, tema, användningsstatistikKvalitetsprofil, minnesbudget, parallellitet, kodareStandardserver, renderingsnod, betrodda certifikatCachemapp, miniatyrer i minnet, cachegräns
diff --git a/i18n/th/Shell.th.resx b/i18n/th/Shell.th.resx
index 9ef16233..1dd34756 100644
--- a/i18n/th/Shell.th.resx
+++ b/i18n/th/Shell.th.resx
@@ -31,7 +31,6 @@
ลงทะเบียนโฟลเดอร์ที่มีอยู่เปลี่ยน…เลือก…
- ช่วยปรับปรุง Titano ด้วยสถิติการใช้งานแบบไม่ระบุตัวตนดำเนินการต่อพบแล้วสร้างคลังภาพในเครื่อง
diff --git a/i18n/th/Tooltips.th.resx b/i18n/th/Tooltips.th.resx
index 32ce6383..1124b122 100644
--- a/i18n/th/Tooltips.th.resx
+++ b/i18n/th/Tooltips.th.resx
@@ -198,7 +198,6 @@
รับพร็อกซีอีกครั้งแล้วเปิดซีเควนซ์นี้ขึ้นมาใหม่ แถบงานจะแสดงการดาวน์โหลดหยุดชั่วคราว · Spaceเล่นเฟรม · Space กดลูกศรเพื่อเลื่อนทีละเฟรม
- แสดงพิกเซลแบบ 1:1 โดยไม่ประมาณค่า · Ctrl+1 ส่วน Ctrl+0 จะปรับให้พอดีเล่นเฟรมของวิดีโอสิบวินาทีด้วยการตั้งค่าปัจจุบันเปรียบเทียบแบบเลื่อน: ต้นฉบับอยู่ทางซ้าย ภาพที่แก้ไขแล้วอยู่ทางขวา ลากเส้นเพื่อเลื่อนหรี่ส่วนที่เอาต์พุตตัดออก (ส่วนที่จะเสียไป)
@@ -531,7 +530,6 @@
อัตโนมัติ: หนึ่งในสี่ของหน่วยความจำที่ติดตั้งกลับเป็นอัตโนมัติ: หนึ่งในสี่ของหน่วยความจำที่ติดตั้งเปิดโฟลเดอร์ข้อมูลในตัวสำรวจไฟล์
- ภาษา ธีม สถิติการใช้งานโปรไฟล์คุณภาพ งบหน่วยความจำ การประมวลผลแบบขนาน ตัวเข้ารหัสเซิร์ฟเวอร์เริ่มต้น โหนดเรนเดอร์ ใบรับรองที่เชื่อถือโฟลเดอร์แคช ภาพขนาดย่อในหน่วยความจำ ขีดจำกัดแคช
diff --git a/i18n/tr/Shell.tr.resx b/i18n/tr/Shell.tr.resx
index 5ac8e601..9d88e660 100644
--- a/i18n/tr/Shell.tr.resx
+++ b/i18n/tr/Shell.tr.resx
@@ -31,7 +31,6 @@
Mevcut klasörü dahil etDeğiştir…Seç…
- Anonim kullanım sayılarıyla Titano'nun gelişmesine yardım edinDevamBulunduYerel arşiv oluştur
diff --git a/i18n/tr/Tooltips.tr.resx b/i18n/tr/Tooltips.tr.resx
index b6b0bba3..c1382a53 100644
--- a/i18n/tr/Tooltips.tr.resx
+++ b/i18n/tr/Tooltips.tr.resx
@@ -198,7 +198,6 @@
Proxy'leri yeniden alır ve sekansı yeniden açar; indirme görev çubuğunda görünürDuraklatır · Ara ÇubuğuKareleri oynatır · Ara Çubuğu; ok tuşları birer kare ilerletir
- Pikselleri ara değerleme olmadan 1:1 gösterir · Ctrl+1; Ctrl+0 sığdırırVideonun on saniyelik karelerini geçerli ayarlarla oynatırKaydırmalı karşılaştırma: solda orijinal, sağda düzeltilmiş; çizgiyi sürükleyinÇıktının kestiği alanı soluklaştırır (kaybedilen kısım)
@@ -531,7 +530,6 @@
Otomatik: yüklü belleğin dörtte biriOtomatiğe dön: yüklü belleğin dörtte biriVeri klasörünü Dosya Gezgini'nde açar
- Dil, tema, kullanım sayılarıKalite profili, bellek bütçesi, paralellik, kodlayıcılarVarsayılan sunucu, işleme düğümü, güvenilen sertifikalarÖnbellek klasörü, bellekteki küçük resimler, önbellek sınırı
diff --git a/i18n/uk/Shell.uk.resx b/i18n/uk/Shell.uk.resx
index c2193cf5..c1a444a3 100644
--- a/i18n/uk/Shell.uk.resx
+++ b/i18n/uk/Shell.uk.resx
@@ -39,7 +39,6 @@
Приєднати наявну папкуЗмінити…Вибрати…
- Допомогти покращити Titano анонімною статистикою використанняПродовжитиЗнайденоСтворити локальний архів
diff --git a/i18n/uk/Tooltips.uk.resx b/i18n/uk/Tooltips.uk.resx
index 30c72305..3b49843b 100644
--- a/i18n/uk/Tooltips.uk.resx
+++ b/i18n/uk/Tooltips.uk.resx
@@ -200,7 +200,6 @@
Ще раз отримати проксі й знову відкрити послідовність; завантаження видно в рядку завданьПризупинити · ПробілВідтворити кадри · Пробіл; стрілки переходять на один кадр
- Показати пікселі 1:1 без інтерполяції · Ctrl+1; Ctrl+0 вписуєВідтворити десять секунд відеокадрів із поточними налаштуваннямиПорівняння шторкою: оригінал ліворуч, виправлене праворуч; перетягніть лініюЗатемнити те, що обрізає вивід (що я втрачаю)
@@ -561,7 +560,6 @@
Авто: чверть установленої пам’ятіПовернути «Авто»: чверть установленої пам’ятіВідкрити папку даних у Провіднику
- Мова, тема, статистика використанняПрофіль якості, бюджет пам’яті, паралелізм, кодувальникиСервер за замовчуванням, вузол рендерингу, довірені сертифікатиПапка кешу, мініатюри в пам’яті, ліміт кешу
diff --git a/i18n/vi/Shell.vi.resx b/i18n/vi/Shell.vi.resx
index b4d450de..f18d4deb 100644
--- a/i18n/vi/Shell.vi.resx
+++ b/i18n/vi/Shell.vi.resx
@@ -31,7 +31,6 @@
Tiếp nhận thư mục có sẵnThay đổi…Chọn…
- Giúp cải thiện Titano bằng số liệu sử dụng ẩn danhTiếp tụcĐã tìm thấyTạo kho lưu trữ cục bộ
diff --git a/i18n/vi/Tooltips.vi.resx b/i18n/vi/Tooltips.vi.resx
index f50e9d49..8c209bf4 100644
--- a/i18n/vi/Tooltips.vi.resx
+++ b/i18n/vi/Tooltips.vi.resx
@@ -198,7 +198,6 @@
Lấy lại proxy và mở lại chuỗi ảnh; thanh tác vụ hiển thị tiến trình tải xuốngTạm dừng · SpacePhát các khung hình · Space; phím mũi tên để đi từng khung hình
- Hiển thị điểm ảnh ở tỷ lệ 1:1 không nội suy · Ctrl+1; Ctrl+0 để vừa khungPhát mười giây khung hình của video với cài đặt hiện tạiSo sánh kiểu gạt: bản gốc bên trái, đã hiệu chỉnh bên phải; kéo đường phân chiaLàm mờ phần đầu ra cắt bỏ (phần bị mất)
@@ -531,7 +530,6 @@
Tự động: một phần tư bộ nhớ đã lắpVề Tự động: một phần tư bộ nhớ đã lắpMở thư mục dữ liệu trong Explorer
- Ngôn ngữ, chủ đề, số liệu sử dụngHồ sơ chất lượng, giới hạn bộ nhớ, mức song song, bộ mã hóaMáy chủ mặc định, nút kết xuất, chứng chỉ tin cậyThư mục bộ nhớ đệm, hình thu nhỏ trong bộ nhớ, giới hạn bộ nhớ đệm
diff --git a/i18n/zh-Hans/Shell.zh-Hans.resx b/i18n/zh-Hans/Shell.zh-Hans.resx
index bd6f881a..2b6b3c52 100644
--- a/i18n/zh-Hans/Shell.zh-Hans.resx
+++ b/i18n/zh-Hans/Shell.zh-Hans.resx
@@ -31,7 +31,6 @@
纳入现有文件夹更改…选择…
- 发送匿名使用统计,帮助改进 Titano继续已发现创建本地档案库
diff --git a/i18n/zh-Hans/Tooltips.zh-Hans.resx b/i18n/zh-Hans/Tooltips.zh-Hans.resx
index 57bd7cf3..8e1cf2dc 100644
--- a/i18n/zh-Hans/Tooltips.zh-Hans.resx
+++ b/i18n/zh-Hans/Tooltips.zh-Hans.resx
@@ -198,7 +198,6 @@
重新获取代理并重新打开序列;任务进度栏会显示下载进度暂停 · 空格键播放帧 · 空格键;方向键逐帧移动
- 以 1:1 显示像素,不做插值 · Ctrl+1;Ctrl+0 适应窗口以当前设置播放十秒的视频帧划像对比:左侧为原始,右侧为校正后;拖动分割线调暗输出将裁掉的部分(会丢失的内容)
@@ -531,7 +530,6 @@
自动:已安装内存的四分之一恢复自动:已安装内存的四分之一在资源管理器中打开数据文件夹
- 语言、主题、使用统计质量模式、内存预算、并行度、编码器默认服务器、渲染节点、受信任的证书缓存文件夹、内存中的缩略图、缓存上限
diff --git a/i18n/zh-Hant/Shell.zh-Hant.resx b/i18n/zh-Hant/Shell.zh-Hant.resx
index c2d72e5a..c26fecc4 100644
--- a/i18n/zh-Hant/Shell.zh-Hant.resx
+++ b/i18n/zh-Hant/Shell.zh-Hant.resx
@@ -31,7 +31,6 @@
納入現有資料夾變更…選擇…
- 以匿名使用統計協助改善 Titano繼續已找到建立本機典藏庫
diff --git a/i18n/zh-Hant/Tooltips.zh-Hant.resx b/i18n/zh-Hant/Tooltips.zh-Hant.resx
index 4d6aab39..fc808bd3 100644
--- a/i18n/zh-Hant/Tooltips.zh-Hant.resx
+++ b/i18n/zh-Hant/Tooltips.zh-Hant.resx
@@ -198,7 +198,6 @@
重新取得代理檔並重新開啟序列;工作進度列會顯示下載進度暫停 · 空白鍵播放影格 · 空白鍵;方向鍵可逐格移動
- 以 1:1 顯示像素,不進行內插 · Ctrl+1;Ctrl+0 可符合視窗大小以目前的設定播放十秒鐘的影片影格分割比較:左側為原始,右側為已修正;拖曳分隔線即可比較調暗輸出會裁掉的部分(檢視會失去的內容)
@@ -531,7 +530,6 @@
自動:已安裝記憶體的四分之一恢復自動:已安裝記憶體的四分之一在檔案總管中開啟資料位置
- 語言、佈景主題、使用統計品質設定檔、記憶體上限、平行處理、編碼器預設伺服器、算圖節點、信任的憑證快取資料夾、記憶體中的縮圖、快取上限
diff --git a/src/Titano.App/Infrastructure/AppSettings.cs b/src/Titano.App/Infrastructure/AppSettings.cs
index d40907a6..7611795a 100644
--- a/src/Titano.App/Infrastructure/AppSettings.cs
+++ b/src/Titano.App/Infrastructure/AppSettings.cs
@@ -64,7 +64,13 @@ public sealed class AppSettings
public string? Language { get; set; }
public AppTheme Theme { get; set; } = AppTheme.Dark;
public bool RailCollapsed { get; set; }
+
+ /// The first-run consent of BRIEF §21; offered only by builds with .
public bool AnonymousUsageCounts { get; set; }
+
+ /// Toasts also appear as Windows notifications while the window is minimised or in the background (BRIEF §12.1).
+ public bool OsNotifications { get; set; } = true;
+
public WindowPlacement? Window { get; set; }
/// The first-run choice (local archive, adopted folder or server) was made.
diff --git a/src/Titano.App/Infrastructure/ProductFeatures.cs b/src/Titano.App/Infrastructure/ProductFeatures.cs
new file mode 100644
index 00000000..e150d321
--- /dev/null
+++ b/src/Titano.App/Infrastructure/ProductFeatures.cs
@@ -0,0 +1,17 @@
+using System.Reflection;
+
+namespace Titano.App.Infrastructure;
+
+/// Features a build switches on through MSBuild properties (Directory.Build.props), read from the assembly metadata.
+public static class ProductFeatures
+{
+ ///
+ /// Monetization (BRIEF §21: ads, the anonymous usage counts consent, the licence) ships disabled until a build sets
+ /// TitanoAdsEnabled=true; until then nothing of it shows.
+ ///
+ public static bool AdsEnabled { get; } = Flag("TitanoAdsEnabled");
+
+ private static bool Flag(string key) =>
+ typeof(ProductFeatures).Assembly.GetCustomAttributes().FirstOrDefault(a => a.Key == key)?.Value is { } value
+ && bool.TryParse(value, out var on) && on;
+}
diff --git a/src/Titano.App/Infrastructure/StartWithWindows.cs b/src/Titano.App/Infrastructure/StartWithWindows.cs
new file mode 100644
index 00000000..1140c26c
--- /dev/null
+++ b/src/Titano.App/Infrastructure/StartWithWindows.cs
@@ -0,0 +1,92 @@
+using System.IO;
+using System.Security;
+using Microsoft.Win32;
+using Titano.Core.Diagnostics;
+using Titano.Core.IO;
+
+namespace Titano.App.Infrastructure;
+
+/// Settings › General › Startup: Titano starts when the user signs in to Windows.
+public interface IStartWithWindows
+{
+ bool IsEnabled { get; }
+
+ void SetEnabled(bool enabled);
+
+ /// Points this copy's entry at the current executable (after an update renamed it).
+ void Refresh();
+}
+
+///
+/// HKCU\Software\Microsoft\Windows\CurrentVersion\Run value that starts Titano minimised at sign-in, so inserted
+/// cards are noticed (BRIEF §12.4) without a window in the way. The registry stays the source of truth because Task
+/// Manager can turn it off. There is one value for every copy of Titano: a copy shows it as on only when it starts
+/// that copy, and never takes it over or removes it unless the user ticks or unticks the box there. The uninstaller
+/// removes it with the Uploader's when it starts a program of the folder it removes.
+///
+public sealed class RunKeyStartWithWindows(string? executable = null) : IStartWithWindows
+{
+ /// Starts the main window minimised on the taskbar.
+ public const string MinimizedOption = "--minimized";
+
+ private readonly string? _executable = executable ?? Environment.ProcessPath;
+
+ public bool IsEnabled => StartupCommand.Starts(Read(), _executable);
+
+ public void SetEnabled(bool enabled)
+ {
+ if (_executable is null) return;
+ try
+ {
+ using var key = Registry.CurrentUser.CreateSubKey(StartupCommand.RunKey, writable: true);
+ if (enabled) key.SetValue(StartupCommand.ClientValue, StartupCommand.Format(_executable, MinimizedOption), RegistryValueKind.String);
+ else if (StartupCommand.Starts(key.GetValue(StartupCommand.ClientValue) as string, _executable)) key.DeleteValue(StartupCommand.ClientValue, throwOnMissingValue: false);
+ }
+ catch (Exception ex) when (ex is SecurityException or UnauthorizedAccessException or IOException)
+ {
+ Log.Warning("startup", "Run key not updated", ex);
+ }
+ }
+
+ public void Refresh()
+ {
+ if (Follows(Read(), _executable, File.Exists)) SetEnabled(true);
+ }
+
+ ///
+ /// The entry should now start : the program it names is gone from the folder
+ /// runs from (an update renamed it). An entry of another copy, still on disk or
+ /// elsewhere (a second install, a portable copy, a development build), is left alone.
+ ///
+ internal static bool Follows(string? command, string? current, Func exists)
+ {
+ if (current is null || StartupCommand.Executable(command) is not { } stored || StartupCommand.Starts(command, current)) return false;
+ return !exists(stored) && StartupCommand.FolderOf(current) is { } folder
+ && string.Equals(StartupCommand.Folder(command), folder, StringComparison.OrdinalIgnoreCase);
+ }
+
+ private static string? Read()
+ {
+ try
+ {
+ using var key = Registry.CurrentUser.OpenSubKey(StartupCommand.RunKey);
+ return key?.GetValue(StartupCommand.ClientValue) as string;
+ }
+ catch (Exception ex) when (ex is SecurityException or IOException)
+ {
+ return null;
+ }
+ }
+}
+
+/// Screenshots, tests and portable copies (which leave nothing in the registry) never touch the user's sign-in programs.
+public sealed class MemoryStartWithWindows : IStartWithWindows
+{
+ public bool IsEnabled { get; private set; }
+
+ public void SetEnabled(bool enabled) => IsEnabled = enabled;
+
+ public void Refresh()
+ {
+ }
+}
diff --git a/src/Titano.App/Jobs/JobListModel.cs b/src/Titano.App/Jobs/JobListModel.cs
index 4621ace1..364396fd 100644
--- a/src/Titano.App/Jobs/JobListModel.cs
+++ b/src/Titano.App/Jobs/JobListModel.cs
@@ -137,6 +137,13 @@ public sealed class JobListModel
public int QueuedCount => _entries.Values.Count(e => e.State == JobState.Queued);
+ ///
+ /// A job of that the user waits for (not background work) is queued or running. Paused jobs
+ /// do not count: they wait for the user, or for an unmetered network, not for the queue.
+ ///
+ public bool IsBusy(JobKind kind) =>
+ _entries.Values.Any(e => e.Job.Kind == kind && e.Job.Priority != JobPriority.Background && e.State is JobState.Queued or JobState.Running);
+
/// Same order as JobRepository.ClaimNextAsync: priority descending, then creation time and id.
public static bool ClaimsBefore(Job a, Job b) =>
a.Priority != b.Priority ? a.Priority > b.Priority : a.Created != b.Created ? a.Created < b.Created : a.Id.CompareTo(b.Id) < 0;
diff --git a/src/Titano.App/Jobs/JobNotices.cs b/src/Titano.App/Jobs/JobNotices.cs
new file mode 100644
index 00000000..71a7f036
--- /dev/null
+++ b/src/Titano.App/Jobs/JobNotices.cs
@@ -0,0 +1,98 @@
+using Titano.Core.Model;
+
+namespace Titano.App.Jobs;
+
+/// What the shell says when a job of this PC ends.
+public enum JobNotice
+{
+ None,
+ Done,
+ Failed,
+}
+
+///
+/// Which job endings raise a toast (BRIEF §12.1 "toasts for job completion"): the long operations the user asked for
+/// end with one toast, whichever screen started them. Background work (thumbnails, proxies, light analysis, the
+/// analysis queued after an import) and scans (the archive is rescanned every 10 minutes) end silently; an import
+/// has its own toast when it ends well, and a download shows on its Library card and Server row. Every other failure
+/// is said. Cancelled jobs were stopped on purpose.
+///
+public static class JobNotices
+{
+ ///
+ /// The notice for after a change from (null: not seen before).
+ /// A job already finished before the change (a repeated event, a page read again) says nothing.
+ ///
+ public static JobNotice For(JobState? before, Job job)
+ {
+ ArgumentNullException.ThrowIfNull(job);
+ if (before is JobState.Done or JobState.Failed or JobState.Cancelled || job.Priority == JobPriority.Background) return JobNotice.None;
+ return job.State switch
+ {
+ JobState.Done when Announces(job.Kind) => JobNotice.Done,
+ JobState.Failed when !IsUpkeep(job.Kind) => JobNotice.Failed,
+ _ => JobNotice.None,
+ };
+ }
+
+ private static bool Announces(JobKind kind) =>
+ kind is JobKind.Render or JobKind.DeepAnalyse or JobKind.Verify or JobKind.Rebuild or JobKind.Maintenance or JobKind.UploadCommit
+ or JobKind.Move or JobKind.Adopt;
+
+ /// Work that keeps the index and its previews current: the next run repeats it, the Archive screen shows what is missing.
+ private static bool IsUpkeep(JobKind kind) =>
+ kind is JobKind.Scan or JobKind.Thumbs or JobKind.Proxies or JobKind.LightAnalyse;
+}
+
+/// Endings said in one toast: one job, or several of a batch.
+public sealed record JobEnding(JobNotice Notice, IReadOnlyList Jobs);
+
+///
+/// Job endings waiting for their toast, so that a batch speaks once (Server › Upload all queues one upload per
+/// sequence): finished jobs of one kind wait until no job of that kind the user waits for is queued or running, then
+/// one toast says how many finished; failures are said at the end of the update that brought them, together when
+/// several failed at once. WPF-free; feed it on the UI thread.
+///
+public sealed class JobEndings
+{
+ private readonly SortedDictionary> _done = [];
+ private readonly List _failed = [];
+
+ /// Finished jobs still waiting for the rest of their kind (tests).
+ public int Waiting => _done.Values.Sum(l => l.Count);
+
+ public void Add(JobNotice notice, Job job)
+ {
+ ArgumentNullException.ThrowIfNull(job);
+ if (notice == JobNotice.Failed)
+ {
+ _failed.Add(job);
+ }
+ else if (notice == JobNotice.Done)
+ {
+ if (!_done.TryGetValue(job.Kind, out var jobs)) _done[job.Kind] = jobs = [];
+ jobs.Add(job);
+ }
+ }
+
+ ///
+ /// The toasts due now: the failures added since the last call, then each finished kind that
+ /// no longer reports as queued or running. What is returned is forgotten.
+ ///
+ public IReadOnlyList Take(Func busy)
+ {
+ ArgumentNullException.ThrowIfNull(busy);
+ var due = new List();
+ if (_failed.Count > 0)
+ {
+ due.Add(new JobEnding(JobNotice.Failed, [.. _failed]));
+ _failed.Clear();
+ }
+ foreach (var kind in _done.Keys.Where(k => !busy(k)).ToList())
+ {
+ due.Add(new JobEnding(JobNotice.Done, _done[kind]));
+ _done.Remove(kind);
+ }
+ return due;
+ }
+}
diff --git a/src/Titano.App/Sections/ArchiveViewModel.cs b/src/Titano.App/Sections/ArchiveViewModel.cs
index 29da745a..cad82d24 100644
--- a/src/Titano.App/Sections/ArchiveViewModel.cs
+++ b/src/Titano.App/Sections/ArchiveViewModel.cs
@@ -493,6 +493,8 @@ public sealed class ArchiveViewModel : SectionViewModel
_ => null,
})),
];
+ // The rail badge counts the health lines that need attention (BRIEF §12.1 "badge counts (warnings, …)").
+ Badge = Health.Count(h => !h.IsOk);
}
private static IReadOnlyList Bars(IReadOnlyList values) =>
diff --git a/src/Titano.App/Sections/ImportViewModel.cs b/src/Titano.App/Sections/ImportViewModel.cs
index f1965f14..b2a0a807 100644
--- a/src/Titano.App/Sections/ImportViewModel.cs
+++ b/src/Titano.App/Sections/ImportViewModel.cs
@@ -1399,7 +1399,7 @@ public sealed class ImportViewModel : SectionViewModel
if (_phase == ImportPhase.Failed && _jobId is not null && _jobSourceKey == device.Identity)
{
Shell.Notify(Loc.L("Import.Toast.Inserted", source.Title), Loc.L("Import.Toast.ResumeMessage"), Loc.L("Import.Toast.Resume"),
- Loc.L("Tooltips.Import.Resume"), () => RetryCommand.Execute(null));
+ Loc.L("Tooltips.Import.Resume"), () => RetryCommand.Execute(null), runsFromNotification: true);
return;
}
if (_phase == ImportPhase.Running) return;
@@ -1425,6 +1425,8 @@ public sealed class ImportViewModel : SectionViewModel
SelectSource(device.Identity);
Shell.Navigate(SectionKey.Import);
}),
+ // BRIEF §12.4: the Windows notification "Card X detected — Import" opens the card on Import.
+ RunsFromNotification = true,
});
}
diff --git a/src/Titano.App/Sections/JobsViewModel.cs b/src/Titano.App/Sections/JobsViewModel.cs
index d5ebb1f5..fff2a7fb 100644
--- a/src/Titano.App/Sections/JobsViewModel.cs
+++ b/src/Titano.App/Sections/JobsViewModel.cs
@@ -10,6 +10,7 @@ using Titano.Core.Localization;
using Titano.Core.Model;
using Titano.Data;
using Titano.Data.Jobs;
+using Titano.Ui.Controls;
using Titano.Ui.Mvvm;
namespace Titano.App.Sections;
@@ -49,7 +50,8 @@ public sealed class JobFilterChip(JobFilter filter, Action select) :
///
/// Jobs (BRIEF §12.6, Jobs.html): queue and history with live progress from the engine (batched to about 10
/// updates a second), filters, queue order, an expandable log tail per job, and the row actions. Also feeds the
-/// shell's job bar, the status strip and the rail badge.
+/// shell's job bar, the status strip and the rail badge (running jobs, and failures not seen on this screen yet), and
+/// raises the toast of a long operation that ends (), whichever screen started it.
///
public sealed class JobsViewModel : SectionViewModel
{
@@ -59,6 +61,8 @@ public sealed class JobsViewModel : SectionViewModel
private readonly JobListModel _model = new();
private readonly JobUpdateBuffer _buffer = new();
private readonly Dictionary _rows = [];
+ private readonly HashSet _unseenFailures = [];
+ private readonly JobEndings _endings = new();
private readonly JobActions _actions;
private CoalescingThrottle? _throttle;
private IJobQueue? _queue;
@@ -217,13 +221,103 @@ public sealed class JobsViewModel : SectionViewModel
internal void Flush()
{
var (jobs, progress) = _buffer.Drain();
- foreach (var job in jobs) _model.Apply(job);
+ foreach (var job in jobs)
+ {
+ var before = _model[job.Id]?.State;
+ _model.Apply(job);
+ Follow(before, job);
+ }
foreach (var p in progress) _model.Apply(p);
+ foreach (var ending in _endings.Take(_model.IsBusy)) Shell.ShowToast(ToastFor(ending));
SyncRows();
UpdateShell();
}
- private void OnJobChanged(Job job)
+ /// Failures seen on this screen no longer count on the rail.
+ protected override void OnActivated()
+ {
+ if (_unseenFailures.Count == 0) return;
+ _unseenFailures.Clear();
+ UpdateShell();
+ }
+
+ ///
+ /// A change the engine reported (these are live, never pages read again): a failure counts on the rail until this
+ /// screen is opened, and a long operation that ends is announced at the end of the flush ().
+ ///
+ private void Follow(JobState? before, Job job)
+ {
+ if (job.State != JobState.Failed) _unseenFailures.Remove(job.Id);
+ else if (before != JobState.Failed && !IsSelected) _unseenFailures.Add(job.Id);
+ var notice = JobNotices.For(before, job);
+ if (notice == JobNotice.Done && EditorAnnounces(job)) return;
+ _endings.Add(notice, job);
+ }
+
+ ///
+ /// The toast of a job that ended, with one action (BRIEF §12.1, §0.2 rule 6). Several endings at once (a batch
+ /// finished, or failed together) say how many and lead to this screen. Clicking the Windows notification of a
+ /// toast opens what it names; a retry waits until the user has seen why the job failed.
+ ///
+ private Toast ToastFor(JobEnding ending)
+ {
+ var job = ending.Jobs[0];
+ var failed = ending.Notice == JobNotice.Failed;
+ if (ending.Jobs.Count > 1)
+ {
+ return new Toast
+ {
+ Title = Loc.Plural(failed ? "Shell.Job.FailedPlural" : "Shell.Job.DonePlural", ending.Jobs.Count),
+ Message = ending.Jobs.All(j => j.Kind == job.Kind) ? JobText.Kind(job.Kind) : null,
+ ActionText = Loc.L("Shell.Nav.Jobs"),
+ ActionToolTip = Loc.L("Tooltips.Nav.Jobs"),
+ ActionCommand = new RelayCommand(() => Shell.Navigate(SectionKey.Jobs)),
+ IsError = failed,
+ RunsFromNotification = true,
+ };
+ }
+ if (!failed)
+ {
+ return new Toast
+ {
+ Title = Loc.L("Shell.Job.Done"),
+ Message = JobText.Name(job),
+ ActionText = Loc.L("Jobs.Action.Open"),
+ ActionToolTip = Loc.L("Tooltips.Jobs.Open"),
+ ActionCommand = new AsyncRelayCommand(() => OpenTargetAsync(job)),
+ RunsFromNotification = true,
+ };
+ }
+ return job.Kind == JobKind.Import
+ // The Import screen resumes an import with its plan and card; it holds the retry.
+ ? new Toast
+ {
+ Title = Loc.L("Shell.Job.Failed"),
+ Message = JobText.Name(job),
+ ActionText = Loc.L("Shell.Nav.Import"),
+ ActionToolTip = Loc.L("Tooltips.Nav.Import"),
+ ActionCommand = new RelayCommand(() => Shell.Navigate(SectionKey.Import)),
+ IsError = true,
+ RunsFromNotification = true,
+ }
+ : new Toast
+ {
+ Title = Loc.L("Shell.Job.Failed"),
+ Message = JobText.Name(job),
+ ActionText = Loc.L("Jobs.Action.Retry"),
+ ActionToolTip = Loc.L("Tooltips.Jobs.Retry"),
+ ActionCommand = new AsyncRelayCommand(() => _queue?.ResumeAsync(job.Id) ?? Task.CompletedTask),
+ IsError = true,
+ };
+ }
+
+ /// A finished render of the sequence open in the editor: the editor says it, with its output file.
+ private bool EditorAnnounces(Job job) =>
+ job is { Kind: JobKind.Render, State: JobState.Done } && Shell.Sequence.Editor is { IsRemote: false } editor
+ && job.TargetIds.Contains(editor.Session.Content.Sequence.Id);
+
+ /// A job changed state (any thread; tests feed it too): buffered until the next flush.
+ internal void OnJobChanged(Job job)
{
_buffer.Post(job);
_throttle?.Signal();
@@ -274,10 +368,12 @@ public sealed class JobsViewModel : SectionViewModel
Shell.SetJob(JobText.Bar(current), current.Fraction ?? 0, indeterminate: current.Fraction is null, name: JobText.Name(current.Job));
else
Shell.SetJob(null, 0);
- // The rail badge, the status strip and the Running chip count the same jobs: running or paused (Jobs.html).
+ // The status strip and the Running chip count the same jobs: running or paused (Jobs.html). The rail badge adds the
+ // failures not seen here yet, which also turn the taskbar button red while no job runs.
var active = _model.CountOf(JobFilter.Running);
Shell.SetJobCount(active, _model.QueuedCount);
- Badge = active;
+ Shell.SetUnseenFailures(_unseenFailures.Count);
+ Badge = active + _unseenFailures.Count;
OnPropertyChanged(nameof(WorkersText));
OnPropertyChanged(nameof(HasWorkers));
CommandManager.InvalidateRequerySuggested();
diff --git a/src/Titano.App/Sections/LibraryViewModel.cs b/src/Titano.App/Sections/LibraryViewModel.cs
index 410dc7b6..f7259598 100644
--- a/src/Titano.App/Sections/LibraryViewModel.cs
+++ b/src/Titano.App/Sections/LibraryViewModel.cs
@@ -700,6 +700,7 @@ public sealed class LibraryViewModel : SectionViewModel
_hasArchive = (await _db.Archives.ListAsync()).Count > 0;
Shell.SetLibraryTotals(stats.Sequences, stats.Photos, stats.Bytes);
_localStats = stats;
+ await CountWarningsAsync();
_suppressReload = true;
var tag = _tag.Value;
@@ -1025,6 +1026,8 @@ public sealed class LibraryViewModel : SectionViewModel
if (job.Kind is JobKind.Scan or JobKind.Rebuild or JobKind.Import or JobKind.Adopt or JobKind.Move or JobKind.UploadCommit
|| SyncService.TransferKind(job) is SyncTransferKind.DownloadOriginals or SyncTransferKind.GetExports)
await RefreshAsync();
+ else if (job.Kind is JobKind.LightAnalyse or JobKind.DeepAnalyse)
+ await CountWarningsAsync();
}
catch (DatabaseException ex)
{
@@ -1032,6 +1035,15 @@ public sealed class LibraryViewModel : SectionViewModel
}
}
+ ///
+ /// The rail badge counts the sequences of this PC with warnings (BRIEF §12.1 "badge counts (warnings, …)"), the
+ /// ones the Warnings filter shows; analyses change it.
+ ///
+ private async Task CountWarningsAsync()
+ {
+ if (_db is not null) Badge = await _db.Sequences.CountAsync(new SequenceQuery { WithStatus = SequenceStatus.HasWarnings });
+ }
+
/// Open: the editor for a sequence here; for a remote card, with proxies (fetched first when this PC has none).
private async Task OpenAsync(SequenceItem item)
{
diff --git a/src/Titano.App/Sections/SequenceView.xaml b/src/Titano.App/Sections/SequenceView.xaml
index 2f2ac0d4..4cbcd45d 100644
--- a/src/Titano.App/Sections/SequenceView.xaml
+++ b/src/Titano.App/Sections/SequenceView.xaml
@@ -27,7 +27,7 @@
-
+
@@ -141,7 +141,7 @@
IsChecked="{Binding IsCropResult}" ui:ButtonIcon.Glyph="{StaticResource Icon.Eye}" ToolTip="{Binding CropModeToolTip}"
AutomationProperties.Name="{l:Loc Editor.Preview.CropResult}" />
+ IsChecked="{Binding IsActualSize}" Content="{l:Loc Editor.Preview.ActualSize}" ToolTip="{l:Loc Tooltips.Editor.Preview.OneToOne}" />
diff --git a/src/Titano.App/Sections/ServerViewModel.cs b/src/Titano.App/Sections/ServerViewModel.cs
index 093dbf4d..65000153 100644
--- a/src/Titano.App/Sections/ServerViewModel.cs
+++ b/src/Titano.App/Sections/ServerViewModel.cs
@@ -15,9 +15,11 @@ namespace Titano.App.Sections;
/// Server (BRIEF §12.7, Server.html): address with LAN-discovered servers, connect with trust-on-first-use and login,
/// status (name, version, latency, certificate), account and quota, sign out, the options of this PC (render node,
/// proxies kept offline, automatic project sync, uploads paused on metered networks) and the sync table ().
+/// The rail badge counts the settings conflicts waiting for a choice.
///
public sealed class ServerViewModel : SectionViewModel
{
+ private readonly SyncFilterChip _conflicts;
private string _address;
private string? _errorText;
private ServerSession? _session;
@@ -37,6 +39,8 @@ public sealed class ServerViewModel : SectionViewModel
});
CertificateCommand = new RelayCommand(ShowCertificate, () => Fingerprint is not null);
Sync = new SyncTableViewModel(shell);
+ _conflicts = Sync.Chips.Single(c => c.Filter == SyncFilter.Conflicts);
+ _conflicts.PropertyChanged += OnConflictsChanged;
}
/// Sequences of this PC and of the server, where they stand and what can be done.
@@ -213,6 +217,7 @@ public sealed class ServerViewModel : SectionViewModel
public override void Dispose()
{
+ _conflicts.PropertyChanged -= OnConflictsChanged;
if (_session is not null) _session.PropertyChanged -= OnSessionChanged;
Shell.Settings.Encoders.CollectionChanged -= OnEncodersChanged;
Sync.Dispose();
@@ -225,6 +230,11 @@ public sealed class ServerViewModel : SectionViewModel
if (Shell.Settings.Encoders.Count == 0 && !Shell.Settings.IsDetecting) _ = Shell.Settings.DetectEncodersAsync();
}
+ private void OnConflictsChanged(object? sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName is nameof(SyncFilterChip.Count) or "" or null) Badge = _conflicts.Count;
+ }
+
private void SetSyncOption(bool value, bool current, Action store, [System.Runtime.CompilerServices.CallerMemberName] string? name = null)
{
if (value == current) return;
diff --git a/src/Titano.App/Sections/SettingsView.xaml b/src/Titano.App/Sections/SettingsView.xaml
index 4cdde826..b38f4ad3 100644
--- a/src/Titano.App/Sections/SettingsView.xaml
+++ b/src/Titano.App/Sections/SettingsView.xaml
@@ -134,7 +134,16 @@
-
+
+
+
+
+
+
+
+
diff --git a/src/Titano.App/Sections/SettingsViewModel.cs b/src/Titano.App/Sections/SettingsViewModel.cs
index 92972eed..f5aba739 100644
--- a/src/Titano.App/Sections/SettingsViewModel.cs
+++ b/src/Titano.App/Sections/SettingsViewModel.cs
@@ -56,9 +56,11 @@ public sealed class SettingsViewModel : SectionViewModel
{
Shell = shell;
_s = shell.Services.Settings;
+ Startup = shell.Services.Environment is { IsCapture: false, IsPortable: false } ? new RunKeyStartWithWindows() : new MemoryStartWithWindows();
AllPages =
[
- new(SettingsPage.General, ["Settings.General.Language", "Settings.General.Theme", "Settings.General.Usage"]),
+ new(SettingsPage.General, ["Settings.General.Language", "Settings.General.Theme", .. ShowsStartup ? (string[])["Settings.General.Startup"] : [],
+ "Settings.General.Notifications", .. ProductFeatures.AdsEnabled ? (string[])["Settings.General.Usage"] : []]),
new(SettingsPage.Archive, ["Settings.Archive.Root", "Settings.Archive.Folders", "Settings.Archive.Files", "Settings.Archive.Proxies",
"Settings.Archive.Thumbnails", "Settings.Archive.Polling"]),
new(SettingsPage.Import, ["Import.Scan.Sessions", "Import.Label.Scan", "Import.Scan.Subfolders", "Import.Scan.Verify", "Import.Label.Duplicates",
@@ -302,6 +304,40 @@ public sealed class SettingsViewModel : SectionViewModel
}
}
+ /// Where "Start with Windows" is kept (the Run key); screenshots, tests and portable copies keep it in memory.
+ internal IStartWithWindows Startup { get; set; }
+
+ /// A portable copy leaves nothing in the registry (BRIEF §6.2): it offers no Startup row.
+ public bool ShowsStartup => !Shell.Services.Environment.IsPortable;
+
+ /// Titano starts minimised when the user signs in to Windows.
+ public bool StartWithWindows
+ {
+ get => Startup.IsEnabled;
+ set
+ {
+ if (Startup.IsEnabled == value) return;
+ Startup.SetEnabled(value);
+ OnPropertyChanged();
+ }
+ }
+
+ /// Toasts also appear as Windows notifications while the window is minimised or in the background.
+ public bool OsNotifications
+ {
+ get => _s.OsNotifications;
+ set
+ {
+ if (_s.OsNotifications == value) return;
+ _s.OsNotifications = value;
+ Save();
+ OnPropertyChanged();
+ }
+ }
+
+ /// The usage counts consent belongs to monetization (BRIEF §21): only builds with it enabled offer it.
+ public bool ShowsUsageCounts => ProductFeatures.AdsEnabled;
+
public bool UsageCounts
{
get => _s.AnonymousUsageCounts;
@@ -762,6 +798,7 @@ public sealed class SettingsViewModel : SectionViewModel
Shell.Notify(Loc.L("Settings.Advanced.RestoreFailed"), Loc.L("Errors.Backup.Deferred"), isError: true);
break;
}
+ Startup.Refresh();
}
public override void Dispose()
@@ -1262,6 +1299,8 @@ public sealed class SettingsViewModel : SectionViewModel
{
case SettingsPage.General:
_s.AnonymousUsageCounts = defaults.AnonymousUsageCounts;
+ _s.OsNotifications = defaults.OsNotifications;
+ Startup.SetEnabled(false);
ApplyTheme(defaults.Theme);
_s.Language = null;
UiLanguage.Apply(null);
diff --git a/src/Titano.App/Sections/WelcomeView.xaml b/src/Titano.App/Sections/WelcomeView.xaml
index 7ec7dc6f..8e58a9db 100644
--- a/src/Titano.App/Sections/WelcomeView.xaml
+++ b/src/Titano.App/Sections/WelcomeView.xaml
@@ -106,14 +106,16 @@
-
+
+ HorizontalAlignment="Left" Foreground="{DynamicResource Brush.TextMuted}"
+ Visibility="{Binding ShowsUsageCounts, Converter={StaticResource BoolToVisibility}}" />
diff --git a/src/Titano.App/Sections/WelcomeViewModel.cs b/src/Titano.App/Sections/WelcomeViewModel.cs
index e452bd4e..bcd1ae51 100644
--- a/src/Titano.App/Sections/WelcomeViewModel.cs
+++ b/src/Titano.App/Sections/WelcomeViewModel.cs
@@ -139,6 +139,9 @@ public sealed class WelcomeViewModel : LocalizedViewModel
}
}
+ /// The usage counts consent belongs to monetization (BRIEF §21): only builds with it enabled offer it.
+ public bool ShowsUsageCounts => ProductFeatures.AdsEnabled;
+
public bool UsageCounts
{
get => _shell.Services.Settings.AnonymousUsageCounts;
diff --git a/src/Titano.App/Server/ConnectFlow.cs b/src/Titano.App/Server/ConnectFlow.cs
index d024edfa..2dcfb9fb 100644
--- a/src/Titano.App/Server/ConnectFlow.cs
+++ b/src/Titano.App/Server/ConnectFlow.cs
@@ -131,23 +131,28 @@ public sealed class ConnectFlow(IServerApiFactory factory, ITrustStore trust) :
return await IdentifyAsync(ct);
}
- /// Sends the credentials; only possible once the server is identified and trusted.
+ ///
+ /// Sends the credentials; only possible once the server is identified and trusted. An answer that arrives after the
+ /// flow moved on (disconnected, or connecting elsewhere) changes nothing.
+ ///
public async Task SignInAsync(string username, string password, CancellationToken ct = default)
{
- if (Step is not (ConnectStep.AwaitingCredentials or ConnectStep.SigningIn) || _api is null) return Step;
+ if (Step is not (ConnectStep.AwaitingCredentials or ConnectStep.SigningIn) || _api is not { } api) return Step;
if (string.IsNullOrWhiteSpace(username)) return Retry(ConnectError.BadCredentials);
Set(ConnectStep.SigningIn, ConnectError.None);
try
{
- var login = await _api.LoginAsync(username.Trim(), password, ct);
+ var login = await api.LoginAsync(username.Trim(), password, ct);
+ if (!ReferenceEquals(api, _api)) return Step;
if (login.Token is null) return Retry(ConnectError.BadCredentials);
// TitanoClient keeps the token itself; set it explicitly so every IServerApi behaves the same.
- _api.Token = login.Token;
+ api.Token = login.Token;
User = login.User;
return Set(ConnectStep.Connected, ConnectError.None);
}
catch (Exception ex) when (Classify(ex, ct) is { } error)
{
+ if (!ReferenceEquals(api, _api)) return Step;
return error is ConnectError.BadCredentials ? Retry(error) : Fail(error);
}
}
diff --git a/src/Titano.App/Server/ServerSession.cs b/src/Titano.App/Server/ServerSession.cs
index 9f944024..7f588642 100644
--- a/src/Titano.App/Server/ServerSession.cs
+++ b/src/Titano.App/Server/ServerSession.cs
@@ -144,17 +144,23 @@ public sealed class ServerSession : ObservableObject, ITrustStore, IDisposable
if (step != ConnectStep.AwaitingCredentials) return false;
}
+ // The form may be cancelled while the server is still answering: that answer must not sign this PC in.
+ using var attempt = CancellationTokenSource.CreateLinkedTokenSource(ct);
var signedIn = dialogs.SignIn(display, _settings.ServerUsername, async (user, password) =>
{
- var result = await _flow.SignInAsync(user, password, ct);
- return result == ConnectStep.Connected ? null : ErrorText(_flow.Error);
+ var result = await _flow.SignInAsync(user, password, attempt.Token);
+ // An answer the flow dropped (the form was cancelled meanwhile) carries no error of its own.
+ return result == ConnectStep.Connected ? null : ErrorText(_flow.Error is ConnectError.None ? ConnectError.Failed : _flow.Error);
});
if (signedIn && IsConnected)
{
Remember();
return true;
}
- if (!IsConnected && _flow.Step == ConnectStep.AwaitingCredentials) _flow.Disconnect();
+ await attempt.CancelAsync();
+ // Signed in just before the cancel was handled: the session the user turned down ends on the server too.
+ if (IsConnected) await _flow.SignOutAsync();
+ else if (_flow.Step is ConnectStep.AwaitingCredentials or ConnectStep.SigningIn) _flow.Disconnect();
return false;
}
finally
diff --git a/src/Titano.App/Server/SyncHost.cs b/src/Titano.App/Server/SyncHost.cs
index 13a0fbb5..abfaedcb 100644
--- a/src/Titano.App/Server/SyncHost.cs
+++ b/src/Titano.App/Server/SyncHost.cs
@@ -29,7 +29,7 @@ public sealed class SyncHost(AppServices services) : ISyncConnector, IAsyncDispo
private Task _switch = Task.CompletedTask;
private Credentials? _credentials;
- private (SyncAgent Agent, ISyncRemote Remote, Credentials Credentials)? _running;
+ private Running? _running;
private JobEngine? _renders;
/// Connections over ; screenshots substitute a fake server.
@@ -44,10 +44,10 @@ public sealed class SyncHost(AppServices services) : ISyncConnector, IAsyncDispo
public SyncService? Service { get; private set; }
/// The background comparison of the signed-in server; null while signed out.
- public SyncAgent? Agent => _running?.Agent;
+ public SyncAgent? Agent => Volatile.Read(ref _running)?.Agent;
/// The agent's connection, for the table's own calls (conflict resolution); null while signed out.
- public ISyncRemote? Remote => _running?.Remote;
+ public ISyncRemote? Remote => Volatile.Read(ref _running)?.Remote;
/// Key of the signed-in server (); null while signed out.
public string? Server => Volatile.Read(ref _credentials) is { } c ? SyncService.ServerKey(c.Address) : null;
@@ -103,8 +103,8 @@ public sealed class SyncHost(AppServices services) : ISyncConnector, IAsyncDispo
/// Compares now, once the session switch in progress settled; null while signed out.
public async Task RefreshAsync(CancellationToken ct = default)
{
- await _switch;
- return Agent is { } agent ? await agent.RefreshAsync(ct) : null;
+ await _switch.ConfigureAwait(false);
+ return Agent is { } agent ? await agent.RefreshAsync(ct).ConfigureAwait(false) : null;
}
/// Compares again soon (an option changed, an edit on this PC).
@@ -135,13 +135,17 @@ public sealed class SyncHost(AppServices services) : ISyncConnector, IAsyncDispo
return RemoteFactory(c.Address, c.Token, c.Fingerprints);
}
+ ///
+ /// Stops the agent once the session switch in progress settled. The app's exit waits for this on the UI thread, so
+ /// nothing here, in the switch or in the stop continues on it.
+ ///
public async ValueTask DisposeAsync()
{
Volatile.Write(ref _credentials, null);
Uploads.Dispose();
if (_renders is not null) _renders.JobChanged -= OnJobChanged;
- await _switch;
- await StopAsync();
+ await _switch.ConfigureAwait(false);
+ await StopAsync().ConfigureAwait(false);
}
private bool Allows(Permissions permission) => services.Server.User is { } user && (user.Permissions & (long)permission) != 0;
@@ -183,11 +187,16 @@ public sealed class SyncHost(AppServices services) : ISyncConnector, IAsyncDispo
}
}
+ ///
+ /// Switches are chained (each waits for the previous one) and continue on the thread pool: a switch still stopping
+ /// the old agent when the app exits must not need the UI thread its exit blocks.
+ ///
private async Task SwitchAsync(Task previous, Credentials? wanted)
{
- await previous;
- if (_running is { } running && wanted is { } same && running.Credentials.Address == same.Address && running.Credentials.Token == same.Token) return;
- await StopAsync();
+ await previous.ConfigureAwait(false);
+ if (Volatile.Read(ref _running) is { } running && wanted is { } same && running.Credentials.Address == same.Address && running.Credentials.Token == same.Token)
+ return;
+ await StopAsync().ConfigureAwait(false);
if (wanted is not { } start || Service is not { } service)
{
Changed?.Invoke();
@@ -197,19 +206,21 @@ public sealed class SyncHost(AppServices services) : ISyncConnector, IAsyncDispo
var agent = new SyncAgent(service, remote, () => Policy, services.Engine);
agent.Changed += () => Changed?.Invoke();
agent.Start();
- _running = (agent, remote, start);
+ Volatile.Write(ref _running, new Running(agent, remote, start));
Log.Info("sync", $"Comparing with {remote.Server}");
Changed?.Invoke();
}
private async Task StopAsync()
{
- if (_running is not { } running) return;
- _running = null;
- await running.Agent.DisposeAsync();
+ if (Interlocked.Exchange(ref _running, null) is not { } running) return;
+ await running.Agent.DisposeAsync().ConfigureAwait(false);
running.Remote.Dispose();
Changed?.Invoke();
}
private sealed record Credentials(Uri Address, string Token, IReadOnlyCollection Fingerprints);
+
+ /// The agent of the signed-in session: one reference, so the UI thread never reads half of a switch.
+ private sealed record Running(SyncAgent Agent, ISyncRemote Remote, Credentials Credentials);
}
diff --git a/src/Titano.App/Shell/LoginDialog.xaml.cs b/src/Titano.App/Shell/LoginDialog.xaml.cs
index b0adb296..6e374890 100644
--- a/src/Titano.App/Shell/LoginDialog.xaml.cs
+++ b/src/Titano.App/Shell/LoginDialog.xaml.cs
@@ -1,6 +1,7 @@
using System.Windows;
using System.Windows.Automation;
using System.Windows.Automation.Peers;
+using Titano.Core.Diagnostics;
using Titano.Ui.Controls;
namespace Titano.App.Shell;
@@ -9,16 +10,20 @@ 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. 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.
+/// sentence as its help text) until the next attempt. Cancel stays available while the server answers: the form
+/// closes at once and the connection drops the answer.
///
public sealed partial class LoginDialog : TitanoWindow
{
private readonly Func> _signIn;
+ private bool _pending;
+ private bool _closed;
private LoginDialog(string server, string? username, Func> signIn)
{
_signIn = signIn;
InitializeComponent();
+ Closed += (_, _) => _closed = true;
ServerText.Text = server;
User.Text = username ?? string.Empty;
Loaded += (_, _) =>
@@ -41,28 +46,41 @@ public sealed partial class LoginDialog : TitanoWindow
private async void OnSignIn(object sender, RoutedEventArgs e)
{
+ if (_pending) return;
+ _pending = true;
SignIn.IsEnabled = false;
Error.Visibility = Visibility.Collapsed;
Field.SetError(Password, null);
+ string? error;
try
{
- var error = await _signIn(User.Text, Password.Password);
- if (error is null)
- {
- DialogResult = true;
- return;
- }
- 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");
+ error = await _signIn(User.Text, Password.Password);
+ }
+ catch (Exception ex) when (ex is not OutOfMemoryException)
+ {
+ // Cancel ended the request: nobody waits for this answer any more.
+ if (_closed && ex is OperationCanceledException) return;
+ Log.Warning("server", "Sign-in failed", ex);
+ error = ErrorText.For(ex);
}
finally
{
+ _pending = false;
SignIn.IsEnabled = true;
}
+ // The form was cancelled or closed while the server answered: a result can no longer be set on it.
+ if (_closed) return;
+ if (error is null)
+ {
+ DialogResult = true;
+ return;
+ }
+ 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");
}
}
diff --git a/src/Titano.App/Shell/MainWindow.xaml b/src/Titano.App/Shell/MainWindow.xaml
index 08a191b5..e1604357 100644
--- a/src/Titano.App/Shell/MainWindow.xaml
+++ b/src/Titano.App/Shell/MainWindow.xaml
@@ -9,6 +9,26 @@
Title="{Binding WindowTitle}"
Width="1440" Height="900" MinWidth="1200" MinHeight="760"
WindowStartupLocation="CenterScreen">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Titano.App/Shell/MainWindow.xaml.cs b/src/Titano.App/Shell/MainWindow.xaml.cs
index b5fc47f7..d8d19c07 100644
--- a/src/Titano.App/Shell/MainWindow.xaml.cs
+++ b/src/Titano.App/Shell/MainWindow.xaml.cs
@@ -9,9 +9,15 @@ using Titano.Ui.Controls;
namespace Titano.App.Shell;
+///
+/// The client's window (BRIEF §12.1): rail, job bar, section, status strip, the first-run dialog and the toasts, which
+/// also become Windows notifications while nobody sees the window ().
+///
public partial class MainWindow : TitanoWindow
{
private readonly ShellViewModel _shell;
+ private readonly OsNotifications _notifications;
+ private WindowState? _restoreTo;
public MainWindow(ShellViewModel shell)
{
@@ -24,10 +30,37 @@ public partial class MainWindow : TitanoWindow
if (e.PropertyName is nameof(ShellViewModel.IsConnected) or "") UpdateConnection();
if (e.PropertyName is nameof(ShellViewModel.IsWelcomeOpen) or "") FocusWelcome();
};
+ // Screenshots and tests run off screen and never activated: they must not reach the notification area.
+ _notifications = new OsNotifications(this, () => shell.Services.Settings.OsNotifications && !shell.Services.Environment.IsCapture, t => Toasts.Dismiss(t));
shell.PendingToasts.CollectionChanged += OnToastRequested;
Loaded += (_, _) => FocusWelcome();
RestorePlacement();
Closing += (_, _) => SavePlacement();
+ Closed += (_, _) => _notifications.Dispose();
+ }
+
+ /// Started at sign-in (Settings › General › Startup): the window waits minimised on the taskbar.
+ internal static bool StartsMinimized(IReadOnlyList arguments) =>
+ arguments.Any(a => a.Equals(RunKeyStartWithWindows.MinimizedOption, StringComparison.OrdinalIgnoreCase));
+
+ /// Minimised until the user opens it; that first restore brings back the saved state (maximised or not).
+ internal void WaitMinimized(bool maximized)
+ {
+ WindowState = WindowState.Minimized;
+ _restoreTo = maximized ? WindowState.Maximized : WindowState.Normal;
+ }
+
+ /// The maximised flag to save: a window started minimised and never opened keeps the state it would come back to.
+ internal static bool SavesMaximized(WindowState state, WindowState? restoreTo) =>
+ state == WindowState.Maximized || (state == WindowState.Minimized && restoreTo == WindowState.Maximized);
+
+ /// The first restore of a window started minimised brings back the saved maximised state.
+ protected override void OnStateChanged(EventArgs e)
+ {
+ base.OnStateChanged(e);
+ if (_restoreTo is not { } state || WindowState == WindowState.Minimized) return;
+ _restoreTo = null;
+ if (WindowState != state) WindowState = state;
}
/// F6 moves the keyboard to the newest notification (as in Windows apps), Esc there dismisses it.
@@ -66,14 +99,21 @@ public partial class MainWindow : TitanoWindow
private void OnToastRequested(object? sender, NotifyCollectionChangedEventArgs e)
{
if (e.Action != NotifyCollectionChangedAction.Add || e.NewItems is null) return;
- foreach (Toast t in e.NewItems) Toasts.Show(t);
+ foreach (Toast t in e.NewItems)
+ {
+ Toasts.Show(t);
+ _notifications.Show(t);
+ }
Dispatcher.BeginInvoke(() => _shell.PendingToasts.Clear());
}
private void RestorePlacement()
{
+ if (_shell.Services.Environment.IsCapture) return;
var p = _shell.Services.Settings.Window;
- if (p is null || p.Width < MinWidth || p.Height < MinHeight || _shell.Services.Environment.IsCapture) return;
+ var maximized = p?.Maximized == true;
+ if (StartsMinimized(Environment.GetCommandLineArgs())) WaitMinimized(maximized);
+ if (p is null || p.Width < MinWidth || p.Height < MinHeight) return;
var virtualScreen = new Rect(SystemParameters.VirtualScreenLeft, SystemParameters.VirtualScreenTop, SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight);
var rect = new Rect(p.Left, p.Top, p.Width, p.Height);
if (!virtualScreen.IntersectsWith(rect)) return;
@@ -82,7 +122,7 @@ public partial class MainWindow : TitanoWindow
Top = p.Top;
Width = p.Width;
Height = p.Height;
- if (p.Maximized) WindowState = WindowState.Maximized;
+ if (maximized && _restoreTo is null) WindowState = WindowState.Maximized;
}
private void SavePlacement()
@@ -95,7 +135,7 @@ public partial class MainWindow : TitanoWindow
Top = b.Top,
Width = b.Width,
Height = b.Height,
- Maximized = WindowState == WindowState.Maximized,
+ Maximized = SavesMaximized(WindowState, _restoreTo),
};
}
}
diff --git a/src/Titano.App/Shell/OsNotifications.cs b/src/Titano.App/Shell/OsNotifications.cs
new file mode 100644
index 00000000..906db231
--- /dev/null
+++ b/src/Titano.App/Shell/OsNotifications.cs
@@ -0,0 +1,129 @@
+using System.Windows;
+using Titano.Core.Localization;
+using Titano.Ui.Controls;
+using Titano.Ui.Interop;
+
+namespace Titano.App.Shell;
+
+///
+/// Windows notifications for the toasts nobody would see (BRIEF §12.1 "optional OS toast when minimised", §12.4 "Card
+/// X detected — Import"): while the main window is minimised, hidden or behind another program, every toast also goes
+/// to a tray balloon, which Windows 10/11 shows as a notification, when Settings › General allows it. Clicking it
+/// brings the window back; it also runs the toast's action when the toast allows it
+/// () and it is the only notification shown, since Windows does not say which
+/// of several was clicked. The tray icon exists only while such a notification can be clicked: it goes once a window
+/// of Titano is active again. Create, use and dispose it on the UI thread.
+///
+public sealed class OsNotifications : IDisposable
+{
+ private const int MenuShow = 1;
+
+ private readonly Window _window;
+ private readonly Func _enabled;
+ private readonly Action _dismiss;
+ private TrayIcon? _tray;
+ private Toast? _latest;
+ private int _shown;
+ private bool _disposed;
+
+ /// The main window, restored by a click.
+ /// Settings › General › Notifications (never during screenshots and tests).
+ /// Closes the in-window toast whose action a click ran.
+ public OsNotifications(Window window, Func enabled, Action dismiss)
+ {
+ _window = window;
+ _enabled = enabled;
+ _dismiss = dismiss;
+ _window.Activated += OnActivated;
+ }
+
+ /// The tray icon is in the notification area (tests).
+ internal bool HasTrayIcon => _tray is not null;
+
+ /// Mirrors as a Windows notification when nobody sees the window; true when it did.
+ public bool Show(Toast toast)
+ {
+ // A toast raised while the app closes (the window is hidden by then) needs no icon that would outlive it.
+ if (_disposed || !_enabled() || !IsUnseen(_window.WindowState, _window.IsVisible, AnyWindowActive())) return false;
+ _tray ??= new TrayIcon(Loc.L("Shell.AppName"), Menu, OnMenu, Restore, OnBalloonClicked);
+ _latest = toast;
+ _shown++;
+ _tray.ShowBalloon(toast.Title, BalloonText(toast), toast.IsError);
+ return true;
+ }
+
+ public void Dispose()
+ {
+ _disposed = true;
+ _window.Activated -= OnActivated;
+ RemoveIcon();
+ }
+
+ /// Nobody sees the main window: minimised, hidden, or no window of Titano has the foreground.
+ public static bool IsUnseen(WindowState state, bool isVisible, bool anyWindowActive) =>
+ state == WindowState.Minimized || !isVisible || !anyWindowActive;
+
+ ///
+ /// The notification's text: the toast's message, then the action a click on it runs ("Import"); the title alone
+ /// when there is neither (Windows needs a text to show a notification at all). An action a click does not run
+ /// waits in the window and is not offered here.
+ ///
+ public static string BalloonText(Toast toast)
+ {
+ ArgumentNullException.ThrowIfNull(toast);
+ var lines = new[] { toast.Message, toast.RunsFromNotification ? toast.ActionText : null }.Where(l => !string.IsNullOrWhiteSpace(l));
+ return string.Join(Environment.NewLine, lines) is { Length: > 0 } text ? text : toast.Title;
+ }
+
+ ///
+ /// A notification was clicked: the window comes back, and the toast's action runs when the toast allows it and
+ /// no other notification was shown since the icon appeared (Windows does not say which one was clicked).
+ ///
+ internal void OnBalloonClicked()
+ {
+ var toast = _shown == 1 ? _latest : null;
+ _latest = null;
+ Restore();
+ if (toast is not { RunsFromNotification: true, ActionCommand: { } command } || !command.CanExecute(null)) return;
+ command.Execute(null);
+ _dismiss(toast);
+ }
+
+ private static bool AnyWindowActive() => Application.Current?.Windows.OfType().Any(w => w.IsActive) ?? false;
+
+ private IReadOnlyList Menu() => [new(MenuShow, Loc.L("Shell.Tray.Show"))];
+
+ private void OnMenu(int id)
+ {
+ if (id == MenuShow) Restore();
+ }
+
+ /// The window as it was before it was minimised (maximised stays maximised), in front.
+ private void Restore()
+ {
+ _window.Show();
+ if (_window.WindowState == WindowState.Minimized) SystemCommands.RestoreWindow(_window);
+ _window.Activate();
+ }
+
+ ///
+ /// Back in front: the notifications have done their job. The icon goes after the current message, since activation
+ /// may come from a click the icon's own window is still handling, unless the window went to the background again.
+ ///
+ private void OnActivated(object? sender, EventArgs e)
+ {
+ if (_tray is null) return;
+ _window.Dispatcher.BeginInvoke(() =>
+ {
+ if (!IsUnseen(_window.WindowState, _window.IsVisible, AnyWindowActive())) RemoveIcon();
+ });
+ }
+
+ private void RemoveIcon()
+ {
+ _latest = null;
+ _shown = 0;
+ _tray?.Dispose();
+ _tray = null;
+ }
+}
diff --git a/src/Titano.App/Shell/ShellViewModel.cs b/src/Titano.App/Shell/ShellViewModel.cs
index 9e9df006..0cd51a77 100644
--- a/src/Titano.App/Shell/ShellViewModel.cs
+++ b/src/Titano.App/Shell/ShellViewModel.cs
@@ -1,5 +1,6 @@
using System.Collections.ObjectModel;
using System.Windows.Input;
+using System.Windows.Shell;
using Titano.App.Infrastructure;
using Titano.App.Sections;
using Titano.Core.Diagnostics;
@@ -26,6 +27,7 @@ public sealed class ShellViewModel : LocalizedViewModel
private string? _serverName;
private int _jobCount;
private int _queuedCount;
+ private int _unseenFailures;
private WelcomeViewModel? _welcome;
private Guid? _currentSequenceId;
@@ -48,12 +50,13 @@ public sealed class ShellViewModel : LocalizedViewModel
Library.IsSelected = true;
Library.PropertyChanged += OnCurrentChanged;
+ // The rail and its shortcuts (Ctrl+1…6, Ctrl+,) navigate only while no first-run dialog covers the shell.
NavigateCommand = new RelayCommand(p =>
{
if (p is SectionViewModel s) Navigate(s.Key);
else if (p is SectionKey k) Navigate(k);
else if (p is string name && Enum.TryParse(name, out var key)) Navigate(key);
- });
+ }, _ => IsShellEnabled);
ToggleRailCommand = new RelayCommand(() => IsRailCollapsed = !IsRailCollapsed);
services.Server.PropertyChanged += (_, _) => SetConnection(services.Server.ServerName);
if (!_settings.FirstRunCompleted) _welcome = new WelcomeViewModel(this);
@@ -89,6 +92,7 @@ public sealed class ShellViewModel : LocalizedViewModel
if (!Set(ref _welcome, value)) return;
OnPropertyChanged(nameof(IsWelcomeOpen));
OnPropertyChanged(nameof(IsShellEnabled));
+ CommandManager.InvalidateRequerySuggested();
}
}
@@ -196,8 +200,20 @@ public sealed class ShellViewModel : LocalizedViewModel
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 .
+ /// The taskbar button mirrors the job bar (BRIEF §11.5): the running job's progress, sliding while its total is
+ /// unknown; red while no job runs and a failure waits on the Jobs screen; nothing otherwise.
+ ///
+ public TaskbarItemProgressState TaskbarState =>
+ _jobActive ? _jobIndeterminate ? TaskbarItemProgressState.Indeterminate : TaskbarItemProgressState.Normal
+ : _unseenFailures > 0 ? TaskbarItemProgressState.Error
+ : TaskbarItemProgressState.None;
+
+ /// 0…1 for ; a waiting failure fills the button.
+ public double TaskbarProgress => _jobActive ? _jobProgress : _unseenFailures > 0 ? 1 : 0;
+
+ ///
+ /// Updates the global job bar and the taskbar button. 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)
{
@@ -208,6 +224,17 @@ public sealed class ShellViewModel : LocalizedViewModel
IsJobIndeterminate = indeterminate;
OnPropertyChanged(nameof(JobText));
OnPropertyChanged(nameof(JobAnnouncement));
+ OnPropertyChanged(nameof(TaskbarState));
+ OnPropertyChanged(nameof(TaskbarProgress));
+ }
+
+ /// Failed jobs not seen on the Jobs screen yet (the taskbar button turns red while no job runs).
+ public void SetUnseenFailures(int count)
+ {
+ if (_unseenFailures == count) return;
+ _unseenFailures = count;
+ OnPropertyChanged(nameof(TaskbarState));
+ OnPropertyChanged(nameof(TaskbarProgress));
}
// ---- Status strip ----
@@ -264,8 +291,10 @@ public sealed class ShellViewModel : LocalizedViewModel
///
/// A one-line notice with one action (job done, update available). marks something that
/// did not happen or failed: screen readers then say it at once instead of after what they are reading.
+ /// : a click on its Windows notification also runs the action ().
///
- public void Notify(string title, string? message = null, string? actionText = null, string? actionToolTip = null, Action? action = null, bool isError = false) =>
+ public void Notify(string title, string? message = null, string? actionText = null, string? actionToolTip = null, Action? action = null, bool isError = false,
+ bool runsFromNotification = false) =>
ShowToast(new Toast
{
Title = title,
@@ -274,6 +303,7 @@ public sealed class ShellViewModel : LocalizedViewModel
ActionToolTip = actionToolTip,
ActionCommand = action is null ? null : new RelayCommand(action),
IsError = isError,
+ RunsFromNotification = runsFromNotification,
});
/// Errors are one sentence saying what happened plus one action (BRIEF §0.2 rule 6); the details go to the log.
@@ -292,6 +322,8 @@ public sealed class ShellViewModel : LocalizedViewModel
public override void Dispose()
{
+ // The editor first: it stops its runners and closes its source before the engine and the index under it go.
+ Sequence.Dispose();
Jobs.Dispose();
Library.Dispose();
Import.Dispose();
diff --git a/src/Titano.Core/IO/StartupCommand.cs b/src/Titano.Core/IO/StartupCommand.cs
new file mode 100644
index 00000000..6e023874
--- /dev/null
+++ b/src/Titano.Core/IO/StartupCommand.cs
@@ -0,0 +1,61 @@
+namespace Titano.Core.IO;
+
+///
+/// The sign-in entries of Titano's programs: HKCU\Software\Microsoft\Windows\CurrentVersion\Run values whose
+/// command starts one executable with one option ("C:\…\Titano.exe" --minimized). Shared by the programs that
+/// write them and the uninstaller that removes them; the paths are Windows paths, compared ignoring case.
+///
+public static class StartupCommand
+{
+ public const string RunKey = @"Software\Microsoft\Windows\CurrentVersion\Run";
+
+ /// The client's value (Settings › General › Startup).
+ public const string ClientValue = "Titano";
+
+ /// The Uploader's value (its "Start with Windows").
+ public const string UploaderValue = "Titano Uploader";
+
+ /// The command that starts with .
+ public static string Format(string executable, string option) => $"\"{executable}\" {option}";
+
+ ///
+ /// The program starts: its quoted first part, or the text up to the first space when it
+ /// is not quoted; null for an empty or malformed command.
+ ///
+ public static string? Executable(string? command)
+ {
+ var text = command?.Trim();
+ if (string.IsNullOrEmpty(text)) return null;
+ if (text[0] == '"')
+ {
+ var end = text.IndexOf('"', 1);
+ return end > 1 ? text[1..end] : null;
+ }
+ var space = text.IndexOf(' ', StringComparison.Ordinal);
+ return space < 0 ? text : text[..space];
+ }
+
+ /// starts , not another copy of the program.
+ public static bool Starts(string? command, string? executable) =>
+ executable is { Length: > 0 } && string.Equals(Executable(command), executable, StringComparison.OrdinalIgnoreCase);
+
+ /// The program starts lies in or one of its folders.
+ public static bool StartsFrom(string? command, string directory)
+ {
+ ArgumentNullException.ThrowIfNull(directory);
+ var folder = directory.TrimEnd('\\', '/');
+ return Executable(command) is { } exe && folder.Length > 0 && exe.Length > folder.Length + 1
+ && exe.StartsWith(folder, StringComparison.OrdinalIgnoreCase) && exe[folder.Length] is '\\' or '/';
+ }
+
+ /// The folder of the program starts; null when it names none.
+ public static string? Folder(string? command) => Executable(command) is { } exe ? FolderOf(exe) : null;
+
+ /// The folder part of a Windows path (on any platform); null when it has none.
+ public static string? FolderOf(string path)
+ {
+ ArgumentNullException.ThrowIfNull(path);
+ var slash = path.LastIndexOfAny(['\\', '/']);
+ return slash > 0 ? path[..slash] : null;
+ }
+}
diff --git a/src/Titano.Setup/Engine/SetupRegistry.cs b/src/Titano.Setup/Engine/SetupRegistry.cs
index 006c7703..a407d2d0 100644
--- a/src/Titano.Setup/Engine/SetupRegistry.cs
+++ b/src/Titano.Setup/Engine/SetupRegistry.cs
@@ -2,6 +2,7 @@ using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
using Microsoft.Win32;
+using Titano.Core.IO;
namespace Titano.Setup.Engine;
@@ -56,6 +57,20 @@ internal static partial class SetupRegistry
public static void DeleteUninstallEntry(InstallScope scope, string productKey) =>
Hive(scope).DeleteSubKeyTree(UninstallRoot + productKey, throwOnMissingSubKey: false);
+ ///
+ /// Removes the sign-in entries of the client and the Uploader (HKCU\…\Run, written by the programs
+ /// themselves) that start a program of ; another copy's entries stay.
+ ///
+ public static void DeleteStartupEntries(string directory)
+ {
+ using var run = Registry.CurrentUser.OpenSubKey(StartupCommand.RunKey, writable: true);
+ if (run is null) return;
+ foreach (var name in (ReadOnlySpan)[StartupCommand.ClientValue, StartupCommand.UploaderValue])
+ {
+ if (StartupCommand.StartsFrom(run.GetValue(name) as string, directory)) run.DeleteValue(name, throwOnMissingValue: false);
+ }
+ }
+
/// Registers to open with "program" "%1" under .
public static void RegisterFileType(InstallScope scope, string extension, string progId, string description, string program)
{
diff --git a/src/Titano.Setup/Engine/UninstallEngine.cs b/src/Titano.Setup/Engine/UninstallEngine.cs
index d793b225..c06bf1ea 100644
--- a/src/Titano.Setup/Engine/UninstallEngine.cs
+++ b/src/Titano.Setup/Engine/UninstallEngine.cs
@@ -10,8 +10,8 @@ namespace Titano.Setup.Engine;
internal sealed record InstalledProduct(string Directory, InstallLog Log);
///
-/// Removes an installation using only its log: shortcuts, file types, logged files, the log and the Add/Remove
-/// Programs entry, then the uninstaller itself. Files the log does not list are left alone; the user data folder
+/// Removes an installation using only its log: shortcuts, file types, logged files, the log, the Add/Remove
+/// Programs entry and the programs' sign-in entries, then the uninstaller itself. Files the log does not list are left alone; the user data folder
/// is deleted only when removeUserData is set by an explicit choice in the window.
///
internal static class UninstallEngine
@@ -60,6 +60,15 @@ internal static class UninstallEngine
}
SetupRegistry.DeleteUninstallEntry(log.Scope, log.ProductKey);
+ try
+ {
+ SetupRegistry.DeleteStartupEntries(directory);
+ }
+ catch (Exception ex) when (ex is System.Security.SecurityException or UnauthorizedAccessException or IOException)
+ {
+ // Windows skips a sign-in entry whose program is gone; not worth failing the removal.
+ Log.Warning("setup", "Sign-in entries not removed", ex);
+ }
File.Delete(Path.Combine(directory, InstallLog.FileName));
var uninstaller = Path.Combine(directory, log.UninstallerName);
try
diff --git a/src/Titano.Ui/Controls/Toasts.cs b/src/Titano.Ui/Controls/Toasts.cs
index 16f8c33c..f4538890 100644
--- a/src/Titano.Ui/Controls/Toasts.cs
+++ b/src/Titano.Ui/Controls/Toasts.cs
@@ -22,6 +22,13 @@ public sealed class Toast : ObservableObject
/// Something failed: screen readers say it at once, ahead of other notices (assertive, not polite).
public bool IsError { get; init; }
+
+ ///
+ /// A click on the toast's Windows notification also runs its action (it opens what the toast names). Off by
+ /// default: people click a notification to bring the window back, so a Cancel, Undo or Retry there would act
+ /// before they have read why.
+ ///
+ public bool RunsFromNotification { get; init; }
}
///
diff --git a/src/Titano.Uploader/Interop/TrayIcon.cs b/src/Titano.Ui/Interop/TrayIcon.cs
similarity index 85%
rename from src/Titano.Uploader/Interop/TrayIcon.cs
rename to src/Titano.Ui/Interop/TrayIcon.cs
index 4daed96f..ff4c8bd4 100644
--- a/src/Titano.Uploader/Interop/TrayIcon.cs
+++ b/src/Titano.Ui/Interop/TrayIcon.cs
@@ -3,14 +3,16 @@ using System.Windows.Interop;
using Titano.Core.Diagnostics;
using Titano.Core.Localization;
-namespace Titano.Uploader.Interop;
+namespace Titano.Ui.Interop;
/// One entry of the tray menu; an id of 0 is a separator.
public readonly record struct TrayMenuItem(int Id, string? Text);
///
/// Notification-area icon through Shell_NotifyIconW: the program icon from the executable's resources, a tooltip,
-/// a native context menu and balloons. A hidden window receives the callbacks and re-adds the icon after Explorer restarts.
+/// a native context menu and balloons (Windows notifications on Windows 10/11). A hidden window receives the callbacks
+/// and re-adds the icon after Explorer restarts. Used by the Uploader (tray) and the client (notifications while
+/// minimised); create, use and dispose it on the UI thread.
///
public sealed unsafe partial class TrayIcon : IDisposable
{
@@ -21,6 +23,7 @@ public sealed unsafe partial class TrayIcon : IDisposable
private const uint NifIcon = 0x2;
private const uint NifTip = 0x4;
private const uint NifInfo = 0x10;
+ private const uint NiifError = 0x3;
private const uint NiifUser = 0x4;
private const int CallbackMessage = 0x8000 + 1; // WM_APP + 1
private const int WmContextMenu = 0x007B;
@@ -42,21 +45,24 @@ public sealed unsafe partial class TrayIcon : IDisposable
private readonly Func> _menu;
private readonly Action _command;
private readonly Action _show;
+ private readonly Action? _balloonClicked;
private string _toolTip;
private bool _added;
/// Hover text (up to 127 characters).
/// Builds the context menu when it opens.
/// Runs a chosen menu id.
- /// Left click or balloon click.
- public TrayIcon(string toolTip, Func> menu, Action command, Action show)
+ /// Left click, and balloon click when is null.
+ /// Click on the last balloon (or its Windows notification).
+ public TrayIcon(string toolTip, Func> menu, Action command, Action show, Action? balloonClicked = null)
{
_toolTip = toolTip;
_menu = menu;
_command = command;
_show = show;
+ _balloonClicked = balloonClicked;
// A hidden top-level window: message-only windows miss the TaskbarCreated broadcast.
- _window = new HwndSource(new HwndSourceParameters("TitanoUploaderTray") { Width = 0, Height = 0, WindowStyle = 0 });
+ _window = new HwndSource(new HwndSourceParameters("TitanoTray") { Width = 0, Height = 0, WindowStyle = 0 });
_window.AddHook(WndProc);
_taskbarCreated = RegisterWindowMessageW("TaskbarCreated");
(_icon, _ownsIcon) = LoadProgramIcon();
@@ -71,13 +77,16 @@ public sealed unsafe partial class TrayIcon : IDisposable
Notify(NimModify, &data);
}
- /// Shows a balloon (a toast on Windows 10/11) with the program icon.
- public void ShowBalloon(string title, string text)
+ ///
+ /// Shows a balloon (a Windows notification on Windows 10/11) with the program icon, or the error icon when
+ /// . must not be empty: an empty text removes the balloon.
+ ///
+ public void ShowBalloon(string title, string text, bool isError = false)
{
var data = NewData(NifInfo);
Copy(title, data.InfoTitle, 64);
Copy(text, data.Info, 256);
- data.InfoFlags = NiifUser;
+ data.InfoFlags = isError ? NiifError : NiifUser;
Notify(NimModify, &data);
}
@@ -108,9 +117,12 @@ public sealed unsafe partial class TrayIcon : IDisposable
{
switch ((int)(lParam.ToInt64() & 0xFFFF))
{
- case WmLButtonUp or WmLButtonDblClk or NinBalloonUserClick:
+ case WmLButtonUp or WmLButtonDblClk:
_show();
break;
+ case NinBalloonUserClick:
+ (_balloonClicked ?? _show)();
+ break;
case WmRButtonUp or WmContextMenu:
ShowMenu();
break;
@@ -172,7 +184,7 @@ public sealed unsafe partial class TrayIcon : IDisposable
destination[length] = '\0';
}
- /// The generated titano-uploader icon embedded in the executable; the stock icon if it cannot be read.
+ /// The program's generated icon embedded in its executable; the stock icon if it cannot be read.
private static (IntPtr Icon, bool Owned) LoadProgramIcon()
{
if (Environment.ProcessPath is { } exe)
diff --git a/src/Titano.Ui/Visuals/PreviewViewport.cs b/src/Titano.Ui/Visuals/PreviewViewport.cs
index 559dce68..474db278 100644
--- a/src/Titano.Ui/Visuals/PreviewViewport.cs
+++ b/src/Titano.Ui/Visuals/PreviewViewport.cs
@@ -42,8 +42,9 @@ public readonly record struct MotionVector(float X, float Y, float Dx, float Dy)
/// polyline) and a crop mask (normalised ; dims or hides what the output loses). Tools go
/// bottom-left (), the shot data pill bottom-right (). Images and
/// overlays are retained visuals under one shared transform, so panning re-renders nothing. Double-click toggles
-/// Fit and 1:1; Ctrl+0 fits, Ctrl+1 shows 1:1. Screen readers see an image (named by AutomationProperties.Name)
-/// whose status is the zoom and whose help text is the shot data, holding the tools.
+/// Fit and 1:1; Ctrl+0 fits, Ctrl+Shift+1 shows 1:1 (Ctrl+1 to Ctrl+6 switch the client's sections). Screen readers
+/// see an image (named by AutomationProperties.Name) whose status is the zoom and whose help text is the shot data,
+/// holding the tools.
///
[TemplatePart(Name = PartSurface, Type = typeof(FrameworkElement))]
[TemplatePart(Name = PartTools, Type = typeof(FrameworkElement))]
@@ -55,7 +56,7 @@ public class PreviewViewport : Control
public const string PartInfo = "PART_Info";
public static readonly RoutedCommand FitCommand = new(nameof(FitCommand), typeof(PreviewViewport), [new KeyGesture(Key.D0, ModifierKeys.Control)]);
- public static readonly RoutedCommand ActualSizeCommand = new(nameof(ActualSizeCommand), typeof(PreviewViewport), [new KeyGesture(Key.D1, ModifierKeys.Control)]);
+ public static readonly RoutedCommand ActualSizeCommand = new(nameof(ActualSizeCommand), typeof(PreviewViewport), [new KeyGesture(Key.D1, ModifierKeys.Control | ModifierKeys.Shift)]);
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
nameof(Source), typeof(ImageSource), typeof(PreviewViewport), new PropertyMetadata(null, OnImagesChanged));
diff --git a/src/Titano.Uploader/App.xaml.cs b/src/Titano.Uploader/App.xaml.cs
index 6ce377f8..7eb3e1c9 100644
--- a/src/Titano.Uploader/App.xaml.cs
+++ b/src/Titano.Uploader/App.xaml.cs
@@ -5,10 +5,10 @@ using System.Windows;
using System.Windows.Threading;
using Titano.Core.Diagnostics;
using Titano.Core.Localization;
+using Titano.Ui.Interop;
using Titano.Ui.Mvvm;
using Titano.Ui.Theming;
using Titano.Uploader.Infrastructure;
-using Titano.Uploader.Interop;
using Titano.Uploader.Server;
using Titano.Uploader.Shell;
using Titano.Uploader.Uploads;
diff --git a/tests/Titano.App.Tests/Infrastructure/StartWithWindowsTests.cs b/tests/Titano.App.Tests/Infrastructure/StartWithWindowsTests.cs
new file mode 100644
index 00000000..7148dc8a
--- /dev/null
+++ b/tests/Titano.App.Tests/Infrastructure/StartWithWindowsTests.cs
@@ -0,0 +1,45 @@
+using Titano.App.Infrastructure;
+using Titano.Core.IO;
+using Titano.Testing;
+
+namespace Titano.App.Tests.Infrastructure;
+
+/// Settings › General › Startup: one sign-in entry shared by every copy of Titano, which no copy takes over by starting.
+public sealed class StartWithWindowsTests
+{
+ private const string Installed = @"C:\Users\ada\AppData\Local\Programs\Titano\Titano.exe";
+
+ [Test]
+ public void AStartFollowsOnlyAnEntryAnUpdateLeftBehindInItsOwnFolder()
+ {
+ static bool Gone(string path) => false;
+ static bool Present(string path) => true;
+ var installed = StartupCommand.Format(Installed, RunKeyStartWithWindows.MinimizedOption);
+
+ // The entry already starts this copy: nothing to write.
+ Assert.False(RunKeyStartWithWindows.Follows(installed, Installed, Gone));
+ // An update renamed the program in its folder: the entry follows it.
+ Assert.True(RunKeyStartWithWindows.Follows(StartupCommand.Format(@"C:\Users\ada\AppData\Local\Programs\Titano\Titano.old.exe", "--minimized"),
+ Installed, Gone));
+ // The installed copy is still there: a portable copy, a second install or a development build that starts leaves it alone.
+ Assert.False(RunKeyStartWithWindows.Follows(installed, @"E:\Titano\Titano.exe", Present));
+ Assert.False(RunKeyStartWithWindows.Follows(installed, @"C:\src\Titano\bin\Debug\Titano.exe", Present));
+ // Gone from another folder (a USB stick that is not plugged in): still not this copy's entry.
+ Assert.False(RunKeyStartWithWindows.Follows(installed, @"E:\Titano\Titano.exe", Gone));
+ // No entry, or no executable path: nothing to follow.
+ Assert.False(RunKeyStartWithWindows.Follows(null, Installed, Gone));
+ Assert.False(RunKeyStartWithWindows.Follows(installed, null, Gone));
+ }
+
+ [Test]
+ public void ScreenshotsAndPortableCopiesKeepTheChoiceInMemory()
+ {
+ var startup = new MemoryStartWithWindows();
+ Assert.False(startup.IsEnabled);
+ startup.SetEnabled(true);
+ startup.Refresh();
+ Assert.True(startup.IsEnabled);
+ startup.SetEnabled(false);
+ Assert.False(startup.IsEnabled);
+ }
+}
diff --git a/tests/Titano.App.Tests/Jobs/JobNoticesTests.cs b/tests/Titano.App.Tests/Jobs/JobNoticesTests.cs
new file mode 100644
index 00000000..797ebb88
--- /dev/null
+++ b/tests/Titano.App.Tests/Jobs/JobNoticesTests.cs
@@ -0,0 +1,152 @@
+using Titano.App.Jobs;
+using Titano.Core.Model;
+using Titano.Testing;
+
+namespace Titano.App.Tests.Jobs;
+
+/// UI-08: which job endings raise the shell's toast, whichever screen started the job, and how a batch speaks once.
+public sealed class JobNoticesTests
+{
+ [Theory]
+ [Case(JobKind.Render)]
+ [Case(JobKind.DeepAnalyse)]
+ [Case(JobKind.Verify)]
+ [Case(JobKind.Rebuild)]
+ [Case(JobKind.Maintenance)]
+ [Case(JobKind.UploadCommit)]
+ [Case(JobKind.Move)]
+ [Case(JobKind.Adopt)]
+ public void ALongOperationThatEndsSaysSo(JobKind kind)
+ {
+ Assert.Equal(JobNotice.Done, JobNotices.For(JobState.Running, Job(kind, JobState.Done)));
+ Assert.Equal(JobNotice.Failed, JobNotices.For(JobState.Running, Job(kind, JobState.Failed)));
+ // Queued and finished between two flushes of the Jobs screen: still one notice.
+ Assert.Equal(JobNotice.Done, JobNotices.For(JobState.Queued, Job(kind, JobState.Done)));
+ Assert.Equal(JobNotice.Done, JobNotices.For(null, Job(kind, JobState.Done)));
+ }
+
+ [Theory]
+ [Case(JobKind.Scan)]
+ [Case(JobKind.LightAnalyse)]
+ [Case(JobKind.Thumbs)]
+ [Case(JobKind.Proxies)]
+ public void UpkeepAndScansEndSilently(JobKind kind)
+ {
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Done)));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Failed)));
+ }
+
+ [Theory]
+ [Case(JobKind.Import)]
+ [Case(JobKind.Download)]
+ [Case(JobKind.Duplicates)]
+ [Case(JobKind.Orphans)]
+ public void EveryOtherFailureIsSaid(JobKind kind)
+ {
+ // An import announces its result on the Import screen, a download on its Library card and Server row.
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(kind, JobState.Done)));
+ Assert.Equal(JobNotice.Failed, JobNotices.For(JobState.Running, Job(kind, JobState.Failed)));
+ }
+
+ [Test]
+ public void BackgroundPriorityCancelledAndRepeatedEndingsSayNothing()
+ {
+ // The deep analysis queued after an import, and the proxies sync fetches, run in the background.
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(JobKind.DeepAnalyse, JobState.Done, JobPriority.Background)));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(JobKind.Download, JobState.Failed, JobPriority.Background)));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Running, Job(JobKind.Render, JobState.Cancelled)));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Done, Job(JobKind.Render, JobState.Done)));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Failed, Job(JobKind.Render, JobState.Failed)));
+ Assert.Equal(JobNotice.None, JobNotices.For(JobState.Queued, Job(JobKind.Render, JobState.Running)));
+ // "Add to queue" renders have Normal priority: they are announced too.
+ Assert.Equal(JobNotice.Done, JobNotices.For(JobState.Running, Job(JobKind.Render, JobState.Done, JobPriority.Normal)));
+ }
+
+ [Test]
+ public void ABatchOfOneKindSpeaksOnceWhenItsLastJobEnds()
+ {
+ // Server › Upload all: 100 uploads queued; each one that ends waits for the rest.
+ var endings = new JobEndings();
+ var model = new JobListModel();
+ var uploads = Enumerable.Range(0, 100).Select(_ => Job(JobKind.UploadCommit, JobState.Queued)).ToList();
+ foreach (var upload in uploads) model.Apply(upload);
+ for (var i = 0; i < 99; i++)
+ {
+ var done = uploads[i] with { State = JobState.Done };
+ model.Apply(done);
+ endings.Add(JobNotices.For(JobState.Running, done), done);
+ Assert.Empty(endings.Take(model.IsBusy));
+ }
+ Assert.Equal(99, endings.Waiting);
+
+ // A render of the same flush is its own kind: it is said at once.
+ var render = Job(JobKind.Render, JobState.Done);
+ model.Apply(render);
+ endings.Add(JobNotice.Done, render);
+ var due = endings.Take(model.IsBusy);
+ Assert.Count(1, due);
+ Assert.Equal(JobNotice.Done, due[0].Notice);
+ Assert.SequenceEqual([render.Id], due[0].Jobs.Select(j => j.Id));
+
+ var last = uploads[99] with { State = JobState.Done };
+ model.Apply(last);
+ endings.Add(JobNotice.Done, last);
+ due = endings.Take(model.IsBusy);
+ Assert.Count(1, due);
+ Assert.SequenceEqual(uploads.Select(u => u.Id), due[0].Jobs.Select(j => j.Id));
+ Assert.Equal(0, endings.Waiting);
+ Assert.Empty(endings.Take(model.IsBusy));
+ }
+
+ [Test]
+ public void PausedAndBackgroundJobsDoNotHoldABatch()
+ {
+ var endings = new JobEndings();
+ var model = new JobListModel();
+ // An upload paused on a metered network, and the proxies sync fetches in the background, wait for something else.
+ model.Apply(Job(JobKind.UploadCommit, JobState.Paused));
+ model.Apply(Job(JobKind.Download, JobState.Running, JobPriority.Background));
+ var upload = Job(JobKind.UploadCommit, JobState.Done);
+ model.Apply(upload);
+ endings.Add(JobNotice.Done, upload);
+ Assert.Count(1, endings.Take(model.IsBusy));
+ Assert.False(model.IsBusy(JobKind.UploadCommit));
+ Assert.False(model.IsBusy(JobKind.Download));
+ }
+
+ [Test]
+ public void FailuresAreSaidAtTheEndOfTheirFlushTogether()
+ {
+ var endings = new JobEndings();
+ var model = new JobListModel();
+ // More uploads still run: failures do not wait for them.
+ model.Apply(Job(JobKind.UploadCommit, JobState.Running));
+ var first = Job(JobKind.UploadCommit, JobState.Failed);
+ var second = Job(JobKind.Verify, JobState.Failed);
+ endings.Add(JobNotice.Failed, first);
+ endings.Add(JobNotice.Failed, second);
+ endings.Add(JobNotice.None, Job(JobKind.Scan, JobState.Done));
+ var due = endings.Take(model.IsBusy);
+ Assert.Count(1, due);
+ Assert.Equal(JobNotice.Failed, due[0].Notice);
+ Assert.SequenceEqual([first.Id, second.Id], due[0].Jobs.Select(j => j.Id));
+
+ // The next flush starts again.
+ var third = Job(JobKind.UploadCommit, JobState.Failed);
+ endings.Add(JobNotice.Failed, third);
+ due = endings.Take(model.IsBusy);
+ Assert.Count(1, due);
+ Assert.SequenceEqual([third.Id], due[0].Jobs.Select(j => j.Id));
+ Assert.Empty(endings.Take(model.IsBusy));
+ }
+
+ private static Job Job(JobKind kind, JobState state, JobPriority priority = JobPriority.User) => new()
+ {
+ Id = Guid.CreateVersion7(),
+ Kind = kind,
+ State = state,
+ Priority = priority,
+ TargetLabel = "Harbour sunset",
+ Created = DateTimeOffset.UtcNow,
+ };
+}
diff --git a/tests/Titano.App.Tests/Server/ServerSessionSignInTests.cs b/tests/Titano.App.Tests/Server/ServerSessionSignInTests.cs
new file mode 100644
index 00000000..ad3c4fe1
--- /dev/null
+++ b/tests/Titano.App.Tests/Server/ServerSessionSignInTests.cs
@@ -0,0 +1,154 @@
+using System.Net;
+using Titano.App.Infrastructure;
+using Titano.App.Server;
+using Titano.Protocol;
+using Titano.Protocol.Client;
+using Titano.Testing;
+
+namespace Titano.App.Tests.Server;
+
+/// The login form cancelled while the server is still answering (DESK-8): nothing signs this PC in afterwards.
+public sealed class ServerSessionSignInTests
+{
+ [Test]
+ public async Task CancelEndsTheSignInStillWaitingForTheServer()
+ {
+ var server = new GatedServer { HonoursCancellation = true };
+ var settings = new AppSettings();
+ using var session = new ServerSession(settings, () => { }, server, new PlainProtector());
+ Task? pending = null;
+ var dialogs = new Dialogs((_, _, signIn) =>
+ {
+ pending = signIn("alberto", "secret");
+ return false;
+ });
+
+ Assert.False(await session.ConnectAsync("nas.local:8443", dialogs));
+ // The request the form left behind was cancelled, and the session dropped the connection it belonged to.
+ await Assert.ThrowsAsync(() => pending!);
+ Assert.False(session.IsConnected);
+ Assert.Equal(ConnectStep.Idle, session.Flow.Step);
+ Assert.Null(settings.ProtectedToken);
+ }
+
+ [Test]
+ public async Task AnAnswerArrivingAfterCancelSignsNothingIn()
+ {
+ var server = new GatedServer { HonoursCancellation = false };
+ var settings = new AppSettings();
+ using var session = new ServerSession(settings, () => { }, server, new PlainProtector());
+ Task? pending = null;
+ var dialogs = new Dialogs((_, _, signIn) =>
+ {
+ pending = signIn("alberto", "secret");
+ return false;
+ });
+
+ Assert.False(await session.ConnectAsync("nas.local:8443", dialogs));
+ // The server accepts the password only now: the answer belongs to a connection that is gone.
+ server.Answer();
+ Assert.NotNull(await pending!);
+ Assert.False(session.IsConnected);
+ Assert.Equal(ConnectStep.Idle, session.Flow.Step);
+ Assert.Null(session.Flow.Token);
+ Assert.Null(settings.ProtectedToken);
+ Assert.Null(settings.ServerUrl);
+ }
+
+ [Test]
+ public async Task SignedInJustBeforeTheCancelSignsOutAgain()
+ {
+ var server = new GatedServer { HonoursCancellation = false };
+ server.Answer();
+ var settings = new AppSettings();
+ using var session = new ServerSession(settings, () => { }, server, new PlainProtector());
+ var dialogs = new Dialogs((_, _, signIn) =>
+ {
+ // The server's answer was handled first, then the click on Cancel closed the form.
+ Assert.Null(signIn("alberto", "secret").GetAwaiter().GetResult());
+ return false;
+ });
+
+ Assert.False(await session.ConnectAsync("nas.local:8443", dialogs));
+ Assert.False(session.IsConnected);
+ Assert.Equal(1, server.Logouts);
+ Assert.Null(settings.ProtectedToken);
+ }
+
+ [Test]
+ public async Task ASignInTheFormConfirmsIsRemembered()
+ {
+ var server = new GatedServer { HonoursCancellation = true };
+ server.Answer();
+ var settings = new AppSettings();
+ using var session = new ServerSession(settings, () => { }, server, new PlainProtector());
+ var dialogs = new Dialogs((_, _, signIn) => signIn("alberto", "secret").GetAwaiter().GetResult() is null);
+
+ Assert.True(await session.ConnectAsync("nas.local:8443", dialogs));
+ Assert.True(session.IsConnected);
+ Assert.Equal("token-1", settings.ProtectedToken);
+ Assert.Equal(0, server.Logouts);
+ }
+
+ private sealed class Dialogs(Func>, bool> signIn) : IAppDialogs
+ {
+ public string? PickFolder(string title, string? initialFolder = null) => null;
+ public string? PickJsonFile(string title) => null;
+ public bool Confirm(ConfirmRequest request) => true;
+ public bool SignIn(string server, string? username, Func> callback) => signIn(server, username, callback);
+ }
+
+ private sealed class PlainProtector : ITokenProtector
+ {
+ public string Protect(string token) => token;
+ public string? Unprotect(string protectedToken) => protectedToken;
+ }
+
+ /// A server whose login answers only when the test says so.
+ private sealed class GatedServer : IServerApiFactory
+ {
+ private readonly TaskCompletionSource _answer = new();
+
+ /// The request ends when its token is cancelled (as over HTTP); otherwise the answer is already on its way.
+ public bool HonoursCancellation { get; init; }
+
+ public int Logins { get; private set; }
+ public int Logouts { get; private set; }
+
+ public void Answer() => _answer.TrySetResult();
+
+ public IServerApi Create(Uri baseAddress, IReadOnlyCollection trustedFingerprints) => new Client(this, baseAddress);
+
+ private sealed class Client(GatedServer server, Uri baseAddress) : IServerApi
+ {
+ public Uri BaseAddress { get; } = baseAddress;
+ public string? Token { get; set; }
+
+ public Task GetInfoAsync(CancellationToken ct) =>
+ Task.FromResult(new ServerInfo("Studio NAS", "1.3.0", 1, [], null, [], new ServerLimits(0, 0)));
+
+ public async Task LoginAsync(string username, string password, CancellationToken ct)
+ {
+ server.Logins++;
+ await (server.HonoursCancellation ? server._answer.Task.WaitAsync(ct) : server._answer.Task);
+ if (password != "secret") throw new TitanoApiException(HttpStatusCode.Unauthorized, new ApiError("bad_credentials", "Wrong"));
+ return new LoginResponse("token-" + server.Logins, User(username), false, DateTimeOffset.UtcNow.AddDays(1));
+ }
+
+ public Task MeAsync(CancellationToken ct) => Task.FromResult(User("alberto"));
+
+ public Task LogoutAsync(CancellationToken ct)
+ {
+ server.Logouts++;
+ return Task.CompletedTask;
+ }
+
+ public void Dispose()
+ {
+ }
+
+ private static UserDto User(string name) =>
+ new(Guid.Empty, name, null, "editor", 0, 5_000_000_000_000, 0, false, false, DateTimeOffset.UtcNow, null);
+ }
+ }
+}
diff --git a/tests/Titano.App.Tests/Server/SyncHostTests.cs b/tests/Titano.App.Tests/Server/SyncHostTests.cs
new file mode 100644
index 00000000..bcaca983
--- /dev/null
+++ b/tests/Titano.App.Tests/Server/SyncHostTests.cs
@@ -0,0 +1,61 @@
+using System.Diagnostics;
+using Titano.App.DesignTime;
+using Titano.App.Infrastructure;
+using Titano.App.Tests.Uploader;
+using Titano.Testing;
+
+namespace Titano.App.Tests.Server;
+
+public sealed class SyncHostTests
+{
+ /// Dialogs that answer like a user who cancels everything.
+ private sealed class NoDialogs : IAppDialogs
+ {
+ public string? PickFolder(string title, string? initialFolder = null) => null;
+ public string? PickJsonFile(string title) => null;
+ public bool Confirm(ConfirmRequest request) => false;
+ public bool SignIn(string server, string? username, Func> signIn) => false;
+ }
+
+ ///
+ /// DESK-1: a signed-in user whose archive is not polled (no archive, or offline at start) exits. Nothing before the
+ /// sync agent's stop leaves the UI thread, and the agent stops asynchronously: its continuation must not need the UI
+ /// thread that App.OnExit blocks, or the exit waits 10 s and never closes the engine and the index.
+ ///
+ [Test]
+ [WindowsOnly]
+ public void ExitWithASignedInSessionAndNoPollingDoesNotWaitForTheUiThread()
+ {
+ var environment = AppEnvironment.ForCapture();
+ try
+ {
+ SingleThreadedContext.Run(async () =>
+ {
+ var services = new AppServices(environment, new AppSettings { Language = "en" }, () => { }, new NoDialogs());
+ var sample = SampleData.Configure(services);
+ // An index without the archive poller (OpenAsync never ran) and a saved session, as for a server-only user.
+ await sample.OpenEmptyAsync();
+ await sample.FillAsync();
+ services.Settings.RenderNodeOptIn = false;
+ await services.Server.RestoreAsync();
+ Assert.True(services.Server.IsConnected, "session restored");
+ var until = DateTime.UtcNow + TimeSpan.FromSeconds(10);
+ while (services.Sync.Agent is null)
+ {
+ Assert.True(DateTime.UtcNow < until, "sync agent not started");
+ await Task.Delay(20);
+ }
+
+ // App.OnExit blocks the UI thread until the services stop.
+ var clock = Stopwatch.StartNew();
+ Assert.True(services.DisposeAsync().AsTask().Wait(TimeSpan.FromSeconds(10)), "services stopped");
+ Assert.Less(clock.Elapsed.TotalSeconds, 5, "the exit waited for the UI thread");
+ Assert.Null(services.Sync.Agent);
+ });
+ }
+ finally
+ {
+ environment.DeleteCaptureData();
+ }
+ }
+}
diff --git a/tests/Titano.App.Tests/Windows/ShellLifetimeTests.cs b/tests/Titano.App.Tests/Windows/ShellLifetimeTests.cs
new file mode 100644
index 00000000..925b1b81
--- /dev/null
+++ b/tests/Titano.App.Tests/Windows/ShellLifetimeTests.cs
@@ -0,0 +1,53 @@
+using Titano.App.DesignTime;
+using Titano.App.Infrastructure;
+using Titano.App.Shell;
+using Titano.Testing;
+using Titano.Ui.Theming;
+
+namespace Titano.App.Tests.Windows;
+
+/// What the shell stops when the app exits (App.OnExit disposes it before the services).
+[WindowsOnly]
+[Serial]
+[Timeout(120_000)]
+public sealed class ShellLifetimeTests
+{
+ private sealed class NoDialogs : IAppDialogs
+ {
+ public string? PickFolder(string title, string? initialFolder = null) => null;
+ public string? PickJsonFile(string title) => null;
+ public bool Confirm(ConfirmRequest request) => false;
+ public bool SignIn(string server, string? username, Func> signIn) => false;
+ }
+
+ /// DESK-7: the open editor goes with the shell, before the engine and the index under it.
+ [Test]
+ public Task DisposingTheShellClosesTheOpenEditor() => ScreenHost.RunAsync(async () =>
+ {
+ var environment = AppEnvironment.ForCapture();
+ UiLanguage.Apply("en");
+ ThemeManager.Apply(AppTheme.Dark);
+ var services = new AppServices(environment, new AppSettings { Language = "en", FirstRunCompleted = true }, () => { }, new NoDialogs());
+ try
+ {
+ var sample = SampleData.Configure(services);
+ var shell = new ShellViewModel(services);
+ await sample.OpenEmptyAsync();
+ await shell.StartAsync();
+ var id = await sample.FillEditorAsync();
+ shell.OpenSequence(id);
+ await shell.Sequence.OpenAsync(id);
+ var editor = Assert.NotNull(shell.Sequence.Editor);
+ editor.PlayCommand.Execute(null);
+ Assert.True(editor.IsPlaying, "the editor plays");
+
+ shell.Dispose();
+ Assert.False(editor.IsPlaying, "the editor's player stopped with the shell");
+ }
+ finally
+ {
+ await services.DisposeAsync();
+ environment.DeleteCaptureData();
+ }
+ });
+}
diff --git a/tests/Titano.App.Tests/Windows/ShellNotificationTests.cs b/tests/Titano.App.Tests/Windows/ShellNotificationTests.cs
new file mode 100644
index 00000000..11b19f09
--- /dev/null
+++ b/tests/Titano.App.Tests/Windows/ShellNotificationTests.cs
@@ -0,0 +1,408 @@
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Shell;
+using Titano.App.Infrastructure;
+using Titano.App.Sections;
+using Titano.App.Settings;
+using Titano.App.Shell;
+using Titano.Core.Localization;
+using Titano.Core.Model;
+using Titano.Data.Repositories;
+using Titano.Testing;
+using Titano.Ui.Controls;
+using Titano.Ui.Mvvm;
+using Titano.Ui.Visuals;
+
+namespace Titano.App.Tests.Windows;
+
+///
+/// The shell's ways of telling what happens outside the screen in front: the taskbar button (UI-05), Windows
+/// notifications (UI-06), section shortcuts (UI-07), job toasts (UI-08), rail badges (UI-10), and the General settings
+/// that drive them; the usage counts consent stays hidden in builds without monetization (RF-3).
+///
+[WindowsOnly]
+[Serial]
+[Timeout(300_000)]
+public sealed class ShellNotificationTests
+{
+ [Test]
+ public Task TheTaskbarButtonMirrorsTheJobBar() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ var shell = app.Shell;
+ await JobsLoadedAsync(shell);
+ var taskbar = Assert.NotNull(app.Window.TaskbarItemInfo);
+
+ shell.SetJob("Render · Harbour sunset", 0.25, name: "Render: Harbour sunset");
+ Assert.Equal(TaskbarItemProgressState.Normal, taskbar.ProgressState);
+ Assert.Approximately(0.25, taskbar.ProgressValue, 1e-9);
+
+ shell.SetJob("Scan · Archive", 0, indeterminate: true);
+ Assert.Equal(TaskbarItemProgressState.Indeterminate, taskbar.ProgressState);
+
+ shell.SetJob(null, 0);
+ Assert.Equal(TaskbarItemProgressState.None, taskbar.ProgressState);
+
+ // A failure nobody has seen on the Jobs screen turns the idle button red.
+ shell.SetUnseenFailures(1);
+ Assert.Equal(TaskbarItemProgressState.Error, taskbar.ProgressState);
+ Assert.Approximately(1, taskbar.ProgressValue, 1e-9);
+ shell.SetJob("Render · Harbour sunset", 0.5);
+ Assert.Equal(TaskbarItemProgressState.Normal, taskbar.ProgressState, "a running job comes first");
+ shell.SetUnseenFailures(0);
+ shell.SetJob(null, 0);
+ Assert.Equal(TaskbarItemProgressState.None, taskbar.ProgressState);
+ });
+
+ [Test]
+ public Task TheRailShortcutsOfTheTooltipsNavigate() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync(firstRun: true);
+ var shell = app.Shell;
+ var bindings = app.Window.InputBindings.OfType().ToList();
+ var expected = new (Key Key, SectionKey Section)[]
+ {
+ (Key.D1, SectionKey.Library), (Key.D2, SectionKey.Import), (Key.D3, SectionKey.Sequence), (Key.D4, SectionKey.Archive),
+ (Key.D5, SectionKey.Jobs), (Key.D6, SectionKey.Server), (Key.OemComma, SectionKey.Settings),
+ };
+
+ // The first-run dialog keeps the shell behind it: no shortcut moves it.
+ var library = bindings.Single(b => b.Key == Key.D1 && b.Modifiers == ModifierKeys.Control);
+ Assert.False(library.Command.CanExecute(library.CommandParameter), "no navigation behind the first-run dialog");
+ shell.CompleteWelcome();
+
+ foreach (var (key, section) in expected)
+ {
+ var binding = bindings.Single(b => b.Key == key && b.Modifiers == ModifierKeys.Control);
+ Assert.True(binding.Command.CanExecute(binding.CommandParameter), $"Ctrl+{key}");
+ binding.Command.Execute(binding.CommandParameter);
+ Assert.Equal(section, shell.Current.Key, $"Ctrl+{key}");
+ // The rail tooltip lists the shortcut it answers to.
+ var shortcut = key == Key.OemComma ? "Ctrl+," : "Ctrl+" + (char)('1' + (key - Key.D1));
+ Assert.True(shell.Current.ToolTip.EndsWith(shortcut, StringComparison.Ordinal), $"{section} tooltip ends with {shortcut}");
+ }
+
+ // The editor's 1:1 view no longer takes Ctrl+1 from the Library.
+ var gestures = PreviewViewport.ActualSizeCommand.InputGestures.OfType().ToList();
+ Assert.True(gestures.All(g => g is not { Key: Key.D1, Modifiers: ModifierKeys.Control }), "the preview keeps away from Ctrl+1");
+ Assert.Contains(gestures, g => g is { Key: Key.D1, Modifiers: ModifierKeys.Control | ModifierKeys.Shift });
+ Assert.Contains("Ctrl+Shift+1", Loc.L("Tooltips.Editor.Preview.OneToOne"));
+ });
+
+ [Test]
+ public Task JobsThatEndRaiseOneToastAndFailuresCountUntilSeen() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ var shell = app.Shell;
+ shell.CompleteWelcome();
+ await JobsLoadedAsync(shell);
+ var jobs = shell.Jobs;
+ var raised = new List();
+ shell.PendingToasts.CollectionChanged += (_, e) => raised.AddRange(e.NewItems?.Cast() ?? []);
+ var badge = jobs.Badge;
+
+ // A deep analysis started from the Library ends: one toast whose action opens what it worked on.
+ var analysis = Job(JobKind.DeepAnalyse, JobState.Running, Guid.CreateVersion7());
+ jobs.OnJobChanged(analysis);
+ jobs.Flush();
+ jobs.OnJobChanged(analysis with { State = JobState.Done });
+ jobs.Flush();
+ var done = raised.Single(t => t.Title == Loc.L("Shell.Job.Done"));
+ Assert.Equal(Loc.L("Jobs.Action.Open"), done.ActionText);
+ Assert.False(done.IsError);
+ Assert.True(done.RunsFromNotification, "a click on the Windows notification opens what the job worked on");
+ // The same ending reported again says nothing more.
+ jobs.OnJobChanged(analysis with { State = JobState.Done });
+ jobs.Flush();
+ Assert.Equal(1, raised.Count(t => t.Title == Loc.L("Shell.Job.Done")));
+
+ // A failed verify: an error toast with Retry, a badge on the rail and a red taskbar button until Jobs is opened.
+ var verify = Job(JobKind.Verify, JobState.Running, Guid.CreateVersion7());
+ jobs.OnJobChanged(verify);
+ jobs.Flush();
+ jobs.OnJobChanged(verify with { State = JobState.Failed, Error = "Disk read error" });
+ jobs.Flush();
+ var failed = raised.Single(t => t.Title == Loc.L("Shell.Job.Failed"));
+ Assert.True(failed.IsError);
+ Assert.Equal(Loc.L("Jobs.Action.Retry"), failed.ActionText);
+ Assert.False(failed.RunsFromNotification, "a click on the Windows notification does not retry before the user sees why");
+ Assert.Equal(badge + 1, jobs.Badge);
+ Assert.Equal(TaskbarItemProgressState.Error, shell.TaskbarState);
+ shell.Navigate(SectionKey.Jobs);
+ Assert.Equal(badge, jobs.Badge);
+ Assert.NotEqual(TaskbarItemProgressState.Error, shell.TaskbarState);
+
+ // The editor announces the renders of its own sequence, with their output: the shell says nothing then.
+ var id = await app.Sample.FillEditorAsync();
+ shell.OpenSequence(id);
+ await shell.Sequence.OpenAsync(id);
+ Assert.NotNull(shell.Sequence.Editor);
+ raised.Clear();
+ var render = Job(JobKind.Render, JobState.Running, id);
+ jobs.OnJobChanged(render);
+ jobs.Flush();
+ jobs.OnJobChanged(render with { State = JobState.Done });
+ jobs.Flush();
+ Assert.False(raised.Any(t => t.Title == Loc.L("Shell.Job.Done")), "the editor's own render toast is not doubled");
+ // A render of another sequence is the shell's to announce.
+ var other = Job(JobKind.Render, JobState.Running, Guid.CreateVersion7());
+ jobs.OnJobChanged(other);
+ jobs.Flush();
+ jobs.OnJobChanged(other with { State = JobState.Done });
+ jobs.Flush();
+ Assert.Equal(1, raised.Count(t => t.Title == Loc.L("Shell.Job.Done")));
+ await shell.Sequence.CloseAsync();
+
+ // Server › Upload all: the batch speaks once, when its last upload ends.
+ raised.Clear();
+ var uploads = Enumerable.Range(0, 3).Select(_ => Job(JobKind.UploadCommit, JobState.Queued, Guid.CreateVersion7())).ToList();
+ foreach (var upload in uploads) jobs.OnJobChanged(upload);
+ jobs.Flush();
+ foreach (var upload in uploads)
+ {
+ Assert.Empty(raised);
+ jobs.OnJobChanged(upload with { State = JobState.Done });
+ jobs.Flush();
+ }
+ var batch = raised.Single();
+ Assert.Equal(Loc.Plural("Shell.Job.DonePlural", 3), batch.Title);
+ Assert.Equal(Loc.L("Jobs.Kind.UploadCommit"), batch.Message);
+ Assert.Equal(Loc.L("Shell.Nav.Jobs"), batch.ActionText);
+ shell.Navigate(SectionKey.Library);
+ batch.ActionCommand!.Execute(null);
+ Assert.Equal(SectionKey.Jobs, shell.Current.Key);
+
+ // Two failures of one update: one error toast that leads to the Jobs screen.
+ raised.Clear();
+ var broken = new[] { Job(JobKind.Move, JobState.Running, Guid.CreateVersion7()), Job(JobKind.Adopt, JobState.Running, Guid.CreateVersion7()) };
+ foreach (var job in broken) jobs.OnJobChanged(job);
+ jobs.Flush();
+ foreach (var job in broken) jobs.OnJobChanged(job with { State = JobState.Failed });
+ jobs.Flush();
+ var failures = raised.Single();
+ Assert.True(failures.IsError);
+ Assert.Equal(Loc.Plural("Shell.Job.FailedPlural", 2), failures.Title);
+ Assert.Null(failures.Message);
+ });
+
+ [Test]
+ public Task ToastsBecomeWindowsNotificationsOnlyWhileNobodySeesTheWindow() => ScreenHost.RunAsync(async () =>
+ {
+ Assert.True(OsNotifications.IsUnseen(WindowState.Minimized, isVisible: true, anyWindowActive: true));
+ Assert.True(OsNotifications.IsUnseen(WindowState.Normal, isVisible: true, anyWindowActive: false));
+ Assert.True(OsNotifications.IsUnseen(WindowState.Maximized, isVisible: false, anyWindowActive: true));
+ Assert.False(OsNotifications.IsUnseen(WindowState.Maximized, isVisible: true, anyWindowActive: true));
+
+ // The card prompt of BRIEF §12.4 reads "Card X detected", then its action, which a click runs.
+ var card = new Toast { Title = "EOS R5 card A inserted", Message = "SD 128 GB", ActionText = "Import", RunsFromNotification = true };
+ Assert.Equal("SD 128 GB" + Environment.NewLine + "Import", OsNotifications.BalloonText(card));
+ Assert.Equal("Job finished", OsNotifications.BalloonText(new Toast { Title = "Job finished" }));
+ // An action a click does not run (the auto-import's Cancel) waits in the window.
+ var auto = new Toast { Title = "EOS R5 card A inserted", Message = "Importing into the archive", ActionText = "Cancel" };
+ Assert.Equal("Importing into the archive", OsNotifications.BalloonText(auto));
+
+ Assert.True(MainWindow.StartsMinimized(["Titano.exe", "--minimized"]));
+ Assert.False(MainWindow.StartsMinimized(["Titano.exe"]));
+
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ app.Shell.CompleteWelcome();
+ // Minimised: nobody sees the window.
+ app.Window.WindowState = WindowState.Minimized;
+ var enabled = false;
+ using var notifications = new OsNotifications(app.Window, () => enabled, _ => { });
+ Assert.False(notifications.Show(card), "Settings › General › Notifications is off");
+ Assert.False(notifications.HasTrayIcon);
+ enabled = true;
+ Assert.True(notifications.Show(new Toast { Title = "Job finished", Message = "Render · Harbour sunset", ActionCommand = new RelayCommand(() => { }) }));
+ Assert.True(notifications.HasTrayIcon, "the notification area holds the icon while a notification can be clicked");
+ notifications.Dispose();
+ Assert.False(notifications.HasTrayIcon);
+ app.Window.WindowState = WindowState.Normal;
+ });
+
+ [Test]
+ public Task AClickOnANotificationBringsTheWindowBackAndRunsOnlyWhatItNames() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ app.Shell.CompleteWelcome();
+ var window = app.Window;
+ var imported = 0;
+ var cancelled = 0;
+ var dismissed = new List();
+ Toast Import() => new() { Title = "EOS R5 card A inserted", ActionText = "Import", ActionCommand = new RelayCommand(() => imported++), RunsFromNotification = true };
+
+ // "Card X detected — Import": the click restores the window, opens the card and closes the in-window toast.
+ using (var notifications = new OsNotifications(window, () => true, dismissed.Add))
+ {
+ window.WindowState = WindowState.Minimized;
+ var card = Import();
+ Assert.True(notifications.Show(card));
+ notifications.OnBalloonClicked();
+ await StateAsync(window, WindowState.Normal);
+ Assert.Equal(1, imported);
+ Assert.SequenceEqual([card], dismissed);
+ }
+
+ // The auto-import's toast offers Cancel: the click only brings the window back.
+ using (var notifications = new OsNotifications(window, () => true, dismissed.Add))
+ {
+ window.WindowState = WindowState.Minimized;
+ Assert.True(notifications.Show(new Toast { Title = "EOS R5 card A inserted", ActionText = "Cancel", ActionCommand = new RelayCommand(() => cancelled++) }));
+ notifications.OnBalloonClicked();
+ await StateAsync(window, WindowState.Normal);
+ Assert.Equal(0, cancelled);
+ Assert.Count(1, dismissed);
+ }
+
+ // Two notifications: Windows does not say which one was clicked, so neither action runs.
+ using (var notifications = new OsNotifications(window, () => true, dismissed.Add))
+ {
+ window.WindowState = WindowState.Minimized;
+ Assert.True(notifications.Show(Import()));
+ Assert.True(notifications.Show(Import()));
+ notifications.OnBalloonClicked();
+ await StateAsync(window, WindowState.Normal);
+ Assert.Equal(1, imported);
+ Assert.Count(1, dismissed);
+ }
+ });
+
+ [Test]
+ public Task AWindowStartedMinimisedComesBackAsItWasSaved() => ScreenHost.RunAsync(async () =>
+ {
+ // Closed while still minimised from the start: the saved state stays the one it would have come back to.
+ Assert.True(MainWindow.SavesMaximized(WindowState.Maximized, restoreTo: null));
+ Assert.True(MainWindow.SavesMaximized(WindowState.Minimized, WindowState.Maximized));
+ Assert.False(MainWindow.SavesMaximized(WindowState.Minimized, WindowState.Normal));
+ Assert.False(MainWindow.SavesMaximized(WindowState.Normal, restoreTo: null));
+
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ app.Shell.CompleteWelcome();
+ var window = app.Window;
+ // Started at sign-in with the window saved maximised: it waits on the taskbar.
+ window.WaitMinimized(maximized: true);
+ Assert.Equal(WindowState.Minimized, window.WindowState);
+ // The user opens it from the taskbar: it comes back maximised.
+ window.WindowState = WindowState.Normal;
+ await StateAsync(window, WindowState.Maximized);
+ // Only that first restore: later ones are the user's.
+ window.WindowState = WindowState.Normal;
+ window.WindowState = WindowState.Minimized;
+ window.WindowState = WindowState.Normal;
+ await StateAsync(window, WindowState.Normal);
+ await Task.Delay(100);
+ Assert.Equal(WindowState.Normal, window.WindowState);
+ });
+
+ [Test]
+ public Task GeneralSettingsHoldStartupAndNotificationsButNoConsent() => ScreenHost.RunAsync(async () =>
+ {
+ // Monetization (BRIEF §21) ships disabled: the default build offers no usage counts consent.
+ Assert.False(ProductFeatures.AdsEnabled);
+
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync(firstRun: true);
+ var shell = app.Shell;
+ await app.ExpectAsync("welcome");
+ Assert.False(app.FindAll().Any(c => c.IsVisible && Equals(c.Content, Loc.L("Settings.General.UsageCounts"))), "no consent on the first-run dialog");
+ shell.CompleteWelcome();
+
+ var settings = shell.Settings;
+ var startup = new MemoryStartWithWindows();
+ settings.Startup = startup;
+ shell.Navigate(SectionKey.Settings);
+ settings.Page = SettingsPage.General;
+ await app.ExpectAsync("settings-general");
+ var boxes = app.FindAll().Where(c => c.IsVisible).ToList();
+ Assert.False(boxes.Any(c => Equals(c.Content, Loc.L("Settings.General.UsageCounts"))), "no consent in Settings");
+ var start = boxes.Single(c => Equals(c.Content, Loc.L("Settings.General.StartWithWindows")));
+ Assert.Equal(Loc.L("Tooltips.Settings.StartWithWindows"), start.ToolTip);
+ var notify = boxes.Single(c => Equals(c.Content, Loc.L("Settings.General.OsNotifications")));
+ Assert.Equal(Loc.L("Tooltips.Settings.OsNotifications"), notify.ToolTip);
+ Assert.True(notify.IsChecked == true, "Windows notifications are on by default");
+
+ settings.StartWithWindows = true;
+ Assert.True(startup.IsEnabled);
+ settings.OsNotifications = false;
+ Assert.False(shell.Services.Settings.OsNotifications);
+ settings.ResetSectionCommand.Execute(null);
+ Assert.False(startup.IsEnabled, "Reset section turns Start with Windows off");
+ Assert.True(shell.Services.Settings.OsNotifications, "Reset section turns notifications back on");
+ // Reset section also returned the language to the system's.
+ UiLanguage.Apply("en");
+
+ // The search finds General by its new rows, not by the hidden consent.
+ settings.SearchText = Loc.L("Settings.General.Startup");
+ Assert.Contains(settings.VisiblePages, p => p.Page == SettingsPage.General);
+ settings.SearchText = Loc.L("Settings.General.Usage");
+ Assert.False(settings.VisiblePages.Any(p => p.Page == SettingsPage.General), "the hidden consent does not match");
+ settings.SearchText = string.Empty;
+ });
+
+ [Test]
+ public Task TheServerBadgeCountsConflicts() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ var shell = app.Shell;
+ shell.CompleteWelcome();
+ Assert.Equal(0, shell.Server.Badge);
+ await app.Sample.FillAsync();
+ await shell.Services.Server.RestoreAsync();
+ Assert.NotNull(await shell.Services.Sync.RefreshAsync());
+ await shell.Server.Sync.ReloadAsync();
+ // The sample server holds one sequence whose settings changed on both sides.
+ Assert.Equal(1, shell.Server.Sync.Chips.Single(c => c.Filter == Titano.App.Server.SyncFilter.Conflicts).Count);
+ Assert.Equal(1, shell.Server.Badge);
+ });
+
+ [Test]
+ public Task TheLibraryAndArchiveBadgesCountWarnings() => ScreenHost.RunAsync(async () =>
+ {
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
+ var shell = app.Shell;
+ shell.CompleteWelcome();
+ await app.Sample.FillAsync();
+ var db = Assert.NotNull(shell.Services.Database);
+
+ // Library: the sequences the Warnings filter shows; an analysis that finds warnings adds one.
+ await shell.Library.RefreshAsync();
+ var warned = await db.Sequences.CountAsync(new SequenceQuery { WithStatus = SequenceStatus.HasWarnings });
+ Assert.Equal(warned, shell.Library.Badge);
+ var clean = (await db.Sequences.ListAsync(new SequenceQuery { WithoutStatus = SequenceStatus.HasWarnings, Limit = 1 })).Items[0];
+ await db.Sequences.RecordAnalysisAsync(clean.Id, SequenceStatus.AnalyzedLight | SequenceStatus.HasWarnings, SequenceStatus.None, 2, null);
+ await shell.Library.RefreshAsync();
+ Assert.Equal(warned + 1, shell.Library.Badge);
+
+ // Archive: the index health lines that need attention (the sample has unverified sequences).
+ shell.Navigate(SectionKey.Archive);
+ await shell.Archive.LoadAsync();
+ Assert.Greater(shell.Archive.Badge, 0);
+ Assert.Equal(shell.Archive.Health.Count(h => !h.IsOk), shell.Archive.Badge);
+ });
+
+ /// The Jobs screen read its first page (it would set the job bar and the badge again).
+ private static async Task JobsLoadedAsync(ShellViewModel shell)
+ {
+ for (var i = 0; i < 200 && !shell.Jobs.IsEmpty && !shell.Jobs.HasRows; i++) await Task.Delay(20);
+ Assert.True(shell.Jobs.IsEmpty || shell.Jobs.HasRows, "the job list loaded");
+ }
+
+ /// The window reached (a restore from a notification is a posted system command).
+ private static async Task StateAsync(Window window, WindowState state)
+ {
+ for (var i = 0; i < 250 && window.WindowState != state; i++) await Task.Delay(20);
+ Assert.Equal(state, window.WindowState);
+ }
+
+ private static Job Job(JobKind kind, JobState state, Guid target) => new()
+ {
+ Id = Guid.CreateVersion7(),
+ Kind = kind,
+ State = state,
+ Priority = JobPriority.User,
+ TargetIds = [target],
+ TargetLabel = "Harbour sunset",
+ Created = DateTimeOffset.UtcNow,
+ Started = DateTimeOffset.UtcNow,
+ };
+}
diff --git a/tests/Titano.Core.Tests/Foundation/StartupCommandTests.cs b/tests/Titano.Core.Tests/Foundation/StartupCommandTests.cs
new file mode 100644
index 00000000..6a24ece3
--- /dev/null
+++ b/tests/Titano.Core.Tests/Foundation/StartupCommandTests.cs
@@ -0,0 +1,58 @@
+using Titano.Core.IO;
+using Titano.Testing;
+
+namespace Titano.Core.Tests.Foundation;
+
+/// The sign-in entries of the client and the Uploader: which copy they start, and which folder the uninstaller may clean.
+public sealed class StartupCommandTests
+{
+ private const string Installed = @"C:\Users\ada\AppData\Local\Programs\Titano\Titano.exe";
+
+ [Test]
+ public void TheCommandNamesItsProgram()
+ {
+ var command = StartupCommand.Format(Installed, "--minimized");
+ Assert.Equal("\"" + Installed + "\" --minimized", command);
+ Assert.Equal(Installed, StartupCommand.Executable(command));
+ Assert.Equal(@"C:\Users\ada\AppData\Local\Programs\Titano", StartupCommand.Folder(command));
+ // Written by hand or by an older tool: unquoted, or with spaces around.
+ Assert.Equal(@"D:\Titano\Titano.exe", StartupCommand.Executable(@" D:\Titano\Titano.exe --minimized "));
+ Assert.Equal(@"D:\Titano\Titano.exe", StartupCommand.Executable(@"D:\Titano\Titano.exe"));
+ Assert.Null(StartupCommand.Executable(null));
+ Assert.Null(StartupCommand.Executable(" "));
+ Assert.Null(StartupCommand.Executable("\"unterminated --minimized"));
+ Assert.Null(StartupCommand.Executable("\"\" --minimized"));
+ Assert.Null(StartupCommand.Folder("Titano.exe"));
+ Assert.Equal(@"D:\Titano", StartupCommand.FolderOf(@"D:\Titano\Titano.exe"));
+ }
+
+ [Test]
+ public void AnEntryBelongsToTheCopyItStarts()
+ {
+ var command = StartupCommand.Format(Installed, "--minimized");
+ Assert.True(StartupCommand.Starts(command, Installed));
+ Assert.True(StartupCommand.Starts(command, Installed.ToUpperInvariant()), "Windows paths ignore case");
+ // A portable copy on a USB stick, a second install or a development build is another program.
+ Assert.False(StartupCommand.Starts(command, @"E:\Titano\Titano.exe"));
+ Assert.False(StartupCommand.Starts(command, @"C:\Users\ada\AppData\Local\Programs\Titano\Titano.exe.old"));
+ Assert.False(StartupCommand.Starts(command, null));
+ Assert.False(StartupCommand.Starts(null, Installed));
+ }
+
+ [Test]
+ public void TheUninstallerRemovesOnlyTheEntriesOfItsFolder()
+ {
+ var client = StartupCommand.Format(Installed, "--minimized");
+ var uploader = StartupCommand.Format(@"C:\Users\ada\AppData\Local\Programs\Titano\Uploader\Titano.Uploader.exe", "--tray");
+ const string folder = @"C:\Users\ada\AppData\Local\Programs\Titano";
+ Assert.True(StartupCommand.StartsFrom(client, folder));
+ Assert.True(StartupCommand.StartsFrom(client, folder + @"\"));
+ Assert.True(StartupCommand.StartsFrom(uploader, folder.ToLowerInvariant()));
+ // A sibling folder that shares the name's start, another drive, or nothing at all stay.
+ Assert.False(StartupCommand.StartsFrom(StartupCommand.Format(@"C:\Users\ada\AppData\Local\Programs\Titano2\Titano.exe", "--minimized"), folder));
+ Assert.False(StartupCommand.StartsFrom(StartupCommand.Format(@"E:\Titano\Titano.exe", "--minimized"), folder));
+ Assert.False(StartupCommand.StartsFrom(StartupCommand.Format(folder, "--minimized"), folder));
+ Assert.False(StartupCommand.StartsFrom(null, folder));
+ Assert.False(StartupCommand.StartsFrom(client, @"\"));
+ }
+}