[gnome-shell/wip/fmuellner/notification-redux+sass: 207/207] dateMenu: Sort world clocks by timezone rather than city name



commit c3e57565f7174e71050f0c92e80132a3582cd94f
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Feb 17 16:40:29 2015 +0100

    dateMenu: Sort world clocks by timezone rather than city name

 js/ui/dateMenu.js |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 7a1b54b..a1b7a42 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -144,9 +144,8 @@ const WorldClocksSection = new Lang.Class({
         }
 
         this._locations.sort(function(a, b) {
-            let aCity = a.location.get_city_name();
-            let bCity = b.location.get_city_name();
-            return aCity.localeCompare(bCity);
+            return a.location.get_timezone().get_offset() -
+                   b.location.get_timezone().get_offset();
         });
 
         let layout = this._grid.layout_manager;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]