weather: Track whether a location was set
Setting GWeatherInfo:location to null helpfully doesn't mean "no location", but "NYC". This obviously isn't what we want to show users, so track the location validity separately and consider it when updating the label shown to users. https://bugzilla.gnome.org/show_bug.cgi?id=780252
This commit is contained in:
@ -296,6 +296,9 @@ const WeatherSection = new Lang.Class({
|
||||
},
|
||||
|
||||
_getLabelText: function() {
|
||||
if (!this._weatherClient.hasLocation)
|
||||
return _("Select a location…");
|
||||
|
||||
if (this._weatherClient.loading)
|
||||
return _("Loading…");
|
||||
|
||||
|
Reference in New Issue
Block a user