mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 00:47:00 +01:00
The launcher (pdfs-prompt) now follows the app's theme: the theme code moved into a shared theme.rs, the prompt's stylesheet lives in resources/prompt.css on the libadwaita palette, the Proton-purple accent pin is gone, and every activation re-reads the Proton theme and open_with settings so changes in the app apply without restarting the launcher. The window is rebuilt in src/hud/: - one list with Recent, Pinned and Best matches sections; a click selects, a double-click or Enter opens, focus stays in the entry - rows show a thumbnail, the name with its matched characters in bold, location, sync badge, size and age - a preview pane with a large thumbnail, type, size, modified date, location and availability, plus Open (Enter), Show in Folder (Ctrl+Enter, via FileManager1) and Copy Path (Ctrl+C / Ctrl+Shift+C) - thumbnails from the freedesktop cache, local decoding (written back to the shared cache) or the daemon, on two worker threads - a history of opened files that fills the Recent section and adds a frecency bonus to search ranking - the mount check before opening a Drive file runs off the main thread with a 2 s timeout, and Escape cancels a slow open - rows can be dragged out as files - the search debounce drops to 80 ms New strings are translated in every catalog.
33 lines
1.0 KiB
Rust
33 lines
1.0 KiB
Rust
use std::env;
|
|
use std::process::Command;
|
|
|
|
fn main() {
|
|
let out_dir = env::var("OUT_DIR").unwrap();
|
|
let status = Command::new("glib-compile-resources")
|
|
.args([
|
|
"--target",
|
|
&format!("{}/pdfs.gresource", out_dir),
|
|
"--sourcedir",
|
|
"resources/icons",
|
|
"--sourcedir",
|
|
"resources",
|
|
"resources/pdfs.gresource.xml",
|
|
])
|
|
.status()
|
|
.expect("Failed to execute glib-compile-resources");
|
|
|
|
if !status.success() {
|
|
panic!(
|
|
"glib-compile-resources failed with exit code: {:?}",
|
|
status.code()
|
|
);
|
|
}
|
|
|
|
println!("cargo:rerun-if-changed=resources/pdfs.gresource.xml");
|
|
println!("cargo:rerun-if-changed=resources/icons");
|
|
println!("cargo:rerun-if-changed=resources/style.css");
|
|
println!("cargo:rerun-if-changed=resources/proton-theme.css");
|
|
println!("cargo:rerun-if-changed=resources/prompt.css");
|
|
println!("cargo:rerun-if-changed=../../packaging/io.narl.proton-drive-linux.svg");
|
|
}
|