Commit 07acf4fa authored by Lubosz Sarnecki's avatar Lubosz Sarnecki
Browse files

extension: Port to GNOME Shell 3.36.

Call GObject.registerClass.
Use new constructor.
Fix icon registration, fix switch constructor.
metadata: Support GNOME 3.36.
parent 3fe22ecf
......@@ -12,6 +12,7 @@ const Tweener = imports.ui.tweener;
const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const GnomeDesktop = imports.gi.GnomeDesktop;
const Gdk = imports.gi.Gdk;
......@@ -43,18 +44,17 @@ function _sync() {
_vrswitch.setToggleState(_proxy.enabled);
}
var VRControlIndicator = GObject.registerClass(
class VRControlIndicator extends PanelMenu.Button {
constructor() {
super(0.0, "xrdesktop Control");
_init() {
super._init(0.0, "xrdesktop Control");
let icon = new St.Icon({style_class: 'gnome-vr-icon'});
this.actor.add_actor(icon);
this.add_child(new St.Icon({ style_class: 'gnome-vr-icon' }));
this.menu_section = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(this.menu_section);
_vrswitch = new PopupMenu.PopupSwitchMenuItem("Mirror to XR");
_vrswitch = new PopupMenu.PopupSwitchMenuItem("Mirror to XR", false);
this.menu_section.addMenuItem(_vrswitch);
this.menu.connect('open-state-changed', _sync);
......@@ -86,7 +86,7 @@ class VRControlIndicator extends PanelMenu.Button {
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addMenuItem(settings_item);
}
};
});
let indicator;
......
......@@ -2,5 +2,5 @@
"name": "xrdesktop extension",
"description": "Control xrdesktop.",
"uuid": "xrdesktop-extension@collabora.com",
"shell-version": ["3.28", "3.30", "3.32", "3.34"]
"shell-version": ["3.28", "3.30", "3.32", "3.34", "3.36"]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment