summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2018-03-25 18:39:37 +0200
committerFlorian Müllner <florian.muellner@gmail.com>2018-04-13 09:15:48 +0000
commit11ca8dd54f2eefeff239bd51a0d8f616919900ee (patch)
tree97a4a4f7406cb44373f62ce90c3da38069c14a91
parente00f22ebe642d07bd1ab003f9b68105d8da25ed8 (diff)
downloadgnome-shell-11ca8dd54f2eefeff239bd51a0d8f616919900ee.tar.gz
worldClock: Handle named timezones
The original UTC support in GWeather piggy-backed on the existing API, but as "country" or "city" don't make sense in the context of UTC or AoE, the concept of "named timezones" was introduced. Handle those explicitly to get back labels for those locations. https://gitlab.gnome.org/GNOME/gnome-shell/issues/150
-rw-r--r--js/ui/dateMenu.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 08ac28872..60f5bdc45 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -153,8 +153,10 @@ var WorldClocksSection = new Lang.Class({
for (let i = 0; i < this._locations.length; i++) {
let l = this._locations[i].location;
+ let name = l.get_level() == GWeather.LocationLevel.NAMED_TIMEZONE ? l.get_name()
+ : l.get_city_name();
let label = new St.Label({ style_class: 'world-clocks-city',
- text: l.get_city_name(),
+ text: name,
x_align: Clutter.ActorAlign.START,
x_expand: true });