Index: src/libtracker-gtk/tracker-metadata-tile.c
===================================================================
--- src/libtracker-gtk/tracker-metadata-tile.c	(révision 592)
+++ src/libtracker-gtk/tracker-metadata-tile.c	(copie de travail)
@@ -33,9 +33,148 @@
 #include "tracker-metadata-tile.h"
 #include "tracker-tag-bar.h"
 
-
 #define TRACKER_METADATA_TILE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_METADATA_TILE, TrackerMetadataTilePrivate))
 
+#ifndef HAVE_RECENT_GLIB
+/**********************************************************************
+ *
+ * The following functions are copied from the GLIB 2.12
+ * source code, to lower requirement on glib to 2.10 that ships with 
+ * Dapper
+ *
+ **********************************************************************/
+
+/* converts a broken down date representation, relative to UTC, to
+ * a timestamp; it uses timegm() if it's available. */
+static time_t
+mktime_utc (struct tm *tm)
+{
+  time_t retval;
+  
+#ifndef HAVE_TIMEGM
+  static const gint days_before[] =
+  {
+    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
+  };
+#endif
+
+#ifndef HAVE_TIMEGM
+  if (tm->tm_mon < 0 || tm->tm_mon > 11)
+    return (time_t) -1;
+
+  retval = (tm->tm_year - 70) * 365;
+  retval += (tm->tm_year - 68) / 4;
+  retval += days_before[tm->tm_mon] + tm->tm_mday - 1;
+  
+  if (tm->tm_year % 4 == 0 && tm->tm_mon < 2)
+    retval -= 1;
+  
+  retval = ((((retval * 24) + tm->tm_hour) * 60) + tm->tm_min) * 60 + tm->tm_sec;
+#else
+  retval = timegm (tm);
+#endif /* !HAVE_TIMEGM */
+  
+  return retval;
+}
+
+
+
+/**
+* g_time_val_from_iso8601:
+* @iso_date: a ISO 8601 encoded date string
+* @time_: a #GTimeVal
+*
+* Converts a string containing an ISO 8601 encoded date and time
+* to a #GTimeVal and puts it into @time_.
+*
+* Return value: %TRUE if the conversion was successful.
+*
+*/
+gboolean
+g_time_val_from_iso8601 (const gchar *iso_date,
+                         GTimeVal    *time_)
+{
+  struct tm tm;
+  long val;
+
+  g_return_val_if_fail (iso_date != NULL, FALSE);
+  g_return_val_if_fail (time_ != NULL, FALSE);
+ 
+  val = strtoul (iso_date, (char **)&iso_date, 10);
+   if (*iso_date == '-')
+     {
+       /* YYYY-MM-DD */
+      tm.tm_year = val - 1900;
+      iso_date++;
+      tm.tm_mon = strtoul (iso_date, (char **)&iso_date, 10) - 1;
+      
+      if (*iso_date++ != '-')
+        return FALSE;
+      
+      tm.tm_mday = strtoul (iso_date, (char **)&iso_date, 10);
+    }
+  else
+    {
+      /* YYYYMMDD */
+      tm.tm_mday = val % 100;
+      tm.tm_mon = (val % 10000) / 100 - 1;
+      tm.tm_year = val / 10000 - 1900;
+    }
+
+  if (*iso_date++ != 'T')
+    return FALSE;
+  
+  val = strtoul (iso_date, (char **)&iso_date, 10);
+  if (*iso_date == ':')
+    {
+      /* hh:mm:ss */
+      tm.tm_hour = val;
+      iso_date++;
+      tm.tm_min = strtoul (iso_date, (char **)&iso_date, 10);
+      
+      if (*iso_date++ != ':')
+        return FALSE;
+      
+      tm.tm_sec = strtoul (iso_date, (char **)&iso_date, 10);
+    }
+  else
+    {
+      /* hhmmss */
+      tm.tm_sec = val % 100;
+      tm.tm_min = (val % 10000) / 100;
+      tm.tm_hour = val / 10000;
+    }
+
+  time_->tv_sec = mktime_utc (&tm);
+  time_->tv_usec = 1;
+  
+  if (*iso_date == '.')
+    time_->tv_usec = strtoul (iso_date + 1, (char **)&iso_date, 10);
+    
+  if (*iso_date == '+' || *iso_date == '-')
+    {
+      gint sign = (*iso_date == '+') ? -1 : 1;
+      
+      val = 60 * strtoul (iso_date + 1, (char **)&iso_date, 10);
+      
+      if (*iso_date == ':')
+        val = 60 * val + strtoul (iso_date + 1, NULL, 10);
+      else
+        val = 60 * (val / 100) + (val % 100);
+
+      time_->tv_sec += (time_t) (val * sign);
+    }
+
+  return TRUE;
+}
+/**********************************************************************
+ *
+ *                     End of copied functions.
+ *
+ **********************************************************************/
+#endif /* HAVE_RECENT_GLIB */
+
+
 G_DEFINE_TYPE (TrackerMetadataTile, tracker_metadata_tile, GTK_TYPE_EVENT_BOX)
 
 struct TrackerMetadataTilePrivate {
Index: src/tracker-preferences/tracker-configuration.c
===================================================================
--- src/tracker-preferences/tracker-configuration.c	(révision 592)
+++ src/tracker-preferences/tracker-configuration.c	(copie de travail)
@@ -1,6 +1,224 @@
 #include "tracker-configuration.h"
 #include "tracker-configuration-private.h"
 
+#ifndef HAVE_RECENT_GLIB
+/**********************************************************************
+ *
+ * The following functions are copied from the GLIB 2.12
+ * source code, to lower requirement on glib to 2.10 that ships with 
+ * Dapper
+ *
+ **********************************************************************/
+
+static gchar *
+_g_utf8_make_valid (const gchar *name)
+{
+  GString *string;
+  const gchar *remainder, *invalid;
+  gint remaining_bytes, valid_bytes;
+  
+  string = NULL;
+  remainder = name;
+  remaining_bytes = strlen (name);
+  
+  while (remaining_bytes != 0) 
+    {
+      if (g_utf8_validate (remainder, remaining_bytes, &invalid)) 
+	break;
+      valid_bytes = invalid - remainder;
+    
+      if (string == NULL) 
+	string = g_string_sized_new (remaining_bytes);
+
+      g_string_append_len (string, remainder, valid_bytes);
+      /* append U+FFFD REPLACEMENT CHARACTER */
+      g_string_append (string, "\357\277\275");
+      
+      remaining_bytes -= valid_bytes + 1;
+      remainder = invalid + 1;
+    }
+  
+  if (string == NULL)
+    return g_strdup (name);
+  
+  g_string_append (string, remainder);
+
+  g_assert (g_utf8_validate (string->str, -1, NULL));
+  
+  return g_string_free (string, FALSE);
+}
+
+static gdouble
+g_key_file_parse_value_as_double  (GKeyFile     *key_file,
+                                   const gchar  *value,
+                                   GError      **error)
+{
+  gchar *end_of_valid_d;
+  gdouble double_value = 0;
+
+  double_value = g_ascii_strtod (value, &end_of_valid_d);
+
+  if (*end_of_valid_d != '\0' || end_of_valid_d == value)
+    {
+      gchar *value_utf8 = _g_utf8_make_valid (value);
+      g_set_error (error, G_KEY_FILE_ERROR,
+		   G_KEY_FILE_ERROR_INVALID_VALUE,
+		   ("Value '%s' cannot be interpreted "
+		     "as a float number."), 
+		   value_utf8);
+      g_free (value_utf8);
+    }
+
+  return double_value;
+}
+
+gdouble
+g_key_file_get_double (GKeyFile *key_file, const gchar *group_name,
+                       const gchar *key, GError **error)
+{
+  GError *key_file_error;
+  gchar *value;
+  gdouble double_value;
+
+  g_return_val_if_fail (key_file != NULL, -1);
+  g_return_val_if_fail (group_name != NULL, -1);
+  g_return_val_if_fail (key != NULL, -1);
+
+  key_file_error = NULL;
+
+  value = g_key_file_get_value (key_file, group_name, key, &key_file_error);
+
+  if (key_file_error)
+    {
+      g_propagate_error (error, key_file_error);
+      return 0;
+    }
+
+  double_value = g_key_file_parse_value_as_double (key_file, value,
+                                                  &key_file_error);
+  g_free (value);
+
+  if (key_file_error)
+    {
+      if (g_error_matches (key_file_error,
+                           G_KEY_FILE_ERROR,
+                           G_KEY_FILE_ERROR_INVALID_VALUE))
+        {
+          g_set_error (error, G_KEY_FILE_ERROR,
+                       G_KEY_FILE_ERROR_INVALID_VALUE,
+                       ("Key file contains key '%s' in group '%s' "
+                         "which has a value that cannot be interpreted."), key,
+                       group_name);
+          g_error_free (key_file_error);
+        }
+      else
+        g_propagate_error (error, key_file_error);
+    }
+
+  return double_value;
+}
+
+void
+g_key_file_set_double  (GKeyFile    *key_file,
+                        const gchar *group_name,
+                        const gchar *key,
+                        gdouble      value)
+{
+  gchar result[G_ASCII_DTOSTR_BUF_SIZE];
+
+  g_return_if_fail (key_file != NULL);
+
+  g_ascii_dtostr (result, sizeof (result), value);
+  g_key_file_set_value (key_file, group_name, key, result);
+}
+
+gdouble*
+g_key_file_get_double_list (GKeyFile *key_file,
+                            const gchar *group_name,
+                            const gchar *key,
+                            gsize *length,
+                            GError **error)
+{
+  GError *key_file_error = NULL;
+  gchar **values;
+  gdouble *double_values;
+  gsize i, num_doubles;
+
+  g_return_val_if_fail (key_file != NULL, NULL);
+  g_return_val_if_fail (group_name != NULL, NULL);
+  g_return_val_if_fail (key != NULL, NULL);
+
+  values = g_key_file_get_string_list (key_file, group_name, key,
+                                       &num_doubles, &key_file_error);
+
+  if (key_file_error)
+    g_propagate_error (error, key_file_error);
+
+  if (!values)
+    return NULL;
+
+  double_values = g_new0 (gdouble, num_doubles);
+
+  for (i = 0; i < num_doubles; i++)
+    {
+      double_values[i] = g_key_file_parse_value_as_double (key_file,
+							   values[i],
+							   &key_file_error);
+
+      if (key_file_error)
+        {
+          g_propagate_error (error, key_file_error);
+          g_strfreev (values);
+          g_free (double_values);
+
+          return NULL;
+        }
+    }
+  g_strfreev (values);
+
+  if (length)
+    *length = num_doubles;
+
+  return double_values;
+}
+
+void
+g_key_file_set_double_list (GKeyFile     *key_file,
+			    const gchar  *group_name,
+			    const gchar  *key,
+			    gdouble       list[],
+			    gsize         length)
+{
+  GString *values;
+  gsize i;
+
+  g_return_if_fail (key_file != NULL);
+  g_return_if_fail (list != NULL);
+
+  values = g_string_sized_new (length * 16);
+  for (i = 0; i < length; i++)
+    {
+      gchar result[G_ASCII_DTOSTR_BUF_SIZE];
+
+      g_ascii_dtostr( result, sizeof (result), list[i] );
+
+      g_string_append (values, result);
+      g_string_append_c (values, ';');
+    }
+
+  g_key_file_set_value (key_file, group_name, key, values->str);
+  g_string_free (values, TRUE);
+}
+
+
+/**********************************************************************
+ *
+ *                     End of copied functions.
+ *
+ **********************************************************************/
+#endif /* HAVE_RECENT_GLIB */
+
+
 static GObjectClass *parent_class = NULL;
 
 static void
Index: configure.ac
===================================================================
--- configure.ac	(révision 592)
+++ configure.ac	(copie de travail)
@@ -30,7 +30,7 @@
 
 dnl Library Checks
 DBUS_REQUIRED=0.60
-GLIB_REQUIRED=2.9.1
+GLIB_REQUIRED=2.10.0
 PANGO_REQUIRED=1.0.0
 GMIME_REQUIRED=2.1.0
 
@@ -153,6 +153,8 @@
 ####################################################################
 # check for newer glib (>= 2.12.0) for g_option_context_set_summary ()
 # availability
+# used as well in tracker-configuration.c and tracker-metadata-tile.c
+# for other methods availability
 ####################################################################
 RECENT_GLIB=2.12.0
 
@@ -490,7 +492,7 @@
 # Checks for tracker-preferences
 ##################################################################
 
-PREFERENCES_GLADE_REQUIRED=2.6
+PREFERENCES_GLADE_REQUIRED=2.5
 
 AC_ARG_ENABLE([preferences],
               AC_HELP_STRING([--disable-preferences], [Disable the preferences dialog]),,
