cleanup: Remove unused variables
Spotted by eslint. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
parent
e7d44bb349
commit
e56d7f5021
@ -187,8 +187,6 @@ var UserList = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateStyle(isExpanded) {
|
updateStyle(isExpanded) {
|
||||||
let tasks = [];
|
|
||||||
|
|
||||||
if (isExpanded)
|
if (isExpanded)
|
||||||
this._box.add_style_pseudo_class('expanded');
|
this._box.add_style_pseudo_class('expanded');
|
||||||
else
|
else
|
||||||
@ -575,19 +573,15 @@ var LoginDialog = GObject.registerClass({
|
|||||||
// First find out what space the children require
|
// First find out what space the children require
|
||||||
let bannerAllocation = null;
|
let bannerAllocation = null;
|
||||||
let bannerHeight = 0;
|
let bannerHeight = 0;
|
||||||
let bannerWidth = 0;
|
|
||||||
if (this._bannerView.visible) {
|
if (this._bannerView.visible) {
|
||||||
bannerAllocation = this._getBannerAllocation(dialogBox, this._bannerView);
|
bannerAllocation = this._getBannerAllocation(dialogBox, this._bannerView);
|
||||||
bannerHeight = bannerAllocation.y2 - bannerAllocation.y1;
|
bannerHeight = bannerAllocation.y2 - bannerAllocation.y1;
|
||||||
bannerWidth = bannerAllocation.x2 - bannerAllocation.x1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let authPromptAllocation = null;
|
let authPromptAllocation = null;
|
||||||
let authPromptHeight = 0;
|
|
||||||
let authPromptWidth = 0;
|
let authPromptWidth = 0;
|
||||||
if (this._authPrompt.actor.visible) {
|
if (this._authPrompt.actor.visible) {
|
||||||
authPromptAllocation = this._getCenterActorAllocation(dialogBox, this._authPrompt.actor);
|
authPromptAllocation = this._getCenterActorAllocation(dialogBox, this._authPrompt.actor);
|
||||||
authPromptHeight = authPromptAllocation.y2 - authPromptAllocation.y1;
|
|
||||||
authPromptWidth = authPromptAllocation.x2 - authPromptAllocation.x1;
|
authPromptWidth = authPromptAllocation.x2 - authPromptAllocation.x1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,10 +36,10 @@ var Manager = class {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (let i = 0; i < realmPaths.length; i++) {
|
for (let i = 0; i < realmPaths.length; i++) {
|
||||||
let realm = Realm(Gio.DBus.system,
|
Realm(Gio.DBus.system,
|
||||||
'org.freedesktop.realmd',
|
'org.freedesktop.realmd',
|
||||||
realmPaths[i],
|
realmPaths[i],
|
||||||
this._onRealmLoaded.bind(this));
|
this._onRealmLoaded.bind(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,8 +162,6 @@ function isOutOfDate(extension) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createExtensionObject(uuid, dir, type) {
|
function createExtensionObject(uuid, dir, type) {
|
||||||
let info;
|
|
||||||
|
|
||||||
let metadataFile = dir.get_child('metadata.json');
|
let metadataFile = dir.get_child('metadata.json');
|
||||||
if (!metadataFile.query_exists(null)) {
|
if (!metadataFile.query_exists(null)) {
|
||||||
throw new Error('Missing metadata.json');
|
throw new Error('Missing metadata.json');
|
||||||
|
@ -36,7 +36,7 @@ function recursivelyDeleteDir(dir, deleteParent) {
|
|||||||
let children = dir.enumerate_children('standard::name,standard::type',
|
let children = dir.enumerate_children('standard::name,standard::type',
|
||||||
Gio.FileQueryInfoFlags.NONE, null);
|
Gio.FileQueryInfoFlags.NONE, null);
|
||||||
|
|
||||||
let info, child;
|
let info;
|
||||||
while ((info = children.next_file(null)) != null) {
|
while ((info = children.next_file(null)) != null) {
|
||||||
let type = info.get_file_type();
|
let type = info.get_file_type();
|
||||||
let child = dir.get_child(info.get_name());
|
let child = dir.get_child(info.get_name());
|
||||||
@ -57,7 +57,7 @@ function recursivelyMoveDir(srcDir, destDir) {
|
|||||||
if (!destDir.query_exists(null))
|
if (!destDir.query_exists(null))
|
||||||
destDir.make_directory_with_parents(null);
|
destDir.make_directory_with_parents(null);
|
||||||
|
|
||||||
let info, child;
|
let info;
|
||||||
while ((info = children.next_file(null)) != null) {
|
while ((info = children.next_file(null)) != null) {
|
||||||
let type = info.get_file_type();
|
let type = info.get_file_type();
|
||||||
let srcChild = srcDir.get_child(info.get_name());
|
let srcChild = srcDir.get_child(info.get_name());
|
||||||
|
@ -92,7 +92,6 @@ var ObjectManager = class {
|
|||||||
proxy.init_async(GLib.PRIORITY_DEFAULT,
|
proxy.init_async(GLib.PRIORITY_DEFAULT,
|
||||||
this._cancellable,
|
this._cancellable,
|
||||||
(initable, result) => {
|
(initable, result) => {
|
||||||
let error = null;
|
|
||||||
try {
|
try {
|
||||||
initable.init_finish(result);
|
initable.init_finish(result);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
@ -155,7 +154,6 @@ var ObjectManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onManagerProxyLoaded(initable, result) {
|
_onManagerProxyLoaded(initable, result) {
|
||||||
let error = null;
|
|
||||||
try {
|
try {
|
||||||
initable.init_finish(result);
|
initable.init_finish(result);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
@ -136,7 +136,6 @@ let overviewFrames;
|
|||||||
let overviewLatency;
|
let overviewLatency;
|
||||||
let mallocUsedSize = 0;
|
let mallocUsedSize = 0;
|
||||||
let overviewShowCount = 0;
|
let overviewShowCount = 0;
|
||||||
let firstOverviewUsedSize;
|
|
||||||
let haveSwapComplete = false;
|
let haveSwapComplete = false;
|
||||||
let applicationsShowStart;
|
let applicationsShowStart;
|
||||||
let applicationsShowCount = 0;
|
let applicationsShowCount = 0;
|
||||||
|
@ -19,7 +19,6 @@ const PortalHelperSecurityLevel = {
|
|||||||
INSECURE: 2
|
INSECURE: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
const INACTIVITY_TIMEOUT = 30000; //ms
|
|
||||||
const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
|
const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
|
||||||
const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST;
|
const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST;
|
||||||
const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
|
const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
|
||||||
|
@ -841,7 +841,6 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
|||||||
this._removeIcon(app);
|
this._removeIcon(app);
|
||||||
});
|
});
|
||||||
|
|
||||||
let n = this._arrows.length;
|
|
||||||
let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' });
|
let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' });
|
||||||
arrow.connect('repaint', () => { SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM); });
|
arrow.connect('repaint', () => { SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM); });
|
||||||
this.add_actor(arrow);
|
this.add_actor(arrow);
|
||||||
|
@ -20,7 +20,6 @@ const SystemActions = imports.misc.systemActions;
|
|||||||
|
|
||||||
const { loadInterfaceXML } = imports.misc.fileUtils;
|
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||||
|
|
||||||
var MAX_APPLICATION_WORK_MILLIS = 75;
|
|
||||||
var MENU_POPUP_TIMEOUT = 600;
|
var MENU_POPUP_TIMEOUT = 600;
|
||||||
var MAX_COLUMNS = 6;
|
var MAX_COLUMNS = 6;
|
||||||
var MIN_COLUMNS = 4;
|
var MIN_COLUMNS = 4;
|
||||||
@ -34,23 +33,9 @@ var FOLDER_SUBICON_FRACTION = .4;
|
|||||||
|
|
||||||
var MIN_FREQUENT_APPS_COUNT = 3;
|
var MIN_FREQUENT_APPS_COUNT = 3;
|
||||||
|
|
||||||
var INDICATORS_BASE_TIME = 0.25;
|
|
||||||
var INDICATORS_ANIMATION_DELAY = 0.125;
|
|
||||||
var INDICATORS_ANIMATION_MAX_TIME = 0.75;
|
|
||||||
|
|
||||||
var VIEWS_SWITCH_TIME = 0.4;
|
var VIEWS_SWITCH_TIME = 0.4;
|
||||||
var VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
|
var VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
|
||||||
|
|
||||||
// Follow iconGrid animations approach and divide by 2 to animate out to
|
|
||||||
// not annoy the user when the user wants to quit appDisplay.
|
|
||||||
// Also, make sure we don't exceed iconGrid animation total time or
|
|
||||||
// views switch time.
|
|
||||||
var INDICATORS_BASE_TIME_OUT = 0.125;
|
|
||||||
var INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
|
|
||||||
var INDICATORS_ANIMATION_MAX_TIME_OUT =
|
|
||||||
Math.min (VIEWS_SWITCH_TIME,
|
|
||||||
IconGrid.ANIMATION_TIME_OUT + IconGrid.ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
|
|
||||||
|
|
||||||
var PAGE_SWITCH_TIME = 0.3;
|
var PAGE_SWITCH_TIME = 0.3;
|
||||||
|
|
||||||
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
|
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
|
||||||
@ -373,7 +358,7 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
_loadApps() {
|
_loadApps() {
|
||||||
this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
|
this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
|
||||||
try {
|
try {
|
||||||
let id = appInfo.get_id(); // catch invalid file encodings
|
(appInfo.get_id()); // catch invalid file encodings
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,6 @@ const PRIMARY_COLOR_KEY = 'primary-color';
|
|||||||
const SECONDARY_COLOR_KEY = 'secondary-color';
|
const SECONDARY_COLOR_KEY = 'secondary-color';
|
||||||
const COLOR_SHADING_TYPE_KEY = 'color-shading-type';
|
const COLOR_SHADING_TYPE_KEY = 'color-shading-type';
|
||||||
const BACKGROUND_STYLE_KEY = 'picture-options';
|
const BACKGROUND_STYLE_KEY = 'picture-options';
|
||||||
const PICTURE_OPACITY_KEY = 'picture-opacity';
|
|
||||||
const PICTURE_URI_KEY = 'picture-uri';
|
const PICTURE_URI_KEY = 'picture-uri';
|
||||||
|
|
||||||
var FADE_ANIMATION_TIME = 1.0;
|
var FADE_ANIMATION_TIME = 1.0;
|
||||||
|
@ -546,8 +546,6 @@ var Calendar = class Calendar {
|
|||||||
this._calendarBegin = new Date(beginDate);
|
this._calendarBegin = new Date(beginDate);
|
||||||
this._markedAsToday = now;
|
this._markedAsToday = now;
|
||||||
|
|
||||||
let year = beginDate.getYear();
|
|
||||||
|
|
||||||
let daysToWeekStart = (7 + beginDate.getDay() - this._weekStart) % 7;
|
let daysToWeekStart = (7 + beginDate.getDay() - this._weekStart) % 7;
|
||||||
let startsOnWeekStart = daysToWeekStart == 0;
|
let startsOnWeekStart = daysToWeekStart == 0;
|
||||||
let weekPadding = startsOnWeekStart ? 7 : 0;
|
let weekPadding = startsOnWeekStart ? 7 : 0;
|
||||||
@ -559,7 +557,7 @@ var Calendar = class Calendar {
|
|||||||
let row = 2;
|
let row = 2;
|
||||||
// nRows here means 6 weeks + one header + one navbar
|
// nRows here means 6 weeks + one header + one navbar
|
||||||
let nRows = 8;
|
let nRows = 8;
|
||||||
while (row < 8) {
|
while (row < nRows) {
|
||||||
// xgettext:no-javascript-format
|
// xgettext:no-javascript-format
|
||||||
let button = new St.Button({ label: iter.toLocaleFormat(C_("date day number format", "%d")),
|
let button = new St.Button({ label: iter.toLocaleFormat(C_("date day number format", "%d")),
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
|
@ -236,7 +236,6 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
|
|
||||||
_get8021xSecrets(secrets) {
|
_get8021xSecrets(secrets) {
|
||||||
let ieee8021xSetting = this._connection.get_setting_802_1x();
|
let ieee8021xSetting = this._connection.get_setting_802_1x();
|
||||||
let phase2method;
|
|
||||||
|
|
||||||
/* If hints were given we know exactly what we need to ask */
|
/* If hints were given we know exactly what we need to ask */
|
||||||
if (this._settingName == "802-1x" && this._hints.length) {
|
if (this._settingName == "802-1x" && this._hints.length) {
|
||||||
@ -696,7 +695,6 @@ var NetworkAgent = class {
|
|||||||
break;
|
break;
|
||||||
case 'gsm':
|
case 'gsm':
|
||||||
if (hints.includes('pin')) {
|
if (hints.includes('pin')) {
|
||||||
let gsmSetting = connection.get_setting_gsm();
|
|
||||||
title = _("PIN code required");
|
title = _("PIN code required");
|
||||||
body = _("PIN code is needed for the mobile broadband device");
|
body = _("PIN code is needed for the mobile broadband device");
|
||||||
break;
|
break;
|
||||||
|
@ -7,7 +7,6 @@ const SwitcherPopup = imports.ui.switcherPopup;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
var POPUP_APPICON_SIZE = 96;
|
var POPUP_APPICON_SIZE = 96;
|
||||||
var POPUP_FADE_TIME = 0.1; // seconds
|
|
||||||
|
|
||||||
var SortGroup = {
|
var SortGroup = {
|
||||||
TOP: 0,
|
TOP: 0,
|
||||||
|
@ -459,7 +459,6 @@ class CalendarColumnLayout extends Clutter.BoxLayout {
|
|||||||
var DateMenuButton = GObject.registerClass(
|
var DateMenuButton = GObject.registerClass(
|
||||||
class DateMenuButton extends PanelMenu.Button {
|
class DateMenuButton extends PanelMenu.Button {
|
||||||
_init() {
|
_init() {
|
||||||
let item;
|
|
||||||
let hbox;
|
let hbox;
|
||||||
let vbox;
|
let vbox;
|
||||||
|
|
||||||
|
@ -29,13 +29,9 @@ const UserWidget = imports.ui.userWidget;
|
|||||||
|
|
||||||
const { loadInterfaceXML } = imports.misc.fileUtils;
|
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||||
|
|
||||||
let _endSessionDialog = null;
|
|
||||||
|
|
||||||
const _ITEM_ICON_SIZE = 48;
|
const _ITEM_ICON_SIZE = 48;
|
||||||
const _DIALOG_ICON_SIZE = 48;
|
const _DIALOG_ICON_SIZE = 48;
|
||||||
|
|
||||||
var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
|
|
||||||
|
|
||||||
const EndSessionDialogIface = loadInterfaceXML('org.gnome.SessionManager.EndSessionDialog');
|
const EndSessionDialogIface = loadInterfaceXML('org.gnome.SessionManager.EndSessionDialog');
|
||||||
|
|
||||||
const logoutDialogContent = {
|
const logoutDialogContent = {
|
||||||
@ -223,7 +219,7 @@ function init() {
|
|||||||
// This always returns the same singleton object
|
// This always returns the same singleton object
|
||||||
// By instantiating it initially, we register the
|
// By instantiating it initially, we register the
|
||||||
// bus object, etc.
|
// bus object, etc.
|
||||||
_endSessionDialog = new EndSessionDialog();
|
(new EndSessionDialog());
|
||||||
}
|
}
|
||||||
|
|
||||||
var EndSessionDialog = GObject.registerClass(
|
var EndSessionDialog = GObject.registerClass(
|
||||||
|
@ -9,8 +9,6 @@ const ExtensionSystem = imports.ui.extensionSystem;
|
|||||||
const FileUtils = imports.misc.fileUtils;
|
const FileUtils = imports.misc.fileUtils;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
|
|
||||||
const _signals = ExtensionSystem._signals;
|
|
||||||
|
|
||||||
var REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
|
var REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
|
||||||
var REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
|
var REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
|
||||||
var REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
|
var REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
|
||||||
|
@ -743,7 +743,6 @@ var IconGrid = GObject.registerClass({
|
|||||||
this._fixedHItemSize = this._hItemSize;
|
this._fixedHItemSize = this._hItemSize;
|
||||||
this._fixedVItemSize = this._vItemSize;
|
this._fixedVItemSize = this._vItemSize;
|
||||||
this._updateSpacingForSize(availWidth, availHeight);
|
this._updateSpacingForSize(availWidth, availHeight);
|
||||||
let spacing = this._getSpacing();
|
|
||||||
|
|
||||||
if (this.columnsForWidth(availWidth) < this._minColumns || this.rowsForHeight(availHeight) < this._minRows) {
|
if (this.columnsForWidth(availWidth) < this._minColumns || this.rowsForHeight(availHeight) < this._minRows) {
|
||||||
let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth ;
|
let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth ;
|
||||||
@ -802,7 +801,6 @@ var PaginatedIconGrid = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
let children = this._getVisibleChildren();
|
let children = this._getVisibleChildren();
|
||||||
let availWidth = box.x2 - box.x1;
|
let availWidth = box.x2 - box.x1;
|
||||||
let availHeight = box.y2 - box.y1;
|
|
||||||
let spacing = this._getSpacing();
|
let spacing = this._getSpacing();
|
||||||
let [nColumns, usedWidth] = this._computeLayout(availWidth);
|
let [nColumns, usedWidth] = this._computeLayout(availWidth);
|
||||||
|
|
||||||
@ -821,7 +819,6 @@ var PaginatedIconGrid = GObject.registerClass({
|
|||||||
let x = box.x1 + leftEmptySpace + this.leftPadding;
|
let x = box.x1 + leftEmptySpace + this.leftPadding;
|
||||||
let y = box.y1 + this.topPadding;
|
let y = box.y1 + this.topPadding;
|
||||||
let columnIndex = 0;
|
let columnIndex = 0;
|
||||||
let rowIndex = 0;
|
|
||||||
|
|
||||||
for (let i = 0; i < children.length; i++) {
|
for (let i = 0; i < children.length; i++) {
|
||||||
let childBox = this._calculateChildBox(children[i], x, y, box);
|
let childBox = this._calculateChildBox(children[i], x, y, box);
|
||||||
@ -831,7 +828,6 @@ var PaginatedIconGrid = GObject.registerClass({
|
|||||||
columnIndex++;
|
columnIndex++;
|
||||||
if (columnIndex == nColumns) {
|
if (columnIndex == nColumns) {
|
||||||
columnIndex = 0;
|
columnIndex = 0;
|
||||||
rowIndex++;
|
|
||||||
}
|
}
|
||||||
if (columnIndex == 0) {
|
if (columnIndex == 0) {
|
||||||
y += this._getVItemSize() + spacing;
|
y += this._getVItemSize() + spacing;
|
||||||
@ -863,7 +859,6 @@ var PaginatedIconGrid = GObject.registerClass({
|
|||||||
if (this._rowLimit)
|
if (this._rowLimit)
|
||||||
nRows = Math.min(nRows, this._rowLimit);
|
nRows = Math.min(nRows, this._rowLimit);
|
||||||
|
|
||||||
let spacing = this._getSpacing();
|
|
||||||
// We want to contain the grid inside the parent box with padding
|
// We want to contain the grid inside the parent box with padding
|
||||||
this._rowsPerPage = this.rowsForHeight(availHeightPerPage);
|
this._rowsPerPage = this.rowsForHeight(availHeightPerPage);
|
||||||
this._nPages = Math.ceil(nRows / this._rowsPerPage);
|
this._nPages = Math.ceil(nRows / this._rowsPerPage);
|
||||||
|
@ -405,9 +405,6 @@ var Key = class Key {
|
|||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
});
|
});
|
||||||
button.connect('touch-event', (actor, event) => {
|
button.connect('touch-event', (actor, event) => {
|
||||||
let device = event.get_device();
|
|
||||||
let sequence = event.get_event_sequence();
|
|
||||||
|
|
||||||
// We only handle touch events here on wayland. On X11
|
// We only handle touch events here on wayland. On X11
|
||||||
// we do get emulated pointer events, which already works
|
// we do get emulated pointer events, which already works
|
||||||
// for single-touch cases. Besides, the X11 passive touch grab
|
// for single-touch cases. Besides, the X11 passive touch grab
|
||||||
@ -913,7 +910,6 @@ var EmojiSelection = class EmojiSelection {
|
|||||||
contents = imports.byteArray.toString(contents);
|
contents = imports.byteArray.toString(contents);
|
||||||
let emoji = JSON.parse(contents);
|
let emoji = JSON.parse(contents);
|
||||||
|
|
||||||
let pages = [];
|
|
||||||
let variants = [];
|
let variants = [];
|
||||||
let currentKey = 0;
|
let currentKey = 0;
|
||||||
let currentSection = null;
|
let currentSection = null;
|
||||||
@ -1406,8 +1402,6 @@ var Keyboard = class Keyboard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_getDefaultKeysForRow(row, numRows, level) {
|
_getDefaultKeysForRow(row, numRows, level) {
|
||||||
let pre, post;
|
|
||||||
|
|
||||||
/* The first 2 rows in defaultKeysPre/Post belong together with
|
/* The first 2 rows in defaultKeysPre/Post belong together with
|
||||||
* the first 2 rows on each keymap. On keymaps that have more than
|
* the first 2 rows on each keymap. On keymaps that have more than
|
||||||
* 4 rows, the last 2 default key rows must be respectively
|
* 4 rows, the last 2 default key rows must be respectively
|
||||||
@ -1646,8 +1640,7 @@ var Keyboard = class Keyboard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_windowSlideAnimationComplete(window, delta) {
|
_windowSlideAnimationComplete(window, delta) {
|
||||||
// Synchronize window and actor positions again.
|
// Synchronize window positions again.
|
||||||
let windowActor = window.get_compositor_private();
|
|
||||||
let frameRect = window.get_frame_rect();
|
let frameRect = window.get_frame_rect();
|
||||||
frameRect.y += delta;
|
frameRect.y += delta;
|
||||||
window.move_frame(true, frameRect.x, frameRect.y);
|
window.move_frame(true, frameRect.x, frameRect.y);
|
||||||
@ -1693,7 +1686,6 @@ var Keyboard = class Keyboard {
|
|||||||
|
|
||||||
if (window && monitor) {
|
if (window && monitor) {
|
||||||
let keyboardHeight = Main.layoutManager.keyboardBox.height;
|
let keyboardHeight = Main.layoutManager.keyboardBox.height;
|
||||||
let focusObscured = false;
|
|
||||||
|
|
||||||
if (y + h >= monitor.y + monitor.height - keyboardHeight) {
|
if (y + h >= monitor.y + monitor.height - keyboardHeight) {
|
||||||
if (this._keyboardVisible)
|
if (this._keyboardVisible)
|
||||||
@ -1744,7 +1736,6 @@ var KeyboardController = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onContentPurposeHintsChanged(method) {
|
_onContentPurposeHintsChanged(method) {
|
||||||
let hints = method.content_hints;
|
|
||||||
let purpose = method.content_purpose;
|
let purpose = method.content_purpose;
|
||||||
let emojiVisible = false;
|
let emojiVisible = false;
|
||||||
let keypadVisible = false;
|
let keypadVisible = false;
|
||||||
|
@ -394,7 +394,6 @@ var ObjInspector = class ObjInspector {
|
|||||||
|
|
||||||
for (let i = 0; i < properties.length; i++) {
|
for (let i = 0; i < properties.length; i++) {
|
||||||
let propName = properties[i];
|
let propName = properties[i];
|
||||||
let valueStr;
|
|
||||||
let link;
|
let link;
|
||||||
try {
|
try {
|
||||||
let prop = obj[propName];
|
let prop = obj[propName];
|
||||||
@ -403,7 +402,6 @@ var ObjInspector = class ObjInspector {
|
|||||||
link = new St.Label({ text: '<error>' });
|
link = new St.Label({ text: '<error>' });
|
||||||
}
|
}
|
||||||
let hbox = new St.BoxLayout();
|
let hbox = new St.BoxLayout();
|
||||||
let propText = propName + ': ' + valueStr;
|
|
||||||
hbox.add(new St.Label({ text: propName + ': ' }));
|
hbox.add(new St.Label({ text: propName + ': ' }));
|
||||||
hbox.add(link);
|
hbox.add(link);
|
||||||
this._container.add_actor(hbox);
|
this._container.add_actor(hbox);
|
||||||
@ -710,7 +708,6 @@ var Extensions = class Extensions {
|
|||||||
|
|
||||||
let metaBox = new St.BoxLayout({ style_class: 'lg-extension-meta' });
|
let metaBox = new St.BoxLayout({ style_class: 'lg-extension-meta' });
|
||||||
box.add(metaBox);
|
box.add(metaBox);
|
||||||
let stateString = this._stateToString(extension.state);
|
|
||||||
let state = new St.Label({ style_class: 'lg-extension-state',
|
let state = new St.Label({ style_class: 'lg-extension-state',
|
||||||
text: this._stateToString(extension.state) });
|
text: this._stateToString(extension.state) });
|
||||||
metaBox.add(state);
|
metaBox.add(state);
|
||||||
|
@ -41,8 +41,6 @@ const CROSS_HAIRS_OPACITY_KEY = 'cross-hairs-opacity';
|
|||||||
const CROSS_HAIRS_LENGTH_KEY = 'cross-hairs-length';
|
const CROSS_HAIRS_LENGTH_KEY = 'cross-hairs-length';
|
||||||
const CROSS_HAIRS_CLIP_KEY = 'cross-hairs-clip';
|
const CROSS_HAIRS_CLIP_KEY = 'cross-hairs-clip';
|
||||||
|
|
||||||
let magDBusService = null;
|
|
||||||
|
|
||||||
var MouseSpriteContent = GObject.registerClass({
|
var MouseSpriteContent = GObject.registerClass({
|
||||||
Implements: [ Clutter.Content ],
|
Implements: [ Clutter.Content ],
|
||||||
}, class MouseSpriteContent extends GObject.Object {
|
}, class MouseSpriteContent extends GObject.Object {
|
||||||
@ -122,7 +120,7 @@ var Magnifier = class Magnifier {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Export to dbus.
|
// Export to dbus.
|
||||||
magDBusService = new MagnifierDBus.ShellMagnifier();
|
(new MagnifierDBus.ShellMagnifier());
|
||||||
this.setActive(St.Settings.get().magnifier_active);
|
this.setActive(St.Settings.get().magnifier_active);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1818,9 +1816,7 @@ var Crosshairs = class Crosshairs {
|
|||||||
reCenter(clipSize) {
|
reCenter(clipSize) {
|
||||||
let [groupWidth, groupHeight] = this._actor.get_size();
|
let [groupWidth, groupHeight] = this._actor.get_size();
|
||||||
let leftLength = this._horizLeftHair.get_width();
|
let leftLength = this._horizLeftHair.get_width();
|
||||||
let rightLength = this._horizRightHair.get_width();
|
|
||||||
let topLength = this._vertTopHair.get_height();
|
let topLength = this._vertTopHair.get_height();
|
||||||
let bottomLength = this._vertBottomHair.get_height();
|
|
||||||
let thickness = this._horizLeftHair.get_height();
|
let thickness = this._horizLeftHair.get_height();
|
||||||
|
|
||||||
// Deal with clip rectangle.
|
// Deal with clip rectangle.
|
||||||
|
@ -84,7 +84,6 @@ let _cssStylesheet = null;
|
|||||||
let _a11ySettings = null;
|
let _a11ySettings = null;
|
||||||
let _themeResource = null;
|
let _themeResource = null;
|
||||||
let _oskResource = null;
|
let _oskResource = null;
|
||||||
let pointerA11yTimeout = null;
|
|
||||||
|
|
||||||
function _sessionUpdated() {
|
function _sessionUpdated() {
|
||||||
if (sessionMode.isPrimary)
|
if (sessionMode.isPrimary)
|
||||||
@ -192,7 +191,7 @@ function _initializeUI() {
|
|||||||
layoutManager.init();
|
layoutManager.init();
|
||||||
overview.init();
|
overview.init();
|
||||||
|
|
||||||
pointerA11yTimeout = new PointerA11yTimeout.PointerA11yTimeout();
|
(new PointerA11yTimeout.PointerA11yTimeout());
|
||||||
|
|
||||||
_a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
|
_a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@ const { Clutter, Gio, Meta, St } = imports.gi;
|
|||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
var FADE_TIME = 0.1;
|
|
||||||
|
|
||||||
var OsdMonitorLabel = class {
|
var OsdMonitorLabel = class {
|
||||||
constructor(monitor, label) {
|
constructor(monitor, label) {
|
||||||
this._actor = new St.Widget({ x_expand: true,
|
this._actor = new St.Widget({ x_expand: true,
|
||||||
|
@ -3,8 +3,6 @@ const Tweener = imports.ui.tweener;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Cairo = imports.cairo;
|
const Cairo = imports.cairo;
|
||||||
|
|
||||||
const ANIMATION_STEPS = 36.;
|
|
||||||
|
|
||||||
var PieTimer = GObject.registerClass(
|
var PieTimer = GObject.registerClass(
|
||||||
class PieTimer extends St.DrawingArea {
|
class PieTimer extends St.DrawingArea {
|
||||||
_init() {
|
_init() {
|
||||||
|
@ -9,8 +9,6 @@ const Tweener = imports.ui.tweener;
|
|||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
const History = imports.misc.history;
|
const History = imports.misc.history;
|
||||||
|
|
||||||
var MAX_FILE_DELETED_BEFORE_INVALID = 10;
|
|
||||||
|
|
||||||
const HISTORY_KEY = 'command-history';
|
const HISTORY_KEY = 'command-history';
|
||||||
|
|
||||||
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
|
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
|
||||||
|
@ -44,11 +44,9 @@ var SUMMARY_ICON_SIZE = 48;
|
|||||||
// - STANDARD_FADE_TIME is used when the session goes idle
|
// - STANDARD_FADE_TIME is used when the session goes idle
|
||||||
// - MANUAL_FADE_TIME is used for lowering the shield when asked by the user,
|
// - MANUAL_FADE_TIME is used for lowering the shield when asked by the user,
|
||||||
// or when cancelling the dialog
|
// or when cancelling the dialog
|
||||||
// - BACKGROUND_FADE_TIME is used when the background changes to crossfade to new background
|
|
||||||
// - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
|
// - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
|
||||||
var STANDARD_FADE_TIME = 10;
|
var STANDARD_FADE_TIME = 10;
|
||||||
var MANUAL_FADE_TIME = 0.3;
|
var MANUAL_FADE_TIME = 0.3;
|
||||||
var BACKGROUND_FADE_TIME = 1.0;
|
|
||||||
var CURTAIN_SLIDE_TIME = 0.3;
|
var CURTAIN_SLIDE_TIME = 0.3;
|
||||||
|
|
||||||
var Clock = class {
|
var Clock = class {
|
||||||
|
@ -42,8 +42,6 @@ var Slider = class extends BarLevel.BarLevel {
|
|||||||
let [hasHandleColor, handleBorderColor] =
|
let [hasHandleColor, handleBorderColor] =
|
||||||
themeNode.lookup_color('-slider-handle-border-color', false);
|
themeNode.lookup_color('-slider-handle-border-color', false);
|
||||||
|
|
||||||
const TAU = Math.PI * 2;
|
|
||||||
|
|
||||||
let handleX = handleRadius + (width - 2 * handleRadius) * this._value / this._maxValue;
|
let handleX = handleRadius + (width - 2 * handleRadius) * this._value / this._maxValue;
|
||||||
let handleY = height / 2;
|
let handleY = height / 2;
|
||||||
|
|
||||||
@ -185,10 +183,9 @@ var Slider = class extends BarLevel.BarLevel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_moveHandle(absX, absY) {
|
_moveHandle(absX, absY) {
|
||||||
let relX, relY, sliderX, sliderY;
|
let relX, sliderX;
|
||||||
[sliderX, sliderY] = this.actor.get_transformed_position();
|
[sliderX] = this.actor.get_transformed_position();
|
||||||
relX = absX - sliderX;
|
relX = absX - sliderX;
|
||||||
relY = absY - sliderY;
|
|
||||||
|
|
||||||
let width = this._barLevelWidth;
|
let width = this._barLevelWidth;
|
||||||
let handleRadius = this.actor.get_theme_node().get_length('-slider-handle-radius');
|
let handleRadius = this.actor.get_theme_node().get_length('-slider-handle-radius');
|
||||||
|
@ -10,8 +10,6 @@ const Slider = imports.ui.slider;
|
|||||||
|
|
||||||
const ALLOW_AMPLIFIED_VOLUME_KEY = 'allow-volume-above-100-percent';
|
const ALLOW_AMPLIFIED_VOLUME_KEY = 'allow-volume-above-100-percent';
|
||||||
|
|
||||||
var VOLUME_NOTIFY_ID = 1;
|
|
||||||
|
|
||||||
// Each Gvc.MixerControl is a connection to PulseAudio,
|
// Each Gvc.MixerControl is a connection to PulseAudio,
|
||||||
// so it's better to make it a singleton
|
// so it's better to make it a singleton
|
||||||
let _mixerControl;
|
let _mixerControl;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A widget showing the user avatar and name
|
// A widget showing the user avatar and name
|
||||||
|
|
||||||
const { Clutter, Gio, GLib, GObject, St } = imports.gi;
|
const { Clutter, GLib, GObject, St } = imports.gi;
|
||||||
|
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
@ -44,7 +44,6 @@ var Avatar = class {
|
|||||||
iconFile = null;
|
iconFile = null;
|
||||||
|
|
||||||
if (iconFile) {
|
if (iconFile) {
|
||||||
let file = Gio.File.new_for_path(iconFile);
|
|
||||||
this.actor.child = null;
|
this.actor.child = null;
|
||||||
this.actor.style = `
|
this.actor.style = `
|
||||||
background-image: url("${iconFile}");
|
background-image: url("${iconFile}");
|
||||||
@ -107,9 +106,6 @@ class UserWidgetLabel extends St.Widget {
|
|||||||
let [minRealNameWidth, minRealNameHeight,
|
let [minRealNameWidth, minRealNameHeight,
|
||||||
natRealNameWidth, natRealNameHeight] = this._realNameLabel.get_preferred_size();
|
natRealNameWidth, natRealNameHeight] = this._realNameLabel.get_preferred_size();
|
||||||
|
|
||||||
let [minUserNameWidth, minUserNameHeight,
|
|
||||||
natUserNameWidth, natUserNameHeight] = this._userNameLabel.get_preferred_size();
|
|
||||||
|
|
||||||
if (natRealNameWidth <= availWidth)
|
if (natRealNameWidth <= availWidth)
|
||||||
this._currentLabel = this._realNameLabel;
|
this._currentLabel = this._realNameLabel;
|
||||||
else
|
else
|
||||||
|
@ -403,7 +403,6 @@ var ViewSelector = class {
|
|||||||
if (Main.modalCount > 1)
|
if (Main.modalCount > 1)
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
let modifiers = event.get_state();
|
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
|
|
||||||
if (symbol == Clutter.Escape) {
|
if (symbol == Clutter.Escape) {
|
||||||
|
@ -331,7 +331,6 @@ var WorkspaceTracker = class {
|
|||||||
if (oldNumWorkspaces == newNumWorkspaces)
|
if (oldNumWorkspaces == newNumWorkspaces)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let lostWorkspaces = [];
|
|
||||||
if (newNumWorkspaces > oldNumWorkspaces) {
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
let w;
|
let w;
|
||||||
|
|
||||||
|
@ -1002,7 +1002,6 @@ var UnalignedLayoutStrategy = class extends LayoutStrategy {
|
|||||||
let idealRowWidth = totalWidth / numRows;
|
let idealRowWidth = totalWidth / numRows;
|
||||||
let windowIdx = 0;
|
let windowIdx = 0;
|
||||||
for (let i = 0; i < numRows; i++) {
|
for (let i = 0; i < numRows; i++) {
|
||||||
let col = 0;
|
|
||||||
let row = this._newRow();
|
let row = this._newRow();
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
|
|
||||||
@ -1363,7 +1362,6 @@ var Workspace = class {
|
|||||||
|
|
||||||
for (let i = 0; i < clones.length; i++) {
|
for (let i = 0; i < clones.length; i++) {
|
||||||
let clone = clones[i];
|
let clone = clones[i];
|
||||||
let metaWindow = clone.metaWindow;
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
clone.setStackAbove(this._dropRect);
|
clone.setStackAbove(this._dropRect);
|
||||||
} else {
|
} else {
|
||||||
|
@ -324,7 +324,6 @@ var WorkspaceThumbnail = class {
|
|||||||
|
|
||||||
for (let i = 0; i < this._windows.length; i++) {
|
for (let i = 0; i < this._windows.length; i++) {
|
||||||
let clone = this._windows[i];
|
let clone = this._windows[i];
|
||||||
let metaWindow = clone.metaWindow;
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
clone.setStackAbove(this._bgManager.backgroundActor);
|
clone.setStackAbove(this._bgManager.backgroundActor);
|
||||||
} else {
|
} else {
|
||||||
@ -914,7 +913,6 @@ class ThumbnailsBox extends St.Widget {
|
|||||||
let workspaceManager = global.workspace_manager;
|
let workspaceManager = global.workspace_manager;
|
||||||
let oldNumWorkspaces = validThumbnails.length;
|
let oldNumWorkspaces = validThumbnails.length;
|
||||||
let newNumWorkspaces = workspaceManager.n_workspaces;
|
let newNumWorkspaces = workspaceManager.n_workspaces;
|
||||||
let active = workspaceManager.get_active_workspace_index();
|
|
||||||
|
|
||||||
if (newNumWorkspaces > oldNumWorkspaces) {
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
this.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
|
this.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
|
||||||
@ -1248,7 +1246,7 @@ class ThumbnailsBox extends St.Widget {
|
|||||||
if (i == this._dropPlaceholderPos) {
|
if (i == this._dropPlaceholderPos) {
|
||||||
let [minHeight, placeholderHeight] = this._dropPlaceholder.get_preferred_height(-1);
|
let [minHeight, placeholderHeight] = this._dropPlaceholder.get_preferred_height(-1);
|
||||||
childBox.x1 = x1;
|
childBox.x1 = x1;
|
||||||
childBox.x2 = x1 + thumbnailWidth;
|
childBox.x2 = x2;
|
||||||
childBox.y1 = Math.round(y);
|
childBox.y1 = Math.round(y);
|
||||||
childBox.y2 = Math.round(y + placeholderHeight);
|
childBox.y2 = Math.round(y + placeholderHeight);
|
||||||
this._dropPlaceholder.allocate(childBox, flags);
|
this._dropPlaceholder.allocate(childBox, flags);
|
||||||
|
@ -246,7 +246,6 @@ var WorkspacesView = class extends WorkspacesViewBase {
|
|||||||
|
|
||||||
this.scrollAdjustment.upper = newNumWorkspaces;
|
this.scrollAdjustment.upper = newNumWorkspaces;
|
||||||
|
|
||||||
let needsUpdate = false;
|
|
||||||
for (let j = 0; j < newNumWorkspaces; j++) {
|
for (let j = 0; j < newNumWorkspaces; j++) {
|
||||||
let metaWorkspace = workspaceManager.get_workspace_by_index(j);
|
let metaWorkspace = workspaceManager.get_workspace_by_index(j);
|
||||||
let workspace;
|
let workspace;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user