From 7ac35c644e45f7ee7d73dac784fa7f2d1e2e129f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 29 Jan 2019 02:27:05 +0100 Subject: [PATCH] style: Fix stray/missing spaces Spotted by eslint. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607 --- js/gdm/authPrompt.js | 2 +- js/gdm/loginDialog.js | 2 +- js/misc/history.js | 2 +- js/misc/jsParse.js | 10 +++++----- js/misc/keyboardManager.js | 2 +- js/misc/smartcardManager.js | 2 +- js/misc/systemActions.js | 2 +- js/misc/util.js | 6 +++--- js/perf/core.js | 4 ++-- js/perf/hwtest.js | 4 ++-- js/portalHelper/main.js | 2 +- js/ui/accessDialog.js | 2 +- js/ui/altTab.js | 6 +++--- js/ui/animation.js | 2 +- js/ui/appDisplay.js | 12 +++++------ js/ui/audioDeviceSelection.js | 4 ++-- js/ui/boxpointer.js | 12 +++++------ js/ui/calendar.js | 10 +++++----- js/ui/closeDialog.js | 10 +++++----- js/ui/components/networkAgent.js | 12 +++++------ js/ui/components/polkitAgent.js | 14 ++++++------- js/ui/dash.js | 4 ++-- js/ui/dialog.js | 24 +++++++++++----------- js/ui/endSessionDialog.js | 26 ++++++++++++------------ js/ui/environment.js | 2 +- js/ui/extensionDownloader.js | 4 ++-- js/ui/ibusCandidatePopup.js | 6 +++--- js/ui/iconGrid.js | 34 ++++++++++++++++---------------- js/ui/keyboard.js | 26 ++++++++++++------------ js/ui/layout.js | 4 ++-- js/ui/locatePointer.js | 2 +- js/ui/lookingGlass.js | 4 ++-- js/ui/magnifier.js | 22 ++++++++++----------- js/ui/messageList.js | 8 ++++---- js/ui/modalDialog.js | 2 +- js/ui/notificationDaemon.js | 6 +++--- js/ui/padOsd.js | 8 ++++---- js/ui/panel.js | 2 +- js/ui/panelMenu.js | 2 +- js/ui/screenShield.js | 8 ++++---- js/ui/screenshot.js | 4 ++-- js/ui/shellMountOperation.js | 8 ++++---- js/ui/status/accessibility.js | 2 +- js/ui/status/bluetooth.js | 6 +++--- js/ui/status/keyboard.js | 2 +- js/ui/status/network.js | 22 ++++++++++----------- js/ui/switchMonitor.js | 8 ++++---- js/ui/tweener.js | 2 +- js/ui/windowAttentionHandler.js | 2 +- js/ui/windowManager.js | 16 +++++++-------- js/ui/workspace.js | 6 +++--- js/ui/workspaceSwitcherPopup.js | 2 +- js/ui/workspaceThumbnail.js | 18 ++++++++--------- js/ui/workspacesView.js | 2 +- js/ui/xdndHandler.js | 6 +++--- 55 files changed, 211 insertions(+), 211 deletions(-) diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index d7f53a92e..d4cc9f06d 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -112,7 +112,7 @@ var AuthPrompt = class { this._buttonBox = new St.BoxLayout({ style_class: 'login-dialog-button-box', vertical: false }); this.actor.add(this._buttonBox, - { expand: true, + { expand: true, x_align: St.Align.MIDDLE, y_align: St.Align.END }); diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index e6df865cc..7f3c7ed97 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -150,7 +150,7 @@ Signals.addSignalMethods(UserListItem.prototype); var UserList = class { constructor() { - this.actor = new St.ScrollView({ style_class: 'login-dialog-user-list-view'}); + this.actor = new St.ScrollView({ style_class: 'login-dialog-user-list-view' }); this.actor.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC); diff --git a/js/misc/history.js b/js/misc/history.js index fbe1c088f..3719e9c6c 100644 --- a/js/misc/history.js +++ b/js/misc/history.js @@ -66,7 +66,7 @@ var HistoryManager = class { this._indexChanged(); } - return this._historyIndex ? this._history[this._historyIndex -1] : null; + return this._historyIndex ? this._history[this._historyIndex - 1] : null; } addItem(input) { diff --git a/js/misc/jsParse.js b/js/misc/jsParse.js index 08ef7d555..4ba7393d0 100644 --- a/js/misc/jsParse.js +++ b/js/misc/jsParse.js @@ -58,7 +58,7 @@ function isStopChar(c) { function findMatchingQuote(expr, offset) { let quoteChar = expr.charAt(offset); for (let i = offset - 1; i >= 0; --i) { - if (expr.charAt(i) == quoteChar && expr.charAt(i-1) != '\\'){ + if (expr.charAt(i) == quoteChar && expr.charAt(i - 1) != '\\') { return i; } } @@ -68,7 +68,7 @@ function findMatchingQuote(expr, offset) { // Given the ending position of a regex, find where it starts function findMatchingSlash(expr, offset) { for (let i = offset - 1; i >= 0; --i) { - if (expr.charAt(i) == '/' && expr.charAt(i-1) != '\\'){ + if (expr.charAt(i) == '/' && expr.charAt(i - 1) != '\\') { return i; } } @@ -81,7 +81,7 @@ function findMatchingSlash(expr, offset) { // findMatchingBrace("[(])", 3) returns 1. function findMatchingBrace(expr, offset) { let closeBrace = expr.charAt(offset); - let openBrace = ({')': '(', ']': '['})[closeBrace]; + let openBrace = ({ ')': '(', ']': '[' })[closeBrace]; function findTheBrace(expr, offset) { if (offset < 0) { @@ -117,7 +117,7 @@ function getExpressionOffset(expr, offset) { while (offset >= 0) { let currChar = expr.charAt(offset); - if (isStopChar(currChar)){ + if (isStopChar(currChar)) { return offset + 1; } @@ -168,7 +168,7 @@ function getPropertyNamesFromExpression(expr, commandHeader) { } let propsUnique = {}; - if (typeof obj === 'object'){ + if (typeof obj === 'object') { let allProps = getAllProps(obj); // Get only things we are allowed to complete following a '.' allProps = allProps.filter( isValidPropertyName ); diff --git a/js/misc/keyboardManager.js b/js/misc/keyboardManager.js index ae71b646e..c3cc336dd 100644 --- a/js/misc/keyboardManager.js +++ b/js/misc/keyboardManager.js @@ -60,7 +60,7 @@ var KeyboardManager = class { this._currentKeymap.options == options) return; - this._currentKeymap = {layouts, variants, options}; + this._currentKeymap = { layouts, variants, options }; Meta.get_backend().set_keymap(layouts, variants, options); } diff --git a/js/misc/smartcardManager.js b/js/misc/smartcardManager.js index fda782d1e..890ca9a89 100644 --- a/js/misc/smartcardManager.js +++ b/js/misc/smartcardManager.js @@ -29,7 +29,7 @@ var SmartcardManager = class { this._objectManager = new ObjectManager.ObjectManager({ connection: Gio.DBus.session, name: "org.gnome.SettingsDaemon.Smartcard", objectPath: '/org/gnome/SettingsDaemon/Smartcard', - knownInterfaces: [ SmartcardTokenIface ], + knownInterfaces: [SmartcardTokenIface], onLoaded: this._onLoaded.bind(this) }); this._insertedTokens = {}; this._loginToken = null; diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js index 0a41964b3..cbc3e25b9 100644 --- a/js/misc/systemActions.js +++ b/js/misc/systemActions.js @@ -261,7 +261,7 @@ const SystemActions = GObject.registerClass({ let results = []; - for (let [key, {available, keywords}] of this._actions) + for (let [key, { available, keywords }] of this._actions) if (available && terms.every(t => keywords.some(k => k.startsWith(t)))) results.push(key); diff --git a/js/misc/util.js b/js/misc/util.js index bfe9cfed8..a5ad0b0a2 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -222,7 +222,7 @@ function formatTime(time, params) { /* Translators: Time in 24h format */ format = N_("%H\u2236%M"); // Show the word "Yesterday" and time if date is on yesterday - else if (daysAgo <2) + else if (daysAgo < 2) /* Translators: this is the word "Yesterday" followed by a time string in 24h format. i.e. "Yesterday, 14:30" */ // xgettext:no-c-format @@ -251,7 +251,7 @@ function formatTime(time, params) { /* Translators: Time in 12h format */ format = N_("%l\u2236%M %p"); // Show the word "Yesterday" and time if date is on yesterday - else if (daysAgo <2) + else if (daysAgo < 2) /* Translators: this is the word "Yesterday" followed by a time string in 12h format. i.e. "Yesterday, 2:30 pm" */ // xgettext:no-c-format @@ -346,7 +346,7 @@ function insertSorted(array, val, cmp) { var CloseButton = GObject.registerClass( class CloseButton extends St.Button { _init(boxpointer) { - super._init({ style_class: 'notification-close'}); + super._init({ style_class: 'notification-close' }); // This is a bit tricky. St.Bin has its own x-align/y-align properties // that compete with Clutter's properties. This should be fixed for diff --git a/js/perf/core.js b/js/perf/core.js index 2f78fde07..17a37c6a9 100644 --- a/js/perf/core.js +++ b/js/perf/core.js @@ -19,7 +19,7 @@ var METRICS = { units: "frames / s" }, overviewLatencySubsequent: { description: "Time to first frame after triggering overview, second time", - units: "us"}, + units: "us" }, overviewFpsSubsequent: { description: "Frames rate when going to the overview, second time", units: "frames / s" }, @@ -52,7 +52,7 @@ var METRICS = { units: "us" }, applicationsShowTimeSubsequent: { description: "Time to switch to applications view, second time", - units: "us"} + units: "us" } }; let WINDOW_CONFIGS = [ diff --git a/js/perf/hwtest.js b/js/perf/hwtest.js index f9fb298b2..cf16b06bb 100644 --- a/js/perf/hwtest.js +++ b/js/perf/hwtest.js @@ -157,7 +157,7 @@ function *run() { Main.overview.hide(); yield Scripting.createTestWindow({ maximized: true, - redraws: true}); + redraws: true }); yield Scripting.waitTestWindows(); yield Scripting.sleep(1000); @@ -269,7 +269,7 @@ function script_collectTimings(time) { if (len == 0) median = -1; else if (len % 2 == 1) - median = times[(len - 1)/ 2]; + median = times[(len - 1) / 2]; else median = Math.round((times[len / 2 - 1] + times[len / 2]) / 2); diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js index eae433a69..bd5fa9e30 100644 --- a/js/portalHelper/main.js +++ b/js/portalHelper/main.js @@ -58,7 +58,7 @@ class PortalHeaderBar extends Gtk.HeaderBar { single_line_mode: true, ellipsize: Pango.EllipsizeMode.END, valign: Gtk.Align.BASELINE, - selectable: true}); + selectable: true }); this.subtitleLabel.get_style_context().add_class('subtitle'); hbox.add(this.subtitleLabel); diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index 6f9b7f9a0..a13bfa831 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -69,7 +69,7 @@ class AccessDialog extends ModalDialog.ModalDialog { this.addButton({ label: grantLabel, action: () => { this._sendResponse(DialogResponse.OK); - }}); + } }); } open() { diff --git a/js/ui/altTab.js b/js/ui/altTab.js index a75716a04..c7b175df2 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -716,7 +716,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList { _setIconSize() { let j = 0; - while(this._items.length > 1 && this._items[j].style_class != 'item-box') { + while (this._items.length > 1 && this._items[j].style_class != 'item-box') { j++; } let themeNode = this._items[j].get_theme_node(); @@ -738,7 +738,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList { let iconSize = baseIconSizes[0]; if (this._items.length > 1) { - for(let i = 0; i < baseIconSizes.length; i++) { + for (let i = 0; i < baseIconSizes.length; i++) { iconSize = baseIconSizes[i]; let height = iconSizes[i] + iconSpacing; let w = height * this._items.length + totalSpacing; @@ -749,7 +749,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList { this._iconSize = iconSize; - for(let i = 0; i < this.icons.length; i++) { + for (let i = 0; i < this.icons.length; i++) { if (this.icons[i].icon != null) break; this.icons[i].set_size(iconSize); diff --git a/js/ui/animation.js b/js/ui/animation.js index 58d7f4018..960b8dabf 100644 --- a/js/ui/animation.js +++ b/js/ui/animation.js @@ -123,7 +123,7 @@ var AnimatedIcon = class extends Animation { }; var Spinner = class extends AnimatedIcon { - constructor(size, animate=false) { + constructor(size, animate = false) { let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg'); super(file, size); diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 1c67d9638..d24780d0e 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -94,7 +94,7 @@ class BaseAppView { padWithSpacing: true }); params = Params.parse(params, { usePagination: false }); - if(params.usePagination) + if (params.usePagination) this._grid = new IconGrid.PaginatedIconGrid(gridParams); else this._grid = new IconGrid.IconGrid(gridParams); @@ -231,7 +231,7 @@ var AllView = class AllView extends BaseAppView { reactive: true, y_align: St.Align.START }); this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(), - x_expand:true, y_expand:true }); + x_expand: true, y_expand: true }); this.actor.add_actor(this._scrollView); this._scrollView.set_policy(St.PolicyType.NEVER, @@ -570,7 +570,7 @@ var AllView = class AllView extends BaseAppView { this._eventBlocker.reactive = isOpen; this._currentPopup = isOpen ? popup : null; this._updateIconOpacities(isOpen); - if(!isOpen) + if (!isOpen) this._closeSpaceForPopup(); }); } @@ -671,7 +671,7 @@ var FrequentView = class FrequentView extends BaseAppView { let mostUsed = this._usage.get_most_used(); let hasUsefulData = this.hasUsefulData(); this._noFrequentAppsLabel.visible = !hasUsefulData; - if(!hasUsefulData) + if (!hasUsefulData) return; // Allow dragging of the icon only if the Dash would accept a drop to @@ -895,7 +895,7 @@ var AppDisplay = class AppDisplay { _onAllocatedSizeChanged(actor, width, height) { let box = new Clutter.ActorBox(); - box.x1 = box.y1 =0; + box.x1 = box.y1 = 0; box.x2 = width; box.y2 = height; box = this._viewStack.get_theme_node().get_content_box(box); @@ -1251,7 +1251,7 @@ var FolderIcon = class FolderIcon { adaptToSize(width, height) { this._parentAvailableWidth = width; this._parentAvailableHeight = height; - if(this._popup) + if (this._popup) this.view.adaptToSize(width, height); this._popupInvalidated = true; } diff --git a/js/ui/audioDeviceSelection.js b/js/ui/audioDeviceSelection.js index ce45a6577..55eeb2b6c 100644 --- a/js/ui/audioDeviceSelection.js +++ b/js/ui/audioDeviceSelection.js @@ -54,7 +54,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({ } _getDeviceLabel(device) { - switch(device) { + switch (device) { case AudioDevice.HEADPHONES: return _("Headphones"); case AudioDevice.HEADSET: @@ -67,7 +67,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({ } _getDeviceIcon(device) { - switch(device) { + switch (device) { case AudioDevice.HEADPHONES: return 'audio-headphones-symbolic'; case AudioDevice.HEADSET: diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index fdeea723f..a1b0870bf 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -264,7 +264,7 @@ var BoxPointer = GObject.registerClass({ let borderRadius = themeNode.get_length('-arrow-border-radius'); let halfBorder = borderWidth / 2; - let halfBase = Math.floor(base/2); + let halfBase = Math.floor(base / 2); let backgroundColor = themeNode.get_color('-arrow-background-color'); @@ -345,7 +345,7 @@ var BoxPointer = GObject.registerClass({ if (!skipTopRight) { cr.lineTo(x2 - borderRadius, y1); cr.arc(x2 - borderRadius, y1 + borderRadius, borderRadius, - 3*Math.PI/2, Math.PI*2); + 3 * Math.PI / 2, Math.PI * 2); } if (this._arrowSide == St.Side.RIGHT && rise) { @@ -366,7 +366,7 @@ var BoxPointer = GObject.registerClass({ if (!skipBottomRight) { cr.lineTo(x2, y2 - borderRadius); cr.arc(x2 - borderRadius, y2 - borderRadius, borderRadius, - 0, Math.PI/2); + 0, Math.PI / 2); } if (this._arrowSide == St.Side.BOTTOM && rise) { @@ -387,7 +387,7 @@ var BoxPointer = GObject.registerClass({ if (!skipBottomLeft) { cr.lineTo(x1 + borderRadius, y2); cr.arc(x1 + borderRadius, y2 - borderRadius, borderRadius, - Math.PI/2, Math.PI); + Math.PI / 2, Math.PI); } if (this._arrowSide == St.Side.LEFT && rise) { @@ -408,7 +408,7 @@ var BoxPointer = GObject.registerClass({ if (!skipTopLeft) { cr.lineTo(x1, y1 + borderRadius); cr.arc(x1 + borderRadius, y1 + borderRadius, borderRadius, - Math.PI, 3*Math.PI/2); + Math.PI, 3 * Math.PI / 2); } Clutter.cairo_set_source_color(cr, backgroundColor); @@ -513,7 +513,7 @@ var BoxPointer = GObject.registerClass({ // of the box to maintain the arrow's accuracy. let arrowOrigin; - let halfBase = Math.floor(arrowBase/2); + let halfBase = Math.floor(arrowBase / 2); let halfBorder = borderWidth / 2; let halfMargin = margin / 2; let [x1, y1] = [halfBorder, halfBorder]; diff --git a/js/ui/calendar.js b/js/ui/calendar.js index c121e6bb6..bcd28d784 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -263,7 +263,7 @@ var DBusEventSource = class DBusEventSource { if (!this._initialized) return; - if (this._curRequestBegin && this._curRequestEnd){ + if (this._curRequestBegin && this._curRequestEnd) { this._dbusProxy.GetEventsRemote(this._curRequestBegin.getTime() / 1000, this._curRequestEnd.getTime() / 1000, forceReload, @@ -285,7 +285,7 @@ var DBusEventSource = class DBusEventSource { getEvents(begin, end) { let result = []; - for(let n = 0; n < this._events.length; n++) { + for (let n = 0; n < this._events.length; n++) { let event = this._events[n]; if (_dateIntervalsOverlap (event.date, event.end, begin, end)) { @@ -402,8 +402,8 @@ var Calendar = class Calendar { this._topBox.add(this._backButton); this._backButton.connect('clicked', this._onPrevMonthButtonClicked.bind(this)); - this._monthLabel = new St.Label({style_class: 'calendar-month-label', - can_focus: true }); + this._monthLabel = new St.Label({ style_class: 'calendar-month-label', + can_focus: true }); this._topBox.add(this._monthLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE }); this._forwardButton = new St.Button({ style_class: 'calendar-change-month-forward pager-button', @@ -1101,7 +1101,7 @@ var CalendarMessageList = class CalendarMessageList { _addSection(section) { let obj = { destroyId: 0, - visibleId: 0, + visibleId: 0, emptyChangedId: 0, canClearChangedId: 0, keyFocusId: 0 diff --git a/js/ui/closeDialog.js b/js/ui/closeDialog.js index 0806b2067..afc246ee1 100644 --- a/js/ui/closeDialog.js +++ b/js/ui/closeDialog.js @@ -11,7 +11,7 @@ var DIALOG_TRANSITION_TIME = 0.15; var ALIVE_TIMEOUT = 5000; var CloseDialog = GObject.registerClass({ - Implements: [ Meta.CloseDialog ], + Implements: [Meta.CloseDialog], Properties: { 'window': GObject.ParamSpec.override('window', Meta.CloseDialog) }, @@ -56,12 +56,12 @@ var CloseDialog = GObject.registerClass({ this._dialog.height = windowActor.height; this._dialog.addContent(this._createDialogContent()); - this._dialog.addButton({ label: _('Force Quit'), - action: this._onClose.bind(this), + this._dialog.addButton({ label: _('Force Quit'), + action: this._onClose.bind(this), default: true }); - this._dialog.addButton({ label: _('Wait'), + this._dialog.addButton({ label: _('Wait'), action: this._onWait.bind(this), - key: Clutter.Escape }); + key: Clutter.Escape }); global.focus_manager.add_group(this._dialog); } diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index efe08137d..a66331385 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -105,19 +105,19 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog { descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; contentBox.messageBox.add(descriptionLabel, - { y_fill: true, + { y_fill: true, y_align: St.Align.START, expand: true }); } - this._okButton = { label: _("Connect"), + this._okButton = { label: _("Connect"), action: this._onOk.bind(this), default: true }; this.setButtons([{ label: _("Cancel"), action: this.cancel.bind(this), - key: Clutter.KEY_Escape, + key: Clutter.KEY_Escape, }, this._okButton]); @@ -303,7 +303,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog { let ssid; let content = { }; - content.secrets = [ ]; + content.secrets = []; switch (connectionType) { case '802-11-wireless': @@ -358,12 +358,12 @@ var VPNRequestHandler = class { this._pluginOutBuffer = []; this._title = null; this._description = null; - this._content = [ ]; + this._content = []; this._shellDialog = null; let connectionSetting = connection.get_setting_connection(); - let argv = [ authHelper.fileName, + let argv = [authHelper.fileName, '-u', connectionSetting.uuid, '-n', connectionSetting.id, '-s', serviceType diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index 39a4d8040..a25532494 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -77,15 +77,15 @@ var AuthenticationDialog = GObject.registerClass({ styleClass: 'polkit-dialog-user-icon' }); this._userAvatar.actor.hide(); userBox.add(this._userAvatar.actor, - { x_fill: true, - y_fill: false, + { x_fill: true, + y_fill: false, x_align: St.Align.END, y_align: St.Align.START }); let userLabel = new St.Label(({ style_class: 'polkit-dialog-user-label', text: userRealName })); userBox.add(userLabel, - { x_fill: true, - y_fill: false, + { x_fill: true, + y_fill: false, x_align: St.Align.END, y_align: St.Align.MIDDLE }); } @@ -98,7 +98,7 @@ var AuthenticationDialog = GObject.registerClass({ this._passwordBox.add(this._passwordLabel, { y_fill: false, y_align: St.Align.MIDDLE }); this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry', text: "", - can_focus: true}); + can_focus: true }); ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true }); this._passwordEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this)); this._passwordBox.add(this._passwordEntry, @@ -127,7 +127,7 @@ var AuthenticationDialog = GObject.registerClass({ * gnome-shell.css sets the color to be transparent */ this._nullMessageLabel = new St.Label({ style_class: 'prompt-dialog-null-label', - text: 'abc'}); + text: 'abc' }); this._nullMessageLabel.add_style_class_name('hidden'); this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; this._nullMessageLabel.clutter_text.line_wrap = true; @@ -137,7 +137,7 @@ var AuthenticationDialog = GObject.registerClass({ this._cancelButton = this.addButton({ label: _("Cancel"), action: this.cancel.bind(this), key: Clutter.Escape }); - this._okButton = this.addButton({ label: _("Authenticate"), + this._okButton = this.addButton({ label: _("Authenticate"), action: this._onAuthenticateButtonPressed.bind(this), default: true }); diff --git a/js/ui/dash.js b/js/ui/dash.js index 884b4df27..91bf6d925 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -35,7 +35,7 @@ class DashItemContainer extends St.Widget { x_align: Clutter.ActorAlign.CENTER }); this._labelText = ""; - this.label = new St.Label({ style_class: 'dash-label'}); + this.label = new St.Label({ style_class: 'dash-label' }); this.label.hide(); Main.layoutManager.addChrome(this.label); this.label_actor = this.label; @@ -328,7 +328,7 @@ class DashActor extends St.Widget { } }); -const baseIconSizes = [ 16, 22, 24, 32, 48, 64 ]; +const baseIconSizes = [16, 22, 24, 32, 48, 64]; var Dash = class Dash { constructor() { diff --git a/js/ui/dialog.js b/js/ui/dialog.js index af057e631..4989470c4 100644 --- a/js/ui/dialog.js +++ b/js/ui/dialog.js @@ -25,9 +25,9 @@ class Dialog extends St.Widget { _createDialog() { this._dialog = new St.BoxLayout({ style_class: 'modal-dialog', - x_align: Clutter.ActorAlign.CENTER, - y_align: Clutter.ActorAlign.CENTER, - vertical: true }); + x_align: Clutter.ActorAlign.CENTER, + y_align: Clutter.ActorAlign.CENTER, + vertical: true }); // modal dialogs are fixed width and grow vertically; set the request // mode accordingly so wrapped labels are handled correctly during @@ -38,13 +38,13 @@ class Dialog extends St.Widget { this.contentLayout = new St.BoxLayout({ vertical: true, style_class: "modal-dialog-content-box" }); this._dialog.add(this.contentLayout, - { expand: true, - x_fill: true, - y_fill: true, + { expand: true, + x_fill: true, + y_fill: true, x_align: St.Align.MIDDLE, y_align: St.Align.START }); - this.buttonLayout = new St.Widget ({ layout_manager: new Clutter.BoxLayout({ homogeneous:true }) }); + this.buttonLayout = new St.Widget ({ layout_manager: new Clutter.BoxLayout({ homogeneous: true }) }); this._dialog.add(this.buttonLayout, { x_align: St.Align.MIDDLE, y_align: St.Align.START }); @@ -116,11 +116,11 @@ class Dialog extends St.Widget { let button = new St.Button({ style_class: 'modal-dialog-linked-button', button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE, - reactive: true, - can_focus: true, - x_expand: true, - y_expand: true, - label: label }); + reactive: true, + can_focus: true, + x_expand: true, + y_expand: true, + label: label }); button.connect('clicked', action); buttonInfo['button'] = button; diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index 63e824578..1c6989b71 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -49,7 +49,7 @@ const logoutDialogContent = { }, showBatteryWarning: false, confirmButtons: [{ signal: 'ConfirmedLogout', - label: C_("button", "Log Out") }], + label: C_("button", "Log Out") }], iconStyleClass: 'end-session-dialog-logout-icon', showOtherSessions: false, }; @@ -65,9 +65,9 @@ const shutdownDialogContent = { checkBoxText: C_("checkbox", "Install pending software updates"), showBatteryWarning: true, confirmButtons: [{ signal: 'ConfirmedReboot', - label: C_("button", "Restart") }, + label: C_("button", "Restart") }, { signal: 'ConfirmedShutdown', - label: C_("button", "Power Off") }], + label: C_("button", "Power Off") }], iconName: 'system-shutdown-symbolic', iconStyleClass: 'end-session-dialog-shutdown-icon', showOtherSessions: true, @@ -82,7 +82,7 @@ const restartDialogContent = { }, showBatteryWarning: false, confirmButtons: [{ signal: 'ConfirmedReboot', - label: C_("button", "Restart") }], + label: C_("button", "Restart") }], iconName: 'view-refresh-symbolic', iconStyleClass: 'end-session-dialog-shutdown-icon', showOtherSessions: true, @@ -98,7 +98,7 @@ const restartUpdateDialogContent = { }, showBatteryWarning: true, confirmButtons: [{ signal: 'ConfirmedReboot', - label: C_("button", "Restart & Install") }], + label: C_("button", "Restart & Install") }], unusedFutureButtonForTranslation: C_("button", "Install & Power Off"), unusedFutureCheckBoxForTranslation: C_("checkbox", "Power off after updates are installed"), iconName: 'view-refresh-symbolic', @@ -118,7 +118,7 @@ const restartUpgradeDialogContent = { disableTimer: true, showBatteryWarning: false, confirmButtons: [{ signal: 'ConfirmedReboot', - label: C_("button", "Restart & Install") }], + label: C_("button", "Restart & Install") }], iconName: 'view-refresh-symbolic', iconStyleClass: 'end-session-dialog-shutdown-icon', showOtherSessions: true, @@ -272,8 +272,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._iconBin = new St.Bin(); mainContentLayout.add(this._iconBin, - { x_fill: true, - y_fill: false, + { x_fill: true, + y_fill: false, x_align: St.Align.END, y_align: St.Align.START }); @@ -286,7 +286,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { messageLayout.add(this._subjectLabel, { x_fill: false, - y_fill: false, + y_fill: false, x_align: St.Align.START, y_align: St.Align.START }); @@ -295,7 +295,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._descriptionLabel.clutter_text.line_wrap = true; messageLayout.add(this._descriptionLabel, - { y_fill: true, + { y_fill: true, y_align: St.Align.START }); this._checkBox = new CheckBox.CheckBox(); @@ -424,8 +424,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog { _updateButtons() { let dialogContent = DialogContent[this._type]; let buttons = [{ action: this.cancel.bind(this), - label: _("Cancel"), - key: Clutter.Escape }]; + label: _("Cancel"), + key: Clutter.Escape }]; for (let i = 0; i < dialogContent.confirmButtons.length; i++) { let signal = dialogContent.confirmButtons[i].signal; @@ -633,7 +633,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._loginManager.listSessions(result => { let n = 0; for (let i = 0; i < result.length; i++) { - let[id, uid, userName, seat, sessionPath] = result[i]; + let [id, uid, userName, seat, sessionPath] = result[i]; let proxy = new LogindSession(Gio.DBus.system, 'org.freedesktop.login1', sessionPath); if (proxy.Class != 'user') diff --git a/js/ui/environment.js b/js/ui/environment.js index c936c5b42..c9ff73a21 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -58,7 +58,7 @@ function _patchLayoutClass(layoutClass, styleProps) { } function _loggingFunc(...args) { - let fields = {'MESSAGE': args.join(', ')}; + let fields = { 'MESSAGE': args.join(', ') }; let domain = "GNOME Shell"; // If the caller is an extension, add it as metadata diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index 4d414697a..1e6ff6ee3 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -186,9 +186,9 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog { this.setButtons([{ label: _("Cancel"), action: this._onCancelButtonPressed.bind(this), - key: Clutter.Escape + key: Clutter.Escape }, - { label: _("Install"), + { label: _("Install"), action: this._onInstallButtonPressed.bind(this), default: true }]); diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js index 2bfb57bfe..5befe7f7b 100644 --- a/js/ui/ibusCandidatePopup.js +++ b/js/ui/ibusCandidatePopup.js @@ -8,8 +8,8 @@ const Main = imports.ui.main; var MAX_CANDIDATES_PER_PAGE = 16; -var DEFAULT_INDEX_LABELS = [ '1', '2', '3', '4', '5', '6', '7', '8', - '9', '0', 'a', 'b', 'c', 'd', 'e', 'f' ]; +var DEFAULT_INDEX_LABELS = ['1', '2', '3', '4', '5', '6', '7', '8', + '9', '0', 'a', 'b', 'c', 'd', 'e', 'f']; var CandidateArea = class CandidateArea { constructor() { @@ -37,7 +37,7 @@ var CandidateArea = class CandidateArea { this.actor.connect('scroll-event', (actor, event) => { let direction = event.get_scroll_direction(); - switch(direction) { + switch (direction) { case Clutter.ScrollDirection.UP: this.emit('cursor-up'); break; diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index f635836ea..20a27f94d 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -12,11 +12,11 @@ var MIN_ICON_SIZE = 16; var EXTRA_SPACE_ANIMATION_TIME = 0.25; var ANIMATION_TIME_IN = 0.350; -var ANIMATION_TIME_OUT = 1/2 * ANIMATION_TIME_IN; -var ANIMATION_MAX_DELAY_FOR_ITEM = 2/3 * ANIMATION_TIME_IN; -var ANIMATION_BASE_DELAY_FOR_ITEM = 1/4 * ANIMATION_MAX_DELAY_FOR_ITEM; -var ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2/3 * ANIMATION_TIME_OUT; -var ANIMATION_FADE_IN_TIME_FOR_ITEM = 1/4 * ANIMATION_TIME_IN; +var ANIMATION_TIME_OUT = 1 / 2 * ANIMATION_TIME_IN; +var ANIMATION_MAX_DELAY_FOR_ITEM = 2 / 3 * ANIMATION_TIME_IN; +var ANIMATION_BASE_DELAY_FOR_ITEM = 1 / 4 * ANIMATION_MAX_DELAY_FOR_ITEM; +var ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2 / 3 * ANIMATION_TIME_OUT; +var ANIMATION_FADE_IN_TIME_FOR_ITEM = 1 / 4 * ANIMATION_TIME_IN; var ANIMATION_BOUNCE_ICON_SCALE = 1.1; @@ -179,8 +179,8 @@ function zoomOutActor(actor) { } var IconGrid = GObject.registerClass({ - Signals: {'animation-done': {}, - 'child-focused': { param_types: [Clutter.Actor.$gtype]} }, + Signals: { 'animation-done': {}, + 'child-focused': { param_types: [Clutter.Actor.$gtype] } }, }, class IconGrid extends St.Widget { _init(params) { super._init({ style_class: 'icon-grid', @@ -311,7 +311,7 @@ var IconGrid = GObject.registerClass({ let [nColumns, usedWidth] = this._computeLayout(availWidth); let leftEmptySpace; - switch(this._xAlign) { + switch (this._xAlign) { case St.Align.START: leftEmptySpace = 0; break; @@ -531,7 +531,7 @@ var IconGrid = GObject.registerClass({ onComplete: () => { if (isLastItem) this._animationDone(); - }}; + } }; fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM, transition: 'easeInOutQuad', delay: delay, @@ -553,7 +553,7 @@ var IconGrid = GObject.registerClass({ onComplete: () => { if (isLastItem) this._animationDone(); - }}; + } }; fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM, transition: 'easeInOutQuad', delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM, @@ -710,8 +710,8 @@ var IconGrid = GObject.registerClass({ if (this._padWithSpacing) { // minRows + 1 because we want to put spacing before the first row, so it is like we have one more row // to divide the empty space - maxVSpacing = Math.floor(maxEmptyVArea / (this._minRows +1)); - maxHSpacing = Math.floor(maxEmptyHArea / (this._minColumns +1)); + maxVSpacing = Math.floor(maxEmptyVArea / (this._minRows + 1)); + maxHSpacing = Math.floor(maxEmptyHArea / (this._minColumns + 1)); } else { if (this._minRows <= 1) maxVSpacing = maxEmptyVArea; @@ -745,8 +745,8 @@ var IconGrid = GObject.registerClass({ this._updateSpacingForSize(availWidth, availHeight); if (this.columnsForWidth(availWidth) < this._minColumns || this.rowsForHeight(availHeight) < this._minRows) { - let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth ; - let neededHeight = this.usedHeightForNRows(this._minRows) - availHeight ; + let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth; + let neededHeight = this.usedHeightForNRows(this._minRows) - availHeight; let neededSpacePerItem = (neededWidth > neededHeight) ? Math.ceil(neededWidth / this._minColumns) : Math.ceil(neededHeight / this._minRows); @@ -770,8 +770,8 @@ var IconGrid = GObject.registerClass({ }); var PaginatedIconGrid = GObject.registerClass({ - Signals: {'space-opened': {}, - 'space-closed': {} }, + Signals: { 'space-opened': {}, + 'space-closed': {} }, }, class PaginatedIconGrid extends IconGrid { _init(params) { super._init(params); @@ -805,7 +805,7 @@ var PaginatedIconGrid = GObject.registerClass({ let [nColumns, usedWidth] = this._computeLayout(availWidth); let leftEmptySpace; - switch(this._xAlign) { + switch (this._xAlign) { case St.Align.START: leftEmptySpace = 0; break; diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index e46da2a35..e9e760308 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -24,29 +24,29 @@ const SHOW_KEYBOARD = 'screen-keyboard-enabled'; const KEY_SIZE = 2; const defaultKeysPre = [ - [ [], [], [{ width: 1.5, level: 1, extraClassName: 'shift-key-lowercase' }], [{ label: '?123', width: 1.5, level: 2 }] ], - [ [], [], [{ width: 1.5, level: 0, extraClassName: 'shift-key-uppercase' }], [{ label: '?123', width: 1.5, level: 2 }] ], - [ [], [], [{ label: '=/<', width: 1.5, level: 3 }], [{ label: 'ABC', width: 1.5, level: 0 }] ], - [ [], [], [{ label: '?123', width: 1.5, level: 2 }], [{ label: 'ABC', width: 1.5, level: 0 }] ], + [[], [], [{ width: 1.5, level: 1, extraClassName: 'shift-key-lowercase' }], [{ label: '?123', width: 1.5, level: 2 }]], + [[], [], [{ width: 1.5, level: 0, extraClassName: 'shift-key-uppercase' }], [{ label: '?123', width: 1.5, level: 2 }]], + [[], [], [{ label: '=/<', width: 1.5, level: 3 }], [{ label: 'ABC', width: 1.5, level: 0 }]], + [[], [], [{ label: '?123', width: 1.5, level: 2 }], [{ label: 'ABC', width: 1.5, level: 0 }]], ]; const defaultKeysPost = [ - [ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], + [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], [{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase' }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ], - [ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], + [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], + [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], [{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase' }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ], - [ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], + [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], + [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], [{ label: '=/<', width: 3, level: 3, right: true }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ], - [ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], + [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], + [[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }], [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }], [{ label: '?123', width: 3, level: 2, right: true }], - [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ], + [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]], ]; var AspectContainer = GObject.registerClass( @@ -1681,7 +1681,7 @@ var Keyboard = class Keyboard { this._animFocusedWindow = window; } - setCursorLocation(window, x, y , w, h) { + setCursorLocation(window, x, y, w, h) { let monitor = Main.layoutManager.keyboardMonitor; if (window && monitor) { diff --git a/js/ui/layout.js b/js/ui/layout.js index 538c24e73..ef1708968 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -21,7 +21,7 @@ var HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels var HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms function isPopupMetaWindow(actor) { - switch(actor.meta_window.get_window_type()) { + switch (actor.meta_window.get_window_type()) { case Meta.WindowType.DROPDOWN_MENU: case Meta.WindowType.POPUP_MENU: case Meta.WindowType.COMBO: @@ -1067,7 +1067,7 @@ var LayoutManager = GObject.registerClass({ else continue; - let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1}); + let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 }); let strut = new Meta.Strut({ rect: strutRect, side: side }); struts.push(strut); } diff --git a/js/ui/locatePointer.js b/js/ui/locatePointer.js index cb6efbf72..98d54959a 100644 --- a/js/ui/locatePointer.js +++ b/js/ui/locatePointer.js @@ -9,7 +9,7 @@ const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface"; var LocatePointer = class { constructor() { - this._settings = new Gio.Settings({schema_id: LOCATE_POINTER_SCHEMA}); + this._settings = new Gio.Settings({ schema_id: LOCATE_POINTER_SCHEMA }); this._ripples = new Ripples.Ripples(0.5, 0.5, 'ripple-pointer-location'); this._ripples.addTo(Main.uiGroup); } diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 32550b7a3..b51365fcb 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -68,10 +68,10 @@ var AutoComplete = class AutoComplete { if (commonPrefix.length > 0) { this.additionalCompletionText(commonPrefix, event.attrHead); this.emit('completion', { completion: commonPrefix, type: 'prefix' }); - this.emit('suggest', { completions: event.completions}); + this.emit('suggest', { completions: event.completions }); } } else if (event.completions.length > 1 && event.tabType === 'double') { - this.emit('suggest', { completions: event.completions}); + this.emit('suggest', { completions: event.completions }); } } diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 0128d68d5..22517d55a 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -42,7 +42,7 @@ const CROSS_HAIRS_LENGTH_KEY = 'cross-hairs-length'; const CROSS_HAIRS_CLIP_KEY = 'cross-hairs-clip'; var MouseSpriteContent = GObject.registerClass({ - Implements: [ Clutter.Content ], + Implements: [Clutter.Content], }, class MouseSpriteContent extends GObject.Object { _init() { super._init(); @@ -148,7 +148,7 @@ var Magnifier = class Magnifier { setActive(activate) { let isActive = this.isActive(); - this._zoomRegions.forEach ((zoomRegion, index, array) => { + this._zoomRegions.forEach((zoomRegion, index, array) => { zoomRegion.setActive(activate); }); @@ -282,7 +282,7 @@ var Magnifier = class Magnifier { * @zoomRegion: The zoomRegion to add. */ addZoomRegion(zoomRegion) { - if(zoomRegion) { + if (zoomRegion) { this._zoomRegions.push(zoomRegion); if (!this.isTrackingMouse()) this.startTrackingMouse(); @@ -1028,7 +1028,7 @@ var ZoomRegion = class ZoomRegion { viewPort.x = 0; viewPort.y = 0; viewPort.width = global.screen_width; - viewPort.height = global.screen_height/2; + viewPort.height = global.screen_height / 2; this._setViewPort(viewPort); this._screenPosition = GDesktopEnums.MagnifierScreenPosition.TOP_HALF; } @@ -1040,9 +1040,9 @@ var ZoomRegion = class ZoomRegion { setBottomHalf() { let viewPort = {}; viewPort.x = 0; - viewPort.y = global.screen_height/2; + viewPort.y = global.screen_height / 2; viewPort.width = global.screen_width; - viewPort.height = global.screen_height/2; + viewPort.height = global.screen_height / 2; this._setViewPort(viewPort); this._screenPosition = GDesktopEnums.MagnifierScreenPosition.BOTTOM_HALF; } @@ -1055,7 +1055,7 @@ var ZoomRegion = class ZoomRegion { let viewPort = {}; viewPort.x = 0; viewPort.y = 0; - viewPort.width = global.screen_width/2; + viewPort.width = global.screen_width / 2; viewPort.height = global.screen_height; this._setViewPort(viewPort); this._screenPosition = GDesktopEnums.MagnifierScreenPosition.LEFT_HALF; @@ -1067,9 +1067,9 @@ var ZoomRegion = class ZoomRegion { */ setRightHalf() { let viewPort = {}; - viewPort.x = global.screen_width/2; + viewPort.x = global.screen_width / 2; viewPort.y = 0; - viewPort.width = global.screen_width/2; + viewPort.width = global.screen_width / 2; viewPort.height = global.screen_height; this._setViewPort(viewPort); this._screenPosition = GDesktopEnums.MagnifierScreenPosition.RIGHT_HALF; @@ -1530,7 +1530,7 @@ var ZoomRegion = class ZoomRegion { let xProportion = (xPoint - halfScreenWidth) / halfScreenWidth; // -1 ... 1 let yProportion = (yPoint - halfScreenHeight) / halfScreenHeight; // -1 ... 1 let xPos = xPoint - xProportion * (widthRoi / 2 - xPadding); - let yPos = yPoint - yProportion * (heightRoi /2 - yPadding); + let yPos = yPoint - yProportion * (heightRoi / 2 - yPadding); return [xPos, yPos]; } @@ -1660,7 +1660,7 @@ var Crosshairs = class Crosshairs { container.raise_child(magnifiedMouse, crosshairsActor); let [xMouse, yMouse] = magnifiedMouse.get_position(); let [crosshairsWidth, crosshairsHeight] = crosshairsActor.get_size(); - crosshairsActor.set_position(xMouse - crosshairsWidth / 2 , yMouse - crosshairsHeight / 2); + crosshairsActor.set_position(xMouse - crosshairsWidth / 2, yMouse - crosshairsHeight / 2); } } return crosshairsActor; diff --git a/js/ui/messageList.js b/js/ui/messageList.js index 93c3fc3ac..d3db1c1f5 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -202,7 +202,7 @@ var LabelExpanderLayout = GObject.registerClass({ 'Expansion of the layout, between 0 (collapsed) ' + 'and 1 (fully expanded', GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, - 0, 1, 0)}, + 0, 1, 0) }, }, class LabelExpanderLayout extends Clutter.LayoutManager { _init(params) { this._expansion = 0; @@ -471,7 +471,7 @@ var Message = class Message { onComplete() { this._actionBin.hide(); this.expanded = false; - }}); + } }); } else { this._bodyStack.layout_manager.expansion = 0; this._actionBin.scale_y = 0; @@ -626,7 +626,7 @@ var MessageListSection = class MessageListSection { onComplete() { obj.container.destroy(); global.sync_pointer(); - }}); + } }); } else { obj.container.destroy(); global.sync_pointer(); @@ -656,7 +656,7 @@ var MessageListSection = class MessageListSection { transition: 'easeOutQuad', onComplete() { message.close(); - }}); + } }); } } } diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 8bc4e50d0..fc702accd 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -248,7 +248,7 @@ var ModalDialog = GObject.registerClass({ this.popModal(timestamp); Tweener.addTween(this.dialogLayout, { opacity: 0, - time: FADE_OUT_DIALOG_TIME, + time: FADE_OUT_DIALOG_TIME, transition: 'easeOutQuad', onComplete: () => { this._setState(State.FADED_OUT); diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index df5181a7c..cdb33f872 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -309,7 +309,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon { if (actions.length) { for (let i = 0; i < actions.length - 1; i += 2) { - let [actionId, label] = [actions[i], actions[i+1]]; + let [actionId, label] = [actions[i], actions[i + 1]]; if (actionId == 'default') hasDefaultAction = true; else @@ -437,7 +437,7 @@ class FdoNotificationDaemonSource extends MessageTray.Source { _createPolicy() { if (this.app && this.app.get_app_info()) { - let id = this.app.get_id().replace(/\.desktop$/,''); + let id = this.app.get_id().replace(/\.desktop$/, ''); return new MessageTray.NotificationApplicationPolicy(id); } else { return new MessageTray.NotificationGenericPolicy(); @@ -573,7 +573,7 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification { this.update(title.unpack(), body ? body.unpack() : null, { gicon: gicon ? Gio.icon_deserialize(gicon) : null, - datetime : time ? GLib.DateTime.new_from_unix_local(time.unpack()) : null }); + datetime: time ? GLib.DateTime.new_from_unix_local(time.unpack()) : null }); } _activateAction(namespacedActionId, target) { diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index b5067795e..c548e995d 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -208,7 +208,7 @@ var ActionEditor = class { this._doneButton = new St.Button({ label: _("Done"), style_class: 'button', - x_expand: false}); + x_expand: false }); this._doneButton.connect('clicked', this._onEditingDone.bind(this)); this.actor.add_actor(this._doneButton); } @@ -440,11 +440,11 @@ var PadDiagram = GObject.registerClass({ let cr = this.get_context(); cr.save(); - cr.translate(width/2, height/2); + cr.translate(width / 2, height / 2); cr.scale(this._scale, this._scale); if (this._leftHanded) cr.rotate(Math.PI); - cr.translate(-dimensions.width/2, -dimensions.height/2); + cr.translate(-dimensions.width / 2, -dimensions.height / 2); this._handle.render_cairo(cr); cr.restore(); cr.$dispose(); @@ -611,7 +611,7 @@ var PadDiagram = GObject.registerClass({ var PadOsd = class { constructor(padDevice, settings, imagePath, editionMode, monitorIndex) { this.padDevice = padDevice; - this._groupPads = [ padDevice ]; + this._groupPads = [padDevice]; this._settings = settings; this._imagePath = imagePath; this._editionMode = editionMode; diff --git a/js/ui/panel.js b/js/ui/panel.js index 79c71c9f4..ed25959ad 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -189,7 +189,7 @@ class AppMenu extends PopupMenu.PopupMenu { * have an active startup notification, we switch modes to display that. */ var AppMenuButton = GObject.registerClass({ - Signals: {'changed': {}}, + Signals: { 'changed': {} }, }, class AppMenuButton extends PanelMenu.Button { _init(panel) { super._init(0.0, null, true); diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js index c311a989d..9827e32b6 100644 --- a/js/ui/panelMenu.js +++ b/js/ui/panelMenu.js @@ -91,7 +91,7 @@ class ButtonBox extends St.Widget { }); var Button = GObject.registerClass({ - Signals: {'menu-set': {} }, + Signals: { 'menu-set': {} }, }, class PanelMenuButton extends ButtonBox { _init(menuAlignment, nameText, dontCreateMenu) { super._init({ reactive: true, diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 9501bf0c8..3a44686b6 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -368,7 +368,7 @@ class ScreenShieldArrow extends St.Bin { cr.setLineWidth(thickness); cr.moveTo(thickness / 2, h - thickness / 2); - cr.lineTo(w/2, thickness); + cr.lineTo(w / 2, thickness); cr.lineTo(w - thickness / 2, h - thickness / 2); cr.stroke(); cr.$dispose(); @@ -741,10 +741,10 @@ var ScreenShield = class { delay: unitaryDelay * (N_ARROWS - (i + 1)), time: ARROW_ANIMATION_TIME, transition(t, b, c, d) { - if (t < d/2) - return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d/2); + if (t < d / 2) + return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d / 2); else - return TweenerEquations.easeInQuad(t - d/2, maxOpacity, -maxOpacity, d/2); + return TweenerEquations.easeInQuad(t - d / 2, maxOpacity, -maxOpacity, d / 2); } }); } diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index d094579ea..664bcfa4e 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -24,7 +24,7 @@ var ScreenshotService = class { Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null); } - _createScreenshot(invocation, needsDisk=true) { + _createScreenshot(invocation, needsDisk = true) { let lockedDown = false; if (needsDisk) lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk'); @@ -185,7 +185,7 @@ var ScreenshotService = class { "Invalid params"); return; } - let flashspot = new Flashspot({ x : x, y : y, width: width, height: height}); + let flashspot = new Flashspot({ x: x, y: y, width: width, height: height }); flashspot.fire(); invocation.return_value(null); } diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index f7c470f71..feeda0667 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -46,7 +46,7 @@ var ListItem = class { constructor(app) { this._app = app; - let layout = new St.BoxLayout({ vertical: false}); + let layout = new St.BoxLayout({ vertical: false }); this.actor = new St.Button({ style_class: 'mount-dialog-app-list-item', can_focus: true, @@ -388,7 +388,7 @@ var ShellMountPasswordDialog = GObject.registerClass({ this._defaultButtons = [{ label: _("Cancel"), action: this._onCancelButton.bind(this), - key: Clutter.Escape + key: Clutter.Escape }, { label: _("Unlock"), action: this._onUnlockButton.bind(this), @@ -397,7 +397,7 @@ var ShellMountPasswordDialog = GObject.registerClass({ this._usesKeyfilesButtons = [{ label: _("Cancel"), action: this._onCancelButton.bind(this), - key: Clutter.Escape + key: Clutter.Escape }, { /* Translators: %s is the Disks application */ label: _("Open %s").format(disksApp.get_name()), @@ -489,7 +489,7 @@ var ShellProcessesDialog = GObject.registerClass({ this._content = new Dialog.MessageDialogContent({ icon }); this.contentLayout.add(this._content, { x_fill: true, y_fill: false }); - let scrollView = new St.ScrollView({ style_class: 'mount-dialog-app-list'}); + let scrollView = new St.ScrollView({ style_class: 'mount-dialog-app-list' }); scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC); this.contentLayout.add(scrollView, diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js index 4630f4d4b..6064a4f6b 100644 --- a/js/ui/status/accessibility.js +++ b/js/ui/status/accessibility.js @@ -140,7 +140,7 @@ class ATIndicator extends PanelMenu.Button { if (enabled) { interfaceSettings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME); interfaceSettings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME); - } else if(!hasHC) { + } else if (!hasHC) { interfaceSettings.set_string(KEY_GTK_THEME, gtkTheme); interfaceSettings.set_string(KEY_ICON_THEME, iconTheme); } else { diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index b1fda3356..a29250734 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -80,7 +80,7 @@ var Indicator = class extends PanelMenu.SystemIndicator { _getNDevices() { let adapter = this._getDefaultAdapter(); if (!adapter) - return [ this._hadSetupDevices ? 1 : -1, -1 ]; + return [this._hadSetupDevices ? 1 : -1, -1]; let nConnectedDevices = 0; let nDevices = 0; @@ -105,11 +105,11 @@ var Indicator = class extends PanelMenu.SystemIndicator { global.settings.set_boolean(HAD_BLUETOOTH_DEVICES_SETUP, this._hadSetupDevices); } - return [ nDevices, nConnectedDevices]; + return [nDevices, nConnectedDevices]; } _sync() { - let [ nDevices, nConnectedDevices ] = this._getNDevices(); + let [nDevices, nConnectedDevices] = this._getNDevices(); let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter; this.menu.setSensitive(sensitive); diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index 00c3bed9c..1a1dceef7 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -564,7 +564,7 @@ var InputSourceManager = class { if (infosList.length == 0) { let type = INPUT_SOURCE_TYPE_XKB; let id = KeyboardManager.DEFAULT_LAYOUT; - let [ , displayName, shortName] = this._xkbInfo.get_layout_info(id); + let [, displayName, shortName] = this._xkbInfo.get_layout_info(id); infosList.push({ type: type, id: id, displayName: displayName, shortName: shortName }); } diff --git a/js/ui/status/network.js b/js/ui/status/network.js index b8d8348a3..bac124d85 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -414,7 +414,7 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection { if (!this._device) return ''; - switch(this._device.state) { + switch (this._device.state) { case NM.DeviceState.DISCONNECTED: /* Translators: %s is a network identifier */ return _("%s Off").format(this._getDescription()); @@ -707,7 +707,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog { this._activeApChangedId = device.connect('notify::active-access-point', this._activeApChanged.bind(this)); // accessPointAdded will also create dialog items - let accessPoints = device.get_access_points() || [ ]; + let accessPoints = device.get_access_points() || []; accessPoints.forEach(ap => { this._accessPointAdded(this._device, ap); }); @@ -1075,9 +1075,9 @@ class NMWirelessDialog extends ModalDialog.ModalDialog { network = { ssid: accessPoint.get_ssid(), mode: accessPoint.mode, security: this._getApSecurityType(accessPoint), - connections: [ ], + connections: [], item: null, - accessPoints: [ accessPoint ] + accessPoints: [accessPoint] }; network.ssidText = ssidToLabel(network.ssid); this._checkConnections(network, accessPoint); @@ -1391,7 +1391,7 @@ var NMVpnConnectionItem = class extends NMConnectionItem { if (this._activeConnection == null) return null; - switch(this._activeConnection.vpn_state) { + switch (this._activeConnection.vpn_state) { case NM.VpnConnectionState.DISCONNECTED: case NM.VpnConnectionState.ACTIVATED: return null; @@ -1557,7 +1557,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection { } _getSummaryIcon() { - switch(this._category) { + switch (this._category) { case NMConnectionCategory.WIRED: return 'network-wired-symbolic'; case NMConnectionCategory.WIRELESS: @@ -1568,7 +1568,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection { } _getSummaryLabel(nDevices) { - switch(this._category) { + switch (this._category) { case NMConnectionCategory.WIRED: return ngettext("%s Wired Connection", "%s Wired Connections", @@ -1615,9 +1615,9 @@ var NMApplet = class extends PanelMenu.SystemIndicator { _clientGot(obj, result) { this._client = NM.Client.new_finish(result); - this._activeConnections = [ ]; - this._connections = [ ]; - this._connectivityQueue = [ ]; + this._activeConnections = []; + this._connections = []; + this._connectivityQueue = []; this._mainConnection = null; this._mainConnectionIconChangedId = 0; @@ -1680,7 +1680,7 @@ var NMApplet = class extends PanelMenu.SystemIndicator { } _readDevices() { - let devices = this._client.get_devices() || [ ]; + let devices = this._client.get_devices() || []; for (let i = 0; i < devices.length; ++i) { try { this._deviceAdded(this._client, devices[i], true); diff --git a/js/ui/switchMonitor.js b/js/ui/switchMonitor.js index df802fe24..b1673408c 100644 --- a/js/ui/switchMonitor.js +++ b/js/ui/switchMonitor.js @@ -9,22 +9,22 @@ var APP_ICON_SIZE = 96; var SwitchMonitorPopup = GObject.registerClass( class SwitchMonitorPopup extends SwitcherPopup.SwitcherPopup { _init() { - let items = [{ icon: 'view-mirror-symbolic', + let items = [{ icon: 'view-mirror-symbolic', /* Translators: this is for display mirroring i.e. cloning. * Try to keep it under around 15 characters. */ label: _('Mirror') }, - { icon: 'video-joined-displays-symbolic', + { icon: 'video-joined-displays-symbolic', /* Translators: this is for the desktop spanning displays. * Try to keep it under around 15 characters. */ label: _('Join Displays') }, - { icon: 'video-single-display-symbolic', + { icon: 'video-single-display-symbolic', /* Translators: this is for using only an external display. * Try to keep it under around 15 characters. */ label: _('External Only') }, - { icon: 'computer-symbolic', + { icon: 'computer-symbolic', /* Translators: this is for using only the laptop display. * Try to keep it under around 15 characters. */ diff --git a/js/ui/tweener.js b/js/ui/tweener.js index 3656f8119..ceff456a1 100644 --- a/js/ui/tweener.js +++ b/js/ui/tweener.js @@ -162,7 +162,7 @@ var ClutterFrameTicker = class { // set the timeline to loop. Doing this means we have to track // time ourselves, since clutter timeline's time will cycle // instead of strictly increase. - this._timeline = new Clutter.Timeline({ duration: 1000*1000 }); + this._timeline = new Clutter.Timeline({ duration: 1000 * 1000 }); this._timeline.set_loop(true); this._startTime = -1; this._currentTime = -1; diff --git a/js/ui/windowAttentionHandler.js b/js/ui/windowAttentionHandler.js index f5aeaf29c..5eaba0496 100644 --- a/js/ui/windowAttentionHandler.js +++ b/js/ui/windowAttentionHandler.js @@ -79,7 +79,7 @@ var Source = class WindowAttentionSource extends MessageTray.Source { _createPolicy() { if (this._app && this._app.get_app_info()) { - let id = this._app.get_id().replace(/\.desktop$/,''); + let id = this._app.get_id().replace(/\.desktop$/, ''); return new MessageTray.NotificationApplicationPolicy(id); } else { return new MessageTray.NotificationGenericPolicy(); diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 036a0f396..f8ea86f74 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -66,7 +66,7 @@ class DisplayChangeDialog extends ModalDialog.ModalDialog { this._cancelButton = this.addButton({ label: _("Revert Settings"), action: this._onFailure.bind(this), key: Clutter.Escape }); - this._okButton = this.addButton({ label: _("Keep Changes"), + this._okButton = this.addButton({ label: _("Keep Changes"), action: this._onSuccess.bind(this), default: true }); @@ -251,7 +251,7 @@ var WorkspaceTracker = class { } // If we don't have an empty workspace at the end, add one - if (!emptyWorkspaces[emptyWorkspaces.length -1]) { + if (!emptyWorkspaces[emptyWorkspaces.length - 1]) { workspaceManager.append_new_workspace(false, global.get_current_time()); emptyWorkspaces.push(true); } @@ -462,7 +462,7 @@ var TouchpadWorkspaceSwitchAction = class { this._dy = 0; this._enabled = true; actor.connect('captured-event', this._handleEvent.bind(this)); - this._touchpadSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.peripherals.touchpad'}); + this._touchpadSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.peripherals.touchpad' }); } get enabled() { @@ -514,7 +514,7 @@ var TouchpadWorkspaceSwitchAction = class { // Scale deltas up a bit to make it feel snappier this._dx += dx * 2; - if(!(this._touchpadSettings.get_boolean('natural-scroll'))) + if (!(this._touchpadSettings.get_boolean('natural-scroll'))) this._dy -= dy * 2; else this._dy += dy * 2; @@ -537,7 +537,7 @@ Signals.addSignalMethods(TouchpadWorkspaceSwitchAction.prototype); var WorkspaceSwitchAction = GObject.registerClass({ Signals: { 'activated': { param_types: [Meta.MotionDirection.$gtype] }, 'motion': { param_types: [GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] }, - 'cancel': { param_types: [] }}, + 'cancel': { param_types: [] } }, }, class WorkspaceSwitchAction extends Clutter.SwipeAction { _init(allowedModes) { super._init(); @@ -1032,7 +1032,7 @@ var WindowManager = class { //FIXME: Fix num buttons for (let i = 0; i < 50; i++) { let str = display.get_pad_action_label(pad, Meta.PadActionType.BUTTON, i); - labels.push(str ? str: ''); + labels.push(str ? str : ''); } if (this._gsdWacomProxy) { @@ -2128,7 +2128,7 @@ var WindowManager = class { if (!this._allowFavoriteShortcuts()) return; - let [,,,target] = binding.get_name().split('-'); + let [, , , target] = binding.get_name().split('-'); let apps = AppFavorites.getAppFavorites().getFavorites(); let app = apps[target - 1]; if (app) @@ -2161,7 +2161,7 @@ var WindowManager = class { if (workspaceManager.n_workspaces == 1) return; - let [action,,,target] = binding.get_name().split('-'); + let [action,,, target] = binding.get_name().split('-'); let newWs; let direction; diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 4b7e80082..8e9ad002b 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1065,9 +1065,9 @@ function rectEqual(one, two) { const WorkspaceActor = GObject.registerClass( class WorkspaceActor extends St.Widget { vfunc_get_focus_chain() { - return this.get_children().filter(c => c.visible).sort((a,b) => { - let cloneA = (a._delegate && a._delegate instanceof WindowClone) ? a._delegate: null; - let cloneB = (b._delegate && b._delegate instanceof WindowClone) ? b._delegate: null; + return this.get_children().filter(c => c.visible).sort((a, b) => { + let cloneA = (a._delegate && a._delegate instanceof WindowClone) ? a._delegate : null; + let cloneB = (b._delegate && b._delegate instanceof WindowClone) ? b._delegate : null; if (cloneA && cloneB) return cloneA.slotId - cloneB.slotId; diff --git a/js/ui/workspaceSwitcherPopup.js b/js/ui/workspaceSwitcherPopup.js index 648bc63fb..6052ef289 100644 --- a/js/ui/workspaceSwitcherPopup.js +++ b/js/ui/workspaceSwitcherPopup.js @@ -119,7 +119,7 @@ class WorkspaceSwitcherPopup extends St.Widget { if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP) indicator = new St.Bin({ style_class: 'ws-switcher-active-up' }); - else if(i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.DOWN) + else if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.DOWN) indicator = new St.Bin({ style_class: 'ws-switcher-active-down' }); else indicator = new St.Bin({ style_class: 'ws-switcher-box' }); diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index e39f139f9..8d23518f4 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -12,7 +12,7 @@ const Workspace = imports.ui.workspace; const WorkspacesView = imports.ui.workspacesView; // The maximum size of a thumbnail is 1/10 the width and height of the screen -let MAX_THUMBNAIL_SCALE = 1/10.; +let MAX_THUMBNAIL_SCALE = 1 / 10.; var RESCALE_ANIMATION_TIME = 0.2; var SLIDE_ANIMATION_TIME = 0.2; @@ -230,14 +230,14 @@ Signals.addSignalMethods(WindowClone.prototype); var ThumbnailState = { - NEW : 0, - ANIMATING_IN : 1, + NEW: 0, + ANIMATING_IN: 1, NORMAL: 2, - REMOVING : 3, - ANIMATING_OUT : 4, - ANIMATED_OUT : 5, - COLLAPSING : 6, - DESTROYED : 7 + REMOVING: 3, + ANIMATING_OUT: 4, + ANIMATED_OUT: 5, + COLLAPSING: 6, + DESTROYED: 7 }; /** @@ -778,7 +778,7 @@ class ThumbnailsBox extends St.Widget { let [w, h] = this._thumbnails[i].actor.get_transformed_size(); let targetBottom = targetBase + WORKSPACE_CUT_SIZE; let nextTargetBase = targetBase + h + spacing; - let nextTargetTop = nextTargetBase - spacing - ((i == length - 1) ? 0: WORKSPACE_CUT_SIZE); + let nextTargetTop = nextTargetBase - spacing - ((i == length - 1) ? 0 : WORKSPACE_CUT_SIZE); // Expand the target to include the placeholder, if it exists. if (i == this._dropPlaceholderPos) diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index fe16ae8cd..5fd9b1508 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -582,7 +582,7 @@ var WorkspacesDisplay = class { } hide() { - if (this._restackedNotifyId > 0){ + if (this._restackedNotifyId > 0) { Main.overview.disconnect(this._restackedNotifyId); this._restackedNotifyId = 0; } diff --git a/js/ui/xdndHandler.js b/js/ui/xdndHandler.js index c3b3b5e67..16741e3aa 100644 --- a/js/ui/xdndHandler.js +++ b/js/ui/xdndHandler.js @@ -43,7 +43,7 @@ var XdndHandler = class { } _onEnter() { - this._windowGroupVisibilityHandlerId = + this._windowGroupVisibilityHandlerId = global.window_group.connect('notify::visible', this._onWindowGroupVisibilityChanged.bind(this)); @@ -62,8 +62,8 @@ var XdndHandler = class { if (!cursorWindow.get_meta_window().is_override_redirect()) return; - let constraint_position = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.POSITION, - source: cursorWindow}); + let constraint_position = new Clutter.BindConstraint({ coordinate: Clutter.BindCoordinate.POSITION, + source: cursorWindow }); this._cursorWindowClone = new Clutter.Clone({ source: cursorWindow }); Main.uiGroup.add_actor(this._cursorWindowClone);