Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or may be) used from other modules with 'var' to cut down on warnings. https://bugzilla.gnome.org/show_bug.cgi?id=785084
This commit is contained in:
@ -11,13 +11,13 @@ const GnomeSession = imports.misc.gnomeSession;
|
||||
const Main = imports.ui.main;
|
||||
const ShellMountOperation = imports.ui.shellMountOperation;
|
||||
|
||||
const GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
|
||||
var GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
|
||||
|
||||
// GSettings keys
|
||||
const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';
|
||||
const SETTING_ENABLE_AUTOMOUNT = 'automount';
|
||||
|
||||
const AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
|
||||
var AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
|
||||
|
||||
var AutomountManager = new Lang.Class({
|
||||
Name: 'AutomountManager',
|
||||
@ -242,4 +242,4 @@ var AutomountManager = new Lang.Class({
|
||||
GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
|
||||
}
|
||||
});
|
||||
const Component = AutomountManager;
|
||||
var Component = AutomountManager;
|
||||
|
@ -15,7 +15,7 @@ const SETTING_START_APP = 'autorun-x-content-start-app';
|
||||
const SETTING_IGNORE = 'autorun-x-content-ignore';
|
||||
const SETTING_OPEN_FOLDER = 'autorun-x-content-open-folder';
|
||||
|
||||
const AutorunSetting = {
|
||||
var AutorunSetting = {
|
||||
RUN: 0,
|
||||
IGNORE: 1,
|
||||
FILES: 2,
|
||||
@ -378,4 +378,4 @@ var AutorunNotification = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const Component = AutorunManager;
|
||||
var Component = AutorunManager;
|
||||
|
@ -16,9 +16,9 @@ const ShellEntry = imports.ui.shellEntry;
|
||||
const CheckBox = imports.ui.checkBox;
|
||||
const Tweener = imports.ui.tweener;
|
||||
|
||||
const WORK_SPINNER_ICON_SIZE = 16;
|
||||
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||
const WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||
var WORK_SPINNER_ICON_SIZE = 16;
|
||||
var WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||
var WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||
|
||||
var KeyringDialog = new Lang.Class({
|
||||
Name: 'KeyringDialog',
|
||||
@ -311,4 +311,4 @@ var KeyringPrompter = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const Component = KeyringPrompter;
|
||||
var Component = KeyringPrompter;
|
||||
|
@ -798,4 +798,4 @@ var NetworkAgent = new Lang.Class({
|
||||
}
|
||||
}
|
||||
});
|
||||
const Component = NetworkAgent;
|
||||
var Component = NetworkAgent;
|
||||
|
@ -21,11 +21,11 @@ const ShellEntry = imports.ui.shellEntry;
|
||||
const UserWidget = imports.ui.userWidget;
|
||||
const Tweener = imports.ui.tweener;
|
||||
|
||||
const DIALOG_ICON_SIZE = 48;
|
||||
var DIALOG_ICON_SIZE = 48;
|
||||
|
||||
const WORK_SPINNER_ICON_SIZE = 16;
|
||||
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||
const WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||
var WORK_SPINNER_ICON_SIZE = 16;
|
||||
var WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||
var WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||
|
||||
var AuthenticationDialog = new Lang.Class({
|
||||
Name: 'AuthenticationDialog',
|
||||
@ -400,4 +400,4 @@ var AuthenticationAgent = new Lang.Class({
|
||||
},
|
||||
});
|
||||
|
||||
const Component = AuthenticationAgent;
|
||||
var Component = AuthenticationAgent;
|
||||
|
@ -29,25 +29,25 @@ const Util = imports.misc.util;
|
||||
const HAVE_TP = (Tp != null && Tpl != null);
|
||||
|
||||
// See Notification.appendMessage
|
||||
const SCROLLBACK_IMMEDIATE_TIME = 3 * 60; // 3 minutes
|
||||
const SCROLLBACK_RECENT_TIME = 15 * 60; // 15 minutes
|
||||
const SCROLLBACK_RECENT_LENGTH = 20;
|
||||
const SCROLLBACK_IDLE_LENGTH = 5;
|
||||
var SCROLLBACK_IMMEDIATE_TIME = 3 * 60; // 3 minutes
|
||||
var SCROLLBACK_RECENT_TIME = 15 * 60; // 15 minutes
|
||||
var SCROLLBACK_RECENT_LENGTH = 20;
|
||||
var SCROLLBACK_IDLE_LENGTH = 5;
|
||||
|
||||
// See Source._displayPendingMessages
|
||||
const SCROLLBACK_HISTORY_LINES = 10;
|
||||
var SCROLLBACK_HISTORY_LINES = 10;
|
||||
|
||||
// See Notification._onEntryChanged
|
||||
const COMPOSING_STOP_TIMEOUT = 5;
|
||||
var COMPOSING_STOP_TIMEOUT = 5;
|
||||
|
||||
const CHAT_EXPAND_LINES = 12;
|
||||
var CHAT_EXPAND_LINES = 12;
|
||||
|
||||
const NotificationDirection = {
|
||||
var NotificationDirection = {
|
||||
SENT: 'chat-sent',
|
||||
RECEIVED: 'chat-received'
|
||||
};
|
||||
|
||||
const N_ = function(s) { return s; };
|
||||
var N_ = function(s) { return s; };
|
||||
|
||||
function makeMessageFromTpMessage(tpMessage, direction) {
|
||||
let [text, flags] = tpMessage.to_text();
|
||||
@ -996,4 +996,4 @@ var ChatNotificationBanner = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const Component = TelepathyComponent;
|
||||
var Component = TelepathyComponent;
|
||||
|
Reference in New Issue
Block a user