Fix extra comma on older gnome-shell versions

This commit is contained in:
Charles Gagnon
2019-03-22 22:00:18 -04:00
parent b3aecfce1d
commit 58485a42f5
2 changed files with 4 additions and 7 deletions

View File

@@ -114,7 +114,7 @@ function disable(reset) {
'open-application-menu',
new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
Lang.bind(Main.wm, Main.wm._toggleAppMenu),
Shell.ActionMode.NORMAL | Shell.ActionMode.POPUP,
Shell.ActionMode.NORMAL | Shell.ActionMode.POPUP
);
if (!reset) {

View File

@@ -25,18 +25,15 @@ const Gi = imports._gi;
const GObject = imports.gi.GObject;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
let es6Support = imports.misc.config.PACKAGE_VERSION >= '3.31.9';
var TRANSLATION_DOMAIN = imports.misc.extensionUtils.getCurrentExtension().metadata['gettext-domain'];
var defineClass = function (classDef) {
let parentProto = classDef.Extends ? classDef.Extends.prototype : null;
if (!es6Support) {
if (imports.misc.config.PACKAGE_VERSION < '3.31.9') {
if (parentProto && (classDef.Extends.name || classDef.Extends.toString()).indexOf('DashToPanel.') < 0) {
classDef.callParent = function() {
let args = Array.prototype.slice.call(arguments);
@@ -46,11 +43,11 @@ var defineClass = function (classDef) {
};
}
return new Lang.Class(classDef);
return new imports.lang.Class(classDef);
}
let isGObject = parentProto instanceof GObject.Object;
let needsSuper = es6Support && parentProto && !isGObject;
let needsSuper = parentProto && !isGObject;
let getParentArgs = function(args) {
let parentArgs = [];