Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or may be) used from other modules with 'var' to cut down on warnings. https://bugzilla.gnome.org/show_bug.cgi?id=785084
This commit is contained in:
parent
2582d16ca7
commit
033277b68f
2
HACKING
2
HACKING
@ -304,7 +304,7 @@ designed around setting properties, like Tweener. If you want to animate an
|
|||||||
arbitrary property, create a getter and setter, and use Tweener to animate the
|
arbitrary property, create a getter and setter, and use Tweener to animate the
|
||||||
property.
|
property.
|
||||||
|
|
||||||
const ANIMATION_TIME = 2000;
|
var ANIMATION_TIME = 2000;
|
||||||
|
|
||||||
var MyClass = new Lang.Class({
|
var MyClass = new Lang.Class({
|
||||||
Name: 'MyClass',
|
Name: 'MyClass',
|
||||||
|
@ -15,25 +15,25 @@ const ShellEntry = imports.ui.shellEntry;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const UserWidget = imports.ui.userWidget;
|
const UserWidget = imports.ui.userWidget;
|
||||||
|
|
||||||
const DEFAULT_BUTTON_WELL_ICON_SIZE = 16;
|
var DEFAULT_BUTTON_WELL_ICON_SIZE = 16;
|
||||||
const DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1.0;
|
var DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1.0;
|
||||||
const DEFAULT_BUTTON_WELL_ANIMATION_TIME = 0.3;
|
var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 0.3;
|
||||||
|
|
||||||
const MESSAGE_FADE_OUT_ANIMATION_TIME = 0.5;
|
var MESSAGE_FADE_OUT_ANIMATION_TIME = 0.5;
|
||||||
|
|
||||||
const AuthPromptMode = {
|
var AuthPromptMode = {
|
||||||
UNLOCK_ONLY: 0,
|
UNLOCK_ONLY: 0,
|
||||||
UNLOCK_OR_LOG_IN: 1
|
UNLOCK_OR_LOG_IN: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
const AuthPromptStatus = {
|
var AuthPromptStatus = {
|
||||||
NOT_VERIFYING: 0,
|
NOT_VERIFYING: 0,
|
||||||
VERIFYING: 1,
|
VERIFYING: 1,
|
||||||
VERIFICATION_FAILED: 2,
|
VERIFICATION_FAILED: 2,
|
||||||
VERIFICATION_SUCCEEDED: 3
|
VERIFICATION_SUCCEEDED: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
const BeginRequestType = {
|
var BeginRequestType = {
|
||||||
PROVIDE_USERNAME: 0,
|
PROVIDE_USERNAME: 0,
|
||||||
DONT_PROVIDE_USERNAME: 1
|
DONT_PROVIDE_USERNAME: 1
|
||||||
};
|
};
|
||||||
|
@ -21,8 +21,8 @@ const PASSWORD_SERVICE_NAME = 'gdm-password';
|
|||||||
const FINGERPRINT_SERVICE_NAME = 'gdm-fingerprint';
|
const FINGERPRINT_SERVICE_NAME = 'gdm-fingerprint';
|
||||||
const SMARTCARD_SERVICE_NAME = 'gdm-smartcard';
|
const SMARTCARD_SERVICE_NAME = 'gdm-smartcard';
|
||||||
const OVIRT_SERVICE_NAME = 'gdm-ovirtcred';
|
const OVIRT_SERVICE_NAME = 'gdm-ovirtcred';
|
||||||
const FADE_ANIMATION_TIME = 0.16;
|
var FADE_ANIMATION_TIME = 0.16;
|
||||||
const CLONE_FADE_ANIMATION_TIME = 0.25;
|
var CLONE_FADE_ANIMATION_TIME = 0.25;
|
||||||
|
|
||||||
const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
|
const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
|
||||||
const PASSWORD_AUTHENTICATION_KEY = 'enable-password-authentication';
|
const PASSWORD_AUTHENTICATION_KEY = 'enable-password-authentication';
|
||||||
@ -36,9 +36,9 @@ const LOGO_KEY = 'logo';
|
|||||||
const DISABLE_USER_LIST_KEY = 'disable-user-list';
|
const DISABLE_USER_LIST_KEY = 'disable-user-list';
|
||||||
|
|
||||||
// Give user 48ms to read each character of a PAM message
|
// Give user 48ms to read each character of a PAM message
|
||||||
const USER_READ_TIME = 48
|
var USER_READ_TIME = 48
|
||||||
|
|
||||||
const MessageType = {
|
var MessageType = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
ERROR: 1,
|
ERROR: 1,
|
||||||
INFO: 2,
|
INFO: 2,
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
/* The name of this package (not localized) */
|
/* The name of this package (not localized) */
|
||||||
const PACKAGE_NAME = '@PACKAGE_NAME@';
|
var PACKAGE_NAME = '@PACKAGE_NAME@';
|
||||||
/* The version of this package */
|
/* The version of this package */
|
||||||
const PACKAGE_VERSION = '@PACKAGE_VERSION@';
|
var PACKAGE_VERSION = '@PACKAGE_VERSION@';
|
||||||
/* 1 if gnome-bluetooth is available, 0 otherwise */
|
/* 1 if gnome-bluetooth is available, 0 otherwise */
|
||||||
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
|
var HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
|
||||||
/* 1 if networkmanager is available, 0 otherwise */
|
/* 1 if networkmanager is available, 0 otherwise */
|
||||||
const HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
|
var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
|
||||||
/* gettext package */
|
/* gettext package */
|
||||||
const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
|
var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
|
||||||
/* locale dir */
|
/* locale dir */
|
||||||
const LOCALEDIR = '@datadir@/locale';
|
var LOCALEDIR = '@datadir@/locale';
|
||||||
/* other standard directories */
|
/* other standard directories */
|
||||||
const LIBEXECDIR = '@libexecdir@';
|
var LIBEXECDIR = '@libexecdir@';
|
||||||
const SYSCONFDIR = '@sysconfdir@';
|
var SYSCONFDIR = '@sysconfdir@';
|
||||||
/* g-i package versions */
|
/* g-i package versions */
|
||||||
const LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
|
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
|
||||||
|
@ -11,13 +11,13 @@ const Gio = imports.gi.Gio;
|
|||||||
const Config = imports.misc.config;
|
const Config = imports.misc.config;
|
||||||
const FileUtils = imports.misc.fileUtils;
|
const FileUtils = imports.misc.fileUtils;
|
||||||
|
|
||||||
const ExtensionType = {
|
var ExtensionType = {
|
||||||
SYSTEM: 1,
|
SYSTEM: 1,
|
||||||
PER_USER: 2
|
PER_USER: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
// Maps uuid -> metadata object
|
// Maps uuid -> metadata object
|
||||||
const extensions = {};
|
var extensions = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getCurrentExtension:
|
* getCurrentExtension:
|
||||||
|
@ -16,7 +16,7 @@ const PresenceIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const PresenceStatus = {
|
var PresenceStatus = {
|
||||||
AVAILABLE: 0,
|
AVAILABLE: 0,
|
||||||
INVISIBLE: 1,
|
INVISIBLE: 1,
|
||||||
BUSY: 2,
|
BUSY: 2,
|
||||||
|
@ -5,7 +5,7 @@ const Signals = imports.signals;
|
|||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
const DEFAULT_LIMIT = 512;
|
var DEFAULT_LIMIT = 512;
|
||||||
|
|
||||||
var HistoryManager = new Lang.Class({
|
var HistoryManager = new Lang.Class({
|
||||||
Name: 'HistoryManager',
|
Name: 'HistoryManager',
|
||||||
|
@ -7,9 +7,9 @@ const Meta = imports.gi.Meta;
|
|||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const DEFAULT_LOCALE = 'en_US';
|
var DEFAULT_LOCALE = 'en_US';
|
||||||
const DEFAULT_LAYOUT = 'us';
|
var DEFAULT_LAYOUT = 'us';
|
||||||
const DEFAULT_VARIANT = '';
|
var DEFAULT_VARIANT = '';
|
||||||
|
|
||||||
let _xkbInfo = null;
|
let _xkbInfo = null;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ const Main = imports.ui.main;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
const SCROLL_TIME = 0.1;
|
var SCROLL_TIME = 0.1;
|
||||||
|
|
||||||
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||||
const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)';
|
const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)';
|
||||||
|
@ -11,7 +11,7 @@ const PermissionStore = imports.misc.permissionStore;
|
|||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
// Minimum time between updates to show loading indication
|
// Minimum time between updates to show loading indication
|
||||||
const UPDATE_THRESHOLD = 10 * GLib.TIME_SPAN_MINUTE;
|
var UPDATE_THRESHOLD = 10 * GLib.TIME_SPAN_MINUTE;
|
||||||
|
|
||||||
var WeatherClient = new Lang.Class({
|
var WeatherClient = new Lang.Class({
|
||||||
Name: 'WeatherClient',
|
Name: 'WeatherClient',
|
||||||
|
@ -32,7 +32,7 @@ const AccessIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const DialogResponse = {
|
var DialogResponse = {
|
||||||
OK: 0,
|
OK: 0,
|
||||||
CANCEL: 1,
|
CANCEL: 1,
|
||||||
CLOSED: 2
|
CLOSED: 2
|
||||||
|
@ -14,19 +14,19 @@ const Main = imports.ui.main;
|
|||||||
const SwitcherPopup = imports.ui.switcherPopup;
|
const SwitcherPopup = imports.ui.switcherPopup;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const APP_ICON_HOVER_TIMEOUT = 200; // milliseconds
|
var APP_ICON_HOVER_TIMEOUT = 200; // milliseconds
|
||||||
|
|
||||||
const THUMBNAIL_DEFAULT_SIZE = 256;
|
var THUMBNAIL_DEFAULT_SIZE = 256;
|
||||||
const THUMBNAIL_POPUP_TIME = 500; // milliseconds
|
var THUMBNAIL_POPUP_TIME = 500; // milliseconds
|
||||||
const THUMBNAIL_FADE_TIME = 0.1; // seconds
|
var THUMBNAIL_FADE_TIME = 0.1; // seconds
|
||||||
|
|
||||||
const WINDOW_PREVIEW_SIZE = 128;
|
var WINDOW_PREVIEW_SIZE = 128;
|
||||||
const APP_ICON_SIZE = 96;
|
var APP_ICON_SIZE = 96;
|
||||||
const APP_ICON_SIZE_SMALL = 48;
|
var APP_ICON_SIZE_SMALL = 48;
|
||||||
|
|
||||||
const baseIconSizes = [96, 64, 48, 32, 22];
|
const baseIconSizes = [96, 64, 48, 32, 22];
|
||||||
|
|
||||||
const AppIconMode = {
|
var AppIconMode = {
|
||||||
THUMBNAIL_ONLY: 1,
|
THUMBNAIL_ONLY: 1,
|
||||||
APP_ICON_ONLY: 2,
|
APP_ICON_ONLY: 2,
|
||||||
BOTH: 3,
|
BOTH: 3,
|
||||||
|
@ -7,7 +7,7 @@ const St = imports.gi.St;
|
|||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Atk = imports.gi.Atk;
|
const Atk = imports.gi.Atk;
|
||||||
|
|
||||||
const ANIMATED_ICON_UPDATE_TIMEOUT = 16;
|
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
|
||||||
|
|
||||||
var Animation = new Lang.Class({
|
var Animation = new Lang.Class({
|
||||||
Name: 'Animation',
|
Name: 'Animation',
|
||||||
|
@ -27,38 +27,38 @@ const Workspace = imports.ui.workspace;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
const MAX_APPLICATION_WORK_MILLIS = 75;
|
var MAX_APPLICATION_WORK_MILLIS = 75;
|
||||||
const MENU_POPUP_TIMEOUT = 600;
|
var MENU_POPUP_TIMEOUT = 600;
|
||||||
const MAX_COLUMNS = 6;
|
var MAX_COLUMNS = 6;
|
||||||
const MIN_COLUMNS = 4;
|
var MIN_COLUMNS = 4;
|
||||||
const MIN_ROWS = 4;
|
var MIN_ROWS = 4;
|
||||||
|
|
||||||
const INACTIVE_GRID_OPACITY = 77;
|
var INACTIVE_GRID_OPACITY = 77;
|
||||||
// This time needs to be less than IconGrid.EXTRA_SPACE_ANIMATION_TIME
|
// This time needs to be less than IconGrid.EXTRA_SPACE_ANIMATION_TIME
|
||||||
// to not clash with other animations
|
// to not clash with other animations
|
||||||
const INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.24;
|
var INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.24;
|
||||||
const FOLDER_SUBICON_FRACTION = .4;
|
var FOLDER_SUBICON_FRACTION = .4;
|
||||||
|
|
||||||
const MIN_FREQUENT_APPS_COUNT = 3;
|
var MIN_FREQUENT_APPS_COUNT = 3;
|
||||||
|
|
||||||
const INDICATORS_BASE_TIME = 0.25;
|
var INDICATORS_BASE_TIME = 0.25;
|
||||||
const INDICATORS_ANIMATION_DELAY = 0.125;
|
var INDICATORS_ANIMATION_DELAY = 0.125;
|
||||||
const INDICATORS_ANIMATION_MAX_TIME = 0.75;
|
var INDICATORS_ANIMATION_MAX_TIME = 0.75;
|
||||||
|
|
||||||
const VIEWS_SWITCH_TIME = 0.4;
|
var VIEWS_SWITCH_TIME = 0.4;
|
||||||
const 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
|
// Follow iconGrid animations approach and divide by 2 to animate out to
|
||||||
// not annoy the user when the user wants to quit appDisplay.
|
// not annoy the user when the user wants to quit appDisplay.
|
||||||
// Also, make sure we don't exceed iconGrid animation total time or
|
// Also, make sure we don't exceed iconGrid animation total time or
|
||||||
// views switch time.
|
// views switch time.
|
||||||
const INDICATORS_BASE_TIME_OUT = 0.125;
|
var INDICATORS_BASE_TIME_OUT = 0.125;
|
||||||
const INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
|
var INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
|
||||||
const INDICATORS_ANIMATION_MAX_TIME_OUT =
|
var INDICATORS_ANIMATION_MAX_TIME_OUT =
|
||||||
Math.min (VIEWS_SWITCH_TIME,
|
Math.min (VIEWS_SWITCH_TIME,
|
||||||
IconGrid.ANIMATION_TIME_OUT + IconGrid.ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
|
IconGrid.ANIMATION_TIME_OUT + IconGrid.ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
|
||||||
|
|
||||||
const 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';
|
||||||
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
|
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
|
||||||
@ -873,7 +873,7 @@ var FrequentView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Views = {
|
var Views = {
|
||||||
FREQUENT: 0,
|
FREQUENT: 0,
|
||||||
ALL: 1
|
ALL: 1
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,7 @@ const St = imports.gi.St;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
|
|
||||||
const AudioDevice = {
|
var AudioDevice = {
|
||||||
HEADPHONES: 1 << 0,
|
HEADPHONES: 1 << 0,
|
||||||
HEADSET: 1 << 1,
|
HEADSET: 1 << 1,
|
||||||
MICROPHONE: 1 << 2
|
MICROPHONE: 1 << 2
|
||||||
|
@ -107,7 +107,7 @@ const Main = imports.ui.main;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
||||||
|
|
||||||
const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
|
const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
|
||||||
const PRIMARY_COLOR_KEY = 'primary-color';
|
const PRIMARY_COLOR_KEY = 'primary-color';
|
||||||
@ -117,14 +117,14 @@ const BACKGROUND_STYLE_KEY = 'picture-options';
|
|||||||
const PICTURE_OPACITY_KEY = 'picture-opacity';
|
const PICTURE_OPACITY_KEY = 'picture-opacity';
|
||||||
const PICTURE_URI_KEY = 'picture-uri';
|
const PICTURE_URI_KEY = 'picture-uri';
|
||||||
|
|
||||||
const FADE_ANIMATION_TIME = 1.0;
|
var FADE_ANIMATION_TIME = 1.0;
|
||||||
|
|
||||||
// These parameters affect how often we redraw.
|
// These parameters affect how often we redraw.
|
||||||
// The first is how different (percent crossfaded) the slide show
|
// The first is how different (percent crossfaded) the slide show
|
||||||
// has to look before redrawing and the second is the minimum
|
// has to look before redrawing and the second is the minimum
|
||||||
// frequency (in seconds) we're willing to wake up
|
// frequency (in seconds) we're willing to wake up
|
||||||
const ANIMATION_OPACITY_STEP_INCREMENT = 4.0;
|
var ANIMATION_OPACITY_STEP_INCREMENT = 4.0;
|
||||||
const ANIMATION_MIN_WAKEUP_INTERVAL = 1.0;
|
var ANIMATION_MIN_WAKEUP_INTERVAL = 1.0;
|
||||||
|
|
||||||
let _backgroundCache = null;
|
let _backgroundCache = null;
|
||||||
|
|
||||||
|
@ -10,14 +10,14 @@ const St = imports.gi.St;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const PopupAnimation = {
|
var PopupAnimation = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
SLIDE: 1 << 0,
|
SLIDE: 1 << 0,
|
||||||
FADE: 1 << 1,
|
FADE: 1 << 1,
|
||||||
FULL: ~0,
|
FULL: ~0,
|
||||||
};
|
};
|
||||||
|
|
||||||
const POPUP_ANIMATION_TIME = 0.15;
|
var POPUP_ANIMATION_TIME = 0.15;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BoxPointer:
|
* BoxPointer:
|
||||||
|
@ -16,15 +16,15 @@ const MessageTray = imports.ui.messageTray;
|
|||||||
const Mpris = imports.ui.mpris;
|
const Mpris = imports.ui.mpris;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
const MSECS_IN_DAY = 24 * 60 * 60 * 1000;
|
var MSECS_IN_DAY = 24 * 60 * 60 * 1000;
|
||||||
const SHOW_WEEKDATE_KEY = 'show-weekdate';
|
var SHOW_WEEKDATE_KEY = 'show-weekdate';
|
||||||
const ELLIPSIS_CHAR = '\u2026';
|
var ELLIPSIS_CHAR = '\u2026';
|
||||||
|
|
||||||
const MESSAGE_ICON_SIZE = 16;
|
var MESSAGE_ICON_SIZE = 16;
|
||||||
|
|
||||||
// alias to prevent xgettext from picking up strings translated in GTK+
|
// alias to prevent xgettext from picking up strings translated in GTK+
|
||||||
const gtk30_ = Gettext_gtk30.gettext;
|
const gtk30_ = Gettext_gtk30.gettext;
|
||||||
const NC_ = function(context, str) { return context + '\u0004' + str; };
|
var NC_ = function(context, str) { return context + '\u0004' + str; };
|
||||||
|
|
||||||
function sameYear(dateA, dateB) {
|
function sameYear(dateA, dateB) {
|
||||||
return (dateA.getYear() == dateB.getYear());
|
return (dateA.getYear() == dateB.getYear());
|
||||||
|
@ -11,8 +11,8 @@ const Dialog = imports.ui.dialog;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const FROZEN_WINDOW_BRIGHTNESS = -0.3
|
var FROZEN_WINDOW_BRIGHTNESS = -0.3
|
||||||
const DIALOG_TRANSITION_TIME = 0.15
|
var DIALOG_TRANSITION_TIME = 0.15
|
||||||
|
|
||||||
var CloseDialog = new Lang.Class({
|
var CloseDialog = new Lang.Class({
|
||||||
Name: 'CloseDialog',
|
Name: 'CloseDialog',
|
||||||
|
@ -11,13 +11,13 @@ const GnomeSession = imports.misc.gnomeSession;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const ShellMountOperation = imports.ui.shellMountOperation;
|
const ShellMountOperation = imports.ui.shellMountOperation;
|
||||||
|
|
||||||
const GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
|
var GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
|
||||||
|
|
||||||
// GSettings keys
|
// GSettings keys
|
||||||
const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';
|
const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';
|
||||||
const SETTING_ENABLE_AUTOMOUNT = 'automount';
|
const SETTING_ENABLE_AUTOMOUNT = 'automount';
|
||||||
|
|
||||||
const AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
|
var AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
|
||||||
|
|
||||||
var AutomountManager = new Lang.Class({
|
var AutomountManager = new Lang.Class({
|
||||||
Name: 'AutomountManager',
|
Name: 'AutomountManager',
|
||||||
@ -242,4 +242,4 @@ var AutomountManager = new Lang.Class({
|
|||||||
GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
|
GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const Component = AutomountManager;
|
var Component = AutomountManager;
|
||||||
|
@ -15,7 +15,7 @@ const SETTING_START_APP = 'autorun-x-content-start-app';
|
|||||||
const SETTING_IGNORE = 'autorun-x-content-ignore';
|
const SETTING_IGNORE = 'autorun-x-content-ignore';
|
||||||
const SETTING_OPEN_FOLDER = 'autorun-x-content-open-folder';
|
const SETTING_OPEN_FOLDER = 'autorun-x-content-open-folder';
|
||||||
|
|
||||||
const AutorunSetting = {
|
var AutorunSetting = {
|
||||||
RUN: 0,
|
RUN: 0,
|
||||||
IGNORE: 1,
|
IGNORE: 1,
|
||||||
FILES: 2,
|
FILES: 2,
|
||||||
@ -378,4 +378,4 @@ var AutorunNotification = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = AutorunManager;
|
var Component = AutorunManager;
|
||||||
|
@ -16,9 +16,9 @@ const ShellEntry = imports.ui.shellEntry;
|
|||||||
const CheckBox = imports.ui.checkBox;
|
const CheckBox = imports.ui.checkBox;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const WORK_SPINNER_ICON_SIZE = 16;
|
var WORK_SPINNER_ICON_SIZE = 16;
|
||||||
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
var WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||||
const WORK_SPINNER_ANIMATION_TIME = 0.3;
|
var WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||||
|
|
||||||
var KeyringDialog = new Lang.Class({
|
var KeyringDialog = new Lang.Class({
|
||||||
Name: 'KeyringDialog',
|
Name: 'KeyringDialog',
|
||||||
@ -311,4 +311,4 @@ var KeyringPrompter = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = KeyringPrompter;
|
var Component = KeyringPrompter;
|
||||||
|
@ -798,4 +798,4 @@ var NetworkAgent = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const Component = NetworkAgent;
|
var Component = NetworkAgent;
|
||||||
|
@ -21,11 +21,11 @@ const ShellEntry = imports.ui.shellEntry;
|
|||||||
const UserWidget = imports.ui.userWidget;
|
const UserWidget = imports.ui.userWidget;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const DIALOG_ICON_SIZE = 48;
|
var DIALOG_ICON_SIZE = 48;
|
||||||
|
|
||||||
const WORK_SPINNER_ICON_SIZE = 16;
|
var WORK_SPINNER_ICON_SIZE = 16;
|
||||||
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
var WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||||
const WORK_SPINNER_ANIMATION_TIME = 0.3;
|
var WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||||
|
|
||||||
var AuthenticationDialog = new Lang.Class({
|
var AuthenticationDialog = new Lang.Class({
|
||||||
Name: 'AuthenticationDialog',
|
Name: 'AuthenticationDialog',
|
||||||
@ -400,4 +400,4 @@ var AuthenticationAgent = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = AuthenticationAgent;
|
var Component = AuthenticationAgent;
|
||||||
|
@ -29,25 +29,25 @@ const Util = imports.misc.util;
|
|||||||
const HAVE_TP = (Tp != null && Tpl != null);
|
const HAVE_TP = (Tp != null && Tpl != null);
|
||||||
|
|
||||||
// See Notification.appendMessage
|
// See Notification.appendMessage
|
||||||
const SCROLLBACK_IMMEDIATE_TIME = 3 * 60; // 3 minutes
|
var SCROLLBACK_IMMEDIATE_TIME = 3 * 60; // 3 minutes
|
||||||
const SCROLLBACK_RECENT_TIME = 15 * 60; // 15 minutes
|
var SCROLLBACK_RECENT_TIME = 15 * 60; // 15 minutes
|
||||||
const SCROLLBACK_RECENT_LENGTH = 20;
|
var SCROLLBACK_RECENT_LENGTH = 20;
|
||||||
const SCROLLBACK_IDLE_LENGTH = 5;
|
var SCROLLBACK_IDLE_LENGTH = 5;
|
||||||
|
|
||||||
// See Source._displayPendingMessages
|
// See Source._displayPendingMessages
|
||||||
const SCROLLBACK_HISTORY_LINES = 10;
|
var SCROLLBACK_HISTORY_LINES = 10;
|
||||||
|
|
||||||
// See Notification._onEntryChanged
|
// See Notification._onEntryChanged
|
||||||
const COMPOSING_STOP_TIMEOUT = 5;
|
var COMPOSING_STOP_TIMEOUT = 5;
|
||||||
|
|
||||||
const CHAT_EXPAND_LINES = 12;
|
var CHAT_EXPAND_LINES = 12;
|
||||||
|
|
||||||
const NotificationDirection = {
|
var NotificationDirection = {
|
||||||
SENT: 'chat-sent',
|
SENT: 'chat-sent',
|
||||||
RECEIVED: 'chat-received'
|
RECEIVED: 'chat-received'
|
||||||
};
|
};
|
||||||
|
|
||||||
const N_ = function(s) { return s; };
|
var N_ = function(s) { return s; };
|
||||||
|
|
||||||
function makeMessageFromTpMessage(tpMessage, direction) {
|
function makeMessageFromTpMessage(tpMessage, direction) {
|
||||||
let [text, flags] = tpMessage.to_text();
|
let [text, flags] = tpMessage.to_text();
|
||||||
@ -996,4 +996,4 @@ var ChatNotificationBanner = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = TelepathyComponent;
|
var Component = TelepathyComponent;
|
||||||
|
@ -12,10 +12,10 @@ const SwitcherPopup = imports.ui.switcherPopup;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const POPUP_APPICON_SIZE = 96;
|
var POPUP_APPICON_SIZE = 96;
|
||||||
const POPUP_FADE_TIME = 0.1; // seconds
|
var POPUP_FADE_TIME = 0.1; // seconds
|
||||||
|
|
||||||
const SortGroup = {
|
var SortGroup = {
|
||||||
TOP: 0,
|
TOP: 0,
|
||||||
MIDDLE: 1,
|
MIDDLE: 1,
|
||||||
BOTTOM: 2
|
BOTTOM: 2
|
||||||
|
@ -18,10 +18,10 @@ const Main = imports.ui.main;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Workspace = imports.ui.workspace;
|
const Workspace = imports.ui.workspace;
|
||||||
|
|
||||||
const DASH_ANIMATION_TIME = 0.2;
|
var DASH_ANIMATION_TIME = 0.2;
|
||||||
const DASH_ITEM_LABEL_SHOW_TIME = 0.15;
|
var DASH_ITEM_LABEL_SHOW_TIME = 0.15;
|
||||||
const DASH_ITEM_LABEL_HIDE_TIME = 0.1;
|
var DASH_ITEM_LABEL_HIDE_TIME = 0.1;
|
||||||
const DASH_ITEM_HOVER_TIMEOUT = 300;
|
var DASH_ITEM_HOVER_TIMEOUT = 300;
|
||||||
|
|
||||||
function getAppFromSource(source) {
|
function getAppFromSource(source) {
|
||||||
if (source instanceof AppDisplay.AppIcon) {
|
if (source instanceof AppDisplay.AppIcon) {
|
||||||
|
12
js/ui/dnd.js
12
js/ui/dnd.js
@ -14,26 +14,26 @@ const Main = imports.ui.main;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
// Time to scale down to maxDragActorSize
|
// Time to scale down to maxDragActorSize
|
||||||
const SCALE_ANIMATION_TIME = 0.25;
|
var SCALE_ANIMATION_TIME = 0.25;
|
||||||
// Time to animate to original position on cancel
|
// Time to animate to original position on cancel
|
||||||
const SNAP_BACK_ANIMATION_TIME = 0.25;
|
var SNAP_BACK_ANIMATION_TIME = 0.25;
|
||||||
// Time to animate to original position on success
|
// Time to animate to original position on success
|
||||||
const REVERT_ANIMATION_TIME = 0.75;
|
var REVERT_ANIMATION_TIME = 0.75;
|
||||||
|
|
||||||
const DragMotionResult = {
|
var DragMotionResult = {
|
||||||
NO_DROP: 0,
|
NO_DROP: 0,
|
||||||
COPY_DROP: 1,
|
COPY_DROP: 1,
|
||||||
MOVE_DROP: 2,
|
MOVE_DROP: 2,
|
||||||
CONTINUE: 3
|
CONTINUE: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
const DRAG_CURSOR_MAP = {
|
var DRAG_CURSOR_MAP = {
|
||||||
0: Meta.Cursor.DND_UNSUPPORTED_TARGET,
|
0: Meta.Cursor.DND_UNSUPPORTED_TARGET,
|
||||||
1: Meta.Cursor.DND_COPY,
|
1: Meta.Cursor.DND_COPY,
|
||||||
2: Meta.Cursor.DND_MOVE
|
2: Meta.Cursor.DND_MOVE
|
||||||
};
|
};
|
||||||
|
|
||||||
const DragDropResult = {
|
var DragDropResult = {
|
||||||
FAILURE: 0,
|
FAILURE: 0,
|
||||||
SUCCESS: 1,
|
SUCCESS: 1,
|
||||||
CONTINUE: 2
|
CONTINUE: 2
|
||||||
|
@ -8,8 +8,8 @@ const St = imports.gi.St;
|
|||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const EDGE_THRESHOLD = 20;
|
var EDGE_THRESHOLD = 20;
|
||||||
const DRAG_DISTANCE = 80;
|
var DRAG_DISTANCE = 80;
|
||||||
|
|
||||||
var EdgeDragAction = new Lang.Class({
|
var EdgeDragAction = new Lang.Class({
|
||||||
Name: 'EdgeDragAction',
|
Name: 'EdgeDragAction',
|
||||||
|
@ -41,7 +41,7 @@ let _endSessionDialog = null;
|
|||||||
const _ITEM_ICON_SIZE = 48;
|
const _ITEM_ICON_SIZE = 48;
|
||||||
const _DIALOG_ICON_SIZE = 48;
|
const _DIALOG_ICON_SIZE = 48;
|
||||||
|
|
||||||
const GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
|
var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
|
||||||
|
|
||||||
const EndSessionDialogIface = '<node> \
|
const EndSessionDialogIface = '<node> \
|
||||||
<interface name="org.gnome.SessionManager.EndSessionDialog"> \
|
<interface name="org.gnome.SessionManager.EndSessionDialog"> \
|
||||||
@ -166,7 +166,7 @@ const DialogContent = {
|
|||||||
4 /* DialogType.UPGRADE_RESTART */: restartUpgradeDialogContent
|
4 /* DialogType.UPGRADE_RESTART */: restartUpgradeDialogContent
|
||||||
};
|
};
|
||||||
|
|
||||||
const MAX_USERS_IN_SESSION_DIALOG = 5;
|
var MAX_USERS_IN_SESSION_DIALOG = 5;
|
||||||
|
|
||||||
const LogindSessionIface = '<node> \
|
const LogindSessionIface = '<node> \
|
||||||
<interface name="org.freedesktop.login1.Session"> \
|
<interface name="org.freedesktop.login1.Session"> \
|
||||||
|
@ -17,10 +17,10 @@ const ModalDialog = imports.ui.modalDialog;
|
|||||||
|
|
||||||
const _signals = ExtensionSystem._signals;
|
const _signals = ExtensionSystem._signals;
|
||||||
|
|
||||||
const REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
|
var REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
|
||||||
const 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';
|
||||||
const REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
|
var REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
|
||||||
const REPOSITORY_URL_UPDATE = REPOSITORY_URL_BASE + '/update-info/';
|
var REPOSITORY_URL_UPDATE = REPOSITORY_URL_BASE + '/update-info/';
|
||||||
|
|
||||||
let _httpSession;
|
let _httpSession;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ const St = imports.gi.St;
|
|||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const ExtensionState = {
|
var ExtensionState = {
|
||||||
ENABLED: 1,
|
ENABLED: 1,
|
||||||
DISABLED: 2,
|
DISABLED: 2,
|
||||||
ERROR: 3,
|
ERROR: 3,
|
||||||
@ -26,7 +26,7 @@ const ExtensionState = {
|
|||||||
// Arrays of uuids
|
// Arrays of uuids
|
||||||
var enabledExtensions;
|
var enabledExtensions;
|
||||||
// Contains the order that extensions were enabled in.
|
// Contains the order that extensions were enabled in.
|
||||||
const extensionOrder = [];
|
var extensionOrder = [];
|
||||||
|
|
||||||
// We don't really have a class to add signals on. So, create
|
// We don't really have a class to add signals on. So, create
|
||||||
// a simple dummy object, add the signal methods, and export those
|
// a simple dummy object, add the signal methods, and export those
|
||||||
@ -34,8 +34,8 @@ const extensionOrder = [];
|
|||||||
var _signals = {};
|
var _signals = {};
|
||||||
Signals.addSignalMethods(_signals);
|
Signals.addSignalMethods(_signals);
|
||||||
|
|
||||||
const connect = Lang.bind(_signals, _signals.connect);
|
var connect = Lang.bind(_signals, _signals.connect);
|
||||||
const disconnect = Lang.bind(_signals, _signals.disconnect);
|
var disconnect = Lang.bind(_signals, _signals.disconnect);
|
||||||
|
|
||||||
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
|
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
|
||||||
const DISABLE_USER_EXTENSIONS_KEY = 'disable-user-extensions';
|
const DISABLE_USER_EXTENSIONS_KEY = 'disable-user-extensions';
|
||||||
|
@ -9,10 +9,10 @@ const St = imports.gi.St;
|
|||||||
const BoxPointer = imports.ui.boxpointer;
|
const BoxPointer = imports.ui.boxpointer;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const MAX_CANDIDATES_PER_PAGE = 16;
|
var MAX_CANDIDATES_PER_PAGE = 16;
|
||||||
|
|
||||||
const DEFAULT_INDEX_LABELS = [ '1', '2', '3', '4', '5', '6', '7', '8',
|
var DEFAULT_INDEX_LABELS = [ '1', '2', '3', '4', '5', '6', '7', '8',
|
||||||
'9', '0', 'a', 'b', 'c', 'd', 'e', 'f' ];
|
'9', '0', 'a', 'b', 'c', 'd', 'e', 'f' ];
|
||||||
|
|
||||||
var CandidateArea = new Lang.Class({
|
var CandidateArea = new Lang.Class({
|
||||||
Name: 'CandidateArea',
|
Name: 'CandidateArea',
|
||||||
|
@ -12,27 +12,27 @@ const Params = imports.misc.params;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const ICON_SIZE = 96;
|
var ICON_SIZE = 96;
|
||||||
const MIN_ICON_SIZE = 16;
|
var MIN_ICON_SIZE = 16;
|
||||||
|
|
||||||
const EXTRA_SPACE_ANIMATION_TIME = 0.25;
|
var EXTRA_SPACE_ANIMATION_TIME = 0.25;
|
||||||
|
|
||||||
const ANIMATION_TIME_IN = 0.350;
|
var ANIMATION_TIME_IN = 0.350;
|
||||||
const ANIMATION_TIME_OUT = 1/2 * ANIMATION_TIME_IN;
|
var ANIMATION_TIME_OUT = 1/2 * ANIMATION_TIME_IN;
|
||||||
const ANIMATION_MAX_DELAY_FOR_ITEM = 2/3 * ANIMATION_TIME_IN;
|
var ANIMATION_MAX_DELAY_FOR_ITEM = 2/3 * ANIMATION_TIME_IN;
|
||||||
const ANIMATION_BASE_DELAY_FOR_ITEM = 1/4 * ANIMATION_MAX_DELAY_FOR_ITEM;
|
var ANIMATION_BASE_DELAY_FOR_ITEM = 1/4 * ANIMATION_MAX_DELAY_FOR_ITEM;
|
||||||
const ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2/3 * ANIMATION_TIME_OUT;
|
var ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2/3 * ANIMATION_TIME_OUT;
|
||||||
const ANIMATION_FADE_IN_TIME_FOR_ITEM = 1/4 * ANIMATION_TIME_IN;
|
var ANIMATION_FADE_IN_TIME_FOR_ITEM = 1/4 * ANIMATION_TIME_IN;
|
||||||
|
|
||||||
const ANIMATION_BOUNCE_ICON_SCALE = 1.1;
|
var ANIMATION_BOUNCE_ICON_SCALE = 1.1;
|
||||||
|
|
||||||
const AnimationDirection = {
|
var AnimationDirection = {
|
||||||
IN: 0,
|
IN: 0,
|
||||||
OUT: 1
|
OUT: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
const APPICON_ANIMATION_OUT_SCALE = 3;
|
var APPICON_ANIMATION_OUT_SCALE = 3;
|
||||||
const APPICON_ANIMATION_OUT_TIME = 0.25;
|
var APPICON_ANIMATION_OUT_TIME = 0.25;
|
||||||
|
|
||||||
var BaseIcon = new Lang.Class({
|
var BaseIcon = new Lang.Class({
|
||||||
Name: 'BaseIcon',
|
Name: 'BaseIcon',
|
||||||
|
@ -19,7 +19,7 @@ const Layout = imports.ui.layout;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const MessageTray = imports.ui.messageTray;
|
const MessageTray = imports.ui.messageTray;
|
||||||
|
|
||||||
const KEYBOARD_REST_TIME = Layout.KEYBOARD_ANIMATION_TIME * 2 * 1000;
|
var KEYBOARD_REST_TIME = Layout.KEYBOARD_ANIMATION_TIME * 2 * 1000;
|
||||||
|
|
||||||
const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
|
const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
|
||||||
const KEYBOARD_TYPE = 'keyboard-type';
|
const KEYBOARD_TYPE = 'keyboard-type';
|
||||||
|
@ -18,12 +18,12 @@ const Main = imports.ui.main;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const STARTUP_ANIMATION_TIME = 0.5;
|
var STARTUP_ANIMATION_TIME = 0.5;
|
||||||
const KEYBOARD_ANIMATION_TIME = 0.15;
|
var KEYBOARD_ANIMATION_TIME = 0.15;
|
||||||
const BACKGROUND_FADE_ANIMATION_TIME = 1.0;
|
var BACKGROUND_FADE_ANIMATION_TIME = 1.0;
|
||||||
|
|
||||||
const HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
|
var HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
|
||||||
const HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
|
var HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
|
||||||
|
|
||||||
function isPopupMetaWindow(actor) {
|
function isPopupMetaWindow(actor) {
|
||||||
switch(actor.meta_window.get_window_type()) {
|
switch(actor.meta_window.get_window_type()) {
|
||||||
|
@ -13,7 +13,7 @@ const Overview = imports.ui.overview;
|
|||||||
const OverviewControls = imports.ui.overviewControls;
|
const OverviewControls = imports.ui.overviewControls;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
|
var STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
|
||||||
'bluetooth-applet': 'bluetooth',
|
'bluetooth-applet': 'bluetooth',
|
||||||
'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet
|
'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet
|
||||||
// when moved to control center
|
// when moved to control center
|
||||||
@ -29,12 +29,12 @@ const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Offset of the original position from the bottom-right corner
|
// Offset of the original position from the bottom-right corner
|
||||||
const CONCEALED_WIDTH = 3;
|
var CONCEALED_WIDTH = 3;
|
||||||
const REVEAL_ANIMATION_TIME = 0.2;
|
var REVEAL_ANIMATION_TIME = 0.2;
|
||||||
const TEMP_REVEAL_TIME = 2;
|
var TEMP_REVEAL_TIME = 2;
|
||||||
|
|
||||||
const BARRIER_THRESHOLD = 70;
|
var BARRIER_THRESHOLD = 70;
|
||||||
const BARRIER_TIMEOUT = 1000;
|
var BARRIER_TIMEOUT = 1000;
|
||||||
|
|
||||||
var LegacyTray = new Lang.Class({
|
var LegacyTray = new Lang.Class({
|
||||||
Name: 'LegacyTray',
|
Name: 'LegacyTray',
|
||||||
|
@ -10,9 +10,9 @@ const Shell = imports.gi.Shell;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const DEFAULT_FADE_FACTOR = 0.4;
|
var DEFAULT_FADE_FACTOR = 0.4;
|
||||||
const VIGNETTE_BRIGHTNESS = 0.8;
|
var VIGNETTE_BRIGHTNESS = 0.8;
|
||||||
const VIGNETTE_SHARPNESS = 0.7;
|
var VIGNETTE_SHARPNESS = 0.7;
|
||||||
|
|
||||||
const VIGNETTE_DECLARATIONS = '\
|
const VIGNETTE_DECLARATIONS = '\
|
||||||
uniform float brightness;\n\
|
uniform float brightness;\n\
|
||||||
|
@ -46,9 +46,9 @@ var commandHeader = 'const Clutter = imports.gi.Clutter; ' +
|
|||||||
|
|
||||||
const HISTORY_KEY = 'looking-glass-history';
|
const HISTORY_KEY = 'looking-glass-history';
|
||||||
// Time between tabs for them to count as a double-tab event
|
// Time between tabs for them to count as a double-tab event
|
||||||
const AUTO_COMPLETE_DOUBLE_TAB_DELAY = 500;
|
var AUTO_COMPLETE_DOUBLE_TAB_DELAY = 500;
|
||||||
const AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION = 0.2;
|
var AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION = 0.2;
|
||||||
const AUTO_COMPLETE_GLOBAL_KEYWORDS = _getAutoCompleteGlobalKeywords();
|
var AUTO_COMPLETE_GLOBAL_KEYWORDS = _getAutoCompleteGlobalKeywords();
|
||||||
|
|
||||||
function _getAutoCompleteGlobalKeywords() {
|
function _getAutoCompleteGlobalKeywords() {
|
||||||
const keywords = ['true', 'false', 'null', 'new'];
|
const keywords = ['true', 'false', 'null', 'new'];
|
||||||
|
@ -19,11 +19,11 @@ const MagnifierDBus = imports.ui.magnifierDBus;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const PointerWatcher = imports.ui.pointerWatcher;
|
const PointerWatcher = imports.ui.pointerWatcher;
|
||||||
|
|
||||||
const MOUSE_POLL_FREQUENCY = 50;
|
var MOUSE_POLL_FREQUENCY = 50;
|
||||||
const CROSSHAIRS_CLIP_SIZE = [100, 100];
|
var CROSSHAIRS_CLIP_SIZE = [100, 100];
|
||||||
const NO_CHANGE = 0.0;
|
var NO_CHANGE = 0.0;
|
||||||
|
|
||||||
const POINTER_REST_TIME = 1000; // milliseconds
|
var POINTER_REST_TIME = 1000; // milliseconds
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
||||||
|
@ -552,7 +552,7 @@ function activateWindow(window, time, workspaceNum) {
|
|||||||
|
|
||||||
// TODO - replace this timeout with some system to guess when the user might
|
// TODO - replace this timeout with some system to guess when the user might
|
||||||
// be e.g. just reading the screen and not likely to interact.
|
// be e.g. just reading the screen and not likely to interact.
|
||||||
const DEFERRED_TIMEOUT_SECONDS = 20;
|
var DEFERRED_TIMEOUT_SECONDS = 20;
|
||||||
var _deferredWorkData = {};
|
var _deferredWorkData = {};
|
||||||
// Work scheduled for some point in the future
|
// Work scheduled for some point in the future
|
||||||
var _deferredWorkQueue = [];
|
var _deferredWorkQueue = [];
|
||||||
|
@ -15,9 +15,9 @@ const Calendar = imports.ui.calendar;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
const MESSAGE_ANIMATION_TIME = 0.1;
|
var MESSAGE_ANIMATION_TIME = 0.1;
|
||||||
|
|
||||||
const DEFAULT_EXPAND_LINES = 6;
|
var DEFAULT_EXPAND_LINES = 6;
|
||||||
|
|
||||||
function _fixMarkup(text, allowMarkup) {
|
function _fixMarkup(text, allowMarkup) {
|
||||||
if (allowMarkup) {
|
if (allowMarkup) {
|
||||||
|
@ -24,23 +24,23 @@ const Util = imports.misc.util;
|
|||||||
|
|
||||||
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||||
|
|
||||||
const ANIMATION_TIME = 0.2;
|
var ANIMATION_TIME = 0.2;
|
||||||
const NOTIFICATION_TIMEOUT = 4;
|
var NOTIFICATION_TIMEOUT = 4;
|
||||||
|
|
||||||
const HIDE_TIMEOUT = 0.2;
|
var HIDE_TIMEOUT = 0.2;
|
||||||
const LONGER_HIDE_TIMEOUT = 0.6;
|
var LONGER_HIDE_TIMEOUT = 0.6;
|
||||||
|
|
||||||
const MAX_NOTIFICATIONS_IN_QUEUE = 3;
|
var MAX_NOTIFICATIONS_IN_QUEUE = 3;
|
||||||
const MAX_NOTIFICATIONS_PER_SOURCE = 3;
|
var MAX_NOTIFICATIONS_PER_SOURCE = 3;
|
||||||
const MAX_NOTIFICATION_BUTTONS = 3;
|
var MAX_NOTIFICATION_BUTTONS = 3;
|
||||||
|
|
||||||
// We delay hiding of the tray if the mouse is within MOUSE_LEFT_ACTOR_THRESHOLD
|
// We delay hiding of the tray if the mouse is within MOUSE_LEFT_ACTOR_THRESHOLD
|
||||||
// range from the point where it left the tray.
|
// range from the point where it left the tray.
|
||||||
const MOUSE_LEFT_ACTOR_THRESHOLD = 20;
|
var MOUSE_LEFT_ACTOR_THRESHOLD = 20;
|
||||||
|
|
||||||
const IDLE_TIME = 1000;
|
var IDLE_TIME = 1000;
|
||||||
|
|
||||||
const State = {
|
var State = {
|
||||||
HIDDEN: 0,
|
HIDDEN: 0,
|
||||||
SHOWING: 1,
|
SHOWING: 1,
|
||||||
SHOWN: 2,
|
SHOWN: 2,
|
||||||
@ -52,7 +52,7 @@ const State = {
|
|||||||
// and the user did not interact with, DISMISSED for all other notifications
|
// and the user did not interact with, DISMISSED for all other notifications
|
||||||
// that were destroyed as a result of a user action, and SOURCE_CLOSED for the
|
// that were destroyed as a result of a user action, and SOURCE_CLOSED for the
|
||||||
// notifications that were requested to be destroyed by the associated source.
|
// notifications that were requested to be destroyed by the associated source.
|
||||||
const NotificationDestroyedReason = {
|
var NotificationDestroyedReason = {
|
||||||
EXPIRED: 1,
|
EXPIRED: 1,
|
||||||
DISMISSED: 2,
|
DISMISSED: 2,
|
||||||
SOURCE_CLOSED: 3
|
SOURCE_CLOSED: 3
|
||||||
@ -62,7 +62,7 @@ const NotificationDestroyedReason = {
|
|||||||
// urgency values map to the corresponding values for the notifications received
|
// urgency values map to the corresponding values for the notifications received
|
||||||
// through the notification daemon. HIGH urgency value is used for chats received
|
// through the notification daemon. HIGH urgency value is used for chats received
|
||||||
// through the Telepathy client.
|
// through the Telepathy client.
|
||||||
const Urgency = {
|
var Urgency = {
|
||||||
LOW: 0,
|
LOW: 0,
|
||||||
NORMAL: 1,
|
NORMAL: 1,
|
||||||
HIGH: 2,
|
HIGH: 2,
|
||||||
|
@ -20,10 +20,10 @@ const Lightbox = imports.ui.lightbox;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const OPEN_AND_CLOSE_TIME = 0.1;
|
var OPEN_AND_CLOSE_TIME = 0.1;
|
||||||
const FADE_OUT_DIALOG_TIME = 1.0;
|
var FADE_OUT_DIALOG_TIME = 1.0;
|
||||||
|
|
||||||
const State = {
|
var State = {
|
||||||
OPENED: 0,
|
OPENED: 0,
|
||||||
CLOSED: 1,
|
CLOSED: 1,
|
||||||
OPENING: 2,
|
OPENING: 2,
|
||||||
|
@ -67,14 +67,14 @@ const FdoNotificationsIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const NotificationClosedReason = {
|
var NotificationClosedReason = {
|
||||||
EXPIRED: 1,
|
EXPIRED: 1,
|
||||||
DISMISSED: 2,
|
DISMISSED: 2,
|
||||||
APP_CLOSED: 3,
|
APP_CLOSED: 3,
|
||||||
UNDEFINED: 4
|
UNDEFINED: 4
|
||||||
};
|
};
|
||||||
|
|
||||||
const Urgency = {
|
var Urgency = {
|
||||||
LOW: 0,
|
LOW: 0,
|
||||||
NORMAL: 1,
|
NORMAL: 1,
|
||||||
CRITICAL: 2
|
CRITICAL: 2
|
||||||
|
@ -9,7 +9,7 @@ const Main = imports.ui.main;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
|
|
||||||
const FADE_TIME = 0.1;
|
var FADE_TIME = 0.1;
|
||||||
|
|
||||||
var OsdMonitorLabel = new Lang.Class({
|
var OsdMonitorLabel = new Lang.Class({
|
||||||
Name: 'OsdMonitorLabel',
|
Name: 'OsdMonitorLabel',
|
||||||
|
@ -11,9 +11,9 @@ const Mainloop = imports.mainloop;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
|
|
||||||
const HIDE_TIMEOUT = 1500;
|
var HIDE_TIMEOUT = 1500;
|
||||||
const FADE_TIME = 0.1;
|
var FADE_TIME = 0.1;
|
||||||
const LEVEL_ANIMATION_TIME = 0.1;
|
var LEVEL_ANIMATION_TIME = 0.1;
|
||||||
|
|
||||||
var LevelBar = new Lang.Class({
|
var LevelBar = new Lang.Class({
|
||||||
Name: 'LevelBar',
|
Name: 'LevelBar',
|
||||||
|
@ -24,16 +24,16 @@ const Tweener = imports.ui.tweener;
|
|||||||
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
||||||
|
|
||||||
// Time for initial animation going into Overview mode
|
// Time for initial animation going into Overview mode
|
||||||
const ANIMATION_TIME = 0.25;
|
var ANIMATION_TIME = 0.25;
|
||||||
|
|
||||||
// Must be less than ANIMATION_TIME, since we switch to
|
// Must be less than ANIMATION_TIME, since we switch to
|
||||||
// or from the overview completely after ANIMATION_TIME,
|
// or from the overview completely after ANIMATION_TIME,
|
||||||
// and don't want the shading animation to get cut off
|
// and don't want the shading animation to get cut off
|
||||||
const SHADE_ANIMATION_TIME = .20;
|
var SHADE_ANIMATION_TIME = .20;
|
||||||
|
|
||||||
const DND_WINDOW_SWITCH_TIMEOUT = 750;
|
var DND_WINDOW_SWITCH_TIMEOUT = 750;
|
||||||
|
|
||||||
const OVERVIEW_ACTIVATION_TIMEOUT = 0.5;
|
var OVERVIEW_ACTIVATION_TIMEOUT = 0.5;
|
||||||
|
|
||||||
var ShellInfo = new Lang.Class({
|
var ShellInfo = new Lang.Class({
|
||||||
Name: 'ShellInfo',
|
Name: 'ShellInfo',
|
||||||
|
@ -14,7 +14,7 @@ const Tweener = imports.ui.tweener;
|
|||||||
const ViewSelector = imports.ui.viewSelector;
|
const ViewSelector = imports.ui.viewSelector;
|
||||||
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
||||||
|
|
||||||
const SIDE_CONTROLS_ANIMATION_TIME = 0.16;
|
var SIDE_CONTROLS_ANIMATION_TIME = 0.16;
|
||||||
|
|
||||||
function getRtlSlideDirection(direction, actor) {
|
function getRtlSlideDirection(direction, actor) {
|
||||||
let rtl = (actor.text_direction == Clutter.TextDirection.RTL);
|
let rtl = (actor.text_direction == Clutter.TextDirection.RTL);
|
||||||
@ -25,7 +25,7 @@ function getRtlSlideDirection(direction, actor) {
|
|||||||
return direction;
|
return direction;
|
||||||
};
|
};
|
||||||
|
|
||||||
const SlideDirection = {
|
var SlideDirection = {
|
||||||
LEFT: 0,
|
LEFT: 0,
|
||||||
RIGHT: 1
|
RIGHT: 1
|
||||||
};
|
};
|
||||||
|
@ -25,12 +25,12 @@ const RemoteMenu = imports.ui.remoteMenu;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const PANEL_ICON_SIZE = 16;
|
var PANEL_ICON_SIZE = 16;
|
||||||
const APP_MENU_ICON_MARGIN = 0;
|
var APP_MENU_ICON_MARGIN = 0;
|
||||||
|
|
||||||
const BUTTON_DND_ACTIVATION_TIMEOUT = 250;
|
var BUTTON_DND_ACTIVATION_TIMEOUT = 250;
|
||||||
|
|
||||||
const SPINNER_ANIMATION_TIME = 1.0;
|
var SPINNER_ANIMATION_TIME = 1.0;
|
||||||
|
|
||||||
// To make sure the panel corners blend nicely with the panel,
|
// To make sure the panel corners blend nicely with the panel,
|
||||||
// we draw background and borders the same way, e.g. drawing
|
// we draw background and borders the same way, e.g. drawing
|
||||||
|
@ -8,7 +8,7 @@ const GnomeDesktop = imports.gi.GnomeDesktop;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
// We stop polling if the user is idle for more than this amount of time
|
// We stop polling if the user is idle for more than this amount of time
|
||||||
const IDLE_TIME = 1000;
|
var IDLE_TIME = 1000;
|
||||||
|
|
||||||
// This file implements a reasonably efficient system for tracking the position
|
// This file implements a reasonably efficient system for tracking the position
|
||||||
// of the mouse pointer. We simply query the pointer from the X server in a loop,
|
// of the mouse pointer. We simply query the pointer from the X server in a loop,
|
||||||
|
@ -16,7 +16,7 @@ const Main = imports.ui.main;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const Ornament = {
|
var Ornament = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
DOT: 1,
|
DOT: 1,
|
||||||
CHECK: 2,
|
CHECK: 2,
|
||||||
|
@ -17,7 +17,7 @@ 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;
|
||||||
|
|
||||||
const MAX_FILE_DELETED_BEFORE_INVALID = 10;
|
var MAX_FILE_DELETED_BEFORE_INVALID = 10;
|
||||||
|
|
||||||
const HISTORY_KEY = 'command-history';
|
const HISTORY_KEY = 'command-history';
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ const TERMINAL_SCHEMA = 'org.gnome.desktop.default-applications.terminal';
|
|||||||
const EXEC_KEY = 'exec';
|
const EXEC_KEY = 'exec';
|
||||||
const EXEC_ARG_KEY = 'exec-arg';
|
const EXEC_ARG_KEY = 'exec-arg';
|
||||||
|
|
||||||
const DIALOG_GROW_TIME = 0.1;
|
var DIALOG_GROW_TIME = 0.1;
|
||||||
|
|
||||||
var RunDialog = new Lang.Class({
|
var RunDialog = new Lang.Class({
|
||||||
Name: 'RunDialog',
|
Name: 'RunDialog',
|
||||||
|
@ -39,15 +39,15 @@ const DISABLE_LOCK_KEY = 'disable-lock-screen';
|
|||||||
const LOCKED_STATE_STR = 'screenShield.locked';
|
const LOCKED_STATE_STR = 'screenShield.locked';
|
||||||
// fraction of screen height the arrow must reach before completing
|
// fraction of screen height the arrow must reach before completing
|
||||||
// the slide up automatically
|
// the slide up automatically
|
||||||
const ARROW_DRAG_THRESHOLD = 0.1;
|
var ARROW_DRAG_THRESHOLD = 0.1;
|
||||||
|
|
||||||
// Parameters for the arrow animation
|
// Parameters for the arrow animation
|
||||||
const N_ARROWS = 3;
|
var N_ARROWS = 3;
|
||||||
const ARROW_ANIMATION_TIME = 0.6;
|
var ARROW_ANIMATION_TIME = 0.6;
|
||||||
const ARROW_ANIMATION_PEAK_OPACITY = 0.4;
|
var ARROW_ANIMATION_PEAK_OPACITY = 0.4;
|
||||||
const ARROW_IDLE_TIME = 30000; // ms
|
var ARROW_IDLE_TIME = 30000; // ms
|
||||||
|
|
||||||
const SUMMARY_ICON_SIZE = 48;
|
var SUMMARY_ICON_SIZE = 48;
|
||||||
|
|
||||||
// ScreenShield animation time
|
// ScreenShield animation time
|
||||||
// - STANDARD_FADE_TIME is used when the session goes idle
|
// - STANDARD_FADE_TIME is used when the session goes idle
|
||||||
@ -55,10 +55,10 @@ const SUMMARY_ICON_SIZE = 48;
|
|||||||
// or when cancelling the dialog
|
// or when cancelling the dialog
|
||||||
// - BACKGROUND_FADE_TIME is used when the background changes to crossfade to new background
|
// - 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
|
||||||
const STANDARD_FADE_TIME = 10;
|
var STANDARD_FADE_TIME = 10;
|
||||||
const MANUAL_FADE_TIME = 0.3;
|
var MANUAL_FADE_TIME = 0.3;
|
||||||
const BACKGROUND_FADE_TIME = 1.0;
|
var BACKGROUND_FADE_TIME = 1.0;
|
||||||
const CURTAIN_SLIDE_TIME = 0.3;
|
var CURTAIN_SLIDE_TIME = 0.3;
|
||||||
|
|
||||||
var Clock = new Lang.Class({
|
var Clock = new Lang.Class({
|
||||||
Name: 'ScreenShieldClock',
|
Name: 'ScreenShieldClock',
|
||||||
|
@ -338,7 +338,7 @@ var SelectArea = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(SelectArea.prototype);
|
Signals.addSignalMethods(SelectArea.prototype);
|
||||||
|
|
||||||
const FLASHSPOT_ANIMATION_OUT_TIME = 0.5; // seconds
|
var FLASHSPOT_ANIMATION_OUT_TIME = 0.5; // seconds
|
||||||
|
|
||||||
var Flashspot = new Lang.Class({
|
var Flashspot = new Lang.Class({
|
||||||
Name: 'Flashspot',
|
Name: 'Flashspot',
|
||||||
|
@ -21,8 +21,8 @@ const Util = imports.misc.util;
|
|||||||
|
|
||||||
const SEARCH_PROVIDERS_SCHEMA = 'org.gnome.desktop.search-providers';
|
const SEARCH_PROVIDERS_SCHEMA = 'org.gnome.desktop.search-providers';
|
||||||
|
|
||||||
const MAX_LIST_SEARCH_RESULTS_ROWS = 5;
|
var MAX_LIST_SEARCH_RESULTS_ROWS = 5;
|
||||||
const MAX_GRID_SEARCH_RESULTS_ROWS = 1;
|
var MAX_GRID_SEARCH_RESULTS_ROWS = 1;
|
||||||
|
|
||||||
var MaxWidthBin = new Lang.Class({
|
var MaxWidthBin = new Lang.Class({
|
||||||
Name: 'MaxWidthBin',
|
Name: 'MaxWidthBin',
|
||||||
|
@ -18,7 +18,7 @@ const ModalDialog = imports.ui.modalDialog;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const ShellEntry = imports.ui.shellEntry;
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
|
|
||||||
const LIST_ITEM_ICON_SIZE = 48;
|
var LIST_ITEM_ICON_SIZE = 48;
|
||||||
|
|
||||||
const REMEMBER_MOUNT_PASSWORD_KEY = 'remember-mount-password';
|
const REMEMBER_MOUNT_PASSWORD_KEY = 'remember-mount-password';
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ const GnomeShellMountOpIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const ShellMountOperationType = {
|
var ShellMountOperationType = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
ASK_PASSWORD: 1,
|
ASK_PASSWORD: 1,
|
||||||
ASK_QUESTION: 2,
|
ASK_QUESTION: 2,
|
||||||
|
@ -7,7 +7,7 @@ const Lang = imports.lang;
|
|||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
const SLIDER_SCROLL_STEP = 0.02; /* Slider scrolling step in % */
|
var SLIDER_SCROLL_STEP = 0.02; /* Slider scrolling step in % */
|
||||||
|
|
||||||
var Slider = new Lang.Class({
|
var Slider = new Lang.Class({
|
||||||
Name: "Slider",
|
Name: "Slider",
|
||||||
|
@ -21,7 +21,7 @@ const KEY_MOUSE_KEYS_ENABLED = 'mousekeys-enable';
|
|||||||
|
|
||||||
const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
||||||
|
|
||||||
const DPI_FACTOR_LARGE = 1.25;
|
var DPI_FACTOR_LARGE = 1.25;
|
||||||
|
|
||||||
const WM_SCHEMA = 'org.gnome.desktop.wm.preferences';
|
const WM_SCHEMA = 'org.gnome.desktop.wm.preferences';
|
||||||
const KEY_VISUAL_BELL = 'visual-bell';
|
const KEY_VISUAL_BELL = 'visual-bell';
|
||||||
|
@ -22,7 +22,7 @@ const ENABLED = 'enabled';
|
|||||||
const APP_PERMISSIONS_TABLE = 'gnome';
|
const APP_PERMISSIONS_TABLE = 'gnome';
|
||||||
const APP_PERMISSIONS_ID = 'geolocation';
|
const APP_PERMISSIONS_ID = 'geolocation';
|
||||||
|
|
||||||
const GeoclueAccuracyLevel = {
|
var GeoclueAccuracyLevel = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
COUNTRY: 1,
|
COUNTRY: 1,
|
||||||
CITY: 4,
|
CITY: 4,
|
||||||
|
@ -40,14 +40,14 @@ const NMAccessPointSecurity = {
|
|||||||
WPA2_ENT: 6
|
WPA2_ENT: 6
|
||||||
};
|
};
|
||||||
|
|
||||||
const MAX_DEVICE_ITEMS = 4;
|
var MAX_DEVICE_ITEMS = 4;
|
||||||
|
|
||||||
// small optimization, to avoid using [] all the time
|
// small optimization, to avoid using [] all the time
|
||||||
const NM80211Mode = NetworkManager['80211Mode'];
|
const NM80211Mode = NetworkManager['80211Mode'];
|
||||||
const NM80211ApFlags = NetworkManager['80211ApFlags'];
|
const NM80211ApFlags = NetworkManager['80211ApFlags'];
|
||||||
const NM80211ApSecurityFlags = NetworkManager['80211ApSecurityFlags'];
|
const NM80211ApSecurityFlags = NetworkManager['80211ApSecurityFlags'];
|
||||||
|
|
||||||
const PortalHelperResult = {
|
var PortalHelperResult = {
|
||||||
CANCELLED: 0,
|
CANCELLED: 0,
|
||||||
COMPLETED: 1,
|
COMPLETED: 1,
|
||||||
RECHECK: 2
|
RECHECK: 2
|
||||||
|
@ -12,7 +12,7 @@ const PanelMenu = imports.ui.panelMenu;
|
|||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Slider = imports.ui.slider;
|
const Slider = imports.ui.slider;
|
||||||
|
|
||||||
const VOLUME_NOTIFY_ID = 1;
|
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
|
||||||
|
@ -13,12 +13,12 @@ const St = imports.gi.St;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const POPUP_DELAY_TIMEOUT = 150; // milliseconds
|
var POPUP_DELAY_TIMEOUT = 150; // milliseconds
|
||||||
|
|
||||||
const POPUP_SCROLL_TIME = 0.10; // seconds
|
var POPUP_SCROLL_TIME = 0.10; // seconds
|
||||||
const POPUP_FADE_OUT_TIME = 0.1; // seconds
|
var POPUP_FADE_OUT_TIME = 0.1; // seconds
|
||||||
|
|
||||||
const DISABLE_HOVER_TIMEOUT = 500; // milliseconds
|
var DISABLE_HOVER_TIMEOUT = 500; // milliseconds
|
||||||
|
|
||||||
function mod(a, b) {
|
function mod(a, b) {
|
||||||
return (a + b) % b;
|
return (a + b) % b;
|
||||||
|
@ -12,7 +12,7 @@ const St = imports.gi.St;
|
|||||||
|
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
const AVATAR_ICON_SIZE = 64;
|
var AVATAR_ICON_SIZE = 64;
|
||||||
|
|
||||||
// Adapted from gdm/gui/user-switch-applet/applet.c
|
// Adapted from gdm/gui/user-switch-applet/applet.c
|
||||||
//
|
//
|
||||||
|
@ -24,9 +24,9 @@ const EdgeDragAction = imports.ui.edgeDragAction;
|
|||||||
const IconGrid = imports.ui.iconGrid;
|
const IconGrid = imports.ui.iconGrid;
|
||||||
|
|
||||||
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||||
const PINCH_GESTURE_THRESHOLD = 0.7;
|
var PINCH_GESTURE_THRESHOLD = 0.7;
|
||||||
|
|
||||||
const ViewPage = {
|
var ViewPage = {
|
||||||
WINDOWS: 1,
|
WINDOWS: 1,
|
||||||
APPS: 2,
|
APPS: 2,
|
||||||
SEARCH: 3
|
SEARCH: 3
|
||||||
|
@ -23,18 +23,18 @@ const EdgeDragAction = imports.ui.edgeDragAction;
|
|||||||
const CloseDialog = imports.ui.closeDialog;
|
const CloseDialog = imports.ui.closeDialog;
|
||||||
|
|
||||||
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||||
const MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
|
var MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
|
||||||
const SHOW_WINDOW_ANIMATION_TIME = 0.15;
|
var SHOW_WINDOW_ANIMATION_TIME = 0.15;
|
||||||
const DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
|
var DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
|
||||||
const DESTROY_WINDOW_ANIMATION_TIME = 0.15;
|
var DESTROY_WINDOW_ANIMATION_TIME = 0.15;
|
||||||
const DIALOG_DESTROY_WINDOW_ANIMATION_TIME = 0.1;
|
var DIALOG_DESTROY_WINDOW_ANIMATION_TIME = 0.1;
|
||||||
const WINDOW_ANIMATION_TIME = 0.25;
|
var WINDOW_ANIMATION_TIME = 0.25;
|
||||||
const DIM_BRIGHTNESS = -0.3;
|
var DIM_BRIGHTNESS = -0.3;
|
||||||
const DIM_TIME = 0.500;
|
var DIM_TIME = 0.500;
|
||||||
const UNDIM_TIME = 0.250;
|
var UNDIM_TIME = 0.250;
|
||||||
|
|
||||||
const DISPLAY_REVERT_TIMEOUT = 20; // in seconds - keep in sync with mutter
|
var DISPLAY_REVERT_TIMEOUT = 20; // in seconds - keep in sync with mutter
|
||||||
const ONE_SECOND = 1000; // in ms
|
var ONE_SECOND = 1000; // in ms
|
||||||
|
|
||||||
const GSD_WACOM_BUS_NAME = 'org.gnome.SettingsDaemon.Wacom';
|
const GSD_WACOM_BUS_NAME = 'org.gnome.SettingsDaemon.Wacom';
|
||||||
const GSD_WACOM_OBJECT_PATH = '/org/gnome/SettingsDaemon/Wacom';
|
const GSD_WACOM_OBJECT_PATH = '/org/gnome/SettingsDaemon/Wacom';
|
||||||
@ -183,7 +183,7 @@ function getWindowDimmer(actor) {
|
|||||||
* the main window of an application, and give the app a grace period
|
* the main window of an application, and give the app a grace period
|
||||||
* where it can map another window before we remove the workspace.
|
* where it can map another window before we remove the workspace.
|
||||||
*/
|
*/
|
||||||
const LAST_WINDOW_GRACE_TIME = 1000;
|
var LAST_WINDOW_GRACE_TIME = 1000;
|
||||||
|
|
||||||
var WorkspaceTracker = new Lang.Class({
|
var WorkspaceTracker = new Lang.Class({
|
||||||
Name: 'WorkspaceTracker',
|
Name: 'WorkspaceTracker',
|
||||||
|
@ -18,23 +18,23 @@ const Overview = imports.ui.overview;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const WindowManager = imports.ui.windowManager;
|
const WindowManager = imports.ui.windowManager;
|
||||||
|
|
||||||
const WINDOW_DND_SIZE = 256;
|
var WINDOW_DND_SIZE = 256;
|
||||||
|
|
||||||
const WINDOW_CLONE_MAXIMUM_SCALE = 0.7;
|
var WINDOW_CLONE_MAXIMUM_SCALE = 0.7;
|
||||||
|
|
||||||
const CLOSE_BUTTON_FADE_TIME = 0.1;
|
var CLOSE_BUTTON_FADE_TIME = 0.1;
|
||||||
|
|
||||||
const DRAGGING_WINDOW_OPACITY = 100;
|
var DRAGGING_WINDOW_OPACITY = 100;
|
||||||
|
|
||||||
// When calculating a layout, we calculate the scale of windows and the percent
|
// When calculating a layout, we calculate the scale of windows and the percent
|
||||||
// of the available area the new layout uses. If the values for the new layout,
|
// of the available area the new layout uses. If the values for the new layout,
|
||||||
// when weighted with the values as below, are worse than the previous layout's,
|
// when weighted with the values as below, are worse than the previous layout's,
|
||||||
// we stop looking for a new layout and use the previous layout.
|
// we stop looking for a new layout and use the previous layout.
|
||||||
// Otherwise, we keep looking for a new layout.
|
// Otherwise, we keep looking for a new layout.
|
||||||
const LAYOUT_SCALE_WEIGHT = 1;
|
var LAYOUT_SCALE_WEIGHT = 1;
|
||||||
const LAYOUT_SPACE_WEIGHT = 0.1;
|
var LAYOUT_SPACE_WEIGHT = 0.1;
|
||||||
|
|
||||||
const WINDOW_ANIMATION_MAX_NUMBER_BLENDING = 3;
|
var WINDOW_ANIMATION_MAX_NUMBER_BLENDING = 3;
|
||||||
|
|
||||||
function _interpolate(start, end, step) {
|
function _interpolate(start, end, step) {
|
||||||
return start + (end - start) * step;
|
return start + (end - start) * step;
|
||||||
@ -731,7 +731,7 @@ var WindowOverlay = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(WindowOverlay.prototype);
|
Signals.addSignalMethods(WindowOverlay.prototype);
|
||||||
|
|
||||||
const WindowPositionFlags = {
|
var WindowPositionFlags = {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
INITIAL: 1 << 0,
|
INITIAL: 1 << 0,
|
||||||
ANIMATE: 1 << 1
|
ANIMATE: 1 << 1
|
||||||
|
@ -12,8 +12,8 @@ const St = imports.gi.St;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const ANIMATION_TIME = 0.1;
|
var ANIMATION_TIME = 0.1;
|
||||||
const DISPLAY_TIMEOUT = 600;
|
var DISPLAY_TIMEOUT = 600;
|
||||||
|
|
||||||
var WorkspaceSwitcherPopup = new Lang.Class({
|
var WorkspaceSwitcherPopup = new Lang.Class({
|
||||||
Name: 'WorkspaceSwitcherPopup',
|
Name: 'WorkspaceSwitcherPopup',
|
||||||
|
@ -21,15 +21,15 @@ const WorkspacesView = imports.ui.workspacesView;
|
|||||||
// The maximum size of a thumbnail is 1/8 the width and height of the screen
|
// The maximum size of a thumbnail is 1/8 the width and height of the screen
|
||||||
let MAX_THUMBNAIL_SCALE = 1/8.;
|
let MAX_THUMBNAIL_SCALE = 1/8.;
|
||||||
|
|
||||||
const RESCALE_ANIMATION_TIME = 0.2;
|
var RESCALE_ANIMATION_TIME = 0.2;
|
||||||
const SLIDE_ANIMATION_TIME = 0.2;
|
var SLIDE_ANIMATION_TIME = 0.2;
|
||||||
|
|
||||||
// When we create workspaces by dragging, we add a "cut" into the top and
|
// When we create workspaces by dragging, we add a "cut" into the top and
|
||||||
// bottom of each workspace so that the user doesn't have to hit the
|
// bottom of each workspace so that the user doesn't have to hit the
|
||||||
// placeholder exactly.
|
// placeholder exactly.
|
||||||
const WORKSPACE_CUT_SIZE = 10;
|
var WORKSPACE_CUT_SIZE = 10;
|
||||||
|
|
||||||
const WORKSPACE_KEEP_ALIVE_TIME = 100;
|
var WORKSPACE_KEEP_ALIVE_TIME = 100;
|
||||||
|
|
||||||
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
|
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ const Tweener = imports.ui.tweener;
|
|||||||
const Workspace = imports.ui.workspace;
|
const Workspace = imports.ui.workspace;
|
||||||
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
||||||
|
|
||||||
const WORKSPACE_SWITCH_TIME = 0.25;
|
var WORKSPACE_SWITCH_TIME = 0.25;
|
||||||
|
|
||||||
const AnimationType = {
|
var AnimationType = {
|
||||||
ZOOM: 0,
|
ZOOM: 0,
|
||||||
FADE: 1
|
FADE: 1
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user