style: Fix indentation errors

While we have some style inconsistencies - mostly regarding split lines,
i.e. aligning to the first arguments vs. a four-space indent - there are
a couple of places where the spacing is simply wrong. Fix those.

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/608
This commit is contained in:
Florian Müllner 2019-01-29 20:36:54 +01:00 committed by Georges Basile Stavracas Neto
parent 8fcd6c7153
commit 1398aa6562
51 changed files with 428 additions and 441 deletions

View File

@ -59,23 +59,23 @@ var AuthPrompt = class {
this.smartcardDetected = this._userVerifier.smartcardDetected; this.smartcardDetected = this._userVerifier.smartcardDetected;
this.connect('next', () => { this.connect('next', () => {
this.updateSensitivity(false); this.updateSensitivity(false);
this.startSpinning(); this.startSpinning();
if (this._queryingService) { if (this._queryingService) {
this._userVerifier.answerQuery(this._queryingService, this._entry.text); this._userVerifier.answerQuery(this._queryingService, this._entry.text);
} else { } else {
this._preemptiveAnswer = this._entry.text; this._preemptiveAnswer = this._entry.text;
} }
}); });
this.actor = new St.BoxLayout({ style_class: 'login-dialog-prompt-layout', this.actor = new St.BoxLayout({ style_class: 'login-dialog-prompt-layout',
vertical: true }); vertical: true });
this.actor.connect('destroy', this._onDestroy.bind(this)); this.actor.connect('destroy', this._onDestroy.bind(this));
this.actor.connect('key-press-event', (actor, event) => { this.actor.connect('key-press-event', (actor, event) => {
if (event.get_key_symbol() == Clutter.KEY_Escape) if (event.get_key_symbol() == Clutter.KEY_Escape)
this.cancel(); this.cancel();
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}); });
this._userWell = new St.Bin({ x_fill: true, this._userWell = new St.Bin({ x_fill: true,
x_align: St.Align.START }); x_align: St.Align.START });
@ -296,10 +296,10 @@ var AuthPrompt = class {
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY, delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY,
transition: 'linear', transition: 'linear',
onComplete: () => { onComplete: () => {
if (wasSpinner) { if (wasSpinner) {
if (this._spinner) if (this._spinner)
this._spinner.stop(); this._spinner.stop();
} }
} }
}); });
} }

View File

@ -177,36 +177,36 @@ Signals.addSignalMethods(Batch.prototype);
var ConcurrentBatch = class extends Batch { var ConcurrentBatch = class extends Batch {
process() { process() {
let hold = this.runTask(); let hold = this.runTask();
if (hold) { if (hold) {
this.hold.acquireUntilAfter(hold); this.hold.acquireUntilAfter(hold);
} }
// Regardless of the state of the just run task, // Regardless of the state of the just run task,
// fire off the next one, so all the tasks can run // fire off the next one, so all the tasks can run
// concurrently. // concurrently.
this.nextTask(); this.nextTask();
} }
}; };
Signals.addSignalMethods(ConcurrentBatch.prototype); Signals.addSignalMethods(ConcurrentBatch.prototype);
var ConsecutiveBatch = class extends Batch { var ConsecutiveBatch = class extends Batch {
process() { process() {
let hold = this.runTask(); let hold = this.runTask();
if (hold && hold.isAcquired()) { if (hold && hold.isAcquired()) {
// This task is inhibiting the batch. Wait on it // This task is inhibiting the batch. Wait on it
// before processing the next one. // before processing the next one.
let signalId = hold.connect('release', () => { let signalId = hold.connect('release', () => {
hold.disconnect(signalId); hold.disconnect(signalId);
this.nextTask(); this.nextTask();
}); });
return; return;
} else { } else {
// This task finished, process the next one // This task finished, process the next one
this.nextTask(); this.nextTask();
} }
} }
}; };
Signals.addSignalMethods(ConsecutiveBatch.prototype); Signals.addSignalMethods(ConsecutiveBatch.prototype);

View File

