Compare commits
99 Commits
wip/raresv
...
wip/beniof
Author | SHA1 | Date | |
---|---|---|---|
![]() |
920b169709 | ||
![]() |
ccc5078802 | ||
![]() |
a9b816ab36 | ||
![]() |
a432653c87 | ||
![]() |
c1e478eb53 | ||
![]() |
5f73693391 | ||
![]() |
1fd5196818 | ||
![]() |
679c21b27f | ||
![]() |
25678747cc | ||
![]() |
0320a04a8b | ||
![]() |
fc90833475 | ||
![]() |
1dd12d2d78 | ||
![]() |
08ad345f23 | ||
![]() |
775d77bf6d | ||
![]() |
737ba1483c | ||
![]() |
734511a9ae | ||
![]() |
825f1cc072 | ||
![]() |
4181035981 | ||
![]() |
ae0eeb0dca | ||
![]() |
2aceeac7e0 | ||
![]() |
3b75881c05 | ||
![]() |
c987d3d2c9 | ||
![]() |
26e7962dfe | ||
![]() |
7f4e914b00 | ||
![]() |
6878ee99d9 | ||
![]() |
865a1cf587 | ||
![]() |
96a49770a4 | ||
![]() |
c67eabaf62 | ||
![]() |
6c9a7ce84e | ||
![]() |
033277b68f | ||
![]() |
2582d16ca7 | ||
![]() |
9e32ba61fd | ||
![]() |
6a2af25d48 | ||
![]() |
a593e4587b | ||
![]() |
76c4b0a960 | ||
![]() |
5202181a4d | ||
![]() |
c64a38f7da | ||
![]() |
6b71b79d28 | ||
![]() |
e845f4105a | ||
![]() |
d461d02cdc | ||
![]() |
88b1a5d3a0 | ||
![]() |
8d6efde091 | ||
![]() |
3ca77e9fe0 | ||
![]() |
161926c581 | ||
![]() |
59a70fbc63 | ||
![]() |
d220e353e0 | ||
![]() |
593b4318a3 | ||
![]() |
f77333e4d7 | ||
![]() |
b5860d687d | ||
![]() |
fbf5f98eea | ||
![]() |
1c7a3ee61b | ||
![]() |
74bd009c86 | ||
![]() |
516d19eb39 | ||
![]() |
330a28742f | ||
![]() |
90f7dfd783 | ||
![]() |
69a9c222d0 | ||
![]() |
b3d74bdb0f | ||
![]() |
77e0c38d82 | ||
![]() |
bcec9f35d5 | ||
![]() |
150252391f | ||
![]() |
d4541a6f81 | ||
![]() |
c1eaa8e52d | ||
![]() |
9d77fa8341 | ||
![]() |
0a8d81c095 | ||
![]() |
faa0ddafff | ||
![]() |
a426295168 | ||
![]() |
0d0e90ce9a | ||
![]() |
7991a53189 | ||
![]() |
4427197343 | ||
![]() |
4c2fd513f4 | ||
![]() |
b099e9a69c | ||
![]() |
5962be3904 | ||
![]() |
b18735da52 | ||
![]() |
60e7db7126 | ||
![]() |
ccaae5d3cc | ||
![]() |
c1758c4d69 | ||
![]() |
d815c5dfc0 | ||
![]() |
b73c96d14c | ||
![]() |
32fdc22811 | ||
![]() |
4e57b45142 | ||
![]() |
1ba014d9db | ||
![]() |
f33560f014 | ||
![]() |
b50d7143d1 | ||
![]() |
28d098394a | ||
![]() |
755698a756 | ||
![]() |
2a01606c59 | ||
![]() |
e2f88d67f7 | ||
![]() |
358133e82f | ||
![]() |
526f2c8bcf | ||
![]() |
79aa404c14 | ||
![]() |
2339c39ae6 | ||
![]() |
a782de6e06 | ||
![]() |
0f8718287a | ||
![]() |
2b459ff202 | ||
![]() |
fbc5e3709e | ||
![]() |
326d5c7fb8 | ||
![]() |
d1c71fd00d | ||
![]() |
292ac413c8 | ||
![]() |
fdf988c04d |
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
|||||||
[submodule "src/gvc"]
|
|
||||||
path = src/gvc
|
|
||||||
url = git://git.gnome.org/libgnome-volume-control
|
|
||||||
[submodule "data/theme/gnome-shell-sass"]
|
[submodule "data/theme/gnome-shell-sass"]
|
||||||
path = data/theme/gnome-shell-sass
|
path = data/theme/gnome-shell-sass
|
||||||
url = git://git.gnome.org/gnome-shell-sass
|
url = git://git.gnome.org/gnome-shell-sass
|
||||||
|
[submodule "subprojects/gvc"]
|
||||||
|
path = subprojects/gvc
|
||||||
|
url = git://git.gnome.org/libgnome-volume-control
|
||||||
|
12
HACKING
12
HACKING
@@ -132,7 +132,7 @@ There are many approaches to classes in JavaScript. We use our own class framewo
|
|||||||
(sigh), which is built in gjs. The advantage is that it supports inheriting from
|
(sigh), which is built in gjs. The advantage is that it supports inheriting from
|
||||||
GObjects, although this feature isn't used very often in the Shell itself.
|
GObjects, although this feature isn't used very often in the Shell itself.
|
||||||
|
|
||||||
const IconLabelMenuItem = new Lang.Class({
|
var IconLabelMenuItem = new Lang.Class({
|
||||||
Name: 'IconLabelMenuItem',
|
Name: 'IconLabelMenuItem',
|
||||||
Extends: PopupMenu.PopupMenuBaseItem,
|
Extends: PopupMenu.PopupMenuBaseItem,
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ GObject Introspection is a powerful feature that allows us to have native
|
|||||||
bindings for almost any library built around GObject. If a library requires
|
bindings for almost any library built around GObject. If a library requires
|
||||||
you to inherit from a type to use it, you can do so:
|
you to inherit from a type to use it, you can do so:
|
||||||
|
|
||||||
const MyClutterActor = new Lang.Class({
|
var MyClutterActor = new Lang.Class({
|
||||||
Name: 'MyClutterActor',
|
Name: 'MyClutterActor',
|
||||||
Extends: Clutter.Actor,
|
Extends: Clutter.Actor,
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ that has a property called `actor`. We call this wrapper class the "delegate".
|
|||||||
We sometimes use expando properties to set a property called `_delegate` on
|
We sometimes use expando properties to set a property called `_delegate` on
|
||||||
the actor itself:
|
the actor itself:
|
||||||
|
|
||||||
const MyClass = new Lang.Class({
|
var MyClass = new Lang.Class({
|
||||||
Name: 'MyClass',
|
Name: 'MyClass',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -264,7 +264,7 @@ prototype:
|
|||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const FnorbLib = imports.fborbLib;
|
const FnorbLib = imports.fborbLib;
|
||||||
|
|
||||||
const MyClass = new Lang.Class({
|
var MyClass = new Lang.Class({
|
||||||
_init: function() {
|
_init: function() {
|
||||||
let fnorb = new FnorbLib.Fnorb();
|
let fnorb = new FnorbLib.Fnorb();
|
||||||
fnorb.connect('frobate', Lang.bind(this, this._onFnorbFrobate));
|
fnorb.connect('frobate', Lang.bind(this, this._onFnorbFrobate));
|
||||||
@@ -304,9 +304,9 @@ 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;
|
||||||
|
|
||||||
const MyClass = new Lang.Class({
|
var MyClass = new Lang.Class({
|
||||||
Name: 'MyClass',
|
Name: 'MyClass',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# Point to our macro directory and pick up user flags from the environment
|
# Point to our macro directory and pick up user flags from the environment
|
||||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||||
|
|
||||||
SUBDIRS = data js src tests po docs
|
SUBDIRS = data js subprojects/gvc src tests po docs
|
||||||
|
|
||||||
if BUILD_BROWSER_PLUGIN
|
if BUILD_BROWSER_PLUGIN
|
||||||
SUBDIRS += browser-plugin
|
SUBDIRS += browser-plugin
|
||||||
|
27
NEWS
27
NEWS
@@ -1,3 +1,30 @@
|
|||||||
|
3.25.4
|
||||||
|
======
|
||||||
|
* gdm: Fix "Not listed" focus indication [Florian; #784040]
|
||||||
|
* Fix missing icons in freedesktop notifications [Florian; #784245]
|
||||||
|
* gdm: Disable user list when empty [Xiaoguang; #731320]
|
||||||
|
* gdm: Allow empty reponse to PAM messages [Ray; #784360]
|
||||||
|
* Fix blocked clicks in shutdown dialog [Florian; #781738]
|
||||||
|
* Show OSD popup when changing volume via scroll wheel [Florian; #781028]
|
||||||
|
* Refine list search results [Rares; #749957]
|
||||||
|
* Replace mutter's unresponsive app dialog [Carlos; #762083]
|
||||||
|
* Improve handling of extension errors [Florian; #781728]
|
||||||
|
* Implement tablet rings/strips configuration [Carlos; #782033]
|
||||||
|
* Adjust to mozjs52 update in gjs [Florian; #785084, #785090]
|
||||||
|
* Support the meson build system [Florian; #783229]
|
||||||
|
* Misc. bug fixes [Ray, Florian, Jonas, Marco, Shih-Yuan, Joaquim, Carlos S.;
|
||||||
|
#780403, #772589, #784130, #783975, #784353, #784361, #772284, #765011,
|
||||||
|
#765011, #765011, #784985, #781471, #785047, #736148, #736148]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Ådahl, Alessandro Bono, Michael Catanzaro, Carlos Garnacho,
|
||||||
|
Shih-Yuan Lee (FourDollars), Florian Müllner, Joaquim Rocha,
|
||||||
|
Mario Sanchez Prada, Carlos Soriano, Ray Strode, Marco Trevisan (Treviño),
|
||||||
|
Rares Visalom, Xiaoguang Wang
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Jeremy Bicha po/es, he.po, Kukuh Syafaat [id], Fabio Tomat [fur]
|
||||||
|
|
||||||
3.25.3
|
3.25.3
|
||||||
======
|
======
|
||||||
* Bypass proxies for captive portal [Bastien; #769692]
|
* Bypass proxies for captive portal [Bastien; #769692]
|
||||||
|
@@ -16,7 +16,7 @@ cd "${srcdir}"
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Fetch submodules if needed
|
# Fetch submodules if needed
|
||||||
if test ! -f src/gvc/Makefile.am || test ! -f data/theme/gnome-shell-sass/COPYING;
|
if test ! -f subprojects/gvc/Makefile.am || test ! -f data/theme/gnome-shell-sass/COPYING;
|
||||||
then
|
then
|
||||||
echo "+ Setting up submodules"
|
echo "+ Setting up submodules"
|
||||||
git submodule init
|
git submodule init
|
||||||
|
19
browser-plugin/meson.build
Normal file
19
browser-plugin/meson.build
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
plugin_sources = [
|
||||||
|
'browser-plugin.c',
|
||||||
|
'npapi/npapi.h',
|
||||||
|
'npapi/npfunctions.h',
|
||||||
|
'npapi/npruntime.h',
|
||||||
|
'npapi/nptypes.h'
|
||||||
|
]
|
||||||
|
|
||||||
|
shared_module('gnome-shell-browser-plugin', plugin_sources,
|
||||||
|
dependencies: [gio_dep, json_glib_dep],
|
||||||
|
c_args: ['-DG_LOG_DOMAIN="GnomeShellBrowserPlugin"'],
|
||||||
|
# Browsers can unload and reload the module while browsing, which is not
|
||||||
|
# supported by GObject.
|
||||||
|
# We pass -Wl,-z,nodelete to the linker to ensure the module is never
|
||||||
|
# unloaded. See https://bugzilla.gnome.org/show_bug.cgi?id=737932.
|
||||||
|
link_args: ['-Wl,-z,nodelete'],
|
||||||
|
install: true,
|
||||||
|
install_dir: plugindir
|
||||||
|
)
|
26
config.h.meson
Normal file
26
config.h.meson
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/* The prefix for our gettext translation domains. */
|
||||||
|
#mesondefine GETTEXT_PACKAGE
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#mesondefine VERSION
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#mesondefine PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `fdwalk' function. */
|
||||||
|
#mesondefine HAVE_FDWALK
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mallinfo' function. */
|
||||||
|
#mesondefine HAVE_MALLINFO
|
||||||
|
|
||||||
|
/* Define to 1 fi you have the <sys/resource.h> header file. */
|
||||||
|
#mesondefine HAVE_SYS_RESOURCE_H
|
||||||
|
|
||||||
|
/* Define if we have NetworkManager */
|
||||||
|
#mesondefine HAVE_NETWORKMANAGER
|
||||||
|
|
||||||
|
/* Define if we have systemd */
|
||||||
|
#mesondefine HAVE_SYSTEMD
|
||||||
|
|
||||||
|
/* Define if _NL_TIME_FIRST_WEEKDATE is available */
|
||||||
|
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
|
@@ -1,5 +1,5 @@
|
|||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AC_INIT([gnome-shell],[3.25.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
AC_INIT([gnome-shell],[3.25.4],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
||||||
AX_IS_RELEASE([git-directory])
|
AX_IS_RELEASE([git-directory])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
@@ -254,12 +254,12 @@ AC_CONFIG_FILES([
|
|||||||
docs/Makefile
|
docs/Makefile
|
||||||
docs/reference/Makefile
|
docs/reference/Makefile
|
||||||
docs/reference/shell/Makefile
|
docs/reference/shell/Makefile
|
||||||
docs/reference/shell/shell-docs.sgml
|
docs/reference/shell/version.xml
|
||||||
docs/reference/st/Makefile
|
docs/reference/st/Makefile
|
||||||
docs/reference/st/st-docs.sgml
|
docs/reference/st/version.xml
|
||||||
js/Makefile
|
js/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/gvc/Makefile
|
subprojects/gvc/Makefile
|
||||||
browser-plugin/Makefile
|
browser-plugin/Makefile
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
<file>gnome-shell.css</file>
|
<file>gnome-shell.css</file>
|
||||||
<file>gnome-shell-high-contrast.css</file>
|
<file>gnome-shell-high-contrast.css</file>
|
||||||
<file>logged-in-indicator.svg</file>
|
<file>logged-in-indicator.svg</file>
|
||||||
<file>more-results.svg</file>
|
|
||||||
<file>no-events.svg</file>
|
<file>no-events.svg</file>
|
||||||
<file>no-notifications.svg</file>
|
<file>no-notifications.svg</file>
|
||||||
<file>noise-texture.png</file>
|
<file>noise-texture.png</file>
|
||||||
|
88
data/meson.build
Normal file
88
data/meson.build
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
desktop_files = [
|
||||||
|
'org.gnome.Shell.desktop',
|
||||||
|
'gnome-shell-extension-prefs.desktop'
|
||||||
|
]
|
||||||
|
service_files = []
|
||||||
|
|
||||||
|
if have_networkmanager
|
||||||
|
desktop_files += 'org.gnome.Shell.PortalHelper.desktop'
|
||||||
|
service_files += 'org.gnome.Shell.PortalHelper.service'
|
||||||
|
endif
|
||||||
|
|
||||||
|
desktopconf = configuration_data()
|
||||||
|
# We substitute in bindir so it works as an autostart
|
||||||
|
# file when built in a non-system prefix
|
||||||
|
desktopconf.set('bindir', bindir)
|
||||||
|
desktopconf.set('VERSION', meson.project_version())
|
||||||
|
foreach desktop_file : desktop_files
|
||||||
|
i18n.merge_file('desktop',
|
||||||
|
input: configure_file(
|
||||||
|
input: desktop_file + '.in.in',
|
||||||
|
output: desktop_file + '.in',
|
||||||
|
configuration: desktopconf
|
||||||
|
),
|
||||||
|
output: desktop_file,
|
||||||
|
po_dir: '../po',
|
||||||
|
install: true,
|
||||||
|
install_dir: desktopdir,
|
||||||
|
type: 'desktop'
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
serviceconf = configuration_data()
|
||||||
|
serviceconf.set('libexecdir', libexecdir)
|
||||||
|
foreach service_file : service_files
|
||||||
|
configure_file(
|
||||||
|
input: service_file + '.in',
|
||||||
|
output: service_file,
|
||||||
|
configuration: serviceconf,
|
||||||
|
install_dir: servicedir
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
|
||||||
|
dbus_interfaces = [
|
||||||
|
'org.gnome.Shell.PadOsd.xml',
|
||||||
|
'org.gnome.Shell.Screencast.xml',
|
||||||
|
'org.gnome.Shell.Screenshot.xml',
|
||||||
|
'org.gnome.ShellSearchProvider.xml',
|
||||||
|
'org.gnome.ShellSearchProvider2.xml'
|
||||||
|
]
|
||||||
|
install_data(dbus_interfaces, install_dir: ifacedir)
|
||||||
|
|
||||||
|
|
||||||
|
subdir('theme')
|
||||||
|
|
||||||
|
theme_resources = gnome.compile_resources(
|
||||||
|
'gnome-shell-theme', 'gnome-shell-theme.gresource.xml',
|
||||||
|
source_dir: 'theme',
|
||||||
|
dependencies: theme_deps,
|
||||||
|
gresource_bundle: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: pkgdatadir
|
||||||
|
)
|
||||||
|
|
||||||
|
perfconf = configuration_data()
|
||||||
|
perfconf.set('datadir', datadir)
|
||||||
|
configure_file(
|
||||||
|
input: 'perf-background.xml.in',
|
||||||
|
output: 'perf-background.xml',
|
||||||
|
configuration: perfconf,
|
||||||
|
install_dir: pkgdatadir
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
install_data('gnome-shell.portal', install_dir: portaldir)
|
||||||
|
install_data('50-gnome-shell-system.xml', install_dir: keysdir)
|
||||||
|
|
||||||
|
|
||||||
|
schemaconf = configuration_data()
|
||||||
|
schemaconf.set('GETTEXT_PACKAGE', meson.project_name())
|
||||||
|
configure_file(
|
||||||
|
input: 'org.gnome.shell.gschema.xml.in',
|
||||||
|
output: 'org.gnome.shell.gschema.xml',
|
||||||
|
configuration: schemaconf,
|
||||||
|
install_dir: schemadir
|
||||||
|
)
|
||||||
|
|
||||||
|
install_data('gnome-shell-overrides.convert', install_dir: convertdir)
|
@@ -221,11 +221,30 @@ StScrollBar {
|
|||||||
color: #d6d6d1;
|
color: #d6d6d1;
|
||||||
padding-bottom: .4em; }
|
padding-bottom: .4em; }
|
||||||
|
|
||||||
.show-processes-dialog-subject,
|
.mount-dialog-subject,
|
||||||
.mount-question-dialog-subject,
|
|
||||||
.end-session-dialog-subject {
|
.end-session-dialog-subject {
|
||||||
font-size: 14pt; }
|
font-size: 14pt; }
|
||||||
|
|
||||||
|
/* Message Dialog */
|
||||||
|
.message-dialog-main-layout {
|
||||||
|
padding: 12px 20px 0;
|
||||||
|
spacing: 12px; }
|
||||||
|
|
||||||
|
.message-dialog-content {
|
||||||
|
max-width: 28em;
|
||||||
|
spacing: 20px; }
|
||||||
|
|
||||||
|
.message-dialog-icon {
|
||||||
|
min-width: 48px;
|
||||||
|
icon-size: 48px; }
|
||||||
|
|
||||||
|
.message-dialog-title {
|
||||||
|
font-weight: bold; }
|
||||||
|
|
||||||
|
.message-dialog-subtitle {
|
||||||
|
color: #999999;
|
||||||
|
font-weight: bold; }
|
||||||
|
|
||||||
/* End Session Dialog */
|
/* End Session Dialog */
|
||||||
.end-session-dialog {
|
.end-session-dialog {
|
||||||
spacing: 42px;
|
spacing: 42px;
|
||||||
@@ -294,76 +313,62 @@ StScrollBar {
|
|||||||
.shell-mount-operation-icon {
|
.shell-mount-operation-icon {
|
||||||
icon-size: 48px; }
|
icon-size: 48px; }
|
||||||
|
|
||||||
.show-processes-dialog,
|
.mount-dialog {
|
||||||
.mount-question-dialog {
|
|
||||||
spacing: 24px; }
|
spacing: 24px; }
|
||||||
|
.mount-dialog .message-dialog-title {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
max-width: 34em; }
|
||||||
|
.mount-dialog .message-dialog-title:rtl {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 17px; }
|
||||||
|
.mount-dialog .message-dialog-body {
|
||||||
|
padding-left: 17px;
|
||||||
|
width: 28em; }
|
||||||
|
.mount-dialog .message-dialog-body:rtl {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 17px; }
|
||||||
|
|
||||||
.show-processes-dialog-subject,
|
.mount-dialog-app-list {
|
||||||
.mount-question-dialog-subject {
|
|
||||||
padding-top: 10px;
|
|
||||||
padding-left: 17px;
|
|
||||||
padding-bottom: 6px; }
|
|
||||||
|
|
||||||
.mount-question-dialog-subject {
|
|
||||||
max-width: 34em; }
|
|
||||||
|
|
||||||
.show-processes-dialog-subject:rtl,
|
|
||||||
.mount-question-dialog-subject:rtl {
|
|
||||||
padding-left: 0px;
|
|
||||||
padding-right: 17px; }
|
|
||||||
|
|
||||||
.show-processes-dialog-description,
|
|
||||||
.mount-question-dialog-description {
|
|
||||||
padding-left: 17px;
|
|
||||||
width: 28em; }
|
|
||||||
|
|
||||||
.show-processes-dialog-description:rtl,
|
|
||||||
.mount-question-dialog-description:rtl {
|
|
||||||
padding-right: 17px; }
|
|
||||||
|
|
||||||
.show-processes-dialog-app-list {
|
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
padding-left: 49px;
|
padding-left: 49px;
|
||||||
padding-right: 32px; }
|
padding-right: 32px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list:rtl {
|
.mount-dialog-app-list:rtl {
|
||||||
padding-right: 49px;
|
padding-right: 49px;
|
||||||
padding-left: 32px; }
|
padding-left: 32px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item {
|
.mount-dialog-app-list-item {
|
||||||
color: #e6e6e6; }
|
color: #e6e6e6; }
|
||||||
.show-processes-dialog-app-list-item:hover {
|
.mount-dialog-app-list-item:hover {
|
||||||
color: #fff; }
|
color: #fff; }
|
||||||
.show-processes-dialog-app-list-item:ltr {
|
.mount-dialog-app-list-item:ltr {
|
||||||
padding-right: 1em; }
|
padding-right: 1em; }
|
||||||
.show-processes-dialog-app-list-item:rtl {
|
.mount-dialog-app-list-item:rtl {
|
||||||
padding-left: 1em; }
|
padding-left: 1em; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item-icon:ltr {
|
.mount-dialog-app-list-item-icon:ltr {
|
||||||
padding-right: 17px; }
|
padding-right: 17px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item-icon:rtl {
|
.mount-dialog-app-list-item-icon:rtl {
|
||||||
padding-left: 17px; }
|
padding-left: 17px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item-name {
|
.mount-dialog-app-list-item-name {
|
||||||
font-size: 10pt; }
|
font-size: 10pt; }
|
||||||
|
|
||||||
/* Password or Authentication Dialog */
|
/* Password or Authentication Dialog */
|
||||||
.prompt-dialog {
|
.prompt-dialog {
|
||||||
width: 34em;
|
width: 34em;
|
||||||
border: 3px solid rgba(238, 238, 236, 0.2); }
|
border: 3px solid rgba(238, 238, 236, 0.2); }
|
||||||
|
.prompt-dialog .message-dialog-main-layout {
|
||||||
.prompt-dialog-main-layout {
|
spacing: 24px;
|
||||||
spacing: 24px;
|
padding: 10px; }
|
||||||
padding: 10px; }
|
.prompt-dialog .message-dialog-content {
|
||||||
|
spacing: 16px; }
|
||||||
.prompt-dialog-message-layout {
|
.prompt-dialog .message-dialog-title {
|
||||||
spacing: 16px; }
|
color: #b2b2a9; }
|
||||||
|
|
||||||
.prompt-dialog-headline {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #b2b2a9; }
|
|
||||||
|
|
||||||
.prompt-dialog-description:rtl {
|
.prompt-dialog-description:rtl {
|
||||||
text-align: right; }
|
text-align: right; }
|
||||||
@@ -437,44 +442,17 @@ StScrollBar {
|
|||||||
.access-dialog {
|
.access-dialog {
|
||||||
spacing: 30px; }
|
spacing: 30px; }
|
||||||
|
|
||||||
.access-dialog-main-layout {
|
|
||||||
padding: 12px 20px 0;
|
|
||||||
spacing: 12px; }
|
|
||||||
|
|
||||||
.access-dialog-content {
|
|
||||||
max-width: 28em;
|
|
||||||
spacing: 20px; }
|
|
||||||
|
|
||||||
.access-dialog-icon {
|
|
||||||
min-width: 48px;
|
|
||||||
icon-size: 48px; }
|
|
||||||
|
|
||||||
.access-dialog-title {
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
.access-dialog-subtitle {
|
|
||||||
color: #999999;
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
/* Geolocation Dialog */
|
/* Geolocation Dialog */
|
||||||
.geolocation-dialog {
|
.geolocation-dialog {
|
||||||
spacing: 30px; }
|
spacing: 30px; }
|
||||||
|
|
||||||
.geolocation-dialog-main-layout {
|
/* Extension Dialog */
|
||||||
spacing: 12px; }
|
.extension-dialog .message-dialog-main-layout {
|
||||||
|
spacing: 24px;
|
||||||
|
padding: 10px; }
|
||||||
|
|
||||||
.geolocation-dialog-content {
|
.extension-dialog .message-dialog-title {
|
||||||
spacing: 20px; }
|
color: #b2b2a9; }
|
||||||
|
|
||||||
.geolocation-dialog-icon {
|
|
||||||
icon-size: 48px; }
|
|
||||||
|
|
||||||
.geolocation-dialog-title {
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
.geolocation-dialog-reason {
|
|
||||||
color: #999999;
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
/* Network Agent Dialog */
|
/* Network Agent Dialog */
|
||||||
.network-dialog-secret-table {
|
.network-dialog-secret-table {
|
||||||
@@ -1172,31 +1150,30 @@ StScrollBar {
|
|||||||
spacing: 3px; }
|
spacing: 3px; }
|
||||||
|
|
||||||
.search-section-separator {
|
.search-section-separator {
|
||||||
-gradient-height: 1px;
|
height: 2px;
|
||||||
-gradient-start: rgba(255, 255, 255, 0);
|
background-color: rgba(255, 255, 255, 0.2); }
|
||||||
-gradient-end: rgba(255, 255, 255, 0.1);
|
|
||||||
-margin-horizontal: 1.5em;
|
|
||||||
height: 1px; }
|
|
||||||
|
|
||||||
.list-search-result-content {
|
.list-search-result-content {
|
||||||
spacing: 12px;
|
spacing: 30px; }
|
||||||
padding: 12px; }
|
|
||||||
|
|
||||||
.list-search-result-title {
|
.list-search-result-title {
|
||||||
font-size: 1.5em;
|
color: #e2e2df;
|
||||||
color: #e2e2df; }
|
spacing: 12px; }
|
||||||
|
|
||||||
.list-search-result-description {
|
.list-search-result-description {
|
||||||
color: #cacac4; }
|
color: rgba(202, 202, 196, 0.5); }
|
||||||
|
|
||||||
|
.list-search-provider-details {
|
||||||
|
width: 150px;
|
||||||
|
color: #e2e2df;
|
||||||
|
margin-top: 0.24em; }
|
||||||
|
|
||||||
|
.list-search-provider-content {
|
||||||
|
spacing: 20px; }
|
||||||
|
|
||||||
.search-provider-icon {
|
.search-provider-icon {
|
||||||
padding: 15px; }
|
padding: 15px; }
|
||||||
|
|
||||||
.search-provider-icon-more {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
background-image: url("resource:///org/gnome/shell/theme/more-results.svg"); }
|
|
||||||
|
|
||||||
/* DASHBOARD */
|
/* DASHBOARD */
|
||||||
#dash {
|
#dash {
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
@@ -1724,7 +1701,7 @@ StScrollBar {
|
|||||||
spacing: 12px;
|
spacing: 12px;
|
||||||
padding: .2em;
|
padding: .2em;
|
||||||
width: 23em; }
|
width: 23em; }
|
||||||
.login-dialog-user-list:expanded .login-dialog-user-list-item:focus {
|
.login-dialog-user-list:expanded .login-dialog-user-list-item:selected {
|
||||||
background-color: #215d9c;
|
background-color: #215d9c;
|
||||||
color: #ffffff; }
|
color: #ffffff; }
|
||||||
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
|
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
|
||||||
@@ -1738,9 +1715,6 @@ StScrollBar {
|
|||||||
padding-right: 1em; }
|
padding-right: 1em; }
|
||||||
.login-dialog-user-list-item:rtl {
|
.login-dialog-user-list-item:rtl {
|
||||||
padding-left: 1em; }
|
padding-left: 1em; }
|
||||||
.login-dialog-user-list-item:hover {
|
|
||||||
background-color: #215d9c;
|
|
||||||
color: #ffffff; }
|
|
||||||
.login-dialog-user-list-item .login-dialog-timed-login-indicator {
|
.login-dialog-user-list-item .login-dialog-timed-login-indicator {
|
||||||
height: 2px;
|
height: 2px;
|
||||||
margin: 2px 0 0 0;
|
margin: 2px 0 0 0;
|
||||||
|
Submodule data/theme/gnome-shell-sass updated: 2bef9b25e2...82941c9d93
@@ -221,11 +221,30 @@ StScrollBar {
|
|||||||
color: #d6d6d1;
|
color: #d6d6d1;
|
||||||
padding-bottom: .4em; }
|
padding-bottom: .4em; }
|
||||||
|
|
||||||
.show-processes-dialog-subject,
|
.mount-dialog-subject,
|
||||||
.mount-question-dialog-subject,
|
|
||||||
.end-session-dialog-subject {
|
.end-session-dialog-subject {
|
||||||
font-size: 14pt; }
|
font-size: 14pt; }
|
||||||
|
|
||||||
|
/* Message Dialog */
|
||||||
|
.message-dialog-main-layout {
|
||||||
|
padding: 12px 20px 0;
|
||||||
|
spacing: 12px; }
|
||||||
|
|
||||||
|
.message-dialog-content {
|
||||||
|
max-width: 28em;
|
||||||
|
spacing: 20px; }
|
||||||
|
|
||||||
|
.message-dialog-icon {
|
||||||
|
min-width: 48px;
|
||||||
|
icon-size: 48px; }
|
||||||
|
|
||||||
|
.message-dialog-title {
|
||||||
|
font-weight: bold; }
|
||||||
|
|
||||||
|
.message-dialog-subtitle {
|
||||||
|
color: #8e8e80;
|
||||||
|
font-weight: bold; }
|
||||||
|
|
||||||
/* End Session Dialog */
|
/* End Session Dialog */
|
||||||
.end-session-dialog {
|
.end-session-dialog {
|
||||||
spacing: 42px;
|
spacing: 42px;
|
||||||
@@ -294,76 +313,62 @@ StScrollBar {
|
|||||||
.shell-mount-operation-icon {
|
.shell-mount-operation-icon {
|
||||||
icon-size: 48px; }
|
icon-size: 48px; }
|
||||||
|
|
||||||
.show-processes-dialog,
|
.mount-dialog {
|
||||||
.mount-question-dialog {
|
|
||||||
spacing: 24px; }
|
spacing: 24px; }
|
||||||
|
.mount-dialog .message-dialog-title {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-left: 17px;
|
||||||
|
padding-bottom: 6px;
|
||||||
|
max-width: 34em; }
|
||||||
|
.mount-dialog .message-dialog-title:rtl {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 17px; }
|
||||||
|
.mount-dialog .message-dialog-body {
|
||||||
|
padding-left: 17px;
|
||||||
|
width: 28em; }
|
||||||
|
.mount-dialog .message-dialog-body:rtl {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 17px; }
|
||||||
|
|
||||||
.show-processes-dialog-subject,
|
.mount-dialog-app-list {
|
||||||
.mount-question-dialog-subject {
|
|
||||||
padding-top: 10px;
|
|
||||||
padding-left: 17px;
|
|
||||||
padding-bottom: 6px; }
|
|
||||||
|
|
||||||
.mount-question-dialog-subject {
|
|
||||||
max-width: 34em; }
|
|
||||||
|
|
||||||
.show-processes-dialog-subject:rtl,
|
|
||||||
.mount-question-dialog-subject:rtl {
|
|
||||||
padding-left: 0px;
|
|
||||||
padding-right: 17px; }
|
|
||||||
|
|
||||||
.show-processes-dialog-description,
|
|
||||||
.mount-question-dialog-description {
|
|
||||||
padding-left: 17px;
|
|
||||||
width: 28em; }
|
|
||||||
|
|
||||||
.show-processes-dialog-description:rtl,
|
|
||||||
.mount-question-dialog-description:rtl {
|
|
||||||
padding-right: 17px; }
|
|
||||||
|
|
||||||
.show-processes-dialog-app-list {
|
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
padding-left: 49px;
|
padding-left: 49px;
|
||||||
padding-right: 32px; }
|
padding-right: 32px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list:rtl {
|
.mount-dialog-app-list:rtl {
|
||||||
padding-right: 49px;
|
padding-right: 49px;
|
||||||
padding-left: 32px; }
|
padding-left: 32px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item {
|
.mount-dialog-app-list-item {
|
||||||
color: #d6d6d1; }
|
color: #d6d6d1; }
|
||||||
.show-processes-dialog-app-list-item:hover {
|
.mount-dialog-app-list-item:hover {
|
||||||
color: #eeeeec; }
|
color: #eeeeec; }
|
||||||
.show-processes-dialog-app-list-item:ltr {
|
.mount-dialog-app-list-item:ltr {
|
||||||
padding-right: 1em; }
|
padding-right: 1em; }
|
||||||
.show-processes-dialog-app-list-item:rtl {
|
.mount-dialog-app-list-item:rtl {
|
||||||
padding-left: 1em; }
|
padding-left: 1em; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item-icon:ltr {
|
.mount-dialog-app-list-item-icon:ltr {
|
||||||
padding-right: 17px; }
|
padding-right: 17px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item-icon:rtl {
|
.mount-dialog-app-list-item-icon:rtl {
|
||||||
padding-left: 17px; }
|
padding-left: 17px; }
|
||||||
|
|
||||||
.show-processes-dialog-app-list-item-name {
|
.mount-dialog-app-list-item-name {
|
||||||
font-size: 10pt; }
|
font-size: 10pt; }
|
||||||
|
|
||||||
/* Password or Authentication Dialog */
|
/* Password or Authentication Dialog */
|
||||||
.prompt-dialog {
|
.prompt-dialog {
|
||||||
width: 34em;
|
width: 34em;
|
||||||
border: 3px solid rgba(238, 238, 236, 0.2); }
|
border: 3px solid rgba(238, 238, 236, 0.2); }
|
||||||
|
.prompt-dialog .message-dialog-main-layout {
|
||||||
.prompt-dialog-main-layout {
|
spacing: 24px;
|
||||||
spacing: 24px;
|
padding: 10px; }
|
||||||
padding: 10px; }
|
.prompt-dialog .message-dialog-content {
|
||||||
|
spacing: 16px; }
|
||||||
.prompt-dialog-message-layout {
|
.prompt-dialog .message-dialog-title {
|
||||||
spacing: 16px; }
|
color: #b2b2a9; }
|
||||||
|
|
||||||
.prompt-dialog-headline {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #b2b2a9; }
|
|
||||||
|
|
||||||
.prompt-dialog-description:rtl {
|
.prompt-dialog-description:rtl {
|
||||||
text-align: right; }
|
text-align: right; }
|
||||||
@@ -437,44 +442,17 @@ StScrollBar {
|
|||||||
.access-dialog {
|
.access-dialog {
|
||||||
spacing: 30px; }
|
spacing: 30px; }
|
||||||
|
|
||||||
.access-dialog-main-layout {
|
|
||||||
padding: 12px 20px 0;
|
|
||||||
spacing: 12px; }
|
|
||||||
|
|
||||||
.access-dialog-content {
|
|
||||||
max-width: 28em;
|
|
||||||
spacing: 20px; }
|
|
||||||
|
|
||||||
.access-dialog-icon {
|
|
||||||
min-width: 48px;
|
|
||||||
icon-size: 48px; }
|
|
||||||
|
|
||||||
.access-dialog-title {
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
.access-dialog-subtitle {
|
|
||||||
color: #8e8e80;
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
/* Geolocation Dialog */
|
/* Geolocation Dialog */
|
||||||
.geolocation-dialog {
|
.geolocation-dialog {
|
||||||
spacing: 30px; }
|
spacing: 30px; }
|
||||||
|
|
||||||
.geolocation-dialog-main-layout {
|
/* Extension Dialog */
|
||||||
spacing: 12px; }
|
.extension-dialog .message-dialog-main-layout {
|
||||||
|
spacing: 24px;
|
||||||
|
padding: 10px; }
|
||||||
|
|
||||||
.geolocation-dialog-content {
|
.extension-dialog .message-dialog-title {
|
||||||
spacing: 20px; }
|
color: #b2b2a9; }
|
||||||
|
|
||||||
.geolocation-dialog-icon {
|
|
||||||
icon-size: 48px; }
|
|
||||||
|
|
||||||
.geolocation-dialog-title {
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
.geolocation-dialog-reason {
|
|
||||||
color: #8e8e80;
|
|
||||||
font-weight: bold; }
|
|
||||||
|
|
||||||
/* Network Agent Dialog */
|
/* Network Agent Dialog */
|
||||||
.network-dialog-secret-table {
|
.network-dialog-secret-table {
|
||||||
@@ -1172,31 +1150,30 @@ StScrollBar {
|
|||||||
spacing: 3px; }
|
spacing: 3px; }
|
||||||
|
|
||||||
.search-section-separator {
|
.search-section-separator {
|
||||||
-gradient-height: 1px;
|
height: 2px;
|
||||||
-gradient-start: rgba(255, 255, 255, 0);
|
background-color: rgba(255, 255, 255, 0.2); }
|
||||||
-gradient-end: rgba(255, 255, 255, 0.1);
|
|
||||||
-margin-horizontal: 1.5em;
|
|
||||||
height: 1px; }
|
|
||||||
|
|
||||||
.list-search-result-content {
|
.list-search-result-content {
|
||||||
spacing: 12px;
|
spacing: 30px; }
|
||||||
padding: 12px; }
|
|
||||||
|
|
||||||
.list-search-result-title {
|
.list-search-result-title {
|
||||||
font-size: 1.5em;
|
color: #e2e2df;
|
||||||
color: #e2e2df; }
|
spacing: 12px; }
|
||||||
|
|
||||||
.list-search-result-description {
|
.list-search-result-description {
|
||||||
color: #cacac4; }
|
color: rgba(202, 202, 196, 0.5); }
|
||||||
|
|
||||||
|
.list-search-provider-details {
|
||||||
|
width: 150px;
|
||||||
|
color: #e2e2df;
|
||||||
|
margin-top: 0.24em; }
|
||||||
|
|
||||||
|
.list-search-provider-content {
|
||||||
|
spacing: 20px; }
|
||||||
|
|
||||||
.search-provider-icon {
|
.search-provider-icon {
|
||||||
padding: 15px; }
|
padding: 15px; }
|
||||||
|
|
||||||
.search-provider-icon-more {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
background-image: url("resource:///org/gnome/shell/theme/more-results.svg"); }
|
|
||||||
|
|
||||||
/* DASHBOARD */
|
/* DASHBOARD */
|
||||||
#dash {
|
#dash {
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
@@ -1724,7 +1701,7 @@ StScrollBar {
|
|||||||
spacing: 12px;
|
spacing: 12px;
|
||||||
padding: .2em;
|
padding: .2em;
|
||||||
width: 23em; }
|
width: 23em; }
|
||||||
.login-dialog-user-list:expanded .login-dialog-user-list-item:focus {
|
.login-dialog-user-list:expanded .login-dialog-user-list-item:selected {
|
||||||
background-color: #215d9c;
|
background-color: #215d9c;
|
||||||
color: #ffffff; }
|
color: #ffffff; }
|
||||||
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
|
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
|
||||||
@@ -1738,9 +1715,6 @@ StScrollBar {
|
|||||||
padding-right: 1em; }
|
padding-right: 1em; }
|
||||||
.login-dialog-user-list-item:rtl {
|
.login-dialog-user-list-item:rtl {
|
||||||
padding-left: 1em; }
|
padding-left: 1em; }
|
||||||
.login-dialog-user-list-item:hover {
|
|
||||||
background-color: #215d9c;
|
|
||||||
color: #ffffff; }
|
|
||||||
.login-dialog-user-list-item .login-dialog-timed-login-indicator {
|
.login-dialog-user-list-item .login-dialog-timed-login-indicator {
|
||||||
height: 2px;
|
height: 2px;
|
||||||
margin: 2px 0 0 0;
|
margin: 2px 0 0 0;
|
||||||
|
21
data/theme/meson.build
Normal file
21
data/theme/meson.build
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
theme_sources = files([
|
||||||
|
'gnome-shell-high-contrast.scss',
|
||||||
|
'gnome-shell.scss',
|
||||||
|
'gnome-shell-sass/_colors.scss',
|
||||||
|
'gnome-shell-sass/_common.scss',
|
||||||
|
'gnome-shell-sass/_drawing.scss',
|
||||||
|
'gnome-shell-sass/_high-contrast-colors.scss'
|
||||||
|
])
|
||||||
|
|
||||||
|
theme_deps = []
|
||||||
|
|
||||||
|
if sassc.found()
|
||||||
|
parse_sass = files('parse-sass.sh')
|
||||||
|
|
||||||
|
theme_deps += custom_target('update-theme',
|
||||||
|
output: 'theme-update.stamp',
|
||||||
|
depend_files: theme_sources,
|
||||||
|
command: [parse_sass, '@OUTPUT@'],
|
||||||
|
build_by_default: true
|
||||||
|
)
|
||||||
|
endif
|
@@ -1,114 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="16"
|
|
||||||
height="16"
|
|
||||||
id="svg12430"
|
|
||||||
version="1.1"
|
|
||||||
inkscape:version="0.48.4 r9939"
|
|
||||||
sodipodi:docname="more-results.svg">
|
|
||||||
<defs
|
|
||||||
id="defs12432" />
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#7a7a7a"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="1"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="90.509668"
|
|
||||||
inkscape:cx="6.5009792"
|
|
||||||
inkscape:cy="8.3589595"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="g14642-3-0"
|
|
||||||
showgrid="false"
|
|
||||||
borderlayer="true"
|
|
||||||
inkscape:showpageshadow="false"
|
|
||||||
inkscape:window-width="1440"
|
|
||||||
inkscape:window-height="840"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="27"
|
|
||||||
inkscape:window-maximized="1">
|
|
||||||
<inkscape:grid
|
|
||||||
type="xygrid"
|
|
||||||
id="grid13002" />
|
|
||||||
</sodipodi:namedview>
|
|
||||||
<metadata
|
|
||||||
id="metadata12435">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1"
|
|
||||||
transform="translate(0,-1036.3622)">
|
|
||||||
<g
|
|
||||||
style="display:inline"
|
|
||||||
transform="translate(-141.99984,638.37113)"
|
|
||||||
inkscape:label="zoom-in"
|
|
||||||
id="g14642-3-0">
|
|
||||||
<path
|
|
||||||
sodipodi:type="inkscape:offset"
|
|
||||||
inkscape:radius="0"
|
|
||||||
inkscape:original="M 145.1875 400 C 144.5248 400 144 400.54899 144 401.21875 L 144 410.78125 C 144 411.45101 144.5248 412 145.1875 412 L 154.8125 412 C 155.4752 412 156 411.45101 156 410.78125 L 156 401.21875 C 156 400.54899 155.4752 400 154.8125 400 L 145.1875 400 z M 149 403 L 151 403 L 151 405 L 153 405 L 153 407 L 151 407 L 151 409 L 149 409 L 149 407 L 147 407 L 147 405 L 149 405 L 149 403 z "
|
|
||||||
xlink:href="#rect11749-5-0-1-8"
|
|
||||||
style="color:#bebebe;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;opacity:0.8"
|
|
||||||
id="path13004"
|
|
||||||
inkscape:href="#rect11749-5-0-1-8"
|
|
||||||
d="M 145.1875,400 C 144.5248,400 144,400.54899 144,401.21875 l 0,9.5625 c 0,0.66976 0.5248,1.21875 1.1875,1.21875 l 9.625,0 c 0.6627,0 1.1875,-0.54899 1.1875,-1.21875 l 0,-9.5625 C 156,400.54899 155.4752,400 154.8125,400 L 145.1875,400 z m 3.8125,3 2,0 0,2 2,0 0,2 -2,0 0,2 -2,0 0,-2 -2,0 0,-2 2,0 L 149,403 Z"
|
|
||||||
transform="translate(0,1)" />
|
|
||||||
<use
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
xlink:href="#path13004"
|
|
||||||
id="use11960"
|
|
||||||
transform="translate(1,-1)"
|
|
||||||
width="16"
|
|
||||||
height="16" />
|
|
||||||
<use
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
xlink:href="#use11960"
|
|
||||||
id="use11962"
|
|
||||||
transform="translate(-2,0)"
|
|
||||||
width="16"
|
|
||||||
height="16" />
|
|
||||||
<path
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
|
|
||||||
d="M 7 5 L 7 7 L 5 7 L 5 9 L 7 9 L 7 11 L 9 11 L 9 9 L 11 9 L 11 7 L 9 7 L 9 5 L 7 5 z "
|
|
||||||
transform="translate(141.99984,397.99107)"
|
|
||||||
id="rect3757" />
|
|
||||||
<path
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
style="color:#bebebe;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 145.1875,400 C 144.5248,400 144,400.54899 144,401.21875 l 0,9.5625 c 0,0.66976 0.5248,1.21875 1.1875,1.21875 l 9.625,0 c 0.6627,0 1.1875,-0.54899 1.1875,-1.21875 l 0,-9.5625 C 156,400.54899 155.4752,400 154.8125,400 L 145.1875,400 z m 3.8125,3 2,0 0,2 2,0 0,2 -2,0 0,2 -2,0 0,-2 -2,0 0,-2 2,0 L 149,403 Z"
|
|
||||||
id="rect11749-5-0-1-8" />
|
|
||||||
<rect
|
|
||||||
style="fill:none;stroke:none"
|
|
||||||
id="rect3620-5-4"
|
|
||||||
width="15.981825"
|
|
||||||
height="16"
|
|
||||||
x="142"
|
|
||||||
y="398"
|
|
||||||
rx="0"
|
|
||||||
ry="0" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 4.4 KiB |
@@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/sh
|
#!/usr/bin/sh
|
||||||
|
|
||||||
srcdir=`dirname $0`
|
srcdir=`dirname $0`
|
||||||
|
stamp=${1}
|
||||||
for scss in $srcdir/*.scss
|
for scss in $srcdir/*.scss
|
||||||
do
|
do
|
||||||
sassc -a $scss ${scss%%.scss}.css
|
sassc -a $scss ${scss%%.scss}.css || exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ "$stamp" ] && touch $stamp
|
||||||
|
5
docs/reference/meson.build
Normal file
5
docs/reference/meson.build
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
version_conf = configuration_data()
|
||||||
|
version_conf.set('VERSION', meson.project_version())
|
||||||
|
|
||||||
|
subdir('shell')
|
||||||
|
subdir('st')
|
@@ -120,7 +120,7 @@ include $(top_srcdir)/gtk-doc.make
|
|||||||
|
|
||||||
# Other files to distribute
|
# Other files to distribute
|
||||||
# e.g. EXTRA_DIST += version.xml.in
|
# e.g. EXTRA_DIST += version.xml.in
|
||||||
EXTRA_DIST +=
|
EXTRA_DIST += version.xml.in
|
||||||
|
|
||||||
# Files not to distribute
|
# Files not to distribute
|
||||||
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
||||||
|
57
docs/reference/shell/meson.build
Normal file
57
docs/reference/shell/meson.build
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
private_headers = [
|
||||||
|
'gactionmuxer.h',
|
||||||
|
'gactionobservable.h',
|
||||||
|
'gactionobserver.h',
|
||||||
|
'shell-network-agent.h',
|
||||||
|
'shell-recorder-src.h'
|
||||||
|
]
|
||||||
|
|
||||||
|
if not enable_recorder
|
||||||
|
private_headers += 'shell-recorder.h'
|
||||||
|
endif
|
||||||
|
|
||||||
|
exclude_directories = [
|
||||||
|
'calendar-server',
|
||||||
|
'hotplug-sniffer',
|
||||||
|
'st',
|
||||||
|
'tray'
|
||||||
|
]
|
||||||
|
|
||||||
|
ifaces = [
|
||||||
|
['org.gnome.Shell.Screenshot', 'org.gnome.Shell.Screenshot.xml'],
|
||||||
|
['org.gnome.ShellSearchProvider', 'org.gnome.Shell.SearchProvider.xml'],
|
||||||
|
['org.gnome.ShellSearchProvider2', 'org.gnome.Shell.SearchProvider2.xml']
|
||||||
|
]
|
||||||
|
foreach iface : ifaces
|
||||||
|
custom_target(iface[0] + ' docs',
|
||||||
|
input: '../../../data/@0@.xml'.format(iface[0]),
|
||||||
|
output: 'doc-gen-' + iface[1],
|
||||||
|
command: [
|
||||||
|
'gdbus-codegen',
|
||||||
|
'--interface-prefix=@0@.'.format(iface),
|
||||||
|
'--generate-docbook', 'doc-gen',
|
||||||
|
'--output-directory', '@OUTDIR@',
|
||||||
|
'@INPUT@'
|
||||||
|
],
|
||||||
|
build_by_default: true
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
input: 'version.xml.in',
|
||||||
|
output: 'version.xml',
|
||||||
|
configuration: version_conf
|
||||||
|
)
|
||||||
|
|
||||||
|
gnome.gtkdoc('shell',
|
||||||
|
main_sgml: 'shell-docs.sgml',
|
||||||
|
src_dir: [
|
||||||
|
join_paths(meson.source_root(), 'src'),
|
||||||
|
join_paths(meson.build_root(), 'src')
|
||||||
|
],
|
||||||
|
scan_args: [
|
||||||
|
'--ignore-headers=' + ' '.join(private_headers + exclude_directories),
|
||||||
|
'--rebuild-types'
|
||||||
|
],
|
||||||
|
install: true
|
||||||
|
)
|
@@ -3,12 +3,13 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
||||||
[
|
[
|
||||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||||
|
<!ENTITY version SYSTEM "version.xml">
|
||||||
]>
|
]>
|
||||||
<book id="index">
|
<book id="index">
|
||||||
<bookinfo>
|
<bookinfo>
|
||||||
<title>Shell Reference Manual</title>
|
<title>Shell Reference Manual</title>
|
||||||
<releaseinfo>
|
<releaseinfo>
|
||||||
for Shell @VERSION@.
|
for Shell &version;.
|
||||||
<!--The latest version of this documentation can be found on-line at
|
<!--The latest version of this documentation can be found on-line at
|
||||||
<ulink role="online-location" url="http://[SERVER]/shell/index.html">http://[SERVER]/shell/</ulink>.-->
|
<ulink role="online-location" url="http://[SERVER]/shell/index.html">http://[SERVER]/shell/</ulink>.-->
|
||||||
</releaseinfo>
|
</releaseinfo>
|
||||||
@@ -51,10 +52,15 @@
|
|||||||
<xi:include href="xml/shell-mount-operation.xml"/>
|
<xi:include href="xml/shell-mount-operation.xml"/>
|
||||||
<xi:include href="xml/shell-polkit-authentication-agent.xml"/>
|
<xi:include href="xml/shell-polkit-authentication-agent.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
<!-- FIXME:
|
||||||
|
Not generated at the moment, find out whether to blame gtk-doc or meson
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
<chapter id="object-tree">
|
<chapter id="object-tree">
|
||||||
<title>Object Hierarchy</title>
|
<title>Object Hierarchy</title>
|
||||||
<xi:include href="xml/tree_index.sgml"/>
|
<xi:include href="xml/tree_index.sgml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
-->
|
||||||
<index id="api-index-full">
|
<index id="api-index-full">
|
||||||
<title>API Index</title>
|
<title>API Index</title>
|
||||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
1
docs/reference/shell/version.xml.in
Normal file
1
docs/reference/shell/version.xml.in
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@VERSION@
|
@@ -85,7 +85,7 @@ include $(top_srcdir)/gtk-doc.make
|
|||||||
|
|
||||||
# Other files to distribute
|
# Other files to distribute
|
||||||
# e.g. EXTRA_DIST += version.xml.in
|
# e.g. EXTRA_DIST += version.xml.in
|
||||||
EXTRA_DIST +=
|
EXTRA_DIST += version.xml.in
|
||||||
|
|
||||||
# Files not to distribute
|
# Files not to distribute
|
||||||
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
||||||
|
24
docs/reference/st/meson.build
Normal file
24
docs/reference/st/meson.build
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
private_headers = [
|
||||||
|
'st-private.h',
|
||||||
|
'st-theme-node-private.h'
|
||||||
|
]
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
input: 'version.xml.in',
|
||||||
|
output: 'version.xml',
|
||||||
|
configuration: version_conf
|
||||||
|
)
|
||||||
|
|
||||||
|
gnome.gtkdoc('st',
|
||||||
|
main_sgml: 'st-docs.sgml',
|
||||||
|
src_dir: [
|
||||||
|
join_paths(meson.source_root(), 'src', 'st'),
|
||||||
|
join_paths(meson.build_root(), 'src', 'st')
|
||||||
|
],
|
||||||
|
scan_args: [
|
||||||
|
'--ignore-headers=' + ' '.join(private_headers),
|
||||||
|
'--rebuild-sections',
|
||||||
|
'--rebuild-types'
|
||||||
|
],
|
||||||
|
install: true
|
||||||
|
)
|
@@ -3,12 +3,13 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
|
||||||
[
|
[
|
||||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||||
|
<!ENTITY version SYSTEM "version.xml">
|
||||||
]>
|
]>
|
||||||
<book id="index">
|
<book id="index">
|
||||||
<bookinfo>
|
<bookinfo>
|
||||||
<title>St Reference Manual</title>
|
<title>St Reference Manual</title>
|
||||||
<releaseinfo>
|
<releaseinfo>
|
||||||
for St @VERSION@.
|
for St &version;.
|
||||||
<!--The latest version of this documentation can be found on-line at
|
<!--The latest version of this documentation can be found on-line at
|
||||||
<ulink role="online-location" url="http://[SERVER]/st/index.html">http://[SERVER]/st/</ulink>.-->
|
<ulink role="online-location" url="http://[SERVER]/st/index.html">http://[SERVER]/st/</ulink>.-->
|
||||||
</releaseinfo>
|
</releaseinfo>
|
||||||
@@ -46,10 +47,15 @@
|
|||||||
<xi:include href="xml/st-texture-cache.xml"/>
|
<xi:include href="xml/st-texture-cache.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
</part>
|
</part>
|
||||||
|
<!-- FIXME:
|
||||||
|
Not generated at the moment, find out whether to blame gtk-doc or meson
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
<chapter id="object-tree">
|
<chapter id="object-tree">
|
||||||
<title>Object Hierarchy</title>
|
<title>Object Hierarchy</title>
|
||||||
<xi:include href="xml/tree_index.sgml"/>
|
<xi:include href="xml/tree_index.sgml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
-->
|
||||||
<index id="api-index-full">
|
<index id="api-index-full">
|
||||||
<title>API Index</title>
|
<title>API Index</title>
|
||||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
1
docs/reference/st/version.xml.in
Normal file
1
docs/reference/st/version.xml.in
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@VERSION@
|
@@ -32,7 +32,7 @@ function stripPrefix(string, prefix) {
|
|||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Application = new Lang.Class({
|
var Application = new Lang.Class({
|
||||||
Name: 'Application',
|
Name: 'Application',
|
||||||
_init: function() {
|
_init: function() {
|
||||||
GLib.set_prgname('gnome-shell-extension-prefs');
|
GLib.set_prgname('gnome-shell-extension-prefs');
|
||||||
@@ -253,7 +253,7 @@ const Application = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const DescriptionLabel = new Lang.Class({
|
var DescriptionLabel = new Lang.Class({
|
||||||
Name: 'DescriptionLabel',
|
Name: 'DescriptionLabel',
|
||||||
Extends: Gtk.Label,
|
Extends: Gtk.Label,
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ const DescriptionLabel = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ExtensionRow = new Lang.Class({
|
var ExtensionRow = new Lang.Class({
|
||||||
Name: 'ExtensionRow',
|
Name: 'ExtensionRow',
|
||||||
Extends: Gtk.ListBoxRow,
|
Extends: Gtk.ListBoxRow,
|
||||||
|
|
||||||
|
@@ -15,30 +15,30 @@ 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
|
||||||
};
|
};
|
||||||
|
|
||||||
const AuthPrompt = new Lang.Class({
|
var AuthPrompt = new Lang.Class({
|
||||||
Name: 'AuthPrompt',
|
Name: 'AuthPrompt',
|
||||||
|
|
||||||
_init: function(gdmClient, mode) {
|
_init: function(gdmClient, mode) {
|
||||||
@@ -188,7 +188,7 @@ const AuthPrompt = new Lang.Class({
|
|||||||
if (!this._userVerifier.hasPendingMessages)
|
if (!this._userVerifier.hasPendingMessages)
|
||||||
this._fadeOutMessage();
|
this._fadeOutMessage();
|
||||||
|
|
||||||
this._updateNextButtonSensitivity(this._entry.text.length > 0);
|
this._updateNextButtonSensitivity(this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING);
|
||||||
}));
|
}));
|
||||||
this._entry.clutter_text.connect('activate', Lang.bind(this, function() {
|
this._entry.clutter_text.connect('activate', Lang.bind(this, function() {
|
||||||
if (this.nextButton.reactive)
|
if (this.nextButton.reactive)
|
||||||
@@ -416,7 +416,7 @@ const AuthPrompt = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateSensitivity: function(sensitive) {
|
updateSensitivity: function(sensitive) {
|
||||||
this._updateNextButtonSensitivity(sensitive && this._entry.text.length > 0);
|
this._updateNextButtonSensitivity(sensitive && (this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING));
|
||||||
this._entry.reactive = sensitive;
|
this._entry.reactive = sensitive;
|
||||||
this._entry.clutter_text.editable = sensitive;
|
this._entry.clutter_text.editable = sensitive;
|
||||||
},
|
},
|
||||||
|
@@ -47,7 +47,7 @@
|
|||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
const Task = new Lang.Class({
|
var Task = new Lang.Class({
|
||||||
Name: 'Task',
|
Name: 'Task',
|
||||||
|
|
||||||
_init: function(scope, handler) {
|
_init: function(scope, handler) {
|
||||||
@@ -68,7 +68,7 @@ const Task = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Task.prototype);
|
Signals.addSignalMethods(Task.prototype);
|
||||||
|
|
||||||
const Hold = new Lang.Class({
|
var Hold = new Lang.Class({
|
||||||
Name: 'Hold',
|
Name: 'Hold',
|
||||||
Extends: Task,
|
Extends: Task,
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ const Hold = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Hold.prototype);
|
Signals.addSignalMethods(Hold.prototype);
|
||||||
|
|
||||||
const Batch = new Lang.Class({
|
var Batch = new Lang.Class({
|
||||||
Name: 'Batch',
|
Name: 'Batch',
|
||||||
Extends: Task,
|
Extends: Task,
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ const Batch = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Batch.prototype);
|
Signals.addSignalMethods(Batch.prototype);
|
||||||
|
|
||||||
const ConcurrentBatch = new Lang.Class({
|
var ConcurrentBatch = new Lang.Class({
|
||||||
Name: 'ConcurrentBatch',
|
Name: 'ConcurrentBatch',
|
||||||
Extends: Batch,
|
Extends: Batch,
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ const ConcurrentBatch = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(ConcurrentBatch.prototype);
|
Signals.addSignalMethods(ConcurrentBatch.prototype);
|
||||||
|
|
||||||
const ConsecutiveBatch = new Lang.Class({
|
var ConsecutiveBatch = new Lang.Class({
|
||||||
Name: 'ConsecutiveBatch',
|
Name: 'ConsecutiveBatch',
|
||||||
Extends: Batch,
|
Extends: Batch,
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
|
|||||||
const _LOGO_ICON_HEIGHT = 48;
|
const _LOGO_ICON_HEIGHT = 48;
|
||||||
const _MAX_BOTTOM_MENU_ITEMS = 5;
|
const _MAX_BOTTOM_MENU_ITEMS = 5;
|
||||||
|
|
||||||
const UserListItem = new Lang.Class({
|
var UserListItem = new Lang.Class({
|
||||||
Name: 'UserListItem',
|
Name: 'UserListItem',
|
||||||
|
|
||||||
_init: function(user) {
|
_init: function(user) {
|
||||||
@@ -70,6 +70,16 @@ const UserListItem = new Lang.Class({
|
|||||||
this.actor.connect('destroy',
|
this.actor.connect('destroy',
|
||||||
Lang.bind(this, this._onDestroy));
|
Lang.bind(this, this._onDestroy));
|
||||||
|
|
||||||
|
this.actor.connect('key-focus-in', () => {
|
||||||
|
this._setSelected(true);
|
||||||
|
});
|
||||||
|
this.actor.connect('key-focus-out', () => {
|
||||||
|
this._setSelected(false);
|
||||||
|
});
|
||||||
|
this.actor.connect('notify::hover', () => {
|
||||||
|
this._setSelected(this.actor.hover);
|
||||||
|
});
|
||||||
|
|
||||||
this._userWidget = new UserWidget.UserWidget(this.user);
|
this._userWidget = new UserWidget.UserWidget(this.user);
|
||||||
layout.add(this._userWidget.actor);
|
layout.add(this._userWidget.actor);
|
||||||
|
|
||||||
@@ -103,6 +113,15 @@ const UserListItem = new Lang.Class({
|
|||||||
this.emit('activate');
|
this.emit('activate');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_setSelected: function(selected) {
|
||||||
|
if (selected) {
|
||||||
|
this.actor.add_style_pseudo_class('selected');
|
||||||
|
this.actor.grab_key_focus();
|
||||||
|
} else {
|
||||||
|
this.actor.remove_style_pseudo_class('selected');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
showTimedLoginIndicator: function(time) {
|
showTimedLoginIndicator: function(time) {
|
||||||
let hold = new Batch.Hold();
|
let hold = new Batch.Hold();
|
||||||
|
|
||||||
@@ -126,7 +145,7 @@ const UserListItem = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(UserListItem.prototype);
|
Signals.addSignalMethods(UserListItem.prototype);
|
||||||
|
|
||||||
const UserList = new Lang.Class({
|
var UserList = new Lang.Class({
|
||||||
Name: 'UserList',
|
Name: 'UserList',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -269,11 +288,15 @@ const UserList = new Lang.Class({
|
|||||||
|
|
||||||
item.actor.destroy();
|
item.actor.destroy();
|
||||||
delete this._items[userName];
|
delete this._items[userName];
|
||||||
|
},
|
||||||
|
|
||||||
|
numItems: function() {
|
||||||
|
return Object.keys(this._items).length;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(UserList.prototype);
|
Signals.addSignalMethods(UserList.prototype);
|
||||||
|
|
||||||
const SessionMenuButton = new Lang.Class({
|
var SessionMenuButton = new Lang.Class({
|
||||||
Name: 'SessionMenuButton',
|
Name: 'SessionMenuButton',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -379,7 +402,7 @@ const SessionMenuButton = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(SessionMenuButton.prototype);
|
Signals.addSignalMethods(SessionMenuButton.prototype);
|
||||||
|
|
||||||
const LoginDialog = new Lang.Class({
|
var LoginDialog = new Lang.Class({
|
||||||
Name: 'LoginDialog',
|
Name: 'LoginDialog',
|
||||||
|
|
||||||
_init: function(parentActor) {
|
_init: function(parentActor) {
|
||||||
@@ -707,6 +730,10 @@ const LoginDialog = new Lang.Class({
|
|||||||
_updateDisableUserList: function() {
|
_updateDisableUserList: function() {
|
||||||
let disableUserList = this._settings.get_boolean(GdmUtil.DISABLE_USER_LIST_KEY);
|
let disableUserList = this._settings.get_boolean(GdmUtil.DISABLE_USER_LIST_KEY);
|
||||||
|
|
||||||
|
// Disable user list when there are no users.
|
||||||
|
if (this._userListLoaded && this._userList.numItems() == 0)
|
||||||
|
disableUserList = true;
|
||||||
|
|
||||||
if (disableUserList != this._disableUserList) {
|
if (disableUserList != this._disableUserList) {
|
||||||
this._disableUserList = disableUserList;
|
this._disableUserList = disableUserList;
|
||||||
|
|
||||||
@@ -1178,14 +1205,18 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._userList.addUser(users[i]);
|
this._userList.addUser(users[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._updateDisableUserList();
|
||||||
|
|
||||||
this._userAddedId = this._userManager.connect('user-added',
|
this._userAddedId = this._userManager.connect('user-added',
|
||||||
Lang.bind(this, function(userManager, user) {
|
Lang.bind(this, function(userManager, user) {
|
||||||
this._userList.addUser(user);
|
this._userList.addUser(user);
|
||||||
|
this._updateDisableUserList();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._userRemovedId = this._userManager.connect('user-removed',
|
this._userRemovedId = this._userManager.connect('user-removed',
|
||||||
Lang.bind(this, function(userManager, user) {
|
Lang.bind(this, function(userManager, user) {
|
||||||
this._userList.removeUser(user);
|
this._userList.removeUser(user);
|
||||||
|
this._updateDisableUserList();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._userChangedId = this._userManager.connect('user-changed',
|
this._userChangedId = this._userManager.connect('user-changed',
|
||||||
@@ -1194,6 +1225,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._userList.removeUser(user);
|
this._userList.removeUser(user);
|
||||||
else if (!this._userList.containsUser(user) && !user.locked)
|
else if (!this._userList.containsUser(user) && !user.locked)
|
||||||
this._userList.addUser(user);
|
this._userList.addUser(user);
|
||||||
|
this._updateDisableUserList();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
|
@@ -27,7 +27,7 @@ function OVirtCredentials() {
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OVirtCredentialsManager = new Lang.Class({
|
var OVirtCredentialsManager = new Lang.Class({
|
||||||
Name: 'OVirtCredentialsManager',
|
Name: 'OVirtCredentialsManager',
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._token = null;
|
this._token = null;
|
||||||
|
@@ -59,7 +59,7 @@ const RealmIface = '<node> \
|
|||||||
</node>';
|
</node>';
|
||||||
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
|
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
|
||||||
|
|
||||||
const Manager = new Lang.Class({
|
var Manager = new Lang.Class({
|
||||||
Name: 'Manager',
|
Name: 'Manager',
|
||||||
|
|
||||||
_init: function(parentActor) {
|
_init: function(parentActor) {
|
||||||
|
@@ -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,
|
||||||
@@ -119,7 +119,7 @@ function cloneAndFadeOutActor(actor) {
|
|||||||
return hold;
|
return hold;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ShellUserVerifier = new Lang.Class({
|
var ShellUserVerifier = new Lang.Class({
|
||||||
Name: 'ShellUserVerifier',
|
Name: 'ShellUserVerifier',
|
||||||
|
|
||||||
_init: function(client, params) {
|
_init: function(client, params) {
|
||||||
@@ -128,6 +128,9 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
|
|
||||||
this._client = client;
|
this._client = client;
|
||||||
|
|
||||||
|
this._defaultService = null;
|
||||||
|
this._preemptingService = null;
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
|
||||||
this._settings.connect('changed',
|
this._settings.connect('changed',
|
||||||
Lang.bind(this, this._updateDefaultService));
|
Lang.bind(this, this._updateDefaultService));
|
||||||
@@ -140,6 +143,7 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
// at startup should result in immediately initiating authentication.
|
// at startup should result in immediately initiating authentication.
|
||||||
// This is different than fingerprint readers, where we only check them
|
// This is different than fingerprint readers, where we only check them
|
||||||
// after a user has been picked.
|
// after a user has been picked.
|
||||||
|
this.smartcardDetected = false;
|
||||||
this._checkForSmartcard();
|
this._checkForSmartcard();
|
||||||
|
|
||||||
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
|
||||||
@@ -540,7 +544,8 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
let signalId = this.connect('no-more-messages',
|
let signalId = this.connect('no-more-messages',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this.disconnect(signalId);
|
this.disconnect(signalId);
|
||||||
this._retry();
|
if (this._cancellable && !this._cancellable.is_cancelled())
|
||||||
|
this._retry();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@@ -44,9 +44,11 @@
|
|||||||
<file>ui/boxpointer.js</file>
|
<file>ui/boxpointer.js</file>
|
||||||
<file>ui/calendar.js</file>
|
<file>ui/calendar.js</file>
|
||||||
<file>ui/checkBox.js</file>
|
<file>ui/checkBox.js</file>
|
||||||
|
<file>ui/closeDialog.js</file>
|
||||||
<file>ui/ctrlAltTab.js</file>
|
<file>ui/ctrlAltTab.js</file>
|
||||||
<file>ui/dash.js</file>
|
<file>ui/dash.js</file>
|
||||||
<file>ui/dateMenu.js</file>
|
<file>ui/dateMenu.js</file>
|
||||||
|
<file>ui/dialog.js</file>
|
||||||
<file>ui/dnd.js</file>
|
<file>ui/dnd.js</file>
|
||||||
<file>ui/edgeDragAction.js</file>
|
<file>ui/edgeDragAction.js</file>
|
||||||
<file>ui/endSessionDialog.js</file>
|
<file>ui/endSessionDialog.js</file>
|
||||||
@@ -87,7 +89,6 @@
|
|||||||
<file>ui/screenshot.js</file>
|
<file>ui/screenshot.js</file>
|
||||||
<file>ui/scripting.js</file>
|
<file>ui/scripting.js</file>
|
||||||
<file>ui/search.js</file>
|
<file>ui/search.js</file>
|
||||||
<file>ui/separator.js</file>
|
|
||||||
<file>ui/sessionMode.js</file>
|
<file>ui/sessionMode.js</file>
|
||||||
<file>ui/shellDBus.js</file>
|
<file>ui/shellDBus.js</file>
|
||||||
<file>ui/shellEntry.js</file>
|
<file>ui/shellEntry.js</file>
|
||||||
|
8
js/meson.build
Normal file
8
js/meson.build
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
subdir('misc')
|
||||||
|
|
||||||
|
js_resources = gnome.compile_resources(
|
||||||
|
'js-resources', 'js-resources.gresource.xml',
|
||||||
|
source_dir: ['.', meson.current_build_dir()],
|
||||||
|
c_name: 'shell_js_resources',
|
||||||
|
dependencies: [config_js]
|
||||||
|
)
|
@@ -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:
|
||||||
@@ -158,7 +158,7 @@ function installImporter(extension) {
|
|||||||
imports.searchPath = oldSearchPath;
|
imports.searchPath = oldSearchPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ExtensionFinder = new Lang.Class({
|
var ExtensionFinder = new Lang.Class({
|
||||||
Name: 'ExtensionFinder',
|
Name: 'ExtensionFinder',
|
||||||
|
|
||||||
_loadExtension: function(extensionDir, info, perUserDir) {
|
_loadExtension: function(extensionDir, info, perUserDir) {
|
||||||
|
@@ -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,9 +5,9 @@ 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;
|
||||||
|
|
||||||
const HistoryManager = new Lang.Class({
|
var HistoryManager = new Lang.Class({
|
||||||
Name: 'HistoryManager',
|
Name: 'HistoryManager',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
@@ -69,7 +69,7 @@ const HistoryManager = new Lang.Class({
|
|||||||
this._indexChanged();
|
this._indexChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._historyIndex[this._history.length];
|
return this._historyIndex ? this._history[this._historyIndex -1] : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
addItem: function(input) {
|
addItem: function(input) {
|
||||||
|
@@ -36,7 +36,7 @@ function getIBusManager() {
|
|||||||
return _ibusManager;
|
return _ibusManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
const IBusManager = new Lang.Class({
|
var IBusManager = new Lang.Class({
|
||||||
Name: 'IBusManager',
|
Name: 'IBusManager',
|
||||||
|
|
||||||
// This is the longest we'll keep the keyboard frozen until an input
|
// This is the longest we'll keep the keyboard frozen until an input
|
||||||
@@ -190,7 +190,7 @@ const IBusManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getEngineDesc: function(id) {
|
getEngineDesc: function(id) {
|
||||||
if (!IBus || !this._ready)
|
if (!IBus || !this._ready || !this._engines.hasOwnProperty(id))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return this._engines[id];
|
return this._engines[id];
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ function holdKeyboard() {
|
|||||||
global.display.freeze_keyboard(global.get_current_time());
|
global.display.freeze_keyboard(global.get_current_time());
|
||||||
}
|
}
|
||||||
|
|
||||||
const KeyboardManager = new Lang.Class({
|
var KeyboardManager = new Lang.Class({
|
||||||
Name: 'KeyboardManager',
|
Name: 'KeyboardManager',
|
||||||
|
|
||||||
// The XKB protocol doesn't allow for more that 4 layouts in a
|
// The XKB protocol doesn't allow for more that 4 layouts in a
|
||||||
|
@@ -102,7 +102,7 @@ function getLoginManager() {
|
|||||||
return _loginManager;
|
return _loginManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
const LoginManagerSystemd = new Lang.Class({
|
var LoginManagerSystemd = new Lang.Class({
|
||||||
Name: 'LoginManagerSystemd',
|
Name: 'LoginManagerSystemd',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -183,7 +183,7 @@ const LoginManagerSystemd = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(LoginManagerSystemd.prototype);
|
Signals.addSignalMethods(LoginManagerSystemd.prototype);
|
||||||
|
|
||||||
const LoginManagerDummy = new Lang.Class({
|
var LoginManagerDummy = new Lang.Class({
|
||||||
Name: 'LoginManagerDummy',
|
Name: 'LoginManagerDummy',
|
||||||
|
|
||||||
getCurrentSessionProxy: function(callback) {
|
getCurrentSessionProxy: function(callback) {
|
||||||
|
16
js/misc/meson.build
Normal file
16
js/misc/meson.build
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
jsconf = configuration_data()
|
||||||
|
jsconf.set('PACKAGE_NAME', meson.project_name())
|
||||||
|
jsconf.set('PACKAGE_VERSION', meson.project_version())
|
||||||
|
jsconf.set('GETTEXT_PACKAGE', meson.project_name())
|
||||||
|
jsconf.set('LIBMUTTER_API_VERSION', mutter_api_version)
|
||||||
|
jsconf.set10('HAVE_BLUETOOTH', bt_dep.found())
|
||||||
|
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
|
||||||
|
jsconf.set('datadir', datadir)
|
||||||
|
jsconf.set('libexecdir', libexecdir)
|
||||||
|
jsconf.set('sysconfdir', sysconfdir)
|
||||||
|
|
||||||
|
config_js = configure_file(
|
||||||
|
input: 'config.js.in',
|
||||||
|
output: 'config.js',
|
||||||
|
configuration: jsconf
|
||||||
|
)
|
@@ -130,7 +130,7 @@ const ModemCdmaInterface = '<node> \
|
|||||||
|
|
||||||
const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface);
|
const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface);
|
||||||
|
|
||||||
const ModemGsm = new Lang.Class({
|
var ModemGsm = new Lang.Class({
|
||||||
Name: 'ModemGsm',
|
Name: 'ModemGsm',
|
||||||
|
|
||||||
_init: function(path) {
|
_init: function(path) {
|
||||||
@@ -172,7 +172,7 @@ const ModemGsm = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(ModemGsm.prototype);
|
Signals.addSignalMethods(ModemGsm.prototype);
|
||||||
|
|
||||||
const ModemCdma = new Lang.Class({
|
var ModemCdma = new Lang.Class({
|
||||||
Name: 'ModemCdma',
|
Name: 'ModemCdma',
|
||||||
|
|
||||||
_init: function(path) {
|
_init: function(path) {
|
||||||
@@ -244,7 +244,7 @@ const BroadbandModemCdmaInterface = '<node> \
|
|||||||
</node>';
|
</node>';
|
||||||
const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface);
|
const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface);
|
||||||
|
|
||||||
const BroadbandModem = new Lang.Class({
|
var BroadbandModem = new Lang.Class({
|
||||||
Name: 'BroadbandModem',
|
Name: 'BroadbandModem',
|
||||||
|
|
||||||
_init: function(path, capabilities) {
|
_init: function(path, capabilities) {
|
||||||
|
@@ -26,7 +26,7 @@ const ObjectManagerIface = '<node> \
|
|||||||
|
|
||||||
const ObjectManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ObjectManagerIface);
|
const ObjectManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ObjectManagerIface);
|
||||||
|
|
||||||
const ObjectManager = new Lang.Class({
|
var ObjectManager = new Lang.Class({
|
||||||
Name: 'ObjectManager',
|
Name: 'ObjectManager',
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
params = Params.parse(params, { connection: null,
|
params = Params.parse(params, { connection: null,
|
||||||
|
@@ -25,7 +25,7 @@ function getSmartcardManager() {
|
|||||||
return _smartcardManager;
|
return _smartcardManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SmartcardManager = new Lang.Class({
|
var SmartcardManager = new Lang.Class({
|
||||||
Name: 'SmartcardManager',
|
Name: 'SmartcardManager',
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._objectManager = new ObjectManager.ObjectManager({ connection: Gio.DBus.session,
|
this._objectManager = new ObjectManager.ObjectManager({ connection: Gio.DBus.session,
|
||||||
|
@@ -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()<>]+\\)))*\\)';
|
||||||
@@ -97,7 +97,7 @@ function spawnApp(argv) {
|
|||||||
Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION);
|
Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION);
|
||||||
|
|
||||||
let context = global.create_app_launch_context(0, -1);
|
let context = global.create_app_launch_context(0, -1);
|
||||||
app.launch([], context, false);
|
app.launch([], context);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
_handleSpawnError(argv[0], err);
|
_handleSpawnError(argv[0], err);
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,10 @@ function formatTime(time, params) {
|
|||||||
// xgettext:no-c-format
|
// xgettext:no-c-format
|
||||||
format = N_("%B %d %Y, %l\u2236%M %p");
|
format = N_("%B %d %Y, %l\u2236%M %p");
|
||||||
}
|
}
|
||||||
return date.format(Shell.util_translate_time_string(format));
|
|
||||||
|
let formattedTime = date.format(Shell.util_translate_time_string(format));
|
||||||
|
// prepend LTR-mark to colon/ratio to force a text direction on times
|
||||||
|
return formattedTime.replace(/([:\u2236])/g, '\u200e$1');
|
||||||
}
|
}
|
||||||
|
|
||||||
function createTimeLabel(date, params) {
|
function createTimeLabel(date, params) {
|
||||||
@@ -347,7 +350,7 @@ function insertSorted(array, val, cmp) {
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CloseButton = new Lang.Class({
|
var CloseButton = new Lang.Class({
|
||||||
Name: 'CloseButton',
|
Name: 'CloseButton',
|
||||||
Extends: St.Button,
|
Extends: St.Button,
|
||||||
|
|
||||||
@@ -436,7 +439,7 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
|
|||||||
transition: 'easeOutQuad' });
|
transition: 'easeOutQuad' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const AppSettingsMonitor = new Lang.Class({
|
var AppSettingsMonitor = new Lang.Class({
|
||||||
Name: 'AppSettingsMonitor',
|
Name: 'AppSettingsMonitor',
|
||||||
|
|
||||||
_init: function(appId, schemaId) {
|
_init: function(appId, schemaId) {
|
||||||
|
@@ -11,9 +11,9 @@ 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;
|
||||||
|
|
||||||
const WeatherClient = new Lang.Class({
|
var WeatherClient = new Lang.Class({
|
||||||
Name: 'WeatherClient',
|
Name: 'WeatherClient',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -50,7 +50,7 @@ const HelperDBusInterface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const PortalHeaderBar = new Lang.Class({
|
var PortalHeaderBar = new Lang.Class({
|
||||||
Name: 'PortalHeaderBar',
|
Name: 'PortalHeaderBar',
|
||||||
Extends: Gtk.HeaderBar,
|
Extends: Gtk.HeaderBar,
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ const PortalHeaderBar = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const PortalWindow = new Lang.Class({
|
var PortalWindow = new Lang.Class({
|
||||||
Name: 'PortalWindow',
|
Name: 'PortalWindow',
|
||||||
Extends: Gtk.ApplicationWindow,
|
Extends: Gtk.ApplicationWindow,
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ const PortalWindow = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const WebPortalHelper = new Lang.Class({
|
var WebPortalHelper = new Lang.Class({
|
||||||
Name: 'WebPortalHelper',
|
Name: 'WebPortalHelper',
|
||||||
Extends: Gtk.Application,
|
Extends: Gtk.Application,
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@ const Shell = imports.gi.Shell;
|
|||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
const CheckBox = imports.ui.checkBox;
|
const CheckBox = imports.ui.checkBox;
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
|
|
||||||
const RequestIface = '<node> \
|
const RequestIface = '<node> \
|
||||||
@@ -31,13 +32,13 @@ const AccessIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const DialogResponse = {
|
var DialogResponse = {
|
||||||
OK: 0,
|
OK: 0,
|
||||||
CANCEL: 1,
|
CANCEL: 1,
|
||||||
CLOSED: 2
|
CLOSED: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
const AccessDialog = new Lang.Class({
|
var AccessDialog = new Lang.Class({
|
||||||
Name: 'AccessDialog',
|
Name: 'AccessDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
@@ -64,29 +65,11 @@ const AccessDialog = new Lang.Class({
|
|||||||
let iconName = options['icon'] || null;
|
let iconName = options['icon'] || null;
|
||||||
let choices = options['choices'] || [];
|
let choices = options['choices'] || [];
|
||||||
|
|
||||||
let mainContentBox = new St.BoxLayout();
|
let contentParams = { title, subtitle, body };
|
||||||
mainContentBox.style_class = 'access-dialog-main-layout';
|
if (iconName)
|
||||||
this.contentLayout.add_actor(mainContentBox);
|
contentParams.icon = new Gio.ThemedIcon({ name: iconName });
|
||||||
|
let content = new Dialog.MessageDialogContent(contentParams);
|
||||||
let icon = new St.Icon({ style_class: 'access-dialog-icon',
|
this.contentLayout.add_actor(content);
|
||||||
icon_name: iconName,
|
|
||||||
y_align: Clutter.ActorAlign.START });
|
|
||||||
mainContentBox.add_actor(icon);
|
|
||||||
|
|
||||||
let messageBox = new St.BoxLayout({ vertical: true });
|
|
||||||
messageBox.style_class = 'access-dialog-content',
|
|
||||||
mainContentBox.add_actor(messageBox);
|
|
||||||
|
|
||||||
let label;
|
|
||||||
label = new St.Label({ style_class: 'access-dialog-title headline',
|
|
||||||
text: title });
|
|
||||||
messageBox.add_actor(label);
|
|
||||||
|
|
||||||
label = new St.Label({ style_class: 'access-dialog-subtitle',
|
|
||||||
text: subtitle });
|
|
||||||
label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
||||||
label.clutter_text.line_wrap = true;
|
|
||||||
messageBox.add_actor(label);
|
|
||||||
|
|
||||||
this._choices = new Map();
|
this._choices = new Map();
|
||||||
|
|
||||||
@@ -98,16 +81,11 @@ const AccessDialog = new Lang.Class({
|
|||||||
let check = new CheckBox.CheckBox();
|
let check = new CheckBox.CheckBox();
|
||||||
check.getLabelActor().text = name;
|
check.getLabelActor().text = name;
|
||||||
check.actor.checked = selected == "true";
|
check.actor.checked = selected == "true";
|
||||||
messageBox.add_actor(check.actor);
|
content.insertBeforeBody(check.actor);
|
||||||
|
|
||||||
this._choices.set(id, check);
|
this._choices.set(id, check);
|
||||||
}
|
}
|
||||||
|
|
||||||
label = new St.Label({ text: body });
|
|
||||||
label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
||||||
label.clutter_text.line_wrap = true;
|
|
||||||
messageBox.add_actor(label);
|
|
||||||
|
|
||||||
this.addButton({ label: denyLabel,
|
this.addButton({ label: denyLabel,
|
||||||
action: () => {
|
action: () => {
|
||||||
this._sendResponse(DialogResponse.CANCEL);
|
this._sendResponse(DialogResponse.CANCEL);
|
||||||
@@ -159,7 +137,7 @@ const AccessDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AccessDialogDBus = new Lang.Class({
|
var AccessDialogDBus = new Lang.Class({
|
||||||
Name: 'AccessDialogDBus',
|
Name: 'AccessDialogDBus',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -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,
|
||||||
@@ -58,7 +58,7 @@ function getWindows(workspace) {
|
|||||||
}).filter((w, i, a) => !w.skip_taskbar && a.indexOf(w) == i);
|
}).filter((w, i, a) => !w.skip_taskbar && a.indexOf(w) == i);
|
||||||
}
|
}
|
||||||
|
|
||||||
const AppSwitcherPopup = new Lang.Class({
|
var AppSwitcherPopup = new Lang.Class({
|
||||||
Name: 'AppSwitcherPopup',
|
Name: 'AppSwitcherPopup',
|
||||||
Extends: SwitcherPopup.SwitcherPopup,
|
Extends: SwitcherPopup.SwitcherPopup,
|
||||||
|
|
||||||
@@ -366,7 +366,7 @@ const AppSwitcherPopup = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const CyclerHighlight = new Lang.Class({
|
var CyclerHighlight = new Lang.Class({
|
||||||
Name: 'CyclerHighlight',
|
Name: 'CyclerHighlight',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -427,7 +427,7 @@ const CyclerHighlight = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const CyclerPopup = new Lang.Class({
|
var CyclerPopup = new Lang.Class({
|
||||||
Name: 'CyclerPopup',
|
Name: 'CyclerPopup',
|
||||||
Extends: SwitcherPopup.SwitcherPopup,
|
Extends: SwitcherPopup.SwitcherPopup,
|
||||||
Abstract: true,
|
Abstract: true,
|
||||||
@@ -488,7 +488,7 @@ const CyclerPopup = new Lang.Class({
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const GroupCyclerPopup = new Lang.Class({
|
var GroupCyclerPopup = new Lang.Class({
|
||||||
Name: 'GroupCyclerPopup',
|
Name: 'GroupCyclerPopup',
|
||||||
Extends: CyclerPopup,
|
Extends: CyclerPopup,
|
||||||
|
|
||||||
@@ -509,7 +509,7 @@ const GroupCyclerPopup = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const WindowSwitcherPopup = new Lang.Class({
|
var WindowSwitcherPopup = new Lang.Class({
|
||||||
Name: 'WindowSwitcherPopup',
|
Name: 'WindowSwitcherPopup',
|
||||||
Extends: SwitcherPopup.SwitcherPopup,
|
Extends: SwitcherPopup.SwitcherPopup,
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ const WindowSwitcherPopup = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const WindowCyclerPopup = new Lang.Class({
|
var WindowCyclerPopup = new Lang.Class({
|
||||||
Name: 'WindowCyclerPopup',
|
Name: 'WindowCyclerPopup',
|
||||||
Extends: CyclerPopup,
|
Extends: CyclerPopup,
|
||||||
|
|
||||||
@@ -582,7 +582,7 @@ const WindowCyclerPopup = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AppIcon = new Lang.Class({
|
var AppIcon = new Lang.Class({
|
||||||
Name: 'AppIcon',
|
Name: 'AppIcon',
|
||||||
|
|
||||||
_init: function(app) {
|
_init: function(app) {
|
||||||
@@ -603,7 +603,7 @@ const AppIcon = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AppSwitcher = new Lang.Class({
|
var AppSwitcher = new Lang.Class({
|
||||||
Name: 'AppSwitcher',
|
Name: 'AppSwitcher',
|
||||||
Extends: SwitcherPopup.SwitcherList,
|
Extends: SwitcherPopup.SwitcherList,
|
||||||
|
|
||||||
@@ -777,7 +777,7 @@ const AppSwitcher = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ThumbnailList = new Lang.Class({
|
var ThumbnailList = new Lang.Class({
|
||||||
Name: 'ThumbnailList',
|
Name: 'ThumbnailList',
|
||||||
Extends: SwitcherPopup.SwitcherList,
|
Extends: SwitcherPopup.SwitcherList,
|
||||||
|
|
||||||
@@ -845,7 +845,7 @@ const ThumbnailList = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const WindowIcon = new Lang.Class({
|
var WindowIcon = new Lang.Class({
|
||||||
Name: 'WindowIcon',
|
Name: 'WindowIcon',
|
||||||
|
|
||||||
_init: function(window, mode) {
|
_init: function(window, mode) {
|
||||||
@@ -902,7 +902,7 @@ const WindowIcon = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const WindowList = new Lang.Class({
|
var WindowList = new Lang.Class({
|
||||||
Name: 'WindowList',
|
Name: 'WindowList',
|
||||||
Extends: SwitcherPopup.SwitcherList,
|
Extends: SwitcherPopup.SwitcherList,
|
||||||
|
|
||||||
|
@@ -7,9 +7,9 @@ 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;
|
||||||
|
|
||||||
const Animation = new Lang.Class({
|
var Animation = new Lang.Class({
|
||||||
Name: 'Animation',
|
Name: 'Animation',
|
||||||
|
|
||||||
_init: function(file, width, height, speed) {
|
_init: function(file, width, height, speed) {
|
||||||
@@ -78,7 +78,7 @@ const Animation = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AnimatedIcon = new Lang.Class({
|
var AnimatedIcon = new Lang.Class({
|
||||||
Name: 'AnimatedIcon',
|
Name: 'AnimatedIcon',
|
||||||
Extends: Animation,
|
Extends: 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;
|
||||||
|
|
||||||
|
var VIEWS_SWITCH_TIME = 0.4;
|
||||||
|
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 VIEWS_SWITCH_TIME = 0.4;
|
|
||||||
const VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
|
|
||||||
|
|
||||||
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';
|
||||||
@@ -108,7 +108,7 @@ function clamp(value, min, max) {
|
|||||||
return Math.max(min, Math.min(max, value));
|
return Math.max(min, Math.min(max, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
const BaseAppView = new Lang.Class({
|
var BaseAppView = new Lang.Class({
|
||||||
Name: 'BaseAppView',
|
Name: 'BaseAppView',
|
||||||
Abstract: true,
|
Abstract: true,
|
||||||
|
|
||||||
@@ -219,17 +219,10 @@ const BaseAppView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (animationDirection == IconGrid.AnimationDirection.IN) {
|
if (animationDirection == IconGrid.AnimationDirection.IN) {
|
||||||
let toAnimate = this._grid.actor.connect('notify::allocation', Lang.bind(this,
|
let id = this._grid.actor.connect('paint', () => {
|
||||||
function() {
|
this._grid.actor.disconnect(id);
|
||||||
this._grid.actor.disconnect(toAnimate);
|
this._doSpringAnimation(animationDirection);
|
||||||
// We need to hide the grid temporary to not flash it
|
});
|
||||||
// for a frame
|
|
||||||
this._grid.actor.opacity = 0;
|
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
this._doSpringAnimation(animationDirection)
|
|
||||||
}));
|
|
||||||
}));
|
|
||||||
} else {
|
} else {
|
||||||
this._doSpringAnimation(animationDirection);
|
this._doSpringAnimation(animationDirection);
|
||||||
}
|
}
|
||||||
@@ -256,7 +249,7 @@ const BaseAppView = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(BaseAppView.prototype);
|
Signals.addSignalMethods(BaseAppView.prototype);
|
||||||
|
|
||||||
const PageIndicatorsActor = new Lang.Class({
|
var PageIndicatorsActor = new Lang.Class({
|
||||||
Name:'PageIndicatorsActor',
|
Name:'PageIndicatorsActor',
|
||||||
Extends: St.BoxLayout,
|
Extends: St.BoxLayout,
|
||||||
|
|
||||||
@@ -280,7 +273,7 @@ const PageIndicatorsActor = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const PageIndicators = new Lang.Class({
|
var PageIndicators = new Lang.Class({
|
||||||
Name:'PageIndicators',
|
Name:'PageIndicators',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -373,7 +366,7 @@ const PageIndicators = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(PageIndicators.prototype);
|
Signals.addSignalMethods(PageIndicators.prototype);
|
||||||
|
|
||||||
const AllView = new Lang.Class({
|
var AllView = new Lang.Class({
|
||||||
Name: 'AllView',
|
Name: 'AllView',
|
||||||
Extends: BaseAppView,
|
Extends: BaseAppView,
|
||||||
|
|
||||||
@@ -799,7 +792,7 @@ const AllView = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(AllView.prototype);
|
Signals.addSignalMethods(AllView.prototype);
|
||||||
|
|
||||||
const FrequentView = new Lang.Class({
|
var FrequentView = new Lang.Class({
|
||||||
Name: 'FrequentView',
|
Name: 'FrequentView',
|
||||||
Extends: BaseAppView,
|
Extends: BaseAppView,
|
||||||
|
|
||||||
@@ -873,12 +866,12 @@ const FrequentView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Views = {
|
var Views = {
|
||||||
FREQUENT: 0,
|
FREQUENT: 0,
|
||||||
ALL: 1
|
ALL: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
const ControlsBoxLayout = Lang.Class({
|
var ControlsBoxLayout = Lang.Class({
|
||||||
Name: 'ControlsBoxLayout',
|
Name: 'ControlsBoxLayout',
|
||||||
Extends: Clutter.BoxLayout,
|
Extends: Clutter.BoxLayout,
|
||||||
|
|
||||||
@@ -903,7 +896,7 @@ const ControlsBoxLayout = Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ViewStackLayout = new Lang.Class({
|
var ViewStackLayout = new Lang.Class({
|
||||||
Name: 'ViewStackLayout',
|
Name: 'ViewStackLayout',
|
||||||
Extends: Clutter.BinLayout,
|
Extends: Clutter.BinLayout,
|
||||||
Signals: { 'allocated-size-changed': { param_types: [GObject.TYPE_INT,
|
Signals: { 'allocated-size-changed': { param_types: [GObject.TYPE_INT,
|
||||||
@@ -919,7 +912,7 @@ const ViewStackLayout = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AppDisplay = new Lang.Class({
|
var AppDisplay = new Lang.Class({
|
||||||
Name: 'AppDisplay',
|
Name: 'AppDisplay',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -1084,12 +1077,14 @@ const AppDisplay = new Lang.Class({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const AppSearchProvider = new Lang.Class({
|
var AppSearchProvider = new Lang.Class({
|
||||||
Name: 'AppSearchProvider',
|
Name: 'AppSearchProvider',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._appSys = Shell.AppSystem.get_default();
|
this._appSys = Shell.AppSystem.get_default();
|
||||||
this.id = 'applications';
|
this.id = 'applications';
|
||||||
|
this.isRemoteProvider = false;
|
||||||
|
this.canLaunchSearch = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
getResultMetas: function(apps, callback) {
|
getResultMetas: function(apps, callback) {
|
||||||
@@ -1137,7 +1132,7 @@ const AppSearchProvider = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const FolderView = new Lang.Class({
|
var FolderView = new Lang.Class({
|
||||||
Name: 'FolderView',
|
Name: 'FolderView',
|
||||||
Extends: BaseAppView,
|
Extends: BaseAppView,
|
||||||
|
|
||||||
@@ -1253,11 +1248,12 @@ const FolderView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const FolderIcon = new Lang.Class({
|
var FolderIcon = new Lang.Class({
|
||||||
Name: 'FolderIcon',
|
Name: 'FolderIcon',
|
||||||
|
|
||||||
_init: function(id, path, parentView) {
|
_init: function(id, path, parentView) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
this.name = '';
|
||||||
this._parentView = parentView;
|
this._parentView = parentView;
|
||||||
|
|
||||||
this._folder = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders.folder',
|
this._folder = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders.folder',
|
||||||
@@ -1430,7 +1426,7 @@ const FolderIcon = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(FolderIcon.prototype);
|
Signals.addSignalMethods(FolderIcon.prototype);
|
||||||
|
|
||||||
const AppFolderPopup = new Lang.Class({
|
var AppFolderPopup = new Lang.Class({
|
||||||
Name: 'AppFolderPopup',
|
Name: 'AppFolderPopup',
|
||||||
|
|
||||||
_init: function(source, side) {
|
_init: function(source, side) {
|
||||||
@@ -1591,7 +1587,7 @@ const AppFolderPopup = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(AppFolderPopup.prototype);
|
Signals.addSignalMethods(AppFolderPopup.prototype);
|
||||||
|
|
||||||
const AppIcon = new Lang.Class({
|
var AppIcon = new Lang.Class({
|
||||||
Name: 'AppIcon',
|
Name: 'AppIcon',
|
||||||
|
|
||||||
_init : function(app, iconParams) {
|
_init : function(app, iconParams) {
|
||||||
@@ -1837,7 +1833,7 @@ const AppIcon = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(AppIcon.prototype);
|
Signals.addSignalMethods(AppIcon.prototype);
|
||||||
|
|
||||||
const AppIconMenu = new Lang.Class({
|
var AppIconMenu = new Lang.Class({
|
||||||
Name: 'AppIconMenu',
|
Name: 'AppIconMenu',
|
||||||
Extends: PopupMenu.PopupMenu,
|
Extends: PopupMenu.PopupMenu,
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ const RENAMED_DESKTOP_IDS = {
|
|||||||
'totem.desktop': 'org.gnome.Totem.desktop',
|
'totem.desktop': 'org.gnome.Totem.desktop',
|
||||||
};
|
};
|
||||||
|
|
||||||
const AppFavorites = new Lang.Class({
|
var AppFavorites = new Lang.Class({
|
||||||
Name: 'AppFavorites',
|
Name: 'AppFavorites',
|
||||||
|
|
||||||
FAVORITE_APPS_KEY: 'favorite-apps',
|
FAVORITE_APPS_KEY: 'favorite-apps',
|
||||||
|
@@ -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
|
||||||
@@ -28,7 +28,7 @@ const AudioDeviceSelectionIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const AudioDeviceSelectionDialog = new Lang.Class({
|
var AudioDeviceSelectionDialog = new Lang.Class({
|
||||||
Name: 'AudioDeviceSelectionDialog',
|
Name: 'AudioDeviceSelectionDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ const AudioDeviceSelectionDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AudioDeviceSelectionDBus = new Lang.Class({
|
var AudioDeviceSelectionDBus = new Lang.Class({
|
||||||
Name: 'AudioDeviceSelectionDBus',
|
Name: 'AudioDeviceSelectionDBus',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ function _fileEqual0(file1, file2) {
|
|||||||
return file1.equal(file2);
|
return file1.equal(file2);
|
||||||
}
|
}
|
||||||
|
|
||||||
const BackgroundCache = new Lang.Class({
|
var BackgroundCache = new Lang.Class({
|
||||||
Name: 'BackgroundCache',
|
Name: 'BackgroundCache',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -154,8 +154,12 @@ const BackgroundCache = new Lang.Class({
|
|||||||
|
|
||||||
let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null);
|
let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null);
|
||||||
monitor.connect('changed',
|
monitor.connect('changed',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function(obj, file, otherFile, eventType) {
|
||||||
this.emit('file-changed', file);
|
// Ignore CHANGED and CREATED events, since in both cases
|
||||||
|
// we'll get a CHANGES_DONE_HINT event when done.
|
||||||
|
if (eventType != Gio.FileMonitorEvent.CHANGED &&
|
||||||
|
eventType != Gio.FileMonitorEvent.CREATED)
|
||||||
|
this.emit('file-changed', file);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._fileMonitors[key] = monitor;
|
this._fileMonitors[key] = monitor;
|
||||||
@@ -226,7 +230,7 @@ function getBackgroundCache() {
|
|||||||
return _backgroundCache;
|
return _backgroundCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Background = new Lang.Class({
|
var Background = new Lang.Class({
|
||||||
Name: 'Background',
|
Name: 'Background',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
@@ -488,7 +492,7 @@ Signals.addSignalMethods(Background.prototype);
|
|||||||
|
|
||||||
let _systemBackground;
|
let _systemBackground;
|
||||||
|
|
||||||
const SystemBackground = new Lang.Class({
|
var SystemBackground = new Lang.Class({
|
||||||
Name: 'SystemBackground',
|
Name: 'SystemBackground',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -525,7 +529,7 @@ const SystemBackground = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(SystemBackground.prototype);
|
Signals.addSignalMethods(SystemBackground.prototype);
|
||||||
|
|
||||||
const BackgroundSource = new Lang.Class({
|
var BackgroundSource = new Lang.Class({
|
||||||
Name: 'BackgroundSource',
|
Name: 'BackgroundSource',
|
||||||
|
|
||||||
_init: function(layoutManager, settingsSchema) {
|
_init: function(layoutManager, settingsSchema) {
|
||||||
@@ -613,7 +617,7 @@ const BackgroundSource = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Animation = new Lang.Class({
|
var Animation = new Lang.Class({
|
||||||
Name: 'Animation',
|
Name: 'Animation',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
@@ -661,7 +665,7 @@ const Animation = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Animation.prototype);
|
Signals.addSignalMethods(Animation.prototype);
|
||||||
|
|
||||||
const BackgroundManager = new Lang.Class({
|
var BackgroundManager = new Lang.Class({
|
||||||
Name: 'BackgroundManager',
|
Name: 'BackgroundManager',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
|
@@ -9,7 +9,7 @@ const BoxPointer = imports.ui.boxpointer;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
|
|
||||||
const BackgroundMenu = new Lang.Class({
|
var BackgroundMenu = new Lang.Class({
|
||||||
Name: 'BackgroundMenu',
|
Name: 'BackgroundMenu',
|
||||||
Extends: PopupMenu.PopupMenu,
|
Extends: PopupMenu.PopupMenu,
|
||||||
|
|
||||||
|
@@ -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:
|
||||||
@@ -32,7 +32,7 @@ const POPUP_ANIMATION_TIME = 0.15;
|
|||||||
* totally inside the monitor if possible.
|
* totally inside the monitor if possible.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const BoxPointer = new Lang.Class({
|
var BoxPointer = new Lang.Class({
|
||||||
Name: 'BoxPointer',
|
Name: 'BoxPointer',
|
||||||
|
|
||||||
_init: function(arrowSide, binProperties) {
|
_init: function(arrowSide, binProperties) {
|
||||||
|
@@ -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());
|
||||||
@@ -92,7 +92,7 @@ function _getCalendarDayAbbreviation(dayNumber) {
|
|||||||
|
|
||||||
// Abstraction for an appointment/event in a calendar
|
// Abstraction for an appointment/event in a calendar
|
||||||
|
|
||||||
const CalendarEvent = new Lang.Class({
|
var CalendarEvent = new Lang.Class({
|
||||||
Name: 'CalendarEvent',
|
Name: 'CalendarEvent',
|
||||||
|
|
||||||
_init: function(id, date, end, summary, allDay) {
|
_init: function(id, date, end, summary, allDay) {
|
||||||
@@ -108,7 +108,7 @@ const CalendarEvent = new Lang.Class({
|
|||||||
//
|
//
|
||||||
|
|
||||||
// First, an implementation with no events
|
// First, an implementation with no events
|
||||||
const EmptyEventSource = new Lang.Class({
|
var EmptyEventSource = new Lang.Class({
|
||||||
Name: 'EmptyEventSource',
|
Name: 'EmptyEventSource',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -179,7 +179,7 @@ function _dateIntervalsOverlap(a0, a1, b0, b1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// an implementation that reads data from a session bus service
|
// an implementation that reads data from a session bus service
|
||||||
const DBusEventSource = new Lang.Class({
|
var DBusEventSource = new Lang.Class({
|
||||||
Name: 'DBusEventSource',
|
Name: 'DBusEventSource',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -366,7 +366,7 @@ const DBusEventSource = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(DBusEventSource.prototype);
|
Signals.addSignalMethods(DBusEventSource.prototype);
|
||||||
|
|
||||||
const Calendar = new Lang.Class({
|
var Calendar = new Lang.Class({
|
||||||
Name: 'Calendar',
|
Name: 'Calendar',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -697,7 +697,7 @@ const Calendar = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Calendar.prototype);
|
Signals.addSignalMethods(Calendar.prototype);
|
||||||
|
|
||||||
const EventMessage = new Lang.Class({
|
var EventMessage = new Lang.Class({
|
||||||
Name: 'EventMessage',
|
Name: 'EventMessage',
|
||||||
Extends: MessageList.Message,
|
Extends: MessageList.Message,
|
||||||
|
|
||||||
@@ -754,15 +754,15 @@ const EventMessage = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const NotificationMessage = new Lang.Class({
|
var NotificationMessage = new Lang.Class({
|
||||||
Name: 'NotificationMessage',
|
Name: 'NotificationMessage',
|
||||||
Extends: MessageList.Message,
|
Extends: MessageList.Message,
|
||||||
|
|
||||||
_init: function(notification) {
|
_init: function(notification) {
|
||||||
this.notification = notification;
|
this.notification = notification;
|
||||||
|
|
||||||
this.setUseBodyMarkup(notification.bannerBodyMarkup);
|
|
||||||
this.parent(notification.title, notification.bannerBodyText);
|
this.parent(notification.title, notification.bannerBodyText);
|
||||||
|
this.setUseBodyMarkup(notification.bannerBodyMarkup);
|
||||||
|
|
||||||
this.setIcon(this._getIcon());
|
this.setIcon(this._getIcon());
|
||||||
|
|
||||||
@@ -810,7 +810,7 @@ const NotificationMessage = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const EventsSection = new Lang.Class({
|
var EventsSection = new Lang.Class({
|
||||||
Name: 'EventsSection',
|
Name: 'EventsSection',
|
||||||
Extends: MessageList.MessageListSection,
|
Extends: MessageList.MessageListSection,
|
||||||
|
|
||||||
@@ -920,7 +920,7 @@ const EventsSection = new Lang.Class({
|
|||||||
let app = this._getCalendarApp();
|
let app = this._getCalendarApp();
|
||||||
if (app.get_id() == 'evolution.desktop')
|
if (app.get_id() == 'evolution.desktop')
|
||||||
app = Gio.DesktopAppInfo.new('evolution-calendar.desktop');
|
app = Gio.DesktopAppInfo.new('evolution-calendar.desktop');
|
||||||
app.launch([], global.create_app_launch_context(0, -1), false);
|
app.launch([], global.create_app_launch_context(0, -1));
|
||||||
},
|
},
|
||||||
|
|
||||||
setDate: function(date) {
|
setDate: function(date) {
|
||||||
@@ -941,7 +941,7 @@ const EventsSection = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const NotificationSection = new Lang.Class({
|
var NotificationSection = new Lang.Class({
|
||||||
Name: 'NotificationSection',
|
Name: 'NotificationSection',
|
||||||
Extends: MessageList.MessageListSection,
|
Extends: MessageList.MessageListSection,
|
||||||
|
|
||||||
@@ -1044,7 +1044,7 @@ const NotificationSection = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Placeholder = new Lang.Class({
|
var Placeholder = new Lang.Class({
|
||||||
Name: 'Placeholder',
|
Name: 'Placeholder',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -1091,7 +1091,7 @@ const Placeholder = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const CalendarMessageList = new Lang.Class({
|
var CalendarMessageList = new Lang.Class({
|
||||||
Name: 'CalendarMessageList',
|
Name: 'CalendarMessageList',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -4,7 +4,7 @@ const St = imports.gi.St;
|
|||||||
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
|
||||||
const CheckBox = new Lang.Class({
|
var CheckBox = new Lang.Class({
|
||||||
Name: 'CheckBox',
|
Name: 'CheckBox',
|
||||||
|
|
||||||
_init: function(label) {
|
_init: function(label) {
|
||||||
|
138
js/ui/closeDialog.js
Normal file
138
js/ui/closeDialog.js
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
|
var FROZEN_WINDOW_BRIGHTNESS = -0.3
|
||||||
|
var DIALOG_TRANSITION_TIME = 0.15
|
||||||
|
|
||||||
|
var CloseDialog = new Lang.Class({
|
||||||
|
Name: 'CloseDialog',
|
||||||
|
Extends: GObject.Object,
|
||||||
|
Implements: [ Meta.CloseDialog ],
|
||||||
|
Properties: {
|
||||||
|
'window': GObject.ParamSpec.override('window', Meta.CloseDialog)
|
||||||
|
},
|
||||||
|
|
||||||
|
_init: function (window) {
|
||||||
|
this.parent();
|
||||||
|
this._window = window;
|
||||||
|
this._dialog = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
get window() {
|
||||||
|
return this._window;
|
||||||
|
},
|
||||||
|
|
||||||
|
set window(window) {
|
||||||
|
this._window = window;
|
||||||
|
},
|
||||||
|
|
||||||
|
_createDialogContent: function () {
|
||||||
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
|
let windowApp = tracker.get_window_app(this._window);
|
||||||
|
|
||||||
|
/* Translators: %s is an application name */
|
||||||
|
let title = _("“%s” is not responding.").format(windowApp.get_name());
|
||||||
|
let subtitle = _("You may choose to wait a short while for it to " +
|
||||||
|
"continue or force the application to quit entirely.");
|
||||||
|
let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' });
|
||||||
|
return new Dialog.MessageDialogContent({ icon, title, subtitle });
|
||||||
|
},
|
||||||
|
|
||||||
|
_initDialog: function () {
|
||||||
|
if (this._dialog)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let windowActor = this._window.get_compositor_private();
|
||||||
|
this._dialog = new Dialog.Dialog(windowActor, 'close-dialog');
|
||||||
|
this._dialog.width = windowActor.width;
|
||||||
|
this._dialog.height = windowActor.height;
|
||||||
|
|
||||||
|
this._dialog.addContent(this._createDialogContent());
|
||||||
|
this._dialog.addButton({ label: _('Force Quit'),
|
||||||
|
action: Lang.bind(this, this._onClose),
|
||||||
|
default: true });
|
||||||
|
this._dialog.addButton({ label: _('Wait'),
|
||||||
|
action: Lang.bind(this, this._onWait),
|
||||||
|
key: Clutter.Escape });
|
||||||
|
|
||||||
|
global.focus_manager.add_group(this._dialog);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addWindowEffect: function () {
|
||||||
|
// We set the effect on the surface actor, so the dialog itself
|
||||||
|
// (which is a child of the MetaWindowActor) does not get the
|
||||||
|
// effect applied itself.
|
||||||
|
let windowActor = this._window.get_compositor_private();
|
||||||
|
let surfaceActor = windowActor.get_first_child();
|
||||||
|
let effect = new Clutter.BrightnessContrastEffect();
|
||||||
|
effect.set_brightness(FROZEN_WINDOW_BRIGHTNESS);
|
||||||
|
surfaceActor.add_effect_with_name("gnome-shell-frozen-window", effect);
|
||||||
|
},
|
||||||
|
|
||||||
|
_removeWindowEffect: function () {
|
||||||
|
let windowActor = this._window.get_compositor_private();
|
||||||
|
let surfaceActor = windowActor.get_first_child();
|
||||||
|
surfaceActor.remove_effect_by_name("gnome-shell-frozen-window");
|
||||||
|
},
|
||||||
|
|
||||||
|
_onWait: function () {
|
||||||
|
this.response(Meta.CloseDialogResponse.WAIT);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onClose: function () {
|
||||||
|
this.response(Meta.CloseDialogResponse.FORCE_CLOSE);
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_show: function () {
|
||||||
|
if (this._dialog != null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._addWindowEffect();
|
||||||
|
this._initDialog();
|
||||||
|
|
||||||
|
this._dialog.scale_y = 0;
|
||||||
|
this._dialog.set_pivot_point(0.5, 0.5);
|
||||||
|
|
||||||
|
Tweener.addTween(this._dialog,
|
||||||
|
{ scale_y: 1,
|
||||||
|
transition: 'linear',
|
||||||
|
time: DIALOG_TRANSITION_TIME,
|
||||||
|
onComplete: Lang.bind(this, function () {
|
||||||
|
Main.layoutManager.trackChrome(this._dialog, { affectsInputRegion: true });
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_hide: function () {
|
||||||
|
if (this._dialog == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let dialog = this._dialog;
|
||||||
|
this._dialog = null;
|
||||||
|
this._removeWindowEffect();
|
||||||
|
|
||||||
|
Tweener.addTween(dialog,
|
||||||
|
{ scale_y: 0,
|
||||||
|
transition: 'linear',
|
||||||
|
time: DIALOG_TRANSITION_TIME,
|
||||||
|
onComplete: Lang.bind(this, function () {
|
||||||
|
dialog.destroy();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_focus: function () {
|
||||||
|
if (this._dialog)
|
||||||
|
this._dialog.grab_key_focus();
|
||||||
|
}
|
||||||
|
});
|
@@ -2,7 +2,7 @@
|
|||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const ComponentManager = new Lang.Class({
|
var ComponentManager = new Lang.Class({
|
||||||
Name: 'ComponentManager',
|
Name: 'ComponentManager',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -11,15 +11,15 @@ 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;
|
||||||
|
|
||||||
const AutomountManager = new Lang.Class({
|
var AutomountManager = new Lang.Class({
|
||||||
Name: 'AutomountManager',
|
Name: 'AutomountManager',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -242,4 +242,4 @@ const 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,
|
||||||
@@ -63,8 +63,7 @@ function startAppForMount(app, mount) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
retval = app.launch(files,
|
retval = app.launch(files,
|
||||||
global.create_app_launch_context(0, -1),
|
global.create_app_launch_context(0, -1));
|
||||||
false)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log('Unable to launch the application ' + app.get_name()
|
log('Unable to launch the application ' + app.get_name()
|
||||||
+ ': ' + e.toString());
|
+ ': ' + e.toString());
|
||||||
@@ -91,7 +90,7 @@ function HotplugSniffer() {
|
|||||||
'/org/gnome/Shell/HotplugSniffer');
|
'/org/gnome/Shell/HotplugSniffer');
|
||||||
}
|
}
|
||||||
|
|
||||||
const ContentTypeDiscoverer = new Lang.Class({
|
var ContentTypeDiscoverer = new Lang.Class({
|
||||||
Name: 'ContentTypeDiscoverer',
|
Name: 'ContentTypeDiscoverer',
|
||||||
|
|
||||||
_init: function(callback) {
|
_init: function(callback) {
|
||||||
@@ -160,7 +159,7 @@ const ContentTypeDiscoverer = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AutorunManager = new Lang.Class({
|
var AutorunManager = new Lang.Class({
|
||||||
Name: 'AutorunManager',
|
Name: 'AutorunManager',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -197,7 +196,7 @@ const AutorunManager = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AutorunDispatcher = new Lang.Class({
|
var AutorunDispatcher = new Lang.Class({
|
||||||
Name: 'AutorunDispatcher',
|
Name: 'AutorunDispatcher',
|
||||||
|
|
||||||
_init: function(manager) {
|
_init: function(manager) {
|
||||||
@@ -293,7 +292,7 @@ const AutorunDispatcher = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AutorunSource = new Lang.Class({
|
var AutorunSource = new Lang.Class({
|
||||||
Name: 'AutorunSource',
|
Name: 'AutorunSource',
|
||||||
Extends: MessageTray.Source,
|
Extends: MessageTray.Source,
|
||||||
|
|
||||||
@@ -320,7 +319,7 @@ const AutorunSource = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AutorunNotification = new Lang.Class({
|
var AutorunNotification = new Lang.Class({
|
||||||
Name: 'AutorunNotification',
|
Name: 'AutorunNotification',
|
||||||
Extends: MessageTray.Notification,
|
Extends: MessageTray.Notification,
|
||||||
|
|
||||||
@@ -379,4 +378,4 @@ const AutorunNotification = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = AutorunManager;
|
var Component = AutorunManager;
|
||||||
|
@@ -10,16 +10,17 @@ const GObject = imports.gi.GObject;
|
|||||||
const Gcr = imports.gi.Gcr;
|
const Gcr = imports.gi.Gcr;
|
||||||
|
|
||||||
const Animation = imports.ui.animation;
|
const Animation = imports.ui.animation;
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
const ShellEntry = imports.ui.shellEntry;
|
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;
|
||||||
|
|
||||||
const KeyringDialog = new Lang.Class({
|
var KeyringDialog = new Lang.Class({
|
||||||
Name: 'KeyringDialog',
|
Name: 'KeyringDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
@@ -31,38 +32,24 @@ const KeyringDialog = new Lang.Class({
|
|||||||
this.prompt.connect('show-confirm', Lang.bind(this, this._onShowConfirm));
|
this.prompt.connect('show-confirm', Lang.bind(this, this._onShowConfirm));
|
||||||
this.prompt.connect('prompt-close', Lang.bind(this, this._onHidePrompt));
|
this.prompt.connect('prompt-close', Lang.bind(this, this._onHidePrompt));
|
||||||
|
|
||||||
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
||||||
vertical: false });
|
this._content = new Dialog.MessageDialogContent({ icon });
|
||||||
this.contentLayout.add(mainContentBox);
|
this.contentLayout.add(this._content);
|
||||||
|
|
||||||
let icon = new St.Icon({ icon_name: 'dialog-password-symbolic' });
|
// FIXME: Why does this break now?
|
||||||
mainContentBox.add(icon,
|
/*
|
||||||
{ x_fill: true,
|
this.prompt.bind_property('message', this._content, 'title', GObject.BindingFlags.SYNC_CREATE);
|
||||||
y_fill: false,
|
this.prompt.bind_property('description', this._content, 'body', GObject.BindingFlags.SYNC_CREATE);
|
||||||
x_align: St.Align.END,
|
*/
|
||||||
y_align: St.Align.START });
|
this.prompt.connect('notify::message', () => {
|
||||||
|
this._content.title = this.prompt.message;
|
||||||
|
});
|
||||||
|
this._content.title = this.prompt.message;
|
||||||
|
|
||||||
this._messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
|
this.prompt.connect('notify::description', () => {
|
||||||
vertical: true });
|
this._content.body = this.prompt.description;
|
||||||
mainContentBox.add(this._messageBox,
|
});
|
||||||
{ y_align: St.Align.START, expand: true, x_fill: true, y_fill: true });
|
this._content.body = this.prompt.description;
|
||||||
|
|
||||||
let subject = new St.Label({ style_class: 'prompt-dialog-headline headline' });
|
|
||||||
this.prompt.bind_property('message', subject, 'text', GObject.BindingFlags.SYNC_CREATE);
|
|
||||||
|
|
||||||
this._messageBox.add(subject,
|
|
||||||
{ x_fill: false,
|
|
||||||
y_fill: false,
|
|
||||||
x_align: St.Align.START,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
let description = new St.Label({ style_class: 'prompt-dialog-description' });
|
|
||||||
description.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
||||||
description.clutter_text.line_wrap = true;
|
|
||||||
this.prompt.bind_property('description', description, 'text', GObject.BindingFlags.SYNC_CREATE);
|
|
||||||
this._messageBox.add(description,
|
|
||||||
{ y_fill: true,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
this._workSpinner = null;
|
this._workSpinner = null;
|
||||||
this._controlTable = null;
|
this._controlTable = null;
|
||||||
@@ -195,7 +182,7 @@ const KeyringDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._controlTable = table;
|
this._controlTable = table;
|
||||||
this._messageBox.add(table, { x_fill: true, y_fill: true });
|
this._content.messageBox.add(table, { x_fill: true, y_fill: true });
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSensitivity: function(sensitive) {
|
_updateSensitivity: function(sensitive) {
|
||||||
@@ -271,7 +258,7 @@ const KeyringDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const KeyringDummyDialog = new Lang.Class({
|
var KeyringDummyDialog = new Lang.Class({
|
||||||
Name: 'KeyringDummyDialog',
|
Name: 'KeyringDummyDialog',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -287,7 +274,7 @@ const KeyringDummyDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const KeyringPrompter = new Lang.Class({
|
var KeyringPrompter = new Lang.Class({
|
||||||
Name: 'KeyringPrompter',
|
Name: 'KeyringPrompter',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -324,4 +311,4 @@ const KeyringPrompter = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = KeyringPrompter;
|
var Component = KeyringPrompter;
|
||||||
|
@@ -12,6 +12,7 @@ const Shell = imports.gi.Shell;
|
|||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
const Config = imports.misc.config;
|
const Config = imports.misc.config;
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const MessageTray = imports.ui.messageTray;
|
const MessageTray = imports.ui.messageTray;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
@@ -20,7 +21,7 @@ const ShellEntry = imports.ui.shellEntry;
|
|||||||
|
|
||||||
const VPN_UI_GROUP = 'VPN Plugin UI';
|
const VPN_UI_GROUP = 'VPN Plugin UI';
|
||||||
|
|
||||||
const NetworkSecretDialog = new Lang.Class({
|
var NetworkSecretDialog = new Lang.Class({
|
||||||
Name: 'NetworkSecretDialog',
|
Name: 'NetworkSecretDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
@@ -38,41 +39,12 @@ const NetworkSecretDialog = new Lang.Class({
|
|||||||
else
|
else
|
||||||
this._content = this._getContent();
|
this._content = this._getContent();
|
||||||
|
|
||||||
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
||||||
vertical: false });
|
let contentParams = { icon,
|
||||||
this.contentLayout.add(mainContentBox,
|
title: this._content.title,
|
||||||
{ x_fill: true,
|
body: this._content.message };
|
||||||
y_fill: true });
|
let contentBox = new Dialog.MessageDialogContent(contentParams);
|
||||||
|
this.contentLayout.add_actor(contentBox);
|
||||||
let icon = new St.Icon({ icon_name: 'dialog-password-symbolic' });
|
|
||||||
mainContentBox.add(icon,
|
|
||||||
{ x_fill: true,
|
|
||||||
y_fill: false,
|
|
||||||
x_align: St.Align.END,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
|
|
||||||
vertical: true });
|
|
||||||
mainContentBox.add(messageBox,
|
|
||||||
{ y_align: St.Align.START });
|
|
||||||
|
|
||||||
let subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline headline',
|
|
||||||
text: this._content.title });
|
|
||||||
messageBox.add(subjectLabel,
|
|
||||||
{ y_fill: false,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
if (this._content.message != null) {
|
|
||||||
let descriptionLabel = new St.Label({ style_class: 'prompt-dialog-description',
|
|
||||||
text: this._content.message });
|
|
||||||
descriptionLabel.clutter_text.line_wrap = true;
|
|
||||||
descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
||||||
|
|
||||||
messageBox.add(descriptionLabel,
|
|
||||||
{ y_fill: true,
|
|
||||||
y_align: St.Align.START,
|
|
||||||
expand: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
|
let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
|
||||||
let secretTable = new St.Widget({ style_class: 'network-dialog-secret-table',
|
let secretTable = new St.Widget({ style_class: 'network-dialog-secret-table',
|
||||||
@@ -135,7 +107,7 @@ const NetworkSecretDialog = new Lang.Class({
|
|||||||
secret.entry.clutter_text.set_password_char('\u25cf');
|
secret.entry.clutter_text.set_password_char('\u25cf');
|
||||||
}
|
}
|
||||||
|
|
||||||
messageBox.add(secretTable);
|
contentBox.messageBox.add(secretTable);
|
||||||
|
|
||||||
this._okButton = { label: _("Connect"),
|
this._okButton = { label: _("Connect"),
|
||||||
action: Lang.bind(this, this._onOk),
|
action: Lang.bind(this, this._onOk),
|
||||||
@@ -357,7 +329,7 @@ const NetworkSecretDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const VPNRequestHandler = new Lang.Class({
|
var VPNRequestHandler = new Lang.Class({
|
||||||
Name: 'VPNRequestHandler',
|
Name: 'VPNRequestHandler',
|
||||||
|
|
||||||
_init: function(agent, requestId, authHelper, serviceType, connection, hints, flags) {
|
_init: function(agent, requestId, authHelper, serviceType, connection, hints, flags) {
|
||||||
@@ -603,7 +575,7 @@ const VPNRequestHandler = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const NetworkAgent = new Lang.Class({
|
var NetworkAgent = new Lang.Class({
|
||||||
Name: 'NetworkAgent',
|
Name: 'NetworkAgent',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -826,4 +798,4 @@ const NetworkAgent = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const Component = NetworkAgent;
|
var Component = NetworkAgent;
|
||||||
|
@@ -15,66 +15,35 @@ const PolkitAgent = imports.gi.PolkitAgent;
|
|||||||
|
|
||||||
const Animation = imports.ui.animation;
|
const Animation = imports.ui.animation;
|
||||||
const Components = imports.ui.components;
|
const Components = imports.ui.components;
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
const ShellEntry = imports.ui.shellEntry;
|
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;
|
||||||
|
|
||||||
const AuthenticationDialog = new Lang.Class({
|
var AuthenticationDialog = new Lang.Class({
|
||||||
Name: 'AuthenticationDialog',
|
Name: 'AuthenticationDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
_init: function(actionId, message, cookie, userNames) {
|
_init: function(actionId, body, cookie, userNames) {
|
||||||
this.parent({ styleClass: 'prompt-dialog' });
|
this.parent({ styleClass: 'prompt-dialog' });
|
||||||
|
|
||||||
this.actionId = actionId;
|
this.actionId = actionId;
|
||||||
this.message = message;
|
this.message = body;
|
||||||
this.userNames = userNames;
|
this.userNames = userNames;
|
||||||
this._wasDismissed = false;
|
this._wasDismissed = false;
|
||||||
|
|
||||||
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
|
||||||
vertical: false });
|
let title = _("Authentication Required");
|
||||||
this.contentLayout.add(mainContentBox,
|
|
||||||
{ x_fill: true,
|
|
||||||
y_fill: true });
|
|
||||||
|
|
||||||
let icon = new St.Icon({ icon_name: 'dialog-password-symbolic' });
|
let content = new Dialog.MessageDialogContent({ icon, title, body });
|
||||||
mainContentBox.add(icon,
|
this.contentLayout.add_actor(content);
|
||||||
{ x_fill: true,
|
|
||||||
y_fill: false,
|
|
||||||
x_align: St.Align.END,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
|
|
||||||
vertical: true });
|
|
||||||
mainContentBox.add(messageBox,
|
|
||||||
{ expand: true, y_align: St.Align.START });
|
|
||||||
|
|
||||||
this._subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline headline',
|
|
||||||
text: _("Authentication Required") });
|
|
||||||
|
|
||||||
messageBox.add(this._subjectLabel,
|
|
||||||
{ x_fill: false,
|
|
||||||
y_fill: false,
|
|
||||||
x_align: St.Align.START,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
this._descriptionLabel = new St.Label({ style_class: 'prompt-dialog-description',
|
|
||||||
text: message });
|
|
||||||
this._descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
||||||
this._descriptionLabel.clutter_text.line_wrap = true;
|
|
||||||
|
|
||||||
messageBox.add(this._descriptionLabel,
|
|
||||||
{ x_fill: false,
|
|
||||||
y_fill: true,
|
|
||||||
x_align: St.Align.START,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
if (userNames.length > 1) {
|
if (userNames.length > 1) {
|
||||||
log('polkitAuthenticationAgent: Received ' + userNames.length +
|
log('polkitAuthenticationAgent: Received ' + userNames.length +
|
||||||
@@ -105,12 +74,12 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
if (userIsRoot) {
|
if (userIsRoot) {
|
||||||
let userLabel = new St.Label(({ style_class: 'polkit-dialog-user-root-label',
|
let userLabel = new St.Label(({ style_class: 'polkit-dialog-user-root-label',
|
||||||
text: userRealName }));
|
text: userRealName }));
|
||||||
messageBox.add(userLabel, { x_fill: false,
|
content.messageBox.add(userLabel, { x_fill: false,
|
||||||
x_align: St.Align.START });
|
x_align: St.Align.START });
|
||||||
} else {
|
} else {
|
||||||
let userBox = new St.BoxLayout({ style_class: 'polkit-dialog-user-layout',
|
let userBox = new St.BoxLayout({ style_class: 'polkit-dialog-user-layout',
|
||||||
vertical: false });
|
vertical: false });
|
||||||
messageBox.add(userBox);
|
content.messageBox.add(userBox);
|
||||||
this._userAvatar = new UserWidget.Avatar(this._user,
|
this._userAvatar = new UserWidget.Avatar(this._user,
|
||||||
{ iconSize: DIALOG_ICON_SIZE,
|
{ iconSize: DIALOG_ICON_SIZE,
|
||||||
styleClass: 'polkit-dialog-user-icon' });
|
styleClass: 'polkit-dialog-user-icon' });
|
||||||
@@ -132,7 +101,7 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
this._onUserChanged();
|
this._onUserChanged();
|
||||||
|
|
||||||
this._passwordBox = new St.BoxLayout({ vertical: false, style_class: 'prompt-dialog-password-box' });
|
this._passwordBox = new St.BoxLayout({ vertical: false, style_class: 'prompt-dialog-password-box' });
|
||||||
messageBox.add(this._passwordBox);
|
content.messageBox.add(this._passwordBox);
|
||||||
this._passwordLabel = new St.Label(({ style_class: 'prompt-dialog-password-label' }));
|
this._passwordLabel = new St.Label(({ style_class: 'prompt-dialog-password-label' }));
|
||||||
this._passwordBox.add(this._passwordLabel, { y_fill: false, y_align: St.Align.MIDDLE });
|
this._passwordBox.add(this._passwordLabel, { y_fill: false, y_align: St.Align.MIDDLE });
|
||||||
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
|
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
|
||||||
@@ -155,13 +124,13 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label' });
|
this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label' });
|
||||||
this._errorMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
this._errorMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||||
this._errorMessageLabel.clutter_text.line_wrap = true;
|
this._errorMessageLabel.clutter_text.line_wrap = true;
|
||||||
messageBox.add(this._errorMessageLabel, { x_fill: false, x_align: St.Align.START });
|
content.messageBox.add(this._errorMessageLabel, { x_fill: false, x_align: St.Align.START });
|
||||||
this._errorMessageLabel.hide();
|
this._errorMessageLabel.hide();
|
||||||
|
|
||||||
this._infoMessageLabel = new St.Label({ style_class: 'prompt-dialog-info-label' });
|
this._infoMessageLabel = new St.Label({ style_class: 'prompt-dialog-info-label' });
|
||||||
this._infoMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
this._infoMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||||
this._infoMessageLabel.clutter_text.line_wrap = true;
|
this._infoMessageLabel.clutter_text.line_wrap = true;
|
||||||
messageBox.add(this._infoMessageLabel);
|
content.messageBox.add(this._infoMessageLabel);
|
||||||
this._infoMessageLabel.hide();
|
this._infoMessageLabel.hide();
|
||||||
|
|
||||||
/* text is intentionally non-blank otherwise the height is not the same as for
|
/* text is intentionally non-blank otherwise the height is not the same as for
|
||||||
@@ -173,7 +142,7 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
this._nullMessageLabel.add_style_class_name('hidden');
|
this._nullMessageLabel.add_style_class_name('hidden');
|
||||||
this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||||
this._nullMessageLabel.clutter_text.line_wrap = true;
|
this._nullMessageLabel.clutter_text.line_wrap = true;
|
||||||
messageBox.add(this._nullMessageLabel);
|
content.messageBox.add(this._nullMessageLabel);
|
||||||
this._nullMessageLabel.show();
|
this._nullMessageLabel.show();
|
||||||
|
|
||||||
this._cancelButton = this.addButton({ label: _("Cancel"),
|
this._cancelButton = this.addButton({ label: _("Cancel"),
|
||||||
@@ -370,7 +339,7 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(AuthenticationDialog.prototype);
|
Signals.addSignalMethods(AuthenticationDialog.prototype);
|
||||||
|
|
||||||
const AuthenticationAgent = new Lang.Class({
|
var AuthenticationAgent = new Lang.Class({
|
||||||
Name: 'AuthenticationAgent',
|
Name: 'AuthenticationAgent',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -431,4 +400,4 @@ const 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();
|
||||||
@@ -79,7 +79,7 @@ function makeMessageFromTplEvent(event) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const TelepathyComponent = new Lang.Class({
|
var TelepathyComponent = new Lang.Class({
|
||||||
Name: 'TelepathyComponent',
|
Name: 'TelepathyComponent',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -113,7 +113,7 @@ const TelepathyComponent = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const TelepathyClient = HAVE_TP ? new Lang.Class({
|
var TelepathyClient = HAVE_TP ? new Lang.Class({
|
||||||
Name: 'TelepathyClient',
|
Name: 'TelepathyClient',
|
||||||
Extends: Tp.BaseClient,
|
Extends: Tp.BaseClient,
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ const TelepathyClient = HAVE_TP ? new Lang.Class({
|
|||||||
},
|
},
|
||||||
}) : null;
|
}) : null;
|
||||||
|
|
||||||
const ChatSource = new Lang.Class({
|
var ChatSource = new Lang.Class({
|
||||||
Name: 'ChatSource',
|
Name: 'ChatSource',
|
||||||
Extends: MessageTray.Source,
|
Extends: MessageTray.Source,
|
||||||
|
|
||||||
@@ -647,7 +647,7 @@ const ChatSource = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ChatNotification = new Lang.Class({
|
var ChatNotification = new Lang.Class({
|
||||||
Name: 'ChatNotification',
|
Name: 'ChatNotification',
|
||||||
Extends: MessageTray.Notification,
|
Extends: MessageTray.Notification,
|
||||||
|
|
||||||
@@ -806,7 +806,7 @@ const ChatNotification = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ChatLineBox = new Lang.Class({
|
var ChatLineBox = new Lang.Class({
|
||||||
Name: 'ChatLineBox',
|
Name: 'ChatLineBox',
|
||||||
Extends: St.BoxLayout,
|
Extends: St.BoxLayout,
|
||||||
|
|
||||||
@@ -816,7 +816,7 @@ const ChatLineBox = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ChatNotificationBanner = new Lang.Class({
|
var ChatNotificationBanner = new Lang.Class({
|
||||||
Name: 'ChatNotificationBanner',
|
Name: 'ChatNotificationBanner',
|
||||||
Extends: MessageTray.NotificationBanner,
|
Extends: MessageTray.NotificationBanner,
|
||||||
|
|
||||||
@@ -996,4 +996,4 @@ const ChatNotificationBanner = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = TelepathyComponent;
|
var Component = TelepathyComponent;
|
||||||
|
@@ -12,16 +12,16 @@ 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
|
||||||
};
|
};
|
||||||
|
|
||||||
const CtrlAltTabManager = new Lang.Class({
|
var CtrlAltTabManager = new Lang.Class({
|
||||||
Name: 'CtrlAltTabManager',
|
Name: 'CtrlAltTabManager',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -136,7 +136,7 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const CtrlAltTabPopup = new Lang.Class({
|
var CtrlAltTabPopup = new Lang.Class({
|
||||||
Name: 'CtrlAltTabPopup',
|
Name: 'CtrlAltTabPopup',
|
||||||
Extends: SwitcherPopup.SwitcherPopup,
|
Extends: SwitcherPopup.SwitcherPopup,
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ const CtrlAltTabPopup = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const CtrlAltTabSwitcher = new Lang.Class({
|
var CtrlAltTabSwitcher = new Lang.Class({
|
||||||
Name: 'CtrlAltTabSwitcher',
|
Name: 'CtrlAltTabSwitcher',
|
||||||
Extends: SwitcherPopup.SwitcherList,
|
Extends: SwitcherPopup.SwitcherList,
|
||||||
|
|
||||||
|
@@ -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) {
|
||||||
@@ -33,7 +33,7 @@ function getAppFromSource(source) {
|
|||||||
|
|
||||||
// A container like StBin, but taking the child's scale into account
|
// A container like StBin, but taking the child's scale into account
|
||||||
// when requesting a size
|
// when requesting a size
|
||||||
const DashItemContainer = new Lang.Class({
|
var DashItemContainer = new Lang.Class({
|
||||||
Name: 'DashItemContainer',
|
Name: 'DashItemContainer',
|
||||||
Extends: St.Widget,
|
Extends: St.Widget,
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ const DashItemContainer = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ShowAppsIcon = new Lang.Class({
|
var ShowAppsIcon = new Lang.Class({
|
||||||
Name: 'ShowAppsIcon',
|
Name: 'ShowAppsIcon',
|
||||||
Extends: DashItemContainer,
|
Extends: DashItemContainer,
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ const ShowAppsIcon = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const DragPlaceholderItem = new Lang.Class({
|
var DragPlaceholderItem = new Lang.Class({
|
||||||
Name: 'DragPlaceholderItem',
|
Name: 'DragPlaceholderItem',
|
||||||
Extends: DashItemContainer,
|
Extends: DashItemContainer,
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ const DragPlaceholderItem = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const EmptyDropTargetItem = new Lang.Class({
|
var EmptyDropTargetItem = new Lang.Class({
|
||||||
Name: 'EmptyDropTargetItem',
|
Name: 'EmptyDropTargetItem',
|
||||||
Extends: DashItemContainer,
|
Extends: DashItemContainer,
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ const EmptyDropTargetItem = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const DashActor = new Lang.Class({
|
var DashActor = new Lang.Class({
|
||||||
Name: 'DashActor',
|
Name: 'DashActor',
|
||||||
Extends: St.Widget,
|
Extends: St.Widget,
|
||||||
|
|
||||||
@@ -387,7 +387,7 @@ const DashActor = new Lang.Class({
|
|||||||
|
|
||||||
const baseIconSizes = [ 16, 22, 24, 32, 48, 64 ];
|
const baseIconSizes = [ 16, 22, 24, 32, 48, 64 ];
|
||||||
|
|
||||||
const Dash = new Lang.Class({
|
var Dash = new Lang.Class({
|
||||||
Name: 'Dash',
|
Name: 'Dash',
|
||||||
|
|
||||||
_init : function() {
|
_init : function() {
|
||||||
@@ -756,42 +756,44 @@ const Dash = new Lang.Class({
|
|||||||
let newIndex = 0;
|
let newIndex = 0;
|
||||||
let oldIndex = 0;
|
let oldIndex = 0;
|
||||||
while (newIndex < newApps.length || oldIndex < oldApps.length) {
|
while (newIndex < newApps.length || oldIndex < oldApps.length) {
|
||||||
|
let oldApp = oldApps.length > oldIndex ? oldApps[oldIndex] : null;
|
||||||
|
let newApp = newApps.length > newIndex ? newApps[newIndex] : null;
|
||||||
|
|
||||||
// No change at oldIndex/newIndex
|
// No change at oldIndex/newIndex
|
||||||
if (oldApps[oldIndex] == newApps[newIndex]) {
|
if (oldApp == newApp) {
|
||||||
oldIndex++;
|
oldIndex++;
|
||||||
newIndex++;
|
newIndex++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// App removed at oldIndex
|
// App removed at oldIndex
|
||||||
if (oldApps[oldIndex] &&
|
if (oldApp && newApps.indexOf(oldApp) == -1) {
|
||||||
newApps.indexOf(oldApps[oldIndex]) == -1) {
|
|
||||||
removedActors.push(children[oldIndex]);
|
removedActors.push(children[oldIndex]);
|
||||||
oldIndex++;
|
oldIndex++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// App added at newIndex
|
// App added at newIndex
|
||||||
if (newApps[newIndex] &&
|
if (newApp && oldApps.indexOf(newApp) == -1) {
|
||||||
oldApps.indexOf(newApps[newIndex]) == -1) {
|
addedItems.push({ app: newApp,
|
||||||
addedItems.push({ app: newApps[newIndex],
|
item: this._createAppItem(newApp),
|
||||||
item: this._createAppItem(newApps[newIndex]),
|
|
||||||
pos: newIndex });
|
pos: newIndex });
|
||||||
newIndex++;
|
newIndex++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// App moved
|
// App moved
|
||||||
let insertHere = newApps[newIndex + 1] &&
|
let nextApp = newApps.length > newIndex + 1 ? newApps[newIndex + 1]
|
||||||
newApps[newIndex + 1] == oldApps[oldIndex];
|
: null;
|
||||||
|
let insertHere = nextApp && nextApp == oldApp;
|
||||||
let alreadyRemoved = removedActors.reduce(function(result, actor) {
|
let alreadyRemoved = removedActors.reduce(function(result, actor) {
|
||||||
let removedApp = actor.child._delegate.app;
|
let removedApp = actor.child._delegate.app;
|
||||||
return result || removedApp == newApps[newIndex];
|
return result || removedApp == newApp;
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
if (insertHere || alreadyRemoved) {
|
if (insertHere || alreadyRemoved) {
|
||||||
let newItem = this._createAppItem(newApps[newIndex]);
|
let newItem = this._createAppItem(newApp);
|
||||||
addedItems.push({ app: newApps[newIndex],
|
addedItems.push({ app: newApp,
|
||||||
item: newItem,
|
item: newItem,
|
||||||
pos: newIndex + removedActors.length });
|
pos: newIndex + removedActors.length });
|
||||||
newIndex++;
|
newIndex++;
|
||||||
|
@@ -30,7 +30,7 @@ function _isToday(date) {
|
|||||||
now.getDate() == date.getDate();
|
now.getDate() == date.getDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
const TodayButton = new Lang.Class({
|
var TodayButton = new Lang.Class({
|
||||||
Name: 'TodayButton',
|
Name: 'TodayButton',
|
||||||
|
|
||||||
_init: function(calendar) {
|
_init: function(calendar) {
|
||||||
@@ -84,7 +84,7 @@ const TodayButton = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const WorldClocksSection = new Lang.Class({
|
var WorldClocksSection = new Lang.Class({
|
||||||
Name: 'WorldClocksSection',
|
Name: 'WorldClocksSection',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -194,7 +194,7 @@ const WorldClocksSection = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const WeatherSection = new Lang.Class({
|
var WeatherSection = new Lang.Class({
|
||||||
Name: 'WeatherSection',
|
Name: 'WeatherSection',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -324,7 +324,7 @@ const WeatherSection = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const MessagesIndicator = new Lang.Class({
|
var MessagesIndicator = new Lang.Class({
|
||||||
Name: 'MessagesIndicator',
|
Name: 'MessagesIndicator',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -364,7 +364,7 @@ const MessagesIndicator = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const IndicatorPad = new Lang.Class({
|
var IndicatorPad = new Lang.Class({
|
||||||
Name: 'IndicatorPad',
|
Name: 'IndicatorPad',
|
||||||
Extends: St.Widget,
|
Extends: St.Widget,
|
||||||
|
|
||||||
@@ -387,7 +387,7 @@ const IndicatorPad = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const FreezableBinLayout = new Lang.Class({
|
var FreezableBinLayout = new Lang.Class({
|
||||||
Name: 'FreezableBinLayout',
|
Name: 'FreezableBinLayout',
|
||||||
Extends: Clutter.BinLayout,
|
Extends: Clutter.BinLayout,
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ const FreezableBinLayout = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const CalendarColumnLayout = new Lang.Class({
|
var CalendarColumnLayout = new Lang.Class({
|
||||||
Name: 'CalendarColumnLayout',
|
Name: 'CalendarColumnLayout',
|
||||||
Extends: Clutter.BoxLayout,
|
Extends: Clutter.BoxLayout,
|
||||||
|
|
||||||
@@ -445,7 +445,7 @@ const CalendarColumnLayout = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const DateMenuButton = new Lang.Class({
|
var DateMenuButton = new Lang.Class({
|
||||||
Name: 'DateMenuButton',
|
Name: 'DateMenuButton',
|
||||||
Extends: PanelMenu.Button,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
@@ -474,6 +474,8 @@ const DateMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
let layout = new FreezableBinLayout();
|
let layout = new FreezableBinLayout();
|
||||||
let bin = new St.Widget({ layout_manager: layout });
|
let bin = new St.Widget({ layout_manager: layout });
|
||||||
|
// For some minimal compatibility with PopupMenuItem
|
||||||
|
bin._delegate = this;
|
||||||
this.menu.box.add_child(bin);
|
this.menu.box.add_child(bin);
|
||||||
|
|
||||||
hbox = new St.BoxLayout({ name: 'calendarArea' });
|
hbox = new St.BoxLayout({ name: 'calendarArea' });
|
||||||
|
231
js/ui/dialog.js
Normal file
231
js/ui/dialog.js
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
|
const Pango = imports.gi.Pango;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
|
||||||
|
var Dialog = new Lang.Class({
|
||||||
|
Name: 'Dialog',
|
||||||
|
Extends: St.Widget,
|
||||||
|
|
||||||
|
_init: function (parentActor, styleClass) {
|
||||||
|
this.parent({ layout_manager: new Clutter.BinLayout() });
|
||||||
|
this.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||||
|
|
||||||
|
this._pressedKey = null;
|
||||||
|
this._buttonKeys = {};
|
||||||
|
this._createDialog();
|
||||||
|
this.add_child(this._dialog);
|
||||||
|
|
||||||
|
if (styleClass != null)
|
||||||
|
this._dialog.add_style_class_name(styleClass);
|
||||||
|
|
||||||
|
this._parentActor = parentActor;
|
||||||
|
this._eventId = this._parentActor.connect('event', Lang.bind(this, this._modalEventHandler));
|
||||||
|
this._parentActor.add_child(this);
|
||||||
|
},
|
||||||
|
|
||||||
|
_createDialog: function () {
|
||||||
|
this._dialog = new St.BoxLayout({ style_class: 'modal-dialog',
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
vertical: true });
|
||||||
|
|
||||||
|
// modal dialogs are fixed width and grow vertically; set the request
|
||||||
|
// mode accordingly so wrapped labels are handled correctly during
|
||||||
|
// size requests.
|
||||||
|
this._dialog.request_mode = Clutter.RequestMode.HEIGHT_FOR_WIDTH;
|
||||||
|
|
||||||
|
this.contentLayout = new St.BoxLayout({ vertical: true,
|
||||||
|
style_class: "modal-dialog-content-box" });
|
||||||
|
this._dialog.add(this.contentLayout,
|
||||||
|
{ expand: true,
|
||||||
|
x_fill: true,
|
||||||
|
y_fill: true,
|
||||||
|
x_align: St.Align.MIDDLE,
|
||||||
|
y_align: St.Align.START });
|
||||||
|
|
||||||
|
this.buttonLayout = new St.Widget ({ layout_manager: new Clutter.BoxLayout({ homogeneous:true }) });
|
||||||
|
this._dialog.add(this.buttonLayout,
|
||||||
|
{ x_align: St.Align.MIDDLE,
|
||||||
|
y_align: St.Align.START });
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDestroy: function () {
|
||||||
|
if (this._eventId != 0)
|
||||||
|
this._parentActor.disconnect(this._eventId);
|
||||||
|
this._eventId = 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
_modalEventHandler: function (actor, event) {
|
||||||
|
if (event.type() == Clutter.EventType.KEY_PRESS) {
|
||||||
|
this._pressedKey = event.get_key_symbol();
|
||||||
|
} else if (event.type() == Clutter.EventType.KEY_RELEASE) {
|
||||||
|
let pressedKey = this._pressedKey;
|
||||||
|
this._pressedKey = null;
|
||||||
|
|
||||||
|
let symbol = event.get_key_symbol();
|
||||||
|
if (symbol != pressedKey)
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
|
let buttonInfo = this._buttonKeys[symbol];
|
||||||
|
if (!buttonInfo)
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
|
let { button, action } = buttonInfo;
|
||||||
|
|
||||||
|
if (action && button.reactive) {
|
||||||
|
action();
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
},
|
||||||
|
|
||||||
|
addContent: function (actor) {
|
||||||
|
this.contentLayout.add (actor, { expand: true });
|
||||||
|
},
|
||||||
|
|
||||||
|
addButton: function (buttonInfo) {
|
||||||
|
let { label, action, key } = buttonInfo;
|
||||||
|
let isDefault = buttonInfo['default'];
|
||||||
|
let keys;
|
||||||
|
|
||||||
|
if (key)
|
||||||
|
keys = [key];
|
||||||
|
else if (isDefault)
|
||||||
|
keys = [Clutter.KEY_Return, Clutter.KEY_KP_Enter, Clutter.KEY_ISO_Enter];
|
||||||
|
else
|
||||||
|
keys = [];
|
||||||
|
|
||||||
|
let button = new St.Button({ style_class: 'modal-dialog-linked-button',
|
||||||
|
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
||||||
|
reactive: true,
|
||||||
|
can_focus: true,
|
||||||
|
x_expand: true,
|
||||||
|
y_expand: true,
|
||||||
|
label: label });
|
||||||
|
button.connect('clicked', action);
|
||||||
|
|
||||||
|
buttonInfo['button'] = button;
|
||||||
|
|
||||||
|
if (isDefault)
|
||||||
|
button.add_style_pseudo_class('default');
|
||||||
|
|
||||||
|
if (!this._initialKeyFocusDestroyId)
|
||||||
|
this._initialKeyFocus = button;
|
||||||
|
|
||||||
|
for (let i in keys)
|
||||||
|
this._buttonKeys[keys[i]] = buttonInfo;
|
||||||
|
|
||||||
|
this.buttonLayout.add_actor(button);
|
||||||
|
|
||||||
|
return button;
|
||||||
|
},
|
||||||
|
|
||||||
|
clearButtons: function () {
|
||||||
|
this.buttonLayout.destroy_all_children();
|
||||||
|
this._buttonKeys = {};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
var MessageDialogContent = new Lang.Class({
|
||||||
|
Name: 'MessageDialogContent',
|
||||||
|
Extends: St.BoxLayout,
|
||||||
|
Properties: {
|
||||||
|
'icon': GObject.ParamSpec.object('icon', 'icon', 'icon',
|
||||||
|
GObject.ParamFlags.READWRITE |
|
||||||
|
GObject.ParamFlags.CONSTRUCT,
|
||||||
|
Gio.Icon.$gtype),
|
||||||
|
'title': GObject.ParamSpec.string('title', 'title', 'title',
|
||||||
|
GObject.ParamFlags.READWRITE |
|
||||||
|
GObject.ParamFlags.CONSTRUCT,
|
||||||
|
null),
|
||||||
|
'subtitle': GObject.ParamSpec.string('subtitle', 'subtitle', 'subtitle',
|
||||||
|
GObject.ParamFlags.READWRITE |
|
||||||
|
GObject.ParamFlags.CONSTRUCT,
|
||||||
|
null),
|
||||||
|
'body': GObject.ParamSpec.string('body', 'body', 'body',
|
||||||
|
GObject.ParamFlags.READWRITE |
|
||||||
|
GObject.ParamFlags.CONSTRUCT,
|
||||||
|
null)
|
||||||
|
},
|
||||||
|
|
||||||
|
_init: function(params) {
|
||||||
|
this._icon = new St.Icon({ y_align: Clutter.ActorAlign.START });
|
||||||
|
this._title = new St.Label({ style_class: 'headline' });
|
||||||
|
this._subtitle = new St.Label();
|
||||||
|
this._body = new St.Label();
|
||||||
|
|
||||||
|
['icon', 'title', 'subtitle', 'body'].forEach(prop => {
|
||||||
|
this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
let textProps = { ellipsize_mode: Pango.EllipsizeMode.NONE,
|
||||||
|
line_wrap: true };
|
||||||
|
Object.assign(this._subtitle.clutter_text, textProps);
|
||||||
|
Object.assign(this._body.clutter_text, textProps);
|
||||||
|
|
||||||
|
if (!params.hasOwnProperty('style_class'))
|
||||||
|
params.style_class = 'message-dialog-main-layout';
|
||||||
|
|
||||||
|
this.parent(params);
|
||||||
|
|
||||||
|
this.messageBox = new St.BoxLayout({ style_class: 'message-dialog-content',
|
||||||
|
x_expand: true,
|
||||||
|
vertical: true });
|
||||||
|
|
||||||
|
this.messageBox.add_actor(this._title);
|
||||||
|
this.messageBox.add_actor(this._subtitle);
|
||||||
|
this.messageBox.add_actor(this._body);
|
||||||
|
|
||||||
|
this.add_actor(this._icon);
|
||||||
|
this.add_actor(this.messageBox);
|
||||||
|
},
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return this._icon.gicon;
|
||||||
|
},
|
||||||
|
|
||||||
|
get title() {
|
||||||
|
return this._title.text;
|
||||||
|
},
|
||||||
|
|
||||||
|
get subtitle() {
|
||||||
|
return this._subtitle.text;
|
||||||
|
},
|
||||||
|
|
||||||
|
get body() {
|
||||||
|
return this._body.text;
|
||||||
|
},
|
||||||
|
|
||||||
|
set icon(icon) {
|
||||||
|
Object.assign(this._icon, { gicon: icon, visible: icon != null });
|
||||||
|
this.notify('icon');
|
||||||
|
},
|
||||||
|
|
||||||
|
set title(title) {
|
||||||
|
this._setLabel(this._title, 'title', title);
|
||||||
|
},
|
||||||
|
|
||||||
|
set subtitle(subtitle) {
|
||||||
|
this._setLabel(this._subtitle, 'subtitle', subtitle);
|
||||||
|
},
|
||||||
|
|
||||||
|
set body(body) {
|
||||||
|
this._setLabel(this._body, 'body', body);
|
||||||
|
},
|
||||||
|
|
||||||
|
_setLabel(label, prop, value) {
|
||||||
|
Object.assign(label, { text: value || '', visible: value != null });
|
||||||
|
this.notify(prop);
|
||||||
|
},
|
||||||
|
|
||||||
|
insertBeforeBody: function(actor) {
|
||||||
|
this.messageBox.insert_child_below(actor, this._body);
|
||||||
|
}
|
||||||
|
});
|
14
js/ui/dnd.js
14
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
|
||||||
@@ -69,7 +69,7 @@ function removeDragMonitor(monitor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const _Draggable = new Lang.Class({
|
var _Draggable = new Lang.Class({
|
||||||
Name: 'Draggable',
|
Name: 'Draggable',
|
||||||
|
|
||||||
_init : function(actor, params) {
|
_init : function(actor, params) {
|
||||||
|
@@ -8,10 +8,10 @@ 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;
|
||||||
|
|
||||||
const EdgeDragAction = new Lang.Class({
|
var EdgeDragAction = new Lang.Class({
|
||||||
Name: 'EdgeDragAction',
|
Name: 'EdgeDragAction',
|
||||||
Extends: Clutter.GestureAction,
|
Extends: Clutter.GestureAction,
|
||||||
Signals: { 'activated': {} },
|
Signals: { 'activated': {} },
|
||||||
|
@@ -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"> \
|
||||||
@@ -275,7 +275,7 @@ function init() {
|
|||||||
_endSessionDialog = new EndSessionDialog();
|
_endSessionDialog = new EndSessionDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
const EndSessionDialog = new Lang.Class({
|
var EndSessionDialog = new Lang.Class({
|
||||||
Name: 'EndSessionDialog',
|
Name: 'EndSessionDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ imports.gi.versions.Gtk = '3.0';
|
|||||||
imports.gi.versions.TelepathyGLib = '0.12';
|
imports.gi.versions.TelepathyGLib = '0.12';
|
||||||
imports.gi.versions.TelepathyLogger = '0.2';
|
imports.gi.versions.TelepathyLogger = '0.2';
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gettext = imports.gettext;
|
const Gettext = imports.gettext;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
@@ -130,12 +130,14 @@ function updateExtension(uuid) {
|
|||||||
FileUtils.recursivelyMoveDir(extensionDir, oldExtensionTmpDir);
|
FileUtils.recursivelyMoveDir(extensionDir, oldExtensionTmpDir);
|
||||||
FileUtils.recursivelyMoveDir(newExtensionTmpDir, extensionDir);
|
FileUtils.recursivelyMoveDir(newExtensionTmpDir, extensionDir);
|
||||||
|
|
||||||
let extension = ExtensionUtils.createExtensionObject(uuid, extensionDir, ExtensionUtils.ExtensionType.PER_USER);
|
let extension = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
extension = ExtensionUtils.createExtensionObject(uuid, extensionDir, ExtensionUtils.ExtensionType.PER_USER);
|
||||||
ExtensionSystem.loadExtension(extension);
|
ExtensionSystem.loadExtension(extension);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
ExtensionSystem.unloadExtension(extension);
|
if (extension)
|
||||||
|
ExtensionSystem.unloadExtension(extension);
|
||||||
|
|
||||||
logError(e, 'Error loading extension %s'.format(uuid));
|
logError(e, 'Error loading extension %s'.format(uuid));
|
||||||
|
|
||||||
@@ -181,7 +183,7 @@ function checkForUpdates() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const InstallExtensionDialog = new Lang.Class({
|
var InstallExtensionDialog = new Lang.Class({
|
||||||
Name: 'InstallExtensionDialog',
|
Name: 'InstallExtensionDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
@@ -203,7 +205,7 @@ const InstallExtensionDialog = new Lang.Class({
|
|||||||
|
|
||||||
let message = _("Download and install “%s” from extensions.gnome.org?").format(info.name);
|
let message = _("Download and install “%s” from extensions.gnome.org?").format(info.name);
|
||||||
|
|
||||||
let box = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
let box = new St.BoxLayout({ style_class: 'message-dialog-main-layout',
|
||||||
vertical: false });
|
vertical: false });
|
||||||
this.contentLayout.add(box);
|
this.contentLayout.add(box);
|
||||||
|
|
||||||
@@ -211,7 +213,7 @@ const InstallExtensionDialog = new Lang.Class({
|
|||||||
let icon = new St.Icon({ gicon: gicon });
|
let icon = new St.Icon({ gicon: gicon });
|
||||||
box.add(icon);
|
box.add(icon);
|
||||||
|
|
||||||
let label = new St.Label({ style_class: 'prompt-dialog-headline headline',
|
let label = new St.Label({ style_class: 'message-dialog-title headline',
|
||||||
text: message });
|
text: message });
|
||||||
box.add(label);
|
box.add(label);
|
||||||
},
|
},
|
||||||
@@ -242,9 +244,8 @@ const InstallExtensionDialog = new Lang.Class({
|
|||||||
global.settings.set_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY, enabledExtensions);
|
global.settings.set_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY, enabledExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
let extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
let extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER);
|
||||||
ExtensionSystem.loadExtension(extension);
|
ExtensionSystem.loadExtension(extension);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
uninstallExtension(uuid);
|
uninstallExtension(uuid);
|
||||||
|
@@ -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';
|
||||||
@@ -199,7 +199,14 @@ function reloadExtension(oldExtension) {
|
|||||||
unloadExtension(oldExtension);
|
unloadExtension(oldExtension);
|
||||||
|
|
||||||
// Now, recreate the extension and load it.
|
// Now, recreate the extension and load it.
|
||||||
let newExtension = ExtensionUtils.createExtensionObject(uuid, dir, type);
|
let newExtension;
|
||||||
|
try {
|
||||||
|
newExtension = ExtensionUtils.createExtensionObject(uuid, dir, type);
|
||||||
|
} catch(e) {
|
||||||
|
logExtensionError(uuid, e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
loadExtension(newExtension);
|
loadExtension(newExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,14 +218,21 @@ function initExtension(uuid) {
|
|||||||
throw new Error("Extension was not properly created. Call loadExtension first");
|
throw new Error("Extension was not properly created. Call loadExtension first");
|
||||||
|
|
||||||
let extensionJs = dir.get_child('extension.js');
|
let extensionJs = dir.get_child('extension.js');
|
||||||
if (!extensionJs.query_exists(null))
|
if (!extensionJs.query_exists(null)) {
|
||||||
throw new Error('Missing extension.js');
|
logExtensionError(uuid, new Error('Missing extension.js'));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
let extensionModule;
|
let extensionModule;
|
||||||
let extensionState = null;
|
let extensionState = null;
|
||||||
|
|
||||||
ExtensionUtils.installImporter(extension);
|
ExtensionUtils.installImporter(extension);
|
||||||
extensionModule = extension.imports.extension;
|
try {
|
||||||
|
extensionModule = extension.imports.extension;
|
||||||
|
} catch(e) {
|
||||||
|
logExtensionError(uuid, e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (extensionModule.init) {
|
if (extensionModule.init) {
|
||||||
try {
|
try {
|
||||||
@@ -282,20 +296,12 @@ function _onVersionValidationChanged() {
|
|||||||
// temporarily disable them all
|
// temporarily disable them all
|
||||||
enabledExtensions = [];
|
enabledExtensions = [];
|
||||||
for (let uuid in ExtensionUtils.extensions)
|
for (let uuid in ExtensionUtils.extensions)
|
||||||
try {
|
reloadExtension(ExtensionUtils.extensions[uuid]);
|
||||||
reloadExtension(ExtensionUtils.extensions[uuid]);
|
|
||||||
} catch(e) {
|
|
||||||
logExtensionError(uuid, e);
|
|
||||||
}
|
|
||||||
enabledExtensions = getEnabledExtensions();
|
enabledExtensions = getEnabledExtensions();
|
||||||
|
|
||||||
if (Main.sessionMode.allowExtensions) {
|
if (Main.sessionMode.allowExtensions) {
|
||||||
enabledExtensions.forEach(function(uuid) {
|
enabledExtensions.forEach(function(uuid) {
|
||||||
try {
|
enableExtension(uuid);
|
||||||
enableExtension(uuid);
|
|
||||||
} catch(e) {
|
|
||||||
logExtensionError(uuid, e);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -28,7 +28,7 @@ const Signals = imports.signals;
|
|||||||
const CARETMOVED = 'object:text-caret-moved';
|
const CARETMOVED = 'object:text-caret-moved';
|
||||||
const STATECHANGED = 'object:state-changed';
|
const STATECHANGED = 'object:state-changed';
|
||||||
|
|
||||||
const FocusCaretTracker = new Lang.Class({
|
var FocusCaretTracker = new Lang.Class({
|
||||||
Name: 'FocusCaretTracker',
|
Name: 'FocusCaretTracker',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -47,30 +47,27 @@ const FocusCaretTracker = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_initAtspi: function() {
|
_initAtspi: function() {
|
||||||
if (!this._atspiInited) {
|
if (!this._atspiInited && Atspi.init() == 0) {
|
||||||
Atspi.init();
|
|
||||||
Atspi.set_timeout(250, 250);
|
Atspi.set_timeout(250, 250);
|
||||||
this._atspiInited = true;
|
this._atspiInited = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return this._atspiInited;
|
||||||
},
|
},
|
||||||
|
|
||||||
registerFocusListener: function() {
|
registerFocusListener: function() {
|
||||||
if (this._focusListenerRegistered)
|
if (!this._initAtspi() || this._focusListenerRegistered)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._initAtspi();
|
|
||||||
|
|
||||||
this._atspiListener.register(STATECHANGED + ':focused');
|
this._atspiListener.register(STATECHANGED + ':focused');
|
||||||
this._atspiListener.register(STATECHANGED + ':selected');
|
this._atspiListener.register(STATECHANGED + ':selected');
|
||||||
this._focusListenerRegistered = true;
|
this._focusListenerRegistered = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
registerCaretListener: function() {
|
registerCaretListener: function() {
|
||||||
if (this._caretListenerRegistered)
|
if (!this._initAtspi() || this._caretListenerRegistered)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._initAtspi();
|
|
||||||
|
|
||||||
this._atspiListener.register(CARETMOVED);
|
this._atspiListener.register(CARETMOVED);
|
||||||
this._caretListenerRegistered = true;
|
this._caretListenerRegistered = true;
|
||||||
},
|
},
|
||||||
|
@@ -46,7 +46,7 @@ function _popGrabHelper(grabHelper) {
|
|||||||
// your code just needs to deal with it; you shouldn't adjust behavior directly
|
// your code just needs to deal with it; you shouldn't adjust behavior directly
|
||||||
// after you call ungrab(), but instead pass an 'onUngrab' callback when you
|
// after you call ungrab(), but instead pass an 'onUngrab' callback when you
|
||||||
// call grab().
|
// call grab().
|
||||||
const GrabHelper = new Lang.Class({
|
var GrabHelper = new Lang.Class({
|
||||||
Name: 'GrabHelper',
|
Name: 'GrabHelper',
|
||||||
|
|
||||||
_init: function(owner, params) {
|
_init: function(owner, params) {
|
||||||
|
@@ -9,12 +9,12 @@ 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' ];
|
||||||
|
|
||||||
const CandidateArea = new Lang.Class({
|
var CandidateArea = new Lang.Class({
|
||||||
Name: 'CandidateArea',
|
Name: 'CandidateArea',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -128,7 +128,7 @@ const CandidateArea = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(CandidateArea.prototype);
|
Signals.addSignalMethods(CandidateArea.prototype);
|
||||||
|
|
||||||
const CandidatePopup = new Lang.Class({
|
var CandidatePopup = new Lang.Class({
|
||||||
Name: 'CandidatePopup',
|
Name: 'CandidatePopup',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -12,29 +12,29 @@ 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;
|
||||||
|
|
||||||
const BaseIcon = new Lang.Class({
|
var BaseIcon = new Lang.Class({
|
||||||
Name: 'BaseIcon',
|
Name: 'BaseIcon',
|
||||||
|
|
||||||
_init : function(label, params) {
|
_init : function(label, params) {
|
||||||
@@ -240,7 +240,7 @@ function zoomOutActor(actor) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const IconGrid = new Lang.Class({
|
var IconGrid = new Lang.Class({
|
||||||
Name: 'IconGrid',
|
Name: 'IconGrid',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
@@ -267,6 +267,7 @@ const IconGrid = new Lang.Class({
|
|||||||
this.actor = new St.BoxLayout({ style_class: 'icon-grid',
|
this.actor = new St.BoxLayout({ style_class: 'icon-grid',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
this._items = [];
|
this._items = [];
|
||||||
|
this._clonesAnimating = [];
|
||||||
// Pulled from CSS, but hardcode some defaults here
|
// Pulled from CSS, but hardcode some defaults here
|
||||||
this._spacing = 0;
|
this._spacing = 0;
|
||||||
this._hItemSize = this._vItemSize = ICON_SIZE;
|
this._hItemSize = this._vItemSize = ICON_SIZE;
|
||||||
@@ -275,6 +276,13 @@ const IconGrid = new Lang.Class({
|
|||||||
this.actor.add(this._grid, { expand: true, y_align: St.Align.START });
|
this.actor.add(this._grid, { expand: true, y_align: St.Align.START });
|
||||||
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
||||||
|
|
||||||
|
// Cancel animations when hiding the overview, to avoid icons
|
||||||
|
// swarming into the void ...
|
||||||
|
this.actor.connect('notify::mapped', () => {
|
||||||
|
if (!this.actor.mapped)
|
||||||
|
this._cancelAnimation();
|
||||||
|
});
|
||||||
|
|
||||||
this._grid.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this._grid.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
||||||
this._grid.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this._grid.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||||
this._grid.connect('allocate', Lang.bind(this, this._allocate));
|
this._grid.connect('allocate', Lang.bind(this, this._allocate));
|
||||||
@@ -410,8 +418,13 @@ const IconGrid = new Lang.Class({
|
|||||||
return this._getVisibleChildren();
|
return this._getVisibleChildren();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_cancelAnimation: function() {
|
||||||
|
this._clonesAnimating.forEach(clone => { clone.destroy(); });
|
||||||
|
this._clonesAnimating = [];
|
||||||
|
},
|
||||||
|
|
||||||
_animationDone: function() {
|
_animationDone: function() {
|
||||||
this._animating = false;
|
this._clonesAnimating = [];
|
||||||
this.emit('animation-done');
|
this.emit('animation-done');
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -419,10 +432,7 @@ const IconGrid = new Lang.Class({
|
|||||||
if (animationDirection != AnimationDirection.IN)
|
if (animationDirection != AnimationDirection.IN)
|
||||||
throw new Error("Pulse animation only implements 'in' animation direction");
|
throw new Error("Pulse animation only implements 'in' animation direction");
|
||||||
|
|
||||||
if (this._animating)
|
this._cancelAnimation();
|
||||||
return;
|
|
||||||
|
|
||||||
this._animating = true;
|
|
||||||
|
|
||||||
let actors = this._getChildrenToAnimate();
|
let actors = this._getChildrenToAnimate();
|
||||||
if (actors.length == 0) {
|
if (actors.length == 0) {
|
||||||
@@ -470,10 +480,7 @@ const IconGrid = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
animateSpring: function(animationDirection, sourceActor) {
|
animateSpring: function(animationDirection, sourceActor) {
|
||||||
if (this._animating)
|
this._cancelAnimation();
|
||||||
return;
|
|
||||||
|
|
||||||
this._animating = true;
|
|
||||||
|
|
||||||
let actors = this._getChildrenToAnimate();
|
let actors = this._getChildrenToAnimate();
|
||||||
if (actors.length == 0) {
|
if (actors.length == 0) {
|
||||||
@@ -507,6 +514,7 @@ const IconGrid = new Lang.Class({
|
|||||||
actor.reactive = false;
|
actor.reactive = false;
|
||||||
|
|
||||||
let actorClone = new Clutter.Clone({ source: actor });
|
let actorClone = new Clutter.Clone({ source: actor });
|
||||||
|
this._clonesAnimating.push(actorClone);
|
||||||
Main.uiGroup.add_actor(actorClone);
|
Main.uiGroup.add_actor(actorClone);
|
||||||
|
|
||||||
let [width, height,,] = this._getAllocatedChildSizeAndSpacing(actor);
|
let [width, height,,] = this._getAllocatedChildSizeAndSpacing(actor);
|
||||||
@@ -790,7 +798,7 @@ const IconGrid = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(IconGrid.prototype);
|
Signals.addSignalMethods(IconGrid.prototype);
|
||||||
|
|
||||||
const PaginatedIconGrid = new Lang.Class({
|
var PaginatedIconGrid = new Lang.Class({
|
||||||
Name: 'PaginatedIconGrid',
|
Name: 'PaginatedIconGrid',
|
||||||
Extends: IconGrid,
|
Extends: IconGrid,
|
||||||
|
|
||||||
|
@@ -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';
|
||||||
@@ -27,7 +27,7 @@ const KEYBOARD_TYPE = 'keyboard-type';
|
|||||||
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
||||||
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
||||||
|
|
||||||
const Key = new Lang.Class({
|
var Key = new Lang.Class({
|
||||||
Name: 'Key',
|
Name: 'Key',
|
||||||
|
|
||||||
_init : function(key) {
|
_init : function(key) {
|
||||||
@@ -153,7 +153,7 @@ const Key = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Key.prototype);
|
Signals.addSignalMethods(Key.prototype);
|
||||||
|
|
||||||
const Keyboard = new Lang.Class({
|
var Keyboard = new Lang.Class({
|
||||||
Name: 'Keyboard',
|
Name: 'Keyboard',
|
||||||
|
|
||||||
_init: function () {
|
_init: function () {
|
||||||
@@ -171,8 +171,7 @@ const Keyboard = new Lang.Class({
|
|||||||
this._keyboardSettings = new Gio.Settings({ schema_id: KEYBOARD_SCHEMA });
|
this._keyboardSettings = new Gio.Settings({ schema_id: KEYBOARD_SCHEMA });
|
||||||
this._keyboardSettings.connect('changed', Lang.bind(this, this._sync));
|
this._keyboardSettings.connect('changed', Lang.bind(this, this._sync));
|
||||||
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
|
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
|
||||||
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._sync));
|
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._syncEnabled));
|
||||||
this._daemonProxy = null;
|
|
||||||
this._lastDeviceId = null;
|
this._lastDeviceId = null;
|
||||||
|
|
||||||
Caribou.DisplayAdapter.set_default(new LocalAdapter());
|
Caribou.DisplayAdapter.set_default(new LocalAdapter());
|
||||||
@@ -184,7 +183,7 @@ const Keyboard = new Lang.Class({
|
|||||||
|
|
||||||
if (device.get_device_name().indexOf('XTEST') < 0) {
|
if (device.get_device_name().indexOf('XTEST') < 0) {
|
||||||
this._lastDeviceId = deviceId;
|
this._lastDeviceId = deviceId;
|
||||||
this._sync();
|
this._syncEnabled();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
this._sync();
|
this._sync();
|
||||||
@@ -305,24 +304,32 @@ const Keyboard = new Lang.Class({
|
|||||||
return device.get_device_type() == Clutter.InputDeviceType.TOUCHSCREEN_DEVICE;
|
return device.get_device_type() == Clutter.InputDeviceType.TOUCHSCREEN_DEVICE;
|
||||||
},
|
},
|
||||||
|
|
||||||
_sync: function () {
|
_syncEnabled: function () {
|
||||||
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD) ||
|
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD) ||
|
||||||
this._lastDeviceIsTouchscreen();
|
this._lastDeviceIsTouchscreen();
|
||||||
if (!this._enableKeyboard && !this._keyboard)
|
if (!this._enableKeyboard && !this._keyboard)
|
||||||
return;
|
return;
|
||||||
if (this._enableKeyboard && this._keyboard &&
|
|
||||||
this._keyboard.keyboard_type == this._keyboardSettings.get_string(KEYBOARD_TYPE))
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._setCaretTrackerEnabled(this._enableKeyboard);
|
this._setCaretTrackerEnabled(this._enableKeyboard);
|
||||||
|
|
||||||
if (this._keyboard)
|
if (this._enableKeyboard) {
|
||||||
this._destroyKeyboard();
|
if (!this._keyboard)
|
||||||
|
this._setupKeyboard();
|
||||||
if (this._enableKeyboard)
|
else
|
||||||
this._setupKeyboard();
|
Main.layoutManager.showKeyboard();
|
||||||
else
|
} else {
|
||||||
Main.layoutManager.hideKeyboard(true);
|
Main.layoutManager.hideKeyboard(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_sync: function () {
|
||||||
|
if (this._keyboard &&
|
||||||
|
this._keyboard.keyboard_type != this._keyboardSettings.get_string(KEYBOARD_TYPE)) {
|
||||||
|
this._destroyKeyboard();
|
||||||
|
this._setupKeyboard();
|
||||||
|
}
|
||||||
|
|
||||||
|
this._syncEnabled();
|
||||||
},
|
},
|
||||||
|
|
||||||
_destroyKeyboard: function() {
|
_destroyKeyboard: function() {
|
||||||
@@ -339,15 +346,6 @@ const Keyboard = new Lang.Class({
|
|||||||
this.actor = null;
|
this.actor = null;
|
||||||
|
|
||||||
this._destroySource();
|
this._destroySource();
|
||||||
if (this._daemonProxy) {
|
|
||||||
this._daemonProxy.QuitRemote(function (result, error) {
|
|
||||||
if (error) {
|
|
||||||
log(error.message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this._daemonProxy = null;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_setupKeyboard: function() {
|
_setupKeyboard: function() {
|
||||||
@@ -607,7 +605,7 @@ const Keyboard = new Lang.Class({
|
|||||||
shouldTakeEvent: function(event) {
|
shouldTakeEvent: function(event) {
|
||||||
let actor = event.get_source();
|
let actor = event.get_source();
|
||||||
return Main.layoutManager.keyboardBox.contains(actor) ||
|
return Main.layoutManager.keyboardBox.contains(actor) ||
|
||||||
actor._extended_keys || actor.extended_key;
|
!!actor._extended_keys || !!actor.extended_key;
|
||||||
},
|
},
|
||||||
|
|
||||||
_clearKeyboardRestTimer: function() {
|
_clearKeyboardRestTimer: function() {
|
||||||
@@ -731,7 +729,7 @@ const Keyboard = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const KeyboardSource = new Lang.Class({
|
var KeyboardSource = new Lang.Class({
|
||||||
Name: 'KeyboardSource',
|
Name: 'KeyboardSource',
|
||||||
Extends: MessageTray.Source,
|
Extends: MessageTray.Source,
|
||||||
|
|
||||||
@@ -752,7 +750,7 @@ const KeyboardSource = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const LocalAdapter = new Lang.Class({
|
var LocalAdapter = new Lang.Class({
|
||||||
Name: 'LocalAdapter',
|
Name: 'LocalAdapter',
|
||||||
Extends: Caribou.XAdapter,
|
Extends: Caribou.XAdapter,
|
||||||
|
|
||||||
|
@@ -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()) {
|
||||||
@@ -36,7 +36,7 @@ function isPopupMetaWindow(actor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const MonitorConstraint = new Lang.Class({
|
var MonitorConstraint = new Lang.Class({
|
||||||
Name: 'MonitorConstraint',
|
Name: 'MonitorConstraint',
|
||||||
Extends: Clutter.Constraint,
|
Extends: Clutter.Constraint,
|
||||||
Properties: {'primary': GObject.ParamSpec.boolean('primary',
|
Properties: {'primary': GObject.ParamSpec.boolean('primary',
|
||||||
@@ -147,7 +147,7 @@ const MonitorConstraint = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Monitor = new Lang.Class({
|
var Monitor = new Lang.Class({
|
||||||
Name: 'Monitor',
|
Name: 'Monitor',
|
||||||
|
|
||||||
_init: function(index, geometry) {
|
_init: function(index, geometry) {
|
||||||
@@ -169,7 +169,7 @@ const defaultParams = {
|
|||||||
affectsInputRegion: true
|
affectsInputRegion: true
|
||||||
};
|
};
|
||||||
|
|
||||||
const LayoutManager = new Lang.Class({
|
var LayoutManager = new Lang.Class({
|
||||||
Name: 'LayoutManager',
|
Name: 'LayoutManager',
|
||||||
|
|
||||||
_init: function () {
|
_init: function () {
|
||||||
@@ -769,8 +769,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
// @actor: a descendant of the chrome to begin tracking
|
// @actor: a descendant of the chrome to begin tracking
|
||||||
// @params: parameters describing how to track @actor
|
// @params: parameters describing how to track @actor
|
||||||
//
|
//
|
||||||
// Tells the chrome to track @actor, which must be a descendant
|
// Tells the chrome to track @actor. This can be used to extend the
|
||||||
// of an actor added via addChrome(). This can be used to extend the
|
|
||||||
// struts or input region to cover specific children.
|
// struts or input region to cover specific children.
|
||||||
//
|
//
|
||||||
// @params can have any of the same values as in addChrome(),
|
// @params can have any of the same values as in addChrome(),
|
||||||
@@ -783,10 +782,9 @@ const LayoutManager = new Lang.Class({
|
|||||||
ancestor = ancestor.get_parent();
|
ancestor = ancestor.get_parent();
|
||||||
index = this._findActor(ancestor);
|
index = this._findActor(ancestor);
|
||||||
}
|
}
|
||||||
if (!ancestor)
|
|
||||||
throw new Error('actor is not a descendent of a chrome actor');
|
|
||||||
|
|
||||||
let ancestorData = this._trackedActors[index];
|
let ancestorData = ancestor ? this._trackedActors[index]
|
||||||
|
: defaultParams;
|
||||||
if (!params)
|
if (!params)
|
||||||
params = {};
|
params = {};
|
||||||
// We can't use Params.parse here because we want to drop
|
// We can't use Params.parse here because we want to drop
|
||||||
@@ -896,7 +894,10 @@ const LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
findMonitorForActor: function(actor) {
|
findMonitorForActor: function(actor) {
|
||||||
return this.monitors[this.findIndexForActor(actor)];
|
let index = this.findIndexForActor(actor);
|
||||||
|
if (index >= 0 && index < this.monitors.length)
|
||||||
|
return this.monitors[index];
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
_queueUpdateRegions: function() {
|
_queueUpdateRegions: function() {
|
||||||
@@ -966,7 +967,11 @@ const LayoutManager = new Lang.Class({
|
|||||||
if (actorData.affectsInputRegion && wantsInputRegion && actorData.actor.get_paint_visibility())
|
if (actorData.affectsInputRegion && wantsInputRegion && actorData.actor.get_paint_visibility())
|
||||||
rects.push(new Meta.Rectangle({ x: x, y: y, width: w, height: h }));
|
rects.push(new Meta.Rectangle({ x: x, y: y, width: w, height: h }));
|
||||||
|
|
||||||
if (actorData.affectsStruts) {
|
let monitor = null;
|
||||||
|
if (actorData.affectsStruts)
|
||||||
|
monitor = this.findMonitorForActor(actorData.actor);
|
||||||
|
|
||||||
|
if (monitor) {
|
||||||
// Limit struts to the size of the screen
|
// Limit struts to the size of the screen
|
||||||
let x1 = Math.max(x, 0);
|
let x1 = Math.max(x, 0);
|
||||||
let x2 = Math.min(x + w, global.screen_width);
|
let x2 = Math.min(x + w, global.screen_width);
|
||||||
@@ -983,7 +988,6 @@ const LayoutManager = new Lang.Class({
|
|||||||
// spans the width/height across the middle of the
|
// spans the width/height across the middle of the
|
||||||
// screen, then we don't create a strut for it at all.
|
// screen, then we don't create a strut for it at all.
|
||||||
|
|
||||||
let monitor = this.findMonitorForActor(actorData.actor);
|
|
||||||
let side;
|
let side;
|
||||||
if (x1 <= monitor.x && x2 >= monitor.x + monitor.width) {
|
if (x1 <= monitor.x && x2 >= monitor.x + monitor.width) {
|
||||||
if (y1 <= monitor.y)
|
if (y1 <= monitor.y)
|
||||||
@@ -1041,7 +1045,7 @@ Signals.addSignalMethods(LayoutManager.prototype);
|
|||||||
//
|
//
|
||||||
// This class manages a "hot corner" that can toggle switching to
|
// This class manages a "hot corner" that can toggle switching to
|
||||||
// overview.
|
// overview.
|
||||||
const HotCorner = new Lang.Class({
|
var HotCorner = new Lang.Class({
|
||||||
Name: 'HotCorner',
|
Name: 'HotCorner',
|
||||||
|
|
||||||
_init : function(layoutManager, monitor, x, y) {
|
_init : function(layoutManager, monitor, x, y) {
|
||||||
@@ -1235,7 +1239,7 @@ const HotCorner = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const PressureBarrier = new Lang.Class({
|
var PressureBarrier = new Lang.Class({
|
||||||
Name: 'PressureBarrier',
|
Name: 'PressureBarrier',
|
||||||
|
|
||||||
_init: function(threshold, timeout, actionMode) {
|
_init: function(threshold, timeout, actionMode) {
|
||||||
|
@@ -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,14 +29,14 @@ 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;
|
||||||
|
|
||||||
const LegacyTray = new Lang.Class({
|
var LegacyTray = new Lang.Class({
|
||||||
Name: 'LegacyTray',
|
Name: 'LegacyTray',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -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\
|
||||||
@@ -27,7 +27,7 @@ t = clamp(t, 0.0, 1.0);\n\
|
|||||||
float pixel_brightness = mix(1.0, 1.0 - vignette_sharpness, t);\n\
|
float pixel_brightness = mix(1.0, 1.0 - vignette_sharpness, t);\n\
|
||||||
cogl_color_out.a = cogl_color_out.a * (1 - pixel_brightness * brightness);';
|
cogl_color_out.a = cogl_color_out.a * (1 - pixel_brightness * brightness);';
|
||||||
|
|
||||||
const RadialShaderQuad = new Lang.Class({
|
var RadialShaderQuad = new Lang.Class({
|
||||||
Name: 'RadialShaderQuad',
|
Name: 'RadialShaderQuad',
|
||||||
Extends: Shell.GLSLQuad,
|
Extends: Shell.GLSLQuad,
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ const RadialShaderQuad = new Lang.Class({
|
|||||||
* @container and will track any changes in its size. You can override
|
* @container and will track any changes in its size. You can override
|
||||||
* this by passing an explicit width and height in @params.
|
* this by passing an explicit width and height in @params.
|
||||||
*/
|
*/
|
||||||
const Lightbox = new Lang.Class({
|
var Lightbox = new Lang.Class({
|
||||||
Name: 'Lightbox',
|
Name: 'Lightbox',
|
||||||
|
|
||||||
_init : function(container, params) {
|
_init : function(container, params) {
|
||||||
|
@@ -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'];
|
||||||
@@ -59,7 +59,7 @@ function _getAutoCompleteGlobalKeywords() {
|
|||||||
return keywords.concat(windowProperties).concat(headerProperties);
|
return keywords.concat(windowProperties).concat(headerProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
const AutoComplete = new Lang.Class({
|
var AutoComplete = new Lang.Class({
|
||||||
Name: 'AutoComplete',
|
Name: 'AutoComplete',
|
||||||
|
|
||||||
_init: function(entry) {
|
_init: function(entry) {
|
||||||
@@ -125,7 +125,7 @@ const AutoComplete = new Lang.Class({
|
|||||||
Signals.addSignalMethods(AutoComplete.prototype);
|
Signals.addSignalMethods(AutoComplete.prototype);
|
||||||
|
|
||||||
|
|
||||||
const Notebook = new Lang.Class({
|
var Notebook = new Lang.Class({
|
||||||
Name: 'Notebook',
|
Name: 'Notebook',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -263,7 +263,7 @@ function objectToString(o) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const ObjLink = new Lang.Class({
|
var ObjLink = new Lang.Class({
|
||||||
Name: 'ObjLink',
|
Name: 'ObjLink',
|
||||||
|
|
||||||
_init: function(lookingGlass, o, title) {
|
_init: function(lookingGlass, o, title) {
|
||||||
@@ -290,7 +290,7 @@ const ObjLink = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Result = new Lang.Class({
|
var Result = new Lang.Class({
|
||||||
Name: 'Result',
|
Name: 'Result',
|
||||||
|
|
||||||
_init: function(lookingGlass, command, o, index) {
|
_init: function(lookingGlass, command, o, index) {
|
||||||
@@ -313,7 +313,7 @@ const Result = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const WindowList = new Lang.Class({
|
var WindowList = new Lang.Class({
|
||||||
Name: 'WindowList',
|
Name: 'WindowList',
|
||||||
|
|
||||||
_init: function(lookingGlass) {
|
_init: function(lookingGlass) {
|
||||||
@@ -361,7 +361,7 @@ const WindowList = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(WindowList.prototype);
|
Signals.addSignalMethods(WindowList.prototype);
|
||||||
|
|
||||||
const ObjInspector = new Lang.Class({
|
var ObjInspector = new Lang.Class({
|
||||||
Name: 'ObjInspector',
|
Name: 'ObjInspector',
|
||||||
|
|
||||||
_init: function(lookingGlass) {
|
_init: function(lookingGlass) {
|
||||||
@@ -471,7 +471,7 @@ const ObjInspector = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const RedBorderEffect = new Lang.Class({
|
var RedBorderEffect = new Lang.Class({
|
||||||
Name: 'RedBorderEffect',
|
Name: 'RedBorderEffect',
|
||||||
Extends: Clutter.Effect,
|
Extends: Clutter.Effect,
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ const RedBorderEffect = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const Inspector = new Lang.Class({
|
var Inspector = new Lang.Class({
|
||||||
Name: 'Inspector',
|
Name: 'Inspector',
|
||||||
|
|
||||||
_init: function(lookingGlass) {
|
_init: function(lookingGlass) {
|
||||||
@@ -631,7 +631,7 @@ const Inspector = new Lang.Class({
|
|||||||
|
|
||||||
Signals.addSignalMethods(Inspector.prototype);
|
Signals.addSignalMethods(Inspector.prototype);
|
||||||
|
|
||||||
const Extensions = new Lang.Class({
|
var Extensions = new Lang.Class({
|
||||||
Name: 'Extensions',
|
Name: 'Extensions',
|
||||||
|
|
||||||
_init: function(lookingGlass) {
|
_init: function(lookingGlass) {
|
||||||
@@ -774,7 +774,7 @@ const Extensions = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const LookingGlass = new Lang.Class({
|
var LookingGlass = new Lang.Class({
|
||||||
Name: 'LookingGlass',
|
Name: 'LookingGlass',
|
||||||
|
|
||||||
_init : function() {
|
_init : function() {
|
||||||
@@ -783,6 +783,7 @@ const LookingGlass = new Lang.Class({
|
|||||||
|
|
||||||
this._open = false;
|
this._open = false;
|
||||||
|
|
||||||
|
this._it = null;
|
||||||
this._offset = 0;
|
this._offset = 0;
|
||||||
this._results = [];
|
this._results = [];
|
||||||
|
|
||||||
|
@@ -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';
|
||||||
@@ -54,7 +54,7 @@ const CROSS_HAIRS_CLIP_KEY = 'cross-hairs-clip';
|
|||||||
|
|
||||||
let magDBusService = null;
|
let magDBusService = null;
|
||||||
|
|
||||||
const Magnifier = new Lang.Class({
|
var Magnifier = new Lang.Class({
|
||||||
Name: 'Magnifier',
|
Name: 'Magnifier',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -672,7 +672,7 @@ const Magnifier = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Magnifier.prototype);
|
Signals.addSignalMethods(Magnifier.prototype);
|
||||||
|
|
||||||
const ZoomRegion = new Lang.Class({
|
var ZoomRegion = new Lang.Class({
|
||||||
Name: 'ZoomRegion',
|
Name: 'ZoomRegion',
|
||||||
|
|
||||||
_init: function(magnifier, mouseSourceActor) {
|
_init: function(magnifier, mouseSourceActor) {
|
||||||
@@ -1536,7 +1536,7 @@ const ZoomRegion = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Crosshairs = new Lang.Class({
|
var Crosshairs = new Lang.Class({
|
||||||
Name: 'Crosshairs',
|
Name: 'Crosshairs',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -1781,7 +1781,7 @@ const Crosshairs = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const MagShaderEffects = new Lang.Class({
|
var MagShaderEffects = new Lang.Class({
|
||||||
Name: 'MagShaderEffects',
|
Name: 'MagShaderEffects',
|
||||||
|
|
||||||
_init: function(uiGroupClone) {
|
_init: function(uiGroupClone) {
|
||||||
|
@@ -98,7 +98,7 @@ const ZoomRegionIface = '<node> \
|
|||||||
// '/org/gnome/Magnifier/ZoomRegion/zoomer1', etc.
|
// '/org/gnome/Magnifier/ZoomRegion/zoomer1', etc.
|
||||||
let _zoomRegionInstanceCount = 0;
|
let _zoomRegionInstanceCount = 0;
|
||||||
|
|
||||||
const ShellMagnifier = new Lang.Class({
|
var ShellMagnifier = new Lang.Class({
|
||||||
Name: 'ShellMagnifier',
|
Name: 'ShellMagnifier',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -334,7 +334,7 @@ const ShellMagnifier = new Lang.Class({
|
|||||||
* @zoomerObjectPath: String that is the path to a DBus ZoomRegion.
|
* @zoomerObjectPath: String that is the path to a DBus ZoomRegion.
|
||||||
* @zoomRegion: The actual zoom region associated with the object path.
|
* @zoomRegion: The actual zoom region associated with the object path.
|
||||||
*/
|
*/
|
||||||
const ShellMagnifierZoomRegion = new Lang.Class({
|
var ShellMagnifierZoomRegion = new Lang.Class({
|
||||||
Name: 'ShellMagnifierZoomRegion',
|
Name: 'ShellMagnifierZoomRegion',
|
||||||
|
|
||||||
_init: function(zoomerObjectPath, zoomRegion) {
|
_init: function(zoomerObjectPath, zoomRegion) {
|
||||||
|
@@ -50,36 +50,36 @@ const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
|
|||||||
const STICKY_KEYS_ENABLE = 'stickykeys-enable';
|
const STICKY_KEYS_ENABLE = 'stickykeys-enable';
|
||||||
const GNOMESHELL_STARTED_MESSAGE_ID = 'f3ea493c22934e26811cd62abe8e203a';
|
const GNOMESHELL_STARTED_MESSAGE_ID = 'f3ea493c22934e26811cd62abe8e203a';
|
||||||
|
|
||||||
let componentManager = null;
|
var componentManager = null;
|
||||||
let panel = null;
|
var panel = null;
|
||||||
let overview = null;
|
var overview = null;
|
||||||
let runDialog = null;
|
var runDialog = null;
|
||||||
let lookingGlass = null;
|
var lookingGlass = null;
|
||||||
let wm = null;
|
var wm = null;
|
||||||
let legacyTray = null;
|
var legacyTray = null;
|
||||||
let messageTray = null;
|
var messageTray = null;
|
||||||
let screenShield = null;
|
var screenShield = null;
|
||||||
let notificationDaemon = null;
|
var notificationDaemon = null;
|
||||||
let windowAttentionHandler = null;
|
var windowAttentionHandler = null;
|
||||||
let ctrlAltTabManager = null;
|
var ctrlAltTabManager = null;
|
||||||
let padOsdService = null;
|
var padOsdService = null;
|
||||||
let osdWindowManager = null;
|
var osdWindowManager = null;
|
||||||
let osdMonitorLabeler = null;
|
var osdMonitorLabeler = null;
|
||||||
let sessionMode = null;
|
var sessionMode = null;
|
||||||
let shellAccessDialogDBusService = null;
|
var shellAccessDialogDBusService = null;
|
||||||
let shellAudioSelectionDBusService = null;
|
var shellAudioSelectionDBusService = null;
|
||||||
let shellDBusService = null;
|
var shellDBusService = null;
|
||||||
let shellMountOpDBusService = null;
|
var shellMountOpDBusService = null;
|
||||||
let screenSaverDBus = null;
|
var screenSaverDBus = null;
|
||||||
let screencastService = null;
|
var screencastService = null;
|
||||||
let modalCount = 0;
|
var modalCount = 0;
|
||||||
let actionMode = Shell.ActionMode.NONE;
|
var actionMode = Shell.ActionMode.NONE;
|
||||||
let modalActorFocusStack = [];
|
var modalActorFocusStack = [];
|
||||||
let uiGroup = null;
|
var uiGroup = null;
|
||||||
let magnifier = null;
|
var magnifier = null;
|
||||||
let xdndHandler = null;
|
var xdndHandler = null;
|
||||||
let keyboard = null;
|
var keyboard = null;
|
||||||
let layoutManager = null;
|
var layoutManager = null;
|
||||||
let _startDate;
|
let _startDate;
|
||||||
let _defaultCssStylesheet = null;
|
let _defaultCssStylesheet = null;
|
||||||
let _cssStylesheet = null;
|
let _cssStylesheet = null;
|
||||||
@@ -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 = [];
|
||||||
@@ -669,7 +669,7 @@ function queueDeferredWork(workId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const RestartMessage = new Lang.Class({
|
var RestartMessage = new Lang.Class({
|
||||||
Name: 'RestartMessage',
|
Name: 'RestartMessage',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
|
@@ -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) {
|
||||||
@@ -39,7 +39,7 @@ function _fixMarkup(text, allowMarkup) {
|
|||||||
return GLib.markup_escape_text(text, -1);
|
return GLib.markup_escape_text(text, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const URLHighlighter = new Lang.Class({
|
var URLHighlighter = new Lang.Class({
|
||||||
Name: 'URLHighlighter',
|
Name: 'URLHighlighter',
|
||||||
|
|
||||||
_init: function(text, lineWrap, allowMarkup) {
|
_init: function(text, lineWrap, allowMarkup) {
|
||||||
@@ -161,10 +161,15 @@ const URLHighlighter = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ScaleLayout = new Lang.Class({
|
var ScaleLayout = new Lang.Class({
|
||||||
Name: 'ScaleLayout',
|
Name: 'ScaleLayout',
|
||||||
Extends: Clutter.BinLayout,
|
Extends: Clutter.BinLayout,
|
||||||
|
|
||||||
|
_init: function(params) {
|
||||||
|
this._container = null;
|
||||||
|
this.parent(params);
|
||||||
|
},
|
||||||
|
|
||||||
_connectContainer: function(container) {
|
_connectContainer: function(container) {
|
||||||
if (this._container == container)
|
if (this._container == container)
|
||||||
return;
|
return;
|
||||||
@@ -203,7 +208,7 @@ const ScaleLayout = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const LabelExpanderLayout = new Lang.Class({
|
var LabelExpanderLayout = new Lang.Class({
|
||||||
Name: 'LabelExpanderLayout',
|
Name: 'LabelExpanderLayout',
|
||||||
Extends: Clutter.LayoutManager,
|
Extends: Clutter.LayoutManager,
|
||||||
Properties: { 'expansion': GObject.ParamSpec.double('expansion',
|
Properties: { 'expansion': GObject.ParamSpec.double('expansion',
|
||||||
@@ -293,12 +298,14 @@ const LabelExpanderLayout = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Message = new Lang.Class({
|
var Message = new Lang.Class({
|
||||||
Name: 'Message',
|
Name: 'Message',
|
||||||
|
|
||||||
_init: function(title, body) {
|
_init: function(title, body) {
|
||||||
this.expanded = false;
|
this.expanded = false;
|
||||||
|
|
||||||
|
this._useBodyMarkup = false;
|
||||||
|
|
||||||
this.actor = new St.Button({ style_class: 'message',
|
this.actor = new St.Button({ style_class: 'message',
|
||||||
accessible_role: Atk.Role.NOTIFICATION,
|
accessible_role: Atk.Role.NOTIFICATION,
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
@@ -517,7 +524,7 @@ const Message = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Message.prototype);
|
Signals.addSignalMethods(Message.prototype);
|
||||||
|
|
||||||
const MessageListSection = new Lang.Class({
|
var MessageListSection = new Lang.Class({
|
||||||
Name: 'MessageListSection',
|
Name: 'MessageListSection',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -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,14 +62,14 @@ 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,
|
||||||
CRITICAL: 3
|
CRITICAL: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
const FocusGrabber = new Lang.Class({
|
var FocusGrabber = new Lang.Class({
|
||||||
Name: 'FocusGrabber',
|
Name: 'FocusGrabber',
|
||||||
|
|
||||||
_init: function(actor) {
|
_init: function(actor) {
|
||||||
@@ -132,7 +132,7 @@ const FocusGrabber = new Lang.Class({
|
|||||||
// source, such as whether to play sound or honour the critical bit.
|
// source, such as whether to play sound or honour the critical bit.
|
||||||
//
|
//
|
||||||
// A notification without a policy object will inherit the default one.
|
// A notification without a policy object will inherit the default one.
|
||||||
const NotificationPolicy = new Lang.Class({
|
var NotificationPolicy = new Lang.Class({
|
||||||
Name: 'NotificationPolicy',
|
Name: 'NotificationPolicy',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
@@ -153,7 +153,7 @@ const NotificationPolicy = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(NotificationPolicy.prototype);
|
Signals.addSignalMethods(NotificationPolicy.prototype);
|
||||||
|
|
||||||
const NotificationGenericPolicy = new Lang.Class({
|
var NotificationGenericPolicy = new Lang.Class({
|
||||||
Name: 'NotificationGenericPolicy',
|
Name: 'NotificationGenericPolicy',
|
||||||
Extends: NotificationPolicy,
|
Extends: NotificationPolicy,
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ const NotificationGenericPolicy = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const NotificationApplicationPolicy = new Lang.Class({
|
var NotificationApplicationPolicy = new Lang.Class({
|
||||||
Name: 'NotificationApplicationPolicy',
|
Name: 'NotificationApplicationPolicy',
|
||||||
Extends: NotificationPolicy,
|
Extends: NotificationPolicy,
|
||||||
|
|
||||||
@@ -328,7 +328,7 @@ const NotificationApplicationPolicy = new Lang.Class({
|
|||||||
// If @params contains 'soundName' or 'soundFile', the corresponding
|
// If @params contains 'soundName' or 'soundFile', the corresponding
|
||||||
// event sound is played when the notification is shown (if the policy for
|
// event sound is played when the notification is shown (if the policy for
|
||||||
// @source allows playing sounds).
|
// @source allows playing sounds).
|
||||||
const Notification = new Lang.Class({
|
var Notification = new Lang.Class({
|
||||||
Name: 'Notification',
|
Name: 'Notification',
|
||||||
|
|
||||||
_init: function(source, title, banner, params) {
|
_init: function(source, title, banner, params) {
|
||||||
@@ -489,7 +489,7 @@ const Notification = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Notification.prototype);
|
Signals.addSignalMethods(Notification.prototype);
|
||||||
|
|
||||||
const NotificationBanner = new Lang.Class({
|
var NotificationBanner = new Lang.Class({
|
||||||
Name: 'NotificationBanner',
|
Name: 'NotificationBanner',
|
||||||
Extends: Calendar.NotificationMessage,
|
Extends: Calendar.NotificationMessage,
|
||||||
|
|
||||||
@@ -585,7 +585,7 @@ const NotificationBanner = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const SourceActor = new Lang.Class({
|
var SourceActor = new Lang.Class({
|
||||||
Name: 'SourceActor',
|
Name: 'SourceActor',
|
||||||
|
|
||||||
_init: function(source, size) {
|
_init: function(source, size) {
|
||||||
@@ -642,7 +642,7 @@ const SourceActor = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const SourceActorWithLabel = new Lang.Class({
|
var SourceActorWithLabel = new Lang.Class({
|
||||||
Name: 'SourceActorWithLabel',
|
Name: 'SourceActorWithLabel',
|
||||||
Extends: SourceActor,
|
Extends: SourceActor,
|
||||||
|
|
||||||
@@ -715,7 +715,7 @@ const SourceActorWithLabel = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Source = new Lang.Class({
|
var Source = new Lang.Class({
|
||||||
Name: 'MessageTraySource',
|
Name: 'MessageTraySource',
|
||||||
|
|
||||||
SOURCE_ICON_SIZE: 48,
|
SOURCE_ICON_SIZE: 48,
|
||||||
@@ -840,7 +840,7 @@ const Source = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(Source.prototype);
|
Signals.addSignalMethods(Source.prototype);
|
||||||
|
|
||||||
const MessageTray = new Lang.Class({
|
var MessageTray = new Lang.Class({
|
||||||
Name: 'MessageTray',
|
Name: 'MessageTray',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -1042,7 +1042,7 @@ const MessageTray = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getSources: function() {
|
getSources: function() {
|
||||||
return [k for (k of this._sources.keys())];
|
return [...this._sources.keys()];
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSourceEnableChanged: function(policy, source) {
|
_onSourceEnableChanged: function(policy, source) {
|
||||||
@@ -1485,7 +1485,7 @@ const MessageTray = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(MessageTray.prototype);
|
Signals.addSignalMethods(MessageTray.prototype);
|
||||||
|
|
||||||
const SystemNotificationSource = new Lang.Class({
|
var SystemNotificationSource = new Lang.Class({
|
||||||
Name: 'SystemNotificationSource',
|
Name: 'SystemNotificationSource',
|
||||||
Extends: Source,
|
Extends: Source,
|
||||||
|
|
||||||
|
@@ -14,15 +14,16 @@ const Atk = imports.gi.Atk;
|
|||||||
|
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
const Layout = imports.ui.layout;
|
const Layout = imports.ui.layout;
|
||||||
const Lightbox = imports.ui.lightbox;
|
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,
|
||||||
@@ -30,7 +31,7 @@ const State = {
|
|||||||
FADED_OUT: 4
|
FADED_OUT: 4
|
||||||
};
|
};
|
||||||
|
|
||||||
const ModalDialog = new Lang.Class({
|
var ModalDialog = new Lang.Class({
|
||||||
Name: 'ModalDialog',
|
Name: 'ModalDialog',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
@@ -61,11 +62,6 @@ const ModalDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._group.connect('destroy', Lang.bind(this, this._onGroupDestroy));
|
this._group.connect('destroy', Lang.bind(this, this._onGroupDestroy));
|
||||||
|
|
||||||
this._pressedKey = null;
|
|
||||||
this._buttonKeys = {};
|
|
||||||
this._group.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
|
||||||
this._group.connect('key-release-event', Lang.bind(this, this._onKeyReleaseEvent));
|
|
||||||
|
|
||||||
this.backgroundStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this.backgroundStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
this._backgroundBin = new St.Bin({ child: this.backgroundStack,
|
this._backgroundBin = new St.Bin({ child: this.backgroundStack,
|
||||||
x_fill: true, y_fill: true });
|
x_fill: true, y_fill: true });
|
||||||
@@ -73,17 +69,9 @@ const ModalDialog = new Lang.Class({
|
|||||||
this._backgroundBin.add_constraint(this._monitorConstraint);
|
this._backgroundBin.add_constraint(this._monitorConstraint);
|
||||||
this._group.add_actor(this._backgroundBin);
|
this._group.add_actor(this._backgroundBin);
|
||||||
|
|
||||||
this.dialogLayout = new St.BoxLayout({ style_class: 'modal-dialog',
|
this.dialogLayout = new Dialog.Dialog(this.backgroundStack, params.styleClass);
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
this.contentLayout = this.dialogLayout.contentLayout;
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
this.buttonLayout = this.dialogLayout.buttonLayout;
|
||||||
vertical: true });
|
|
||||||
// modal dialogs are fixed width and grow vertically; set the request
|
|
||||||
// mode accordingly so wrapped labels are handled correctly during
|
|
||||||
// size requests.
|
|
||||||
this.dialogLayout.request_mode = Clutter.RequestMode.HEIGHT_FOR_WIDTH;
|
|
||||||
|
|
||||||
if (params.styleClass != null)
|
|
||||||
this.dialogLayout.add_style_class_name(params.styleClass);
|
|
||||||
|
|
||||||
if (!this._shellReactive) {
|
if (!this._shellReactive) {
|
||||||
this._lightbox = new Lightbox.Lightbox(this._group,
|
this._lightbox = new Lightbox.Lightbox(this._group,
|
||||||
@@ -94,22 +82,6 @@ const ModalDialog = new Lang.Class({
|
|||||||
this._eventBlocker = new Clutter.Actor({ reactive: true });
|
this._eventBlocker = new Clutter.Actor({ reactive: true });
|
||||||
this.backgroundStack.add_actor(this._eventBlocker);
|
this.backgroundStack.add_actor(this._eventBlocker);
|
||||||
}
|
}
|
||||||
this.backgroundStack.add_actor(this.dialogLayout);
|
|
||||||
|
|
||||||
|
|
||||||
this.contentLayout = new St.BoxLayout({ vertical: true,
|
|
||||||
style_class: "modal-dialog-content-box" });
|
|
||||||
this.dialogLayout.add(this.contentLayout,
|
|
||||||
{ expand: true,
|
|
||||||
x_fill: true,
|
|
||||||
y_fill: true,
|
|
||||||
x_align: St.Align.MIDDLE,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
|
|
||||||
this.buttonLayout = new St.Widget ({ layout_manager: new Clutter.BoxLayout ({ homogeneous:true }) });
|
|
||||||
this.dialogLayout.add(this.buttonLayout,
|
|
||||||
{ x_align: St.Align.MIDDLE,
|
|
||||||
y_align: St.Align.END });
|
|
||||||
|
|
||||||
global.focus_manager.add_group(this.dialogLayout);
|
global.focus_manager.add_group(this.dialogLayout);
|
||||||
this._initialKeyFocus = this.dialogLayout;
|
this._initialKeyFocus = this.dialogLayout;
|
||||||
@@ -122,8 +94,7 @@ const ModalDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
clearButtons: function() {
|
clearButtons: function() {
|
||||||
this.buttonLayout.destroy_all_children();
|
this.dialogLayout.clearButtons();
|
||||||
this._buttonKeys = {};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setButtons: function(buttons) {
|
setButtons: function(buttons) {
|
||||||
@@ -146,72 +117,8 @@ const ModalDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addButton: function(buttonInfo) {
|
addButton: function (buttonInfo) {
|
||||||
let label = buttonInfo['label']
|
return this.dialogLayout.addButton(buttonInfo);
|
||||||
let action = buttonInfo['action'];
|
|
||||||
let key = buttonInfo['key'];
|
|
||||||
let isDefault = buttonInfo['default'];
|
|
||||||
|
|
||||||
let keys;
|
|
||||||
|
|
||||||
if (key)
|
|
||||||
keys = [key];
|
|
||||||
else if (isDefault)
|
|
||||||
keys = [Clutter.KEY_Return, Clutter.KEY_KP_Enter, Clutter.KEY_ISO_Enter];
|
|
||||||
else
|
|
||||||
keys = [];
|
|
||||||
|
|
||||||
let button = new St.Button({ style_class: 'modal-dialog-linked-button',
|
|
||||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
|
||||||
reactive: true,
|
|
||||||
can_focus: true,
|
|
||||||
x_expand: true,
|
|
||||||
y_expand: true,
|
|
||||||
label: label });
|
|
||||||
button.connect('clicked', action);
|
|
||||||
|
|
||||||
buttonInfo['button'] = button;
|
|
||||||
|
|
||||||
if (isDefault)
|
|
||||||
button.add_style_pseudo_class('default');
|
|
||||||
|
|
||||||
if (!this._initialKeyFocusDestroyId)
|
|
||||||
this._initialKeyFocus = button;
|
|
||||||
|
|
||||||
for (let i in keys)
|
|
||||||
this._buttonKeys[keys[i]] = buttonInfo;
|
|
||||||
|
|
||||||
this.buttonLayout.add_actor(button);
|
|
||||||
|
|
||||||
return button;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onKeyPressEvent: function(object, event) {
|
|
||||||
this._pressedKey = event.get_key_symbol();
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onKeyReleaseEvent: function(object, event) {
|
|
||||||
let pressedKey = this._pressedKey;
|
|
||||||
this._pressedKey = null;
|
|
||||||
|
|
||||||
let symbol = event.get_key_symbol();
|
|
||||||
if (symbol != pressedKey)
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
|
|
||||||
let buttonInfo = this._buttonKeys[symbol];
|
|
||||||
if (!buttonInfo)
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
|
|
||||||
let button = buttonInfo['button'];
|
|
||||||
let action = buttonInfo['action'];
|
|
||||||
|
|
||||||
if (action && button.reactive) {
|
|
||||||
action();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onGroupDestroy: function() {
|
_onGroupDestroy: function() {
|
||||||
|
@@ -47,7 +47,7 @@ const MprisPlayerProxy = Gio.DBusProxy.makeProxyWrapper(MprisPlayerIface);
|
|||||||
|
|
||||||
const MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.';
|
const MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.';
|
||||||
|
|
||||||
const MediaMessage = new Lang.Class({
|
var MediaMessage = new Lang.Class({
|
||||||
Name: 'MediaMessage',
|
Name: 'MediaMessage',
|
||||||
Extends: MessageList.Message,
|
Extends: MessageList.Message,
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ const MediaMessage = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const MprisPlayer = new Lang.Class({
|
var MprisPlayer = new Lang.Class({
|
||||||
Name: 'MprisPlayer',
|
Name: 'MprisPlayer',
|
||||||
|
|
||||||
_init: function(busName) {
|
_init: function(busName) {
|
||||||
@@ -226,7 +226,7 @@ const MprisPlayer = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(MprisPlayer.prototype);
|
Signals.addSignalMethods(MprisPlayer.prototype);
|
||||||
|
|
||||||
const MediaSection = new Lang.Class({
|
var MediaSection = new Lang.Class({
|
||||||
Name: 'MediaSection',
|
Name: 'MediaSection',
|
||||||
Extends: MessageList.MessageListSection,
|
Extends: MessageList.MessageListSection,
|
||||||
|
|
||||||
|
@@ -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
|
||||||
@@ -91,7 +91,7 @@ const rewriteRules = {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
const FdoNotificationDaemon = new Lang.Class({
|
var FdoNotificationDaemon = new Lang.Class({
|
||||||
Name: 'FdoNotificationDaemon',
|
Name: 'FdoNotificationDaemon',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -128,10 +128,10 @@ const FdoNotificationDaemon = new Lang.Class({
|
|||||||
switch (hints.urgency) {
|
switch (hints.urgency) {
|
||||||
case Urgency.LOW:
|
case Urgency.LOW:
|
||||||
case Urgency.NORMAL:
|
case Urgency.NORMAL:
|
||||||
stockIcon = 'gtk-dialog-info';
|
stockIcon = 'dialog-information';
|
||||||
break;
|
break;
|
||||||
case Urgency.CRITICAL:
|
case Urgency.CRITICAL:
|
||||||
stockIcon = 'gtk-dialog-error';
|
stockIcon = 'dialog-error';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return new Gio.ThemedIcon({ name: stockIcon });
|
return new Gio.ThemedIcon({ name: stockIcon });
|
||||||
@@ -186,7 +186,8 @@ const FdoNotificationDaemon = new Lang.Class({
|
|||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
source = new FdoNotificationDaemonSource(title, pid, sender, ndata ? ndata.hints['desktop-entry'] : null);
|
let appId = ndata ? ndata.hints['desktop-entry'] || null : null;
|
||||||
|
source = new FdoNotificationDaemonSource(title, pid, sender, appId);
|
||||||
|
|
||||||
this._sources.push(source);
|
this._sources.push(source);
|
||||||
source.connect('destroy', Lang.bind(this, function() {
|
source.connect('destroy', Lang.bind(this, function() {
|
||||||
@@ -391,10 +392,10 @@ const FdoNotificationDaemon = new Lang.Class({
|
|||||||
notification.setUrgency(MessageTray.Urgency.CRITICAL);
|
notification.setUrgency(MessageTray.Urgency.CRITICAL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
notification.setResident(hints.resident == true);
|
notification.setResident(!!hints.resident);
|
||||||
// 'transient' is a reserved keyword in JS, so we have to retrieve the value
|
// 'transient' is a reserved keyword in JS, so we have to retrieve the value
|
||||||
// of the 'transient' hint with hints['transient'] rather than hints.transient
|
// of the 'transient' hint with hints['transient'] rather than hints.transient
|
||||||
notification.setTransient(hints['transient'] == true);
|
notification.setTransient(!!hints['transient']);
|
||||||
|
|
||||||
let sourceGIcon = source.useNotificationIcon ? gicon : null;
|
let sourceGIcon = source.useNotificationIcon ? gicon : null;
|
||||||
source.processNotification(notification, sourceGIcon);
|
source.processNotification(notification, sourceGIcon);
|
||||||
@@ -458,7 +459,7 @@ const FdoNotificationDaemon = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const FdoNotificationDaemonSource = new Lang.Class({
|
var FdoNotificationDaemonSource = new Lang.Class({
|
||||||
Name: 'FdoNotificationDaemonSource',
|
Name: 'FdoNotificationDaemonSource',
|
||||||
Extends: MessageTray.Source,
|
Extends: MessageTray.Source,
|
||||||
|
|
||||||
@@ -585,7 +586,7 @@ const PRIORITY_URGENCY_MAP = {
|
|||||||
urgent: MessageTray.Urgency.CRITICAL
|
urgent: MessageTray.Urgency.CRITICAL
|
||||||
};
|
};
|
||||||
|
|
||||||
const GtkNotificationDaemonNotification = new Lang.Class({
|
var GtkNotificationDaemonNotification = new Lang.Class({
|
||||||
Name: 'GtkNotificationDaemonNotification',
|
Name: 'GtkNotificationDaemonNotification',
|
||||||
Extends: MessageTray.Notification,
|
Extends: MessageTray.Notification,
|
||||||
|
|
||||||
@@ -679,7 +680,7 @@ function getPlatformData() {
|
|||||||
|
|
||||||
function InvalidAppError() {}
|
function InvalidAppError() {}
|
||||||
|
|
||||||
const GtkNotificationDaemonAppSource = new Lang.Class({
|
var GtkNotificationDaemonAppSource = new Lang.Class({
|
||||||
Name: 'GtkNotificationDaemonAppSource',
|
Name: 'GtkNotificationDaemonAppSource',
|
||||||
Extends: MessageTray.Source,
|
Extends: MessageTray.Source,
|
||||||
|
|
||||||
@@ -786,7 +787,7 @@ const GtkNotificationsIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const GtkNotificationDaemon = new Lang.Class({
|
var GtkNotificationDaemon = new Lang.Class({
|
||||||
Name: 'GtkNotificationDaemon',
|
Name: 'GtkNotificationDaemon',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -884,7 +885,7 @@ const GtkNotificationDaemon = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const NotificationDaemon = new Lang.Class({
|
var NotificationDaemon = new Lang.Class({
|
||||||
Name: 'NotificationDaemon',
|
Name: 'NotificationDaemon',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -9,9 +9,9 @@ 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;
|
||||||
|
|
||||||
const OsdMonitorLabel = new Lang.Class({
|
var OsdMonitorLabel = new Lang.Class({
|
||||||
Name: 'OsdMonitorLabel',
|
Name: 'OsdMonitorLabel',
|
||||||
|
|
||||||
_init: function(monitor, label) {
|
_init: function(monitor, label) {
|
||||||
@@ -52,7 +52,7 @@ const OsdMonitorLabel = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const OsdMonitorLabeler = new Lang.Class({
|
var OsdMonitorLabeler = new Lang.Class({
|
||||||
Name: 'OsdMonitorLabeler',
|
Name: 'OsdMonitorLabeler',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -11,11 +11,11 @@ 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;
|
||||||
|
|
||||||
const LevelBar = new Lang.Class({
|
var LevelBar = new Lang.Class({
|
||||||
Name: 'LevelBar',
|
Name: 'LevelBar',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -45,7 +45,7 @@ const LevelBar = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const OsdWindowConstraint = new Lang.Class({
|
var OsdWindowConstraint = new Lang.Class({
|
||||||
Name: 'OsdWindowConstraint',
|
Name: 'OsdWindowConstraint',
|
||||||
Extends: Clutter.Constraint,
|
Extends: Clutter.Constraint,
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ const OsdWindowConstraint = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const OsdWindow = new Lang.Class({
|
var OsdWindow = new Lang.Class({
|
||||||
Name: 'OsdWindow',
|
Name: 'OsdWindow',
|
||||||
|
|
||||||
_init: function(monitorIndex) {
|
_init: function(monitorIndex) {
|
||||||
@@ -209,7 +209,7 @@ const OsdWindow = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const OsdWindowManager = new Lang.Class({
|
var OsdWindowManager = new Lang.Class({
|
||||||
Name: 'OsdWindowManager',
|
Name: 'OsdWindowManager',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -24,18 +24,18 @@ 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;
|
||||||
|
|
||||||
const ShellInfo = new Lang.Class({
|
var ShellInfo = new Lang.Class({
|
||||||
Name: 'ShellInfo',
|
Name: 'ShellInfo',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
@@ -87,7 +87,7 @@ const ShellInfo = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const Overview = new Lang.Class({
|
var Overview = new Lang.Class({
|
||||||
Name: 'Overview',
|
Name: 'Overview',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -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,12 +25,12 @@ function getRtlSlideDirection(direction, actor) {
|
|||||||
return direction;
|
return direction;
|
||||||
};
|
};
|
||||||
|
|
||||||
const SlideDirection = {
|
var SlideDirection = {
|
||||||
LEFT: 0,
|
LEFT: 0,
|
||||||
RIGHT: 1
|
RIGHT: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
const SlideLayout = new Lang.Class({
|
var SlideLayout = new Lang.Class({
|
||||||
Name: 'SlideLayout',
|
Name: 'SlideLayout',
|
||||||
Extends: Clutter.FixedLayout,
|
Extends: Clutter.FixedLayout,
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ const SlideLayout = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const SlidingControl = new Lang.Class({
|
var SlidingControl = new Lang.Class({
|
||||||
Name: 'SlidingControl',
|
Name: 'SlidingControl',
|
||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
@@ -238,7 +238,7 @@ const SlidingControl = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ThumbnailsSlider = new Lang.Class({
|
var ThumbnailsSlider = new Lang.Class({
|
||||||
Name: 'ThumbnailsSlider',
|
Name: 'ThumbnailsSlider',
|
||||||
Extends: SlidingControl,
|
Extends: SlidingControl,
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const DashSlider = new Lang.Class({
|
var DashSlider = new Lang.Class({
|
||||||
Name: 'DashSlider',
|
Name: 'DashSlider',
|
||||||
Extends: SlidingControl,
|
Extends: SlidingControl,
|
||||||
|
|
||||||
@@ -353,7 +353,7 @@ const DashSlider = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const DashSpacer = new Lang.Class({
|
var DashSpacer = new Lang.Class({
|
||||||
Name: 'DashSpacer',
|
Name: 'DashSpacer',
|
||||||
Extends: St.Widget,
|
Extends: St.Widget,
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ const DashSpacer = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ControlsLayout = new Lang.Class({
|
var ControlsLayout = new Lang.Class({
|
||||||
Name: 'ControlsLayout',
|
Name: 'ControlsLayout',
|
||||||
Extends: Clutter.BinLayout,
|
Extends: Clutter.BinLayout,
|
||||||
Signals: { 'allocation-changed': { flags: GObject.SignalFlags.RUN_LAST } },
|
Signals: { 'allocation-changed': { flags: GObject.SignalFlags.RUN_LAST } },
|
||||||
@@ -402,7 +402,7 @@ const ControlsLayout = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const ControlsManager = new Lang.Class({
|
var ControlsManager = new Lang.Class({
|
||||||
Name: 'ControlsManager',
|
Name: 'ControlsManager',
|
||||||
|
|
||||||
_init: function(searchEntry) {
|
_init: function(searchEntry) {
|
||||||
|
176
js/ui/padOsd.js
176
js/ui/padOsd.js
@@ -30,7 +30,7 @@ const CCW = 1;
|
|||||||
const UP = 0;
|
const UP = 0;
|
||||||
const DOWN = 1;
|
const DOWN = 1;
|
||||||
|
|
||||||
const PadChooser = new Lang.Class({
|
var PadChooser = new Lang.Class({
|
||||||
Name: 'PadChooser',
|
Name: 'PadChooser',
|
||||||
|
|
||||||
_init: function (device, groupDevices) {
|
_init: function (device, groupDevices) {
|
||||||
@@ -96,7 +96,7 @@ const PadChooser = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(PadChooser.prototype);
|
Signals.addSignalMethods(PadChooser.prototype);
|
||||||
|
|
||||||
const KeybindingEntry = new Lang.Class({
|
var KeybindingEntry = new Lang.Class({
|
||||||
Name: 'KeybindingEntry',
|
Name: 'KeybindingEntry',
|
||||||
|
|
||||||
_init: function () {
|
_init: function () {
|
||||||
@@ -120,7 +120,7 @@ const KeybindingEntry = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(KeybindingEntry.prototype);
|
Signals.addSignalMethods(KeybindingEntry.prototype);
|
||||||
|
|
||||||
const ActionComboBox = new Lang.Class({
|
var ActionComboBox = new Lang.Class({
|
||||||
Name: 'ActionComboBox',
|
Name: 'ActionComboBox',
|
||||||
|
|
||||||
_init: function () {
|
_init: function () {
|
||||||
@@ -154,9 +154,16 @@ const ActionComboBox = new Lang.Class({
|
|||||||
this._actionLabels.set(GDesktopEnums.PadButtonAction.SWITCH_MONITOR, _("Switch monitor"));
|
this._actionLabels.set(GDesktopEnums.PadButtonAction.SWITCH_MONITOR, _("Switch monitor"));
|
||||||
this._actionLabels.set(GDesktopEnums.PadButtonAction.KEYBINDING, _("Assign keystroke"));
|
this._actionLabels.set(GDesktopEnums.PadButtonAction.KEYBINDING, _("Assign keystroke"));
|
||||||
|
|
||||||
|
this._buttonItems = [];
|
||||||
|
|
||||||
for (let [action, label] of this._actionLabels.entries()) {
|
for (let [action, label] of this._actionLabels.entries()) {
|
||||||
let selectedAction = action;
|
let selectedAction = action;
|
||||||
this._editMenu.addAction(label, Lang.bind(this, function() { this._onActionSelected(selectedAction) }));
|
let item = this._editMenu.addAction(label, Lang.bind(this, function() { this._onActionSelected(selectedAction) }));
|
||||||
|
|
||||||
|
/* These actions only apply to pad buttons */
|
||||||
|
if (selectedAction == GDesktopEnums.PadButtonAction.HELP ||
|
||||||
|
selectedAction == GDesktopEnums.PadButtonAction.SWITCH_MONITOR)
|
||||||
|
this._buttonItems.push(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setAction(GDesktopEnums.PadButtonAction.NONE);
|
this.setAction(GDesktopEnums.PadButtonAction.NONE);
|
||||||
@@ -185,11 +192,15 @@ const ActionComboBox = new Lang.Class({
|
|||||||
this.popup();
|
this.popup();
|
||||||
else
|
else
|
||||||
this.popdown();
|
this.popdown();
|
||||||
|
},
|
||||||
|
|
||||||
|
setButtonActionsActive: function (active) {
|
||||||
|
this._buttonItems.forEach(item => { item.setSensitive(active); });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ActionComboBox.prototype);
|
Signals.addSignalMethods(ActionComboBox.prototype);
|
||||||
|
|
||||||
const ActionEditor = new Lang.Class({
|
var ActionEditor = new Lang.Class({
|
||||||
Name: 'ActionEditor',
|
Name: 'ActionEditor',
|
||||||
|
|
||||||
_init: function () {
|
_init: function () {
|
||||||
@@ -223,13 +234,16 @@ const ActionEditor = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setSettings: function (settings) {
|
setSettings: function (settings, action) {
|
||||||
this._buttonSettings = settings;
|
this._buttonSettings = settings;
|
||||||
|
|
||||||
this._currentAction = this._buttonSettings.get_enum('action');
|
this._currentAction = this._buttonSettings.get_enum('action');
|
||||||
this._currentKeybinding = this._buttonSettings.get_string('keybinding');
|
this._currentKeybinding = this._buttonSettings.get_string('keybinding');
|
||||||
this._actionComboBox.setAction(this._currentAction);
|
this._actionComboBox.setAction(this._currentAction);
|
||||||
this._updateKeybindingEntryState();
|
this._updateKeybindingEntryState();
|
||||||
|
|
||||||
|
let isButton = (action == Meta.PadActionType.BUTTON);
|
||||||
|
this._actionComboBox.setButtonActionsActive(isButton);
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function() {
|
close: function() {
|
||||||
@@ -271,7 +285,7 @@ const ActionEditor = new Lang.Class({
|
|||||||
});
|
});
|
||||||
Signals.addSignalMethods(ActionEditor.prototype);
|
Signals.addSignalMethods(ActionEditor.prototype);
|
||||||
|
|
||||||
const PadDiagram = new Lang.Class({
|
var PadDiagram = new Lang.Class({
|
||||||
Name: 'PadDiagram',
|
Name: 'PadDiagram',
|
||||||
Extends: St.DrawingArea,
|
Extends: St.DrawingArea,
|
||||||
Properties: { 'left-handed': GObject.ParamSpec.boolean('left-handed',
|
Properties: { 'left-handed': GObject.ParamSpec.boolean('left-handed',
|
||||||
@@ -293,6 +307,8 @@ const PadDiagram = new Lang.Class({
|
|||||||
_init: function (params) {
|
_init: function (params) {
|
||||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
|
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
|
||||||
let [success, css, etag] = file.load_contents(null);
|
let [success, css, etag] = file.load_contents(null);
|
||||||
|
this._curEdited = null;
|
||||||
|
this._prevEdited = null;
|
||||||
this._css = css;
|
this._css = css;
|
||||||
this._labels = [];
|
this._labels = [];
|
||||||
this._activeButtons = [];
|
this._activeButtons = [];
|
||||||
@@ -550,25 +566,39 @@ const PadDiagram = new Lang.Class({
|
|||||||
this.add_actor(label);
|
this.add_actor(label);
|
||||||
},
|
},
|
||||||
|
|
||||||
stopEdition: function (str) {
|
_applyLabel: function(label, action, idx, dir, str) {
|
||||||
|
if (str != null) {
|
||||||
|
label.set_text(str);
|
||||||
|
|
||||||
|
let [found, x, y, arrangement] = this.getLabelCoords(action, idx, dir);
|
||||||
|
this._allocateChild(label, x, y, arrangement);
|
||||||
|
}
|
||||||
|
label.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
stopEdition: function (continues, str) {
|
||||||
this._editorActor.hide();
|
this._editorActor.hide();
|
||||||
|
|
||||||
|
if (this._prevEdited) {
|
||||||
|
let [label, action, idx, dir] = this._prevEdited;
|
||||||
|
this._applyLabel(label, action, idx, dir, str);
|
||||||
|
this._prevEdited = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._curEdited) {
|
if (this._curEdited) {
|
||||||
let [label, action, idx, dir] = this._curEdited;
|
let [label, action, idx, dir] = this._curEdited;
|
||||||
if (str != null) {
|
this._applyLabel(label, action, idx, dir, str);
|
||||||
label.set_text(str);
|
if (continues)
|
||||||
|
this._prevEdited = this._curEdited;
|
||||||
let [found, x, y, arrangement] = this.getLabelCoords(action, idx, dir);
|
|
||||||
this._allocateChild(label, x, y, arrangement);
|
|
||||||
}
|
|
||||||
label.show();
|
|
||||||
this._curEdited = null;
|
this._curEdited = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
startEdition: function(action, idx, dir) {
|
startEdition: function(action, idx, dir) {
|
||||||
let editedLabel;
|
let editedLabel;
|
||||||
this.stopEdition();
|
|
||||||
|
if (this._curEdited)
|
||||||
|
return;
|
||||||
|
|
||||||
for (let i = 0; i < this._labels.length; i++) {
|
for (let i = 0; i < this._labels.length; i++) {
|
||||||
let [label, itemAction, itemIdx, itemDir] = this._labels[i];
|
let [label, itemAction, itemIdx, itemDir] = this._labels[i];
|
||||||
@@ -589,7 +619,7 @@ const PadDiagram = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const PadOsd = new Lang.Class({
|
var PadOsd = new Lang.Class({
|
||||||
Name: 'PadOsd',
|
Name: 'PadOsd',
|
||||||
|
|
||||||
_init: function (padDevice, settings, imagePath, editionMode, monitorIndex) {
|
_init: function (padDevice, settings, imagePath, editionMode, monitorIndex) {
|
||||||
@@ -662,7 +692,7 @@ const PadOsd = new Lang.Class({
|
|||||||
this._updatePadChooser();
|
this._updatePadChooser();
|
||||||
|
|
||||||
this._actionEditor = new ActionEditor();
|
this._actionEditor = new ActionEditor();
|
||||||
this._actionEditor.connect('done', Lang.bind(this, this._endButtonActionEdition));
|
this._actionEditor.connect('done', Lang.bind(this, this._endActionEdition));
|
||||||
|
|
||||||
this._padDiagram = new PadDiagram({ image: this._imagePath,
|
this._padDiagram = new PadDiagram({ image: this._imagePath,
|
||||||
left_handed: settings.get_boolean('left-handed'),
|
left_handed: settings.get_boolean('left-handed'),
|
||||||
@@ -681,11 +711,17 @@ const PadOsd = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < padDevice.get_n_rings(); i++) {
|
for (i = 0; i < padDevice.get_n_rings(); i++) {
|
||||||
|
let [found] = this._padDiagram.getRingLabelCoords(i, CW);
|
||||||
|
if (!found)
|
||||||
|
break;
|
||||||
this._createLabel(Meta.PadActionType.RING, i, CW);
|
this._createLabel(Meta.PadActionType.RING, i, CW);
|
||||||
this._createLabel(Meta.PadActionType.RING, i, CCW);
|
this._createLabel(Meta.PadActionType.RING, i, CCW);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < padDevice.get_n_strips(); i++) {
|
for (i = 0; i < padDevice.get_n_strips(); i++) {
|
||||||
|
let [found] = this._padDiagram.getStripLabelCoords(i, UP);
|
||||||
|
if (!found)
|
||||||
|
break;
|
||||||
this._createLabel(Meta.PadActionType.STRIP, i, UP);
|
this._createLabel(Meta.PadActionType.STRIP, i, UP);
|
||||||
this._createLabel(Meta.PadActionType.STRIP, i, DOWN);
|
this._createLabel(Meta.PadActionType.STRIP, i, DOWN);
|
||||||
}
|
}
|
||||||
@@ -743,8 +779,10 @@ const PadOsd = new Lang.Class({
|
|||||||
if (event.type() == Clutter.EventType.PAD_BUTTON_PRESS &&
|
if (event.type() == Clutter.EventType.PAD_BUTTON_PRESS &&
|
||||||
event.get_source_device() == this.padDevice) {
|
event.get_source_device() == this.padDevice) {
|
||||||
this._padDiagram.activateButton(event.get_button());
|
this._padDiagram.activateButton(event.get_button());
|
||||||
|
let isModeSwitch = this.padDevice.get_mode_switch_button_group(event.get_button()) >= 0;
|
||||||
|
|
||||||
if (this._editionMode)
|
/* Buttons that switch between modes cannot be edited */
|
||||||
|
if (this._editionMode && !isModeSwitch)
|
||||||
this._startButtonActionEdition(event.get_button());
|
this._startButtonActionEdition(event.get_button());
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
} else if (event.type() == Clutter.EventType.PAD_BUTTON_RELEASE &&
|
} else if (event.type() == Clutter.EventType.PAD_BUTTON_RELEASE &&
|
||||||
@@ -753,11 +791,23 @@ const PadOsd = new Lang.Class({
|
|||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
} else if (event.type() == Clutter.EventType.KEY_PRESS &&
|
} else if (event.type() == Clutter.EventType.KEY_PRESS &&
|
||||||
(!this._editionMode || event.get_key_symbol() == Clutter.Escape)) {
|
(!this._editionMode || event.get_key_symbol() == Clutter.Escape)) {
|
||||||
if (this._editingButtonAction != null)
|
if (this._editedAction != null)
|
||||||
this._endButtonActionEdition();
|
this._endActionEdition();
|
||||||
else
|
else
|
||||||
this.destroy();
|
this.destroy();
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
|
} else if (event.get_source_device() == this.padDevice &&
|
||||||
|
event.type() == Clutter.EventType.PAD_STRIP) {
|
||||||
|
if (this._editionMode) {
|
||||||
|
let [retval, number, mode] = event.get_pad_event_details();
|
||||||
|
this._startStripActionEdition(number, UP, mode);
|
||||||
|
}
|
||||||
|
} else if (event.get_source_device() == this.padDevice &&
|
||||||
|
event.type() == Clutter.EventType.PAD_RING) {
|
||||||
|
if (this._editionMode) {
|
||||||
|
let [retval, number, mode] = event.get_pad_event_details();
|
||||||
|
this._startRingActionEdition(number, CCW, mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the event comes from another pad in the same group,
|
// If the event comes from another pad in the same group,
|
||||||
@@ -790,33 +840,79 @@ const PadOsd = new Lang.Class({
|
|||||||
this._titleLabel.clutter_text.set_markup('<span size="larger"><b>' + title + '</b></span>');
|
this._titleLabel.clutter_text.set_markup('<span size="larger"><b>' + title + '</b></span>');
|
||||||
},
|
},
|
||||||
|
|
||||||
_endButtonActionEdition: function () {
|
_isEditedAction: function (type, number, dir) {
|
||||||
|
if (!this._editedAction)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return (this._editedAction.type == type &&
|
||||||
|
this._editedAction.number == number &&
|
||||||
|
this._editedAction.dir == dir);
|
||||||
|
},
|
||||||
|
|
||||||
|
_followUpActionEdition: function (str) {
|
||||||
|
let { type, dir, number, mode } = this._editedAction;
|
||||||
|
let hasNextAction = (type == Meta.PadActionType.RING && dir == CCW ||
|
||||||
|
type == Meta.PadActionType.STRIP && dir == UP);
|
||||||
|
if (!hasNextAction)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
this._padDiagram.stopEdition(true, str);
|
||||||
|
this._editedAction = null;
|
||||||
|
if (type == Meta.PadActionType.RING)
|
||||||
|
this._startRingActionEdition(number, CW, mode);
|
||||||
|
else
|
||||||
|
this._startStripActionEdition(number, DOWN, mode);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_endActionEdition: function () {
|
||||||
this._actionEditor.close();
|
this._actionEditor.close();
|
||||||
|
|
||||||
if (this._editingButtonAction != null) {
|
if (this._editedAction != null) {
|
||||||
let str = global.display.get_pad_action_label(this.padDevice,
|
let str = global.display.get_pad_action_label(this.padDevice,
|
||||||
Meta.PadActionType.BUTTON,
|
this._editedAction.type,
|
||||||
this._editingButtonAction);
|
this._editedAction.number);
|
||||||
this._padDiagram.stopEdition(str ? str : _("None"))
|
if (this._followUpActionEdition(str))
|
||||||
this._editingButtonAction = null;
|
return;
|
||||||
|
|
||||||
|
this._padDiagram.stopEdition(false, str ? str : _("None"))
|
||||||
|
this._editedAction = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._editedButtonSettings = null;
|
this._editedActionSettings = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
_startActionEdition: function (key, type, number, dir, mode) {
|
||||||
|
if (this._isEditedAction(type, number, dir))
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._endActionEdition();
|
||||||
|
this._editedAction = { type, number, dir, mode };
|
||||||
|
|
||||||
|
let settingsPath = this._settings.path + key + '/';
|
||||||
|
this._editedActionSettings = Gio.Settings.new_with_path('org.gnome.desktop.peripherals.tablet.pad-button',
|
||||||
|
settingsPath);
|
||||||
|
this._actionEditor.setSettings(this._editedActionSettings, type);
|
||||||
|
this._padDiagram.startEdition(type, number, dir);
|
||||||
},
|
},
|
||||||
|
|
||||||
_startButtonActionEdition: function (button) {
|
_startButtonActionEdition: function (button) {
|
||||||
if (this._editingButtonAction == button)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._endButtonActionEdition();
|
|
||||||
this._editingButtonAction = button;
|
|
||||||
|
|
||||||
let ch = String.fromCharCode('A'.charCodeAt() + button);
|
let ch = String.fromCharCode('A'.charCodeAt() + button);
|
||||||
let settingsPath = this._settings.path + "button" + ch + '/';
|
let key = 'button' + ch;
|
||||||
this._editedButtonSettings = Gio.Settings.new_with_path('org.gnome.desktop.peripherals.tablet.pad-button',
|
this._startActionEdition(key, Meta.PadActionType.BUTTON, button);
|
||||||
settingsPath);
|
},
|
||||||
this._actionEditor.setSettings(this._editedButtonSettings);
|
|
||||||
this._padDiagram.startEdition(Meta.PadActionType.BUTTON, button);
|
_startRingActionEdition: function (ring, dir, mode) {
|
||||||
|
let ch = String.fromCharCode('A'.charCodeAt() + ring);
|
||||||
|
let key = 'ring%s-%s-mode-%d'.format(ch, dir == CCW ? 'ccw' : 'cw', mode);
|
||||||
|
this._startActionEdition(key, Meta.PadActionType.RING, ring, dir, mode);
|
||||||
|
},
|
||||||
|
|
||||||
|
_startStripActionEdition: function (strip, dir, mode) {
|
||||||
|
let ch = String.fromCharCode('A'.charCodeAt() + strip);
|
||||||
|
let key = 'strip%s-%s-mode-%d'.format(ch, dir == UP ? 'up' : 'down', mode);
|
||||||
|
this._startActionEdition(key, Meta.PadActionType.STRIP, strip, dir, mode);
|
||||||
},
|
},
|
||||||
|
|
||||||
setEditionMode: function (editionMode) {
|
setEditionMode: function (editionMode) {
|
||||||
@@ -865,7 +961,7 @@ const PadOsdIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
const PadOsdService = new Lang.Class({
|
var PadOsdService = new Lang.Class({
|
||||||
Name: 'PadOsdService',
|
Name: 'PadOsdService',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
@@ -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
|
||||||
@@ -83,7 +83,7 @@ function _unpremultiply(color) {
|
|||||||
* this menu also handles startup notification for it. So when we
|
* this menu also handles startup notification for it. So when we
|
||||||
* have an active startup notification, we switch modes to display that.
|
* have an active startup notification, we switch modes to display that.
|
||||||
*/
|
*/
|
||||||
const AppMenuButton = new Lang.Class({
|
var AppMenuButton = new Lang.Class({
|
||||||
Name: 'AppMenuButton',
|
Name: 'AppMenuButton',
|
||||||
Extends: PanelMenu.Button,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ const AppMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
Signals.addSignalMethods(AppMenuButton.prototype);
|
Signals.addSignalMethods(AppMenuButton.prototype);
|
||||||
|
|
||||||
const ActivitiesButton = new Lang.Class({
|
var ActivitiesButton = new Lang.Class({
|
||||||
Name: 'ActivitiesButton',
|
Name: 'ActivitiesButton',
|
||||||
Extends: PanelMenu.Button,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
@@ -487,7 +487,7 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const PanelCorner = new Lang.Class({
|
var PanelCorner = new Lang.Class({
|
||||||
Name: 'PanelCorner',
|
Name: 'PanelCorner',
|
||||||
|
|
||||||
_init: function(side) {
|
_init: function(side) {
|
||||||
@@ -654,7 +654,7 @@ const PanelCorner = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AggregateLayout = new Lang.Class({
|
var AggregateLayout = new Lang.Class({
|
||||||
Name: 'AggregateLayout',
|
Name: 'AggregateLayout',
|
||||||
Extends: Clutter.BoxLayout,
|
Extends: Clutter.BoxLayout,
|
||||||
|
|
||||||
@@ -687,7 +687,7 @@ const AggregateLayout = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const AggregateMenu = new Lang.Class({
|
var AggregateMenu = new Lang.Class({
|
||||||
Name: 'AggregateMenu',
|
Name: 'AggregateMenu',
|
||||||
Extends: PanelMenu.Button,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
@@ -767,7 +767,7 @@ const PANEL_ITEM_IMPLEMENTATIONS = {
|
|||||||
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,
|
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Panel = new Lang.Class({
|
var Panel = new Lang.Class({
|
||||||
Name: 'Panel',
|
Name: 'Panel',
|
||||||
|
|
||||||
_init : function() {
|
_init : function() {
|
||||||
@@ -823,12 +823,17 @@ const Panel = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onWindowActorAdded: function(container, metaWindowActor) {
|
_onWindowActorAdded: function(container, metaWindowActor) {
|
||||||
let signalId = metaWindowActor.connect('allocation-changed', Lang.bind(this, this._updateSolidStyle));
|
let signalIds = [];
|
||||||
this._trackedWindows.set(metaWindowActor, signalId);
|
['allocation-changed', 'notify::visible'].forEach(s => {
|
||||||
|
signalIds.push(metaWindowActor.connect(s, Lang.bind(this, this._updateSolidStyle)));
|
||||||
|
});
|
||||||
|
this._trackedWindows.set(metaWindowActor, signalIds);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onWindowActorRemoved: function(container, metaWindowActor) {
|
_onWindowActorRemoved: function(container, metaWindowActor) {
|
||||||
metaWindowActor.disconnect(this._trackedWindows.get(metaWindowActor));
|
this._trackedWindows.get(metaWindowActor).forEach(id => {
|
||||||
|
metaWindowActor.disconnect(id);
|
||||||
|
});
|
||||||
this._trackedWindows.delete(metaWindowActor);
|
this._trackedWindows.delete(metaWindowActor);
|
||||||
this._updateSolidStyle();
|
this._updateSolidStyle();
|
||||||
},
|
},
|
||||||
@@ -1155,7 +1160,7 @@ const Panel = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onMenuSet: function(indicator) {
|
_onMenuSet: function(indicator) {
|
||||||
if (!indicator.menu || indicator.menu._openChangedId > 0)
|
if (!indicator.menu || indicator.menu.hasOwnProperty('_openChangedId'))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
indicator.menu._openChangedId = indicator.menu.connect('open-state-changed',
|
indicator.menu._openChangedId = indicator.menu.connect('open-state-changed',
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user