Skip to content
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
12 changes: 6 additions & 6 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,16 @@ export default class MediaControls extends Extension {

private updateMediaNotificationVisiblity(shouldReset = false) {
if (this.mediaSectionAddFunc && (shouldReset || this.hideMediaNotification === false)) {
Mpris.MediaSection.prototype._addPlayer = this.mediaSectionAddFunc;
Mpris.MprisSource.prototype._addPlayer = this.mediaSectionAddFunc;
this.mediaSectionAddFunc = null;

Main.panel.statusArea.dateMenu._messageList._mediaSection._onProxyReady();
Main.panel.statusArea.dateMenu._messageList._messageView._mediaSource._onProxyReady();
} else {
this.mediaSectionAddFunc = Mpris.MediaSection.prototype._addPlayer;
Mpris.MediaSection.prototype._addPlayer = function () {};
this.mediaSectionAddFunc = Mpris.MprisSource.prototype._addPlayer;
Mpris.MprisSource.prototype._addPlayer = function () {};

if (Main.panel.statusArea.dateMenu._messageList._mediaSection._players != null) {
for (const player of Main.panel.statusArea.dateMenu._messageList._mediaSection._players.values()) {
if (Main.panel.statusArea.dateMenu._messageList._messageView._mediaSource._players != null) {
for (const player of Main.panel.statusArea.dateMenu._messageList._messageView._mediaSource._players.values()) {
player._close();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/shell/MenuSlider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MenuSlider extends St.BoxLayout {
private rate: number;

constructor() {
super({ vertical: true });
super({ orientation: Clutter.Orientation.VERTICAL });

this.rate = 1.0;
this.slider = new Slider.Slider(0);
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/shell/PanelButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class PanelButton extends PanelMenu.Button {
private addMenuPlayers() {
if (this.menuPlayers == null) {
this.menuPlayers = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
}

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

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

this.menuImage.iconSize = -1;
Expand Down Expand Up @@ -423,7 +423,7 @@ class PanelButton extends PanelMenu.Button {
private addMenuLabels() {
if (this.menuLabels == null) {
this.menuLabels = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
}

Expand Down
8 changes: 5 additions & 3 deletions src/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"url": "https://github.com/cliffniff/media-controls",
"settings-schema": "org.gnome.shell.extensions.mediacontrols",
"gettext-domain": "mediacontrols@cliffniff.github.com",
"version-name": "2.0.2",
"shell-version": ["45", "46", "47"]
}
"version-name": "2.1.0",
"shell-version": [
"48"
]
}