[totem/gnome-3-8] properties: Fix Year tag not showing in some cases
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-8] properties: Fix Year tag not showing in some cases
- Date: Thu, 22 Aug 2013 15:36:25 +0000 (UTC)
commit adde7ee06fb8a2d3cf3e8d96be44227402b2d767
Author: Bastien Nocera <hadess hadess net>
Date: Thu Aug 22 17:34:32 2013 +0200
properties: Fix Year tag not showing in some cases
The DATE tag might not contain the year, but the DATE_TIME tag
might, so try and use that if the first one fails.
https://bugzilla.gnome.org/show_bug.cgi?id=706397
src/totem-properties-view.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/totem-properties-view.c b/src/totem-properties-view.c
index b5f7eda..ad83db0 100644
--- a/src/totem-properties-view.c
+++ b/src/totem-properties-view.c
@@ -77,6 +77,7 @@ update_general (TotemPropertiesView *props,
};
guint i;
GDate *date;
+ GstDateTime *datetime;
gchar *comment;
for (i = 0; i < G_N_ELEMENTS(items); i++) {
@@ -111,7 +112,16 @@ update_general (TotemPropertiesView *props,
"year",
string);
g_free (string);
- }
+ } else if (gst_tag_list_get_date_time (list, GST_TAG_DATE_TIME, &datetime)) {
+ char *string;
+
+ string = g_strdup_printf ("%d", gst_date_time_get_year (datetime));
+ gst_date_time_unref (datetime);
+ bacon_video_widget_properties_set_label (props->priv->props,
+ "year",
+ string);
+ g_free (string);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]