Skip to content

Commit 8f36f20

Browse files
GNOME 48 support (#185)
* GNOME 48 support * MessageList.MediaSection instead of Mpris.MediaSection * orientation: Clutter.Orientation.VERTICAL * Clutter.Image removed use St.ImageContent * MessageList.MediaSection instead of Mpris.MediaSection * /ui/mpris.js/MediaSection has been renamed to /ui/mpris.js/MprisSource
1 parent a4d9aa0 commit 8f36f20

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

src/extension.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,16 +487,16 @@ export default class MediaControls extends Extension {
487487

488488
private updateMediaNotificationVisiblity(shouldReset = false) {
489489
if (this.mediaSectionAddFunc && (shouldReset || this.hideMediaNotification === false)) {
490-
Mpris.MediaSection.prototype._addPlayer = this.mediaSectionAddFunc;
490+
Mpris.MprisSource.prototype._addPlayer = this.mediaSectionAddFunc;
491491
this.mediaSectionAddFunc = null;
492492

493-
Main.panel.statusArea.dateMenu._messageList._mediaSection._onProxyReady();
493+
Main.panel.statusArea.dateMenu._messageList._messageView._mediaSource._onProxyReady();
494494
} else {
495-
this.mediaSectionAddFunc = Mpris.MediaSection.prototype._addPlayer;
496-
Mpris.MediaSection.prototype._addPlayer = function () {};
495+
this.mediaSectionAddFunc = Mpris.MprisSource.prototype._addPlayer;
496+
Mpris.MprisSource.prototype._addPlayer = function () {};
497497

498-
if (Main.panel.statusArea.dateMenu._messageList._mediaSection._players != null) {
499-
for (const player of Main.panel.statusArea.dateMenu._messageList._mediaSection._players.values()) {
498+
if (Main.panel.statusArea.dateMenu._messageList._messageView._mediaSource._players != null) {
499+
for (const player of Main.panel.statusArea.dateMenu._messageList._messageView._mediaSource._players.values()) {
500500
player._close();
501501
}
502502
}

src/helpers/shell/MenuSlider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MenuSlider extends St.BoxLayout {
1919
private rate: number;
2020

2121
constructor() {
22-
super({ vertical: true });
22+
super({ orientation: Clutter.Orientation.VERTICAL });
2323

2424
this.rate = 1.0;
2525
this.slider = new Slider.Slider(0);

src/helpers/shell/PanelButton.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class PanelButton extends PanelMenu.Button {
191191
private addMenuPlayers() {
192192
if (this.menuPlayers == null) {
193193
this.menuPlayers = new St.BoxLayout({
194-
vertical: true,
194+
orientation: Clutter.Orientation.VERTICAL,
195195
});
196196
}
197197

@@ -390,7 +390,7 @@ class PanelButton extends PanelMenu.Button {
390390
const height = width / aspectRatio;
391391
const format = pixbuf.hasAlpha ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888;
392392

393-
const image = St.ImageContent.new_with_preferred_size(width, height) as St.ImageContent & Clutter.Image;
393+
const image = St.ImageContent.new_with_preferred_size(width, height) as St.ImageContent;
394394
image.set_bytes(pixbuf.pixelBytes, format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
395395

396396
this.menuImage.iconSize = -1;
@@ -423,7 +423,7 @@ class PanelButton extends PanelMenu.Button {
423423
private addMenuLabels() {
424424
if (this.menuLabels == null) {
425425
this.menuLabels = new St.BoxLayout({
426-
vertical: true,
426+
orientation: Clutter.Orientation.VERTICAL,
427427
});
428428
}
429429

src/metadata.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"url": "https://github.com/cliffniff/media-controls",
66
"settings-schema": "org.gnome.shell.extensions.mediacontrols",
77
"gettext-domain": "mediacontrols@cliffniff.github.com",
8-
"version-name": "2.0.2",
9-
"shell-version": ["45", "46", "47"]
10-
}
8+
"version-name": "2.1.0",
9+
"shell-version": [
10+
"48"
11+
]
12+
}

0 commit comments

Comments
 (0)