style: Fix stray/missing semi-colons

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
Florian Müllner 2019-01-29 02:18:52 +01:00
parent 55235c2552
commit 29b04fcbf2
45 changed files with 75 additions and 75 deletions

View File

@ -401,7 +401,7 @@ var LoginDialog = GObject.registerClass({
this.connect('destroy', this._onDestroy.bind(this)); this.connect('destroy', this._onDestroy.bind(this));
parentActor.add_child(this); parentActor.add_child(this);
this._userManager = AccountsService.UserManager.get_default() this._userManager = AccountsService.UserManager.get_default();
this._gdmClient = new Gdm.Client(); this._gdmClient = new Gdm.Client();
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA }); this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });

View File

@ -19,7 +19,7 @@ var Manager = class {
this._aggregateProvider = Provider(Gio.DBus.system, this._aggregateProvider = Provider(Gio.DBus.system,
'org.freedesktop.realmd', 'org.freedesktop.realmd',
'/org/freedesktop/realmd', '/org/freedesktop/realmd',
this._reloadRealms.bind(this)) this._reloadRealms.bind(this));
this._realms = {}; this._realms = {};
this._signalId = this._aggregateProvider.connect('g-properties-changed', this._signalId = this._aggregateProvider.connect('g-properties-changed',
@ -104,4 +104,4 @@ var Manager = class {
this._updateLoginFormat(); this._updateLoginFormat();
} }
}; };
Signals.addSignalMethods(Manager.prototype) Signals.addSignalMethods(Manager.prototype);

View File

@ -30,7 +30,7 @@ var LOGO_KEY = 'logo';
var DISABLE_USER_LIST_KEY = 'disable-user-list'; var DISABLE_USER_LIST_KEY = 'disable-user-list';
// Give user 48ms to read each character of a PAM message // Give user 48ms to read each character of a PAM message
var USER_READ_TIME = 48 var USER_READ_TIME = 48;
var MessageType = { var MessageType = {
NONE: 0, NONE: 0,

View File

@ -86,7 +86,7 @@ function loadInterfaceXML(iface) {
try { try {
let [ok, bytes] = f.load_contents(null); let [ok, bytes] = f.load_contents(null);
if (bytes instanceof Uint8Array) if (bytes instanceof Uint8Array)
xml = imports.byteArray.toString(bytes) xml = imports.byteArray.toString(bytes);
else else
xml = bytes.toString(); xml = bytes.toString();
} catch (e) { } catch (e) {

View File

@ -74,7 +74,7 @@ class InputMethod extends Clutter.InputMethod {
this._context = null; this._context = null;
this._hints = 0; this._hints = 0;
this._purpose = 0; this._purpose = 0;
this._preeditStr = '' this._preeditStr = '';
this._preeditPos = 0; this._preeditPos = 0;
this._preeditVisible = false; this._preeditVisible = false;
} }

View File

@ -173,7 +173,7 @@ var ModemCdma = class {
} else { } else {
let [bandClass, band, sid] = result; let [bandClass, band, sid] = result;
this.operator_name = _findProviderForSid(sid) this.operator_name = _findProviderForSid(sid);
} }
this.emit('notify::operator-name'); this.emit('notify::operator-name');
}); });

View File

@ -12,4 +12,4 @@ function PermissionStore(initCallback, cancellable) {
'org.freedesktop.impl.portal.PermissionStore', 'org.freedesktop.impl.portal.PermissionStore',
'/org/freedesktop/impl/portal/PermissionStore', '/org/freedesktop/impl/portal/PermissionStore',
initCallback, cancellable); initCallback, cancellable);
}; }

View File

@ -380,7 +380,7 @@ class CloseButton extends St.Button {
let themeNode = this.get_theme_node(); let themeNode = this.get_theme_node();
let offY = this._computeBoxPointerOffset(); let offY = this._computeBoxPointerOffset();
this.translation_x = themeNode.get_length('-shell-close-overlap-x') this.translation_x = themeNode.get_length('-shell-close-overlap-x');
this.translation_y = themeNode.get_length('-shell-close-overlap-y') + offY; this.translation_y = themeNode.get_length('-shell-close-overlap-y') + offY;
} }

View File

