1
0
Fork 0
mirror of synced 2024-06-15 00:45:29 +12:00
czkawka/krokiet/src/connect_open.rs
2023-11-12 09:09:15 +01:00

15 lines
396 B
Rust

use crate::{Callabler, MainWindow};
use slint::ComponentHandle;
pub fn connect_open_items(app: &MainWindow) {
app.global::<Callabler>().on_item_opened(move |path| {
match open::that(&*path) {
Ok(()) => {}
Err(e) => {
eprintln!("Failed to open file: {e}");
}
};
// TODO - this should be added to line edit
});
}