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

@ -69,7 +69,7 @@ const Urgency = {
CRITICAL: 3
};
const FocusGrabber = new Lang.Class({
var FocusGrabber = new Lang.Class({
Name: 'FocusGrabber',
_init: function(actor) {
@ -132,7 +132,7 @@ const FocusGrabber = new Lang.Class({
// source, such as whether to play sound or honour the critical bit.
//
// A notification without a policy object will inherit the default one.
const NotificationPolicy = new Lang.Class({
var NotificationPolicy = new Lang.Class({
Name: 'NotificationPolicy',
_init: function(params) {
@ -153,7 +153,7 @@ const NotificationPolicy = new Lang.Class({
});
Signals.addSignalMethods(NotificationPolicy.prototype);
const NotificationGenericPolicy = new Lang.Class({
var NotificationGenericPolicy = new Lang.Class({
Name: 'NotificationGenericPolicy',
Extends: NotificationPolicy,
@ -202,7 +202,7 @@ const NotificationGenericPolicy = new Lang.Class({
}
});
const NotificationApplicationPolicy = new Lang.Class({
var NotificationApplicationPolicy = new Lang.Class({
Name: 'NotificationApplicationPolicy',
Extends: NotificationPolicy,
@ -328,7 +328,7 @@ const NotificationApplicationPolicy = new Lang.Class({
// If @params contains 'soundName' or 'soundFile', the corresponding
// event sound is played when the notification is shown (if the policy for
// @source allows playing sounds).
const Notification = new Lang.Class({
var Notification = new Lang.Class({
Name: 'Notification',
_init: function(source, title, banner, params) {
@ -489,7 +489,7 @@ const Notification = new Lang.Class({
});
Signals.addSignalMethods(Notification.prototype);
const NotificationBanner = new Lang.Class({
var NotificationBanner = new Lang.Class({
Name: 'NotificationBanner',
Extends: Calendar.NotificationMessage,
@ -585,7 +585,7 @@ const NotificationBanner = new Lang.Class({
}
});
const SourceActor = new Lang.Class({
var SourceActor = new Lang.Class({
Name: 'SourceActor',
_init: function(source, size) {
@ -642,7 +642,7 @@ const SourceActor = new Lang.Class({
}
});
const SourceActorWithLabel = new Lang.Class({
var SourceActorWithLabel = new Lang.Class({
Name: 'SourceActorWithLabel',
Extends: SourceActor,
@ -715,7 +715,7 @@ const SourceActorWithLabel = new Lang.Class({
}
});
const Source = new Lang.Class({
var Source = new Lang.Class({
Name: 'MessageTraySource',
SOURCE_ICON_SIZE: 48,
@ -840,7 +840,7 @@ const Source = new Lang.Class({
});
Signals.addSignalMethods(Source.prototype);
const MessageTray = new Lang.Class({
var MessageTray = new Lang.Class({
Name: 'MessageTray',
_init: function() {
@ -1485,7 +1485,7 @@ const MessageTray = new Lang.Class({
});
Signals.addSignalMethods(MessageTray.prototype);
const SystemNotificationSource = new Lang.Class({
var SystemNotificationSource = new Lang.Class({
Name: 'SystemNotificationSource',
Extends: Source,