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:
Florian Müllner
2017-07-18 19:41:25 +02:00
parent 9e32ba61fd
commit 2582d16ca7
109 changed files with 363 additions and 363 deletions

View File

@ -36,7 +36,7 @@ function isPopupMetaWindow(actor) {
}
}
const MonitorConstraint = new Lang.Class({
var MonitorConstraint = new Lang.Class({
Name: 'MonitorConstraint',
Extends: Clutter.Constraint,
Properties: {'primary': GObject.ParamSpec.boolean('primary',
@ -147,7 +147,7 @@ const MonitorConstraint = new Lang.Class({
}
});
const Monitor = new Lang.Class({
var Monitor = new Lang.Class({
Name: 'Monitor',
_init: function(index, geometry) {
@ -169,7 +169,7 @@ const defaultParams = {
affectsInputRegion: true
};
const LayoutManager = new Lang.Class({
var LayoutManager = new Lang.Class({
Name: 'LayoutManager',
_init: function () {
@ -1045,7 +1045,7 @@ Signals.addSignalMethods(LayoutManager.prototype);
//
// This class manages a "hot corner" that can toggle switching to
// overview.
const HotCorner = new Lang.Class({
var HotCorner = new Lang.Class({
Name: 'HotCorner',
_init : function(layoutManager, monitor, x, y) {
@ -1239,7 +1239,7 @@ const HotCorner = new Lang.Class({
}
});
const PressureBarrier = new Lang.Class({
var PressureBarrier = new Lang.Class({
Name: 'PressureBarrier',
_init: function(threshold, timeout, actionMode) {