Re: [PATCH 3/6] core: added =?UTF-8?Q?grl=5Fmedia=5Fset=5Fdate=5F?= =?UTF-8?Q?from=5Fiso=38=36=30=31=28=29?=




On Wed, 22 Jun 2011 19:07:53 +0200, Guillaume Emont <guijemont igalia com> wrote:
---
 src/data/grl-media.c |   23 +++++++++++++++++++++++
 src/data/grl-media.h |    2 ++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/src/data/grl-media.c b/src/data/grl-media.c
index eea3602..9d7a50b 100644
--- a/src/data/grl-media.c
+++ b/src/data/grl-media.c
@@ -686,6 +686,29 @@ grl_media_set_date (GrlMedia *media, const
GDateTime *date)
                       date);
 }

This is a public function, please add the corresponding gtk-doc and the corresponding gobject-introspection annotations.

+gboolean
+grl_media_set_date_from_iso8601 (GrlMedia *media, const gchar *date)
+{
+  GTimeVal t = { 0, };
+
+  if (g_time_val_from_iso8601 (date, &t)) {
+    GDateTime *date_time;
+
+ /* work around https://bugzilla.gnome.org/show_bug.cgi?id=650968 */
+    if (t.tv_sec == 0 && t.tv_usec == 0)
+      return FALSE;

Should we drop a warning or something here? I don't like functions failing without giving any way to actually know what happened to the developer.

Iago


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]