Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gnome shell 40 fix #260

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/metadata.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"uuid": "@uuid@",
"name": "Weather",
"description": "A simple extension for displaying weather information from several cities in GNOME Shell",
"shell-version": [ "3.8", "3.10", "3.12", "3.14", "3.16", "3.18", "3.20" ],
"shell-version": [ "3.8", "3.10", "3.12", "3.14", "3.16", "3.18", "3.20", "3.32", "3.34", "3.36", "40", "41" ],
"localedir": "@LOCALEDIR@",
"url": "@url@"
}
28 changes: 24 additions & 4 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ const WEATHER_SHOW_COMMENT_IN_PANEL_KEY = 'show-comment-in-panel'; // Weather ex
const WEATHER_WIND_DIRECTION_KEY = 'wind-direction'; // Weather extension setting
const WEATHER_DEBUG_EXTENSION = 'debug-extension'; // Weather extension setting

Clutter.Actor.prototype.raise_top = function raise_top() {
const parent = this.get_parent();
if (!parent) {
return;
}
parent.set_child_above_sibling(this, null);
}

Clutter.Actor.prototype.reparent = function reparent(newParent) {
const parent = this.get_parent();
if (parent) {
parent.remove_child(this);
}
newParent.add_child(this);
}

// Init Weather class //
const Weather = new Lang.Class(
{
Expand Down Expand Up @@ -159,11 +175,15 @@ const WEATHER_DEBUG_EXTENSION = 'debug-extension'; // Weather extension settin
this.location = this.city;
if(this.city_name)
{ this.status("Location ("+this.city_name+") loaded");
this.info = new GWeather.Info({location: this.location}); this.status("Information loaded");

this.info = new GWeather.Info({
application_id: 'org.gnome.Shell',
contact_info: 'https://gitlab.gnome.org/GNOME/gnome-shell/-/raw/master/gnome-shell.doap',
location: this.location,
});
this.status("Information loaded");
this.info.set_enabled_providers(GWeather.Provider.METAR |
GWeather.Provider.OWM |
GWeather.Provider.YR_NO);
GWeather.Provider.MET_NO |
GWeather.Provider.OWM);

this.infoC = this.info.connect("updated",function(){that.refresh();that.status(0);}); this.status("Information connection started");
}
Expand Down