diff --git a/src/helpers/shell/PanelButton.ts b/src/helpers/shell/PanelButton.ts index 172970f..d9db4d8 100644 --- a/src/helpers/shell/PanelButton.ts +++ b/src/helpers/shell/PanelButton.ts @@ -568,7 +568,7 @@ class PanelButton extends PanelMenu.Button { tapAction.connect("tap", onClick); icon.add_action(tapAction); - const oldIcon = this.menuControls.find_child_by_name(options.name); + const oldIcon = this.menuControls.get_child_at_index(options.menuProps.index); if (oldIcon?.get_parent() === this.menuControls) { this.menuControls.replace_child(oldIcon, icon); @@ -716,7 +716,7 @@ class PanelButton extends PanelMenu.Button { icon.add_action(tapAction); - const oldIcon = this.buttonControls.find_child_by_name(options.name); + const oldIcon = this.buttonControls.get_child_at_index(options.panelProps.index); if (oldIcon != null) { this.buttonControls.replace_child(oldIcon, icon); @@ -726,7 +726,7 @@ class PanelButton extends PanelMenu.Button { } private removeButtonControlIcon(options: ControlIconOptions) { - const icon = this.buttonControls.find_child_by_name(options.name); + const icon = this.buttonControls.get_child_at_index(options.menuProps.index); if (icon != null) { this.buttonControls.remove_child(icon); diff --git a/src/helpers/shell/ScrollingLabel.ts b/src/helpers/shell/ScrollingLabel.ts index fa84fc1..cbc2071 100644 --- a/src/helpers/shell/ScrollingLabel.ts +++ b/src/helpers/shell/ScrollingLabel.ts @@ -64,7 +64,11 @@ class ScrollingLabel extends St.ScrollView { this.onShowChangedId = this.label.connect("show", this.onShowChanged.bind(this)); this.box.add_child(this.label); - this.add_actor(this.box); + if (Clutter.Container === undefined) { + this.add_child(this.box); + } else { + this.add_actor(this.box); + } } public pauseScrolling() { diff --git a/src/metadata.json b/src/metadata.json index c07402f..e2375da 100644 --- a/src/metadata.json +++ b/src/metadata.json @@ -5,6 +5,6 @@ "url": "https://github.com/cliffniff/media-controls", "settings-schema": "org.gnome.shell.extensions.mediacontrols", "gettext-domain": "mediacontrols@cliffniff.github.com", - "version-name": "2.0.0", - "shell-version": ["45"] + "version-name": "2.0.1", + "shell-version": ["45", "46"] }