@ -43,7 +43,7 @@ var UserListItem = class {
constructor(user) { constructor(user) {
this.user = user; this.user = user;
this._userChangedId = this.user.connect('changed', this._userChangedId = this.user.connect('changed',
this._onUserChanged.bind(this)); this._onUserChanged.bind(this));
let layout = new St.BoxLayout({ vertical: true }); let layout = new St.BoxLayout({ vertical: true });
this.actor = new St.Button({ style_class: 'login-dialog-user-list-item', this.actor = new St.Button({ style_class: 'login-dialog-user-list-item',
@ -242,7 +242,7 @@ var UserList = class {
return; return;
if (user.locked) if (user.locked)
return; return;
let userName = user.get_user_name(); let userName = user.get_user_name();
@ -317,10 +317,10 @@ var SessionMenuButton = class {
this._menu.actor.hide(); this._menu.actor.hide();
this._menu.connect('open-state-changed', (menu, isOpen) => { this._menu.connect('open-state-changed', (menu, isOpen) => {
if (isOpen) if (isOpen)
this._button.add_style_pseudo_class('active'); this._button.add_style_pseudo_class('active');
else else
this._button.remove_style_pseudo_class('active'); this._button.remove_style_pseudo_class('active');
}); });
this._manager = new PopupMenu.PopupMenuManager(this._button, this._manager = new PopupMenu.PopupMenuManager(this._button,
@ -351,11 +351,11 @@ var SessionMenuButton = class {
} }
setActiveSession(sessionId) { setActiveSession(sessionId) {
if (sessionId == this._activeSessionId) if (sessionId == this._activeSessionId)
return; return;
this._activeSessionId = sessionId; this._activeSessionId = sessionId;
this._updateOrnament(); this._updateOrnament();
} }
close() { close() {
@ -613,64 +613,64 @@ var LoginDialog = GObject.registerClass({
let leftOverYSpace = bannerSpace - bannerHeight; let leftOverYSpace = bannerSpace - bannerHeight;
if (leftOverYSpace > 0) { if (leftOverYSpace > 0) {
// First figure out how much left over space is up top // First figure out how much left over space is up top
let leftOverTopSpace = leftOverYSpace / 2; let leftOverTopSpace = leftOverYSpace / 2;
// Then, shift the banner into the middle of that extra space // Then, shift the banner into the middle of that extra space
let yShift = Math.floor(leftOverTopSpace / 2); let yShift = Math.floor(leftOverTopSpace / 2);
bannerAllocation.y1 += yShift; bannerAllocation.y1 += yShift;
bannerAllocation.y2 += yShift; bannerAllocation.y2 += yShift;
} else { } else {
// Then figure out how much space there would be if we switched to a // Then figure out how much space there would be if we switched to a
// wide layout with banner on one side and authprompt on the other. // wide layout with banner on one side and authprompt on the other.
let leftOverXSpace = dialogWidth - authPromptWidth; let leftOverXSpace = dialogWidth - authPromptWidth;
// In a wide view, half of the available space goes to the banner, // In a wide view, half of the available space goes to the banner,
// and the other half goes to the margins. // and the other half goes to the margins.
let wideBannerWidth = leftOverXSpace / 2; let wideBannerWidth = leftOverXSpace / 2;
let wideSpacing = leftOverXSpace - wideBannerWidth; let wideSpacing = leftOverXSpace - wideBannerWidth;
// If we do go with a wide layout, we need there to be at least enough // If we do go with a wide layout, we need there to be at least enough
// space for the banner and the auth prompt to be the same width, // space for the banner and the auth prompt to be the same width,
// so it doesn't look unbalanced. // so it doesn't look unbalanced.
if (authPromptWidth > 0 && wideBannerWidth > authPromptWidth) { if (authPromptWidth > 0 && wideBannerWidth > authPromptWidth) {
let centerX = dialogBox.x1 + dialogWidth / 2; let centerX = dialogBox.x1 + dialogWidth / 2;
let centerY = dialogBox.y1 + dialogHeight / 2; let centerY = dialogBox.y1 + dialogHeight / 2;
// A small portion of the spacing goes down the center of the // A small portion of the spacing goes down the center of the
// screen to help delimit the two columns of the wide view // screen to help delimit the two columns of the wide view
let centerGap = wideSpacing / 8; let centerGap = wideSpacing / 8;
// place the banner along the left edge of the center margin // place the banner along the left edge of the center margin
bannerAllocation.x2 = Math.floor(centerX - centerGap / 2); bannerAllocation.x2 = Math.floor(centerX - centerGap / 2);
bannerAllocation.x1 = Math.floor(bannerAllocation.x2 - wideBannerWidth); bannerAllocation.x1 = Math.floor(bannerAllocation.x2 - wideBannerWidth);
// figure out how tall it would like to be and try to accommodate // figure out how tall it would like to be and try to accommodate
// but don't let it get too close to the logo // but don't let it get too close to the logo
let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth); let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);
let maxWideHeight = dialogHeight - 3 * logoHeight; let maxWideHeight = dialogHeight - 3 * logoHeight;
wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight); wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight);
bannerAllocation.y1 = Math.floor(centerY - wideBannerHeight / 2); bannerAllocation.y1 = Math.floor(centerY - wideBannerHeight / 2);
bannerAllocation.y2 = bannerAllocation.y1 + wideBannerHeight; bannerAllocation.y2 = bannerAllocation.y1 + wideBannerHeight;
// place the auth prompt along the right edge of the center margin // place the auth prompt along the right edge of the center margin
authPromptAllocation.x1 = Math.floor(centerX + centerGap / 2); authPromptAllocation.x1 = Math.floor(centerX + centerGap / 2);
authPromptAllocation.x2 = authPromptAllocation.x1 + authPromptWidth; authPromptAllocation.x2 = authPromptAllocation.x1 + authPromptWidth;
} else { } else {
// If we aren't going to do a wide view, then we need to limit // If we aren't going to do a wide view, then we need to limit
// the height of the banner so it will present scrollbars // the height of the banner so it will present scrollbars
// First figure out how much space there is without the banner // First figure out how much space there is without the banner
leftOverYSpace += bannerHeight; leftOverYSpace += bannerHeight;
// Then figure out how much of that space is up top // Then figure out how much of that space is up top
let availableTopSpace = Math.floor(leftOverYSpace / 2); let availableTopSpace = Math.floor(leftOverYSpace / 2);
// Then give all of that space to the banner // Then give all of that space to the banner
bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace; bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace;
} }
} }
} else if (userSelectionAllocation) { } else if (userSelectionAllocation) {
// Grow the user list to fill the space // Grow the user list to fill the space
@ -845,10 +845,10 @@ var LoginDialog = GObject.registerClass({
_shouldShowSessionMenuButton() { _shouldShowSessionMenuButton() {
if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFYING && if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFYING &&
this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFICATION_FAILED) this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFICATION_FAILED)
return false; return false;
if (this._user && this._user.is_loaded && this._user.is_logged_in()) if (this._user && this._user.is_loaded && this._user.is_logged_in())
return false; return false;
return true; return true;
} }
@ -962,7 +962,7 @@ var LoginDialog = GObject.registerClass({
let item = this._userList.getItemFromUserName(userName); let item = this._userList.getItemFromUserName(userName);
if (item) if (item)
return null; return null;
let hold = new Batch.Hold(); let hold = new Batch.Hold();
let signalId = this._userList.connect('item-added', let signalId = this._userList.connect('item-added',
@ -1073,12 +1073,12 @@ var LoginDialog = GObject.registerClass({
// Restart timed login on user interaction // Restart timed login on user interaction
global.stage.connect('captured-event', (actor, event) => { global.stage.connect('captured-event', (actor, event) => {
if (event.type() == Clutter.EventType.KEY_PRESS || if (event.type() == Clutter.EventType.KEY_PRESS ||
event.type() == Clutter.EventType.BUTTON_PRESS) { event.type() == Clutter.EventType.BUTTON_PRESS) {
this._startTimedLogin(userName, seconds); this._startTimedLogin(userName, seconds);
} }
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}); });
} }

View File

@ -423,36 +423,31 @@ var ShellUserVerifier = class {
_startService(serviceName) { _startService(serviceName) {
this._hold.acquire(); this._hold.acquire();
if (this._userName) { if (this._userName) {
this._userVerifier.call_begin_verification_for_user(serviceName, this._userVerifier.call_begin_verification_for_user(serviceName, this._userName, this._cancellable, (obj, result) => {
this._userName, try {
this._cancellable, obj.call_begin_verification_for_user_finish(result);
(obj, result) => { } catch (e) {
try { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
obj.call_begin_verification_for_user_finish(result); return;
} catch (e) { this._reportInitError('Failed to start verification for user', e);
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return;
return; }
this._reportInitError('Failed to start verification for user', e);
return;
}
this._hold.release(); this._hold.release();
}); });
} else { } else {
this._userVerifier.call_begin_verification(serviceName, this._userVerifier.call_begin_verification(serviceName, this._cancellable, (obj, result) => {
this._cancellable, try {
(obj, result) => { obj.call_begin_verification_finish(result);
try { } catch (e) {
obj.call_begin_verification_finish(result); if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
} catch (e) { return;
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) this._reportInitError('Failed to start verification', e);
return; return;
this._reportInitError('Failed to start verification', e); }
return;
}
this._hold.release(); this._hold.release();
}); });
} }
} }

View File

@ -46,11 +46,11 @@ var IntrospectService = class {
} }
_isIntrospectEnabled() { _isIntrospectEnabled() {
return this._settings.get_boolean(INTROSPECT_KEY); return this._settings.get_boolean(INTROSPECT_KEY);
} }
_isSenderWhitelisted(sender) { _isSenderWhitelisted(sender) {
return APP_WHITELIST.includes(sender); return APP_WHITELIST.includes(sender);
} }
_getSandboxedAppId(app) { _getSandboxedAppId(app) {

View File

@ -159,7 +159,7 @@ function getPropertyNamesFromExpression(expr, commandHeader) {
let obj = {}; let obj = {};
if (!isUnsafeExpression(expr)) { if (!isUnsafeExpression(expr)) {
try { try {
obj = eval(commandHeader + expr); obj = eval(commandHeader + expr);
} catch (e) { } catch (e) {
return []; return [];
} }

View File

@ -77,53 +77,51 @@ var ObjectManager = class {
let info = this._interfaceInfos[interfaceName]; let info = this._interfaceInfos[interfaceName];
if (!info) { if (!info) {
if (onFinished) if (onFinished)
onFinished(); onFinished();
return; return;
} }
let proxy = new Gio.DBusProxy({ g_connection: this._connection, let proxy = new Gio.DBusProxy({ g_connection: this._connection,
g_name: this._serviceName, g_name: this._serviceName,
g_object_path: objectPath, g_object_path: objectPath,
g_interface_name: interfaceName, g_interface_name: interfaceName,
g_interface_info: info, g_interface_info: info,
g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START }); g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START });
proxy.init_async(GLib.PRIORITY_DEFAULT, proxy.init_async(GLib.PRIORITY_DEFAULT, this._cancellable, (initable, result) => {
this._cancellable, try {
(initable, result) => { initable.init_finish(result);
try { } catch (e) {
initable.init_finish(result); logError(e, 'could not initialize proxy for interface ' + interfaceName);
} catch (e) {
logError(e, 'could not initialize proxy for interface ' + interfaceName);
if (onFinished) if (onFinished)
onFinished(); onFinished();
return; return;
} }
let isNewObject; let isNewObject;
if (!this._objects[objectPath]) { if (!this._objects[objectPath]) {
this._objects[objectPath] = {}; this._objects[objectPath] = {};
isNewObject = true; isNewObject = true;
} else { } else {
isNewObject = false; isNewObject = false;
} }
this._objects[objectPath][interfaceName] = proxy; this._objects[objectPath][interfaceName] = proxy;
if (!this._interfaces[interfaceName]) if (!this._interfaces[interfaceName])
this._interfaces[interfaceName] = []; this._interfaces[interfaceName] = [];
this._interfaces[interfaceName].push(proxy); this._interfaces[interfaceName].push(proxy);
if (isNewObject) if (isNewObject)
this.emit('object-added', objectPath); this.emit('object-added', objectPath);
this.emit('interface-added', interfaceName, proxy); this.emit('interface-added', interfaceName, proxy);
if (onFinished) if (onFinished)
onFinished(); onFinished();
}); });
} }
@ -195,7 +193,7 @@ var ObjectManager = class {
this._managerProxy.GetManagedObjectsRemote((result, error) => { this._managerProxy.GetManagedObjectsRemote((result, error) => {
if (!result) { if (!result) {
if (error) { if (error) {
logError(error, 'could not get remote objects for service ' + this._serviceName + ' path ' + this._managerPath); logError(error, 'could not get remote objects for service ' + this._serviceName + ' path ' + this._managerPath);
} }
this._tryToCompleteLoad(); this._tryToCompleteLoad();

View File

@ -167,8 +167,10 @@ const SystemActions = GObject.registerClass({
this.forceUpdate(); this.forceUpdate();
this._orientationSettings.connect('changed::orientation-lock', this._orientationSettings.connect('changed::orientation-lock',
() => { this._updateOrientationLock(); () => {
this._updateOrientationLockIcon(); }); this._updateOrientationLock();
this._updateOrientationLockIcon();
});
Main.layoutManager.connect('monitors-changed', Main.layoutManager.connect('monitors-changed',
() => { this._updateOrientationLock(); }); () => { this._updateOrientationLock(); });
Gio.DBus.system.watch_name(SENSOR_BUS_NAME, Gio.DBus.system.watch_name(SENSOR_BUS_NAME,

View File

@ -717,7 +717,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
_setIconSize() { _setIconSize() {
let j = 0; 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++; j++;
} }
let themeNode = this._items[j].get_theme_node(); let themeNode = this._items[j].get_theme_node();
this._list.ensure_style(); this._list.ensure_style();
@ -796,7 +796,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
}); });
GLib.Source.set_name_by_id(this._mouseTimeOutId, '[gnome-shell] this._enterItem'); GLib.Source.set_name_by_id(this._mouseTimeOutId, '[gnome-shell] this._enterItem');
} else { } else {
this._itemEntered(index); this._itemEntered(index);
} }
} }

View File

@ -432,7 +432,7 @@ var AllView = class AllView extends BaseAppView {
transition: 'easeOutQuad', transition: 'easeOutQuad',
opacity: 0, opacity: 0,
onComplete() { onComplete() {
this.opacity = 255; this.opacity = 255;
} }); } });
if (animationDirection == IconGrid.AnimationDirection.OUT) if (animationDirection == IconGrid.AnimationDirection.OUT)
@ -531,7 +531,7 @@ var AllView = class AllView extends BaseAppView {
} }
_onPanEnd(action) { _onPanEnd(action) {
if (this._displayingPopup) if (this._displayingPopup)
return; return;
let pageHeight = this._grid.getPageHeight(); let pageHeight = this._grid.getPageHeight();
@ -720,11 +720,11 @@ class ControlsBoxLayout extends Clutter.BoxLayout {
let maxMinWidth = 0; let maxMinWidth = 0;
let maxNaturalWidth = 0; let maxNaturalWidth = 0;
for (let child = container.get_first_child(); for (let child = container.get_first_child();
child; child;
child = child.get_next_sibling()) { child = child.get_next_sibling()) {
let [minWidth, natWidth] = child.get_preferred_width(forHeight); let [minWidth, natWidth] = child.get_preferred_width(forHeight);
maxMinWidth = Math.max(maxMinWidth, minWidth); maxMinWidth = Math.max(maxMinWidth, minWidth);
maxNaturalWidth = Math.max(maxNaturalWidth, natWidth); maxNaturalWidth = Math.max(maxNaturalWidth, natWidth);
} }
let childrenCount = container.get_n_children(); let childrenCount = container.get_n_children();
let totalSpacing = this.spacing * (childrenCount - 1); let totalSpacing = this.spacing * (childrenCount - 1);
@ -787,7 +787,7 @@ var AppDisplay = class AppDisplay {
// shown next, so make sure to restore their opacity // shown next, so make sure to restore their opacity
// when they are hidden // when they are hidden
if (this._controls.mapped) if (this._controls.mapped)
return; return;
Tweener.removeTweens(this._controls); Tweener.removeTweens(this._controls);
this._controls.opacity = 255; this._controls.opacity = 255;
@ -859,7 +859,7 @@ var AppDisplay = class AppDisplay {
{ time: IconGrid.ANIMATION_TIME_IN, { time: IconGrid.ANIMATION_TIME_IN,
transition: 'easeInOutQuad', transition: 'easeInOutQuad',
opacity: finalOpacity, opacity: finalOpacity,
}); });
currentView.animate(animationDirection, onComplete); currentView.animate(animationDirection, onComplete);
} }
@ -926,7 +926,7 @@ var AppSearchProvider = class AppSearchProvider {
'name': app.get_name(), 'name': app.get_name(),
'createIcon'(size) { 'createIcon'(size) {
return app.create_icon_texture(size); return app.create_icon_texture(size);
} }
}); });
} else { } else {
let name = this._systemActions.getName(id); let name = this._systemActions.getName(id);
@ -1378,9 +1378,9 @@ var AppFolderPopup = class AppFolderPopup {
this._boxPointer.open(BoxPointer.PopupAnimation.FADE | this._boxPointer.open(BoxPointer.PopupAnimation.FADE |
BoxPointer.PopupAnimation.SLIDE, BoxPointer.PopupAnimation.SLIDE,
() => { () => {
this._view.actor.opacity = 255; this._view.actor.opacity = 255;
this._view.animate(IconGrid.AnimationDirection.IN); this._view.animate(IconGrid.AnimationDirection.IN);
}); });
this.emit('open-state-changed', true); this.emit('open-state-changed', true);
} }
@ -1476,7 +1476,7 @@ var AppIcon = class AppIcon {
Main.overview.cancelledItemDrag(this); Main.overview.cancelledItemDrag(this);
}); });
this._draggable.connect('drag-end', () => { this._draggable.connect('drag-end', () => {
Main.overview.endItemDrag(this); Main.overview.endItemDrag(this);
}); });
} }

View File

@ -432,12 +432,12 @@ var Background = class Background {
return; return;
this._updateAnimationTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, this._updateAnimationTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
interval, interval,
() => { () => {
this._updateAnimationTimeoutId = 0; this._updateAnimationTimeoutId = 0;
this._updateAnimation(); this._updateAnimation();
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
}); });
GLib.Source.set_name_by_id(this._updateAnimationTimeoutId, '[gnome-shell] this._updateAnimation'); GLib.Source.set_name_by_id(this._updateAnimationTimeoutId, '[gnome-shell] this._updateAnimation');
} }

View File

@ -122,7 +122,7 @@ var BarLevel = class {
cr.lineTo(x, (height + barLevelHeight) / 2); cr.lineTo(x, (height + barLevelHeight) / 2);
cr.lineTo(barLevelBorderRadius + barLevelBorderWidth, (height + barLevelHeight) / 2); cr.lineTo(barLevelBorderRadius + barLevelBorderWidth, (height + barLevelHeight) / 2);
if (this._value > 0) if (this._value > 0)
Clutter.cairo_set_source_color(cr, barLevelActiveColor); Clutter.cairo_set_source_color(cr, barLevelActiveColor);
cr.fillPreserve(); cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelActiveBorderColor); Clutter.cairo_set_source_color(cr, barLevelActiveBorderColor);
cr.setLineWidth(barLevelBorderWidth); cr.setLineWidth(barLevelBorderWidth);
@ -145,17 +145,17 @@ var BarLevel = class {
/* end progress bar arc */ /* end progress bar arc */
if (this._value > 0) { if (this._value > 0) {
if (this._value <= this._overdriveStart) if (this._value <= this._overdriveStart)
Clutter.cairo_set_source_color(cr, barLevelActiveColor); Clutter.cairo_set_source_color(cr, barLevelActiveColor);
else else
Clutter.cairo_set_source_color(cr, barLevelOverdriveColor); Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
cr.arc(endX, height / 2, barLevelBorderRadius, TAU * (3 / 4), TAU * (1 / 4)); cr.arc(endX, height / 2, barLevelBorderRadius, TAU * (3 / 4), TAU * (1 / 4));
cr.lineTo(Math.floor(endX), (height + barLevelHeight) / 2); cr.lineTo(Math.floor(endX), (height + barLevelHeight) / 2);
cr.lineTo(Math.floor(endX), (height - barLevelHeight) / 2); cr.lineTo(Math.floor(endX), (height - barLevelHeight) / 2);
cr.lineTo(endX, (height - barLevelHeight) / 2); cr.lineTo(endX, (height - barLevelHeight) / 2);
cr.fillPreserve(); cr.fillPreserve();
cr.setLineWidth(barLevelBorderWidth); cr.setLineWidth(barLevelBorderWidth);
cr.stroke(); cr.stroke();
} }
/* draw overdrive separator */ /* draw overdrive separator */

View File

@ -109,25 +109,23 @@ var AutomountManager = class {
// we force stop/eject in this case, so we don't have to pass a // we force stop/eject in this case, so we don't have to pass a
// mount operation object // mount operation object
if (drive.can_stop()) { if (drive.can_stop()) {
drive.stop drive.stop(Gio.MountUnmountFlags.FORCE, null, null,
(Gio.MountUnmountFlags.FORCE, null, null, (drive, res) => {
(drive, res) => { try {
try { drive.stop_finish(res);
drive.stop_finish(res); } catch (e) {
} catch (e) { log("Unable to stop the drive after drive-eject-button " + e.toString());
log("Unable to stop the drive after drive-eject-button " + e.toString()); }
} });
});
} else if (drive.can_eject()) { } else if (drive.can_eject()) {
drive.eject_with_operation drive.eject_with_operation(Gio.MountUnmountFlags.FORCE, null, null,
(Gio.MountUnmountFlags.FORCE, null, null, (drive, res) => {
(drive, res) => { try {
try { drive.eject_with_operation_finish(res);
drive.eject_with_operation_finish(res); } catch (e) {
} catch (e) { log("Unable to eject the drive after drive-eject-button " + e.toString());
log("Unable to eject the drive after drive-eject-button " + e.toString()); }
} });
});
} }
} }

View File

@ -162,7 +162,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
// NOTE: ModalDialog.open() is safe to call if the dialog is // NOTE: ModalDialog.open() is safe to call if the dialog is
// already open - it just returns true without side-effects // already open - it just returns true without side-effects
if (this.open()) if (this.open())
return true; return true;
// The above fail if e.g. unable to get input grab // The above fail if e.g. unable to get input grab
// //

View File

@ -366,10 +366,9 @@ var VPNRequestHandler = class {
let connectionSetting = connection.get_setting_connection(); let connectionSetting = connection.get_setting_connection();
let argv = [authHelper.fileName, let argv = [authHelper.fileName,
'-u', connectionSetting.uuid, '-u', connectionSetting.uuid,
'-n', connectionSetting.id, '-n', connectionSetting.id,
'-s', serviceType '-s', serviceType];
];
if (authHelper.externalUIMode) if (authHelper.externalUIMode)
argv.push('--external-ui-mode'); argv.push('--external-ui-mode');
if (flags & NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION) if (flags & NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION)

View File

@ -155,12 +155,12 @@ class TelepathyClient extends Tp.BaseClient {
let [targetHandle, targetHandleType] = channel.get_handle(); let [targetHandle, targetHandleType] = channel.get_handle();
if (channel.get_invalidated()) if (channel.get_invalidated())
continue; continue;
/* Only observe contact text channels */ /* Only observe contact text channels */
if ((!(channel instanceof Tp.TextChannel)) || if ((!(channel instanceof Tp.TextChannel)) ||
targetHandleType != Tp.HandleType.CONTACT) targetHandleType != Tp.HandleType.CONTACT)
continue; continue;
this._createChatSource(account, conn, channel, channel.get_target_contact()); this._createChatSource(account, conn, channel, channel.get_target_contact());
} }
@ -198,7 +198,7 @@ class TelepathyClient extends Tp.BaseClient {
} }
if (channel.get_invalidated()) if (channel.get_invalidated())
continue; continue;
// 'notify' will be true when coming from an actual HandleChannels // 'notify' will be true when coming from an actual HandleChannels
// call, and not when from a successful Claim call. The point is // call, and not when from a successful Claim call. The point is
@ -595,8 +595,8 @@ var ChatSource = class extends MessageTray.Source {
// keep track of it with the ChatStateChanged signal but it is good // keep track of it with the ChatStateChanged signal but it is good
// enough right now. // enough right now.
if (state != this._chatState) { if (state != this._chatState) {
this._chatState = state; this._chatState = state;
this._channel.set_chat_state_async(state, null); this._channel.set_chat_state_async(state, null);
} }
} }

View File

@ -198,9 +198,9 @@ class ShowAppsIcon extends DashItemContainer {
toggle_mode: true }); toggle_mode: true });
this._iconActor = null; this._iconActor = null;
this.icon = new IconGrid.BaseIcon(_("Show Applications"), this.icon = new IconGrid.BaseIcon(_("Show Applications"),
{ setSizeManually: true, { setSizeManually: true,
showLabel: false, showLabel: false,
createIcon: this._createIcon.bind(this) }); createIcon: this._createIcon.bind(this) });
this.toggleButton.add_actor(this.icon); this.toggleButton.add_actor(this.icon);
this.toggleButton._delegate = this; this.toggleButton._delegate = this;
@ -648,10 +648,10 @@ var Dash = class Dash {
let running = this._appSystem.get_running(); let running = this._appSystem.get_running();
let children = this._box.get_children().filter(actor => { let children = this._box.get_children().filter(actor => {
return actor.child && return actor.child &&
actor.child._delegate && actor.child._delegate &&
actor.child._delegate.app; actor.child._delegate.app;
}); });
// Apps currently in the dash // Apps currently in the dash
let oldApps = children.map(actor => actor.child._delegate.app); let oldApps = children.map(actor => actor.child._delegate.app);
// Apps supposed to be in the dash // Apps supposed to be in the dash

View File

@ -217,7 +217,7 @@ var WeatherSection = class WeatherSection {
}); });
let box = new St.BoxLayout({ style_class: 'weather-box', let box = new St.BoxLayout({ style_class: 'weather-box',
vertical: true }); vertical: true });
this.actor.child = box; this.actor.child = box;

