Skip to content

Commit

Permalink
Add Gnome Shell 46 compatibility
Browse files Browse the repository at this point in the history
Replace removed Clutter methods:
  - add_actor() -> add_child()
  - remove_actor() -> remove_child()
  • Loading branch information
elvetemedve committed May 17, 2024
1 parent 62042d3 commit 507a05f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions [email protected]/metadata.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"shell-version": ["45"],
"shell-version": ["45","46"],
"uuid": "[email protected]",
"name": "System Monitor",
"description": "Display resource usage.\n\nLinux distribution specific installation instructions can be found in the wiki at https://github.com/elvetemedve/gnome-shell-extension-system-monitor/wiki/Installation.\n\nPlease report bugs here: https://github.com/elvetemedve/gnome-shell-extension-system-monitor/issues",
"settings-schema": "org.gnome.shell.extensions.system-monitor",
"gettext-domain": "[email protected]",
"url": "https://github.com/elvetemedve/gnome-shell-extension-system-monitor",
"version": "34"
"version": "35"
}
2 changes: 1 addition & 1 deletion [email protected]/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Menu extends PanelMenu.Button {
}
}
});
this.add_actor(this._layout);
this.add_child(this._layout);

this._initIconsAndWidgets();
this._addPositionSettingChangedHandler();
Expand Down
8 changes: 4 additions & 4 deletions [email protected]/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class BaseMenuItem extends PopupMenu.PopupBaseMenuItem {
}

if (position != -1) {
this.actor.remove_actor(this.icon);
this.actor.remove_child(this.icon);
this.icon = icon;
this.actor.insert_child_at_index(this.icon, position);
}
Expand Down Expand Up @@ -141,13 +141,13 @@ class ResourceTitleItem extends St.Widget {
style_class: 'resource-title'
});

this.add_actor(icon);
this.add_child(icon);

let leftLabel = new St.Label({text: text, style_class: 'resource-title-label', x_expand: true, y_expand: true, x_align: Clutter.ActorAlign.START, y_align: Clutter.ActorAlign.CENTER});
this.add_actor(leftLabel);
this.add_child(leftLabel);

this.#rightLabel = new St.Label({text: summary_text, style_class: 'resource-title-label', x_expand: true, y_expand: true, x_align: Clutter.ActorAlign.END, y_align: Clutter.ActorAlign.CENTER});
this.add_actor(this.#rightLabel);
this.add_child(this.#rightLabel);
}

setSummaryText(text) {
Expand Down

0 comments on commit 507a05f

Please sign in to comment.