propertiesView: Add User Comment

This commit is contained in:
Sophie Herold 2024-11-13 17:32:27 +01:00
parent 9156533fea
commit a351c7751e
5 changed files with 19 additions and 6 deletions

8
Cargo.lock generated
View file

@ -1068,7 +1068,7 @@ dependencies = [
[[package]] [[package]]
name = "gufo" name = "gufo"
version = "0.2.0" 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 = [ dependencies = [
"chrono", "chrono",
"gufo-common 0.2.0", "gufo-common 0.2.0",
@ -1092,7 +1092,7 @@ dependencies = [
[[package]] [[package]]
name = "gufo-common" name = "gufo-common"
version = "0.2.0" 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 = [ dependencies = [
"chrono", "chrono",
"paste", "paste",
@ -1113,7 +1113,7 @@ dependencies = [
[[package]] [[package]]
name = "gufo-exif" name = "gufo-exif"
version = "0.2.0" 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 = [ dependencies = [
"chrono", "chrono",
"gufo-common 0.2.0", "gufo-common 0.2.0",
@ -1124,7 +1124,7 @@ dependencies = [
[[package]] [[package]]
name = "gufo-xmp" name = "gufo-xmp"
version = "0.2.0" 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 = [ dependencies = [
"chrono", "chrono",
"gufo-common 0.2.0", "gufo-common 0.2.0",

View file

@ -29,7 +29,7 @@ gtk = { package = "gtk4", version = "0.9.0", features = [
"v4_14", "v4_14",
"xml_validation", "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", "chrono",
] } ] }
gufo-common = { version = "0.1.0", features = ["serde"] } gufo-common = { version = "0.1.0", features = ["serde"] }

View file

@ -39,7 +39,7 @@ use crate::util::gettext::*;
#[derive(Default, Debug)] #[derive(Default, Debug)]
pub struct Metadata { pub struct Metadata {
mime_type: Option<String>, mime_type: Option<String>,
exif: gufo::Metadata, pub exif: gufo::Metadata,
file_info: Option<FileInfo>, file_info: Option<FileInfo>,
image_info: Option<glycin::ImageInfoDetails>, image_info: Option<glycin::ImageInfoDetails>,
frame_info: Option<FrameDetails>, frame_info: Option<FrameDetails>,

View file

@ -72,6 +72,8 @@ mod imp {
#[template_child] #[template_child]
originally_created: TemplateChild<adw::ActionRow>, originally_created: TemplateChild<adw::ActionRow>,
#[template_child] #[template_child]
user_comment: TemplateChild<adw::ActionRow>,
#[template_child]
aperture: TemplateChild<adw::ActionRow>, aperture: TemplateChild<adw::ActionRow>,
#[template_child] #[template_child]
exposure: TemplateChild<adw::ActionRow>, exposure: TemplateChild<adw::ActionRow>,
@ -225,6 +227,7 @@ mod imp {
let has_details = [ let has_details = [
Self::update_row(&self.location, metadata.gps_location_place()), Self::update_row(&self.location, metadata.gps_location_place()),
Self::update_row(&self.originally_created, metadata.originally_created()), 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.aperture, metadata.f_number()),
Self::update_row(&self.exposure, metadata.exposure_time()), Self::update_row(&self.exposure, metadata.exposure_time()),
Self::update_row(&self.iso, metadata.iso()), Self::update_row(&self.iso, metadata.iso()),

View file

@ -154,6 +154,16 @@
</style> </style>
</object> </object>
</child> </child>
<child>
<object class="AdwActionRow" id="user_comment">
<property name="title" translatable="yes">Comment</property>
<property name="subtitle-selectable">True</property>
<property name="use-markup">False</property>
<style>
<class name="property" />
</style>
</object>
</child>
<child> <child>
<object class="AdwActionRow" id="aperture"> <object class="AdwActionRow" id="aperture">
<property name="title" translatable="yes">Aperture</property> <property name="title" translatable="yes">Aperture</property>