Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion desktop/app/cpp/native_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class NativeWindow : public QQuickWindow
Q_OBJECT
QML_ELEMENT


// Show Mica behind transparent areas.
Q_PROPERTY(bool backdrop READ backdrop WRITE setBackdrop NOTIFY backdropChanged)
// Use Windows 11 Desktop Acrylic (DWMSBT_TRANSIENTWINDOW) when backdrop is active (for Liquid Glass theme).
Expand Down
2 changes: 1 addition & 1 deletion desktop/app/src/bridge/photo_backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl qobject::PhotoBackup {
let name = core_host::host().hub.read(|s| s.name_of(&id)).unwrap_or_default();
let folder = photo_backup::summary(id, &name).folder;
if std::fs::create_dir_all(&folder).is_ok()
&& let Err(e) = std::process::Command::new("explorer.exe").arg(&folder).spawn()
&& let Err(e) = crate::win::shell::open_folder(&folder)
{
tracing::warn!(error = %e, "can't open the photo backup folder");
}
Expand Down
5 changes: 5 additions & 0 deletions desktop/app/src/mac/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ pub fn sleep() -> Result<(), String> {
std::process::Command::new("pmset").arg("sleepnow").spawn().map(|_| ()).map_err(|e| e.to_string())
}

/// Opens a directory in Finder.
pub fn open_folder(path: &Path) -> Result<(), String> {
std::process::Command::new("open").arg(path).spawn().map(|_| ()).map_err(|e| e.to_string())
}

/// Launches an application bundle or executable.
pub fn launch_app(path: &Path) -> Result<(), String> {
std::process::Command::new("open").arg(path).spawn().map(|_| ()).map_err(|e| e.to_string())
Expand Down
5 changes: 5 additions & 0 deletions desktop/app/src/win/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ pub fn launch_app(path: &std::path::Path) -> Result<(), String> {
if result.0 as isize > 32 { Ok(()) } else { Err(format!("ShellExecute returned {}", result.0 as isize)) }
}

/// Opens a directory in File Explorer.
pub fn open_folder(path: &std::path::Path) -> Result<(), String> {
std::process::Command::new("explorer.exe").arg(path).spawn().map(|_| ()).map_err(|e| e.to_string())
}

/// Runs a PC-configured shell command (`cmd.exe /C <command>`) without flashing
/// a console window.
pub fn run_command(command: &str) -> Result<(), String> {
Expand Down
Loading