style: Fix stray/missing spaces
Spotted by eslint. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
parent
29b04fcbf2
commit
7ac35c644e
@ -150,7 +150,7 @@ Signals.addSignalMethods(UserListItem.prototype);
|
||||
|
||||
var UserList = class {
|
||||
constructor() {
|
||||
this.actor = new St.ScrollView({ style_class: 'login-dialog-user-list-view'});
|
||||
this.actor = new St.ScrollView({ style_class: 'login-dialog-user-list-view' });
|
||||
this.actor.set_policy(St.PolicyType.NEVER,
|
||||
St.PolicyType.AUTOMATIC);
|
||||
|
||||
|
@ -66,7 +66,7 @@ var HistoryManager = class {
|
||||
this._indexChanged();
|
||||
}
|
||||
|
||||
return this._historyIndex ? this._history[this._historyIndex -1] : null;
|
||||
return this._historyIndex ? this._history[this._historyIndex - 1] : null;
|
||||
}
|
||||
|
||||
addItem(input) {
|
||||
|
@ -58,7 +58,7 @@ function isStopChar(c) {
|
||||
function findMatchingQuote(expr, offset) {
|
||||
let quoteChar = expr.charAt(offset);
|
||||
for (let i = offset - 1; i >= 0; --i) {
|
||||
if (expr.charAt(i) == quoteChar && expr.charAt(i-1) != '\\'){
|
||||
if (expr.charAt(i) == quoteChar && expr.charAt(i - 1) != '\\') {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ function findMatchingQuote(expr, offset) {
|
||||
// Given the ending position of a regex, find where it starts
|
||||
function findMatchingSlash(expr, offset) {
|
||||
for (let i = offset - 1; i >= 0; --i) {
|
||||
if (expr.charAt(i) == '/' && expr.charAt(i-1) != '\\'){
|
||||
if (expr.charAt(i) == '/' && expr.charAt(i - 1) != '\\') {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@ -81,7 +81,7 @@ function findMatchingSlash(expr, offset) {
|
||||
// findMatchingBrace("[(])", 3) returns 1.
|
||||
function findMatchingBrace(expr, offset) {
|
||||
let closeBrace = expr.charAt(offset);
|
||||
let openBrace = ({')': '(', ']': '['})[closeBrace];
|
||||
let openBrace = ({ ')': '(', ']': '[' })[closeBrace];
|
||||
|
||||
function findTheBrace(expr, offset) {
|
||||
if (offset < 0) {
|
||||
@ -117,7 +117,7 @@ function getExpressionOffset(expr, offset) {
|
||||
while (offset >= 0) {
|
||||
let currChar = expr.charAt(offset);
|
||||
|
||||
if (isStopChar(currChar)){
|
||||
if (isStopChar(currChar)) {
|
||||
return offset + 1;
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ function getPropertyNamesFromExpression(expr, commandHeader) {
|
||||
}
|
||||
|
||||
let propsUnique = {};
|
||||
if (typeof obj === 'object'){
|
||||
if (typeof obj === 'object') {
|
||||
let allProps = getAllProps(obj);
|
||||
// Get only things we are allowed to complete following a '.'
|
||||
allProps = allProps.filter( isValidPropertyName );
|
||||
|
@ -60,7 +60,7 @@ var KeyboardManager = class {
|
||||
this._currentKeymap.options == options)
|
||||
return;
|
||||
|
||||
this._currentKeymap = {layouts, variants, options};
|
||||
this._currentKeymap = { layouts, variants, options };
|
||||
Meta.get_backend().set_keymap(layouts, variants, options);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ var SmartcardManager = class {
|
||||
this._objectManager = new ObjectManager.ObjectManager({ connection: Gio.DBus.session,
|
||||
name: "org.gnome.SettingsDaemon.Smartcard",
|
||||
objectPath: '/org/gnome/SettingsDaemon/Smartcard',
|
||||
knownInterfaces: [ SmartcardTokenIface ],
|
||||
knownInterfaces: [SmartcardTokenIface],
|
||||
onLoaded: this._onLoaded.bind(this) });
|
||||
this._insertedTokens = {};
|
||||
this._loginToken = null;
|
||||
|
@ -261,7 +261,7 @@ const SystemActions = GObject.registerClass({
|
||||
|
||||
let results = [];
|
||||
|
||||
for (let [key, {available, keywords}] of this._actions)
|
||||
for (let [key, { available, keywords }] of this._actions)
|
||||
if (available && terms.every(t => keywords.some(k => k.startsWith(t))))
|
||||
results.push(key);
|
||||
|
||||
|
@ -222,7 +222,7 @@ function formatTime(time, params) {
|
||||
/* Translators: Time in 24h format */
|
||||
format = N_("%H\u2236%M");
|
||||
// Show the word "Yesterday" and time if date is on yesterday
|
||||
else if (daysAgo <2)
|
||||
else if (daysAgo < 2)
|
||||
/* Translators: this is the word "Yesterday" followed by a
|
||||
time string in 24h format. i.e. "Yesterday, 14:30" */
|
||||
// xgettext:no-c-format
|
||||
@ -251,7 +251,7 @@ function formatTime(time, params) {
|
||||
/* Translators: Time in 12h format */
|
||||
format = N_("%l\u2236%M %p");
|
||||
// Show the word "Yesterday" and time if date is on yesterday
|
||||
else if (daysAgo <2)
|
||||
else if (daysAgo < 2)
|
||||
/* Translators: this is the word "Yesterday" followed by a
|
||||
time string in 12h format. i.e. "Yesterday, 2:30 pm" */
|
||||
// xgettext:no-c-format
|
||||
@ -346,7 +346,7 @@ function insertSorted(array, val, cmp) {
|
||||
var CloseButton = GObject.registerClass(
|
||||
class CloseButton extends St.Button {
|
||||
_init(boxpointer) {
|
||||
super._init({ style_class: 'notification-close'});
|
||||
super._init({ style_class: 'notification-close' });
|
||||
|
||||
// This is a bit tricky. St.Bin has its own x-align/y-align properties
|
||||
// that compete with Clutter's properties. This should be fixed for
|
||||
|
@ -19,7 +19,7 @@ var METRICS = {
|
||||
units: "frames / s" },
|
||||
overviewLatencySubsequent:
|
||||
{ description: "Time to first frame after triggering overview, second time",
|
||||
units: "us"},
|
||||
units: "us" },
|
||||
overviewFpsSubsequent:
|
||||
{ description: "Frames rate when going to the overview, second time",
|
||||
units: "frames / s" },
|
||||
@ -52,7 +52,7 @@ var METRICS = {
|
||||
units: "us" },
|
||||
applicationsShowTimeSubsequent:
|
||||
{ description: "Time to switch to applications view, second time",
|
||||
units: "us"}
|
||||
units: "us" }
|
||||
};
|
||||
|
||||
let WINDOW_CONFIGS = [
|
||||
|
@ -157,7 +157,7 @@ function *run() {
|
||||
Main.overview.hide();
|
||||
|
||||
yield Scripting.createTestWindow({ maximized: true,
|
||||
redraws: true});
|
||||
redraws: true });
|
||||
yield Scripting.waitTestWindows();
|
||||
|
||||
yield Scripting.sleep(1000);
|
||||
@ -269,7 +269,7 @@ function script_collectTimings(time) {
|
||||
if (len == 0)
|
||||
median = -1;
|
||||
else if (len % 2 == 1)
|
||||
median = times[(len - 1)/ 2];
|
||||
median = times[(len - 1) / 2];
|
||||
else
|
||||
median = Math.round((times[len / 2 - 1] + times[len / 2]) / 2);
|
||||
|
||||
|
@ -58,7 +58,7 @@ class PortalHeaderBar extends Gtk.HeaderBar {
|
||||
single_line_mode: true,
|
||||
ellipsize: Pango.EllipsizeMode.END,
|
||||
valign: Gtk.Align.BASELINE,
|
||||
selectable: true});
|
||||
selectable: true });
|
||||
this.subtitleLabel.get_style_context().add_class('subtitle');
|
||||
hbox.add(this.subtitleLabel);
|
||||
|
||||
|
@ -69,7 +69,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
|
||||
this.addButton({ label: grantLabel,
|
||||
action: () => {
|
||||
this._sendResponse(DialogResponse.OK);
|
||||
}});
|
||||
} });
|
||||
}
|
||||
|
||||
open() {
|
||||
|
@ -716,7 +716,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
||||
|
||||
_setIconSize() {
|
||||
let j = 0;
|
||||
while(this._items.length > 1 && this._items[j].style_class != 'item-box') {
|
||||
while (this._items.length > 1 && this._items[j].style_class != 'item-box') {
|
||||
j++;
|
||||
}
|
||||
let themeNode = this._items[j].get_theme_node();
|
||||
@ -738,7 +738,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
||||
let iconSize = baseIconSizes[0];
|
||||
|
||||
if (this._items.length > 1) {
|
||||
for(let i = 0; i < baseIconSizes.length; i++) {
|
||||
for (let i = 0; i < baseIconSizes.length; i++) {
|
||||
iconSize = baseIconSizes[i];
|
||||
let height = iconSizes[i] + iconSpacing;
|
||||
let w = height * this._items.length + totalSpacing;
|
||||
@ -749,7 +749,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
||||
|
||||
this._iconSize = iconSize;
|
||||
|
||||
for(let i = 0; i < this.icons.length; i++) {
|
||||
for (let i = 0; i < this.icons.length; i++) {
|
||||
if (this.icons[i].icon != null)
|
||||
break;
|
||||
this.icons[i].set_size(iconSize);
|
||||
|
@ -123,7 +123,7 @@ var AnimatedIcon = class extends Animation {
|
||||
};
|
||||
|
||||
var Spinner = class extends AnimatedIcon {
|
||||
constructor(size, animate=false) {
|
||||
constructor(size, animate = false) {
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||
super(file, size);
|
||||
|
||||
|
@ -94,7 +94,7 @@ class BaseAppView {
|
||||
padWithSpacing: true });
|
||||
params = Params.parse(params, { usePagination: false });
|
||||
|
||||
if(params.usePagination)
|
||||
if (params.usePagination)
|
||||
this._grid = new IconGrid.PaginatedIconGrid(gridParams);
|
||||
else
|
||||
this._grid = new IconGrid.IconGrid(gridParams);
|
||||
@ -231,7 +231,7 @@ var AllView = class AllView extends BaseAppView {
|
||||
reactive: true,
|
||||
y_align: St.Align.START });
|
||||
this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
||||
x_expand:true, y_expand:true });
|
||||
x_expand: true, y_expand: true });
|
||||
this.actor.add_actor(this._scrollView);
|
||||
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER,
|
||||
@ -570,7 +570,7 @@ var AllView = class AllView extends BaseAppView {
|
||||
this._eventBlocker.reactive = isOpen;
|
||||
this._currentPopup = isOpen ? popup : null;
|
||||
this._updateIconOpacities(isOpen);
|
||||
if(!isOpen)
|
||||
if (!isOpen)
|
||||
this._closeSpaceForPopup();
|
||||
});
|
||||
}
|
||||
@ -671,7 +671,7 @@ var FrequentView = class FrequentView extends BaseAppView {
|
||||
let mostUsed = this._usage.get_most_used();
|
||||
let hasUsefulData = this.hasUsefulData();
|
||||
this._noFrequentAppsLabel.visible = !hasUsefulData;
|
||||
if(!hasUsefulData)
|
||||
if (!hasUsefulData)
|
||||
return;
|
||||
|
||||
// Allow dragging of the icon only if the Dash would accept a drop to
|
||||
@ -895,7 +895,7 @@ var AppDisplay = class AppDisplay {
|
||||
|
||||
_onAllocatedSizeChanged(actor, width, height) {
|
||||
let box = new Clutter.ActorBox();
|
||||
box.x1 = box.y1 =0;
|
||||
box.x1 = box.y1 = 0;
|
||||
box.x2 = width;
|
||||
box.y2 = height;
|
||||
box = this._viewStack.get_theme_node().get_content_box(box);
|
||||
@ -1251,7 +1251,7 @@ var FolderIcon = class FolderIcon {
|
||||
adaptToSize(width, height) {
|
||||
this._parentAvailableWidth = width;
|
||||
this._parentAvailableHeight = height;
|
||||
if(this._popup)
|
||||
if (this._popup)
|
||||
this.view.adaptToSize(width, height);
|
||||
this._popupInvalidated = true;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
|
||||
}
|
||||
|
||||
_getDeviceLabel(device) {
|
||||
switch(device) {
|
||||
switch (device) {
|
||||
case AudioDevice.HEADPHONES:
|
||||
return _("Headphones");
|
||||
case AudioDevice.HEADSET:
|
||||
@ -67,7 +67,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
|
||||
}
|
||||
|
||||
_getDeviceIcon(device) {
|
||||
switch(device) {
|
||||
switch (device) {
|
||||
case AudioDevice.HEADPHONES:
|
||||
return 'audio-headphones-symbolic';
|
||||
case AudioDevice.HEADSET:
|
||||
|
@ -264,7 +264,7 @@ var BoxPointer = GObject.registerClass({
|
||||
let borderRadius = themeNode.get_length('-arrow-border-radius');
|
||||
|
||||
let halfBorder = borderWidth / 2;
|
||||
let halfBase = Math.floor(base/2);
|
||||
let halfBase = Math.floor(base / 2);
|
||||
|
||||
let backgroundColor = themeNode.get_color('-arrow-background-color');
|
||||
|
||||
@ -345,7 +345,7 @@ var BoxPointer = GObject.registerClass({
|
||||
if (!skipTopRight) {
|
||||
cr.lineTo(x2 - borderRadius, y1);
|
||||
cr.arc(x2 - borderRadius, y1 + borderRadius, borderRadius,
|
||||
3*Math.PI/2, Math.PI*2);
|
||||
3 * Math.PI / 2, Math.PI * 2);
|
||||
}
|
||||
|
||||
if (this._arrowSide == St.Side.RIGHT && rise) {
|
||||
@ -366,7 +366,7 @@ var BoxPointer = GObject.registerClass({
|
||||
if (!skipBottomRight) {
|
||||
cr.lineTo(x2, y2 - borderRadius);
|
||||
cr.arc(x2 - borderRadius, y2 - borderRadius, borderRadius,
|
||||
0, Math.PI/2);
|
||||
0, Math.PI / 2);
|
||||
}
|
||||
|
||||
if (this._arrowSide == St.Side.BOTTOM && rise) {
|
||||
@ -387,7 +387,7 @@ var BoxPointer = GObject.registerClass({
|
||||
if (!skipBottomLeft) {
|
||||
cr.lineTo(x1 + borderRadius, y2);
|
||||
cr.arc(x1 + borderRadius, y2 - borderRadius, borderRadius,
|
||||
Math.PI/2, Math.PI);
|
||||
Math.PI / 2, Math.PI);
|
||||
}
|
||||
|
||||
if (this._arrowSide == St.Side.LEFT && rise) {
|
||||
@ -408,7 +408,7 @@ var BoxPointer = GObject.registerClass({
|
||||
if (!skipTopLeft) {
|
||||
cr.lineTo(x1, y1 + borderRadius);
|
||||
cr.arc(x1 + borderRadius, y1 + borderRadius, borderRadius,
|
||||
Math.PI, 3*Math.PI/2);
|
||||
Math.PI, 3 * Math.PI / 2);
|
||||
}
|
||||
|
||||
Clutter.cairo_set_source_color(cr, backgroundColor);
|
||||
@ -513,7 +513,7 @@ var BoxPointer = GObject.registerClass({
|
||||
// of the box to maintain the arrow's accuracy.
|
||||
|
||||
let arrowOrigin;
|
||||
let halfBase = Math.floor(arrowBase/2);
|
||||
let halfBase = Math.floor(arrowBase / 2);
|
||||
let halfBorder = borderWidth / 2;
|
||||
let halfMargin = margin / 2;
|
||||
let [x1, y1] = [halfBorder, halfBorder];
|
||||
|
@ -263,7 +263,7 @@ var DBusEventSource = class DBusEventSource {
|
||||
if (!this._initialized)
|
||||
return;
|
||||
|
||||
if (this._curRequestBegin && this._curRequestEnd){
|
||||
if (this._curRequestBegin && this._curRequestEnd) {
|
||||
this._dbusProxy.GetEventsRemote(this._curRequestBegin.getTime() / 1000,
|
||||
this._curRequestEnd.getTime() / 1000,
|
||||
forceReload,
|
||||
@ -285,7 +285,7 @@ var DBusEventSource = class DBusEventSource {
|
||||
|
||||
getEvents(begin, end) {
|
||||
let result = [];
|
||||
for(let n = 0; n < this._events.length; n++) {
|
||||
for (let n = 0; n < this._events.length; n++) {
|
||||
let event = this._events[n];
|
||||
|
||||
if (_dateIntervalsOverlap (event.date, event.end, begin, end)) {
|
||||
@ -402,7 +402,7 @@ var Calendar = class Calendar {
|
||||
this._topBox.add(this._backButton);
|
||||
this._backButton.connect('clicked', this._onPrevMonthButtonClicked.bind(this));
|
||||
|
||||
this._monthLabel = new St.Label({style_class: 'calendar-month-label',
|
||||
this._monthLabel = new St.Label({ style_class: 'calendar-month-label',
|
||||
can_focus: true });
|
||||
this._topBox.add(this._monthLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
|
||||
|
||||
|
@ -11,7 +11,7 @@ var DIALOG_TRANSITION_TIME = 0.15;
|
||||
var ALIVE_TIMEOUT = 5000;
|
||||
|
||||
var CloseDialog = GObject.registerClass({
|
||||
Implements: [ Meta.CloseDialog ],
|
||||
Implements: [Meta.CloseDialog],
|
||||
Properties: {
|
||||
'window': GObject.ParamSpec.override('window', Meta.CloseDialog)
|
||||
},
|
||||
|
@ -303,7 +303,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
||||
let ssid;
|
||||
|
||||
let content = { };
|
||||
content.secrets = [ ];
|
||||
content.secrets = [];
|
||||
|
||||
switch (connectionType) {
|
||||
case '802-11-wireless':
|
||||
@ -358,12 +358,12 @@ var VPNRequestHandler = class {
|
||||
this._pluginOutBuffer = [];
|
||||
this._title = null;
|
||||
this._description = null;
|
||||
this._content = [ ];
|
||||
this._content = [];
|
||||
this._shellDialog = null;
|
||||
|
||||
let connectionSetting = connection.get_setting_connection();
|
||||
|
||||
let argv = [ authHelper.fileName,
|
||||
let argv = [authHelper.fileName,
|
||||
'-u', connectionSetting.uuid,
|
||||
'-n', connectionSetting.id,
|
||||
'-s', serviceType
|
||||
|
@ -98,7 +98,7 @@ var AuthenticationDialog = GObject.registerClass({
|
||||
this._passwordBox.add(this._passwordLabel, { y_fill: false, y_align: St.Align.MIDDLE });
|
||||
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
|
||||
text: "",
|
||||
can_focus: true});
|
||||
can_focus: true });
|
||||
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
||||
this._passwordEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this));
|
||||
this._passwordBox.add(this._passwordEntry,
|
||||
@ -127,7 +127,7 @@ var AuthenticationDialog = GObject.registerClass({
|
||||
* gnome-shell.css sets the color to be transparent
|
||||
*/
|
||||
this._nullMessageLabel = new St.Label({ style_class: 'prompt-dialog-null-label',
|
||||
text: 'abc'});
|
||||
text: 'abc' });
|
||||
this._nullMessageLabel.add_style_class_name('hidden');
|
||||
this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||
this._nullMessageLabel.clutter_text.line_wrap = true;
|
||||
|
@ -35,7 +35,7 @@ class DashItemContainer extends St.Widget {
|
||||
x_align: Clutter.ActorAlign.CENTER });
|
||||
|
||||
this._labelText = "";
|
||||
this.label = new St.Label({ style_class: 'dash-label'});
|
||||
this.label = new St.Label({ style_class: 'dash-label' });
|
||||
this.label.hide();
|
||||
Main.layoutManager.addChrome(this.label);
|
||||
this.label_actor = this.label;
|
||||
@ -328,7 +328,7 @@ class DashActor extends St.Widget {
|
||||
}
|
||||
});
|
||||
|
||||
const baseIconSizes = [ 16, 22, 24, 32, 48, 64 ];
|
||||
const baseIconSizes = [16, 22, 24, 32, 48, 64];
|
||||
|
||||
var Dash = class Dash {
|
||||
constructor() {
|
||||
|
@ -44,7 +44,7 @@ class Dialog extends St.Widget {
|
||||
x_align: St.Align.MIDDLE,
|
||||
y_align: St.Align.START });
|
||||
|
||||
this.buttonLayout = new St.Widget ({ layout_manager: new Clutter.BoxLayout({ homogeneous:true }) });
|
||||
this.buttonLayout = new St.Widget ({ layout_manager: new Clutter.BoxLayout({ homogeneous: true }) });
|
||||
this._dialog.add(this.buttonLayout,
|
||||
{ x_align: St.Align.MIDDLE,
|
||||
y_align: St.Align.START });
|
||||
|
@ -633,7 +633,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._loginManager.listSessions(result => {
|
||||
let n = 0;
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
let[id, uid, userName, seat, sessionPath] = result[i];
|
||||
let [id, uid, userName, seat, sessionPath] = result[i];
|
||||
let proxy = new LogindSession(Gio.DBus.system, 'org.freedesktop.login1', sessionPath);
|
||||
|
||||
if (proxy.Class != 'user')
|
||||
|
@ -58,7 +58,7 @@ function _patchLayoutClass(layoutClass, styleProps) {
|
||||
}
|
||||
|
||||
function _loggingFunc(...args) {
|
||||
let fields = {'MESSAGE': args.join(', ')};
|
||||
let fields = { 'MESSAGE': args.join(', ') };
|
||||
let domain = "GNOME Shell";
|
||||
|
||||
// If the caller is an extension, add it as metadata
|
||||
|
@ -8,8 +8,8 @@ const Main = imports.ui.main;
|
||||
|
||||
var MAX_CANDIDATES_PER_PAGE = 16;
|
||||
|
||||
var DEFAULT_INDEX_LABELS = [ '1', '2', '3', '4', '5', '6', '7', '8',
|
||||
'9', '0', 'a', 'b', 'c', 'd', 'e', 'f' ];
|
||||
var DEFAULT_INDEX_LABELS = ['1', '2', '3', '4', '5', '6', '7', '8',
|
||||
'9', '0', 'a', 'b', 'c', 'd', 'e', 'f'];
|
||||
|
||||
var CandidateArea = class CandidateArea {
|
||||
constructor() {
|
||||
@ -37,7 +37,7 @@ var CandidateArea = class CandidateArea {
|
||||
|
||||
this.actor.connect('scroll-event', (actor, event) => {
|
||||
let direction = event.get_scroll_direction();
|
||||
switch(direction) {
|
||||
switch (direction) {
|
||||
case Clutter.ScrollDirection.UP:
|
||||
this.emit('cursor-up');
|
||||
break;
|
||||
|
@ -12,11 +12,11 @@ var MIN_ICON_SIZE = 16;
|
||||
var EXTRA_SPACE_ANIMATION_TIME = 0.25;
|
||||
|
||||
var ANIMATION_TIME_IN = 0.350;
|
||||
var ANIMATION_TIME_OUT = 1/2 * ANIMATION_TIME_IN;
|
||||
var ANIMATION_MAX_DELAY_FOR_ITEM = 2/3 * ANIMATION_TIME_IN;
|
||||
var ANIMATION_BASE_DELAY_FOR_ITEM = 1/4 * ANIMATION_MAX_DELAY_FOR_ITEM;
|
||||
var ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2/3 * ANIMATION_TIME_OUT;
|
||||
var ANIMATION_FADE_IN_TIME_FOR_ITEM = 1/4 * ANIMATION_TIME_IN;
|
||||
var ANIMATION_TIME_OUT = 1 / 2 * ANIMATION_TIME_IN;
|
||||
var ANIMATION_MAX_DELAY_FOR_ITEM = 2 / 3 * ANIMATION_TIME_IN;
|
||||
var ANIMATION_BASE_DELAY_FOR_ITEM = 1 / 4 * ANIMATION_MAX_DELAY_FOR_ITEM;
|
||||
var ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2 / 3 * ANIMATION_TIME_OUT;
|
||||
var ANIMATION_FADE_IN_TIME_FOR_ITEM = 1 / 4 * ANIMATION_TIME_IN;
|
||||
|
||||
var ANIMATION_BOUNCE_ICON_SCALE = 1.1;
|
||||
|
||||
@ -179,8 +179,8 @@ function zoomOutActor(actor) {
|
||||
}
|
||||
|
||||
var IconGrid = GObject.registerClass({
|
||||
Signals: {'animation-done': {},
|
||||
'child-focused': { param_types: [Clutter.Actor.$gtype]} },
|
||||
Signals: { 'animation-done': {},
|
||||
'child-focused': { param_types: [Clutter.Actor.$gtype] } },
|
||||
}, class IconGrid extends St.Widget {
|
||||
_init(params) {
|
||||
super._init({ style_class: 'icon-grid',
|
||||
@ -311,7 +311,7 @@ var IconGrid = GObject.registerClass({
|
||||
let [nColumns, usedWidth] = this._computeLayout(availWidth);
|
||||
|
||||
let leftEmptySpace;
|
||||
switch(this._xAlign) {
|
||||
switch (this._xAlign) {
|
||||
case St.Align.START:
|
||||
leftEmptySpace = 0;
|
||||
break;
|
||||
@ -531,7 +531,7 @@ var IconGrid = GObject.registerClass({
|
||||
onComplete: () => {
|
||||
if (isLastItem)
|
||||
this._animationDone();
|
||||
}};
|
||||
} };
|
||||
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||
transition: 'easeInOutQuad',
|
||||
delay: delay,
|
||||
@ -553,7 +553,7 @@ var IconGrid = GObject.registerClass({
|
||||
onComplete: () => {
|
||||
if (isLastItem)
|
||||
this._animationDone();
|
||||
}};
|
||||
} };
|
||||
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||
transition: 'easeInOutQuad',
|
||||
delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||
@ -710,8 +710,8 @@ var IconGrid = GObject.registerClass({
|
||||
if (this._padWithSpacing) {
|
||||
// minRows + 1 because we want to put spacing before the first row, so it is like we have one more row
|
||||
// to divide the empty space
|
||||
maxVSpacing = Math.floor(maxEmptyVArea / (this._minRows +1));
|
||||
maxHSpacing = Math.floor(maxEmptyHArea / (this._minColumns +1));
|
||||
maxVSpacing = Math.floor(maxEmptyVArea / (this._minRows + 1));
|
||||
maxHSpacing = Math.floor(maxEmptyHArea / (this._minColumns + 1));
|
||||
} else {
|
||||
if (this._minRows <= 1)
|
||||
maxVSpacing = maxEmptyVArea;
|
||||
@ -745,8 +745,8 @@ var IconGrid = GObject.registerClass({
|
||||
this._updateSpacingForSize(availWidth, availHeight);
|
||||
|
||||
if (this.columnsForWidth(availWidth) < this._minColumns || this.rowsForHeight(availHeight) < this._minRows) {
|
||||
let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth ;
|
||||
let neededHeight = this.usedHeightForNRows(this._minRows) - availHeight ;
|
||||
let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth;
|
||||
let neededHeight = this.usedHeightForNRows(this._minRows) - availHeight;
|
||||
|
||||
let neededSpacePerItem = (neededWidth > neededHeight) ? Math.ceil(neededWidth / this._minColumns)
|
||||
: Math.ceil(neededHeight / this._minRows);
|
||||
@ -770,7 +770,7 @@ var IconGrid = GObject.registerClass({
|
||||
});
|
||||
|
||||
var PaginatedIconGrid = GObject.registerClass({
|
||||
Signals: {'space-opened': {},
|
||||
Signals: { 'space-opened': {},
|
||||
'space-closed': {} },
|
||||
}, class PaginatedIconGrid extends IconGrid {
|
||||
_init(params) {
|
||||
@ -805,7 +805,7 @@ var PaginatedIconGrid = GObject.registerClass({
|
||||
let [nColumns, usedWidth] = this._computeLayout(availWidth);
|
||||
|
||||
let leftEmptySpace;
|
||||
switch(this._xAlign) {
|
||||
switch (this._xAlign) {
|
||||
case St.Align.START:
|
||||
leftEmptySpace = 0;
|
||||
break;
|
||||
|
@ -24,29 +24,29 @@ const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
||||
const KEY_SIZE = 2;
|
||||
|
||||
const defaultKeysPre = [
|
||||
[ [], [], [{ width: 1.5, level: 1, extraClassName: 'shift-key-lowercase' }], [{ label: '?123', width: 1.5, level: 2 }] ],
|
||||
[ [], [], [{ width: 1.5, level: 0, extraClassName: 'shift-key-uppercase' }], [{ label: '?123', width: 1.5, level: 2 }] ],
|
||||
[ [], [], [{ label: '=/<', width: 1.5, level: 3 }], [{ label: 'ABC', width: 1.5, level: 0 }] ],
|
||||
[ [], [], [{ label: '?123', width: 1.5, level: 2 }], [{ label: 'ABC', width: 1.5, level: 0 }] ],
|
||||
[[], [], [{ width: 1.5, level: 1, extraClassName: 'shift-key-lowercase' }], [{ label: '?123', width: 1.5, level: 2 }]],
|
||||
[[], [], [{ width: 1.5, level: 0, extraClassName: 'shift-key-uppercase' }], [{ label: '?123', width: 1.5, level: 2 }]],
|
||||
[[], [], [{ label: '=/<', width: 1.5, level: 3 }], [{ label: 'ABC', width: 1.5, level: 0 }]],
|
||||
[[], [], [{ label: '?123', width: 1.5, level: 2 }], [{ label: 'ABC', width: 1.5, level: 0 }]],
|
||||
];
|
||||
|
||||
const defaultKeysPost = [
|
||||
[ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
|
||||
[{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase' }],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ],
|
||||
[ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
|
||||
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
|
||||
[{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase' }],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ],
|
||||
[ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
|
||||
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
|
||||
[{ label: '=/<', width: 3, level: 3, right: true }],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ],
|
||||
[ [{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
|
||||
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
|
||||
[{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
|
||||
[{ label: '?123', width: 3, level: 2, right: true }],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }] ],
|
||||
[{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
|
||||
];
|
||||
|
||||
var AspectContainer = GObject.registerClass(
|
||||
@ -1681,7 +1681,7 @@ var Keyboard = class Keyboard {
|
||||
this._animFocusedWindow = window;
|
||||
}
|
||||
|
||||
setCursorLocation(window, x, y , w, h) {
|
||||
setCursorLocation(window, x, y, w, h) {
|
||||
let monitor = Main.layoutManager.keyboardMonitor;
|
||||
|
||||
if (window && monitor) {
|
||||
|
@ -21,7 +21,7 @@ var HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
|
||||
var HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
|
||||
|
||||
function isPopupMetaWindow(actor) {
|
||||
switch(actor.meta_window.get_window_type()) {
|
||||
switch (actor.meta_window.get_window_type()) {
|
||||
case Meta.WindowType.DROPDOWN_MENU:
|
||||
case Meta.WindowType.POPUP_MENU:
|
||||
case Meta.WindowType.COMBO:
|
||||
@ -1067,7 +1067,7 @@ var LayoutManager = GObject.registerClass({
|
||||
else
|
||||
continue;
|
||||
|
||||
let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1});
|
||||
let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 });
|
||||
let strut = new Meta.Strut({ rect: strutRect, side: side });
|
||||
struts.push(strut);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface";
|
||||
|
||||
var LocatePointer = class {
|
||||
constructor() {
|
||||
this._settings = new Gio.Settings({schema_id: LOCATE_POINTER_SCHEMA});
|
||||
this._settings = new Gio.Settings({ schema_id: LOCATE_POINTER_SCHEMA });
|
||||
this._ripples = new Ripples.Ripples(0.5, 0.5, 'ripple-pointer-location');
|
||||
this._ripples.addTo(Main.uiGroup);
|
||||
}
|
||||
|
@ -68,10 +68,10 @@ var AutoComplete = class AutoComplete {
|
||||
if (commonPrefix.length > 0) {
|
||||
this.additionalCompletionText(commonPrefix, event.attrHead);
|
||||
this.emit('completion', { completion: commonPrefix, type: 'prefix' });
|
||||
this.emit('suggest', { completions: event.completions});
|
||||
this.emit('suggest', { completions: event.completions });
|
||||
}
|
||||
} else if (event.completions.length > 1 && event.tabType === 'double') {
|
||||
this.emit('suggest', { completions: event.completions});
|
||||
this.emit('suggest', { completions: event.completions });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ const CROSS_HAIRS_LENGTH_KEY = 'cross-hairs-length';
|
||||
const CROSS_HAIRS_CLIP_KEY = 'cross-hairs-clip';
|
||||
|
||||
var MouseSpriteContent = GObject.registerClass({
|
||||
Implements: [ Clutter.Content ],
|
||||
Implements: [Clutter.Content],
|
||||
}, class MouseSpriteContent extends GObject.Object {
|
||||
_init() {
|
||||
super._init();
|
||||
@ -148,7 +148,7 @@ var Magnifier = class Magnifier {
|
||||
setActive(activate) {
|
||||
let isActive = this.isActive();
|
||||
|
||||
this._zoomRegions.forEach ((zoomRegion, index, array) => {
|
||||
this._zoomRegions.forEach((zoomRegion, index, array) => {
|
||||
zoomRegion.setActive(activate);
|
||||
});
|
||||
|
||||
@ -282,7 +282,7 @@ var Magnifier = class Magnifier {
|
||||
* @zoomRegion: The zoomRegion to add.
|
||||
*/
|
||||
addZoomRegion(zoomRegion) {
|
||||
if(zoomRegion) {
|
||||
if (zoomRegion) {
|
||||
this._zoomRegions.push(zoomRegion);
|
||||
if (!this.isTrackingMouse())
|
||||
this.startTrackingMouse();
|
||||
@ -1028,7 +1028,7 @@ var ZoomRegion = class ZoomRegion {
|
||||
viewPort.x = 0;
|
||||
viewPort.y = 0;
|
||||
viewPort.width = global.screen_width;
|
||||
viewPort.height = global.screen_height/2;
|
||||
viewPort.height = global.screen_height / 2;
|
||||
this._setViewPort(viewPort);
|
||||
this._screenPosition = GDesktopEnums.MagnifierScreenPosition.TOP_HALF;
|
||||
}
|
||||
@ -1040,9 +1040,9 @@ var ZoomRegion = class ZoomRegion {
|
||||
setBottomHalf() {
|
||||
let viewPort = {};
|
||||
viewPort.x = 0;
|
||||
viewPort.y = global.screen_height/2;
|
||||
viewPort.y = global.screen_height / 2;
|
||||
viewPort.width = global.screen_width;
|
||||
viewPort.height = global.screen_height/2;
|
||||
viewPort.height = global.screen_height / 2;
|
||||
this._setViewPort(viewPort);
|
||||
this._screenPosition = GDesktopEnums.MagnifierScreenPosition.BOTTOM_HALF;
|
||||
}
|
||||
@ -1055,7 +1055,7 @@ var ZoomRegion = class ZoomRegion {
|
||||
let viewPort = {};
|
||||
viewPort.x = 0;
|
||||
viewPort.y = 0;
|
||||
viewPort.width = global.screen_width/2;
|
||||
viewPort.width = global.screen_width / 2;
|
||||
viewPort.height = global.screen_height;
|
||||
this._setViewPort(viewPort);
|
||||
this._screenPosition = GDesktopEnums.MagnifierScreenPosition.LEFT_HALF;
|
||||
@ -1067,9 +1067,9 @@ var ZoomRegion = class ZoomRegion {
|
||||
*/
|
||||
setRightHalf() {
|
||||
let viewPort = {};
|
||||
viewPort.x = global.screen_width/2;
|
||||
viewPort.x = global.screen_width / 2;
|
||||
viewPort.y = 0;
|
||||
viewPort.width = global.screen_width/2;
|
||||
viewPort.width = global.screen_width / 2;
|
||||
viewPort.height = global.screen_height;
|
||||
this._setViewPort(viewPort);
|
||||
this._screenPosition = GDesktopEnums.MagnifierScreenPosition.RIGHT_HALF;
|
||||
@ -1530,7 +1530,7 @@ var ZoomRegion = class ZoomRegion {
|
||||
let xProportion = (xPoint - halfScreenWidth) / halfScreenWidth; // -1 ... 1
|
||||
let yProportion = (yPoint - halfScreenHeight) / halfScreenHeight; // -1 ... 1
|
||||
let xPos = xPoint - xProportion * (widthRoi / 2 - xPadding);
|
||||
let yPos = yPoint - yProportion * (heightRoi /2 - yPadding);
|
||||
let yPos = yPoint - yProportion * (heightRoi / 2 - yPadding);
|
||||
|
||||
return [xPos, yPos];
|
||||
}
|
||||
@ -1660,7 +1660,7 @@ var Crosshairs = class Crosshairs {
|
||||
container.raise_child(magnifiedMouse, crosshairsActor);
|
||||
let [xMouse, yMouse] = magnifiedMouse.get_position();
|
||||
let [crosshairsWidth, crosshairsHeight] = crosshairsActor.get_size();
|
||||
crosshairsActor.set_position(xMouse - crosshairsWidth / 2 , yMouse - crosshairsHeight / 2);
|
||||
crosshairsActor.set_position(xMouse - crosshairsWidth / 2, yMouse - crosshairsHeight / 2);
|
||||
}
|
||||
}
|
||||
return crosshairsActor;
|
||||
|
@ -202,7 +202,7 @@ var LabelExpanderLayout = GObject.registerClass({
|
||||
'Expansion of the layout, between 0 (collapsed) ' +
|
||||
'and 1 (fully expanded',
|
||||
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
|
||||
0, 1, 0)},
|
||||
0, 1, 0) },
|
||||
}, class LabelExpanderLayout extends Clutter.LayoutManager {
|
||||
_init(params) {
|
||||
this._expansion = 0;
|
||||
@ -471,7 +471,7 @@ var Message = class Message {
|
||||
onComplete() {
|
||||
this._actionBin.hide();
|
||||
this.expanded = false;
|
||||
}});
|
||||
} });
|
||||
} else {
|
||||
this._bodyStack.layout_manager.expansion = 0;
|
||||
this._actionBin.scale_y = 0;
|
||||
@ -626,7 +626,7 @@ var MessageListSection = class MessageListSection {
|
||||
onComplete() {
|
||||
obj.container.destroy();
|
||||
global.sync_pointer();
|
||||
}});
|
||||
} });
|
||||
} else {
|
||||
obj.container.destroy();
|
||||
global.sync_pointer();
|
||||
@ -656,7 +656,7 @@ var MessageListSection = class MessageListSection {
|
||||
transition: 'easeOutQuad',
|
||||
onComplete() {
|
||||
message.close();
|
||||
}});
|
||||
} });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
|
||||
|
||||
if (actions.length) {
|
||||
for (let i = 0; i < actions.length - 1; i += 2) {
|
||||
let [actionId, label] = [actions[i], actions[i+1]];
|
||||
let [actionId, label] = [actions[i], actions[i + 1]];
|
||||
if (actionId == 'default')
|
||||
hasDefaultAction = true;
|
||||
else
|
||||
@ -437,7 +437,7 @@ class FdoNotificationDaemonSource extends MessageTray.Source {
|
||||
|
||||
_createPolicy() {
|
||||
if (this.app && this.app.get_app_info()) {
|
||||
let id = this.app.get_id().replace(/\.desktop$/,'');
|
||||
let id = this.app.get_id().replace(/\.desktop$/, '');
|
||||
return new MessageTray.NotificationApplicationPolicy(id);
|
||||
} else {
|
||||
return new MessageTray.NotificationGenericPolicy();
|
||||
@ -573,7 +573,7 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
|
||||
|
||||
this.update(title.unpack(), body ? body.unpack() : null,
|
||||
{ gicon: gicon ? Gio.icon_deserialize(gicon) : null,
|
||||
datetime : time ? GLib.DateTime.new_from_unix_local(time.unpack()) : null });
|
||||
datetime: time ? GLib.DateTime.new_from_unix_local(time.unpack()) : null });
|
||||
}
|
||||
|
||||
_activateAction(namespacedActionId, target) {
|
||||
|
@ -208,7 +208,7 @@ var ActionEditor = class {
|
||||
|
||||
this._doneButton = new St.Button({ label: _("Done"),
|
||||
style_class: 'button',
|
||||
x_expand: false});
|
||||
x_expand: false });
|
||||
this._doneButton.connect('clicked', this._onEditingDone.bind(this));
|
||||
this.actor.add_actor(this._doneButton);
|
||||
}
|
||||
@ -440,11 +440,11 @@ var PadDiagram = GObject.registerClass({
|
||||
let cr = this.get_context();
|
||||
|
||||
cr.save();
|
||||
cr.translate(width/2, height/2);
|
||||
cr.translate(width / 2, height / 2);
|
||||
cr.scale(this._scale, this._scale);
|
||||
if (this._leftHanded)
|
||||
cr.rotate(Math.PI);
|
||||
cr.translate(-dimensions.width/2, -dimensions.height/2);
|
||||
cr.translate(-dimensions.width / 2, -dimensions.height / 2);
|
||||
this._handle.render_cairo(cr);
|
||||
cr.restore();
|
||||
cr.$dispose();
|
||||
@ -611,7 +611,7 @@ var PadDiagram = GObject.registerClass({
|
||||
var PadOsd = class {
|
||||
constructor(padDevice, settings, imagePath, editionMode, monitorIndex) {
|
||||
this.padDevice = padDevice;
|
||||
this._groupPads = [ padDevice ];
|
||||
this._groupPads = [padDevice];
|
||||
this._settings = settings;
|
||||
this._imagePath = imagePath;
|
||||
this._editionMode = editionMode;
|
||||
|
@ -189,7 +189,7 @@ class AppMenu extends PopupMenu.PopupMenu {
|
||||
* have an active startup notification, we switch modes to display that.
|
||||
*/
|
||||
var AppMenuButton = GObject.registerClass({
|
||||
Signals: {'changed': {}},
|
||||
Signals: { 'changed': {} },
|
||||
}, class AppMenuButton extends PanelMenu.Button {
|
||||
_init(panel) {
|
||||
super._init(0.0, null, true);
|
||||
|
@ -91,7 +91,7 @@ class ButtonBox extends St.Widget {
|
||||
});
|
||||
|
||||
var Button = GObject.registerClass({
|
||||
Signals: {'menu-set': {} },
|
||||
Signals: { 'menu-set': {} },
|
||||
}, class PanelMenuButton extends ButtonBox {
|
||||
_init(menuAlignment, nameText, dontCreateMenu) {
|
||||
super._init({ reactive: true,
|
||||
|
@ -368,7 +368,7 @@ class ScreenShieldArrow extends St.Bin {
|
||||
cr.setLineWidth(thickness);
|
||||
|
||||
cr.moveTo(thickness / 2, h - thickness / 2);
|
||||
cr.lineTo(w/2, thickness);
|
||||
cr.lineTo(w / 2, thickness);
|
||||
cr.lineTo(w - thickness / 2, h - thickness / 2);
|
||||
cr.stroke();
|
||||
cr.$dispose();
|
||||
@ -741,10 +741,10 @@ var ScreenShield = class {
|
||||
delay: unitaryDelay * (N_ARROWS - (i + 1)),
|
||||
time: ARROW_ANIMATION_TIME,
|
||||
transition(t, b, c, d) {
|
||||
if (t < d/2)
|
||||
return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d/2);
|
||||
if (t < d / 2)
|
||||
return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d / 2);
|
||||
else
|
||||
return TweenerEquations.easeInQuad(t - d/2, maxOpacity, -maxOpacity, d/2);
|
||||
return TweenerEquations.easeInQuad(t - d / 2, maxOpacity, -maxOpacity, d / 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ var ScreenshotService = class {
|
||||
Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
|
||||
}
|
||||
|
||||
_createScreenshot(invocation, needsDisk=true) {
|
||||
_createScreenshot(invocation, needsDisk = true) {
|
||||
let lockedDown = false;
|
||||
if (needsDisk)
|
||||
lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk');
|
||||
@ -185,7 +185,7 @@ var ScreenshotService = class {
|
||||
"Invalid params");
|
||||
return;
|
||||
}
|
||||
let flashspot = new Flashspot({ x : x, y : y, width: width, height: height});
|
||||
let flashspot = new Flashspot({ x: x, y: y, width: width, height: height });
|
||||
flashspot.fire();
|
||||
invocation.return_value(null);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ var ListItem = class {
|
||||
constructor(app) {
|
||||
this._app = app;
|
||||
|
||||
let layout = new St.BoxLayout({ vertical: false});
|
||||
let layout = new St.BoxLayout({ vertical: false });
|
||||
|
||||
this.actor = new St.Button({ style_class: 'mount-dialog-app-list-item',
|
||||
can_focus: true,
|
||||
@ -489,7 +489,7 @@ var ShellProcessesDialog = GObject.registerClass({
|
||||
this._content = new Dialog.MessageDialogContent({ icon });
|
||||
this.contentLayout.add(this._content, { x_fill: true, y_fill: false });
|
||||
|
||||
let scrollView = new St.ScrollView({ style_class: 'mount-dialog-app-list'});
|
||||
let scrollView = new St.ScrollView({ style_class: 'mount-dialog-app-list' });
|
||||
scrollView.set_policy(St.PolicyType.NEVER,
|
||||
St.PolicyType.AUTOMATIC);
|
||||
this.contentLayout.add(scrollView,
|
||||
|
@ -140,7 +140,7 @@ class ATIndicator extends PanelMenu.Button {
|
||||
if (enabled) {
|
||||
interfaceSettings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
|
||||
interfaceSettings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
|
||||
} else if(!hasHC) {
|
||||
} else if (!hasHC) {
|
||||
interfaceSettings.set_string(KEY_GTK_THEME, gtkTheme);
|
||||
interfaceSettings.set_string(KEY_ICON_THEME, iconTheme);
|
||||
} else {
|
||||
|
@ -80,7 +80,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
|
||||
_getNDevices() {
|
||||
let adapter = this._getDefaultAdapter();
|
||||
if (!adapter)
|
||||
return [ this._hadSetupDevices ? 1 : -1, -1 ];
|
||||
return [this._hadSetupDevices ? 1 : -1, -1];
|
||||
|
||||
let nConnectedDevices = 0;
|
||||
let nDevices = 0;
|
||||
@ -105,11 +105,11 @@ var Indicator = class extends PanelMenu.SystemIndicator {
|
||||
global.settings.set_boolean(HAD_BLUETOOTH_DEVICES_SETUP, this._hadSetupDevices);
|
||||
}
|
||||
|
||||
return [ nDevices, nConnectedDevices];
|
||||
return [nDevices, nConnectedDevices];
|
||||
}
|
||||
|
||||
_sync() {
|
||||
let [ nDevices, nConnectedDevices ] = this._getNDevices();
|
||||
let [nDevices, nConnectedDevices] = this._getNDevices();
|
||||
let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
|
||||
|
||||
this.menu.setSensitive(sensitive);
|
||||
|
@ -564,7 +564,7 @@ var InputSourceManager = class {
|
||||
if (infosList.length == 0) {
|
||||
let type = INPUT_SOURCE_TYPE_XKB;
|
||||
let id = KeyboardManager.DEFAULT_LAYOUT;
|
||||
let [ , displayName, shortName] = this._xkbInfo.get_layout_info(id);
|
||||
let [, displayName, shortName] = this._xkbInfo.get_layout_info(id);
|
||||
infosList.push({ type: type, id: id, displayName: displayName, shortName: shortName });
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection {
|
||||
if (!this._device)
|
||||
return '';
|
||||
|
||||
switch(this._device.state) {
|
||||
switch (this._device.state) {
|
||||
case NM.DeviceState.DISCONNECTED:
|
||||
/* Translators: %s is a network identifier */
|
||||
return _("%s Off").format(this._getDescription());
|
||||
@ -707,7 +707,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
||||
this._activeApChangedId = device.connect('notify::active-access-point', this._activeApChanged.bind(this));
|
||||
|
||||
// accessPointAdded will also create dialog items
|
||||
let accessPoints = device.get_access_points() || [ ];
|
||||
let accessPoints = device.get_access_points() || [];
|
||||
accessPoints.forEach(ap => {
|
||||
this._accessPointAdded(this._device, ap);
|
||||
});
|
||||
@ -1075,9 +1075,9 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
||||
network = { ssid: accessPoint.get_ssid(),
|
||||
mode: accessPoint.mode,
|
||||
security: this._getApSecurityType(accessPoint),
|
||||
connections: [ ],
|
||||
connections: [],
|
||||
item: null,
|
||||
accessPoints: [ accessPoint ]
|
||||
accessPoints: [accessPoint]
|
||||
};
|
||||
network.ssidText = ssidToLabel(network.ssid);
|
||||
this._checkConnections(network, accessPoint);
|
||||
@ -1391,7 +1391,7 @@ var NMVpnConnectionItem = class extends NMConnectionItem {
|
||||
if (this._activeConnection == null)
|
||||
return null;
|
||||
|
||||
switch(this._activeConnection.vpn_state) {
|
||||
switch (this._activeConnection.vpn_state) {
|
||||
case NM.VpnConnectionState.DISCONNECTED:
|
||||
case NM.VpnConnectionState.ACTIVATED:
|
||||
return null;
|
||||
@ -1557,7 +1557,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection {
|
||||
}
|
||||
|
||||
_getSummaryIcon() {
|
||||
switch(this._category) {
|
||||
switch (this._category) {
|
||||
case NMConnectionCategory.WIRED:
|
||||
return 'network-wired-symbolic';
|
||||
case NMConnectionCategory.WIRELESS:
|
||||
@ -1568,7 +1568,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection {
|
||||
}
|
||||
|
||||
_getSummaryLabel(nDevices) {
|
||||
switch(this._category) {
|
||||
switch (this._category) {
|
||||
case NMConnectionCategory.WIRED:
|
||||
return ngettext("%s Wired Connection",
|
||||
"%s Wired Connections",
|
||||
@ -1615,9 +1615,9 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
|
||||
_clientGot(obj, result) {
|
||||
this._client = NM.Client.new_finish(result);
|
||||
|
||||
this._activeConnections = [ ];
|
||||
this._connections = [ ];
|
||||
this._connectivityQueue = [ ];
|
||||
this._activeConnections = [];
|
||||
this._connections = [];
|
||||
this._connectivityQueue = [];
|
||||
|
||||
this._mainConnection = null;
|
||||
this._mainConnectionIconChangedId = 0;
|
||||
@ -1680,7 +1680,7 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
|
||||
}
|
||||
|
||||
_readDevices() {
|
||||
let devices = this._client.get_devices() || [ ];
|
||||
let devices = this._client.get_devices() || [];
|
||||
for (let i = 0; i < devices.length; ++i) {
|
||||
try {
|
||||
this._deviceAdded(this._client, devices[i], true);
|
||||
|
@ -162,7 +162,7 @@ var ClutterFrameTicker = class {
|
||||
// set the timeline to loop. Doing this means we have to track
|
||||
// time ourselves, since clutter timeline's time will cycle
|
||||
// instead of strictly increase.
|
||||
this._timeline = new Clutter.Timeline({ duration: 1000*1000 });
|
||||
this._timeline = new Clutter.Timeline({ duration: 1000 * 1000 });
|
||||
this._timeline.set_loop(true);
|
||||
this._startTime = -1;
|
||||
this._currentTime = -1;
|
||||
|
@ -79,7 +79,7 @@ var Source = class WindowAttentionSource extends MessageTray.Source {
|
||||
|
||||
_createPolicy() {
|
||||
if (this._app && this._app.get_app_info()) {
|
||||
let id = this._app.get_id().replace(/\.desktop$/,'');
|
||||
let id = this._app.get_id().replace(/\.desktop$/, '');
|
||||
return new MessageTray.NotificationApplicationPolicy(id);
|
||||
} else {
|
||||
return new MessageTray.NotificationGenericPolicy();
|
||||
|
@ -251,7 +251,7 @@ var WorkspaceTracker = class {
|
||||
}
|
||||
|
||||
// If we don't have an empty workspace at the end, add one
|
||||
if (!emptyWorkspaces[emptyWorkspaces.length -1]) {
|
||||
if (!emptyWorkspaces[emptyWorkspaces.length - 1]) {
|
||||
workspaceManager.append_new_workspace(false, global.get_current_time());
|
||||
emptyWorkspaces.push(true);
|
||||
}
|
||||
@ -462,7 +462,7 @@ var TouchpadWorkspaceSwitchAction = class {
|
||||
this._dy = 0;
|
||||
this._enabled = true;
|
||||
actor.connect('captured-event', this._handleEvent.bind(this));
|
||||
this._touchpadSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.peripherals.touchpad'});
|
||||
this._touchpadSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.peripherals.touchpad' });
|
||||
}
|
||||
|
||||
get enabled() {
|
||||
@ -514,7 +514,7 @@ var TouchpadWorkspaceSwitchAction = class {
|
||||
|
||||
// Scale deltas up a bit to make it feel snappier
|
||||
this._dx += dx * 2;
|
||||
if(!(this._touchpadSettings.get_boolean('natural-scroll')))
|
||||
if (!(this._touchpadSettings.get_boolean('natural-scroll')))
|
||||
this._dy -= dy * 2;
|
||||
else
|
||||
this._dy += dy * 2;
|
||||
@ -537,7 +537,7 @@ Signals.addSignalMethods(TouchpadWorkspaceSwitchAction.prototype);
|
||||
var WorkspaceSwitchAction = GObject.registerClass({
|
||||
Signals: { 'activated': { param_types: [Meta.MotionDirection.$gtype] },
|
||||
'motion': { param_types: [GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
|
||||
'cancel': { param_types: [] }},
|
||||
'cancel': { param_types: [] } },
|
||||
}, class WorkspaceSwitchAction extends Clutter.SwipeAction {
|
||||
_init(allowedModes) {
|
||||
super._init();
|
||||
@ -1032,7 +1032,7 @@ var WindowManager = class {
|
||||
//FIXME: Fix num buttons
|
||||
for (let i = 0; i < 50; i++) {
|
||||
let str = display.get_pad_action_label(pad, Meta.PadActionType.BUTTON, i);
|
||||
labels.push(str ? str: '');
|
||||
labels.push(str ? str : '');
|
||||
}
|
||||
|
||||
if (this._gsdWacomProxy) {
|
||||
@ -2128,7 +2128,7 @@ var WindowManager = class {
|
||||
if (!this._allowFavoriteShortcuts())
|
||||
return;
|
||||
|
||||
let [,,,target] = binding.get_name().split('-');
|
||||
let [, , , target] = binding.get_name().split('-');
|
||||
let apps = AppFavorites.getAppFavorites().getFavorites();
|
||||
let app = apps[target - 1];
|
||||
if (app)
|
||||
@ -2161,7 +2161,7 @@ var WindowManager = class {
|
||||
if (workspaceManager.n_workspaces == 1)
|
||||
return;
|
||||
|
||||
let [action,,,target] = binding.get_name().split('-');
|
||||
let [action,,, target] = binding.get_name().split('-');
|
||||
let newWs;
|
||||
let direction;
|
||||
|
||||
|
@ -1065,9 +1065,9 @@ function rectEqual(one, two) {
|
||||
const WorkspaceActor = GObject.registerClass(
|
||||
class WorkspaceActor extends St.Widget {
|
||||
vfunc_get_focus_chain() {
|
||||
return this.get_children().filter(c => c.visible).sort((a,b) => {
|
||||
let cloneA = (a._delegate && a._delegate instanceof WindowClone) ? a._delegate: null;
|
||||
let cloneB = (b._delegate && b._delegate instanceof WindowClone) ? b._delegate: null;
|
||||
return this.get_children().filter(c => c.visible).sort((a, b) => {
|
||||
let cloneA = (a._delegate && a._delegate instanceof WindowClone) ? a._delegate : null;
|
||||
let cloneB = (b._delegate && b._delegate instanceof WindowClone) ? b._delegate : null;
|
||||
if (cloneA && cloneB)
|
||||
return cloneA.slotId - cloneB.slotId;
|
||||
|
||||
|
@ -119,7 +119,7 @@ class WorkspaceSwitcherPopup extends St.Widget {
|
||||
|
||||
if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP)
|
||||
indicator = new St.Bin({ style_class: 'ws-switcher-active-up' });
|
||||
else if(i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.DOWN)
|
||||
else if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.DOWN)
|
||||
indicator = new St.Bin({ style_class: 'ws-switcher-active-down' });
|
||||
else
|
||||
indicator = new St.Bin({ style_class: 'ws-switcher-box' });
|
||||
|
@ -12,7 +12,7 @@ const Workspace = imports.ui.workspace;
|
||||
const WorkspacesView = imports.ui.workspacesView;
|
||||
|
||||
// The maximum size of a thumbnail is 1/10 the width and height of the screen
|
||||
let MAX_THUMBNAIL_SCALE = 1/10.;
|
||||
let MAX_THUMBNAIL_SCALE = 1 / 10.;
|
||||
|
||||
var RESCALE_ANIMATION_TIME = 0.2;
|
||||
var SLIDE_ANIMATION_TIME = 0.2;
|
||||
@ -230,14 +230,14 @@ Signals.addSignalMethods(WindowClone.prototype);
|
||||
|
||||
|
||||
var ThumbnailState = {
|
||||
NEW : 0,
|
||||
ANIMATING_IN : 1,
|
||||
NEW: 0,
|
||||
ANIMATING_IN: 1,
|
||||
NORMAL: 2,
|
||||
REMOVING : 3,
|
||||
ANIMATING_OUT : 4,
|
||||
ANIMATED_OUT : 5,
|
||||
COLLAPSING : 6,
|
||||
DESTROYED : 7
|
||||
REMOVING: 3,
|
||||
ANIMATING_OUT: 4,
|
||||
ANIMATED_OUT: 5,
|
||||
COLLAPSING: 6,
|
||||
DESTROYED: 7
|
||||
};
|
||||
|
||||
/**
|
||||
@ -778,7 +778,7 @@ class ThumbnailsBox extends St.Widget {
|
||||
let [w, h] = this._thumbnails[i].actor.get_transformed_size();
|
||||
let targetBottom = targetBase + WORKSPACE_CUT_SIZE;
|
||||
let nextTargetBase = targetBase + h + spacing;
|
||||
let nextTargetTop = nextTargetBase - spacing - ((i == length - 1) ? 0: WORKSPACE_CUT_SIZE);
|
||||
let nextTargetTop = nextTargetBase - spacing - ((i == length - 1) ? 0 : WORKSPACE_CUT_SIZE);
|
||||
|
||||
// Expand the target to include the placeholder, if it exists.
|
||||
if (i == this._dropPlaceholderPos)
|
||||
|
@ -582,7 +582,7 @@ var WorkspacesDisplay = class {
|
||||
}
|
||||
|
||||
hide() {
|
||||
if (this._restackedNotifyId > 0){
|
||||
if (this._restackedNotifyId > 0) {
|
||||
Main.overview.disconnect(this._restackedNotifyId);
|
||||
this._restackedNotifyId = 0;
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ var XdndHandler = class {
|
||||
if (!cursorWindow.get_meta_window().is_override_redirect())
|
||||
return;
|
||||
|
||||
let constraint_position = new Clutter.BindConstraint({ coordinate : Clutter.BindCoordinate.POSITION,
|
||||
source: cursorWindow});
|
||||
let constraint_position = new Clutter.BindConstraint({ coordinate: Clutter.BindCoordinate.POSITION,
|
||||
source: cursorWindow });
|
||||
|
||||
this._cursorWindowClone = new Clutter.Clone({ source: cursorWindow });
|
||||
Main.uiGroup.add_actor(this._cursorWindowClone);
|
||||
|
Loading…
Reference in New Issue
Block a user