aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-prefs.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-04-07 15:25:05 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-04-07 15:25:05 -0400
commit5389f65762fd258d5b87014d1b2dd7ca8192030b (patch)
tree1ffebdd628ef41742b9d1dff7932a427c292e377 /src/datetime-prefs.c
parent16d1f086b99021889509fb2d3c13cc5fc9c29536 (diff)
parentadea7dfe30540cf8c9d2ebe20e3973c418657280 (diff)
downloadayatana-indicator-datetime-5389f65762fd258d5b87014d1b2dd7ca8192030b.tar.gz
ayatana-indicator-datetime-5389f65762fd258d5b87014d1b2dd7ca8192030b.tar.bz2
ayatana-indicator-datetime-5389f65762fd258d5b87014d1b2dd7ca8192030b.zip
releasing version 0.2.2-0ubuntu10.2.2-0ubuntu1
Diffstat (limited to 'src/datetime-prefs.c')
-rw-r--r--src/datetime-prefs.c40
1 files changed, 2 insertions, 38 deletions
diff --git a/src/datetime-prefs.c b/src/datetime-prefs.c
index 4a32fd6..9b00e60 100644
--- a/src/datetime-prefs.c
+++ b/src/datetime-prefs.c
@@ -181,46 +181,10 @@ ntp_query_answered (GObject *object, GAsyncResult *res, gpointer user_data)
g_variant_unref (answers);
}
-static gchar *
-get_zone_name (const gchar * location)
-{
- gchar * new_zone, * new_name;
- gchar * old_zone, * old_name;
- gchar * rv;
-
- split_settings_location (location, &new_zone, &new_name);
-
- GSettings * conf = g_settings_new (SETTINGS_INTERFACE);
- gchar * tz_name = g_settings_get_string (conf, SETTINGS_TIMEZONE_NAME_S);
- split_settings_location (tz_name, &old_zone, &old_name);
- g_free (tz_name);
- g_object_unref (conf);
-
- // new_name is always just a sanitized version of a timezone.
- // old_name is potentially a saved "pretty" version of a timezone name from
- // geonames. So we prefer to use it if available and the zones match.
-
- if (g_strcmp0 (old_zone, new_zone) == 0) {
- rv = old_name;
- old_name = NULL;
- }
- else {
- rv = new_name;
- new_name = NULL;
- }
-
- g_free (new_zone);
- g_free (old_zone);
- g_free (new_name);
- g_free (old_name);
-
- return rv;
-}
-
static void
sync_entry (const gchar * location)
{
- gchar * name = get_zone_name (location);
+ gchar * name = get_current_zone_name (location);
gtk_entry_set_text (GTK_ENTRY (tz_entry), name);
g_free (name);
@@ -606,7 +570,7 @@ entry_focus_out (GtkEntry * entry, GdkEventFocus * event)
if (location == NULL)
return FALSE;
- gchar * name = get_zone_name (location->zone);
+ gchar * name = get_current_zone_name (location->zone);
gboolean correct = (g_strcmp0 (gtk_entry_get_text (entry), name) == 0);
g_free (name);