View File

@ -125,11 +125,11 @@ const restartUpgradeDialogContent = {
}; };
const DialogType = { const DialogType = {
LOGOUT: 0 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_LOGOUT */, LOGOUT: 0 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_LOGOUT */,
SHUTDOWN: 1 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_SHUTDOWN */, SHUTDOWN: 1 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_SHUTDOWN */,
RESTART: 2 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_RESTART */, RESTART: 2 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_RESTART */,
UPDATE_RESTART: 3, UPDATE_RESTART: 3,
UPGRADE_RESTART: 4 UPGRADE_RESTART: 4
}; };
const DialogContent = { const DialogContent = {

View File

@ -235,7 +235,7 @@ var CandidatePopup = class CandidatePopup {
let indexes = []; let indexes = [];
let indexLabel; let indexLabel;
for (let i = 0; (indexLabel = lookupTable.get_label(i)); ++i) for (let i = 0; (indexLabel = lookupTable.get_label(i)); ++i)
indexes.push(indexLabel.get_text()); indexes.push(indexLabel.get_text());
Main.keyboard.resetSuggestions(); Main.keyboard.resetSuggestions();

View File

@ -377,8 +377,8 @@ var IconGrid = GObject.registerClass({
return true; return true;
for (let child = this.get_first_child(); for (let child = this.get_first_child();
child != null; child != null;
child = child.get_next_sibling()) { child = child.get_next_sibling()) {
if (!child.visible || !child.opacity) if (!child.visible || !child.opacity)
continue; continue;
@ -445,24 +445,24 @@ var IconGrid = GObject.registerClass({
let bounceUpTime = ANIMATION_TIME_IN / 4; let bounceUpTime = ANIMATION_TIME_IN / 4;
let isLastItem = index == actors.length - 1; let isLastItem = index == actors.length - 1;
Tweener.addTween(actor, Tweener.addTween(actor,
{ time: bounceUpTime, { time: bounceUpTime,
transition: 'easeInOutQuad', transition: 'easeInOutQuad',
delay: delay, delay: delay,
scale_x: ANIMATION_BOUNCE_ICON_SCALE, scale_x: ANIMATION_BOUNCE_ICON_SCALE,
scale_y: ANIMATION_BOUNCE_ICON_SCALE, scale_y: ANIMATION_BOUNCE_ICON_SCALE,
onComplete: () => { onComplete: () => {
Tweener.addTween(actor, Tweener.addTween(actor,
{ time: ANIMATION_TIME_IN - bounceUpTime, { time: ANIMATION_TIME_IN - bounceUpTime,
transition: 'easeInOutQuad', transition: 'easeInOutQuad',
scale_x: 1, scale_x: 1,
scale_y: 1, scale_y: 1,
onComplete: () => { onComplete: () => {
if (isLastItem) if (isLastItem)
this._animationDone(); this._animationDone();
} }
}); });
} }
}); });
} }
} }
@ -788,7 +788,7 @@ var PaginatedIconGrid = GObject.registerClass({
} }
vfunc_allocate(box, flags) { vfunc_allocate(box, flags) {
if (this._childrenPerPage == 0) if (this._childrenPerPage == 0)
log('computePages() must be called before allocate(); pagination will not work.'); log('computePages() must be called before allocate(); pagination will not work.');
this.set_allocation(box, flags); this.set_allocation(box, flags);

View File

@ -32,21 +32,21 @@ const defaultKeysPre = [
const defaultKeysPost = [ 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: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
[{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase' }], [{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase' }],
[{ 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' }]],
[[{ 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: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
[{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase' }], [{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase' }],
[{ 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' }]],
[[{ 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: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
[{ label: '=/<', width: 3, level: 3, right: true }], [{ label: '=/<', width: 3, level: 3, 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' }]],
[[{ 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: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
[{ label: '?123', width: 3, level: 2, right: true }], [{ 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( var AspectContainer = GObject.registerClass(
@ -1224,12 +1224,12 @@ var Keyboard = class Keyboard {
} }
if (!this._showIdleId) { if (!this._showIdleId) {
this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => { this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
this.show(Main.layoutManager.focusIndex); this.show(Main.layoutManager.focusIndex);
this._showIdleId = 0; this._showIdleId = 0;
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
}); });
GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell] this.show'); GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell] this.show');
} }
} }

View File

@ -616,7 +616,7 @@ var Extensions = class Extensions {
this.actor = new St.BoxLayout({ vertical: true, this.actor = new St.BoxLayout({ vertical: true,
name: 'lookingGlassExtensions' }); name: 'lookingGlassExtensions' });
this._noExtensions = new St.Label({ style_class: 'lg-extensions-none', this._noExtensions = new St.Label({ style_class: 'lg-extensions-none',
text: _("No extensions installed") }); text: _("No extensions installed") });
this._numExtensions = 0; this._numExtensions = 0;
this._extensionsList = new St.BoxLayout({ vertical: true, this._extensionsList = new St.BoxLayout({ vertical: true,
style_class: 'lg-extensions-list' }); style_class: 'lg-extensions-list' });
@ -706,7 +706,7 @@ var Extensions = class Extensions {
_createExtensionDisplay(extension) { _createExtensionDisplay(extension) {
let box = new St.BoxLayout({ style_class: 'lg-extension', vertical: true }); let box = new St.BoxLayout({ style_class: 'lg-extension', vertical: true });
let name = new St.Label({ style_class: 'lg-extension-name', let name = new St.Label({ style_class: 'lg-extension-name',
text: extension.metadata.name }); text: extension.metadata.name });
box.add(name, { expand: true }); box.add(name, { expand: true });
let description = new St.Label({ style_class: 'lg-extension-description', let description = new St.Label({ style_class: 'lg-extension-description',
text: extension.metadata.description || 'No description' }); text: extension.metadata.description || 'No description' });
@ -813,15 +813,15 @@ var LookingGlass = class LookingGlass {
toolbar.add_actor(gcIcon); toolbar.add_actor(gcIcon);
gcIcon.reactive = true; gcIcon.reactive = true;
gcIcon.connect('button-press-event', () => { gcIcon.connect('button-press-event', () => {
gcIcon.icon_name = 'user-trash'; gcIcon.icon_name = 'user-trash';
System.gc(); System.gc();
this._timeoutId = Mainloop.timeout_add(500, () => { this._timeoutId = Mainloop.timeout_add(500, () => {
gcIcon.icon_name = 'user-trash-full'; gcIcon.icon_name = 'user-trash-full';
this._timeoutId = 0; this._timeoutId = 0;
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
}); });
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'user-trash-full\''); GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'user-trash-full\'');
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}); });
let notebook = new Notebook(); let notebook = new Notebook();

View File

@ -469,14 +469,14 @@ var Magnifier = class Magnifier {
* Get whether the crosshairs are clipped by the mouse image. * Get whether the crosshairs are clipped by the mouse image.
* @return: Whether the crosshairs are clipped. * @return: Whether the crosshairs are clipped.
*/ */
getCrosshairsClip() { getCrosshairsClip() {
if (this._crossHairs) { if (this._crossHairs) {
let [clipWidth, clipHeight] = this._crossHairs.getClip(); let [clipWidth, clipHeight] = this._crossHairs.getClip();
return (clipWidth > 0 && clipHeight > 0); return (clipWidth > 0 && clipHeight > 0);
} else { } else {
return false; return false;
} }
} }
//// Private methods //// //// Private methods ////
@ -606,7 +606,7 @@ var Magnifier = class Magnifier {
let showCrosshairs = this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY); let showCrosshairs = this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY);
this.addCrosshairs(); this.addCrosshairs();
this.setCrosshairsVisible(showCrosshairs); this.setCrosshairsVisible(showCrosshairs);
} }
_updateScreenPosition() { _updateScreenPosition() {
// Applies only to the first zoom region. // Applies only to the first zoom region.
@ -1628,7 +1628,7 @@ var Crosshairs = class Crosshairs {
this.reCenter(); this.reCenter();
} }
/** /**
* addToZoomRegion * addToZoomRegion
* Either add the crosshairs actor to the given ZoomRegion, or, if it is * Either add the crosshairs actor to the given ZoomRegion, or, if it is
* already part of some other ZoomRegion, create a clone of the crosshairs * already part of some other ZoomRegion, create a clone of the crosshairs
@ -1777,7 +1777,7 @@ var Crosshairs = class Crosshairs {
this._clipSize = [0, 0]; this._clipSize = [0, 0];
this.reCenter(); this.reCenter();
} }
} }
/** /**
* show: * show:
@ -1918,8 +1918,8 @@ var MagShaderEffects = class MagShaderEffects {
// a null first argument. // a null first argument.
let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness(); let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness();
this._brightnessContrast.set_enabled( this._brightnessContrast.set_enabled(
cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE || cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE ||
bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE
); );
} }
}; };

View File

@ -179,74 +179,74 @@ var ShellMagnifier = class ShellMagnifier {
* Set the crosswire size of all ZoomRegions. * Set the crosswire size of all ZoomRegions.
* @size: The thickness of each line in the cross wire. * @size: The thickness of each line in the cross wire.
*/ */
setCrosswireSize(size) { setCrosswireSize(size) {
Main.magnifier.setCrosshairsThickness(size); Main.magnifier.setCrosshairsThickness(size);
} }
/** /**
* getCrosswireSize: * getCrosswireSize:
* Get the crosswire size of all ZoomRegions. * Get the crosswire size of all ZoomRegions.
* @return: The thickness of each line in the cross wire. * @return: The thickness of each line in the cross wire.
*/ */
getCrosswireSize() { getCrosswireSize() {
return Main.magnifier.getCrosshairsThickness(); return Main.magnifier.getCrosshairsThickness();
} }
/** /**
* setCrosswireLength: * setCrosswireLength:
* Set the crosswire length of all zoom-regions.. * Set the crosswire length of all zoom-regions..
* @size: The length of each line in the cross wire. * @size: The length of each line in the cross wire.
*/ */
setCrosswireLength(length) { setCrosswireLength(length) {
Main.magnifier.setCrosshairsLength(length); Main.magnifier.setCrosshairsLength(length);
} }
/** /**
* setCrosswireSize: * setCrosswireSize:
* Set the crosswire size of all zoom-regions. * Set the crosswire size of all zoom-regions.
* @size: The thickness of each line in the cross wire. * @size: The thickness of each line in the cross wire.
*/ */
getCrosswireLength() { getCrosswireLength() {
return Main.magnifier.getCrosshairsLength(); return Main.magnifier.getCrosshairsLength();
} }
/** /**
* setCrosswireClip: * setCrosswireClip:
* Set if the crosswire will be clipped by the cursor image.. * Set if the crosswire will be clipped by the cursor image..
* @clip: Flag to indicate whether to clip the crosswire. * @clip: Flag to indicate whether to clip the crosswire.
*/ */
setCrosswireClip(clip) { setCrosswireClip(clip) {
Main.magnifier.setCrosshairsClip(clip); Main.magnifier.setCrosshairsClip(clip);
} }
/** /**
* getCrosswireClip: * getCrosswireClip:
* Get the crosswire clip value. * Get the crosswire clip value.
* @return: Whether the crosswire is clipped by the cursor image. * @return: Whether the crosswire is clipped by the cursor image.
*/ */
getCrosswireClip() { getCrosswireClip() {
return Main.magnifier.getCrosshairsClip(); return Main.magnifier.getCrosshairsClip();
} }
/** /**
* setCrosswireColor: * setCrosswireColor:
* Set the crosswire color of all ZoomRegions. * Set the crosswire color of all ZoomRegions.
* @color: Unsigned int of the form rrggbbaa. * @color: Unsigned int of the form rrggbbaa.
*/ */
setCrosswireColor(color) { setCrosswireColor(color) {
Main.magnifier.setCrosshairsColor('#%08x'.format(color)); Main.magnifier.setCrosshairsColor('#%08x'.format(color));
} }
/** /**
* getCrosswireClip: * getCrosswireClip:
* Get the crosswire color of all ZoomRegions. * Get the crosswire color of all ZoomRegions.
* @return: The crosswire color as an unsigned int in the form rrggbbaa. * @return: The crosswire color as an unsigned int in the form rrggbbaa.
*/ */
getCrosswireColor() { getCrosswireColor() {
let colorString = Main.magnifier.getCrosshairsColor(); let colorString = Main.magnifier.getCrosshairsColor();
// Drop the leading '#'. // Drop the leading '#'.
return parseInt(colorString.slice(1), 16); return parseInt(colorString.slice(1), 16);
} }
}; };
/** /**

View File

@ -144,9 +144,9 @@ var URLHighlighter = class URLHighlighter {
} }
if (findPos != -1) { if (findPos != -1) {
for (let i = 0; i < this._urls.length; i++) for (let i = 0; i < this._urls.length; i++)
if (findPos >= this._urls[i].pos && if (findPos >= this._urls[i].pos &&
this._urls[i].pos + this._urls[i].url.length > findPos) this._urls[i].pos + this._urls[i].url.length > findPos)
return i; return i;
} }
return -1; return -1;
} }

View File

@ -1167,7 +1167,7 @@ var MessageTray = class MessageTray {
x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) { x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
this._notificationLeftMouseX = -1; this._notificationLeftMouseX = -1;
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000, this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
this._onNotificationLeftTimeout.bind(this)); this._onNotificationLeftTimeout.bind(this));
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout'); GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
} else { } else {
this._notificationLeftTimeoutId = 0; this._notificationLeftTimeoutId = 0;

View File

@ -51,7 +51,7 @@ var OsdMonitorLabeler = class {
this._osdLabels = []; this._osdLabels = [];
this._monitorLabels = null; this._monitorLabels = null;
Main.layoutManager.connect('monitors-changed', Main.layoutManager.connect('monitors-changed',
this._reset.bind(this)); this._reset.bind(this));
this._reset(); this._reset();
} }

View File

@ -195,8 +195,8 @@ var OsdWindow = class {
time: FADE_TIME, time: FADE_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: () => { onComplete: () => {
this._reset(); this._reset();
Meta.enable_unredirect_for_display(global.display); Meta.enable_unredirect_for_display(global.display);
} }
}); });
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
@ -231,7 +231,7 @@ var OsdWindowManager = class {
constructor() { constructor() {
this._osdWindows = []; this._osdWindows = [];
Main.layoutManager.connect('monitors-changed', Main.layoutManager.connect('monitors-changed',
this._monitorsChanged.bind(this)); this._monitorsChanged.bind(this));
this._monitorsChanged(); this._monitorsChanged();
} }

View File

@ -424,12 +424,12 @@ var Overview = class {
} }
fadeInDesktop() { fadeInDesktop() {
this._desktopFade.opacity = 0; this._desktopFade.opacity = 0;
this._desktopFade.show(); this._desktopFade.show();
Tweener.addTween(this._desktopFade, Tweener.addTween(this._desktopFade,
{ opacity: 255, { opacity: 255,
time: ANIMATION_TIME, time: ANIMATION_TIME,
transition: 'easeOutQuad' }); transition: 'easeOutQuad' });
} }
fadeOutDesktop() { fadeOutDesktop() {

View File

@ -410,7 +410,7 @@ var ControlsManager = class {
x_expand: true, y_expand: true, x_expand: true, y_expand: true,
clip_to_allocation: true }); clip_to_allocation: true });
this._group = new St.BoxLayout({ name: 'overview-group', this._group = new St.BoxLayout({ name: 'overview-group',
x_expand: true, y_expand: true }); x_expand: true, y_expand: true });
this.actor.add_actor(this._group); this.actor.add_actor(this._group);
this.actor.add_actor(this._dashSlider.actor); this.actor.add_actor(this._dashSlider.actor);

View File

@ -716,9 +716,9 @@ var PadOsd = class {
} }
let buttonBox = new St.Widget({ layout_manager: new Clutter.BinLayout(), let buttonBox = new St.Widget({ layout_manager: new Clutter.BinLayout(),
x_expand: true, x_expand: true,
x_align: Clutter.ActorAlign.CENTER, x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER }); y_align: Clutter.ActorAlign.CENTER });
this.actor.add_actor(buttonBox); this.actor.add_actor(buttonBox);
this._editButton = new St.Button({ label: _("Edit…"), this._editButton = new St.Button({ label: _("Edit…"),
style_class: 'button', style_class: 'button',

View File

@ -88,13 +88,13 @@ var PointerA11yTimeout = class PointerA11yTimeout {
let [x, y, mods] = global.get_pointer(); let [x, y, mods] = global.get_pointer();
pieTimer.start(x, y, timeout); pieTimer.start(x, y, timeout);
if (type == Clutter.PointerA11yTimeoutType.GESTURE) if (type == Clutter.PointerA11yTimeoutType.GESTURE)
global.display.set_cursor(Meta.Cursor.CROSSHAIR); global.display.set_cursor(Meta.Cursor.CROSSHAIR);
}); });
manager.connect('ptr-a11y-timeout-stopped', (manager, device, type) => { manager.connect('ptr-a11y-timeout-stopped', (manager, device, type) => {
pieTimer.stop(); pieTimer.stop();
if (type == Clutter.PointerA11yTimeoutType.GESTURE) if (type == Clutter.PointerA11yTimeoutType.GESTURE)
global.display.set_cursor(Meta.Cursor.DEFAULT); global.display.set_cursor(Meta.Cursor.DEFAULT);
}); });
} }
}; };

View File

@ -636,16 +636,16 @@ var PopupMenuBase = class {
let i = 0; let i = 0;
while (i < items.length && position > 0) { while (i < items.length && position > 0) {
if (items[i] != menuItem) if (items[i] != menuItem)
position--; position--;
i++; i++;
} }
if (i < items.length) { if (i < items.length) {
if (items[i] != menuItem) if (items[i] != menuItem)
this.box.set_child_below_sibling(menuItem.actor, items[i].actor); this.box.set_child_below_sibling(menuItem.actor, items[i].actor);
} else { } else {
this.box.set_child_above_sibling(menuItem.actor, null); this.box.set_child_above_sibling(menuItem.actor, null);
} }
} }

View File

@ -33,30 +33,26 @@ class RunDialog extends ModalDialog.ModalDialog {
}); });
this._enableInternalCommands = global.settings.get_boolean('development-tools'); this._enableInternalCommands = global.settings.get_boolean('development-tools');
this._internalCommands = { 'lg': () => { this._internalCommands = {
Main.createLookingGlass().open(); 'lg': () => { Main.createLookingGlass().open(); },
},
'r': this._restart.bind(this), 'r': this._restart.bind(this),
// Developer brain backwards compatibility // Developer brain backwards compatibility
'restart': this._restart.bind(this), 'restart': this._restart.bind(this),
'debugexit': () => { 'debugexit': () => { Meta.quit(Meta.ExitCode.ERROR); },
Meta.quit(Meta.ExitCode.ERROR);
},
// rt is short for "reload theme" // rt is short for "reload theme"
'rt': () => { 'rt': () => {
Main.reloadThemeResource(); Main.reloadThemeResource();
Main.loadTheme(); Main.loadTheme();
}, },
'check_cloexec_fds': () => {
Shell.util_check_cloexec_fds();
},
};
'check_cloexec_fds': () => {
Shell.util_check_cloexec_fds();
},
};
let label = new St.Label({ style_class: 'run-dialog-label', let label = new St.Label({ style_class: 'run-dialog-label',
text: _("Enter a Command") }); text: _("Enter a Command") });

View File

@ -740,10 +740,10 @@ var ScreenShield = class {
delay: unitaryDelay * (N_ARROWS - (i + 1)), delay: unitaryDelay * (N_ARROWS - (i + 1)),
time: ARROW_ANIMATION_TIME, time: ARROW_ANIMATION_TIME,
transition(t, b, c, d) { transition(t, b, c, d) {
if (t < d / 2) if (t < d / 2)
return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d / 2); return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d / 2);
else else
return TweenerEquations.easeInQuad(t - d / 2, maxOpacity, -maxOpacity, d / 2); return TweenerEquations.easeInQuad(t - d / 2, maxOpacity, -maxOpacity, d / 2);
} }
}); });
} }

View File

@ -166,12 +166,12 @@ var ScreenshotService = class {
selectArea.connect('finished', (selectArea, areaRectangle) => { selectArea.connect('finished', (selectArea, areaRectangle) => {
if (areaRectangle) { if (areaRectangle) {
let retRectangle = this._unscaleArea(areaRectangle.x, areaRectangle.y, let retRectangle = this._unscaleArea(areaRectangle.x, areaRectangle.y,
areaRectangle.width, areaRectangle.height); areaRectangle.width, areaRectangle.height);
let retval = GLib.Variant.new('(iiii)', retRectangle); let retval = GLib.Variant.new('(iiii)', retRectangle);
invocation.return_value(retval); invocation.return_value(retval);
} else { } else {
invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED, invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
"Operation was cancelled"); "Operation was cancelled");
} }
}); });
} }
@ -213,7 +213,7 @@ var ScreenshotService = class {
}); });
} else { } else {
invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED, invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
"Operation was cancelled"); "Operation was cancelled");
} }
}); });
} }

View File

@ -48,18 +48,18 @@ class ATIndicator extends PanelMenu.Button {
this.menu.addMenuItem(highContrast); this.menu.addMenuItem(highContrast);
let magnifier = this._buildItem(_("Zoom"), APPLICATIONS_SCHEMA, let magnifier = this._buildItem(_("Zoom"), APPLICATIONS_SCHEMA,
'screen-magnifier-enabled'); 'screen-magnifier-enabled');
this.menu.addMenuItem(magnifier); this.menu.addMenuItem(magnifier);
let textZoom = this._buildFontItem(); let textZoom = this._buildFontItem();
this.menu.addMenuItem(textZoom); this.menu.addMenuItem(textZoom);
let screenReader = this._buildItem(_("Screen Reader"), APPLICATIONS_SCHEMA, let screenReader = this._buildItem(_("Screen Reader"), APPLICATIONS_SCHEMA,
'screen-reader-enabled'); 'screen-reader-enabled');
this.menu.addMenuItem(screenReader); this.menu.addMenuItem(screenReader);
let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA, let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
'screen-keyboard-enabled'); 'screen-keyboard-enabled');
this.menu.addMenuItem(screenKeyboard); this.menu.addMenuItem(screenKeyboard);
let visualBell = this._buildItem(_("Visual Alerts"), WM_SCHEMA, KEY_VISUAL_BELL); let visualBell = this._buildItem(_("Visual Alerts"), WM_SCHEMA, KEY_VISUAL_BELL);

View File

@ -130,7 +130,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._managerProxy = proxy; this._managerProxy = proxy;
this._propertiesChangedId = this._managerProxy.connect('g-properties-changed', this._propertiesChangedId = this._managerProxy.connect('g-properties-changed',
this._onGeocluePropsChanged.bind(this)); this._onGeocluePropsChanged.bind(this));
this._syncIndicator(); this._syncIndicator();
@ -334,10 +334,10 @@ var AppAuthorizer = class {
APP_PERMISSIONS_ID, APP_PERMISSIONS_ID,
this._permissions, this._permissions,
data, data,
(result, error) => { (result, error) => {
if (error != null) if (error != null)
log(error.message); log(error.message);
}); });
} }
}; };

View File

@ -114,9 +114,9 @@ var Indicator = class extends PanelMenu.SystemIndicator {
// 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
label = _("%d\u2009%%").format(this._proxy.Percentage); label = _("%d\u2009%%").format(this._proxy.Percentage);
this._percentageLabel.clutter_text.set_markup('<span size="smaller">' + label + '</span>'); this._percentageLabel.clutter_text.set_markup('<span size="smaller">' + label + '</span>');
// The status label // The status label

View File

@ -44,7 +44,7 @@ var RemoteAccessApplet = class extends PanelMenu.SystemIndicator {
this._item.menu.addAction(_("Turn off"), this._item.menu.addAction(_("Turn off"),
() => { () => {
for (let handle of this._handles) for (let handle of this._handles)
handle.stop(); handle.stop();
}); });
this._item.icon.icon_name = 'screen-shared-symbolic'; this._item.icon.icon_name = 'screen-shared-symbolic';
this.menu.addMenuItem(this._item); this.menu.addMenuItem(this._item);

View File

@ -108,8 +108,7 @@ var Client = class {
} }
enrollDevice(id, policy, callback) { enrollDevice(id, policy, callback) {
this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE, this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE, (res, error) => {
(res, error) => {
if (error) { if (error) {
Gio.DBusError.strip_remote_error(error); Gio.DBusError.strip_remote_error(error);
callback(null, error); callback(null, error);

View File

@ -465,11 +465,11 @@ var SwitcherList = GObject.registerClass({
time: POPUP_SCROLL_TIME, time: POPUP_SCROLL_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: () => { onComplete: () => {
if (this._highlighted == 0) if (this._highlighted == 0)
this._scrollableLeft = false; this._scrollableLeft = false;
this.queue_relayout(); this.queue_relayout();
} }
}); });
} }
_scrollToRight() { _scrollToRight() {
@ -489,11 +489,11 @@ var SwitcherList = GObject.registerClass({
time: POPUP_SCROLL_TIME, time: POPUP_SCROLL_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: () => { onComplete: () => {
if (this._highlighted == this._items.length - 1) if (this._highlighted == this._items.length - 1)
this._scrollableRight = false; this._scrollableRight = false;
this.queue_relayout(); this.queue_relayout();
} }
}); });
} }
_itemActivated(n) { _itemActivated(n) {

View File

@ -471,7 +471,7 @@ var ViewSelector = class {
if (this._entry.mapped) { if (this._entry.mapped) {
// Enable 'find-as-you-type' // Enable 'find-as-you-type'
this._capturedEventId = global.stage.connect('captured-event', this._capturedEventId = global.stage.connect('captured-event',
this._onCapturedEvent.bind(this)); this._onCapturedEvent.bind(this));
this._text.set_cursor_visible(true); this._text.set_cursor_visible(true);
this._text.set_selection(0, 0); this._text.set_selection(0, 0);
} else { } else {
@ -525,7 +525,7 @@ var ViewSelector = class {
if (this._iconClickedId == 0) if (this._iconClickedId == 0)
this._iconClickedId = this._entry.connect('secondary-icon-clicked', this._iconClickedId = this._entry.connect('secondary-icon-clicked',
this.reset.bind(this)); this.reset.bind(this));
} else { } else {
if (this._iconClickedId > 0) { if (this._iconClickedId > 0) {
this._entry.disconnect(this._iconClickedId); this._entry.disconnect(this._iconClickedId);

View File

@ -11,7 +11,7 @@ var WindowAttentionHandler = class {
this._windowDemandsAttentionId = global.display.connect('window-demands-attention', this._windowDemandsAttentionId = global.display.connect('window-demands-attention',
this._onWindowDemandsAttention.bind(this)); this._onWindowDemandsAttention.bind(this));
this._windowMarkedUrgentId = global.display.connect('window-marked-urgent', this._windowMarkedUrgentId = global.display.connect('window-marked-urgent',
this._onWindowDemandsAttention.bind(this)); this._onWindowDemandsAttention.bind(this));
} }
_getTitleAndBanner(app, window) { _getTitleAndBanner(app, window) {

View File

@ -1314,16 +1314,16 @@ var WindowManager = class {
if (actor.meta_window.is_monitor_sized()) { if (actor.meta_window.is_monitor_sized()) {
Tweener.addTween(actor, Tweener.addTween(actor,
{ opacity: 0, { opacity: 0,
time: MINIMIZE_WINDOW_ANIMATION_TIME, time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: this._minimizeWindowDone, onComplete: this._minimizeWindowDone,
onCompleteScope: this, onCompleteScope: this,
onCompleteParams: [shellwm, actor], onCompleteParams: [shellwm, actor],
onOverwrite: this._minimizeWindowOverwritten, onOverwrite: this._minimizeWindowOverwritten,
onOverwriteScope: this, onOverwriteScope: this,
onOverwriteParams: [shellwm, actor] onOverwriteParams: [shellwm, actor]
}); });
} else { } else {
let xDest, yDest, xScale, yScale; let xDest, yDest, xScale, yScale;
let [success, geom] = actor.meta_window.get_icon_geometry(); let [success, geom] = actor.meta_window.get_icon_geometry();
@ -1395,16 +1395,16 @@ var WindowManager = class {
actor.opacity = 0; actor.opacity = 0;
actor.set_scale(1.0, 1.0); actor.set_scale(1.0, 1.0);
Tweener.addTween(actor, Tweener.addTween(actor,
{ opacity: 255, { opacity: 255,
time: MINIMIZE_WINDOW_ANIMATION_TIME, time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: this._unminimizeWindowDone, onComplete: this._unminimizeWindowDone,
onCompleteScope: this, onCompleteScope: this,
onCompleteParams: [shellwm, actor], onCompleteParams: [shellwm, actor],
onOverwrite: this._unminimizeWindowOverwritten, onOverwrite: this._unminimizeWindowOverwritten,
onOverwriteScope: this, onOverwriteScope: this,
onOverwriteParams: [shellwm, actor] onOverwriteParams: [shellwm, actor]
}); });
} else { } else {
let [success, geom] = actor.meta_window.get_icon_geometry(); let [success, geom] = actor.meta_window.get_icon_geometry();
if (success) { if (success) {
@ -2172,7 +2172,7 @@ var WindowManager = class {
if (window.is_always_on_all_workspaces() || if (window.is_always_on_all_workspaces() ||
(Meta.prefs_get_workspaces_only_on_primary() && (Meta.prefs_get_workspaces_only_on_primary() &&
window.get_monitor() != Main.layoutManager.primaryIndex)) window.get_monitor() != Main.layoutManager.primaryIndex))
return; return;
} }
if (target == 'last') { if (target == 'last') {

View File

@ -1392,7 +1392,7 @@ var Workspace = class {
return; return;
if (overlay && overlay._hidden) if (overlay && overlay._hidden)
overlay.show(); overlay.show();
} }
_delayedWindowRepositioning() { _delayedWindowRepositioning() {
@ -1720,7 +1720,7 @@ var Workspace = class {
// Position and scale the windows. // Position and scale the windows.
for (let i = 0; i < this._windows.length; i++) for (let i = 0; i < this._windows.length; i++)
this._zoomWindowFromOverview(i); this._zoomWindowFromOverview(i);
} }
_zoomWindowFromOverview(index) { _zoomWindowFromOverview(index) {

View File

@ -19,7 +19,7 @@ class WorkspaceSwitcherPopupList extends St.Widget {
this._childWidth = 0; this._childWidth = 0;
this.connect('style-changed', () => { this.connect('style-changed', () => {
this._itemSpacing = this.get_theme_node().get_length('spacing'); this._itemSpacing = this.get_theme_node().get_length('spacing');
}); });
} }
@ -117,14 +117,14 @@ class WorkspaceSwitcherPopup extends St.Widget {
for (let i = 0; i < workspaceManager.n_workspaces; i++) { for (let i = 0; i < workspaceManager.n_workspaces; i++) {
let indicator = null; let indicator = null;
if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP) if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP)
indicator = new St.Bin({ style_class: 'ws-switcher-active-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' }); indicator = new St.Bin({ style_class: 'ws-switcher-active-down' });
else else
indicator = new St.Bin({ style_class: 'ws-switcher-box' }); indicator = new St.Bin({ style_class: 'ws-switcher-box' });
this._list.add_actor(indicator); this._list.add_actor(indicator);
} }

View File

@ -287,7 +287,7 @@ var WorkspaceThumbnail = class {
// Track window changes // Track window changes
this._windowAddedId = this.metaWorkspace.connect('window-added', this._windowAddedId = this.metaWorkspace.connect('window-added',
this._windowAdded.bind(this)); this._windowAdded.bind(this));
this._windowRemovedId = this.metaWorkspace.connect('window-removed', this._windowRemovedId = this.metaWorkspace.connect('window-removed',
this._windowRemoved.bind(this)); this._windowRemoved.bind(this));
this._windowEnteredMonitorId = global.display.connect('window-entered-monitor', this._windowEnteredMonitorId = global.display.connect('window-entered-monitor',
@ -447,7 +447,7 @@ var WorkspaceThumbnail = class {
destroy() { destroy() {
if (this.actor) if (this.actor)
this.actor.destroy(); this.actor.destroy();
} }
workspaceRemoved() { workspaceRemoved() {
@ -469,8 +469,8 @@ var WorkspaceThumbnail = class {
this.workspaceRemoved(); this.workspaceRemoved();
if (this._bgManager) { if (this._bgManager) {
this._bgManager.destroy(); this._bgManager.destroy();
this._bgManager = null; this._bgManager = null;
} }
this._windows = []; this._windows = [];

View File

@ -44,8 +44,8 @@ var XdndHandler = class {
_onEnter() { _onEnter() {
this._windowGroupVisibilityHandlerId = this._windowGroupVisibilityHandlerId =
global.window_group.connect('notify::visible', global.window_group.connect('notify::visible',
this._onWindowGroupVisibilityChanged.bind(this)); this._onWindowGroupVisibilityChanged.bind(this));
this.emit('drag-begin', global.get_current_time()); this.emit('drag-begin', global.get_current_time());
} }
@ -83,7 +83,7 @@ var XdndHandler = class {
// Make sure that the cursor window is on top // Make sure that the cursor window is on top
if (this._cursorWindowClone) if (this._cursorWindowClone)
this._cursorWindowClone.raise_top(); this._cursorWindowClone.raise_top();
let dragEvent = { let dragEvent = {
x: x, x: x,
@ -103,17 +103,17 @@ var XdndHandler = class {
} }
while (pickedActor) { while (pickedActor) {
if (pickedActor._delegate && pickedActor._delegate.handleDragOver) { if (pickedActor._delegate && pickedActor._delegate.handleDragOver) {
let [r, targX, targY] = pickedActor.transform_stage_point(x, y); let [r, targX, targY] = pickedActor.transform_stage_point(x, y);
let result = pickedActor._delegate.handleDragOver(this, let result = pickedActor._delegate.handleDragOver(this,
dragEvent.dragActor, dragEvent.dragActor,
targX, targX,
targY, targY,
global.get_current_time()); global.get_current_time());
if (result != DND.DragMotionResult.CONTINUE) if (result != DND.DragMotionResult.CONTINUE)
return; return;
} }
pickedActor = pickedActor.get_parent(); pickedActor = pickedActor.get_parent();
} }
} }
}; };

View File

@ -186,8 +186,8 @@ for (let i = 0; i < testsModifyScope.length; i++) {
JsUnit.assertNotEquals("Code '" + base + "' is valid code", e.constructor, SyntaxError); JsUnit.assertNotEquals("Code '" + base + "' is valid code", e.constructor, SyntaxError);
} }
} }
} }
} }
} }
let propertyNames = Object.getOwnPropertyNames(obj); let propertyNames = Object.getOwnPropertyNames(obj);
JsUnit.assertEquals("The context '" + JSON.stringify(obj) + "' was not modified", propertyNames.length, 0); JsUnit.assertEquals("The context '" + JSON.stringify(obj) + "' was not modified", propertyNames.length, 0);