|
|
@ -58,6 +58,7 @@ const PopupMenu = imports.ui.popupMenu; |
|
|
|
|
|
|
|
|
|
|
|
// Settings
|
|
|
|
// Settings
|
|
|
|
const OPENWEATHER_SETTINGS_SCHEMA = 'org.gnome.shell.extensions.openweather'; |
|
|
|
const OPENWEATHER_SETTINGS_SCHEMA = 'org.gnome.shell.extensions.openweather'; |
|
|
|
|
|
|
|
const OPENWEATHER_DESKTOP_INTERFACE = 'org.gnome.desktop.interface'; |
|
|
|
const OPENWEATHER_PROVIDER_KEY = 'weather-provider'; |
|
|
|
const OPENWEATHER_PROVIDER_KEY = 'weather-provider'; |
|
|
|
const OPENWEATHER_UNIT_KEY = 'unit'; |
|
|
|
const OPENWEATHER_UNIT_KEY = 'unit'; |
|
|
|
const OPENWEATHER_WIND_SPEED_UNIT_KEY = 'wind-speed-unit'; |
|
|
|
const OPENWEATHER_WIND_SPEED_UNIT_KEY = 'wind-speed-unit'; |
|
|
@ -373,12 +374,7 @@ const OpenweatherMenuButton = new Lang.Class({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
loadConfigInterface: function() { |
|
|
|
loadConfigInterface: function() { |
|
|
|
let schemaInterface = "org.gnome.desktop.interface"; |
|
|
|
this._settingsInterface = Convenience.getSettings(OPENWEATHER_DESKTOP_INTERFACE); |
|
|
|
if (Gio.Settings.list_schemas().indexOf(schemaInterface) == -1) |
|
|
|
|
|
|
|
throw _("Schema \"%s\" not found.").format(schemaInterface); |
|
|
|
|
|
|
|
this._settingsInterface = new Gio.Settings({ |
|
|
|
|
|
|
|
schema: schemaInterface |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this._settingsInterfaceC = this._settingsInterface.connect("changed", Lang.bind(this, function() { |
|
|
|
this._settingsInterfaceC = this._settingsInterface.connect("changed", Lang.bind(this, function() { |
|
|
|
this.rebuildCurrentWeatherUi(); |
|
|
|
this.rebuildCurrentWeatherUi(); |
|
|
|
this.rebuildFutureWeatherUi(); |
|
|
|
this.rebuildFutureWeatherUi(); |
|
|
|