Skip to content

Commit

Permalink
Fix GNOME Shell 46 support (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaelers committed Mar 29, 2024
1 parent 6822ad7 commit 5a6d524
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions changes.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
releases:
- version: 1.10.53
date: 2023-09-25T20:08:51+02:00
short: |-
Workrave 1.10.53 has been released. This release fixes GNOME 46 compatibility.
changes:
- Fix GNOME Shell 46 support (#532)

- version: 1.10.52
date: 2023-09-25T20:08:51+02:00
short: |-
Expand Down
11 changes: 9 additions & 2 deletions frontend/applets/gnome-shell-45/src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,16 @@ const WorkraveButton = GObject.registerClass(
this._area.connect("repaint", this._draw.bind(this));

this._box = new St.Bin();
this._box.add_actor(this._area);
if (typeof this._box.add_child === "function") {
this._box.add_child(this._area);
} else if (typeof this.add_actor === "function") {
this._box.add_actor(this._area);
}

if (typeof this.add_actor === "function") {
if (typeof this.actor.add_child === "function") {
this.actor.add_child(this._box);
this.actor.show();
} else if (typeof this.add_actor === "function") {
this.add_actor(this._box);
this.show();
} else {
Expand Down
3 changes: 2 additions & 1 deletion frontend/applets/gnome-shell-45/src/metadata.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"name": "Workrave",
"description": "Applet that shows all the Workrave timers.",
"shell-version": [
"45"
"45",
"46"
],
"gettext-domain": "workrave",
"localedir": "@LOCALEDIR@",
Expand Down

0 comments on commit 5a6d524

Please sign in to comment.