weather: Prevent setting Geoclue source as location name

Prior to Geoclue v2.7, the location description did not seem to ever be
set. Now, the source used to determine the location is set as the
description. This can result in the location name in dateMenu to be set
as "WiFi", "GeoIP", etc., since we relay the description as the location
name to GWeather. Instead, pass an empty string so GWeather continues
to set the location name itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2729>
This commit is contained in:
Brendan William 2023-08-09 10:40:35 -07:00 committed by Florian Müllner
parent 055c0468ca
commit ae86b58d59

View File

@ -270,8 +270,8 @@ export class WeatherClient extends Signals.EventEmitter {
_onGClueLocationChanged() { _onGClueLocationChanged() {
let geoLocation = this._gclueService.location; let geoLocation = this._gclueService.location;
let location = GWeather.Location.new_detached( // Provide empty name so GWeather sets location name
geoLocation.description, const location = GWeather.Location.new_detached('',
null, null,
geoLocation.latitude, geoLocation.latitude,
geoLocation.longitude); geoLocation.longitude);