From 1e4ba286bfeb79719d0542e177cbd41f3af1ca36 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Wed, 13 May 2020 19:18:01 +0100 Subject: [PATCH 1/2] Make it work with gnome-shell 3.36 Fixing "TypeError: this.actor.reparent is not a function", with reference from https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/pull/564 "Make it work with gnome-shell 3.36" --- src/extension.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/extension.js b/src/extension.js index 76195b1f..a50027b5 100644 --- a/src/extension.js +++ b/src/extension.js @@ -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( { From 04cc2081e659cf030ba252c43be2a9ec4c9355fb Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Wed, 13 May 2020 19:21:14 +0100 Subject: [PATCH 2/2] Bump supported versions up to 3.36 This seems to have no effect on Fedora 32; but should not hurt. --- data/metadata.json.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/metadata.json.in b/data/metadata.json.in index 806e563e..0990a1f6 100644 --- a/data/metadata.json.in +++ b/data/metadata.json.in @@ -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" ], "localedir": "@LOCALEDIR@", "url": "@url@" }