@ -30,7 +30,7 @@ var METRICS = {
geditStartTime: geditStartTime:
{ description: "Time from gedit launch to window drawn", { description: "Time from gedit launch to window drawn",
units: "us" }, units: "us" },
} };
function waitAndDraw(milliseconds) { function waitAndDraw(milliseconds) {
let cb; let cb;

View File

@ -36,7 +36,7 @@ function _createWindowClone(window, size) {
// usual hack for the usual bug in ClutterBinLayout... // usual hack for the usual bug in ClutterBinLayout...
x_expand: true, x_expand: true,
y_expand: true }); y_expand: true });
}; }
function getWindows(workspace) { function getWindows(workspace) {
// We ignore skip-taskbar windows in switchers, but if they are attached // We ignore skip-taskbar windows in switchers, but if they are attached
@ -459,7 +459,7 @@ class CyclerHighlight {
_onDestroy() { _onDestroy() {
this.window = null; this.window = null;
} }
}; }
// We don't show an actual popup, so just provide what SwitcherPopup // We don't show an actual popup, so just provide what SwitcherPopup
// expects instead of inheriting from SwitcherList // expects instead of inheriting from SwitcherList
@ -1036,7 +1036,7 @@ class WindowList extends SwitcherPopup.SwitcherList {
this.icons.push(icon); this.icons.push(icon);
icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => { icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
this._removeWindow(window) this._removeWindow(window);
}); });
} }
@ -1072,7 +1072,7 @@ class WindowList extends SwitcherPopup.SwitcherList {
childBox.y1 = childBox.y2 - this._label.height; childBox.y1 = childBox.y2 - this._label.height;
this._label.allocate(childBox, flags); this._label.allocate(childBox, flags);
let totalLabelHeight = this._label.height + themeNode.get_padding(St.Side.BOTTOM) let totalLabelHeight = this._label.height + themeNode.get_padding(St.Side.BOTTOM);
childBox.x1 = box.x1; childBox.x1 = box.x1;
childBox.x2 = box.x2; childBox.x2 = box.x2;
childBox.y1 = box.y1; childBox.y1 = box.y1;

View File

@ -217,7 +217,7 @@ class BaseAppView {
Tweener.addTween(this._grid, params); Tweener.addTween(this._grid, params);
} }
}; }
Signals.addSignalMethods(BaseAppView.prototype); Signals.addSignalMethods(BaseAppView.prototype);
var AllView = class AllView extends BaseAppView { var AllView = class AllView extends BaseAppView {
@ -852,7 +852,7 @@ var AppDisplay = class AppDisplay {
this._controls.opacity = 0; this._controls.opacity = 0;
finalOpacity = 255; finalOpacity = 255;
} else { } else {
finalOpacity = 0 finalOpacity = 0;
} }
Tweener.addTween(this._controls, Tweener.addTween(this._controls,

View File

@ -187,7 +187,7 @@ class AppFavorites {
} }
}); });
} }
}; }
Signals.addSignalMethods(AppFavorites.prototype); Signals.addSignalMethods(AppFavorites.prototype);
var appFavoritesInstance = null; var appFavoritesInstance = null;

View File

