Move the library's routes and status onto its own Slint global

The scan/opening/status/error lines, offline mode and its retry, pinning a
collection offline, the sync and thumbnail-sweep state, and the callbacks
that route the grid to a rescan, a sync, another library, a panorama merge
or an export — the last of what AppWindow still carried under the
library- prefix — move onto the `Library` global started earlier on this
branch. Rust reaches them through window.global::<Library>() rather than
window.set_/get_/on_/invoke_ on the root.

library-visible is the one name that stays: it is computed from
active-page and active-view, the shell's own routing state, which a
global cannot read. AppWindow now declares no other library- property or
callback.
This commit is contained in:
2026-09-20 22:22:55 +02:00
parent 6bf67cefc4
commit 1e472fd251
20 changed files with 542 additions and 433 deletions
+2 -2
View File
@@ -1842,7 +1842,7 @@ fn wire_import_and_merge(
// on the next sync pass, then look for it, exactly as an
// import does.
drain_outbox(&library_for_done);
w.invoke_library_rescan();
w.global::<Library>().invoke_library_rescan();
},
);
}
@@ -1879,7 +1879,7 @@ fn wire_import_and_merge(
// the second is what the grid shows, so this asks for the scan
// that finds them rather than inserting rows itself.
if let Some(w) = weak.upgrade() {
w.invoke_library_rescan();
w.global::<Library>().invoke_library_rescan();
}
},
);