propertiesView: Use decoder format

Use the format that we actually used when decoding.
The mime type is usually derived from the file extension
which might not always be correct.

Issue #43

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/132>
This commit is contained in:
Sophie Herold 2023-03-09 22:10:08 +01:00 • committed by Marge Bot
parent f8e64d9805
commit a2a9b4134b
6 changed files with 44 additions and 38 deletions

View file

@ -247,7 +247,7 @@ impl LpImageView {
pub fn set_image_from_path(&self, path: &Path) {
// Add image to recently used file. Does not work in Flatpaks:
// <https://github.com/flatpak/xdg-desktop-portal/issues/215>
gtk::RecentManager::default().add_item(&dbg!(gio::File::for_path(path).uri()));
gtk::RecentManager::default().add_item(&gio::File::for_path(path).uri());
if let Err(err) = self.load_path(path) {
log::error!("Failed to load path: {err}");