@ -110,7 +110,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
} }
_openSettings() { _openSettings() {
let desktopFile = 'gnome-sound-panel.desktop' let desktopFile = 'gnome-sound-panel.desktop';
let app = Shell.AppSystem.get_default().lookup_app(desktopFile); let app = Shell.AppSystem.get_default().lookup_app(desktopFile);
if (!app) { if (!app) {

View File

@ -14,7 +14,7 @@ var BarLevel = class {
this._barLevelWidth = 0; this._barLevelWidth = 0;
if (params == undefined) if (params == undefined)
params = {} params = {};
this.actor = new St.DrawingArea({ styleClass: params['styleClass'] || 'barlevel', this.actor = new St.DrawingArea({ styleClass: params['styleClass'] || 'barlevel',
can_focus: params['canFocus'] || false, can_focus: params['canFocus'] || false,

View File

@ -396,7 +396,7 @@ var BoxPointer = GObject.registerClass({
cr.lineTo(x1 - rise, y1); cr.lineTo(x1 - rise, y1);
cr.lineTo(x1 + borderRadius, y1); cr.lineTo(x1 + borderRadius, y1);
} else if (skipBottomLeft) { } else if (skipBottomLeft) {
cr.lineTo(x1 - rise, y2) cr.lineTo(x1 - rise, y2);
cr.lineTo(x1 - rise, y2 - halfBase); cr.lineTo(x1 - rise, y2 - halfBase);
} else { } else {
cr.lineTo(x1, this._arrowOrigin + halfBase); cr.lineTo(x1, this._arrowOrigin + halfBase);
@ -437,7 +437,7 @@ var BoxPointer = GObject.registerClass({
this._sourceActorDestroyId = this._sourceActor.connect('destroy', () => { this._sourceActorDestroyId = this._sourceActor.connect('destroy', () => {
this._sourceActor = null; this._sourceActor = null;
delete this._sourceActorDestroyId; delete this._sourceActorDestroyId;
}) });
} }
} }

View File

@ -6,8 +6,8 @@ const Dialog = imports.ui.dialog;
const Main = imports.ui.main; const Main = imports.ui.main;
const Tweener = imports.ui.tweener; const Tweener = imports.ui.tweener;
var FROZEN_WINDOW_BRIGHTNESS = -0.3 var FROZEN_WINDOW_BRIGHTNESS = -0.3;
var DIALOG_TRANSITION_TIME = 0.15 var DIALOG_TRANSITION_TIME = 0.15;
var ALIVE_TIMEOUT = 5000; var ALIVE_TIMEOUT = 5000;
var CloseDialog = GObject.registerClass({ var CloseDialog = GObject.registerClass({
@ -165,7 +165,7 @@ var CloseDialog = GObject.registerClass({
GLib.source_remove(this._timeoutId); GLib.source_remove(this._timeoutId);
this._timeoutId = 0; this._timeoutId = 0;
global.display.disconnect(this._windowFocusChangedId) global.display.disconnect(this._windowFocusChangedId);
this._windowFocusChangedId = 0; this._windowFocusChangedId = 0;
global.stage.disconnect(this._keyFocusChangedId); global.stage.disconnect(this._keyFocusChangedId);

View File

@ -172,7 +172,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
log('keyringPrompt: Failed to show modal dialog.' + log('keyringPrompt: Failed to show modal dialog.' +
' Dismissing prompt request'); ' Dismissing prompt request');
this.prompt.cancel() this.prompt.cancel();
return false; return false;
} }

View File

@ -343,7 +343,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
break; break;
default: default:
log('Invalid connection type: ' + connectionType); log('Invalid connection type: ' + connectionType);
}; }
return content; return content;
} }

View File

@ -50,7 +50,7 @@ var AuthenticationDialog = GObject.registerClass({
userName = userNames[0]; userName = userNames[0];
this._user = AccountsService.UserManager.get_default().get_user(userName); this._user = AccountsService.UserManager.get_default().get_user(userName);
let userRealName = this._user.get_real_name() let userRealName = this._user.get_real_name();
this._userLoadedId = this._user.connect('notify::is_loaded', this._userLoadedId = this._user.connect('notify::is_loaded',
this._onUserChanged.bind(this)); this._onUserChanged.bind(this));
this._userChangedId = this._user.connect('changed', this._userChangedId = this._user.connect('changed',

View File

@ -81,7 +81,7 @@ class DashItemContainer extends St.Widget {
let itemHeight = this.allocation.y2 - this.allocation.y1; let itemHeight = this.allocation.y2 - this.allocation.y1;
let labelHeight = this.label.get_height(); let labelHeight = this.label.get_height();
let yOffset = Math.floor((itemHeight - labelHeight) / 2) let yOffset = Math.floor((itemHeight - labelHeight) / 2);
let y = stageY + yOffset; let y = stageY + yOffset;

View File

@ -47,7 +47,7 @@ var TodayButton = class TodayButton {
this._calendar.connect('selected-date-changed', (calendar, date) => { this._calendar.connect('selected-date-changed', (calendar, date) => {
// Make the button reactive only if the selected date is not the // Make the button reactive only if the selected date is not the
// current date. // current date.
this.actor.reactive = !_isToday(date) this.actor.reactive = !_isToday(date);
}); });
} }

View File

@ -689,12 +689,12 @@ var _Draggable = class _Draggable {
params['onCompleteParams'] = [this._dragActor, eventTime]; params['onCompleteParams'] = [this._dragActor, eventTime];
// start the animation // start the animation
Tweener.addTween(this._dragActor, params) Tweener.addTween(this._dragActor, params);
} }
_finishAnimation() { _finishAnimation() {
if (!this._animationInProgress) if (!this._animationInProgress)
return return;
this._animationInProgress = false; this._animationInProgress = false;
if (!this._buttonDown) if (!this._buttonDown)

View File

@ -44,7 +44,7 @@ var CandidateArea = class CandidateArea {
case Clutter.ScrollDirection.DOWN: case Clutter.ScrollDirection.DOWN:
this.emit('cursor-down'); this.emit('cursor-down');
break; break;
}; }
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}); });

View File

@ -141,7 +141,7 @@ class BaseIcon extends St.Bin {
function clamp(value, min, max) { function clamp(value, min, max) {
return Math.max(Math.min(value, max), min); return Math.max(Math.min(value, max), min);
}; }
function zoomOutActor(actor) { function zoomOutActor(actor) {
let actorClone = new Clutter.Clone({ source: actor, let actorClone = new Clutter.Clone({ source: actor,
@ -385,7 +385,7 @@ var IconGrid = GObject.registerClass({
let childVolume = child.get_transformed_paint_volume(this); let childVolume = child.get_transformed_paint_volume(this);
if (!childVolume) if (!childVolume)
return false return false;
paintVolume.union(childVolume); paintVolume.union(childVolume);
} }
@ -887,7 +887,7 @@ var PaginatedIconGrid = GObject.registerClass({
if (!this._nPages) if (!this._nPages)
return 0; return 0;
let firstPageItem = pageNumber * this._childrenPerPage let firstPageItem = pageNumber * this._childrenPerPage;
let childBox = this._getVisibleChildren()[firstPageItem].get_allocation_box(); let childBox = this._getVisibleChildren()[firstPageItem].get_allocation_box();
return childBox.y1 - this.topPadding; return childBox.y1 - this.topPadding;
} }

View File

@ -297,7 +297,7 @@ var Key = class Key {
} }
_press(key) { _press(key) {
this.emit('activated') this.emit('activated');
if (key != this.key || this._extended_keys.length == 0) { if (key != this.key || this._extended_keys.length == 0) {
this.emit('pressed', this._getKeyval(key), key); this.emit('pressed', this._getKeyval(key), key);
@ -680,7 +680,7 @@ var EmojiPager = class EmojiPager {
_onPanEnd() { _onPanEnd() {
if (Math.abs(this._delta) < this.actor.width * PANEL_SWITCH_RELATIVE_DISTANCE) { if (Math.abs(this._delta) < this.actor.width * PANEL_SWITCH_RELATIVE_DISTANCE) {
this._onPanCancel() this._onPanCancel();
} else { } else {
let value; let value;
if (this._delta > 0) if (this._delta > 0)
@ -951,7 +951,7 @@ var EmojiSelection = class EmojiSelection {
let section = this._sections[i]; let section = this._sections[i];
key = new Key(section.label, []); key = new Key(section.label, []);
key.connect('released', () => { this._emojiPager.setCurrentSection(section, 0) }); key.connect('released', () => { this._emojiPager.setCurrentSection(section, 0); });
row.appendKey(key.actor); row.appendKey(key.actor);
section.button = key; section.button = key;
@ -1750,13 +1750,13 @@ var KeyboardController = class {
purpose == Clutter.InputContentPurpose.PHONE) purpose == Clutter.InputContentPurpose.PHONE)
keypadVisible = true; keypadVisible = true;
this.emit('emoji-visible', emojiVisible) this.emit('emoji-visible', emojiVisible);
this.emit('keypad-visible', keypadVisible); this.emit('keypad-visible', keypadVisible);
} }
getGroups() { getGroups() {
let inputSources = this._inputSourceManager.inputSources; let inputSources = this._inputSourceManager.inputSources;
let groups = [] let groups = [];
for (let i in inputSources) { for (let i in inputSources) {
let is = inputSources[i]; let is = inputSources[i];

View File

@ -5,7 +5,7 @@ const Ripples = imports.ui.ripples;
const Main = imports.ui.main; const Main = imports.ui.main;
const LOCATE_POINTER_KEY = "locate-pointer"; const LOCATE_POINTER_KEY = "locate-pointer";
const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface" const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface";
var LocatePointer = class { var LocatePointer = class {
constructor() { constructor() {

View File

@ -179,7 +179,7 @@ var ModalDialog = GObject.registerClass({
time: OPEN_AND_CLOSE_TIME, time: OPEN_AND_CLOSE_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: this._closeComplete.bind(this) onComplete: this._closeComplete.bind(this)
}) });
else else
this._closeComplete(); this._closeComplete();
} }

View File

@ -231,7 +231,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
// There's already a pending call to GetConnectionUnixProcessID, // There's already a pending call to GetConnectionUnixProcessID,
// which will see the new notification data when it finishes, // which will see the new notification data when it finishes,
// so we don't have to do anything. // so we don't have to do anything.
return invocation.return_value(GLib.Variant.new('(u)', [id]));; return invocation.return_value(GLib.Variant.new('(u)', [id]));
} }
this._busProxy.GetConnectionUnixProcessIDRemote(sender, (result, excp) => { this._busProxy.GetConnectionUnixProcessIDRemote(sender, (result, excp) => {

View File

@ -18,7 +18,7 @@ function getRtlSlideDirection(direction, actor) {
SlideDirection.RIGHT : SlideDirection.LEFT; SlideDirection.RIGHT : SlideDirection.LEFT;
return direction; return direction;
}; }
var SlideDirection = { var SlideDirection = {
LEFT: 0, LEFT: 0,

View File

@ -121,7 +121,7 @@ var ActionComboBox = class {
this.actor.set_child(box); this.actor.set_child(box);
this._label = new St.Label({ style_class: 'combo-box-label' }); this._label = new St.Label({ style_class: 'combo-box-label' });
box.add_child(this._label) box.add_child(this._label);
let arrow = new St.Icon({ style_class: 'popup-menu-arrow', let arrow = new St.Icon({ style_class: 'popup-menu-arrow',
icon_name: 'pan-down-symbolic', icon_name: 'pan-down-symbolic',
@ -457,7 +457,7 @@ var PadDiagram = GObject.registerClass({
// I miss Cairo.Matrix // I miss Cairo.Matrix
let dimensions = this._handle.get_dimensions(); let dimensions = this._handle.get_dimensions();
x = x * this._scale + this._actorWidth / 2 - dimensions.width / 2 * this._scale; x = x * this._scale + this._actorWidth / 2 - dimensions.width / 2 * this._scale;
y = y * this._scale + this._actorHeight / 2 - dimensions.height / 2 * this._scale;; y = y * this._scale + this._actorHeight / 2 - dimensions.height / 2 * this._scale;
return [Math.round(x), Math.round(y)]; return [Math.round(x), Math.round(y)];
} }
@ -488,7 +488,7 @@ var PadDiagram = GObject.registerClass({
pos.y = this._imageHeight - pos.y; pos.y = this._imageHeight - pos.y;
} }
let [x, y] = this._transformPoint(pos.x, pos.y) let [x, y] = this._transformPoint(pos.x, pos.y);
return [true, x, y, direction]; return [true, x, y, direction];
} }
@ -734,7 +734,7 @@ var PadOsd = class {
_updatePadChooser() { _updatePadChooser() {
if (this._groupPads.length > 1) { if (this._groupPads.length > 1) {
if (this._padChooser == null) { if (this._padChooser == null) {
this._padChooser = new PadChooser(this.padDevice, this._groupPads) this._padChooser = new PadChooser(this.padDevice, this._groupPads);
this._padChooser.connect('pad-selected', (chooser, pad) => { this._padChooser.connect('pad-selected', (chooser, pad) => {
this._requestForOtherPad(pad); this._requestForOtherPad(pad);
}); });
@ -864,7 +864,7 @@ var PadOsd = class {
if (this._followUpActionEdition(str)) if (this._followUpActionEdition(str))
return; return;
this._padDiagram.stopEdition(false, str ? str : _("None")) this._padDiagram.stopEdition(false, str ? str : _("None"));
this._editedAction = null; this._editedAction = null;
} }

View File

@ -51,7 +51,7 @@ function _premultiply(color) {
green: _norm(color.green * color.alpha), green: _norm(color.green * color.alpha),
blue: _norm(color.blue * color.alpha), blue: _norm(color.blue * color.alpha),
alpha: color.alpha }); alpha: color.alpha });
}; }
function _unpremultiply(color) { function _unpremultiply(color) {
if (color.alpha == 0) if (color.alpha == 0)
@ -62,7 +62,7 @@ function _unpremultiply(color) {
let blue = Math.min((color.blue * 255 + 127) / color.alpha, 255); let blue = Math.min((color.blue * 255 + 127) / color.alpha, 255);
return new Clutter.Color({ red: red, green: green, return new Clutter.Color({ red: red, green: green,
blue: blue, alpha: color.alpha }); blue: blue, alpha: color.alpha });
}; }
class AppMenu extends PopupMenu.PopupMenu { class AppMenu extends PopupMenu.PopupMenu {
constructor(sourceActor) { constructor(sourceActor) {
@ -1189,7 +1189,7 @@ class Panel extends St.Widget {
_getDraggableWindowForPosition(stageX) { _getDraggableWindowForPosition(stageX) {
let workspaceManager = global.workspace_manager; let workspaceManager = global.workspace_manager;
let workspace = workspaceManager.get_active_workspace() let workspace = workspaceManager.get_active_workspace();
let allWindowsByStacking = global.display.sort_windows_by_stacking( let allWindowsByStacking = global.display.sort_windows_by_stacking(
workspace.list_windows() workspace.list_windows()
).reverse(); ).reverse();
@ -1200,7 +1200,7 @@ class Panel extends St.Widget {
metaWindow.showing_on_its_workspace() && metaWindow.showing_on_its_workspace() &&
metaWindow.get_window_type() != Meta.WindowType.DESKTOP && metaWindow.get_window_type() != Meta.WindowType.DESKTOP &&
metaWindow.maximized_vertically && metaWindow.maximized_vertically &&
stageX > rect.x && stageX < rect.x + rect.width stageX > rect.x && stageX < rect.x + rect.width;
}); });
} }
}); });

View File

@ -67,7 +67,7 @@ class PieTimer extends St.DrawingArea {
time: duration / 1000, time: duration / 1000,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onUpdateScope: this, onUpdateScope: this,
onUpdate() { this.queue_repaint() }, onUpdate() { this.queue_repaint(); },
onCompleteScope: this, onCompleteScope: this,
onComplete() { this.stop(); } onComplete() { this.stop(); }
}); });

View File

@ -261,7 +261,7 @@ class PopupMenuItem extends PopupBaseMenuItem {
this.label = new St.Label({ text: text }); this.label = new St.Label({ text: text });
this.add_child(this.label); this.add_child(this.label);
this.label_actor = this.label this.label_actor = this.label;
} }
}); });

View File

@ -1288,7 +1288,7 @@ var ScreenShield = class {
lock(animate) { lock(animate) {
if (this._lockSettings.get_boolean(DISABLE_LOCK_KEY)) { if (this._lockSettings.get_boolean(DISABLE_LOCK_KEY)) {
log('Screen lock is locked down, not locking') // lock, lock - who's there? log('Screen lock is locked down, not locking'); // lock, lock - who's there?
return; return;
} }

View File

@ -27,7 +27,7 @@ var ScreenshotService = class {
_createScreenshot(invocation, needsDisk=true) { _createScreenshot(invocation, needsDisk=true) {
let lockedDown = false; let lockedDown = false;
if (needsDisk) if (needsDisk)
lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk') lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk');
let sender = invocation.get_sender(); let sender = invocation.get_sender();
if (this._screenShooter.has(sender) || lockedDown) { if (this._screenShooter.has(sender) || lockedDown) {

View File

@ -118,7 +118,7 @@ function _setMenuAlignment(entry, stageX) {
let [success, entryX, entryY] = entry.transform_stage_point(stageX, 0); let [success, entryX, entryY] = entry.transform_stage_point(stageX, 0);
if (success) if (success)
entry.menu.setSourceAlignment(entryX / entry.width); entry.menu.setSourceAlignment(entryX / entry.width);
}; }
function _onButtonPressEvent(actor, event, entry) { function _onButtonPressEvent(actor, event, entry) {
if (entry.menu.isOpen) { if (entry.menu.isOpen) {
@ -131,14 +131,14 @@ function _onButtonPressEvent(actor, event, entry) {
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} }
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}; }
function _onPopup(actor, entry) { function _onPopup(actor, entry) {
let [success, textX, textY, lineHeight] = entry.clutter_text.position_to_coords(-1); let [success, textX, textY, lineHeight] = entry.clutter_text.position_to_coords(-1);
if (success) if (success)
entry.menu.setSourceAlignment(textX / entry.width); entry.menu.setSourceAlignment(textX / entry.width);
entry.menu.open(BoxPointer.PopupAnimation.FULL); entry.menu.open(BoxPointer.PopupAnimation.FULL);
}; }
function addContextMenu(entry, params) { function addContextMenu(entry, params) {
if (entry.menu) if (entry.menu)

View File

@ -14,8 +14,8 @@ var Slider = class extends BarLevel.BarLevel {
canFocus: true, canFocus: true,
reactive: true, reactive: true,
accessibleRole: Atk.Role.SLIDER, accessibleRole: Atk.Role.SLIDER,
} };
super(value, params) super(value, params);
this.actor.connect('button-press-event', this._startDragging.bind(this)); this.actor.connect('button-press-event', this._startDragging.bind(this));
this.actor.connect('touch-event', this._touchDragging.bind(this)); this.actor.connect('touch-event', this._touchDragging.bind(this));

View File

@ -916,7 +916,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
this._device.get_path(), accessPoints[0].get_path()]); this._device.get_path(), accessPoints[0].get_path()]);
} else { } else {
let connection = new NM.SimpleConnection(); let connection = new NM.SimpleConnection();
this._client.add_and_activate_connection_async(connection, this._device, accessPoints[0].get_path(), null, null) this._client.add_and_activate_connection_async(connection, this._device, accessPoints[0].get_path(), null, null);
} }
} }

View File

@ -112,7 +112,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._item.icon.icon_name = icon; this._item.icon.icon_name = icon;
// The icon label // The icon label
let label let label;
if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED) if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED)
label = _("%d\u2009%%").format(100); label = _("%d\u2009%%").format(100);
else else

View File

@ -314,7 +314,7 @@ var ViewSelector = class {
focusCallback: () => { focusCallback: () => {
this._a11yFocusPage(page); this._a11yFocusPage(page);
} }
});; });
page.hide(); page.hide();
this.actor.add_actor(page); this.actor.add_actor(page);
return page; return page;
@ -363,7 +363,7 @@ var ViewSelector = class {
this._activePage == this._workspacesPage && this._activePage == this._workspacesPage &&
!Main.overview.animationInProgress) { !Main.overview.animationInProgress) {
this.appDisplay.animate(IconGrid.AnimationDirection.OUT, () => { this.appDisplay.animate(IconGrid.AnimationDirection.OUT, () => {
this._animateIn(oldPage) this._animateIn(oldPage);
}); });
} else { } else {
this._fadePageOut(page); this._fadePageOut(page);
@ -382,7 +382,7 @@ var ViewSelector = class {
this.emit('page-changed'); this.emit('page-changed');
if (oldPage) if (oldPage)
this._animateOut(oldPage) this._animateOut(oldPage);
else else
this._animateIn(); this._animateIn();
} }

View File

@ -17,7 +17,7 @@ var WindowAttentionHandler = class {
_getTitleAndBanner(app, window) { _getTitleAndBanner(app, window) {
let title = app.get_name(); let title = app.get_name();
let banner = _("“%s” is ready").format(window.get_title()); let banner = _("“%s” is ready").format(window.get_title());
return [title, banner] return [title, banner];
} }
_onWindowDemandsAttention(display, window) { _onWindowDemandsAttention(display, window) {

View File

@ -1096,7 +1096,7 @@ var WindowManager = class {
let updateUnfullscreenGesture = () => { let updateUnfullscreenGesture = () => {
let currentWindow = global.display.focus_window; let currentWindow = global.display.focus_window;
topDragAction.enabled = currentWindow && currentWindow.is_fullscreen(); topDragAction.enabled = currentWindow && currentWindow.is_fullscreen();
} };
global.display.connect('notify::focus-window', updateUnfullscreenGesture); global.display.connect('notify::focus-window', updateUnfullscreenGesture);
global.display.connect('in-fullscreen-changed', updateUnfullscreenGesture); global.display.connect('in-fullscreen-changed', updateUnfullscreenGesture);
@ -1106,7 +1106,7 @@ var WindowManager = class {
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) { _showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
this._currentPadOsd = new PadOsd.PadOsd(device, settings, imagePath, editionMode, monitorIndex); this._currentPadOsd = new PadOsd.PadOsd(device, settings, imagePath, editionMode, monitorIndex);
this._currentPadOsd.connect('closed', () => { this._currentPadOsd = null }); this._currentPadOsd.connect('closed', () => { this._currentPadOsd = null; });
return this._currentPadOsd.actor; return this._currentPadOsd.actor;
} }

View File

@ -903,7 +903,7 @@ var LayoutStrategy = class {
// keep track how much smaller the grid becomes due to scaling // keep track how much smaller the grid becomes due to scaling
// so it can be centered again // so it can be centered again
let compensation = 0 let compensation = 0;
let y = 0; let y = 0;
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
@ -925,7 +925,7 @@ var LayoutStrategy = class {
// height would undo what vertical scaling is trying to achieve. // height would undo what vertical scaling is trying to achieve.
} }
row.x = area.x + (Math.max(area.width - (widthWithoutSpacing * row.additionalScale + horizontalSpacing), 0) / 2) row.x = area.x + (Math.max(area.width - (widthWithoutSpacing * row.additionalScale + horizontalSpacing), 0) / 2);
row.y = area.y + (Math.max(area.height - (heightWithoutSpacing + verticalSpacing), 0) / 2) + y; row.y = area.y + (Math.max(area.height - (heightWithoutSpacing + verticalSpacing), 0) / 2) + y;
y += row.height * row.additionalScale + this._rowSpacing; y += row.height * row.additionalScale + this._rowSpacing;
} }

View File

@ -686,7 +686,7 @@ class ThumbnailsBox extends St.Widget {
let [r, x, y] = this.transform_stage_point(stageX, stageY); let [r, x, y] = this.transform_stage_point(stageX, stageY);
for (let i = 0; i < this._thumbnails.length; i++) { for (let i = 0; i < this._thumbnails.length; i++) {
let thumbnail = this._thumbnails[i] let thumbnail = this._thumbnails[i];
let [w, h] = thumbnail.actor.get_transformed_size(); let [w, h] = thumbnail.actor.get_transformed_size();
if (y >= thumbnail.actor.y && y <= thumbnail.actor.y + h) { if (y >= thumbnail.actor.y && y <= thumbnail.actor.y + h) {
thumbnail.activate(time); thumbnail.activate(time);
@ -789,7 +789,7 @@ class ThumbnailsBox extends St.Widget {
break; break;
} else if (y > targetBottom && y <= nextTargetTop) { } else if (y > targetBottom && y <= nextTargetTop) {
this._dropWorkspace = i; this._dropWorkspace = i;
break break;
} }
targetBase = nextTargetBase; targetBase = nextTargetBase;

View File

@ -35,7 +35,7 @@ class FlowedBoxes extends St.Widget {
for (let i = 0; i < BOX_WIDTHS.length; i++) { for (let i = 0; i < BOX_WIDTHS.length; i++) {
let child = new St.Bin({ width: BOX_WIDTHS[i], height: BOX_HEIGHT, let child = new St.Bin({ width: BOX_WIDTHS[i], height: BOX_HEIGHT,
style: 'border: 1px solid #444444; background: #00aa44' }) style: 'border: 1px solid #444444; background: #00aa44' });
this.add_actor(child); this.add_actor(child);
} }
} }