Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible outside the module it's defined in need to be defined as global. For now gjs still allows the access for 'const', but get rid of the warnings spill now by changing it. https://bugzilla.gnome.org/show_bug.cgi?id=785084
This commit is contained in:
@ -22,7 +22,7 @@ const Util = imports.misc.util;
|
||||
const INPUT_SOURCE_TYPE_XKB = 'xkb';
|
||||
const INPUT_SOURCE_TYPE_IBUS = 'ibus';
|
||||
|
||||
const LayoutMenuItem = new Lang.Class({
|
||||
var LayoutMenuItem = new Lang.Class({
|
||||
Name: 'LayoutMenuItem',
|
||||
Extends: PopupMenu.PopupBaseMenuItem,
|
||||
|
||||
@ -37,7 +37,7 @@ const LayoutMenuItem = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const InputSource = new Lang.Class({
|
||||
var InputSource = new Lang.Class({
|
||||
Name: 'InputSource',
|
||||
|
||||
_init: function(type, id, displayName, shortName, index) {
|
||||
@ -78,7 +78,7 @@ const InputSource = new Lang.Class({
|
||||
});
|
||||
Signals.addSignalMethods(InputSource.prototype);
|
||||
|
||||
const InputSourcePopup = new Lang.Class({
|
||||
var InputSourcePopup = new Lang.Class({
|
||||
Name: 'InputSourcePopup',
|
||||
Extends: SwitcherPopup.SwitcherPopup,
|
||||
|
||||
@ -113,7 +113,7 @@ const InputSourcePopup = new Lang.Class({
|
||||
},
|
||||
});
|
||||
|
||||
const InputSourceSwitcher = new Lang.Class({
|
||||
var InputSourceSwitcher = new Lang.Class({
|
||||
Name: 'InputSourceSwitcher',
|
||||
Extends: SwitcherPopup.SwitcherList,
|
||||
|
||||
@ -139,7 +139,7 @@ const InputSourceSwitcher = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const InputSourceSettings = new Lang.Class({
|
||||
var InputSourceSettings = new Lang.Class({
|
||||
Name: 'InputSourceSettings',
|
||||
Abstract: true,
|
||||
|
||||
@ -177,7 +177,7 @@ const InputSourceSettings = new Lang.Class({
|
||||
});
|
||||
Signals.addSignalMethods(InputSourceSettings.prototype);
|
||||
|
||||
const InputSourceSystemSettings = new Lang.Class({
|
||||
var InputSourceSystemSettings = new Lang.Class({
|
||||
Name: 'InputSourceSystemSettings',
|
||||
Extends: InputSourceSettings,
|
||||
|
||||
@ -253,7 +253,7 @@ const InputSourceSystemSettings = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const InputSourceSessionSettings = new Lang.Class({
|
||||
var InputSourceSessionSettings = new Lang.Class({
|
||||
Name: 'InputSourceSessionSettings',
|
||||
Extends: InputSourceSettings,
|
||||
|
||||
@ -304,7 +304,7 @@ const InputSourceSessionSettings = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const InputSourceManager = new Lang.Class({
|
||||
var InputSourceManager = new Lang.Class({
|
||||
Name: 'InputSourceManager',
|
||||
|
||||
_init: function() {
|
||||
@ -774,7 +774,7 @@ function getInputSourceManager() {
|
||||
return _inputSourceManager;
|
||||
}
|
||||
|
||||
const InputSourceIndicator = new Lang.Class({
|
||||
var InputSourceIndicator = new Lang.Class({
|
||||
Name: 'InputSourceIndicator',
|
||||
Extends: PanelMenu.Button,
|
||||
|
||||
|
Reference in New Issue
Block a user