From e1d4f402e96d6bdcfc74d73aea692e8717ae39f8 Mon Sep 17 00:00:00 2001 From: None Date: Sat, 4 Apr 2015 02:21:38 +0200 Subject: [PATCH] Add "Vaiaku, Tuvalu" as default location, if none is configured. --- src/extension.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/extension.js b/src/extension.js index b5cb919..9eeeb73 100644 --- a/src/extension.js +++ b/src/extension.js @@ -355,7 +355,13 @@ const OpenweatherMenuButton = new Lang.Class({ loadConfig: function() { this._settings = Convenience.getSettings(WEATHER_SETTINGS_SCHEMA); + + if (this._cities.length === 0) + this._cities = "-8.5211767,179.1976747>Vaiaku, Tuvalu"; + this._settingsC = this._settings.connect("changed", Lang.bind(this, function() { + if (this._cities.length === 0) + this._cities = "-8.5211767,179.1976747>Vaiaku, Tuvalu"; this.rebuildCurrentWeatherUi(); this.rebuildFutureWeatherUi(); if (this.providerChanged()) {