Commit f585e1ab authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

reorganized some metadata names

Moved the metadata available for non-images from the
Embedded::Image:: namespace to the general:: namespace.
The comment:: namespace is now private, that is not visible to
the user.
parent b6303aa0
......@@ -316,7 +316,7 @@ for_each_file_func (GFile *file,
{
GObject *metadata;
metadata = g_file_info_get_attribute_object (info, "Embedded::Image::DateTime");
metadata = g_file_info_get_attribute_object (info, "Embedded::Photo::DateTimeOriginal");
if (metadata != NULL) {
if (_g_time_val_from_exif_date (gth_metadata_get_raw (GTH_METADATA (metadata)), &timeval))
key = g_strdup (_g_time_val_strftime (&timeval, KEY_FORMAT));
......@@ -438,7 +438,7 @@ gth_organize_task_exec (GthTask *base)
gtk_list_store_clear (self->priv->results_liststore);
switch (self->priv->group_policy) {
case GTH_GROUP_POLICY_DIGITALIZED_DATE:
attributes = "standard::name,standard::type,time::modified,time::modified-usec,Embedded::Image::DateTime";
attributes = "standard::name,standard::type,time::modified,time::modified-usec,Embedded::Photo::DateTimeOriginal";
break;
case GTH_GROUP_POLICY_MODIFIED_DATE:
attributes = "standard::name,standard::type,time::modified,time::modified-usec";
......
......@@ -68,7 +68,7 @@ gth_edit_comment_page_real_set_file (GthEditMetadataPage *base,
self->priv->file_data = g_object_ref (file_data);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (GET_WIDGET ("note_text")));
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Comment");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
if (metadata != NULL) {
GtkTextIter iter;
......@@ -79,13 +79,13 @@ gth_edit_comment_page_real_set_file (GthEditMetadataPage *base,
else
gtk_text_buffer_set_text (buffer, "", -1);
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Location");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::location");
if (metadata != NULL)
gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("place_entry")), gth_metadata_get_formatted (metadata));
else
gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("place_entry")), "");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::DateTime");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::datetime");
if (metadata != NULL) {
gtk_combo_box_set_active (GTK_COMBO_BOX (self->priv->date_combobox), FOLLOWING_DATE);
gth_time_selector_set_exif_date (GTH_TIME_SELECTOR (self->priv->date_selector), gth_metadata_get_raw (metadata));
......@@ -97,7 +97,7 @@ gth_edit_comment_page_real_set_file (GthEditMetadataPage *base,
/*gtk_widget_set_sensitive (self->priv->date_selector, FALSE);*/
}
tags = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Keywords");
tags = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "general::tags");
if (tags != NULL) {
char *value;
......@@ -138,22 +138,22 @@ gth_edit_comment_page_real_update_info (GthEditMetadataPage *base,
gtk_text_buffer_get_bounds (buffer, &start, &end);
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
metadata = g_object_new (GTH_TYPE_METADATA,
"id", "Embedded::Image::Comment",
"id", "general::comment",
"raw", text,
"formatted", text,
NULL);
g_file_info_set_attribute_object (self->priv->file_data->info, "Embedded::Image::Comment", G_OBJECT (metadata));
g_file_info_set_attribute_object (self->priv->file_data->info, "general::comment", G_OBJECT (metadata));
g_object_unref (metadata);
g_free (text);
/* location */
metadata = g_object_new (GTH_TYPE_METADATA,
"id", "Embedded::Image::Location",
"id", "general::location",
"raw", gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("place_entry"))),
"formatted", gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("place_entry"))),
NULL);
g_file_info_set_attribute_object (self->priv->file_data->info, "Embedded::Image::Location", G_OBJECT (metadata));
g_file_info_set_attribute_object (self->priv->file_data->info, "general::location", G_OBJECT (metadata));
g_object_unref (metadata);
/* date */
......@@ -162,11 +162,11 @@ gth_edit_comment_page_real_update_info (GthEditMetadataPage *base,
gth_time_selector_get_value (GTH_TIME_SELECTOR (self->priv->date_selector), date_time);
exif_date = gth_datetime_to_exif_date (date_time);
metadata = g_object_new (GTH_TYPE_METADATA,
"id", "Embedded::Image::DateTime",
"id", "general::datetime",
"raw", exif_date,
"formatted", exif_date,
NULL);
g_file_info_set_attribute_object (self->priv->file_data->info, "Embedded::Image::DateTime", G_OBJECT (metadata));
g_file_info_set_attribute_object (self->priv->file_data->info, "general::datetime", G_OBJECT (metadata));
g_object_unref (metadata);
gth_datetime_free (date_time);
......@@ -178,7 +178,7 @@ gth_edit_comment_page_real_update_info (GthEditMetadataPage *base,
tags = g_list_prepend (tags, tagv[i]);
tags = g_list_reverse (tags);
string_list = gth_string_list_new (tags);
g_file_info_set_attribute_object (self->priv->file_data->info, "Embedded::Image::Keywords", G_OBJECT (string_list));
g_file_info_set_attribute_object (self->priv->file_data->info, "general::tags", G_OBJECT (string_list));
g_free (exif_date);
g_object_unref (string_list);
......@@ -259,7 +259,7 @@ get_date_from_option (GthEditCommentPage *self,
timeval.tv_usec = g_file_info_get_attribute_uint32 (self->priv->file_data->info, "time::created-usec");
break;
case NO_CHANGE:
metadata = (GthMetadata *) g_file_info_get_attribute_object (self->priv->file_data->info, "Embedded::Image::DateTime");
metadata = (GthMetadata *) g_file_info_get_attribute_object (self->priv->file_data->info, "general::datetime");
if (metadata != NULL)
_g_time_val_from_exif_date (gth_metadata_get_raw (metadata), &timeval);
else
......
......@@ -77,13 +77,13 @@ gth_metadata_provider_comment_read (GthMetadataProvider *self,
value = gth_comment_get_note (comment);
if (value != NULL) {
g_file_info_set_attribute_string (file_data->info, "comment::note", value);
set_attribute_from_string (file_data->info, "Embedded::Image::Comment", value, NULL);
set_attribute_from_string (file_data->info, "general::comment", value, NULL);
}
value = gth_comment_get_place (comment);
if (value != NULL) {
g_file_info_set_attribute_string (file_data->info, "comment::place", value);
set_attribute_from_string (file_data->info, "Embedded::Image::Location", value, NULL);
set_attribute_from_string (file_data->info, "general::location", value, NULL);
}
categories = gth_comment_get_categories (comment);
......@@ -92,7 +92,7 @@ gth_metadata_provider_comment_read (GthMetadataProvider *self,
value = (GObject *) gth_string_list_new_from_ptr_array (categories);
g_file_info_set_attribute_object (file_data->info, "comment::categories", value);
g_file_info_set_attribute_object (file_data->info, "Embedded::Image::Keywords", value);
g_file_info_set_attribute_object (file_data->info, "general::tags", value);
g_object_unref (value);
}
......@@ -106,7 +106,7 @@ gth_metadata_provider_comment_read (GthMetadataProvider *self,
else
formatted = g_strdup (comment_time);
set_attribute_from_string (file_data->info, "comment::time", comment_time, formatted);
set_attribute_from_string (file_data->info, "Embedded::Image::DateTime", comment_time, formatted);
set_attribute_from_string (file_data->info, "general::datetime", comment_time, formatted);
g_free (formatted);
g_free (comment_time);
......@@ -135,7 +135,7 @@ gth_metadata_provider_comment_write (GthMetadataProvider *self,
/* comment */
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Comment");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
if (metadata == NULL)
text = g_file_info_get_attribute_string (file_data->info, "comment::note");
else
......@@ -144,7 +144,7 @@ gth_metadata_provider_comment_write (GthMetadataProvider *self,
/* location */
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Location");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::location");
if (metadata == NULL)
text = g_file_info_get_attribute_string (file_data->info, "comment::place");
else
......@@ -153,7 +153,7 @@ gth_metadata_provider_comment_write (GthMetadataProvider *self,
/* time */
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::DateTime");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::datetime");
if (metadata == NULL)
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "comment::time");
if (metadata != NULL)
......@@ -164,7 +164,7 @@ gth_metadata_provider_comment_write (GthMetadataProvider *self,
/* keywords */
categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Keywords");
categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "general::tags");
if (categories == NULL)
categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "comment::categories");
if (categories != NULL) {
......@@ -214,8 +214,8 @@ gth_metadata_provider_constructor (GType type,
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = GTH_METADATA_PROVIDER (obj);
g_object_set (self, "readable-attributes", "comment::*,Embedded::Image::*", NULL);
g_object_set (self, "writable-attributes", "comment::*,Embedded::Image::*", NULL);
g_object_set (self, "readable-attributes", "comment::*,general::datetime,general::comment,general::location,general::tags", NULL);
g_object_set (self, "writable-attributes", "comment::*,general::datetime,general::comment,general::location,general::tags", NULL);
return obj;
}
......
......@@ -37,11 +37,11 @@ GthMetadataCategory comments_metadata_category[] = {
GthMetadataInfo comments_metadata_info[] = {
{ "comment::note", N_("Comment"), "comment", 1, GTH_METADATA_ALLOW_NOWHERE },
{ "comment::place", N_("Place"), "comment", 2, GTH_METADATA_ALLOW_EVERYWHERE },
{ "comment::time", N_("Comment Date"), "comment", 3, GTH_METADATA_ALLOW_EVERYWHERE },
{ "comment::categories", N_("Tags"), "comment", 4, GTH_METADATA_ALLOW_EVERYWHERE },
{ "comment::rating", N_("Rating"), "comment", 5, GTH_METADATA_ALLOW_EVERYWHERE },
{ "comment::note", "", "comment", 1, GTH_METADATA_ALLOW_NOWHERE },
{ "comment::place", "", "comment", 2, GTH_METADATA_ALLOW_NOWHERE },
{ "comment::time", "", "comment", 3, GTH_METADATA_ALLOW_NOWHERE },
{ "comment::categories", "", "comment", 4, GTH_METADATA_ALLOW_NOWHERE },
{ "comment::rating", "", "comment", 5, GTH_METADATA_ALLOW_NOWHERE },
{ NULL, NULL, NULL, 0, 0 }
};
......@@ -78,99 +78,95 @@ void
comments__read_metadata_ready_cb (GthFileData *file_data,
const char *attributes)
{
if (_g_file_attributes_matches (attributes, "Embedded::Image::*")
&& _g_file_attributes_matches (attributes, "comment::*"))
{
gboolean write_comment = FALSE;
GthMetadata *metadata;
const char *text;
GthComment *comment;
GPtrArray *keywords;
int i;
GthStringList *categories;
comment = gth_comment_new ();
gth_comment_set_note (comment, g_file_info_get_attribute_string (file_data->info, "comment::note"));
gth_comment_set_place (comment, g_file_info_get_attribute_string (file_data->info, "comment::place"));
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "comment::time");
if (metadata != NULL)
gth_comment_set_time_from_exif_format (comment, gth_metadata_get_raw (metadata));
keywords = gth_comment_get_categories (comment);
for (i = 0; i < keywords->len; i++)
gth_comment_add_category (comment, g_ptr_array_index (keywords, i));
/* sync embedded data and .comment data if required */
gboolean write_comment = FALSE;
GthMetadata *metadata;
const char *text;
GthComment *comment;
GPtrArray *keywords;
int i;
GthStringList *categories;
comment = gth_comment_new ();
gth_comment_set_note (comment, g_file_info_get_attribute_string (file_data->info, "comment::note"));
gth_comment_set_place (comment, g_file_info_get_attribute_string (file_data->info, "comment::place"));
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "comment::time");
if (metadata != NULL)
gth_comment_set_time_from_exif_format (comment, gth_metadata_get_raw (metadata));
keywords = gth_comment_get_categories (comment);
for (i = 0; i < keywords->len; i++)
gth_comment_add_category (comment, g_ptr_array_index (keywords, i));
/* sync embedded data and .comment data if required */
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
if (metadata != NULL) {
text = g_file_info_get_attribute_string (file_data->info, "comment::note");
if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
gth_comment_set_note (comment, gth_metadata_get_raw (metadata));
write_comment = TRUE;
}
}
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Comment");
if (metadata != NULL) {
text = g_file_info_get_attribute_string (file_data->info, "comment::note");
if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
gth_comment_set_note (comment, gth_metadata_get_raw (metadata));
write_comment = TRUE;
}
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::location");
if (metadata != NULL) {
text = g_file_info_get_attribute_string (file_data->info, "comment::place");
if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
gth_comment_set_place (comment, gth_metadata_get_raw (metadata));
write_comment = TRUE;
}
}
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Location");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::datetime");
if (metadata != NULL) {
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "comment::time");
if (metadata != NULL) {
text = g_file_info_get_attribute_string (file_data->info, "comment::place");
text = gth_metadata_get_raw (metadata);
if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
gth_comment_set_place (comment, gth_metadata_get_raw (metadata));
gth_comment_set_time_from_exif_format (comment, gth_metadata_get_raw (metadata));
write_comment = TRUE;
}
}
}
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::DateTime");
if (metadata != NULL) {
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "comment::time");
if (metadata != NULL) {
text = gth_metadata_get_raw (metadata);
if (g_strcmp0 (gth_metadata_get_raw (metadata), text) != 0) {
gth_comment_set_time_from_exif_format (comment, gth_metadata_get_raw (metadata));
write_comment = TRUE;
}
}
}
categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Keywords");
if (categories != NULL) {
GthStringList *comment_categories;
categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "general::tags");
if (categories != NULL) {
GthStringList *comment_categories;
comment_categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "comment::categories");
if (! gth_string_list_equal (categories, comment_categories)) {
GList *list;
GList *scan;
comment_categories = (GthStringList *) g_file_info_get_attribute_object (file_data->info, "comment::categories");
if (! gth_string_list_equal (categories, comment_categories)) {
GList *list;
GList *scan;
gth_comment_clear_categories (comment);
list = gth_string_list_get_list (categories);
for (scan = list; scan; scan = scan->next)
gth_comment_add_category (comment, scan->data);
write_comment = TRUE;
}
}
if (write_comment) {
GFile *comment_file;
char *buffer;
gsize size;
buffer = gth_comment_to_data (comment, &size);
comment_file = gth_comment_get_comment_file (file_data->file);
g_write_file (comment_file,
FALSE,
G_FILE_CREATE_NONE,
buffer,
size,
NULL,
NULL);
g_object_unref (comment_file);
g_free (buffer);
gth_comment_clear_categories (comment);
list = gth_string_list_get_list (categories);
for (scan = list; scan; scan = scan->next)
gth_comment_add_category (comment, scan->data);
write_comment = TRUE;
}
}
g_object_unref (comment);
if (write_comment) {
GFile *comment_file;
char *buffer;
gsize size;
buffer = gth_comment_to_data (comment, &size);
comment_file = gth_comment_get_comment_file (file_data->file);
g_write_file (comment_file,
FALSE,
G_FILE_CREATE_NONE,
buffer,
size,
NULL,
NULL);
g_object_unref (comment_file);
g_free (buffer);
}
g_object_unref (comment);
}
......
......@@ -307,11 +307,11 @@ set_string_list_attribute_from_tagset (GFileInfo *info,
static void
set_attributes_from_tagsets (GFileInfo *info)
{
set_attribute_from_tagset (info, "Embedded::Image::DateTime", _DATE_TAG_NAMES);
set_attribute_from_tagset (info, "general::datetime", _DATE_TAG_NAMES);
set_attribute_from_tagset (info, "general::comment", _COMMENT_TAG_NAMES);
set_attribute_from_tagset (info, "general::location", _LOCATION_TAG_NAMES);
set_string_list_attribute_from_tagset (info, "general::tags", _KEYWORDS_TAG_NAMES);
set_attribute_from_tagset (info, "Embedded::Photo::DateTimeOriginal", _ORIGINAL_DATE_TAG_NAMES);
set_attribute_from_tagset (info, "Embedded::Image::Comment", _COMMENT_TAG_NAMES);
set_attribute_from_tagset (info, "Embedded::Image::Location", _LOCATION_TAG_NAMES);
set_string_list_attribute_from_tagset (info, "Embedded::Image::Keywords", _KEYWORDS_TAG_NAMES);
set_attribute_from_tagset (info, "Embedded::Image::Orientation", _ORIENTATION_TAG_NAMES);
}
......
......@@ -93,27 +93,27 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
if (! g_load_file_in_buffer (file_data->file, &buffer, &size, &error))
return;
metadata = g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Comment");
metadata = g_file_info_get_attribute_object (file_data->info, "general::comment");
if (metadata != NULL) {
g_file_info_set_attribute_object (file_data->info, "Exif::Photo::UserComment", metadata);
g_file_info_set_attribute_object (file_data->info, "Xmp::dc::description", metadata);
g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Headline", metadata);
}
metadata = g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Location");
metadata = g_file_info_get_attribute_object (file_data->info, "general::location");
if (metadata != NULL) {
g_file_info_set_attribute_object (file_data->info, "Xmp::iptc::Location", metadata);
g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::LocationName", metadata);
}
metadata = g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Keywords");
metadata = g_file_info_get_attribute_object (file_data->info, "general::tags");
if (metadata != NULL) {
GthMetadata *meta;
char *raw;
meta = gth_metadata_new ();
raw = gth_file_data_get_attribute_as_string (file_data, "Embedded::Image::Keywords");
g_object_set (meta, "id", "Embedded::Image::Keywords", "raw", raw, NULL);
raw = gth_file_data_get_attribute_as_string (file_data, "general::tags");
g_object_set (meta, "id", "general::tags", "raw", raw, NULL);
g_file_info_set_attribute_object (file_data->info, "Xmp::iptc::Keywords", G_OBJECT (meta));
g_file_info_set_attribute_object (file_data->info, "Iptc::Application2::Keywords", G_OBJECT (meta));
......@@ -122,7 +122,7 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
g_object_unref (meta);
}
metadata = g_file_info_get_attribute_object (file_data->info, "Embedded::Image::DateTime");
metadata = g_file_info_get_attribute_object (file_data->info, "general::datetime");
if (metadata != NULL)
g_file_info_set_attribute_object (file_data->info, "Exif::Image::DateTime", metadata);
......@@ -188,8 +188,8 @@ gth_metadata_provider_constructor (GType type,
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = GTH_METADATA_PROVIDER (obj);
g_object_set (self, "readable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*", NULL);
g_object_set (self, "writable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*", NULL);
g_object_set (self, "readable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*,general::datetime,general::comment,general::location,general::tags", NULL);
g_object_set (self, "writable-attributes", "Exif::*,Xmp::*,Iptc::*,Embedded::Image::*,general::datetime,general::comment,general::location,general::tags", NULL);
return obj;
}
......
......@@ -130,7 +130,7 @@ add_metadata (GFileInfo *info,
if (raw == NULL)
return;
if (strcmp (key, "general::size") == 0) {
if (strcmp (key, "general::dimensions") == 0) {
g_file_info_set_attribute_string (info, key, raw);
return;
}
......@@ -386,7 +386,7 @@ extract_metadata (MetadataExtractor *extractor,
if ((extractor->video_height >= 0) && (extractor->video_width >= 0))
add_metadata (info,
"general::size",
"general::dimensions",
g_strdup_printf ("%d x %d", (guint) extractor->video_width, (guint) extractor->video_height),
NULL);
......
......@@ -82,7 +82,7 @@ gth_metadata_provider_constructor (GType type,
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = GTH_METADATA_PROVIDER (obj);
g_object_set (self, "readable-attributes", "general::format,general::size,audio-video::*", NULL);
g_object_set (self, "readable-attributes", "general::format,general::dimensions,audio-video::*", NULL);
return obj;
}
......
......@@ -918,7 +918,7 @@ _gth_image_viewer_page_set_pixbuf (GthImageViewerPage *self,
g_file_info_set_attribute_int32 (file_data->info, "image::height", height);
size = g_strdup_printf ("%d x %d", width, height);
g_file_info_set_attribute_string (file_data->info, "general::size", size);
g_file_info_set_attribute_string (file_data->info, "general::dimensions", size);
gth_monitor_metadata_changed (gth_main_get_default_monitor (), file_data);
......
......@@ -63,7 +63,7 @@ gth_metadata_provider_image_read (GthMetadataProvider *self,
g_file_info_set_attribute_int32 (file_data->info, "image::height", height);
size = g_strdup_printf ("%d x %d", width, height);
g_file_info_set_attribute_string (file_data->info, "general::size", size);
g_file_info_set_attribute_string (file_data->info, "general::dimensions", size);
g_free (size);
}
......@@ -96,7 +96,7 @@ gth_metadata_provider_constructor (GType type,
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = GTH_METADATA_PROVIDER (obj);
g_object_set (self, "readable-attributes", "general::format,general::size,image::width,image::height", NULL);
g_object_set (self, "readable-attributes", "general::format,general::dimensions,image::width,image::height", NULL);
return obj;
}
......
......@@ -503,7 +503,7 @@ create_example_file_data (void)
"raw", "2005:03:09 13:23:51",
"formatted", "2005:03:09 13:23:51",
NULL);
g_file_info_set_attribute_object (info, "Embedded::Image::DateTime", G_OBJECT (metadata));
g_file_info_set_attribute_object (info, "general::datetime", G_OBJECT (metadata));
g_object_unref (metadata);
g_object_unref (info);
......
......@@ -412,7 +412,7 @@ gth_import_task_get_file_destination (GthFileData *file_data,
else if (subfolder_type == GTH_SUBFOLDER_TYPE_FILE_DATE) {
GthMetadata *metadata;
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::DateTime");
metadata = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::datetime");
if (metadata != NULL)
_g_time_val_from_exif_date (gth_metadata_get_raw (metadata), &timeval);
else
......
......@@ -2594,8 +2594,8 @@ _gth_browser_update_statusbar_file_info (GthBrowser *browser)
return;
}
image_size = g_file_info_get_attribute_string (browser->priv->current_file->info, "general::size");
metadata = (GthMetadata *) g_file_info_get_attribute_object (browser->priv->current_file->info, "Embedded::Image::DateTime");
image_size = g_file_info_get_attribute_string (browser->priv->current_file->info, "general::dimensions");
metadata = (GthMetadata *) g_file_info_get_attribute_object (browser->priv->current_file->info, "general::datetime");
if (metadata != NULL)
file_date = gth_metadata_get_formatted (metadata);
else
......
......@@ -72,7 +72,7 @@ get_comment (GthFileData *file_data)
string = g_string_new (NULL);
value = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "Embedded::Image::Comment");
value = (GthMetadata *) g_file_info_get_attribute_object (file_data->info, "general::comment");
if (value != NULL) {
const char *formatted;
......
......@@ -44,14 +44,15 @@ GthMetadataInfo file_metadata_info[] = {
{ "gth::file::is-modified", NULL, "file", 5, GTH_METADATA_ALLOW_NOWHERE },
{ "gth::file::full-name", N_("Full Name"), "file", 6, GTH_METADATA_ALLOW_IN_PRINT | GTH_METADATA_ALLOW_IN_FILE_LIST },
{ "general::size", N_("Dimensions"), "general", 10, GTH_METADATA_ALLOW_EVERYWHERE },
{ "general::dimensions", N_("Dimensions"), "general", 10, GTH_METADATA_ALLOW_EVERYWHERE },
{ "general::duration", N_("Duration"), "general", 11, GTH_METADATA_ALLOW_EVERYWHERE },
{ "general::format", N_("Format"), "general", 12, GTH_METADATA_ALLOW_IN_PROPERTIES_VIEW },
{ "general::location", N_("Place"), "general", 14, GTH_METADATA_ALLOW_EVERYWHERE },
{ "general::datetime", N_("Event Date"), "general", 15, GTH_METADATA_ALLOW_EVERYWHERE },
{ "general::comment", N_("Comment"), "general", 16, GTH_METADATA_ALLOW_IN_PRINT },
{ "general::tags", N_("Tags"), "general", 17, GTH_METADATA_ALLOW_EVERYWHERE },
{ "general::rating", N_("Rating"), "general", 18, GTH_METADATA_ALLOW_EVERYWHERE },
{ "Embedded::Image::DateTime", "", "", 0, GTH_METADATA_ALLOW_NOWHERE },
{ "Embedded::Image::Comment", N_("Comment"), "general", 14, GTH_METADATA_ALLOW_IN_PRINT },
{ "Embedded::Image::Location", "", "", 0, GTH_METADATA_ALLOW_NOWHERE },
{ "Embedded::Image::Keywords", N_("Tags"), "general", 16, GTH_METADATA_ALLOW_IN_PRINT },
{ "Embedded::Image::Orientation", "", "", 0, GTH_METADATA_ALLOW_NOWHERE },
{ "Embedded::Photo::DateTimeOriginal", "", "", 0, GTH_METADATA_ALLOW_NOWHERE },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment