added settings + non blocking ui actions

This commit is contained in:
nvrl committed 2026-06-30 18:38:38 +02:00
1 parent 5e71148fec
commit 56abe3fe14
9 files changed
+1455 -159

No files matched your search

+808 -132
View File
File diff suppressed because it is too large. Load diff
+20
View File
@@ -78,6 +78,20 @@ fn open_folder(mountpoint: &Path) {
}
}
/// Launch (or, since it's `SingleMainWindow`, raise) the settings/management
/// window. The app binary lives next to the tray binary; fall back to the bare
/// name so a PATH install still works.
fn open_manager() {
let exe = std::env::current_exe()
.ok()
.and_then(|p| p.parent().map(|d| d.join("pdfs-app")))
.filter(|p| p.exists())
.unwrap_or_else(|| PathBuf::from("pdfs-app"));
if let Err(e) = Command::new(&exe).spawn() {
tracing::error!("failed to launch {}: {e}", exe.display());
}
}
impl Tray for DriveTray {
fn id(&self) -> String {
"io.narl.proton-drive-linux".into()
@@ -103,6 +117,12 @@ impl Tray for DriveTray {
}
.into(),
MenuItem::Separator,
StandardItem {
label: "Open Manager".into(),
activate: Box::new(|_: &mut Self| open_manager()),
..Default::default()
}
.into(),
];
if self.state.mounted {