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
This commit is contained in:
parent
e00f22ebe6
commit
11ca8dd54f
@ -153,8 +153,10 @@ var WorldClocksSection = new Lang.Class({
|
|||||||
for (let i = 0; i < this._locations.length; i++) {
|
for (let i = 0; i < this._locations.length; i++) {
|
||||||
let l = this._locations[i].location;
|
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',
|
let label = new St.Label({ style_class: 'world-clocks-city',
|
||||||
text: l.get_city_name(),
|
text: name,
|
||||||
x_align: Clutter.ActorAlign.START,
|
x_align: Clutter.ActorAlign.START,
|
||||||
x_expand: true });
|
x_expand: true });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user