cleanup: Fix missing/stray spaces

Those are wrong according to our style guidelines, but the previous
eslint ruleset didn't catch them.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:
Florian Müllner 2019-08-19 19:55:49 +02:00 committed by Georges Basile Stavracas Neto
parent 682bd7e97c
commit 9eaa0089d0
41 changed files with 106 additions and 104 deletions

View File

@ -473,7 +473,7 @@ class EmptyPlaceholder extends Gtk.Box {
this.add(image);
let label = new Gtk.Label({
label: `<b><span size="x-large">${_("No Extensions Installed" )}</span></b>`,
label: `<b><span size="x-large">${_("No Extensions Installed")}</span></b>`,
use_markup: true,
visible: true
});

View File

@ -125,7 +125,7 @@ var UserListItem = GObject.registerClass({
let startTime = GLib.get_monotonic_time();
this._timedLoginTimeoutId = GLib.timeout_add (GLib.PRIORITY_DEFAULT, 33,
this._timedLoginTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 33,
() => {
let currentTime = GLib.get_monotonic_time();
let elapsedTime = (currentTime - startTime) / GLib.USEC_PER_SEC;
@ -509,7 +509,7 @@ var LoginDialog = GObject.registerClass({
this._sessionMenuButton = new SessionMenuButton();
this._sessionMenuButton.connect('session-activated',
(list, sessionId) => {
this._greeter.call_select_session_sync (sessionId, null);
this._greeter.call_select_session_sync(sessionId, null);
});
this._sessionMenuButton.opacity = 0;
this._sessionMenuButton.show();

View File

@ -75,7 +75,7 @@ let _ifaceResource = null;
function loadInterfaceXML(iface) {
if (!_ifaceResource) {
// don't use global.datadir so the method is usable from tests/tools
let dir = GLib.getenv ('GNOME_SHELL_DATADIR') || Config.PKGDATADIR;
let dir = GLib.getenv('GNOME_SHELL_DATADIR') || Config.PKGDATADIR;
let path = `${dir}/gnome-shell-dbus-interfaces.gresource`;
_ifaceResource = Gio.Resource.load(path);
_ifaceResource._register();

View File

@ -142,7 +142,7 @@ var IBusManager = class {
});
this._panelService.connect('focus-in', (panel, path) => {
if (!GLib.str_has_suffix(path, '/InputContext_1'))
this.emit ('focus-in');
this.emit('focus-in');
});
this._panelService.connect('focus-out', () => this.emit('focus-out'));

View File

@ -48,7 +48,7 @@ class InputMethod extends Clutter.InputMethod {
_onConnected() {
this._cancellable = new Gio.Cancellable();
this._ibus.create_input_context_async ('gnome-shell', -1,
this._ibus.create_input_context_async('gnome-shell', -1,
this._cancellable, this._setContext.bind(this));
}

View File

@ -138,7 +138,7 @@ function getAllProps(obj) {
if (obj === null || obj === undefined)
return [];
return Object.getOwnPropertyNames(obj).concat( getAllProps(Object.getPrototypeOf(obj)) );
return Object.getOwnPropertyNames(obj).concat(getAllProps(Object.getPrototypeOf(obj)));
}
// Given a string _expr_, returns all methods
@ -162,7 +162,7 @@ function getPropertyNamesFromExpression(expr, commandHeader = '') {
if (typeof obj === 'object') {
let allProps = getAllProps(obj);
// Get only things we are allowed to complete following a '.'
allProps = allProps.filter( isValidPropertyName );
allProps = allProps.filter(isValidPropertyName);
// Make sure propsUnique contains one key for every
// property so we end up with a unique list of properties
@ -210,8 +210,8 @@ function isUnsafeExpression(str) {
// If there is, it might be an unsafe assignment.
let prunedStr = removeLiterals(str);
prunedStr = prunedStr.replace(/[=!]==/g, ''); //replace === and !== with nothing
prunedStr = prunedStr.replace(/[=<>!]=/g, ''); //replace ==, <=, >=, != with nothing
prunedStr = prunedStr.replace(/[=!]==/g, ''); // replace === and !== with nothing
prunedStr = prunedStr.replace(/[=<>!]=/g, ''); // replace ==, <=, >=, != with nothing
if (prunedStr.match(/[=]/)) {
return true;

View File

@ -103,7 +103,7 @@ var LoginManagerSystemd = class {
getCurrentSessionProxy(callback) {
if (this._currentSession) {
callback (this._currentSession);
callback(this._currentSession);
return;
}

View File

@ -35,7 +35,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
_buildLayout(title, subtitle, body, options) {
// No support for non-modal system dialogs, so ignore the option
//let modal = options['modal'] || true;
// let modal = options['modal'] || true;
let denyLabel = options['deny_label'] || _("Deny Access");
let grantLabel = options['grant_label'] || _("Grant Access");
let iconName = options['icon'] || null;

View File

@ -62,7 +62,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
this.thumbnailsVisible = false;
let apps = Shell.AppSystem.get_default().get_running ();
let apps = Shell.AppSystem.get_default().get_running();
if (apps.length == 0)
return;
@ -369,11 +369,11 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
});
this._thumbnails = null;
if (this._switcherList._items[this._selectedIndex])
this._switcherList._items[this._selectedIndex].remove_accessible_state (Atk.StateType.EXPANDED);
this._switcherList._items[this._selectedIndex].remove_accessible_state(Atk.StateType.EXPANDED);
}
_createThumbnails() {
this._thumbnails = new ThumbnailList (this._items[this._selectedIndex].cachedWindows);
this._thumbnails = new ThumbnailList(this._items[this._selectedIndex].cachedWindows);
this._thumbnails.connect('item-activated', this._windowActivated.bind(this));
this._thumbnails.connect('item-entered', this._windowEntered.bind(this));
this._thumbnails.connect('item-removed', this._windowRemoved.bind(this));
@ -398,7 +398,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
}
});
this._switcherList._items[this._selectedIndex].add_accessible_state (Atk.StateType.EXPANDED);
this._switcherList._items[this._selectedIndex].add_accessible_state(Atk.StateType.EXPANDED);
}
});
@ -693,7 +693,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
// Cache the window list now; we don't handle dynamic changes here,
// and we don't want to be continually retrieving it
appIcon.cachedWindows = allWindows.filter(
w => windowTracker.get_window_app (w) == appIcon.app
w => windowTracker.get_window_app(w) == appIcon.app
);
if (appIcon.cachedWindows.length > 0)
this._addIcon(appIcon);
@ -853,7 +853,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
if (appIcon.cachedWindows.length == 1)
arrow.hide();
else
item.add_accessible_state (Atk.StateType.EXPANDABLE);
item.add_accessible_state(Atk.StateType.EXPANDABLE);
}
_removeIcon(app) {

View File

@ -390,7 +390,7 @@ var Calendar = GObject.registerClass({
reactive: true
});
this._buildHeader ();
this._buildHeader();
}
setEventSource(eventSource) {

View File

@ -676,7 +676,7 @@ var ChatNotification = HAVE_TP ? GObject.registerClass({
if (message.direction == NotificationDirection.RECEIVED)
this.update(this.source.title, messageBody,
{ datetime: GLib.DateTime.new_from_unix_local (message.timestamp),
{ datetime: GLib.DateTime.new_from_unix_local(message.timestamp),
bannerMarkup: true });
let group = (message.direction == NotificationDirection.RECEIVED

View File

@ -86,7 +86,7 @@ var CtrlAltTabManager = class CtrlAltTabManager {
for (let i = 0; i < windows.length; i++) {
let icon = null;
let iconName = null;
if (windows[i].get_window_type () == Meta.WindowType.DESKTOP) {
if (windows[i].get_window_type() == Meta.WindowType.DESKTOP) {
iconName = 'video-display-symbolic';
} else {
let app = windowTracker.get_window_app(windows[i]);

View File

@ -835,8 +835,8 @@ var Dash = GObject.registerClass({
}
this._dragPlaceholder = new DragPlaceholderItem();
this._dragPlaceholder.child.set_width (this.iconSize);
this._dragPlaceholder.child.set_height (this.iconSize / 2);
this._dragPlaceholder.child.set_width(this.iconSize);
this._dragPlaceholder.child.set_height(this.iconSize / 2);
this._box.insert_child_at_index(this._dragPlaceholder,
this._dragPlaceholderPos);
this._dragPlaceholder.show(fadeIn);

View File

@ -72,14 +72,14 @@ class TodayButton extends St.Button {
* "Tue 9:29 AM"). The string itself should become a full date, e.g.,
* "February 17 2015".
*/
let dateFormat = Shell.util_translate_time_string (N_("%B %-d %Y"));
let dateFormat = Shell.util_translate_time_string(N_("%B %-d %Y"));
this._dateLabel.set_text(date.toLocaleFormat(dateFormat));
/* Translators: This is the accessible name of the date button shown
* below the time in the shell; it should combine the weekday and the
* date, e.g. "Tuesday February 17 2015".
*/
dateFormat = Shell.util_translate_time_string (N_("%A %B %e %Y"));
dateFormat = Shell.util_translate_time_string(N_("%A %B %e %Y"));
this.accessible_name = date.toLocaleFormat(dateFormat);
}
});
@ -538,7 +538,7 @@ class DateMenuButton extends PanelMenu.Button {
this.label_actor = this._clockDisplay;
this.add_actor(box);
this.add_style_class_name ('clock-display');
this.add_style_class_name('clock-display');
let layout = new FreezableBinLayout();
let bin = new St.Widget({ layout_manager: layout });

View File

@ -43,7 +43,7 @@ class Dialog extends St.Widget {
});
this._dialog.add_child(this.contentLayout);
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_child(this.buttonLayout);
}
@ -96,7 +96,7 @@ class Dialog extends St.Widget {
}
addContent(actor) {
this.contentLayout.add (actor, { expand: true });
this.contentLayout.add(actor, { expand: true });
}
addButton(buttonInfo) {

View File

@ -150,7 +150,7 @@ var _Draggable = class _Draggable {
if (touchSequence)
pointer.sequence_grab(touchSequence, actor);
else if (pointer)
pointer.grab (actor);
pointer.grab(actor);
this._grabbedDevice = pointer;
this._touchSequence = touchSequence;
@ -171,7 +171,7 @@ var _Draggable = class _Draggable {
}
if (this._touchSequence)
this._grabbedDevice.sequence_ungrab (this._touchSequence);
this._grabbedDevice.sequence_ungrab(this._touchSequence);
else
this._grabbedDevice.ungrab();

View File

@ -46,8 +46,8 @@ var EdgeDragAction = GObject.registerClass({
vfunc_gesture_progress(_actor) {
let [startX, startY] = this.get_press_coords(0);
let [x, y] = this.get_motion_coords(0);
let offsetX = Math.abs (x - startX);
let offsetY = Math.abs (y - startY);
let offsetX = Math.abs(x - startX);
let offsetY = Math.abs(y - startY);
if (offsetX < EDGE_THRESHOLD && offsetY < EDGE_THRESHOLD)
return true;

View File

@ -23,7 +23,7 @@ const Gettext = imports.gettext;
// of interfaces in Javascript
function _patchContainerClass(containerClass) {
// This one is a straightforward mapping of the C method
containerClass.prototype.child_set = function(actor, props) {
containerClass.prototype.child_set = function (actor, props) {
let meta = this.get_child_meta(actor);
for (let prop in props)
meta[prop] = props[prop];
@ -32,7 +32,7 @@ function _patchContainerClass(containerClass) {
// clutter_container_add() actually is a an add-many-actors
// method. We conveniently, but somewhat dubiously, take the
// this opportunity to make it do something more useful.
containerClass.prototype.add = function(actor, props) {
containerClass.prototype.add = function (actor, props) {
this.add_actor(actor);
if (props)
this.child_set(actor, props);
@ -41,7 +41,7 @@ function _patchContainerClass(containerClass) {
function _patchLayoutClass(layoutClass, styleProps) {
if (styleProps)
layoutClass.prototype.hookup_style = function(container) {
layoutClass.prototype.hookup_style = function (container) {
container.connect('style-changed', () => {
let node = container.get_theme_node();
for (let prop in styleProps) {
@ -238,27 +238,27 @@ function init() {
_patchLayoutClass(Clutter.BoxLayout, { spacing: 'spacing' });
let origSetEasingDuration = Clutter.Actor.prototype.set_easing_duration;
Clutter.Actor.prototype.set_easing_duration = function(msecs) {
Clutter.Actor.prototype.set_easing_duration = function (msecs) {
origSetEasingDuration.call(this, adjustAnimationTime(msecs));
};
let origSetEasingDelay = Clutter.Actor.prototype.set_easing_delay;
Clutter.Actor.prototype.set_easing_delay = function(msecs) {
Clutter.Actor.prototype.set_easing_delay = function (msecs) {
origSetEasingDelay.call(this, adjustAnimationTime(msecs));
};
Clutter.Actor.prototype.ease = function(props, easingParams) {
Clutter.Actor.prototype.ease = function (props, easingParams) {
_easeActor(this, props, easingParams);
};
Clutter.Actor.prototype.ease_property = function(propName, target, params) {
Clutter.Actor.prototype.ease_property = function (propName, target, params) {
_easeActorProperty(this, propName, target, params);
};
St.Adjustment.prototype.ease = function(target, params) {
St.Adjustment.prototype.ease = function (target, params) {
// we're not an actor of course, but we implement the same
// transition API as Clutter.Actor, so this works anyway
_easeActorProperty(this, 'value', target, params);
};
Clutter.Actor.prototype.toString = function() {
Clutter.Actor.prototype.toString = function () {
return St.describe_actor(this);
};
// Deprecation warning for former JS classes turned into an actor subclass
@ -271,14 +271,14 @@ function init() {
}
});
St.set_slow_down_factor = function(factor) {
St.set_slow_down_factor = function (factor) {
let { stack } = new Error();
log(`St.set_slow_down_factor() is deprecated, use St.Settings.slow_down_factor\n${stack}`);
St.Settings.get().slow_down_factor = factor;
};
let origToString = Object.prototype.toString;
Object.prototype.toString = function() {
Object.prototype.toString = function () {
let base = origToString.call(this);
try {
if ('actor' in this && this.actor instanceof Clutter.Actor)
@ -291,7 +291,7 @@ function init() {
};
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
Date.prototype.toLocaleFormat = function(format) {
Date.prototype.toLocaleFormat = function (format) {
let dt = GLib.DateTime.new_from_unix_local(this.getTime() / 1000);
return dt ? dt.format(format) : '';
};

View File

@ -292,7 +292,7 @@ var GrabHelper = class GrabHelper {
let touchEnd = type == Clutter.EventType.TOUCH_END;
let touch = touchUpdate || touchBegin || touchEnd;
if (touch && !global.display.is_pointer_emulating_sequence (event.get_event_sequence()))
if (touch && !global.display.is_pointer_emulating_sequence(event.get_event_sequence()))
return Clutter.EVENT_PROPAGATE;
if (this._ignoreUntilRelease && (motion || release || touch)) {

View File

@ -246,7 +246,7 @@ var IconGrid = GObject.registerClass({
_onDestroy() {
if (this._updateIconSizesLaterId) {
Meta.later_remove (this._updateIconSizesLaterId);
Meta.later_remove(this._updateIconSizesLaterId);
this._updateIconSizesLaterId = 0;
}
}

View File

@ -403,7 +403,7 @@ var Key = GObject.registerClass({
_makeKey(key) {
let label = GLib.markup_escape_text(key, -1);
let button = new St.Button ({
let button = new St.Button({
label: label,
style_class: 'keyboard-key',
x_expand: true,
@ -1538,7 +1538,7 @@ class Keyboard extends St.BoxLayout {
for (let i = 0; i < rows.length; ++i) {
layout.appendRow();
let [pre, post] = this._getDefaultKeysForRow(i, rows.length, level);
this._mergeRowKeys (layout, pre, rows[i], post, numLevels);
this._mergeRowKeys(layout, pre, rows[i], post, numLevels);
}
}
@ -1810,8 +1810,8 @@ var KeyboardController = class {
this._inputSourceManager = InputSourceManager.getInputSourceManager();
this._sourceChangedId = this._inputSourceManager.connect('current-source-changed',
this._onSourceChanged.bind(this));
this._sourcesModifiedId = this._inputSourceManager.connect ('sources-changed',
this._onSourcesModified.bind(this));
this._sourcesModifiedId = this._inputSourceManager.connect('sources-changed',
this._onSourcesModified.bind(this));
this._currentSource = this._inputSourceManager.currentSource;
Main.inputMethod.connect('notify::content-purpose',

View File

@ -167,12 +167,12 @@ var Monitor = class Monitor {
const UiActor = GObject.registerClass(
class UiActor extends St.Widget {
vfunc_get_preferred_width (_forHeight) {
vfunc_get_preferred_width(_forHeight) {
let width = global.stage.width;
return [width, width];
}
vfunc_get_preferred_height (_forWidth) {
vfunc_get_preferred_height(_forWidth) {
let height = global.stage.height;
return [height, height];
}

View File

@ -667,7 +667,7 @@ var Extensions = GObject.registerClass({
if (this._numExtensions == 0)
this._extensionsList.remove_actor(this._noExtensions);
this._numExtensions ++;
this._numExtensions++;
this._extensionsList.add(extensionDisplay);
}
@ -692,7 +692,7 @@ var Extensions = GObject.registerClass({
let errors = extension.errors;
let errorDisplay = new St.BoxLayout({ vertical: true });
if (errors && errors.length) {
for (let i = 0; i < errors.length; i ++)
for (let i = 0; i < errors.length; i++)
errorDisplay.add(new St.Label({ text: errors[i] }));
} else {
/* Translators: argument is an extension UUID. */

View File

@ -330,7 +330,7 @@ var Magnifier = class Magnifier {
this.setCrosshairsClip(clip);
let theCrossHairs = this._crossHairs;
this._zoomRegions.forEach (zoomRegion => {
this._zoomRegions.forEach(zoomRegion => {
zoomRegion.addCrosshairs(theCrossHairs);
});
}
@ -472,7 +472,7 @@ var Magnifier = class Magnifier {
}
}
//// Private methods ////
// Private methods //
_updateMouseSprite() {
this._updateSpriteTexture();
@ -986,7 +986,7 @@ var ZoomRegion = class ZoomRegion {
setLensMode(lensMode) {
this._lensMode = lensMode;
if (!this._lensMode)
this.setScreenPosition (this._screenPosition);
this.setScreenPosition(this._screenPosition);
}
/**
@ -1272,7 +1272,7 @@ var ZoomRegion = class ZoomRegion {
return contrast;
}
//// Private methods ////
// Private methods //
_createActors() {
// The root actor for the zoom region
@ -1280,7 +1280,7 @@ var ZoomRegion = class ZoomRegion {
global.stage.add_actor(this._magView);
// hide the magnified region from CLUTTER_PICK_ALL
Shell.util_set_hidden_from_pick (this._magView, true);
Shell.util_set_hidden_from_pick(this._magView, true);
// Add a group to clip the contents of the magnified view.
let mainGroup = new Clutter.Actor({ clip_to_allocation: true });
@ -1320,7 +1320,7 @@ var ZoomRegion = class ZoomRegion {
_destroyActors() {
if (this._mouseActor == this._mouseSourceActor)
this._mouseActor.get_parent().remove_actor (this._mouseActor);
this._mouseActor.get_parent().remove_actor(this._mouseActor);
if (this._crossHairs)
this._crossHairs.removeFromParent(this._crossHairsActor);

View File

@ -125,7 +125,7 @@ var ShellMagnifier = class ShellMagnifier {
let zoomRegions = Main.magnifier.getZoomRegions();
let objectPaths = [];
let thoseZoomers = this._zoomers;
zoomRegions.forEach (aZoomRegion => {
zoomRegions.forEach(aZoomRegion => {
let found = false;
for (let objectPath in thoseZoomers) {
let proxyAndZoomRegion = thoseZoomers[objectPath];

View File

@ -204,7 +204,7 @@ function _initializeUI() {
_a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
global.display.connect('overlay-key', () => {
if (!_a11ySettings.get_boolean (STICKY_KEYS_ENABLE))
if (!_a11ySettings.get_boolean(STICKY_KEYS_ENABLE))
overview.toggle();
});
@ -374,11 +374,13 @@ function _loadOskLayouts() {
* Reloads the theme CSS file
*/
function loadTheme() {
let themeContext = St.ThemeContext.get_for_stage (global.stage);
let themeContext = St.ThemeContext.get_for_stage(global.stage);
let previousTheme = themeContext.get_theme();
let theme = new St.Theme ({ application_stylesheet: _cssStylesheet,
default_stylesheet: _defaultCssStylesheet });
let theme = new St.Theme({
application_stylesheet: _cssStylesheet,
default_stylesheet: _defaultCssStylesheet
});
if (theme.default_stylesheet == null)
throw new Error("No valid stylesheet found for '%s'".format(sessionMode.stylesheetName));
@ -390,7 +392,7 @@ function loadTheme() {
theme.load_stylesheet(customStylesheets[i]);
}
themeContext.set_theme (theme);
themeContext.set_theme(theme);
}
/**

View File

@ -168,7 +168,7 @@ class SlidingControl extends St.Widget {
let visibleWidth = this.getVisibleWidth();
if (direction == SlideDirection.LEFT)
return - visibleWidth;
return -visibleWidth;
else
return visibleWidth;
}

View File

@ -12,8 +12,8 @@ var INDICATORS_ANIMATION_DELAY_OUT = 62.5;
var INDICATORS_ANIMATION_MAX_TIME = 750;
var SWITCH_TIME = 400;
var INDICATORS_ANIMATION_MAX_TIME_OUT =
Math.min (SWITCH_TIME,
ANIMATION_TIME_OUT + ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
Math.min(SWITCH_TIME,
ANIMATION_TIME_OUT + ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
var ANIMATION_DELAY = 100;

View File

@ -436,11 +436,11 @@ class ActivitiesButton extends PanelMenu.Button {
Main.overview.connect('showing', () => {
this.add_style_pseudo_class('overview');
this.add_accessible_state (Atk.StateType.CHECKED);
this.add_accessible_state(Atk.StateType.CHECKED);
});
Main.overview.connect('hiding', () => {
this.remove_style_pseudo_class('overview');
this.remove_accessible_state (Atk.StateType.CHECKED);
this.remove_accessible_state(Atk.StateType.CHECKED);
});
this._xdndTimeOut = 0;
@ -646,7 +646,7 @@ class PanelCorner extends St.DrawingArea {
Clutter.cairo_set_source_color(cr, backgroundColor);
cr.save();
cr.translate(xOffsetDirection * offset, - offset);
cr.translate(xOffsetDirection * offset, -offset);
cr.appendPath(savedPath);
cr.fill();
cr.restore();

View File

@ -68,7 +68,7 @@ var PopupBaseMenuItem = GObject.registerClass({
}
}, class PopupBaseMenuItem extends St.BoxLayout {
_init(params) {
params = Params.parse (params, {
params = Params.parse(params, {
reactive: true,
activate: true,
hover: true,
@ -1177,7 +1177,7 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
} else {
this.remove_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(null);
this.remove_accessible_state (Atk.StateType.EXPANDED);
this.remove_accessible_state(Atk.StateType.EXPANDED);
this.remove_style_pseudo_class('checked');
}
}

View File

@ -53,7 +53,7 @@ var Ripples = class Ripples {
ripple.visible = true;
ripple.opacity = 255 * Math.sqrt(startOpacity);
ripple.scale_x = ripple.scale_y = startScale;
ripple.set_translation( - this._px * ripple.width, - this._py * ripple.height, 0.0);
ripple.set_translation(-this._px * ripple.width, -this._py * ripple.height, 0.0);
ripple.ease({
opacity: 0,

View File

@ -172,7 +172,7 @@ var ScreenshotService = class {
let [stream, file] = this._createStream(filename);
screenshot.screenshot_area (x, y, width, height, stream,
screenshot.screenshot_area(x, y, width, height, stream,
(o, res) => {
try {
let [result, area] =
@ -180,7 +180,7 @@ var ScreenshotService = class {
this._onScreenshotComplete(
result, area, stream, file, flash, invocation);
} catch (e) {
invocation.return_gerror (e);
invocation.return_gerror(e);
}
});
}
@ -193,7 +193,7 @@ var ScreenshotService = class {
let [stream, file] = this._createStream(filename);
screenshot.screenshot_window (includeFrame, includeCursor, stream,
screenshot.screenshot_window(includeFrame, includeCursor, stream,
(o, res) => {
try {
let [result, area] =
@ -201,7 +201,7 @@ var ScreenshotService = class {
this._onScreenshotComplete(
result, area, stream, file, flash, invocation);
} catch (e) {
invocation.return_gerror (e);
invocation.return_gerror(e);
}
});
}
@ -222,7 +222,7 @@ var ScreenshotService = class {
this._onScreenshotComplete(
result, area, stream, file, flash, invocation);
} catch (e) {
invocation.return_gerror (e);
invocation.return_gerror(e);
}
});
}

View File

@ -200,8 +200,8 @@ function _collect(scriptModule, outputFile) {
let raw = f.replace(null, false,
Gio.FileCreateFlags.NONE,
null);
let out = Gio.BufferedOutputStream.new_sized (raw, 4096);
Shell.write_string_to_stream (out, "{\n");
let out = Gio.BufferedOutputStream.new_sized(raw, 4096);
Shell.write_string_to_stream(out, "{\n");
Shell.write_string_to_stream(out, '"events":\n');
Shell.PerfLog.get_default().dump_events(out);
@ -250,10 +250,10 @@ function _collect(scriptModule, outputFile) {
}
Shell.write_string_to_stream(out, ' ]');
Shell.write_string_to_stream (out, ',\n"log":\n');
Shell.write_string_to_stream(out, ',\n"log":\n');
Shell.PerfLog.get_default().dump_log(out);
Shell.write_string_to_stream (out, '\n}\n');
Shell.write_string_to_stream(out, '\n}\n');
out.close(null);
} else {
let metrics = [];
@ -262,13 +262,13 @@ function _collect(scriptModule, outputFile) {
metrics.sort();
print ('------------------------------------------------------------');
print('------------------------------------------------------------');
for (let i = 0; i < metrics.length; i++) {
let metric = metrics[i];
print (`# ${scriptModule.METRICS[metric].description}`);
print (`${metric}: ${scriptModule.METRICS[metric].value}${scriptModule.METRICS[metric].units}`);
print(`# ${scriptModule.METRICS[metric].description}`);
print(`${metric}: ${scriptModule.METRICS[metric].value}${scriptModule.METRICS[metric].units}`);
}
print ('------------------------------------------------------------');
print('------------------------------------------------------------');
}
}

View File

@ -145,7 +145,7 @@ function addContextMenu(entry, params) {
if (entry.menu)
return;
params = Params.parse (params, { isPassword: false, actionMode: Shell.ActionMode.POPUP });
params = Params.parse(params, { isPassword: false, actionMode: Shell.ActionMode.POPUP });
entry.menu = new EntryMenu(entry);
entry.menu.isPassword = params.isPassword;

View File

@ -1032,7 +1032,7 @@ class InputSourceIndicator extends PanelMenu.Button {
break;
default:
log ('IBus property %s has invalid type %d'.format(prop.get_key(), type));
log('IBus property %s has invalid type %d'.format(prop.get_key(), type));
continue;
}

View File

@ -1016,7 +1016,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
}
_networkCompare(network, accessPoint) {
if (!network.ssid.equal (accessPoint.get_ssid()))
if (!network.ssid.equal(accessPoint.get_ssid()))
return false;
if (network.mode != accessPoint.mode)
return false;

View File

@ -124,7 +124,7 @@ var Client = class {
});
}
get authMode () {
get authMode() {
return this._proxy.AuthMode;
}
};

View File

@ -588,7 +588,7 @@ function drawArrow(area, side) {
let borderColor = themeNode.get_border_color(side);
let bodyColor = themeNode.get_foreground_color();
let [width, height] = area.get_surface_size ();
let [width, height] = area.get_surface_size();
let cr = area.get_context();
cr.setLineWidth(1.0);

View File

@ -55,7 +55,7 @@ var TouchpadShowOverviewAction = class {
return Clutter.EVENT_PROPAGATE;
if (event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END)
this.emit('activated', event.get_gesture_pinch_scale ());
this.emit('activated', event.get_gesture_pinch_scale());
return Clutter.EVENT_STOP;
}
@ -583,7 +583,7 @@ var ViewSelector = GObject.registerClass({
if (source != this._text &&
this._text.has_key_focus() &&
this._text.text == '' &&
!this._text.has_preedit () &&
!this._text.has_preedit() &&
!Main.layoutManager.keyboardBox.contains(source)) {
// the user clicked outside after activating the entry, but
// with no search term entered and no keyboard button pressed

View File

@ -534,7 +534,7 @@ var TouchpadWorkspaceSwitchAction = class {
this.emit('motion', this._dx, this._dy);
} else {
if ((event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END && ! this._checkActivated()) ||
if ((event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END && !this._checkActivated()) ||
event.get_gesture_phase() == Clutter.TouchpadGesturePhase.CANCEL)
this.emit('cancel');
@ -635,7 +635,7 @@ var AppSwitchAction = GObject.registerClass({
const LONG_PRESS_TIMEOUT = 250;
let nPoints = this.get_n_current_points();
let event = this.get_last_event (nPoints - 1);
let event = this.get_last_event(nPoints - 1);
if (nPoints == 3) {
this._longPressStartTime = event.get_time();
@ -1030,7 +1030,7 @@ var WindowManager = class {
global.display.connect('pad-mode-switch', (display, pad, group, mode) => {
let labels = [];
//FIXME: Fix num buttons
// 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 : '');
@ -1193,7 +1193,7 @@ var WindowManager = class {
if (focusWindow == null) {
nextWindow = windows[0].metaWindow;
} else {
let index = this._lookupIndex (windows, focusWindow) + 1;
let index = this._lookupIndex(windows, focusWindow) + 1;
if (index >= windows.length)
index = 0;
@ -1850,7 +1850,7 @@ var WindowManager = class {
wgroup.add_actor(switchData.container);
let workspaceManager = global.workspace_manager;
let curWs = workspaceManager.get_workspace_by_index (from);
let curWs = workspaceManager.get_workspace_by_index(from);
for (let dir of Object.values(Meta.MotionDirection)) {
let ws = null;
@ -2188,7 +2188,7 @@ var WindowManager = class {
window.change_workspace(workspace);
global.display.clear_mouse_mode();
workspace.activate_with_focus (window, global.get_current_time());
workspace.activate_with_focus(window, global.get_current_time());
}
}

View File

@ -801,7 +801,7 @@ var ThumbnailsBox = GObject.registerClass({
targetBase = this._thumbnails[0].y;
let targetTop = targetBase - spacing - WORKSPACE_CUT_SIZE;
let length = this._thumbnails.length;
for (let i = 0; i < length; i ++) {
for (let i = 0; i < length; i++) {
// Allow the reorder target to have a 10px "cut" into
// each side of the thumbnail, to make dragging onto the
// placeholder easier
@ -1216,7 +1216,7 @@ var ThumbnailsBox = GObject.registerClass({
vfunc_allocate(box, flags) {
this.set_allocation(box, flags);
let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);
let rtl = (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL);
if (this._thumbnails.length == 0) // not visible
return;
@ -1258,7 +1258,7 @@ var ThumbnailsBox = GObject.registerClass({
let slideOffset; // X offset when thumbnail is fully slid offscreen
if (rtl)
slideOffset = - (thumbnailWidth + themeNode.get_padding(St.Side.LEFT));
slideOffset = -(thumbnailWidth + themeNode.get_padding(St.Side.LEFT));
else
slideOffset = thumbnailWidth + themeNode.get_padding(St.Side.RIGHT);