535
g_object_get (loc, "zone", &zone, "country", &country, NULL);
535
gchar * en_name; // FIXME: need something better for non-English locales
538
g_object_get (loc, "zone", &zone, "country", &country, "en_name", &en_name,
539
"longitude", &longitude, "latitude", &latitude,
537
/* FIXME: need something better than below for non-English locales */
538
const gchar * last_bit = ((const gchar *)strrchr (zone, '/')) + 1;
539
if (last_bit == NULL)
541
gchar * name = g_strdup (last_bit);
543
while ((underscore = strchr (name, '_'))) {
542
gchar * longitude_s = g_strdup_printf ("%f", longitude);
543
gchar * latitude_s= g_strdup_printf ("%f", latitude);
547
545
gtk_list_store_set (store, &iter,
548
CC_TIMEZONE_COMPLETION_ZONE, zone,
549
CC_TIMEZONE_COMPLETION_NAME, name,
546
CC_TIMEZONE_COMPLETION_ZONE, NULL,
547
CC_TIMEZONE_COMPLETION_NAME, en_name,
550
548
CC_TIMEZONE_COMPLETION_COUNTRY, country,
549
CC_TIMEZONE_COMPLETION_LONGITUDE, longitude_s,
550
CC_TIMEZONE_COMPLETION_LATITUDE, latitude_s,
554
g_free (longitude_s);