Updated years of copyright, added copyright notices to new files.

merge-requests/218/head
None 10 years ago
parent 45c8ba7649
commit e5fc8d3cf4
  1. 100
      src/extension.js
  2. 35
      src/forecast_io.js
  3. 35
      src/openweathermap_org.js
  4. 2
      src/prefs.js

@ -5,7 +5,7 @@
* - Displays a small weather information on the top panel. * - Displays a small weather information on the top panel.
* - On click, gives a popup with details about the weather. * - On click, gives a popup with details about the weather.
* *
* Copyright (C) 2011 - 2014 * Copyright (C) 2011 - 2015
* ecyrbe <ecyrbe+spam@gmail.com>, * ecyrbe <ecyrbe+spam@gmail.com>,
* Timur Kristof <venemo@msn.com>, * Timur Kristof <venemo@msn.com>,
* Elad Alfassa <elad@fedoraproject.org>, * Elad Alfassa <elad@fedoraproject.org>,
@ -1294,104 +1294,6 @@ const OpenweatherMenuButton = new Lang.Class({
})); }));
}, },
// fcParseWeatherForecast: function() {
// if (this.forecastWeatherCache === undefined) {
// this.refreshWeatherCurrent();
// return;
// }
//
// let forecast = this.forecastWeatherCache;
// let beginOfDay = new Date(new Date().setHours(0, 0, 0, 0));
// let cnt = Math.min(this._days_forecast, forecast.length);
// if (cnt != this._days_forecast)
// this.rebuildFutureWeatherUi(cnt);
//
// // Refresh forecast
// for (let i = 0; i < cnt; i++) {
// let forecastUi = this._forecast[i];
// let forecastData = forecast[i];
// if (forecastData === undefined)
// continue;
//
// let t_low = forecastData.temperatureMin;
// let t_high = forecastData.temperatureMax;
//
// switch (this._units) {
// case WeatherUnits.FAHRENHEIT:
// t_low = this.toFahrenheit(t_low);
// t_high = this.toFahrenheit(t_high);
// break;
//
// case WeatherUnits.CELSIUS:
// t_low = t_low.toFixed(this._decimal_places);
// t_high = t_high.toFixed(this._decimal_places);
// break;
//
// case WeatherUnits.KELVIN:
// t_low = this.toKelvin(t_low);
// t_high = this.toKelvin(t_high);
// break;
//
// case WeatherUnits.RANKINE:
// t_low = this.toRankine(t_low);
// t_high = this.toRankine(t_high);
// break;
//
// case WeatherUnits.REAUMUR:
// t_low = this.toReaumur(t_low);
// t_high = this.toReaumur(t_high);
// break;
//
// case WeatherUnits.ROEMER:
// t_low = this.toRoemer(t_low);
// t_high = this.toRoemer(t_high);
// break;
//
// case WeatherUnits.DELISLE:
// t_low = this.toDelisle(t_low);
// t_high = this.toDelisle(t_high);
// break;
//
// case WeatherUnits.NEWTON:
// t_low = this.toNewton(t_low);
// t_high = this.toNewton(t_high);
// break;
// }
// let comment = forecastData.summary;
// let forecastDate = new Date(forecastData.time * 1000);
// let dayLeft = Math.floor((forecastDate.getTime() - beginOfDay.getTime()) / 86400000);
//
// let date_string = _("Today");
//
// let sunrise = new Date(forecastData.sunriseTime * 1000);
// let sunset = new Date(forecastData.sunsetTime * 1000);
//
// if (dayLeft === 0) {
// if (this._clockFormat == "24h") {
// sunrise = sunrise.toLocaleFormat("%R");
// sunset = sunset.toLocaleFormat("%R");
// } else {
// sunrise = sunrise.toLocaleFormat("%I:%M %p");
// sunset = sunset.toLocaleFormat("%I:%M %p");
// }
// this._currentWeatherSunrise.text = sunrise;
// this._currentWeatherSunset.text = sunset;
// } else if (dayLeft == 1)
// date_string = _("Tomorrow");
// else if (dayLeft > 1)
// date_string = _("In %d days").format(dayLeft);
// else if (dayLeft == -1)
// date_string = _("Yesterday");
// else if (dayLeft < -1)
// date_string = _("%d days ago").format(-1 * dayLeft);
//
// forecastUi.Day.text = date_string + ' (' + this.getLocaleDay(forecastDate.getDay()) + ')\n' + forecastDate.toLocaleDateString();
// forecastUi.Temperature.text = '\u2193 ' + parseFloat(t_low).toLocaleString() + ' ' + this.unit_to_unicode() + ' \u2191 ' + parseFloat(t_high).toLocaleString() + ' ' + this.unit_to_unicode();
// forecastUi.Summary.text = comment;
// forecastUi.Icon.icon_name = this.getWeatherIcon(forecastData.icon);
// }
// },
reloadWeatherForecast: function(interval) { reloadWeatherForecast: function(interval) {
if (this._timeoutForecast) { if (this._timeoutForecast) {
Mainloop.source_remove(this._timeoutForecast); Mainloop.source_remove(this._timeoutForecast);

@ -1,4 +1,39 @@
/* jshint esnext:true */ /* jshint esnext:true */
/*
*
* Weather extension for GNOME Shell
* - Displays a small weather information on the top panel.
* - On click, gives a popup with details about the weather.
*
* Copyright (C) 2011 - 2015
* ecyrbe <ecyrbe+spam@gmail.com>,
* Timur Kristof <venemo@msn.com>,
* Elad Alfassa <elad@fedoraproject.org>,
* Simon Legner <Simon.Legner@gmail.com>,
* Christian METZLER <neroth@xeked.com>,
* Mark Benjamin weather.gnome.Markie1@dfgh.net,
* Mattia Meneguzzo odysseus@fedoraproject.org,
* Meng Zhuo <mengzhuo1203+spam@gmail.com>,
* Jens Lody <jens@jenslody.de>
*
*
* This file is part of gnome-shell-extension-openweather.
*
* gnome-shell-extension-openweather is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gnome-shell-extension-openweather is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with gnome-shell-extension-openweather. If not, see <http://www.gnu.org/licenses/>.
*
*/
const WEATHER_URL_HOST = 'api.forecast.io'; const WEATHER_URL_HOST = 'api.forecast.io';
const WEATHER_URL_BASE = 'http://' + WEATHER_URL_HOST + '/forecast/'; const WEATHER_URL_BASE = 'http://' + WEATHER_URL_HOST + '/forecast/';

@ -1,4 +1,39 @@
/* jshint esnext:true */ /* jshint esnext:true */
/*
*
* Weather extension for GNOME Shell
* - Displays a small weather information on the top panel.
* - On click, gives a popup with details about the weather.
*
* Copyright (C) 2011 - 2015
* ecyrbe <ecyrbe+spam@gmail.com>,
* Timur Kristof <venemo@msn.com>,
* Elad Alfassa <elad@fedoraproject.org>,
* Simon Legner <Simon.Legner@gmail.com>,
* Christian METZLER <neroth@xeked.com>,
* Mark Benjamin weather.gnome.Markie1@dfgh.net,
* Mattia Meneguzzo odysseus@fedoraproject.org,
* Meng Zhuo <mengzhuo1203+spam@gmail.com>,
* Jens Lody <jens@jenslody.de>
*
*
* This file is part of gnome-shell-extension-openweather.
*
* gnome-shell-extension-openweather is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gnome-shell-extension-openweather is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with gnome-shell-extension-openweather. If not, see <http://www.gnu.org/licenses/>.
*
*/
const ExtensionUtils = imports.misc.extensionUtils; const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension(); const Me = ExtensionUtils.getCurrentExtension();

@ -4,7 +4,7 @@
* Weather extension for GNOME Shell preferences * Weather extension for GNOME Shell preferences
* - Creates a widget to set the preferences of the weather extension * - Creates a widget to set the preferences of the weather extension
* *
* Copyright (C) 2012 - 2014 * Copyright (C) 2012 - 2015
* Canek Peláez <canek@ciencias.unam.mx>, * Canek Peláez <canek@ciencias.unam.mx>,
* Christian METZLER <neroth@xeked.com>, * Christian METZLER <neroth@xeked.com>,
* Jens Lody <jens@jenslody.de>, * Jens Lody <jens@jenslody.de>,

Loading…
Cancel
Save