diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-05-17 15:53:17 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-05-17 15:53:17 -0500 |
commit | b51315028eb616e966ca761e50c6b1114680c364 (patch) | |
tree | f909e19f5c96ee45f5f706661e6272a2b60cb508 /src/datetime-service.c | |
parent | da61c2a69e259b029c39a6deb0f65217d90e73e4 (diff) | |
download | ayatana-indicator-datetime-b51315028eb616e966ca761e50c6b1114680c364.tar.gz ayatana-indicator-datetime-b51315028eb616e966ca761e50c6b1114680c364.tar.bz2 ayatana-indicator-datetime-b51315028eb616e966ca761e50c6b1114680c364.zip |
Modify the timezone location sorting to follow mpt's design at https://wiki.ubuntu.com/TimeAndDate
- the auto-detected location, if enabled, is listed before user-specified locations
- Locations in the indicator always mirror the Locations Dialog's ordering
- Added sort-by-name and sort-by-time buttons in the Locations Dialog
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r-- | src/datetime-service.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index 5b3bf81..0219cfb 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -156,7 +156,7 @@ locations_add (GSList * locations, const char * zone, const char * name, gboolea if (g_slist_find_custom (locations, loc, (GCompareFunc)time_location_compare) == NULL) { g_debug ("%s Adding zone '%s', name '%s'", G_STRLOC, zone, name); - locations = g_slist_prepend (locations, loc); + locations = g_slist_append (locations, loc); } else { g_debug("%s Skipping duplicate zone '%s' name '%s'", G_STRLOC, zone, name); time_location_free (loc); @@ -223,9 +223,6 @@ update_location_menu_items (void) user_locations = NULL; } - /* sort the list by timezone offset */ - locations = g_slist_sort (locations, (GCompareFunc)time_location_compare); - /* finally create menuitems for each location */ gint offset = dbusmenu_menuitem_get_position (locations_separator, root)+1; GSList * l; |