Compare commits
423 Commits
gbsneto/ne
...
cherry-pic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
768c08ba9d | ||
|
|
69426cbfda | ||
|
|
9f968e7378 | ||
|
|
1ab5e6973a | ||
|
|
1dea3341ec | ||
|
|
8fda054dc5 | ||
|
|
e989684602 | ||
|
|
5c33fe4a0a | ||
|
|
4f427f4e0d | ||
|
|
6d3c740b37 | ||
|
|
34c4627db9 | ||
|
|
b08b125df6 | ||
|
|
50301bcfd4 | ||
|
|
c2cacc63ee | ||
|
|
c226081a23 | ||
|
|
16f4e4dc4c | ||
|
|
308b58175f | ||
|
|
454e3fd39a | ||
|
|
e4d72fb2b0 | ||
|
|
f3fcc4adb7 | ||
|
|
867587ef4c | ||
|
|
b68fb35783 | ||
|
|
8dfed7e762 | ||
|
|
97fe4f761a | ||
|
|
ba8210ea98 | ||
|
|
656168543f | ||
|
|
8378c9c9e0 | ||
|
|
de16fe8dff | ||
|
|
793f053309 | ||
|
|
bea34da289 | ||
|
|
aafec16f49 | ||
|
|
73df61f36d | ||
|
|
39e6375aff | ||
|
|
ed21a4e5c1 | ||
|
|
73472ba6a7 | ||
|
|
702417ce83 | ||
|
|
766e9034e2 | ||
|
|
91748aedb7 | ||
|
|
4783d767d6 | ||
|
|
dedbf0cb09 | ||
|
|
e5b7462b94 | ||
|
|
48b0a91385 | ||
|
|
6170bea283 | ||
|
|
dcceb615bf | ||
|
|
da673639ca | ||
|
|
dd7727e315 | ||
|
|
f3ba1e65ba | ||
|
|
f8b4696211 | ||
|
|
d71d85e90c | ||
|
|
660a2b6e62 | ||
|
|
cc347bf6d8 | ||
|
|
26ffeaae47 | ||
|
|
01a57206bc | ||
|
|
279072795f | ||
|
|
c89d6a633a | ||
|
|
fecc0c06ac | ||
|
|
512862f2d7 | ||
|
|
a90fcb7ddb | ||
|
|
6baf490aab | ||
|
|
f971b8426d | ||
|
|
83c6b2ab48 | ||
|
|
24742f3566 | ||
|
|
03a46be5c7 | ||
|
|
9a26b970f9 | ||
|
|
2ef71b62df | ||
|
|
766288eec1 | ||
|
|
53e8285cf0 | ||
|
|
ff844a2a81 | ||
|
|
78997cb7eb | ||
|
|
f52574bd28 | ||
|
|
e6a814fac8 | ||
|
|
ddb85c03c3 | ||
|
|
66c4b1a8b6 | ||
|
|
11daf14e80 | ||
|
|
35484151ce | ||
|
|
1bccbe7f11 | ||
|
|
b4162afa65 | ||
|
|
eb51942a05 | ||
|
|
23e5cd4e10 | ||
|
|
13f3f75303 | ||
|
|
3dd8ffc2bb | ||
|
|
541847d8b6 | ||
|
|
fb9854c003 | ||
|
|
c748b9de5c | ||
|
|
34e85342d8 | ||
|
|
91b7474d5a | ||
|
|
d76162c1c0 | ||
|
|
2b517e352d | ||
|
|
08203c9c1e | ||
|
|
d29e5765ba | ||
|
|
61beccf733 | ||
|
|
ffb8bd5fa7 | ||
|
|
7f6e2ff36b | ||
|
|
7d94bfa642 | ||
|
|
eb3c857f23 | ||
|
|
a096ed37d6 | ||
|
|
498a743c08 | ||
|
|
2c91b6164c | ||
|
|
04352ae158 | ||
|
|
5c5dc03b78 | ||
|
|
8a89e22e8e | ||
|
|
8f851e8adf | ||
|
|
49e4757c0b | ||
|
|
dc002a61eb | ||
|
|
bea3987f3e | ||
|
|
7cd37a4017 | ||
|
|
3d69fa8b9c | ||
|
|
3a52bfbc0f | ||
|
|
38c0f3bbf2 | ||
|
|
7b1533caf7 | ||
|
|
afd83d929e | ||
|
|
d9e8a525de | ||
|
|
b25142c517 | ||
|
|
6893fc3810 | ||
|
|
13ef33ae0a | ||
|
|
f8886468ce | ||
|
|
3bf0511f1b | ||
|
|
1b485427cf | ||
|
|
ebf04e3a95 | ||
|
|
2f78b8428b | ||
|
|
00eef6cd5d | ||
|
|
5c031200ce | ||
|
|
4340260c49 | ||
|
|
96e534796f | ||
|
|
3ee878491b | ||
|
|
b92ddc0d39 | ||
|
|
c8a4a91681 | ||
|
|
e572d5d08c | ||
|
|
9829d56bfa | ||
|
|
b30d999878 | ||
|
|
35b62baf6e | ||
|
|
39f61fc41c | ||
|
|
d3939a38a3 | ||
|
|
b97fc02e57 | ||
|
|
ea1adea24d | ||
|
|
eb7533bbf1 | ||
|
|
69ea038a8f | ||
|
|
b80115dc6e | ||
|
|
36b8dcbe07 | ||
|
|
07fa5ef849 | ||
|
|
d9a75412c3 | ||
|
|
66f9a9df81 | ||
|
|
4bfdd677e3 | ||
|
|
002160e524 | ||
|
|
f2df347ddb | ||
|
|
799bbdb503 | ||
|
|
1aff64a38b | ||
|
|
574c560677 | ||
|
|
f8db5aa106 | ||
|
|
b18469427e | ||
|
|
72c4f148ef | ||
|
|
94f6976ddd | ||
|
|
be187f4149 | ||
|
|
1b872c1195 | ||
|
|
89f2187d72 | ||
|
|
943df86cb0 | ||
|
|
a5a6c699c3 | ||
|
|
a0467bf875 | ||
|
|
b1da3ae772 | ||
|
|
8af466e34d | ||
|
|
66c7616892 | ||
|
|
c05098cd12 | ||
|
|
4723dd1f4c | ||
|
|
7e4c32ec1f | ||
|
|
3d443d5b17 | ||
|
|
3155d03d9e | ||
|
|
989c0ee49e | ||
|
|
69f6c43b60 | ||
|
|
bf2d012e40 | ||
|
|
4d773a5ce9 | ||
|
|
711d4ba65c | ||
|
|
4490463513 | ||
|
|
1ec5117715 | ||
|
|
bf367daaba | ||
|
|
1de008f2d5 | ||
|
|
4baa091bc5 | ||
|
|
cb7d1925ef | ||
|
|
3ddae9d815 | ||
|
|
e22421a25a | ||
|
|
09a1e61c63 | ||
|
|
7345a6f276 | ||
|
|
fda938175e | ||
|
|
3a39fb5ab8 | ||
|
|
1a0ec782b5 | ||
|
|
a96753f085 | ||
|
|
4ff94f80a0 | ||
|
|
e6d4581959 | ||
|
|
07bbcb1b48 | ||
|
|
f4ea9074d0 | ||
|
|
d4ee2e8bbf | ||
|
|
cf82d5ba85 | ||
|
|
5e04f6eb23 | ||
|
|
0dd171a7c8 | ||
|
|
837fbbf417 | ||
|
|
d7b61e7281 | ||
|
|
073da0806c | ||
|
|
ff54b0d35e | ||
|
|
ff2a736193 | ||
|
|
c6cf81f28b | ||
|
|
104d1ae151 | ||
|
|
12e14884ef | ||
|
|
3c4a5a67e2 | ||
|
|
e4f9efc134 | ||
|
|
bd665df321 | ||
|
|
bd197789c1 | ||
|
|
daff787a62 | ||
|
|
ff1343611f | ||
|
|
da05c85f3c | ||
|
|
648179a2db | ||
|
|
a5ad81d923 | ||
|
|
abfa61abc5 | ||
|
|
abdfaeb444 | ||
|
|
06b690ff21 | ||
|
|
d0226c7897 | ||
|
|
19e084036a | ||
|
|
a7d974e670 | ||
|
|
7a0c866d97 | ||
|
|
cc3f439323 | ||
|
|
51b7eb7a2b | ||
|
|
023859ee4b | ||
|
|
09acd0a3db | ||
|
|
bf213af362 | ||
|
|
bfb0bc7a29 | ||
|
|
c00f1d040b | ||
|
|
ba7cfff90c | ||
|
|
548c41d164 | ||
|
|
172d21cf50 | ||
|
|
5c8f3a65f7 | ||
|
|
07369125b6 | ||
|
|
59cae58f25 | ||
|
|
e07b9a75b5 | ||
|
|
19fc7c4d31 | ||
|
|
d66f5ab3c6 | ||
|
|
c773c8c162 | ||
|
|
9a3ed0056e | ||
|
|
b3999e4078 | ||
|
|
d0a587d42f | ||
|
|
2bb8e1be9b | ||
|
|
967a6ae44d | ||
|
|
89ca5e71d4 | ||
|
|
4c4d23ed83 | ||
|
|
7173ec1df7 | ||
|
|
bc465ab006 | ||
|
|
fe4973b585 | ||
|
|
0d0384ebb1 | ||
|
|
27ef8eb9a0 | ||
|
|
24a3fd4c4d | ||
|
|
d9f8e04478 | ||
|
|
b9f6032ddd | ||
|
|
d62391c8f1 | ||
|
|
ab24ee7a7e | ||
|
|
c52fd9373c | ||
|
|
1249655d0a | ||
|
|
120b907c33 | ||
|
|
3848513cf4 | ||
|
|
725c72e020 | ||
|
|
0b113094b4 | ||
|
|
3633e1feca | ||
|
|
4759197200 | ||
|
|
1d39afabdc | ||
|
|
483607311c | ||
|
|
d90a79fe7a | ||
|
|
87ed0118d1 | ||
|
|
1f5eccbc70 | ||
|
|
dac2274993 | ||
|
|
39db86e755 | ||
|
|
255627bd69 | ||
|
|
0afac36713 | ||
|
|
c0c027c608 | ||
|
|
e938986a74 | ||
|
|
32fa060a62 | ||
|
|
38da479ee8 | ||
|
|
574ab04e9f | ||
|
|
ee6635282c | ||
|
|
ff39b3274b | ||
|
|
2c1d654035 | ||
|
|
1bdb065ffa | ||
|
|
57669bca1b | ||
|
|
e647ceb4d1 | ||
|
|
4d9e84f6f7 | ||
|
|
5171bdd45f | ||
|
|
9ab0071aa5 | ||
|
|
cf39b2db87 | ||
|
|
8a1c0f3a42 | ||
|
|
4b42879a2c | ||
|
|
394121f77d | ||
|
|
f4f8982825 | ||
|
|
7220f6d25b | ||
|
|
059fb5c7cb | ||
|
|
0057c19bfc | ||
|
|
05409b949f | ||
|
|
affbec73ef | ||
|
|
e781e1fdba | ||
|
|
12de4e67f8 | ||
|
|
9201701c95 | ||
|
|
6e7344b837 | ||
|
|
b8f8e1710b | ||
|
|
8b0a67fe64 | ||
|
|
1eb1b1be4e | ||
|
|
de5a4a98c9 | ||
|
|
26a49168ba | ||
|
|
ff4623454f | ||
|
|
cf5204760d | ||
|
|
46c13349fc | ||
|
|
2a3875775d | ||
|
|
38b38732d3 | ||
|
|
24c8f5bb70 | ||
|
|
c02296a9b9 | ||
|
|
4eb122ea8d | ||
|
|
90d5d16343 | ||
|
|
45c8f0b76c | ||
|
|
236ee9e483 | ||
|
|
459b200cc0 | ||
|
|
45bc8ae292 | ||
|
|
fbfe5a1988 | ||
|
|
87a6dc1b95 | ||
|
|
1b11f0673e | ||
|
|
3a4dd55c11 | ||
|
|
1219a304fb | ||
|
|
9d941f8202 | ||
|
|
0c232876c3 | ||
|
|
dcbc7236a0 | ||
|
|
80a869e768 | ||
|
|
b7d874d36b | ||
|
|
9f9f4a4cf6 | ||
|
|
217a2f3216 | ||
|
|
84e94db275 | ||
|
|
5f2a6003e1 | ||
|
|
2876a8afe1 | ||
|
|
6f12864776 | ||
|
|
5934dc16d3 | ||
|
|
bcc652632d | ||
|
|
95ebbb9360 | ||
|
|
775c3345eb | ||
|
|
c8734b8f35 | ||
|
|
9f2dbfd463 | ||
|
|
d6c0a53db9 | ||
|
|
9c7098816e | ||
|
|
8834088f3b | ||
|
|
0d766dcf70 | ||
|
|
41da4b0681 | ||
|
|
5cad5c20e9 | ||
|
|
133b623204 | ||
|
|
d44a4a6a62 | ||
|
|
06565542e7 | ||
|
|
ead73e5195 | ||
|
|
c395a1d1cd | ||
|
|
4f1174ccbb | ||
|
|
b78f09de78 | ||
|
|
9eff9adaae | ||
|
|
41b4c51341 | ||
|
|
9bada1f2fb | ||
|
|
7e27a2db3d | ||
|
|
523eec521c | ||
|
|
77890c6000 | ||
|
|
40a50f77ea | ||
|
|
ccc64e2621 | ||
|
|
b58eaeb3e7 | ||
|
|
e206e3ba59 | ||
|
|
71ec81cff7 | ||
|
|
37adbf610d | ||
|
|
6ed3d3d05d | ||
|
|
c023eba22c | ||
|
|
c7fb61984b | ||
|
|
65b1e04f13 | ||
|
|
90786509bb | ||
|
|
ebaf969a05 | ||
|
|
d2a62bcc7f | ||
|
|
66a8f2860d | ||
|
|
d96131793a | ||
|
|
6c6c89c634 | ||
|
|
e57768e2e8 | ||
|
|
d43401cc74 | ||
|
|
9e5071849c | ||
|
|
55bfc4d820 | ||
|
|
6577a295da | ||
|
|
a0db95e00f | ||
|
|
1562d6c63a | ||
|
|
8d3277cb37 | ||
|
|
c65d820390 | ||
|
|
9f5f6aa9b2 | ||
|
|
261d6d35f5 | ||
|
|
0f34cbb658 | ||
|
|
077a1d2309 | ||
|
|
ea6b34de0f | ||
|
|
66835c6e15 | ||
|
|
99e81b32f4 | ||
|
|
fe69dacaf1 | ||
|
|
6daeb048af | ||
|
|
db4dfd8fa5 | ||
|
|
0b150a17c5 | ||
|
|
43a45c091d | ||
|
|
f4e35a9e82 | ||
|
|
cc5adcbeef | ||
|
|
848cc1bb19 | ||
|
|
654093dc40 | ||
|
|
aebea82474 | ||
|
|
a6b29d6501 | ||
|
|
9766562062 | ||
|
|
c6a79fafc9 | ||
|
|
7fc4fe9a97 | ||
|
|
ee0a36e6a3 | ||
|
|
a5972d2882 | ||
|
|
2fdc627257 | ||
|
|
77f77b4305 | ||
|
|
910a1aed96 | ||
|
|
bf0bd21757 | ||
|
|
e1be4ba434 | ||
|
|
7c8ed95330 | ||
|
|
f351cfa2f7 | ||
|
|
d26bb38be9 | ||
|
|
b75e61d5c8 | ||
|
|
ca35ae4364 | ||
|
|
f6fa08fa75 | ||
|
|
46f94241eb | ||
|
|
ea2ddaa9dd | ||
|
|
b4d491a4d2 | ||
|
|
463dcc6b93 | ||
|
|
f755905c75 | ||
|
|
b70fb5b69a | ||
|
|
8b64d88091 | ||
|
|
b66c8b1411 | ||
|
|
d6a746dceb |
@@ -1,9 +1,13 @@
|
|||||||
|
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- review
|
- review
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
BUNDLE: "extensions-git.flatpak"
|
||||||
JS_LOG: "js-report.txt"
|
JS_LOG: "js-report.txt"
|
||||||
POT_LOG: "pot-update.txt"
|
POT_LOG: "pot-update.txt"
|
||||||
|
|
||||||
@@ -46,6 +50,20 @@ eslint:
|
|||||||
- reports
|
- reports
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
|
potfile_check:
|
||||||
|
image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v1
|
||||||
|
stage: review
|
||||||
|
script:
|
||||||
|
- ./.gitlab-ci/check-potfiles.sh
|
||||||
|
<<: *only_default
|
||||||
|
|
||||||
|
no_template_check:
|
||||||
|
image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v1
|
||||||
|
stage: review
|
||||||
|
script:
|
||||||
|
- ./.gitlab-ci/check-template-strings.sh
|
||||||
|
<<: *only_default
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: registry.gitlab.gnome.org/gnome/mutter/master:v3
|
image: registry.gitlab.gnome.org/gnome/mutter/master:v3
|
||||||
stage: build
|
stage: build
|
||||||
@@ -96,3 +114,24 @@ test-pot:
|
|||||||
' | tee $POT_LOG
|
' | tee $POT_LOG
|
||||||
- (! grep -q . $POT_LOG)
|
- (! grep -q . $POT_LOG)
|
||||||
<<: *only_default
|
<<: *only_default
|
||||||
|
|
||||||
|
flatpak:
|
||||||
|
stage: build
|
||||||
|
variables:
|
||||||
|
SUBPROJECT: "subprojects/extensions-app"
|
||||||
|
# Your manifest path
|
||||||
|
MANIFEST_PATH: "$SUBPROJECT/build-aux/flatpak/org.gnome.Extensions.json"
|
||||||
|
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
||||||
|
FLATPAK_MODULE: "gnome-extensions-app"
|
||||||
|
APP_ID: "org.gnome.Extensions"
|
||||||
|
MESON_ARGS: "$SUBPROJECT"
|
||||||
|
extends: .flatpak
|
||||||
|
before_script:
|
||||||
|
- flatpak run --command=$SUBPROJECT/generate-translations.sh
|
||||||
|
--filesystem=host org.gnome.Sdk//master
|
||||||
|
<<: *only_default
|
||||||
|
|
||||||
|
nightly:
|
||||||
|
extends: '.publish_nightly'
|
||||||
|
variables:
|
||||||
|
BUNDLES: '$BUNDLE'
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ fi
|
|||||||
function commit_message_has_url() {
|
function commit_message_has_url() {
|
||||||
commit=$1
|
commit=$1
|
||||||
commit_message=$(git show -s --format='format:%b' $commit)
|
commit_message=$(git show -s --format='format:%b' $commit)
|
||||||
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
|
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(-/\)\?\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
26
.gitlab-ci/check-potfiles.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
srcdirs="js src subprojects/extensions-tool"
|
||||||
|
globs=('*.js' '*.c')
|
||||||
|
|
||||||
|
# find source files that contain gettext keywords
|
||||||
|
files=$(grep -lR ${globs[@]/#/--include=} '\(gettext\|[^I_)]_\)(' $srcdirs)
|
||||||
|
|
||||||
|
# find those that aren't listed in POTFILES.in
|
||||||
|
missing=$(for f in $files; do ! grep -q ^$f po/POTFILES.in && echo $f; done)
|
||||||
|
|
||||||
|
if [ ${#missing} -eq 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >&2 <<EOT
|
||||||
|
|
||||||
|
The following files are missing from po/POTFILES.po:
|
||||||
|
|
||||||
|
EOT
|
||||||
|
for f in $missing; do
|
||||||
|
echo " $f" >&2
|
||||||
|
done
|
||||||
|
echo >&2
|
||||||
|
|
||||||
|
exit 1
|
||||||
23
.gitlab-ci/check-template-strings.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# find files from POTFILES.in that use js template strings
|
||||||
|
baddies=$(grep -l '${' $(grep ^js po/POTFILES.in))
|
||||||
|
|
||||||
|
if [ ${#baddies} -eq 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >&2 <<EOT
|
||||||
|
|
||||||
|
xgettext cannot handle template strings properly, so we ban their use
|
||||||
|
in files with translatable strings.
|
||||||
|
|
||||||
|
The following files are listed in po/POTFILES.in and use template strings:
|
||||||
|
|
||||||
|
EOT
|
||||||
|
for f in $baddies; do
|
||||||
|
echo " $f" >&2
|
||||||
|
done
|
||||||
|
echo >&2
|
||||||
|
|
||||||
|
exit 1
|
||||||
@@ -23,7 +23,7 @@ run_eslint() {
|
|||||||
mkdir -p $(dirname $output)
|
mkdir -p $(dirname $output)
|
||||||
touch $output
|
touch $output
|
||||||
|
|
||||||
eslint -f unix ${!extra_args} -o $output js
|
eslint -f unix ${!extra_args} -o $output js subprojects/extensions-app/js
|
||||||
}
|
}
|
||||||
|
|
||||||
list_commit_range_additions() {
|
list_commit_range_additions() {
|
||||||
|
|||||||
151
NEWS
@@ -1,3 +1,154 @@
|
|||||||
|
3.36.1
|
||||||
|
======
|
||||||
|
* Improve app folders [Jonas D.; !1011]
|
||||||
|
* Fix launching ibus daemon [Alynx; !1080]
|
||||||
|
* Do not shutdown ibus/xsettings on X11 compositor restart [Carlos; #2329]
|
||||||
|
* Hide hint text in entries when preedit is used [Carlos; !1084]
|
||||||
|
* Do not load app infos on main thread [Christian; #2282]
|
||||||
|
* Don't expose FDO Notifications interface on main bus name [Florian; !547]
|
||||||
|
* Fix icon of mobile broadband connections [Cosimo, Reik; !1097, !1105]
|
||||||
|
* Fix high-contrast/symbolic icon mix-up [Florian; #2414]
|
||||||
|
* Don't ellipsize times in world clock [Florian; !1090]
|
||||||
|
* Only check for extension updates if there are any extensions [Florian; !1100]
|
||||||
|
* Fix crash when trying to update removed extensions [Florian; #2343]
|
||||||
|
* Make Extensions app available as flatpak [Florian; !1081, !1106, !1087, !1133]
|
||||||
|
* Display fractional timezones as hours:minutes [Jonas D.; #2438]
|
||||||
|
* Fix assigning pad keybindings [Carlos; #2451]
|
||||||
|
* Handle embedded newlines in lock screen notifications [Florian; #2463]
|
||||||
|
* Fix OSK layout fallback for unsupported variants [Florian; #2471]
|
||||||
|
* Do not apply text color to color glyphs (emojis) [Carlos; #850]
|
||||||
|
* Check "Install pending software updates" by default [Michael; #2427]
|
||||||
|
* Do not warn about missing GDM on each login [Florian; #2432]
|
||||||
|
* Fix telepathy chat notifications [Marco; !1112]
|
||||||
|
* Fix offline updates support in end session dialog [Michael; #2276]
|
||||||
|
* Fix activating notifications by keyboard [Florian; #2319]
|
||||||
|
* Remove handling of 'blacklisted' extensions [Florian; !1132]
|
||||||
|
* Only update extensions if Extensions app is installed [Florian; #2346]
|
||||||
|
* Improve Norwegian on-screen-keyboard layout [Bjørn; !1073]
|
||||||
|
* Fix IM support for deleting surrounding text [Takao; !477]
|
||||||
|
* Fix blur effect with fractional scaling [Jonas D.; !1000]
|
||||||
|
* Use better location name in weather section [Florian; #2468]
|
||||||
|
* Fix glitch in sound feedback on volume changes [Florian; !1147]
|
||||||
|
* Fix on-screen keyboard regressions [Jonas D.; !1142]
|
||||||
|
* Improve screen-reader support [Luke; #2508, #2517]
|
||||||
|
* Fix password entry resize on login/lock screen [Florian; #2423]
|
||||||
|
* Fix crash when opening app picker [Jonas Å.; !1154]
|
||||||
|
* Misc. bug fixes and cleanups [Florian, Sebastian, Jan, Daniel, Philip, Mario,
|
||||||
|
Ray, Marco, Jonas D., Carlos, Georges; #2298, #2305, !1078, !1077, #2334,
|
||||||
|
#2381, !1093, !1098, #2386, !1108, !1109, !1114, !1076, !1072, !1115, !1088,
|
||||||
|
!1101, #2467, !1121, !1122, #2476, !1123, !1117, !1129, !1113, !1102, !1127,
|
||||||
|
#2238, !1131, !1135, !1136, !849, #2504, #2371, !1146, !1141, #2510, !1150]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Marco Trevisan (Treviño), Michael Catanzaro, Cosimo Cecchi, Jonas Dreßler,
|
||||||
|
Takao Fujiwara, Carlos Garnacho, Christian Hergert, Sebastian Keller,
|
||||||
|
Reik Keutterling, Bjørn Lie, Florian Müllner, Jwtiyar Nariman,
|
||||||
|
Georges Basile Stavracas Neto, Mario Sanchez Prada, Ray Strode, Jan Tojnar,
|
||||||
|
Daniel van Vugt, Philip Withnall, Luke Yelavich, Alynx Zhou, Jonas Ådahl
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Марко Костић [sr], Jordi Mas [ca], sicklylife [ja], Marek Černocký [cs],
|
||||||
|
Daniel Rusek [cs], Kjartan Maraas [nb], Tim Sabsch [de], Stas Solovey [ru],
|
||||||
|
Peter Mráz [sk], Rafael Fontenelle [pt_BR], Piotr Drąg [pl],
|
||||||
|
Milo Casagrande [it], Anders Jonsson [sv], Yuri Chornoivan [uk],
|
||||||
|
Kukuh Syafaat [id], Guillaume Bernard [fr], Daniel Mustieles [es],
|
||||||
|
Danial Behzadi [fa], Goran Vidović [hr], Yosef Or Boczko [he],
|
||||||
|
Emin Tufan Çetin [tr], Wolfgang Stöggl [de], Ibai Oihanguren Sala [eu],
|
||||||
|
Jwtiyar Nariman [ckb], Aurimas Černius [lt]
|
||||||
|
|
||||||
|
3.36.0
|
||||||
|
======
|
||||||
|
* Fix off-by-1900 error in date conversions [Florian; !1061]
|
||||||
|
* Fix crash on startup with topIcons* extension enabled [Florian; #2308]
|
||||||
|
* Don't require gsd-xsettings for X11 support on wayland [Olivier; !1065]
|
||||||
|
* Fix ibus support in Xorg session [Carlos; #1690]
|
||||||
|
* Improve Extensions D-Bus API [Florian; !1074]
|
||||||
|
* Allow session modes to specify alternative resource name [Marco; !1063]
|
||||||
|
* Fix link to location settings in aggregate menu [Sebastian; #2316]
|
||||||
|
* Fix illegible app folder titles with light theme [ub; !1059]
|
||||||
|
* Really fix visual glitch in sliders [Jonas; #1569]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Marco Trevisan (Treviño), Jonas Dreßler, Olivier Fourdan, Carlos Garnacho,
|
||||||
|
Sebastian Keller, Florian Müllner, ub
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Aman Alam [pa], Goran Vidović [hr], Aurimas Černius [lt],
|
||||||
|
Milo Casagrande [it], Daniel Korostil [uk], sicklylife [ja],
|
||||||
|
Marek Černocký [cs], Nathan Follens [nl]
|
||||||
|
|
||||||
|
3.35.92
|
||||||
|
=======
|
||||||
|
* Plug a memory leak [Jonas D.; !1015]
|
||||||
|
* Fix missing "back" button on login screen [Florian; #2228]
|
||||||
|
* Fix width of window preview titles in overview [Jonas D.; #58]
|
||||||
|
* Fix looking glass text with light style variant [Feichtmeier; !1023]
|
||||||
|
* Center unlock entry [Florian; !1021]
|
||||||
|
* Hide overlay scrollbars in notification popup [Jonas D.; !1013]
|
||||||
|
* Work around add_actor() slowness in icon spring animation [Daniel; !1002]
|
||||||
|
* Add disable-animations heuristics [Jonas Å.; !757]
|
||||||
|
* Fix visual glitches in on-screen keyboard [Carlos; #2214]
|
||||||
|
* Fix clearing changed textures from cache [Florian; #2244]
|
||||||
|
* Fix visual glitch in sliders [Daniel; #1569]
|
||||||
|
* Stop using dedicated lock screen background [Florian; !1001]
|
||||||
|
* Fix entries disappearing after authentication errors [Florian; #2236]
|
||||||
|
* Fix crash when animations are disabled [Florian; #2255]
|
||||||
|
* Fix passing pointer events to clients when magnified [Jonas D.; !993]
|
||||||
|
* Fix keynav on new lock screen [Florian; #2210]
|
||||||
|
* Avoid short-lived allocations on actor removal [Christian; #2263]
|
||||||
|
* Fix super-sized default avatars in user list [Florian, Sam; #2242]
|
||||||
|
* Leave overview when locking the screen [Jonas D.; !1043]
|
||||||
|
* Hide message list on login screen [Florian; #2241]
|
||||||
|
* Avoid IO on the main thread [Christian, Florian; !1050, !1051]
|
||||||
|
* Fix window animations getting stuck when client doesn't respond [Jonas; !1055]
|
||||||
|
* Only subscribe to touchpad events for touchpad gestures [Daniel; !925]
|
||||||
|
* Start X11 session services before Xwayland clients [Carlos; !836, !1056]
|
||||||
|
* Only show switch-user button with unlock prompt [Florian; !1029]
|
||||||
|
* Misc. bug fixes and cleanups [Jonas D., Florian, Georges, Jonas Å., Daniel,
|
||||||
|
Jakub, Philippe; !1018, !1020, !1024, !1027, !1026, !1022, !1031, !1035,
|
||||||
|
!1032, !1025, !1039, #2157, !1037, !1042, !1047, !1048, #2270, !1046,
|
||||||
|
!167, !1016]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Dreßler, Feichtmeier, Carlos Garnacho, Christian Hergert, Sam Hewitt,
|
||||||
|
Florian Müllner, Georges Basile Stavracas Neto, Jakub Steiner, Philippe Troin,
|
||||||
|
Daniel van Vugt, Jonas Ådahl
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Danial Behzadi [fa], Efstathios Iosifidis [el], Daniel Mustieles [es],
|
||||||
|
Sabri Ünal [tr], sicklylife [ja], Piotr Drąg [pl], Jordi Mas [ca],
|
||||||
|
Anders Jonsson [sv], Chao-Hsiung Liao [zh_TW], Asier Sarasua Garmendia [eu],
|
||||||
|
Rafael Fontenelle [pt_BR], Марко Костић [sr], Changwoo Ryu [ko],
|
||||||
|
Charles Monzat [fr], Jiri Grönroos [fi], Jor Teron [mjw], Bruce Cowan [en_GB],
|
||||||
|
Emin Tufan Çetin [tr], Alan Mortensen [da], Balázs Úr [hu], Fran Dieguez [gl],
|
||||||
|
Kukuh Syafaat [id]
|
||||||
|
|
||||||
|
3.35.91
|
||||||
|
=======
|
||||||
|
* Improve magnifier [Carlos; !984]
|
||||||
|
* Only enable OSK automatically if touch-mode is enabled [Carlos; #872]
|
||||||
|
* Merge screen shield and unlock dialog to new lock screen [Georges; !872]
|
||||||
|
* Improve ShellBlur effect [Jonas; !991]
|
||||||
|
* Adapt user avatar for new lock screen [Umang, Georges; !922]
|
||||||
|
* Animate prompt transition on lock screen [Florian; !972]
|
||||||
|
* Reduce font-size in dialog titles if text doesn't fit [Jonas; !1012]
|
||||||
|
* Various lock screen improvements and bug fixes [Jakub, Florian, Georges;
|
||||||
|
!996, !997, !999, #2212, !998, !1006, #2215, #2213]
|
||||||
|
* Misc. bug fixes and cleanups [Daniel, Florian, Jakub, nana-4, Jonas; #2170,
|
||||||
|
#2167, !936, !988, #2187, !994, !995, !938, #2194, #2203, !1004, !977, !1014]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Dreßler, Carlos Garnacho, Umang Jain, Daniel Mustieles, Florian Müllner,
|
||||||
|
Georges Basile Stavracas Neto, Jakub Steiner, Daniel van Vugt, nana-4
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Daniel Mustieles [es, pt_BR], Rafael Fontenelle [pt_BR], Danial Behzadi [fa],
|
||||||
|
Anders Jonsson [sv], Asier Sarasua Garmendia [eu], Aurimas Černius [lt],
|
||||||
|
Bruce Cowan [en_GB], sicklylife [ja], Fran Dieguez [gl], Kukuh Syafaat [id],
|
||||||
|
Emin Tufan Çetin [tr], Jiri Grönroos [fi], Jordi Mas [ca], Claude Paroz [fr],
|
||||||
|
Ask Hjorth Larsen [da], Марко Костић [sr], Piotr Drąg [pl],
|
||||||
|
Charles Monzat [fr], Balázs Úr [hu]
|
||||||
|
|
||||||
3.35.90
|
3.35.90
|
||||||
=======
|
=======
|
||||||
* Update default favorite apps [Michael; !907]
|
* Update default favorite apps [Michael; !907]
|
||||||
|
|||||||
@@ -161,12 +161,16 @@ def convert_file(source_file, destination_path):
|
|||||||
try:
|
try:
|
||||||
xkb_name = locale_to_xkb(root["locale"], root["name"])
|
xkb_name = locale_to_xkb(root["locale"], root["name"])
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
logging.warn(e)
|
logging.warning(e)
|
||||||
return False
|
return False
|
||||||
destination_file = os.path.join(destination_path, xkb_name + ".json")
|
destination_file = os.path.join(destination_path, xkb_name + ".json")
|
||||||
|
|
||||||
with open(destination_file, 'w', encoding="utf-8") as dest_fd:
|
try:
|
||||||
|
with open(destination_file, 'x', encoding="utf-8") as dest_fd:
|
||||||
json.dump(root, dest_fd, ensure_ascii=False, indent=2, sort_keys=True)
|
json.dump(root, dest_fd, ensure_ascii=False, indent=2, sort_keys=True)
|
||||||
|
except FileExistsError as e:
|
||||||
|
logging.info("File %s exists, not updating", destination_file)
|
||||||
|
return False
|
||||||
|
|
||||||
logging.debug("written %s", destination_file)
|
logging.debug("written %s", destination_file)
|
||||||
|
|
||||||
@@ -199,14 +199,37 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
LaunchExtensionPrefs:
|
LaunchExtensionPrefs:
|
||||||
@uuid: The UUID of the extension
|
Deprecated for OpenExtensionPrefs
|
||||||
|
|
||||||
Launch preferences of an extension.
|
|
||||||
-->
|
-->
|
||||||
<method name="LaunchExtensionPrefs">
|
<method name="LaunchExtensionPrefs">
|
||||||
<arg type="s" direction="in" name="uuid"/>
|
<arg type="s" direction="in" name="uuid"/>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
OpenExtensionPrefs:
|
||||||
|
@uuid: The UUID of the extension
|
||||||
|
@parent_window: Identifier for the application window
|
||||||
|
@options: Vardict with further options
|
||||||
|
|
||||||
|
Opens the prefs dialog of extension @uuid.
|
||||||
|
|
||||||
|
The following @options are recognized:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>modal b</term>
|
||||||
|
<listitem>
|
||||||
|
<para>Whether the prefs window should be modal, default: false</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<method name="OpenExtensionPrefs">
|
||||||
|
<arg type="s" direction="in" name="uuid"/>
|
||||||
|
<arg type="s" direction="in" name="parent_window"/>
|
||||||
|
<arg type="a{sv}" direction="in" name="options"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
CheckForUpdates:
|
CheckForUpdates:
|
||||||
Update all extensions for which updates are available
|
Update all extensions for which updates are available
|
||||||
@@ -234,5 +257,11 @@
|
|||||||
-->
|
-->
|
||||||
<property name="ShellVersion" type="s" access="read"/>
|
<property name="ShellVersion" type="s" access="read"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
UserExtensionsEnabled:
|
||||||
|
Whether user extensions are enabled
|
||||||
|
-->
|
||||||
|
<property name="UserExtensionsEnabled" type="b" access="readwrite"/>
|
||||||
|
|
||||||
</interface>
|
</interface>
|
||||||
</node>
|
</node>
|
||||||
|
|||||||
@@ -57,5 +57,19 @@
|
|||||||
<method name="GetWindows">
|
<method name="GetWindows">
|
||||||
<arg name="windows" direction="out" type="a{ta{sv}}" />
|
<arg name="windows" direction="out" type="a{ta{sv}}" />
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
AnimationsEnabled:
|
||||||
|
@short_description: Whether the shell animations are enabled
|
||||||
|
|
||||||
|
By default determined by the org.gnome.desktop.interface enable-animations
|
||||||
|
gsetting, but may be overridden, e.g. if there is an active screen cast or
|
||||||
|
remote desktop session that asked for animations to be disabled.
|
||||||
|
|
||||||
|
Since: 2
|
||||||
|
-->
|
||||||
|
<property name="AnimationsEnabled" type="b" access="read"/>
|
||||||
|
|
||||||
|
<property name="version" type="u" access="read"/>
|
||||||
</interface>
|
</interface>
|
||||||
</node>
|
</node>
|
||||||
|
|||||||
@@ -9,12 +9,6 @@
|
|||||||
<file>dash-placeholder.svg</file>
|
<file>dash-placeholder.svg</file>
|
||||||
<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>key-enter.svg</file>
|
|
||||||
<file>key-hide.svg</file>
|
|
||||||
<file>key-layout.svg</file>
|
|
||||||
<file>key-shift.svg</file>
|
|
||||||
<file>key-shift-uppercase.svg</file>
|
|
||||||
<file>key-shift-latched-uppercase.svg</file>
|
|
||||||
<file alias="icons/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file>
|
<file alias="icons/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file>
|
||||||
<file>no-events.svg</file>
|
<file>no-events.svg</file>
|
||||||
<file>no-notifications.svg</file>
|
<file>no-notifications.svg</file>
|
||||||
@@ -25,6 +19,11 @@
|
|||||||
<file alias="icons/pointer-drag-symbolic.svg">pointer-drag-symbolic.svg</file>
|
<file alias="icons/pointer-drag-symbolic.svg">pointer-drag-symbolic.svg</file>
|
||||||
<file alias="icons/pointer-primary-click-symbolic.svg">pointer-primary-click-symbolic.svg</file>
|
<file alias="icons/pointer-primary-click-symbolic.svg">pointer-primary-click-symbolic.svg</file>
|
||||||
<file alias="icons/pointer-secondary-click-symbolic.svg">pointer-secondary-click-symbolic.svg</file>
|
<file alias="icons/pointer-secondary-click-symbolic.svg">pointer-secondary-click-symbolic.svg</file>
|
||||||
|
<file alias="icons/keyboard-caps-lock-filled-symbolic.svg">keyboard-caps-lock-filled-symbolic.svg</file>
|
||||||
|
<file alias="icons/keyboard-enter-symbolic.svg">keyboard-enter-symbolic.svg</file>
|
||||||
|
<file alias="icons/keyboard-hide-symbolic.svg">keyboard-hide-symbolic.svg</file>
|
||||||
|
<file alias="icons/keyboard-layout-filled-symbolic.svg">keyboard-layout-filled-symbolic.svg</file>
|
||||||
|
<file alias="icons/keyboard-shift-filled-symbolic.svg">keyboard-shift-filled-symbolic.svg</file>
|
||||||
<file>process-working.svg</file>
|
<file>process-working.svg</file>
|
||||||
<file>toggle-off.svg</file>
|
<file>toggle-off.svg</file>
|
||||||
<file>toggle-off-dark.svg</file>
|
<file>toggle-off-dark.svg</file>
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ Before=gnome-session-initialized.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=notify
|
Type=notify
|
||||||
ExecStart=@bindir@/gnome-shell
|
ExecStart=@bindir@/gnome-shell
|
||||||
|
|
||||||
|
# unset some environment variables that were set by the shell and won't work now that the shell is gone
|
||||||
|
ExecStopPost=-systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY
|
||||||
|
|
||||||
# Exit code 1 means we are probably *not* dealing with an extension failure
|
# Exit code 1 means we are probably *not* dealing with an extension failure
|
||||||
SuccessExitStatus=1
|
SuccessExitStatus=1
|
||||||
# On wayland we cannot restart
|
# On wayland we cannot restart
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128px" height="128px" viewBox="0 0 128 128" version="1.1">
|
|
||||||
<g id="surface43907">
|
|
||||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(10.196079%,37.254903%,70.588237%);fill-opacity:1;" d="M 58.847656 15.683594 L 49.074219 30.632812 C 46.921875 33.84375 42.480469 36.65625 39.378906 35.300781 C 34.488281 33.164062 35.859375 28.144531 31.28125 25.292969 C 28.070312 23.292969 16.839844 20.449219 14.804688 27.644531 C 13.761719 31.339844 14.480469 37.410156 17.398438 41.019531 C 20.164062 44.441406 26.8125 43.355469 28.898438 47.230469 C 30.34375 49.925781 29.738281 51.628906 28.347656 54.351562 C 26.796875 57.375 22.839844 61.359375 19.265625 64.585938 C 17.480469 66.199219 13.273438 65.710938 12.03125 66.730469 C 11.753906 66.949219 12.511719 70.285156 12.511719 70.285156 C 12.511719 70.285156 19.90625 82.707031 25.539062 87.285156 C 27.773438 89.101562 30.089844 91.808594 32.742188 90.695312 C 36.035156 89.316406 35.304688 82.289062 37.644531 79.597656 C 41.976562 74.605469 50.292969 73.761719 55.582031 78.144531 C 61.277344 82.867188 60.882812 89.472656 57.941406 94.683594 C 55.175781 99.578125 49.472656 98.453125 47.484375 102.28125 C 46.730469 103.730469 47.578125 105.664062 48.765625 106.785156 C 54.628906 112.335938 71.210938 118.988281 71.210938 118.988281 L 81.605469 102.429688 C 83.757812 99.222656 86.707031 97.742188 90.011719 98.46875 C 94.605469 99.472656 95.160156 105.945312 98.914062 108.785156 C 103.195312 112.019531 110.546875 111.765625 114.351562 105.753906 C 117.128906 101.371094 116.761719 97.449219 113.765625 91.414062 C 111.808594 87.476562 103.253906 89.382812 101.171875 85.507812 C 99.722656 82.8125 99.992188 80.214844 101.859375 77.796875 C 106.332031 72 117.003906 62.699219 117.003906 62.699219 C 117.003906 62.699219 117.144531 60.824219 116.246094 59.363281 C 115.15625 57.589844 107.472656 49.273438 104.65625 46.984375 C 102.421875 45.167969 99.6875 41.921875 97.03125 43.035156 C 93.742188 44.414062 94.417969 51.058594 92.082031 53.753906 C 86.5 60.179688 78.4375 59.101562 73.914062 54.648438 C 68.644531 49.453125 68.511719 44.488281 71.453125 39.277344 C 74.222656 34.382812 79.921875 35.3125 81.910156 31.484375 C 82.664062 30.035156 81.484375 27.070312 80.597656 25.390625 C 79.277344 22.890625 65.976562 18.902344 58.847656 15.683594 Z M 58.847656 15.683594 "/>
|
|
||||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(20.784314%,51.764709%,89.411765%);fill-opacity:1;" d="M 58.089844 12.347656 L 48.316406 27.300781 C 46.164062 30.507812 41.726562 33.320312 38.625 31.964844 C 33.734375 29.828125 35.101562 24.808594 30.523438 21.960938 C 27.3125 19.957031 19.445312 19.160156 15.683594 25.625 C 13.730469 28.976562 13.722656 34.074219 16.644531 37.6875 C 19.410156 41.105469 26.058594 40.023438 28.140625 43.898438 C 29.589844 46.589844 28.984375 48.292969 27.589844 51.015625 C 24.492188 57.066406 11.753906 66.949219 11.753906 66.949219 C 11.753906 66.949219 19.148438 79.371094 24.785156 83.949219 C 27.019531 85.765625 29.332031 88.472656 31.988281 87.363281 C 35.277344 85.984375 34.550781 78.957031 36.886719 76.261719 C 41.21875 71.273438 49.535156 70.425781 54.824219 74.8125 C 60.519531 79.53125 60.125 86.140625 57.183594 91.347656 C 54.417969 96.242188 48.714844 95.117188 46.726562 98.949219 C 45.976562 100.398438 46.824219 102.328125 48.011719 103.449219 C 53.871094 109 70.457031 115.652344 70.457031 115.652344 L 80.847656 99.097656 C 83 95.886719 85.953125 94.40625 89.257812 95.132812 C 93.847656 96.140625 94.402344 102.609375 98.160156 105.449219 C 102.4375 108.683594 109.789062 108.433594 113.597656 102.421875 C 116.375 98.035156 116.152344 94.195312 112.175781 89.128906 C 109.460938 85.667969 102.496094 86.046875 100.414062 82.171875 C 98.96875 79.480469 99.234375 76.878906 101.101562 74.460938 C 105.578125 68.667969 116.246094 59.363281 116.246094 59.363281 C 116.246094 59.363281 109.535156 48.226562 103.898438 43.648438 C 101.664062 41.835938 98.929688 38.585938 96.277344 39.699219 C 92.988281 41.078125 93.660156 47.726562 91.324219 50.417969 C 85.746094 56.84375 77.679688 55.769531 73.15625 51.3125 C 67.886719 46.121094 67.757812 41.152344 70.699219 35.945312 C 73.464844 31.046875 79.164062 31.980469 81.152344 28.148438 C 81.90625 26.699219 80.066406 24.476562 78.878906 23.355469 C 73.015625 17.804688 58.089844 12.347656 58.089844 12.347656 Z M 58.089844 12.347656 "/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 4.4 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M6.5 1C5.669 1 5 1.669 5 2.5V4H2c-.554 0-1 .446-1 1v3h1.5C3.331 8 4 8.669 4 9.5S3.331 11 2.5 11H1v3c0 .554.446 1 1 1h3v-1.5c0-.831.669-1.5 1.5-1.5s1.5.669 1.5 1.5V15h3c.554 0 1-.446 1-1v-3h1.5c.831 0 1.5-.669 1.5-1.5S14.331 8 13.5 8H12V5c0-.554-.446-1-1-1H8V2.5C8 1.669 7.331 1 6.5 1z" style="isolation:auto;mix-blend-mode:normal;marker:none" color="#000" overflow="visible" fill="#474747"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 469 B |
@@ -1,6 +1,5 @@
|
|||||||
desktop_files = [
|
desktop_files = [
|
||||||
'org.gnome.Shell.desktop',
|
'org.gnome.Shell.desktop',
|
||||||
'org.gnome.Extensions.desktop',
|
|
||||||
]
|
]
|
||||||
service_files = []
|
service_files = []
|
||||||
|
|
||||||
@@ -43,7 +42,6 @@ endforeach
|
|||||||
|
|
||||||
|
|
||||||
subdir('dbus-interfaces')
|
subdir('dbus-interfaces')
|
||||||
subdir('icons')
|
|
||||||
subdir('theme')
|
subdir('theme')
|
||||||
|
|
||||||
data_resources = [
|
data_resources = [
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
"w"
|
"w"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"e"
|
"e",
|
||||||
|
"é",
|
||||||
|
"ë"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"r"
|
"r"
|
||||||
@@ -21,30 +23,58 @@
|
|||||||
"t"
|
"t"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"y"
|
"y",
|
||||||
|
"ý",
|
||||||
|
"ÿ"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"u"
|
"u",
|
||||||
|
"ú",
|
||||||
|
"ü",
|
||||||
|
"û",
|
||||||
|
"ù",
|
||||||
|
"ū"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"i"
|
"i",
|
||||||
|
"í",
|
||||||
|
"ï"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"o"
|
"o",
|
||||||
|
"ó",
|
||||||
|
"ô",
|
||||||
|
"ò",
|
||||||
|
"õ",
|
||||||
|
"œ",
|
||||||
|
"ō"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"p"
|
"p"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"å"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
"a"
|
"a",
|
||||||
|
"á",
|
||||||
|
"ä",
|
||||||
|
"à",
|
||||||
|
"â",
|
||||||
|
"ã",
|
||||||
|
"ā"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"s"
|
"s",
|
||||||
|
"ß",
|
||||||
|
"ś",
|
||||||
|
"š"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"d"
|
"d",
|
||||||
|
"ð"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"f"
|
"f"
|
||||||
@@ -62,7 +92,16 @@
|
|||||||
"k"
|
"k"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"l"
|
"l",
|
||||||
|
"ł"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"ø",
|
||||||
|
"ö"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"æ",
|
||||||
|
"ä"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -82,7 +121,9 @@
|
|||||||
"b"
|
"b"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"n"
|
"n",
|
||||||
|
"ñ",
|
||||||
|
"ń"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"m"
|
"m"
|
||||||
@@ -121,7 +162,9 @@
|
|||||||
"W"
|
"W"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"E"
|
"E",
|
||||||
|
"É",
|
||||||
|
"Ë"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"R"
|
"R"
|
||||||
@@ -130,30 +173,58 @@
|
|||||||
"T"
|
"T"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"Y"
|
"Y",
|
||||||
|
"Ý",
|
||||||
|
"Ÿ"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"U"
|
"U",
|
||||||
|
"Ú",
|
||||||
|
"Ü",
|
||||||
|
"Û",
|
||||||
|
"Ù",
|
||||||
|
"Ū"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"I"
|
"I",
|
||||||
|
"Í",
|
||||||
|
"Ï"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"O"
|
"O",
|
||||||
|
"Ó",
|
||||||
|
"Ô",
|
||||||
|
"Ò",
|
||||||
|
"Õ",
|
||||||
|
"Œ",
|
||||||
|
"Ō"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"P"
|
"P"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Å"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
"A"
|
"A",
|
||||||
|
"Á",
|
||||||
|
"Ä",
|
||||||
|
"À",
|
||||||
|
"Â",
|
||||||
|
"Ã",
|
||||||
|
"Ā"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"S"
|
"S",
|
||||||
|
"SS",
|
||||||
|
"Ś",
|
||||||
|
"Š"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"D"
|
"D",
|
||||||
|
"Ð"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"F"
|
"F"
|
||||||
@@ -171,7 +242,16 @@
|
|||||||
"K"
|
"K"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"L"
|
"L",
|
||||||
|
"Ł"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Ø",
|
||||||
|
"Ö"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Æ",
|
||||||
|
"Ä"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -191,7 +271,9 @@
|
|||||||
"B"
|
"B"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"N"
|
"N",
|
||||||
|
"Ñ",
|
||||||
|
"Ń"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"M"
|
"M"
|
||||||
@@ -277,10 +359,10 @@
|
|||||||
"#"
|
"#"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"$",
|
"€",
|
||||||
"¢",
|
"¢",
|
||||||
"£",
|
"£",
|
||||||
"€",
|
"$",
|
||||||
"¥",
|
"¥",
|
||||||
"₱"
|
"₱"
|
||||||
],
|
],
|
||||||
@@ -419,13 +501,14 @@
|
|||||||
"£"
|
"£"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
"¥"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"$",
|
||||||
"¢"
|
"¢"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"€"
|
"¢"
|
||||||
],
|
|
||||||
[
|
|
||||||
"¥"
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"^",
|
"^",
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ $error_color: #ff8080;
|
|||||||
$success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));
|
$success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));
|
||||||
$destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%));
|
$destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%));
|
||||||
|
|
||||||
$osd_fg_color: $fg_color;
|
$osd_fg_color: #eeeeec;
|
||||||
$osd_text_color: if($variant == 'light', #000, #fff);
|
$osd_text_color: white;
|
||||||
$osd_bg_color: if($variant == 'light', rgba(255,255,255,0.9), transparentize(darken(desaturate(#3d3846, 100%), 12%),0.04));
|
$osd_bg_color: transparentize(darken(desaturate(#3d3846, 100%), 12%),0.04);
|
||||||
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
|
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
|
||||||
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
|
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
|
||||||
$osd_borders_color: if($variant == 'light', rgba(255,255,255,0.1), rgba(0,0,0,0.7));
|
$osd_borders_color: transparentize(black, 0.3);
|
||||||
$osd_outer_borders_color: if($variant == 'light', rgba(0,0,0,0.1), lighten($osd_bg_color, 7%));
|
$osd_outer_borders_color: transparentize(white, 0.84);
|
||||||
|
|
||||||
$shadow_color: if($variant == 'light', rgba(0,0,0,0.1), rgba(0,0,0,0.2));
|
$shadow_color: if($variant == 'light', rgba(0,0,0,0.1), rgba(0,0,0,0.2));
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ $base_font_size: 11;
|
|||||||
$text_shadow_color: if($variant == 'light', rgba(255,255,255,0.3), rgba(0,0,0,0.2));
|
$text_shadow_color: if($variant == 'light', rgba(255,255,255,0.3), rgba(0,0,0,0.2));
|
||||||
|
|
||||||
// icons
|
// icons
|
||||||
// $base_icon_size: 1.09em;
|
$base_icon_size: 1.09em;
|
||||||
$base_icon_size: 16px;
|
// $base_icon_size: 16px;
|
||||||
|
|
||||||
// Stage
|
// Stage
|
||||||
stage {
|
stage {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
color: $tc;
|
color: $tc;
|
||||||
text-shadow: 0 1px $text_shadow_color;
|
text-shadow: 0 1px $text_shadow_color;
|
||||||
icon-shadow: 0 1px $text_shadow_color;
|
icon-shadow: 0 1px $text_shadow_color;
|
||||||
box-shadow: inset 0 0 0 2px transparentize($selected_bg_color, 0.7);
|
box-shadow: inset 0 0 0 2px transparentize($selected_bg_color, 0.4);
|
||||||
//border-color: $selected_bg_color;
|
//border-color: $selected_bg_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,34 +5,47 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
/* WIDGETS */
|
/* WIDGETS */
|
||||||
@import 'widgets/app-grid';
|
|
||||||
@import 'widgets/app-switcher';
|
// Primary widgets
|
||||||
@import 'widgets/buttons';
|
@import 'widgets/base';
|
||||||
@import 'widgets/calendar';
|
|
||||||
@import 'widgets/check-box';
|
|
||||||
@import 'widgets/corner-ripple';
|
|
||||||
@import 'widgets/dash';
|
|
||||||
@import 'widgets/dialogs';
|
|
||||||
@import 'widgets/entries';
|
@import 'widgets/entries';
|
||||||
@import 'widgets/hotplug';
|
@import 'widgets/buttons';
|
||||||
@import 'widgets/ibus-popup';
|
@import 'widgets/check-box';
|
||||||
@import 'widgets/keyboard';
|
@import 'widgets/switches';
|
||||||
@import 'widgets/login-dialog';
|
@import 'widgets/slider';
|
||||||
@import 'widgets/looking-glass';
|
|
||||||
@import 'widgets/message-list';
|
|
||||||
@import 'widgets/notifications';
|
|
||||||
@import 'widgets/misc';
|
|
||||||
@import 'widgets/network-dialog';
|
|
||||||
@import 'widgets/osd';
|
|
||||||
@import 'widgets/overview';
|
|
||||||
@import 'widgets/panel';
|
|
||||||
@import 'widgets/popovers';
|
|
||||||
@import 'widgets/screen-shield';
|
|
||||||
@import 'widgets/scrollbars';
|
@import 'widgets/scrollbars';
|
||||||
|
// Popovers
|
||||||
|
@import 'widgets/popovers';
|
||||||
|
@import 'widgets/calendar';
|
||||||
|
@import 'widgets/message-list';
|
||||||
|
@import 'widgets/ibus-popup';
|
||||||
|
// Notifications
|
||||||
|
@import 'widgets/notifications';
|
||||||
|
@import 'widgets/hotplug';
|
||||||
|
// Dialogs
|
||||||
|
@import 'widgets/dialogs';
|
||||||
|
@import 'widgets/network-dialog';
|
||||||
|
// OSDs
|
||||||
|
@import 'widgets/osd';
|
||||||
|
@import 'widgets/switcher-popup';
|
||||||
|
@import 'widgets/workspace-switcher';
|
||||||
|
// Panel
|
||||||
|
@import 'widgets/panel';
|
||||||
|
@import 'widgets/corner-ripple';
|
||||||
|
// Overview
|
||||||
|
@import 'widgets/overview';
|
||||||
|
@import 'widgets/window-picker';
|
||||||
@import 'widgets/search-entry';
|
@import 'widgets/search-entry';
|
||||||
@import 'widgets/search-results';
|
@import 'widgets/search-results';
|
||||||
@import 'widgets/slider';
|
@import 'widgets/app-grid';
|
||||||
@import 'widgets/switches';
|
@import 'widgets/dash';
|
||||||
|
@import 'widgets/workspace-thumbnails';
|
||||||
|
// A11y / misc
|
||||||
|
@import 'widgets/a11y';
|
||||||
|
@import 'widgets/misc';
|
||||||
@import 'widgets/tiled-previews';
|
@import 'widgets/tiled-previews';
|
||||||
@import 'widgets/window-picker';
|
@import 'widgets/keyboard';
|
||||||
@import 'widgets/workspace-switcher';
|
@import 'widgets/looking-glass';
|
||||||
|
// Lock / login screens
|
||||||
|
@import 'widgets/login-dialog';
|
||||||
|
@import 'widgets/screen-shield';
|
||||||
|
|||||||
24
data/theme/gnome-shell-sass/widgets/_a11y.scss
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// Pointer location
|
||||||
|
.ripple-pointer-location {
|
||||||
|
width: $ripple_size;
|
||||||
|
height: $ripple_size;
|
||||||
|
border-radius: $ripple_size * 0.5; // radius equals the size of the box to give us the curve
|
||||||
|
background-color: lighten(transparentize($selected_bg_color, 0.7), 30%);
|
||||||
|
box-shadow: 0 0 2px 2px lighten($selected_bg_color, 20%);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pointer accessibility notifications
|
||||||
|
.pie-timer {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
-pie-border-width: 3px;
|
||||||
|
-pie-border-color: $selected_bg_color;
|
||||||
|
-pie-background-color: lighten(transparentize($selected_bg_color, 0.7), 40%);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Screen zoom/Magnifier
|
||||||
|
.magnifier-zoom-region {
|
||||||
|
border: 2px solid $selected_bg_color;
|
||||||
|
|
||||||
|
&.full-screen { border-width: 0; }
|
||||||
|
}
|
||||||
@@ -20,16 +20,6 @@ $app_icon_padding: 24px;
|
|||||||
|
|
||||||
$app_grid_fg_color: #fff;
|
$app_grid_fg_color: #fff;
|
||||||
|
|
||||||
// Outline for low res icons
|
|
||||||
.lowres-icon {
|
|
||||||
icon-shadow: 0 1px 2px rgba(0,0,0,0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dropshadow for large icons
|
|
||||||
.icon-dropshadow {
|
|
||||||
icon-shadow: 0 1px 2px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Icon tiles in the app grid
|
// Icon tiles in the app grid
|
||||||
.app-well-app,
|
.app-well-app,
|
||||||
%app-well-app {
|
%app-well-app {
|
||||||
@@ -45,9 +35,9 @@ $app_grid_fg_color: #fff;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* App Folders */
|
/* App Folders */
|
||||||
.app-folder {
|
.app-well-app.app-folder {
|
||||||
.overview-icon {
|
background-color: transparentize($osd_bg_color, 0.8);
|
||||||
}
|
border-radius: $base_border_radius + 4px; // same as %icon_tile
|
||||||
}
|
}
|
||||||
|
|
||||||
// expanded folder
|
// expanded folder
|
||||||
@@ -70,7 +60,7 @@ $app_grid_fg_color: #fff;
|
|||||||
& .folder-name-entry { width: 300px }
|
& .folder-name-entry { width: 300px }
|
||||||
|
|
||||||
/* FIXME: this is to keep the label in sync with the entry */
|
/* FIXME: this is to keep the label in sync with the entry */
|
||||||
& .folder-name-label { padding: 5px 7px }
|
& .folder-name-label { padding: 5px 7px; color: $osd_fg_color; }
|
||||||
|
|
||||||
& .edit-folder-button {
|
& .edit-folder-button {
|
||||||
@extend %button;
|
@extend %button;
|
||||||
@@ -83,10 +73,6 @@ $app_grid_fg_color: #fff;
|
|||||||
& > StIcon { icon-size: 16px }
|
& > StIcon { icon-size: 16px }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& StButton#vhandle,
|
|
||||||
& StButton#vhandle:hover,
|
|
||||||
& StButton#vhandle:active { background-color: transparent; }
|
|
||||||
}
|
}
|
||||||
.app-folder-dialog-container {
|
.app-folder-dialog-container {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
|||||||
18
data/theme/gnome-shell-sass/widgets/_base.scss
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Links
|
||||||
|
.shell-link {
|
||||||
|
color: $link_color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: lighten($link_color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Outline for low res icons
|
||||||
|
.lowres-icon {
|
||||||
|
icon-shadow: 0 1px 2px rgba(black, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dropshadow for large icons
|
||||||
|
.icon-dropshadow {
|
||||||
|
icon-shadow: 0 1px 2px rgba(black, 0.4);
|
||||||
|
}
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
/* Date/Time Menu */
|
/* Date/Time Menu */
|
||||||
|
|
||||||
.clock-display-box { spacing: $base_spacing; }
|
.clock-display-box {
|
||||||
|
spacing: $base_spacing / 2;
|
||||||
|
|
||||||
|
.clock {
|
||||||
|
padding-left: $base_padding;
|
||||||
|
padding-right: $base_padding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// overall menu
|
// overall menu
|
||||||
#calendarArea {
|
#calendarArea {
|
||||||
|
|||||||
@@ -13,12 +13,3 @@ $ripple_size: 50px;
|
|||||||
// just a simple change to the border radius position
|
// just a simple change to the border radius position
|
||||||
&:rtl { border-radius: 0 0 0 $ripple_size + 2px; }
|
&:rtl { border-radius: 0 0 0 $ripple_size + 2px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pointer location
|
|
||||||
.ripple-pointer-location {
|
|
||||||
width: $ripple_size;
|
|
||||||
height: $ripple_size;
|
|
||||||
border-radius: $ripple_size * 0.5; // radius equals the size of the box to give us the curve
|
|
||||||
background-color: lighten(transparentize($selected_bg_color, 0.7), 30%);
|
|
||||||
box-shadow: 0 0 2px 2px lighten($selected_bg_color, 20%);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
/* Modal Dialogs */
|
/* Modal Dialogs */
|
||||||
|
|
||||||
|
.headline {
|
||||||
|
@include fontsize($base_font_size + 1);
|
||||||
|
}
|
||||||
|
|
||||||
.modal-dialog {
|
.modal-dialog {
|
||||||
border-radius: $modal_radius;
|
border-radius: $modal_radius;
|
||||||
@extend %bubble_panel;
|
@extend %bubble_panel;
|
||||||
@@ -15,12 +19,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mount-dialog-subject {
|
|
||||||
@include fontsize($base_font_size + 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End Session Dialog */
|
/* End Session Dialog */
|
||||||
|
|
||||||
.end-session-dialog {
|
.end-session-dialog {
|
||||||
width: 30em;
|
width: 30em;
|
||||||
|
|
||||||
@@ -38,6 +37,11 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
|
|
||||||
|
&.leightweight {
|
||||||
|
font-size: 13pt;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.message-dialog-description { text-align: center; }
|
.message-dialog-description { text-align: center; }
|
||||||
}
|
}
|
||||||
@@ -162,8 +166,3 @@
|
|||||||
.audio-selection-device-icon {
|
.audio-selection-device-icon {
|
||||||
icon-size: $base_icon_size * 4;
|
icon-size: $base_icon_size * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Access Dialog */
|
|
||||||
.access-dialog {
|
|
||||||
spacing: 30px;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
// IBus Candidate Popup
|
// IBus Candidate Popup
|
||||||
|
|
||||||
|
.candidate-popup-boxpointer {
|
||||||
|
@extend .popup-menu-boxpointer;
|
||||||
|
}
|
||||||
|
|
||||||
.candidate-popup-content {
|
.candidate-popup-content {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
spacing: 0.3em;
|
spacing: 0.3em;
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ $default_key_bg_color: if($variant=='light', darken($osd_bg_color, 11%), lighten
|
|||||||
|
|
||||||
// non-character keys
|
// non-character keys
|
||||||
&.default-key {
|
&.default-key {
|
||||||
|
|
||||||
// size of the icon asset
|
|
||||||
background-size: 24px;
|
|
||||||
|
|
||||||
@include button(normal, $c:$default_key_bg_color);
|
@include button(normal, $c:$default_key_bg_color);
|
||||||
&:hover, &:checked {@include button(hover, $c: $default_key_bg_color);}
|
&:hover, &:checked {@include button(hover, $c: $default_key_bg_color);}
|
||||||
&:active { @include button(active, $c: $default_key_bg_color);}
|
&:active { @include button(active, $c: $default_key_bg_color);}
|
||||||
@@ -63,19 +59,14 @@ $default_key_bg_color: if($variant=='light', darken($osd_bg_color, 11%), lighten
|
|||||||
|
|
||||||
// enter key is suggested-action
|
// enter key is suggested-action
|
||||||
&.enter-key {
|
&.enter-key {
|
||||||
background-image: url("resource:///org/gnome/shell/theme/key-enter.svg");
|
|
||||||
|
|
||||||
@include button(normal, $c:$selected_bg_color, $tc:$selected_fg_color);
|
@include button(normal, $c:$selected_bg_color, $tc:$selected_fg_color);
|
||||||
&:hover, &:checked { @include button(hover, $c: lighten($selected_bg_color, 3%));}
|
&:hover, &:checked { @include button(hover, $c: lighten($selected_bg_color, 3%));}
|
||||||
&:active {@include button(active, $c: darken($selected_bg_color, 2%));}
|
&:active {@include button(active, $c: darken($selected_bg_color, 2%));}
|
||||||
}
|
}
|
||||||
|
|
||||||
// key assets
|
&.shift-key-uppercase { color: $selected_bg_color }
|
||||||
&.shift-key-lowercase {background-image: url("resource:///org/gnome/shell/theme/key-shift.svg");}
|
|
||||||
&.shift-key-uppercase {background-image: url("resource:///org/gnome/shell/theme/key-shift-uppercase.svg");}
|
StIcon { icon-size: 1.125em; }
|
||||||
&.shift-key-uppercase:latched {background-image: url("resource:///org/gnome/shell/theme/key-shift-latched-uppercase.svg");}
|
|
||||||
&.hide-key {background-image: url("resource:///org/gnome/shell/theme/key-hide.svg");}
|
|
||||||
&.layout-key {background-image: url("resource:///org/gnome/shell/theme/key-layout.svg");}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// long press on a key popup
|
// long press on a key popup
|
||||||
|
|||||||
@@ -68,12 +68,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cancel-button,
|
||||||
|
.switch-user-button,
|
||||||
|
.login-dialog-session-list-button {
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 99px;
|
||||||
|
width: $base_icon_size * 2;
|
||||||
|
height: $base_icon_size * 2;
|
||||||
|
border-color: transparentize($bg_color,0.7);
|
||||||
|
background-color: transparentize($bg_color,0.7);
|
||||||
|
|
||||||
|
StIcon { icon-size: $base_icon_size; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.caps-lock-warning-label,
|
||||||
|
.login-dialog-message-warning {
|
||||||
|
color: $osd_fg_color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-logo-bin { padding: 24px 0px; }
|
.login-dialog-logo-bin { padding: 24px 0px; }
|
||||||
.login-dialog-banner { color: darken($osd_fg_color,10%); }
|
.login-dialog-banner { color: darken($osd_fg_color,10%); }
|
||||||
.login-dialog-button-box { spacing: 5px; }
|
.login-dialog-button-box { width: 23em; spacing: 5px; }
|
||||||
.login-dialog-message-warning { color: $warning_color; }
|
.login-dialog-message { text-align: center; }
|
||||||
.login-dialog-message-hint { padding-top: 0; padding-bottom: 20px; }
|
.login-dialog-message-hint { padding-top: 0; padding-bottom: 20px; }
|
||||||
.login-dialog-user-selection-box { padding: 100px 0px; }
|
.login-dialog-user-selection-box { padding: 100px 0px; }
|
||||||
.login-dialog-not-listed-label {
|
.login-dialog-not-listed-label {
|
||||||
@@ -100,7 +118,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-user-list-item {
|
.login-dialog-user-list-item {
|
||||||
border-radius: 5px;
|
border-radius: $base_border_radius + 4px;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
color: darken($osd_fg_color,30%);
|
color: darken($osd_fg_color,30%);
|
||||||
&:ltr .user-widget { padding-right: 1em; }
|
&:ltr .user-widget { padding-right: 1em; }
|
||||||
@@ -113,20 +131,27 @@
|
|||||||
&:focus .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
|
&:focus .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-username,
|
|
||||||
.user-widget-label {
|
.user-widget-label {
|
||||||
color: $osd_fg_color;
|
color: $osd_fg_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-widget.horizontal .user-widget-label {
|
||||||
@include fontsize($base_font_size + 2);
|
@include fontsize($base_font_size + 2);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
|
||||||
|
|
||||||
.user-widget-label {
|
|
||||||
&:ltr { padding-left: 14px; }
|
&:ltr { padding-left: 14px; }
|
||||||
&:rtl { padding-right: 14px; }
|
&:rtl { padding-right: 14px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-widget.vertical .user-widget-label {
|
||||||
|
@include fontsize($base_font_size + 5);
|
||||||
|
text-align: center;
|
||||||
|
font-weight: normal;
|
||||||
|
padding-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.login-dialog-prompt-layout {
|
.login-dialog-prompt-layout {
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
@@ -134,18 +159,12 @@
|
|||||||
width: 23em;
|
width: 23em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-dialog-prompt-entry {
|
||||||
|
height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.login-dialog-prompt-label {
|
.login-dialog-prompt-label {
|
||||||
color: darken($osd_fg_color, 20%);
|
color: darken($osd_fg_color, 20%);
|
||||||
@include fontsize($base_font_size + 1);
|
@include fontsize($base_font_size + 1);
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list-button StIcon {
|
|
||||||
icon-size: 1.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-dialog-session-list-button {
|
|
||||||
color: darken($osd_fg_color,30%);
|
|
||||||
&:hover,&:focus { color: $osd_fg_color; }
|
|
||||||
&:active { color: darken($osd_fg_color, 50%); }
|
|
||||||
}
|
|
||||||
@@ -5,14 +5,14 @@
|
|||||||
background-color: $osd_bg_color;
|
background-color: $osd_bg_color;
|
||||||
spacing: $base_spacing;
|
spacing: $base_spacing;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
border: 2px solid transparentize($osd_fg_color, 0.8);
|
border: 1px solid transparentize($osd_fg_color, 0.8);
|
||||||
border-top-width:0;
|
border-radius: $base_border_radius;
|
||||||
border-radius: 0 0 $base_border_radius $base_border_radius;
|
color: $osd_fg_color;
|
||||||
|
|
||||||
& > #Toolbar {
|
& > #Toolbar {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: $base_border_radius;
|
border-radius: $base_border_radius;
|
||||||
background-color: darken($osd_bg_color, 10%);
|
background-color: $osd_bg_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.labels { spacing: $base_spacing; }
|
.labels { spacing: $base_spacing; }
|
||||||
@@ -20,19 +20,18 @@
|
|||||||
-natural-hpadding: $base_padding * 2;
|
-natural-hpadding: $base_padding * 2;
|
||||||
-minimum-hpadding: 6px;
|
-minimum-hpadding: 6px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: $fg_color;
|
color: darken($osd_fg_color, 15%);
|
||||||
transition-duration: 100ms;
|
transition-duration: 100ms;
|
||||||
padding-left: .3em;
|
padding-left: .3em;
|
||||||
padding-right: .3em;
|
padding-right: .3em;
|
||||||
|
border-bottom-width: 2px;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: white;
|
color: $osd_fg_color;
|
||||||
text-shadow: black 0px 2px 2px;
|
|
||||||
}
|
}
|
||||||
&:selected {
|
&:selected {
|
||||||
border-bottom-width: 2px;
|
border-bottom-width: 2px;
|
||||||
border-color: lighten($selected_bg_color,5%);
|
box-shadow: inset 0 -2px 0 0 lighten($selected_bg_color, 5%);
|
||||||
color: white;
|
color: $osd_fg_color;
|
||||||
text-shadow: black 0px 2px 2px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StBoxLayout#EvalBox { padding: 4px; spacing: $base_spacing; }
|
StBoxLayout#EvalBox { padding: 4px; spacing: $base_spacing; }
|
||||||
@@ -41,12 +40,17 @@
|
|||||||
|
|
||||||
.lg-dialog {
|
.lg-dialog {
|
||||||
StEntry {
|
StEntry {
|
||||||
selection-background-color: #bbbbbb;
|
background-color: transparentize(lighten($osd_bg_color, 5%), 0.4);
|
||||||
selected-color: $osd_bg_color;
|
color: $osd_fg_color;
|
||||||
|
border-color: transparentize($osd_fg_color, 0.8);
|
||||||
|
min-height: 22px;
|
||||||
|
selection-background-color: $selected_bg_color;
|
||||||
|
selected-color: $selected_fg_color;
|
||||||
}
|
}
|
||||||
.shell-link {
|
.shell-link {
|
||||||
color: #999999;
|
color: $link_color;
|
||||||
&:hover { color: #dddddd; }
|
&:hover { color: lighten($link_color, 10%); }
|
||||||
|
&:active { color: darken($link_color, 10%); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +64,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lg-obj-inspector-button {
|
.lg-obj-inspector-button {
|
||||||
border: 1px solid gray;
|
border: 1px solid $osd_borders_color;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
border-radius: $base_border_radius;
|
border-radius: $base_border_radius;
|
||||||
&:hover { border: 1px solid #ffffff; }
|
&:hover { border: 1px solid #ffffff; }
|
||||||
@@ -75,7 +79,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lg-extension {
|
.lg-extension {
|
||||||
border: 1px solid $osd_borders_color;
|
border: 1px solid lighten($osd_borders_color, 5%);
|
||||||
|
background-color: lighten($osd_bg_color, 5%);
|
||||||
border-radius: $base_border_radius;
|
border-radius: $base_border_radius;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
margin: ($base_margin * 2) ($base_margin * 4) 0;
|
margin: ($base_margin * 2) ($base_margin * 4) 0;
|
||||||
// NOTE: remove the padding if notification_bubble could remove margin for drop shadow
|
// NOTE: remove the padding if notification_bubble could remove margin for drop shadow
|
||||||
padding: $base_margin;
|
padding: $base_margin;
|
||||||
spacing: $base_spacing;
|
spacing: $base_spacing * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// message bubbles
|
// message bubbles
|
||||||
@@ -90,6 +90,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// URLs in messages
|
||||||
|
.url-highlighter {
|
||||||
|
link-color: $link_color;
|
||||||
|
}
|
||||||
|
|
||||||
/* Media Controls */
|
/* Media Controls */
|
||||||
.message-media-control {
|
.message-media-control {
|
||||||
padding: $base_padding * 2 $base_padding * 4;
|
padding: $base_padding * 2 $base_padding * 4;
|
||||||
|
|||||||
@@ -1,32 +1,9 @@
|
|||||||
// Links/URLs
|
|
||||||
.shell-link {
|
|
||||||
color: $link_color;
|
|
||||||
&:hover { color: lighten($link_color,10%); }
|
|
||||||
}
|
|
||||||
|
|
||||||
.url-highlighter { link-color: $link_color; }
|
|
||||||
|
|
||||||
// Rubberband for select-area screenshots
|
// Rubberband for select-area screenshots
|
||||||
.select-area-rubberband {
|
.select-area-rubberband {
|
||||||
background-color: transparentize($selected_bg_color,0.7);
|
background-color: transparentize($selected_bg_color,0.7);
|
||||||
border: 1px solid $selected_bg_color;
|
border: 1px solid $selected_bg_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pointer accessibility notifications
|
|
||||||
.pie-timer {
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
-pie-border-width: 3px;
|
|
||||||
-pie-border-color: $selected_bg_color;
|
|
||||||
-pie-background-color: lighten(transparentize($selected_bg_color, 0.7), 40%);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Screen zoom/Magnifier
|
|
||||||
.magnifier-zoom-region {
|
|
||||||
border: 2px solid $selected_bg_color;
|
|
||||||
&.full-screen { border-width: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// User icon
|
// User icon
|
||||||
.user-icon {
|
.user-icon {
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
@@ -35,22 +12,33 @@
|
|||||||
&:hover {
|
&:hover {
|
||||||
color: lighten($osd_fg_color,30%);
|
color: lighten($osd_fg_color,30%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& StIcon {
|
||||||
|
background-color: transparentize($osd_fg_color,0.95);
|
||||||
|
border-radius: 99px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Input Source Switcher
|
.user-widget.vertical .user-icon {
|
||||||
.input-source-switcher-symbol {
|
icon-size: $base_icon_size * 6; // 128px
|
||||||
font-size: 34pt;
|
|
||||||
width: 96px;
|
& StIcon {
|
||||||
height: 96px;
|
padding: $base_padding * 3 + 2px; // 20px
|
||||||
|
padding-top: $base_padding * 3; // 18 px
|
||||||
|
padding-bottom: $base_padding * 3 + 4px; // 22px
|
||||||
|
width: $base_icon_size * 5.5; height: $base_icon_size * 5.5; // 88px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Window cycler highlight
|
.user-widget.horizontal .user-icon {
|
||||||
.cycler-highlight {
|
icon-size: $base_icon_size * 4; // 64px
|
||||||
border: 5px solid $selected_bg_color;
|
|
||||||
|
& StIcon {
|
||||||
|
padding: $base_padding * 2 ; // 12px
|
||||||
|
width: $base_icon_size * 2.5; height: $base_icon_size * 2.5; // 40px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Text
|
|
||||||
.headline { @include fontsize($base_font_size + 1); }
|
|
||||||
.lightbox { background-color: black; }
|
.lightbox { background-color: black; }
|
||||||
.flashspot { background-color: white; }
|
.flashspot { background-color: white; }
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
// a.k.a. the panel
|
// a.k.a. the panel
|
||||||
|
|
||||||
$panel_corner_radius: $base_border_radius+1;
|
$panel_corner_radius: $base_border_radius+1;
|
||||||
$panel_bg_color: if($variant == 'light', rgba(0,0,0,0.9), #000);
|
$panel_bg_color: #000;
|
||||||
$panel_fg_color: if($variant == 'light', darken($fg_color, 15%), darken($fg_color, 10%));
|
$panel_fg_color: #ccc;
|
||||||
$panel_height: 1.86em;
|
$panel_height: 1.86em;
|
||||||
|
|
||||||
|
|
||||||
@@ -54,9 +54,6 @@ $panel_height: 1.86em;
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:active, &:overview, &:focus, &:checked {
|
&:active, &:overview, &:focus, &:checked {
|
||||||
background-color: $panel_bg_color; // Trick due to St limitations. It needs a background to draw a box-shadow
|
|
||||||
box-shadow: inset 0 -2px 0 0 lighten($selected_bg_color,5%);
|
|
||||||
|
|
||||||
color: lighten($panel_fg_color, 20%);
|
color: lighten($panel_fg_color, 20%);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +79,26 @@ $panel_height: 1.86em;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel-button {
|
||||||
|
&:active, &:overview, &:focus, &:checked {
|
||||||
|
// Trick due to St limitations. It needs a background to draw a box-shadow
|
||||||
|
background-color: rgba(0, 0, 0, 0.01);
|
||||||
|
box-shadow: inset 0 -2px 0 0 lighten($selected_bg_color,5%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-button.clock-display {
|
||||||
|
// Move highlight from .panel-button to .clock
|
||||||
|
&:active, &:overview, &:focus, &:checked {
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
.clock {
|
||||||
|
background-color: rgba(0, 0, 0, 0.01);
|
||||||
|
box-shadow: inset 0 -2px 0 0 lighten($selected_bg_color,5%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.panel-status-indicators-box,
|
.panel-status-indicators-box,
|
||||||
.panel-status-menu-box {
|
.panel-status-menu-box {
|
||||||
spacing: 2px;
|
spacing: 2px;
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
$popover_arrow_height: 12px;
|
$popover_arrow_height: 12px;
|
||||||
|
|
||||||
//.the popover itself
|
//.the popover itself
|
||||||
.popup-menu-boxpointer,
|
.popup-menu-boxpointer {
|
||||||
.candidate-popup-boxpointer {
|
|
||||||
-arrow-border-radius: $base_border_radius+4;
|
-arrow-border-radius: $base_border_radius+4;
|
||||||
-arrow-background-color: $bg_color;
|
-arrow-background-color: $bg_color;
|
||||||
-arrow-border-width: 1px;
|
-arrow-border-width: 1px;
|
||||||
@@ -83,10 +82,20 @@ $popover_arrow_height: 12px;
|
|||||||
|
|
||||||
// separator
|
// separator
|
||||||
.popup-separator-menu-item {
|
.popup-separator-menu-item {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.popup-separator-menu-item-separator {
|
||||||
//-margin-horizontal: 24px;
|
//-margin-horizontal: 24px;
|
||||||
height: 1px; //not really the whole box
|
height: 1px; //not really the whole box
|
||||||
margin: 6px 64px;
|
margin: 6px 64px;
|
||||||
background-color: lighten($borders_color, 2%);
|
background-color: lighten($borders_color, 2%);
|
||||||
|
.popup-sub-menu & { //submenu separators
|
||||||
|
margin: 0 64px 0 32px;
|
||||||
|
@if $variant == 'dark' {
|
||||||
|
background-color: lighten($bg_color,10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// desktop background menu
|
// desktop background menu
|
||||||
|
|||||||
@@ -4,12 +4,13 @@
|
|||||||
color: white;
|
color: white;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
spacing: 24px;
|
||||||
padding-bottom: 2.5em;
|
padding-bottom: 2.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unlock-dialog-clock-time {
|
.unlock-dialog-clock-time {
|
||||||
font-size: 64pt;
|
font-size: 64pt;
|
||||||
padding-bottom: 24px;
|
padding-top: 42px;
|
||||||
font-feature-settings: "tnum";
|
font-feature-settings: "tnum";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,6 +19,11 @@
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unlock-dialog-clock-hint {
|
||||||
|
font-weight: normal;
|
||||||
|
padding-top: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
.unlock-dialog-notifications-container {
|
.unlock-dialog-notifications-container {
|
||||||
margin: 12px 0;
|
margin: 12px 0;
|
||||||
spacing: 6px;
|
spacing: 6px;
|
||||||
@@ -31,10 +37,10 @@
|
|||||||
.notification,
|
.notification,
|
||||||
.unlock-dialog-notification-source {
|
.unlock-dialog-notification-source {
|
||||||
padding: 12px 6px;
|
padding: 12px 6px;
|
||||||
border: 1px solid $osd_outer_borders_color;
|
border: none;
|
||||||
background-color: transparentize($osd_bg_color,0.5);
|
background-color: transparentize($osd_bg_color,0.7);
|
||||||
color: $osd_fg_color;
|
color: $osd_fg_color;
|
||||||
border-radius: 4px;
|
border-radius: $modal_radius;
|
||||||
|
|
||||||
&.critical { background-color: transparentize($osd_bg_color,0.1) }
|
&.critical { background-color: transparentize($osd_bg_color,0.1) }
|
||||||
}
|
}
|
||||||
@@ -46,7 +52,12 @@
|
|||||||
|
|
||||||
.unlock-dialog-notification-count-text {
|
.unlock-dialog-notification-count-text {
|
||||||
weight: bold;
|
weight: bold;
|
||||||
padding: 0px 12px;
|
padding: 0 6px;
|
||||||
|
color: $osd_bg_color;
|
||||||
|
background-color: transparentize($osd_fg_color, 0.7);
|
||||||
|
border-radius: 99px;
|
||||||
|
margin-right: 12px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-background { //just the shadow, really
|
.screen-shield-background { //just the shadow, really
|
||||||
|
|||||||
@@ -15,13 +15,11 @@
|
|||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
|
|
||||||
&:outlined {
|
&:outlined {
|
||||||
border: 1px solid darken($borders_color,5%);
|
background-color: transparentize($osd_fg_color, 0.7);
|
||||||
background-color: transparentize($osd_fg_color, 0.9);
|
|
||||||
box-shadow: inset 0 2px 2px 0 rgba(0,0,0,0.4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:selected {
|
&:selected {
|
||||||
background-color: transparentize($osd_fg_color, 0.9);
|
background-color: transparentize($osd_fg_color, 0.7);
|
||||||
color: $osd_fg_color;
|
color: $osd_fg_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,3 +51,15 @@
|
|||||||
color: $fg_color;
|
color: $fg_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Input Source Switcher
|
||||||
|
.input-source-switcher-symbol {
|
||||||
|
font-size: 34pt;
|
||||||
|
width: 96px;
|
||||||
|
height: 96px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Window cycler highlight
|
||||||
|
.cycler-highlight {
|
||||||
|
border: 5px solid $selected_bg_color;
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/* Window Picker */
|
/* Window Picker */
|
||||||
|
|
||||||
$window_picker_spacing: $base_spacing * 8; // 48px
|
$window_picker_spacing: $base_spacing * 2; // 16px
|
||||||
$window_picker_padding: $base_padding * 10; // 60px
|
$window_picker_padding: $base_padding * 2; // 16px
|
||||||
|
|
||||||
$window_thumbnail_border_color:transparentize($selected_fg_color, 0.65);
|
$window_thumbnail_border_color:transparentize($selected_fg_color, 0.65);
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ws-switcher-box {
|
.ws-switcher-box {
|
||||||
// background: transparent;
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
background-size: 32px;
|
background-size: 32px;
|
||||||
@@ -29,41 +28,9 @@
|
|||||||
.ws-switcher-active-down,
|
.ws-switcher-active-down,
|
||||||
.ws-switcher-active-left,
|
.ws-switcher-active-left,
|
||||||
.ws-switcher-active-right {
|
.ws-switcher-active-right {
|
||||||
|
height: 52px;
|
||||||
background-color: $selected_bg_color;
|
background-color: $selected_bg_color;
|
||||||
border: 1px solid if($variant=='light', darken($selected_bg_color, 8%), lighten($selected_bg_color, 5%));
|
border: 1px solid if($variant=='light', darken($selected_bg_color, 8%), lighten($selected_bg_color, 5%));
|
||||||
border-radius: $base_border_radius + 3px;
|
border-radius: $base_border_radius + 3px;
|
||||||
color: $selected_fg_color;
|
color: $selected_fg_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Workspace pager */
|
|
||||||
|
|
||||||
// thumbnails in overview
|
|
||||||
.workspace-thumbnails {
|
|
||||||
@extend %overview_panel;
|
|
||||||
visible-width: 32px; //amount visible before hover
|
|
||||||
spacing: $base_spacing;
|
|
||||||
padding: $base_padding;
|
|
||||||
|
|
||||||
border-radius: $modal_radius 0 0 $modal_radius;
|
|
||||||
border-right-width: 0;
|
|
||||||
|
|
||||||
&:rtl {
|
|
||||||
border-radius: 0 $modal_radius $modal_radius 0;
|
|
||||||
border-left-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// drag and drop indicator
|
|
||||||
.placeholder {
|
|
||||||
background-image: url("resource:///org/gnome/shell/theme/dash-placeholder.svg");
|
|
||||||
background-size: contain;
|
|
||||||
height: 24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// selected indicator
|
|
||||||
.workspace-thumbnail-indicator {
|
|
||||||
border: 3px solid $selected_bg_color;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 0px;
|
|
||||||
// background-color: transparentize($selected_bg_color, 0.9);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* Workspace pager */
|
||||||
|
|
||||||
|
// thumbnails in overview
|
||||||
|
.workspace-thumbnails {
|
||||||
|
@extend %overview_panel;
|
||||||
|
visible-width: 32px; //amount visible before hover
|
||||||
|
spacing: $base_spacing;
|
||||||
|
padding: $base_padding;
|
||||||
|
|
||||||
|
border-radius: $modal_radius 0 0 $modal_radius;
|
||||||
|
border-right-width: 0;
|
||||||
|
|
||||||
|
&:rtl {
|
||||||
|
border-radius: 0 $modal_radius $modal_radius 0;
|
||||||
|
border-left-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// drag and drop indicator
|
||||||
|
.placeholder {
|
||||||
|
background-image: url("resource:///org/gnome/shell/theme/dash-placeholder.svg");
|
||||||
|
background-size: contain;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// selected indicator
|
||||||
|
.workspace-thumbnail-indicator {
|
||||||
|
border: 3px solid $selected_bg_color;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0px;
|
||||||
|
// background-color: transparentize($selected_bg_color, 0.9);
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" class="keyboard-key" width="24" height="24">
|
|
||||||
<path overflow="visible" font-weight="400" style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none" d="M10 23H8.5c-.398 0-.796-.14-1.079-.422L.345 15.5l7.078-7.078C7.704 8.14 8.102 8 8.5 8H10v1.5c0 .398-.14.796-.422 1.079L4.657 15.5l4.921 4.922c.282.282.422.68.422 1.078z" color="#000" font-family="Bitstream Vera Sans" fill="#fff"/>
|
|
||||||
<path overflow="visible" d="M22 1.5v9a5 5 0 01-5 5H4" style="marker:none" color="#000" fill="none" stroke="#fff" stroke-width="3"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 676 B |
@@ -1,3 +0,0 @@
|
|||||||
<svg class="keyboard-key" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
||||||
<path d="M12 20.875L.562 9.438C.171 9.046 0 8.51 0 8V6h2c.511 0 1.046.17 1.438.563L12 15.125l8.563-8.562C20.953 6.17 21.488 6 22 6h2v2c0 .511-.17 1.046-.563 1.438z" fill="#e5e5e5"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 278 B |
@@ -1,5 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" class="keyboard-key" width="24" height="24">
|
|
||||||
<path d="M4.5 2v21" fill="#e5e5e5" fill-rule="evenodd" stroke="#e5e5e5" stroke-width="3"/>
|
|
||||||
<path d="M4 12h6l2 4h8V6h-6l-2-4H4z" fill="none" stroke="#e5e5e5" stroke-width="2" stroke-linejoin="round"/>
|
|
||||||
<path d="M4 12h6l2 4h8V6h-6l-2-4H4z" fill="#e5e5e5" fill-rule="evenodd"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 378 B |
@@ -1,3 +0,0 @@
|
|||||||
<svg class="keyboard-key" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
||||||
<path style="marker:none" d="M12 0L2 12h6v6h8v-6h6zM8 21v3h8v-3z" color="#000" overflow="visible" fill="#3584e4"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 211 B |
@@ -1,3 +0,0 @@
|
|||||||
<svg class="keyboard-key" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
||||||
<path d="M8 22v-8H2L12 2l10 12h-6v8z" style="marker:none" color="#000" overflow="visible" fill="#3584e4"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 203 B |
@@ -1,3 +0,0 @@
|
|||||||
<svg class="keyboard-key" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
|
|
||||||
<path d="M8 22v-8H2L12 2l10 12h-6v8z" style="marker:none" color="#000" overflow="visible" fill="#bebebe"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 203 B |
6
data/theme/keyboard-caps-lock-filled-symbolic.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||||
|
<g fill="#2e3436">
|
||||||
|
<path d="M6 8H2.937l5.126-5.781L13.186 8H10v2H6z" style="marker:none" color="#000" overflow="visible"/>
|
||||||
|
<path d="M6 11h4v2H6z" style="marker:none"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 268 B |
6
data/theme/keyboard-enter-symbolic.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||||
|
<g font-weight="400" fill="#2e3436">
|
||||||
|
<path d="M11.994 3v4.004c.002.666-.183.72-.445.852-.262.13-.555.144-.555.144H4v2h6.994s.71.014 1.45-.355c.738-.37 1.552-1.313 1.55-2.645V3z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1;marker:none" color="#000" font-family="sans-serif" overflow="visible"/>
|
||||||
|
<path d="M6 12v-1c0-.257-.13-.528-.313-.719l-1.28-1.303 1.28-1.26C5.87 7.529 6 7.258 6 7V6H5c-.31 0-.552.09-.75.281L1.594 8.978l2.656 2.74c.198.192.44.282.75.282z" style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none" color="#bebebe" font-family="Bitstream Vera Sans" overflow="visible"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
7
data/theme/keyboard-hide-symbolic.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||||
|
<g color="#000" fill="#2e3436">
|
||||||
|
<path d="M4.707 5.293L3.293 6.707 8 11.414l4.707-4.707-1.414-1.414L8 8.586z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1;marker:none" font-weight="400" font-family="sans-serif" overflow="visible"/>
|
||||||
|
<path d="M12 6V5h1v1zM3 6V5h1v1z" style="marker:none" overflow="visible"/>
|
||||||
|
<path d="M3 6c0-.554.446-1 1-1s1 .446 1 1-.446 1-1 1-1-.446-1-1zM11 6c0-.554.446-1 1-1s1 .446 1 1-.446 1-1 1-1-.446-1-1z" style="marker:none" overflow="visible"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 990 B |
7
data/theme/keyboard-layout-filled-symbolic.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||||
|
<g fill="#2e3436" fill-rule="evenodd">
|
||||||
|
<path d="M2 1v14h2V1z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/>
|
||||||
|
<path d="M3 1a1 1 0 00-1 1v6a1 1 0 001 1h3.383l.722 1.447A1 1 0 008 11h5a1 1 0 001-1V4a1 1 0 00-1-1H9.617l-.722-1.447A1 1 0 008 1zm1 2h3.383l.722 1.447A1 1 0 009 5h3v4H8.617l-.722-1.447A1 1 0 007 7H4z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/>
|
||||||
|
<path d="M3 8h4l1 2h5V4H9L8 2H3z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
3
data/theme/keyboard-shift-filled-symbolic.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
|
||||||
|
<path d="M6 13V9H2.937l5.126-5.781L13.186 9H10v4z" style="marker:none" color="#000" overflow="visible" fill="#2e3436"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 195 B |
@@ -6,8 +6,9 @@ theme_sources = files([
|
|||||||
'gnome-shell-sass/_drawing.scss',
|
'gnome-shell-sass/_drawing.scss',
|
||||||
'gnome-shell-sass/_high-contrast-colors.scss',
|
'gnome-shell-sass/_high-contrast-colors.scss',
|
||||||
'gnome-shell-sass/_widgets.scss',
|
'gnome-shell-sass/_widgets.scss',
|
||||||
|
'gnome-shell-sass/widgets/_a11y.scss',
|
||||||
'gnome-shell-sass/widgets/_app-grid.scss',
|
'gnome-shell-sass/widgets/_app-grid.scss',
|
||||||
'gnome-shell-sass/widgets/_app-switcher.scss',
|
'gnome-shell-sass/widgets/_base.scss',
|
||||||
'gnome-shell-sass/widgets/_buttons.scss',
|
'gnome-shell-sass/widgets/_buttons.scss',
|
||||||
'gnome-shell-sass/widgets/_calendar.scss',
|
'gnome-shell-sass/widgets/_calendar.scss',
|
||||||
'gnome-shell-sass/widgets/_check-box.scss',
|
'gnome-shell-sass/widgets/_check-box.scss',
|
||||||
@@ -33,10 +34,12 @@ theme_sources = files([
|
|||||||
'gnome-shell-sass/widgets/_search-entry.scss',
|
'gnome-shell-sass/widgets/_search-entry.scss',
|
||||||
'gnome-shell-sass/widgets/_search-results.scss',
|
'gnome-shell-sass/widgets/_search-results.scss',
|
||||||
'gnome-shell-sass/widgets/_slider.scss',
|
'gnome-shell-sass/widgets/_slider.scss',
|
||||||
|
'gnome-shell-sass/widgets/_switcher-popup.scss',
|
||||||
'gnome-shell-sass/widgets/_switches.scss',
|
'gnome-shell-sass/widgets/_switches.scss',
|
||||||
'gnome-shell-sass/widgets/_tiled-previews.scss',
|
'gnome-shell-sass/widgets/_tiled-previews.scss',
|
||||||
'gnome-shell-sass/widgets/_window-picker.scss',
|
'gnome-shell-sass/widgets/_window-picker.scss',
|
||||||
'gnome-shell-sass/widgets/_workspace-switcher.scss'
|
'gnome-shell-sass/widgets/_workspace-switcher.scss',
|
||||||
|
'gnome-shell-sass/widgets/_workspace-thumbnails.scss'
|
||||||
])
|
])
|
||||||
|
|
||||||
styles = [
|
styles = [
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="46" height="22"><defs><linearGradient id="a"><stop offset="0" stop-color="#39393a"/><stop offset="1" stop-color="#302f30"/></linearGradient><linearGradient xlink:href="#a" id="b" x1="53" y1="294.429" x2="53" y2="309.804" gradientUnits="userSpaceOnUse" gradientTransform="translate(-42.76)"/></defs><g transform="translate(0 -291.18)" stroke-width="1.085"><rect style="marker:none" width="44.446" height="20.911" x=".625" y="291.715" rx="10.455" ry="10.073" fill="#323233" stroke="#272728"/><rect ry="10.455" rx="10.455" y="291.715" x=".543" height="20.911" width="21.143" style="marker:none" fill="url(#b)" stroke="#151515"/></g></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="46" height="22"><defs><linearGradient id="a"><stop offset="0" stop-color="#39393a"/><stop offset="1" stop-color="#302f30"/></linearGradient><linearGradient xlink:href="#a" id="b" x1="53" y1="294.429" x2="53" y2="309.804" gradientUnits="userSpaceOnUse" gradientTransform="translate(-42.76)"/></defs><g transform="translate(0 -291.18)" stroke-width="1.085" stroke="#151515"><rect style="marker:none" width="44.446" height="20.911" x=".625" y="291.715" rx="10.455" ry="10.073" fill="#282828"/><rect ry="10.455" rx="10.455" y="291.715" x=".543" height="20.911" width="21.143" style="marker:none" fill="url(#b)"/></g></svg>
|
||||||
|
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 708 B |
@@ -1,10 +1,9 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
CLDR_LAYOUTS_TARBALL="http://www.unicode.org/Public/cldr/latest/keyboards.zip"
|
CLDR_LAYOUTS_TARBALL="http://www.unicode.org/Public/cldr/latest/keyboards.zip"
|
||||||
CLDR2JSON_GIT="git://repo.or.cz/cldr2json.git"
|
|
||||||
|
|
||||||
WORKDIR=".osk-layout-workbench"
|
WORKDIR=".osk-layout-workbench"
|
||||||
CLDR2JSON="$WORKDIR/cldr2json/cldr2json.py"
|
CLDR2JSON="cldr2json/cldr2json.py"
|
||||||
SRCDIR="$WORKDIR/keyboards/android"
|
SRCDIR="$WORKDIR/keyboards/android"
|
||||||
DESTDIR="osk-layouts"
|
DESTDIR="osk-layouts"
|
||||||
GRESOURCE_FILE="gnome-shell-osk-layouts.gresource.xml"
|
GRESOURCE_FILE="gnome-shell-osk-layouts.gresource.xml"
|
||||||
@@ -20,7 +19,6 @@ mkdir -p "osk-layouts"
|
|||||||
# Download stuff on the work dir
|
# Download stuff on the work dir
|
||||||
pushd $WORKDIR
|
pushd $WORKDIR
|
||||||
gio copy $CLDR_LAYOUTS_TARBALL .
|
gio copy $CLDR_LAYOUTS_TARBALL .
|
||||||
git clone $CLDR2JSON_GIT
|
|
||||||
unzip keyboards.zip
|
unzip keyboards.zip
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|||||||
5
js/dbusServices/dbus-service.in
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
imports.package.start({
|
||||||
|
name: '@PACKAGE_NAME@',
|
||||||
|
prefix: '@prefix@',
|
||||||
|
libdir: '@libdir@',
|
||||||
|
});
|
||||||
3
js/dbusServices/dbus-service.service.in
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[D-BUS Service]
|
||||||
|
Name=@service@
|
||||||
|
Exec=@gjs@ @pkgdatadir@/@service@
|
||||||
177
js/dbusServices/dbusService.js
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
/* exported DBusService, ServiceImplementation */
|
||||||
|
|
||||||
|
const { Gio, GLib } = imports.gi;
|
||||||
|
|
||||||
|
const Signals = imports.signals;
|
||||||
|
|
||||||
|
const IDLE_SHUTDOWN_TIME = 2; // s
|
||||||
|
|
||||||
|
var ServiceImplementation = class {
|
||||||
|
constructor(info, objectPath) {
|
||||||
|
this._objectPath = objectPath;
|
||||||
|
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(info, this);
|
||||||
|
|
||||||
|
this._injectTracking('return_dbus_error');
|
||||||
|
this._injectTracking('return_error_literal');
|
||||||
|
this._injectTracking('return_gerror');
|
||||||
|
this._injectTracking('return_value');
|
||||||
|
this._injectTracking('return_value_with_unix_fd_list');
|
||||||
|
|
||||||
|
this._senders = new Map();
|
||||||
|
this._holdCount = 0;
|
||||||
|
|
||||||
|
this._hasSignals = this._dbusImpl.get_info().signals.length > 0;
|
||||||
|
this._shutdownTimeoutId = 0;
|
||||||
|
|
||||||
|
// subclasses may override this to disable automatic shutdown
|
||||||
|
this._autoShutdown = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// subclasses may override this to own additional names
|
||||||
|
register() {
|
||||||
|
}
|
||||||
|
|
||||||
|
export() {
|
||||||
|
this._dbusImpl.export(Gio.DBus.session, this._objectPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
unexport() {
|
||||||
|
this._dbusImpl.unexport();
|
||||||
|
}
|
||||||
|
|
||||||
|
hold() {
|
||||||
|
this._holdCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
release() {
|
||||||
|
if (this._holdCount === 0) {
|
||||||
|
logError(new Error('Unmatched call to release()'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._holdCount--;
|
||||||
|
|
||||||
|
if (this._holdCount === 0)
|
||||||
|
this._queueShutdownCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _handleError:
|
||||||
|
* @param {Gio.DBusMethodInvocation}
|
||||||
|
* @param {Error}
|
||||||
|
*
|
||||||
|
* Complete @invocation with an appropriate error if @error is set;
|
||||||
|
* useful for implementing early returns from method implementations.
|
||||||
|
*
|
||||||
|
* @returns {bool} - true if @invocation was completed
|
||||||
|
*/
|
||||||
|
|
||||||
|
_handleError(invocation, error) {
|
||||||
|
if (error === null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (error instanceof GLib.Error) {
|
||||||
|
invocation.return_gerror(error);
|
||||||
|
} else {
|
||||||
|
let name = error.name;
|
||||||
|
if (!name.includes('.')) // likely a normal JS error
|
||||||
|
name = `org.gnome.gjs.JSError.${name}`;
|
||||||
|
invocation.return_dbus_error(name, error.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
_maybeShutdown() {
|
||||||
|
if (!this._autoShutdown)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (this._holdCount > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.emit('shutdown');
|
||||||
|
}
|
||||||
|
|
||||||
|
_queueShutdownCheck() {
|
||||||
|
if (this._shutdownTimeoutId)
|
||||||
|
GLib.source_remove(this._shutdownTimeoutId);
|
||||||
|
|
||||||
|
this._shutdownTimeoutId = GLib.timeout_add_seconds(
|
||||||
|
GLib.PRIORITY_DEFAULT, IDLE_SHUTDOWN_TIME,
|
||||||
|
() => {
|
||||||
|
this._shutdownTimeoutId = 0;
|
||||||
|
this._maybeShutdown();
|
||||||
|
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
_trackSender(sender) {
|
||||||
|
if (this._senders.has(sender))
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.hold();
|
||||||
|
this._senders.set(sender,
|
||||||
|
this._dbusImpl.get_connection().watch_name(
|
||||||
|
sender,
|
||||||
|
Gio.BusNameWatcherFlags.NONE,
|
||||||
|
null,
|
||||||
|
() => this._untrackSender(sender)));
|
||||||
|
}
|
||||||
|
|
||||||
|
_untrackSender(sender) {
|
||||||
|
const id = this._senders.get(sender);
|
||||||
|
|
||||||
|
if (id)
|
||||||
|
this._dbusImpl.get_connection().unwatch_name(id);
|
||||||
|
|
||||||
|
if (this._senders.delete(sender))
|
||||||
|
this.release();
|
||||||
|
}
|
||||||
|
|
||||||
|
_injectTracking(methodName) {
|
||||||
|
const { prototype } = Gio.DBusMethodInvocation;
|
||||||
|
const origMethod = prototype[methodName];
|
||||||
|
const that = this;
|
||||||
|
|
||||||
|
prototype[methodName] = function (...args) {
|
||||||
|
origMethod.apply(this, args);
|
||||||
|
|
||||||
|
if (that._hasSignals)
|
||||||
|
that._trackSender(this.get_sender());
|
||||||
|
|
||||||
|
that._queueShutdownCheck();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Signals.addSignalMethods(ServiceImplementation.prototype);
|
||||||
|
|
||||||
|
var DBusService = class {
|
||||||
|
constructor(name, service) {
|
||||||
|
this._name = name;
|
||||||
|
this._service = service;
|
||||||
|
this._loop = new GLib.MainLoop(null, false);
|
||||||
|
|
||||||
|
this._service.connect('shutdown', () => this._loop.quit());
|
||||||
|
}
|
||||||
|
|
||||||
|
run() {
|
||||||
|
// Bail out when not running under gnome-shell
|
||||||
|
Gio.DBus.watch_name(Gio.BusType.SESSION,
|
||||||
|
'org.gnome.Shell',
|
||||||
|
Gio.BusNameWatcherFlags.NONE,
|
||||||
|
null,
|
||||||
|
() => this._loop.quit());
|
||||||
|
|
||||||
|
this._service.register();
|
||||||
|
|
||||||
|
Gio.DBus.own_name(Gio.BusType.SESSION,
|
||||||
|
this._name,
|
||||||
|
Gio.BusNameOwnerFlags.REPLACE,
|
||||||
|
() => this._service.export(),
|
||||||
|
null,
|
||||||
|
() => this._loop.quit());
|
||||||
|
|
||||||
|
this._loop.run();
|
||||||
|
}
|
||||||
|
};
|
||||||
2
js/dbusServices/extensions/css/application.css
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.expander-frame > * { border-top-width: 0; }
|
||||||
|
.expander-toolbar { border: 0 solid @borders; border-top-width: 1px; }
|
||||||
274
js/dbusServices/extensions/extensionsService.js
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
/* exported ExtensionsService */
|
||||||
|
|
||||||
|
const { Gdk, Gio, GLib, GObject, Gtk, Shew } = imports.gi;
|
||||||
|
|
||||||
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
|
|
||||||
|
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||||
|
const { ServiceImplementation } = imports.dbusService;
|
||||||
|
|
||||||
|
const ExtensionsIface = loadInterfaceXML('org.gnome.Shell.Extensions');
|
||||||
|
const ExtensionsProxy = Gio.DBusProxy.makeProxyWrapper(ExtensionsIface);
|
||||||
|
|
||||||
|
var ExtensionsService = class extends ServiceImplementation {
|
||||||
|
constructor() {
|
||||||
|
super(ExtensionsIface, '/org/gnome/Shell/Extensions');
|
||||||
|
|
||||||
|
this._proxy = new ExtensionsProxy(Gio.DBus.session,
|
||||||
|
'org.gnome.Shell', '/org/gnome/Shell');
|
||||||
|
|
||||||
|
this._proxy.connectSignal('ExtensionStateChanged',
|
||||||
|
(proxy, sender, params) => {
|
||||||
|
this._dbusImpl.emit_signal('ExtensionStateChanged',
|
||||||
|
new GLib.Variant('(sa{sv})', params));
|
||||||
|
});
|
||||||
|
|
||||||
|
this._proxy.connect('g-properties-changed', () => {
|
||||||
|
this._dbusImpl.emit_property_changed('UserExtensionsEnabled',
|
||||||
|
new GLib.Variant('b', this._proxy.UserExtensionsEnabled));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
get ShellVersion() {
|
||||||
|
return this._proxy.ShellVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
get UserExtensionsEnabled() {
|
||||||
|
return this._proxy.UserExtensionsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
set UserExtensionsEnabled(enable) {
|
||||||
|
this._proxy.UserExtensionsEnabled = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListExtensionsAsync(params, invocation) {
|
||||||
|
this._proxy.ListExtensionsRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(a{sa{sv}})', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
GetExtensionInfoAsync(params, invocation) {
|
||||||
|
this._proxy.GetExtensionInfoRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(a{sv})', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
GetExtensionErrorsAsync(params, invocation) {
|
||||||
|
this._proxy.GetExtensionErrorsRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(as)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
InstallRemoteExtensionAsync(params, invocation) {
|
||||||
|
this._proxy.InstallRemoteExtensionRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(s)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
UninstallExtensionAsync(params, invocation) {
|
||||||
|
this._proxy.UninstallExtensionRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(b)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
EnableExtensionAsync(params, invocation) {
|
||||||
|
this._proxy.EnableExtensionRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(b)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
DisableExtensionAsync(params, invocation) {
|
||||||
|
this._proxy.DisableExtensionRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(b)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
LaunchExtensionPrefsAsync([uuid], invocation) {
|
||||||
|
this.OpenExtensionPrefsAsync([uuid, '', {}], invocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
OpenExtensionPrefsAsync(params, invocation) {
|
||||||
|
const [uuid, parentWindow, options] = params;
|
||||||
|
|
||||||
|
this._proxy.GetExtensionInfoRemote(uuid, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
const [serialized] = res;
|
||||||
|
const extension = ExtensionUtils.deserializeExtension(serialized);
|
||||||
|
|
||||||
|
const window = new ExtensionPrefsDialog(extension);
|
||||||
|
window.realize();
|
||||||
|
|
||||||
|
let externalWindow = null;
|
||||||
|
|
||||||
|
if (parentWindow)
|
||||||
|
externalWindow = Shew.ExternalWindow.new_from_handle(parentWindow);
|
||||||
|
|
||||||
|
if (externalWindow)
|
||||||
|
externalWindow.set_parent_of(window.window);
|
||||||
|
|
||||||
|
if (options.modal)
|
||||||
|
window.modal = options.modal.get_boolean();
|
||||||
|
|
||||||
|
window.connect('destroy', () => this.release());
|
||||||
|
this.hold();
|
||||||
|
|
||||||
|
window.show();
|
||||||
|
|
||||||
|
invocation.return_value(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckForUpdatesAsync(params, invocation) {
|
||||||
|
this._proxy.CheckForUpdatesRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var ExtensionPrefsDialog = GObject.registerClass({
|
||||||
|
GTypeName: 'ExtensionPrefsDialog',
|
||||||
|
Template: 'resource:///org/gnome/Shell/Extensions/ui/extension-prefs-dialog.ui',
|
||||||
|
InternalChildren: [
|
||||||
|
'headerBar',
|
||||||
|
'stack',
|
||||||
|
'expander',
|
||||||
|
'expanderArrow',
|
||||||
|
'revealer',
|
||||||
|
'errorView',
|
||||||
|
],
|
||||||
|
}, class ExtensionPrefsDialog extends Gtk.Window {
|
||||||
|
_init(extension) {
|
||||||
|
super._init();
|
||||||
|
|
||||||
|
this._uuid = extension.uuid;
|
||||||
|
this._url = extension.metadata.url || '';
|
||||||
|
|
||||||
|
this._headerBar.title = extension.metadata.name;
|
||||||
|
|
||||||
|
this._actionGroup = new Gio.SimpleActionGroup();
|
||||||
|
this.insert_action_group('win', this._actionGroup);
|
||||||
|
|
||||||
|
this._initActions();
|
||||||
|
this._addCustomStylesheet();
|
||||||
|
|
||||||
|
this._gesture = new Gtk.GestureMultiPress({
|
||||||
|
widget: this._expander,
|
||||||
|
button: 0,
|
||||||
|
exclusive: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
this._gesture.connect('released', (gesture, nPress) => {
|
||||||
|
if (nPress === 1)
|
||||||
|
this._revealer.reveal_child = !this._revealer.reveal_child;
|
||||||
|
});
|
||||||
|
|
||||||
|
this._revealer.connect('notify::reveal-child', () => {
|
||||||
|
this._expanderArrow.icon_name = this._revealer.reveal_child
|
||||||
|
? 'pan-down-symbolic'
|
||||||
|
: 'pan-end-symbolic';
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
ExtensionUtils.installImporter(extension);
|
||||||
|
|
||||||
|
// give extension prefs access to their own extension object
|
||||||
|
ExtensionUtils.getCurrentExtension = () => extension;
|
||||||
|
|
||||||
|
const prefsModule = extension.imports.prefs;
|
||||||
|
prefsModule.init(extension.metadata);
|
||||||
|
|
||||||
|
const widget = prefsModule.buildPrefsWidget();
|
||||||
|
this._stack.add(widget);
|
||||||
|
this._stack.visible_child = widget;
|
||||||
|
} catch (e) {
|
||||||
|
this._setError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_setError(exc) {
|
||||||
|
this._errorView.buffer.text = `${exc}\n\nStack trace:\n`;
|
||||||
|
// Indent stack trace.
|
||||||
|
this._errorView.buffer.text +=
|
||||||
|
exc.stack.split('\n').map(line => ` ${line}`).join('\n');
|
||||||
|
|
||||||
|
// markdown for pasting in gitlab issues
|
||||||
|
let lines = [
|
||||||
|
`The settings of extension ${this._uuid} had an error:`,
|
||||||
|
'```',
|
||||||
|
`${exc}`,
|
||||||
|
'```',
|
||||||
|
'',
|
||||||
|
'Stack trace:',
|
||||||
|
'```',
|
||||||
|
exc.stack.replace(/\n$/, ''), // stack without trailing newline
|
||||||
|
'```',
|
||||||
|
'',
|
||||||
|
];
|
||||||
|
this._errorMarkdown = lines.join('\n');
|
||||||
|
this._actionGroup.lookup('copy-error').enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
_initActions() {
|
||||||
|
let action;
|
||||||
|
|
||||||
|
action = new Gio.SimpleAction({
|
||||||
|
name: 'copy-error',
|
||||||
|
enabled: false,
|
||||||
|
});
|
||||||
|
action.connect('activate', () => {
|
||||||
|
const clipboard = Gtk.Clipboard.get_default(this.get_display());
|
||||||
|
clipboard.set_text(this._errorMarkdown, -1);
|
||||||
|
});
|
||||||
|
this._actionGroup.add_action(action);
|
||||||
|
|
||||||
|
action = new Gio.SimpleAction({
|
||||||
|
name: 'show-url',
|
||||||
|
enabled: this._url !== '',
|
||||||
|
});
|
||||||
|
action.connect('activate', () => {
|
||||||
|
Gio.AppInfo.launch_default_for_uri(this._url,
|
||||||
|
this.get_display().get_app_launch_context());
|
||||||
|
});
|
||||||
|
this._actionGroup.add_action(action);
|
||||||
|
}
|
||||||
|
|
||||||
|
_addCustomStylesheet() {
|
||||||
|
let provider = new Gtk.CssProvider();
|
||||||
|
let uri = 'resource:///org/gnome/Shell/Extensions/css/application.css';
|
||||||
|
try {
|
||||||
|
provider.load_from_file(Gio.File.new_for_uri(uri));
|
||||||
|
} catch (e) {
|
||||||
|
logError(e, 'Failed to add application style');
|
||||||
|
}
|
||||||
|
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),
|
||||||
|
provider,
|
||||||
|
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||||
|
}
|
||||||
|
});
|
||||||
20
js/dbusServices/extensions/main.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/* exported main */
|
||||||
|
|
||||||
|
imports.gi.versions.Gdk = '3.0';
|
||||||
|
imports.gi.versions.Gtk = '3.0';
|
||||||
|
|
||||||
|
const { Gtk } = imports.gi;
|
||||||
|
const pkg = imports.package;
|
||||||
|
|
||||||
|
const { DBusService } = imports.dbusService;
|
||||||
|
const { ExtensionsService } = imports.extensionsService;
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
Gtk.init(null);
|
||||||
|
pkg.initFormat();
|
||||||
|
|
||||||
|
const service = new DBusService(
|
||||||
|
'org.gnome.Shell.Extensions',
|
||||||
|
new ExtensionsService());
|
||||||
|
service.run();
|
||||||
|
}
|
||||||
197
js/dbusServices/extensions/ui/extension-prefs-dialog.ui
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.22.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.20"/>
|
||||||
|
<template class="ExtensionPrefsDialog" parent="GtkWindow">
|
||||||
|
<property name="default_width">600</property>
|
||||||
|
<property name="default_height">400</property>
|
||||||
|
<child type="titlebar">
|
||||||
|
<object class="GtkHeaderBar" id="headerBar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="show_close_button">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkStack" id="stack">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="hscrollbar_policy">never</property>
|
||||||
|
<property name="propagate_natural_height">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkViewport">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="margin">100</property>
|
||||||
|
<property name="margin_bottom">60</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Something’s gone wrong</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="scale" value="1.44"/> <!-- x-large -->
|
||||||
|
</attributes>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">We’re very sorry, but there’s been a problem: the settings for this extension can’t be displayed. We recommend that you report the issue to the extension authors.</property>
|
||||||
|
<property name="justify">center</property>
|
||||||
|
<property name="wrap">True</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="margin_top">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="expander">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEventBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="margin">12</property>
|
||||||
|
<property name="spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage" id="expanderArrow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="icon_name">pan-end-symbolic</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Technical Details</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkRevealer" id="revealer">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<style>
|
||||||
|
<class name="expander-frame"/>
|
||||||
|
</style>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="errorView">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="monospace">True</property>
|
||||||
|
<property name="editable">False</property>
|
||||||
|
<property name="wrap_mode">word</property>
|
||||||
|
<property name="left_margin">12</property>
|
||||||
|
<property name="right_margin">12</property>
|
||||||
|
<property name="top_margin">12</property>
|
||||||
|
<property name="bottom_margin">12</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<style>
|
||||||
|
<class name="expander-toolbar"/>
|
||||||
|
</style>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolItem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="action_name">win.copy-error</property>
|
||||||
|
<style>
|
||||||
|
<class name="flat"/>
|
||||||
|
<class name="image-button"/>
|
||||||
|
</style>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="icon_name">edit-copy-symbolic</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparatorToolItem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="draw">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkToolItem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="homeButton">
|
||||||
|
<property name="visible"
|
||||||
|
bind-source="homeButton"
|
||||||
|
bind-property="sensitive"
|
||||||
|
bind-flags="sync-create"/>
|
||||||
|
<property name="label" translatable="yes">Homepage</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Visit extension homepage</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
<property name="action_name">win.show-url</property>
|
||||||
|
<style>
|
||||||
|
<class name="flat"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</template>
|
||||||
|
</interface>
|
||||||
42
js/dbusServices/meson.build
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
launcherconf = configuration_data()
|
||||||
|
launcherconf.set('PACKAGE_NAME', meson.project_name())
|
||||||
|
launcherconf.set('prefix', prefix)
|
||||||
|
launcherconf.set('libdir', libdir)
|
||||||
|
|
||||||
|
dbus_services = {
|
||||||
|
'org.gnome.Shell.Extensions': 'extensions',
|
||||||
|
'org.gnome.Shell.Notifications': 'notifications',
|
||||||
|
}
|
||||||
|
|
||||||
|
config_dir = '@0@/..'.format(meson.current_build_dir())
|
||||||
|
|
||||||
|
foreach service, dir : dbus_services
|
||||||
|
configure_file(
|
||||||
|
input: 'dbus-service.in',
|
||||||
|
output: service,
|
||||||
|
configuration: launcherconf,
|
||||||
|
install_dir: pkgdatadir,
|
||||||
|
)
|
||||||
|
|
||||||
|
serviceconf = configuration_data()
|
||||||
|
serviceconf.set('service', service)
|
||||||
|
serviceconf.set('gjs', gjs.path())
|
||||||
|
serviceconf.set('pkgdatadir', pkgdatadir)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
input: 'dbus-service.service.in',
|
||||||
|
output: service + '.service',
|
||||||
|
configuration: serviceconf,
|
||||||
|
install_dir: servicedir
|
||||||
|
)
|
||||||
|
|
||||||
|
gnome.compile_resources(
|
||||||
|
service + '.src',
|
||||||
|
service + '.src.gresource.xml',
|
||||||
|
dependencies: [config_js],
|
||||||
|
source_dir: ['.', '..', dir, config_dir],
|
||||||
|
gresource_bundle: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: pkgdatadir
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
11
js/dbusServices/notifications/main.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/* exported main */
|
||||||
|
|
||||||
|
const { DBusService } = imports.dbusService;
|
||||||
|
const { NotificationDaemon } = imports.notificationDaemon;
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
const service = new DBusService(
|
||||||
|
'org.gnome.Shell.Notifications',
|
||||||
|
new NotificationDaemon());
|
||||||
|
service.run();
|
||||||
|
}
|
||||||
80
js/dbusServices/notifications/notificationDaemon.js
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
/* exported NotificationDaemon */
|
||||||
|
|
||||||
|
const { Gio, GLib } = imports.gi;
|
||||||
|
|
||||||
|
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||||
|
const { ServiceImplementation } = imports.dbusService;
|
||||||
|
|
||||||
|
const NotificationsIface = loadInterfaceXML('org.freedesktop.Notifications');
|
||||||
|
const NotificationsProxy = Gio.DBusProxy.makeProxyWrapper(NotificationsIface);
|
||||||
|
|
||||||
|
var NotificationDaemon = class extends ServiceImplementation {
|
||||||
|
constructor() {
|
||||||
|
super(NotificationsIface, '/org/freedesktop/Notifications');
|
||||||
|
|
||||||
|
this._autoShutdown = false;
|
||||||
|
|
||||||
|
this._proxy = new NotificationsProxy(Gio.DBus.session,
|
||||||
|
'org.gnome.Shell',
|
||||||
|
'/org/freedesktop/Notifications',
|
||||||
|
(proxy, error) => {
|
||||||
|
if (error)
|
||||||
|
log(error.message);
|
||||||
|
});
|
||||||
|
|
||||||
|
this._proxy.connectSignal('ActionInvoked',
|
||||||
|
(proxy, sender, params) => {
|
||||||
|
this._dbusImpl.emit_signal('ActionInvoked',
|
||||||
|
new GLib.Variant('(us)', params));
|
||||||
|
});
|
||||||
|
this._proxy.connectSignal('NotificationClosed',
|
||||||
|
(proxy, sender, params) => {
|
||||||
|
this._dbusImpl.emit_signal('NotificationClosed',
|
||||||
|
new GLib.Variant('(uu)', params));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
register() {
|
||||||
|
Gio.DBus.session.own_name(
|
||||||
|
'org.freedesktop.Notifications',
|
||||||
|
Gio.BusNameOwnerFlags.REPLACE,
|
||||||
|
null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
NotifyAsync(params, invocation) {
|
||||||
|
this._proxy.NotifyRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(u)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseNotificationAsync(params, invocation) {
|
||||||
|
this._proxy.CloseNotificationRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
GetCapabilitiesAsync(params, invocation) {
|
||||||
|
this._proxy.GetCapabilitiesRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(as)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
GetServerInformationAsync(params, invocation) {
|
||||||
|
this._proxy.GetServerInformationRemote(...params, (res, error) => {
|
||||||
|
if (this._handleError(invocation, error))
|
||||||
|
return;
|
||||||
|
|
||||||
|
invocation.return_value(new GLib.Variant('(ssss)', res));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
18
js/dbusServices/org.gnome.Shell.Extensions.src.gresource.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/org/gnome/Shell/Extensions/js">
|
||||||
|
<file>main.js</file>
|
||||||
|
<file>extensionsService.js</file>
|
||||||
|
<file>dbusService.js</file>
|
||||||
|
|
||||||
|
<file>misc/config.js</file>
|
||||||
|
<file>misc/extensionUtils.js</file>
|
||||||
|
<file>misc/fileUtils.js</file>
|
||||||
|
<file>misc/params.js</file>
|
||||||
|
</gresource>
|
||||||
|
|
||||||
|
<gresource prefix="/org/gnome/Shell/Extensions">
|
||||||
|
<file>css/application.css</file>
|
||||||
|
<file>ui/extension-prefs-dialog.ui</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/org/gnome/Shell/Notifications/js">
|
||||||
|
<file>main.js</file>
|
||||||
|
<file>notificationDaemon.js</file>
|
||||||
|
<file>dbusService.js</file>
|
||||||
|
|
||||||
|
<file>misc/config.js</file>
|
||||||
|
<file>misc/fileUtils.js</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
||||||
@@ -47,12 +47,15 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
super._init({
|
super._init({
|
||||||
style_class: 'login-dialog-prompt-layout',
|
style_class: 'login-dialog-prompt-layout',
|
||||||
vertical: true,
|
vertical: true,
|
||||||
|
x_expand: true,
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
||||||
|
|
||||||
this._gdmClient = gdmClient;
|
this._gdmClient = gdmClient;
|
||||||
this._mode = mode;
|
this._mode = mode;
|
||||||
|
this._defaultButtonWellActor = null;
|
||||||
|
|
||||||
let reauthenticationOnly;
|
let reauthenticationOnly;
|
||||||
if (this._mode == AuthPromptMode.UNLOCK_ONLY)
|
if (this._mode == AuthPromptMode.UNLOCK_ONLY)
|
||||||
@@ -71,15 +74,6 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
this._userVerifier.connect('ovirt-user-authenticated', this._onOVirtUserAuthenticated.bind(this));
|
this._userVerifier.connect('ovirt-user-authenticated', this._onOVirtUserAuthenticated.bind(this));
|
||||||
this.smartcardDetected = this._userVerifier.smartcardDetected;
|
this.smartcardDetected = this._userVerifier.smartcardDetected;
|
||||||
|
|
||||||
this.connect('next', () => {
|
|
||||||
this.updateSensitivity(false);
|
|
||||||
this.startSpinning();
|
|
||||||
if (this._queryingService)
|
|
||||||
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
|
||||||
else
|
|
||||||
this._preemptiveAnswer = this._entry.text;
|
|
||||||
});
|
|
||||||
|
|
||||||
this.connect('destroy', this._onDestroy.bind(this));
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._userWell = new St.Bin({
|
this._userWell = new St.Bin({
|
||||||
@@ -87,19 +81,75 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
y_expand: true,
|
y_expand: true,
|
||||||
});
|
});
|
||||||
this.add_child(this._userWell);
|
this.add_child(this._userWell);
|
||||||
this._label = new St.Label({
|
|
||||||
style_class: 'login-dialog-prompt-label',
|
|
||||||
x_expand: false,
|
|
||||||
y_expand: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.add_child(this._label);
|
this._hasCancelButton = this._mode === AuthPromptMode.UNLOCK_OR_LOG_IN;
|
||||||
|
|
||||||
|
this._initEntryRow();
|
||||||
|
|
||||||
|
let capsLockPlaceholder = new St.Label();
|
||||||
|
this.add_child(capsLockPlaceholder);
|
||||||
|
|
||||||
|
this._capsLockWarningLabel = new ShellEntry.CapsLockWarning({
|
||||||
|
x_expand: true,
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
this.add_child(this._capsLockWarningLabel);
|
||||||
|
|
||||||
|
this._capsLockWarningLabel.bind_property('visible',
|
||||||
|
capsLockPlaceholder, 'visible',
|
||||||
|
GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN);
|
||||||
|
|
||||||
|
this._message = new St.Label({
|
||||||
|
opacity: 0,
|
||||||
|
styleClass: 'login-dialog-message',
|
||||||
|
y_expand: true,
|
||||||
|
x_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.START,
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
this._message.clutter_text.line_wrap = true;
|
||||||
|
this._message.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||||
|
this.add_child(this._message);
|
||||||
|
}
|
||||||
|
|
||||||
|
_onDestroy() {
|
||||||
|
this._userVerifier.destroy();
|
||||||
|
this._userVerifier = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
vfunc_key_press_event(keyPressEvent) {
|
||||||
|
if (keyPressEvent.keyval == Clutter.KEY_Escape)
|
||||||
|
this.cancel();
|
||||||
|
return super.vfunc_key_press_event(keyPressEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
_initEntryRow() {
|
||||||
|
this._mainBox = new St.BoxLayout({
|
||||||
|
style_class: 'login-dialog-button-box',
|
||||||
|
vertical: false,
|
||||||
|
});
|
||||||
|
this.add_child(this._mainBox);
|
||||||
|
|
||||||
|
this.cancelButton = new St.Button({
|
||||||
|
style_class: 'modal-dialog-button button cancel-button',
|
||||||
|
accessible_name: _('Cancel'),
|
||||||
|
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
||||||
|
reactive: this._hasCancelButton,
|
||||||
|
can_focus: this._hasCancelButton,
|
||||||
|
x_align: Clutter.ActorAlign.START,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
|
||||||
|
});
|
||||||
|
if (this._hasCancelButton)
|
||||||
|
this.cancelButton.connect('clicked', () => this.cancel());
|
||||||
|
else
|
||||||
|
this.cancelButton.opacity = 0;
|
||||||
|
this._mainBox.add_child(this.cancelButton);
|
||||||
|
|
||||||
let entryParams = {
|
let entryParams = {
|
||||||
style_class: 'login-dialog-prompt-entry',
|
style_class: 'login-dialog-prompt-entry',
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
x_expand: false,
|
x_expand: true,
|
||||||
y_expand: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this._entry = null;
|
this._entry = null;
|
||||||
@@ -111,104 +161,57 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
ShellEntry.addContextMenu(this._passwordEntry, { actionMode: Shell.ActionMode.NONE });
|
ShellEntry.addContextMenu(this._passwordEntry, { actionMode: Shell.ActionMode.NONE });
|
||||||
|
|
||||||
this._entry = this._passwordEntry;
|
this._entry = this._passwordEntry;
|
||||||
this.add_child(this._entry);
|
this._mainBox.add_child(this._entry);
|
||||||
|
|
||||||
this._entry.grab_key_focus();
|
this._entry.grab_key_focus();
|
||||||
|
|
||||||
this._capsLockWarningLabel = new ShellEntry.CapsLockWarning();
|
[this._textEntry, this._passwordEntry].forEach(entry => {
|
||||||
this.add_child(this._capsLockWarningLabel);
|
entry.clutter_text.connect('text-changed', () => {
|
||||||
|
if (!this._userVerifier.hasPendingMessages)
|
||||||
this._message = new St.Label({
|
this._fadeOutMessage();
|
||||||
opacity: 0,
|
|
||||||
styleClass: 'login-dialog-message',
|
|
||||||
x_expand: false,
|
|
||||||
y_expand: true,
|
|
||||||
y_align: Clutter.ActorAlign.START,
|
|
||||||
});
|
});
|
||||||
this._message.clutter_text.line_wrap = true;
|
|
||||||
this._message.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
||||||
this.add_child(this._message);
|
|
||||||
|
|
||||||
this._buttonBox = new St.BoxLayout({
|
entry.clutter_text.connect('activate', () => {
|
||||||
style_class: 'login-dialog-button-box',
|
let shouldSpin = entry === this._passwordEntry;
|
||||||
vertical: false,
|
if (entry.reactive)
|
||||||
y_align: Clutter.ActorAlign.END,
|
this._activateNext(shouldSpin);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
this.add_child(this._buttonBox);
|
|
||||||
|
|
||||||
this._defaultButtonWell = new St.Widget({
|
this._defaultButtonWell = new St.Widget({
|
||||||
layout_manager: new Clutter.BinLayout(),
|
layout_manager: new Clutter.BinLayout(),
|
||||||
x_align: Clutter.ActorAlign.END,
|
x_align: Clutter.ActorAlign.END,
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
});
|
});
|
||||||
|
this._defaultButtonWell.add_constraint(new Clutter.BindConstraint({
|
||||||
this._initButtons();
|
source: this.cancelButton,
|
||||||
|
coordinate: Clutter.BindCoordinate.SIZE,
|
||||||
|
}));
|
||||||
|
this._mainBox.add_child(this._defaultButtonWell);
|
||||||
|
|
||||||
this._spinner = new Animation.Spinner(DEFAULT_BUTTON_WELL_ICON_SIZE);
|
this._spinner = new Animation.Spinner(DEFAULT_BUTTON_WELL_ICON_SIZE);
|
||||||
this._spinner.opacity = 0;
|
|
||||||
this._spinner.show();
|
|
||||||
this._defaultButtonWell.add_child(this._spinner);
|
this._defaultButtonWell.add_child(this._spinner);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_activateNext(shouldSpin) {
|
||||||
this._userVerifier.destroy();
|
this.updateSensitivity(false);
|
||||||
this._userVerifier = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
vfunc_key_press_event(keyPressEvent) {
|
if (shouldSpin)
|
||||||
if (keyPressEvent.keyval == Clutter.KEY_Escape)
|
this.startSpinning();
|
||||||
this.cancel();
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
_initButtons() {
|
if (this._queryingService)
|
||||||
this.cancelButton = new St.Button({
|
this._userVerifier.answerQuery(this._queryingService, this._entry.text);
|
||||||
style_class: 'modal-dialog-button button',
|
else
|
||||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
this._preemptiveAnswer = this._entry.text;
|
||||||
reactive: true,
|
|
||||||
can_focus: true,
|
|
||||||
label: _("Cancel"),
|
|
||||||
x_expand: true,
|
|
||||||
x_align: Clutter.ActorAlign.START,
|
|
||||||
y_align: Clutter.ActorAlign.END,
|
|
||||||
});
|
|
||||||
this.cancelButton.connect('clicked', () => this.cancel());
|
|
||||||
this._buttonBox.add_child(this.cancelButton);
|
|
||||||
|
|
||||||
this._buttonBox.add_child(this._defaultButtonWell);
|
|
||||||
this.nextButton = new St.Button({
|
|
||||||
style_class: 'modal-dialog-button button',
|
|
||||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
|
||||||
reactive: true,
|
|
||||||
can_focus: true,
|
|
||||||
label: _("Next"),
|
|
||||||
x_align: Clutter.ActorAlign.END,
|
|
||||||
y_align: Clutter.ActorAlign.END,
|
|
||||||
});
|
|
||||||
this.nextButton.connect('clicked', () => this.emit('next'));
|
|
||||||
this.nextButton.add_style_pseudo_class('default');
|
|
||||||
this._buttonBox.add_child(this.nextButton);
|
|
||||||
|
|
||||||
this._updateNextButtonSensitivity(this._entry.text.length > 0);
|
|
||||||
|
|
||||||
this._entry.clutter_text.connect('text-changed', () => {
|
|
||||||
if (!this._userVerifier.hasPendingMessages)
|
|
||||||
this._fadeOutMessage();
|
|
||||||
|
|
||||||
this._updateNextButtonSensitivity(this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING);
|
|
||||||
});
|
|
||||||
this._entry.clutter_text.connect('activate', () => {
|
|
||||||
if (this.nextButton.reactive)
|
|
||||||
this.emit('next');
|
this.emit('next');
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateEntry(secret) {
|
_updateEntry(secret) {
|
||||||
if (secret && (this._entry != this._passwordEntry)) {
|
if (secret && this._entry !== this._passwordEntry) {
|
||||||
this.replace_child(this._entry, this._passwordEntry);
|
this._mainBox.replace_child(this._entry, this._passwordEntry);
|
||||||
this._entry = this._passwordEntry;
|
this._entry = this._passwordEntry;
|
||||||
} else if (!secret && (this._entry != this._textEntry)) {
|
} else if (!secret && this._entry !== this._textEntry) {
|
||||||
this.replace_child(this._entry, this._textEntry);
|
this._mainBox.replace_child(this._entry, this._textEntry);
|
||||||
this._entry = this._textEntry;
|
this._entry = this._textEntry;
|
||||||
}
|
}
|
||||||
this._capsLockWarningLabel.visible = secret;
|
this._capsLockWarningLabel.visible = secret;
|
||||||
@@ -226,16 +229,14 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._updateEntry(secret);
|
this._updateEntry(secret);
|
||||||
this.setQuestion(question);
|
|
||||||
|
|
||||||
if (secret) {
|
// Hack: The question string comes directly from PAM, if it's "Password:"
|
||||||
if (this._userVerifier.reauthenticating)
|
// we replace it with our own to allow localization, if it's something
|
||||||
this.nextButton.label = _("Unlock");
|
// else we remove the last colon and any trailing or leading spaces.
|
||||||
|
if (question === 'Password:' || question === 'Password: ')
|
||||||
|
this.setQuestion(_('Password'));
|
||||||
else
|
else
|
||||||
this.nextButton.label = C_("button", "Sign In");
|
this.setQuestion(question.replace(/: *$/, '').trim());
|
||||||
} else {
|
|
||||||
this.nextButton.label = _("Next");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.updateSensitivity(true);
|
this.updateSensitivity(true);
|
||||||
this.emit('prompted');
|
this.emit('prompted');
|
||||||
@@ -285,6 +286,7 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
this.setActorInDefaultButtonWell(null);
|
this.setActorInDefaultButtonWell(null);
|
||||||
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
|
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
|
||||||
this.cancelButton.reactive = false;
|
this.cancelButton.reactive = false;
|
||||||
|
this.cancelButton.can_focus = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onReset() {
|
_onReset() {
|
||||||
@@ -292,10 +294,6 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
this.reset();
|
this.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
addActorToDefaultButtonWell(actor) {
|
|
||||||
this._defaultButtonWell.add_child(actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
setActorInDefaultButtonWell(actor, animate) {
|
setActorInDefaultButtonWell(actor, animate) {
|
||||||
if (!this._defaultButtonWellActor &&
|
if (!this._defaultButtonWellActor &&
|
||||||
!actor)
|
!actor)
|
||||||
@@ -375,11 +373,9 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
setQuestion(question) {
|
setQuestion(question) {
|
||||||
this._label.set_text(question);
|
this._entry.hint_text = question;
|
||||||
|
|
||||||
this._label.show();
|
|
||||||
this._entry.show();
|
this._entry.show();
|
||||||
|
|
||||||
this._entry.grab_key_focus();
|
this._entry.grab_key_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,15 +423,8 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateNextButtonSensitivity(sensitive) {
|
|
||||||
this.nextButton.reactive = sensitive;
|
|
||||||
this.nextButton.can_focus = sensitive;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateSensitivity(sensitive) {
|
updateSensitivity(sensitive) {
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vfunc_hide() {
|
vfunc_hide() {
|
||||||
@@ -454,18 +443,18 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
if (oldChild)
|
if (oldChild)
|
||||||
oldChild.destroy();
|
oldChild.destroy();
|
||||||
|
|
||||||
if (user) {
|
let userWidget = new UserWidget.UserWidget(user, Clutter.Orientation.VERTICAL);
|
||||||
let userWidget = new UserWidget.UserWidget(user);
|
|
||||||
userWidget.x_align = Clutter.ActorAlign.START;
|
|
||||||
this._userWell.set_child(userWidget);
|
this._userWell.set_child(userWidget);
|
||||||
}
|
|
||||||
|
if (!user)
|
||||||
|
this._updateEntry(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
let oldStatus = this.verificationStatus;
|
let oldStatus = this.verificationStatus;
|
||||||
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
||||||
this.cancelButton.reactive = true;
|
this.cancelButton.reactive = this._hasCancelButton;
|
||||||
this.nextButton.label = _("Next");
|
this.cancelButton.can_focus = this._hasCancelButton;
|
||||||
this._preemptiveAnswer = null;
|
this._preemptiveAnswer = null;
|
||||||
|
|
||||||
if (this._userVerifier)
|
if (this._userVerifier)
|
||||||
@@ -475,6 +464,7 @@ var AuthPrompt = GObject.registerClass({
|
|||||||
this.clear();
|
this.clear();
|
||||||
this._message.opacity = 0;
|
this._message.opacity = 0;
|
||||||
this.setUser(null);
|
this.setUser(null);
|
||||||
|
this._updateEntry(true);
|
||||||
this.stopSpinning();
|
this.stopSpinning();
|
||||||
|
|
||||||
if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED)
|
if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED)
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ const UserWidget = imports.ui.userWidget;
|
|||||||
const _FADE_ANIMATION_TIME = 250;
|
const _FADE_ANIMATION_TIME = 250;
|
||||||
const _SCROLL_ANIMATION_TIME = 500;
|
const _SCROLL_ANIMATION_TIME = 500;
|
||||||
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
|
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
|
||||||
const _LOGO_ICON_HEIGHT = 48;
|
|
||||||
const _MAX_BOTTOM_MENU_ITEMS = 5;
|
|
||||||
|
|
||||||
var UserListItem = GObject.registerClass({
|
var UserListItem = GObject.registerClass({
|
||||||
Signals: { 'activate': {} },
|
Signals: { 'activate': {} },
|
||||||
@@ -179,6 +177,7 @@ var UserList = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
vfunc_key_focus_in() {
|
vfunc_key_focus_in() {
|
||||||
|
super.vfunc_key_focus_in();
|
||||||
this._moveFocusToItems();
|
this._moveFocusToItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,28 +311,21 @@ var SessionMenuButton = GObject.registerClass({
|
|||||||
_init() {
|
_init() {
|
||||||
let gearIcon = new St.Icon({ icon_name: 'emblem-system-symbolic' });
|
let gearIcon = new St.Icon({ icon_name: 'emblem-system-symbolic' });
|
||||||
let button = new St.Button({
|
let button = new St.Button({
|
||||||
style_class: 'login-dialog-session-list-button',
|
style_class: 'modal-dialog-button button login-dialog-session-list-button',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
track_hover: true,
|
track_hover: true,
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
accessible_name: _("Choose Session"),
|
accessible_name: _("Choose Session"),
|
||||||
accessible_role: Atk.Role.MENU,
|
accessible_role: Atk.Role.MENU,
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
child: gearIcon,
|
child: gearIcon,
|
||||||
});
|
});
|
||||||
|
|
||||||
super._init({ child: button });
|
super._init({ child: button });
|
||||||
this._button = button;
|
this._button = button;
|
||||||
|
|
||||||
let side = St.Side.TOP;
|
this._menu = new PopupMenu.PopupMenu(this._button, 0, St.Side.BOTTOM);
|
||||||
let align = 0;
|
|
||||||
if (Gdm.get_session_ids().length > _MAX_BOTTOM_MENU_ITEMS) {
|
|
||||||
if (this.text_direction == Clutter.TextDirection.RTL)
|
|
||||||
side = St.Side.RIGHT;
|
|
||||||
else
|
|
||||||
side = St.Side.LEFT;
|
|
||||||
align = 0.5;
|
|
||||||
}
|
|
||||||
this._menu = new PopupMenu.PopupMenu(this._button, align, side);
|
|
||||||
Main.uiGroup.add_actor(this._menu.actor);
|
Main.uiGroup.add_actor(this._menu.actor);
|
||||||
this._menu.actor.hide();
|
this._menu.actor.hide();
|
||||||
|
|
||||||
@@ -358,6 +350,7 @@ var SessionMenuButton = GObject.registerClass({
|
|||||||
updateSensitivity(sensitive) {
|
updateSensitivity(sensitive) {
|
||||||
this._button.reactive = sensitive;
|
this._button.reactive = sensitive;
|
||||||
this._button.can_focus = sensitive;
|
this._button.can_focus = sensitive;
|
||||||
|
this.opacity = sensitive ? 255 : 0;
|
||||||
this._menu.close(BoxPointer.PopupAnimation.NONE);
|
this._menu.close(BoxPointer.PopupAnimation.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,13 +421,13 @@ var LoginDialog = GObject.registerClass({
|
|||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||||
|
|
||||||
this._settings.connect(`changed::${GdmUtil.BANNER_MESSAGE_KEY}`,
|
this._settings.connect('changed::%s'.format(GdmUtil.BANNER_MESSAGE_KEY),
|
||||||
this._updateBanner.bind(this));
|
this._updateBanner.bind(this));
|
||||||
this._settings.connect(`changed::${GdmUtil.BANNER_MESSAGE_TEXT_KEY}`,
|
this._settings.connect('changed::%s'.format(GdmUtil.BANNER_MESSAGE_TEXT_KEY),
|
||||||
this._updateBanner.bind(this));
|
this._updateBanner.bind(this));
|
||||||
this._settings.connect(`changed::${GdmUtil.DISABLE_USER_LIST_KEY}`,
|
this._settings.connect('changed::%s'.format(GdmUtil.DISABLE_USER_LIST_KEY),
|
||||||
this._updateDisableUserList.bind(this));
|
this._updateDisableUserList.bind(this));
|
||||||
this._settings.connect(`changed::${GdmUtil.LOGO_KEY}`,
|
this._settings.connect('changed::%s'.format(GdmUtil.LOGO_KEY),
|
||||||
this._updateLogo.bind(this));
|
this._updateLogo.bind(this));
|
||||||
|
|
||||||
this._textureCache = St.TextureCache.get_default();
|
this._textureCache = St.TextureCache.get_default();
|
||||||
@@ -463,7 +456,6 @@ var LoginDialog = GObject.registerClass({
|
|||||||
let notListedLabel = new St.Label({
|
let notListedLabel = new St.Label({
|
||||||
text: _("Not listed?"),
|
text: _("Not listed?"),
|
||||||
style_class: 'login-dialog-not-listed-label',
|
style_class: 'login-dialog-not-listed-label',
|
||||||
x_align: Clutter.ActorAlign.START,
|
|
||||||
});
|
});
|
||||||
this._notListedButton = new St.Button({
|
this._notListedButton = new St.Button({
|
||||||
style_class: 'login-dialog-not-listed-button',
|
style_class: 'login-dialog-not-listed-button',
|
||||||
@@ -471,6 +463,7 @@ var LoginDialog = GObject.registerClass({
|
|||||||
can_focus: true,
|
can_focus: true,
|
||||||
child: notListedLabel,
|
child: notListedLabel,
|
||||||
reactive: true,
|
reactive: true,
|
||||||
|
x_align: Clutter.ActorAlign.START,
|
||||||
});
|
});
|
||||||
|
|
||||||
this._notListedButton.connect('clicked', this._hideUserListAskForUsernameAndBeginVerification.bind(this));
|
this._notListedButton.connect('clicked', this._hideUserListAskForUsernameAndBeginVerification.bind(this));
|
||||||
@@ -495,6 +488,15 @@ var LoginDialog = GObject.registerClass({
|
|||||||
bannerBox.add_child(this._bannerLabel);
|
bannerBox.add_child(this._bannerLabel);
|
||||||
this._updateBanner();
|
this._updateBanner();
|
||||||
|
|
||||||
|
this._sessionMenuButton = new SessionMenuButton();
|
||||||
|
this._sessionMenuButton.connect('session-activated',
|
||||||
|
(list, sessionId) => {
|
||||||
|
this._greeter.call_select_session_sync(sessionId, null);
|
||||||
|
});
|
||||||
|
this._sessionMenuButton.opacity = 0;
|
||||||
|
this._sessionMenuButton.show();
|
||||||
|
this.add_child(this._sessionMenuButton);
|
||||||
|
|
||||||
this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
|
this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
y_align: Clutter.ActorAlign.END });
|
y_align: Clutter.ActorAlign.END });
|
||||||
@@ -508,16 +510,6 @@ var LoginDialog = GObject.registerClass({
|
|||||||
this._onUserListActivated(item);
|
this._onUserListActivated(item);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
this._sessionMenuButton = new SessionMenuButton();
|
|
||||||
this._sessionMenuButton.connect('session-activated',
|
|
||||||
(list, sessionId) => {
|
|
||||||
this._greeter.call_select_session_sync(sessionId, null);
|
|
||||||
});
|
|
||||||
this._sessionMenuButton.opacity = 0;
|
|
||||||
this._sessionMenuButton.show();
|
|
||||||
this._authPrompt.addActorToDefaultButtonWell(this._sessionMenuButton);
|
|
||||||
|
|
||||||
this._disableUserList = undefined;
|
this._disableUserList = undefined;
|
||||||
this._userListLoaded = false;
|
this._userListLoaded = false;
|
||||||
|
|
||||||
@@ -562,6 +554,23 @@ var LoginDialog = GObject.registerClass({
|
|||||||
return actorBox;
|
return actorBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_getSessionMenuButtonAllocation(dialogBox) {
|
||||||
|
let actorBox = new Clutter.ActorBox();
|
||||||
|
|
||||||
|
let [, , natWidth, natHeight] = this._sessionMenuButton.get_preferred_size();
|
||||||
|
|
||||||
|
if (this.get_text_direction() === Clutter.TextDirection.RTL)
|
||||||
|
actorBox.x1 = dialogBox.x1 + natWidth;
|
||||||
|
else
|
||||||
|
actorBox.x1 = dialogBox.x2 - (natWidth * 2);
|
||||||
|
|
||||||
|
actorBox.y1 = dialogBox.y2 - (natHeight * 2);
|
||||||
|
actorBox.x2 = actorBox.x1 + natWidth;
|
||||||
|
actorBox.y2 = actorBox.y1 + natHeight;
|
||||||
|
|
||||||
|
return actorBox;
|
||||||
|
}
|
||||||
|
|
||||||
_getCenterActorAllocation(dialogBox, actor) {
|
_getCenterActorAllocation(dialogBox, actor) {
|
||||||
let actorBox = new Clutter.ActorBox();
|
let actorBox = new Clutter.ActorBox();
|
||||||
|
|
||||||
@@ -618,6 +627,10 @@ var LoginDialog = GObject.registerClass({
|
|||||||
logoHeight = logoAllocation.y2 - logoAllocation.y1;
|
logoHeight = logoAllocation.y2 - logoAllocation.y1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let sessionMenuButtonAllocation = null;
|
||||||
|
if (this._sessionMenuButton.visible)
|
||||||
|
sessionMenuButtonAllocation = this._getSessionMenuButtonAllocation(dialogBox);
|
||||||
|
|
||||||
// Then figure out if we're overly constrained and need to
|
// Then figure out if we're overly constrained and need to
|
||||||
// try a different layout, or if we have what extra space we
|
// try a different layout, or if we have what extra space we
|
||||||
// can hand out
|
// can hand out
|
||||||
@@ -716,6 +729,9 @@ var LoginDialog = GObject.registerClass({
|
|||||||
|
|
||||||
if (logoAllocation)
|
if (logoAllocation)
|
||||||
this._logoBin.allocate(logoAllocation, flags);
|
this._logoBin.allocate(logoAllocation, flags);
|
||||||
|
|
||||||
|
if (sessionMenuButtonAllocation)
|
||||||
|
this._sessionMenuButton.allocate(sessionMenuButtonAllocation, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ensureUserListLoaded() {
|
_ensureUserListLoaded() {
|
||||||
@@ -797,7 +813,7 @@ var LoginDialog = GObject.registerClass({
|
|||||||
if (this._logoFile && this._logoBin.resource_scale > 0) {
|
if (this._logoFile && this._logoBin.resource_scale > 0) {
|
||||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||||
this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
|
this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
|
||||||
-1, _LOGO_ICON_HEIGHT,
|
-1, -1,
|
||||||
scaleFactor,
|
scaleFactor,
|
||||||
this._logoBin.resource_scale));
|
this._logoBin.resource_scale));
|
||||||
}
|
}
|
||||||
@@ -811,12 +827,10 @@ var LoginDialog = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onPrompted() {
|
_onPrompted() {
|
||||||
if (this._shouldShowSessionMenuButton()) {
|
const showSessionMenu = this._shouldShowSessionMenuButton();
|
||||||
this._sessionMenuButton.updateSensitivity(true);
|
|
||||||
this._authPrompt.setActorInDefaultButtonWell(this._sessionMenuButton);
|
this._sessionMenuButton.updateSensitivity(showSessionMenu);
|
||||||
} else {
|
this._sessionMenuButton.visible = showSessionMenu;
|
||||||
this._sessionMenuButton.updateSensitivity(false);
|
|
||||||
}
|
|
||||||
this._showPrompt();
|
this._showPrompt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -899,7 +913,8 @@ var LoginDialog = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_askForUsernameAndBeginVerification() {
|
_askForUsernameAndBeginVerification() {
|
||||||
this._authPrompt.setQuestion(_("Username: "));
|
this._authPrompt.setUser(null);
|
||||||
|
this._authPrompt.setQuestion(_('Username'));
|
||||||
|
|
||||||
this._showRealmLoginHint(this._realmManager.loginFormat);
|
this._showRealmLoginHint(this._realmManager.loginFormat);
|
||||||
|
|
||||||
@@ -913,7 +928,6 @@ var LoginDialog = GObject.registerClass({
|
|||||||
let answer = this._authPrompt.getAnswer();
|
let answer = this._authPrompt.getAnswer();
|
||||||
this._user = this._userManager.get_user(answer);
|
this._user = this._userManager.get_user(answer);
|
||||||
this._authPrompt.clear();
|
this._authPrompt.clear();
|
||||||
this._authPrompt.startSpinning();
|
|
||||||
this._authPrompt.begin({ userName: answer });
|
this._authPrompt.begin({ userName: answer });
|
||||||
this._updateCancelButton();
|
this._updateCancelButton();
|
||||||
});
|
});
|
||||||
@@ -1125,6 +1139,7 @@ var LoginDialog = GObject.registerClass({
|
|||||||
this._authPrompt.hide();
|
this._authPrompt.hide();
|
||||||
this._hideBannerView();
|
this._hideBannerView();
|
||||||
this._sessionMenuButton.close();
|
this._sessionMenuButton.close();
|
||||||
|
this._sessionMenuButton.hide();
|
||||||
this._setUserListExpanded(true);
|
this._setUserListExpanded(true);
|
||||||
this._notListedButton.show();
|
this._notListedButton.show();
|
||||||
this._userList.grab_key_focus();
|
this._userList.grab_key_focus();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
subdir('misc')
|
subdir('misc')
|
||||||
|
subdir('dbusServices')
|
||||||
|
|
||||||
js_resources = gnome.compile_resources(
|
js_resources = gnome.compile_resources(
|
||||||
'js-resources', 'js-resources.gresource.xml',
|
'js-resources', 'js-resources.gresource.xml',
|
||||||
@@ -13,10 +14,3 @@ portal_resources = gnome.compile_resources(
|
|||||||
c_name: 'portal_js_resources',
|
c_name: 'portal_js_resources',
|
||||||
dependencies: [config_js]
|
dependencies: [config_js]
|
||||||
)
|
)
|
||||||
|
|
||||||
prefs_resources = gnome.compile_resources(
|
|
||||||
'prefs-resources', 'prefs-resources.gresource.xml',
|
|
||||||
source_dir: ['.', meson.current_build_dir()],
|
|
||||||
c_name: 'prefs_js_resources',
|
|
||||||
dependencies: [config_js]
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -15,6 +15,5 @@ var LOCALEDIR = '@datadir@/locale';
|
|||||||
/* other standard directories */
|
/* other standard directories */
|
||||||
var LIBEXECDIR = '@libexecdir@';
|
var LIBEXECDIR = '@libexecdir@';
|
||||||
var PKGDATADIR = '@datadir@/@PACKAGE_NAME@';
|
var PKGDATADIR = '@datadir@/@PACKAGE_NAME@';
|
||||||
var VPNDIR = '@vpndir@';
|
|
||||||
/* g-i package versions */
|
/* g-i package versions */
|
||||||
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
|
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
|
||||||
|
|||||||
@@ -76,19 +76,15 @@ function loadInterfaceXML(iface) {
|
|||||||
_ifaceResource._register();
|
_ifaceResource._register();
|
||||||
}
|
}
|
||||||
|
|
||||||
let xml = null;
|
|
||||||
let uri = `resource:///org/gnome/shell/dbus-interfaces/${iface}.xml`;
|
let uri = `resource:///org/gnome/shell/dbus-interfaces/${iface}.xml`;
|
||||||
let f = Gio.File.new_for_uri(uri);
|
let f = Gio.File.new_for_uri(uri);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let [ok_, bytes] = f.load_contents(null);
|
let [ok_, bytes] = f.load_contents(null);
|
||||||
if (bytes instanceof Uint8Array)
|
return imports.byteArray.toString(bytes);
|
||||||
xml = imports.byteArray.toString(bytes);
|
|
||||||
else
|
|
||||||
xml = bytes.toString();
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Failed to load D-Bus interface ${iface}`);
|
log(`Failed to load D-Bus interface ${iface}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return xml;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported getIBusManager */
|
/* exported getIBusManager */
|
||||||
|
|
||||||
const { Gio, GLib, IBus } = imports.gi;
|
const { Gio, GLib, IBus, Meta } = imports.gi;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
const IBusCandidatePopup = imports.ui.ibusCandidatePopup;
|
const IBusCandidatePopup = imports.ui.ibusCandidatePopup;
|
||||||
@@ -55,13 +55,18 @@ var IBusManager = class {
|
|||||||
this._ibus.set_watch_ibus_signal(true);
|
this._ibus.set_watch_ibus_signal(true);
|
||||||
this._ibus.connect('global-engine-changed', this._engineChanged.bind(this));
|
this._ibus.connect('global-engine-changed', this._engineChanged.bind(this));
|
||||||
|
|
||||||
this._spawn();
|
this._spawn(Meta.is_wayland_compositor() ? [] : ['--xim']);
|
||||||
}
|
}
|
||||||
|
|
||||||
_spawn(extraArgs = []) {
|
_spawn(extraArgs = []) {
|
||||||
try {
|
try {
|
||||||
let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
|
let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
|
||||||
Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
|
let launcher = Gio.SubprocessLauncher.new(Gio.SubprocessFlags.NONE);
|
||||||
|
// Forward the right X11 Display for ibus-x11
|
||||||
|
let display = GLib.getenv('GNOME_SETUP_DISPLAY');
|
||||||
|
if (display)
|
||||||
|
launcher.setenv('DISPLAY', display, true);
|
||||||
|
launcher.spawnv(cmdLine);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Failed to launch ibus-daemon: ${e.message}`);
|
log(`Failed to launch ibus-daemon: ${e.message}`);
|
||||||
}
|
}
|
||||||
@@ -122,18 +127,20 @@ var IBusManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_initPanelService(ibus, result) {
|
_initPanelService(ibus, result) {
|
||||||
let success = false;
|
|
||||||
try {
|
try {
|
||||||
success = !!this._ibus.request_name_async_finish(result);
|
this._ibus.request_name_async_finish(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
||||||
return;
|
|
||||||
logError(e);
|
logError(e);
|
||||||
|
this._clear();
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
this._panelService = new IBus.PanelService({
|
||||||
this._panelService = new IBus.PanelService({ connection: this._ibus.get_connection(),
|
connection: this._ibus.get_connection(),
|
||||||
object_path: IBus.PATH_PANEL });
|
object_path: IBus.PATH_PANEL,
|
||||||
|
});
|
||||||
this._candidatePopup.setPanelService(this._panelService);
|
this._candidatePopup.setPanelService(this._panelService);
|
||||||
this._panelService.connect('update-property', this._updateProperty.bind(this));
|
this._panelService.connect('update-property', this._updateProperty.bind(this));
|
||||||
this._panelService.connect('set-cursor-location', (ps, x, y, w, h) => {
|
this._panelService.connect('set-cursor-location', (ps, x, y, w, h) => {
|
||||||
@@ -169,9 +176,6 @@ var IBusManager = class {
|
|||||||
this._engineChanged(this._ibus, engine.get_name());
|
this._engineChanged(this._ibus, engine.get_name());
|
||||||
});
|
});
|
||||||
this._updateReadiness();
|
this._updateReadiness();
|
||||||
} else {
|
|
||||||
this._clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateReadiness() {
|
_updateReadiness() {
|
||||||
|
|||||||
@@ -97,8 +97,13 @@ class InputMethod extends Clutter.InputMethod {
|
|||||||
this.commit(text.get_text());
|
this.commit(text.get_text());
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDeleteSurroundingText() {
|
_onDeleteSurroundingText(_context, offset, nchars) {
|
||||||
this.delete_surrounding();
|
try {
|
||||||
|
this.delete_surrounding(offset, nchars);
|
||||||
|
} catch (e) {
|
||||||
|
// We may get out of bounds for negative offset on older mutter
|
||||||
|
this.delete_surrounding(0, nchars + offset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onUpdatePreeditText(_context, text, pos, visible) {
|
_onUpdatePreeditText(_context, text, pos, visible) {
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
/* exported IntrospectService */
|
/* exported IntrospectService */
|
||||||
const { Gio, GLib, Meta, Shell } = imports.gi;
|
const { Gio, GLib, Meta, Shell, St } = imports.gi;
|
||||||
|
|
||||||
const INTROSPECT_SCHEMA = 'org.gnome.shell';
|
const INTROSPECT_SCHEMA = 'org.gnome.shell';
|
||||||
const INTROSPECT_KEY = 'introspect';
|
const INTROSPECT_KEY = 'introspect';
|
||||||
const APP_WHITELIST = ['org.freedesktop.impl.portal.desktop.gtk'];
|
const APP_WHITELIST = ['org.freedesktop.impl.portal.desktop.gtk'];
|
||||||
|
|
||||||
|
const INTROSPECT_DBUS_API_VERSION = 2;
|
||||||
|
|
||||||
const { loadInterfaceXML } = imports.misc.fileUtils;
|
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||||
|
|
||||||
const IntrospectDBusIface = loadInterfaceXML('org.gnome.Shell.Introspect');
|
const IntrospectDBusIface = loadInterfaceXML('org.gnome.Shell.Introspect');
|
||||||
@@ -22,6 +24,7 @@ var IntrospectService = class {
|
|||||||
this._runningApplicationsDirty = true;
|
this._runningApplicationsDirty = true;
|
||||||
this._activeApplication = null;
|
this._activeApplication = null;
|
||||||
this._activeApplicationDirty = true;
|
this._activeApplicationDirty = true;
|
||||||
|
this._animationsEnabled = true;
|
||||||
|
|
||||||
this._appSystem = Shell.AppSystem.get_default();
|
this._appSystem = Shell.AppSystem.get_default();
|
||||||
this._appSystem.connect('app-state-changed',
|
this._appSystem.connect('app-state-changed',
|
||||||
@@ -30,7 +33,9 @@ var IntrospectService = class {
|
|||||||
this._syncRunningApplications();
|
this._syncRunningApplications();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: INTROSPECT_SCHEMA });
|
this._introspectSettings = new Gio.Settings({
|
||||||
|
schema_id: INTROSPECT_SCHEMA,
|
||||||
|
});
|
||||||
|
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
tracker.connect('notify::focus-app',
|
tracker.connect('notify::focus-app',
|
||||||
@@ -49,6 +54,11 @@ var IntrospectService = class {
|
|||||||
(conn, name, owner) => this._whitelistMap.set(name, owner),
|
(conn, name, owner) => this._whitelistMap.set(name, owner),
|
||||||
(conn, name) => this._whitelistMap.delete(name));
|
(conn, name) => this._whitelistMap.delete(name));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this._settings = St.Settings.get();
|
||||||
|
this._settings.connect('notify::enable-animations',
|
||||||
|
this._syncAnimationsEnabled.bind(this));
|
||||||
|
this._syncAnimationsEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
_isStandaloneApp(app) {
|
_isStandaloneApp(app) {
|
||||||
@@ -56,7 +66,7 @@ var IntrospectService = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_isIntrospectEnabled() {
|
_isIntrospectEnabled() {
|
||||||
return this._settings.get_boolean(INTROSPECT_KEY);
|
return this._introspectSettings.get_boolean(INTROSPECT_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
_isSenderWhitelisted(sender) {
|
_isSenderWhitelisted(sender) {
|
||||||
@@ -119,9 +129,18 @@ var IntrospectService = class {
|
|||||||
type == Meta.WindowType.UTILITY;
|
type == Meta.WindowType.UTILITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_isInvocationAllowed(invocation) {
|
||||||
|
if (this._isIntrospectEnabled())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (this._isSenderWhitelisted(invocation.get_sender()))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
GetRunningApplicationsAsync(params, invocation) {
|
GetRunningApplicationsAsync(params, invocation) {
|
||||||
if (!this._isIntrospectEnabled() &&
|
if (!this._isInvocationAllowed(invocation)) {
|
||||||
!this._isSenderWhitelisted(invocation.get_sender())) {
|
|
||||||
invocation.return_error_literal(Gio.DBusError,
|
invocation.return_error_literal(Gio.DBusError,
|
||||||
Gio.DBusError.ACCESS_DENIED,
|
Gio.DBusError.ACCESS_DENIED,
|
||||||
'App introspection not allowed');
|
'App introspection not allowed');
|
||||||
@@ -136,8 +155,7 @@ var IntrospectService = class {
|
|||||||
let apps = this._appSystem.get_running();
|
let apps = this._appSystem.get_running();
|
||||||
let windowsList = {};
|
let windowsList = {};
|
||||||
|
|
||||||
if (!this._isIntrospectEnabled() &&
|
if (!this._isInvocationAllowed(invocation)) {
|
||||||
!this._isSenderWhitelisted(invocation.get_sender())) {
|
|
||||||
invocation.return_error_literal(Gio.DBusError,
|
invocation.return_error_literal(Gio.DBusError,
|
||||||
Gio.DBusError.ACCESS_DENIED,
|
Gio.DBusError.ACCESS_DENIED,
|
||||||
'App introspection not allowed');
|
'App introspection not allowed');
|
||||||
@@ -181,4 +199,21 @@ var IntrospectService = class {
|
|||||||
}
|
}
|
||||||
invocation.return_value(new GLib.Variant('(a{ta{sv}})', [windowsList]));
|
invocation.return_value(new GLib.Variant('(a{ta{sv}})', [windowsList]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_syncAnimationsEnabled() {
|
||||||
|
let wasAnimationsEnabled = this._animationsEnabled;
|
||||||
|
this._animationsEnabled = this._settings.enable_animations;
|
||||||
|
if (wasAnimationsEnabled !== this._animationsEnabled) {
|
||||||
|
let variant = new GLib.Variant('b', this._animationsEnabled);
|
||||||
|
this._dbusImpl.emit_property_changed('AnimationsEnabled', variant);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get AnimationsEnabled() {
|
||||||
|
return this._animationsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
get version() {
|
||||||
|
return INTROSPECT_DBUS_API_VERSION;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ jsconf.set10('HAVE_BLUETOOTH', bt_dep.found())
|
|||||||
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
|
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
|
||||||
jsconf.set('datadir', datadir)
|
jsconf.set('datadir', datadir)
|
||||||
jsconf.set('libexecdir', libexecdir)
|
jsconf.set('libexecdir', libexecdir)
|
||||||
jsconf.set('vpndir', vpndir)
|
|
||||||
|
|
||||||
config_js = configure_file(
|
config_js = configure_file(
|
||||||
input: 'config.js.in',
|
input: 'config.js.in',
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ var BroadbandModem = GObject.registerClass({
|
|||||||
}, class BroadbandModem extends ModemBase {
|
}, class BroadbandModem extends ModemBase {
|
||||||
_init(path, capabilities) {
|
_init(path, capabilities) {
|
||||||
super._init({ capabilities });
|
super._init({ capabilities });
|
||||||
this._proxy = new BroadbandModemProxy(Gio.DBus.system, 'org.freedesktop.ModemManager', path);
|
this._proxy = new BroadbandModemProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
||||||
this._proxy_3gpp = new BroadbandModem3gppProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
this._proxy_3gpp = new BroadbandModem3gppProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
||||||
this._proxy_cdma = new BroadbandModemCdmaProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
this._proxy_cdma = new BroadbandModemCdmaProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ var BroadbandModem = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_reloadSignalQuality() {
|
_reloadSignalQuality() {
|
||||||
let [quality, recent_] = this.SignalQuality;
|
let [quality, recent_] = this._proxy.SignalQuality;
|
||||||
this._setSignalQuality(quality);
|
this._setSignalQuality(quality);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -151,17 +151,17 @@ const SystemActions = GObject.registerClass({
|
|||||||
this._userManager.connect('user-removed',
|
this._userManager.connect('user-removed',
|
||||||
() => this._updateMultiUser());
|
() => this._updateMultiUser());
|
||||||
|
|
||||||
this._lockdownSettings.connect(`changed::${DISABLE_USER_SWITCH_KEY}`,
|
this._lockdownSettings.connect('changed::%s'.format(DISABLE_USER_SWITCH_KEY),
|
||||||
() => this._updateSwitchUser());
|
() => this._updateSwitchUser());
|
||||||
this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`,
|
this._lockdownSettings.connect('changed::%s'.format(DISABLE_LOG_OUT_KEY),
|
||||||
() => this._updateLogout());
|
() => this._updateLogout());
|
||||||
global.settings.connect(`changed::${ALWAYS_SHOW_LOG_OUT_KEY}`,
|
global.settings.connect('changed::%s'.format(ALWAYS_SHOW_LOG_OUT_KEY),
|
||||||
() => this._updateLogout());
|
() => this._updateLogout());
|
||||||
|
|
||||||
this._lockdownSettings.connect(`changed::${DISABLE_LOCK_SCREEN_KEY}`,
|
this._lockdownSettings.connect('changed::%s'.format(DISABLE_LOCK_SCREEN_KEY),
|
||||||
() => this._updateLockScreen());
|
() => this._updateLockScreen());
|
||||||
|
|
||||||
this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`,
|
this._lockdownSettings.connect('changed::%s'.format(DISABLE_LOG_OUT_KEY),
|
||||||
() => this._updateHaveShutdown());
|
() => this._updateHaveShutdown());
|
||||||
|
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]';
|
|||||||
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u200E\u200F\u201C\u201D\u2018\u2019\u202A\u202C]';
|
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u200E\u200F\u201C\u201D\u2018\u2019\u202A\u202C]';
|
||||||
|
|
||||||
const _urlRegexp = new RegExp(
|
const _urlRegexp = new RegExp(
|
||||||
`(^|${_leadingJunk})` +
|
'(^|%s)'.format(_leadingJunk) +
|
||||||
'(' +
|
'(' +
|
||||||
'(?:' +
|
'(?:' +
|
||||||
'(?:http|https|ftp)://' + // scheme://
|
'(?:http|https|ftp)://' + // scheme://
|
||||||
@@ -33,12 +33,12 @@ const _urlRegexp = new RegExp(
|
|||||||
'(?:' + // one or more:
|
'(?:' + // one or more:
|
||||||
'[^\\s()<>]+' + // run of non-space non-()
|
'[^\\s()<>]+' + // run of non-space non-()
|
||||||
'|' + // or
|
'|' + // or
|
||||||
`${_balancedParens}` + // balanced parens
|
'%s'.format(_balancedParens) + // balanced parens
|
||||||
')+' +
|
')+' +
|
||||||
'(?:' + // end with:
|
'(?:' + // end with:
|
||||||
`${_balancedParens}` + // balanced parens
|
'%s'.format(_balancedParens) + // balanced parens
|
||||||
'|' + // or
|
'|' + // or
|
||||||
`${_notTrailingJunk}` + // last non-junk char
|
'%s'.format(_notTrailingJunk) + // last non-junk char
|
||||||
')' +
|
')' +
|
||||||
')', 'gi');
|
')', 'gi');
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ function trySpawnCommandLine(commandLine) {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Replace "Error invoking GLib.shell_parse_argv: " with
|
// Replace "Error invoking GLib.shell_parse_argv: " with
|
||||||
// something nicer
|
// something nicer
|
||||||
err.message = err.message.replace(/[^:]*: /, `${_("Could not parse command:")}\n`);
|
err.message = err.message.replace(/[^:]*: /, '%s\n'.format(_('Could not parse command:')));
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,6 +445,9 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wiggle(actor, params) {
|
function wiggle(actor, params) {
|
||||||
|
if (!St.Settings.get().enable_animations)
|
||||||
|
return;
|
||||||
|
|
||||||
params = Params.parse(params, {
|
params = Params.parse(params, {
|
||||||
offset: WIGGLE_OFFSET,
|
offset: WIGGLE_OFFSET,
|
||||||
duration: WIGGLE_DURATION,
|
duration: WIGGLE_DURATION,
|
||||||
|
|||||||
@@ -5,6 +5,5 @@
|
|||||||
|
|
||||||
<file>misc/config.js</file>
|
<file>misc/config.js</file>
|
||||||
<file>misc/fileUtils.js</file>
|
<file>misc/fileUtils.js</file>
|
||||||
<file>misc/params.js</file>
|
|
||||||
</gresource>
|
</gresource>
|
||||||
</gresources>
|
</gresources>
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ const PortalHelperSecurityLevel = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
|
const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
|
||||||
const CONNECTIVITY_CHECK_URI = `http://${CONNECTIVITY_CHECK_HOST}`;
|
|
||||||
const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
|
const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
|
||||||
|
|
||||||
const HelperDBusInterface = loadInterfaceXML('org.gnome.Shell.PortalHelper');
|
const HelperDBusInterface = loadInterfaceXML('org.gnome.Shell.PortalHelper');
|
||||||
@@ -103,7 +102,7 @@ class PortalWindow extends Gtk.ApplicationWindow {
|
|||||||
this._headerBar.show();
|
this._headerBar.show();
|
||||||
|
|
||||||
if (!url) {
|
if (!url) {
|
||||||
url = CONNECTIVITY_CHECK_URI;
|
url = 'http://%s'.format(CONNECTIVITY_CHECK_HOST);
|
||||||
this._originalUrlWasGnome = true;
|
this._originalUrlWasGnome = true;
|
||||||
} else {
|
} else {
|
||||||
this._originalUrlWasGnome = false;
|
this._originalUrlWasGnome = false;
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<gresources>
|
|
||||||
<gresource prefix="/org/gnome/shell">
|
|
||||||
<file>extensionPrefs/main.js</file>
|
|
||||||
|
|
||||||
<file>misc/config.js</file>
|
|
||||||
<file>misc/extensionUtils.js</file>
|
|
||||||
<file>misc/fileUtils.js</file>
|
|
||||||
<file>misc/params.js</file>
|
|
||||||
|
|
||||||
<file alias="css/application.css">extensionPrefs/css/application.css</file>
|
|
||||||
|
|
||||||
<file alias="ui/extension-row.ui">extensionPrefs/ui/extension-row.ui</file>
|
|
||||||
<file alias="ui/extensions-window.ui">extensionPrefs/ui/extensions-window.ui</file>
|
|
||||||
</gresource>
|
|
||||||
</gresources>
|
|
||||||
@@ -138,7 +138,7 @@ var AccessDialogDBus = class {
|
|||||||
let [handle, appId, parentWindow_, title, description, body, options] = params;
|
let [handle, appId, parentWindow_, title, description, body, options] = params;
|
||||||
// We probably want to use parentWindow and global.display.focus_window
|
// We probably want to use parentWindow and global.display.focus_window
|
||||||
// for this check in the future
|
// for this check in the future
|
||||||
if (appId && `${appId}.desktop` != this._windowTracker.focus_app.id) {
|
if (appId && '%s.desktop'.format(appId) != this._windowTracker.focus_app.id) {
|
||||||
invocation.return_error_literal(Gio.DBusError,
|
invocation.return_error_literal(Gio.DBusError,
|
||||||
Gio.DBusError.ACCESS_DENIED,
|
Gio.DBusError.ACCESS_DENIED,
|
||||||
'Only the focused app is allowed to show a system access dialog');
|
'Only the focused app is allowed to show a system access dialog');
|
||||||
|
|||||||
@@ -280,12 +280,10 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
super._onDestroy();
|
|
||||||
|
|
||||||
if (this._thumbnails)
|
|
||||||
this._destroyThumbnails();
|
|
||||||
if (this._thumbnailTimeoutId != 0)
|
if (this._thumbnailTimeoutId != 0)
|
||||||
GLib.source_remove(this._thumbnailTimeoutId);
|
GLib.source_remove(this._thumbnailTimeoutId);
|
||||||
|
|
||||||
|
super._onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -365,8 +363,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
this._thumbnails = null;
|
this._thumbnails = null;
|
||||||
if (this._switcherList._items[this._selectedIndex])
|
this._switcherList.removeAccessibleState(this._selectedIndex, Atk.StateType.EXPANDED);
|
||||||
this._switcherList._items[this._selectedIndex].remove_accessible_state(Atk.StateType.EXPANDED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createThumbnails() {
|
_createThumbnails() {
|
||||||
@@ -395,7 +392,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
this._switcherList._items[this._selectedIndex].add_accessible_state(Atk.StateType.EXPANDED);
|
this._switcherList.addAccessibleState(this._selectedIndex, Atk.StateType.EXPANDED);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -776,7 +773,9 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
|
|||||||
|
|
||||||
// We override SwitcherList's _onItemEnter method to delay
|
// We override SwitcherList's _onItemEnter method to delay
|
||||||
// activation when the thumbnail list is open
|
// activation when the thumbnail list is open
|
||||||
_onItemEnter(index) {
|
_onItemEnter(item) {
|
||||||
|
const index = this._items.indexOf(item);
|
||||||
|
|
||||||
if (this._mouseTimeOutId != 0)
|
if (this._mouseTimeOutId != 0)
|
||||||
GLib.source_remove(this._mouseTimeOutId);
|
GLib.source_remove(this._mouseTimeOutId);
|
||||||
if (this._altTabPopup.thumbnailsVisible) {
|
if (this._altTabPopup.thumbnailsVisible) {
|
||||||
|
|||||||
@@ -71,15 +71,9 @@ function _getFolderName(folder) {
|
|||||||
let name = folder.get_string('name');
|
let name = folder.get_string('name');
|
||||||
|
|
||||||
if (folder.get_boolean('translate')) {
|
if (folder.get_boolean('translate')) {
|
||||||
let keyfile = new GLib.KeyFile();
|
let translated = Shell.util_get_translated_folder_name(name);
|
||||||
let path = `desktop-directories/${name}`;
|
if (translated !== null)
|
||||||
|
return translated;
|
||||||
try {
|
|
||||||
keyfile.load_from_data_dirs(path, GLib.KeyFileFlags.NONE);
|
|
||||||
name = keyfile.get_locale_string('Desktop Entry', 'Name', null);
|
|
||||||
} catch (e) {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
@@ -120,15 +114,9 @@ function _findBestFolderName(apps) {
|
|||||||
}, commonCategories);
|
}, commonCategories);
|
||||||
|
|
||||||
for (let category of commonCategories) {
|
for (let category of commonCategories) {
|
||||||
let keyfile = new GLib.KeyFile();
|
let translated = Shell.util_get_translated_folder_name(category);
|
||||||
let path = 'desktop-directories/%s.directory'.format(category);
|
if (translated !== null)
|
||||||
|
return translated;
|
||||||
try {
|
|
||||||
keyfile.load_from_data_dirs(path, GLib.KeyFileFlags.NONE);
|
|
||||||
return keyfile.get_locale_string('Desktop Entry', 'Name', null);
|
|
||||||
} catch (e) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@@ -204,6 +192,9 @@ var BaseAppView = GObject.registerClass({
|
|||||||
this._items.set(icon.id, icon);
|
this._items.set(icon.id, icon);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this._animateLaterId = 0;
|
||||||
|
this._viewLoadedHandlerId = 0;
|
||||||
|
this._viewIsReady = true;
|
||||||
this.emit('view-loaded');
|
this.emit('view-loaded');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,7 +210,7 @@ var BaseAppView = GObject.registerClass({
|
|||||||
if (this._items.has(id))
|
if (this._items.has(id))
|
||||||
this._items.get(id).navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
|
this._items.get(id).navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
|
||||||
else
|
else
|
||||||
log(`No such application ${id}`);
|
log('No such application %s'.format(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
selectApp(id) {
|
selectApp(id) {
|
||||||
@@ -253,6 +244,18 @@ var BaseAppView = GObject.registerClass({
|
|||||||
Main.overview.dash.showAppsButton);
|
Main.overview.dash.showAppsButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_clearAnimateLater() {
|
||||||
|
if (this._animateLaterId) {
|
||||||
|
Meta.later_remove(this._animateLaterId);
|
||||||
|
this._animateLaterId = 0;
|
||||||
|
}
|
||||||
|
if (this._viewLoadedHandlerId) {
|
||||||
|
this.disconnect(this._viewLoadedHandlerId);
|
||||||
|
this._viewLoadedHandlerId = 0;
|
||||||
|
}
|
||||||
|
this._grid.opacity = 255;
|
||||||
|
}
|
||||||
|
|
||||||
animate(animationDirection, onComplete) {
|
animate(animationDirection, onComplete) {
|
||||||
if (onComplete) {
|
if (onComplete) {
|
||||||
let animationDoneId = this._grid.connect('animation-done', () => {
|
let animationDoneId = this._grid.connect('animation-done', () => {
|
||||||
@@ -261,16 +264,38 @@ var BaseAppView = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._clearAnimateLater();
|
||||||
|
|
||||||
if (animationDirection == IconGrid.AnimationDirection.IN) {
|
if (animationDirection == IconGrid.AnimationDirection.IN) {
|
||||||
let id = this._grid.connect('paint', () => {
|
const doSpringAnimationLater = laterType => {
|
||||||
this._grid.disconnect(id);
|
this._animateLaterId = Meta.later_add(laterType,
|
||||||
|
() => {
|
||||||
|
this._animateLaterId = 0;
|
||||||
this._doSpringAnimation(animationDirection);
|
this._doSpringAnimation(animationDirection);
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this._viewIsReady) {
|
||||||
|
this._grid.opacity = 0;
|
||||||
|
doSpringAnimationLater(Meta.LaterType.IDLE);
|
||||||
|
} else {
|
||||||
|
this._viewLoadedHandlerId = this.connect('view-loaded',
|
||||||
|
() => {
|
||||||
|
this._clearAnimateLater();
|
||||||
|
doSpringAnimationLater(Meta.LaterType.BEFORE_REDRAW);
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this._doSpringAnimation(animationDirection);
|
this._doSpringAnimation(animationDirection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vfunc_unmap() {
|
||||||
|
this._clearAnimateLater();
|
||||||
|
super.vfunc_unmap();
|
||||||
|
}
|
||||||
|
|
||||||
animateSwitch(animationDirection) {
|
animateSwitch(animationDirection) {
|
||||||
this.remove_all_transitions();
|
this.remove_all_transitions();
|
||||||
this._grid.remove_all_transitions();
|
this._grid.remove_all_transitions();
|
||||||
@@ -293,7 +318,7 @@ var BaseAppView = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
adaptToSize(_width, _height) {
|
adaptToSize(_width, _height) {
|
||||||
throw new GObject.NotImplementedError(`adaptToSize in ${this.constructor.name}`);
|
throw new GObject.NotImplementedError('adaptToSize in %s'.format(this.constructor.name));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -387,15 +412,19 @@ var AllView = GObject.registerClass({
|
|||||||
this._lastOvershootY = -1;
|
this._lastOvershootY = -1;
|
||||||
this._lastOvershootTimeoutId = 0;
|
this._lastOvershootTimeoutId = 0;
|
||||||
|
|
||||||
|
this._viewIsReady = false;
|
||||||
|
|
||||||
Main.overview.connect('hidden', () => this.goToPage(0));
|
Main.overview.connect('hidden', () => this.goToPage(0));
|
||||||
|
|
||||||
this._redisplayWorkId = Main.initializeDeferredWork(this, this._redisplay.bind(this));
|
this._redisplayWorkId = Main.initializeDeferredWork(this, this._redisplay.bind(this));
|
||||||
|
|
||||||
Shell.AppSystem.get_default().connect('installed-changed', () => {
|
Shell.AppSystem.get_default().connect('installed-changed', () => {
|
||||||
|
this._viewIsReady = false;
|
||||||
Main.queueDeferredWork(this._redisplayWorkId);
|
Main.queueDeferredWork(this._redisplayWorkId);
|
||||||
});
|
});
|
||||||
this._folderSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
|
this._folderSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
|
||||||
this._folderSettings.connect('changed::folder-children', () => {
|
this._folderSettings.connect('changed::folder-children', () => {
|
||||||
|
this._viewIsReady = false;
|
||||||
Main.queueDeferredWork(this._redisplayWorkId);
|
Main.queueDeferredWork(this._redisplayWorkId);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -431,6 +460,10 @@ var AllView = GObject.registerClass({
|
|||||||
|
|
||||||
_redisplay() {
|
_redisplay() {
|
||||||
super._redisplay();
|
super._redisplay();
|
||||||
|
|
||||||
|
this._folderIcons.forEach(icon => {
|
||||||
|
icon.view._redisplay();
|
||||||
|
});
|
||||||
this._refilterApps();
|
this._refilterApps();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +525,7 @@ var AllView = GObject.registerClass({
|
|||||||
|
|
||||||
let folders = this._folderSettings.get_strv('folder-children');
|
let folders = this._folderSettings.get_strv('folder-children');
|
||||||
folders.forEach(id => {
|
folders.forEach(id => {
|
||||||
let path = `${this._folderSettings.path}folders/${id}/`;
|
let path = '%sfolders/%s/'.format(this._folderSettings.path, id);
|
||||||
let icon = this._items.get(id);
|
let icon = this._items.get(id);
|
||||||
if (!icon) {
|
if (!icon) {
|
||||||
icon = new FolderIcon(id, path, this);
|
icon = new FolderIcon(id, path, this);
|
||||||
@@ -699,8 +732,6 @@ var AllView = GObject.registerClass({
|
|||||||
|
|
||||||
// Toggle search entry
|
// Toggle search entry
|
||||||
Main.overview.searchEntry.reactive = !isOpen;
|
Main.overview.searchEntry.reactive = !isOpen;
|
||||||
Main.overview.searchEntry.clutter_text.reactive = !isOpen;
|
|
||||||
Main.overview.searchEntry.clutter_text.editable = !isOpen;
|
|
||||||
|
|
||||||
this._displayingPopup = isOpen;
|
this._displayingPopup = isOpen;
|
||||||
});
|
});
|
||||||
@@ -1259,8 +1290,8 @@ var AppSearchProvider = class AppSearchProvider {
|
|||||||
let results = [];
|
let results = [];
|
||||||
groups.forEach(group => {
|
groups.forEach(group => {
|
||||||
group = group.filter(appID => {
|
group = group.filter(appID => {
|
||||||
let app = Gio.DesktopAppInfo.new(appID);
|
const app = this._appSys.lookup_app(appID);
|
||||||
return app && app.should_show();
|
return app && app.app_info.should_show();
|
||||||
});
|
});
|
||||||
results = results.concat(group.sort(
|
results = results.concat(group.sort(
|
||||||
(a, b) => usage.compare(a, b)
|
(a, b) => usage.compare(a, b)
|
||||||
@@ -1308,7 +1339,7 @@ class FolderView extends BaseAppView {
|
|||||||
x_expand: true,
|
x_expand: true,
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
});
|
});
|
||||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
|
||||||
this.add_actor(this._scrollView);
|
this.add_actor(this._scrollView);
|
||||||
|
|
||||||
let scrollableContainer = new St.BoxLayout({
|
let scrollableContainer = new St.BoxLayout({
|
||||||
@@ -1324,7 +1355,6 @@ class FolderView extends BaseAppView {
|
|||||||
action.connect('pan', this._onPan.bind(this));
|
action.connect('pan', this._onPan.bind(this));
|
||||||
this._scrollView.add_action(action);
|
this._scrollView.add_action(action);
|
||||||
|
|
||||||
this._folder.connect('changed', this._redisplay.bind(this));
|
|
||||||
this._redisplay();
|
this._redisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1429,6 +1459,22 @@ class FolderView extends BaseAppView {
|
|||||||
return apps;
|
return apps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addApp(app) {
|
||||||
|
let folderApps = this._folder.get_strv('apps');
|
||||||
|
folderApps.push(app.id);
|
||||||
|
|
||||||
|
this._folder.set_strv('apps', folderApps);
|
||||||
|
|
||||||
|
// Also remove from 'excluded-apps' if the app id is listed
|
||||||
|
// there. This is only possible on categories-based folders.
|
||||||
|
let excludedApps = this._folder.get_strv('excluded-apps');
|
||||||
|
let index = excludedApps.indexOf(app.id);
|
||||||
|
if (index >= 0) {
|
||||||
|
excludedApps.splice(index, 1);
|
||||||
|
this._folder.set_strv('excluded-apps', excludedApps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
removeApp(app) {
|
removeApp(app) {
|
||||||
let folderApps = this._folder.get_strv('apps');
|
let folderApps = this._folder.get_strv('apps');
|
||||||
let index = folderApps.indexOf(app.id);
|
let index = folderApps.indexOf(app.id);
|
||||||
@@ -1459,8 +1505,6 @@ class FolderView extends BaseAppView {
|
|||||||
} else {
|
} else {
|
||||||
this._folder.set_strv('apps', folderApps);
|
this._folder.set_strv('apps', folderApps);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1494,26 +1538,26 @@ var FolderIcon = GObject.registerClass({
|
|||||||
|
|
||||||
this.view = new FolderView(this._folder, id, parentView);
|
this.view = new FolderView(this._folder, id, parentView);
|
||||||
|
|
||||||
this._itemDragBeginId = Main.overview.connect(
|
this._iconIsHovering = false;
|
||||||
'item-drag-begin', this._onDragBegin.bind(this));
|
|
||||||
this._itemDragEndId = Main.overview.connect(
|
|
||||||
'item-drag-end', this._onDragEnd.bind(this));
|
|
||||||
|
|
||||||
this.connect('destroy', this._onDestroy.bind(this));
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._folder.connect('changed', this._redisplay.bind(this));
|
this._folderChangedId = this._folder.connect(
|
||||||
this._redisplay();
|
'changed', this._sync.bind(this));
|
||||||
|
this._sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
Main.overview.disconnect(this._itemDragBeginId);
|
if (this._dragMonitor) {
|
||||||
Main.overview.disconnect(this._itemDragEndId);
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
|
this._dragMonitor = null;
|
||||||
|
}
|
||||||
|
|
||||||
this.view.destroy();
|
this.view.destroy();
|
||||||
|
|
||||||
if (this._spaceReadySignalId) {
|
if (this._folderChangedId) {
|
||||||
this._parentView.disconnect(this._spaceReadySignalId);
|
this._folder.disconnect(this._folderChangedId);
|
||||||
this._spaceReadySignalId = 0;
|
delete this._folderChangedId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._dialog)
|
if (this._dialog)
|
||||||
@@ -1541,29 +1585,32 @@ var FolderIcon = GObject.registerClass({
|
|||||||
return this.view.getAllItems().map(item => item.id);
|
return this.view.getAllItems().map(item => item.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragBegin() {
|
_setHoveringByDnd(hovering) {
|
||||||
|
if (this._iconIsHovering == hovering)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._iconIsHovering = hovering;
|
||||||
|
|
||||||
|
if (hovering) {
|
||||||
this._dragMonitor = {
|
this._dragMonitor = {
|
||||||
dragMotion: this._onDragMotion.bind(this),
|
dragMotion: this._onDragMotion.bind(this),
|
||||||
};
|
};
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
|
this.add_style_pseudo_class('drop');
|
||||||
|
} else {
|
||||||
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
|
this.remove_style_pseudo_class('drop');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragMotion(dragEvent) {
|
_onDragMotion(dragEvent) {
|
||||||
let target = dragEvent.targetActor;
|
if (!this.contains(dragEvent.targetActor) ||
|
||||||
|
!this._canAccept(dragEvent.source))
|
||||||
if (!this.contains(target) || !this._canAccept(dragEvent.source))
|
this._setHoveringByDnd(false);
|
||||||
this.remove_style_pseudo_class('drop');
|
|
||||||
else
|
|
||||||
this.add_style_pseudo_class('drop');
|
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragEnd() {
|
|
||||||
this.remove_style_pseudo_class('drop');
|
|
||||||
DND.removeDragMonitor(this._dragMonitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
_canAccept(source) {
|
_canAccept(source) {
|
||||||
if (!(source instanceof AppIcon))
|
if (!(source instanceof AppIcon))
|
||||||
return false;
|
return false;
|
||||||
@@ -1582,27 +1629,18 @@ var FolderIcon = GObject.registerClass({
|
|||||||
if (!this._canAccept(source))
|
if (!this._canAccept(source))
|
||||||
return DND.DragMotionResult.NO_DROP;
|
return DND.DragMotionResult.NO_DROP;
|
||||||
|
|
||||||
|
this._setHoveringByDnd(true);
|
||||||
|
|
||||||
return DND.DragMotionResult.MOVE_DROP;
|
return DND.DragMotionResult.MOVE_DROP;
|
||||||
}
|
}
|
||||||
|
|
||||||
acceptDrop(source) {
|
acceptDrop(source) {
|
||||||
|
this._setHoveringByDnd(false);
|
||||||
|
|
||||||
if (!this._canAccept(source))
|
if (!this._canAccept(source))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let app = source.app;
|
this.view.addApp(source.app);
|
||||||
let folderApps = this._folder.get_strv('apps');
|
|
||||||
folderApps.push(app.id);
|
|
||||||
|
|
||||||
this._folder.set_strv('apps', folderApps);
|
|
||||||
|
|
||||||
// Also remove from 'excluded-apps' if the app id is listed
|
|
||||||
// there. This is only possible on categories-based folders.
|
|
||||||
let excludedApps = this._folder.get_strv('excluded-apps');
|
|
||||||
let index = excludedApps.indexOf(app.id);
|
|
||||||
if (index >= 0) {
|
|
||||||
excludedApps.splice(index, 1);
|
|
||||||
this._folder.set_strv('excluded-apps', excludedApps);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1617,11 +1655,11 @@ var FolderIcon = GObject.registerClass({
|
|||||||
this.emit('name-changed');
|
this.emit('name-changed');
|
||||||
}
|
}
|
||||||
|
|
||||||
_redisplay() {
|
_sync() {
|
||||||
|
this.emit('apps-changed');
|
||||||
this._updateName();
|
this._updateName();
|
||||||
this.visible = this.view.getAllItems().length > 0;
|
this.visible = this.view.getAllItems().length > 0;
|
||||||
this.icon.update();
|
this.icon.update();
|
||||||
this.emit('apps-changed');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_createIcon(iconSize) {
|
_createIcon(iconSize) {
|
||||||
@@ -1657,10 +1695,6 @@ var AppFolderDialog = GObject.registerClass({
|
|||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
});
|
});
|
||||||
this.add_constraint(new Clutter.BindConstraint({
|
|
||||||
source: Main.overview.viewSelector,
|
|
||||||
coordinate: Clutter.BindCoordinate.ALL,
|
|
||||||
}));
|
|
||||||
|
|
||||||
this._source = source;
|
this._source = source;
|
||||||
this._folder = folder;
|
this._folder = folder;
|
||||||
@@ -1906,6 +1940,7 @@ var AppFolderDialog = GObject.registerClass({
|
|||||||
|
|
||||||
vfunc_allocate(box, flags) {
|
vfunc_allocate(box, flags) {
|
||||||
let contentBox = this.get_theme_node().get_content_box(box);
|
let contentBox = this.get_theme_node().get_content_box(box);
|
||||||
|
contentBox = this._viewBox.get_theme_node().get_content_box(contentBox);
|
||||||
|
|
||||||
let [, entryBoxHeight] = this._entryBox.get_size();
|
let [, entryBoxHeight] = this._entryBox.get_size();
|
||||||
let spacing = this._viewBox.layout_manager.spacing;
|
let spacing = this._viewBox.layout_manager.spacing;
|
||||||
@@ -1914,6 +1949,8 @@ var AppFolderDialog = GObject.registerClass({
|
|||||||
contentBox.get_width(),
|
contentBox.get_width(),
|
||||||
contentBox.get_height() - entryBoxHeight - spacing);
|
contentBox.get_height() - entryBoxHeight - spacing);
|
||||||
|
|
||||||
|
this._view._grid.topPadding = 0;
|
||||||
|
|
||||||
super.vfunc_allocate(box, flags);
|
super.vfunc_allocate(box, flags);
|
||||||
|
|
||||||
// We can only start zooming after receiving an allocation
|
// We can only start zooming after receiving an allocation
|
||||||
@@ -2029,7 +2066,6 @@ var AppIcon = GObject.registerClass({
|
|||||||
|
|
||||||
this._delegate = this;
|
this._delegate = this;
|
||||||
|
|
||||||
this._hasDndHover = false;
|
|
||||||
this._folderPreviewId = 0;
|
this._folderPreviewId = 0;
|
||||||
|
|
||||||
// Get the isDraggable property without passing it on to the BaseIcon:
|
// Get the isDraggable property without passing it on to the BaseIcon:
|
||||||
@@ -2078,11 +2114,7 @@ var AppIcon = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dragMonitor = null;
|
this._otherIconIsHovering = false;
|
||||||
this._itemDragBeginId = Main.overview.connect(
|
|
||||||
'item-drag-begin', this._onDragBegin.bind(this));
|
|
||||||
this._itemDragEndId = Main.overview.connect(
|
|
||||||
'item-drag-end', this._onDragEnd.bind(this));
|
|
||||||
|
|
||||||
this._menuTimeoutId = 0;
|
this._menuTimeoutId = 0;
|
||||||
this._stateChangedId = this.app.connect('notify::state', () => {
|
this._stateChangedId = this.app.connect('notify::state', () => {
|
||||||
@@ -2094,9 +2126,6 @@ var AppIcon = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
Main.overview.disconnect(this._itemDragBeginId);
|
|
||||||
Main.overview.disconnect(this._itemDragEndId);
|
|
||||||
|
|
||||||
if (this._folderPreviewId > 0) {
|
if (this._folderPreviewId > 0) {
|
||||||
GLib.source_remove(this._folderPreviewId);
|
GLib.source_remove(this._folderPreviewId);
|
||||||
this._folderPreviewId = 0;
|
this._folderPreviewId = 0;
|
||||||
@@ -2278,7 +2307,7 @@ var AppIcon = GObject.registerClass({
|
|||||||
|
|
||||||
shellWorkspaceLaunch(params) {
|
shellWorkspaceLaunch(params) {
|
||||||
let { stack } = new Error();
|
let { stack } = new Error();
|
||||||
log(`shellWorkspaceLaunch is deprecated, use app.open_new_window() instead\n${stack}`);
|
log('shellWorkspaceLaunch is deprecated, use app.open_new_window() instead\n%s'.format(stack));
|
||||||
|
|
||||||
params = Params.parse(params, { workspace: -1,
|
params = Params.parse(params, { workspace: -1,
|
||||||
timestamp: 0 });
|
timestamp: 0 });
|
||||||
@@ -2343,7 +2372,17 @@ var AppIcon = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_setHoveringByDnd(hovering) {
|
_setHoveringByDnd(hovering) {
|
||||||
|
if (this._otherIconIsHovering == hovering)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._otherIconIsHovering = hovering;
|
||||||
|
|
||||||
if (hovering) {
|
if (hovering) {
|
||||||
|
this._dragMonitor = {
|
||||||
|
dragMotion: this._onDragMotion.bind(this),
|
||||||
|
};
|
||||||
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
|
|
||||||
if (this._folderPreviewId > 0)
|
if (this._folderPreviewId > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -2355,6 +2394,8 @@ var AppIcon = GObject.registerClass({
|
|||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
|
|
||||||
if (this._folderPreviewId > 0) {
|
if (this._folderPreviewId > 0) {
|
||||||
GLib.source_remove(this._folderPreviewId);
|
GLib.source_remove(this._folderPreviewId);
|
||||||
this._folderPreviewId = 0;
|
this._folderPreviewId = 0;
|
||||||
@@ -2364,32 +2405,13 @@ var AppIcon = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragBegin() {
|
|
||||||
this._dragMonitor = {
|
|
||||||
dragMotion: this._onDragMotion.bind(this),
|
|
||||||
};
|
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
_onDragMotion(dragEvent) {
|
_onDragMotion(dragEvent) {
|
||||||
let target = dragEvent.targetActor;
|
if (!this.contains(dragEvent.targetActor))
|
||||||
let isHovering = target == this || this.contains(target);
|
this._setHoveringByDnd(false);
|
||||||
let canDrop = this._canAccept(dragEvent.source);
|
|
||||||
let hasDndHover = isHovering && canDrop;
|
|
||||||
|
|
||||||
if (this._hasDndHover != hasDndHover) {
|
|
||||||
this._setHoveringByDnd(hasDndHover);
|
|
||||||
this._hasDndHover = hasDndHover;
|
|
||||||
}
|
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragEnd() {
|
|
||||||
this.remove_style_pseudo_class('drop');
|
|
||||||
DND.removeDragMonitor(this._dragMonitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleDragOver(source) {
|
handleDragOver(source) {
|
||||||
if (source == this)
|
if (source == this)
|
||||||
return DND.DragMotionResult.NO_DROP;
|
return DND.DragMotionResult.NO_DROP;
|
||||||
@@ -2397,6 +2419,8 @@ var AppIcon = GObject.registerClass({
|
|||||||
if (!this._canAccept(source))
|
if (!this._canAccept(source))
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
|
|
||||||
|
this._setHoveringByDnd(true);
|
||||||
|
|
||||||
return DND.DragMotionResult.MOVE_DROP;
|
return DND.DragMotionResult.MOVE_DROP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2441,7 +2465,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
|||||||
Main.uiGroup.add_actor(this.actor);
|
Main.uiGroup.add_actor(this.actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
_redisplay() {
|
_rebuildMenu() {
|
||||||
this.removeAll();
|
this.removeAll();
|
||||||
|
|
||||||
let windows = this._source.app.get_windows().filter(
|
let windows = this._source.app.get_windows().filter(
|
||||||
@@ -2558,7 +2582,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
popup(_activatingButton) {
|
popup(_activatingButton) {
|
||||||
this._redisplay();
|
this._rebuildMenu();
|
||||||
this.open();
|
this.open();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class AppFavorites {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.FAVORITE_APPS_KEY = 'favorite-apps';
|
this.FAVORITE_APPS_KEY = 'favorite-apps';
|
||||||
this._favorites = {};
|
this._favorites = {};
|
||||||
global.settings.connect(`changed::${this.FAVORITE_APPS_KEY}`, this._onFavsChanged.bind(this));
|
global.settings.connect('changed::%s'.format(this.FAVORITE_APPS_KEY), this._onFavsChanged.bind(this));
|
||||||
this.reload();
|
this.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
|
|||||||
let app = Shell.AppSystem.get_default().lookup_app(desktopFile);
|
let app = Shell.AppSystem.get_default().lookup_app(desktopFile);
|
||||||
|
|
||||||
if (!app) {
|
if (!app) {
|
||||||
log(`Settings panel for desktop file ${desktopFile} could not be loaded!`);
|
log('Settings panel for desktop file %s could not be loaded!'.format(desktopFile));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ var ELLIPSIS_CHAR = '\u2026';
|
|||||||
|
|
||||||
var MESSAGE_ICON_SIZE = -1; // pick up from CSS
|
var MESSAGE_ICON_SIZE = -1; // pick up from CSS
|
||||||
|
|
||||||
var NC_ = (context, str) => `${context}\u0004${str}`;
|
var NC_ = (context, str) => '%s\u0004%s'.format(context, str);
|
||||||
|
|
||||||
function sameYear(dateA, dateB) {
|
function sameYear(dateA, dateB) {
|
||||||
return dateA.getYear() == dateB.getYear();
|
return dateA.getYear() == dateB.getYear();
|
||||||
@@ -114,26 +114,26 @@ var EventSourceBase = GObject.registerClass({
|
|||||||
Signals: { 'changed': {} },
|
Signals: { 'changed': {} },
|
||||||
}, class EventSourceBase extends GObject.Object {
|
}, class EventSourceBase extends GObject.Object {
|
||||||
get isLoading() {
|
get isLoading() {
|
||||||
throw new GObject.NotImplementedError(`isLoading in ${this.constructor.name}`);
|
throw new GObject.NotImplementedError('isLoading in %s'.format(this.constructor.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasCalendars() {
|
get hasCalendars() {
|
||||||
throw new GObject.NotImplementedError(`hasCalendars in ${this.constructor.name}`);
|
throw new GObject.NotImplementedError('hasCalendars in %s'.format(this.constructor.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
requestRange(_begin, _end) {
|
requestRange(_begin, _end) {
|
||||||
throw new GObject.NotImplementedError(`requestRange in ${this.constructor.name}`);
|
throw new GObject.NotImplementedError('requestRange in %s'.format(this.constructor.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
getEvents(_begin, _end) {
|
getEvents(_begin, _end) {
|
||||||
throw new GObject.NotImplementedError(`getEvents in ${this.constructor.name}`);
|
throw new GObject.NotImplementedError('getEvents in %s'.format(this.constructor.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
hasEvents(_day) {
|
hasEvents(_day) {
|
||||||
throw new GObject.NotImplementedError(`hasEvents in ${this.constructor.name}`);
|
throw new GObject.NotImplementedError('hasEvents in %s'.format(this.constructor.name));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ class DBusEventSource extends EventSourceBase {
|
|||||||
// about the HasCalendars property and would cause an exception trying
|
// about the HasCalendars property and would cause an exception trying
|
||||||
// to read it)
|
// to read it)
|
||||||
} else {
|
} else {
|
||||||
log(`Error loading calendars: ${e.message}`);
|
log('Error loading calendars: %s'.format(e.message));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ var Calendar = GObject.registerClass({
|
|||||||
this._weekStart = Shell.util_get_week_start();
|
this._weekStart = Shell.util_get_week_start();
|
||||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.calendar' });
|
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.calendar' });
|
||||||
|
|
||||||
this._settings.connect(`changed::${SHOW_WEEKDATE_KEY}`, this._onSettingsChange.bind(this));
|
this._settings.connect('changed::%s'.format(SHOW_WEEKDATE_KEY), this._onSettingsChange.bind(this));
|
||||||
this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY);
|
this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -626,13 +626,13 @@ var Calendar = GObject.registerClass({
|
|||||||
|
|
||||||
// Hack used in lieu of border-collapse - see gnome-shell.css
|
// Hack used in lieu of border-collapse - see gnome-shell.css
|
||||||
if (row == 2)
|
if (row == 2)
|
||||||
styleClass = `calendar-day-top ${styleClass}`;
|
styleClass = 'calendar-day-top %s'.format(styleClass);
|
||||||
|
|
||||||
let leftMost = rtl
|
let leftMost = rtl
|
||||||
? iter.getDay() == (this._weekStart + 6) % 7
|
? iter.getDay() == (this._weekStart + 6) % 7
|
||||||
: iter.getDay() == this._weekStart;
|
: iter.getDay() == this._weekStart;
|
||||||
if (leftMost)
|
if (leftMost)
|
||||||
styleClass = `calendar-day-left ${styleClass}`;
|
styleClass = 'calendar-day-left %s'.format(styleClass);
|
||||||
|
|
||||||
if (sameDay(now, iter))
|
if (sameDay(now, iter))
|
||||||
styleClass += ' calendar-today';
|
styleClass += ' calendar-today';
|
||||||
@@ -738,15 +738,15 @@ class EventMessage extends MessageList.Message {
|
|||||||
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
|
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
|
||||||
if (this._event.date < periodBegin && !this._event.allDay) {
|
if (this._event.date < periodBegin && !this._event.allDay) {
|
||||||
if (rtl)
|
if (rtl)
|
||||||
title = `${title}${ELLIPSIS_CHAR}`;
|
title = '%s%s'.format(title, ELLIPSIS_CHAR);
|
||||||
else
|
else
|
||||||
title = `${ELLIPSIS_CHAR}${title}`;
|
title = '%s%s'.format(ELLIPSIS_CHAR, title);
|
||||||
}
|
}
|
||||||
if (this._event.end > periodEnd && !this._event.allDay) {
|
if (this._event.end > periodEnd && !this._event.allDay) {
|
||||||
if (rtl)
|
if (rtl)
|
||||||
title = `${ELLIPSIS_CHAR}${title}`;
|
title = '%s%s'.format(ELLIPSIS_CHAR, title);
|
||||||
else
|
else
|
||||||
title = `${title}${ELLIPSIS_CHAR}`;
|
title = '%s%s'.format(title, ELLIPSIS_CHAR);
|
||||||
}
|
}
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
@@ -837,7 +837,8 @@ class EventsSection extends MessageList.MessageListSection {
|
|||||||
this._title.connect('clicked', this._onTitleClicked.bind(this));
|
this._title.connect('clicked', this._onTitleClicked.bind(this));
|
||||||
this._title.connect('key-focus-in', this._onKeyFocusIn.bind(this));
|
this._title.connect('key-focus-in', this._onKeyFocusIn.bind(this));
|
||||||
|
|
||||||
Shell.AppSystem.get_default().connect('installed-changed',
|
this._appSys = Shell.AppSystem.get_default();
|
||||||
|
this._appSys.connect('installed-changed',
|
||||||
this._appInstalledChanged.bind(this));
|
this._appInstalledChanged.bind(this));
|
||||||
this._appInstalledChanged();
|
this._appInstalledChanged();
|
||||||
}
|
}
|
||||||
@@ -931,10 +932,13 @@ class EventsSection extends MessageList.MessageListSection {
|
|||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
Main.panel.closeCalendar();
|
Main.panel.closeCalendar();
|
||||||
|
|
||||||
let app = this._getCalendarApp();
|
let appInfo = this._getCalendarApp();
|
||||||
if (app.get_id() == 'evolution.desktop')
|
if (appInfo.get_id() === 'org.gnome.Evolution.desktop') {
|
||||||
app = Gio.DesktopAppInfo.new('evolution-calendar.desktop');
|
let app = this._appSys.lookup_app('evolution-calendar.desktop');
|
||||||
app.launch([], global.create_app_launch_context(0, -1));
|
if (app)
|
||||||
|
appInfo = app.app_info;
|
||||||
|
}
|
||||||
|
appInfo.launch([], global.create_app_launch_context(0, -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
setDate(date) {
|
setDate(date) {
|
||||||
@@ -1149,17 +1153,22 @@ class CalendarMessageList extends St.Widget {
|
|||||||
let hbox = new St.BoxLayout({ style_class: 'message-list-controls' });
|
let hbox = new St.BoxLayout({ style_class: 'message-list-controls' });
|
||||||
box.add_child(hbox);
|
box.add_child(hbox);
|
||||||
|
|
||||||
hbox.add_child(new St.Label({
|
const dndLabel = new St.Label({
|
||||||
text: _('Do Not Disturb'),
|
text: _('Do Not Disturb'),
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
}));
|
});
|
||||||
|
hbox.add_child(dndLabel);
|
||||||
|
|
||||||
this._dndSwitch = new DoNotDisturbSwitch();
|
this._dndSwitch = new DoNotDisturbSwitch();
|
||||||
this._dndButton = new St.Button({
|
this._dndButton = new St.Button({
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
|
toggle_mode: true,
|
||||||
child: this._dndSwitch,
|
child: this._dndSwitch,
|
||||||
|
label_actor: dndLabel,
|
||||||
});
|
});
|
||||||
this._dndButton.connect('clicked', () => this._dndSwitch.toggle());
|
this._dndButton.bind_property('checked',
|
||||||
|
this._dndSwitch, 'state',
|
||||||
|
GObject.BindingFlags.BIDIRECTIONAL | GObject.BindingFlags.SYNC_CREATE);
|
||||||
hbox.add_child(this._dndButton);
|
hbox.add_child(this._dndButton);
|
||||||
|
|
||||||
this._clearButton = new St.Button({
|
this._clearButton = new St.Button({
|
||||||
@@ -1204,7 +1213,7 @@ class CalendarMessageList extends St.Widget {
|
|||||||
|
|
||||||
for (let prop of ['visible', 'empty', 'can-clear']) {
|
for (let prop of ['visible', 'empty', 'can-clear']) {
|
||||||
connectionsIds.push(
|
connectionsIds.push(
|
||||||
section.connect(`notify::${prop}`, this._sync.bind(this)));
|
section.connect('notify::%s'.format(prop), this._sync.bind(this)));
|
||||||
}
|
}
|
||||||
connectionsIds.push(section.connect('message-focused', (_s, messageActor) => {
|
connectionsIds.push(section.connect('message-focused', (_s, messageActor) => {
|
||||||
Util.ensureActorVisibleInScrollView(this._scrollView, messageActor);
|
Util.ensureActorVisibleInScrollView(this._scrollView, messageActor);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* exported CheckBox */
|
/* exported CheckBox */
|
||||||
const { Clutter, GObject, Pango, St } = imports.gi;
|
const { Atk, Clutter, GObject, Pango, St } = imports.gi;
|
||||||
|
|
||||||
var CheckBox = GObject.registerClass(
|
var CheckBox = GObject.registerClass(
|
||||||
class CheckBox extends St.Button {
|
class CheckBox extends St.Button {
|
||||||
@@ -15,6 +15,7 @@ class CheckBox extends St.Button {
|
|||||||
toggle_mode: true,
|
toggle_mode: true,
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
});
|
});
|
||||||
|
this.set_accessible_role(Atk.Role.CHECK_BOX);
|
||||||
|
|
||||||
this._box = new St.Bin({ y_align: Clutter.ActorAlign.START });
|
this._box = new St.Bin({ y_align: Clutter.ActorAlign.START });
|
||||||
container.add_actor(this._box);
|
container.add_actor(this._box);
|
||||||
@@ -22,6 +23,7 @@ class CheckBox extends St.Button {
|
|||||||
this._label = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
|
this._label = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
|
||||||
this._label.clutter_text.set_line_wrap(true);
|
this._label.clutter_text.set_line_wrap(true);
|
||||||
this._label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
|
this._label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
|
||||||
|
this.set_label_actor(this._label);
|
||||||
container.add_actor(this._label);
|
container.add_actor(this._label);
|
||||||
|
|
||||||
if (label)
|
if (label)
|
||||||
|
|||||||
@@ -188,10 +188,13 @@ var CloseDialog = GObject.registerClass({
|
|||||||
global.stage.disconnect(this._keyFocusChangedId);
|
global.stage.disconnect(this._keyFocusChangedId);
|
||||||
this._keyFocusChangedId = 0;
|
this._keyFocusChangedId = 0;
|
||||||
|
|
||||||
|
this._dialog._dialog.remove_all_transitions();
|
||||||
|
|
||||||
let dialog = this._dialog;
|
let dialog = this._dialog;
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
this._removeWindowEffect();
|
this._removeWindowEffect();
|
||||||
|
|
||||||
|
dialog.makeInactive();
|
||||||
dialog._dialog.ease({
|
dialog._dialog.ease({
|
||||||
scale_y: 0,
|
scale_y: 0,
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
mode: Clutter.AnimationMode.LINEAR,
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ var AutomountManager = class {
|
|||||||
try {
|
try {
|
||||||
drive.stop_finish(res);
|
drive.stop_finish(res);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Unable to stop the drive after drive-eject-button ${e.toString()}`);
|
log('Unable to stop the drive after drive-eject-button %s'.format(e.toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (drive.can_eject()) {
|
} else if (drive.can_eject()) {
|
||||||
@@ -122,7 +122,7 @@ var AutomountManager = class {
|
|||||||
try {
|
try {
|
||||||
drive.eject_with_operation_finish(res);
|
drive.eject_with_operation_finish(res);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Unable to eject the drive after drive-eject-button ${e.toString()}`);
|
log('Unable to eject the drive after drive-eject-button %s'.format(e.toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ var AutomountManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
|
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
|
||||||
log(`Unable to mount volume ${volume.get_name()}: ${e.toString()}`);
|
log('Unable to mount volume %s: %s'.format(volume.get_name(), e.toString()));
|
||||||
this._closeOperation(volume);
|
this._closeOperation(volume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ function startAppForMount(app, mount) {
|
|||||||
retval = app.launch(files,
|
retval = app.launch(files,
|
||||||
global.create_app_launch_context(0, -1));
|
global.create_app_launch_context(0, -1));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Unable to launch the application ${app.get_name()}: ${e}`);
|
log('Unable to launch the application %s: %s'.format(app.get_name(), e.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@@ -105,7 +105,7 @@ var ContentTypeDiscoverer = class {
|
|||||||
try {
|
try {
|
||||||
contentTypes = mount.guess_content_type_finish(res);
|
contentTypes = mount.guess_content_type_finish(res);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Unable to guess content types on added mount ${mount.get_name()}: ${e}`);
|
log('Unable to guess content types on added mount %s: %s'.format(mount.get_name(), e.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contentTypes.length) {
|
if (contentTypes.length) {
|
||||||
|
|||||||
@@ -111,15 +111,11 @@ class KeyringDialog extends ModalDialog.ModalDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateSensitivity(sensitive) {
|
_updateSensitivity(sensitive) {
|
||||||
if (this._passwordEntry) {
|
if (this._passwordEntry)
|
||||||
this._passwordEntry.reactive = sensitive;
|
this._passwordEntry.reactive = sensitive;
|
||||||
this._passwordEntry.clutter_text.editable = sensitive;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._confirmEntry) {
|
if (this._confirmEntry)
|
||||||
this._confirmEntry.reactive = sensitive;
|
this._confirmEntry.reactive = sensitive;
|
||||||
this._confirmEntry.clutter_text.editable = sensitive;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._continueButton.can_focus = sensitive;
|
this._continueButton.can_focus = sensitive;
|
||||||
this._continueButton.reactive = sensitive;
|
this._continueButton.reactive = sensitive;
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
|
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
const Config = imports.misc.config;
|
|
||||||
const Dialog = imports.ui.dialog;
|
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;
|
||||||
const ShellEntry = imports.ui.shellEntry;
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
|
|
||||||
|
Gio._promisify(Shell.NetworkAgent.prototype,
|
||||||
|
'search_vpn_plugin', 'search_vpn_plugin_finish');
|
||||||
|
|
||||||
const VPN_UI_GROUP = 'VPN Plugin UI';
|
const VPN_UI_GROUP = 'VPN Plugin UI';
|
||||||
|
|
||||||
var NetworkSecretDialog = GObject.registerClass(
|
var NetworkSecretDialog = GObject.registerClass(
|
||||||
@@ -199,19 +201,23 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
case 'wpa-none':
|
case 'wpa-none':
|
||||||
case 'wpa-psk':
|
case 'wpa-psk':
|
||||||
case 'sae':
|
case 'sae':
|
||||||
secrets.push({ label: _("Password: "), key: 'psk',
|
secrets.push({ label: _('Password'), key: 'psk',
|
||||||
value: wirelessSecuritySetting.psk || '',
|
value: wirelessSecuritySetting.psk || '',
|
||||||
validate: this._validateWpaPsk, password: true });
|
validate: this._validateWpaPsk, password: true });
|
||||||
break;
|
break;
|
||||||
case 'none': // static WEP
|
case 'none': // static WEP
|
||||||
secrets.push({ label: _("Key: "), key: `wep-key${wirelessSecuritySetting.wep_tx_keyidx}`,
|
secrets.push({
|
||||||
|
label: _('Key'),
|
||||||
|
key: 'wep-key%s'.format(wirelessSecuritySetting.wep_tx_keyidx),
|
||||||
value: wirelessSecuritySetting.get_wep_key(wirelessSecuritySetting.wep_tx_keyidx) || '',
|
value: wirelessSecuritySetting.get_wep_key(wirelessSecuritySetting.wep_tx_keyidx) || '',
|
||||||
wep_key_type: wirelessSecuritySetting.wep_key_type,
|
wep_key_type: wirelessSecuritySetting.wep_key_type,
|
||||||
validate: this._validateStaticWep, password: true });
|
validate: this._validateStaticWep,
|
||||||
|
password: true,
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'ieee8021x':
|
case 'ieee8021x':
|
||||||
if (wirelessSecuritySetting.auth_alg == 'leap') { // Cisco LEAP
|
if (wirelessSecuritySetting.auth_alg == 'leap') { // Cisco LEAP
|
||||||
secrets.push({ label: _("Password: "), key: 'leap-password',
|
secrets.push({ label: _('Password'), key: 'leap-password',
|
||||||
value: wirelessSecuritySetting.leap_password || '', password: true });
|
value: wirelessSecuritySetting.leap_password || '', password: true });
|
||||||
} else { // Dynamic (IEEE 802.1x) WEP
|
} else { // Dynamic (IEEE 802.1x) WEP
|
||||||
this._get8021xSecrets(secrets);
|
this._get8021xSecrets(secrets);
|
||||||
@@ -221,7 +227,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
this._get8021xSecrets(secrets);
|
this._get8021xSecrets(secrets);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log(`Invalid wireless key management: ${wirelessSecuritySetting.key_mgmt}`);
|
log('Invalid wireless key management: %s'.format(wirelessSecuritySetting.key_mgmt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,15 +237,15 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
/* If hints were given we know exactly what we need to ask */
|
/* If hints were given we know exactly what we need to ask */
|
||||||
if (this._settingName == "802-1x" && this._hints.length) {
|
if (this._settingName == "802-1x" && this._hints.length) {
|
||||||
if (this._hints.includes('identity')) {
|
if (this._hints.includes('identity')) {
|
||||||
secrets.push({ label: _("Username: "), key: 'identity',
|
secrets.push({ label: _('Username'), key: 'identity',
|
||||||
value: ieee8021xSetting.identity || '', password: false });
|
value: ieee8021xSetting.identity || '', password: false });
|
||||||
}
|
}
|
||||||
if (this._hints.includes('password')) {
|
if (this._hints.includes('password')) {
|
||||||
secrets.push({ label: _("Password: "), key: 'password',
|
secrets.push({ label: _('Password'), key: 'password',
|
||||||
value: ieee8021xSetting.password || '', password: true });
|
value: ieee8021xSetting.password || '', password: true });
|
||||||
}
|
}
|
||||||
if (this._hints.includes('private-key-password')) {
|
if (this._hints.includes('private-key-password')) {
|
||||||
secrets.push({ label: _("Private key password: "), key: 'private-key-password',
|
secrets.push({ label: _('Private key password'), key: 'private-key-password',
|
||||||
value: ieee8021xSetting.private_key_password || '', password: true });
|
value: ieee8021xSetting.private_key_password || '', password: true });
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -254,29 +260,29 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
// TTLS and PEAP are actually much more complicated, but this complication
|
// TTLS and PEAP are actually much more complicated, but this complication
|
||||||
// is not visible here since we only care about phase2 authentication
|
// is not visible here since we only care about phase2 authentication
|
||||||
// (and don't even care of which one)
|
// (and don't even care of which one)
|
||||||
secrets.push({ label: _("Username: "), key: null,
|
secrets.push({ label: _('Username'), key: null,
|
||||||
value: ieee8021xSetting.identity || '', password: false });
|
value: ieee8021xSetting.identity || '', password: false });
|
||||||
secrets.push({ label: _("Password: "), key: 'password',
|
secrets.push({ label: _('Password'), key: 'password',
|
||||||
value: ieee8021xSetting.password || '', password: true });
|
value: ieee8021xSetting.password || '', password: true });
|
||||||
break;
|
break;
|
||||||
case 'tls':
|
case 'tls':
|
||||||
secrets.push({ label: _("Identity: "), key: null,
|
secrets.push({ label: _('Identity'), key: null,
|
||||||
value: ieee8021xSetting.identity || '', password: false });
|
value: ieee8021xSetting.identity || '', password: false });
|
||||||
secrets.push({ label: _("Private key password: "), key: 'private-key-password',
|
secrets.push({ label: _('Private key password'), key: 'private-key-password',
|
||||||
value: ieee8021xSetting.private_key_password || '', password: true });
|
value: ieee8021xSetting.private_key_password || '', password: true });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log(`Invalid EAP/IEEE802.1x method: ${ieee8021xSetting.get_eap_method(0)}`);
|
log('Invalid EAP/IEEE802.1x method: %s'.format(ieee8021xSetting.get_eap_method(0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_getPPPoESecrets(secrets) {
|
_getPPPoESecrets(secrets) {
|
||||||
let pppoeSetting = this._connection.get_setting_pppoe();
|
let pppoeSetting = this._connection.get_setting_pppoe();
|
||||||
secrets.push({ label: _("Username: "), key: 'username',
|
secrets.push({ label: _('Username'), key: 'username',
|
||||||
value: pppoeSetting.username || '', password: false });
|
value: pppoeSetting.username || '', password: false });
|
||||||
secrets.push({ label: _("Service: "), key: 'service',
|
secrets.push({ label: _('Service'), key: 'service',
|
||||||
value: pppoeSetting.service || '', password: false });
|
value: pppoeSetting.service || '', password: false });
|
||||||
secrets.push({ label: _("Password: "), key: 'password',
|
secrets.push({ label: _('Password'), key: 'password',
|
||||||
value: pppoeSetting.password || '', password: true });
|
value: pppoeSetting.password || '', password: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,7 +292,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
setting = this._connection.get_setting_cdma() || this._connection.get_setting_gsm();
|
setting = this._connection.get_setting_cdma() || this._connection.get_setting_gsm();
|
||||||
else
|
else
|
||||||
setting = this._connection.get_setting_by_name(connectionType);
|
setting = this._connection.get_setting_by_name(connectionType);
|
||||||
secrets.push({ label: _("Password: "), key: 'password',
|
secrets.push({ label: _('Password'), key: 'password',
|
||||||
value: setting.value || '', password: true });
|
value: setting.value || '', password: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,7 +316,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
case '802-3-ethernet':
|
case '802-3-ethernet':
|
||||||
content.title = _("Wired 802.1X authentication");
|
content.title = _("Wired 802.1X authentication");
|
||||||
content.message = null;
|
content.message = null;
|
||||||
content.secrets.push({ label: _("Network name: "), key: null,
|
content.secrets.push({ label: _('Network name'), key: null,
|
||||||
value: connectionSetting.get_id(), password: false });
|
value: connectionSetting.get_id(), password: false });
|
||||||
this._get8021xSecrets(content.secrets);
|
this._get8021xSecrets(content.secrets);
|
||||||
break;
|
break;
|
||||||
@@ -324,7 +330,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
let gsmSetting = this._connection.get_setting_gsm();
|
let gsmSetting = this._connection.get_setting_gsm();
|
||||||
content.title = _("PIN code required");
|
content.title = _("PIN code required");
|
||||||
content.message = _("PIN code is needed for the mobile broadband device");
|
content.message = _("PIN code is needed for the mobile broadband device");
|
||||||
content.secrets.push({ label: _("PIN: "), key: 'pin',
|
content.secrets.push({ label: _('PIN'), key: 'pin',
|
||||||
value: gsmSetting.pin || '', password: true });
|
value: gsmSetting.pin || '', password: true });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -336,7 +342,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
this._getMobileSecrets(content.secrets, connectionType);
|
this._getMobileSecrets(content.secrets, connectionType);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log(`Invalid connection type: ${connectionType}`);
|
log('Invalid connection type: %s'.format(connectionType));
|
||||||
}
|
}
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
@@ -581,12 +587,12 @@ var VPNRequestHandler = class {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
vpnSetting.foreach_data_item((key, value) => {
|
vpnSetting.foreach_data_item((key, value) => {
|
||||||
this._stdin.write(`DATA_KEY=${key}\n`, null);
|
this._stdin.write('DATA_KEY=%s\n'.format(key), null);
|
||||||
this._stdin.write(`DATA_VAL=${value || ''}\n\n`, null);
|
this._stdin.write('DATA_VAL=%s\n\n'.format(value || ''), null);
|
||||||
});
|
});
|
||||||
vpnSetting.foreach_secret((key, value) => {
|
vpnSetting.foreach_secret((key, value) => {
|
||||||
this._stdin.write(`SECRET_KEY=${key}\n`, null);
|
this._stdin.write('SECRET_KEY=%s\n'.format(key), null);
|
||||||
this._stdin.write(`SECRET_VAL=${value || ''}\n\n`, null);
|
this._stdin.write('SECRET_VAL=%s\n\n'.format(value || ''), null);
|
||||||
});
|
});
|
||||||
this._stdin.write('DONE\n\n', null);
|
this._stdin.write('DONE\n\n', null);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -611,14 +617,6 @@ var NetworkAgent = class {
|
|||||||
this._vpnRequests = { };
|
this._vpnRequests = { };
|
||||||
this._notifications = { };
|
this._notifications = { };
|
||||||
|
|
||||||
this._pluginDir = Gio.file_new_for_path(Config.VPNDIR);
|
|
||||||
try {
|
|
||||||
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
|
|
||||||
monitor.connect('changed', () => (this._vpnCacheBuilt = false));
|
|
||||||
} catch (e) {
|
|
||||||
log(`Failed to create monitor for VPN plugin dir: ${e.message}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
this._native.connect('new-request', this._newRequest.bind(this));
|
this._native.connect('new-request', this._newRequest.bind(this));
|
||||||
this._native.connect('cancel-request', this._cancelRequest.bind(this));
|
this._native.connect('cancel-request', this._cancelRequest.bind(this));
|
||||||
|
|
||||||
@@ -707,7 +705,7 @@ var NetworkAgent = class {
|
|||||||
body = _("A password is required to connect to “%s”.").format(connectionSetting.get_id());
|
body = _("A password is required to connect to “%s”.").format(connectionSetting.get_id());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log(`Invalid connection type: ${connectionType}`);
|
log('Invalid connection type: %s'.format(connectionType));
|
||||||
this._native.respond(requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR);
|
this._native.respond(requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -762,13 +760,11 @@ var NetworkAgent = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_vpnRequest(requestId, connection, hints, flags) {
|
async _vpnRequest(requestId, connection, hints, flags) {
|
||||||
let vpnSetting = connection.get_setting_vpn();
|
let vpnSetting = connection.get_setting_vpn();
|
||||||
let serviceType = vpnSetting.service_type;
|
let serviceType = vpnSetting.service_type;
|
||||||
|
|
||||||
this._buildVPNServiceCache();
|
let binary = await this._findAuthBinary(serviceType);
|
||||||
|
|
||||||
let binary = this._vpnBinaries[serviceType];
|
|
||||||
if (!binary) {
|
if (!binary) {
|
||||||
log('Invalid VPN service type (cannot find authentication binary)');
|
log('Invalid VPN service type (cannot find authentication binary)');
|
||||||
|
|
||||||
@@ -784,36 +780,30 @@ var NetworkAgent = class {
|
|||||||
this._vpnRequests[requestId] = vpnRequest;
|
this._vpnRequests[requestId] = vpnRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
_buildVPNServiceCache() {
|
async _findAuthBinary(serviceType) {
|
||||||
if (this._vpnCacheBuilt)
|
let plugin;
|
||||||
return;
|
|
||||||
|
|
||||||
this._vpnCacheBuilt = true;
|
try {
|
||||||
this._vpnBinaries = { };
|
plugin = await this._native.search_vpn_plugin(serviceType);
|
||||||
|
} catch (e) {
|
||||||
NM.VpnPluginInfo.list_load().forEach(plugin => {
|
logError(e);
|
||||||
let service = plugin.get_service();
|
return null;
|
||||||
let fileName = plugin.get_auth_dialog();
|
|
||||||
let supportsHints = plugin.supports_hints();
|
|
||||||
let externalUIMode = false;
|
|
||||||
|
|
||||||
let prop = plugin.lookup_property('GNOME', 'supports-external-ui-mode');
|
|
||||||
if (prop) {
|
|
||||||
prop = prop.trim().toLowerCase();
|
|
||||||
externalUIMode = ['true', 'yes', 'on', '1'].includes(prop);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GLib.file_test(fileName, GLib.FileTest.IS_EXECUTABLE)) {
|
const fileName = plugin.get_auth_dialog();
|
||||||
let binary = { fileName, externalUIMode, supportsHints };
|
if (!GLib.file_test(fileName, GLib.FileTest.IS_EXECUTABLE)) {
|
||||||
this._vpnBinaries[service] = binary;
|
|
||||||
|
|
||||||
plugin.get_aliases().forEach(alias => {
|
|
||||||
this._vpnBinaries[alias] = binary;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
log('VPN plugin at %s is not executable'.format(fileName));
|
log('VPN plugin at %s is not executable'.format(fileName));
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
const prop = plugin.lookup_property('GNOME', 'supports-external-ui-mode');
|
||||||
|
const trimmedProp = prop ? prop.trim().toLowerCase() : '';
|
||||||
|
|
||||||
|
return {
|
||||||
|
fileName,
|
||||||
|
supportsHints: plugin.supports_hints(),
|
||||||
|
externalUIMode: ['true', 'yes', 'on', '1'].includes(trimmedProp),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var Component = NetworkAgent;
|
var Component = NetworkAgent;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
let bodyContent = new Dialog.MessageDialogContent();
|
let bodyContent = new Dialog.MessageDialogContent();
|
||||||
|
|
||||||
if (userNames.length > 1) {
|
if (userNames.length > 1) {
|
||||||
log(`polkitAuthenticationAgent: Received ${userNames.length} ` +
|
log('polkitAuthenticationAgent: Received %d'.format(userNames.length) +
|
||||||
'identities that can be used for authentication. Only ' +
|
'identities that can be used for authentication. Only ' +
|
||||||
'considering one.');
|
'considering one.');
|
||||||
}
|
}
|
||||||
@@ -194,8 +194,8 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
// We could add retrying if this turns out to be a problem
|
// We could add retrying if this turns out to be a problem
|
||||||
|
|
||||||
log('polkitAuthenticationAgent: Failed to show modal dialog. ' +
|
log('polkitAuthenticationAgent: Failed to show modal dialog. ' +
|
||||||
`Dismissing authentication request for action-id ${this.actionId} ` +
|
'Dismissing authentication request for action-id %s '.format(this.actionId) +
|
||||||
`cookie ${this._cookie}`);
|
'cookie %s'.format(this._cookie));
|
||||||
this._emitDone(true);
|
this._emitDone(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,12 +271,12 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hack: The request string comes directly from PAM, if it's "Password:"
|
// Hack: The request string comes directly from PAM, if it's "Password:"
|
||||||
// we replace it with our own, if it's something else we replace the
|
// we replace it with our own to allow localization, if it's something
|
||||||
// last colon and any trailing spaces with a "…".
|
// else we remove the last colon and any trailing or leading spaces.
|
||||||
if (request === 'Password:' || request === 'Password: ')
|
if (request === 'Password:' || request === 'Password: ')
|
||||||
this._passwordEntry.hint_text = _('Enter Password…');
|
this._passwordEntry.hint_text = _('Password');
|
||||||
else
|
else
|
||||||
this._passwordEntry.hint_text = request.replace(/: *$/, '…');
|
this._passwordEntry.hint_text = request.replace(/: *$/, '').trim();
|
||||||
|
|
||||||
this._passwordEntry.password_visible = echoOn;
|
this._passwordEntry.password_visible = echoOn;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
/* exported Component */
|
/* exported Component */
|
||||||
|
|
||||||
const { Clutter, Gio, GLib, GObject, St } = imports.gi;
|
const { Clutter, Gio, GLib, GObject, St } = imports.gi;
|
||||||
const Lang = imports.lang;
|
|
||||||
|
|
||||||
var Tpl = null;
|
var Tpl = null;
|
||||||
var Tp = null;
|
var Tp = null;
|
||||||
@@ -40,35 +39,58 @@ var NotificationDirection = {
|
|||||||
RECEIVED: 'chat-received',
|
RECEIVED: 'chat-received',
|
||||||
};
|
};
|
||||||
|
|
||||||
function makeMessageFromTpMessage(tpMessage, direction) {
|
const ChatMessage = HAVE_TP ? GObject.registerClass({
|
||||||
let [text, flags_] = tpMessage.to_text();
|
Properties: {
|
||||||
|
'message-type': GObject.ParamSpec.int(
|
||||||
let timestamp = tpMessage.get_sent_timestamp();
|
'message-type', 'message-type', 'message-type',
|
||||||
if (timestamp == 0)
|
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||||
timestamp = tpMessage.get_received_timestamp();
|
Math.min(...Object.values(Tp.ChannelTextMessageType)),
|
||||||
|
Math.max(...Object.values(Tp.ChannelTextMessageType)),
|
||||||
return {
|
Tp.ChannelTextMessageType.NORMAL),
|
||||||
messageType: tpMessage.get_message_type(),
|
'text': GObject.ParamSpec.string(
|
||||||
text,
|
'text', 'text', 'text',
|
||||||
sender: tpMessage.sender.alias,
|
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||||
timestamp,
|
null),
|
||||||
|
'sender': GObject.ParamSpec.string(
|
||||||
|
'sender', 'sender', 'sender',
|
||||||
|
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||||
|
null),
|
||||||
|
'timestamp': GObject.ParamSpec.int64(
|
||||||
|
'timestamp', 'timestamp', 'timestamp',
|
||||||
|
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||||
|
0, Number.MAX_SAFE_INTEGER, 0),
|
||||||
|
'direction': GObject.ParamSpec.string(
|
||||||
|
'direction', 'direction', 'direction',
|
||||||
|
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||||
|
null),
|
||||||
|
},
|
||||||
|
}, class ChatMessageClass extends GObject.Object {
|
||||||
|
static newFromTpMessage(tpMessage, direction) {
|
||||||
|
return new ChatMessage({
|
||||||
|
'message-type': tpMessage.get_message_type(),
|
||||||
|
'text': tpMessage.to_text()[0],
|
||||||
|
'sender': tpMessage.sender.alias,
|
||||||
|
'timestamp': direction === NotificationDirection.RECEIVED
|
||||||
|
? tpMessage.get_received_timestamp() : tpMessage.get_sent_timestamp(),
|
||||||
direction,
|
direction,
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static newFromTplTextEvent(tplTextEvent) {
|
||||||
|
let direction =
|
||||||
|
tplTextEvent.get_sender().get_entity_type() === Tpl.EntityType.SELF
|
||||||
|
? NotificationDirection.SENT : NotificationDirection.RECEIVED;
|
||||||
|
|
||||||
function makeMessageFromTplEvent(event) {
|
return new ChatMessage({
|
||||||
let sent = event.get_sender().get_entity_type() == Tpl.EntityType.SELF;
|
'message-type': tplTextEvent.get_message_type(),
|
||||||
let direction = sent ? NotificationDirection.SENT : NotificationDirection.RECEIVED;
|
'text': tplTextEvent.get_message(),
|
||||||
|
'sender': tplTextEvent.get_sender().get_alias(),
|
||||||
return {
|
'timestamp': tplTextEvent.get_timestamp(),
|
||||||
messageType: event.get_message_type(),
|
|
||||||
text: event.get_message(),
|
|
||||||
sender: event.get_sender().get_alias(),
|
|
||||||
timestamp: event.get_timestamp(),
|
|
||||||
direction,
|
direction,
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
}) : null;
|
||||||
|
|
||||||
|
|
||||||
var TelepathyComponent = class {
|
var TelepathyComponent = class {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -87,7 +109,7 @@ var TelepathyComponent = class {
|
|||||||
try {
|
try {
|
||||||
this._client.register();
|
this._client.register();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`Could not register Telepathy client. Error: ${e}`);
|
throw new Error('Could not register Telepathy client. Error: %s'.format(e.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._client.account_manager.is_prepared(Tp.AccountManager.get_feature_quark_core()))
|
if (!this._client.account_manager.is_prepared(Tp.AccountManager.get_feature_quark_core()))
|
||||||
@@ -254,7 +276,7 @@ class TelepathyClient extends Tp.BaseClient {
|
|||||||
dispatchOp.claim_with_finish(result);
|
dispatchOp.claim_with_finish(result);
|
||||||
this._handlingChannels(account, conn, [channel], false);
|
this._handlingChannels(account, conn, [channel], false);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log(`Failed to Claim channel: ${err}`);
|
log('Failed to Claim channel: %s'.format(err.toString()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -270,12 +292,12 @@ class TelepathyClient extends Tp.BaseClient {
|
|||||||
var ChatSource = HAVE_TP ? GObject.registerClass(
|
var ChatSource = HAVE_TP ? GObject.registerClass(
|
||||||
class ChatSource extends MessageTray.Source {
|
class ChatSource extends MessageTray.Source {
|
||||||
_init(account, conn, channel, contact, client) {
|
_init(account, conn, channel, contact, client) {
|
||||||
super._init(contact.get_alias());
|
|
||||||
|
|
||||||
this._account = account;
|
this._account = account;
|
||||||
this._contact = contact;
|
this._contact = contact;
|
||||||
this._client = client;
|
this._client = client;
|
||||||
|
|
||||||
|
super._init(contact.get_alias());
|
||||||
|
|
||||||
this.isChat = true;
|
this.isChat = true;
|
||||||
this._pendingMessages = [];
|
this._pendingMessages = [];
|
||||||
|
|
||||||
@@ -431,7 +453,7 @@ class ChatSource extends MessageTray.Source {
|
|||||||
_displayPendingMessages(logManager, result) {
|
_displayPendingMessages(logManager, result) {
|
||||||
let [success_, events] = logManager.get_filtered_events_finish(result);
|
let [success_, events] = logManager.get_filtered_events_finish(result);
|
||||||
|
|
||||||
let logMessages = events.map(makeMessageFromTplEvent);
|
let logMessages = events.map(e => ChatMessage.newFromTplTextEvent(e));
|
||||||
this._ensureNotification();
|
this._ensureNotification();
|
||||||
|
|
||||||
let pendingTpMessages = this._channel.get_pending_messages();
|
let pendingTpMessages = this._channel.get_pending_messages();
|
||||||
@@ -443,7 +465,8 @@ class ChatSource extends MessageTray.Source {
|
|||||||
if (message.get_message_type() == Tp.ChannelTextMessageType.DELIVERY_REPORT)
|
if (message.get_message_type() == Tp.ChannelTextMessageType.DELIVERY_REPORT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pendingMessages.push(makeMessageFromTpMessage(message, NotificationDirection.RECEIVED));
|
pendingMessages.push(ChatMessage.newFromTpMessage(message,
|
||||||
|
NotificationDirection.RECEIVED));
|
||||||
|
|
||||||
this._pendingMessages.push(message);
|
this._pendingMessages.push(message);
|
||||||
}
|
}
|
||||||
@@ -541,7 +564,8 @@ class ChatSource extends MessageTray.Source {
|
|||||||
this._pendingMessages.push(message);
|
this._pendingMessages.push(message);
|
||||||
this.countUpdated();
|
this.countUpdated();
|
||||||
|
|
||||||
message = makeMessageFromTpMessage(message, NotificationDirection.RECEIVED);
|
message = ChatMessage.newFromTpMessage(message,
|
||||||
|
NotificationDirection.RECEIVED);
|
||||||
this._notification.appendMessage(message);
|
this._notification.appendMessage(message);
|
||||||
|
|
||||||
// Wait a bit before notifying for the received message, a handler
|
// Wait a bit before notifying for the received message, a handler
|
||||||
@@ -566,7 +590,8 @@ class ChatSource extends MessageTray.Source {
|
|||||||
// our client and other clients as well.
|
// our client and other clients as well.
|
||||||
_messageSent(channel, message, _flags, _token) {
|
_messageSent(channel, message, _flags, _token) {
|
||||||
this._ensureNotification();
|
this._ensureNotification();
|
||||||
message = makeMessageFromTpMessage(message, NotificationDirection.SENT);
|
message = ChatMessage.newFromTpMessage(message,
|
||||||
|
NotificationDirection.SENT);
|
||||||
this._notification.appendMessage(message);
|
this._notification.appendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -630,11 +655,19 @@ class ChatSource extends MessageTray.Source {
|
|||||||
}
|
}
|
||||||
}) : null;
|
}) : null;
|
||||||
|
|
||||||
|
const ChatNotificationMessage = HAVE_TP ? GObject.registerClass(
|
||||||
|
class ChatNotificationMessage extends GObject.Object {
|
||||||
|
_init(props = {}) {
|
||||||
|
super._init();
|
||||||
|
this.set(props);
|
||||||
|
}
|
||||||
|
}) : null;
|
||||||
|
|
||||||
var ChatNotification = HAVE_TP ? GObject.registerClass({
|
var ChatNotification = HAVE_TP ? GObject.registerClass({
|
||||||
Signals: {
|
Signals: {
|
||||||
'message-removed': { param_types: [Tp.Message.$gtype] },
|
'message-removed': { param_types: [ChatNotificationMessage.$gtype] },
|
||||||
'message-added': { param_types: [Tp.Message.$gtype] },
|
'message-added': { param_types: [ChatNotificationMessage.$gtype] },
|
||||||
'timestamp-changed': { param_types: [Tp.Message.$gtype] },
|
'timestamp-changed': { param_types: [ChatNotificationMessage.$gtype] },
|
||||||
},
|
},
|
||||||
}, class ChatNotification extends MessageTray.Notification {
|
}, class ChatNotification extends MessageTray.Notification {
|
||||||
_init(source) {
|
_init(source) {
|
||||||
@@ -735,21 +768,24 @@ var ChatNotification = HAVE_TP ? GObject.registerClass({
|
|||||||
styles: [],
|
styles: [],
|
||||||
timestamp: currentTime,
|
timestamp: currentTime,
|
||||||
noTimestamp: false });
|
noTimestamp: false });
|
||||||
|
const { noTimestamp } = props;
|
||||||
|
delete props.noTimestamp;
|
||||||
|
|
||||||
// Reset the old message timeout
|
// Reset the old message timeout
|
||||||
if (this._timestampTimeoutId)
|
if (this._timestampTimeoutId)
|
||||||
GLib.source_remove(this._timestampTimeoutId);
|
GLib.source_remove(this._timestampTimeoutId);
|
||||||
this._timestampTimeoutId = 0;
|
this._timestampTimeoutId = 0;
|
||||||
|
|
||||||
let message = { realMessage: props.group != 'meta',
|
let message = new ChatNotificationMessage({
|
||||||
showTimestamp: false };
|
realMessage: props.group !== 'meta',
|
||||||
Lang.copyProperties(props, message);
|
showTimestamp: false,
|
||||||
delete message.noTimestamp;
|
...props,
|
||||||
|
});
|
||||||
|
|
||||||
this.messages.unshift(message);
|
this.messages.unshift(message);
|
||||||
this.emit('message-added', message);
|
this.emit('message-added', message);
|
||||||
|
|
||||||
if (!props.noTimestamp) {
|
if (!noTimestamp) {
|
||||||
let timestamp = props.timestamp;
|
let timestamp = props.timestamp;
|
||||||
if (timestamp < currentTime - SCROLLBACK_IMMEDIATE_TIME) {
|
if (timestamp < currentTime - SCROLLBACK_IMMEDIATE_TIME) {
|
||||||
this.appendTimestamp();
|
this.appendTimestamp();
|
||||||
|
|||||||
@@ -180,14 +180,27 @@ class WorldClocksSection extends St.Button {
|
|||||||
|
|
||||||
let time = new St.Label({ style_class: 'world-clocks-time' });
|
let time = new St.Label({ style_class: 'world-clocks-time' });
|
||||||
|
|
||||||
let otherOffset = this._getTimeAtLocation(l).get_utc_offset();
|
const utcOffset = this._getTimeAtLocation(l).get_utc_offset();
|
||||||
let offset = (otherOffset - localOffset) / GLib.TIME_SPAN_HOUR;
|
const offsetCurrentTz = utcOffset - localOffset;
|
||||||
let fmt = Math.trunc(offset) == offset ? '%s%.0f' : '%s%.1f';
|
const offsetHours = Math.abs(offsetCurrentTz) / GLib.TIME_SPAN_HOUR;
|
||||||
let prefix = offset >= 0 ? '+' : '-';
|
const offsetMinutes =
|
||||||
let tz = new St.Label({ style_class: 'world-clocks-timezone',
|
(Math.abs(offsetCurrentTz) % GLib.TIME_SPAN_HOUR) /
|
||||||
text: fmt.format(prefix, Math.abs(offset)),
|
GLib.TIME_SPAN_MINUTE;
|
||||||
|
|
||||||
|
const prefix = offsetCurrentTz >= 0 ? '+' : '-';
|
||||||
|
const text = offsetMinutes === 0
|
||||||
|
? '%s%d'.format(prefix, offsetHours)
|
||||||
|
: '%s%d\u2236%d'.format(prefix, offsetHours, offsetMinutes);
|
||||||
|
|
||||||
|
const tz = new St.Label({
|
||||||
|
style_class: 'world-clocks-timezone',
|
||||||
|
text,
|
||||||
x_align: Clutter.ActorAlign.END,
|
x_align: Clutter.ActorAlign.END,
|
||||||
y_align: Clutter.ActorAlign.CENTER });
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
|
||||||
|
time.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||||
|
tz.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||||
|
|
||||||
if (this._grid.text_direction == Clutter.TextDirection.RTL) {
|
if (this._grid.text_direction == Clutter.TextDirection.RTL) {
|
||||||
layout.attach(tz, 0, i + 1, 1, 1);
|
layout.attach(tz, 0, i + 1, 1, 1);
|
||||||
@@ -230,7 +243,7 @@ class WorldClocksSection extends St.Button {
|
|||||||
|
|
||||||
_onProxyReady(proxy, error) {
|
_onProxyReady(proxy, error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
log(`Failed to create GNOME Clocks proxy: ${error}`);
|
log('Failed to create GNOME Clocks proxy: %s'.format(error));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,6 +397,20 @@ class WeatherSection extends St.Button {
|
|||||||
layout.attach(label, 0, 0, 1, 1);
|
layout.attach(label, 0, 0, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_findBestLocationName(loc) {
|
||||||
|
const locName = loc.get_name();
|
||||||
|
|
||||||
|
if (loc.get_level() === GWeather.LocationLevel.CITY ||
|
||||||
|
!loc.has_coords())
|
||||||
|
return locName;
|
||||||
|
|
||||||
|
const world = GWeather.Location.get_world();
|
||||||
|
const city = world.find_nearest_city(...loc.get_coords());
|
||||||
|
const cityName = city.get_name();
|
||||||
|
|
||||||
|
return locName.includes(cityName) ? cityName : locName;
|
||||||
|
}
|
||||||
|
|
||||||
_updateForecasts() {
|
_updateForecasts() {
|
||||||
this._forecastGrid.destroy_all_children();
|
this._forecastGrid.destroy_all_children();
|
||||||
|
|
||||||
@@ -392,13 +419,8 @@ class WeatherSection extends St.Button {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let info = this._weatherClient.info;
|
const { info } = this._weatherClient;
|
||||||
let loc = info.get_location();
|
this._titleLocation.text = this._findBestLocationName(info.location);
|
||||||
if (loc.get_level() !== GWeather.LocationLevel.CITY && loc.has_coords()) {
|
|
||||||
let world = GWeather.Location.get_world();
|
|
||||||
loc = world.find_nearest_city(...loc.get_coords());
|
|
||||||
}
|
|
||||||
this._titleLocation.text = loc.get_name();
|
|
||||||
|
|
||||||
if (this._weatherClient.loading) {
|
if (this._weatherClient.loading) {
|
||||||
this._setStatusLabel(_("Loading…"));
|
this._setStatusLabel(_("Loading…"));
|
||||||
@@ -454,6 +476,8 @@ class MessagesIndicator extends St.Icon {
|
|||||||
let sources = Main.messageTray.getSources();
|
let sources = Main.messageTray.getSources();
|
||||||
sources.forEach(source => this._onSourceAdded(null, source));
|
sources.forEach(source => this._onSourceAdded(null, source));
|
||||||
|
|
||||||
|
this._sync();
|
||||||
|
|
||||||
this.connect('destroy', () => {
|
this.connect('destroy', () => {
|
||||||
this._settings.run_dispose();
|
this._settings.run_dispose();
|
||||||
this._settings = null;
|
this._settings = null;
|
||||||
@@ -488,26 +512,6 @@ class MessagesIndicator extends St.Icon {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var IndicatorPad = GObject.registerClass(
|
|
||||||
class IndicatorPad extends St.Widget {
|
|
||||||
_init(actor) {
|
|
||||||
this._source = actor;
|
|
||||||
this._source.connect('notify::size', () => this.queue_relayout());
|
|
||||||
super._init();
|
|
||||||
this._source.bind_property('visible',
|
|
||||||
this, 'visible',
|
|
||||||
GObject.BindingFlags.SYNC_CREATE);
|
|
||||||
}
|
|
||||||
|
|
||||||
vfunc_get_preferred_width(forHeight) {
|
|
||||||
return this._source.get_preferred_width(forHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
vfunc_get_preferred_height(forWidth) {
|
|
||||||
return this._source.get_preferred_height(forWidth);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var FreezableBinLayout = GObject.registerClass(
|
var FreezableBinLayout = GObject.registerClass(
|
||||||
class FreezableBinLayout extends Clutter.BinLayout {
|
class FreezableBinLayout extends Clutter.BinLayout {
|
||||||
_init() {
|
_init() {
|
||||||
@@ -568,16 +572,24 @@ class DateMenuButton extends PanelMenu.Button {
|
|||||||
let hbox;
|
let hbox;
|
||||||
let vbox;
|
let vbox;
|
||||||
|
|
||||||
let menuAlignment = 0.5;
|
super._init(0.5);
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
|
||||||
menuAlignment = 1.0 - menuAlignment;
|
this._clockDisplay = new St.Label({ style_class: 'clock' });
|
||||||
super._init(menuAlignment);
|
this._clockDisplay.clutter_text.y_align = Clutter.ActorAlign.CENTER;
|
||||||
|
|
||||||
this._clockDisplay = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
|
|
||||||
this._indicator = new MessagesIndicator();
|
this._indicator = new MessagesIndicator();
|
||||||
|
|
||||||
|
const indicatorPad = new St.Widget();
|
||||||
|
this._indicator.bind_property('visible',
|
||||||
|
indicatorPad, 'visible',
|
||||||
|
GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
indicatorPad.add_constraint(new Clutter.BindConstraint({
|
||||||
|
source: this._indicator,
|
||||||
|
coordinate: Clutter.BindCoordinate.SIZE,
|
||||||
|
}));
|
||||||
|
|
||||||
let box = new St.BoxLayout({ style_class: 'clock-display-box' });
|
let box = new St.BoxLayout({ style_class: 'clock-display-box' });
|
||||||
box.add_actor(new IndicatorPad(this._indicator));
|
box.add_actor(indicatorPad);
|
||||||
box.add_actor(this._clockDisplay);
|
box.add_actor(this._clockDisplay);
|
||||||
box.add_actor(this._indicator);
|
box.add_actor(this._indicator);
|
||||||
|
|
||||||
@@ -630,7 +642,7 @@ class DateMenuButton extends PanelMenu.Button {
|
|||||||
this._displaysSection = new St.ScrollView({ style_class: 'datemenu-displays-section vfade',
|
this._displaysSection = new St.ScrollView({ style_class: 'datemenu-displays-section vfade',
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
overlay_scrollbars: true });
|
overlay_scrollbars: true });
|
||||||
this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
|
||||||
vbox.add_actor(this._displaysSection);
|
vbox.add_actor(this._displaysSection);
|
||||||
|
|
||||||
let displaysBox = new St.BoxLayout({ vertical: true,
|
let displaysBox = new St.BoxLayout({ vertical: true,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported Dialog, MessageDialogContent, ListSection, ListSectionItem */
|
/* exported Dialog, MessageDialogContent, ListSection, ListSectionItem */
|
||||||
|
|
||||||
const { Clutter, GObject, Pango, St } = imports.gi;
|
const { Clutter, GObject, Meta, Pango, St } = imports.gi;
|
||||||
|
|
||||||
function _setLabel(label, value) {
|
function _setLabel(label, value) {
|
||||||
label.set({
|
label.set({
|
||||||
@@ -58,10 +58,16 @@ class Dialog extends St.Widget {
|
|||||||
this._dialog.add_child(this.buttonLayout);
|
this._dialog.add_child(this.buttonLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
makeInactive() {
|
||||||
if (this._eventId != 0)
|
if (this._eventId != 0)
|
||||||
this._parentActor.disconnect(this._eventId);
|
this._parentActor.disconnect(this._eventId);
|
||||||
this._eventId = 0;
|
this._eventId = 0;
|
||||||
|
|
||||||
|
this.buttonLayout.get_children().forEach(c => c.set_reactive(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
_onDestroy() {
|
||||||
|
this.makeInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
_modalEventHandler(actor, event) {
|
_modalEventHandler(actor, event) {
|
||||||
@@ -179,10 +185,20 @@ var MessageDialogContent = GObject.registerClass({
|
|||||||
};
|
};
|
||||||
super._init(Object.assign(defaultParams, params));
|
super._init(Object.assign(defaultParams, params));
|
||||||
|
|
||||||
|
this.connect('notify::size', this._updateTitleStyle.bind(this));
|
||||||
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this.add_child(this._title);
|
this.add_child(this._title);
|
||||||
this.add_child(this._description);
|
this.add_child(this._description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_onDestroy() {
|
||||||
|
if (this._updateTitleStyleLater) {
|
||||||
|
Meta.later_remove(this._updateTitleStyleLater);
|
||||||
|
delete this._updateTitleStyleLater;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return this._title.text;
|
return this._title.text;
|
||||||
}
|
}
|
||||||
@@ -191,8 +207,32 @@ var MessageDialogContent = GObject.registerClass({
|
|||||||
return this._description.text;
|
return this._description.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_updateTitleStyle() {
|
||||||
|
if (!this._title.mapped)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._title.ensure_style();
|
||||||
|
const [, titleNatWidth] = this._title.get_preferred_width(-1);
|
||||||
|
|
||||||
|
if (titleNatWidth > this.width) {
|
||||||
|
if (this._updateTitleStyleLater)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._updateTitleStyleLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||||
|
this._updateTitleStyleLater = 0;
|
||||||
|
this._title.add_style_class_name('leightweight');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
set title(title) {
|
set title(title) {
|
||||||
_setLabel(this._title, title);
|
_setLabel(this._title, title);
|
||||||
|
|
||||||
|
this._title.remove_style_class_name('leightweight');
|
||||||
|
this._updateTitleStyle();
|
||||||
|
|
||||||
this.notify('title');
|
this.notify('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||