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:
@ -13,7 +13,7 @@ const Main = imports.ui.main;
|
||||
const Params = imports.misc.params;
|
||||
const PopupMenu = imports.ui.popupMenu;
|
||||
|
||||
const ButtonBox = new Lang.Class({
|
||||
var ButtonBox = new Lang.Class({
|
||||
Name: 'ButtonBox',
|
||||
|
||||
_init: function(params) {
|
||||
@ -89,7 +89,7 @@ const ButtonBox = new Lang.Class({
|
||||
},
|
||||
});
|
||||
|
||||
const Button = new Lang.Class({
|
||||
var Button = new Lang.Class({
|
||||
Name: 'PanelMenuButton',
|
||||
Extends: ButtonBox,
|
||||
|
||||
@ -203,7 +203,7 @@ Signals.addSignalMethods(Button.prototype);
|
||||
* of an icon and a menu section, which will be composed into the
|
||||
* aggregate menu.
|
||||
*/
|
||||
const SystemIndicator = new Lang.Class({
|
||||
var SystemIndicator = new Lang.Class({
|
||||
Name: 'SystemIndicator',
|
||||
|
||||
_init: function() {
|
||||
|
Reference in New Issue
Block a user