fileModel: Use GFile with URI as key

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/174>
This commit is contained in:
Sophie Herold 2023-04-12 01:11:59 +02:00 • committed by Marge Bot
parent 3b0c32ecee
commit 032707a210
10 changed files with 164 additions and 188 deletions

View file

@ -72,10 +72,8 @@ mod imp {
fn open(&self, files: &[gio::File], _hint: &str) {
let application = self.obj();
for file in files {
let Some(path) = file.path() else { log::error!("File has no path {}", file.uri()); return; };
let win = LpWindow::new(&*application);
win.set_image_from_path(&path);
win.set_image_from_file(&file);
}
}
}