Avoid deprecation-warning with gnome-shell 3.16 .

merge-requests/218/head
None 10 years ago
parent f644ef0dd1
commit ae2a3d4aa0
  1. 8
      src/extension.js

@ -58,6 +58,7 @@ const PopupMenu = imports.ui.popupMenu;
// Settings
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_UNIT_KEY = 'unit';
const OPENWEATHER_WIND_SPEED_UNIT_KEY = 'wind-speed-unit';
@ -373,12 +374,7 @@ const OpenweatherMenuButton = new Lang.Class({
},
loadConfigInterface: function() {
let schemaInterface = "org.gnome.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._settingsInterface = Convenience.getSettings(OPENWEATHER_DESKTOP_INTERFACE);
this._settingsInterfaceC = this._settingsInterface.connect("changed", Lang.bind(this, function() {
this.rebuildCurrentWeatherUi();
this.rebuildFutureWeatherUi();

Loading…
Cancel
Save