diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 7dccb448f..78bf29dd9 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -188,10 +188,10 @@ var AuthPrompt = GObject.registerClass({ this._entry = null; this._textEntry = new St.Entry(entryParams); - ShellEntry.addContextMenu(this._textEntry, { actionMode: Shell.ActionMode.NONE }); + ShellEntry.addContextMenu(this._textEntry, {actionMode: Shell.ActionMode.NONE}); this._passwordEntry = new St.PasswordEntry(entryParams); - ShellEntry.addContextMenu(this._passwordEntry, { actionMode: Shell.ActionMode.NONE }); + ShellEntry.addContextMenu(this._passwordEntry, {actionMode: Shell.ActionMode.NONE}); this._entry = this._passwordEntry; this._mainBox.add_child(this._entry); diff --git a/js/gdm/util.js b/js/gdm/util.js index 1d62517c3..18a6c09c0 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -534,7 +534,7 @@ var ShellUserVerifier = class extends Signals.EventEmitter { } serviceIsForeground(serviceName) { - return serviceName == this._getForegroundService(); + return serviceName === this._getForegroundService(); } foregroundServiceDeterminesUsername() { diff --git a/js/misc/modemManager.js b/js/misc/modemManager.js index d6b906cf2..c95bd3c51 100644 --- a/js/misc/modemManager.js +++ b/js/misc/modemManager.js @@ -8,12 +8,16 @@ const NMA4 = imports.gi.NMA4; const { loadInterfaceXML } = imports.misc.fileUtils; -// _getMobileProvidersDatabase: -// -// Gets the database of mobile providers, with references between MCCMNC/SID and -// operator name -// let _mpd; + +/** + * _getMobileProvidersDatabase: + * + * Gets the database of mobile providers, with references between MCCMNC/SID and + * operator name + * + * @returns {NMA4.MobileProvidersDatabase | null} + */ function _getMobileProvidersDatabase() { if (_mpd == null) { try { diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js index ddc9560db..36da63cd9 100644 --- a/js/misc/systemActions.js +++ b/js/misc/systemActions.js @@ -148,9 +148,9 @@ const SystemActions = GObject.registerClass({ available: true, }); - this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA }); - this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA }); - this._orientationSettings = new Gio.Settings({ schema_id: 'org.gnome.settings-daemon.peripherals.touchscreen' }); + this._loginScreenSettings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA}); + this._lockdownSettings = new Gio.Settings({schema_id: LOCKDOWN_SCHEMA}); + this._orientationSettings = new Gio.Settings({schema_id: 'org.gnome.settings-daemon.peripherals.touchscreen'}); this._session = new GnomeSession.SessionManager(); this._loginManager = LoginManager.getLoginManager(); diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index 23a385057..ee3bd7cbd 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -58,7 +58,7 @@ class AccessDialog extends ModalDialog.ModalDialog { let check = new CheckBox.CheckBox(); check.getLabelActor().text = name; - check.checked = selected == "true"; + check.checked = selected === 'true'; content.add_child(check); this._choices.set(id, check); diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 372fcd563..3f9334eae 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -2153,7 +2153,7 @@ class FolderView extends BaseAppView { if (appIndex === -1) return [-1, -1]; - const { itemsPerPage } = this._grid; + const {itemsPerPage} = this._grid; return [Math.floor(appIndex / itemsPerPage), appIndex % itemsPerPage]; } diff --git a/js/ui/layout.js b/js/ui/layout.js index 3d0f2c5ff..cbd28c38a 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -335,9 +335,9 @@ var LayoutManager = GObject.registerClass({ let display = global.display; display.connect('restacked', - this._windowsRestacked.bind(this)); + this._windowsRestacked.bind(this)); display.connect('in-fullscreen-changed', - this._updateFullscreen.bind(this)); + this._updateFullscreen.bind(this)); const monitorManager = global.backend.get_monitor_manager(); monitorManager.connectObject( diff --git a/js/ui/mpris.js b/js/ui/mpris.js index 6ccf88de9..5d1a4f275 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -71,7 +71,7 @@ class MediaMessage extends MessageList.Message { if (this._player.trackCoverUrl) { let file = Gio.File.new_for_uri(this._player.trackCoverUrl); - this._icon.gicon = new Gio.FileIcon({ file }); + this._icon.gicon = new Gio.FileIcon({file}); this._icon.remove_style_class_name('fallback'); } else if (this._player.app) { this._icon.gicon = this._player.app.icon; diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 59d70e406..c24416da1 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -506,7 +506,7 @@ class ControlsManager extends St.Widget { () => this._shiftState(Meta.MotionDirection.UP)); Main.wm.addKeybinding('shift-overview-down', - new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }), + new Gio.Settings({schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA}), Meta.KeyBindingFlags.IGNORE_AUTOREPEAT, Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, () => this._shiftState(Meta.MotionDirection.DOWN)); diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index 364cc16e9..fa6d3d097 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -104,7 +104,7 @@ var KeybindingEntry = GObject.registerClass({ Signals: { 'keybinding-edited': { param_types: [GObject.TYPE_STRING] } }, }, class KeybindingEntry extends St.Entry { _init() { - super._init({ hint_text: _("New shortcut…"), style: 'width: 10em' }); + super._init({hint_text: _('New shortcut…'), style: 'width: 10em'}); } vfunc_captured_event(event) { diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 32c384b8c..547ce08f4 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -239,7 +239,7 @@ var PopupBaseMenuItem = GObject.registerClass({ } setOrnament(ornament) { - if (ornament == this._ornament) + if (ornament === this._ornament) return; this._ornament = ornament; diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index d4eba58fd..8a10d7fe3 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -94,10 +94,10 @@ var ScreenShield = class extends Signals.EventEmitter { this._smartcardManager = SmartcardManager.getSmartcardManager(); this._smartcardManager.connect('smartcard-inserted', - (manager, token) => { - if (this._isLocked && token.UsedToLogin) - this._activateDialog(); - }); + (manager, token) => { + if (this._isLocked && token.UsedToLogin) + this._activateDialog(); + }); this._credentialManagers = {}; this.addCredentialManager(OVirt.SERVICE_NAME, OVirt.getOVirtCredentialsManager()); diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 9c57f0015..86b62c149 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -1272,7 +1272,7 @@ var ScreenshotUI = GObject.registerClass({ this._shotButton.bind_property('checked', this._castButton, 'checked', GObject.BindingFlags.BIDIRECTIONAL | GObject.BindingFlags.INVERT_BOOLEAN); - this._captureButton = new St.Button({ style_class: 'screenshot-ui-capture-button' }); + this._captureButton = new St.Button({style_class: 'screenshot-ui-capture-button'}); this._captureButton.set_child(new St.Widget({ style_class: 'screenshot-ui-capture-button-circle', })); diff --git a/js/ui/search.js b/js/ui/search.js index fc71f2143..348f39799 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -540,7 +540,7 @@ class GridSearchResults extends SearchResultsBase { }); var SearchResultsView = GObject.registerClass({ - Signals: { 'terms-changed': {} }, + Signals: {'terms-changed': {}}, }, class SearchResultsView extends St.BoxLayout { _init() { super._init({ diff --git a/js/ui/searchController.js b/js/ui/searchController.js index 3a290fc17..d34fe54f2 100644 --- a/js/ui/searchController.js +++ b/js/ui/searchController.js @@ -324,9 +324,10 @@ var SearchController = GObject.registerClass({ /** * addProvider: - * @param {object} provider - a search provider implementation * * Add a search provider to the controller. + * + * @param {object} provider - a search provider implementation */ addProvider(provider) { this._searchResults._registerProvider(provider); @@ -334,9 +335,10 @@ var SearchController = GObject.registerClass({ /** * removeProvider: - * @param {object} provider - a search provider implementation * * Remove a search provider from the controller. + * + * @param {object} provider - a search provider implementation */ removeProvider(provider) { this._searchResults._unregisterProvider(provider); diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index 30db22fed..86ec781fc 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -289,17 +289,17 @@ var ShellMountPasswordDialog = GObject.registerClass({ let curGridRow = 0; if (flags & Gio.AskPasswordFlags.TCRYPT) { - this._hiddenVolume = new CheckBox.CheckBox(_("Hidden Volume")); + this._hiddenVolume = new CheckBox.CheckBox(_('Hidden Volume')); content.add_child(this._hiddenVolume); - this._systemVolume = new CheckBox.CheckBox(_("Windows System Volume")); + this._systemVolume = new CheckBox.CheckBox(_('Windows System Volume')); content.add_child(this._systemVolume); - this._keyfilesCheckbox = new CheckBox.CheckBox(_("Uses Keyfiles")); - this._keyfilesCheckbox.connect("clicked", this._onKeyfilesCheckboxClicked.bind(this)); + this._keyfilesCheckbox = new CheckBox.CheckBox(_('Uses Keyfiles')); + this._keyfilesCheckbox.connect('clicked', this._onKeyfilesCheckboxClicked.bind(this)); content.add_child(this._keyfilesCheckbox); - this._keyfilesLabel = new St.Label({ visible: false }); + this._keyfilesLabel = new St.Label({visible: false}); if (disksApp) { this._keyfilesLabel.clutter_text.set_markup( /* Translators: %s is the Disks application */ @@ -374,7 +374,7 @@ var ShellMountPasswordDialog = GObject.registerClass({ content.add_child(passwordGrid); if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) { - this._rememberChoice = new CheckBox.CheckBox(_("Remember Password")); + this._rememberChoice = new CheckBox.CheckBox(_('Remember Password')); this._rememberChoice.checked = global.settings.get_boolean(REMEMBER_MOUNT_PASSWORD_KEY); content.add_child(this._rememberChoice); @@ -385,17 +385,17 @@ var ShellMountPasswordDialog = GObject.registerClass({ this.contentLayout.add_child(content); this._defaultButtons = [{ - label: _("Cancel"), + label: _('Cancel'), action: this._onCancelButton.bind(this), key: Clutter.KEY_Escape, }, { - label: _("Unlock"), + label: _('Unlock'), action: this._onUnlockButton.bind(this), default: true, }]; this._usesKeyfilesButtons = [{ - label: _("Cancel"), + label: _('Cancel'), action: this._onCancelButton.bind(this), key: Clutter.KEY_Escape, }]; diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js index a65b2bb6e..e088512c5 100644 --- a/js/ui/status/accessibility.js +++ b/js/ui/status/accessibility.js @@ -74,7 +74,7 @@ class ATIndicator extends PanelMenu.Button { let bounceKeys = this._buildItem(_("Bounce Keys"), A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED); this.menu.addMenuItem(bounceKeys); - let mouseKeys = this._buildItem(_("Mouse Keys"), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED); + let mouseKeys = this._buildItem(_('Mouse Keys'), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED); this.menu.addMenuItem(mouseKeys); this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index d570cb471..499c89b89 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -413,7 +413,7 @@ var InputSourceManager = class extends Signals.EventEmitter { // effect without considerable work to consolidate the usage // of pushModal/popModal and grabHelper. See // https://bugzilla.gnome.org/show_bug.cgi?id=695143 . - if (Main.actionMode == Shell.ActionMode.POPUP) { + if (Main.actionMode === Shell.ActionMode.POPUP) { this._modifiersSwitcher(); return; } diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index a25fdc51a..21c73a1f1 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -329,7 +329,7 @@ var WorkspaceTracker = class { _windowEnteredMonitor(metaDisplay, monitorIndex, _metaWin) { // If the window entered the primary monitor, that // might make that workspace non-empty - if (monitorIndex == Main.layoutManager.primaryIndex) + if (monitorIndex === Main.layoutManager.primaryIndex) this._queueCheckWorkspaces(); } diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js index a58ee7949..72a65df53 100644 --- a/js/ui/windowMenu.js +++ b/js/ui/windowMenu.js @@ -58,7 +58,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu { if (!window.can_maximize()) item.setSensitive(false); - item = this.addAction(_("Move"), event => { + item = this.addAction(_('Move'), event => { const device = event.get_device(); const seat = device.get_seat(); const deviceType = device.get_device_type(); @@ -77,7 +77,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu { if (!window.allows_move()) item.setSensitive(false); - item = this.addAction(_("Resize"), event => { + item = this.addAction(_('Resize'), event => { const device = event.get_device(); const seat = device.get_seat(); const deviceType = device.get_device_type();