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 46 compatibility #136

Merged
merged 1 commit into from
Mar 10, 2024
Merged
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
GNOME 46 compatibility
Clutter.Container was removed

bumped versions
  • Loading branch information
ChrisLauinger77 committed Mar 1, 2024
commit 160771eec3ed930a990d92ec3af6f909e36e67a1
6 changes: 3 additions & 3 deletions src/helpers/shell/PanelButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion src/helpers/shell/ScrollingLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"url": "https://github.com/cliffniff/media-controls",
"settings-schema": "org.gnome.shell.extensions.mediacontrols",
"gettext-domain": "[email protected]",
"version-name": "2.0.0",
"shell-version": ["45"]
"version-name": "2.0.1",
"shell-version": ["45", "46"]
}
Loading