From b51315028eb616e966ca761e50c6b1114680c364 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 17 May 2012 15:53:17 -0500 Subject: 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 --- src/datetime-service.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/datetime-service.c') 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; -- cgit v1.2.3