summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-07-23 09:33:47 +0200
committerLuke from DC <[email protected]>2020-08-01 03:31:12 +0000
commit0b71fb2f2cbf4eb0eea9ea9ab0682eef2342a500 (patch)
tree7b5252aab98ab6ef941eaf8c462c531dac21b10b /applets
parentf01e028beade99865610bd27521263f6288e9030 (diff)
downloadmate-panel-0b71fb2f2cbf4eb0eea9ea9ab0682eef2342a500.tar.bz2
mate-panel-0b71fb2f2cbf4eb0eea9ea9ab0682eef2342a500.tar.xz
clock: merge sorting and reversing node list of selected locations
Diffstat (limited to 'applets')
-rw-r--r--applets/clock/clock.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 6196260c..8e07d85a 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1105,6 +1105,12 @@ sort_locations_by_time (gconstpointer a, gconstpointer b)
return ret;
}
+static gint
+sort_locations_by_time_reverse (gconstpointer a, gconstpointer b)
+{
+ return sort_locations_by_time (b, a);
+}
+
static void
location_tile_pressed_cb (ClockLocationTile *tile, gpointer data)
{
@@ -1156,8 +1162,7 @@ create_cities_section (ClockData *cd)
/* Copy the existing list, so we can sort it nondestructively */
node = g_list_copy (cities);
- node = g_list_sort (node, sort_locations_by_time);
- node = g_list_reverse (node);
+ node = g_list_sort (node, sort_locations_by_time_reverse);
for (l = node; l; l = g_list_next (l)) {
ClockLocation *loc = l->data;