From a351c7751ec7c7d82ab855275231f7d5916d2314 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Wed, 13 Nov 2024 17:32:27 +0100 Subject: [PATCH] propertiesView: Add User Comment --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/metadata.rs | 2 +- src/widgets/properties_view.rs | 3 +++ src/widgets/properties_view.ui | 10 ++++++++++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 71deb85..f93e0d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1068,7 +1068,7 @@ dependencies = [ [[package]] name = "gufo" version = "0.2.0" -source = "git+https://github.com/gufo-rs/gufo.git?rev=95b178197ae0556a9c4f7b6e6efab65376222b5d#95b178197ae0556a9c4f7b6e6efab65376222b5d" +source = "git+https://github.com/gufo-rs/gufo.git#ca335180352b161e02f5c8807fcd17bf439721a2" dependencies = [ "chrono", "gufo-common 0.2.0", @@ -1092,7 +1092,7 @@ dependencies = [ [[package]] name = "gufo-common" version = "0.2.0" -source = "git+https://github.com/gufo-rs/gufo.git?rev=95b178197ae0556a9c4f7b6e6efab65376222b5d#95b178197ae0556a9c4f7b6e6efab65376222b5d" +source = "git+https://github.com/gufo-rs/gufo.git#ca335180352b161e02f5c8807fcd17bf439721a2" dependencies = [ "chrono", "paste", @@ -1113,7 +1113,7 @@ dependencies = [ [[package]] name = "gufo-exif" version = "0.2.0" -source = "git+https://github.com/gufo-rs/gufo.git?rev=95b178197ae0556a9c4f7b6e6efab65376222b5d#95b178197ae0556a9c4f7b6e6efab65376222b5d" +source = "git+https://github.com/gufo-rs/gufo.git#ca335180352b161e02f5c8807fcd17bf439721a2" dependencies = [ "chrono", "gufo-common 0.2.0", @@ -1124,7 +1124,7 @@ dependencies = [ [[package]] name = "gufo-xmp" version = "0.2.0" -source = "git+https://github.com/gufo-rs/gufo.git?rev=95b178197ae0556a9c4f7b6e6efab65376222b5d#95b178197ae0556a9c4f7b6e6efab65376222b5d" +source = "git+https://github.com/gufo-rs/gufo.git#ca335180352b161e02f5c8807fcd17bf439721a2" dependencies = [ "chrono", "gufo-common 0.2.0", diff --git a/Cargo.toml b/Cargo.toml index bc3e1bf..5e371e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ gtk = { package = "gtk4", version = "0.9.0", features = [ "v4_14", "xml_validation", ] } -gufo = { version = "0.2.0", git = "https://github.com/gufo-rs/gufo.git", rev = "95b178197ae0556a9c4f7b6e6efab65376222b5d", features = [ +gufo = { version = "0.2.0", git = "https://github.com/gufo-rs/gufo.git", features = [ "chrono", ] } gufo-common = { version = "0.1.0", features = ["serde"] } diff --git a/src/metadata.rs b/src/metadata.rs index 97c522a..87acbcc 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -39,7 +39,7 @@ use crate::util::gettext::*; #[derive(Default, Debug)] pub struct Metadata { mime_type: Option, - exif: gufo::Metadata, + pub exif: gufo::Metadata, file_info: Option, image_info: Option, frame_info: Option, diff --git a/src/widgets/properties_view.rs b/src/widgets/properties_view.rs index e681a09..90a5cc9 100644 --- a/src/widgets/properties_view.rs +++ b/src/widgets/properties_view.rs @@ -72,6 +72,8 @@ mod imp { #[template_child] originally_created: TemplateChild, #[template_child] + user_comment: TemplateChild, + #[template_child] aperture: TemplateChild, #[template_child] exposure: TemplateChild, @@ -225,6 +227,7 @@ mod imp { let has_details = [ Self::update_row(&self.location, metadata.gps_location_place()), Self::update_row(&self.originally_created, metadata.originally_created()), + Self::update_row(&self.user_comment, metadata.exif.user_comment()), Self::update_row(&self.aperture, metadata.f_number()), Self::update_row(&self.exposure, metadata.exposure_time()), Self::update_row(&self.iso, metadata.iso()), diff --git a/src/widgets/properties_view.ui b/src/widgets/properties_view.ui index e593e0d..4bf8887 100644 --- a/src/widgets/properties_view.ui +++ b/src/widgets/properties_view.ui @@ -154,6 +154,16 @@ + + + Comment + True + False + + + Aperture