Compare commits
608 Commits
3.5.92
...
3.7.3.1-br
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d598b7725 | ||
|
|
9f890982b2 | ||
|
|
2698d0db29 | ||
|
|
2fa7230133 | ||
|
|
658243eae4 | ||
|
|
7282bc8859 | ||
|
|
07511cb21a | ||
|
|
f71f767a3c | ||
|
|
176daa1469 | ||
|
|
5487f8cf93 | ||
|
|
944762ac83 | ||
|
|
c66068c435 | ||
|
|
d479c936b8 | ||
|
|
c5a3f784dd | ||
|
|
529d012865 | ||
|
|
8a1b83417a | ||
|
|
6c64c0873c | ||
|
|
d2c6149923 | ||
|
|
9f98f6f02d | ||
|
|
2f7c0b1985 | ||
|
|
f61548234a | ||
|
|
6eef830ba4 | ||
|
|
88a9b7648c | ||
|
|
b7678493f9 | ||
|
|
a9ec8a354a | ||
|
|
a42d35deab | ||
|
|
2008feb7da | ||
|
|
c41424b57b | ||
|
|
3bd5563a7e | ||
|
|
eff8ec00c4 | ||
|
|
1256af7b9a | ||
|
|
b38ecaf925 | ||
|
|
bd5d945fb2 | ||
|
|
15063ef3d5 | ||
|
|
3b8a125732 | ||
|
|
9860b1c677 | ||
|
|
a0e340f06e | ||
|
|
57d3bec95c | ||
|
|
be10f3c2b5 | ||
|
|
f7af96dbb2 | ||
|
|
468a855f04 | ||
|
|
429f9e1d15 | ||
|
|
5de91197ae | ||
|
|
bc6b4b01ea | ||
|
|
e89ce7358a | ||
|
|
bdf0a6fd0b | ||
|
|
783abd4f5f | ||
|
|
28aa9201f0 | ||
|
|
378df515d0 | ||
|
|
04d68c6e36 | ||
|
|
5308d12239 | ||
|
|
15cac0157c | ||
|
|
fc696bc054 | ||
|
|
5a7b7b7389 | ||
|
|
9c9cf6f5ab | ||
|
|
0155739bef | ||
|
|
d0902fa28b | ||
|
|
3aa0d455c9 | ||
|
|
835d4e4b58 | ||
|
|
6075332f2f | ||
|
|
c5d8484e19 | ||
|
|
575ab0d609 | ||
|
|
b48a7d5cfd | ||
|
|
9af107feff | ||
|
|
70b5db16d3 | ||
|
|
5072ea7e47 | ||
|
|
13b83c95b7 | ||
|
|
e48dbe65f1 | ||
|
|
14fb51e6d7 | ||
|
|
b42af9aa99 | ||
|
|
ca2ee22827 | ||
|
|
13a2b28bf1 | ||
|
|
04bf75d137 | ||
|
|
76c589702f | ||
|
|
c11f89e72a | ||
|
|
cfacb05461 | ||
|
|
c4ba31cb23 | ||
|
|
db0eacddc5 | ||
|
|
62972f5138 | ||
|
|
6fe263f19f | ||
|
|
b6a87acb71 | ||
|
|
784b04b191 | ||
|
|
3af9f636af | ||
|
|
16c0585b95 | ||
|
|
fc9a96ac85 | ||
|
|
9dfc3af9d7 | ||
|
|
8dc63932fc | ||
|
|
066e5cddb5 | ||
|
|
27ffad2148 | ||
|
|
41db363b06 | ||
|
|
184ac11c93 | ||
|
|
673aa3c5f2 | ||
|
|
2dd1c04bf3 | ||
|
|
4df1222ce7 | ||
|
|
208121646c | ||
|
|
f47a11f792 | ||
|
|
36fc3a5c96 | ||
|
|
ed12c9d611 | ||
|
|
4153feeb15 | ||
|
|
349c642d10 | ||
|
|
4728105f43 | ||
|
|
1f46a0dc26 | ||
|
|
7ff7ced504 | ||
|
|
a43ee41b0b | ||
|
|
ec7ade4ee6 | ||
|
|
9b846cbb83 | ||
|
|
2cc7fd07f8 | ||
|
|
72d54d9915 | ||
|
|
b390b82e9d | ||
|
|
1ef9ee13a3 | ||
|
|
6822795bb8 | ||
|
|
187dec2816 | ||
|
|
31f75e4607 | ||
|
|
92083eaf76 | ||
|
|
6b40c3974d | ||
|
|
c528401b62 | ||
|
|
8a17f512f4 | ||
|
|
e725f8a0fe | ||
|
|
525d3c2619 | ||
|
|
aba46720c0 | ||
|
|
2fb1d707fe | ||
|
|
dd06aa98ad | ||
|
|
cfb66ca153 | ||
|
|
0b4660702b | ||
|
|
9760227c66 | ||
|
|
5faeaa2028 | ||
|
|
cd58f9f9e5 | ||
|
|
00338bbc4b | ||
|
|
31d14a2fb0 | ||
|
|
49fa0ddebc | ||
|
|
d50c3e6c67 | ||
|
|
b39f56e813 | ||
|
|
ead0286ca6 | ||
|
|
6eb05af306 | ||
|
|
6b1e632621 | ||
|
|
29cb10fed8 | ||
|
|
a88433dba6 | ||
|
|
7e5f1fe411 | ||
|
|
00c78d33e4 | ||
|
|
50fbf9982e | ||
|
|
71ad39b6e3 | ||
|
|
3d329cdf2d | ||
|
|
21af5c8f73 | ||
|
|
716d7bb93e | ||
|
|
98f4b99446 | ||
|
|
830e701d13 | ||
|
|
57d9e7d5aa | ||
|
|
5fc16bb05b | ||
|
|
cb08bd2e2e | ||
|
|
961dba7faa | ||
|
|
41f933b89e | ||
|
|
d4dc1c87c5 | ||
|
|
e58fbeea17 | ||
|
|
2492dc50db | ||
|
|
b4f5f1e461 | ||
|
|
69347fff09 | ||
|
|
5c439f4e9c | ||
|
|
c84236ed73 | ||
|
|
ae1a3a0cb2 | ||
|
|
b3fea016f1 | ||
|
|
7c93639e59 | ||
|
|
affcd5c7de | ||
|
|
e00eb06f66 | ||
|
|
5ecc204d57 | ||
|
|
2a5eed1eb4 | ||
|
|
d517c13d7a | ||
|
|
bb88265d78 | ||
|
|
858694f4cc | ||
|
|
a46321baa0 | ||
|
|
9808e8ab0d | ||
|
|
7bd7b53845 | ||
|
|
056cfc9dc6 | ||
|
|
b7b60d103e | ||
|
|
14fd0eb73e | ||
|
|
ca73017100 | ||
|
|
123fb350ce | ||
|
|
1a27d7dfc0 | ||
|
|
b0c6d44515 | ||
|
|
6092e01428 | ||
|
|
e20ff5ae45 | ||
|
|
621a0d70e2 | ||
|
|
855b238ec5 | ||
|
|
96f44e1959 | ||
|
|
242dc8cddd | ||
|
|
b8a2004872 | ||
|
|
63f08bf2c2 | ||
|
|
4734a9ac18 | ||
|
|
81cd1e6c40 | ||
|
|
0b9cdea7d2 | ||
|
|
f63fceb2ea | ||
|
|
f0f7165ab6 | ||
|
|
2511f60d39 | ||
|
|
c0f868dd56 | ||
|
|
a112bfdaa2 | ||
|
|
4535a70f08 | ||
|
|
b59529e579 | ||
|
|
393c23820a | ||
|
|
e6a3958e45 | ||
|
|
59a7fdd2c9 | ||
|
|
c3cab28c9b | ||
|
|
4c55a6f436 | ||
|
|
c10e4c3117 | ||
|
|
3b70094151 | ||
|
|
a370697385 | ||
|
|
8a7c0313f6 | ||
|
|
00201f7e6c | ||
|
|
5e3111bad8 | ||
|
|
a327c10c60 | ||
|
|
938bc07e3c | ||
|
|
d053d45a6d | ||
|
|
5200da6eec | ||
|
|
b0523860d9 | ||
|
|
1a1215527f | ||
|
|
360c018c9e | ||
|
|
7bed964ab2 | ||
|
|
989d0a5682 | ||
|
|
b121c25184 | ||
|
|
e0d127b3e4 | ||
|
|
a0c56c74e1 | ||
|
|
f4b61a7f24 | ||
|
|
b2400fb883 | ||
|
|
f25832d1b6 | ||
|
|
cf363171aa | ||
|
|
38c8569d16 | ||
|
|
9791d15f39 | ||
|
|
80e7f5832b | ||
|
|
6e46ddaad3 | ||
|
|
8499e4aab2 | ||
|
|
5eae1851a1 | ||
|
|
c48a246ccb | ||
|
|
f084011a61 | ||
|
|
bd40cf194c | ||
|
|
2434af7e8a | ||
|
|
ced7fa9f01 | ||
|
|
28b559e812 | ||
|
|
76d776245b | ||
|
|
0d9f70492e | ||
|
|
b58f502dd6 | ||
|
|
5f367248c5 | ||
|
|
c2065cc3e2 | ||
|
|
034408971d | ||
|
|
490206b5b2 | ||
|
|
d8540819af | ||
|
|
d1a9aec526 | ||
|
|
e4b681a5a5 | ||
|
|
52036871d1 | ||
|
|
4fc6a804f5 | ||
|
|
08d2ca300a | ||
|
|
dc2ec0a8f9 | ||
|
|
2cfed952bb | ||
|
|
a7da137778 | ||
|
|
5ae2f87ce9 | ||
|
|
c4f6619fbd | ||
|
|
65edbc1424 | ||
|
|
1f2d7fa28f | ||
|
|
2407a0c4e2 | ||
|
|
7f8bfcc939 | ||
|
|
fae4cb9e56 | ||
|
|
063bbb02f2 | ||
|
|
15e1470c50 | ||
|
|
f602993aa9 | ||
|
|
271508c0a8 | ||
|
|
50f96d1c9c | ||
|
|
809544800b | ||
|
|
e757b06987 | ||
|
|
6f2da1baf1 | ||
|
|
f30dcad8a7 | ||
|
|
7dc235511e | ||
|
|
644c210fe2 | ||
|
|
68e8f98671 | ||
|
|
1228db6ac1 | ||
|
|
86596749fa | ||
|
|
76229a3601 | ||
|
|
95abdeb919 | ||
|
|
df0151d338 | ||
|
|
ee2f12fe81 | ||
|
|
10c104529f | ||
|
|
cbc8ec6508 | ||
|
|
8e7758e280 | ||
|
|
9aefbd189c | ||
|
|
b9d50584d8 | ||
|
|
e5f7390c09 | ||
|
|
797b1ff8bb | ||
|
|
09b738045c | ||
|
|
4fd690333a | ||
|
|
5ef5e25a7f | ||
|
|
87e8770cbc | ||
|
|
cac9d120be | ||
|
|
1ae0fadbf4 | ||
|
|
65497e089a | ||
|
|
2d763bd033 | ||
|
|
4ebf396cf5 | ||
|
|
6faa50d496 | ||
|
|
6fcd6298c8 | ||
|
|
5c16be5dbb | ||
|
|
e3abb6f178 | ||
|
|
70736be4eb | ||
|
|
1c3e7330f3 | ||
|
|
6e4c89b310 | ||
|
|
73b4a0ef5f | ||
|
|
d88002c4ed | ||
|
|
025c63c045 | ||
|
|
b189cbd46e | ||
|
|
a21ddb5914 | ||
|
|
e04a4c3923 | ||
|
|
ae0821e07b | ||
|
|
a508bece36 | ||
|
|
2c9969a8f4 | ||
|
|
dd9fc91f6f | ||
|
|
39d9838cc1 | ||
|
|
1397c7c624 | ||
|
|
c09fcba94f | ||
|
|
c77b38fc4f | ||
|
|
aef9b733e5 | ||
|
|
348208617b | ||
|
|
2c34c8e20f | ||
|
|
d19fa731d6 | ||
|
|
59bb1cc387 | ||
|
|
56909d0646 | ||
|
|
04da29c939 | ||
|
|
307f7a3024 | ||
|
|
e80bfa39f5 | ||
|
|
29714922ea | ||
|
|
88192114ac | ||
|
|
9d78208b76 | ||
|
|
d817bf0395 | ||
|
|
4d51056226 | ||
|
|
a607174a25 | ||
|
|
37d6a624b7 | ||
|
|
0c807bddaf | ||
|
|
a0470bfc66 | ||
|
|
b9463d23e8 | ||
|
|
04debd1623 | ||
|
|
9d31576cf5 | ||
|
|
8daca28a90 | ||
|
|
9899604261 | ||
|
|
687e1eabed | ||
|
|
eb09f34114 | ||
|
|
fbeb446ed7 | ||
|
|
92033ce0f5 | ||
|
|
9171bab5e5 | ||
|
|
f9819eb7b0 | ||
|
|
85728f0d15 | ||
|
|
9396849d56 | ||
|
|
6f5e5672bb | ||
|
|
b936e60876 | ||
|
|
fa4bd91213 | ||
|
|
81eeef7d3c | ||
|
|
a7b5134820 | ||
|
|
92a01c67ba | ||
|
|
71c23613b5 | ||
|
|
4f876995de | ||
|
|
9cf4a76196 | ||
|
|
9efe5287e4 | ||
|
|
8c4b34de4e | ||
|
|
93e3559dc3 | ||
|
|
caa0f63e1f | ||
|
|
a4e29e1244 | ||
|
|
599f2f43e3 | ||
|
|
3a453c5f73 | ||
|
|
98b313c75f | ||
|
|
8b796d80a7 | ||
|
|
719a8908a6 | ||
|
|
fed007ecae | ||
|
|
990443465f | ||
|
|
1f183b8a4e | ||
|
|
96556eb959 | ||
|
|
3ffeeac577 | ||
|
|
d7929a2340 | ||
|
|
667019a8c1 | ||
|
|
d9b46b4782 | ||
|
|
e249218a9d | ||
|
|
a2b1946b01 | ||
|
|
96a80f7ba0 | ||
|
|
9955fbf4f8 | ||
|
|
14966b0cd0 | ||
|
|
6e1a8f16a8 | ||
|
|
d106191e6a | ||
|
|
418cf6281e | ||
|
|
bdeb7d86b6 | ||
|
|
a0e0cc1038 | ||
|
|
78f6dec73b | ||
|
|
f6458f215f | ||
|
|
c7e0d547c4 | ||
|
|
fa54cfa0c3 | ||
|
|
31ea3f737c | ||
|
|
2a8a8065a8 | ||
|
|
d3ba002313 | ||
|
|
f18fd8d959 | ||
|
|
d54f7b13fb | ||
|
|
9c8b75206c | ||
|
|
15273c7f22 | ||
|
|
0ea8217c55 | ||
|
|
1735f28f5a | ||
|
|
8de4070f7f | ||
|
|
45e64f453f | ||
|
|
62dc5f2ac6 | ||
|
|
86c85a752e | ||
|
|
3de0ebf7fd | ||
|
|
1496ba0bbd | ||
|
|
f5974f6793 | ||
|
|
928ea3bb01 | ||
|
|
b7acb1d488 | ||
|
|
360d94dd67 | ||
|
|
671a813135 | ||
|
|
c005417f9b | ||
|
|
b5ec68bda3 | ||
|
|
b4ed29094d | ||
|
|
284ab031b8 | ||
|
|
6ad5064c09 | ||
|
|
3a8e723a36 | ||
|
|
dd3484b93f | ||
|
|
205773b700 | ||
|
|
f2039070e6 | ||
|
|
cf58a7eafd | ||
|
|
487749c25b | ||
|
|
48fb16b570 | ||
|
|
f94369dd6e | ||
|
|
fc0bd3b9e8 | ||
|
|
19946f1d19 | ||
|
|
562f56130a | ||
|
|
99f97adfc6 | ||
|
|
5ad7db722d | ||
|
|
a7d344d287 | ||
|
|
0ac215f9de | ||
|
|
4342155748 | ||
|
|
b561694bf0 | ||
|
|
cae9a8d608 | ||
|
|
88fbdba018 | ||
|
|
046067565a | ||
|
|
11299d9913 | ||
|
|
42ab233b08 | ||
|
|
4a92d7d1b2 | ||
|
|
2502ca6ccc | ||
|
|
651030ba93 | ||
|
|
8dfea9566e | ||
|
|
8cc54ce2a2 | ||
|
|
3abfcda8b5 | ||
|
|
cf0ae8f182 | ||
|
|
d90bf5c6dc | ||
|
|
955b550e95 | ||
|
|
b3cd46a5c8 | ||
|
|
3fdc8bfa3d | ||
|
|
e8f96a6e16 | ||
|
|
dc15df1aa7 | ||
|
|
05f5fac35b | ||
|
|
5bfcc5392d | ||
|
|
d2e830cce3 | ||
|
|
1e942be639 | ||
|
|
576009bad0 | ||
|
|
f71108a214 | ||
|
|
7109bd52f2 | ||
|
|
0f6effa263 | ||
|
|
8b0301ed00 | ||
|
|
4f56fb125e | ||
|
|
6487cd8c6f | ||
|
|
06e5c25383 | ||
|
|
36e5ae4a25 | ||
|
|
245e43ea8c | ||
|
|
52871c781a | ||
|
|
f994ada576 | ||
|
|
147a6e49dc | ||
|
|
be24ee435c | ||
|
|
9fac285b69 | ||
|
|
3ed5f9cd15 | ||
|
|
17e70ff8ec | ||
|
|
6dab119650 | ||
|
|
f80eb89d57 | ||
|
|
f6c2902fe4 | ||
|
|
1e890a8a0a | ||
|
|
aa1a84e677 | ||
|
|
9395f310d6 | ||
|
|
b99bb3d4bb | ||
|
|
4f66f096ff | ||
|
|
7f5f2284f3 | ||
|
|
59f9f4fca1 | ||
|
|
55284e418c | ||
|
|
20d4ffde6e | ||
|
|
78e5d4df9d | ||
|
|
1118ec9653 | ||
|
|
7d6c85be42 | ||
|
|
0192a6cb12 | ||
|
|
0e01a81219 | ||
|
|
36edf20273 | ||
|
|
a1bf19dbdf | ||
|
|
0ad739e78b | ||
|
|
ff9509b901 | ||
|
|
7e496b1979 | ||
|
|
448517032e | ||
|
|
a171e92e6c | ||
|
|
06e9bf9b0a | ||
|
|
7d9ec8cea0 | ||
|
|
5b4553ff0c | ||
|
|
d4ce7aef59 | ||
|
|
8b6df2e23f | ||
|
|
e2ff5846df | ||
|
|
24efeff788 | ||
|
|
4f359e62df | ||
|
|
e6fd2bed4d | ||
|
|
9fb6510135 | ||
|
|
7206b61838 | ||
|
|
e8ab0b3e8f | ||
|
|
843788580e | ||
|
|
4ceb3d890d | ||
|
|
3f8995b25e | ||
|
|
37e0cefc79 | ||
|
|
f026741dbb | ||
|
|
044b121e01 | ||
|
|
d57c3b4f89 | ||
|
|
960f7d5f2e | ||
|
|
2f61381651 | ||
|
|
ba6e931e21 | ||
|
|
440aa0d369 | ||
|
|
f42d4b5fa2 | ||
|
|
5d9fa2c484 | ||
|
|
f5c86fa171 | ||
|
|
f9019ce62d | ||
|
|
ee485e1728 | ||
|
|
8f2a6f8387 | ||
|
|
908bf3b117 | ||
|
|
6a739afd25 | ||
|
|
506490e32d | ||
|
|
846771f2a1 | ||
|
|
759b7584e0 | ||
|
|
e5cb224598 | ||
|
|
e32df1b405 | ||
|
|
db9f91b687 | ||
|
|
0941357068 | ||
|
|
d8993c52d0 | ||
|
|
6424b2dd03 | ||
|
|
2a4eb3ed1a | ||
|
|
c9fa00cce1 | ||
|
|
18eedbc02d | ||
|
|
ef9f63fe59 | ||
|
|
f8ce788425 | ||
|
|
6c1bd95643 | ||
|
|
2ed7ee8f71 | ||
|
|
2e63709450 | ||
|
|
6611d639a8 | ||
|
|
fe124e6ab3 | ||
|
|
fee0a8527d | ||
|
|
2f6b00403f | ||
|
|
dbe2c117e3 | ||
|
|
c4b1ccb6d6 | ||
|
|
2c70ee7e43 | ||
|
|
f7826616b8 | ||
|
|
9f476a12dd | ||
|
|
6f3cf0ae50 | ||
|
|
cd024e21f0 | ||
|
|
c4c470c1f3 | ||
|
|
dc9ad8df80 | ||
|
|
74d6225993 | ||
|
|
e1e0c5035d | ||
|
|
adf6d0eb82 | ||
|
|
90df435345 | ||
|
|
83d57211db | ||
|
|
0a8eeb2827 | ||
|
|
0c324c42f4 | ||
|
|
3adf54a952 | ||
|
|
8076c66a4c | ||
|
|
f9c583a636 | ||
|
|
30d536b19c | ||
|
|
1957899146 | ||
|
|
b52c83d88a | ||
|
|
27ff388413 | ||
|
|
d4306f7768 | ||
|
|
5d0a57c97d | ||
|
|
a87ba467ae | ||
|
|
7df7cd01eb | ||
|
|
098d805a8b | ||
|
|
4a21034a00 | ||
|
|
7904e359f2 | ||
|
|
0c8a94beb8 | ||
|
|
c13a573792 | ||
|
|
f9b42e12ae | ||
|
|
5c2031b768 | ||
|
|
49643882d4 | ||
|
|
175ddaa3a1 | ||
|
|
cc1d6e97b8 | ||
|
|
79b96ab301 | ||
|
|
44d9316023 | ||
|
|
5b0c9a74fb | ||
|
|
3429fc3e4c | ||
|
|
d11d8d5353 | ||
|
|
1742bd6ded | ||
|
|
9f6e118ea0 | ||
|
|
717bbd3bb5 | ||
|
|
e8ebe4de14 | ||
|
|
0ff614ccd4 | ||
|
|
d0a77b7e0c | ||
|
|
2815889090 | ||
|
|
1317956663 | ||
|
|
a2303d8895 | ||
|
|
2161c793dc | ||
|
|
a2f943db8f | ||
|
|
23a31b9c00 | ||
|
|
2591d1b94b | ||
|
|
300f97f102 | ||
|
|
7e3f6c3066 | ||
|
|
601d232064 | ||
|
|
8854ac84ad | ||
|
|
0302c3fbd4 | ||
|
|
6b6fdc6cfe | ||
|
|
7126ce86ec | ||
|
|
760bf52f75 | ||
|
|
6d791d31de | ||
|
|
21adc98d70 | ||
|
|
6fd7a56568 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -38,6 +38,7 @@ docs/reference/*/*.txt
|
|||||||
docs/reference/*/*.types
|
docs/reference/*/*.types
|
||||||
docs/reference/*/html/
|
docs/reference/*/html/
|
||||||
docs/reference/*/xml/
|
docs/reference/*/xml/
|
||||||
|
docs/reference/shell/doc-gen-*
|
||||||
gtk-doc.make
|
gtk-doc.make
|
||||||
js/misc/config.js
|
js/misc/config.js
|
||||||
intltool-extract.in
|
intltool-extract.in
|
||||||
@@ -45,6 +46,7 @@ intltool-merge.in
|
|||||||
intltool-update.in
|
intltool-update.in
|
||||||
libtool
|
libtool
|
||||||
m4/
|
m4/
|
||||||
|
man/gnome-shell.1
|
||||||
omf.make
|
omf.make
|
||||||
po/*.gmo
|
po/*.gmo
|
||||||
po/gnome-shell.pot
|
po/gnome-shell.pot
|
||||||
@@ -84,6 +86,8 @@ src/test-theme
|
|||||||
src/st.h
|
src/st.h
|
||||||
src/stamp-st.h
|
src/stamp-st.h
|
||||||
src/stamp-st.h.tmp
|
src/stamp-st.h.tmp
|
||||||
|
src/st-scroll-view-fade-generated.c
|
||||||
|
src/stamp-st-scroll-view-fade-generated.c
|
||||||
stamp-h1
|
stamp-h1
|
||||||
tests/run-test.sh
|
tests/run-test.sh
|
||||||
xmldocs.make
|
xmldocs.make
|
||||||
|
|||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "src/gvc"]
|
||||||
|
path = src/gvc
|
||||||
|
url = git://git.gnome.org/libgnome-volume-control
|
||||||
331
HACKING
Normal file
331
HACKING
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
Coding guide
|
||||||
|
============
|
||||||
|
|
||||||
|
Our goal is to have all JavaScript code in GNOME follow a consistent style. In
|
||||||
|
a dynamic language like JavaScript, it is essential to be rigorous about style
|
||||||
|
(and unit tests), or you rapidly end up with a spaghetti-code mess.
|
||||||
|
|
||||||
|
A quick note
|
||||||
|
------------
|
||||||
|
|
||||||
|
Life isn't fun if you can't break the rules. If a rule seems unnecessarily
|
||||||
|
restrictive while you're coding, ignore it, and let the patch reviewer decide
|
||||||
|
what to do.
|
||||||
|
|
||||||
|
Indentation and whitespace
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Use four-space indents. Braces are on the same line as their associated
|
||||||
|
statements. You should only omit braces if *both* sides of the statement are
|
||||||
|
on one line.
|
||||||
|
|
||||||
|
* One space after the `function` keyword. No space between the function name
|
||||||
|
* in a declaration or a call. One space before the parens in the `if`
|
||||||
|
* statements, or `while`, or `for` loops.
|
||||||
|
|
||||||
|
function foo(a, b) {
|
||||||
|
let bar;
|
||||||
|
|
||||||
|
if (a > b)
|
||||||
|
bar = do_thing(a);
|
||||||
|
else
|
||||||
|
bar = do_thing(b);
|
||||||
|
|
||||||
|
if (var == 5) {
|
||||||
|
for (let i = 0; i < 10; i++) {
|
||||||
|
print(i);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print(20);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Semicolons
|
||||||
|
----------
|
||||||
|
|
||||||
|
JavaScript allows omitting semicolons at the end of lines, but don't. Always
|
||||||
|
end statements with a semicolon.
|
||||||
|
|
||||||
|
js2-mode
|
||||||
|
--------
|
||||||
|
|
||||||
|
If using Emacs, do not use js2-mode. It is outdated and hasn't worked for a
|
||||||
|
while. emacs now has a built-in JavaScript mode, js-mode, based on
|
||||||
|
espresso-mode. It is the de facto emacs mode for JavaScript.
|
||||||
|
|
||||||
|
File naming and creation
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
For JavaScript files, use lowerCamelCase-style names, with a `.js` extension.
|
||||||
|
|
||||||
|
We only use C where gjs/gobject-introspection is not available for the task, or
|
||||||
|
where C would be cleaner. To work around limitations in
|
||||||
|
gjs/gobject-introspection itself, add a new method in `shell-util.[ch]`.
|
||||||
|
|
||||||
|
Like many other GNOME projects, we prefix our C source filenames with the
|
||||||
|
library name followed by a dash, e.g. `shell-app-system.c`. Create a
|
||||||
|
`-private.h` header when you want to share code internally in the
|
||||||
|
library. These headers are not installed, distributed or introspected.
|
||||||
|
|
||||||
|
Imports
|
||||||
|
-------
|
||||||
|
|
||||||
|
Use UpperCamelCase when importing modules to distinguish them from ordinary
|
||||||
|
variables, e.g.
|
||||||
|
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
|
|
||||||
|
Imports should be categorized into one of two places. The top-most import block
|
||||||
|
should contain only "environment imports". These are either modules from
|
||||||
|
gobject-introspection or modules added by gjs itself.
|
||||||
|
|
||||||
|
The second block of imports should contain only "application imports". These
|
||||||
|
are the JS code that is in the gnome-shell codebase,
|
||||||
|
e.g. `imports.ui.popupMenu`.
|
||||||
|
|
||||||
|
Each import block should be sorted alphabetically. Don't import modules you
|
||||||
|
don't use.
|
||||||
|
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
const Params = imports.misc.params;
|
||||||
|
const Tweener = imports.ui.tweener;
|
||||||
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
|
The alphabetical ordering should be done independently of the location of the
|
||||||
|
location. Never reference `imports` in actual code.
|
||||||
|
|
||||||
|
Constants
|
||||||
|
---------
|
||||||
|
|
||||||
|
We use CONSTANTS_CASE to define constants. All constants should be directly
|
||||||
|
under the imports:
|
||||||
|
|
||||||
|
const MY_DBUS_INTERFACE = 'org.my.Interface';
|
||||||
|
|
||||||
|
Variable declaration
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Always use either `const` or `let` when defining a variable.
|
||||||
|
|
||||||
|
// Iterating over an array
|
||||||
|
for (let i = 0; i < arr.length; ++i) {
|
||||||
|
let item = arr[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Iterating over an object's properties
|
||||||
|
for (let prop in someobj) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
If you use "var" then the variable is added to function scope, not block scope.
|
||||||
|
See [What's new in JavaScript 1.7](https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.7#Block_scope_with_let_%28Merge_into_let_Statement%29)
|
||||||
|
|
||||||
|
Classes
|
||||||
|
-------
|
||||||
|
|
||||||
|
There are many approaches to classes in JavaScript. We use our own class framework
|
||||||
|
(sigh), which is built in gjs. The advantage is that it supports inheriting from
|
||||||
|
GObjects, although this feature isn't used very often in the Shell itself.
|
||||||
|
|
||||||
|
const IconLabelMenuItem = new Lang.Class({
|
||||||
|
Name: 'IconLabelMenuItem',
|
||||||
|
Extends: PopupMenu.PopupMenuBaseItem,
|
||||||
|
|
||||||
|
_init: function(icon, label) {
|
||||||
|
this.parent({ reactive: false });
|
||||||
|
this.addActor(icon);
|
||||||
|
this.addActor(label);
|
||||||
|
},
|
||||||
|
|
||||||
|
open: function() {
|
||||||
|
log("menu opened!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
* 'Name' is required. 'Extends' is optional. If you leave it out, you will
|
||||||
|
automatically inherit from Object.
|
||||||
|
|
||||||
|
* Leave a blank line between the "class header" (Name, Extends, and other
|
||||||
|
things) and the "class body" (methods). Leave a blank line between each
|
||||||
|
method.
|
||||||
|
|
||||||
|
* No space before the colon, one space after.
|
||||||
|
|
||||||
|
* No trailing comma after the last item.
|
||||||
|
|
||||||
|
* Make sure to use a semicolon after the closing paren to the class. It's
|
||||||
|
still a giant function call, even though it may resemble a more
|
||||||
|
conventional syntax.
|
||||||
|
|
||||||
|
GObject Introspection
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
GObject Introspection is a powerful feature that allows us to have native
|
||||||
|
bindings for almost any library built around GObject. If a library requires
|
||||||
|
you to inherit from a type to use it, you can do so:
|
||||||
|
|
||||||
|
const MyClutterActor = new Lang.Class({
|
||||||
|
Name: 'MyClutterActor',
|
||||||
|
Extends: Clutter.Actor,
|
||||||
|
|
||||||
|
vfunc_get_preferred_width: function(actor, forHeight) {
|
||||||
|
return [100, 100];
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_get_preferred_height: function(actor, forWidth) {
|
||||||
|
return [100, 100];
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_paint: function(actor) {
|
||||||
|
let alloc = this.get_allocation_box();
|
||||||
|
Cogl.set_source_color4ub(255, 0, 0, 255);
|
||||||
|
Cogl.rectangle(alloc.x1, alloc.y1,
|
||||||
|
alloc.x2, alloc.y2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Translatable strings, `environment.js`
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
We use gettext to translate the GNOME Shell into all the languages that GNOME
|
||||||
|
supports. The `gettext` function is aliased globally as `_`, you do not need to
|
||||||
|
explicitly import it. This is done through some magic in the
|
||||||
|
[environment.js](http://git.gnome.org/browse/gnome-shell/tree/js/ui/environment.js)
|
||||||
|
file. If you can't find a method that's used, it's probably either in gjs itself
|
||||||
|
or installed on the global object from the Environment.
|
||||||
|
|
||||||
|
Use 'single quotes' for programming strings that should not be translated
|
||||||
|
and "double quotes" for strings that the user may see. This allows us to
|
||||||
|
quickly find untranslated or mistranslated strings by grepping through the
|
||||||
|
sources for double quotes without a gettext call around them.
|
||||||
|
|
||||||
|
`actor` and `_delegate`
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
gjs allows us to set so-called "expando properties" on introspected objects,
|
||||||
|
allowing us to treat them like any other. Because the Shell was built before
|
||||||
|
you could inherit from GTypes natively in JS, we usually have a wrapper class
|
||||||
|
that has a property called `actor`. We call this wrapper class the "delegate".
|
||||||
|
|
||||||
|
We sometimes use expando properties to set a property called `_delegate` on
|
||||||
|
the actor itself:
|
||||||
|
|
||||||
|
const MyClass = new Lang.Class({
|
||||||
|
Name: 'MyClass',
|
||||||
|
|
||||||
|
_init: function() {
|
||||||
|
this.actor = new St.Button({ text: "This is a button" });
|
||||||
|
this.actor._delegate = this;
|
||||||
|
|
||||||
|
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
|
||||||
|
},
|
||||||
|
|
||||||
|
_onClicked: function(actor) {
|
||||||
|
actor.set_label("You clicked the button!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
The 'delegate' property is important for anything which trying to get the
|
||||||
|
delegate object from an associated actor. For instance, the drag and drop
|
||||||
|
system calls the `handleDragOver` function on the delegate of a "drop target"
|
||||||
|
when the user drags an item over it. If you do not set the `_delegate`
|
||||||
|
property, your actor will not be able to be dropped onto.
|
||||||
|
|
||||||
|
Functional style
|
||||||
|
----------------
|
||||||
|
|
||||||
|
JavaScript Array objects offer a lot of common functional programming
|
||||||
|
capabilities such as forEach, map, filter and so on. You can use these when
|
||||||
|
they make sense, but please don't have a spaghetti mess of function programming
|
||||||
|
messed in a procedural style. Use your best judgment.
|
||||||
|
|
||||||
|
Closures
|
||||||
|
--------
|
||||||
|
|
||||||
|
`this` will not be captured in a closure, it is relative to how the closure is
|
||||||
|
invoked, not to the value of this where the closure is created, because "this"
|
||||||
|
is a keyword with a value passed in at function invocation time, it is not a
|
||||||
|
variable that can be captured in closures.
|
||||||
|
|
||||||
|
All closures should be wrapped with a Lang.bind.
|
||||||
|
|
||||||
|
const Lang = imports.lang;
|
||||||
|
|
||||||
|
let closure = Lang.bind(this, function() { this._fnorbate(); });
|
||||||
|
|
||||||
|
A more realistic example would be connecting to a signal on a method of a
|
||||||
|
prototype:
|
||||||
|
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const FnorbLib = imports.fborbLib;
|
||||||
|
|
||||||
|
const MyClass = new Lang.Class({
|
||||||
|
_init: function() {
|
||||||
|
let fnorb = new FnorbLib.Fnorb();
|
||||||
|
fnorb.connect('frobate', Lang.bind(this, this._onFnorbFrobate));
|
||||||
|
},
|
||||||
|
|
||||||
|
_onFnorbFrobate: function(fnorb) {
|
||||||
|
this._updateFnorb();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Object literal syntax
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
In JavaScript, these are equivalent:
|
||||||
|
|
||||||
|
foo = { 'bar': 42 };
|
||||||
|
foo = { bar: 42 };
|
||||||
|
|
||||||
|
and so are these:
|
||||||
|
|
||||||
|
var b = foo['bar'];
|
||||||
|
var b = foo.bar;
|
||||||
|
|
||||||
|
If your usage of an object is like an object, then you're defining "member
|
||||||
|
variables." For member variables, use the no-quotes no-brackets syntax: `{ bar:
|
||||||
|
42 }` `foo.bar`.
|
||||||
|
|
||||||
|
If your usage of an object is like a hash table (and thus conceptually the keys
|
||||||
|
can have special chars in them), don't use quotes, but use brackets: `{ bar: 42
|
||||||
|
}`, `foo['bar']`.
|
||||||
|
|
||||||
|
Getters, setters, and Tweener
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Getters and setters should be used when you are dealing with an API that is
|
||||||
|
designed around setting properties, like Tweener. If you want to animate an
|
||||||
|
arbitrary property, create a getter and setter, and use Tweener to animate the
|
||||||
|
property.
|
||||||
|
|
||||||
|
const ANIMATION_TIME = 2000;
|
||||||
|
|
||||||
|
const MyClass = new Lang.Class({
|
||||||
|
Name: 'MyClass',
|
||||||
|
|
||||||
|
_init: function() {
|
||||||
|
this.actor = new St.BoxLayout();
|
||||||
|
this._position = 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
get position() {
|
||||||
|
return this._position;
|
||||||
|
},
|
||||||
|
|
||||||
|
set position(value) {
|
||||||
|
this._position = value;
|
||||||
|
this.actor.set_position(value, value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let myThing = new MyClass();
|
||||||
|
Tweener.addTween(myThing,
|
||||||
|
{ position: 100,
|
||||||
|
time: ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad' });
|
||||||
10
Makefile.am
10
Makefile.am
@@ -1,7 +1,11 @@
|
|||||||
# Point to our macro directory and pick up user flags from the environment
|
# Point to our macro directory and pick up user flags from the environment
|
||||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||||
|
|
||||||
SUBDIRS = data js src browser-plugin tests po man docs
|
SUBDIRS = data js src browser-plugin tests po docs
|
||||||
|
|
||||||
|
if ENABLE_MAN
|
||||||
|
SUBDIRS += man
|
||||||
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
.project \
|
.project \
|
||||||
@@ -12,7 +16,9 @@ EXTRA_DIST = \
|
|||||||
# These are files checked into Git that we don't want to distribute
|
# These are files checked into Git that we don't want to distribute
|
||||||
DIST_EXCLUDE = \
|
DIST_EXCLUDE = \
|
||||||
.gitignore \
|
.gitignore \
|
||||||
|
.gitmodules \
|
||||||
gnome-shell.doap \
|
gnome-shell.doap \
|
||||||
|
HACKING \
|
||||||
MAINTAINERS \
|
MAINTAINERS \
|
||||||
tools/build/*
|
tools/build/*
|
||||||
|
|
||||||
@@ -20,4 +26,4 @@ distcheck-hook:
|
|||||||
@echo "Checking disted files against files in git"
|
@echo "Checking disted files against files in git"
|
||||||
@$(srcdir)/tools/check-for-missing.py $(srcdir) $(distdir) $(DIST_EXCLUDE)
|
@$(srcdir)/tools/check-for-missing.py $(srcdir) $(distdir) $(DIST_EXCLUDE)
|
||||||
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man
|
||||||
|
|||||||
240
NEWS
240
NEWS
@@ -1,3 +1,243 @@
|
|||||||
|
3.7.3.1
|
||||||
|
=======
|
||||||
|
* Revert 490206b to not depend on NMGTK-0.9.7, which hasn't been released yet
|
||||||
|
|
||||||
|
3.7.3
|
||||||
|
=====
|
||||||
|
* Add 'No Messages' label when message tray is empty [Victoria; #686738]
|
||||||
|
* Use better icons in Ctrl-Alt-Tab popup [Stéphane; #641303]
|
||||||
|
* Show the OSK on the monitor where the focused window lives [Giovanni; #685856]
|
||||||
|
* Highlight window clone and caption when hovered [Giovanni, Marc; #665310]
|
||||||
|
* Improve login process indication [Stéphane; #687113]
|
||||||
|
* Omit empty categories in apps view [Stéphane; #687970]
|
||||||
|
* Style panel differently according to mode [Florian; #684573]
|
||||||
|
* Make it possible to hide the user name [Matthias; #688577]
|
||||||
|
* Consolidate and improve chat connection notifications [Giovanni; #687213]
|
||||||
|
* Improve notification scrollbar appearance [Carlos; #688393]
|
||||||
|
* Fade scroll view fade near scrolling edges [Jasper; #689249]
|
||||||
|
* Add a read-only org.gnome.Shell.Mode property [Debarshi; #689300]
|
||||||
|
* Don't close message tray after using context menus [Giovanni; #689296]
|
||||||
|
* Port swipe-scrolling to ClutterPanAction [Jasper, Florian; #689062, #689552]
|
||||||
|
* Remember state of 'Remember Password' checkbox [Ron; #688039]
|
||||||
|
* Improve timestamp format in chat notifications [Carlos; #680989]
|
||||||
|
* Improve style of missed-messages counter [Carlos; #686472]
|
||||||
|
* Omit connection failure notifications if cancelled by user [Giovanni; #684823]
|
||||||
|
* Add window-based Alt-Tab popup [Florian; #688913]
|
||||||
|
* Support external session mode definitions [Florian; #689304]
|
||||||
|
* Support session-mode-specific extensions [Florian; #689305]
|
||||||
|
* Support 'parentMode' property in session modes [Florian; #689308]
|
||||||
|
* Support a new org.gnome.ShellSearchProvider2 DBus interface
|
||||||
|
[Cosimo; #689735, #690009]
|
||||||
|
* Add "windows" to Ctrl-Alt-Tab popup [Jasper; #689653]
|
||||||
|
* Port PopupMenu to GrabHelper [Jasper; #689109, #689954]
|
||||||
|
* Show headphone icon when headphones are plugged in [Giovanni; #675902]
|
||||||
|
* Display (non-app) search results as list [Tanner, Cosimo; #681797]
|
||||||
|
* Skip diacritical marks in search terms [Aleksander; #648587]
|
||||||
|
* Expose all engine options in input sources [Giovanni, Rui; #682318]
|
||||||
|
* Add input source switcher popup [Rui; #682315]
|
||||||
|
* Add minimal support for InfiniBand in network menu [Dan; #677150]
|
||||||
|
* Misc bug fixes and cleanups [Sebastian, Aleksander, Giovanni, Tim, Cosimo,
|
||||||
|
Florian, Matthias, Rui, Lionel, Colin, Piotr, Guillaume, Bastien, Tanner,
|
||||||
|
Carlos, Stéphane, Jakub; #688422, #688379, #688750, #688771, #686800,
|
||||||
|
#688133, #688895, #688966, #683986, #688004, #689108, #689029, #683449,
|
||||||
|
#688196, #689304, #689243, #689295, #689325, #689400, #679168, #689568,
|
||||||
|
#689537, #689528, #689749, #689789, #689353, #689820, #689868, #689778,
|
||||||
|
#689959, #688589, #688589, #689955, #687250, #689965, #690046, #690049,
|
||||||
|
#689884, #682286, #690173, #690174, #672941, #689876, #687881, #690171,
|
||||||
|
#690241, #690312, #690175, #687955, #650843, #688234, #690427
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Cosimo Cecchi, Matthias Clasen, Stéphane Démurget,
|
||||||
|
Guillaume Desmottes, Tanner Doshier, Piotr Drąg, Sebastian Keller,
|
||||||
|
Lionel Landwerlin, Tim Lunn, Victoria Martínez de la Cruz, Aleksander Morgado,
|
||||||
|
Florian Müllner, Bastien Nocera, Marc Plano-Lesay, Carlos Soriano Sánchez,
|
||||||
|
Jakub Steiner, Jasper St. Pierre, Colin Walters, Dan Winship, Ron Yorston
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Yuri Myasoedov [ru], Wouter Bolsterlee [nl], Yaron Shahrabani [he],
|
||||||
|
Nilamdyuti Goswami [as], Ani Peter [ml], Kjartan Maraas [nb],
|
||||||
|
Dr.T.Vasudevan [ta], A S Alam [pa], Shankar Prasad [kn], Khaled Hosny [ar],
|
||||||
|
Daniel Mustieles [es], Dušan Kazik [sk]
|
||||||
|
|
||||||
|
3.7.2
|
||||||
|
=====
|
||||||
|
* Enforce RTL in he for messages that might end up as LTR [Florian; #686630]
|
||||||
|
* gdm: Move logo into the panel [Florian; #685852]
|
||||||
|
* Hide notifications when closed button is clicked [Jasper, Florian; #682237]
|
||||||
|
* Tweak screenShield animations [Rui; #686745]
|
||||||
|
* Restore Fittsability of summary items in message tray [Florian; #686474]
|
||||||
|
* Save screencasts as recent item [Ray; #680647]
|
||||||
|
* overview: Resize window captions on content change [Giovanni, Alex; #620874]
|
||||||
|
* App search: Match GenericName too [Matthias; #687121]
|
||||||
|
* runDialog: Better match style of other modal dialogs [Florian, Allan; #687127]
|
||||||
|
* Improve the button insensitive style [Stéphane; #687110]
|
||||||
|
* network: Don't use a global switch for all VPN connections [Giovanni; #682929]
|
||||||
|
* appMenu: Update on icon theme changes [Florian; #687224]
|
||||||
|
* Show 'Log out' in more situations [Matthias; #686736]
|
||||||
|
* Add a setting to force the 'Log out' menuitem [Matthias; #686057]
|
||||||
|
* overview: Improve styling of search box [Stéphane; #686479]
|
||||||
|
* Implement 'disable-user-list' in login screen [Ray; #660660]
|
||||||
|
* Fix auto-scroll to bottom in chat notifications [Sjoerd; #686571]
|
||||||
|
* Show feedback notifications when user is busy [Stéphane; #662900]
|
||||||
|
* Disable login button when there is no input [Stéphane; #687112]
|
||||||
|
* Use non-linear overview shade for background [Giovanni, Pierre-Eric; #669798]
|
||||||
|
* Reduce blocking in compositor thread [Simon, Jasper; #687465]
|
||||||
|
* network: new country-specific type to gather providers [Aleksander; #687356]
|
||||||
|
* Update man page [Matthias; #680601]
|
||||||
|
* st-entry: Change the pointer cursor on enter/leave events [Thomas; #687130]
|
||||||
|
* screenShield: Blur and desaturate the background [Giovanni, Cosimo; #682536]
|
||||||
|
* Change height of chat notifications to have more context [Carlos; #665255]
|
||||||
|
* screenShield: Account for motion velocity when hiding [Giovanni; #682537]
|
||||||
|
* screenShield: hide the cursor while the lock screen is on [Giovanni; #682535]
|
||||||
|
* Support remote search provider settings [Cosimo; #687491]
|
||||||
|
* unlockDialog: Improve label of confirmation button [Stéphane; #687656]
|
||||||
|
* userMenu: Rename "System Settings" item to "Settings" [Elad; #687738]
|
||||||
|
* messageTray: Add keybinding to focus current notification [Stéphane; #652082]
|
||||||
|
* Remove shell-screen-grabber [Neil; #685915]
|
||||||
|
* main: Stop using Metacity's keybinding files [Florian; #687672]
|
||||||
|
* Bluetooth: Remove ObexFTP functionality [Bastien; #688160]
|
||||||
|
* a11y: Also set WM theme when HighContrast is switched on [Cosimo; #688256]
|
||||||
|
* network: Rework multiple NIC support [Giovanni; #677142]
|
||||||
|
* Rework keybindings to allow selective blocking/processing [Florian; #688202]
|
||||||
|
* recorder: Show indicator on primary monitor [Adel; #688470]
|
||||||
|
* recorder: Set frame duration to fix broken video headers [Adel; #688487]
|
||||||
|
* Misc. bugfixes and cleanups [Florian, Jasper, Giovanni, Matthew, Stéphane,
|
||||||
|
Allan, Daiki, Owen, Alejandro, Jean-François, Cosimo, Sebastian, Adel, Alban;
|
||||||
|
#686484, #686728, #686805, #686574, #686763, #682428, #687132, #685239,
|
||||||
|
#687189, #687226, #658091, #670687, #687457, #687242, #687287, #687020,
|
||||||
|
#686583, #661194, #687491, #657315, #687958, #683986, #688089, #687708,
|
||||||
|
#686530, #684810, #688181, #688475, #688557, #688507, #638351]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Elad Alfassa, Matthew Barnes, Alban Browaeys, Giovanni Campagna,
|
||||||
|
Cosimo Cecchi, Matthias Clasen, Allan Day, Stéphane Démurget,
|
||||||
|
Jean-François Fortin Tam, Adel Gadllah, Alex Hultman, Sebastian Keller,
|
||||||
|
Rui Matos, Simon McVittie, Aleksander Morgado, Florian Müllner,
|
||||||
|
Bastien Nocera, Pierre-Eric Pelloux-Prayer, Alejandro Piñeiro, Neil Roberts,
|
||||||
|
Sjoerd Simons, Carlos Soriano Sánchez, Jasper St. Pierre, Ray Strode,
|
||||||
|
Owen Taylor, Daiki Ueno, Thomas Wood
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Dušan Kazik [sk], Pavol Klačanský [sk], Piotr Drąg [pl], Yuri Myasoedov [ru],
|
||||||
|
Marek Černocký [cs], Kjartan Maraas [nb], Wolfgang Stöggl [de],
|
||||||
|
Yaron Shahrabani [he], Fran Diéguez [gl], Mattias Põldaru [et]
|
||||||
|
|
||||||
|
3.7.1
|
||||||
|
=====
|
||||||
|
* Add shortcut to open application view directly [Jeremy; #685738]
|
||||||
|
* Expose '<Super>F10' shortcut in System Settings [Florian; #672909]
|
||||||
|
* Clean up timestamp format in chat notifications [Carlos; #680989]
|
||||||
|
* loginScreen: Add support for 'disable-restart-buttons' [Florian; #686247]
|
||||||
|
* Update textures automatically on file changes [Florian; #679268]
|
||||||
|
* Implement org.gnome.ScreenSaver.GetActiveTime [Giovanni; #686064]
|
||||||
|
* Add missing translations for GSetting schema [Giovanni; #686413]
|
||||||
|
* Hide workspace switcher completely when it's not necessary [Seif; #686483]
|
||||||
|
* Explicitly load gnome-screensaver when not running GDM [Tim; #683060]
|
||||||
|
* Port to GnomeIdleMonitor [Jasper; #682224]
|
||||||
|
* Set Empathy as preferred handler when delegating channels [Xavier; #686296]
|
||||||
|
* Allow testing GDM login dialog from the session [Giovanni; #683725]
|
||||||
|
* Use all available space for windows in window picker [Jasper, Pierre-Eric;
|
||||||
|
#582650]
|
||||||
|
* Use logind for suspend if available [Florian; #686482]
|
||||||
|
* Misc. fixes and cleanups [Jasper, Florian, Adel, Rui; #677426, #680426,
|
||||||
|
#686233, #686241, #686318, #686240, #686484, #686002, #684650, #686487]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jeremy Bicha, Giovanni Campagna, Xavier Claessens, Adel Gadllah, Seif Lotfy,
|
||||||
|
Tim Lunn, Rui Matos, Florian Müllner, Pierre-Eric Pelloux-Prayer,
|
||||||
|
Carlos Soriano, Jasper St. Pierre
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Andika Triwidada [id], Matej Urbančič [sl], Ihar Hrachyshka [be],
|
||||||
|
Daniel Mustieles [es], Fran Diéguez [gl], Takayuki KUSANO [ja],
|
||||||
|
Мирослав Николић [sr, sr@latin], Dušan Kazik [sk], Tom Tryfonidis [el]
|
||||||
|
|
||||||
|
3.6.1
|
||||||
|
=====
|
||||||
|
* dash: Make padding even on the top/bottom of the dash [Jasper; #684619]
|
||||||
|
* Fix a crash when dragging search results [Jasper; #684888]
|
||||||
|
* workspaceThumbnail: Fix dragging with static workspaces [Jasper; #684641]
|
||||||
|
* Really hide 'Show Keyboard Layout' on the lock screen [Matthias]
|
||||||
|
* Misc. improvements to jhbuild setup [Owen; #685352, #685353, #685354, #685355]
|
||||||
|
* Show message tray in Ctrl+Alt+Tab outside of the overview [Jasper, Florian;
|
||||||
|
#684633, #685914]
|
||||||
|
* Disable hotplug sniffer on remote filesystems [Jasper; #684093]
|
||||||
|
* userMenu: Remove 'Switch Session' item [Florian; #685062]
|
||||||
|
* unlockDialog: Make prompt entry insensitive while logging in [Jasper; #685444]
|
||||||
|
* messageTray: Don't animate desktop clone for failed grabs [Jasper; #685342]
|
||||||
|
* Fix crash on dragging windows between workspaces [Ryan; #681399]
|
||||||
|
* userMenu: Ignore 'lock-enabled' setting for user switching [Florian; #685536]
|
||||||
|
* gdm: Fix key-focus on first user [Adel; #684650]
|
||||||
|
* Make grid button insensitive when dragging non-favorites [Jasper; #685313]
|
||||||
|
* Calendar: hide all actions when on the login screen [Matthias; #685142]
|
||||||
|
* Adapt unlock dialog layout for the login screen [Florian; #685201]
|
||||||
|
* Make focus-follows-mouse work better with Shell UI [Florian; #678169]
|
||||||
|
* Improve look of screen shield [Jasper; #685919]
|
||||||
|
* Fix keynav in the login screen [Florian; #684730]
|
||||||
|
* dateMenu: Hide "Open Calendar" item if calendar unavailable [Florian; #686050]
|
||||||
|
* unlockDialog: Reset UI on verification failure [Giovanni; #685441]
|
||||||
|
* Show unlock dialog on primary monitor when using keynav [Giovanni; #685855]
|
||||||
|
* Fix height changes of entries when entering text [Florian; #685534]
|
||||||
|
* Fix show-apps label after successful drags [Florian; #684627]
|
||||||
|
* Misc. bugfixes and cleanups [Jasper, Olivier, Florian, Owen, Adel, Tanner, Tim, Matthias; #685434, #685511, #685466, #685341, #685156, #681159, #673189, #686016, 684869, #686079, #686063
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jasper St. Pierre
|
||||||
|
Matthias Clasen
|
||||||
|
Owen Taylor
|
||||||
|
Olivier Blin
|
||||||
|
Florian Müllner
|
||||||
|
Ryan Lortie
|
||||||
|
Adel Gadllah
|
||||||
|
Tanner Doshier
|
||||||
|
Tim Lunn
|
||||||
|
Giovanni Campagna
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Tobias Endrigkeit [de], Rudolfs Mazurs [lv], Ask H. Larsen [da],
|
||||||
|
Shankar Prasad [kn], Changwoo Ryu [ko], Chris Leonard [en_GB],
|
||||||
|
Arash Mousavi [fa], Theppitak Karoonboonyanan [th], Seán de Búrca [ga],
|
||||||
|
Yaron Shahrabani [he], Alexander Shopov [bg], Žygimantas Beručka [lt],
|
||||||
|
Milo Casagrande [it], Kjartan Maraas [nb], Kris Thomsen [da],
|
||||||
|
Aurimas Černius [lt], Yuri Myasoedov [ru], Мирослав Николић [sr],
|
||||||
|
Marek Černocký [cs], Gabor Kelemen [hu], Ihar Hrachyshka [be],
|
||||||
|
Chao-Hsiung Liao [zh_HK, zh_TW], Eleanor Chen [zh_CN],
|
||||||
|
Carles Ferrando [ca@valencia], Vicent Cubells [ca], Daniel Korostil [uk],
|
||||||
|
Alexandre Franke [fr], Piotr Drąg [pl]
|
||||||
|
|
||||||
|
3.6.0
|
||||||
|
=====
|
||||||
|
* keyboard: Make input source items accessible [Florian; #684462]
|
||||||
|
* Don't show network dialogs in the lock screen [Giovanni; #684384]
|
||||||
|
* popupMenu: Fix initial visibility of settings items [Florian; #684473]
|
||||||
|
* userMenu: Close menu immediately on user/session switch [Florian; #684459]
|
||||||
|
* Fix alignment of search section headers in RTL locales [Florian; #684379]
|
||||||
|
* screenShield: Fix unlock animation [Florian; #684591]
|
||||||
|
* Don't open the tray from a dwell while in a modal grab [Jasper; #684458]
|
||||||
|
* userMenu: Fix texture updates on icon changes [Florian; #679268]
|
||||||
|
* Fix a11y support in the login screen [Florian, Ray; #684727, #684728, #684748]
|
||||||
|
* Make On-Screen-Keyboard usable with new message tray [Giovanni, Florian;
|
||||||
|
#683546]
|
||||||
|
* Fix initial visibility of input volume in lock-screen [Florian; #684611]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Florian Müllner, Jasper St. Pierre, Ray Strode
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Matej Urbančič [sl], Dr.T.Vasudevan [ta], Piotr Drąg [pl], A S Alam [pa],
|
||||||
|
Alexander Shopov [bg], Nilamdyuti Goswami [as], Chandan Kumar [hi],
|
||||||
|
Khaled Hosny [ar], Ibrahim Saed [ar], Sandeep Sheshrao Shedmake [mr],
|
||||||
|
Tom Tryfonidis [el], Theppitak Karoonboonyanan [th], Alexandre Franke [fr],
|
||||||
|
Fran Diéguez [gl], Gabor Kelemen [hu], Ani Peter [ml], Daniel Mustieles [es],
|
||||||
|
Мирослав Николић [sr, sr@latin], Duarte Loreto [pt], ManojKumar Giri [or],
|
||||||
|
Ihar Hrachyshka [be], Aurimas Černius [lt], Djavan Fagundes [pt_BR],
|
||||||
|
Changwoo Ryu [ko], Bruce Cowan [en_GB], Kris Thomsen [da], Gil Forcada [ca],
|
||||||
|
Yaron Shahrabani [he], Milo Casagrande [it], Ville-Pekka Vainio [fi],
|
||||||
|
YunQiang Su [zh_CN], Carles Ferrando [ca@valencia], Mario Blättermann [de],
|
||||||
|
Rajesh Ranjan [hi], Yuri Myasoedov [ru], Rūdolfs Mazurs [lv],
|
||||||
|
Jiro Matsuzawa [ja], Mattias Põldaru [et], Timur Zhamakeev [ky],
|
||||||
|
Petr Kovar [cs], Chao-Hsiung Liao [zh_HK,zh_TW], Andika Triwidada [id]
|
||||||
|
|
||||||
3.5.92
|
3.5.92
|
||||||
======
|
======
|
||||||
* Login/UnlockDialog: Don't reset immediately if auth fails [Giovanni; #682544]
|
* Login/UnlockDialog: Don't reset immediately if auth fails [Giovanni; #682544]
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ PKG_NAME="gnome-shell"
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Fetch submodules if needed
|
||||||
|
if test ! -f src/gvc/Makefile.am;
|
||||||
|
then
|
||||||
|
echo "+ Setting up submodules"
|
||||||
|
git submodule init
|
||||||
|
fi
|
||||||
|
git submodule update
|
||||||
|
|
||||||
which gnome-autogen.sh || {
|
which gnome-autogen.sh || {
|
||||||
echo "You need to install gnome-common from GNOME Git (or from"
|
echo "You need to install gnome-common from GNOME Git (or from"
|
||||||
echo "your OS vendor's package manager)."
|
echo "your OS vendor's package manager)."
|
||||||
|
|||||||
@@ -153,8 +153,6 @@ NP_Initialize(NPNetscapeFuncs *pfuncs, NPPluginFuncs *plugin)
|
|||||||
/* global initialization routine, called once when plugin
|
/* global initialization routine, called once when plugin
|
||||||
is loaded */
|
is loaded */
|
||||||
|
|
||||||
g_type_init ();
|
|
||||||
|
|
||||||
g_debug ("plugin loaded");
|
g_debug ("plugin loaded");
|
||||||
|
|
||||||
memcpy (&funcs, pfuncs, sizeof (funcs));
|
memcpy (&funcs, pfuncs, sizeof (funcs));
|
||||||
|
|||||||
37
configure.ac
37
configure.ac
@@ -1,5 +1,5 @@
|
|||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AC_INIT([gnome-shell],[3.5.92],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
AC_INIT([gnome-shell],[3.7.3.1],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_SRCDIR([src/shell-global.c])
|
AC_CONFIG_SRCDIR([src/shell-global.c])
|
||||||
@@ -36,6 +36,8 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
|||||||
|
|
||||||
PKG_PROG_PKG_CONFIG([0.22])
|
PKG_PROG_PKG_CONFIG([0.22])
|
||||||
|
|
||||||
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||||
|
|
||||||
GLIB_GSETTINGS
|
GLIB_GSETTINGS
|
||||||
|
|
||||||
# Get a value to substitute into gnome-shell.in
|
# Get a value to substitute into gnome-shell.in
|
||||||
@@ -52,7 +54,7 @@ AC_MSG_CHECKING([for GStreamer (needed for recording functionality)])
|
|||||||
if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
|
if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
build_recorder=true
|
build_recorder=true
|
||||||
recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11"
|
recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11 gtk+-3.0"
|
||||||
PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
|
PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -63,9 +65,9 @@ AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
|
|||||||
CLUTTER_MIN_VERSION=1.11.11
|
CLUTTER_MIN_VERSION=1.11.11
|
||||||
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
|
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
|
||||||
GJS_MIN_VERSION=1.33.2
|
GJS_MIN_VERSION=1.33.2
|
||||||
MUTTER_MIN_VERSION=3.5.92
|
MUTTER_MIN_VERSION=3.7.3
|
||||||
GTK_MIN_VERSION=3.3.9
|
GTK_MIN_VERSION=3.3.9
|
||||||
GIO_MIN_VERSION=2.31.6
|
GIO_MIN_VERSION=2.35.0
|
||||||
LIBECAL_MIN_VERSION=3.5.3
|
LIBECAL_MIN_VERSION=3.5.3
|
||||||
LIBEDATASERVER_MIN_VERSION=3.5.3
|
LIBEDATASERVER_MIN_VERSION=3.5.3
|
||||||
LIBEDATASERVERUI_MIN_VERSION=3.5.3
|
LIBEDATASERVERUI_MIN_VERSION=3.5.3
|
||||||
@@ -74,8 +76,9 @@ TELEPATHY_LOGGER_MIN_VERSION=0.2.4
|
|||||||
POLKIT_MIN_VERSION=0.100
|
POLKIT_MIN_VERSION=0.100
|
||||||
STARTUP_NOTIFICATION_MIN_VERSION=0.11
|
STARTUP_NOTIFICATION_MIN_VERSION=0.11
|
||||||
GCR_MIN_VERSION=3.3.90
|
GCR_MIN_VERSION=3.3.90
|
||||||
GNOME_DESKTOP_REQUIRED_VERSION=3.5.1
|
GNOME_DESKTOP_REQUIRED_VERSION=3.7.1
|
||||||
GNOME_MENUS_REQUIRED_VERSION=3.5.3
|
GNOME_MENUS_REQUIRED_VERSION=3.5.3
|
||||||
|
PULSE_MIN_VERS=2.0
|
||||||
|
|
||||||
# Collect more than 20 libraries for a prize!
|
# Collect more than 20 libraries for a prize!
|
||||||
PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
|
PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
|
||||||
@@ -97,8 +100,7 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
|
|||||||
telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
|
telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
|
||||||
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
|
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
|
||||||
libnm-glib libnm-util gnome-keyring-1
|
libnm-glib libnm-util gnome-keyring-1
|
||||||
gcr-3 >= $GCR_MIN_VERSION
|
gcr-3 >= $GCR_MIN_VERSION)
|
||||||
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
|
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
|
||||||
|
|
||||||
@@ -120,10 +122,10 @@ CFLAGS=$saved_CFLAGS
|
|||||||
LIBS=$saved_LIBS
|
LIBS=$saved_LIBS
|
||||||
|
|
||||||
PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION)
|
PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION)
|
||||||
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 x11)
|
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.8 x11)
|
||||||
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
|
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
|
||||||
PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
|
PKG_CHECK_MODULES(GVC, libpulse >= $PULSE_MIN_VERS libpulse-mainloop-glib gobject-2.0)
|
||||||
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.5.4)
|
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.7.2.2)
|
||||||
|
|
||||||
AC_MSG_CHECKING([for bluetooth support])
|
AC_MSG_CHECKING([for bluetooth support])
|
||||||
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
|
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
|
||||||
@@ -139,7 +141,7 @@ PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
|
|||||||
AC_SUBST([HAVE_BLUETOOTH],[0])
|
AC_SUBST([HAVE_BLUETOOTH],[0])
|
||||||
AC_MSG_RESULT([no])])
|
AC_MSG_RESULT([no])])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-3.0 >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0)
|
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
|
||||||
AC_SUBST(CALENDAR_SERVER_CFLAGS)
|
AC_SUBST(CALENDAR_SERVER_CFLAGS)
|
||||||
AC_SUBST(CALENDAR_SERVER_LIBS)
|
AC_SUBST(CALENDAR_SERVER_LIBS)
|
||||||
|
|
||||||
@@ -208,6 +210,18 @@ AC_SUBST(TYPELIBDIR)
|
|||||||
|
|
||||||
GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
|
GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(man,
|
||||||
|
[AS_HELP_STRING([--enable-man],
|
||||||
|
[generate man pages [default=yes]])],,
|
||||||
|
enable_man=yes)
|
||||||
|
if test "$enable_man" != no; then
|
||||||
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||||
|
if test -z "$XSLTPROC"; then
|
||||||
|
AC_MSG_ERROR([xsltproc is required for --enable-man])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
|
||||||
|
|
||||||
# Stay command-line compatible with the gnome-common configure option. Here
|
# Stay command-line compatible with the gnome-common configure option. Here
|
||||||
# minimum/yes/maximum are the same, however.
|
# minimum/yes/maximum are the same, however.
|
||||||
AC_ARG_ENABLE(compile_warnings,
|
AC_ARG_ENABLE(compile_warnings,
|
||||||
@@ -254,6 +268,7 @@ AC_CONFIG_FILES([
|
|||||||
js/Makefile
|
js/Makefile
|
||||||
src/calendar-server/evolution-calendar.desktop.in
|
src/calendar-server/evolution-calendar.desktop.in
|
||||||
src/Makefile
|
src/Makefile
|
||||||
|
src/gvc/Makefile
|
||||||
browser-plugin/Makefile
|
browser-plugin/Makefile
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
|
|||||||
@@ -8,5 +8,14 @@
|
|||||||
<KeyListEntry name="toggle-message-tray"
|
<KeyListEntry name="toggle-message-tray"
|
||||||
_description="Show the message tray"/>
|
_description="Show the message tray"/>
|
||||||
|
|
||||||
|
<KeyListEntry name="focus-active-notification"
|
||||||
|
_description="Focus the active notification"/>
|
||||||
|
|
||||||
|
<KeyListEntry name="toggle-application-view"
|
||||||
|
_description="Show all applications"/>
|
||||||
|
|
||||||
|
<KeyListEntry name="open-application-menu"
|
||||||
|
_description="Open the application menu"/>
|
||||||
|
|
||||||
</KeyListEntries>
|
</KeyListEntries>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ desktop_DATA = gnome-shell.desktop gnome-shell-extension-prefs.desktop
|
|||||||
@INTLTOOL_DESKTOP_RULE@
|
@INTLTOOL_DESKTOP_RULE@
|
||||||
|
|
||||||
introspectiondir = $(datadir)/dbus-1/interfaces
|
introspectiondir = $(datadir)/dbus-1/interfaces
|
||||||
introspection_DATA = org.gnome.ShellSearchProvider.xml
|
introspection_DATA = \
|
||||||
|
org.gnome.ShellSearchProvider.xml \
|
||||||
|
org.gnome.ShellSearchProvider2.xml
|
||||||
|
|
||||||
themedir = $(pkgdatadir)/theme
|
themedir = $(pkgdatadir)/theme
|
||||||
dist_theme_DATA = \
|
dist_theme_DATA = \
|
||||||
@@ -32,6 +34,7 @@ dist_theme_DATA = \
|
|||||||
theme/gnome-shell.css \
|
theme/gnome-shell.css \
|
||||||
theme/logged-in-indicator.svg \
|
theme/logged-in-indicator.svg \
|
||||||
theme/message-tray-background.png \
|
theme/message-tray-background.png \
|
||||||
|
theme/more-results.svg \
|
||||||
theme/noise-texture.png \
|
theme/noise-texture.png \
|
||||||
theme/panel-button-border.svg \
|
theme/panel-button-border.svg \
|
||||||
theme/panel-button-highlight-narrow.svg \
|
theme/panel-button-highlight-narrow.svg \
|
||||||
|
|||||||
@@ -2,146 +2,72 @@
|
|||||||
'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
|
'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
|
||||||
'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
|
'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
|
||||||
<node>
|
<node>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.gnome.Shell.SearchProvider:
|
||||||
|
@short_description: Search provider interface
|
||||||
|
|
||||||
|
The interface used for integrating into GNOME Shell's search
|
||||||
|
interface. This interface is deprecated, and org.gnome.Shell.SearchProvider2 should be used instead.
|
||||||
|
-->
|
||||||
<interface name="org.gnome.Shell.SearchProvider">
|
<interface name="org.gnome.Shell.SearchProvider">
|
||||||
<doc:doc>
|
|
||||||
<doc:description>
|
|
||||||
<doc:para>
|
|
||||||
The interface used for integrating into GNOME Shell's search
|
|
||||||
interface.
|
|
||||||
</doc:para>
|
|
||||||
</doc:description>
|
|
||||||
</doc:doc>
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetInitialResultSet:
|
||||||
|
@terms: Array of search terms, which the provider should treat as logical AND.
|
||||||
|
@results: An array of result identifier strings representing items which match the given search terms. Identifiers must be unique within the provider's domain, but other than that may be chosen freely by the provider.
|
||||||
|
|
||||||
|
Called when the user first begins a search.
|
||||||
|
-->
|
||||||
<method name="GetInitialResultSet">
|
<method name="GetInitialResultSet">
|
||||||
<doc:doc>
|
<arg type="as" name="terms" direction="in" />
|
||||||
<doc:description>
|
<arg type="as" name="results" direction="out" />
|
||||||
<doc:para>
|
|
||||||
Called when the user first begins a search.
|
|
||||||
</doc:para>
|
|
||||||
</doc:description>
|
|
||||||
</doc:doc>
|
|
||||||
<arg type="as" direction="in">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
Array of search terms, which the provider should treat as
|
|
||||||
logical AND.
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
<arg type="as" direction="out">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
An array of result identifier strings representing items which
|
|
||||||
match the given search terms. Identifiers must be unique within
|
|
||||||
the provider's domain, but other than that may be chosen freely
|
|
||||||
by the provider.
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetSubsearchResultSet:
|
||||||
|
@previous_results: Array of results previously returned by GetInitialResultSet().
|
||||||
|
@terms: Array of updated search terms, which the provider should treat as logical AND.
|
||||||
|
@results: An array of result identifier strings representing items which match the given search terms. Identifiers must be unique within the provider's domain, but other than that may be chosen freely by the provider.
|
||||||
|
|
||||||
|
Called when a search is performed which is a "subsearch" of
|
||||||
|
the previous search, e.g. the method may return less results, but
|
||||||
|
not more or different results.
|
||||||
|
|
||||||
|
This allows search providers to only search through the previous
|
||||||
|
result set, rather than possibly performing a full re-query.
|
||||||
|
-->
|
||||||
<method name="GetSubsearchResultSet">
|
<method name="GetSubsearchResultSet">
|
||||||
<doc:doc>
|
<arg type="as" name="previous_results" direction="in" />
|
||||||
<doc:description>
|
<arg type="as" name="terms" direction="in" />
|
||||||
<doc:para>
|
<arg type="as" name="results" direction="out" />
|
||||||
Called when a search is performed which is a "subsearch" of
|
|
||||||
the previous search, e.g. the method may return less results, but
|
|
||||||
not more or different results.
|
|
||||||
|
|
||||||
This allows search providers to only search through the previous
|
|
||||||
result set, rather than possibly performing a full re-query.
|
|
||||||
</doc:para>
|
|
||||||
</doc:description>
|
|
||||||
</doc:doc>
|
|
||||||
<arg type="as" direction="in">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
Array of item identifiers
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
<arg type="as" direction="in">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
Array of updated search terms, which the provider should treat as
|
|
||||||
logical AND.
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
<arg type="as" direction="out">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
An array of result identifier strings representing items which
|
|
||||||
match the given search terms. Identifiers must be unique within
|
|
||||||
the provider's domain, but other than that may be chosen freely
|
|
||||||
by the provider.
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetResultMetas:
|
||||||
|
@identifiers: An array of result identifiers as returned by GetInitialResultSet() or GetSubsearchResultSet()
|
||||||
|
@metas: A dictionary describing the given search result, containing 'id' and 'name' (both strings). Optionally, either 'gicon' (a serialized GIcon) or 'icon-data' (raw image data as (iiibiiay) - width, height, rowstride, has-alpha, bits per sample, channels, data) can be specified if the result can be better served with a thumbnail of the content (such as with images).
|
||||||
|
|
||||||
|
Return an array of meta data used to display each given result
|
||||||
|
-->
|
||||||
<method name="GetResultMetas">
|
<method name="GetResultMetas">
|
||||||
<doc:doc>
|
<arg type="as" name="identifiers" direction="in" />
|
||||||
<doc:description>
|
<arg type="aa{sv}" name="metas" direction="out" />
|
||||||
<doc:para>
|
|
||||||
Return an array of meta data used to display each given result
|
|
||||||
</doc:para>
|
|
||||||
</doc:description>
|
|
||||||
</doc:doc>
|
|
||||||
<arg type="as" direction="in">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
An array of result identifiers as returned by
|
|
||||||
GetInitialResultSet() or GetSubsearchResultSet()
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
<arg type="aa{sv}" direction="out">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
A dictionary describing the given search result, containing
|
|
||||||
'id', 'name' (both strings) and either 'icon' (a serialized
|
|
||||||
GIcon) or 'icon-data' (raw image data as (iiibiiay) - width,
|
|
||||||
height, rowstride, has-alpha, bits per sample, channels, data)
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ActivateResult:
|
||||||
|
@identifier: A result identifier as returned by GetInitialResultSet() or GetSubsearchResultSet()
|
||||||
|
|
||||||
|
Called when the users chooses a given result. The result should
|
||||||
|
be displayed in the application associated with the corresponding
|
||||||
|
provider.
|
||||||
|
|
||||||
|
This method is deprecated, and providers should implement ActivateResult2()
|
||||||
|
instead.
|
||||||
|
-->
|
||||||
<method name="ActivateResult">
|
<method name="ActivateResult">
|
||||||
<doc:doc>
|
<arg type="s" name="identifier" direction="in" />
|
||||||
<doc:description>
|
|
||||||
<doc:para>
|
|
||||||
Called when the users chooses a given result. The result should
|
|
||||||
be displayed in the application associated with the corresponding
|
|
||||||
provider.
|
|
||||||
</doc:para>
|
|
||||||
</doc:description>
|
|
||||||
</doc:doc>
|
|
||||||
<arg type="s" direction="in">
|
|
||||||
<doc:doc>
|
|
||||||
<doc:summary>
|
|
||||||
<doc:para>
|
|
||||||
A result identifier as returned by GetInitialResultSet() or
|
|
||||||
GetSubsearchResultSet()
|
|
||||||
</doc:para>
|
|
||||||
</doc:summary>
|
|
||||||
</doc:doc>
|
|
||||||
</arg>
|
|
||||||
</method>
|
</method>
|
||||||
</interface>
|
</interface>
|
||||||
</node>
|
</node>
|
||||||
|
|||||||
87
data/org.gnome.ShellSearchProvider2.xml
Normal file
87
data/org.gnome.ShellSearchProvider2.xml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<!DOCTYPE node PUBLIC
|
||||||
|
'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
|
||||||
|
'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
|
||||||
|
<node>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.gnome.Shell.SearchProvider2:
|
||||||
|
@short_description: Search provider interface
|
||||||
|
|
||||||
|
The interface used for integrating into GNOME Shell's search
|
||||||
|
interface (version 2).
|
||||||
|
-->
|
||||||
|
<interface name="org.gnome.Shell.SearchProvider2">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetInitialResultSet:
|
||||||
|
@terms: Array of search terms, which the provider should treat as logical AND.
|
||||||
|
@results: An array of result identifier strings representing items which match the given search terms. Identifiers must be unique within the provider's domain, but other than that may be chosen freely by the provider.
|
||||||
|
|
||||||
|
Called when the user first begins a search.
|
||||||
|
-->
|
||||||
|
<method name="GetInitialResultSet">
|
||||||
|
<arg type="as" name="terms" direction="in" />
|
||||||
|
<arg type="as" name="results" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetSubsearchResultSet:
|
||||||
|
@previous_results: Array of results previously returned by GetInitialResultSet().
|
||||||
|
@terms: Array of updated search terms, which the provider should treat as logical AND.
|
||||||
|
@results: An array of result identifier strings representing items which match the given search terms. Identifiers must be unique within the provider's domain, but other than that may be chosen freely by the provider.
|
||||||
|
|
||||||
|
Called when a search is performed which is a "subsearch" of
|
||||||
|
the previous search, e.g. the method may return less results, but
|
||||||
|
not more or different results.
|
||||||
|
|
||||||
|
This allows search providers to only search through the previous
|
||||||
|
result set, rather than possibly performing a full re-query.
|
||||||
|
-->
|
||||||
|
<method name="GetSubsearchResultSet">
|
||||||
|
<arg type="as" name="previous_results" direction="in" />
|
||||||
|
<arg type="as" name="terms" direction="in" />
|
||||||
|
<arg type="as" name="results" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetResultMetas:
|
||||||
|
@identifiers: An array of result identifiers as returned by GetInitialResultSet() or GetSubsearchResultSet()
|
||||||
|
@metas: A dictionary describing the given search result, containing 'id' and 'name' (both strings). Optionally, either 'gicon' (a serialized GIcon) or 'icon-data' (raw image data as (iiibiiay) - width, height, rowstride, has-alpha, bits per sample, channels, data) can be specified if the result can be better served with a thumbnail of the content (such as with images). A 'description' field (string) may also be specified if more context would help the user find the desired result.
|
||||||
|
|
||||||
|
Return an array of meta data used to display each given result
|
||||||
|
-->
|
||||||
|
<method name="GetResultMetas">
|
||||||
|
<arg type="as" name="identifiers" direction="in" />
|
||||||
|
<arg type="aa{sv}" name="metas" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ActivateResult:
|
||||||
|
@identifier: A result identifier as returned by GetInitialResultSet() or GetSubsearchResultSet()
|
||||||
|
@terms: Array of search terms, which the provider should treat as logical AND.
|
||||||
|
@timestamp: A timestamp of the user interaction that triggered this call
|
||||||
|
|
||||||
|
Called when the users chooses a given result. The result should
|
||||||
|
be displayed in the application associated with the corresponding
|
||||||
|
provider. The provided search terms can be used to allow launching a full search in
|
||||||
|
the application.
|
||||||
|
-->
|
||||||
|
<method name="ActivateResult">
|
||||||
|
<arg type="s" name="identifier" direction="in" />
|
||||||
|
<arg type="as" name="terms" direction="in" />
|
||||||
|
<arg type="u" name="timestamp" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
LaunchSearch:
|
||||||
|
@terms: Array of search terms, which the provider should treat as logical AND.
|
||||||
|
@timestamp: A timestamp of the user interaction that triggered this call
|
||||||
|
|
||||||
|
Asks the search provider to launch a full search in the application for the provided terms.
|
||||||
|
-->
|
||||||
|
<method name="LaunchSearch">
|
||||||
|
<arg type="as" name="terms" direction="in" />
|
||||||
|
<arg type="u" name="timestamp" direction="in" />
|
||||||
|
</method>
|
||||||
|
</interface>
|
||||||
|
</node>
|
||||||
@@ -57,6 +57,29 @@ value here is from the TpConnectionPresenceType enumeration.</_summary>
|
|||||||
<_summary>Internally used to store the last session presence status for the user. The
|
<_summary>Internally used to store the last session presence status for the user. The
|
||||||
value here is from the GsmPresenceStatus enumeration.</_summary>
|
value here is from the GsmPresenceStatus enumeration.</_summary>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="always-show-log-out" type="b">
|
||||||
|
<default>false</default>
|
||||||
|
<_summary>Always show the 'Log out' menuitem in the user menu.</_summary>
|
||||||
|
<_description>
|
||||||
|
This key overrides the automatic hiding of the 'Log out'
|
||||||
|
menuitem in single-user, single-session situations.
|
||||||
|
</_description>
|
||||||
|
</key>
|
||||||
|
<key name="show-full-name" type="b">
|
||||||
|
<default>true</default>
|
||||||
|
<_summary>Show full name in the user menu</_summary>
|
||||||
|
<_description>Whether the users full name is shown in the user menu or not.</_description>
|
||||||
|
</key>
|
||||||
|
<key name="remember-mount-password" type="b">
|
||||||
|
<default>false</default>
|
||||||
|
<_summary>Whether to remember password for mounting encrypted or remote filesystems</_summary>
|
||||||
|
<_description>
|
||||||
|
The shell will request a password when an encrypted device or a
|
||||||
|
remote filesystem is mounted. If the password can be saved for
|
||||||
|
future use a 'Remember Password' checkbox will be present.
|
||||||
|
This key sets the default state of the checkbox.
|
||||||
|
</_description>
|
||||||
|
</key>
|
||||||
<child name="calendar" schema="org.gnome.shell.calendar"/>
|
<child name="calendar" schema="org.gnome.shell.calendar"/>
|
||||||
<child name="recorder" schema="org.gnome.shell.recorder"/>
|
<child name="recorder" schema="org.gnome.shell.recorder"/>
|
||||||
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
|
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
|
||||||
@@ -83,6 +106,14 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
|
|||||||
Keybinding to open the application menu.
|
Keybinding to open the application menu.
|
||||||
</_description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="toggle-application-view" type="as">
|
||||||
|
<default>["<Super>a"]</default>
|
||||||
|
<_summary>Keybinding to open the "Show Applications" view</_summary>
|
||||||
|
<_description>
|
||||||
|
Keybinding to open the "Show Applications" view of the Activities
|
||||||
|
Overview.
|
||||||
|
</_description>
|
||||||
|
</key>
|
||||||
<key name="toggle-message-tray" type="as">
|
<key name="toggle-message-tray" type="as">
|
||||||
<default>["<Super>m"]</default>
|
<default>["<Super>m"]</default>
|
||||||
<_summary>Keybinding to toggle the visibility of the message tray</_summary>
|
<_summary>Keybinding to toggle the visibility of the message tray</_summary>
|
||||||
@@ -90,6 +121,13 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
|
|||||||
Keybinding to toggle the visibility of the message tray.
|
Keybinding to toggle the visibility of the message tray.
|
||||||
</_description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="focus-active-notification" type="as">
|
||||||
|
<default>["<Super>n"]</default>
|
||||||
|
<_summary>Keybinding to focus the active notification</_summary>
|
||||||
|
<_description>
|
||||||
|
Keybinding to focus the active notification.
|
||||||
|
</_description>
|
||||||
|
</key>
|
||||||
<key name="toggle-recording" type="as">
|
<key name="toggle-recording" type="as">
|
||||||
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
|
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
|
||||||
<_summary>Keybinding to toggle the screen recorder</_summary>
|
<_summary>Keybinding to toggle the screen recorder</_summary>
|
||||||
@@ -148,44 +186,80 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
|
|||||||
</key>
|
</key>
|
||||||
</schema>
|
</schema>
|
||||||
|
|
||||||
<schema id="org.gnome.shell.overrides" path="/org/gnome/shell/overrides/">
|
<enum id="org.gnome.shell.window-switcher.AppIconMode">
|
||||||
|
<value value="1" nick="thumbnail-only"/>
|
||||||
|
<value value="2" nick="app-icon-only"/>
|
||||||
|
<value value="3" nick="both"/>
|
||||||
|
</enum>
|
||||||
|
<schema id="org.gnome.shell.window-switcher"
|
||||||
|
path="/org/gnome/shell/window-switcher/"
|
||||||
|
gettext-domain="@GETTEXT_PACKAGE@">
|
||||||
|
<key name="app-icon-mode" enum="org.gnome.shell.window-switcher.AppIconMode">
|
||||||
|
<default>'both'</default>
|
||||||
|
<_summary>The application icon mode.</_summary>
|
||||||
|
<_description>
|
||||||
|
Configures how the windows are shown in the switcher. Valid possibilities
|
||||||
|
are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-only'
|
||||||
|
(shows only the application icon) or 'both'.
|
||||||
|
</_description>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="current-workspace-only">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Limit switcher to current workspace.</summary>
|
||||||
|
<description>
|
||||||
|
If true, only windows from the current workspace are shown in the switcher.
|
||||||
|
Otherwise, all windows are included.
|
||||||
|
</description>
|
||||||
|
</key>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema id="org.gnome.shell.overrides" path="/org/gnome/shell/overrides/"
|
||||||
|
gettext-domain="@GETTEXT_PACKAGE@">
|
||||||
<key name="attach-modal-dialogs" type="b">
|
<key name="attach-modal-dialogs" type="b">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<summary>Attach modal dialog to the parent window</summary>
|
<_summary>Attach modal dialog to the parent window</_summary>
|
||||||
<description>
|
<_description>
|
||||||
This key overrides the key in org.gnome.mutter when running
|
This key overrides the key in org.gnome.mutter when running
|
||||||
GNOME Shell.
|
GNOME Shell.
|
||||||
</description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key name="button-layout" type="s">
|
<key name="button-layout" type="s">
|
||||||
<default>":close"</default>
|
<default>":close"</default>
|
||||||
<summary>Arrangement of buttons on the titlebar</summary>
|
<_summary>Arrangement of buttons on the titlebar</_summary>
|
||||||
<description>
|
<_description>
|
||||||
This key overrides the key in org.gnome.desktop.wm.preferences when
|
This key overrides the key in org.gnome.desktop.wm.preferences when
|
||||||
running GNOME Shell.
|
running GNOME Shell.
|
||||||
</description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key name="edge-tiling" type="b">
|
<key name="edge-tiling" type="b">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<summary>Enable edge tiling when dropping windows on screen edges</summary>
|
<_summary>Enable edge tiling when dropping windows on screen edges</_summary>
|
||||||
<description>
|
<_description>
|
||||||
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
||||||
</description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key name="dynamic-workspaces" type="b">
|
<key name="dynamic-workspaces" type="b">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<summary>Workspaces are managed dynamically</summary>
|
<_summary>Workspaces are managed dynamically</_summary>
|
||||||
<description>
|
<_description>
|
||||||
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
||||||
</description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<key name="workspaces-only-on-primary" type="b">
|
<key name="workspaces-only-on-primary" type="b">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<summary>Workspaces only on primary monitor</summary>
|
<_summary>Workspaces only on primary monitor</_summary>
|
||||||
|
<_description>
|
||||||
|
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
||||||
|
</_description>
|
||||||
|
</key>
|
||||||
|
|
||||||
|
<key name="focus-change-on-pointer-rest" type="b">
|
||||||
|
<default>true</default>
|
||||||
|
<summary>Delay focus changes in mouse mode until the pointer stops moving</summary>
|
||||||
<description>
|
<description>
|
||||||
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
||||||
</description>
|
</description>
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ stage {
|
|||||||
/* small */
|
/* small */
|
||||||
.app-well-menu,
|
.app-well-menu,
|
||||||
.contact-details-status,
|
.contact-details-status,
|
||||||
.run-dialog-label,
|
|
||||||
.run-dialog-error-label {
|
.run-dialog-error-label {
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
}
|
}
|
||||||
@@ -50,7 +49,7 @@ stage {
|
|||||||
.switcher-list,
|
.switcher-list,
|
||||||
.app-well-app > .overview-icon,
|
.app-well-app > .overview-icon,
|
||||||
.show-apps > .overview-icon,
|
.show-apps > .overview-icon,
|
||||||
.search-result-content > .overview-icon {
|
.grid-search-result .overview-icon {
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -311,7 +310,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
.notification-icon-button:focus,
|
.notification-icon-button:focus,
|
||||||
.hotplug-notification-item:focus,
|
.hotplug-notification-item:focus,
|
||||||
.modal-dialog-button:focus {
|
.modal-dialog-button:focus {
|
||||||
border: 2px solid #8b8b8b;
|
border-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dash-search-button:active,
|
.dash-search-button:active,
|
||||||
@@ -326,26 +325,30 @@ StScrollBar StButton#vhandle:active {
|
|||||||
background-gradient-end: rgba(255, 255, 255, 0.2);
|
background-gradient-end: rgba(255, 255, 255, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notification-button:insensitive,
|
||||||
.notification-icon-button:insensitive,
|
.notification-icon-button:insensitive,
|
||||||
.notification-button:insensitive {
|
.modal-dialog-button:insensitive {
|
||||||
|
border-color: #666666;
|
||||||
color: #9f9f9f;
|
color: #9f9f9f;
|
||||||
|
background-gradient-direction: none;
|
||||||
|
background-color: rgba(102, 102, 102, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Entries */
|
/* Entries */
|
||||||
|
|
||||||
#searchEntry,
|
#searchEntry,
|
||||||
.notification StEntry,
|
.notification StEntry,
|
||||||
.login-dialog-prompt-entry,
|
.modal-dialog StEntry {
|
||||||
.prompt-dialog-password-entry {
|
|
||||||
color: rgb(64, 64, 64);
|
color: rgb(64, 64, 64);
|
||||||
caret-color: rgb(64, 64, 64);
|
caret-color: rgb(64, 64, 64);
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
caret-size: 1px;
|
caret-size: 1px;
|
||||||
selected-color: black;
|
selected-color: white;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#searchEntry,
|
#searchEntry,
|
||||||
|
.run-dialog-entry,
|
||||||
.notification StEntry {
|
.notification StEntry {
|
||||||
border: 2px solid rgba(245,245,245,0.2);
|
border: 2px solid rgba(245,245,245,0.2);
|
||||||
background-gradient-start: rgba(5,5,6,0.1);
|
background-gradient-start: rgba(5,5,6,0.1);
|
||||||
@@ -358,8 +361,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
#searchEntry:focus,
|
#searchEntry:focus,
|
||||||
#searchEntry:hover,
|
#searchEntry:hover,
|
||||||
.notification StEntry:focus,
|
.notification StEntry:focus,
|
||||||
.login-dialog-prompt-entry,
|
.modal-dialog StEntry {
|
||||||
.prompt-dialog-password-entry {
|
|
||||||
border: 2px solid rgb(136,138,133);
|
border: 2px solid rgb(136,138,133);
|
||||||
background-gradient-start: rgb(200,200,200);
|
background-gradient-start: rgb(200,200,200);
|
||||||
background-gradient-end: white;
|
background-gradient-end: white;
|
||||||
@@ -368,12 +370,17 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.notification StEntry:focus,
|
.notification StEntry:focus,
|
||||||
.prompt-dialog-password-entry:focus,
|
.modal-dialog StEntry:focus {
|
||||||
.login-dialog-prompt-entry:focus {
|
|
||||||
border: 2px solid #3465a4;
|
border: 2px solid #3465a4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#searchEntry {
|
#searchEntry {
|
||||||
|
border-color: rgba(245,245,245,0.3);
|
||||||
|
color: rgb(192, 192, 192);
|
||||||
|
caret-color: rgb(192, 192, 192);
|
||||||
|
}
|
||||||
|
|
||||||
|
#searchEntry:hover {
|
||||||
color: rgb(128, 128, 128);
|
color: rgb(128, 128, 128);
|
||||||
caret-color: rgb(128, 128, 128);
|
caret-color: rgb(128, 128, 128);
|
||||||
}
|
}
|
||||||
@@ -386,8 +393,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.notification StEntry,
|
.notification StEntry,
|
||||||
.prompt-dialog-password-entry,
|
.modal-dialog StEntry {
|
||||||
.login-dialog-prompt-entry {
|
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 4px 4px;
|
padding: 4px 4px;
|
||||||
}
|
}
|
||||||
@@ -399,9 +405,13 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-prompt-entry:insensitive {
|
.modal-dialog StEntry:insensitive {
|
||||||
color: rgba(0,0,0,0.7);
|
border-color: #666666;
|
||||||
border: 2px solid #565656;
|
color: #9f9f9f;
|
||||||
|
border: 2px solid #9f9f9f;
|
||||||
|
background-gradient-direction: none;
|
||||||
|
background-color: rgba(102, 102, 102, 0.15);
|
||||||
|
box-shadow: inset 0 0 rgba(0,0,0,1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Panel */
|
/* Panel */
|
||||||
@@ -410,6 +420,18 @@ StScrollBar StButton#vhandle:active {
|
|||||||
background-color: black;
|
background-color: black;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 1.86em;
|
height: 1.86em;
|
||||||
|
transition-duration: 250;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panel.lock-screen {
|
||||||
|
height: 2em;
|
||||||
|
background-color: rgba(0,0,0,0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
#panel.unlock-screen,
|
||||||
|
#panel.login-screen {
|
||||||
|
height: 2em;
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#panelLeft, #panelCenter {
|
#panelLeft, #panelCenter {
|
||||||
@@ -445,6 +467,13 @@ StScrollBar StButton#vhandle:active {
|
|||||||
-panel-corner-border-color: rgba(255,255,255,0.8);
|
-panel-corner-border-color: rgba(255,255,255,0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel-corner.lock-screen,
|
||||||
|
.panel-corner.unlock-screen,
|
||||||
|
.panel-corner.login-screen {
|
||||||
|
-panel-corner-background-color: transparent;
|
||||||
|
-panel-corner-border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
#appMenu {
|
#appMenu {
|
||||||
spacing: 4px;
|
spacing: 4px;
|
||||||
}
|
}
|
||||||
@@ -477,6 +506,24 @@ StScrollBar StButton#vhandle:active {
|
|||||||
transition-duration: 100;
|
transition-duration: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#panel.unlock-screen .panel-button,
|
||||||
|
#panel.lock-screen .panel-button,
|
||||||
|
#panel.login-screen .panel-button {
|
||||||
|
color: #e6e6e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
#panel.unlock-screen .panel-button:hover,
|
||||||
|
#panel.lock-screen .panel-button:hover,
|
||||||
|
#panel.login-screen .panel-button:hover,
|
||||||
|
#panel.unlock-screen .panel-button:active,
|
||||||
|
#panel.lock-screen .panel-button:active,
|
||||||
|
#panel.login-screen .panel-button:active,
|
||||||
|
#panel.unlock-screen .panel-button:focus,
|
||||||
|
#panel.lock-screen .panel-button:focus,
|
||||||
|
#panel.login-screen .panel-button:focus {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.panel-button:hover {
|
.panel-button:hover {
|
||||||
color: white;
|
color: white;
|
||||||
text-shadow: black 0px 2px 2px;
|
text-shadow: black 0px 2px 2px;
|
||||||
@@ -511,6 +558,10 @@ StScrollBar StButton#vhandle:active {
|
|||||||
spacing: 4px;
|
spacing: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lock-screen-status-button-box {
|
||||||
|
spacing: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
/* User Menu */
|
/* User Menu */
|
||||||
|
|
||||||
#panelUserMenu {
|
#panelUserMenu {
|
||||||
@@ -549,7 +600,6 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.status-chooser-combo.popup-combo-menu {
|
.status-chooser-combo.popup-combo-menu {
|
||||||
background-color: rgba(0,0,0,0.7);
|
|
||||||
padding: .4em 0em;
|
padding: .4em 0em;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid #5f5f5f;
|
border: 1px solid #5f5f5f;
|
||||||
@@ -567,7 +617,15 @@ StScrollBar StButton#vhandle:active {
|
|||||||
/* Overview */
|
/* Overview */
|
||||||
|
|
||||||
#overview {
|
#overview {
|
||||||
spacing: 12px;
|
spacing: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overview-group {
|
||||||
|
spacing: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces-display {
|
||||||
|
spacing: 32px; /* needs to be the same value as #overview-group */
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-caption {
|
.window-caption {
|
||||||
@@ -608,36 +666,58 @@ StScrollBar StButton#vhandle:active {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
-shell-caption-spacing: 12px;
|
-shell-caption-spacing: 12px;
|
||||||
|
border: 2px solid rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-close, .notification-close {
|
.window-close, .notification-close {
|
||||||
background-image: url("close-window.svg");
|
background-image: url("close-window.svg");
|
||||||
background-size: 34px;
|
background-size: 32px;
|
||||||
height: 34px;
|
height: 32px;
|
||||||
width: 34px;
|
width: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-close {
|
.window-close {
|
||||||
-shell-close-overlap: 20px;
|
-shell-close-overlap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-caption:hover {
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-clone-border {
|
||||||
|
border: 4px solid rgba(255, 255, 255, 0.5);
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-close {
|
.notification-close {
|
||||||
/* we start out in the top right of the
|
/* we start out in the top right of the
|
||||||
* notification, inset.
|
* notification, inset.
|
||||||
*
|
*
|
||||||
* center is 32px/2 = 17px
|
* center is 32px/2 = 16px
|
||||||
*
|
*
|
||||||
* adjust left 2px
|
* adjust left 2px
|
||||||
* adjust down 8px */
|
* adjust down 8px */
|
||||||
|
|
||||||
-shell-close-overlap-x: 15px;
|
-shell-close-overlap-x: 14px;
|
||||||
-shell-close-overlap-y: 12px;
|
-shell-close-overlap-y: -12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-close:rtl {
|
||||||
|
/* as above, but starting out in the top left of the
|
||||||
|
* notification. */
|
||||||
|
|
||||||
|
-shell-close-overlap-x: -14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-close:rtl {
|
.window-close:rtl {
|
||||||
-st-background-image-shadow: 2px 2px 6px rgba(0,0,0,0.5);
|
-st-background-image-shadow: 2px 2px 6px rgba(0,0,0,0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.window-picker {
|
||||||
|
-horizontal-spacing: 32px;
|
||||||
|
-vertical-spacing: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Dash */
|
/* Dash */
|
||||||
|
|
||||||
#dash {
|
#dash {
|
||||||
@@ -656,11 +736,6 @@ StScrollBar StButton#vhandle:active {
|
|||||||
border-radius: 9px 0px 0px 9px;
|
border-radius: 9px 0px 0px 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dash:empty {
|
|
||||||
height: 100px;
|
|
||||||
width: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.placeholder {
|
.placeholder {
|
||||||
background-image: url("dash-placeholder.svg");
|
background-image: url("dash-placeholder.svg");
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
@@ -680,6 +755,11 @@ StScrollBar StButton#vhandle:active {
|
|||||||
|
|
||||||
.search-entry-icon {
|
.search-entry-icon {
|
||||||
icon-size: 1em;
|
icon-size: 1em;
|
||||||
|
color: #c0c0c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#searchEntry:hover .search-entry-icon,
|
||||||
|
#searchEntry:focus .search-entry-icon {
|
||||||
color: #8d8f8a;
|
color: #8d8f8a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -692,7 +772,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
|
|
||||||
#searchResultsContent {
|
#searchResultsContent {
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
spacing: 36px;
|
spacing: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#searchResultsContent:rtl {
|
#searchResultsContent:rtl {
|
||||||
@@ -700,11 +780,22 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-section-header {
|
.search-section {
|
||||||
padding: 4px 12px;
|
/* This should be equal to #searchResultsContent spacing */
|
||||||
spacing: 4px;
|
spacing: 16px;
|
||||||
color: #6f6f6f;
|
}
|
||||||
font-size: .8em;
|
|
||||||
|
.search-section-separator {
|
||||||
|
-gradient-height: 1px;
|
||||||
|
-gradient-start: rgba(255,255,255,0);
|
||||||
|
-gradient-end: rgba(255,255,255,0.5);
|
||||||
|
-margin-horizontal: 1.5em;
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-section-content {
|
||||||
|
/* This is the space between the provider icon and the results container */
|
||||||
|
spacing: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-statustext {
|
.search-statustext {
|
||||||
@@ -713,16 +804,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-section-results {
|
.list-search-results {
|
||||||
padding: 6px;
|
spacing: 3px;
|
||||||
}
|
|
||||||
|
|
||||||
.search-section-list-results {
|
|
||||||
spacing: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.results-container {
|
|
||||||
spacing: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Text labels are an odd number of pixels tall. The uneven top and bottom
|
/* Text labels are an odd number of pixels tall. The uneven top and bottom
|
||||||
@@ -751,7 +834,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
-x-offset: 8px;
|
-x-offset: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Application Launchers and Grid */
|
/* Application Launchers, Grid and List results */
|
||||||
|
|
||||||
.icon-grid {
|
.icon-grid {
|
||||||
spacing: 36px;
|
spacing: 36px;
|
||||||
@@ -803,9 +886,34 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-search-result-content {
|
||||||
|
spacing: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-search-result-title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14pt;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-search-result-description {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12pt;
|
||||||
|
color: #eeeeec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-provider-icon-more {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background-image: url("more-results.svg");
|
||||||
|
}
|
||||||
|
|
||||||
.app-well-app > .overview-icon,
|
.app-well-app > .overview-icon,
|
||||||
.show-apps > .overview-icon,
|
.show-apps > .overview-icon,
|
||||||
.search-result-content > .overview-icon {
|
.search-provider-icon,
|
||||||
|
.list-search-result,
|
||||||
|
.grid-search-result .overview-icon {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
border: 1px rgba(0,0,0,0);
|
border: 1px rgba(0,0,0,0);
|
||||||
@@ -821,7 +929,9 @@ StScrollBar StButton#vhandle:active {
|
|||||||
|
|
||||||
.app-well-app:hover > .overview-icon,
|
.app-well-app:hover > .overview-icon,
|
||||||
.show-apps:hover > .overview-icon,
|
.show-apps:hover > .overview-icon,
|
||||||
.search-result-content:hover > .overview-icon {
|
.search-provider-icon:hover,
|
||||||
|
.list-search-result:hover,
|
||||||
|
.grid-search-result:hover .overview-icon {
|
||||||
background-color: rgba(255,255,255,0.1);
|
background-color: rgba(255,255,255,0.1);
|
||||||
text-shadow: black 0px 2px 2px;
|
text-shadow: black 0px 2px 2px;
|
||||||
transition-duration: 100;
|
transition-duration: 100;
|
||||||
@@ -856,10 +966,14 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.app-well-app:focus > .overview-icon,
|
.app-well-app:focus > .overview-icon,
|
||||||
.search-result-content:focus > .overview-icon,
|
.grid-search-result:focus .overview-icon,
|
||||||
.show-apps:focus > .overview-icon,
|
.show-apps:focus > .overview-icon,
|
||||||
|
.search-provider-icon:focus,
|
||||||
|
.list-search-result:focus,
|
||||||
.app-well-app:selected > .overview-icon,
|
.app-well-app:selected > .overview-icon,
|
||||||
.search-result-content:selected > .overview-icon {
|
.grid-search-result:selected .overview-icon,
|
||||||
|
.search-provider-icon:selected,
|
||||||
|
.list-search-result:selected {
|
||||||
background-color: rgba(255,255,255,0.33);
|
background-color: rgba(255,255,255,0.33);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1191,17 +1305,31 @@ StScrollBar StButton#vhandle:active {
|
|||||||
background: #2e3436 url(message-tray-background.png);
|
background: #2e3436 url(message-tray-background.png);
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
transition-duration: 250;
|
transition-duration: 250;
|
||||||
height: 72px;
|
}
|
||||||
|
|
||||||
|
#message-tray:keyboard {
|
||||||
|
/* Same as the OSK */
|
||||||
|
background: rgba(0, 0, 0, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
#message-tray:overview {
|
#message-tray:overview {
|
||||||
background: rgba(0, 0, 0, 0.1);
|
background: rgba(0, 0, 0, 0.1);
|
||||||
border-top: 1px solid rgba(128, 128, 128, 0.3);
|
outline: 1px solid rgba(128, 128, 128, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-tray-summary {
|
||||||
|
height: 72px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-messages-label {
|
||||||
|
font-family: cantarell, sans-serif;
|
||||||
|
font-size: 11pt;
|
||||||
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification {
|
.notification {
|
||||||
border-radius: 10px 10px 0px 0px;
|
border-radius: 10px 10px 0px 0px;
|
||||||
background: rgba(0,0,0,0.8);
|
background: rgba(0,0,0,0.9);
|
||||||
padding: 8px 8px 4px 8px;
|
padding: 8px 8px 4px 8px;
|
||||||
spacing-rows: 10px;
|
spacing-rows: 10px;
|
||||||
spacing-columns: 10px;
|
spacing-columns: 10px;
|
||||||
@@ -1232,8 +1360,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.summary-boxpointer {
|
.summary-boxpointer {
|
||||||
-arrow-border-radius: 8px;
|
-arrow-border-radius: 15px;
|
||||||
-arrow-background-color: rgba(0,0,0,0.8);
|
-arrow-background-color: rgba(0,0,0,0.9);
|
||||||
-arrow-base: 36px;
|
-arrow-base: 36px;
|
||||||
-arrow-rise: 18px;
|
-arrow-rise: 18px;
|
||||||
color: white;
|
color: white;
|
||||||
@@ -1253,8 +1381,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
|
|
||||||
.summary-notification-stack-scrollview {
|
.summary-notification-stack-scrollview {
|
||||||
max-height: 18em;
|
max-height: 18em;
|
||||||
padding-top: 6px;
|
padding-top: 8px;
|
||||||
padding-bottom: 6px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-notification-stack-scrollview:ltr {
|
.summary-notification-stack-scrollview:ltr {
|
||||||
@@ -1409,6 +1537,10 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chat-notification-scrollview{
|
||||||
|
max-height: 22em;
|
||||||
|
}
|
||||||
|
|
||||||
.subscription-message {
|
.subscription-message {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
@@ -1417,44 +1549,46 @@ StScrollBar StButton#vhandle:active {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#summary-mode {
|
|
||||||
padding: 0px 6px 0px 6px; /* same as the values in .summary-source */
|
|
||||||
height: 60px;
|
|
||||||
spacing: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary-source-button {
|
.summary-source-button {
|
||||||
border-radius: 4px;
|
padding: 6px 3px 6px 3px;
|
||||||
transition-duration: 100;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-source-button:hover {
|
.summary-source-button:last-child:ltr {
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-source-button:last-child:rtl {
|
||||||
|
padding-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-source-button:hover .summary-source {
|
||||||
background-color: rgba(255,255,255,0.1);
|
background-color: rgba(255,255,255,0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-source-button:focus,
|
.summary-source-button:focus .summary-source,
|
||||||
.summary-source-button:selected {
|
.summary-source-button:selected .summary-source {
|
||||||
background-color: rgba(255,255,255,0.33);
|
background-color: rgba(255,255,255,0.33);
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-source {
|
.summary-source {
|
||||||
padding-right: 6px;
|
border-radius: 4px;
|
||||||
padding-left: 6px;
|
padding: 0 6px 0 6px;
|
||||||
|
transition-duration: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-source-counter {
|
.summary-source-counter {
|
||||||
background-image: url("summary-counter.svg");
|
background-image: url("summary-counter.svg");
|
||||||
background-size: 2.5em;
|
background-size: 2.4em;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 2.5em;
|
height: 2.4em;
|
||||||
width: 2.5em;
|
width: 2.4em;
|
||||||
-shell-counter-overlap-x: 4px;
|
-shell-counter-overlap-x: 13px;
|
||||||
-shell-counter-overlap-y: 4px;
|
-shell-counter-overlap-y: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* App Switcher */
|
/* App Switcher */
|
||||||
#altTabPopup {
|
.switcher-popup {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
spacing: 16px;
|
spacing: 16px;
|
||||||
}
|
}
|
||||||
@@ -1617,35 +1751,26 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding: 4px 32px 5px;
|
padding: 4px 32px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-dialog-button:insensitive {
|
|
||||||
color: rgb(60, 60, 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-dialog-button:focus {
|
.modal-dialog-button:focus {
|
||||||
padding: 3px 31px 4px;
|
padding: 3px 31px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Run Dialog */
|
/* Run Dialog */
|
||||||
|
|
||||||
|
.run-dialog-label {
|
||||||
|
font-size: 12pt;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #999999;
|
||||||
|
padding-bottom: .4em;
|
||||||
|
}
|
||||||
|
|
||||||
.run-dialog-error-box {
|
.run-dialog-error-box {
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
spacing: 5px;
|
spacing: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.run-dialog-entry {
|
.modal-dialog .run-dialog-entry {
|
||||||
font-weight: bold;
|
width: 20em;
|
||||||
width: 23em;
|
|
||||||
selection-background-color: white;
|
|
||||||
selected-color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.run-dialog {
|
|
||||||
border-radius: 16px;
|
|
||||||
|
|
||||||
padding-right: 21px;
|
|
||||||
padding-left: 21px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
padding-top: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightbox {
|
.lightbox {
|
||||||
@@ -2026,7 +2151,6 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-user-list-item {
|
.login-dialog-user-list-item {
|
||||||
color: #666666;
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: .2em;
|
padding: .2em;
|
||||||
}
|
}
|
||||||
@@ -2044,6 +2168,11 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-dialog-user-list:expanded .login-dialog-user-list-item {
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-dialog-user-list-item,
|
||||||
.login-dialog-user-list-item:hover .login-dialog-user-list-item-name,
|
.login-dialog-user-list-item:hover .login-dialog-user-list-item-name,
|
||||||
.login-dialog-user-list:expanded .login-dialog-user-list-item:focus .login-dialog-user-list-item-name,
|
.login-dialog-user-list:expanded .login-dialog-user-list-item:focus .login-dialog-user-list-item-name,
|
||||||
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
|
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
|
||||||
@@ -2091,6 +2220,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-dialog-not-listed-button:focus .login-dialog-not-listed-label,
|
||||||
.login-dialog-not-listed-button:hover .login-dialog-not-listed-label {
|
.login-dialog-not-listed-button:hover .login-dialog-not-listed-label {
|
||||||
color: #E8E8E8;
|
color: #E8E8E8;
|
||||||
}
|
}
|
||||||
@@ -2100,7 +2230,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
text-shadow: black 4px 4px 3px 0px;
|
text-shadow: black 0px 4px 3px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-prompt-layout {
|
.login-dialog-prompt-layout {
|
||||||
@@ -2166,18 +2296,28 @@ StScrollBar StButton#vhandle:active {
|
|||||||
height: .75em;
|
height: .75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-dialog .modal-dialog-button-box {
|
||||||
|
spacing: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
.login-dialog .modal-dialog-button {
|
.login-dialog .modal-dialog-button {
|
||||||
border: 1px solid #666666;
|
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 3px 18px;
|
padding: 3px 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-dialog .modal-dialog-button:focus {
|
||||||
|
padding: 2px 17px;
|
||||||
|
}
|
||||||
|
|
||||||
.login-dialog .modal-dialog-button:default {
|
.login-dialog .modal-dialog-button:default {
|
||||||
background-gradient-start: #6793c4;
|
background-gradient-start: #6793c4;
|
||||||
background-gradient-end: #335d8f;
|
background-gradient-end: #335d8f;
|
||||||
background-gradient-direction: vertical;
|
background-gradient-direction: vertical;
|
||||||
border: 2px solid #16335d;
|
border-color: #16335d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-dialog .modal-dialog-button:default:focus {
|
||||||
|
border: 2px solid #377fe7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog .modal-dialog-button:default:hover {
|
.login-dialog .modal-dialog-button:default:hover {
|
||||||
@@ -2191,6 +2331,13 @@ StScrollBar StButton#vhandle:active {
|
|||||||
background-gradient-end: #74a0d0;
|
background-gradient-end: #74a0d0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-dialog .modal-dialog-button:default:insensitive {
|
||||||
|
border-color: #666666;
|
||||||
|
color: #9f9f9f;
|
||||||
|
background-gradient-direction: none;
|
||||||
|
background-color: rgba(102, 102, 102, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
.login-dialog-message-warning {
|
.login-dialog-message-warning {
|
||||||
color: orange;
|
color: orange;
|
||||||
}
|
}
|
||||||
@@ -2223,6 +2370,10 @@ StScrollBar StButton#vhandle:active {
|
|||||||
-arrow-shadow: 0 1px 1px rgba(0,0,0,0.4);
|
-arrow-shadow: 0 1px 1px rgba(0,0,0,0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.screen-shield-contents-box {
|
||||||
|
spacing: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
.screen-shield-clock {
|
.screen-shield-clock {
|
||||||
color: white;
|
color: white;
|
||||||
text-shadow: 0px 1px 2px rgba(0,0,0,0.6);
|
text-shadow: 0px 1px 2px rgba(0,0,0,0.6);
|
||||||
@@ -2232,12 +2383,12 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-clock-time {
|
.screen-shield-clock-time {
|
||||||
font-size: 86px;
|
font-size: 72pt;
|
||||||
text-shadow: 0px 2px 2px rgba(0,0,0,0.4);
|
text-shadow: 0px 2px 2px rgba(0,0,0,0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-clock-date {
|
.screen-shield-clock-date {
|
||||||
font-size: 48px;
|
font-size: 28pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#screenShieldNotifications {
|
#screenShieldNotifications {
|
||||||
@@ -2245,21 +2396,28 @@ StScrollBar StButton#vhandle:active {
|
|||||||
background-color: rgba(0.0, 0.0, 0.0, 0.9);
|
background-color: rgba(0.0, 0.0, 0.0, 0.9);
|
||||||
border: 2px solid #868686;
|
border: 2px solid #868686;
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
padding: 12px 0;
|
padding: 18px 0;
|
||||||
|
box-shadow: .5em .5em 20px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-notifications-box {
|
.screen-shield-notifications-box {
|
||||||
spacing: 12px;
|
spacing: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-notification-source {
|
.screen-shield-notification-source {
|
||||||
padding: 0 24px;
|
padding: 13px 24px;
|
||||||
spacing: 5px;
|
spacing: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-shield-notification-label {
|
.screen-shield-notification-label {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
padding: 0px 18px;
|
||||||
|
color: #babdb6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-shield-notification-count-text {
|
||||||
|
padding: 0px 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove background from notifications, otherwise
|
/* Remove background from notifications, otherwise
|
||||||
@@ -2277,3 +2435,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-source-switcher-symbol {
|
||||||
|
font-size: 42pt;
|
||||||
|
width: 96px;
|
||||||
|
height: 96px;
|
||||||
|
}
|
||||||
|
|||||||
109
data/theme/more-results.svg
Normal file
109
data/theme/more-results.svg
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
id="svg12430"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.3.1 r9886"
|
||||||
|
sodipodi:docname="more-results.svg">
|
||||||
|
<defs
|
||||||
|
id="defs12432" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#7a7a7a"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="1"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1"
|
||||||
|
inkscape:cx="8.3155237"
|
||||||
|
inkscape:cy="0.89548874"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="g14642-3-0"
|
||||||
|
showgrid="false"
|
||||||
|
borderlayer="true"
|
||||||
|
inkscape:showpageshadow="false"
|
||||||
|
inkscape:window-width="2560"
|
||||||
|
inkscape:window-height="1376"
|
||||||
|
inkscape:window-x="1200"
|
||||||
|
inkscape:window-y="187"
|
||||||
|
inkscape:window-maximized="1">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid13002" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata12435">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1036.3622)">
|
||||||
|
<g
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(-141.99984,638.37113)"
|
||||||
|
inkscape:label="zoom-in"
|
||||||
|
id="g14642-3-0">
|
||||||
|
<path
|
||||||
|
sodipodi:type="inkscape:offset"
|
||||||
|
inkscape:radius="0"
|
||||||
|
inkscape:original="M 145.1875 400 C 144.5248 400 144 400.54899 144 401.21875 L 144 410.78125 C 144 411.45101 144.5248 412 145.1875 412 L 154.8125 412 C 155.4752 412 156 411.45101 156 410.78125 L 156 401.21875 C 156 400.54899 155.4752 400 154.8125 400 L 145.1875 400 z M 149 403 L 151 403 L 151 405 L 153 405 L 153 407 L 151 407 L 151 409 L 149 409 L 149 407 L 147 407 L 147 405 L 149 405 L 149 403 z "
|
||||||
|
xlink:href="#rect11749-5-0-1-8"
|
||||||
|
style="color:#bebebe;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;opacity:0.8"
|
||||||
|
id="path13004"
|
||||||
|
inkscape:href="#rect11749-5-0-1-8"
|
||||||
|
d="M 145.1875,400 C 144.5248,400 144,400.54899 144,401.21875 l 0,9.5625 c 0,0.66976 0.5248,1.21875 1.1875,1.21875 l 9.625,0 c 0.6627,0 1.1875,-0.54899 1.1875,-1.21875 l 0,-9.5625 C 156,400.54899 155.4752,400 154.8125,400 L 145.1875,400 z m 3.8125,3 2,0 0,2 2,0 0,2 -2,0 0,2 -2,0 0,-2 -2,0 0,-2 2,0 L 149,403 Z"
|
||||||
|
transform="translate(0,1)" />
|
||||||
|
<use
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
xlink:href="#path13004"
|
||||||
|
id="use11960"
|
||||||
|
transform="translate(1,-1)"
|
||||||
|
width="16"
|
||||||
|
height="16" />
|
||||||
|
<use
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
xlink:href="#use11960"
|
||||||
|
id="use11962"
|
||||||
|
transform="translate(-2,0)"
|
||||||
|
width="16"
|
||||||
|
height="16" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
style="color:#bebebe;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible"
|
||||||
|
d="M 145.1875,400 C 144.5248,400 144,400.54899 144,401.21875 l 0,9.5625 c 0,0.66976 0.5248,1.21875 1.1875,1.21875 l 9.625,0 c 0.6627,0 1.1875,-0.54899 1.1875,-1.21875 l 0,-9.5625 C 156,400.54899 155.4752,400 154.8125,400 L 145.1875,400 z m 3.8125,3 2,0 0,2 2,0 0,2 -2,0 0,2 -2,0 0,-2 -2,0 0,-2 2,0 L 149,403 Z"
|
||||||
|
id="rect11749-5-0-1-8" />
|
||||||
|
<rect
|
||||||
|
style="fill:none;stroke:none"
|
||||||
|
id="rect3620-5-4"
|
||||||
|
width="15.981825"
|
||||||
|
height="16"
|
||||||
|
x="142"
|
||||||
|
y="398"
|
||||||
|
rx="0"
|
||||||
|
ry="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.1 KiB |
@@ -76,9 +76,23 @@ endif
|
|||||||
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
|
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
|
||||||
HTML_IMAGES=
|
HTML_IMAGES=
|
||||||
|
|
||||||
|
doc-gen-org.gnome.Shell.SearchProvider.xml: $(top_srcdir)/data/org.gnome.ShellSearchProvider.xml
|
||||||
|
gdbus-codegen \
|
||||||
|
--interface-prefix org.gnome.ShellSearchProvider. \
|
||||||
|
--generate-docbook doc-gen \
|
||||||
|
$(top_srcdir)/data/org.gnome.ShellSearchProvider.xml
|
||||||
|
|
||||||
|
doc-gen-org.gnome.Shell.SearchProvider2.xml: $(top_srcdir)/data/org.gnome.ShellSearchProvider2.xml
|
||||||
|
gdbus-codegen \
|
||||||
|
--interface-prefix org.gnome.ShellSearchProvider2. \
|
||||||
|
--generate-docbook doc-gen \
|
||||||
|
$(top_srcdir)/data/org.gnome.ShellSearchProvider2.xml
|
||||||
|
|
||||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
|
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
|
||||||
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
|
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
|
||||||
content_files=
|
content_files= \
|
||||||
|
doc-gen-org.gnome.Shell.SearchProvider.xml \
|
||||||
|
doc-gen-org.gnome.Shell.SearchProvider2.xml
|
||||||
|
|
||||||
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
|
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
|
||||||
# These files must be listed here *and* in content_files
|
# These files must be listed here *and* in content_files
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
</chapter>
|
</chapter>
|
||||||
<chapter>
|
<chapter>
|
||||||
<title>Integration helpers and utilities</title>
|
<title>Integration helpers and utilities</title>
|
||||||
|
<xi:include href="doc-gen-org.gnome.Shell.SearchProvider.xml"/>
|
||||||
|
<xi:include href="doc-gen-org.gnome.Shell.SearchProvider2.xml"/>
|
||||||
<xi:include href="xml/shell-global.xml"/>
|
<xi:include href="xml/shell-global.xml"/>
|
||||||
<xi:include href="xml/shell-wm.xml"/>
|
<xi:include href="xml/shell-wm.xml"/>
|
||||||
<xi:include href="xml/shell-xfixes-cursor.xml"/>
|
<xi:include href="xml/shell-xfixes-cursor.xml"/>
|
||||||
|
|||||||
@@ -52,13 +52,6 @@ its dependencies to build from tarballs.</description>
|
|||||||
<gnome:userid>walters</gnome:userid>
|
<gnome:userid>walters</gnome:userid>
|
||||||
</foaf:Person>
|
</foaf:Person>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<maintainer>
|
|
||||||
<foaf:Person>
|
|
||||||
<foaf:name>Dan Winship</foaf:name>
|
|
||||||
<foaf:mbox rdf:resource="mailto:danw@gnome.org" />
|
|
||||||
<gnome:userid>danw</gnome:userid>
|
|
||||||
</foaf:Person>
|
|
||||||
</maintainer>
|
|
||||||
<maintainer>
|
<maintainer>
|
||||||
<foaf:Person>
|
<foaf:Person>
|
||||||
<foaf:name>Marina Zhurakhinskaya</foaf:name>
|
<foaf:name>Marina Zhurakhinskaya</foaf:name>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ nobase_dist_js_DATA = \
|
|||||||
ui/main.js \
|
ui/main.js \
|
||||||
ui/messageTray.js \
|
ui/messageTray.js \
|
||||||
ui/modalDialog.js \
|
ui/modalDialog.js \
|
||||||
|
ui/separator.js \
|
||||||
ui/sessionMode.js \
|
ui/sessionMode.js \
|
||||||
ui/shellEntry.js \
|
ui/shellEntry.js \
|
||||||
ui/shellMountOperation.js \
|
ui/shellMountOperation.js \
|
||||||
@@ -85,6 +86,7 @@ nobase_dist_js_DATA = \
|
|||||||
ui/status/power.js \
|
ui/status/power.js \
|
||||||
ui/status/volume.js \
|
ui/status/volume.js \
|
||||||
ui/status/bluetooth.js \
|
ui/status/bluetooth.js \
|
||||||
|
ui/switcherPopup.js \
|
||||||
ui/tweener.js \
|
ui/tweener.js \
|
||||||
ui/unlockDialog.js \
|
ui/unlockDialog.js \
|
||||||
ui/userMenu.js \
|
ui/userMenu.js \
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ const Application = new Lang.Class({
|
|||||||
let renderer = new Gtk.CellRendererText();
|
let renderer = new Gtk.CellRendererText();
|
||||||
this._extensionSelector.pack_start(renderer, true);
|
this._extensionSelector.pack_start(renderer, true);
|
||||||
this._extensionSelector.add_attribute(renderer, 'text', 1);
|
this._extensionSelector.add_attribute(renderer, 'text', 1);
|
||||||
this._extensionSelector.set_cell_data_func(renderer, Lang.bind(this, this._setExtensionInsensitive), null);
|
this._extensionSelector.set_cell_data_func(renderer, Lang.bind(this, this._setExtensionInsensitive));
|
||||||
this._extensionSelector.connect('changed', Lang.bind(this, this._extensionSelected));
|
this._extensionSelector.connect('changed', Lang.bind(this, this._extensionSelected));
|
||||||
|
|
||||||
toolitem = new Gtk.ToolItem({ child: this._extensionSelector });
|
toolitem = new Gtk.ToolItem({ child: this._extensionSelector });
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ const Gio = imports.gi.Gio;
|
|||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Pango = imports.gi.Pango;
|
const Pango = imports.gi.Pango;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
@@ -38,13 +39,19 @@ const GdmUtil = imports.gdm.util;
|
|||||||
const Lightbox = imports.ui.lightbox;
|
const Lightbox = imports.ui.lightbox;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
|
const Panel = imports.ui.panel;
|
||||||
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const UserMenu = imports.ui.userMenu;
|
const UserMenu = imports.ui.userMenu;
|
||||||
|
|
||||||
const _RESIZE_ANIMATION_TIME = 0.25;
|
const _RESIZE_ANIMATION_TIME = 0.25;
|
||||||
const _SCROLL_ANIMATION_TIME = 0.5;
|
const _SCROLL_ANIMATION_TIME = 0.5;
|
||||||
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
|
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
|
||||||
const _LOGO_ICON_NAME_SIZE = 48;
|
const _LOGO_ICON_HEIGHT = 16;
|
||||||
|
|
||||||
|
const WORK_SPINNER_ICON_SIZE = 24;
|
||||||
|
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||||
|
const WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||||
|
|
||||||
let _loginDialog = null;
|
let _loginDialog = null;
|
||||||
|
|
||||||
@@ -81,6 +88,36 @@ function _smoothlyResizeActor(actor, width, height) {
|
|||||||
return hold;
|
return hold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const LogoMenuButton = new Lang.Class({
|
||||||
|
Name: 'LogoMenuButton',
|
||||||
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
|
_init: function() {
|
||||||
|
this.parent(0.0, null, true);
|
||||||
|
|
||||||
|
this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||||
|
this._settings.connect('changed::' + GdmUtil.LOGO_KEY,
|
||||||
|
Lang.bind(this, this._updateLogo));
|
||||||
|
|
||||||
|
this._iconBin = new St.Bin();
|
||||||
|
this.actor.add_actor(this._iconBin);
|
||||||
|
|
||||||
|
this._updateLogo();
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateLogo: function() {
|
||||||
|
let path = this._settings.get_string(GdmUtil.LOGO_KEY);
|
||||||
|
let icon = null;
|
||||||
|
|
||||||
|
if (path) {
|
||||||
|
let file = Gio.file_new_for_path(path);
|
||||||
|
let cache = St.TextureCache.get_default();
|
||||||
|
icon = cache.load_uri_async(file.get_uri(), -1, _LOGO_ICON_HEIGHT);
|
||||||
|
}
|
||||||
|
this._iconBin.set_child(icon);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const UserListItem = new Lang.Class({
|
const UserListItem = new Lang.Class({
|
||||||
Name: 'UserListItem',
|
Name: 'UserListItem',
|
||||||
|
|
||||||
@@ -105,6 +142,7 @@ const UserListItem = new Lang.Class({
|
|||||||
layout.add(textLayout, { expand: true });
|
layout.add(textLayout, { expand: true });
|
||||||
|
|
||||||
this._nameLabel = new St.Label({ style_class: 'login-dialog-user-list-item-name' });
|
this._nameLabel = new St.Label({ style_class: 'login-dialog-user-list-item-name' });
|
||||||
|
this.actor.label_actor = this._nameLabel;
|
||||||
textLayout.add(this._nameLabel,
|
textLayout.add(this._nameLabel,
|
||||||
{ y_fill: false,
|
{ y_fill: false,
|
||||||
y_align: St.Align.MIDDLE,
|
y_align: St.Align.MIDDLE,
|
||||||
@@ -148,14 +186,6 @@ const UserListItem = new Lang.Class({
|
|||||||
this.emit('activate');
|
this.emit('activate');
|
||||||
},
|
},
|
||||||
|
|
||||||
fadeOutName: function() {
|
|
||||||
return GdmUtil.fadeOutActor(this._nameLabel);
|
|
||||||
},
|
|
||||||
|
|
||||||
fadeInName: function() {
|
|
||||||
return GdmUtil.fadeInActor(this._nameLabel);
|
|
||||||
},
|
|
||||||
|
|
||||||
showTimedLoginIndicator: function(time) {
|
showTimedLoginIndicator: function(time) {
|
||||||
let hold = new Batch.Hold();
|
let hold = new Batch.Hold();
|
||||||
|
|
||||||
@@ -206,16 +236,18 @@ const UserList = new Lang.Class({
|
|||||||
if (global.stage.get_key_focus() != this.actor)
|
if (global.stage.get_key_focus() != this.actor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
let focusSet = this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||||
|
if (!focusSet) {
|
||||||
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
||||||
|
this._moveFocusToItems();
|
||||||
|
return false;
|
||||||
|
}));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_showItem: function(item) {
|
_showItem: function(item) {
|
||||||
let tasks = [function() {
|
let tasks = [function() {
|
||||||
return GdmUtil.fadeInActor(item.actor);
|
return GdmUtil.fadeInActor(item.actor);
|
||||||
},
|
|
||||||
|
|
||||||
function() {
|
|
||||||
return item.fadeInName();
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
||||||
@@ -279,13 +311,16 @@ const UserList = new Lang.Class({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this._box.remove_style_pseudo_class('expanded');
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this,
|
let batch = new Batch.ConsecutiveBatch(this,
|
||||||
[function() {
|
[function() {
|
||||||
return GdmUtil.fadeOutActor(this.actor.vscroll);
|
return GdmUtil.fadeOutActor(this.actor.vscroll);
|
||||||
},
|
},
|
||||||
|
|
||||||
new Batch.ConcurrentBatch(this, tasks)
|
new Batch.ConcurrentBatch(this, tasks),
|
||||||
|
|
||||||
|
function() {
|
||||||
|
this._box.remove_style_pseudo_class('expanded');
|
||||||
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return batch.run();
|
return batch.run();
|
||||||
@@ -335,7 +370,6 @@ const UserList = new Lang.Class({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this._box.add_style_pseudo_class('expanded');
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this,
|
let batch = new Batch.ConsecutiveBatch(this,
|
||||||
[function() {
|
[function() {
|
||||||
this.takeOverWhitespace();
|
this.takeOverWhitespace();
|
||||||
@@ -346,6 +380,10 @@ const UserList = new Lang.Class({
|
|||||||
return _smoothlyResizeActor(this._box, -1, fullHeight);
|
return _smoothlyResizeActor(this._box, -1, fullHeight);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
function() {
|
||||||
|
this._box.add_style_pseudo_class('expanded');
|
||||||
|
},
|
||||||
|
|
||||||
new Batch.ConcurrentBatch(this, tasks),
|
new Batch.ConcurrentBatch(this, tasks),
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
@@ -471,6 +509,7 @@ const SessionListItem = new Lang.Class({
|
|||||||
|
|
||||||
let label = new St.Label({ style_class: 'login-dialog-session-list-item-label',
|
let label = new St.Label({ style_class: 'login-dialog-session-list-item-label',
|
||||||
text: name });
|
text: name });
|
||||||
|
this.actor.label_actor = label;
|
||||||
|
|
||||||
this._box.add_actor(label);
|
this._box.add_actor(label);
|
||||||
},
|
},
|
||||||
@@ -570,6 +609,14 @@ const SessionList = new Lang.Class({
|
|||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateSensitivity: function(sensitive) {
|
||||||
|
this._button.reactive = sensitive;
|
||||||
|
this._button.can_focus = sensitive;
|
||||||
|
|
||||||
|
for (let id in this._items)
|
||||||
|
this._items[id].actor.reactive = sensitive;
|
||||||
|
},
|
||||||
|
|
||||||
setActiveSession: function(sessionId) {
|
setActiveSession: function(sessionId) {
|
||||||
if (sessionId == this._activeSessionId)
|
if (sessionId == this._activeSessionId)
|
||||||
return;
|
return;
|
||||||
@@ -626,6 +673,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
this.parent({ shellReactive: true,
|
this.parent({ shellReactive: true,
|
||||||
styleClass: 'login-dialog',
|
styleClass: 'login-dialog',
|
||||||
parentActor: parentActor,
|
parentActor: parentActor,
|
||||||
|
keybindingMode: Main.KeybindingMode.LOGIN_SCREEN,
|
||||||
shouldFadeIn: false });
|
shouldFadeIn: false });
|
||||||
this.connect('destroy',
|
this.connect('destroy',
|
||||||
Lang.bind(this, this._onDestroy));
|
Lang.bind(this, this._onDestroy));
|
||||||
@@ -635,35 +683,35 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._userManager = AccountsService.UserManager.get_default()
|
this._userManager = AccountsService.UserManager.get_default()
|
||||||
this._greeterClient = new Gdm.Client();
|
this._greeterClient = new Gdm.Client();
|
||||||
|
|
||||||
this._greeter = this._greeterClient.get_greeter_sync(null);
|
if (GLib.getenv('GDM_GREETER_TEST') != '1') {
|
||||||
|
this._greeter = this._greeterClient.get_greeter_sync(null);
|
||||||
|
|
||||||
this._greeter.connect('default-session-name-changed',
|
this._greeter.connect('default-session-name-changed',
|
||||||
Lang.bind(this, this._onDefaultSessionChanged));
|
Lang.bind(this, this._onDefaultSessionChanged));
|
||||||
|
|
||||||
this._greeter.connect('session-opened',
|
this._greeter.connect('session-opened',
|
||||||
Lang.bind(this, this._onSessionOpened));
|
Lang.bind(this, this._onSessionOpened));
|
||||||
this._greeter.connect('timed-login-requested',
|
this._greeter.connect('timed-login-requested',
|
||||||
Lang.bind(this, this._onTimedLoginRequested));
|
Lang.bind(this, this._onTimedLoginRequested));
|
||||||
|
}
|
||||||
|
|
||||||
this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
|
this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
|
||||||
this._userVerifier.connect('ask-question', Lang.bind(this, this._askQuestion));
|
this._userVerifier.connect('ask-question', Lang.bind(this, this._askQuestion));
|
||||||
this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));
|
this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));
|
||||||
this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
|
this._userVerifier.connect('verification-failed', Lang.bind(this, this._verificationFailed));
|
||||||
|
this._userVerifier.connect('reset', Lang.bind(this, this._reset));
|
||||||
this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
|
this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
|
||||||
this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint));
|
this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint));
|
||||||
|
this._verifyingUser = false;
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||||
|
|
||||||
this._settings.connect('changed::' + GdmUtil.LOGO_KEY,
|
|
||||||
Lang.bind(this, this._updateLogo));
|
|
||||||
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_KEY,
|
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_KEY,
|
||||||
Lang.bind(this, this._updateBanner));
|
Lang.bind(this, this._updateBanner));
|
||||||
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_TEXT_KEY,
|
this._settings.connect('changed::' + GdmUtil.BANNER_MESSAGE_TEXT_KEY,
|
||||||
Lang.bind(this, this._updateBanner));
|
Lang.bind(this, this._updateBanner));
|
||||||
|
this._settings.connect('changed::' + GdmUtil.DISABLE_USER_LIST_KEY,
|
||||||
this._logoBox = new St.Bin({ style_class: 'login-dialog-logo-box' });
|
Lang.bind(this, this._updateDisableUserList));
|
||||||
this.contentLayout.add(this._logoBox);
|
|
||||||
this._updateLogo();
|
|
||||||
|
|
||||||
this._bannerLabel = new St.Label({ style_class: 'login-dialog-banner',
|
this._bannerLabel = new St.Label({ style_class: 'login-dialog-banner',
|
||||||
text: '' });
|
text: '' });
|
||||||
@@ -671,37 +719,30 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._updateBanner();
|
this._updateBanner();
|
||||||
|
|
||||||
this._titleLabel = new St.Label({ style_class: 'login-dialog-title',
|
this._titleLabel = new St.Label({ style_class: 'login-dialog-title',
|
||||||
text: C_("title", "Sign In") });
|
text: C_("title", "Sign In"),
|
||||||
|
visible: false });
|
||||||
|
|
||||||
this.contentLayout.add(this._titleLabel,
|
this.contentLayout.add(this._titleLabel,
|
||||||
{ y_fill: false,
|
{ y_fill: false,
|
||||||
y_align: St.Align.START });
|
y_align: St.Align.START });
|
||||||
|
|
||||||
let mainContentBox = new St.BoxLayout({ vertical: false });
|
this._userList = new UserList();
|
||||||
this.contentLayout.add(mainContentBox,
|
this.contentLayout.add(this._userList.actor,
|
||||||
{ expand: true,
|
{ expand: true,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: false });
|
y_fill: true });
|
||||||
|
|
||||||
this._userList = new UserList();
|
|
||||||
mainContentBox.add(this._userList.actor,
|
|
||||||
{ expand: true,
|
|
||||||
x_fill: true,
|
|
||||||
y_fill: true });
|
|
||||||
|
|
||||||
this.setInitialKeyFocus(this._userList.actor);
|
this.setInitialKeyFocus(this._userList.actor);
|
||||||
|
|
||||||
this._promptBox = new St.BoxLayout({ style_class: 'login-dialog-prompt-layout',
|
this._promptBox = new St.BoxLayout({ style_class: 'login-dialog-prompt-layout',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
mainContentBox.add(this._promptBox,
|
this.contentLayout.add(this._promptBox,
|
||||||
{ expand: true,
|
{ expand: true,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: true,
|
y_fill: true,
|
||||||
x_align: St.Align.START });
|
x_align: St.Align.START });
|
||||||
this._promptLabel = new St.Label({ style_class: 'login-dialog-prompt-label' });
|
this._promptLabel = new St.Label({ style_class: 'login-dialog-prompt-label' });
|
||||||
|
|
||||||
this._mainContentBox = mainContentBox;
|
|
||||||
|
|
||||||
this._promptBox.add(this._promptLabel,
|
this._promptBox.add(this._promptLabel,
|
||||||
{ expand: true,
|
{ expand: true,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
@@ -709,6 +750,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
x_align: St.Align.START });
|
x_align: St.Align.START });
|
||||||
this._promptEntry = new St.Entry({ style_class: 'login-dialog-prompt-entry',
|
this._promptEntry = new St.Entry({ style_class: 'login-dialog-prompt-entry',
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
|
this._promptEntryTextChangedId = 0;
|
||||||
this._promptBox.add(this._promptEntry,
|
this._promptBox.add(this._promptEntry,
|
||||||
{ expand: true,
|
{ expand: true,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
@@ -722,6 +764,9 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._promptLoginHint.hide();
|
this._promptLoginHint.hide();
|
||||||
this._promptBox.add(this._promptLoginHint);
|
this._promptBox.add(this._promptLoginHint);
|
||||||
|
|
||||||
|
this._signInButton = null;
|
||||||
|
this._workSpinner = null;
|
||||||
|
|
||||||
this._sessionList = new SessionList();
|
this._sessionList = new SessionList();
|
||||||
this._sessionList.connect('session-activated',
|
this._sessionList.connect('session-activated',
|
||||||
Lang.bind(this, function(list, sessionId) {
|
Lang.bind(this, function(list, sessionId) {
|
||||||
@@ -747,7 +792,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
x_fill: true });
|
x_fill: true });
|
||||||
|
|
||||||
this._notListedButton.connect('clicked', Lang.bind(this, this._onNotListedClicked));
|
this._notListedButton.connect('clicked', Lang.bind(this, this._hideUserListAndLogIn));
|
||||||
|
|
||||||
this.contentLayout.add(this._notListedButton,
|
this.contentLayout.add(this._notListedButton,
|
||||||
{ expand: false,
|
{ expand: false,
|
||||||
@@ -773,18 +818,19 @@ const LoginDialog = new Lang.Class({
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateLogo: function() {
|
_updateDisableUserList: function() {
|
||||||
this._logoBox.child = null;
|
let disableUserList = this._settings.get_boolean(GdmUtil.DISABLE_USER_LIST_KEY);
|
||||||
let path = this._settings.get_string(GdmUtil.LOGO_KEY);
|
|
||||||
|
|
||||||
if (path) {
|
// If this is the first time around, set initial focus
|
||||||
let file = Gio.file_new_for_path(path);
|
if (this._disableUserList == undefined && disableUserList)
|
||||||
let uri = file.get_uri();
|
this.setInitialKeyFocus(this._promptEntry);
|
||||||
|
|
||||||
let textureCache = St.TextureCache.get_default();
|
if (disableUserList != this._disableUserList) {
|
||||||
this._logoBox.child = textureCache.load_uri_async(uri, -1, _LOGO_ICON_NAME_SIZE);
|
this._disableUserList = disableUserList;
|
||||||
|
|
||||||
|
if (!this._verifyingUser)
|
||||||
|
this._reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateBanner: function() {
|
_updateBanner: function() {
|
||||||
@@ -799,32 +845,23 @@ const LoginDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onReset: function(client, serviceName) {
|
_reset: function() {
|
||||||
|
this._updateSensitivity(true);
|
||||||
this._promptMessage.hide();
|
this._promptMessage.hide();
|
||||||
|
|
||||||
let tasks = [this._hidePrompt,
|
|
||||||
|
|
||||||
new Batch.ConcurrentBatch(this, [this._fadeInTitleLabel,
|
|
||||||
this._fadeInNotListedButton,
|
|
||||||
this._fadeInLogo]),
|
|
||||||
|
|
||||||
function() {
|
|
||||||
this._sessionList.close();
|
|
||||||
this._promptLoginHint.hide();
|
|
||||||
this._userList.actor.show();
|
|
||||||
this._userList.actor.opacity = 255;
|
|
||||||
return this._userList.showItems();
|
|
||||||
},
|
|
||||||
|
|
||||||
function() {
|
|
||||||
this._userList.actor.reactive = true;
|
|
||||||
this._userList.actor.grab_key_focus();
|
|
||||||
}];
|
|
||||||
|
|
||||||
this._user = null;
|
this._user = null;
|
||||||
|
this._verifyingUser = false;
|
||||||
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
if (this._disableUserList)
|
||||||
batch.run();
|
this._hideUserListAndLogIn();
|
||||||
|
else
|
||||||
|
this._showUserList();
|
||||||
|
},
|
||||||
|
|
||||||
|
_verificationFailed: function() {
|
||||||
|
this._promptEntry.text = '';
|
||||||
|
|
||||||
|
this._updateSensitivity(true);
|
||||||
|
this._setWorking(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDefaultSessionChanged: function(client, sessionId) {
|
_onDefaultSessionChanged: function(client, sessionId) {
|
||||||
@@ -832,9 +869,13 @@ const LoginDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_showMessage: function(userVerifier, message, styleClass) {
|
_showMessage: function(userVerifier, message, styleClass) {
|
||||||
this._promptMessage.text = message;
|
if (message) {
|
||||||
this._promptMessage.styleClass = styleClass;
|
this._promptMessage.text = message;
|
||||||
GdmUtil.fadeInActor(this._promptMessage);
|
this._promptMessage.styleClass = styleClass;
|
||||||
|
GdmUtil.fadeInActor(this._promptMessage);
|
||||||
|
} else {
|
||||||
|
GdmUtil.fadeOutActor(this._promptMessage);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_showLoginHint: function(verifier, message) {
|
_showLoginHint: function(verifier, message) {
|
||||||
@@ -875,6 +916,9 @@ const LoginDialog = new Lang.Class({
|
|||||||
if (this._user && this._user.is_logged_in())
|
if (this._user && this._user.is_logged_in())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
if (!this._verifyingUser)
|
||||||
|
return null;
|
||||||
|
|
||||||
return GdmUtil.fadeInActor(this._sessionList.actor);
|
return GdmUtil.fadeInActor(this._sessionList.actor);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -887,33 +931,15 @@ const LoginDialog = new Lang.Class({
|
|||||||
return batch.run();
|
return batch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
_showPrompt: function() {
|
_showPrompt: function(forSecret) {
|
||||||
let hold = new Batch.Hold();
|
let hold = new Batch.Hold();
|
||||||
|
|
||||||
let buttons = [{ action: Lang.bind(this, this.cancel),
|
|
||||||
label: _("Cancel"),
|
|
||||||
key: Clutter.Escape },
|
|
||||||
{ action: Lang.bind(this, function() {
|
|
||||||
hold.release();
|
|
||||||
}),
|
|
||||||
label: C_("button", "Sign In"),
|
|
||||||
default: true }];
|
|
||||||
|
|
||||||
this._promptEntryActivateCallbackId = this._promptEntry.clutter_text.connect('activate',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
hold.release();
|
|
||||||
}));
|
|
||||||
hold.connect('release', Lang.bind(this, function() {
|
|
||||||
this._promptEntry.clutter_text.disconnect(this._promptEntryActivateCallbackId);
|
|
||||||
this._promptEntryActivateCallbackId = null;
|
|
||||||
}));
|
|
||||||
|
|
||||||
let tasks = [function() {
|
let tasks = [function() {
|
||||||
return this._fadeInPrompt();
|
return this._fadeInPrompt();
|
||||||
},
|
},
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
this.setButtons(buttons);
|
this._prepareDialog(forSecret, hold);
|
||||||
},
|
},
|
||||||
|
|
||||||
hold];
|
hold];
|
||||||
@@ -923,22 +949,86 @@ const LoginDialog = new Lang.Class({
|
|||||||
return batch.run();
|
return batch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
_hidePrompt: function() {
|
_prepareDialog: function(forSecret, hold) {
|
||||||
if (this._promptEntryActivateCallbackId) {
|
this._workSpinner = new Panel.AnimatedIcon('process-working.svg', WORK_SPINNER_ICON_SIZE);
|
||||||
this._promptEntry.clutter_text.disconnect(this._promptEntryActivateCallbackId);
|
this._workSpinner.actor.opacity = 0;
|
||||||
this._promptEntryActivateCallbackId = null;
|
this._workSpinner.actor.show();
|
||||||
}
|
|
||||||
|
|
||||||
|
this.buttonLayout.visible = true;
|
||||||
|
this.clearButtons();
|
||||||
|
|
||||||
|
if (!this._disableUserList || this._verifyingUser)
|
||||||
|
this.addButton({ action: Lang.bind(this, this.cancel),
|
||||||
|
label: _("Cancel"),
|
||||||
|
key: Clutter.Escape },
|
||||||
|
{ expand: true,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.START,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
|
this.buttonLayout.add(this._workSpinner.actor,
|
||||||
|
{ expand: false,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.END,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
|
this._signInButton = this.addButton({ action: Lang.bind(this, function() {
|
||||||
|
hold.release();
|
||||||
|
}),
|
||||||
|
label: forSecret ? C_("button", "Sign In") : _("Next"),
|
||||||
|
default: true },
|
||||||
|
{ expand: false,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.END,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
|
this._updateSignInButtonSensitivity(this._promptEntry.text.length > 0);
|
||||||
|
|
||||||
|
this._promptEntryTextChangedId =
|
||||||
|
this._promptEntry.clutter_text.connect('text-changed',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this._updateSignInButtonSensitivity(this._promptEntry.text.length > 0);
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSensitivity: function(sensitive) {
|
||||||
|
this._promptEntry.reactive = sensitive;
|
||||||
|
this._promptEntry.clutter_text.editable = sensitive;
|
||||||
|
this._sessionList.updateSensitivity(sensitive);
|
||||||
|
this._updateSignInButtonSensitivity(sensitive);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSignInButtonSensitivity: function(sensitive) {
|
||||||
|
if (this._signInButton) {
|
||||||
|
this._signInButton.reactive = sensitive;
|
||||||
|
this._signInButton.can_focus = sensitive;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_hidePrompt: function() {
|
||||||
this.setButtons([]);
|
this.setButtons([]);
|
||||||
|
|
||||||
|
if (this._promptEntryTextChangedId > 0) {
|
||||||
|
this._promptEntry.clutter_text.disconnect(this._promptEntryTextChangedId);
|
||||||
|
this._promptEntryTextChangedId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
let tasks = [function() {
|
let tasks = [function() {
|
||||||
|
this._setWorking(false);
|
||||||
|
|
||||||
return GdmUtil.fadeOutActor(this._promptBox);
|
return GdmUtil.fadeOutActor(this._promptBox);
|
||||||
},
|
},
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
this._promptLoginHint.hide();
|
this._promptLoginHint.hide();
|
||||||
this._promptEntry.reactive = true;
|
|
||||||
|
this._updateSensitivity(true);
|
||||||
this._promptEntry.set_text('');
|
this._promptEntry.set_text('');
|
||||||
|
|
||||||
|
this.clearButtons();
|
||||||
|
this._workSpinner = null;
|
||||||
|
this._signInButton = null;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
||||||
@@ -946,18 +1036,63 @@ const LoginDialog = new Lang.Class({
|
|||||||
return batch.run();
|
return batch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_setWorking: function(working) {
|
||||||
|
if (!this._workSpinner)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (working) {
|
||||||
|
this._workSpinner.play();
|
||||||
|
Tweener.addTween(this._workSpinner.actor,
|
||||||
|
{ opacity: 255,
|
||||||
|
delay: WORK_SPINNER_ANIMATION_DELAY,
|
||||||
|
time: WORK_SPINNER_ANIMATION_TIME,
|
||||||
|
transition: 'linear'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Tweener.addTween(this._workSpinner.actor,
|
||||||
|
{ opacity: 0,
|
||||||
|
time: WORK_SPINNER_ANIMATION_TIME,
|
||||||
|
transition: 'linear',
|
||||||
|
onCompleteScope: this,
|
||||||
|
onComplete: function() {
|
||||||
|
this._workSpinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_askQuestion: function(verifier, serviceName, question, passwordChar) {
|
_askQuestion: function(verifier, serviceName, question, passwordChar) {
|
||||||
this._promptLabel.set_text(question);
|
this._promptLabel.set_text(question);
|
||||||
|
|
||||||
this._promptEntry.set_text('');
|
this._promptEntry.set_text('');
|
||||||
this._promptEntry.clutter_text.set_password_char(passwordChar);
|
this._promptEntry.clutter_text.set_password_char(passwordChar);
|
||||||
|
|
||||||
|
let tasks = [function() {
|
||||||
|
return this._showPrompt(!!passwordChar);
|
||||||
|
},
|
||||||
|
|
||||||
|
function() {
|
||||||
|
let text = this._promptEntry.get_text();
|
||||||
|
this._updateSensitivity(false);
|
||||||
|
this._setWorking(true);
|
||||||
|
this._userVerifier.answerQuery(serviceName, text);
|
||||||
|
}];
|
||||||
|
|
||||||
|
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
||||||
|
return batch.run();
|
||||||
|
},
|
||||||
|
|
||||||
|
_askForUsernameAndLogIn: function() {
|
||||||
|
this._promptLabel.set_text(_("Username: "));
|
||||||
|
this._promptEntry.set_text('');
|
||||||
|
this._promptEntry.clutter_text.set_password_char('');
|
||||||
|
|
||||||
let tasks = [this._showPrompt,
|
let tasks = [this._showPrompt,
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
let _text = this._promptEntry.get_text();
|
let userName = this._promptEntry.get_text();
|
||||||
this._promptEntry.reactive = false;
|
this._promptEntry.reactive = false;
|
||||||
this._userVerifier.answerQuery(serviceName, _text);
|
return this._beginVerificationForUser(userName);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
||||||
@@ -1092,7 +1227,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_onNotListedClicked: function(user) {
|
_hideUserListAndLogIn: function() {
|
||||||
let tasks = [function() {
|
let tasks = [function() {
|
||||||
return this._userList.hideItems();
|
return this._userList.hideItems();
|
||||||
},
|
},
|
||||||
@@ -1106,26 +1241,37 @@ const LoginDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
new Batch.ConcurrentBatch(this, [this._fadeOutTitleLabel,
|
new Batch.ConcurrentBatch(this, [this._fadeOutTitleLabel,
|
||||||
this._fadeOutNotListedButton,
|
this._fadeOutNotListedButton]),
|
||||||
this._fadeOutLogo]),
|
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
let hold = new Batch.Hold();
|
return this._askForUsernameAndLogIn();
|
||||||
|
|
||||||
this._userVerifier.begin(null, hold);
|
|
||||||
return hold;
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
||||||
batch.run();
|
batch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
_fadeInLogo: function() {
|
_showUserList: function() {
|
||||||
return GdmUtil.fadeInActor(this._logoBox);
|
let tasks = [this._hidePrompt,
|
||||||
},
|
|
||||||
|
|
||||||
_fadeOutLogo: function() {
|
new Batch.ConcurrentBatch(this, [this._fadeInTitleLabel,
|
||||||
return GdmUtil.fadeOutActor(this._logoBox);
|
this._fadeInNotListedButton]),
|
||||||
|
|
||||||
|
function() {
|
||||||
|
this._sessionList.close();
|
||||||
|
this._promptLoginHint.hide();
|
||||||
|
this._userList.actor.show();
|
||||||
|
this._userList.actor.opacity = 255;
|
||||||
|
return this._userList.showItems();
|
||||||
|
},
|
||||||
|
|
||||||
|
function() {
|
||||||
|
this._userList.actor.reactive = true;
|
||||||
|
this._userList.actor.grab_key_focus();
|
||||||
|
}];
|
||||||
|
|
||||||
|
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
||||||
|
batch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
_fadeInBanner: function() {
|
_fadeInBanner: function() {
|
||||||
@@ -1156,6 +1302,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
let hold = new Batch.Hold();
|
let hold = new Batch.Hold();
|
||||||
|
|
||||||
this._userVerifier.begin(userName, hold);
|
this._userVerifier.begin(userName, hold);
|
||||||
|
this._verifyingUser = true;
|
||||||
return hold;
|
return hold;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1175,13 +1322,8 @@ const LoginDialog = new Lang.Class({
|
|||||||
return this._userList.giveUpWhitespace();
|
return this._userList.giveUpWhitespace();
|
||||||
},
|
},
|
||||||
|
|
||||||
function() {
|
|
||||||
return activatedItem.fadeOutName();
|
|
||||||
},
|
|
||||||
|
|
||||||
new Batch.ConcurrentBatch(this, [this._fadeOutTitleLabel,
|
new Batch.ConcurrentBatch(this, [this._fadeOutTitleLabel,
|
||||||
this._fadeOutNotListedButton,
|
this._fadeOutNotListedButton]),
|
||||||
this._fadeOutLogo]),
|
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
return this._userList.shrinkToNaturalHeight();
|
return this._userList.shrinkToNaturalHeight();
|
||||||
@@ -1213,6 +1355,8 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._userList.addUser(users[i]);
|
this._userList.addUser(users[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._updateDisableUserList();
|
||||||
|
|
||||||
this._userManager.connect('user-added',
|
this._userManager.connect('user-added',
|
||||||
Lang.bind(this, function(userManager, user) {
|
Lang.bind(this, function(userManager, user) {
|
||||||
this._userList.addUser(user);
|
this._userList.addUser(user);
|
||||||
@@ -1234,9 +1378,9 @@ const LoginDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onOpened: function() {
|
_onOpened: function() {
|
||||||
Main.ctrlAltTabManager.addGroup(this._mainContentBox,
|
Main.ctrlAltTabManager.addGroup(this.dialogLayout,
|
||||||
_("Login Window"),
|
_("Login Window"),
|
||||||
'dialog-password',
|
'dialog-password-symbolic',
|
||||||
{ sortGroup: CtrlAltTab.SortGroup.MIDDLE });
|
{ sortGroup: CtrlAltTab.SortGroup.MIDDLE });
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -1244,6 +1388,6 @@ const LoginDialog = new Lang.Class({
|
|||||||
close: function() {
|
close: function() {
|
||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
Main.ctrlAltTabManager.removeGroup(this._group);
|
Main.ctrlAltTabManager.removeGroup(this.dialogLayout);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,11 +18,12 @@
|
|||||||
* 02111-1307, USA.
|
* 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const UPowerGlib = imports.gi.UPowerGlib;
|
|
||||||
|
|
||||||
const LoginManager = imports.misc.loginManager;
|
const LoginManager = imports.misc.loginManager;
|
||||||
|
|
||||||
|
const GdmUtil = imports.gdm.util;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
|
|
||||||
@@ -31,16 +32,16 @@ const PowerMenuButton = new Lang.Class({
|
|||||||
Extends: PanelMenu.SystemStatusButton,
|
Extends: PanelMenu.SystemStatusButton,
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent('system-shutdown-symbolic', null);
|
/* Translators: accessible name of the power menu in the login screen */
|
||||||
this._upClient = new UPowerGlib.Client();
|
this.parent('system-shutdown-symbolic', _("Power"));
|
||||||
|
|
||||||
this._loginManager = LoginManager.getLoginManager();
|
this._loginManager = LoginManager.getLoginManager();
|
||||||
|
|
||||||
this._createSubMenu();
|
this._settings = new Gio.Settings({ schema: GdmUtil.LOGIN_SCREEN_SCHEMA });
|
||||||
|
this._settings.connect('changed::disable-restart-buttons',
|
||||||
|
Lang.bind(this, this._updateVisibility));
|
||||||
|
|
||||||
this._upClient.connect('notify::can-suspend',
|
this._createSubMenu();
|
||||||
Lang.bind(this, this._updateHaveSuspend));
|
|
||||||
this._updateHaveSuspend();
|
|
||||||
|
|
||||||
// ConsoleKit doesn't send notifications when shutdown/reboot
|
// ConsoleKit doesn't send notifications when shutdown/reboot
|
||||||
// are disabled, so we update the menu item each time the menu opens
|
// are disabled, so we update the menu item each time the menu opens
|
||||||
@@ -49,15 +50,17 @@ const PowerMenuButton = new Lang.Class({
|
|||||||
if (open) {
|
if (open) {
|
||||||
this._updateHaveShutdown();
|
this._updateHaveShutdown();
|
||||||
this._updateHaveRestart();
|
this._updateHaveRestart();
|
||||||
|
this._updateHaveSuspend();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
this._updateHaveShutdown();
|
this._updateHaveShutdown();
|
||||||
this._updateHaveRestart();
|
this._updateHaveRestart();
|
||||||
|
this._updateHaveSuspend();
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateVisibility: function() {
|
_updateVisibility: function() {
|
||||||
let shouldBeVisible = (this._haveSuspend || this._haveShutdown || this._haveRestart);
|
let shouldBeVisible = (this._haveSuspend || this._haveShutdown || this._haveRestart);
|
||||||
this.actor.visible = shouldBeVisible;
|
this.actor.visible = shouldBeVisible && !this._settings.get_boolean('disable-restart-buttons');
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateHaveShutdown: function() {
|
_updateHaveShutdown: function() {
|
||||||
@@ -77,9 +80,11 @@ const PowerMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateHaveSuspend: function() {
|
_updateHaveSuspend: function() {
|
||||||
this._haveSuspend = this._upClient.get_can_suspend();
|
this._loginManager.canSuspend(Lang.bind(this, function(result) {
|
||||||
this._suspendItem.actor.visible = this._haveSuspend;
|
this._haveSuspend = result;
|
||||||
this._updateVisibility();
|
this._suspendItem.actor.visible = this._haveSuspend;
|
||||||
|
this._updateVisibility();
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_createSubMenu: function() {
|
_createSubMenu: function() {
|
||||||
@@ -102,8 +107,10 @@ const PowerMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onActivateSuspend: function() {
|
_onActivateSuspend: function() {
|
||||||
if (this._haveSuspend)
|
if (!this._haveSuspend)
|
||||||
this._upClient.suspend_sync(null);
|
return;
|
||||||
|
|
||||||
|
this._loginManager.suspend();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onActivateRestart: function() {
|
_onActivateRestart: function() {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const BANNER_MESSAGE_TEXT_KEY = 'banner-message-text';
|
|||||||
const ALLOWED_FAILURES_KEY = 'allowed-failures';
|
const ALLOWED_FAILURES_KEY = 'allowed-failures';
|
||||||
|
|
||||||
const LOGO_KEY = 'logo';
|
const LOGO_KEY = 'logo';
|
||||||
|
const DISABLE_USER_LIST_KEY = 'disable-user-list';
|
||||||
|
|
||||||
function fadeInActor(actor) {
|
function fadeInActor(actor) {
|
||||||
if (actor.opacity == 255 && actor.visible)
|
if (actor.opacity == 255 && actor.visible)
|
||||||
@@ -125,6 +126,9 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
answerQuery: function(serviceName, answer) {
|
answerQuery: function(serviceName, answer) {
|
||||||
|
// Clear any previous message
|
||||||
|
this.emit('show-message', null, null);
|
||||||
|
|
||||||
this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
|
this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -143,7 +147,7 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
|
|
||||||
_reportInitError: function(where, error) {
|
_reportInitError: function(where, error) {
|
||||||
logError(error, where);
|
logError(error, where);
|
||||||
this._hold.relase();
|
this._hold.release();
|
||||||
|
|
||||||
this.emit('show-message', _("Authentication error"), 'login-dialog-message-warning');
|
this.emit('show-message', _("Authentication error"), 'login-dialog-message-warning');
|
||||||
this._verificationFailed(false);
|
this._verificationFailed(false);
|
||||||
@@ -330,12 +334,11 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
// Otherwise, we allow ALLOWED_FAILURES attempts. After that, we
|
// Otherwise, we allow ALLOWED_FAILURES attempts. After that, we
|
||||||
// go back to the welcome screen.
|
// go back to the welcome screen.
|
||||||
|
|
||||||
|
this._failCounter++;
|
||||||
let canRetry = retry && this._userName &&
|
let canRetry = retry && this._userName &&
|
||||||
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
|
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
|
||||||
|
|
||||||
if (canRetry) {
|
if (canRetry) {
|
||||||
this._failCounter++;
|
|
||||||
|
|
||||||
this.clear();
|
this.clear();
|
||||||
this.begin(this._userName, new Batch.Hold());
|
this.begin(this._userName, new Batch.Hold());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const Gio = imports.gi.Gio;
|
|||||||
const ShellJS = imports.gi.ShellJS;
|
const ShellJS = imports.gi.ShellJS;
|
||||||
|
|
||||||
const Config = imports.misc.config;
|
const Config = imports.misc.config;
|
||||||
|
const FileUtils = imports.misc.fileUtils;
|
||||||
|
|
||||||
const ExtensionType = {
|
const ExtensionType = {
|
||||||
SYSTEM: 1,
|
SYSTEM: 1,
|
||||||
@@ -120,11 +121,6 @@ function createExtensionObject(uuid, dir, type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Encourage people to add this
|
|
||||||
if (!meta.url) {
|
|
||||||
log('Warning: Missing "url" property in %s/metadata.json'.format(uuid));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uuid != meta.uuid) {
|
if (uuid != meta.uuid) {
|
||||||
throw new Error('uuid "' + meta.uuid + '" from metadata.json does not match directory name "' + uuid + '"');
|
throw new Error('uuid "' + meta.uuid + '" from metadata.json does not match directory name "' + uuid + '"');
|
||||||
}
|
}
|
||||||
@@ -155,52 +151,35 @@ function installImporter(extension) {
|
|||||||
const ExtensionFinder = new Lang.Class({
|
const ExtensionFinder = new Lang.Class({
|
||||||
Name: 'ExtensionFinder',
|
Name: 'ExtensionFinder',
|
||||||
|
|
||||||
_scanExtensionsInDirectory: function(dir, type) {
|
_loadExtension: function(extensionDir, info, perUserDir) {
|
||||||
let fileEnum;
|
let fileType = info.get_file_type();
|
||||||
let file, info;
|
if (fileType != Gio.FileType.DIRECTORY)
|
||||||
try {
|
return;
|
||||||
fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
|
let uuid = info.get_name();
|
||||||
} catch(e) {
|
let existing = extensions[uuid];
|
||||||
logError(e, 'Could not enumerate extensions directory');
|
if (existing) {
|
||||||
|
log('Extension %s already installed in %s. %s will not be loaded'.format(uuid, existing.path, extensionDir.get_path()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((info = fileEnum.next_file(null)) != null) {
|
let extension;
|
||||||
let fileType = info.get_file_type();
|
let type = extensionDir.has_prefix(perUserDir) ? ExtensionType.PER_USER
|
||||||
if (fileType != Gio.FileType.DIRECTORY)
|
: ExtensionType.SYSTEM;
|
||||||
continue;
|
try {
|
||||||
let uuid = info.get_name();
|
extension = createExtensionObject(uuid, extensionDir, type);
|
||||||
let extensionDir = dir.get_child(uuid);
|
} catch(e) {
|
||||||
|
logError(e, 'Could not load extension %s'.format(uuid));
|
||||||
let existing = extensions[uuid];
|
return;
|
||||||
if (existing) {
|
|
||||||
log('Extension %s already installed in %s. %s will not be loaded'.format(uuid, existing.path, extensionDir.get_path()));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let extension;
|
|
||||||
try {
|
|
||||||
extension = createExtensionObject(uuid, extensionDir, type);
|
|
||||||
} catch(e) {
|
|
||||||
logError(e, 'Could not load extension %s'.format(uuid));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
this.emit('extension-found', extension);
|
|
||||||
}
|
}
|
||||||
fileEnum.close(null);
|
this.emit('extension-found', extension);
|
||||||
},
|
},
|
||||||
|
|
||||||
scanExtensions: function() {
|
scanExtensions: function() {
|
||||||
let userExtensionsDir = Gio.File.new_for_path(GLib.build_filenamev([global.userdatadir, 'extensions']));
|
let perUserDir = Gio.File.new_for_path(global.userdatadir);
|
||||||
this._scanExtensionsInDirectory(userExtensionsDir, ExtensionType.PER_USER);
|
FileUtils.collectFromDatadirsAsync('extensions',
|
||||||
|
{ processFile: Lang.bind(this, this._loadExtension),
|
||||||
let systemDataDirs = GLib.get_system_data_dirs();
|
includeUserDir: true,
|
||||||
for (let i = 0; i < systemDataDirs.length; i++) {
|
data: perUserDir });
|
||||||
let dirPath = GLib.build_filenamev([systemDataDirs[i], 'gnome-shell', 'extensions']);
|
|
||||||
let dir = Gio.file_new_for_path(dirPath);
|
|
||||||
if (dir.query_exists(null))
|
|
||||||
this._scanExtensionsInDirectory(dir, ExtensionType.SYSTEM);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ExtensionFinder.prototype);
|
Signals.addSignalMethods(ExtensionFinder.prototype);
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
function listDirAsync(file, callback) {
|
function listDirAsync(file, callback) {
|
||||||
let allFiles = [];
|
let allFiles = [];
|
||||||
file.enumerate_children_async(Gio.FILE_ATTRIBUTE_STANDARD_NAME,
|
file.enumerate_children_async('standard::name,standard::type',
|
||||||
Gio.FileQueryInfoFlags.NONE,
|
Gio.FileQueryInfoFlags.NONE,
|
||||||
GLib.PRIORITY_LOW, null, function (obj, res) {
|
GLib.PRIORITY_LOW, null, function (obj, res) {
|
||||||
let enumerator = obj.enumerate_children_finish(res);
|
let enumerator = obj.enumerate_children_finish(res);
|
||||||
@@ -23,6 +25,63 @@ function listDirAsync(file, callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _collectFromDirectoryAsync(dir, loadState) {
|
||||||
|
function done() {
|
||||||
|
loadState.numLoading--;
|
||||||
|
if (loadState.loadedCallback &&
|
||||||
|
loadState.numLoading == 0)
|
||||||
|
loadState.loadedCallback(loadState.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
dir.query_info_async('standard::type', Gio.FileQueryInfoFlags.NONE,
|
||||||
|
GLib.PRIORITY_DEFAULT, null, function(object, res) {
|
||||||
|
try {
|
||||||
|
object.query_info_finish(res);
|
||||||
|
} catch (e) {
|
||||||
|
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND))
|
||||||
|
log(e.message);
|
||||||
|
done();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
listDirAsync(dir, Lang.bind(this, function(infos) {
|
||||||
|
for (let i = 0; i < infos.length; i++)
|
||||||
|
loadState.processFile(dir.get_child(infos[i].get_name()),
|
||||||
|
infos[i], loadState.data);
|
||||||
|
done();
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function collectFromDatadirsAsync(subdir, params) {
|
||||||
|
params = Params.parse(params, { includeUserDir: false,
|
||||||
|
processFile: null,
|
||||||
|
loadedCallback: null,
|
||||||
|
data: null });
|
||||||
|
let loadState = { data: params.data,
|
||||||
|
numLoading: 0,
|
||||||
|
loadedCallback: params.loadedCallback,
|
||||||
|
processFile: params.processFile };
|
||||||
|
|
||||||
|
if (params.processFile == null) {
|
||||||
|
if (params.loadedCallback)
|
||||||
|
params.loadedCallback(params.data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let dataDirs = GLib.get_system_data_dirs();
|
||||||
|
if (params.includeUserDir)
|
||||||
|
dataDirs.unshift(GLib.get_user_data_dir());
|
||||||
|
loadState.numLoading = dataDirs.length;
|
||||||
|
|
||||||
|
for (let i = 0; i < dataDirs.length; i++) {
|
||||||
|
let path = GLib.build_filenamev([dataDirs[i], 'gnome-shell', subdir]);
|
||||||
|
let dir = Gio.File.new_for_path(path);
|
||||||
|
|
||||||
|
_collectFromDirectoryAsync(dir, loadState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function deleteGFile(file) {
|
function deleteGFile(file) {
|
||||||
// Work around 'delete' being a keyword in JS.
|
// Work around 'delete' being a keyword in JS.
|
||||||
return file['delete'](null);
|
return file['delete'](null);
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Mainloop = imports.mainloop;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
const UPowerGlib = imports.gi.UPowerGlib;
|
||||||
|
|
||||||
const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager'>
|
const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager'>
|
||||||
<method name='PowerOff'>
|
<method name='PowerOff'>
|
||||||
@@ -12,12 +14,18 @@ const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager
|
|||||||
<method name='Reboot'>
|
<method name='Reboot'>
|
||||||
<arg type='b' direction='in'/>
|
<arg type='b' direction='in'/>
|
||||||
</method>
|
</method>
|
||||||
|
<method name='Suspend'>
|
||||||
|
<arg type='b' direction='in'/>
|
||||||
|
</method>
|
||||||
<method name='CanPowerOff'>
|
<method name='CanPowerOff'>
|
||||||
<arg type='s' direction='out'/>
|
<arg type='s' direction='out'/>
|
||||||
</method>
|
</method>
|
||||||
<method name='CanReboot'>
|
<method name='CanReboot'>
|
||||||
<arg type='s' direction='out'/>
|
<arg type='s' direction='out'/>
|
||||||
</method>
|
</method>
|
||||||
|
<method name='CanSuspend'>
|
||||||
|
<arg type='s' direction='out'/>
|
||||||
|
</method>
|
||||||
</interface>;
|
</interface>;
|
||||||
|
|
||||||
const SystemdLoginSessionIface = <interface name='org.freedesktop.login1.Session'>
|
const SystemdLoginSessionIface = <interface name='org.freedesktop.login1.Session'>
|
||||||
@@ -123,12 +131,25 @@ const LoginManagerSystemd = new Lang.Class({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
canSuspend: function(asyncCallback) {
|
||||||
|
this._proxy.CanSuspendRemote(function(result, error) {
|
||||||
|
if (error)
|
||||||
|
asyncCallback(false);
|
||||||
|
else
|
||||||
|
asyncCallback(result[0] != 'no');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
powerOff: function() {
|
powerOff: function() {
|
||||||
this._proxy.PowerOffRemote(true);
|
this._proxy.PowerOffRemote(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
reboot: function() {
|
reboot: function() {
|
||||||
this._proxy.RebootRemote(true);
|
this._proxy.RebootRemote(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
suspend: function() {
|
||||||
|
this._proxy.SuspendRemote(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -139,6 +160,7 @@ const LoginManagerConsoleKit = new Lang.Class({
|
|||||||
this._proxy = new ConsoleKitManager(Gio.DBus.system,
|
this._proxy = new ConsoleKitManager(Gio.DBus.system,
|
||||||
'org.freedesktop.ConsoleKit',
|
'org.freedesktop.ConsoleKit',
|
||||||
'/org/freedesktop/ConsoleKit/Manager');
|
'/org/freedesktop/ConsoleKit/Manager');
|
||||||
|
this._upClient = new UPowerGlib.Client();
|
||||||
},
|
},
|
||||||
|
|
||||||
// Having this function is a bit of a hack since the Systemd and ConsoleKit
|
// Having this function is a bit of a hack since the Systemd and ConsoleKit
|
||||||
@@ -186,12 +208,22 @@ const LoginManagerConsoleKit = new Lang.Class({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
canSuspend: function(asyncCallback) {
|
||||||
|
Mainloop.idle_add(Lang.bind(this, function() {
|
||||||
|
asyncCallback(this._upClient.get_can_suspend());
|
||||||
|
return false;
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
powerOff: function() {
|
powerOff: function() {
|
||||||
this._proxy.StopRemote();
|
this._proxy.StopRemote();
|
||||||
},
|
},
|
||||||
|
|
||||||
reboot: function() {
|
reboot: function() {
|
||||||
this._proxy.RestartRemote();
|
this._proxy.RestartRemote();
|
||||||
|
},
|
||||||
|
|
||||||
|
suspend: function() {
|
||||||
|
this._upClient.suspend_sync(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -46,8 +46,70 @@ let _providersTable;
|
|||||||
function _getProvidersTable() {
|
function _getProvidersTable() {
|
||||||
if (_providersTable)
|
if (_providersTable)
|
||||||
return _providersTable;
|
return _providersTable;
|
||||||
let [providers, countryCodes] = Shell.mobile_providers_parse();
|
return _providersTable = Shell.mobile_providers_parse(null,null);
|
||||||
return _providersTable = providers;
|
}
|
||||||
|
|
||||||
|
function findProviderForMCCMNC(table, needle) {
|
||||||
|
let needlemcc = needle.substring(0, 3);
|
||||||
|
let needlemnc = needle.substring(3, needle.length);
|
||||||
|
|
||||||
|
let name2, name3;
|
||||||
|
for (let iter in table) {
|
||||||
|
let country = table[iter];
|
||||||
|
let providers = country.get_providers();
|
||||||
|
|
||||||
|
// Search through each country's providers
|
||||||
|
for (let i = 0; i < providers.length; i++) {
|
||||||
|
let provider = providers[i];
|
||||||
|
|
||||||
|
// Search through MCC/MNC list
|
||||||
|
let list = provider.get_gsm_mcc_mnc();
|
||||||
|
for (let j = 0; j < list.length; j++) {
|
||||||
|
let mccmnc = list[j];
|
||||||
|
|
||||||
|
// Match both 2-digit and 3-digit MNC; prefer a
|
||||||
|
// 3-digit match if found, otherwise a 2-digit one.
|
||||||
|
if (mccmnc.mcc != needlemcc)
|
||||||
|
continue; // MCC was wrong
|
||||||
|
|
||||||
|
if (!name3 && needle.length == 6 && needlemnc == mccmnc.mnc)
|
||||||
|
name3 = provider.name;
|
||||||
|
|
||||||
|
if (!name2 && needlemnc.substring(0, 2) == mccmnc.mnc.substring(0, 2))
|
||||||
|
name2 = provider.name;
|
||||||
|
|
||||||
|
if (name2 && name3)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return name3 || name2 || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function findProviderForSid(table, sid) {
|
||||||
|
if (sid == 0)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// Search through each country
|
||||||
|
for (let iter in table) {
|
||||||
|
let country = table[iter];
|
||||||
|
let providers = country.get_providers();
|
||||||
|
|
||||||
|
// Search through each country's providers
|
||||||
|
for (let i = 0; i < providers.length; i++) {
|
||||||
|
let provider = providers[i];
|
||||||
|
let cdma_sid = provider.get_cdma_sid();
|
||||||
|
|
||||||
|
// Search through CDMA SID list
|
||||||
|
for (let j = 0; j < cdma_sid.length; j++) {
|
||||||
|
if (cdma_sid[j] == sid)
|
||||||
|
return provider.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ModemGsm = new Lang.Class({
|
const ModemGsm = new Lang.Class({
|
||||||
@@ -91,64 +153,29 @@ const ModemGsm = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_findOperatorName: function(name, opCode) {
|
_findOperatorName: function(name, opCode) {
|
||||||
if (name.length != 0 && (name.length > 6 || name.length < 5)) {
|
if (name) {
|
||||||
// this looks like a valid name, i.e. not an MCCMNC (that some
|
if (name && name.length != 0 && (name.length > 6 || name.length < 5)) {
|
||||||
// devices return when not yet connected
|
// this looks like a valid name, i.e. not an MCCMNC (that some
|
||||||
return name;
|
// devices return when not yet connected
|
||||||
}
|
return name;
|
||||||
if (isNaN(parseInt(name))) {
|
}
|
||||||
// name is definitely not a MCCMNC, so it may be a name
|
if (isNaN(parseInt(name))) {
|
||||||
// after all; return that
|
// name is definitely not a MCCMNC, so it may be a name
|
||||||
return name;
|
// after all; return that
|
||||||
|
return name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let needle;
|
let needle;
|
||||||
if (name.length == 0 && opCode)
|
if ((name == null || name.length == 0) && opCode)
|
||||||
needle = opCode;
|
needle = opCode;
|
||||||
else if (name.length == 6 || name.length == 5)
|
else if (name.length == 6 || name.length == 5)
|
||||||
needle = name;
|
needle = name;
|
||||||
else // nothing to search
|
else // nothing to search
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return this._findProviderForMCCMNC(needle);
|
|
||||||
},
|
|
||||||
|
|
||||||
_findProviderForMCCMNC: function(needle) {
|
|
||||||
let table = _getProvidersTable();
|
let table = _getProvidersTable();
|
||||||
let needlemcc = needle.substring(0, 3);
|
return findProviderForMCCMNC(table, needle);
|
||||||
let needlemnc = needle.substring(3, needle.length);
|
|
||||||
|
|
||||||
let name2, name3;
|
|
||||||
for (let iter in table) {
|
|
||||||
let providers = table[iter];
|
|
||||||
|
|
||||||
// Search through each country's providers
|
|
||||||
for (let i = 0; i < providers.length; i++) {
|
|
||||||
let provider = providers[i];
|
|
||||||
|
|
||||||
// Search through MCC/MNC list
|
|
||||||
let list = provider.get_gsm_mcc_mnc();
|
|
||||||
for (let j = 0; j < list.length; j++) {
|
|
||||||
let mccmnc = list[j];
|
|
||||||
|
|
||||||
// Match both 2-digit and 3-digit MNC; prefer a
|
|
||||||
// 3-digit match if found, otherwise a 2-digit one.
|
|
||||||
if (mccmnc.mcc != needlemcc)
|
|
||||||
continue; // MCC was wrong
|
|
||||||
|
|
||||||
if (!name3 && needle.length == 6 && needlemnc == mccmnc.mnc)
|
|
||||||
name3 = provider.name;
|
|
||||||
|
|
||||||
if (!name2 && needlemnc.substring(0, 2) == mccmnc.mnc.substring(0, 2))
|
|
||||||
name2 = provider.name;
|
|
||||||
|
|
||||||
if (name2 && name3)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return name3 || name2 || null;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ModemGsm.prototype);
|
Signals.addSignalMethods(ModemGsm.prototype);
|
||||||
@@ -189,39 +216,14 @@ const ModemCdma = new Lang.Class({
|
|||||||
this.operator_name = null;
|
this.operator_name = null;
|
||||||
} else {
|
} else {
|
||||||
let [bandClass, band, id] = result;
|
let [bandClass, band, id] = result;
|
||||||
if (name.length > 0)
|
if (name.length > 0) {
|
||||||
this.operator_name = this._findProviderForSid(id);
|
let table = _getProvidersTable();
|
||||||
else
|
this.operator_name = findProviderForSid(table, id);
|
||||||
|
} else
|
||||||
this.operator_name = null;
|
this.operator_name = null;
|
||||||
}
|
}
|
||||||
this.emit('notify::operator-name');
|
this.emit('notify::operator-name');
|
||||||
}));
|
}));
|
||||||
},
|
|
||||||
|
|
||||||
_findProviderForSid: function(sid) {
|
|
||||||
if (sid == 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
let table = _getProvidersTable();
|
|
||||||
|
|
||||||
// Search through each country
|
|
||||||
for (let iter in table) {
|
|
||||||
let providers = table[iter];
|
|
||||||
|
|
||||||
// Search through each country's providers
|
|
||||||
for (let i = 0; i < providers.length; i++) {
|
|
||||||
let provider = providers[i];
|
|
||||||
let cdma_sid = provider.get_cdma_sid();
|
|
||||||
|
|
||||||
// Search through CDMA SID list
|
|
||||||
for (let j = 0; j < cdma_sid.length; j++) {
|
|
||||||
if (cdma_sid[j] == sid)
|
|
||||||
return provider.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ModemCdma.prototype);
|
Signals.addSignalMethods(ModemCdma.prototype);
|
||||||
|
|||||||
861
js/ui/altTab.js
861
js/ui/altTab.js
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const GMenu = imports.gi.GMenu;
|
const GMenu = imports.gi.GMenu;
|
||||||
@@ -18,7 +19,6 @@ const IconGrid = imports.ui.iconGrid;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Overview = imports.ui.overview;
|
const Overview = imports.ui.overview;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Search = imports.ui.search;
|
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const Workspace = imports.ui.workspace;
|
const Workspace = imports.ui.workspace;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
@@ -48,18 +48,16 @@ const AlphabeticalView = new Lang.Class({
|
|||||||
style_class: 'vfade' });
|
style_class: 'vfade' });
|
||||||
this.actor.add_actor(box);
|
this.actor.add_actor(box);
|
||||||
this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
||||||
this.actor.connect('notify::mapped', Lang.bind(this,
|
let action = new Clutter.PanAction({ interpolate: true });
|
||||||
function() {
|
action.connect('pan', Lang.bind(this, this._onPan));
|
||||||
if (!this.actor.mapped)
|
this.actor.add_action(action);
|
||||||
return;
|
},
|
||||||
|
|
||||||
let adjustment = this.actor.vscroll.adjustment;
|
_onPan: function(action) {
|
||||||
let direction = Overview.SwipeScrollDirection.VERTICAL;
|
let [dist, dx, dy] = action.get_motion_delta(0);
|
||||||
Main.overview.setScrollAdjustment(adjustment, direction);
|
let adjustment = this.actor.vscroll.adjustment;
|
||||||
|
adjustment.value -= (dy / this.actor.height) * adjustment.page_size;
|
||||||
// Reset scroll on mapping
|
return false;
|
||||||
adjustment.value = 0;
|
|
||||||
}));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
removeAll: function() {
|
removeAll: function() {
|
||||||
@@ -216,6 +214,16 @@ const ViewByCategories = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_addCategory: function(name, index, dir) {
|
_addCategory: function(name, index, dir) {
|
||||||
|
let apps;
|
||||||
|
|
||||||
|
if (dir != null) {
|
||||||
|
apps = [];
|
||||||
|
this._loadCategory(dir, apps);
|
||||||
|
|
||||||
|
if (apps.length == 0)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
let button = new St.Button({ label: GLib.markup_escape_text (name, -1),
|
let button = new St.Button({ label: GLib.markup_escape_text (name, -1),
|
||||||
style_class: 'app-filter',
|
style_class: 'app-filter',
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
@@ -225,18 +233,16 @@ const ViewByCategories = new Lang.Class({
|
|||||||
this._selectCategory(index);
|
this._selectCategory(index);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var apps;
|
|
||||||
if (dir == null) {
|
if (dir == null) {
|
||||||
this._allCategoryButton = button;
|
this._allCategoryButton = button;
|
||||||
} else {
|
} else {
|
||||||
apps = [];
|
|
||||||
this._loadCategory(dir, apps);
|
|
||||||
this._categories.push({ apps: apps,
|
this._categories.push({ apps: apps,
|
||||||
name: name,
|
name: name,
|
||||||
button: button });
|
button: button });
|
||||||
}
|
}
|
||||||
|
|
||||||
this._categoryBox.add(button, { expand: true, x_fill: true, y_fill: false });
|
this._categoryBox.add(button, { expand: true, x_fill: true, y_fill: false });
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeAll: function() {
|
_removeAll: function() {
|
||||||
@@ -262,8 +268,9 @@ const ViewByCategories = new Lang.Class({
|
|||||||
var dir = iter.get_directory();
|
var dir = iter.get_directory();
|
||||||
if (dir.get_is_nodisplay())
|
if (dir.get_is_nodisplay())
|
||||||
continue;
|
continue;
|
||||||
this._addCategory(dir.get_name(), i, dir);
|
|
||||||
i++;
|
if (this._addCategory(dir.get_name(), i, dir))
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,11 +311,10 @@ const AllAppDisplay = new Lang.Class({
|
|||||||
|
|
||||||
const AppSearchProvider = new Lang.Class({
|
const AppSearchProvider = new Lang.Class({
|
||||||
Name: 'AppSearchProvider',
|
Name: 'AppSearchProvider',
|
||||||
Extends: Search.SearchProvider,
|
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent(_("APPLICATIONS"));
|
|
||||||
this._appSys = Shell.AppSystem.get_default();
|
this._appSys = Shell.AppSystem.get_default();
|
||||||
|
this.id = 'applications';
|
||||||
},
|
},
|
||||||
|
|
||||||
getResultMetas: function(apps, callback) {
|
getResultMetas: function(apps, callback) {
|
||||||
@@ -333,18 +339,15 @@ const AppSearchProvider = new Lang.Class({
|
|||||||
this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
|
this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
|
||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(app, params) {
|
activateResult: function(app) {
|
||||||
params = Params.parse(params, { workspace: -1,
|
|
||||||
timestamp: 0 });
|
|
||||||
|
|
||||||
let event = Clutter.get_current_event();
|
let event = Clutter.get_current_event();
|
||||||
let modifiers = event ? event.get_state() : 0;
|
let modifiers = event ? event.get_state() : 0;
|
||||||
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
|
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
|
||||||
|
|
||||||
if (openNewWindow)
|
if (openNewWindow)
|
||||||
app.open_new_window(params.workspace);
|
app.open_new_window(-1);
|
||||||
else
|
else
|
||||||
app.activate_full(params.workspace, params.timestamp);
|
app.activate();
|
||||||
},
|
},
|
||||||
|
|
||||||
dragActivateResult: function(id, params) {
|
dragActivateResult: function(id, params) {
|
||||||
@@ -364,13 +367,10 @@ const AppSearchProvider = new Lang.Class({
|
|||||||
|
|
||||||
const SettingsSearchProvider = new Lang.Class({
|
const SettingsSearchProvider = new Lang.Class({
|
||||||
Name: 'SettingsSearchProvider',
|
Name: 'SettingsSearchProvider',
|
||||||
Extends: Search.SearchProvider,
|
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent(_("SETTINGS"));
|
this.appInfo = Gio.DesktopAppInfo.new('gnome-control-center.desktop');
|
||||||
|
|
||||||
this._appSys = Shell.AppSystem.get_default();
|
this._appSys = Shell.AppSystem.get_default();
|
||||||
this._gnomecc = this._appSys.lookup_app('gnome-control-center.desktop');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getResultMetas: function(prefs, callback) {
|
getResultMetas: function(prefs, callback) {
|
||||||
@@ -379,9 +379,7 @@ const SettingsSearchProvider = new Lang.Class({
|
|||||||
let pref = prefs[i];
|
let pref = prefs[i];
|
||||||
metas.push({ 'id': pref,
|
metas.push({ 'id': pref,
|
||||||
'name': pref.get_name(),
|
'name': pref.get_name(),
|
||||||
'createIcon': function(size) {
|
'createIcon': function() { return null; }
|
||||||
return pref.create_icon_texture(size);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
callback(metas);
|
callback(metas);
|
||||||
@@ -395,21 +393,13 @@ const SettingsSearchProvider = new Lang.Class({
|
|||||||
this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
|
this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
|
||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(pref, params) {
|
activateResult: function(pref) {
|
||||||
params = Params.parse(params, { workspace: -1,
|
pref.activate();
|
||||||
timestamp: 0 });
|
|
||||||
|
|
||||||
pref.activate_full(params.workspace, params.timestamp);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
dragActivateResult: function(pref, params) {
|
launchSearch: function(terms) {
|
||||||
this.activateResult(pref, params);
|
// FIXME: this should be a remote search provider
|
||||||
},
|
this.appInfo.launch([], global.create_app_launch_context());
|
||||||
|
|
||||||
createResultActor: function (resultMeta, terms) {
|
|
||||||
let app = resultMeta['id'];
|
|
||||||
let icon = new AppWellIcon(app);
|
|
||||||
return icon.actor;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -479,7 +469,6 @@ const AppWellIcon = new Lang.Class({
|
|||||||
Lang.bind(this,
|
Lang.bind(this,
|
||||||
this._onStateChanged));
|
this._onStateChanged));
|
||||||
this._onStateChanged();
|
this._onStateChanged();
|
||||||
this.isMenuUp = false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy: function() {
|
_onDestroy: function() {
|
||||||
@@ -561,9 +550,11 @@ const AppWellIcon = new Lang.Class({
|
|||||||
this._menuManager.addMenu(this._menu);
|
this._menuManager.addMenu(this._menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isMenuUp = true;
|
this.emit('menu-state-changed', true);
|
||||||
|
|
||||||
this.actor.set_hover(true);
|
this.actor.set_hover(true);
|
||||||
this._menu.popup();
|
this._menu.popup();
|
||||||
|
this._menuManager.ignoreRelease();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
@@ -578,7 +569,7 @@ const AppWellIcon = new Lang.Class({
|
|||||||
|
|
||||||
_onMenuPoppedDown: function() {
|
_onMenuPoppedDown: function() {
|
||||||
this.actor.sync_hover();
|
this.actor.sync_hover();
|
||||||
this.isMenuUp = false;
|
this.emit('menu-state-changed', false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onActivate: function (event) {
|
_onActivate: function (event) {
|
||||||
|
|||||||
@@ -84,9 +84,12 @@ const AppFavorites = new Lang.Class({
|
|||||||
|
|
||||||
let app = Shell.AppSystem.get_default().lookup_app(appId);
|
let app = Shell.AppSystem.get_default().lookup_app(appId);
|
||||||
|
|
||||||
Main.overview.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () {
|
Main.overview.setMessage(_("%s has been added to your favorites.").format(app.get_name()),
|
||||||
this._removeFavorite(appId);
|
{ forFeedback: true,
|
||||||
}));
|
undoCallback: Lang.bind(this, function () {
|
||||||
|
this._removeFavorite(appId);
|
||||||
|
})
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
addFavorite: function(appId) {
|
addFavorite: function(appId) {
|
||||||
@@ -116,9 +119,11 @@ const AppFavorites = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Main.overview.setMessage(_("%s has been removed from your favorites.").format(app.get_name()),
|
Main.overview.setMessage(_("%s has been removed from your favorites.").format(app.get_name()),
|
||||||
Lang.bind(this, function () {
|
{ forFeedback: true,
|
||||||
this._addFavorite(appId, pos);
|
undoCallback: Lang.bind(this, function () {
|
||||||
}));
|
this._addFavorite(appId, pos);
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(AppFavorites.prototype);
|
Signals.addSignalMethods(AppFavorites.prototype);
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ const BoxPointer = new Lang.Class({
|
|||||||
|
|
||||||
this._muteInput();
|
this._muteInput();
|
||||||
|
|
||||||
|
Tweener.removeTweens(this);
|
||||||
Tweener.addTween(this, { opacity: fade ? 0 : 255,
|
Tweener.addTween(this, { opacity: fade ? 0 : 255,
|
||||||
xOffset: xOffset,
|
xOffset: xOffset,
|
||||||
yOffset: yOffset,
|
yOffset: yOffset,
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ const Mainloop = imports.mainloop;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
const MSECS_IN_DAY = 24 * 60 * 60 * 1000;
|
const MSECS_IN_DAY = 24 * 60 * 60 * 1000;
|
||||||
const WEEKDATE_HEADER_WIDTH_DIGITS = 3;
|
|
||||||
const SHOW_WEEKDATE_KEY = 'show-weekdate';
|
const SHOW_WEEKDATE_KEY = 'show-weekdate';
|
||||||
|
|
||||||
// in org.gnome.desktop.interface
|
// in org.gnome.desktop.interface
|
||||||
@@ -95,15 +94,6 @@ function _getCalendarWeekForDate(date) {
|
|||||||
return weekNumber;
|
return weekNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _getDigitWidth(actor){
|
|
||||||
let context = actor.get_pango_context();
|
|
||||||
let themeNode = actor.get_theme_node();
|
|
||||||
let font = themeNode.get_font();
|
|
||||||
let metrics = context.get_metrics(font, context.get_language());
|
|
||||||
let width = metrics.get_approximate_digit_width();
|
|
||||||
return width;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _getCalendarDayAbbreviation(dayNumber) {
|
function _getCalendarDayAbbreviation(dayNumber) {
|
||||||
let abbreviations = [
|
let abbreviations = [
|
||||||
/* Translators: Calendar grid abbreviation for Sunday.
|
/* Translators: Calendar grid abbreviation for Sunday.
|
||||||
@@ -270,8 +260,9 @@ const DBusEventSource = new Lang.Class({
|
|||||||
this._loadEvents(false);
|
this._loadEvents(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEventsReceived: function([appointments]) {
|
_onEventsReceived: function(results, error) {
|
||||||
let newEvents = [];
|
let newEvents = [];
|
||||||
|
let appointments = results ? results[0] : null;
|
||||||
if (appointments != null) {
|
if (appointments != null) {
|
||||||
for (let n = 0; n < appointments.length; n++) {
|
for (let n = 0; n < appointments.length; n++) {
|
||||||
let a = appointments[n];
|
let a = appointments[n];
|
||||||
@@ -344,8 +335,6 @@ const Calendar = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._weekStart = Shell.util_get_week_start();
|
this._weekStart = Shell.util_get_week_start();
|
||||||
this._weekdate = NaN;
|
|
||||||
this._digitWidth = NaN;
|
|
||||||
this._settings = new Gio.Settings({ schema: 'org.gnome.shell.calendar' });
|
this._settings = new Gio.Settings({ schema: 'org.gnome.shell.calendar' });
|
||||||
|
|
||||||
this._settings.connect('changed::' + SHOW_WEEKDATE_KEY, Lang.bind(this, this._onSettingsChange));
|
this._settings.connect('changed::' + SHOW_WEEKDATE_KEY, Lang.bind(this, this._onSettingsChange));
|
||||||
@@ -418,8 +407,6 @@ const Calendar = new Lang.Class({
|
|||||||
this.actor.add(this._topBox,
|
this.actor.add(this._topBox,
|
||||||
{ row: 0, col: 0, col_span: offsetCols + 7 });
|
{ row: 0, col: 0, col_span: offsetCols + 7 });
|
||||||
|
|
||||||
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChange));
|
|
||||||
|
|
||||||
let back = new St.Button({ style_class: 'calendar-change-month-back' });
|
let back = new St.Button({ style_class: 'calendar-change-month-back' });
|
||||||
this._topBox.add(back);
|
this._topBox.add(back);
|
||||||
back.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
|
back.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
|
||||||
@@ -456,18 +443,6 @@ const Calendar = new Lang.Class({
|
|||||||
this._firstDayIndex = this.actor.get_n_children();
|
this._firstDayIndex = this.actor.get_n_children();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onStyleChange: function(actor, event) {
|
|
||||||
// width of a digit in pango units
|
|
||||||
this._digitWidth = _getDigitWidth(this.actor) / Pango.SCALE;
|
|
||||||
this._setWeekdateHeaderWidth();
|
|
||||||
},
|
|
||||||
|
|
||||||
_setWeekdateHeaderWidth: function() {
|
|
||||||
if (this.digitWidth != NaN && this._useWeekdate && this._weekdateHeader) {
|
|
||||||
this._weekdateHeader.set_width (this._digitWidth * WEEKDATE_HEADER_WIDTH_DIGITS);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_onScroll : function(actor, event) {
|
_onScroll : function(actor, event) {
|
||||||
switch (event.get_scroll_direction()) {
|
switch (event.get_scroll_direction()) {
|
||||||
case Clutter.ScrollDirection.UP:
|
case Clutter.ScrollDirection.UP:
|
||||||
|
|||||||
@@ -44,6 +44,17 @@ function isMountRootHidden(root) {
|
|||||||
return (path.indexOf('/.') != -1);
|
return (path.indexOf('/.') != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isMountNonLocal(mount) {
|
||||||
|
// If the mount doesn't have an associated volume, that means it's
|
||||||
|
// an uninteresting filesystem. Most devices that we care about will
|
||||||
|
// have a mount, like media players and USB sticks.
|
||||||
|
let volume = mount.get_volume();
|
||||||
|
if (volume == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return (volume.get_identifier("class") == "network");
|
||||||
|
}
|
||||||
|
|
||||||
function startAppForMount(app, mount) {
|
function startAppForMount(app, mount) {
|
||||||
let files = [];
|
let files = [];
|
||||||
let root = mount.get_root();
|
let root = mount.get_root();
|
||||||
@@ -83,13 +94,21 @@ const ContentTypeDiscoverer = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(callback) {
|
_init: function(callback) {
|
||||||
this._callback = callback;
|
this._callback = callback;
|
||||||
|
this._settings = new Gio.Settings({ schema: SETTINGS_SCHEMA });
|
||||||
},
|
},
|
||||||
|
|
||||||
guessContentTypes: function(mount) {
|
guessContentTypes: function(mount) {
|
||||||
// guess mount's content types using GIO
|
let autorunEnabled = !this._settings.get_boolean(SETTING_DISABLE_AUTORUN);
|
||||||
mount.guess_content_type(false, null,
|
let shouldScan = autorunEnabled && !isMountNonLocal(mount);
|
||||||
Lang.bind(this,
|
|
||||||
this._onContentTypeGuessed));
|
if (shouldScan) {
|
||||||
|
// guess mount's content types using GIO
|
||||||
|
mount.guess_content_type(false, null,
|
||||||
|
Lang.bind(this,
|
||||||
|
this._onContentTypeGuessed));
|
||||||
|
} else {
|
||||||
|
this._emitCallback(mount, []);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onContentTypeGuessed: function(mount, res) {
|
_onContentTypeGuessed: function(mount, res) {
|
||||||
@@ -175,16 +194,21 @@ const AutorunManager = new Lang.Class({
|
|||||||
this._volumeMonitor.disconnect(this._mountRemovedId);
|
this._volumeMonitor.disconnect(this._mountRemovedId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_processMount: function(mount, hotplug) {
|
||||||
|
let discoverer = new ContentTypeDiscoverer(Lang.bind(this, function(mount, apps, contentTypes) {
|
||||||
|
this._ensureResidentSource();
|
||||||
|
this._residentSource.addMount(mount, apps);
|
||||||
|
|
||||||
|
if (hotplug)
|
||||||
|
this._transDispatcher.addMount(mount, apps, contentTypes);
|
||||||
|
}));
|
||||||
|
discoverer.guessContentTypes(mount);
|
||||||
|
},
|
||||||
|
|
||||||
_scanMounts: function() {
|
_scanMounts: function() {
|
||||||
let mounts = this._volumeMonitor.get_mounts();
|
let mounts = this._volumeMonitor.get_mounts();
|
||||||
mounts.forEach(Lang.bind(this, function (mount) {
|
mounts.forEach(Lang.bind(this, function(mount) {
|
||||||
let discoverer = new ContentTypeDiscoverer(Lang.bind (this,
|
this._processMount(mount, false);
|
||||||
function (mount, apps) {
|
|
||||||
this._ensureResidentSource();
|
|
||||||
this._residentSource.addMount(mount, apps);
|
|
||||||
}));
|
|
||||||
|
|
||||||
discoverer.guessContentTypes(mount);
|
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -194,14 +218,7 @@ const AutorunManager = new Lang.Class({
|
|||||||
if (!this._loginManager.sessionActive)
|
if (!this._loginManager.sessionActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let discoverer = new ContentTypeDiscoverer(Lang.bind (this,
|
this._processMount(mount, true);
|
||||||
function (mount, apps, contentTypes) {
|
|
||||||
this._transDispatcher.addMount(mount, apps, contentTypes);
|
|
||||||
this._ensureResidentSource();
|
|
||||||
this._residentSource.addMount(mount, apps);
|
|
||||||
}));
|
|
||||||
|
|
||||||
discoverer.guessContentTypes(mount);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMountRemoved: function(monitor, mount) {
|
_onMountRemoved: function(monitor, mount) {
|
||||||
@@ -391,7 +408,7 @@ const AutorunResidentNotification = new Lang.Class({
|
|||||||
expand: true });
|
expand: true });
|
||||||
|
|
||||||
let ejectIcon =
|
let ejectIcon =
|
||||||
new St.Icon({ icon_name: 'media-eject',
|
new St.Icon({ icon_name: 'media-eject-symbolic',
|
||||||
style_class: 'hotplug-resident-eject-icon' });
|
style_class: 'hotplug-resident-eject-icon' });
|
||||||
|
|
||||||
let ejectButton =
|
let ejectButton =
|
||||||
@@ -527,9 +544,8 @@ const AutorunTransientSource = new Lang.Class({
|
|||||||
this.notify(this._notification);
|
this.notify(this._notification);
|
||||||
},
|
},
|
||||||
|
|
||||||
createIcon: function(size) {
|
getIcon: function() {
|
||||||
return new St.Icon({ gicon: this.mount.get_icon(),
|
return this.mount.get_icon();
|
||||||
icon_size: size });
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -592,7 +608,7 @@ const AutorunTransientNotification = new Lang.Class({
|
|||||||
|
|
||||||
_buttonForEject: function() {
|
_buttonForEject: function() {
|
||||||
let box = new St.BoxLayout();
|
let box = new St.BoxLayout();
|
||||||
let icon = new St.Icon({ icon_name: 'media-eject',
|
let icon = new St.Icon({ icon_name: 'media-eject-symbolic',
|
||||||
style_class: 'hotplug-notification-item-icon' });
|
style_class: 'hotplug-notification-item-icon' });
|
||||||
box.add(icon);
|
box.add(icon);
|
||||||
|
|
||||||
|
|||||||
@@ -408,7 +408,10 @@ const VPNRequestHandler = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel: function() {
|
cancel: function(respond) {
|
||||||
|
if (respond)
|
||||||
|
this._agent.respond(this._requestId, Shell.NetworkAgentResponse.USER_CANCELED);
|
||||||
|
|
||||||
if (this._newStylePlugin && this._shellDialog) {
|
if (this._newStylePlugin && this._shellDialog) {
|
||||||
this._shellDialog.close(global.get_current_time());
|
this._shellDialog.close(global.get_current_time());
|
||||||
this._shellDialog.destroy();
|
this._shellDialog.destroy();
|
||||||
@@ -595,11 +598,23 @@ const NetworkAgent = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enable: function() {
|
enable: function() {
|
||||||
this._native.register();
|
this._native.auto_register = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
disable: function() {
|
disable: function() {
|
||||||
this._native.unregister();
|
let requestId;
|
||||||
|
|
||||||
|
for (requestId in this._dialogs)
|
||||||
|
this._dialogs[requestId].cancel();
|
||||||
|
this._dialogs = { };
|
||||||
|
|
||||||
|
for (requestId in this._vpnRequests)
|
||||||
|
this._vpnRequests[requestId].cancel(true);
|
||||||
|
this._vpnRequests = { };
|
||||||
|
|
||||||
|
this._native.auto_register = false;
|
||||||
|
if (this._native.registered)
|
||||||
|
this._native.unregister();
|
||||||
},
|
},
|
||||||
|
|
||||||
_newRequest: function(agent, requestId, connection, settingName, hints, flags) {
|
_newRequest: function(agent, requestId, connection, settingName, hints, flags) {
|
||||||
@@ -622,7 +637,7 @@ const NetworkAgent = new Lang.Class({
|
|||||||
this._dialogs[requestId].destroy();
|
this._dialogs[requestId].destroy();
|
||||||
delete this._dialogs[requestId];
|
delete this._dialogs[requestId];
|
||||||
} else if (this._vpnRequests[requestId]) {
|
} else if (this._vpnRequests[requestId]) {
|
||||||
this._vpnRequests[requestId].cancel();
|
this._vpnRequests[requestId].cancel(false);
|
||||||
delete this._vpnRequests[requestId];
|
delete this._vpnRequests[requestId];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
|
let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
mainContentBox.add(messageBox,
|
mainContentBox.add(messageBox,
|
||||||
{ y_align: St.Align.START });
|
{ expand: true, y_align: St.Align.START });
|
||||||
|
|
||||||
this._subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline',
|
this._subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline',
|
||||||
text: _("Authentication Required") });
|
text: _("Authentication Required") });
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
@@ -16,13 +17,16 @@ const Recorder = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enable: function() {
|
enable: function() {
|
||||||
global.display.add_keybinding('toggle-recording',
|
Main.wm.addKeybinding('toggle-recording',
|
||||||
this._bindingSettings,
|
this._bindingSettings,
|
||||||
Meta.KeyBindingFlags.NONE, Lang.bind(this, this._toggleRecorder));
|
Meta.KeyBindingFlags.NONE,
|
||||||
|
Main.KeybindingMode.NORMAL |
|
||||||
|
Main.KeybindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._toggleRecorder));
|
||||||
},
|
},
|
||||||
|
|
||||||
disable: function() {
|
disable: function() {
|
||||||
global.display.remove_keybinding('toggle-recording');
|
Main.wm.removeKeybinding('toggle-recording');
|
||||||
},
|
},
|
||||||
|
|
||||||
_ensureRecorder: function() {
|
_ensureRecorder: function() {
|
||||||
@@ -41,7 +45,7 @@ const Recorder = new Lang.Class({
|
|||||||
recorder.set_framerate(this._recorderSettings.get_int('framerate'));
|
recorder.set_framerate(this._recorderSettings.get_int('framerate'));
|
||||||
/* Translators: this is a filename used for screencast recording */
|
/* Translators: this is a filename used for screencast recording */
|
||||||
// xgettext:no-c-format
|
// xgettext:no-c-format
|
||||||
recorder.set_filename(_("Screencast from %d %t") + '.' + this._recorderSettings.get_string('file-extension'));
|
recorder.set_file_template(_("Screencast from %d %t") + '.' + this._recorderSettings.get_string('file-extension'));
|
||||||
let pipeline = this._recorderSettings.get_string('pipeline');
|
let pipeline = this._recorderSettings.get_string('pipeline');
|
||||||
|
|
||||||
if (!pipeline.match(/^\s*$/))
|
if (!pipeline.match(/^\s*$/))
|
||||||
|
|||||||
@@ -383,25 +383,12 @@ const TelepathyClient = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Display notification to ask user to accept/reject request */
|
/* Display notification to ask user to accept/reject request */
|
||||||
let source = this._ensureSubscriptionSource();
|
let source = this._ensureAppSource();
|
||||||
|
|
||||||
let notif = new SubscriptionRequestNotification(source, contact);
|
let notif = new SubscriptionRequestNotification(source, contact);
|
||||||
source.notify(notif);
|
source.notify(notif);
|
||||||
},
|
},
|
||||||
|
|
||||||
_ensureSubscriptionSource: function() {
|
|
||||||
if (this._subscriptionSource == null) {
|
|
||||||
this._subscriptionSource = new MessageTray.Source(_("Subscription request"),
|
|
||||||
'gtk-dialog-question');
|
|
||||||
Main.messageTray.add(this._subscriptionSource);
|
|
||||||
this._subscriptionSource.connect('destroy', Lang.bind(this, function () {
|
|
||||||
this._subscriptionSource = null;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
return this._subscriptionSource;
|
|
||||||
},
|
|
||||||
|
|
||||||
_accountConnectionStatusNotifyCb: function(account) {
|
_accountConnectionStatusNotifyCb: function(account) {
|
||||||
let connectionError = account.connection_error;
|
let connectionError = account.connection_error;
|
||||||
|
|
||||||
@@ -415,7 +402,7 @@ const TelepathyClient = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Display notification that account failed to connect */
|
/* Display notification that account failed to connect */
|
||||||
let source = this._ensureAccountSource();
|
let source = this._ensureAppSource();
|
||||||
|
|
||||||
notif = new AccountNotification(source, account, connectionError);
|
notif = new AccountNotification(source, account, connectionError);
|
||||||
this._accountNotifications[account.get_object_path()] = notif;
|
this._accountNotifications[account.get_object_path()] = notif;
|
||||||
@@ -425,17 +412,16 @@ const TelepathyClient = new Lang.Class({
|
|||||||
source.notify(notif);
|
source.notify(notif);
|
||||||
},
|
},
|
||||||
|
|
||||||
_ensureAccountSource: function() {
|
_ensureAppSource: function() {
|
||||||
if (this._accountSource == null) {
|
if (this._appSource == null) {
|
||||||
this._accountSource = new MessageTray.Source(_("Connection error"),
|
this._appSource = new MessageTray.Source(_("Chat"), 'empathy');
|
||||||
'gtk-dialog-error');
|
Main.messageTray.add(this._appSource);
|
||||||
Main.messageTray.add(this._accountSource);
|
this._appSource.connect('destroy', Lang.bind(this, function () {
|
||||||
this._accountSource.connect('destroy', Lang.bind(this, function () {
|
this._appSource = null;
|
||||||
this._accountSource = null;
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._accountSource;
|
return this._appSource;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -492,7 +478,7 @@ const ChatSource = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
item.connect('activate', Lang.bind(this, function() {
|
item.connect('activate', Lang.bind(this, function() {
|
||||||
this.setMuted(!this.isMuted);
|
this.setMuted(!this.isMuted);
|
||||||
this.emit('done-displaying-content');
|
this.emit('done-displaying-content', false);
|
||||||
}));
|
}));
|
||||||
rightClickMenu.add(item.actor);
|
rightClickMenu.add(item.actor);
|
||||||
return rightClickMenu;
|
return rightClickMenu;
|
||||||
@@ -509,51 +495,42 @@ const ChatSource = new Lang.Class({
|
|||||||
this._notification.appendAliasChange(oldAlias, newAlias);
|
this._notification.appendAliasChange(oldAlias, newAlias);
|
||||||
},
|
},
|
||||||
|
|
||||||
createIcon: function(size) {
|
getIcon: function() {
|
||||||
this._iconBox = new St.Bin({ style_class: 'avatar-box' });
|
|
||||||
this._iconBox._size = size;
|
|
||||||
let textureCache = St.TextureCache.get_default();
|
|
||||||
let file = this._contact.get_avatar_file();
|
let file = this._contact.get_avatar_file();
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
let uri = file.get_uri();
|
return new Gio.FileIcon({ file: file });
|
||||||
this._iconBox.child = textureCache.load_uri_async(uri, this._iconBox._size, this._iconBox._size);
|
|
||||||
} else {
|
} else {
|
||||||
this._iconBox.child = new St.Icon({ icon_name: 'avatar-default',
|
return new Gio.ThemedIcon({ name: 'avatar-default' });
|
||||||
icon_size: this._iconBox._size });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._iconBox;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
createSecondaryIcon: function() {
|
getSecondaryIcon: function() {
|
||||||
let iconBox = new St.Bin();
|
let iconName;
|
||||||
iconBox.child = new St.Icon({ style_class: 'secondary-icon' });
|
|
||||||
let presenceType = this._contact.get_presence_type();
|
let presenceType = this._contact.get_presence_type();
|
||||||
|
|
||||||
switch (presenceType) {
|
switch (presenceType) {
|
||||||
case Tp.ConnectionPresenceType.AVAILABLE:
|
case Tp.ConnectionPresenceType.AVAILABLE:
|
||||||
iconBox.child.icon_name = 'user-available';
|
iconName = 'user-available';
|
||||||
break;
|
break;
|
||||||
case Tp.ConnectionPresenceType.BUSY:
|
case Tp.ConnectionPresenceType.BUSY:
|
||||||
iconBox.child.icon_name = 'user-busy';
|
iconName = 'user-busy';
|
||||||
break;
|
break;
|
||||||
case Tp.ConnectionPresenceType.OFFLINE:
|
case Tp.ConnectionPresenceType.OFFLINE:
|
||||||
iconBox.child.icon_name = 'user-offline';
|
iconName = 'user-offline';
|
||||||
break;
|
break;
|
||||||
case Tp.ConnectionPresenceType.HIDDEN:
|
case Tp.ConnectionPresenceType.HIDDEN:
|
||||||
iconBox.child.icon_name = 'user-invisible';
|
iconName = 'user-invisible';
|
||||||
break;
|
break;
|
||||||
case Tp.ConnectionPresenceType.AWAY:
|
case Tp.ConnectionPresenceType.AWAY:
|
||||||
iconBox.child.icon_name = 'user-away';
|
iconName = 'user-away';
|
||||||
break;
|
break;
|
||||||
case Tp.ConnectionPresenceType.EXTENDED_AWAY:
|
case Tp.ConnectionPresenceType.EXTENDED_AWAY:
|
||||||
iconBox.child.icon_name = 'user-idle';
|
iconName = 'user-idle';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
iconBox.child.icon_name = 'user-offline';
|
iconName = 'user-offline';
|
||||||
}
|
}
|
||||||
return iconBox;
|
return new Gio.ThemedIcon({ name: iconName });
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateAvatarIcon: function() {
|
_updateAvatarIcon: function() {
|
||||||
@@ -564,7 +541,9 @@ const ChatSource = new Lang.Class({
|
|||||||
open: function(notification) {
|
open: function(notification) {
|
||||||
if (this._client.is_handling_channel(this._channel)) {
|
if (this._client.is_handling_channel(this._channel)) {
|
||||||
// We are handling the channel, try to pass it to Empathy
|
// We are handling the channel, try to pass it to Empathy
|
||||||
this._client.delegate_channels_async([this._channel], global.get_current_time(), '', null);
|
this._client.delegate_channels_async([this._channel],
|
||||||
|
global.get_current_time(),
|
||||||
|
'org.freedesktop.Telepathy.Client.Empathy.Chat', null);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// We are not the handler, just ask to present the channel
|
// We are not the handler, just ask to present the channel
|
||||||
@@ -733,7 +712,7 @@ const ChatSource = new Lang.Class({
|
|||||||
|
|
||||||
title = GLib.markup_escape_text(this.title, -1);
|
title = GLib.markup_escape_text(this.title, -1);
|
||||||
|
|
||||||
this._notification.update(this._notification.title, null, { customContent: true, secondaryIcon: this.createSecondaryIcon() });
|
this._notification.update(this._notification.title, null, { customContent: true, secondaryGIcon: this.getSecondaryIcon() });
|
||||||
|
|
||||||
if (message)
|
if (message)
|
||||||
msg += ' <i>(' + GLib.markup_escape_text(message, -1) + ')</i>';
|
msg += ' <i>(' + GLib.markup_escape_text(message, -1) + ')</i>';
|
||||||
@@ -751,8 +730,7 @@ const ChatSource = new Lang.Class({
|
|||||||
_ackMessages: function() {
|
_ackMessages: function() {
|
||||||
// Don't clear our messages here, tp-glib will send a
|
// Don't clear our messages here, tp-glib will send a
|
||||||
// 'pending-message-removed' for each one.
|
// 'pending-message-removed' for each one.
|
||||||
this._channel.ack_all_pending_messages_async(Lang.bind(this, function(src, result) {
|
this._channel.ack_all_pending_messages_async(null);
|
||||||
this._channel.ack_all_pending_messages_finish(result);}));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -761,7 +739,7 @@ const ChatNotification = new Lang.Class({
|
|||||||
Extends: MessageTray.Notification,
|
Extends: MessageTray.Notification,
|
||||||
|
|
||||||
_init: function(source) {
|
_init: function(source) {
|
||||||
this.parent(source, source.title, null, { customContent: true, secondaryIcon: source.createSecondaryIcon() });
|
this.parent(source, source.title, null, { customContent: true, secondaryGIcon: source.getSecondaryIcon() });
|
||||||
this.setResident(true);
|
this.setResident(true);
|
||||||
|
|
||||||
this._responseEntry = new St.Entry({ style_class: 'chat-response',
|
this._responseEntry = new St.Entry({ style_class: 'chat-response',
|
||||||
@@ -778,16 +756,19 @@ const ChatNotification = new Lang.Class({
|
|||||||
this.emit('unfocused');
|
this.emit('unfocused');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._oldMaxScrollAdjustment = 0;
|
|
||||||
this._createScrollArea();
|
this._createScrollArea();
|
||||||
this._lastGroup = null;
|
this._lastGroup = null;
|
||||||
this._lastGroupActor = null;
|
this._lastGroupActor = null;
|
||||||
|
|
||||||
|
// Keep track of the bottom position for the current adjustment and
|
||||||
|
// force a scroll to the bottom if things change while we were at the
|
||||||
|
// bottom
|
||||||
|
this._oldMaxScrollValue = this._scrollArea.vscroll.adjustment.value;
|
||||||
|
this._scrollArea.add_style_class_name('chat-notification-scrollview');
|
||||||
this._scrollArea.vscroll.adjustment.connect('changed', Lang.bind(this, function(adjustment) {
|
this._scrollArea.vscroll.adjustment.connect('changed', Lang.bind(this, function(adjustment) {
|
||||||
let currentValue = adjustment.value + adjustment.page_size;
|
if (adjustment.value == this._oldMaxScrollValue)
|
||||||
if (currentValue == this._oldMaxScrollAdjustment)
|
|
||||||
this.scrollTo(St.Side.BOTTOM);
|
this.scrollTo(St.Side.BOTTOM);
|
||||||
this._oldMaxScrollAdjustment = adjustment.upper;
|
this._oldMaxScrollValue = Math.max(adjustment.lower, adjustment.upper - adjustment.page_size);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._inputHistory = new History.HistoryManager({ entry: this._responseEntry.clutter_text });
|
this._inputHistory = new History.HistoryManager({ entry: this._responseEntry.clutter_text });
|
||||||
@@ -939,24 +920,30 @@ const ChatNotification = new Lang.Class({
|
|||||||
|
|
||||||
let format;
|
let format;
|
||||||
|
|
||||||
// Show a week day and time if date is in the last week
|
// Show only the hour if date is on today
|
||||||
if (daysAgo < 1 || (daysAgo < 7 && now.getDay() != date.getDay())) {
|
if(daysAgo < 1){
|
||||||
/* Translators: this is a time format string followed by a date.
|
format = "<b>%H:%M</b>";
|
||||||
If applicable, replace %X with a strftime format valid for your
|
}
|
||||||
locale, without seconds. */
|
// Show the word "Yesterday" and time if date is on yesterday
|
||||||
|
else if(daysAgo <2){
|
||||||
|
/* Translators: this is the word "Yesterday" followed by a time string. i.e. "Yesterday, 14:30"*/
|
||||||
// xgettext:no-c-format
|
// xgettext:no-c-format
|
||||||
format = _("Sent at <b>%X</b> on <b>%A</b>");
|
format = _("<b>Yesterday</b>, <b>%H:%M</b>");
|
||||||
|
}
|
||||||
|
// Show a week day and time if date is in the last week
|
||||||
|
else if (daysAgo < 7) {
|
||||||
|
/* Translators: this is the week day name followed by a time string. i.e. "Monday, 14:30*/
|
||||||
|
// xgettext:no-c-format
|
||||||
|
format = _("<b>%A</b>, <b>%H:%M</b>");
|
||||||
|
|
||||||
} else if (date.getYear() == now.getYear()) {
|
} else if (date.getYear() == now.getYear()) {
|
||||||
/* Translators: this is a time format in the style of "Wednesday, May 25",
|
/* Translators: this is the month name and day number followed by a time string. i.e. "May 25, 14:30"*/
|
||||||
shown when you get a chat message in the same year. */
|
|
||||||
// xgettext:no-c-format
|
// xgettext:no-c-format
|
||||||
format = _("Sent on <b>%A</b>, <b>%B %d</b>");
|
format = _("<b>%B</b> <b>%d</b>, <b>%H:%M</b>");
|
||||||
} else {
|
} else {
|
||||||
/* Translators: this is a time format in the style of "Wednesday, May 25, 2012",
|
/* Translators: this is the month name, day number, year number followed by a time string. i.e. "May 25 2012, 14:30"*/
|
||||||
shown when you get a chat message in a different year. */
|
|
||||||
// xgettext:no-c-format
|
// xgettext:no-c-format
|
||||||
format = _("Sent on <b>%A</b>, <b>%B %d</b>, %Y");
|
format = _("<b>%B</b> <b>%d</b> <b>%Y</b>, <b>%H:%M</b> ");
|
||||||
}
|
}
|
||||||
|
|
||||||
return date.toLocaleFormat(format);
|
return date.toLocaleFormat(format);
|
||||||
@@ -969,8 +956,7 @@ const ChatNotification = new Lang.Class({
|
|||||||
let timeLabel = this._append({ body: this._formatTimestamp(lastMessageDate),
|
let timeLabel = this._append({ body: this._formatTimestamp(lastMessageDate),
|
||||||
group: 'meta',
|
group: 'meta',
|
||||||
styles: ['chat-meta-message'],
|
styles: ['chat-meta-message'],
|
||||||
childProps: { expand: true, x_fill: false,
|
childProps: { expand: true, x_fill: false },
|
||||||
x_align: St.Align.END },
|
|
||||||
noTimestamp: true,
|
noTimestamp: true,
|
||||||
timestamp: lastMessageTime });
|
timestamp: lastMessageTime });
|
||||||
|
|
||||||
@@ -1071,9 +1057,8 @@ const ApproverSource = new Lang.Class({
|
|||||||
this.parent();
|
this.parent();
|
||||||
},
|
},
|
||||||
|
|
||||||
createIcon: function(size) {
|
getIcon: function() {
|
||||||
return new St.Icon({ gicon: this._gicon,
|
return this._gicon;
|
||||||
icon_size: size });
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1134,7 +1119,7 @@ const AudioVideoNotification = new Lang.Class({
|
|||||||
this.parent(source, title, null, { customContent: true });
|
this.parent(source, title, null, { customContent: true });
|
||||||
this.setResident(true);
|
this.setResident(true);
|
||||||
|
|
||||||
this.addButton('reject', _("Reject"));
|
this.addButton('reject', _("Decline"));
|
||||||
/* translators: this is a button label (verb), not a noun */
|
/* translators: this is a button label (verb), not a noun */
|
||||||
this.addButton('answer', _("Answer"));
|
this.addButton('answer', _("Answer"));
|
||||||
|
|
||||||
@@ -1351,26 +1336,16 @@ const AccountNotification = new Lang.Class({
|
|||||||
this.parent(source,
|
this.parent(source,
|
||||||
/* translators: argument is the account name, like
|
/* translators: argument is the account name, like
|
||||||
* name@jabber.org for example. */
|
* name@jabber.org for example. */
|
||||||
_("Connection to %s failed").format(account.get_display_name()),
|
_("Unable to connect to %s").format(account.get_display_name()),
|
||||||
null, { customContent: true });
|
this._getMessage(connectionError));
|
||||||
|
|
||||||
this._label = new St.Label();
|
|
||||||
this.addActor(this._label);
|
|
||||||
this._updateMessage(connectionError);
|
|
||||||
|
|
||||||
this._account = account;
|
this._account = account;
|
||||||
|
|
||||||
this.addButton('reconnect', _("Reconnect"));
|
this.addButton('view', _("View account"));
|
||||||
this.addButton('edit', _("Edit account"));
|
|
||||||
|
|
||||||
this.connect('action-invoked', Lang.bind(this, function(self, action) {
|
this.connect('action-invoked', Lang.bind(this, function(self, action) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'reconnect':
|
case 'view':
|
||||||
// If it fails again, a new notification should pop up with the
|
|
||||||
// new error.
|
|
||||||
account.reconnect_async(null);
|
|
||||||
break;
|
|
||||||
case 'edit':
|
|
||||||
let cmd = '/usr/bin/empathy-accounts'
|
let cmd = '/usr/bin/empathy-accounts'
|
||||||
+ ' --select-account=%s'
|
+ ' --select-account=%s'
|
||||||
.format(account.get_path_suffix());
|
.format(account.get_path_suffix());
|
||||||
@@ -1396,19 +1371,19 @@ const AccountNotification = new Lang.Class({
|
|||||||
if (status == Tp.ConnectionStatus.CONNECTED) {
|
if (status == Tp.ConnectionStatus.CONNECTED) {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
} else if (status == Tp.ConnectionStatus.DISCONNECTED) {
|
} else if (status == Tp.ConnectionStatus.DISCONNECTED) {
|
||||||
this._updateMessage(account.connection_error);
|
this.update(this.title, this._getMessage(account.connection_error));
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateMessage: function(connectionError) {
|
_getMessage: function(connectionError) {
|
||||||
let message;
|
let message;
|
||||||
if (connectionError in _connectionErrorMessages) {
|
if (connectionError in _connectionErrorMessages) {
|
||||||
message = _connectionErrorMessages[connectionError];
|
message = _connectionErrorMessages[connectionError];
|
||||||
} else {
|
} else {
|
||||||
message = _("Unknown reason");
|
message = _("Unknown reason");
|
||||||
}
|
}
|
||||||
this._label.set_text(message);
|
return message;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gdk = imports.gi.Gdk;
|
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
const AltTab = imports.ui.altTab;
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
const SwitcherPopup = imports.ui.switcherPopup;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
@@ -27,6 +26,9 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._items = [];
|
this._items = [];
|
||||||
|
this.addGroup(global.window_group, _("Windows"),
|
||||||
|
'emblem-documents-symbolic', { sortGroup: SortGroup.TOP,
|
||||||
|
focusCallback: Lang.bind(this, this._focusWindows) });
|
||||||
},
|
},
|
||||||
|
|
||||||
addGroup: function(root, name, icon, params) {
|
addGroup: function(root, name, icon, params) {
|
||||||
@@ -40,11 +42,13 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
|
|
||||||
this._items.push(item);
|
this._items.push(item);
|
||||||
root.connect('destroy', Lang.bind(this, function() { this.removeGroup(root); }));
|
root.connect('destroy', Lang.bind(this, function() { this.removeGroup(root); }));
|
||||||
global.focus_manager.add_group(root);
|
if (root instanceof St.Widget)
|
||||||
|
global.focus_manager.add_group(root);
|
||||||
},
|
},
|
||||||
|
|
||||||
removeGroup: function(root) {
|
removeGroup: function(root) {
|
||||||
global.focus_manager.remove_group(root);
|
if (root instanceof St.Widget)
|
||||||
|
global.focus_manager.remove_group(root);
|
||||||
for (let i = 0; i < this._items.length; i++) {
|
for (let i = 0; i < this._items.length; i++) {
|
||||||
if (this._items[i].root == root) {
|
if (this._items[i].root == root) {
|
||||||
this._items.splice(i, 1);
|
this._items.splice(i, 1);
|
||||||
@@ -53,17 +57,16 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
focusGroup: function(item) {
|
focusGroup: function(item, timestamp) {
|
||||||
if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE ||
|
if (item.focusCallback) {
|
||||||
global.stage_input_mode == Shell.StageInputMode.NORMAL)
|
item.focusCallback(timestamp);
|
||||||
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
} else {
|
||||||
|
if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE ||
|
||||||
|
global.stage_input_mode == Shell.StageInputMode.NORMAL)
|
||||||
|
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
||||||
|
|
||||||
if (item.window)
|
|
||||||
Main.activateWindow(item.window);
|
|
||||||
else if (item.focusCallback)
|
|
||||||
item.focusCallback();
|
|
||||||
else
|
|
||||||
item.root.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
item.root.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Sort the items into a consistent order; panel first, tray last,
|
// Sort the items into a consistent order; panel first, tray last,
|
||||||
@@ -74,24 +77,14 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
if (a.sortGroup != b.sortGroup)
|
if (a.sortGroup != b.sortGroup)
|
||||||
return a.sortGroup - b.sortGroup;
|
return a.sortGroup - b.sortGroup;
|
||||||
|
|
||||||
let y;
|
let ax, bx, y;
|
||||||
if (a.x == undefined) {
|
[ax, y] = a.proxy.get_transformed_position();
|
||||||
if (a.window)
|
[bx, y] = b.proxy.get_transformed_position();
|
||||||
a.x = a.window.get_compositor_private().x;
|
|
||||||
else
|
|
||||||
[a.x, y] = a.proxy.get_transformed_position();
|
|
||||||
}
|
|
||||||
if (b.x == undefined) {
|
|
||||||
if (b.window)
|
|
||||||
b.x = b.window.get_compositor_private().x;
|
|
||||||
else
|
|
||||||
[b.x, y] = b.proxy.get_transformed_position();
|
|
||||||
}
|
|
||||||
|
|
||||||
return a.x - b.x;
|
return ax - bx;
|
||||||
},
|
},
|
||||||
|
|
||||||
popup: function(backwards, mask) {
|
popup: function(backward, binding, mask) {
|
||||||
// Start with the set of focus groups that are currently mapped
|
// Start with the set of focus groups that are currently mapped
|
||||||
let items = this._items.filter(function (item) { return item.proxy.mapped; });
|
let items = this._items.filter(function (item) { return item.proxy.mapped; });
|
||||||
|
|
||||||
@@ -109,8 +102,7 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
icon = app.create_icon_texture(POPUP_APPICON_SIZE);
|
icon = app.create_icon_texture(POPUP_APPICON_SIZE);
|
||||||
else
|
else
|
||||||
icon = textureCache.bind_pixbuf_property(windows[i], 'icon');
|
icon = textureCache.bind_pixbuf_property(windows[i], 'icon');
|
||||||
items.push({ window: windows[i],
|
items.push({ name: windows[i].title,
|
||||||
name: windows[i].title,
|
|
||||||
iconActor: icon,
|
iconActor: icon,
|
||||||
sortGroup: SortGroup.MIDDLE });
|
sortGroup: SortGroup.MIDDLE });
|
||||||
}
|
}
|
||||||
@@ -122,187 +114,63 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
items.sort(Lang.bind(this, this._sortItems));
|
items.sort(Lang.bind(this, this._sortItems));
|
||||||
|
|
||||||
if (!this._popup) {
|
if (!this._popup) {
|
||||||
this._popup = new CtrlAltTabPopup();
|
this._popup = new CtrlAltTabPopup(items);
|
||||||
this._popup.show(items, backwards, mask);
|
this._popup.show(backward, binding, mask);
|
||||||
|
|
||||||
this._popup.actor.connect('destroy',
|
this._popup.actor.connect('destroy',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this._popup = null;
|
this._popup = null;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_focusWindows: function(timestamp) {
|
||||||
|
global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
|
||||||
|
global.stage.key_focus = null;
|
||||||
|
global.screen.focus_default_window(timestamp);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function mod(a, b) {
|
|
||||||
return (a + b) % b;
|
|
||||||
}
|
|
||||||
|
|
||||||
const CtrlAltTabPopup = new Lang.Class({
|
const CtrlAltTabPopup = new Lang.Class({
|
||||||
Name: 'CtrlAltTabPopup',
|
Name: 'CtrlAltTabPopup',
|
||||||
|
Extends: SwitcherPopup.SwitcherPopup,
|
||||||
|
|
||||||
_init : function() {
|
_createSwitcher: function() {
|
||||||
this.actor = new Shell.GenericContainer({ name: 'ctrlAltTabPopup',
|
this._switcherList = new CtrlAltTabSwitcher(this._items);
|
||||||
reactive: true });
|
return true;
|
||||||
|
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
|
||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
|
||||||
|
|
||||||
this._haveModal = false;
|
|
||||||
this._modifierMask = 0;
|
|
||||||
this._selection = 0;
|
|
||||||
|
|
||||||
Main.uiGroup.add_actor(this.actor);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_getPreferredWidth: function (actor, forHeight, alloc) {
|
_initialSelection: function(backward, binding) {
|
||||||
let primary = Main.layoutManager.primaryMonitor;
|
if (binding == 'switch-panels') {
|
||||||
|
if (backward)
|
||||||
alloc.min_size = primary.width;
|
this._selectedIndex = this._items.length - 1;
|
||||||
alloc.natural_size = primary.width;
|
} else if (binding == 'switch-panels-backward') {
|
||||||
},
|
if (!backward)
|
||||||
|
this._selectedIndex = this._items.length - 1;
|
||||||
_getPreferredHeight: function (actor, forWidth, alloc) {
|
|
||||||
let primary = Main.layoutManager.primaryMonitor;
|
|
||||||
|
|
||||||
alloc.min_size = primary.height;
|
|
||||||
alloc.natural_size = primary.height;
|
|
||||||
},
|
|
||||||
|
|
||||||
_allocate: function (actor, box, flags) {
|
|
||||||
let childBox = new Clutter.ActorBox();
|
|
||||||
let primary = Main.layoutManager.primaryMonitor;
|
|
||||||
|
|
||||||
let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT);
|
|
||||||
let vPadding = this.actor.get_theme_node().get_vertical_padding();
|
|
||||||
let hPadding = this.actor.get_theme_node().get_horizontal_padding();
|
|
||||||
|
|
||||||
let [childMinHeight, childNaturalHeight] = this._switcher.actor.get_preferred_height(primary.width - hPadding);
|
|
||||||
let [childMinWidth, childNaturalWidth] = this._switcher.actor.get_preferred_width(childNaturalHeight);
|
|
||||||
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
|
|
||||||
childBox.x2 = Math.min(primary.x + primary.width - hPadding, childBox.x1 + childNaturalWidth);
|
|
||||||
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
|
|
||||||
childBox.y2 = childBox.y1 + childNaturalHeight;
|
|
||||||
this._switcher.actor.allocate(childBox, flags);
|
|
||||||
},
|
|
||||||
|
|
||||||
show : function(items, startBackwards, mask) {
|
|
||||||
if (!Main.pushModal(this.actor))
|
|
||||||
return false;
|
|
||||||
this._haveModal = true;
|
|
||||||
this._modifierMask = AltTab.primaryModifier(mask);
|
|
||||||
|
|
||||||
this._keyPressEventId = this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent));
|
|
||||||
this._keyReleaseEventId = this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent));
|
|
||||||
|
|
||||||
this._items = items;
|
|
||||||
this._switcher = new CtrlAltTabSwitcher(items);
|
|
||||||
this.actor.add_actor(this._switcher.actor);
|
|
||||||
|
|
||||||
if (startBackwards)
|
|
||||||
this._selection = this._items.length - 1;
|
|
||||||
this._select(this._selection);
|
|
||||||
|
|
||||||
let [x, y, mods] = global.get_pointer();
|
|
||||||
if (!(mods & this._modifierMask)) {
|
|
||||||
this._finish();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
this._select(this._selectedIndex);
|
||||||
this.actor.opacity = 0;
|
|
||||||
this.actor.show();
|
|
||||||
Tweener.addTween(this.actor,
|
|
||||||
{ opacity: 255,
|
|
||||||
time: POPUP_FADE_TIME,
|
|
||||||
transition: 'easeOutQuad'
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_next : function() {
|
_keyPressHandler: function(keysym, backwards, action) {
|
||||||
return mod(this._selection + 1, this._items.length);
|
if (action == Meta.KeyBindingAction.SWITCH_PANELS)
|
||||||
},
|
this._select(backwards ? this._previous() : this._next());
|
||||||
|
else if (action == Meta.KeyBindingAction.SWITCH_PANELS_BACKWARD)
|
||||||
_previous : function() {
|
this._select(backwards ? this._next() : this._previous());
|
||||||
return mod(this._selection - 1, this._items.length);
|
else if (keysym == Clutter.Left)
|
||||||
},
|
|
||||||
|
|
||||||
_keyPressEvent : function(actor, event) {
|
|
||||||
let keysym = event.get_key_symbol();
|
|
||||||
let shift = (event.get_state() & Clutter.ModifierType.SHIFT_MASK);
|
|
||||||
if (shift && keysym == Clutter.KEY_Tab)
|
|
||||||
keysym = Clutter.ISO_Left_Tab;
|
|
||||||
|
|
||||||
if (keysym == Clutter.KEY_Escape)
|
|
||||||
this.destroy();
|
|
||||||
else if (keysym == Clutter.KEY_Tab)
|
|
||||||
this._select(this._next());
|
|
||||||
else if (keysym == Clutter.KEY_ISO_Left_Tab)
|
|
||||||
this._select(this._previous());
|
this._select(this._previous());
|
||||||
else if (keysym == Clutter.KEY_Left)
|
else if (keysym == Clutter.Right)
|
||||||
this._select(this._previous());
|
|
||||||
else if (keysym == Clutter.KEY_Right)
|
|
||||||
this._select(this._next());
|
this._select(this._next());
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_keyReleaseEvent : function(actor, event) {
|
_finish : function(time) {
|
||||||
let [x, y, mods] = global.get_pointer();
|
this.parent(time);
|
||||||
let state = mods & this._modifierMask;
|
Main.ctrlAltTabManager.focusGroup(this._items[this._selectedIndex], time);
|
||||||
|
|
||||||
if (state == 0)
|
|
||||||
this._finish();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_finish : function() {
|
|
||||||
this.destroy();
|
|
||||||
|
|
||||||
Main.ctrlAltTabManager.focusGroup(this._items[this._selection]);
|
|
||||||
},
|
|
||||||
|
|
||||||
_popModal: function() {
|
|
||||||
if (this._haveModal) {
|
|
||||||
Main.popModal(this.actor);
|
|
||||||
this._haveModal = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
destroy : function() {
|
|
||||||
this._popModal();
|
|
||||||
Tweener.addTween(this.actor,
|
|
||||||
{ opacity: 0,
|
|
||||||
time: POPUP_FADE_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: Lang.bind(this,
|
|
||||||
function() {
|
|
||||||
this.actor.destroy();
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_onDestroy : function() {
|
|
||||||
this._popModal();
|
|
||||||
if (this._keyPressEventId)
|
|
||||||
this.actor.disconnect(this._keyPressEventId);
|
|
||||||
if (this._keyReleaseEventId)
|
|
||||||
this.actor.disconnect(this._keyReleaseEventId);
|
|
||||||
},
|
|
||||||
|
|
||||||
_select : function(num) {
|
|
||||||
this._selection = num;
|
|
||||||
this._switcher.highlight(num);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const CtrlAltTabSwitcher = new Lang.Class({
|
const CtrlAltTabSwitcher = new Lang.Class({
|
||||||
Name: 'CtrlAltTabSwitcher',
|
Name: 'CtrlAltTabSwitcher',
|
||||||
Extends: AltTab.SwitcherList,
|
Extends: SwitcherPopup.SwitcherList,
|
||||||
|
|
||||||
_init : function(items) {
|
_init : function(items) {
|
||||||
this.parent(true);
|
this.parent(true);
|
||||||
|
|||||||
181
js/ui/dash.js
181
js/ui/dash.js
@@ -21,6 +21,17 @@ const DASH_ITEM_LABEL_SHOW_TIME = 0.15;
|
|||||||
const DASH_ITEM_LABEL_HIDE_TIME = 0.1;
|
const DASH_ITEM_LABEL_HIDE_TIME = 0.1;
|
||||||
const DASH_ITEM_HOVER_TIMEOUT = 300;
|
const DASH_ITEM_HOVER_TIMEOUT = 300;
|
||||||
|
|
||||||
|
function getAppFromSource(source) {
|
||||||
|
if (source instanceof AppDisplay.AppWellIcon) {
|
||||||
|
return source.app;
|
||||||
|
} else if (source.metaWindow) {
|
||||||
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
|
return tracker.get_window_app(source.metaWindow);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// A container like StBin, but taking the child's scale into account
|
// A container like StBin, but taking the child's scale into account
|
||||||
// when requesting a size
|
// when requesting a size
|
||||||
const DashItemContainer = new Lang.Class({
|
const DashItemContainer = new Lang.Class({
|
||||||
@@ -36,7 +47,11 @@ const DashItemContainer = new Lang.Class({
|
|||||||
Lang.bind(this, this._allocate));
|
Lang.bind(this, this._allocate));
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
|
||||||
this.label = null;
|
this._labelText = "";
|
||||||
|
this.label = new St.Label({ style_class: 'dash-label'});
|
||||||
|
this.label.hide();
|
||||||
|
Main.layoutManager.addChrome(this.label);
|
||||||
|
this.actor.label_actor = this.label;
|
||||||
|
|
||||||
this.child = null;
|
this.child = null;
|
||||||
this._childScale = 1;
|
this._childScale = 1;
|
||||||
@@ -91,9 +106,10 @@ const DashItemContainer = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
showLabel: function() {
|
showLabel: function() {
|
||||||
if (this.label == null)
|
if (!this._labelText)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this.label.set_text(this._labelText);
|
||||||
this.label.opacity = 0;
|
this.label.opacity = 0;
|
||||||
this.label.show();
|
this.label.show();
|
||||||
|
|
||||||
@@ -124,19 +140,11 @@ const DashItemContainer = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setLabelText: function(text) {
|
setLabelText: function(text) {
|
||||||
if (this.label == null) {
|
this._labelText = text;
|
||||||
this.label = new St.Label({ style_class: 'dash-label'});
|
this.child.accessible_name = text;
|
||||||
Main.layoutManager.addChrome(this.label);
|
|
||||||
this.label.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.label.set_text(text);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
hideLabel: function () {
|
hideLabel: function () {
|
||||||
if (this.label == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Tweener.addTween(this.label,
|
Tweener.addTween(this.label,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: DASH_ITEM_LABEL_HIDE_TIME,
|
time: DASH_ITEM_LABEL_HIDE_TIME,
|
||||||
@@ -250,8 +258,7 @@ const ShowAppsIcon = new Lang.Class({
|
|||||||
this.toggleButton._delegate = this;
|
this.toggleButton._delegate = this;
|
||||||
|
|
||||||
this.setChild(this.toggleButton);
|
this.setChild(this.toggleButton);
|
||||||
this.setHover(false);
|
this.setDragApp(null);
|
||||||
this.toggleButton.label_actor = this.label;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_createIcon: function(size) {
|
_createIcon: function(size) {
|
||||||
@@ -262,31 +269,45 @@ const ShowAppsIcon = new Lang.Class({
|
|||||||
return this._iconActor;
|
return this._iconActor;
|
||||||
},
|
},
|
||||||
|
|
||||||
setHover: function(hovered) {
|
_canRemoveApp: function(app) {
|
||||||
this.toggleButton.set_hover(hovered);
|
if (app == null)
|
||||||
if (this._iconActor)
|
return false;
|
||||||
this._iconActor.set_hover(hovered);
|
|
||||||
|
|
||||||
if (hovered)
|
let id = app.get_id();
|
||||||
|
let isFavorite = AppFavorites.getAppFavorites().isFavorite(id);
|
||||||
|
return isFavorite;
|
||||||
|
},
|
||||||
|
|
||||||
|
setDragApp: function(app) {
|
||||||
|
let canRemove = this._canRemoveApp(app);
|
||||||
|
|
||||||
|
this.toggleButton.set_hover(canRemove);
|
||||||
|
if (this._iconActor)
|
||||||
|
this._iconActor.set_hover(canRemove);
|
||||||
|
|
||||||
|
if (canRemove)
|
||||||
this.setLabelText(_("Remove from Favorites"));
|
this.setLabelText(_("Remove from Favorites"));
|
||||||
else
|
else
|
||||||
this.setLabelText(_("Show Applications"));
|
this.setLabelText(_("Show Applications"));
|
||||||
},
|
},
|
||||||
|
|
||||||
// Rely on the dragged item being a favorite
|
|
||||||
handleDragOver: function(source, actor, x, y, time) {
|
handleDragOver: function(source, actor, x, y, time) {
|
||||||
|
let app = getAppFromSource(source);
|
||||||
|
if (app == null)
|
||||||
|
return DND.DragMotionResult.NO_DROP;
|
||||||
|
|
||||||
|
let id = app.get_id();
|
||||||
|
let isFavorite = AppFavorites.getAppFavorites().isFavorite(id);
|
||||||
|
if (!isFavorite)
|
||||||
|
return DND.DragMotionResult.NO_DROP;
|
||||||
|
|
||||||
return DND.DragMotionResult.MOVE_DROP;
|
return DND.DragMotionResult.MOVE_DROP;
|
||||||
},
|
},
|
||||||
|
|
||||||
acceptDrop: function(source, actor, x, y, time) {
|
acceptDrop: function(source, actor, x, y, time) {
|
||||||
let app = null;
|
let app = getAppFromSource(source);
|
||||||
if (source instanceof AppDisplay.AppWellIcon) {
|
if (app == null)
|
||||||
let appSystem = Shell.AppSystem.get_default();
|
return false;
|
||||||
app = appSystem.lookup_app(source.getId());
|
|
||||||
} else if (source.metaWindow) {
|
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
|
||||||
app = tracker.get_window_app(source.metaWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
let id = app.get_id();
|
let id = app.get_id();
|
||||||
|
|
||||||
@@ -324,22 +345,21 @@ const DashActor = new Lang.Class({
|
|||||||
vfunc_allocate: function(box, flags) {
|
vfunc_allocate: function(box, flags) {
|
||||||
let contentBox = this.get_theme_node().get_content_box(box);
|
let contentBox = this.get_theme_node().get_content_box(box);
|
||||||
let availWidth = contentBox.x2 - contentBox.x1;
|
let availWidth = contentBox.x2 - contentBox.x1;
|
||||||
let availHeight = contentBox.y2 - contentBox.y1;
|
|
||||||
|
|
||||||
this.set_allocation(box, flags);
|
this.set_allocation(box, flags);
|
||||||
|
|
||||||
let [appIcons, showAppsButton] = this.get_children();
|
let [appIcons, showAppsButton] = this.get_children();
|
||||||
let [minHeight, natHeight] = showAppsButton.get_preferred_height(availWidth);
|
let [showAppsMinHeight, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth);
|
||||||
|
|
||||||
let childBox = new Clutter.ActorBox();
|
let childBox = new Clutter.ActorBox();
|
||||||
childBox.x1 = 0;
|
childBox.x1 = contentBox.x1;
|
||||||
childBox.x2 = availWidth;
|
childBox.y1 = contentBox.y1;
|
||||||
childBox.y1 = 0;
|
childBox.x2 = contentBox.x2;
|
||||||
childBox.y2 = availHeight - natHeight;
|
childBox.y2 = contentBox.y2 - showAppsNatHeight;
|
||||||
appIcons.allocate(childBox, flags);
|
appIcons.allocate(childBox, flags);
|
||||||
|
|
||||||
childBox.y1 = availHeight - natHeight;
|
childBox.y1 = contentBox.y2 - showAppsNatHeight;
|
||||||
childBox.y2 = availHeight;
|
childBox.y2 = contentBox.y2;
|
||||||
showAppsButton.allocate(childBox, flags);
|
showAppsButton.allocate(childBox, flags);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -383,7 +403,6 @@ const Dash = new Lang.Class({
|
|||||||
|
|
||||||
this._workId = Main.initializeDeferredWork(this._box, Lang.bind(this, this._redisplay));
|
this._workId = Main.initializeDeferredWork(this._box, Lang.bind(this, this._redisplay));
|
||||||
|
|
||||||
this._tracker = Shell.WindowTracker.get_default();
|
|
||||||
this._appSystem = Shell.AppSystem.get_default();
|
this._appSystem = Shell.AppSystem.get_default();
|
||||||
|
|
||||||
this._appSystem.connect('installed-changed', Lang.bind(this, this._queueRedisplay));
|
this._appSystem.connect('installed-changed', Lang.bind(this, this._queueRedisplay));
|
||||||
@@ -426,31 +445,25 @@ const Dash = new Lang.Class({
|
|||||||
|
|
||||||
_endDrag: function() {
|
_endDrag: function() {
|
||||||
this._clearDragPlaceholder();
|
this._clearDragPlaceholder();
|
||||||
|
this._showAppsIcon.setDragApp(null);
|
||||||
DND.removeDragMonitor(this._dragMonitor);
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDragMotion: function(dragEvent) {
|
_onDragMotion: function(dragEvent) {
|
||||||
let app = null;
|
let app = getAppFromSource(dragEvent.source);
|
||||||
if (dragEvent.source instanceof AppDisplay.AppWellIcon)
|
if (app == null)
|
||||||
app = this._appSystem.lookup_app(dragEvent.source.getId());
|
|
||||||
else if (dragEvent.source.metaWindow)
|
|
||||||
app = this._tracker.get_window_app(dragEvent.source.metaWindow);
|
|
||||||
else
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
|
|
||||||
let id = app.get_id();
|
|
||||||
|
|
||||||
let favorites = AppFavorites.getAppFavorites().getFavoriteMap();
|
|
||||||
|
|
||||||
let srcIsFavorite = (id in favorites);
|
|
||||||
|
|
||||||
let showAppsHovered =
|
let showAppsHovered =
|
||||||
this._showAppsIcon.actor.contains(dragEvent.targetActor);
|
this._showAppsIcon.actor.contains(dragEvent.targetActor);
|
||||||
|
|
||||||
if (!this._box.contains(dragEvent.targetActor) || showAppsHovered)
|
if (!this._box.contains(dragEvent.targetActor) || showAppsHovered)
|
||||||
this._clearDragPlaceholder();
|
this._clearDragPlaceholder();
|
||||||
|
|
||||||
this._showAppsIcon.setHover(showAppsHovered);
|
if (showAppsHovered)
|
||||||
|
this._showAppsIcon.setDragApp(app);
|
||||||
|
else
|
||||||
|
this._showAppsIcon.setDragApp(null);
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
@@ -478,32 +491,51 @@ const Dash = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_createAppItem: function(app) {
|
_createAppItem: function(app) {
|
||||||
let display = new AppDisplay.AppWellIcon(app,
|
let appIcon = new AppDisplay.AppWellIcon(app,
|
||||||
{ setSizeManually: true,
|
{ setSizeManually: true,
|
||||||
showLabel: false });
|
showLabel: false });
|
||||||
display._draggable.connect('drag-begin',
|
appIcon._draggable.connect('drag-begin',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
display.actor.opacity = 50;
|
appIcon.actor.opacity = 50;
|
||||||
}));
|
}));
|
||||||
display._draggable.connect('drag-end',
|
appIcon._draggable.connect('drag-end',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
display.actor.opacity = 255;
|
appIcon.actor.opacity = 255;
|
||||||
}));
|
}));
|
||||||
|
appIcon.connect('menu-state-changed',
|
||||||
|
Lang.bind(this, function(appIcon, opened) {
|
||||||
|
this._itemMenuStateChanged(item, opened);
|
||||||
|
}));
|
||||||
|
|
||||||
let item = new DashItemContainer();
|
let item = new DashItemContainer();
|
||||||
item.setChild(display.actor);
|
item.setChild(appIcon.actor);
|
||||||
|
|
||||||
|
// Override default AppWellIcon label_actor, now the
|
||||||
|
// accessible_name is set at DashItemContainer.setLabelText
|
||||||
|
appIcon.actor.label_actor = null;
|
||||||
item.setLabelText(app.get_name());
|
item.setLabelText(app.get_name());
|
||||||
// Override default AppWellIcon label_actor
|
|
||||||
display.actor.label_actor = item.label;
|
appIcon.icon.setIconSize(this.iconSize);
|
||||||
display.icon.setIconSize(this.iconSize);
|
|
||||||
this._hookUpLabel(item);
|
this._hookUpLabel(item);
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_itemMenuStateChanged: function(item, opened) {
|
||||||
|
// When the menu closes, it calls sync_hover, which means
|
||||||
|
// that the notify::hover handler does everything we need to.
|
||||||
|
if (opened) {
|
||||||
|
if (this._showLabelTimeoutId > 0) {
|
||||||
|
Mainloop.source_remove(this._showLabelTimeoutId);
|
||||||
|
this._showLabelTimeoutId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
item.hideLabel();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_onHover: function (item) {
|
_onHover: function (item) {
|
||||||
if (item.child.get_hover() && !item.child._delegate.isMenuUp) {
|
if (item.child.get_hover()) {
|
||||||
if (this._showLabelTimeoutId == 0) {
|
if (this._showLabelTimeoutId == 0) {
|
||||||
let timeout = this._labelShowing ? 0 : DASH_ITEM_HOVER_TIMEOUT;
|
let timeout = this._labelShowing ? 0 : DASH_ITEM_HOVER_TIMEOUT;
|
||||||
this._showLabelTimeoutId = Mainloop.timeout_add(timeout,
|
this._showLabelTimeoutId = Mainloop.timeout_add(timeout,
|
||||||
@@ -605,8 +637,10 @@ const Dash = new Lang.Class({
|
|||||||
icon.setIconSize(this.iconSize);
|
icon.setIconSize(this.iconSize);
|
||||||
|
|
||||||
// Don't animate the icon size change when the overview
|
// Don't animate the icon size change when the overview
|
||||||
// is not visible or when initially filling the dash
|
// is transitioning, not visible or when initially filling
|
||||||
if (!Main.overview.visible || !this._shownInitially)
|
// the dash
|
||||||
|
if (!Main.overview.visible || Main.overview.animationInProgress ||
|
||||||
|
!this._shownInitially)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
let [targetWidth, targetHeight] = icon.icon.get_size();
|
let [targetWidth, targetHeight] = icon.icon.get_size();
|
||||||
@@ -730,8 +764,9 @@ const Dash = new Lang.Class({
|
|||||||
for (let i = 0; i < removedActors.length; i++) {
|
for (let i = 0; i < removedActors.length; i++) {
|
||||||
let item = removedActors[i]._delegate;
|
let item = removedActors[i]._delegate;
|
||||||
|
|
||||||
// Don't animate item removal when the overview is hidden
|
// Don't animate item removal when the overview is transitioning
|
||||||
if (Main.overview.visible)
|
// or hidden
|
||||||
|
if (Main.overview.visible && !Main.overview.animationInProgress)
|
||||||
item.animateOutAndDestroy();
|
item.animateOutAndDestroy();
|
||||||
else
|
else
|
||||||
item.destroy();
|
item.destroy();
|
||||||
@@ -746,8 +781,9 @@ const Dash = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't animate item addition when the overview is hidden
|
// Don't animate item addition when the overview is transitioning
|
||||||
if (!Main.overview.visible)
|
// or hidden
|
||||||
|
if (!Main.overview.visible || Main.overview.animationInProgress)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (let i = 0; i < addedItems.length; i++)
|
for (let i = 0; i < addedItems.length; i++)
|
||||||
@@ -763,11 +799,7 @@ const Dash = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleDragOver : function(source, actor, x, y, time) {
|
handleDragOver : function(source, actor, x, y, time) {
|
||||||
let app = null;
|
let app = getAppFromSource(source);
|
||||||
if (source instanceof AppDisplay.AppWellIcon)
|
|
||||||
app = this._appSystem.lookup_app(source.getId());
|
|
||||||
else if (source.metaWindow)
|
|
||||||
app = this._tracker.get_window_app(source.metaWindow);
|
|
||||||
|
|
||||||
// Don't allow favoriting of transient apps
|
// Don't allow favoriting of transient apps
|
||||||
if (app == null || app.is_window_backed())
|
if (app == null || app.is_window_backed())
|
||||||
@@ -848,12 +880,7 @@ const Dash = new Lang.Class({
|
|||||||
|
|
||||||
// Draggable target interface
|
// Draggable target interface
|
||||||
acceptDrop : function(source, actor, x, y, time) {
|
acceptDrop : function(source, actor, x, y, time) {
|
||||||
let app = null;
|
let app = getAppFromSource(source);
|
||||||
if (source instanceof AppDisplay.AppWellIcon) {
|
|
||||||
app = this._appSystem.lookup_app(source.getId());
|
|
||||||
} else if (source.metaWindow) {
|
|
||||||
app = this._tracker.get_window_app(source.metaWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't allow favoriting of transient apps
|
// Don't allow favoriting of transient apps
|
||||||
if (app == null || app.is_window_backed()) {
|
if (app == null || app.is_window_backed()) {
|
||||||
|
|||||||
@@ -89,8 +89,10 @@ const DateMenuButton = new Lang.Class({
|
|||||||
separator.setColumnWidths(1);
|
separator.setColumnWidths(1);
|
||||||
vbox.add(separator.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
vbox.add(separator.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
||||||
|
|
||||||
|
item.actor.show_on_set_parent = false;
|
||||||
item.actor.can_focus = false;
|
item.actor.can_focus = false;
|
||||||
item.actor.reparent(vbox);
|
item.actor.reparent(vbox);
|
||||||
|
this._dateAndTimeSeparator = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._separator = new St.DrawingArea({ style_class: 'calendar-vertical-separator',
|
this._separator = new St.DrawingArea({ style_class: 'calendar-vertical-separator',
|
||||||
@@ -111,6 +113,11 @@ const DateMenuButton = new Lang.Class({
|
|||||||
this._openCalendarItem.actor.can_focus = false;
|
this._openCalendarItem.actor.can_focus = false;
|
||||||
vbox.add(this._openCalendarItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
vbox.add(this._openCalendarItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
||||||
|
|
||||||
|
this._calendarSettings = new Gio.Settings({ schema: 'org.gnome.desktop.default-applications.office.calendar' });
|
||||||
|
this._calendarSettings.connect('changed::exec',
|
||||||
|
Lang.bind(this, this._calendarSettingsChanged));
|
||||||
|
this._calendarSettingsChanged();
|
||||||
|
|
||||||
// Whenever the menu is opened, select today
|
// Whenever the menu is opened, select today
|
||||||
this.menu.connect('open-state-changed', Lang.bind(this, function(menu, isOpen) {
|
this.menu.connect('open-state-changed', Lang.bind(this, function(menu, isOpen) {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
@@ -144,10 +151,25 @@ const DateMenuButton = new Lang.Class({
|
|||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_calendarSettingsChanged: function() {
|
||||||
|
let exec = this._calendarSettings.get_string('exec');
|
||||||
|
let fullExec = GLib.find_program_in_path(exec);
|
||||||
|
this._openCalendarItem.actor.visible = fullExec != null;
|
||||||
|
},
|
||||||
|
|
||||||
_setEventsVisibility: function(visible) {
|
_setEventsVisibility: function(visible) {
|
||||||
|
this._openCalendarItem.actor.visible = visible;
|
||||||
this._separator.visible = visible;
|
this._separator.visible = visible;
|
||||||
this._eventList.visible = visible;
|
if (visible) {
|
||||||
this._openCalendarItem.visible = visible;
|
let alignment = 0.25;
|
||||||
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||||
|
alignment = 1.0 - alignment;
|
||||||
|
this.menu._arrowAlignment = alignment;
|
||||||
|
this._eventList.actor.get_parent().show();
|
||||||
|
} else {
|
||||||
|
this.menu._arrowAlignment = 0.5;
|
||||||
|
this._eventList.actor.get_parent().hide();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_setEventSource: function(eventSource) {
|
_setEventSource: function(eventSource) {
|
||||||
@@ -165,6 +187,10 @@ const DateMenuButton = new Lang.Class({
|
|||||||
}
|
}
|
||||||
this._setEventSource(eventSource);
|
this._setEventSource(eventSource);
|
||||||
this._setEventsVisibility(showEvents);
|
this._setEventsVisibility(showEvents);
|
||||||
|
|
||||||
|
// This needs to be handled manually, as the code to
|
||||||
|
// autohide separators doesn't work across the vbox
|
||||||
|
this._dateAndTimeSeparator.actor.visible = Main.sessionMode.allowSettings;
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateClockAndDate: function() {
|
_updateClockAndDate: function() {
|
||||||
@@ -179,14 +205,13 @@ const DateMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
_onOpenCalendarActivate: function() {
|
_onOpenCalendarActivate: function() {
|
||||||
this.menu.close();
|
this.menu.close();
|
||||||
let calendarSettings = new Gio.Settings({ schema: 'org.gnome.desktop.default-applications.office.calendar' });
|
let tool = this._calendarSettings.get_string('exec');
|
||||||
let tool = calendarSettings.get_string('exec');
|
|
||||||
if (tool.length == 0 || tool.substr(0, 9) == 'evolution') {
|
if (tool.length == 0 || tool.substr(0, 9) == 'evolution') {
|
||||||
// TODO: pass the selected day
|
// TODO: pass the selected day
|
||||||
let app = Shell.AppSystem.get_default().lookup_app('evolution-calendar.desktop');
|
let app = Shell.AppSystem.get_default().lookup_app('evolution-calendar.desktop');
|
||||||
app.activate();
|
app.activate();
|
||||||
} else {
|
} else {
|
||||||
let needTerm = calendarSettings.get_boolean('needs-term');
|
let needTerm = this._calendarSettings.get_boolean('needs-term');
|
||||||
if (needTerm) {
|
if (needTerm) {
|
||||||
let terminalSettings = new Gio.Settings({ schema: 'org.gnome.desktop.default-applications.terminal' });
|
let terminalSettings = new Gio.Settings({ schema: 'org.gnome.desktop.default-applications.terminal' });
|
||||||
let term = terminalSettings.get_string('exec');
|
let term = terminalSettings.get_string('exec');
|
||||||
|
|||||||
15
js/ui/dnd.js
15
js/ui/dnd.js
@@ -234,7 +234,11 @@ const _Draggable = new Lang.Class({
|
|||||||
this._dragY = this._dragStartY = stageY;
|
this._dragY = this._dragStartY = stageY;
|
||||||
|
|
||||||
if (this.actor._delegate && this.actor._delegate.getDragActor) {
|
if (this.actor._delegate && this.actor._delegate.getDragActor) {
|
||||||
this._dragActor = this.actor._delegate.getDragActor(this._dragStartX, this._dragStartY);
|
this._dragActor = this.actor._delegate.getDragActor();
|
||||||
|
this._dragActor.reparent(Main.uiGroup);
|
||||||
|
this._dragActor.raise_top();
|
||||||
|
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
||||||
|
|
||||||
// Drag actor does not always have to be the same as actor. For example drag actor
|
// Drag actor does not always have to be the same as actor. For example drag actor
|
||||||
// can be an image that's part of the actor. So to perform "snap back" correctly we need
|
// can be an image that's part of the actor. So to perform "snap back" correctly we need
|
||||||
// to know what was the drag actor source.
|
// to know what was the drag actor source.
|
||||||
@@ -263,12 +267,17 @@ const _Draggable = new Lang.Class({
|
|||||||
this._dragOffsetY = this._dragActor.y - this._dragStartY;
|
this._dragOffsetY = this._dragActor.y - this._dragStartY;
|
||||||
} else {
|
} else {
|
||||||
this._dragActor = this.actor;
|
this._dragActor = this.actor;
|
||||||
|
|
||||||
this._dragActorSource = undefined;
|
this._dragActorSource = undefined;
|
||||||
this._dragOrigParent = this.actor.get_parent();
|
this._dragOrigParent = this.actor.get_parent();
|
||||||
this._dragOrigX = this._dragActor.x;
|
this._dragOrigX = this._dragActor.x;
|
||||||
this._dragOrigY = this._dragActor.y;
|
this._dragOrigY = this._dragActor.y;
|
||||||
this._dragOrigScale = this._dragActor.scale_x;
|
this._dragOrigScale = this._dragActor.scale_x;
|
||||||
|
|
||||||
|
this._dragActor.reparent(Main.uiGroup);
|
||||||
|
this._dragActor.raise_top();
|
||||||
|
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
||||||
|
|
||||||
let [actorStageX, actorStageY] = this.actor.get_transformed_position();
|
let [actorStageX, actorStageY] = this.actor.get_transformed_position();
|
||||||
this._dragOffsetX = actorStageX - this._dragStartX;
|
this._dragOffsetX = actorStageX - this._dragStartX;
|
||||||
this._dragOffsetY = actorStageY - this._dragStartY;
|
this._dragOffsetY = actorStageY - this._dragStartY;
|
||||||
@@ -280,10 +289,6 @@ const _Draggable = new Lang.Class({
|
|||||||
scaledHeight / this.actor.height);
|
scaledHeight / this.actor.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dragActor.reparent(Main.uiGroup);
|
|
||||||
this._dragActor.raise_top();
|
|
||||||
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
|
||||||
|
|
||||||
this._dragOrigOpacity = this._dragActor.opacity;
|
this._dragOrigOpacity = this._dragActor.opacity;
|
||||||
if (this._dragActorOpacity != undefined)
|
if (this._dragActorOpacity != undefined)
|
||||||
this._dragActor.opacity = this._dragActorOpacity;
|
this._dragActor.opacity = this._dragActorOpacity;
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ const restartDialogContent = {
|
|||||||
endDescription: _("Restarting the system."),
|
endDescription: _("Restarting the system."),
|
||||||
confirmButtons: [{ signal: 'ConfirmedReboot',
|
confirmButtons: [{ signal: 'ConfirmedReboot',
|
||||||
label: C_("button", "Restart") }],
|
label: C_("button", "Restart") }],
|
||||||
iconName: 'system-shutdown-symbolic',
|
iconName: 'view-refresh-symbolic',
|
||||||
iconStyleClass: 'end-session-dialog-shutdown-icon'
|
iconStyleClass: 'end-session-dialog-shutdown-icon'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -126,13 +126,10 @@ function logExtensionError(uuid, error) {
|
|||||||
|
|
||||||
let message = '' + error;
|
let message = '' + error;
|
||||||
|
|
||||||
if (error.state)
|
extension.state = ExtensionState.ERROR;
|
||||||
extension.state = error.state;
|
|
||||||
else
|
|
||||||
extension.state = ExtensionState.ERROR;
|
|
||||||
|
|
||||||
if (!extension.errors)
|
if (!extension.errors)
|
||||||
extension.errors = [];
|
extension.errors = [];
|
||||||
|
extension.errors.push(message);
|
||||||
|
|
||||||
log('Extension "%s" had error: %s'.format(uuid, message));
|
log('Extension "%s" had error: %s'.format(uuid, message));
|
||||||
_signals.emit('extension-state-changed', { uuid: uuid,
|
_signals.emit('extension-state-changed', { uuid: uuid,
|
||||||
@@ -145,18 +142,16 @@ function loadExtension(extension) {
|
|||||||
extension.state = ExtensionState.ERROR;
|
extension.state = ExtensionState.ERROR;
|
||||||
|
|
||||||
if (ExtensionUtils.isOutOfDate(extension)) {
|
if (ExtensionUtils.isOutOfDate(extension)) {
|
||||||
let error = new Error('extension is not compatible with current GNOME Shell and/or GJS version');
|
extension.state = ExtensionState.OUT_OF_DATE;
|
||||||
error.state = ExtensionState.OUT_OF_DATE;
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
|
|
||||||
let enabled = enabledExtensions.indexOf(extension.uuid) != -1;
|
|
||||||
if (enabled) {
|
|
||||||
initExtension(extension.uuid);
|
|
||||||
if (extension.state == ExtensionState.DISABLED)
|
|
||||||
enableExtension(extension.uuid);
|
|
||||||
} else {
|
} else {
|
||||||
extension.state = ExtensionState.INITIALIZED;
|
let enabled = enabledExtensions.indexOf(extension.uuid) != -1;
|
||||||
|
if (enabled) {
|
||||||
|
initExtension(extension.uuid);
|
||||||
|
if (extension.state == ExtensionState.DISABLED)
|
||||||
|
enableExtension(extension.uuid);
|
||||||
|
} else {
|
||||||
|
extension.state = ExtensionState.INITIALIZED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_signals.emit('extension-state-changed', extension);
|
_signals.emit('extension-state-changed', extension);
|
||||||
@@ -217,8 +212,16 @@ function initExtension(uuid) {
|
|||||||
_signals.emit('extension-loaded', uuid);
|
_signals.emit('extension-loaded', uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getEnabledExtensions() {
|
||||||
|
let extensions = global.settings.get_strv(ENABLED_EXTENSIONS_KEY);
|
||||||
|
if (!Array.isArray(Main.sessionMode.enabledExtensions))
|
||||||
|
return extensions;
|
||||||
|
|
||||||
|
return Main.sessionMode.enabledExtensions.concat(extensions);
|
||||||
|
}
|
||||||
|
|
||||||
function onEnabledExtensionsChanged() {
|
function onEnabledExtensionsChanged() {
|
||||||
let newEnabledExtensions = global.settings.get_strv(ENABLED_EXTENSIONS_KEY);
|
let newEnabledExtensions = getEnabledExtensions();
|
||||||
|
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
return;
|
return;
|
||||||
@@ -252,7 +255,7 @@ function onEnabledExtensionsChanged() {
|
|||||||
|
|
||||||
function _loadExtensions() {
|
function _loadExtensions() {
|
||||||
global.settings.connect('changed::' + ENABLED_EXTENSIONS_KEY, onEnabledExtensionsChanged);
|
global.settings.connect('changed::' + ENABLED_EXTENSIONS_KEY, onEnabledExtensionsChanged);
|
||||||
enabledExtensions = global.settings.get_strv(ENABLED_EXTENSIONS_KEY);
|
enabledExtensions = getEnabledExtensions();
|
||||||
|
|
||||||
let finder = new ExtensionUtils.ExtensionFinder();
|
let finder = new ExtensionUtils.ExtensionFinder();
|
||||||
finder.connect('extension-found', function(signals, extension) {
|
finder.connect('extension-found', function(signals, extension) {
|
||||||
@@ -294,10 +297,17 @@ function disableAllExtensions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _sessionUpdated() {
|
function _sessionUpdated() {
|
||||||
if (Main.sessionMode.allowExtensions)
|
// For now sessionMode.allowExtensions controls extensions from both the
|
||||||
|
// 'enabled-extensions' preference and the sessionMode.enabledExtensions
|
||||||
|
// property; it might make sense to make enabledExtensions independent
|
||||||
|
// from allowExtensions in the future
|
||||||
|
if (Main.sessionMode.allowExtensions) {
|
||||||
|
if (initted)
|
||||||
|
onEnabledExtensionsChanged();
|
||||||
enableAllExtensions();
|
enableAllExtensions();
|
||||||
else
|
} else {
|
||||||
disableAllExtensions();
|
disableAllExtensions();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ function _navigateActor(actor) {
|
|||||||
|
|
||||||
// GrabHelper:
|
// GrabHelper:
|
||||||
// @owner: the actor that owns the GrabHelper
|
// @owner: the actor that owns the GrabHelper
|
||||||
|
// @params: optional parameters to pass to Main.pushModal()
|
||||||
//
|
//
|
||||||
// Creates a new GrabHelper object, for dealing with keyboard and pointer grabs
|
// Creates a new GrabHelper object, for dealing with keyboard and pointer grabs
|
||||||
// associated with a set of actors.
|
// associated with a set of actors.
|
||||||
@@ -34,14 +35,14 @@ function _navigateActor(actor) {
|
|||||||
const GrabHelper = new Lang.Class({
|
const GrabHelper = new Lang.Class({
|
||||||
Name: 'GrabHelper',
|
Name: 'GrabHelper',
|
||||||
|
|
||||||
_init: function(owner) {
|
_init: function(owner, params) {
|
||||||
this._owner = owner;
|
this._owner = owner;
|
||||||
|
this._modalParams = params;
|
||||||
|
|
||||||
this._grabStack = [];
|
this._grabStack = [];
|
||||||
|
|
||||||
this._actors = [];
|
this._actors = [];
|
||||||
this._capturedEventId = 0;
|
this._capturedEventId = 0;
|
||||||
this._eventId = 0;
|
|
||||||
this._keyFocusNotifyId = 0;
|
this._keyFocusNotifyId = 0;
|
||||||
this._focusWindowChangedId = 0;
|
this._focusWindowChangedId = 0;
|
||||||
this._ignoreRelease = false;
|
this._ignoreRelease = false;
|
||||||
@@ -76,9 +77,12 @@ const GrabHelper = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_isWithinGrabbedActor: function(actor) {
|
_isWithinGrabbedActor: function(actor) {
|
||||||
|
let currentActor = this.currentGrab.actor;
|
||||||
while (actor) {
|
while (actor) {
|
||||||
if (this._actors.indexOf(actor) != -1)
|
if (this._actors.indexOf(actor) != -1)
|
||||||
return true;
|
return true;
|
||||||
|
if (actor == currentActor)
|
||||||
|
return true;
|
||||||
actor = actor.get_parent();
|
actor = actor.get_parent();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -88,6 +92,14 @@ const GrabHelper = new Lang.Class({
|
|||||||
return this._grabStack[this._grabStack.length - 1] || {};
|
return this._grabStack[this._grabStack.length - 1] || {};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get grabbed() {
|
||||||
|
return this._grabStack.length > 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
get grabStack() {
|
||||||
|
return this._grabStack;
|
||||||
|
},
|
||||||
|
|
||||||
_findStackIndex: function(actor) {
|
_findStackIndex: function(actor) {
|
||||||
if (!actor)
|
if (!actor)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -99,6 +111,16 @@ const GrabHelper = new Lang.Class({
|
|||||||
return -1;
|
return -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_actorInGrabStack: function(actor) {
|
||||||
|
while (actor) {
|
||||||
|
let idx = this._findStackIndex(actor);
|
||||||
|
if (idx >= 0)
|
||||||
|
return idx;
|
||||||
|
actor = actor.get_parent();
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
},
|
||||||
|
|
||||||
isActorGrabbed: function(actor) {
|
isActorGrabbed: function(actor) {
|
||||||
return this._findStackIndex(actor) >= 0;
|
return this._findStackIndex(actor) >= 0;
|
||||||
},
|
},
|
||||||
@@ -138,6 +160,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
params = Params.parse(params, { actor: null,
|
params = Params.parse(params, { actor: null,
|
||||||
modal: false,
|
modal: false,
|
||||||
grabFocus: false,
|
grabFocus: false,
|
||||||
|
focus: null,
|
||||||
onUngrab: null });
|
onUngrab: null });
|
||||||
|
|
||||||
let focus = global.stage.key_focus;
|
let focus = global.stage.key_focus;
|
||||||
@@ -155,7 +178,9 @@ const GrabHelper = new Lang.Class({
|
|||||||
if (params.grabFocus && !this._takeFocusGrab(hadFocus))
|
if (params.grabFocus && !this._takeFocusGrab(hadFocus))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (hadFocus || params.grabFocus)
|
if (params.focus)
|
||||||
|
params.focus.grab_key_focus();
|
||||||
|
else if (hadFocus || params.grabFocus)
|
||||||
_navigateActor(newFocus);
|
_navigateActor(newFocus);
|
||||||
|
|
||||||
this._grabStack.push(params);
|
this._grabStack.push(params);
|
||||||
@@ -165,11 +190,10 @@ const GrabHelper = new Lang.Class({
|
|||||||
_takeModalGrab: function() {
|
_takeModalGrab: function() {
|
||||||
let firstGrab = (this._modalCount == 0);
|
let firstGrab = (this._modalCount == 0);
|
||||||
if (firstGrab) {
|
if (firstGrab) {
|
||||||
if (!Main.pushModal(this._owner))
|
if (!Main.pushModal(this._owner, this._modalParams))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this._capturedEventId = global.stage.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
this._capturedEventId = global.stage.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
||||||
this._eventId = global.stage.connect('event', Lang.bind(this, this._onEvent));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._modalCount++;
|
this._modalCount++;
|
||||||
@@ -186,11 +210,6 @@ const GrabHelper = new Lang.Class({
|
|||||||
this._capturedEventId = 0;
|
this._capturedEventId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._eventId > 0) {
|
|
||||||
global.stage.disconnect(this._eventId);
|
|
||||||
this._eventId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.popModal(this._owner);
|
Main.popModal(this._owner);
|
||||||
global.sync_pointer();
|
global.sync_pointer();
|
||||||
},
|
},
|
||||||
@@ -202,7 +221,6 @@ const GrabHelper = new Lang.Class({
|
|||||||
|
|
||||||
this._grabbedFromKeynav = hadFocus;
|
this._grabbedFromKeynav = hadFocus;
|
||||||
this._preGrabInputMode = global.stage_input_mode;
|
this._preGrabInputMode = global.stage_input_mode;
|
||||||
this._prevFocusedWindow = metaDisplay.focus_window;
|
|
||||||
|
|
||||||
if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE ||
|
if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE ||
|
||||||
this._preGrabInputMode == Shell.StageInputMode.NORMAL) {
|
this._preGrabInputMode == Shell.StageInputMode.NORMAL) {
|
||||||
@@ -241,13 +259,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._prevFocusedWindow) {
|
global.screen.focus_default_window(global.get_current_time());
|
||||||
let metaDisplay = global.screen.get_display();
|
|
||||||
if (!metaDisplay.focus_window) {
|
|
||||||
metaDisplay.set_input_focus_window(this._prevFocusedWindow,
|
|
||||||
false, global.get_current_time());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// ignoreRelease:
|
// ignoreRelease:
|
||||||
@@ -268,7 +280,8 @@ const GrabHelper = new Lang.Class({
|
|||||||
// If the actor that was popped from the grab stack was not the actor
|
// If the actor that was popped from the grab stack was not the actor
|
||||||
// That was passed in, this call is ignored.
|
// That was passed in, this call is ignored.
|
||||||
ungrab: function(params) {
|
ungrab: function(params) {
|
||||||
params = Params.parse(params, { actor: this.currentGrab.actor });
|
params = Params.parse(params, { actor: this.currentGrab.actor,
|
||||||
|
isUser: false });
|
||||||
|
|
||||||
let grabStackIndex = this._findStackIndex(params.actor);
|
let grabStackIndex = this._findStackIndex(params.actor);
|
||||||
if (grabStackIndex < 0)
|
if (grabStackIndex < 0)
|
||||||
@@ -286,7 +299,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
let poppedGrab = poppedGrabs[i];
|
let poppedGrab = poppedGrabs[i];
|
||||||
|
|
||||||
if (poppedGrab.onUngrab)
|
if (poppedGrab.onUngrab)
|
||||||
poppedGrab.onUngrab();
|
poppedGrab.onUngrab(params.isUser);
|
||||||
|
|
||||||
if (poppedGrab.modal)
|
if (poppedGrab.modal)
|
||||||
this._releaseModalGrab();
|
this._releaseModalGrab();
|
||||||
@@ -309,47 +322,45 @@ const GrabHelper = new Lang.Class({
|
|||||||
|
|
||||||
if (release && this._ignoreRelease) {
|
if (release && this._ignoreRelease) {
|
||||||
this._ignoreRelease = false;
|
this._ignoreRelease = false;
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!button && this._modalCount == 0)
|
if (!button && this._modalCount == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (type == Clutter.EventType.KEY_PRESS &&
|
||||||
|
event.get_key_symbol() == Clutter.KEY_Escape) {
|
||||||
|
this.ungrab({ isUser: true });
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._isWithinGrabbedActor(event.get_source()))
|
if (this._isWithinGrabbedActor(event.get_source()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (Main.keyboard.shouldTakeEvent(event))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (button) {
|
if (button) {
|
||||||
// If we have a press event, ignore the next event,
|
// If we have a press event, ignore the next event,
|
||||||
// which should be a release event.
|
// which should be a release event.
|
||||||
if (press)
|
if (press)
|
||||||
this._ignoreRelease = true;
|
this._ignoreRelease = true;
|
||||||
this.ungrab({ actor: this._grabStack[0].actor });
|
let i = this._actorInGrabStack(event.get_source()) + 1;
|
||||||
|
this.ungrab({ actor: this._grabStack[i].actor, isUser: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._modalCount > 0;
|
return this._modalCount > 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
// We catch 'event' rather than 'key-press-event' so that we get
|
|
||||||
// a chance to run before the overview's own Escape check
|
|
||||||
_onEvent: function(actor, event) {
|
|
||||||
if (event.type() == Clutter.EventType.KEY_PRESS &&
|
|
||||||
event.get_key_symbol() == Clutter.KEY_Escape) {
|
|
||||||
this.ungrab();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onKeyFocusChanged: function() {
|
_onKeyFocusChanged: function() {
|
||||||
let focus = global.stage.key_focus;
|
let focus = global.stage.key_focus;
|
||||||
if (!focus || !this._isWithinGrabbedActor(focus))
|
if (!focus || !this._isWithinGrabbedActor(focus))
|
||||||
this.ungrab();
|
this.ungrab({ isUser: true });
|
||||||
},
|
},
|
||||||
|
|
||||||
_focusWindowChanged: function() {
|
_focusWindowChanged: function() {
|
||||||
let metaDisplay = global.screen.get_display();
|
let metaDisplay = global.screen.get_display();
|
||||||
if (metaDisplay.focus_window != null)
|
if (metaDisplay.focus_window != null)
|
||||||
this.ungrab();
|
this.ungrab({ isUser: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ const BaseIcon = new Lang.Class({
|
|||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.actor.connect('style-changed',
|
this.actor.connect('style-changed',
|
||||||
Lang.bind(this, this._onStyleChanged));
|
Lang.bind(this, this._onStyleChanged));
|
||||||
|
this.actor.connect('destroy',
|
||||||
|
Lang.bind(this, this._onDestroy));
|
||||||
|
|
||||||
this._spacing = 0;
|
this._spacing = 0;
|
||||||
|
|
||||||
@@ -52,6 +54,9 @@ const BaseIcon = new Lang.Class({
|
|||||||
this._setSizeManually = params.setSizeManually;
|
this._setSizeManually = params.setSizeManually;
|
||||||
|
|
||||||
this.icon = null;
|
this.icon = null;
|
||||||
|
|
||||||
|
let cache = St.TextureCache.get_default();
|
||||||
|
this._iconThemeChangedId = cache.connect('icon-theme-changed', Lang.bind(this, this._onIconThemeChanged));
|
||||||
},
|
},
|
||||||
|
|
||||||
_allocate: function(actor, box, flags) {
|
_allocate: function(actor, box, flags) {
|
||||||
@@ -146,7 +151,22 @@ const BaseIcon = new Lang.Class({
|
|||||||
size = found ? len : ICON_SIZE;
|
size = found ? len : ICON_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.iconSize == size && this._iconBin.child)
|
||||||
|
return;
|
||||||
|
|
||||||
this._createIconTexture(size);
|
this._createIconTexture(size);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDestroy: function() {
|
||||||
|
if (this._iconThemeChangedId > 0) {
|
||||||
|
let cache = St.TextureCache.get_default();
|
||||||
|
cache.disconnect(this._iconThemeChangedId);
|
||||||
|
this._iconThemeChangedId = 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_onIconThemeChanged: function() {
|
||||||
|
this._createIconTexture(this.iconSize);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -198,7 +218,11 @@ const IconGrid = new Lang.Class({
|
|||||||
|
|
||||||
_getPreferredHeight: function (grid, forWidth, alloc) {
|
_getPreferredHeight: function (grid, forWidth, alloc) {
|
||||||
let children = this._getVisibleChildren();
|
let children = this._getVisibleChildren();
|
||||||
let [nColumns, usedWidth] = this._computeLayout(forWidth);
|
let nColumns;
|
||||||
|
if (forWidth < 0)
|
||||||
|
nColumns = children.length;
|
||||||
|
else
|
||||||
|
nColumns = this._computeLayout(forWidth)[0];
|
||||||
let nRows;
|
let nRows;
|
||||||
if (nColumns > 0)
|
if (nColumns > 0)
|
||||||
nRows = Math.ceil(children.length / nColumns);
|
nRows = Math.ceil(children.length / nColumns);
|
||||||
|
|||||||
@@ -20,25 +20,6 @@ const KEYBOARD_TYPE = 'keyboard-type';
|
|||||||
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
||||||
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
||||||
|
|
||||||
// Key constants taken from Antler
|
|
||||||
// FIXME: ought to be moved into libcaribou
|
|
||||||
const PRETTY_KEYS = {
|
|
||||||
'BackSpace': '\u232b',
|
|
||||||
'space': ' ',
|
|
||||||
'Return': '\u23ce',
|
|
||||||
'Caribou_Prefs': '\u2328',
|
|
||||||
'Caribou_ShiftUp': '\u2b06',
|
|
||||||
'Caribou_ShiftDown': '\u2b07',
|
|
||||||
'Caribou_Emoticons': '\u263a',
|
|
||||||
'Caribou_Symbols': '123',
|
|
||||||
'Caribou_Symbols_More': '{#*',
|
|
||||||
'Caribou_Alpha': 'Abc',
|
|
||||||
'Tab': 'Tab',
|
|
||||||
'Escape': 'Esc',
|
|
||||||
'Control_L': 'Ctrl',
|
|
||||||
'Alt_L': 'Alt'
|
|
||||||
};
|
|
||||||
|
|
||||||
const CaribouKeyboardIface = <interface name='org.gnome.Caribou.Keyboard'>
|
const CaribouKeyboardIface = <interface name='org.gnome.Caribou.Keyboard'>
|
||||||
<method name='Show'>
|
<method name='Show'>
|
||||||
<arg type='u' direction='in' />
|
<arg type='u' direction='in' />
|
||||||
@@ -98,17 +79,7 @@ const Key = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_makeKey: function () {
|
_makeKey: function () {
|
||||||
let label = this._key.name;
|
let label = GLib.markup_escape_text(this._key.label, -1);
|
||||||
|
|
||||||
if (label.length > 1) {
|
|
||||||
let pretty = PRETTY_KEYS[label];
|
|
||||||
if (pretty)
|
|
||||||
label = pretty;
|
|
||||||
else
|
|
||||||
label = this._getUnichar(this._key);
|
|
||||||
}
|
|
||||||
|
|
||||||
label = GLib.markup_escape_text(label, -1);
|
|
||||||
let button = new St.Button ({ label: label,
|
let button = new St.Button ({ label: label,
|
||||||
style_class: 'keyboard-key' });
|
style_class: 'keyboard-key' });
|
||||||
|
|
||||||
@@ -200,6 +171,8 @@ const Keyboard = new Lang.Class({
|
|||||||
this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard');
|
this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard');
|
||||||
|
|
||||||
this.actor = null;
|
this.actor = null;
|
||||||
|
this._focusInTray = false;
|
||||||
|
this._focusInExtendedKeys = false;
|
||||||
|
|
||||||
this._timestamp = global.display.get_current_time_roundtrip();
|
this._timestamp = global.display.get_current_time_roundtrip();
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._redraw));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._redraw));
|
||||||
@@ -278,7 +251,7 @@ const Keyboard = new Lang.Class({
|
|||||||
this._focusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
|
this._focusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
|
||||||
|
|
||||||
if (show)
|
if (show)
|
||||||
this.show();
|
this.show(Main.layoutManager.focusIndex);
|
||||||
else
|
else
|
||||||
this._createSource();
|
this._createSource();
|
||||||
},
|
},
|
||||||
@@ -288,7 +261,15 @@ const Keyboard = new Lang.Class({
|
|||||||
|
|
||||||
// Showing an extended key popup and clicking a key from the extended keys
|
// Showing an extended key popup and clicking a key from the extended keys
|
||||||
// will grab focus, but ignore that
|
// will grab focus, but ignore that
|
||||||
if (focus && (focus._extended_keys || (focus._key && focus._key.extended_key)))
|
let extendedKeysWereFocused = this._focusInExtendedKeys;
|
||||||
|
this._focusInExtendedKeys = focus && (focus._extended_keys || focus.extended_key);
|
||||||
|
if (this._focusInExtendedKeys || extendedKeysWereFocused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Ignore focus changes caused by message tray showing/hiding
|
||||||
|
let trayWasFocused = this._focusInTray;
|
||||||
|
this._focusInTray = (focus && Main.messageTray.actor.contains(focus));
|
||||||
|
if (this._focusInTray || trayWasFocused)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let time = global.get_current_time();
|
let time = global.get_current_time();
|
||||||
@@ -339,6 +320,13 @@ const Keyboard = new Lang.Class({
|
|||||||
trayButton.reactive = true;
|
trayButton.reactive = true;
|
||||||
trayButton.remove_style_pseudo_class('grayed');
|
trayButton.remove_style_pseudo_class('grayed');
|
||||||
}));
|
}));
|
||||||
|
Main.sessionMode.connect('updated', Lang.bind(this, function() {
|
||||||
|
trayButton.reactive = !Main.sessionMode.isLocked;
|
||||||
|
if (Main.sessionMode.isLocked)
|
||||||
|
trayButton.add_style_pseudo_class('grayed');
|
||||||
|
else
|
||||||
|
trayButton.remove_style_pseudo_class('grayed');
|
||||||
|
}));
|
||||||
|
|
||||||
return trayButton;
|
return trayButton;
|
||||||
},
|
},
|
||||||
@@ -387,7 +375,7 @@ const Keyboard = new Lang.Class({
|
|||||||
if (!this._enableKeyboard)
|
if (!this._enableKeyboard)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let monitor = Main.layoutManager.bottomMonitor;
|
let monitor = Main.layoutManager.keyboardMonitor;
|
||||||
let maxHeight = monitor.height / 3;
|
let maxHeight = monitor.height / 3;
|
||||||
this.actor.width = monitor.width;
|
this.actor.width = monitor.width;
|
||||||
|
|
||||||
@@ -468,9 +456,15 @@ const Keyboard = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function () {
|
shouldTakeEvent: function(event) {
|
||||||
this._redraw();
|
let actor = event.get_source();
|
||||||
|
return Main.layoutManager.keyboardBox.contains(actor) ||
|
||||||
|
actor._extended_keys || actor.extended_key;
|
||||||
|
},
|
||||||
|
|
||||||
|
show: function (monitor) {
|
||||||
|
Main.layoutManager.keyboardIndex = monitor;
|
||||||
|
this._redraw();
|
||||||
Main.layoutManager.showKeyboard();
|
Main.layoutManager.showKeyboard();
|
||||||
this._destroySource();
|
this._destroySource();
|
||||||
},
|
},
|
||||||
@@ -518,7 +512,7 @@ const Keyboard = new Lang.Class({
|
|||||||
|
|
||||||
if (timestamp != Clutter.CURRENT_TIME)
|
if (timestamp != Clutter.CURRENT_TIME)
|
||||||
this._timestamp = timestamp;
|
this._timestamp = timestamp;
|
||||||
this.show();
|
this.show(Main.layoutManager.focusIndex);
|
||||||
},
|
},
|
||||||
|
|
||||||
Hide: function(timestamp) {
|
Hide: function(timestamp) {
|
||||||
@@ -559,6 +553,7 @@ const KeyboardSource = new Lang.Class({
|
|||||||
_init: function(keyboard) {
|
_init: function(keyboard) {
|
||||||
this._keyboard = keyboard;
|
this._keyboard = keyboard;
|
||||||
this.parent(_("Keyboard"), 'input-keyboard-symbolic');
|
this.parent(_("Keyboard"), 'input-keyboard-symbolic');
|
||||||
|
this.keepTrayOnSummaryClick = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSummaryClick: function() {
|
handleSummaryClick: function() {
|
||||||
@@ -571,6 +566,7 @@ const KeyboardSource = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
open: function() {
|
open: function() {
|
||||||
this._keyboard.show();
|
// Show the OSK below the message tray
|
||||||
|
this._keyboard.show(Main.layoutManager.bottomIndex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
192
js/ui/layout.js
192
js/ui/layout.js
@@ -43,6 +43,8 @@ const MonitorConstraint = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
set primary(v) {
|
set primary(v) {
|
||||||
|
if (v)
|
||||||
|
this._index = -1;
|
||||||
this._primary = v;
|
this._primary = v;
|
||||||
if (this.actor)
|
if (this.actor)
|
||||||
this.actor.queue_relayout();
|
this.actor.queue_relayout();
|
||||||
@@ -54,6 +56,7 @@ const MonitorConstraint = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
set index(v) {
|
set index(v) {
|
||||||
|
this._primary = false;
|
||||||
this._index = v;
|
this._index = v;
|
||||||
if (this.actor)
|
if (this.actor)
|
||||||
this.actor.queue_relayout();
|
this.actor.queue_relayout();
|
||||||
@@ -100,8 +103,9 @@ const LayoutManager = new Lang.Class({
|
|||||||
this.monitors = [];
|
this.monitors = [];
|
||||||
this.primaryMonitor = null;
|
this.primaryMonitor = null;
|
||||||
this.primaryIndex = -1;
|
this.primaryIndex = -1;
|
||||||
|
this._keyboardIndex = -1;
|
||||||
this._hotCorners = [];
|
this._hotCorners = [];
|
||||||
this._rootPixmap = null;
|
this._background = null;
|
||||||
this._leftPanelBarrier = 0;
|
this._leftPanelBarrier = 0;
|
||||||
this._rightPanelBarrier = 0;
|
this._rightPanelBarrier = 0;
|
||||||
this._trayBarrier = 0;
|
this._trayBarrier = 0;
|
||||||
@@ -120,13 +124,11 @@ const LayoutManager = new Lang.Class({
|
|||||||
this.addChrome(this.panelBox, { affectsStruts: true,
|
this.addChrome(this.panelBox, { affectsStruts: true,
|
||||||
trackFullscreen: true });
|
trackFullscreen: true });
|
||||||
this.panelBox.connect('allocation-changed',
|
this.panelBox.connect('allocation-changed',
|
||||||
Lang.bind(this, this._updatePanelBarriers));
|
Lang.bind(this, this._panelBoxChanged));
|
||||||
|
|
||||||
this.trayBox = new St.Widget({ name: 'trayBox',
|
this.trayBox = new St.Widget({ name: 'trayBox',
|
||||||
layout_manager: new Clutter.BinLayout() });
|
layout_manager: new Clutter.BinLayout() });
|
||||||
this.addChrome(this.trayBox);
|
this.addChrome(this.trayBox);
|
||||||
this.trayBox.connect('allocation-changed',
|
|
||||||
Lang.bind(this, this._updateTrayBarrier));
|
|
||||||
|
|
||||||
this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
|
this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
@@ -239,9 +241,8 @@ const LayoutManager = new Lang.Class({
|
|||||||
this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
|
this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
|
||||||
this.panelBox.set_size(this.primaryMonitor.width, -1);
|
this.panelBox.set_size(this.primaryMonitor.width, -1);
|
||||||
|
|
||||||
this.keyboardBox.set_position(this.bottomMonitor.x,
|
if (this.keyboardIndex < 0)
|
||||||
this.bottomMonitor.y + this.bottomMonitor.height);
|
this.keyboardIndex = this.primaryIndex;
|
||||||
this.keyboardBox.set_size(this.bottomMonitor.width, -1);
|
|
||||||
|
|
||||||
this.trayBox.set_position(this.bottomMonitor.x,
|
this.trayBox.set_position(this.bottomMonitor.x,
|
||||||
this.bottomMonitor.y + this.bottomMonitor.height);
|
this.bottomMonitor.y + this.bottomMonitor.height);
|
||||||
@@ -255,6 +256,11 @@ const LayoutManager = new Lang.Class({
|
|||||||
this.bottomMonitor.width, this.bottomMonitor.height);
|
this.bottomMonitor.width, this.bottomMonitor.height);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_panelBoxChanged: function() {
|
||||||
|
this.emit('panel-box-changed');
|
||||||
|
this._updatePanelBarriers();
|
||||||
|
},
|
||||||
|
|
||||||
_updatePanelBarriers: function() {
|
_updatePanelBarriers: function() {
|
||||||
if (this._leftPanelBarrier)
|
if (this._leftPanelBarrier)
|
||||||
global.destroy_pointer_barrier(this._leftPanelBarrier);
|
global.destroy_pointer_barrier(this._leftPanelBarrier);
|
||||||
@@ -277,22 +283,6 @@ const LayoutManager = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateTrayBarrier: function() {
|
|
||||||
let monitor = this.bottomMonitor;
|
|
||||||
|
|
||||||
if (this._trayBarrier)
|
|
||||||
global.destroy_pointer_barrier(this._trayBarrier);
|
|
||||||
|
|
||||||
if (Main.messageTray) {
|
|
||||||
this._trayBarrier =
|
|
||||||
global.create_pointer_barrier(monitor.x + monitor.width, monitor.y + monitor.height - Main.messageTray.actor.height,
|
|
||||||
monitor.x + monitor.width, monitor.y + monitor.height,
|
|
||||||
4 /* BarrierNegativeX */);
|
|
||||||
} else {
|
|
||||||
this._trayBarrier = 0;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_monitorsChanged: function() {
|
_monitorsChanged: function() {
|
||||||
this._updateMonitors();
|
this._updateMonitors();
|
||||||
this._updateBoxes();
|
this._updateBoxes();
|
||||||
@@ -320,8 +310,44 @@ const LayoutManager = new Lang.Class({
|
|||||||
return this.monitors[index];
|
return this.monitors[index];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get keyboardMonitor() {
|
||||||
|
return this.monitors[this.keyboardIndex];
|
||||||
|
},
|
||||||
|
|
||||||
|
get focusIndex() {
|
||||||
|
let i = Main.layoutManager.primaryIndex;
|
||||||
|
|
||||||
|
if (global.stage_input_mode == Shell.StageInputMode.FOCUSED ||
|
||||||
|
global.stage_input_mode == Shell.StageInputMode.FULLSCREEN) {
|
||||||
|
let focusActor = global.stage.key_focus;
|
||||||
|
if (focusActor)
|
||||||
|
i = this._chrome.findIndexForActor(focusActor);
|
||||||
|
} else {
|
||||||
|
let focusWindow = global.display.focus_window;
|
||||||
|
if (focusWindow)
|
||||||
|
i = this._chrome.findIndexForWindow(focusWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
return i;
|
||||||
|
},
|
||||||
|
|
||||||
|
get focusMonitor() {
|
||||||
|
return this.monitors[this.focusIndex];
|
||||||
|
},
|
||||||
|
|
||||||
|
set keyboardIndex(v) {
|
||||||
|
this._keyboardIndex = v;
|
||||||
|
this.keyboardBox.set_position(this.keyboardMonitor.x,
|
||||||
|
this.keyboardMonitor.y + this.keyboardMonitor.height);
|
||||||
|
this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
|
||||||
|
},
|
||||||
|
|
||||||
|
get keyboardIndex() {
|
||||||
|
return this._keyboardIndex;
|
||||||
|
},
|
||||||
|
|
||||||
_startupAnimation: function() {
|
_startupAnimation: function() {
|
||||||
this.panelBox.anchor_y = this.panelBox.height;
|
this.panelBox.translation_y = -this.panelBox.height;
|
||||||
|
|
||||||
let plymouthTransitionRunning = false;
|
let plymouthTransitionRunning = false;
|
||||||
|
|
||||||
@@ -330,34 +356,34 @@ const LayoutManager = new Lang.Class({
|
|||||||
// to the greeter. Otherwise, we'll just animate the panel,
|
// to the greeter. Otherwise, we'll just animate the panel,
|
||||||
// as usual.
|
// as usual.
|
||||||
if (Main.sessionMode.isGreeter) {
|
if (Main.sessionMode.isGreeter) {
|
||||||
this._rootPixmap = global.create_xrootpmap_texture();
|
this._background = Meta.BackgroundActor.new_for_screen(global.screen);
|
||||||
if (this._rootPixmap != null) {
|
if (this._background != null) {
|
||||||
Main.uiGroup.add_actor(this._rootPixmap);
|
Main.uiGroup.add_actor(this._background);
|
||||||
Tweener.addTween(this._rootPixmap,
|
Tweener.addTween(this._background,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: PLYMOUTH_TRANSITION_TIME,
|
time: PLYMOUTH_TRANSITION_TIME,
|
||||||
transition: 'linear',
|
transition: 'linear',
|
||||||
onComplete: this._fadeRootpmapComplete,
|
onComplete: this._fadeBackgroundComplete,
|
||||||
onCompleteScope: this });
|
onCompleteScope: this });
|
||||||
plymouthTransitionRunning = true;
|
plymouthTransitionRunning = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!plymouthTransitionRunning)
|
if (!plymouthTransitionRunning)
|
||||||
this._fadeRootpmapComplete();
|
this._fadeBackgroundComplete();
|
||||||
},
|
},
|
||||||
|
|
||||||
_fadeRootpmapComplete: function() {
|
_fadeBackgroundComplete: function() {
|
||||||
// Don't animate the strut
|
// Don't animate the strut
|
||||||
this._chrome.freezeUpdateRegions();
|
this._chrome.freezeUpdateRegions();
|
||||||
|
|
||||||
if (this._rootPixmap != null) {
|
if (this._background != null) {
|
||||||
this._rootPixmap.destroy();
|
this._background.destroy();
|
||||||
this._rootPixmap = null;
|
this._background = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tweener.addTween(this.panelBox,
|
Tweener.addTween(this.panelBox,
|
||||||
{ anchor_y: 0,
|
{ translation_y: 0,
|
||||||
time: STARTUP_ANIMATION_TIME,
|
time: STARTUP_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: this._startupAnimationComplete,
|
onComplete: this._startupAnimationComplete,
|
||||||
@@ -366,11 +392,11 @@ const LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_startupAnimationComplete: function() {
|
_startupAnimationComplete: function() {
|
||||||
|
this.emit('panel-box-changed');
|
||||||
this._chrome.thawUpdateRegions();
|
this._chrome.thawUpdateRegions();
|
||||||
},
|
},
|
||||||
|
|
||||||
showKeyboard: function () {
|
showKeyboard: function () {
|
||||||
Main.messageTray.hide();
|
|
||||||
this.keyboardBox.raise_top();
|
this.keyboardBox.raise_top();
|
||||||
Tweener.addTween(this.keyboardBox,
|
Tweener.addTween(this.keyboardBox,
|
||||||
{ anchor_y: this.keyboardBox.height,
|
{ anchor_y: this.keyboardBox.height,
|
||||||
@@ -379,11 +405,16 @@ const LayoutManager = new Lang.Class({
|
|||||||
onComplete: this._showKeyboardComplete,
|
onComplete: this._showKeyboardComplete,
|
||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
});
|
});
|
||||||
Tweener.addTween(this.trayBox,
|
|
||||||
{ anchor_y: this.keyboardBox.height,
|
if (this.keyboardIndex == this.bottomIndex) {
|
||||||
time: KEYBOARD_ANIMATION_TIME,
|
Tweener.addTween(this.trayBox,
|
||||||
transition: 'easeOutQuad'
|
{ anchor_y: this.keyboardBox.height,
|
||||||
});
|
time: KEYBOARD_ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.emit('keyboard-visible-changed', true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_showKeyboardComplete: function() {
|
_showKeyboardComplete: function() {
|
||||||
@@ -393,12 +424,12 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
this._keyboardHeightNotifyId = this.keyboardBox.connect('notify::height', Lang.bind(this, function () {
|
this._keyboardHeightNotifyId = this.keyboardBox.connect('notify::height', Lang.bind(this, function () {
|
||||||
this.keyboardBox.anchor_y = this.keyboardBox.height;
|
this.keyboardBox.anchor_y = this.keyboardBox.height;
|
||||||
this.trayBox.anchor_y = this.keyboardBox.height;
|
if (this.keyboardIndex == this.bottomIndex)
|
||||||
|
this.trayBox.anchor_y = this.keyboardBox.height;
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
hideKeyboard: function (immediate) {
|
hideKeyboard: function (immediate) {
|
||||||
Main.messageTray.hide();
|
|
||||||
if (this._keyboardHeightNotifyId) {
|
if (this._keyboardHeightNotifyId) {
|
||||||
this.keyboardBox.disconnect(this._keyboardHeightNotifyId);
|
this.keyboardBox.disconnect(this._keyboardHeightNotifyId);
|
||||||
this._keyboardHeightNotifyId = 0;
|
this._keyboardHeightNotifyId = 0;
|
||||||
@@ -410,11 +441,16 @@ const LayoutManager = new Lang.Class({
|
|||||||
onComplete: this._hideKeyboardComplete,
|
onComplete: this._hideKeyboardComplete,
|
||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
});
|
});
|
||||||
Tweener.addTween(this.trayBox,
|
|
||||||
{ anchor_y: 0,
|
if (this.keyboardIndex == this.bottomIndex) {
|
||||||
time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
|
Tweener.addTween(this.trayBox,
|
||||||
transition: 'easeOutQuad'
|
{ anchor_y: 0,
|
||||||
});
|
time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.emit('keyboard-visible-changed', false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideKeyboardComplete: function() {
|
_hideKeyboardComplete: function() {
|
||||||
@@ -476,8 +512,12 @@ const LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
findMonitorForActor: function(actor) {
|
findMonitorForActor: function(actor) {
|
||||||
return this._chrome.findMonitorForActor(actor);
|
return this.monitors[this._chrome.findIndexForActor(actor)];
|
||||||
}
|
},
|
||||||
|
|
||||||
|
findMonitorForWindow: function(window) {
|
||||||
|
return this.monitors[this._chrome.findIndexForWindow(window)];
|
||||||
|
},
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(LayoutManager.prototype);
|
Signals.addSignalMethods(LayoutManager.prototype);
|
||||||
|
|
||||||
@@ -779,10 +819,13 @@ const Chrome = new Lang.Class({
|
|||||||
|
|
||||||
_actorReparented: function(actor, oldParent) {
|
_actorReparented: function(actor, oldParent) {
|
||||||
let newParent = actor.get_parent();
|
let newParent = actor.get_parent();
|
||||||
if (!newParent)
|
if (!newParent) {
|
||||||
this._untrackActor(actor);
|
this._untrackActor(actor);
|
||||||
else
|
} else {
|
||||||
|
let i = this._findActor(actor);
|
||||||
|
let actorData = this._trackedActors[i];
|
||||||
actorData.isToplevel = (newParent == Main.uiGroup);
|
actorData.isToplevel = (newParent == Main.uiGroup);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateVisibility: function() {
|
_updateVisibility: function() {
|
||||||
@@ -822,6 +865,7 @@ const Chrome = new Lang.Class({
|
|||||||
|
|
||||||
_relayout: function() {
|
_relayout: function() {
|
||||||
this._monitors = this._layoutManager.monitors;
|
this._monitors = this._layoutManager.monitors;
|
||||||
|
this._primaryIndex = this._layoutManager.primaryIndex;
|
||||||
this._primaryMonitor = this._layoutManager.primaryMonitor;
|
this._primaryMonitor = this._layoutManager.primaryMonitor;
|
||||||
|
|
||||||
this._updateFullscreen();
|
this._updateFullscreen();
|
||||||
@@ -837,32 +881,49 @@ const Chrome = new Lang.Class({
|
|||||||
let monitor = this._monitors[i];
|
let monitor = this._monitors[i];
|
||||||
if (cx >= monitor.x && cx < monitor.x + monitor.width &&
|
if (cx >= monitor.x && cx < monitor.x + monitor.width &&
|
||||||
cy >= monitor.y && cy < monitor.y + monitor.height)
|
cy >= monitor.y && cy < monitor.y + monitor.height)
|
||||||
return monitor;
|
return i;
|
||||||
}
|
}
|
||||||
// If the center is not on a monitor, return the first overlapping monitor
|
// If the center is not on a monitor, return the first overlapping monitor
|
||||||
for (let i = 0; i < this._monitors.length; i++) {
|
for (let i = 0; i < this._monitors.length; i++) {
|
||||||
let monitor = this._monitors[i];
|
let monitor = this._monitors[i];
|
||||||
if (x + w > monitor.x && x < monitor.x + monitor.width &&
|
if (x + w > monitor.x && x < monitor.x + monitor.width &&
|
||||||
y + h > monitor.y && y < monitor.y + monitor.height)
|
y + h > monitor.y && y < monitor.y + monitor.height)
|
||||||
return monitor;
|
return i;
|
||||||
}
|
}
|
||||||
// otherwise on no monitor
|
// otherwise on no monitor
|
||||||
return null;
|
return -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
_findMonitorForWindow: function(window) {
|
findIndexForWindow: function(window) {
|
||||||
return this._findMonitorForRect(window.x, window.y, window.width, window.height);
|
let rect = window.get_input_rect();
|
||||||
|
let i = this._findMonitorForRect(rect.x, rect.y, rect.width, rect.height);
|
||||||
|
if (i >= 0)
|
||||||
|
return i;
|
||||||
|
return this._primaryIndex; // Not on any monitor, pretend its on the primary
|
||||||
},
|
},
|
||||||
|
|
||||||
// This call guarantees that we return some monitor to simplify usage of it
|
// This call guarantees that we return some monitor to simplify usage of it
|
||||||
// In practice all tracked actors should be visible on some monitor anyway
|
// In practice all tracked actors should be visible on some monitor anyway
|
||||||
findMonitorForActor: function(actor) {
|
findIndexForActor: function(actor) {
|
||||||
let [x, y] = actor.get_transformed_position();
|
let [x, y] = actor.get_transformed_position();
|
||||||
let [w, h] = actor.get_transformed_size();
|
let [w, h] = actor.get_transformed_size();
|
||||||
let monitor = this._findMonitorForRect(x, y, w, h);
|
let i = this._findMonitorForRect(x, y, w, h);
|
||||||
if (monitor)
|
if (i >= 0)
|
||||||
return monitor;
|
return i;
|
||||||
return this._primaryMonitor; // Not on any monitor, pretend its on the primary
|
return this._primaryIndex; // Not on any monitor, pretend its on the primary
|
||||||
|
},
|
||||||
|
|
||||||
|
findMonitorForWindow: function(window) {
|
||||||
|
let rect = window.get_input_rect();
|
||||||
|
let i = this._findMonitorForRect(rect.x, rect.y, rect.width, rect.height);
|
||||||
|
if (i >= 0)
|
||||||
|
return this._monitors[i];
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
|
||||||
|
findMonitorForActor: function(actor) {
|
||||||
|
return this._monitors[this.findIndexForActor(actor)];
|
||||||
},
|
},
|
||||||
|
|
||||||
_queueUpdateRegions: function() {
|
_queueUpdateRegions: function() {
|
||||||
@@ -903,14 +964,15 @@ const Chrome = new Lang.Class({
|
|||||||
|
|
||||||
for (let i = windows.length - 1; i > -1; i--) {
|
for (let i = windows.length - 1; i > -1; i--) {
|
||||||
let window = windows[i];
|
let window = windows[i];
|
||||||
let layer = window.get_meta_window().get_layer();
|
let metaWindow = window.meta_window;
|
||||||
|
let layer = metaWindow.get_layer();
|
||||||
|
|
||||||
// Skip minimized windows
|
// Skip minimized windows
|
||||||
if (!window.showing_on_its_workspace())
|
if (!window.showing_on_its_workspace())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (layer == Meta.StackLayer.FULLSCREEN) {
|
if (layer == Meta.StackLayer.FULLSCREEN) {
|
||||||
let monitor = this._findMonitorForWindow(window);
|
let monitor = this.findMonitorForWindow(metaWindow);
|
||||||
if (monitor)
|
if (monitor)
|
||||||
monitor.inFullscreen = true;
|
monitor.inFullscreen = true;
|
||||||
}
|
}
|
||||||
@@ -927,7 +989,7 @@ const Chrome = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Or whether it is monitor sized
|
// Or whether it is monitor sized
|
||||||
let monitor = this._findMonitorForWindow(window);
|
let monitor = this.findMonitorForWindow(metaWindow);
|
||||||
if (monitor &&
|
if (monitor &&
|
||||||
window.x <= monitor.x &&
|
window.x <= monitor.x &&
|
||||||
window.x + window.width >= monitor.x + monitor.width &&
|
window.x + window.width >= monitor.x + monitor.width &&
|
||||||
|
|||||||
@@ -1129,7 +1129,7 @@ const LookingGlass = new Lang.Class({
|
|||||||
if (this._open)
|
if (this._open)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!Main.pushModal(this._entry))
|
if (!Main.pushModal(this._entry, { keybindingMode: Main.KeybindingMode.LOOKING_GLASS }))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._notebook.selectIndex(0);
|
this._notebook.selectIndex(0);
|
||||||
|
|||||||
143
js/ui/main.js
143
js/ui/main.js
@@ -20,6 +20,7 @@ const Keyboard = imports.ui.keyboard;
|
|||||||
const MessageTray = imports.ui.messageTray;
|
const MessageTray = imports.ui.messageTray;
|
||||||
const Overview = imports.ui.overview;
|
const Overview = imports.ui.overview;
|
||||||
const Panel = imports.ui.panel;
|
const Panel = imports.ui.panel;
|
||||||
|
const Params = imports.misc.params;
|
||||||
const RunDialog = imports.ui.runDialog;
|
const RunDialog = imports.ui.runDialog;
|
||||||
const Layout = imports.ui.layout;
|
const Layout = imports.ui.layout;
|
||||||
const LookingGlass = imports.ui.lookingGlass;
|
const LookingGlass = imports.ui.lookingGlass;
|
||||||
@@ -39,6 +40,19 @@ const Util = imports.misc.util;
|
|||||||
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
|
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
|
||||||
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
||||||
|
|
||||||
|
const KeybindingMode = {
|
||||||
|
NONE: 0, // block all keybindings
|
||||||
|
NORMAL: 1 << 0, // window mode
|
||||||
|
OVERVIEW: 1 << 1,
|
||||||
|
LOCK_SCREEN: 1 << 2,
|
||||||
|
UNLOCK_SCREEN: 1 << 3,
|
||||||
|
LOGIN_SCREEN: 1 << 4,
|
||||||
|
MESSAGE_TRAY: 1 << 5,
|
||||||
|
SYSTEM_MODAL: 1 << 6,
|
||||||
|
LOOKING_GLASS: 1 << 7,
|
||||||
|
ALL: ~0,
|
||||||
|
};
|
||||||
|
|
||||||
let componentManager = null;
|
let componentManager = null;
|
||||||
let panel = null;
|
let panel = null;
|
||||||
let overview = null;
|
let overview = null;
|
||||||
@@ -55,6 +69,7 @@ let shellDBusService = null;
|
|||||||
let shellMountOpDBusService = null;
|
let shellMountOpDBusService = null;
|
||||||
let screenSaverDBus = null;
|
let screenSaverDBus = null;
|
||||||
let modalCount = 0;
|
let modalCount = 0;
|
||||||
|
let keybindingMode = KeybindingMode.NORMAL;
|
||||||
let modalActorFocusStack = [];
|
let modalActorFocusStack = [];
|
||||||
let uiGroup = null;
|
let uiGroup = null;
|
||||||
let magnifier = null;
|
let magnifier = null;
|
||||||
@@ -69,7 +84,17 @@ let _overridesSettings = null;
|
|||||||
let background = null;
|
let background = null;
|
||||||
|
|
||||||
function _sessionUpdated() {
|
function _sessionUpdated() {
|
||||||
Meta.keybindings_set_custom_handler('panel-run-dialog', sessionMode.hasRunDialog ? openRunDialog : null);
|
wm.setCustomKeybindingHandler('panel-main-menu',
|
||||||
|
KeybindingMode.NORMAL |
|
||||||
|
KeybindingMode.OVERVIEW,
|
||||||
|
sessionMode.hasOverview ? Lang.bind(overview, overview.toggle) : null);
|
||||||
|
wm.allowKeybinding('overlay-key', KeybindingMode.NORMAL |
|
||||||
|
KeybindingMode.OVERVIEW);
|
||||||
|
|
||||||
|
wm.setCustomKeybindingHandler('panel-run-dialog',
|
||||||
|
KeybindingMode.NORMAL |
|
||||||
|
KeybindingMode.OVERVIEW,
|
||||||
|
sessionMode.hasRunDialog ? openRunDialog : null);
|
||||||
if (sessionMode.isGreeter)
|
if (sessionMode.isGreeter)
|
||||||
screenShield.showDialog();
|
screenShield.showDialog();
|
||||||
}
|
}
|
||||||
@@ -136,13 +161,13 @@ function start() {
|
|||||||
xdndHandler = new XdndHandler.XdndHandler();
|
xdndHandler = new XdndHandler.XdndHandler();
|
||||||
ctrlAltTabManager = new CtrlAltTab.CtrlAltTabManager();
|
ctrlAltTabManager = new CtrlAltTab.CtrlAltTabManager();
|
||||||
overview = new Overview.Overview();
|
overview = new Overview.Overview();
|
||||||
|
wm = new WindowManager.WindowManager();
|
||||||
magnifier = new Magnifier.Magnifier();
|
magnifier = new Magnifier.Magnifier();
|
||||||
if (UnlockDialog.isSupported())
|
if (UnlockDialog.isSupported())
|
||||||
screenShield = new ScreenShield.ScreenShield();
|
screenShield = new ScreenShield.ScreenShield();
|
||||||
else
|
else
|
||||||
screenShield = new ScreenShield.ScreenShieldFallback();
|
screenShield = new ScreenShield.ScreenShieldFallback();
|
||||||
panel = new Panel.Panel();
|
panel = new Panel.Panel();
|
||||||
wm = new WindowManager.WindowManager();
|
|
||||||
messageTray = new MessageTray.MessageTray();
|
messageTray = new MessageTray.MessageTray();
|
||||||
keyboard = new Keyboard.Keyboard();
|
keyboard = new Keyboard.Keyboard();
|
||||||
notificationDaemon = new NotificationDaemon.NotificationDaemon();
|
notificationDaemon = new NotificationDaemon.NotificationDaemon();
|
||||||
@@ -155,10 +180,8 @@ function start() {
|
|||||||
|
|
||||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
||||||
false, -1, 1);
|
false, -1, 1);
|
||||||
Meta.keybindings_set_custom_handler('panel-main-menu', Lang.bind(overview, overview.toggle));
|
|
||||||
global.display.connect('overlay-key', Lang.bind(overview, overview.toggle));
|
global.display.connect('overlay-key', Lang.bind(overview, overview.toggle));
|
||||||
|
sessionMode.connect('updated', _sessionUpdated);
|
||||||
sessionMode.connect('update', _sessionUpdated);
|
|
||||||
_sessionUpdated();
|
_sessionUpdated();
|
||||||
|
|
||||||
// Provide the bus object for gnome-session to
|
// Provide the bus object for gnome-session to
|
||||||
@@ -167,8 +190,6 @@ function start() {
|
|||||||
|
|
||||||
_startDate = new Date();
|
_startDate = new Date();
|
||||||
|
|
||||||
global.stage.connect('captured-event', _globalKeyPressHandler);
|
|
||||||
|
|
||||||
log('GNOME Shell started at ' + _startDate);
|
log('GNOME Shell started at ' + _startDate);
|
||||||
|
|
||||||
let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
|
let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
|
||||||
@@ -465,80 +486,6 @@ function getWindowActorsForWorkspace(workspaceIndex) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function encapsulates hacks to make certain global keybindings
|
|
||||||
// work even when we are in one of our modes where global keybindings
|
|
||||||
// are disabled with a global grab. (When there is a global grab, then
|
|
||||||
// all key events will be delivered to the stage, so ::captured-event
|
|
||||||
// on the stage can be used for global keybindings.)
|
|
||||||
function _globalKeyPressHandler(actor, event) {
|
|
||||||
if (modalCount == 0)
|
|
||||||
return false;
|
|
||||||
if (event.type() != Clutter.EventType.KEY_PRESS)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!sessionMode.allowKeybindingsWhenModal) {
|
|
||||||
if (modalCount > (overview.visible ? 1 : 0))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
let symbol = event.get_key_symbol();
|
|
||||||
let keyCode = event.get_key_code();
|
|
||||||
let ignoredModifiers = global.display.get_ignored_modifier_mask();
|
|
||||||
let modifierState = event.get_state() & ~ignoredModifiers;
|
|
||||||
|
|
||||||
// This relies on the fact that Clutter.ModifierType is the same as Gdk.ModifierType
|
|
||||||
let action = global.display.get_keybinding_action(keyCode, modifierState);
|
|
||||||
|
|
||||||
if (action == Meta.KeyBindingAction.SWITCH_PANELS) {
|
|
||||||
ctrlAltTabManager.popup(modifierState & Clutter.ModifierType.SHIFT_MASK,
|
|
||||||
modifierState);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (action) {
|
|
||||||
// left/right would effectively act as synonyms for up/down if we enabled them;
|
|
||||||
// but that could be considered confusing; we also disable them in the main view.
|
|
||||||
//
|
|
||||||
// case Meta.KeyBindingAction.WORKSPACE_LEFT:
|
|
||||||
// if (!sessionMode.hasWorkspaces)
|
|
||||||
// return false;
|
|
||||||
//
|
|
||||||
// wm.actionMoveWorkspaceLeft();
|
|
||||||
// return true;
|
|
||||||
// case Meta.KeyBindingAction.WORKSPACE_RIGHT:
|
|
||||||
// if (!sessionMode.hasWorkspaces)
|
|
||||||
// return false;
|
|
||||||
//
|
|
||||||
// wm.actionMoveWorkspaceRight();
|
|
||||||
// return true;
|
|
||||||
case Meta.KeyBindingAction.WORKSPACE_UP:
|
|
||||||
if (!sessionMode.hasWorkspaces)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
wm.actionMoveWorkspace(Meta.MotionDirection.UP);
|
|
||||||
return true;
|
|
||||||
case Meta.KeyBindingAction.WORKSPACE_DOWN:
|
|
||||||
if (!sessionMode.hasWorkspaces)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
|
|
||||||
return true;
|
|
||||||
case Meta.KeyBindingAction.PANEL_RUN_DIALOG:
|
|
||||||
case Meta.KeyBindingAction.COMMAND_2:
|
|
||||||
if (!sessionMode.hasRunDialog)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
openRunDialog();
|
|
||||||
return true;
|
|
||||||
case Meta.KeyBindingAction.PANEL_MAIN_MENU:
|
|
||||||
case Meta.KeyBindingAction.OVERLAY_KEY:
|
|
||||||
overview.hide();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _findModal(actor) {
|
function _findModal(actor) {
|
||||||
for (let i = 0; i < modalActorFocusStack.length; i++) {
|
for (let i = 0; i < modalActorFocusStack.length; i++) {
|
||||||
if (modalActorFocusStack[i].actor == actor)
|
if (modalActorFocusStack[i].actor == actor)
|
||||||
@@ -554,7 +501,7 @@ function isInModalStack(actor) {
|
|||||||
/**
|
/**
|
||||||
* pushModal:
|
* pushModal:
|
||||||
* @actor: #ClutterActor which will be given keyboard focus
|
* @actor: #ClutterActor which will be given keyboard focus
|
||||||
* @timestamp: optional timestamp
|
* @params: optional parameters
|
||||||
*
|
*
|
||||||
* Ensure we are in a mode where all keyboard and mouse input goes to
|
* Ensure we are in a mode where all keyboard and mouse input goes to
|
||||||
* the stage, and focus @actor. Multiple calls to this function act in
|
* the stage, and focus @actor. Multiple calls to this function act in
|
||||||
@@ -565,21 +512,27 @@ function isInModalStack(actor) {
|
|||||||
* modal stack returns to this actor, reset the focus to the actor
|
* modal stack returns to this actor, reset the focus to the actor
|
||||||
* which was focused at the time pushModal() was invoked.
|
* which was focused at the time pushModal() was invoked.
|
||||||
*
|
*
|
||||||
* @timestamp is optionally used to associate the call with a specific user
|
* @params may be used to provide the following parameters:
|
||||||
* initiated event. If not provided then the value of
|
* - timestamp: used to associate the call with a specific user initiated
|
||||||
* global.get_current_time() is assumed.
|
* event. If not provided then the value of
|
||||||
|
* global.get_current_time() is assumed.
|
||||||
*
|
*
|
||||||
* @options: optional Meta.ModalOptions flags to indicate that the
|
* - options: Meta.ModalOptions flags to indicate that the pointer is
|
||||||
* pointer is alrady grabbed
|
* already grabbed
|
||||||
|
*
|
||||||
|
* - keybindingMode: used to set the current Main.KeybindingMode to filter
|
||||||
|
* global keybindings; the default of NONE will filter
|
||||||
|
* out all keybindings
|
||||||
*
|
*
|
||||||
* Returns: true iff we successfully acquired a grab or already had one
|
* Returns: true iff we successfully acquired a grab or already had one
|
||||||
*/
|
*/
|
||||||
function pushModal(actor, timestamp, options) {
|
function pushModal(actor, params) {
|
||||||
if (timestamp == undefined)
|
params = Params.parse(params, { timestamp: global.get_current_time(),
|
||||||
timestamp = global.get_current_time();
|
options: 0,
|
||||||
|
keybindingMode: KeybindingMode.NONE });
|
||||||
|
|
||||||
if (modalCount == 0) {
|
if (modalCount == 0) {
|
||||||
if (!global.begin_modal(timestamp, options ? options : 0)) {
|
if (!global.begin_modal(params.timestamp, params.options)) {
|
||||||
log('pushModal: invocation of begin_modal failed');
|
log('pushModal: invocation of begin_modal failed');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -606,8 +559,10 @@ function pushModal(actor, timestamp, options) {
|
|||||||
modalActorFocusStack.push({ actor: actor,
|
modalActorFocusStack.push({ actor: actor,
|
||||||
focus: curFocus,
|
focus: curFocus,
|
||||||
destroyId: actorDestroyId,
|
destroyId: actorDestroyId,
|
||||||
focusDestroyId: curFocusDestroyId });
|
focusDestroyId: curFocusDestroyId,
|
||||||
|
keybindingMode: keybindingMode });
|
||||||
|
|
||||||
|
keybindingMode = params.keybindingMode;
|
||||||
global.stage.set_key_focus(actor);
|
global.stage.set_key_focus(actor);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -634,6 +589,7 @@ function popModal(actor, timestamp) {
|
|||||||
global.stage.set_key_focus(null);
|
global.stage.set_key_focus(null);
|
||||||
global.end_modal(timestamp);
|
global.end_modal(timestamp);
|
||||||
global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
|
global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
|
||||||
|
keybindingMode = KeybindingMode.NORMAL;
|
||||||
|
|
||||||
throw new Error('incorrect pop');
|
throw new Error('incorrect pop');
|
||||||
}
|
}
|
||||||
@@ -646,6 +602,7 @@ function popModal(actor, timestamp) {
|
|||||||
if (focusIndex == modalActorFocusStack.length - 1) {
|
if (focusIndex == modalActorFocusStack.length - 1) {
|
||||||
if (record.focus)
|
if (record.focus)
|
||||||
record.focus.disconnect(record.focusDestroyId);
|
record.focus.disconnect(record.focusDestroyId);
|
||||||
|
keybindingMode = record.keybindingMode;
|
||||||
global.stage.set_key_focus(record.focus);
|
global.stage.set_key_focus(record.focus);
|
||||||
} else {
|
} else {
|
||||||
let t = modalActorFocusStack[modalActorFocusStack.length - 1];
|
let t = modalActorFocusStack[modalActorFocusStack.length - 1];
|
||||||
@@ -655,6 +612,7 @@ function popModal(actor, timestamp) {
|
|||||||
for (let i = modalActorFocusStack.length - 1; i > focusIndex; i--) {
|
for (let i = modalActorFocusStack.length - 1; i > focusIndex; i--) {
|
||||||
modalActorFocusStack[i].focus = modalActorFocusStack[i - 1].focus;
|
modalActorFocusStack[i].focus = modalActorFocusStack[i - 1].focus;
|
||||||
modalActorFocusStack[i].focusDestroyId = modalActorFocusStack[i - 1].focusDestroyId;
|
modalActorFocusStack[i].focusDestroyId = modalActorFocusStack[i - 1].focusDestroyId;
|
||||||
|
modalActorFocusStack[i].keybindingMode = modalActorFocusStack[i - 1].keybindingMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
modalActorFocusStack.splice(focusIndex, 1);
|
modalActorFocusStack.splice(focusIndex, 1);
|
||||||
@@ -665,6 +623,7 @@ function popModal(actor, timestamp) {
|
|||||||
global.end_modal(timestamp);
|
global.end_modal(timestamp);
|
||||||
global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
|
global.set_stage_input_mode(Shell.StageInputMode.NORMAL);
|
||||||
Meta.enable_unredirect_for_screen(global.screen);
|
Meta.enable_unredirect_for_screen(global.screen);
|
||||||
|
keybindingMode = KeybindingMode.NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
function createLookingGlass() {
|
function createLookingGlass() {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ const Clutter = imports.gi.Clutter;
|
|||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
|
const GnomeDesktop = imports.gi.GnomeDesktop;
|
||||||
const Atk = imports.gi.Atk;
|
const Atk = imports.gi.Atk;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
@@ -35,8 +36,6 @@ const LONGER_SUMMARY_TIMEOUT = 4;
|
|||||||
const HIDE_TIMEOUT = 0.2;
|
const HIDE_TIMEOUT = 0.2;
|
||||||
const LONGER_HIDE_TIMEOUT = 0.6;
|
const LONGER_HIDE_TIMEOUT = 0.6;
|
||||||
|
|
||||||
const NOTIFICATION_ICON_SIZE = 24;
|
|
||||||
|
|
||||||
// We delay hiding of the tray if the mouse is within MOUSE_LEFT_ACTOR_THRESHOLD
|
// We delay hiding of the tray if the mouse is within MOUSE_LEFT_ACTOR_THRESHOLD
|
||||||
// range from the point where it left the tray.
|
// range from the point where it left the tray.
|
||||||
const MOUSE_LEFT_ACTOR_THRESHOLD = 20;
|
const MOUSE_LEFT_ACTOR_THRESHOLD = 20;
|
||||||
@@ -143,14 +142,9 @@ const URLHighlighter = new Lang.Class({
|
|||||||
let url = this._urls[urlId].url;
|
let url = this._urls[urlId].url;
|
||||||
if (url.indexOf(':') == -1)
|
if (url.indexOf(':') == -1)
|
||||||
url = 'http://' + url;
|
url = 'http://' + url;
|
||||||
try {
|
|
||||||
Gio.app_info_launch_default_for_uri(url, global.create_app_launch_context());
|
Gio.app_info_launch_default_for_uri(url, global.create_app_launch_context());
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
|
||||||
// TODO: remove this after gnome 3 release
|
|
||||||
Util.spawn(['gvfs-open', url]);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
@@ -243,9 +237,7 @@ function makeCloseButton() {
|
|||||||
closeButton.connect('style-changed', function() {
|
closeButton.connect('style-changed', function() {
|
||||||
let themeNode = closeButton.get_theme_node();
|
let themeNode = closeButton.get_theme_node();
|
||||||
closeButton.translation_x = themeNode.get_length('-shell-close-overlap-x');
|
closeButton.translation_x = themeNode.get_length('-shell-close-overlap-x');
|
||||||
|
closeButton.translation_y = themeNode.get_length('-shell-close-overlap-y');
|
||||||
// libcroco doesn't support negative units
|
|
||||||
closeButton.translation_y = -themeNode.get_length('-shell-close-overlap-y');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return closeButton;
|
return closeButton;
|
||||||
@@ -291,9 +283,12 @@ function makeCloseButton() {
|
|||||||
// If @params contains a 'body' parameter, then that text will be added to
|
// If @params contains a 'body' parameter, then that text will be added to
|
||||||
// the content area (as with addBody()).
|
// the content area (as with addBody()).
|
||||||
//
|
//
|
||||||
// By default, the icon shown is created by calling
|
// By default, the icon shown is the same as the source's.
|
||||||
// source.createIcon(). However, if @params contains an 'icon'
|
// However, if @params contains a 'gicon' parameter, the passed in gicon
|
||||||
// parameter, the passed in icon will be used.
|
// will be used.
|
||||||
|
//
|
||||||
|
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
|
||||||
|
// is no fallback for this icon.
|
||||||
//
|
//
|
||||||
// If @params contains a 'titleMarkup', 'bannerMarkup', or
|
// If @params contains a 'titleMarkup', 'bannerMarkup', or
|
||||||
// 'bodyMarkup' parameter with the value %true, then the corresponding
|
// 'bodyMarkup' parameter with the value %true, then the corresponding
|
||||||
@@ -308,6 +303,8 @@ function makeCloseButton() {
|
|||||||
const Notification = new Lang.Class({
|
const Notification = new Lang.Class({
|
||||||
Name: 'Notification',
|
Name: 'Notification',
|
||||||
|
|
||||||
|
ICON_SIZE: 24,
|
||||||
|
|
||||||
IMAGE_SIZE: 125,
|
IMAGE_SIZE: 125,
|
||||||
|
|
||||||
_init: function(source, title, banner, params) {
|
_init: function(source, title, banner, params) {
|
||||||
@@ -317,6 +314,7 @@ const Notification = new Lang.Class({
|
|||||||
this.resident = false;
|
this.resident = false;
|
||||||
// 'transient' is a reserved keyword in JS, so we have to use an alternate variable name
|
// 'transient' is a reserved keyword in JS, so we have to use an alternate variable name
|
||||||
this.isTransient = false;
|
this.isTransient = false;
|
||||||
|
this.forFeedback = false;
|
||||||
this.expanded = false;
|
this.expanded = false;
|
||||||
this.focused = false;
|
this.focused = false;
|
||||||
this.acknowledged = false;
|
this.acknowledged = false;
|
||||||
@@ -391,8 +389,8 @@ const Notification = new Lang.Class({
|
|||||||
update: function(title, banner, params) {
|
update: function(title, banner, params) {
|
||||||
params = Params.parse(params, { customContent: false,
|
params = Params.parse(params, { customContent: false,
|
||||||
body: null,
|
body: null,
|
||||||
icon: null,
|
gicon: null,
|
||||||
secondaryIcon: null,
|
secondaryGIcon: null,
|
||||||
titleMarkup: false,
|
titleMarkup: false,
|
||||||
bannerMarkup: false,
|
bannerMarkup: false,
|
||||||
bodyMarkup: false,
|
bodyMarkup: false,
|
||||||
@@ -402,12 +400,12 @@ const Notification = new Lang.Class({
|
|||||||
|
|
||||||
let oldFocus = global.stage.key_focus;
|
let oldFocus = global.stage.key_focus;
|
||||||
|
|
||||||
if (this._icon && (params.icon || params.clear)) {
|
if (this._icon && (params.gicon || params.clear)) {
|
||||||
this._icon.destroy();
|
this._icon.destroy();
|
||||||
this._icon = null;
|
this._icon = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._secondaryIcon && (params.secondaryIcon || params.clear)) {
|
if (this._secondaryIcon && (params.secondaryGIcon || params.clear)) {
|
||||||
this._secondaryIcon.destroy();
|
this._secondaryIcon.destroy();
|
||||||
this._secondaryIcon = null;
|
this._secondaryIcon = null;
|
||||||
}
|
}
|
||||||
@@ -437,8 +435,14 @@ const Notification = new Lang.Class({
|
|||||||
if (!this._scrollArea && !this._actionArea && !this._imageBin)
|
if (!this._scrollArea && !this._actionArea && !this._imageBin)
|
||||||
this._table.remove_style_class_name('multi-line-notification');
|
this._table.remove_style_class_name('multi-line-notification');
|
||||||
|
|
||||||
if (!this._icon) {
|
if (params.gicon) {
|
||||||
this._icon = params.icon || this.source.createIcon(NOTIFICATION_ICON_SIZE);
|
this._icon = new St.Icon({ gicon: params.gicon,
|
||||||
|
icon_size: this.ICON_SIZE });
|
||||||
|
} else {
|
||||||
|
this._icon = this.source.createIcon(this.ICON_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._icon) {
|
||||||
this._table.add(this._icon, { row: 0,
|
this._table.add(this._icon, { row: 0,
|
||||||
col: 0,
|
col: 0,
|
||||||
x_expand: false,
|
x_expand: false,
|
||||||
@@ -447,11 +451,10 @@ const Notification = new Lang.Class({
|
|||||||
y_align: St.Align.START });
|
y_align: St.Align.START });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._secondaryIcon) {
|
if (params.secondaryGIcon) {
|
||||||
this._secondaryIcon = params.secondaryIcon;
|
this._secondaryIcon = new St.Icon({ gicon: params.secondaryGIcon,
|
||||||
|
style_class: 'secondary-icon' });
|
||||||
if (this._secondaryIcon)
|
this._bannerBox.add_actor(this._secondaryIcon);
|
||||||
this._bannerBox.add_actor(this._secondaryIcon);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.title = title;
|
this.title = title;
|
||||||
@@ -711,6 +714,10 @@ const Notification = new Lang.Class({
|
|||||||
this.isTransient = isTransient;
|
this.isTransient = isTransient;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setForFeedback: function(forFeedback) {
|
||||||
|
this.forFeedback = forFeedback;
|
||||||
|
},
|
||||||
|
|
||||||
setUseActionIcons: function(useIcons) {
|
setUseActionIcons: function(useIcons) {
|
||||||
this._useActionIcons = useIcons;
|
this._useActionIcons = useIcons;
|
||||||
},
|
},
|
||||||
@@ -1052,6 +1059,7 @@ const Source = new Lang.Class({
|
|||||||
this.isChat = false;
|
this.isChat = false;
|
||||||
this.isMuted = false;
|
this.isMuted = false;
|
||||||
this.showInLockScreen = true;
|
this.showInLockScreen = true;
|
||||||
|
this.keepTrayOnSummaryClick = false;
|
||||||
|
|
||||||
this.notifications = [];
|
this.notifications = [];
|
||||||
},
|
},
|
||||||
@@ -1080,14 +1088,14 @@ const Source = new Lang.Class({
|
|||||||
item = new PopupMenu.PopupMenuItem(_("Open"));
|
item = new PopupMenu.PopupMenuItem(_("Open"));
|
||||||
item.connect('activate', Lang.bind(this, function() {
|
item.connect('activate', Lang.bind(this, function() {
|
||||||
this.open();
|
this.open();
|
||||||
this.emit('done-displaying-content');
|
this.emit('done-displaying-content', true);
|
||||||
}));
|
}));
|
||||||
rightClickMenu.add(item.actor);
|
rightClickMenu.add(item.actor);
|
||||||
|
|
||||||
item = new PopupMenu.PopupMenuItem(_("Remove"));
|
item = new PopupMenu.PopupMenuItem(_("Remove"));
|
||||||
item.connect('activate', Lang.bind(this, function() {
|
item.connect('activate', Lang.bind(this, function() {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
this.emit('done-displaying-content');
|
this.emit('done-displaying-content', false);
|
||||||
}));
|
}));
|
||||||
rightClickMenu.add(item.actor);
|
rightClickMenu.add(item.actor);
|
||||||
return rightClickMenu;
|
return rightClickMenu;
|
||||||
@@ -1113,10 +1121,14 @@ const Source = new Lang.Class({
|
|||||||
// Provides a sane default implementation, override if you need
|
// Provides a sane default implementation, override if you need
|
||||||
// something more fancy.
|
// something more fancy.
|
||||||
createIcon: function(size) {
|
createIcon: function(size) {
|
||||||
return new St.Icon({ icon_name: this.iconName,
|
return new St.Icon({ gicon: this.getIcon(),
|
||||||
icon_size: size });
|
icon_size: size });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getIcon: function() {
|
||||||
|
return new Gio.ThemedIcon({ name: this.iconName });
|
||||||
|
},
|
||||||
|
|
||||||
_ensureMainIcon: function() {
|
_ensureMainIcon: function() {
|
||||||
if (this._mainIcon)
|
if (this._mainIcon)
|
||||||
return;
|
return;
|
||||||
@@ -1230,12 +1242,6 @@ const SummaryItem = new Lang.Class({
|
|||||||
|
|
||||||
this.notificationStackWidget = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this.notificationStackWidget = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
|
|
||||||
this._closeButton = makeCloseButton();
|
|
||||||
this._closeButton.connect('clicked', Lang.bind(this, function() {
|
|
||||||
source.destroy();
|
|
||||||
source.emit('done-displaying-content');
|
|
||||||
}));
|
|
||||||
|
|
||||||
this.notificationStackView = new St.ScrollView({ style_class: source.isChat ? '' : 'summary-notification-stack-scrollview',
|
this.notificationStackView = new St.ScrollView({ style_class: source.isChat ? '' : 'summary-notification-stack-scrollview',
|
||||||
vscrollbar_policy: source.isChat ? Gtk.PolicyType.NEVER : Gtk.PolicyType.AUTOMATIC,
|
vscrollbar_policy: source.isChat ? Gtk.PolicyType.NEVER : Gtk.PolicyType.AUTOMATIC,
|
||||||
hscrollbar_policy: Gtk.PolicyType.NEVER });
|
hscrollbar_policy: Gtk.PolicyType.NEVER });
|
||||||
@@ -1244,7 +1250,9 @@ const SummaryItem = new Lang.Class({
|
|||||||
vertical: true });
|
vertical: true });
|
||||||
this.notificationStackView.add_actor(this.notificationStack);
|
this.notificationStackView.add_actor(this.notificationStack);
|
||||||
this.notificationStackWidget.add_actor(this.notificationStackView);
|
this.notificationStackWidget.add_actor(this.notificationStackView);
|
||||||
this.notificationStackWidget.add_actor(this._closeButton);
|
|
||||||
|
this.closeButton = makeCloseButton();
|
||||||
|
this.notificationStackWidget.add_actor(this.closeButton);
|
||||||
this._stackedNotifications = [];
|
this._stackedNotifications = [];
|
||||||
|
|
||||||
this._oldMaxScrollAdjustment = 0;
|
this._oldMaxScrollAdjustment = 0;
|
||||||
@@ -1261,14 +1269,6 @@ const SummaryItem = new Lang.Class({
|
|||||||
global.focus_manager.add_group(this.rightClickMenu);
|
global.focus_manager.add_group(this.rightClickMenu);
|
||||||
},
|
},
|
||||||
|
|
||||||
get closeButtonVisible() {
|
|
||||||
return this._closeButton.visible;
|
|
||||||
},
|
|
||||||
|
|
||||||
set closeButtonVisible(v) {
|
|
||||||
this._closeButton.visible = v;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onKeyPress: function(actor, event) {
|
_onKeyPress: function(actor, event) {
|
||||||
if (event.get_key_symbol() == Clutter.KEY_Up) {
|
if (event.get_key_symbol() == Clutter.KEY_Up) {
|
||||||
actor.emit('clicked', 1);
|
actor.emit('clicked', 1);
|
||||||
@@ -1341,7 +1341,7 @@ const SummaryItem = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_notificationDoneDisplaying: function() {
|
_notificationDoneDisplaying: function() {
|
||||||
this.source.emit('done-displaying-content');
|
this.source.emit('done-displaying-content', true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_notificationDestroyed: function(notification) {
|
_notificationDestroyed: function(notification) {
|
||||||
@@ -1394,6 +1394,8 @@ const MessageTray = new Lang.Class({
|
|||||||
y_expand: true,
|
y_expand: true,
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
layout_manager: new Clutter.BinLayout() });
|
layout_manager: new Clutter.BinLayout() });
|
||||||
|
this._notificationWidget.connect('key-release-event', Lang.bind(this, this._onNotificationKeyRelease));
|
||||||
|
|
||||||
this.actor.add_actor(this._notificationWidget);
|
this.actor.add_actor(this._notificationWidget);
|
||||||
|
|
||||||
this._notificationBin = new St.Bin({ y_expand: true });
|
this._notificationBin = new St.Bin({ y_expand: true });
|
||||||
@@ -1410,7 +1412,7 @@ const MessageTray = new Lang.Class({
|
|||||||
actor.grab_key_focus();
|
actor.grab_key_focus();
|
||||||
}));
|
}));
|
||||||
global.focus_manager.add_group(this.actor);
|
global.focus_manager.add_group(this.actor);
|
||||||
this._summary = new St.BoxLayout({ name: 'summary-mode',
|
this._summary = new St.BoxLayout({ style_class: 'message-tray-summary',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
track_hover: true,
|
track_hover: true,
|
||||||
x_align: Clutter.ActorAlign.END,
|
x_align: Clutter.ActorAlign.END,
|
||||||
@@ -1439,25 +1441,26 @@ const MessageTray = new Lang.Class({
|
|||||||
this._clickedSummaryItem = null;
|
this._clickedSummaryItem = null;
|
||||||
this._clickedSummaryItemMouseButton = -1;
|
this._clickedSummaryItemMouseButton = -1;
|
||||||
this._clickedSummaryItemAllocationChangedId = 0;
|
this._clickedSummaryItemAllocationChangedId = 0;
|
||||||
this._pointerBarrier = 0;
|
|
||||||
|
|
||||||
this._closeButton = makeCloseButton();
|
this._closeButton = makeCloseButton();
|
||||||
this._closeButton.hide();
|
this._closeButton.hide();
|
||||||
this._closeButton.connect('clicked', Lang.bind(this, this._onCloseClicked));
|
this._closeButton.connect('clicked', Lang.bind(this, this._closeNotification));
|
||||||
this._notificationWidget.add_actor(this._closeButton);
|
this._notificationWidget.add_actor(this._closeButton);
|
||||||
|
|
||||||
this._idleMonitorWatchId = 0;
|
this._idleMonitorBecameActiveId = 0;
|
||||||
this._userActiveWhileNotificationShown = false;
|
this._userActiveWhileNotificationShown = false;
|
||||||
|
|
||||||
this.idleMonitor = Shell.IdleMonitor.get();
|
this.idleMonitor = new GnomeDesktop.IdleMonitor();
|
||||||
|
|
||||||
this._grabHelper = new GrabHelper.GrabHelper(this.actor);
|
this._grabHelper = new GrabHelper.GrabHelper(this.actor,
|
||||||
|
{ keybindingMode: Main.KeybindingMode.MESSAGE_TRAY });
|
||||||
this._grabHelper.addActor(this._summaryBoxPointer.actor);
|
this._grabHelper.addActor(this._summaryBoxPointer.actor);
|
||||||
this._grabHelper.addActor(this.actor);
|
this._grabHelper.addActor(this.actor);
|
||||||
if (Main.panel.statusArea.activities)
|
if (Main.panel.statusArea.activities)
|
||||||
this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor);
|
this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor);
|
||||||
|
|
||||||
Main.layoutManager.keyboardBox.connect('notify::hover', Lang.bind(this, this._onKeyboardHoverChanged));
|
Main.layoutManager.keyboardBox.connect('notify::hover', Lang.bind(this, this._onKeyboardHoverChanged));
|
||||||
|
Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged));
|
||||||
|
|
||||||
this._trayState = State.HIDDEN;
|
this._trayState = State.HIDDEN;
|
||||||
this._locked = false;
|
this._locked = false;
|
||||||
@@ -1466,6 +1469,8 @@ const MessageTray = new Lang.Class({
|
|||||||
this._trayLeftTimeoutId = 0;
|
this._trayLeftTimeoutId = 0;
|
||||||
this._pointerInTray = false;
|
this._pointerInTray = false;
|
||||||
this._pointerInKeyboard = false;
|
this._pointerInKeyboard = false;
|
||||||
|
this._keyboardVisible = false;
|
||||||
|
this._keyboardUnderMessageTray = false;
|
||||||
this._summaryState = State.HIDDEN;
|
this._summaryState = State.HIDDEN;
|
||||||
this._pointerInSummary = false;
|
this._pointerInSummary = false;
|
||||||
this._notificationClosed = false;
|
this._notificationClosed = false;
|
||||||
@@ -1474,11 +1479,13 @@ const MessageTray = new Lang.Class({
|
|||||||
this._notificationExpandedId = 0;
|
this._notificationExpandedId = 0;
|
||||||
this._summaryBoxPointerState = State.HIDDEN;
|
this._summaryBoxPointerState = State.HIDDEN;
|
||||||
this._summaryBoxPointerTimeoutId = 0;
|
this._summaryBoxPointerTimeoutId = 0;
|
||||||
|
this._desktopCloneState = State.HIDDEN;
|
||||||
this._overviewVisible = Main.overview.visible;
|
this._overviewVisible = Main.overview.visible;
|
||||||
this._notificationRemoved = false;
|
this._notificationRemoved = false;
|
||||||
this._reNotifyAfterHideNotification = null;
|
this._reNotifyAfterHideNotification = null;
|
||||||
this._inFullscreen = false;
|
this._inFullscreen = false;
|
||||||
this._desktopClone = null;
|
this._desktopClone = null;
|
||||||
|
this._inCtrlAltTab = false;
|
||||||
|
|
||||||
this._lightbox = new Lightbox.Lightbox(global.window_group,
|
this._lightbox = new Lightbox.Lightbox(global.window_group,
|
||||||
{ inhibitEvents: true,
|
{ inhibitEvents: true,
|
||||||
@@ -1510,12 +1517,22 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._updateState));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
|
|
||||||
global.display.add_keybinding('toggle-message-tray',
|
Main.wm.addKeybinding('toggle-message-tray',
|
||||||
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Lang.bind(this, this.toggleAndNavigate));
|
Main.KeybindingMode.NORMAL |
|
||||||
|
Main.KeybindingMode.MESSAGE_TRAY |
|
||||||
|
Main.KeybindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this.toggleAndNavigate));
|
||||||
|
Main.wm.addKeybinding('focus-active-notification',
|
||||||
|
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
|
Meta.KeyBindingFlags.NONE,
|
||||||
|
Main.KeybindingMode.NORMAL |
|
||||||
|
Main.KeybindingMode.MESSAGE_TRAY |
|
||||||
|
Main.KeybindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._expandActiveNotification));
|
||||||
|
|
||||||
this._summaryItems = [];
|
this._summaryItems = [];
|
||||||
this._chatSummaryItemsCount = 0;
|
this._chatSummaryItemsCount = 0;
|
||||||
@@ -1525,6 +1542,37 @@ const MessageTray = new Lang.Class({
|
|||||||
this._trayDwellTimeoutId = 0;
|
this._trayDwellTimeoutId = 0;
|
||||||
this._trayDwelling = false;
|
this._trayDwelling = false;
|
||||||
this._trayDwellUserTime = 0;
|
this._trayDwellUserTime = 0;
|
||||||
|
|
||||||
|
this._sessionUpdated();
|
||||||
|
this._updateNoMessagesLabel();
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateNoMessagesLabel: function() {
|
||||||
|
if (this._summaryItems.length == 0 && !this._noMessages) {
|
||||||
|
this._noMessages = new St.Label({ text: _("No Messages"),
|
||||||
|
style_class: 'no-messages-label',
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
x_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
y_expand: true });
|
||||||
|
this.actor.add_actor(this._noMessages);
|
||||||
|
} else if (this._summaryItems.length > 0 && this._noMessages) {
|
||||||
|
this._noMessages.destroy();
|
||||||
|
this._noMessages = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_sessionUpdated: function() {
|
||||||
|
if ((Main.sessionMode.isLocked || Main.sessionMode.isGreeter) && this._inCtrlAltTab) {
|
||||||
|
Main.ctrlAltTabManager.removeGroup(this._summary);
|
||||||
|
this._inCtrlAltTab = false;
|
||||||
|
} else if (!this._inCtrlAltTab) {
|
||||||
|
Main.ctrlAltTabManager.addGroup(this._summary, _("Message Tray"), 'user-available-symbolic',
|
||||||
|
{ focusCallback: Lang.bind(this, this.toggleAndNavigate),
|
||||||
|
sortGroup: CtrlAltTab.SortGroup.BOTTOM });
|
||||||
|
this._inCtrlAltTab = true;
|
||||||
|
}
|
||||||
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_checkTrayDwell: function(x, y) {
|
_checkTrayDwell: function(x, y) {
|
||||||
@@ -1561,6 +1609,11 @@ const MessageTray = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_trayDwellTimeout: function() {
|
_trayDwellTimeout: function() {
|
||||||
|
this._trayDwellTimeoutId = 0;
|
||||||
|
|
||||||
|
if (Main.modalCount > 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
// If the user interacted with the focus window since we started the tray
|
// If the user interacted with the focus window since we started the tray
|
||||||
// dwell (by clicking or typing), don't activate the message tray
|
// dwell (by clicking or typing), don't activate the message tray
|
||||||
let focusWindow = global.display.focus_window;
|
let focusWindow = global.display.focus_window;
|
||||||
@@ -1568,22 +1621,29 @@ const MessageTray = new Lang.Class({
|
|||||||
if (currentUserTime != this._trayDwellUserTime)
|
if (currentUserTime != this._trayDwellUserTime)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this._trayDwellTimeoutId = 0;
|
|
||||||
|
|
||||||
this._traySummoned = true;
|
this._traySummoned = true;
|
||||||
this._updateState();
|
this._updateState();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCloseClicked: function() {
|
_onNotificationKeyRelease: function(actor, event) {
|
||||||
|
let ignoredModifiers = global.display.get_ignored_modifier_mask();
|
||||||
|
let modifierState = event.get_state() & ~ignoredModifiers;
|
||||||
|
|
||||||
|
if (event.get_key_symbol() == Clutter.KEY_Escape && modifierState == 0) {
|
||||||
|
this._closeNotification();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_closeNotification: function() {
|
||||||
if (this._notificationState == State.SHOWN) {
|
if (this._notificationState == State.SHOWN) {
|
||||||
|
this._closeButton.hide();
|
||||||
this._notificationClosed = true;
|
this._notificationClosed = true;
|
||||||
this._notification.emit('done-displaying');
|
this._updateState();
|
||||||
|
|
||||||
if (!this._notification.resident)
|
|
||||||
this._notification.destroy();
|
|
||||||
|
|
||||||
this._notificationClosed = false;
|
this._notificationClosed = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1647,6 +1707,8 @@ const MessageTray = new Lang.Class({
|
|||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { this._updateState(); return false; }));
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { this._updateState(); return false; }));
|
||||||
|
|
||||||
this.emit('summary-item-added', summaryItem);
|
this.emit('summary-item-added', summaryItem);
|
||||||
|
|
||||||
|
this._updateNoMessagesLabel();
|
||||||
},
|
},
|
||||||
|
|
||||||
getSummaryItems: function() {
|
getSummaryItems: function() {
|
||||||
@@ -1679,6 +1741,8 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
summaryItemToRemove.actor.destroy();
|
summaryItemToRemove.actor.destroy();
|
||||||
|
|
||||||
|
this._updateNoMessagesLabel();
|
||||||
|
|
||||||
if (needUpdate)
|
if (needUpdate)
|
||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
@@ -1769,7 +1833,10 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
_onSummaryItemClicked: function(summaryItem, button) {
|
_onSummaryItemClicked: function(summaryItem, button) {
|
||||||
if (summaryItem.source.handleSummaryClick()) {
|
if (summaryItem.source.handleSummaryClick()) {
|
||||||
this._escapeTray();
|
if (summaryItem.source.keepTrayOnSummaryClick)
|
||||||
|
this._setClickedSummaryItem(null);
|
||||||
|
else
|
||||||
|
this._escapeTray();
|
||||||
} else {
|
} else {
|
||||||
if (!this._setClickedSummaryItem(summaryItem, button))
|
if (!this._setClickedSummaryItem(summaryItem, button))
|
||||||
this._setClickedSummaryItem(null);
|
this._setClickedSummaryItem(null);
|
||||||
@@ -1860,6 +1927,23 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onKeyboardVisibleChanged: function(layoutManager, keyboardVisible) {
|
||||||
|
let keyboardUnderMessageTray = layoutManager.keyboardIndex == layoutManager.bottomIndex;
|
||||||
|
if (this._keyboardVisible == keyboardVisible &&
|
||||||
|
this._keyboardUnderMesssageTray == keyboardUnderMessageTray)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._keyboardVisible = keyboardVisible;
|
||||||
|
this._keyboardUnderMessageTray = keyboardUnderMessageTray;
|
||||||
|
|
||||||
|
if (keyboardVisible && keyboardUnderMessageTray)
|
||||||
|
this.actor.add_style_pseudo_class('keyboard');
|
||||||
|
else
|
||||||
|
this.actor.remove_style_pseudo_class('keyboard');
|
||||||
|
|
||||||
|
this._updateState();
|
||||||
|
},
|
||||||
|
|
||||||
_onFullscreenChanged: function(obj, state) {
|
_onFullscreenChanged: function(obj, state) {
|
||||||
this._inFullscreen = state;
|
this._inFullscreen = state;
|
||||||
this._updateState();
|
this._updateState();
|
||||||
@@ -1922,8 +2006,9 @@ const MessageTray = new Lang.Class({
|
|||||||
// Notifications
|
// Notifications
|
||||||
let notificationQueue = this._notificationQueue;
|
let notificationQueue = this._notificationQueue;
|
||||||
let notificationUrgent = notificationQueue.length > 0 && notificationQueue[0].urgency == Urgency.CRITICAL;
|
let notificationUrgent = notificationQueue.length > 0 && notificationQueue[0].urgency == Urgency.CRITICAL;
|
||||||
|
let notificationForFeedback = notificationQueue.length > 0 && notificationQueue[0].forFeedback;
|
||||||
let notificationsLimited = this._busy || this._inFullscreen;
|
let notificationsLimited = this._busy || this._inFullscreen;
|
||||||
let notificationsPending = notificationQueue.length > 0 && (!notificationsLimited || notificationUrgent) && Main.sessionMode.hasNotifications;
|
let notificationsPending = notificationQueue.length > 0 && (!notificationsLimited || notificationUrgent || notificationForFeedback) && Main.sessionMode.hasNotifications;
|
||||||
let nextNotification = notificationQueue.length > 0 ? notificationQueue[0] : null;
|
let nextNotification = notificationQueue.length > 0 ? notificationQueue[0] : null;
|
||||||
let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;
|
let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;
|
||||||
let notificationExpanded = this._notification && this._notification.expanded;
|
let notificationExpanded = this._notification && this._notification.expanded;
|
||||||
@@ -1955,8 +2040,7 @@ const MessageTray = new Lang.Class({
|
|||||||
let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
|
let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
|
||||||
let summaryHovered = this._pointerInTray || this._pointerInSummary;
|
let summaryHovered = this._pointerInTray || this._pointerInSummary;
|
||||||
|
|
||||||
let notificationsVisible = (this._notificationState == State.SHOWING ||
|
let notificationsVisible = this._notificationState != State.HIDDEN;
|
||||||
this._notificationState == State.SHOWN);
|
|
||||||
let notificationsDone = !notificationsVisible && !notificationsPending;
|
let notificationsDone = !notificationsVisible && !notificationsPending;
|
||||||
|
|
||||||
let summaryOptionalInOverview = this._overviewVisible && !this._locked && !summaryHovered;
|
let summaryOptionalInOverview = this._overviewVisible && !this._locked && !summaryHovered;
|
||||||
@@ -2000,9 +2084,22 @@ const MessageTray = new Lang.Class({
|
|||||||
let trayShouldBeVisible = (this._summaryState == State.SHOWING ||
|
let trayShouldBeVisible = (this._summaryState == State.SHOWING ||
|
||||||
this._summaryState == State.SHOWN);
|
this._summaryState == State.SHOWN);
|
||||||
if (!trayIsVisible && trayShouldBeVisible)
|
if (!trayIsVisible && trayShouldBeVisible)
|
||||||
this._showTray();
|
trayShouldBeVisible = this._showTray();
|
||||||
else if (trayIsVisible && !trayShouldBeVisible)
|
else if (trayIsVisible && !trayShouldBeVisible)
|
||||||
this._hideTray();
|
this._hideTray();
|
||||||
|
|
||||||
|
// Desktop clone
|
||||||
|
let desktopCloneIsVisible = (this._desktopCloneState == State.SHOWING ||
|
||||||
|
this._desktopCloneState == State.SHOWN);
|
||||||
|
let desktopCloneShouldBeVisible = (trayShouldBeVisible &&
|
||||||
|
!this._overviewVisible &&
|
||||||
|
(!this._keyboardVisible || !this._keyboardUnderMessageTray));
|
||||||
|
|
||||||
|
if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) {
|
||||||
|
this._showDesktopClone();
|
||||||
|
} else if (desktopCloneIsVisible && !desktopCloneShouldBeVisible) {
|
||||||
|
this._hideDesktopClone (this._keyboardVisible && this._keyboardUnderMessageTray);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_tween: function(actor, statevar, value, params) {
|
_tween: function(actor, statevar, value, params) {
|
||||||
@@ -2014,6 +2111,8 @@ const MessageTray = new Lang.Class({
|
|||||||
params.onCompleteScope = this;
|
params.onCompleteScope = this;
|
||||||
params.onCompleteParams = [statevar, value, onComplete, onCompleteScope, onCompleteParams];
|
params.onCompleteParams = [statevar, value, onComplete, onCompleteScope, onCompleteParams];
|
||||||
|
|
||||||
|
// Remove other tweens that could mess with the state machine
|
||||||
|
Tweener.removeTweens(actor);
|
||||||
Tweener.addTween(actor, params);
|
Tweener.addTween(actor, params);
|
||||||
|
|
||||||
let valuing = (value == State.SHOWN) ? State.SHOWING : State.HIDING;
|
let valuing = (value == State.SHOWN) ? State.SHOWING : State.HIDING;
|
||||||
@@ -2031,11 +2130,13 @@ const MessageTray = new Lang.Class({
|
|||||||
// Don't actually take a modal grab in the overview.
|
// Don't actually take a modal grab in the overview.
|
||||||
// Just add something to the grab stack that we can
|
// Just add something to the grab stack that we can
|
||||||
// pop later.
|
// pop later.
|
||||||
|
let modal = !this._overviewVisible;
|
||||||
|
|
||||||
if (!this._grabHelper.grab({ actor: this.actor,
|
if (!this._grabHelper.grab({ actor: this.actor,
|
||||||
modal: !this._overviewVisible,
|
modal: modal,
|
||||||
onUngrab: Lang.bind(this, this._escapeTray) })) {
|
onUngrab: Lang.bind(this, this._escapeTray) })) {
|
||||||
this._traySummoned = false;
|
this._traySummoned = false;
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._tween(this.actor, '_trayState', State.SHOWN,
|
this._tween(this.actor, '_trayState', State.SHOWN,
|
||||||
@@ -2044,45 +2145,49 @@ const MessageTray = new Lang.Class({
|
|||||||
transition: 'easeOutQuad'
|
transition: 'easeOutQuad'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Don't move the windows up if we are in the overview,
|
if (!this._overviewVisible)
|
||||||
// but show the tray in the ctrl+alt+tab list.
|
this._lightbox.show();
|
||||||
if (this._overviewVisible) {
|
|
||||||
Main.ctrlAltTabManager.addGroup(this._summary, _("Message Tray"), 'start-here-symbolic',
|
|
||||||
{ sortGroup: CtrlAltTab.SortGroup.BOTTOM });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateDesktopCloneClip: function() {
|
||||||
|
let geometry = this._bottomMonitorGeometry;
|
||||||
|
let progress = -Math.round(this._desktopClone.y);
|
||||||
|
this._desktopClone.set_clip(geometry.x,
|
||||||
|
geometry.y + progress,
|
||||||
|
geometry.width,
|
||||||
|
geometry.height - progress);
|
||||||
|
},
|
||||||
|
|
||||||
|
_showDesktopClone: function() {
|
||||||
let bottomMonitor = Main.layoutManager.bottomMonitor;
|
let bottomMonitor = Main.layoutManager.bottomMonitor;
|
||||||
let geometry = new Clutter.Geometry({ x: bottomMonitor.x,
|
this._bottomMonitorGeometry = { x: bottomMonitor.x,
|
||||||
y: bottomMonitor.y,
|
y: bottomMonitor.y,
|
||||||
width: bottomMonitor.width,
|
width: bottomMonitor.width,
|
||||||
height: bottomMonitor.height
|
height: bottomMonitor.height };
|
||||||
});
|
|
||||||
this._desktopClone = new Clutter.Clone({ source: global.window_group, clip: geometry });
|
if (this._desktopClone)
|
||||||
|
this._desktopClone.destroy();
|
||||||
|
this._desktopClone = new Clutter.Clone({ source: global.window_group, clip: new Clutter.Geometry(this._bottomMonitorGeometry) });
|
||||||
Main.uiGroup.insert_child_above(this._desktopClone, global.window_group);
|
Main.uiGroup.insert_child_above(this._desktopClone, global.window_group);
|
||||||
this._desktopClone.x = 0;
|
this._desktopClone.x = 0;
|
||||||
this._desktopClone.y = 0;
|
this._desktopClone.y = 0;
|
||||||
this._desktopClone.show();
|
this._desktopClone.show();
|
||||||
|
|
||||||
this._lightbox.show();
|
this._tween(this._desktopClone, '_desktopCloneState', State.SHOWN,
|
||||||
|
{ y: -this.actor.height,
|
||||||
this._desktopClone._progress = 0;
|
time: ANIMATION_TIME,
|
||||||
Tweener.addTween(this._desktopClone,
|
transition: 'easeOutQuad',
|
||||||
{ _progress: this.actor.height,
|
onUpdate: Lang.bind(this, this._updateDesktopCloneClip)
|
||||||
time: ANIMATION_TIME,
|
});
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onUpdate: Lang.bind(this, function() {
|
|
||||||
let progress = Math.round(this._desktopClone._progress);
|
|
||||||
this._desktopClone.y = - progress;
|
|
||||||
this._desktopClone.set_clip(geometry.x,
|
|
||||||
geometry.y + progress,
|
|
||||||
geometry.width,
|
|
||||||
geometry.height - progress);
|
|
||||||
})
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideTray: function() {
|
_hideTray: function() {
|
||||||
|
// Having the summary item animate out while sliding down the tray
|
||||||
|
// is distracting, so hide it immediately in case it was visible.
|
||||||
|
this._summaryBoxPointer.actor.hide();
|
||||||
|
|
||||||
this._tween(this.actor, '_trayState', State.HIDDEN,
|
this._tween(this.actor, '_trayState', State.HIDDEN,
|
||||||
{ y: 0,
|
{ y: 0,
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
@@ -2093,51 +2198,43 @@ const MessageTray = new Lang.Class({
|
|||||||
// which would happen if GrabHelper ungrabbed for us.
|
// which would happen if GrabHelper ungrabbed for us.
|
||||||
// This is a no-op in that case.
|
// This is a no-op in that case.
|
||||||
this._grabHelper.ungrab({ actor: this.actor });
|
this._grabHelper.ungrab({ actor: this.actor });
|
||||||
|
|
||||||
// If we are coming back from the overview, there are no windows
|
|
||||||
// to be moved. Just remove the tray from the ctrl+alt+tab list.
|
|
||||||
if (!this._desktopClone) {
|
|
||||||
Main.ctrlAltTabManager.removeGroup(this._summary);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let geometry = this._desktopClone.clip;
|
|
||||||
this._desktopClone._progress = 0;
|
|
||||||
Tweener.addTween(this._desktopClone,
|
|
||||||
{ _progress: this.actor.height,
|
|
||||||
time: ANIMATION_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: Lang.bind(this, function() {
|
|
||||||
this._desktopClone.destroy();
|
|
||||||
this._desktopClone = null;
|
|
||||||
}),
|
|
||||||
onUpdate: Lang.bind(this, function() {
|
|
||||||
let progress = Math.round(this._desktopClone._progress);
|
|
||||||
this._desktopClone.y = progress - this.actor.height;
|
|
||||||
this._desktopClone.set_clip(geometry.x,
|
|
||||||
geometry.y - progress,
|
|
||||||
geometry.width,
|
|
||||||
geometry.height + progress);
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
this._lightbox.hide();
|
this._lightbox.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onIdleMonitorWatch: function(monitor, id, userBecameIdle) {
|
_hideDesktopClone: function(now) {
|
||||||
this.idleMonitor.remove_watch(this._idleMonitorWatchId);
|
this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
|
||||||
this._idleMonitorWatchId = 0;
|
{ y: 0,
|
||||||
if (!userBecameIdle)
|
time: now ? 0 : ANIMATION_TIME,
|
||||||
this._updateNotificationTimeout(2000);
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: Lang.bind(this, function() {
|
||||||
|
this._desktopClone.destroy();
|
||||||
|
this._desktopClone = null;
|
||||||
|
this._bottomMonitorGeometry = null;
|
||||||
|
}),
|
||||||
|
onUpdate: Lang.bind(this, this._updateDesktopCloneClip)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_onIdleMonitorBecameActive: function() {
|
||||||
|
this.idleMonitor.disconnect(this._idleMonitorBecameActiveId);
|
||||||
|
this._idleMonitorBecameActiveId = 0;
|
||||||
|
|
||||||
this._userActiveWhileNotificationShown = true;
|
this._userActiveWhileNotificationShown = true;
|
||||||
|
this._updateNotificationTimeout(2000);
|
||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_showNotification: function() {
|
_showNotification: function() {
|
||||||
this._notification = this._notificationQueue.shift();
|
this._notification = this._notificationQueue.shift();
|
||||||
this._userActiveWhileNotificationShown = this.idleMonitor.get_idletime() <= IDLE_TIME;
|
|
||||||
this._idleMonitorWatchId = this.idleMonitor.add_watch(IDLE_TIME,
|
let userIdle = this.idleMonitor.get_idletime() > IDLE_TIME;
|
||||||
Lang.bind(this, this._onIdleMonitorWatch));
|
if (userIdle) {
|
||||||
|
this._userActiveWhileNotificationShown = false;
|
||||||
|
this._idleMonitorBecameActiveId = this.idleMonitor.connect('became-active', Lang.bind(this, this._onIdleMonitorBecameActive));
|
||||||
|
} else {
|
||||||
|
this._userActiveWhileNotificationShown = true;
|
||||||
|
}
|
||||||
|
|
||||||
this._notificationClickedId = this._notification.connect('done-displaying',
|
this._notificationClickedId = this._notification.connect('done-displaying',
|
||||||
Lang.bind(this, this._escapeTray));
|
Lang.bind(this, this._escapeTray));
|
||||||
this._notification.connect('unfocused', Lang.bind(this, function() {
|
this._notification.connect('unfocused', Lang.bind(this, function() {
|
||||||
@@ -2169,40 +2266,28 @@ const MessageTray = new Lang.Class({
|
|||||||
_updateShowingNotification: function() {
|
_updateShowingNotification: function() {
|
||||||
this._notification.acknowledged = true;
|
this._notification.acknowledged = true;
|
||||||
|
|
||||||
Tweener.removeTweens(this._notificationWidget);
|
|
||||||
|
|
||||||
// We auto-expand notifications with CRITICAL urgency.
|
// We auto-expand notifications with CRITICAL urgency.
|
||||||
// We use Tweener.removeTweens() to remove a tween that was hiding the notification we are
|
if (this._notification.urgency == Urgency.CRITICAL)
|
||||||
// updating, in case that notification was in the process of being hidden. However,
|
|
||||||
// Tweener.removeTweens() would also remove a tween that was updating the position of the
|
|
||||||
// notification we are updating, in case that notification was already expanded and its height
|
|
||||||
// changed. Therefore we need to call this._expandNotification() for expanded notifications
|
|
||||||
// to make sure their position is updated.
|
|
||||||
if (this._notification.urgency == Urgency.CRITICAL || this._notification.expanded)
|
|
||||||
this._expandNotification(true);
|
this._expandNotification(true);
|
||||||
|
|
||||||
// We tween all notifications to full opacity. This ensures that both new notifications and
|
// We tween all notifications to full opacity. This ensures that both new notifications and
|
||||||
// notifications that might have been in the process of hiding get full opacity.
|
// notifications that might have been in the process of hiding get full opacity.
|
||||||
//
|
//
|
||||||
// We tween any notification showing in the banner mode to banner height
|
// We tween any notification showing in the banner mode to the appropriate height
|
||||||
// (this._notificationWidget.y = -this._notificationWidget.height).
|
// (which is banner height or expanded height, depending on the notification state)
|
||||||
// This ensures that both new notifications and notifications in the banner mode that might
|
// This ensures that both new notifications and notifications in the banner mode that might
|
||||||
// have been in the process of hiding are shown with the banner height.
|
// have been in the process of hiding are shown with the correct height.
|
||||||
//
|
//
|
||||||
// We use this._showNotificationCompleted() onComplete callback to extend the time the updated
|
// We use this._showNotificationCompleted() onComplete callback to extend the time the updated
|
||||||
// notification is being shown.
|
// notification is being shown.
|
||||||
//
|
|
||||||
// We don't set the y parameter for the tween for expanded notifications because
|
|
||||||
// this._expandNotification() will result in getting this._notificationWidget.y set to the appropriate
|
|
||||||
// fully expanded value.
|
|
||||||
let tweenParams = { opacity: 255,
|
let tweenParams = { opacity: 255,
|
||||||
|
y: -this._notificationWidget.height,
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: this._showNotificationCompleted,
|
onComplete: this._showNotificationCompleted,
|
||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
};
|
};
|
||||||
if (!this._notification.expanded)
|
|
||||||
tweenParams.y = -this._notificationWidget.height;
|
|
||||||
|
|
||||||
this._tween(this._notificationWidget, '_notificationState', State.SHOWN, tweenParams);
|
this._tween(this._notificationWidget, '_notificationState', State.SHOWN, tweenParams);
|
||||||
},
|
},
|
||||||
@@ -2248,14 +2333,32 @@ const MessageTray = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_hideNotification: function() {
|
_hideNotification: function() {
|
||||||
|
// HACK!
|
||||||
|
// There seems to be a reentrancy issue in calling .ungrab() here,
|
||||||
|
// which causes _updateState to be called before _notificationState
|
||||||
|
// becomes HIDING. That hides the notification again, nullifying the
|
||||||
|
// object but not setting _notificationState (and that's the weird part)
|
||||||
|
// As then _notificationState is stuck into SHOWN but _notification
|
||||||
|
// is null, every new _updateState fails and the message tray is
|
||||||
|
// lost forever.
|
||||||
|
//
|
||||||
|
// See more at https://bugzilla.gnome.org/show_bug.cgi?id=683986
|
||||||
|
this._notificationState = State.HIDING;
|
||||||
|
|
||||||
this._grabHelper.ungrab({ actor: this._notification.actor });
|
this._grabHelper.ungrab({ actor: this._notification.actor });
|
||||||
|
|
||||||
|
if (this._idleMonitorBecameActiveId) {
|
||||||
|
this.idleMonitor.disconnect(this._idleMonitorBecameActiveId);
|
||||||
|
this._idleMonitorBecameActiveId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._notificationExpandedId) {
|
if (this._notificationExpandedId) {
|
||||||
this._notification.disconnect(this._notificationExpandedId);
|
this._notification.disconnect(this._notificationExpandedId);
|
||||||
this._notificationExpandedId = 0;
|
this._notificationExpandedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._notificationRemoved) {
|
if (this._notificationRemoved) {
|
||||||
|
Tweener.removeTweens(this._notificationWidget);
|
||||||
this._notificationWidget.y = this.actor.height;
|
this._notificationWidget.y = this.actor.height;
|
||||||
this._notificationWidget.opacity = 0;
|
this._notificationWidget.opacity = 0;
|
||||||
this._notificationState = State.HIDDEN;
|
this._notificationState = State.HIDDEN;
|
||||||
@@ -2289,6 +2392,13 @@ const MessageTray = new Lang.Class({
|
|||||||
notification.destroy(NotificationDestroyedReason.EXPIRED);
|
notification.destroy(NotificationDestroyedReason.EXPIRED);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_expandActiveNotification: function() {
|
||||||
|
if (!this._notification)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._expandNotification(false);
|
||||||
|
},
|
||||||
|
|
||||||
_expandNotification: function(autoExpanding) {
|
_expandNotification: function(autoExpanding) {
|
||||||
// Don't grab focus in notifications that are auto-expanded.
|
// Don't grab focus in notifications that are auto-expanded.
|
||||||
if (!autoExpanding)
|
if (!autoExpanding)
|
||||||
@@ -2312,8 +2422,11 @@ const MessageTray = new Lang.Class({
|
|||||||
if (this._notificationWidget.y < expandedY) {
|
if (this._notificationWidget.y < expandedY) {
|
||||||
this._notificationWidget.y = expandedY;
|
this._notificationWidget.y = expandedY;
|
||||||
} else if (this._notification.y != expandedY) {
|
} else if (this._notification.y != expandedY) {
|
||||||
|
// Tween also opacity here, to override a possible tween that's
|
||||||
|
// currently hiding the notification.
|
||||||
this._tween(this._notificationWidget, '_notificationState', State.SHOWN,
|
this._tween(this._notificationWidget, '_notificationState', State.SHOWN,
|
||||||
{ y: expandedY,
|
{ y: expandedY,
|
||||||
|
opacity: 255,
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad'
|
transition: 'easeOutQuad'
|
||||||
});
|
});
|
||||||
@@ -2344,12 +2457,21 @@ const MessageTray = new Lang.Class({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onSourceDoneDisplayingContent: function(source, closeTray) {
|
||||||
|
if (closeTray) {
|
||||||
|
this._escapeTray();
|
||||||
|
} else {
|
||||||
|
this._setClickedSummaryItem(null);
|
||||||
|
this._updateState();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_showSummaryBoxPointer: function() {
|
_showSummaryBoxPointer: function() {
|
||||||
this._summaryBoxPointerItem = this._clickedSummaryItem;
|
this._summaryBoxPointerItem = this._clickedSummaryItem;
|
||||||
this._summaryBoxPointerContentUpdatedId = this._summaryBoxPointerItem.connect('content-updated',
|
this._summaryBoxPointerContentUpdatedId = this._summaryBoxPointerItem.connect('content-updated',
|
||||||
Lang.bind(this, this._onSummaryBoxPointerContentUpdated));
|
Lang.bind(this, this._onSummaryBoxPointerContentUpdated));
|
||||||
this._sourceDoneDisplayingId = this._summaryBoxPointerItem.source.connect('done-displaying-content',
|
this._sourceDoneDisplayingId = this._summaryBoxPointerItem.source.connect('done-displaying-content',
|
||||||
Lang.bind(this, this._escapeTray));
|
Lang.bind(this, this._onSourceDoneDisplayingContent));
|
||||||
|
|
||||||
let hasRightClickMenu = this._summaryBoxPointerItem.rightClickMenu != null;
|
let hasRightClickMenu = this._summaryBoxPointerItem.rightClickMenu != null;
|
||||||
if (this._clickedSummaryItemMouseButton == 1 || !hasRightClickMenu) {
|
if (this._clickedSummaryItemMouseButton == 1 || !hasRightClickMenu) {
|
||||||
@@ -2365,10 +2487,14 @@ const MessageTray = new Lang.Class({
|
|||||||
this._notificationQueue = newQueue;
|
this._notificationQueue = newQueue;
|
||||||
|
|
||||||
this._summaryBoxPointer.bin.child = this._summaryBoxPointerItem.notificationStackWidget;
|
this._summaryBoxPointer.bin.child = this._summaryBoxPointerItem.notificationStackWidget;
|
||||||
this._summaryBoxPointerItem.closeButtonVisible = true;
|
|
||||||
|
let closeButton = this._summaryBoxPointerItem.closeButton;
|
||||||
|
closeButton.show();
|
||||||
|
this._summaryBoxPointerCloseClickedId = closeButton.connect('clicked', Lang.bind(this, this._hideSummaryBoxPointer));
|
||||||
this._summaryBoxPointerItem.prepareNotificationStackForShowing();
|
this._summaryBoxPointerItem.prepareNotificationStackForShowing();
|
||||||
} else if (this._clickedSummaryItemMouseButton == 3) {
|
} else if (this._clickedSummaryItemMouseButton == 3) {
|
||||||
this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu;
|
this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu;
|
||||||
|
this._summaryBoxPointerCloseClickedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child,
|
this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child,
|
||||||
@@ -2457,6 +2583,9 @@ const MessageTray = new Lang.Class({
|
|||||||
this._summaryBoxPointer.actor.hide();
|
this._summaryBoxPointer.actor.hide();
|
||||||
this._hideSummaryBoxPointerCompleted();
|
this._hideSummaryBoxPointerCompleted();
|
||||||
} else {
|
} else {
|
||||||
|
if (global.stage.key_focus &&
|
||||||
|
!this.actor.contains(global.stage.key_focus))
|
||||||
|
this._setClickedSummaryItem(null);
|
||||||
this._summaryBoxPointer.hide(BoxPointer.PopupAnimation.FULL, Lang.bind(this, this._hideSummaryBoxPointerCompleted));
|
this._summaryBoxPointer.hide(BoxPointer.PopupAnimation.FULL, Lang.bind(this, this._hideSummaryBoxPointerCompleted));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2472,6 +2601,10 @@ const MessageTray = new Lang.Class({
|
|||||||
this._summaryBoxPointer.bin.child = null;
|
this._summaryBoxPointer.bin.child = null;
|
||||||
this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
|
this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
|
||||||
this._summaryBoxPointerContentUpdatedId = 0;
|
this._summaryBoxPointerContentUpdatedId = 0;
|
||||||
|
if (this._summaryBoxPointerCloseClickedId != 0) {
|
||||||
|
this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId);
|
||||||
|
this._summaryBoxPointerCloseClickedId = 0;
|
||||||
|
}
|
||||||
this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
|
this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
|
||||||
this._summaryBoxPointerDoneDisplayingId = 0;
|
this._summaryBoxPointerDoneDisplayingId = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ const Main = imports.ui.main;
|
|||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const OPEN_AND_CLOSE_TIME = 0.1;
|
const OPEN_AND_CLOSE_TIME = 0.1;
|
||||||
const FADE_IN_BUTTONS_TIME = 0.33;
|
|
||||||
const FADE_OUT_DIALOG_TIME = 1.0;
|
const FADE_OUT_DIALOG_TIME = 1.0;
|
||||||
|
|
||||||
const State = {
|
const State = {
|
||||||
@@ -38,10 +37,12 @@ const ModalDialog = new Lang.Class({
|
|||||||
params = Params.parse(params, { shellReactive: false,
|
params = Params.parse(params, { shellReactive: false,
|
||||||
styleClass: null,
|
styleClass: null,
|
||||||
parentActor: Main.uiGroup,
|
parentActor: Main.uiGroup,
|
||||||
|
keybindingMode: Main.KeybindingMode.SYSTEM_MODAL,
|
||||||
shouldFadeIn: true });
|
shouldFadeIn: true });
|
||||||
|
|
||||||
this.state = State.CLOSED;
|
this.state = State.CLOSED;
|
||||||
this._hasModal = false;
|
this._hasModal = false;
|
||||||
|
this._keybindingMode = params.keybindingMode;
|
||||||
this._shellReactive = params.shellReactive;
|
this._shellReactive = params.shellReactive;
|
||||||
this._shouldFadeIn = params.shouldFadeIn;
|
this._shouldFadeIn = params.shouldFadeIn;
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ const ModalDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._group.connect('destroy', Lang.bind(this, this._onGroupDestroy));
|
this._group.connect('destroy', Lang.bind(this, this._onGroupDestroy));
|
||||||
|
|
||||||
this._actionKeys = {};
|
this._buttonKeys = {};
|
||||||
this._group.connect('key-release-event', Lang.bind(this, this._onKeyReleaseEvent));
|
this._group.connect('key-release-event', Lang.bind(this, this._onKeyReleaseEvent));
|
||||||
|
|
||||||
this._backgroundBin = new St.Bin();
|
this._backgroundBin = new St.Bin();
|
||||||
@@ -94,10 +95,10 @@ const ModalDialog = new Lang.Class({
|
|||||||
x_align: St.Align.MIDDLE,
|
x_align: St.Align.MIDDLE,
|
||||||
y_align: St.Align.START });
|
y_align: St.Align.START });
|
||||||
|
|
||||||
this._buttonLayout = new St.BoxLayout({ style_class: 'modal-dialog-button-box',
|
this.buttonLayout = new St.BoxLayout({ style_class: 'modal-dialog-button-box',
|
||||||
visible: false,
|
visible: false,
|
||||||
vertical: false });
|
vertical: false });
|
||||||
this.dialogLayout.add(this._buttonLayout,
|
this.dialogLayout.add(this.buttonLayout,
|
||||||
{ expand: true,
|
{ expand: true,
|
||||||
x_align: St.Align.MIDDLE,
|
x_align: St.Align.MIDDLE,
|
||||||
y_align: St.Align.END });
|
y_align: St.Align.END });
|
||||||
@@ -112,34 +113,17 @@ const ModalDialog = new Lang.Class({
|
|||||||
this._group.destroy();
|
this._group.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
setActionKey: function(key, action) {
|
clearButtons: function() {
|
||||||
this._actionKeys[key] = action;
|
this.buttonLayout.destroy_all_children();
|
||||||
|
this._buttonKeys = {};
|
||||||
},
|
},
|
||||||
|
|
||||||
setButtons: function(buttons) {
|
setButtons: function(buttons) {
|
||||||
let hadChildren = this._buttonLayout.get_children() > 0;
|
this.clearButtons();
|
||||||
|
this.buttonLayout.visible = (buttons.length > 0);
|
||||||
this._buttonLayout.destroy_all_children();
|
|
||||||
this._actionKeys = {};
|
|
||||||
|
|
||||||
this._buttonLayout.visible = (buttons.length > 0);
|
|
||||||
|
|
||||||
for (let i = 0; i < buttons.length; i++) {
|
for (let i = 0; i < buttons.length; i++) {
|
||||||
let buttonInfo = buttons[i];
|
let buttonInfo = buttons[i];
|
||||||
let label = buttonInfo['label'];
|
|
||||||
let action = buttonInfo['action'];
|
|
||||||
let key = buttonInfo['key'];
|
|
||||||
let isDefault = buttonInfo['default'];
|
|
||||||
|
|
||||||
if (isDefault && !key)
|
|
||||||
key = Clutter.KEY_Return;
|
|
||||||
|
|
||||||
buttonInfo.button = new St.Button({ style_class: 'modal-dialog-button',
|
|
||||||
reactive: true,
|
|
||||||
can_focus: true,
|
|
||||||
label: label });
|
|
||||||
if (isDefault)
|
|
||||||
buttonInfo.button.add_style_pseudo_class('default');
|
|
||||||
|
|
||||||
let x_alignment;
|
let x_alignment;
|
||||||
if (buttons.length == 1)
|
if (buttons.length == 1)
|
||||||
@@ -151,43 +135,62 @@ const ModalDialog = new Lang.Class({
|
|||||||
else
|
else
|
||||||
x_alignment = St.Align.MIDDLE;
|
x_alignment = St.Align.MIDDLE;
|
||||||
|
|
||||||
if (!this._initialKeyFocusDestroyId)
|
this.addButton(buttonInfo, { expand: true,
|
||||||
this._initialKeyFocus = buttonInfo.button;
|
x_fill: false,
|
||||||
this._buttonLayout.add(buttonInfo.button,
|
y_fill: false,
|
||||||
{ expand: true,
|
x_align: x_alignment,
|
||||||
x_fill: false,
|
y_align: St.Align.MIDDLE });
|
||||||
y_fill: false,
|
|
||||||
x_align: x_alignment,
|
|
||||||
y_align: St.Align.MIDDLE });
|
|
||||||
|
|
||||||
buttonInfo.button.connect('clicked', action);
|
|
||||||
|
|
||||||
if (key)
|
|
||||||
this._actionKeys[key] = action;
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Fade in buttons if there weren't any before
|
addButton: function(buttonInfo, layoutInfo) {
|
||||||
if (!hadChildren && buttons.length > 0) {
|
let label = buttonInfo['label'];
|
||||||
this._buttonLayout.opacity = 0;
|
let action = buttonInfo['action'];
|
||||||
Tweener.addTween(this._buttonLayout,
|
let key = buttonInfo['key'];
|
||||||
{ opacity: 255,
|
let isDefault = buttonInfo['default'];
|
||||||
time: FADE_IN_BUTTONS_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: Lang.bind(this, function() {
|
|
||||||
this.emit('buttons-set');
|
|
||||||
})
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.emit('buttons-set');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
let keys;
|
||||||
|
|
||||||
|
if (key)
|
||||||
|
keys = [key];
|
||||||
|
else if (isDefault)
|
||||||
|
keys = [Clutter.KEY_Return, Clutter.KEY_KP_Enter, Clutter.KEY_ISO_Enter];
|
||||||
|
else
|
||||||
|
keys = [];
|
||||||
|
|
||||||
|
let button = new St.Button({ style_class: 'modal-dialog-button',
|
||||||
|
reactive: true,
|
||||||
|
can_focus: true,
|
||||||
|
label: label });
|
||||||
|
button.connect('clicked', action);
|
||||||
|
|
||||||
|
buttonInfo['button'] = button;
|
||||||
|
|
||||||
|
if (isDefault)
|
||||||
|
button.add_style_pseudo_class('default');
|
||||||
|
|
||||||
|
if (!this._initialKeyFocusDestroyId)
|
||||||
|
this._initialKeyFocus = button;
|
||||||
|
|
||||||
|
for (let i in keys)
|
||||||
|
this._buttonKeys[keys[i]] = buttonInfo;
|
||||||
|
|
||||||
|
this.buttonLayout.add(button, layoutInfo);
|
||||||
|
|
||||||
|
return button;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyReleaseEvent: function(object, event) {
|
_onKeyReleaseEvent: function(object, event) {
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
let action = this._actionKeys[symbol];
|
let buttonInfo = this._buttonKeys[symbol];
|
||||||
|
|
||||||
if (action) {
|
if (!buttonInfo)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
let button = buttonInfo['button'];
|
||||||
|
let action = buttonInfo['action'];
|
||||||
|
|
||||||
|
if (action && button.reactive) {
|
||||||
action();
|
action();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -199,8 +202,11 @@ const ModalDialog = new Lang.Class({
|
|||||||
this.emit('destroy');
|
this.emit('destroy');
|
||||||
},
|
},
|
||||||
|
|
||||||
_fadeOpen: function() {
|
_fadeOpen: function(onPrimary) {
|
||||||
this._monitorConstraint.index = global.screen.get_current_monitor();
|
if (onPrimary)
|
||||||
|
this._monitorConstraint.primary = true;
|
||||||
|
else
|
||||||
|
this._monitorConstraint.index = global.screen.get_current_monitor();
|
||||||
|
|
||||||
this.state = State.OPENING;
|
this.state = State.OPENING;
|
||||||
|
|
||||||
@@ -233,14 +239,14 @@ const ModalDialog = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
open: function(timestamp) {
|
open: function(timestamp, onPrimary) {
|
||||||
if (this.state == State.OPENED || this.state == State.OPENING)
|
if (this.state == State.OPENED || this.state == State.OPENING)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!this.pushModal(timestamp))
|
if (!this.pushModal({ timestamp: timestamp }))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this._fadeOpen();
|
this._fadeOpen(onPrimary);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -287,7 +293,8 @@ const ModalDialog = new Lang.Class({
|
|||||||
pushModal: function (timestamp) {
|
pushModal: function (timestamp) {
|
||||||
if (this._hasModal)
|
if (this._hasModal)
|
||||||
return true;
|
return true;
|
||||||
if (!Main.pushModal(this._group, timestamp))
|
if (!Main.pushModal(this._group, { timestamp: timestamp,
|
||||||
|
keybindingMode: this._keybindingMode }))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this._hasModal = true;
|
this._hasModal = true;
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ const NotificationDaemon = new Lang.Class({
|
|||||||
this._busProxy = new Bus();
|
this._busProxy = new Bus();
|
||||||
|
|
||||||
this._trayManager = new Shell.TrayManager();
|
this._trayManager = new Shell.TrayManager();
|
||||||
this._trayManager.connect('tray-icon-added', Lang.bind(this, this._onTrayIconAdded));
|
this._trayIconAddedId = this._trayManager.connect('tray-icon-added', Lang.bind(this, this._onTrayIconAdded));
|
||||||
this._trayManager.connect('tray-icon-removed', Lang.bind(this, this._onTrayIconRemoved));
|
this._trayIconRemovedId = this._trayManager.connect('tray-icon-removed', Lang.bind(this, this._onTrayIconRemoved));
|
||||||
|
|
||||||
Shell.WindowTracker.get_default().connect('notify::focus-app',
|
Shell.WindowTracker.get_default().connect('notify::focus-app',
|
||||||
Lang.bind(this, this._onFocusAppChanged));
|
Lang.bind(this, this._onFocusAppChanged));
|
||||||
@@ -356,12 +356,10 @@ const NotificationDaemon = new Lang.Class({
|
|||||||
ndata.actions, ndata.hints, ndata.notification];
|
ndata.actions, ndata.hints, ndata.notification];
|
||||||
|
|
||||||
let gicon = this._iconForNotificationData(icon, hints);
|
let gicon = this._iconForNotificationData(icon, hints);
|
||||||
let iconActor = new St.Icon({ gicon: gicon,
|
|
||||||
icon_size: MessageTray.NOTIFICATION_ICON_SIZE });
|
|
||||||
|
|
||||||
if (notification == null) {
|
if (notification == null) {
|
||||||
notification = new MessageTray.Notification(source, summary, body,
|
notification = new MessageTray.Notification(source, summary, body,
|
||||||
{ icon: iconActor,
|
{ gicon: gicon,
|
||||||
bannerMarkup: true });
|
bannerMarkup: true });
|
||||||
ndata.notification = notification;
|
ndata.notification = notification;
|
||||||
notification.connect('destroy', Lang.bind(this,
|
notification.connect('destroy', Lang.bind(this,
|
||||||
@@ -386,7 +384,7 @@ const NotificationDaemon = new Lang.Class({
|
|||||||
this._emitActionInvoked(ndata.id, actionId);
|
this._emitActionInvoked(ndata.id, actionId);
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
notification.update(summary, body, { icon: iconActor,
|
notification.update(summary, body, { gicon: gicon,
|
||||||
bannerMarkup: true,
|
bannerMarkup: true,
|
||||||
clear: true });
|
clear: true });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,22 +23,25 @@ const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
|||||||
// Time for initial animation going into Overview mode
|
// Time for initial animation going into Overview mode
|
||||||
const ANIMATION_TIME = 0.25;
|
const ANIMATION_TIME = 0.25;
|
||||||
|
|
||||||
// We split the screen vertically between the dash and the view selector.
|
|
||||||
const DASH_SPLIT_FRACTION = 0.1;
|
|
||||||
|
|
||||||
const DND_WINDOW_SWITCH_TIMEOUT = 1250;
|
const DND_WINDOW_SWITCH_TIMEOUT = 1250;
|
||||||
|
|
||||||
const SwipeScrollDirection = {
|
const GLSL_DIM_EFFECT_DECLARATIONS = '';
|
||||||
NONE: 0,
|
const GLSL_DIM_EFFECT_CODE = '\
|
||||||
HORIZONTAL: 1,
|
vec2 dist = cogl_tex_coord_in[0].xy - vec2(0.5, 0.5); \
|
||||||
VERTICAL: 2
|
float elipse_radius = 0.5; \
|
||||||
};
|
/* from https://bugzilla.gnome.org/show_bug.cgi?id=669798: \
|
||||||
|
the alpha on the gradient goes from 250 at its darkest to 180 at its most transparent. */ \
|
||||||
const SwipeScrollResult = {
|
float y = 250.0 / 255.0; \
|
||||||
CANCEL: 0,
|
float x = 180.0 / 255.0; \
|
||||||
SWIPE: 1,
|
/* interpolate darkening value, based on distance from screen center */ \
|
||||||
CLICK: 2
|
float val = min(length(dist), elipse_radius); \
|
||||||
};
|
float a = mix(x, y, val / elipse_radius); \
|
||||||
|
/* dim_factor varies from [1.0 -> 0.5] when overview is showing \
|
||||||
|
We use it to smooth value, then we clamp it to valid color interval */ \
|
||||||
|
a = clamp(a - cogl_color_in.r + 0.5, 0.0, 1.0); \
|
||||||
|
/* We\'re blending between: color and black color (obviously omitted in the equation) */ \
|
||||||
|
cogl_color_out.xyz = cogl_color_out.xyz * (1.0 - a); \
|
||||||
|
cogl_color_out.a = 1.0;';
|
||||||
|
|
||||||
const ShellInfo = new Lang.Class({
|
const ShellInfo = new Lang.Class({
|
||||||
Name: 'ShellInfo',
|
Name: 'ShellInfo',
|
||||||
@@ -57,7 +60,14 @@ const ShellInfo = new Lang.Class({
|
|||||||
this._source.destroy();
|
this._source.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
setMessage: function(text, undoCallback, undoLabel) {
|
setMessage: function(text, options) {
|
||||||
|
options = Params.parse(options, { undoCallback: null,
|
||||||
|
forFeedback: false
|
||||||
|
});
|
||||||
|
|
||||||
|
let undoCallback = options.undoCallback;
|
||||||
|
let forFeedback = options.forFeedback;
|
||||||
|
|
||||||
if (this._source == null) {
|
if (this._source == null) {
|
||||||
this._source = new MessageTray.SystemNotificationSource();
|
this._source = new MessageTray.SystemNotificationSource();
|
||||||
this._source.connect('destroy', Lang.bind(this,
|
this._source.connect('destroy', Lang.bind(this,
|
||||||
@@ -71,6 +81,7 @@ const ShellInfo = new Lang.Class({
|
|||||||
if (this._source.notifications.length == 0) {
|
if (this._source.notifications.length == 0) {
|
||||||
notification = new MessageTray.Notification(this._source, text, null);
|
notification = new MessageTray.Notification(this._source, text, null);
|
||||||
notification.setTransient(true);
|
notification.setTransient(true);
|
||||||
|
notification.setForFeedback(forFeedback);
|
||||||
} else {
|
} else {
|
||||||
notification = this._source.notifications[0];
|
notification = this._source.notifications[0];
|
||||||
notification.update(text, null, { clear: true });
|
notification.update(text, null, { clear: true });
|
||||||
@@ -78,10 +89,8 @@ const ShellInfo = new Lang.Class({
|
|||||||
|
|
||||||
this._undoCallback = undoCallback;
|
this._undoCallback = undoCallback;
|
||||||
if (undoCallback) {
|
if (undoCallback) {
|
||||||
notification.addButton('system-undo',
|
notification.addButton('system-undo', _("Undo"));
|
||||||
undoLabel ? undoLabel : _("Undo"));
|
notification.connect('action-invoked', Lang.bind(this, this._onUndoClicked));
|
||||||
notification.connect('action-invoked',
|
|
||||||
Lang.bind(this, this._onUndoClicked));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._source.notify(notification);
|
this._source.notify(notification);
|
||||||
@@ -93,6 +102,7 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._overviewCreated = false;
|
this._overviewCreated = false;
|
||||||
|
this._initCalled = false;
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
@@ -113,32 +123,26 @@ const Overview = new Lang.Class({
|
|||||||
// scenes which allows us to show the background with different
|
// scenes which allows us to show the background with different
|
||||||
// rendering options without duplicating the texture data.
|
// rendering options without duplicating the texture data.
|
||||||
this._background = Meta.BackgroundActor.new_for_screen(global.screen);
|
this._background = Meta.BackgroundActor.new_for_screen(global.screen);
|
||||||
|
this._background.add_glsl_snippet(Meta.SnippetHook.FRAGMENT,
|
||||||
|
GLSL_DIM_EFFECT_DECLARATIONS,
|
||||||
|
GLSL_DIM_EFFECT_CODE,
|
||||||
|
false);
|
||||||
this._background.hide();
|
this._background.hide();
|
||||||
global.overlay_group.add_actor(this._background);
|
global.overlay_group.add_actor(this._background);
|
||||||
|
|
||||||
this._desktopFade = new St.Bin();
|
this._desktopFade = new St.Bin();
|
||||||
global.overlay_group.add_actor(this._desktopFade);
|
global.overlay_group.add_actor(this._desktopFade);
|
||||||
|
|
||||||
this._spacing = 0;
|
|
||||||
|
|
||||||
/* Translators: This is the main view to select
|
/* Translators: This is the main view to select
|
||||||
activities. See also note for "Activities" string. */
|
activities. See also note for "Activities" string. */
|
||||||
this._group = new St.Widget({ name: 'overview',
|
this._overview = new St.BoxLayout({ name: 'overview',
|
||||||
accessible_name: _("Overview"),
|
accessible_name: _("Overview"),
|
||||||
reactive: true });
|
reactive: true,
|
||||||
this._group._delegate = this;
|
vertical: true });
|
||||||
this._group.connect('style-changed',
|
this._overview._delegate = this;
|
||||||
Lang.bind(this, function() {
|
|
||||||
let node = this._group.get_theme_node();
|
this._group = new St.BoxLayout({ name: 'overview-group' });
|
||||||
let spacing = node.get_length('spacing');
|
|
||||||
if (spacing != this._spacing) {
|
|
||||||
this._spacing = spacing;
|
|
||||||
this._relayout();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
this._scrollDirection = SwipeScrollDirection.NONE;
|
|
||||||
this._scrollAdjustment = null;
|
|
||||||
this._capturedEventId = 0;
|
this._capturedEventId = 0;
|
||||||
this._buttonPressId = 0;
|
this._buttonPressId = 0;
|
||||||
|
|
||||||
@@ -154,12 +158,11 @@ const Overview = new Lang.Class({
|
|||||||
// Dash elements, or mouseover handlers in the workspaces.
|
// Dash elements, or mouseover handlers in the workspaces.
|
||||||
this._coverPane = new Clutter.Rectangle({ opacity: 0,
|
this._coverPane = new Clutter.Rectangle({ opacity: 0,
|
||||||
reactive: true });
|
reactive: true });
|
||||||
this._group.add_actor(this._coverPane);
|
this._overview.add_actor(this._coverPane);
|
||||||
this._coverPane.connect('event', Lang.bind(this, function (actor, event) { return true; }));
|
this._coverPane.connect('event', Lang.bind(this, function (actor, event) { return true; }));
|
||||||
|
|
||||||
|
this._overview.hide();
|
||||||
this._group.hide();
|
global.overlay_group.add_actor(this._overview);
|
||||||
global.overlay_group.add_actor(this._group);
|
|
||||||
|
|
||||||
this._coverPane.hide();
|
this._coverPane.hide();
|
||||||
|
|
||||||
@@ -171,11 +174,16 @@ const Overview = new Lang.Class({
|
|||||||
Main.xdndHandler.connect('drag-begin', Lang.bind(this, this._onDragBegin));
|
Main.xdndHandler.connect('drag-begin', Lang.bind(this, this._onDragBegin));
|
||||||
Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd));
|
Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd));
|
||||||
|
|
||||||
|
global.screen.connect('restacked', Lang.bind(this, this._onRestacked));
|
||||||
|
|
||||||
this._windowSwitchTimeoutId = 0;
|
this._windowSwitchTimeoutId = 0;
|
||||||
this._windowSwitchTimestamp = 0;
|
this._windowSwitchTimestamp = 0;
|
||||||
this._lastActiveWorkspaceIndex = -1;
|
this._lastActiveWorkspaceIndex = -1;
|
||||||
this._lastHoveredWindow = null;
|
this._lastHoveredWindow = null;
|
||||||
this._needsFakePointerEvent = false;
|
this._needsFakePointerEvent = false;
|
||||||
|
|
||||||
|
if (this._initCalled)
|
||||||
|
this.init();
|
||||||
},
|
},
|
||||||
|
|
||||||
_sessionUpdated: function() {
|
_sessionUpdated: function() {
|
||||||
@@ -188,11 +196,20 @@ const Overview = new Lang.Class({
|
|||||||
// signal handlers and so forth. So we create them after
|
// signal handlers and so forth. So we create them after
|
||||||
// construction in this init() method.
|
// construction in this init() method.
|
||||||
init: function() {
|
init: function() {
|
||||||
|
this._initCalled = true;
|
||||||
|
|
||||||
if (this.isDummy)
|
if (this.isDummy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._shellInfo = new ShellInfo();
|
this._shellInfo = new ShellInfo();
|
||||||
|
|
||||||
|
// Add a clone of the panel to the overview so spacing and such is
|
||||||
|
// automatic
|
||||||
|
this._panelGhost = new St.Bin({ child: new Clutter.Clone({ source: Main.panel.actor }),
|
||||||
|
reactive: false,
|
||||||
|
opacity: 0 });
|
||||||
|
this._overview.add_actor(this._panelGhost);
|
||||||
|
|
||||||
this._searchEntry = new St.Entry({ name: 'searchEntry',
|
this._searchEntry = new St.Entry({ name: 'searchEntry',
|
||||||
/* Translators: this is the text displayed
|
/* Translators: this is the text displayed
|
||||||
in the search entry when no search is
|
in the search entry when no search is
|
||||||
@@ -201,16 +218,13 @@ const Overview = new Lang.Class({
|
|||||||
hint_text: _("Type to search..."),
|
hint_text: _("Type to search..."),
|
||||||
track_hover: true,
|
track_hover: true,
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
this._group.add_actor(this._searchEntry);
|
this._searchEntryBin = new St.Bin({ child: this._searchEntry,
|
||||||
|
x_align: St.Align.MIDDLE });
|
||||||
this._dash = new Dash.Dash();
|
this._overview.add_actor(this._searchEntryBin);
|
||||||
this._viewSelector = new ViewSelector.ViewSelector(this._searchEntry,
|
|
||||||
this._dash.showAppsButton);
|
|
||||||
this._group.add_actor(this._viewSelector.actor);
|
|
||||||
this._group.add_actor(this._dash.actor);
|
|
||||||
|
|
||||||
// TODO - recalculate everything when desktop size changes
|
// TODO - recalculate everything when desktop size changes
|
||||||
this._dash.actor.add_constraint(this._viewSelector.constrainHeight);
|
this._dash = new Dash.Dash();
|
||||||
|
this._group.add_actor(this._dash.actor);
|
||||||
this.dashIconSize = this._dash.iconSize;
|
this.dashIconSize = this._dash.iconSize;
|
||||||
this._dash.connect('icon-size-changed',
|
this._dash.connect('icon-size-changed',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
@@ -221,6 +235,23 @@ const Overview = new Lang.Class({
|
|||||||
// the left of the overview
|
// the left of the overview
|
||||||
Main.ctrlAltTabManager.addGroup(this._dash.actor, _("Dash"), 'user-bookmarks-symbolic');
|
Main.ctrlAltTabManager.addGroup(this._dash.actor, _("Dash"), 'user-bookmarks-symbolic');
|
||||||
|
|
||||||
|
this._viewSelector = new ViewSelector.ViewSelector(this._searchEntry,
|
||||||
|
this._dash.showAppsButton);
|
||||||
|
this._group.add(this._viewSelector.actor, { x_fill: true,
|
||||||
|
expand: true });
|
||||||
|
|
||||||
|
// Add our same-line elements after the search entry
|
||||||
|
this._overview.add(this._group, { y_fill: true,
|
||||||
|
expand: true });
|
||||||
|
|
||||||
|
// Then account for message tray
|
||||||
|
this._messageTrayGhost = new St.Bin({ style_class: 'message-tray-summary',
|
||||||
|
reactive: false,
|
||||||
|
opacity: 0,
|
||||||
|
x_fill: true,
|
||||||
|
y_fill: true });
|
||||||
|
this._overview.add_actor(this._messageTrayGhost);
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
||||||
this._relayout();
|
this._relayout();
|
||||||
},
|
},
|
||||||
@@ -233,11 +264,16 @@ const Overview = new Lang.Class({
|
|||||||
this._viewSelector.removeSearchProvider(provider);
|
this._viewSelector.removeSearchProvider(provider);
|
||||||
},
|
},
|
||||||
|
|
||||||
setMessage: function(text, undoCallback, undoLabel) {
|
//
|
||||||
|
// options:
|
||||||
|
// - undoCallback (function): the callback to be called if undo support is needed
|
||||||
|
// - forFeedback (boolean): whether the message is for direct feedback of a user action
|
||||||
|
//
|
||||||
|
setMessage: function(text, options) {
|
||||||
if (this.isDummy)
|
if (this.isDummy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._shellInfo.setMessage(text, undoCallback, undoLabel);
|
this._shellInfo.setMessage(text, options);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDragBegin: function() {
|
_onDragBegin: function() {
|
||||||
@@ -308,159 +344,11 @@ const Overview = new Lang.Class({
|
|||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
|
|
||||||
setScrollAdjustment: function(adjustment, direction) {
|
addAction: function(action) {
|
||||||
if (this.isDummy)
|
if (this.isDummy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._scrollAdjustment = adjustment;
|
this._overview.add_action(action);
|
||||||
if (this._scrollAdjustment == null)
|
|
||||||
this._scrollDirection = SwipeScrollDirection.NONE;
|
|
||||||
else
|
|
||||||
this._scrollDirection = direction;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onButtonPress: function(actor, event) {
|
|
||||||
if (this._scrollDirection == SwipeScrollDirection.NONE
|
|
||||||
|| event.get_button() != 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let [stageX, stageY] = event.get_coords();
|
|
||||||
this._dragStartX = this._dragX = stageX;
|
|
||||||
this._dragStartY = this._dragY = stageY;
|
|
||||||
this._dragStartValue = this._scrollAdjustment.value;
|
|
||||||
this._lastMotionTime = -1; // used to track "stopping" while swipe-scrolling
|
|
||||||
this._capturedEventId = global.stage.connect('captured-event',
|
|
||||||
Lang.bind(this, this._onCapturedEvent));
|
|
||||||
this.emit('swipe-scroll-begin');
|
|
||||||
},
|
|
||||||
|
|
||||||
_onCapturedEvent: function(actor, event) {
|
|
||||||
let stageX, stageY;
|
|
||||||
let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold;
|
|
||||||
|
|
||||||
switch(event.type()) {
|
|
||||||
case Clutter.EventType.BUTTON_RELEASE:
|
|
||||||
[stageX, stageY] = event.get_coords();
|
|
||||||
|
|
||||||
// default to snapping back to the original value
|
|
||||||
let newValue = this._dragStartValue;
|
|
||||||
|
|
||||||
let minValue = this._scrollAdjustment.lower;
|
|
||||||
let maxValue = this._scrollAdjustment.upper - this._scrollAdjustment.page_size;
|
|
||||||
|
|
||||||
let direction;
|
|
||||||
if (this._scrollDirection == SwipeScrollDirection.HORIZONTAL) {
|
|
||||||
direction = stageX > this._dragStartX ? -1 : 1;
|
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
|
||||||
direction *= -1;
|
|
||||||
} else {
|
|
||||||
direction = stageY > this._dragStartY ? -1 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We default to scroll a full page size; both the first
|
|
||||||
// and the last page may be smaller though, so we need to
|
|
||||||
// adjust difference in those cases.
|
|
||||||
let difference = direction * this._scrollAdjustment.page_size;
|
|
||||||
if (this._dragStartValue + difference > maxValue)
|
|
||||||
difference = maxValue - this._dragStartValue;
|
|
||||||
else if (this._dragStartValue + difference < minValue)
|
|
||||||
difference = minValue - this._dragStartValue;
|
|
||||||
|
|
||||||
// If the user has moved more than half the scroll
|
|
||||||
// difference, we want to "settle" to the new value
|
|
||||||
// even if the user stops dragging rather "throws" by
|
|
||||||
// releasing during the drag.
|
|
||||||
let distance = this._dragStartValue - this._scrollAdjustment.value;
|
|
||||||
let noStop = Math.abs(distance / difference) > 0.5;
|
|
||||||
|
|
||||||
// We detect if the user is stopped by comparing the
|
|
||||||
// timestamp of the button release with the timestamp of
|
|
||||||
// the last motion. Experimentally, a difference of 0 or 1
|
|
||||||
// millisecond indicates that the mouse is in motion, a
|
|
||||||
// larger difference indicates that the mouse is stopped.
|
|
||||||
if ((this._lastMotionTime > 0 &&
|
|
||||||
this._lastMotionTime > event.get_time() - 2) ||
|
|
||||||
noStop) {
|
|
||||||
if (this._dragStartValue + difference >= minValue &&
|
|
||||||
this._dragStartValue + difference <= maxValue)
|
|
||||||
newValue += difference;
|
|
||||||
}
|
|
||||||
|
|
||||||
let result;
|
|
||||||
|
|
||||||
// See if the user has moved the mouse enough to trigger
|
|
||||||
// a drag
|
|
||||||
if (Math.abs(stageX - this._dragStartX) < threshold &&
|
|
||||||
Math.abs(stageY - this._dragStartY) < threshold) {
|
|
||||||
// no motion? It's a click!
|
|
||||||
result = SwipeScrollResult.CLICK;
|
|
||||||
this.emit('swipe-scroll-end', result);
|
|
||||||
} else {
|
|
||||||
if (newValue == this._dragStartValue)
|
|
||||||
result = SwipeScrollResult.CANCEL;
|
|
||||||
else
|
|
||||||
result = SwipeScrollResult.SWIPE;
|
|
||||||
|
|
||||||
// The event capture handler is disconnected
|
|
||||||
// while scrolling to the final position, so
|
|
||||||
// to avoid undesired prelights we raise
|
|
||||||
// the cover pane.
|
|
||||||
this._coverPane.raise_top();
|
|
||||||
this._coverPane.show();
|
|
||||||
|
|
||||||
Tweener.addTween(this._scrollAdjustment,
|
|
||||||
{ value: newValue,
|
|
||||||
time: ANIMATION_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onCompleteScope: this,
|
|
||||||
onComplete: function() {
|
|
||||||
this._coverPane.hide();
|
|
||||||
this.emit('swipe-scroll-end',
|
|
||||||
result);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
global.stage.disconnect(this._capturedEventId);
|
|
||||||
this._capturedEventId = 0;
|
|
||||||
|
|
||||||
return result != SwipeScrollResult.CLICK;
|
|
||||||
|
|
||||||
case Clutter.EventType.MOTION:
|
|
||||||
[stageX, stageY] = event.get_coords();
|
|
||||||
let dx = this._dragX - stageX;
|
|
||||||
let dy = this._dragY - stageY;
|
|
||||||
let primary = Main.layoutManager.primaryMonitor;
|
|
||||||
|
|
||||||
this._dragX = stageX;
|
|
||||||
this._dragY = stageY;
|
|
||||||
this._lastMotionTime = event.get_time();
|
|
||||||
|
|
||||||
// See if the user has moved the mouse enough to trigger
|
|
||||||
// a drag
|
|
||||||
if (Math.abs(stageX - this._dragStartX) < threshold &&
|
|
||||||
Math.abs(stageY - this._dragStartY) < threshold)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (this._scrollDirection == SwipeScrollDirection.HORIZONTAL) {
|
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
|
||||||
this._scrollAdjustment.value -= (dx / primary.width) * this._scrollAdjustment.page_size;
|
|
||||||
else
|
|
||||||
this._scrollAdjustment.value += (dx / primary.width) * this._scrollAdjustment.page_size;
|
|
||||||
} else {
|
|
||||||
this._scrollAdjustment.value += (dy / primary.height) * this._scrollAdjustment.page_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// Block enter/leave events to avoid prelights
|
|
||||||
// during swipe-scroll
|
|
||||||
case Clutter.EventType.ENTER:
|
|
||||||
case Clutter.EventType.LEAVE:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_getDesktopClone: function() {
|
_getDesktopClone: function() {
|
||||||
@@ -470,7 +358,9 @@ const Overview = new Lang.Class({
|
|||||||
if (windows.length == 0)
|
if (windows.length == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
let clone = new Clutter.Clone({ source: windows[0].get_texture() });
|
let window = windows[0];
|
||||||
|
let clone = new Clutter.Clone({ source: window.get_texture(),
|
||||||
|
x: window.x, y: window.y });
|
||||||
clone.source.connect('destroy', Lang.bind(this, function() {
|
clone.source.connect('destroy', Lang.bind(this, function() {
|
||||||
clone.destroy();
|
clone.destroy();
|
||||||
}));
|
}));
|
||||||
@@ -484,41 +374,27 @@ const Overview = new Lang.Class({
|
|||||||
this.hide();
|
this.hide();
|
||||||
|
|
||||||
let primary = Main.layoutManager.primaryMonitor;
|
let primary = Main.layoutManager.primaryMonitor;
|
||||||
let rtl = (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL);
|
|
||||||
|
|
||||||
let contentY = Main.panel.actor.height;
|
let contentY = Main.panel.actor.height;
|
||||||
let contentHeight = primary.height - contentY - Main.messageTray.actor.height;
|
let contentHeight = primary.height - contentY - Main.messageTray.actor.height;
|
||||||
|
|
||||||
this._group.set_position(primary.x, primary.y);
|
this._overview.set_position(primary.x, primary.y);
|
||||||
this._group.set_size(primary.width, primary.height);
|
this._overview.set_size(primary.width, primary.height);
|
||||||
|
|
||||||
this._coverPane.set_position(0, contentY);
|
this._coverPane.set_position(0, contentY);
|
||||||
this._coverPane.set_size(primary.width, contentHeight);
|
this._coverPane.set_size(primary.width, contentHeight);
|
||||||
|
},
|
||||||
|
|
||||||
let searchWidth = this._searchEntry.get_width();
|
_onRestacked: function() {
|
||||||
let searchHeight = this._searchEntry.get_height();
|
let stack = global.get_window_actors();
|
||||||
let searchX = (primary.width - searchWidth) / 2;
|
let stackIndices = {};
|
||||||
let searchY = contentY + this._spacing;
|
|
||||||
|
|
||||||
let dashWidth = Math.round(DASH_SPLIT_FRACTION * primary.width);
|
for (let i = 0; i < stack.length; i++) {
|
||||||
let dashY = searchY + searchHeight + this._spacing;
|
// Use the stable sequence for an integer to use as a hash key
|
||||||
let dashX;
|
stackIndices[stack[i].get_meta_window().get_stable_sequence()] = i;
|
||||||
if (rtl) {
|
|
||||||
this._dash.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
|
||||||
dashX = primary.width;
|
|
||||||
} else {
|
|
||||||
dashX = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let viewX = rtl ? 0 : dashWidth + this._spacing;
|
this.emit('windows-restacked', stackIndices);
|
||||||
let viewY = searchY + searchHeight + this._spacing;
|
|
||||||
let viewWidth = primary.width - dashWidth - this._spacing;
|
|
||||||
let viewHeight = contentHeight - this._spacing - viewY;
|
|
||||||
|
|
||||||
this._searchEntry.set_position(searchX, searchY);
|
|
||||||
this._dash.actor.set_position(dashX, dashY);
|
|
||||||
this._viewSelector.actor.set_position(viewX, viewY);
|
|
||||||
this._viewSelector.actor.set_size(viewWidth, viewHeight);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//// Public methods ////
|
//// Public methods ////
|
||||||
@@ -555,15 +431,11 @@ const Overview = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
if (this._shown)
|
if (this._shown)
|
||||||
return;
|
return;
|
||||||
// Do this manually instead of using _syncInputMode, to handle failure
|
|
||||||
if (!Main.pushModal(this._group))
|
|
||||||
return;
|
|
||||||
this._modal = true;
|
|
||||||
this._animateVisible();
|
|
||||||
this._shown = true;
|
this._shown = true;
|
||||||
|
this._syncInputMode();
|
||||||
this._buttonPressId = this._group.connect('button-press-event',
|
if (!this._modal)
|
||||||
Lang.bind(this, this._onButtonPress));
|
return;
|
||||||
|
this._animateVisible();
|
||||||
},
|
},
|
||||||
|
|
||||||
fadeInDesktop: function() {
|
fadeInDesktop: function() {
|
||||||
@@ -606,12 +478,12 @@ const Overview = new Lang.Class({
|
|||||||
// Disable unredirection while in the overview
|
// Disable unredirection while in the overview
|
||||||
Meta.disable_unredirect_for_screen(global.screen);
|
Meta.disable_unredirect_for_screen(global.screen);
|
||||||
global.window_group.hide();
|
global.window_group.hide();
|
||||||
this._group.show();
|
this._overview.show();
|
||||||
this._background.show();
|
this._background.show();
|
||||||
this._viewSelector.show();
|
this._viewSelector.show();
|
||||||
|
|
||||||
this._group.opacity = 0;
|
this._overview.opacity = 0;
|
||||||
Tweener.addTween(this._group,
|
Tweener.addTween(this._overview,
|
||||||
{ opacity: 255,
|
{ opacity: 255,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
@@ -620,7 +492,7 @@ const Overview = new Lang.Class({
|
|||||||
});
|
});
|
||||||
|
|
||||||
Tweener.addTween(this._background,
|
Tweener.addTween(this._background,
|
||||||
{ dim_factor: 0.4,
|
{ dim_factor: 0.8,
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad'
|
transition: 'easeOutQuad'
|
||||||
});
|
});
|
||||||
@@ -663,10 +535,6 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
this._shown = false;
|
this._shown = false;
|
||||||
this._syncInputMode();
|
this._syncInputMode();
|
||||||
|
|
||||||
if (this._buttonPressId > 0)
|
|
||||||
this._group.disconnect(this._buttonPressId);
|
|
||||||
this._buttonPressId = 0;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// hideTemporarily:
|
// hideTemporarily:
|
||||||
@@ -690,7 +558,7 @@ const Overview = new Lang.Class({
|
|||||||
if (this.isDummy)
|
if (this.isDummy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._shown)
|
if (this.visible)
|
||||||
this.hide();
|
this.hide();
|
||||||
else
|
else
|
||||||
this.show();
|
this.show();
|
||||||
@@ -707,20 +575,21 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
if (this._shown) {
|
if (this._shown) {
|
||||||
if (!this._modal) {
|
if (!this._modal) {
|
||||||
if (Main.pushModal(this._group))
|
if (Main.pushModal(this._overview,
|
||||||
|
{ keybindingMode: Main.KeybindingMode.OVERVIEW }))
|
||||||
this._modal = true;
|
this._modal = true;
|
||||||
else
|
else
|
||||||
this.hide();
|
this.hide();
|
||||||
}
|
}
|
||||||
} else if (this._shownTemporarily) {
|
} else if (this._shownTemporarily) {
|
||||||
if (this._modal) {
|
if (this._modal) {
|
||||||
Main.popModal(this._group);
|
Main.popModal(this._overview);
|
||||||
this._modal = false;
|
this._modal = false;
|
||||||
}
|
}
|
||||||
global.stage_input_mode = Shell.StageInputMode.FULLSCREEN;
|
global.stage_input_mode = Shell.StageInputMode.FULLSCREEN;
|
||||||
} else {
|
} else {
|
||||||
if (this._modal) {
|
if (this._modal) {
|
||||||
Main.popModal(this._group);
|
Main.popModal(this._overview);
|
||||||
this._modal = false;
|
this._modal = false;
|
||||||
}
|
}
|
||||||
else if (global.stage_input_mode == Shell.StageInputMode.FULLSCREEN)
|
else if (global.stage_input_mode == Shell.StageInputMode.FULLSCREEN)
|
||||||
@@ -738,7 +607,7 @@ const Overview = new Lang.Class({
|
|||||||
this._viewSelector.zoomFromOverview();
|
this._viewSelector.zoomFromOverview();
|
||||||
|
|
||||||
// Make other elements fade out.
|
// Make other elements fade out.
|
||||||
Tweener.addTween(this._group,
|
Tweener.addTween(this._overview,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
@@ -780,7 +649,7 @@ const Overview = new Lang.Class({
|
|||||||
this._viewSelector.hide();
|
this._viewSelector.hide();
|
||||||
this._desktopFade.hide();
|
this._desktopFade.hide();
|
||||||
this._background.hide();
|
this._background.hide();
|
||||||
this._group.hide();
|
this._overview.hide();
|
||||||
|
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.animationInProgress = false;
|
this.animationInProgress = false;
|
||||||
|
|||||||
171
js/ui/panel.js
171
js/ui/panel.js
@@ -75,33 +75,41 @@ function _unpremultiply(color) {
|
|||||||
blue: blue, alpha: color.alpha });
|
blue: blue, alpha: color.alpha });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const Animation = new Lang.Class({
|
||||||
|
Name: 'Animation',
|
||||||
|
|
||||||
const AnimatedIcon = new Lang.Class({
|
_init: function(filename, width, height, speed) {
|
||||||
Name: 'AnimatedIcon',
|
this.actor = new St.Bin();
|
||||||
|
|
||||||
_init: function(name, size) {
|
|
||||||
this.actor = new St.Bin({ visible: false });
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||||
this.actor.connect('notify::visible', Lang.bind(this, this._onVisibleNotify));
|
this._speed = speed;
|
||||||
|
|
||||||
|
this._isLoaded = false;
|
||||||
|
this._isPlaying = false;
|
||||||
this._timeoutId = 0;
|
this._timeoutId = 0;
|
||||||
this._frame = 0;
|
this._frame = 0;
|
||||||
this._animations = St.TextureCache.get_default().load_sliced_image (global.datadir + '/theme/' + name, size, size);
|
this._animations = St.TextureCache.get_default().load_sliced_image (filename, width, height,
|
||||||
|
Lang.bind(this, this._animationsLoaded));
|
||||||
this.actor.set_child(this._animations);
|
this.actor.set_child(this._animations);
|
||||||
},
|
},
|
||||||
|
|
||||||
_disconnectTimeout: function() {
|
play: function() {
|
||||||
|
if (this._isLoaded && this._timeoutId == 0) {
|
||||||
|
if (this._frame == 0)
|
||||||
|
this._showFrame(0);
|
||||||
|
|
||||||
|
this._timeoutId = Mainloop.timeout_add(this._speed, Lang.bind(this, this._update));
|
||||||
|
}
|
||||||
|
|
||||||
|
this._isPlaying = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
stop: function() {
|
||||||
if (this._timeoutId > 0) {
|
if (this._timeoutId > 0) {
|
||||||
Mainloop.source_remove(this._timeoutId);
|
Mainloop.source_remove(this._timeoutId);
|
||||||
this._timeoutId = 0;
|
this._timeoutId = 0;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
_onVisibleNotify: function() {
|
this._isPlaying = false;
|
||||||
if (this.actor.visible)
|
|
||||||
this._timeoutId = Mainloop.timeout_add(ANIMATED_ICON_UPDATE_TIMEOUT, Lang.bind(this, this._update));
|
|
||||||
else
|
|
||||||
this._disconnectTimeout();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_showFrame: function(frame) {
|
_showFrame: function(frame) {
|
||||||
@@ -121,8 +129,24 @@ const AnimatedIcon = new Lang.Class({
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_animationsLoaded: function() {
|
||||||
|
this._isLoaded = true;
|
||||||
|
|
||||||
|
if (this._isPlaying)
|
||||||
|
this.play();
|
||||||
|
},
|
||||||
|
|
||||||
_onDestroy: function() {
|
_onDestroy: function() {
|
||||||
this._disconnectTimeout();
|
this.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const AnimatedIcon = new Lang.Class({
|
||||||
|
Name: 'AnimatedIcon',
|
||||||
|
Extends: Animation,
|
||||||
|
|
||||||
|
_init: function(name, size) {
|
||||||
|
this.parent(global.datadir + '/theme/' + name, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -247,6 +271,10 @@ const AppMenuButton = new Lang.Class({
|
|||||||
this._container.connect('get-preferred-height', Lang.bind(this, this._getContentPreferredHeight));
|
this._container.connect('get-preferred-height', Lang.bind(this, this._getContentPreferredHeight));
|
||||||
this._container.connect('allocate', Lang.bind(this, this._contentAllocate));
|
this._container.connect('allocate', Lang.bind(this, this._contentAllocate));
|
||||||
|
|
||||||
|
let textureCache = St.TextureCache.get_default();
|
||||||
|
textureCache.connect('icon-theme-changed',
|
||||||
|
Lang.bind(this, this._onIconThemeChanged));
|
||||||
|
|
||||||
this._iconBox = new Shell.Slicer({ name: 'appMenuIcon' });
|
this._iconBox = new Shell.Slicer({ name: 'appMenuIcon' });
|
||||||
this._iconBox.connect('style-changed',
|
this._iconBox.connect('style-changed',
|
||||||
Lang.bind(this, this._onIconBoxStyleChanged));
|
Lang.bind(this, this._onIconBoxStyleChanged));
|
||||||
@@ -273,6 +301,7 @@ const AppMenuButton = new Lang.Class({
|
|||||||
this._spinner = new AnimatedIcon('process-working.svg',
|
this._spinner = new AnimatedIcon('process-working.svg',
|
||||||
PANEL_ICON_SIZE);
|
PANEL_ICON_SIZE);
|
||||||
this._container.add_actor(this._spinner.actor);
|
this._container.add_actor(this._spinner.actor);
|
||||||
|
this._spinner.actor.hide();
|
||||||
this._spinner.actor.lower_bottom();
|
this._spinner.actor.lower_bottom();
|
||||||
|
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
@@ -332,6 +361,15 @@ const AppMenuButton = new Lang.Class({
|
|||||||
this._updateIconBoxClip();
|
this._updateIconBoxClip();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onIconThemeChanged: function() {
|
||||||
|
if (this._iconBox.child == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._iconBox.child.destroy();
|
||||||
|
let icon = this._targetApp.get_faded_icon(2 * PANEL_ICON_SIZE);
|
||||||
|
this._iconBox.set_child(icon);
|
||||||
|
},
|
||||||
|
|
||||||
_updateIconBoxClip: function() {
|
_updateIconBoxClip: function() {
|
||||||
let allocation = this._iconBox.allocation;
|
let allocation = this._iconBox.allocation;
|
||||||
if (this._iconBottomClip > 0)
|
if (this._iconBottomClip > 0)
|
||||||
@@ -354,6 +392,7 @@ const AppMenuButton = new Lang.Class({
|
|||||||
transition: "easeOutQuad",
|
transition: "easeOutQuad",
|
||||||
onCompleteScope: this,
|
onCompleteScope: this,
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
|
this._spinner.stop();
|
||||||
this._spinner.actor.opacity = 255;
|
this._spinner.actor.opacity = 255;
|
||||||
this._spinner.actor.hide();
|
this._spinner.actor.hide();
|
||||||
}
|
}
|
||||||
@@ -363,6 +402,7 @@ const AppMenuButton = new Lang.Class({
|
|||||||
startAnimation: function() {
|
startAnimation: function() {
|
||||||
this._stop = false;
|
this._stop = false;
|
||||||
this.actor.reactive = false;
|
this.actor.reactive = false;
|
||||||
|
this._spinner.play();
|
||||||
this._spinner.actor.show();
|
this._spinner.actor.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -559,11 +599,12 @@ const AppMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
menu = new PopupMenu.RemoteMenu(this.actor, this._targetApp.menu, this._targetApp.action_group);
|
menu = new PopupMenu.RemoteMenu(this.actor, this._targetApp.menu, this._targetApp.action_group);
|
||||||
} else {
|
} else {
|
||||||
if (this.menu && !(this.menu instanceof PopupMenu.RemoteMenu))
|
if (this.menu.isDummyQuitMenu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// fallback to older menu
|
// fallback to older menu
|
||||||
menu = new PopupMenu.PopupMenu(this.actor, 0.0, St.Side.TOP, 0);
|
menu = new PopupMenu.PopupMenu(this.actor, 0.0, St.Side.TOP, 0);
|
||||||
|
menu.isDummyQuitMenu = true;
|
||||||
menu.addAction(_("Quit"), Lang.bind(this, function() {
|
menu.addAction(_("Quit"), Lang.bind(this, function() {
|
||||||
this._targetApp.request_quit();
|
this._targetApp.request_quit();
|
||||||
}));
|
}));
|
||||||
@@ -576,15 +617,12 @@ const AppMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
Signals.addSignalMethods(AppMenuButton.prototype);
|
Signals.addSignalMethods(AppMenuButton.prototype);
|
||||||
|
|
||||||
// Activities button. Because everything else in the top bar is a
|
|
||||||
// PanelMenu.Button, it simplifies some things to make this be one too.
|
|
||||||
// We just hack it up to not actually have a menu attached to it.
|
|
||||||
const ActivitiesButton = new Lang.Class({
|
const ActivitiesButton = new Lang.Class({
|
||||||
Name: 'ActivitiesButton',
|
Name: 'ActivitiesButton',
|
||||||
Extends: PanelMenu.Button,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent(0.0);
|
this.parent(0.0, null, true);
|
||||||
this.actor.accessible_role = Atk.Role.TOGGLE_BUTTON;
|
this.actor.accessible_role = Atk.Role.TOGGLE_BUTTON;
|
||||||
|
|
||||||
let container = new Shell.GenericContainer();
|
let container = new Shell.GenericContainer();
|
||||||
@@ -604,27 +642,27 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
this.hotCorner = new Layout.HotCorner();
|
this.hotCorner = new Layout.HotCorner();
|
||||||
container.add_actor(this.hotCorner.actor);
|
container.add_actor(this.hotCorner.actor);
|
||||||
|
|
||||||
// Hack up our menu...
|
|
||||||
this.menu.open = Lang.bind(this, this._onMenuOpenRequest);
|
|
||||||
this.menu.close = Lang.bind(this, this._onMenuCloseRequest);
|
|
||||||
this.menu.toggle = Lang.bind(this, this._onMenuToggleRequest);
|
|
||||||
|
|
||||||
this.actor.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
this.actor.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
||||||
this.actor.connect_after('button-release-event', Lang.bind(this, this._onButtonRelease));
|
this.actor.connect_after('button-release-event', Lang.bind(this, this._onButtonRelease));
|
||||||
this.actor.connect_after('key-release-event', Lang.bind(this, this._onKeyRelease));
|
this.actor.connect_after('key-release-event', Lang.bind(this, this._onKeyRelease));
|
||||||
|
|
||||||
Main.overview.connect('showing', Lang.bind(this, function() {
|
Main.overview.connect('showing', Lang.bind(this, function() {
|
||||||
this.actor.add_style_pseudo_class('overview');
|
this.actor.add_style_pseudo_class('overview');
|
||||||
this._escapeMenuGrab();
|
|
||||||
this.actor.add_accessible_state (Atk.StateType.CHECKED);
|
this.actor.add_accessible_state (Atk.StateType.CHECKED);
|
||||||
}));
|
}));
|
||||||
Main.overview.connect('hiding', Lang.bind(this, function() {
|
Main.overview.connect('hiding', Lang.bind(this, function() {
|
||||||
this.actor.remove_style_pseudo_class('overview');
|
this.actor.remove_style_pseudo_class('overview');
|
||||||
this._escapeMenuGrab();
|
|
||||||
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
|
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._xdndTimeOut = 0;
|
this._xdndTimeOut = 0;
|
||||||
|
|
||||||
|
// Since the hot corner uses stage coordinates, Clutter won't
|
||||||
|
// queue relayouts for us when the panel moves. Queue a relayout
|
||||||
|
// when that happens.
|
||||||
|
Main.layoutManager.connect('panel-box-changed', Lang.bind(this, function() {
|
||||||
|
container.queue_relayout();
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_containerGetPreferredWidth: function(actor, forHeight, alloc) {
|
_containerGetPreferredWidth: function(actor, forHeight, alloc) {
|
||||||
@@ -670,11 +708,6 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
|
|
||||||
_escapeMenuGrab: function() {
|
|
||||||
if (this.menu.isOpen)
|
|
||||||
this.menu.close();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onCapturedEvent: function(actor, event) {
|
_onCapturedEvent: function(actor, event) {
|
||||||
if (event.type() == Clutter.EventType.BUTTON_PRESS) {
|
if (event.type() == Clutter.EventType.BUTTON_PRESS) {
|
||||||
if (!this.hotCorner.shouldToggleOverviewOnClick())
|
if (!this.hotCorner.shouldToggleOverviewOnClick())
|
||||||
@@ -683,33 +716,13 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMenuOpenRequest: function() {
|
|
||||||
this.menu.isOpen = true;
|
|
||||||
this.menu.emit('open-state-changed', true);
|
|
||||||
},
|
|
||||||
|
|
||||||
_onMenuCloseRequest: function() {
|
|
||||||
this.menu.isOpen = false;
|
|
||||||
this.menu.emit('open-state-changed', false);
|
|
||||||
},
|
|
||||||
|
|
||||||
_onMenuToggleRequest: function() {
|
|
||||||
this.menu.isOpen = !this.menu.isOpen;
|
|
||||||
this.menu.emit('open-state-changed', this.menu.isOpen);
|
|
||||||
},
|
|
||||||
|
|
||||||
_onButtonRelease: function() {
|
_onButtonRelease: function() {
|
||||||
if (this.menu.isOpen) {
|
Main.overview.toggle();
|
||||||
this.menu.close();
|
|
||||||
Main.overview.toggle();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyRelease: function(actor, event) {
|
_onKeyRelease: function(actor, event) {
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
if (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_space) {
|
if (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_space) {
|
||||||
if (this.menu.isOpen)
|
|
||||||
this.menu.close();
|
|
||||||
Main.overview.toggle();
|
Main.overview.toggle();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -850,10 +863,13 @@ const PanelCorner = new Lang.Class({
|
|||||||
let backgroundColor = node.get_color('-panel-corner-background-color');
|
let backgroundColor = node.get_color('-panel-corner-background-color');
|
||||||
let borderColor = node.get_color('-panel-corner-border-color');
|
let borderColor = node.get_color('-panel-corner-border-color');
|
||||||
|
|
||||||
|
let noOverlap = borderColor.alpha == 0;
|
||||||
|
let offsetY = noOverlap ? borderWidth : 0;
|
||||||
|
|
||||||
let cr = this.actor.get_context();
|
let cr = this.actor.get_context();
|
||||||
cr.setOperator(Cairo.Operator.SOURCE);
|
cr.setOperator(Cairo.Operator.SOURCE);
|
||||||
|
|
||||||
cr.moveTo(0, 0);
|
cr.moveTo(0, offsetY);
|
||||||
if (this._side == St.Side.LEFT)
|
if (this._side == St.Side.LEFT)
|
||||||
cr.arc(cornerRadius,
|
cr.arc(cornerRadius,
|
||||||
borderWidth + cornerRadius,
|
borderWidth + cornerRadius,
|
||||||
@@ -862,7 +878,7 @@ const PanelCorner = new Lang.Class({
|
|||||||
cr.arc(0,
|
cr.arc(0,
|
||||||
borderWidth + cornerRadius,
|
borderWidth + cornerRadius,
|
||||||
cornerRadius, 3 * Math.PI / 2, 2 * Math.PI);
|
cornerRadius, 3 * Math.PI / 2, 2 * Math.PI);
|
||||||
cr.lineTo(cornerRadius, 0);
|
cr.lineTo(cornerRadius, offsetY);
|
||||||
cr.closePath();
|
cr.closePath();
|
||||||
|
|
||||||
let savedPath = cr.copyPath();
|
let savedPath = cr.copyPath();
|
||||||
@@ -872,6 +888,9 @@ const PanelCorner = new Lang.Class({
|
|||||||
Clutter.cairo_set_source_color(cr, over);
|
Clutter.cairo_set_source_color(cr, over);
|
||||||
cr.fill();
|
cr.fill();
|
||||||
|
|
||||||
|
if (noOverlap)
|
||||||
|
return;
|
||||||
|
|
||||||
let offset = borderWidth;
|
let offset = borderWidth;
|
||||||
Clutter.cairo_set_source_color(cr, backgroundColor);
|
Clutter.cairo_set_source_color(cr, backgroundColor);
|
||||||
|
|
||||||
@@ -901,6 +920,7 @@ const PANEL_ITEM_IMPLEMENTATIONS = {
|
|||||||
'volume': imports.ui.status.volume.Indicator,
|
'volume': imports.ui.status.volume.Indicator,
|
||||||
'battery': imports.ui.status.power.Indicator,
|
'battery': imports.ui.status.power.Indicator,
|
||||||
'lockScreen': imports.ui.status.lockScreenMenu.Indicator,
|
'lockScreen': imports.ui.status.lockScreenMenu.Indicator,
|
||||||
|
'logo': imports.gdm.loginDialog.LogoMenuButton,
|
||||||
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,
|
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,
|
||||||
'powerMenu': imports.gdm.powerMenu.PowerMenuButton,
|
'powerMenu': imports.gdm.powerMenu.PowerMenuButton,
|
||||||
'userMenu': imports.ui.userMenu.UserMenuButton
|
'userMenu': imports.ui.userMenu.UserMenuButton
|
||||||
@@ -925,14 +945,9 @@ const Panel = new Lang.Class({
|
|||||||
reactive: true });
|
reactive: true });
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
|
||||||
this.statusArea = {};
|
this._sessionStyle = null;
|
||||||
|
|
||||||
Main.overview.connect('shown', Lang.bind(this, function () {
|
this.statusArea = {};
|
||||||
this.actor.add_style_class_name('in-overview');
|
|
||||||
}));
|
|
||||||
Main.overview.connect('hiding', Lang.bind(this, function () {
|
|
||||||
this.actor.remove_style_class_name('in-overview');
|
|
||||||
}));
|
|
||||||
|
|
||||||
this.menuManager = new PopupMenu.PopupMenuManager(this);
|
this.menuManager = new PopupMenu.PopupMenuManager(this);
|
||||||
|
|
||||||
@@ -962,7 +977,7 @@ const Panel = new Lang.Class({
|
|||||||
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
|
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
|
||||||
|
|
||||||
Main.layoutManager.panelBox.add(this.actor);
|
Main.layoutManager.panelBox.add(this.actor);
|
||||||
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here-symbolic',
|
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'emblem-system-symbolic',
|
||||||
{ sortGroup: CtrlAltTab.SortGroup.TOP });
|
{ sortGroup: CtrlAltTab.SortGroup.TOP });
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._updatePanel));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._updatePanel));
|
||||||
@@ -1026,16 +1041,19 @@ const Panel = new Lang.Class({
|
|||||||
}
|
}
|
||||||
this._rightBox.allocate(childBox, flags);
|
this._rightBox.allocate(childBox, flags);
|
||||||
|
|
||||||
let [cornerMinWidth, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1);
|
let cornerMinWidth, cornerMinHeight;
|
||||||
let [cornerMinHeight, cornerHeight] = this._leftCorner.actor.get_preferred_width(-1);
|
let cornerWidth, cornerHeight;
|
||||||
|
|
||||||
|
[cornerMinWidth, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1);
|
||||||
|
[cornerMinHeight, cornerHeight] = this._leftCorner.actor.get_preferred_height(-1);
|
||||||
childBox.x1 = 0;
|
childBox.x1 = 0;
|
||||||
childBox.x2 = cornerWidth;
|
childBox.x2 = cornerWidth;
|
||||||
childBox.y1 = allocHeight;
|
childBox.y1 = allocHeight;
|
||||||
childBox.y2 = allocHeight + cornerHeight;
|
childBox.y2 = allocHeight + cornerHeight;
|
||||||
this._leftCorner.actor.allocate(childBox, flags);
|
this._leftCorner.actor.allocate(childBox, flags);
|
||||||
|
|
||||||
let [cornerMinWidth, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1);
|
[cornerMinWidth, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1);
|
||||||
let [cornerMinHeight, cornerHeight] = this._rightCorner.actor.get_preferred_width(-1);
|
[cornerMinHeight, cornerHeight] = this._rightCorner.actor.get_preferred_height(-1);
|
||||||
childBox.x1 = allocWidth - cornerWidth;
|
childBox.x1 = allocWidth - cornerWidth;
|
||||||
childBox.x2 = allocWidth;
|
childBox.x2 = allocWidth;
|
||||||
childBox.y1 = allocHeight;
|
childBox.y1 = allocHeight;
|
||||||
@@ -1116,6 +1134,13 @@ const Panel = new Lang.Class({
|
|||||||
this._updateBox(panel.left, this._leftBox);
|
this._updateBox(panel.left, this._leftBox);
|
||||||
this._updateBox(panel.center, this._centerBox);
|
this._updateBox(panel.center, this._centerBox);
|
||||||
this._updateBox(panel.right, this._rightBox);
|
this._updateBox(panel.right, this._rightBox);
|
||||||
|
|
||||||
|
if (this._sessionStyle)
|
||||||
|
this._removeStyleClassName(this._sessionStyle);
|
||||||
|
|
||||||
|
this._sessionStyle = Main.sessionMode.panelStyle;
|
||||||
|
if (this._sessionStyle)
|
||||||
|
this._addStyleClassName(this._sessionStyle);
|
||||||
},
|
},
|
||||||
|
|
||||||
_initBox: function(elements, box) {
|
_initBox: function(elements, box) {
|
||||||
@@ -1204,5 +1229,17 @@ const Panel = new Lang.Class({
|
|||||||
this.statusArea[role] = indicator;
|
this.statusArea[role] = indicator;
|
||||||
this._addToPanelBox(role, indicator, position, boxContainer);
|
this._addToPanelBox(role, indicator, position, boxContainer);
|
||||||
return indicator;
|
return indicator;
|
||||||
|
},
|
||||||
|
|
||||||
|
_addStyleClassName: function(className) {
|
||||||
|
this.actor.add_style_class_name(className);
|
||||||
|
this._rightCorner.actor.add_style_class_name(className);
|
||||||
|
this._leftCorner.actor.add_style_class_name(className);
|
||||||
|
},
|
||||||
|
|
||||||
|
_removeStyleClassName: function(className) {
|
||||||
|
this.actor.remove_style_class_name(className);
|
||||||
|
this._rightCorner.actor.remove_style_class_name(className);
|
||||||
|
this._leftCorner.actor.remove_style_class_name(className);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ const Button = new Lang.Class({
|
|||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onSourceKeyPress));
|
this.actor.connect('key-press-event', Lang.bind(this, this._onSourceKeyPress));
|
||||||
|
|
||||||
if (dontCreateMenu)
|
if (dontCreateMenu)
|
||||||
this.menu = null;
|
this.menu = new PopupMenu.PopupDummyMenu(this.actor);
|
||||||
else
|
else
|
||||||
this.setMenu(new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0));
|
this.setMenu(new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0));
|
||||||
|
|
||||||
@@ -214,7 +214,8 @@ const Button = new Lang.Class({
|
|||||||
destroy: function() {
|
destroy: function() {
|
||||||
this.actor._delegate = null;
|
this.actor._delegate = null;
|
||||||
|
|
||||||
this.menu.destroy();
|
if (this.menu)
|
||||||
|
this.menu.destroy();
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
|
|
||||||
this.emit('destroy');
|
this.emit('destroy');
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
|
const GnomeDesktop = imports.gi.GnomeDesktop;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
// We stop polling if the user is idle for more than this amount of time
|
// We stop polling if the user is idle for more than this amount of time
|
||||||
@@ -40,9 +41,9 @@ const PointerWatcher = new Lang.Class({
|
|||||||
Name: 'PointerWatcher',
|
Name: 'PointerWatcher',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
let idleMonitor = Shell.IdleMonitor.get();
|
let idleMonitor = new GnomeDesktop.IdleMonitor();
|
||||||
idleMonitor.add_watch(IDLE_TIME,
|
idleMonitor.connect('became-active', Lang.bind(this, this._onIdleMonitorBecameActive));
|
||||||
Lang.bind(this, this._onIdleMonitorWatch));
|
idleMonitor.add_watch(IDLE_TIME, Lang.bind(this, this._onIdleMonitorBecameIdle));
|
||||||
this._idle = idleMonitor.get_idletime() > IDLE_TIME;
|
this._idle = idleMonitor.get_idletime() > IDLE_TIME;
|
||||||
this._watches = [];
|
this._watches = [];
|
||||||
this.pointerX = null;
|
this.pointerX = null;
|
||||||
@@ -78,11 +79,14 @@ const PointerWatcher = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onIdleMonitorWatch: function(monitor, id, userBecameIdle) {
|
_onIdleMonitorBecameActive: function(monitor) {
|
||||||
this._idle = userBecameIdle;
|
this._idle = false;
|
||||||
if (!userBecameIdle)
|
this._updatePointer();
|
||||||
this._updatePointer();
|
this._updateTimeout();
|
||||||
|
},
|
||||||
|
|
||||||
|
_onIdleMonitorBecameIdle: function(monitor) {
|
||||||
|
this._idle = true;
|
||||||
this._updateTimeout();
|
this._updateTimeout();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Cairo = imports.cairo;
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
@@ -12,8 +11,10 @@ const St = imports.gi.St;
|
|||||||
const Atk = imports.gi.Atk;
|
const Atk = imports.gi.Atk;
|
||||||
|
|
||||||
const BoxPointer = imports.ui.boxpointer;
|
const BoxPointer = imports.ui.boxpointer;
|
||||||
|
const GrabHelper = imports.ui.grabHelper;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
const Separator = imports.ui.separator;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const SLIDER_SCROLL_STEP = 0.05; /* Slider scrolling step in % */
|
const SLIDER_SCROLL_STEP = 0.05; /* Slider scrolling step in % */
|
||||||
@@ -404,29 +405,8 @@ const PopupSeparatorMenuItem = new Lang.Class({
|
|||||||
this.parent({ reactive: false,
|
this.parent({ reactive: false,
|
||||||
can_focus: false});
|
can_focus: false});
|
||||||
|
|
||||||
this._drawingArea = new St.DrawingArea({ style_class: 'popup-separator-menu-item' });
|
this._separator = new Separator.HorizontalSeparator({ style_class: 'popup-separator-menu-item' });
|
||||||
this.addActor(this._drawingArea, { span: -1, expand: true });
|
this.addActor(this._separator.actor, { span: -1, expand: true });
|
||||||
this._drawingArea.connect('repaint', Lang.bind(this, this._onRepaint));
|
|
||||||
},
|
|
||||||
|
|
||||||
_onRepaint: function(area) {
|
|
||||||
let cr = area.get_context();
|
|
||||||
let themeNode = area.get_theme_node();
|
|
||||||
let [width, height] = area.get_surface_size();
|
|
||||||
let margin = themeNode.get_length('-margin-horizontal');
|
|
||||||
let gradientHeight = themeNode.get_length('-gradient-height');
|
|
||||||
let startColor = themeNode.get_color('-gradient-start');
|
|
||||||
let endColor = themeNode.get_color('-gradient-end');
|
|
||||||
|
|
||||||
let gradientWidth = (width - margin * 2);
|
|
||||||
let gradientOffset = (height - gradientHeight) / 2;
|
|
||||||
let pattern = new Cairo.LinearGradient(margin, gradientOffset, width - margin, gradientOffset + gradientHeight);
|
|
||||||
pattern.addColorStopRGBA(0, startColor.red / 255, startColor.green / 255, startColor.blue / 255, startColor.alpha / 255);
|
|
||||||
pattern.addColorStopRGBA(0.5, endColor.red / 255, endColor.green / 255, endColor.blue / 255, endColor.alpha / 255);
|
|
||||||
pattern.addColorStopRGBA(1, startColor.red / 255, startColor.green / 255, startColor.blue / 255, startColor.alpha / 255);
|
|
||||||
cr.setSource(pattern);
|
|
||||||
cr.rectangle(margin, gradientOffset, gradientWidth, gradientHeight);
|
|
||||||
cr.fill();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -904,6 +884,7 @@ const PopupMenuBase = new Lang.Class({
|
|||||||
app.activate();
|
app.activate();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
menuItem.actor.visible = Main.sessionMode.allowSettings;
|
||||||
this._settingsActions[desktopFile] = menuItem;
|
this._settingsActions[desktopFile] = menuItem;
|
||||||
|
|
||||||
return menuItem;
|
return menuItem;
|
||||||
@@ -1203,7 +1184,6 @@ const PopupMenu = new Lang.Class({
|
|||||||
this.actor = this._boxPointer.actor;
|
this.actor = this._boxPointer.actor;
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.actor.style_class = 'popup-menu-boxpointer';
|
this.actor.style_class = 'popup-menu-boxpointer';
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
|
||||||
|
|
||||||
this._boxWrapper = new Shell.GenericContainer();
|
this._boxWrapper = new Shell.GenericContainer();
|
||||||
this._boxWrapper.connect('get-preferred-width', Lang.bind(this, this._boxGetPreferredWidth));
|
this._boxWrapper.connect('get-preferred-width', Lang.bind(this, this._boxGetPreferredWidth));
|
||||||
@@ -1233,15 +1213,6 @@ const PopupMenu = new Lang.Class({
|
|||||||
this.box.allocate(box, flags);
|
this.box.allocate(box, flags);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyPressEvent: function(actor, event) {
|
|
||||||
if (event.get_key_symbol() == Clutter.Escape) {
|
|
||||||
this.close(BoxPointer.PopupAnimation.FULL);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
setArrowOrigin: function(origin) {
|
setArrowOrigin: function(origin) {
|
||||||
this._boxPointer.setArrowOrigin(origin);
|
this._boxPointer.setArrowOrigin(origin);
|
||||||
},
|
},
|
||||||
@@ -1268,19 +1239,42 @@ const PopupMenu = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
close: function(animate) {
|
close: function(animate) {
|
||||||
if (!this.isOpen)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (this._activeMenuItem)
|
if (this._activeMenuItem)
|
||||||
this._activeMenuItem.setActive(false);
|
this._activeMenuItem.setActive(false);
|
||||||
|
|
||||||
this._boxPointer.hide(animate);
|
if (this._boxPointer.actor.visible)
|
||||||
|
this._boxPointer.hide(animate);
|
||||||
|
|
||||||
|
if (!this.isOpen)
|
||||||
|
return;
|
||||||
|
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
this.emit('open-state-changed', false);
|
this.emit('open-state-changed', false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const PopupDummyMenu = new Lang.Class({
|
||||||
|
Name: 'PopupDummyMenu',
|
||||||
|
|
||||||
|
_init: function(sourceActor) {
|
||||||
|
this.sourceActor = sourceActor;
|
||||||
|
this.actor = sourceActor;
|
||||||
|
this.actor._delegate = this;
|
||||||
|
},
|
||||||
|
|
||||||
|
isChildMenu: function() {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
open: function() { this.emit('open-state-changed', true); },
|
||||||
|
close: function() { this.emit('open-state-changed', false); },
|
||||||
|
toggle: function() {},
|
||||||
|
destroy: function() {
|
||||||
|
this.emit('destroy');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
Signals.addSignalMethods(PopupDummyMenu.prototype);
|
||||||
|
|
||||||
const PopupSubMenu = new Lang.Class({
|
const PopupSubMenu = new Lang.Class({
|
||||||
Name: 'PopupSubMenu',
|
Name: 'PopupSubMenu',
|
||||||
Extends: PopupMenuBase,
|
Extends: PopupMenuBase,
|
||||||
@@ -1535,7 +1529,6 @@ const PopupComboMenu = new Lang.Class({
|
|||||||
|
|
||||||
this.actor = this.box;
|
this.actor = this.box;
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
|
||||||
this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
|
this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
|
||||||
sourceActor.connect('style-changed',
|
sourceActor.connect('style-changed',
|
||||||
Lang.bind(this, this._onSourceActorStyleChanged));
|
Lang.bind(this, this._onSourceActorStyleChanged));
|
||||||
@@ -1543,15 +1536,6 @@ const PopupComboMenu = new Lang.Class({
|
|||||||
global.focus_manager.add_group(this.actor);
|
global.focus_manager.add_group(this.actor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyPressEvent: function(actor, event) {
|
|
||||||
if (event.get_key_symbol() == Clutter.Escape) {
|
|
||||||
this.close(BoxPointer.PopupAnimation.FULL);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onKeyFocusIn: function(actor) {
|
_onKeyFocusIn: function(actor) {
|
||||||
let items = this._getMenuItems();
|
let items = this._getMenuItems();
|
||||||
let activeItem = items[this._activeItemPos];
|
let activeItem = items[this._activeItemPos];
|
||||||
@@ -2042,17 +2026,8 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(owner) {
|
_init: function(owner) {
|
||||||
this._owner = owner;
|
this._owner = owner;
|
||||||
this.grabbed = false;
|
this._grabHelper = new GrabHelper.GrabHelper(owner.actor);
|
||||||
|
|
||||||
this._eventCaptureId = 0;
|
|
||||||
this._enterEventId = 0;
|
|
||||||
this._leaveEventId = 0;
|
|
||||||
this._keyFocusNotifyId = 0;
|
|
||||||
this._activeMenu = null;
|
|
||||||
this._menus = [];
|
this._menus = [];
|
||||||
this._menuStack = [];
|
|
||||||
this._preGrabInputMode = null;
|
|
||||||
this._grabbedFromKeynav = false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
addMenu: function(menu, position) {
|
addMenu: function(menu, position) {
|
||||||
@@ -2071,6 +2046,8 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
|
|
||||||
let source = menu.sourceActor;
|
let source = menu.sourceActor;
|
||||||
if (source) {
|
if (source) {
|
||||||
|
if (!menu.blockSourceEvents)
|
||||||
|
this._grabHelper.addActor(source);
|
||||||
menudata.enterId = source.connect('enter-event', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
|
menudata.enterId = source.connect('enter-event', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
|
||||||
menudata.focusInId = source.connect('key-focus-in', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
|
menudata.focusInId = source.connect('key-focus-in', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
|
||||||
}
|
}
|
||||||
@@ -2083,7 +2060,7 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
|
|
||||||
removeMenu: function(menu) {
|
removeMenu: function(menu) {
|
||||||
if (menu == this._activeMenu)
|
if (menu == this._activeMenu)
|
||||||
this._closeMenu();
|
this._closeMenu(menu);
|
||||||
|
|
||||||
let position = this._findMenu(menu);
|
let position = this._findMenu(menu);
|
||||||
if (position == -1) // not a menu we manage
|
if (position == -1) // not a menu we manage
|
||||||
@@ -2100,79 +2077,29 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
if (menudata.focusInId)
|
if (menudata.focusInId)
|
||||||
menu.sourceActor.disconnect(menudata.focusInId);
|
menu.sourceActor.disconnect(menudata.focusInId);
|
||||||
|
|
||||||
|
if (menu.sourceActor)
|
||||||
|
this._grabHelper.removeActor(menu.sourceActor);
|
||||||
this._menus.splice(position, 1);
|
this._menus.splice(position, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
_grab: function() {
|
get activeMenu() {
|
||||||
Main.pushModal(this._owner.actor);
|
let actor = this._grabHelper.currentGrab.actor;
|
||||||
|
if (actor)
|
||||||
this._eventCaptureId = global.stage.connect('captured-event', Lang.bind(this, this._onEventCapture));
|
return actor._delegate;
|
||||||
// captured-event doesn't see enter/leave events
|
else
|
||||||
this._enterEventId = global.stage.connect('enter-event', Lang.bind(this, this._onEventCapture));
|
return null;
|
||||||
this._leaveEventId = global.stage.connect('leave-event', Lang.bind(this, this._onEventCapture));
|
|
||||||
this._keyFocusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
|
|
||||||
|
|
||||||
this.grabbed = true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_ungrab: function() {
|
ignoreRelease: function() {
|
||||||
global.stage.disconnect(this._eventCaptureId);
|
return this._grabHelper.ignoreRelease();
|
||||||
this._eventCaptureId = 0;
|
|
||||||
global.stage.disconnect(this._enterEventId);
|
|
||||||
this._enterEventId = 0;
|
|
||||||
global.stage.disconnect(this._leaveEventId);
|
|
||||||
this._leaveEventId = 0;
|
|
||||||
global.stage.disconnect(this._keyFocusNotifyId);
|
|
||||||
this._keyFocusNotifyId = 0;
|
|
||||||
|
|
||||||
this.grabbed = false;
|
|
||||||
Main.popModal(this._owner.actor);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMenuOpenState: function(menu, open) {
|
_onMenuOpenState: function(menu, open) {
|
||||||
if (open) {
|
if (open) {
|
||||||
if (this._activeMenu && this._activeMenu.isChildMenu(menu)) {
|
this._grabHelper.grab({ actor: menu.actor, modal: true, focus: menu.sourceActor,
|
||||||
this._menuStack.push(this._activeMenu);
|
onUngrab: Lang.bind(this, this._closeMenu, menu) });
|
||||||
menu.actor.grab_key_focus();
|
|
||||||
}
|
|
||||||
this._activeMenu = menu;
|
|
||||||
} else {
|
} else {
|
||||||
if (this._menuStack.length > 0) {
|
this._grabHelper.ungrab({ actor: menu.actor });
|
||||||
this._activeMenu = this._menuStack.pop();
|
|
||||||
if (menu.sourceActor)
|
|
||||||
menu.sourceActor.grab_key_focus();
|
|
||||||
this._didPop = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check what the focus was before calling pushModal/popModal
|
|
||||||
let focus = global.stage.key_focus;
|
|
||||||
let hadFocus = focus && this._activeMenuContains(focus);
|
|
||||||
|
|
||||||
if (open) {
|
|
||||||
if (!this.grabbed) {
|
|
||||||
this._preGrabInputMode = global.stage_input_mode;
|
|
||||||
this._grabbedFromKeynav = hadFocus;
|
|
||||||
this._grab();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hadFocus)
|
|
||||||
focus.grab_key_focus();
|
|
||||||
else
|
|
||||||
menu.actor.grab_key_focus();
|
|
||||||
} else if (menu == this._activeMenu) {
|
|
||||||
if (this.grabbed)
|
|
||||||
this._ungrab();
|
|
||||||
this._activeMenu = null;
|
|
||||||
|
|
||||||
if (this._grabbedFromKeynav) {
|
|
||||||
if (this._preGrabInputMode == Shell.StageInputMode.FOCUSED)
|
|
||||||
global.stage_input_mode = Shell.StageInputMode.FOCUSED;
|
|
||||||
if (hadFocus && menu.sourceActor)
|
|
||||||
menu.sourceActor.grab_key_focus();
|
|
||||||
else if (focus)
|
|
||||||
focus.grab_key_focus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -2184,87 +2111,38 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
this.removeMenu(childMenu);
|
this.removeMenu(childMenu);
|
||||||
},
|
},
|
||||||
|
|
||||||
// change the currently-open menu without dropping grab
|
|
||||||
_changeMenu: function(newMenu) {
|
_changeMenu: function(newMenu) {
|
||||||
if (this._activeMenu) {
|
let oldMenu = this.activeMenu;
|
||||||
// _onOpenMenuState will drop the grab if it sees
|
if (oldMenu) {
|
||||||
// this._activeMenu being closed; so clear _activeMenu
|
|
||||||
// before closing it to keep that from happening
|
|
||||||
let oldMenu = this._activeMenu;
|
|
||||||
this._activeMenu = null;
|
|
||||||
for (let i = this._menuStack.length - 1; i >= 0; i--)
|
|
||||||
this._menuStack[i].close(BoxPointer.PopupAnimation.FADE);
|
|
||||||
oldMenu.close(BoxPointer.PopupAnimation.FADE);
|
oldMenu.close(BoxPointer.PopupAnimation.FADE);
|
||||||
newMenu.open(BoxPointer.PopupAnimation.FADE);
|
newMenu.open(BoxPointer.PopupAnimation.FADE);
|
||||||
} else
|
} else {
|
||||||
newMenu.open(BoxPointer.PopupAnimation.FULL);
|
newMenu.open(BoxPointer.PopupAnimation.FULL);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMenuSourceEnter: function(menu) {
|
_onMenuSourceEnter: function(menu) {
|
||||||
if (!this.grabbed || menu == this._activeMenu)
|
if (!this._grabHelper.grabbed)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (this._activeMenu && this._activeMenu.isChildMenu(menu))
|
if (this._grabHelper.isActorGrabbed(menu.actor))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (this._menuStack.indexOf(menu) != -1)
|
let isChildMenu = this._grabHelper.grabStack.some(function(grab) {
|
||||||
return false;
|
let existingMenu = grab.actor._delegate;
|
||||||
|
return existingMenu.isChildMenu(menu);
|
||||||
if (this._menuStack.length > 0 && this._menuStack[0].isChildMenu(menu))
|
});
|
||||||
|
if (isChildMenu)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this._changeMenu(menu);
|
this._changeMenu(menu);
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyFocusChanged: function() {
|
|
||||||
if (!this.grabbed || !this._activeMenu)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let focus = global.stage.key_focus;
|
|
||||||
if (focus) {
|
|
||||||
if (this._activeMenuContains(focus))
|
|
||||||
return;
|
|
||||||
if (this._menuStack.length > 0)
|
|
||||||
return;
|
|
||||||
if (focus._delegate && focus._delegate.menu &&
|
|
||||||
this._findMenu(focus._delegate.menu) != -1)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._closeMenu();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onMenuDestroy: function(menu) {
|
_onMenuDestroy: function(menu) {
|
||||||
this.removeMenu(menu);
|
this.removeMenu(menu);
|
||||||
},
|
},
|
||||||
|
|
||||||
_activeMenuContains: function(actor) {
|
|
||||||
return this._activeMenu != null
|
|
||||||
&& (this._activeMenu.actor.contains(actor) ||
|
|
||||||
(this._activeMenu.sourceActor && this._activeMenu.sourceActor.contains(actor)));
|
|
||||||
},
|
|
||||||
|
|
||||||
_eventIsOnActiveMenu: function(event) {
|
|
||||||
return this._activeMenuContains(event.get_source());
|
|
||||||
},
|
|
||||||
|
|
||||||
_shouldBlockEvent: function(event) {
|
|
||||||
let src = event.get_source();
|
|
||||||
|
|
||||||
if (this._activeMenu != null && this._activeMenu.actor.contains(src))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for (let i = 0; i < this._menus.length; i++) {
|
|
||||||
let menu = this._menus[i].menu;
|
|
||||||
if (menu.sourceActor && !menu.blockSourceEvents && menu.sourceActor.contains(src)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
_findMenu: function(item) {
|
_findMenu: function(item) {
|
||||||
for (let i = 0; i < this._menus.length; i++) {
|
for (let i = 0; i < this._menus.length; i++) {
|
||||||
let menudata = this._menus[i];
|
let menudata = this._menus[i];
|
||||||
@@ -2274,41 +2152,11 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
return -1;
|
return -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEventCapture: function(actor, event) {
|
_closeMenu: function(isUser, menu) {
|
||||||
if (!this.grabbed)
|
// If this isn't a user action, we called close()
|
||||||
return false;
|
// on the BoxPointer ourselves, so we shouldn't
|
||||||
|
// reanimate.
|
||||||
if (this._owner.menuEventFilter &&
|
if (isUser)
|
||||||
this._owner.menuEventFilter(event))
|
menu.close(BoxPointer.PopupAnimation.FULL);
|
||||||
return true;
|
|
||||||
|
|
||||||
if (this._didPop) {
|
|
||||||
this._didPop = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
let activeMenuContains = this._eventIsOnActiveMenu(event);
|
|
||||||
let eventType = event.type();
|
|
||||||
|
|
||||||
if (eventType == Clutter.EventType.BUTTON_RELEASE) {
|
|
||||||
if (activeMenuContains) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
this._closeMenu();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else if (eventType == Clutter.EventType.BUTTON_PRESS && !activeMenuContains) {
|
|
||||||
this._closeMenu();
|
|
||||||
return true;
|
|
||||||
} else if (!this._shouldBlockEvent(event)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
_closeMenu: function() {
|
|
||||||
if (this._activeMenu != null)
|
|
||||||
this._activeMenu.close(BoxPointer.PopupAnimation.FULL);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,91 +29,163 @@ const SearchProviderIface = <interface name="org.gnome.Shell.SearchProvider">
|
|||||||
</method>
|
</method>
|
||||||
</interface>;
|
</interface>;
|
||||||
|
|
||||||
var SearchProviderProxy = Gio.DBusProxy.makeProxyWrapper(SearchProviderIface);
|
const SearchProvider2Iface = <interface name="org.gnome.Shell.SearchProvider2">
|
||||||
|
<method name="GetInitialResultSet">
|
||||||
|
<arg type="as" direction="in" />
|
||||||
|
<arg type="as" direction="out" />
|
||||||
|
</method>
|
||||||
|
<method name="GetSubsearchResultSet">
|
||||||
|
<arg type="as" direction="in" />
|
||||||
|
<arg type="as" direction="in" />
|
||||||
|
<arg type="as" direction="out" />
|
||||||
|
</method>
|
||||||
|
<method name="GetResultMetas">
|
||||||
|
<arg type="as" direction="in" />
|
||||||
|
<arg type="aa{sv}" direction="out" />
|
||||||
|
</method>
|
||||||
|
<method name="ActivateResult">
|
||||||
|
<arg type="s" direction="in" />
|
||||||
|
<arg type="as" direction="in" />
|
||||||
|
<arg type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
<method name="LaunchSearch">
|
||||||
|
<arg type="as" direction="in" />
|
||||||
|
<arg type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
</interface>;
|
||||||
|
|
||||||
|
var SearchProviderProxy = Gio.DBusProxy.makeProxyWrapper(SearchProviderIface);
|
||||||
|
var SearchProvider2Proxy = Gio.DBusProxy.makeProxyWrapper(SearchProvider2Iface);
|
||||||
|
|
||||||
function loadRemoteSearchProviders(addProviderCallback) {
|
function loadRemoteSearchProviders(addProviderCallback) {
|
||||||
let dataDirs = GLib.get_system_data_dirs();
|
let data = { loadedProviders: [],
|
||||||
let loadedProviders = {};
|
objectPaths: {},
|
||||||
for (let i = 0; i < dataDirs.length; i++) {
|
addProviderCallback: addProviderCallback };
|
||||||
let path = GLib.build_filenamev([dataDirs[i], 'gnome-shell', 'search-providers']);
|
FileUtils.collectFromDatadirsAsync('search-providers',
|
||||||
let dir = Gio.file_new_for_path(path);
|
{ loadedCallback: remoteProvidersLoaded,
|
||||||
if (!dir.query_exists(null))
|
processFile: loadRemoteSearchProvider,
|
||||||
continue;
|
data: data
|
||||||
loadRemoteSearchProvidersFromDir(dir, loadedProviders, addProviderCallback);
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadRemoteSearchProvider(file, info, data) {
|
||||||
|
let keyfile = new GLib.KeyFile();
|
||||||
|
let path = file.get_path();
|
||||||
|
|
||||||
|
try {
|
||||||
|
keyfile.load_from_file(path, 0);
|
||||||
|
} catch(e) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
function loadRemoteSearchProvidersFromDir(dir, loadedProviders, addProviderCallback) {
|
if (!keyfile.has_group(KEY_FILE_GROUP))
|
||||||
let dirPath = dir.get_path();
|
return;
|
||||||
FileUtils.listDirAsync(dir, Lang.bind(this, function(files) {
|
|
||||||
for (let i = 0; i < files.length; i++) {
|
|
||||||
let keyfile = new GLib.KeyFile();
|
|
||||||
let path = GLib.build_filenamev([dirPath, files[i].get_name()]);
|
|
||||||
|
|
||||||
try {
|
let remoteProvider;
|
||||||
keyfile.load_from_file(path, 0);
|
try {
|
||||||
} catch(e) {
|
let group = KEY_FILE_GROUP;
|
||||||
continue;
|
let busName = keyfile.get_string(group, 'BusName');
|
||||||
}
|
let objectPath = keyfile.get_string(group, 'ObjectPath');
|
||||||
|
|
||||||
if (!keyfile.has_group(KEY_FILE_GROUP))
|
if (data.objectPaths[objectPath])
|
||||||
continue;
|
return;
|
||||||
|
|
||||||
let remoteProvider, title;
|
let appInfo = null;
|
||||||
try {
|
try {
|
||||||
let group = KEY_FILE_GROUP;
|
let desktopId = keyfile.get_string(group, 'DesktopId');
|
||||||
let busName = keyfile.get_string(group, 'BusName');
|
appInfo = Gio.DesktopAppInfo.new(desktopId);
|
||||||
let objectPath = keyfile.get_string(group, 'ObjectPath');
|
} catch (e) {
|
||||||
|
log('Ignoring search provider ' + path + ': missing DesktopId');
|
||||||
if (loadedProviders[objectPath])
|
return;
|
||||||
continue;
|
|
||||||
|
|
||||||
let appInfo = null;
|
|
||||||
try {
|
|
||||||
let desktopId = keyfile.get_string(group, 'DesktopId');
|
|
||||||
appInfo = Gio.DesktopAppInfo.new(desktopId);
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
let icon;
|
|
||||||
if (appInfo) {
|
|
||||||
icon = appInfo.get_icon();
|
|
||||||
title = appInfo.get_name();
|
|
||||||
} else {
|
|
||||||
let iconName = keyfile.get_string(group, 'Icon');
|
|
||||||
icon = new Gio.ThemedIcon({ name: iconName });
|
|
||||||
title = keyfile.get_locale_string(group, 'Title', null);
|
|
||||||
}
|
|
||||||
|
|
||||||
remoteProvider = new RemoteSearchProvider(title,
|
|
||||||
icon,
|
|
||||||
busName,
|
|
||||||
objectPath);
|
|
||||||
loadedProviders[objectPath] = remoteProvider;
|
|
||||||
} catch(e) {
|
|
||||||
log('Failed to add search provider "%s": %s'.format(title, e.toString()));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
addProviderCallback(remoteProvider);
|
|
||||||
}
|
}
|
||||||
}));
|
|
||||||
|
|
||||||
};
|
let version = '1';
|
||||||
|
try {
|
||||||
|
version = keyfile.get_string(group, 'Version');
|
||||||
|
} catch (e) {
|
||||||
|
// ignore error
|
||||||
|
}
|
||||||
|
|
||||||
|
if (version >= 2)
|
||||||
|
remoteProvider = new RemoteSearchProvider2(appInfo, busName, objectPath);
|
||||||
|
else
|
||||||
|
remoteProvider = new RemoteSearchProvider(appInfo, busName, objectPath);
|
||||||
|
|
||||||
|
data.objectPaths[objectPath] = remoteProvider;
|
||||||
|
data.loadedProviders.push(remoteProvider);
|
||||||
|
} catch(e) {
|
||||||
|
log('Failed to add search provider %s: %s'.format(path, e.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function remoteProvidersLoaded(loadState) {
|
||||||
|
let searchSettings = new Gio.Settings({ schema: Search.SEARCH_PROVIDERS_SCHEMA });
|
||||||
|
let sortOrder = searchSettings.get_strv('sort-order');
|
||||||
|
let numSorted = sortOrder.length;
|
||||||
|
|
||||||
|
loadState.loadedProviders.sort(
|
||||||
|
function(providerA, providerB) {
|
||||||
|
let idxA, idxB;
|
||||||
|
let appIdA, appIdB;
|
||||||
|
|
||||||
|
appIdA = providerA.appInfo.get_id();
|
||||||
|
appIdB = providerB.appInfo.get_id();
|
||||||
|
|
||||||
|
idxA = sortOrder.indexOf(appIdA);
|
||||||
|
idxB = sortOrder.indexOf(appIdB);
|
||||||
|
|
||||||
|
// if no provider is found in the order, use alphabetical order
|
||||||
|
if ((idxA == -1) && (idxB == -1))
|
||||||
|
return GLib.utf8_collate(providerA.title, providerB.title);
|
||||||
|
|
||||||
|
if (numSorted > 1) {
|
||||||
|
// if providerA is the last, it goes after everything
|
||||||
|
if ((idxA + 1) == numSorted)
|
||||||
|
return 1;
|
||||||
|
// if providerB is the last, it goes after everything
|
||||||
|
else if ((idxB + 1) == numSorted)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if providerA isn't found, it's sorted after providerB
|
||||||
|
if (idxA == -1)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// if providerB isn't found, it's sorted after providerA
|
||||||
|
if (idxB == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
// finally, if both providers are found, return their order in the list
|
||||||
|
return (idxA - idxB);
|
||||||
|
});
|
||||||
|
|
||||||
|
loadState.loadedProviders.forEach(
|
||||||
|
function(provider) {
|
||||||
|
loadState.addProviderCallback(provider);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const RemoteSearchProvider = new Lang.Class({
|
const RemoteSearchProvider = new Lang.Class({
|
||||||
Name: 'RemoteSearchProvider',
|
Name: 'RemoteSearchProvider',
|
||||||
Extends: Search.SearchProvider,
|
|
||||||
|
|
||||||
_init: function(title, icon, dbusName, dbusPath) {
|
_init: function(appInfo, dbusName, dbusPath, proxyType) {
|
||||||
this._proxy = new SearchProviderProxy(Gio.DBus.session,
|
if (!proxyType)
|
||||||
dbusName, dbusPath);
|
proxyType = SearchProviderProxy;
|
||||||
|
|
||||||
|
this.proxy = new proxyType(Gio.DBus.session,
|
||||||
|
dbusName, dbusPath, Lang.bind(this, this._onProxyConstructed));
|
||||||
|
|
||||||
|
this.appInfo = appInfo;
|
||||||
|
this.id = appInfo.get_id();
|
||||||
|
this.isRemoteProvider = true;
|
||||||
|
|
||||||
this.parent(title.toUpperCase());
|
|
||||||
this._cancellable = new Gio.Cancellable();
|
this._cancellable = new Gio.Cancellable();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onProxyConstructed: function(proxy) {
|
||||||
|
// Do nothing
|
||||||
|
},
|
||||||
|
|
||||||
createIcon: function(size, meta) {
|
createIcon: function(size, meta) {
|
||||||
if (meta['gicon']) {
|
if (meta['gicon']) {
|
||||||
return new St.Icon({ gicon: Gio.icon_new_for_string(meta['gicon']),
|
return new St.Icon({ gicon: Gio.icon_new_for_string(meta['gicon']),
|
||||||
@@ -126,9 +198,7 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
width, height, rowStride, size);
|
width, height, rowStride, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ugh, but we want to fall back to something ...
|
return null;
|
||||||
return new St.Icon({ icon_name: 'text-x-generic',
|
|
||||||
icon_size: size });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_getResultsFinished: function(results, error) {
|
_getResultsFinished: function(results, error) {
|
||||||
@@ -141,9 +211,9 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
this._cancellable.cancel();
|
this._cancellable.cancel();
|
||||||
this._cancellable.reset();
|
this._cancellable.reset();
|
||||||
try {
|
try {
|
||||||
this._proxy.GetInitialResultSetRemote(terms,
|
this.proxy.GetInitialResultSetRemote(terms,
|
||||||
Lang.bind(this, this._getResultsFinished),
|
Lang.bind(this, this._getResultsFinished),
|
||||||
this._cancellable);
|
this._cancellable);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
log('Error calling GetInitialResultSet for provider %s: %s'.format( this.title, e.toString()));
|
log('Error calling GetInitialResultSet for provider %s: %s'.format( this.title, e.toString()));
|
||||||
this.searchSystem.pushResults(this, []);
|
this.searchSystem.pushResults(this, []);
|
||||||
@@ -154,9 +224,9 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
this._cancellable.cancel();
|
this._cancellable.cancel();
|
||||||
this._cancellable.reset();
|
this._cancellable.reset();
|
||||||
try {
|
try {
|
||||||
this._proxy.GetSubsearchResultSetRemote(previousResults, newTerms,
|
this.proxy.GetSubsearchResultSetRemote(previousResults, newTerms,
|
||||||
Lang.bind(this, this._getResultsFinished),
|
Lang.bind(this, this._getResultsFinished),
|
||||||
this._cancellable);
|
this._cancellable);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
log('Error calling GetSubsearchResultSet for provider %s: %s'.format(this.title, e.toString()));
|
log('Error calling GetSubsearchResultSet for provider %s: %s'.format(this.title, e.toString()));
|
||||||
this.searchSystem.pushResults(this, []);
|
this.searchSystem.pushResults(this, []);
|
||||||
@@ -185,9 +255,9 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
this._cancellable.cancel();
|
this._cancellable.cancel();
|
||||||
this._cancellable.reset();
|
this._cancellable.reset();
|
||||||
try {
|
try {
|
||||||
this._proxy.GetResultMetasRemote(ids,
|
this.proxy.GetResultMetasRemote(ids,
|
||||||
Lang.bind(this, this._getResultMetasFinished, callback),
|
Lang.bind(this, this._getResultMetasFinished, callback),
|
||||||
this._cancellable);
|
this._cancellable);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
log('Error calling GetResultMetas for provider %s: %s'.format(this.title, e.toString()));
|
log('Error calling GetResultMetas for provider %s: %s'.format(this.title, e.toString()));
|
||||||
callback([]);
|
callback([]);
|
||||||
@@ -195,8 +265,32 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(id) {
|
activateResult: function(id) {
|
||||||
this._proxy.ActivateResultRemote(id);
|
this.proxy.ActivateResultRemote(id);
|
||||||
|
},
|
||||||
|
|
||||||
|
launchSearch: function(terms) {
|
||||||
|
// the provider is not compatible with the new version of the interface, launch
|
||||||
|
// the app itself but warn so we can catch the error in logs
|
||||||
|
log('Search provider ' + this.appInfo.get_id() + ' does not implement LaunchSearch');
|
||||||
|
this.appInfo.launch([], global.create_app_launch_context());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const RemoteSearchProvider2 = new Lang.Class({
|
||||||
|
Name: 'RemoteSearchProvider2',
|
||||||
|
Extends: RemoteSearchProvider,
|
||||||
|
|
||||||
|
_init: function(appInfo, dbusName, dbusPath) {
|
||||||
|
this.parent(appInfo, dbusName, dbusPath, SearchProvider2Proxy);
|
||||||
|
|
||||||
|
this.canLaunchSearch = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
activateResult: function(id, terms) {
|
||||||
|
this.proxy.ActivateResultRemote(id, terms, global.get_current_time());
|
||||||
|
},
|
||||||
|
|
||||||
|
launchSearch: function(terms) {
|
||||||
|
this.proxy.LaunchSearchRemote(terms, global.get_current_time());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@@ -202,11 +202,12 @@ const RunDialog = new Lang.Class({
|
|||||||
|
|
||||||
|
|
||||||
let label = new St.Label({ style_class: 'run-dialog-label',
|
let label = new St.Label({ style_class: 'run-dialog-label',
|
||||||
text: _("Please enter a command:") });
|
text: _("Enter a Command") });
|
||||||
|
|
||||||
this.contentLayout.add(label, { y_align: St.Align.START });
|
this.contentLayout.add(label, { y_align: St.Align.START });
|
||||||
|
|
||||||
let entry = new St.Entry({ style_class: 'run-dialog-entry' });
|
let entry = new St.Entry({ style_class: 'run-dialog-entry',
|
||||||
|
can_focus: true });
|
||||||
ShellEntry.addContextMenu(entry);
|
ShellEntry.addContextMenu(entry);
|
||||||
|
|
||||||
entry.label_actor = label;
|
entry.label_actor = label;
|
||||||
@@ -219,7 +220,9 @@ const RunDialog = new Lang.Class({
|
|||||||
|
|
||||||
this.contentLayout.add(this._errorBox, { expand: true });
|
this.contentLayout.add(this._errorBox, { expand: true });
|
||||||
|
|
||||||
let errorIcon = new St.Icon({ icon_name: 'dialog-error', icon_size: 24, style_class: 'run-dialog-error-icon' });
|
let errorIcon = new St.Icon({ icon_name: 'dialog-error-symbolic',
|
||||||
|
icon_size: 24,
|
||||||
|
style_class: 'run-dialog-error-icon' });
|
||||||
|
|
||||||
this._errorBox.add(errorIcon, { y_align: St.Align.MIDDLE });
|
this._errorBox.add(errorIcon, { y_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
@@ -234,6 +237,10 @@ const RunDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._errorBox.hide();
|
this._errorBox.hide();
|
||||||
|
|
||||||
|
this.setButtons([{ action: Lang.bind(this, this.close),
|
||||||
|
label: _("Close"),
|
||||||
|
key: Clutter.Escape }]);
|
||||||
|
|
||||||
this._pathCompleter = new Gio.FilenameCompleter();
|
this._pathCompleter = new Gio.FilenameCompleter();
|
||||||
this._commandCompleter = new CommandCompleter();
|
this._commandCompleter = new CommandCompleter();
|
||||||
this._group.connect('notify::visible', Lang.bind(this._commandCompleter, this._commandCompleter.update));
|
this._group.connect('notify::visible', Lang.bind(this._commandCompleter, this._commandCompleter.update));
|
||||||
@@ -244,20 +251,12 @@ const RunDialog = new Lang.Class({
|
|||||||
let symbol = e.get_key_symbol();
|
let symbol = e.get_key_symbol();
|
||||||
if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
|
if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
|
||||||
this.popModal();
|
this.popModal();
|
||||||
if (e.get_state() & Clutter.ModifierType.CONTROL_MASK)
|
this._run(o.get_text(),
|
||||||
this._run(o.get_text(), true);
|
e.get_state() & Clutter.ModifierType.CONTROL_MASK);
|
||||||
else
|
if (!this._commandError ||
|
||||||
this._run(o.get_text(), false);
|
!this.pushModal())
|
||||||
if (!this._commandError)
|
|
||||||
this.close();
|
this.close();
|
||||||
else {
|
|
||||||
if (!this.pushModal())
|
|
||||||
this.close();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (symbol == Clutter.Escape) {
|
|
||||||
this.close();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (symbol == Clutter.slash) {
|
if (symbol == Clutter.slash) {
|
||||||
|
|||||||
@@ -21,11 +21,12 @@ const Overview = imports.ui.overview;
|
|||||||
const MessageTray = imports.ui.messageTray;
|
const MessageTray = imports.ui.messageTray;
|
||||||
const ShellDBus = imports.ui.shellDBus;
|
const ShellDBus = imports.ui.shellDBus;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
|
const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
|
||||||
const LOCK_ENABLED_KEY = 'lock-enabled';
|
const LOCK_ENABLED_KEY = 'lock-enabled';
|
||||||
|
|
||||||
const CURTAIN_SLIDE_TIME = 0.5;
|
const CURTAIN_SLIDE_TIME = 0.3;
|
||||||
// fraction of screen height the arrow must reach before completing
|
// fraction of screen height the arrow must reach before completing
|
||||||
// the slide up automatically
|
// the slide up automatically
|
||||||
const ARROW_DRAG_THRESHOLD = 0.1;
|
const ARROW_DRAG_THRESHOLD = 0.1;
|
||||||
@@ -46,7 +47,39 @@ const SUMMARY_ICON_SIZE = 48;
|
|||||||
// STANDARD_FADE_TIME is used when the session goes idle, while
|
// STANDARD_FADE_TIME is used when the session goes idle, while
|
||||||
// SHORT_FADE_TIME is used when requesting lock explicitly from the user menu
|
// SHORT_FADE_TIME is used when requesting lock explicitly from the user menu
|
||||||
const STANDARD_FADE_TIME = 10;
|
const STANDARD_FADE_TIME = 10;
|
||||||
const SHORT_FADE_TIME = 0.8;
|
const SHORT_FADE_TIME = 0.3;
|
||||||
|
|
||||||
|
function sample(offx, offy) {
|
||||||
|
return 'texel += texture2D (sampler, tex_coord.st + pixel_step * ' +
|
||||||
|
'vec2 (' + offx + ',' + offy + '));\n'
|
||||||
|
}
|
||||||
|
const GLSL_BLUR_EFFECT_DECLARATIONS = ' \
|
||||||
|
uniform vec2 pixel_step;\n \
|
||||||
|
uniform float desaturation;\n \
|
||||||
|
vec4 apply_blur(in sampler2D sampler, in vec2 tex_coord) {\n \
|
||||||
|
vec4 texel;\n \
|
||||||
|
texel = texture2D (sampler, tex_coord.st);\n'
|
||||||
|
+ sample(-1.0, -1.0)
|
||||||
|
+ sample( 0.0, -1.0)
|
||||||
|
+ sample(+1.0, -1.0)
|
||||||
|
+ sample(-1.0, 0.0)
|
||||||
|
+ sample(+1.0, 0.0)
|
||||||
|
+ sample(-1.0, +1.0)
|
||||||
|
+ sample( 0.0, +1.0)
|
||||||
|
+ sample(+1.0, +1.0) + ' \
|
||||||
|
texel /= 9.0;\n \
|
||||||
|
return texel;\n \
|
||||||
|
}\n \
|
||||||
|
vec3 desaturate (const vec3 color)\n \
|
||||||
|
{\n \
|
||||||
|
const vec3 gray_conv = vec3 (0.299, 0.587, 0.114);\n \
|
||||||
|
vec3 gray = vec3 (dot (gray_conv, color));\n \
|
||||||
|
return vec3 (mix (color.rgb, gray, desaturation));\n \
|
||||||
|
}';
|
||||||
|
const GLSL_BLUR_EFFECT_CODE = ' \
|
||||||
|
cogl_texel = apply_blur(cogl_sampler, cogl_tex_coord.st);\n \
|
||||||
|
cogl_texel.rgb = desaturate(cogl_texel.rgb);\n';
|
||||||
|
|
||||||
|
|
||||||
const Clock = new Lang.Class({
|
const Clock = new Lang.Class({
|
||||||
Name: 'ScreenShieldClock',
|
Name: 'ScreenShieldClock',
|
||||||
@@ -95,13 +128,13 @@ const NotificationsBox = new Lang.Class({
|
|||||||
|
|
||||||
this._residentNotificationBox = new St.BoxLayout({ vertical: true,
|
this._residentNotificationBox = new St.BoxLayout({ vertical: true,
|
||||||
style_class: 'screen-shield-notifications-box' });
|
style_class: 'screen-shield-notifications-box' });
|
||||||
let scrollView = new St.ScrollView({ x_fill: false, x_align: St.Align.MIDDLE });
|
let scrollView = new St.ScrollView({ x_fill: false, x_align: St.Align.START });
|
||||||
this._persistentNotificationBox = new St.BoxLayout({ vertical: true,
|
this._persistentNotificationBox = new St.BoxLayout({ vertical: true,
|
||||||
style_class: 'screen-shield-notifications-box' });
|
style_class: 'screen-shield-notifications-box' });
|
||||||
scrollView.add_actor(this._persistentNotificationBox);
|
scrollView.add_actor(this._persistentNotificationBox);
|
||||||
|
|
||||||
this.actor.add(this._residentNotificationBox, { x_fill: true });
|
this.actor.add(this._residentNotificationBox, { x_fill: true });
|
||||||
this.actor.add(scrollView, { x_fill: true, x_align: St.Align.MIDDLE });
|
this.actor.add(scrollView, { x_fill: true, x_align: St.Align.START });
|
||||||
|
|
||||||
this._items = [];
|
this._items = [];
|
||||||
Main.messageTray.getSummaryItems().forEach(Lang.bind(this, function(item) {
|
Main.messageTray.getSummaryItems().forEach(Lang.bind(this, function(item) {
|
||||||
@@ -126,13 +159,12 @@ const NotificationsBox = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateVisibility: function() {
|
_updateVisibility: function() {
|
||||||
if (this._residentNotificationBox.get_n_children() > 0) {
|
this._residentNotificationBox.visible = this._residentNotificationBox.get_n_children() > 0;
|
||||||
this.actor.show();
|
this._persistentNotificationBox.visible = this._persistentNotificationBox.get_children().some(function(a) {
|
||||||
return;
|
return a.visible;
|
||||||
}
|
});
|
||||||
|
|
||||||
let children = this._persistentNotificationBox.get_children();
|
this.actor.visible = this._residentNotificationBox.visible || this._persistentNotificationBox.visible;
|
||||||
this.actor.visible = children.some(function(a) { return a.visible; });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_sourceIsResident: function(source) {
|
_sourceIsResident: function(source) {
|
||||||
@@ -153,7 +185,7 @@ const NotificationsBox = new Lang.Class({
|
|||||||
box.add(sourceActor.actor, { y_fill: true });
|
box.add(sourceActor.actor, { y_fill: true });
|
||||||
|
|
||||||
let textBox = new St.BoxLayout({ vertical: true });
|
let textBox = new St.BoxLayout({ vertical: true });
|
||||||
box.add(textBox);
|
box.add(textBox, { y_fill: false, y_align: St.Align.START });
|
||||||
|
|
||||||
let label = new St.Label({ text: source.title,
|
let label = new St.Label({ text: source.title,
|
||||||
style_class: 'screen-shield-notification-label' });
|
style_class: 'screen-shield-notification-label' });
|
||||||
@@ -186,11 +218,11 @@ const NotificationsBox = new Lang.Class({
|
|||||||
|
|
||||||
if (obj.resident) {
|
if (obj.resident) {
|
||||||
this._residentNotificationBox.add(item.notificationStackWidget);
|
this._residentNotificationBox.add(item.notificationStackWidget);
|
||||||
item.closeButtonVisible = false;
|
item.closeButton.hide();
|
||||||
item.prepareNotificationStackForShowing();
|
item.prepareNotificationStackForShowing();
|
||||||
} else {
|
} else {
|
||||||
[obj.sourceBox, obj.countLabel] = this._makeNotificationSource(item.source);
|
[obj.sourceBox, obj.countLabel] = this._makeNotificationSource(item.source);
|
||||||
this._persistentNotificationBox.add(obj.sourceBox, { x_fill: false, x_align: St.Align.MIDDLE });
|
this._persistentNotificationBox.add(obj.sourceBox, { x_fill: false, x_align: St.Align.START });
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.contentUpdatedId = item.connect('content-updated', Lang.bind(this, this._onItemContentUpdated));
|
obj.contentUpdatedId = item.connect('content-updated', Lang.bind(this, this._onItemContentUpdated));
|
||||||
@@ -236,7 +268,7 @@ const NotificationsBox = new Lang.Class({
|
|||||||
this._residentNotificationBox.remove_actor(obj.item.notificationStackWidget);
|
this._residentNotificationBox.remove_actor(obj.item.notificationStackWidget);
|
||||||
|
|
||||||
[obj.sourceBox, obj.countLabel] = this._makeNotificationSource(obj.source);
|
[obj.sourceBox, obj.countLabel] = this._makeNotificationSource(obj.source);
|
||||||
this._persistentNotificationBox.add(obj.sourceBox);
|
this._persistentNotificationBox.add(obj.sourceBox, { x_fill: false, x_align: St.Align.START });
|
||||||
} else if (itemShouldBeResident && !obj.resident) {
|
} else if (itemShouldBeResident && !obj.resident) {
|
||||||
// make into a resident item
|
// make into a resident item
|
||||||
obj.sourceBox.destroy();
|
obj.sourceBox.destroy();
|
||||||
@@ -244,7 +276,7 @@ const NotificationsBox = new Lang.Class({
|
|||||||
obj.resident = true;
|
obj.resident = true;
|
||||||
|
|
||||||
this._residentNotificationBox.add(obj.item.notificationStackWidget);
|
this._residentNotificationBox.add(obj.item.notificationStackWidget);
|
||||||
obj.item.closeButtonVisible = false;
|
obj.item.closeButton.hide();
|
||||||
obj.item.prepareNotificationStackForShowing();
|
obj.item.prepareNotificationStackForShowing();
|
||||||
} else {
|
} else {
|
||||||
// just update the counter
|
// just update the counter
|
||||||
@@ -276,6 +308,7 @@ const NotificationsBox = new Lang.Class({
|
|||||||
obj.item.disconnect(obj.contentUpdatedId);
|
obj.item.disconnect(obj.contentUpdatedId);
|
||||||
obj.source.disconnect(obj.sourceDestroyId);
|
obj.source.disconnect(obj.sourceDestroyId);
|
||||||
obj.source.disconnect(obj.sourceCountChangedId);
|
obj.source.disconnect(obj.sourceCountChangedId);
|
||||||
|
obj.source.disconnect(obj.sourceTitleChangedId);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -335,6 +368,10 @@ const Arrow = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function clamp(value, min, max) {
|
||||||
|
return Math.max(min, Math.min(max, value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test screen shield, make sure to kill gnome-screensaver.
|
* To test screen shield, make sure to kill gnome-screensaver.
|
||||||
*
|
*
|
||||||
@@ -362,13 +399,25 @@ const ScreenShield = new Lang.Class({
|
|||||||
Lang.bind(this, this._onLockScreenKeyRelease));
|
Lang.bind(this, this._onLockScreenKeyRelease));
|
||||||
this._lockScreenGroup.connect('scroll-event',
|
this._lockScreenGroup.connect('scroll-event',
|
||||||
Lang.bind(this, this._onLockScreenScroll));
|
Lang.bind(this, this._onLockScreenScroll));
|
||||||
|
Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic');
|
||||||
|
|
||||||
this._lockScreenContents = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
this._lockScreenContents = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
||||||
name: 'lockScreenContents' });
|
name: 'lockScreenContents' });
|
||||||
this._lockScreenContents.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
this._lockScreenContents.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
||||||
|
|
||||||
|
let backgroundActor = Meta.BackgroundActor.new_for_screen(global.screen);
|
||||||
|
backgroundActor.add_glsl_snippet(Meta.SnippetHook.TEXTURE_LOOKUP,
|
||||||
|
GLSL_BLUR_EFFECT_DECLARATIONS,
|
||||||
|
GLSL_BLUR_EFFECT_CODE,
|
||||||
|
true);
|
||||||
|
backgroundActor.set_uniform_float('desaturation',
|
||||||
|
1, 1, [0.6]);
|
||||||
|
backgroundActor.connect('notify::size', function(actor) {
|
||||||
|
actor.set_uniform_float('pixel_step', 2, 1, [1/actor.width, 1/actor.height]);
|
||||||
|
});
|
||||||
|
|
||||||
this._background = new St.Bin({ style_class: 'screen-shield-background',
|
this._background = new St.Bin({ style_class: 'screen-shield-background',
|
||||||
child: Meta.BackgroundActor.new_for_screen(global.screen) });
|
child: backgroundActor });
|
||||||
this._lockScreenGroup.add_actor(this._background);
|
this._lockScreenGroup.add_actor(this._background);
|
||||||
this._lockScreenGroup.add_actor(this._lockScreenContents);
|
this._lockScreenGroup.add_actor(this._lockScreenContents);
|
||||||
|
|
||||||
@@ -387,14 +436,11 @@ const ScreenShield = new Lang.Class({
|
|||||||
}
|
}
|
||||||
this._lockScreenContents.add_actor(this._arrowContainer);
|
this._lockScreenContents.add_actor(this._arrowContainer);
|
||||||
|
|
||||||
let dragArea = new Clutter.Rect({ origin: new Clutter.Point({ x: 0, y: -global.screen_height, }),
|
this._dragAction = new Clutter.GestureAction();
|
||||||
size: new Clutter.Size({ width: global.screen_width,
|
this._dragAction.connect('gesture-begin', Lang.bind(this, this._onDragBegin));
|
||||||
height: global.screen_height }) });
|
this._dragAction.connect('gesture-progress', Lang.bind(this, this._onDragMotion));
|
||||||
let action = new Clutter.DragAction({ drag_axis: Clutter.DragAxis.Y_AXIS,
|
this._dragAction.connect('gesture-end', Lang.bind(this, this._onDragEnd));
|
||||||
drag_area: dragArea });
|
this._lockScreenGroup.add_action(this._dragAction);
|
||||||
action.connect('drag-begin', Lang.bind(this, this._onDragBegin));
|
|
||||||
action.connect('drag-end', Lang.bind(this, this._onDragEnd));
|
|
||||||
this._lockScreenGroup.add_action(action);
|
|
||||||
|
|
||||||
this._lockDialogGroup = new St.Widget({ x_expand: true,
|
this._lockDialogGroup = new St.Widget({ x_expand: true,
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
@@ -429,29 +475,40 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._hasLockScreen = false;
|
this._hasLockScreen = false;
|
||||||
this._isGreeter = false;
|
this._isGreeter = false;
|
||||||
this._isActive = false;
|
this._isActive = false;
|
||||||
|
this._inUnlockAnimation = false;
|
||||||
|
this._activationTime = 0;
|
||||||
|
|
||||||
this._lightbox = new Lightbox.Lightbox(Main.uiGroup,
|
this._lightbox = new Lightbox.Lightbox(Main.uiGroup,
|
||||||
{ inhibitEvents: true,
|
{ inhibitEvents: true,
|
||||||
fadeInTime: STANDARD_FADE_TIME,
|
fadeInTime: STANDARD_FADE_TIME,
|
||||||
fadeFactor: 1 });
|
fadeFactor: 1 });
|
||||||
|
|
||||||
|
this.idleMonitor = new GnomeDesktop.IdleMonitor();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onLockScreenKeyRelease: function(actor, event) {
|
_onLockScreenKeyRelease: function(actor, event) {
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
|
|
||||||
|
// Do nothing if the lock screen is not fully shown.
|
||||||
|
// This avoids reusing the previous (and stale) unlock
|
||||||
|
// dialog if esc is pressed while the curtain is going
|
||||||
|
// down after cancel.
|
||||||
|
// Similarly, don't bump if the lock screen is not showing or is
|
||||||
|
// animating, as the bump overrides the animation and would
|
||||||
|
// remove any onComplete handler.
|
||||||
|
|
||||||
|
if (this._lockScreenState != MessageTray.State.SHOWN)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (symbol == Clutter.KEY_Escape ||
|
if (symbol == Clutter.KEY_Escape ||
|
||||||
symbol == Clutter.KEY_Return ||
|
symbol == Clutter.KEY_Return ||
|
||||||
symbol == Clutter.KEY_KP_Enter) {
|
symbol == Clutter.KEY_KP_Enter) {
|
||||||
this._ensureUnlockDialog();
|
this._ensureUnlockDialog(true, true);
|
||||||
this._hideLockScreen(true);
|
this._hideLockScreen(true, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't bump if the lock screen is not showing or is
|
this._bumpLockScreen();
|
||||||
// animating, as the bump overrides the animation and would
|
|
||||||
// remove any onComplete handler
|
|
||||||
if (this._lockScreenState == MessageTray.State.SHOWN)
|
|
||||||
this._bumpLockScreen();
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -469,8 +526,8 @@ const ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
// 7 standard scrolls to lift up
|
// 7 standard scrolls to lift up
|
||||||
if (this._lockScreenScrollCounter > 35) {
|
if (this._lockScreenScrollCounter > 35) {
|
||||||
this._ensureUnlockDialog();
|
this._ensureUnlockDialog(false, true);
|
||||||
this._hideLockScreen(true);
|
this._hideLockScreen(true, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -501,13 +558,29 @@ const ScreenShield = new Lang.Class({
|
|||||||
_onDragBegin: function() {
|
_onDragBegin: function() {
|
||||||
Tweener.removeTweens(this._lockScreenGroup);
|
Tweener.removeTweens(this._lockScreenGroup);
|
||||||
this._lockScreenState = MessageTray.State.HIDING;
|
this._lockScreenState = MessageTray.State.HIDING;
|
||||||
this._ensureUnlockDialog();
|
this._ensureUnlockDialog(false, false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDragMotion: function() {
|
||||||
|
let [origX, origY] = this._dragAction.get_press_coords(0);
|
||||||
|
let [currentX, currentY] = this._dragAction.get_motion_coords(0);
|
||||||
|
|
||||||
|
let newY = currentY - origY;
|
||||||
|
newY = clamp(newY, -global.stage.height, 0);
|
||||||
|
|
||||||
|
this._lockScreenGroup.y = newY;
|
||||||
|
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDragEnd: function(action, actor, eventX, eventY, modifiers) {
|
_onDragEnd: function(action, actor, eventX, eventY, modifiers) {
|
||||||
if (this._lockScreenGroup.y < -(ARROW_DRAG_THRESHOLD * global.stage.height)) {
|
if (this._lockScreenGroup.y < -(ARROW_DRAG_THRESHOLD * global.stage.height)) {
|
||||||
// Complete motion automatically
|
// Complete motion automatically
|
||||||
this._hideLockScreen(true);
|
let [velocity, velocityX, velocityY] = this._dragAction.get_velocity(0);
|
||||||
|
this._hideLockScreen(true, -velocityY);
|
||||||
|
this._ensureUnlockDialog(false, true);
|
||||||
} else {
|
} else {
|
||||||
// restore the lock screen to its original place
|
// restore the lock screen to its original place
|
||||||
// try to use the same speed as the normal animation
|
// try to use the same speed as the normal animation
|
||||||
@@ -517,7 +590,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
Tweener.addTween(this._lockScreenGroup,
|
Tweener.addTween(this._lockScreenGroup,
|
||||||
{ y: 0,
|
{ y: 0,
|
||||||
time: time,
|
time: time,
|
||||||
transition: 'linear',
|
transition: 'easeInQuad',
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
this._lockScreenGroup.fixed_position_set = false;
|
this._lockScreenGroup.fixed_position_set = false;
|
||||||
this._lockScreenState = MessageTray.State.SHOWN;
|
this._lockScreenState = MessageTray.State.SHOWN;
|
||||||
@@ -536,31 +609,43 @@ const ScreenShield = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onStatusChanged: function(status) {
|
_onStatusChanged: function(status) {
|
||||||
if (status == GnomeSession.PresenceStatus.IDLE) {
|
if (status != GnomeSession.PresenceStatus.IDLE)
|
||||||
if (this._dialog) {
|
return;
|
||||||
this._dialog.cancel();
|
|
||||||
if (!this._isGreeter) {
|
if (this._dialog) {
|
||||||
this._dialog = null;
|
this._dialog.cancel();
|
||||||
|
if (!this._isGreeter) {
|
||||||
|
this._dialog = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this._isModal) {
|
||||||
|
Main.pushModal(this.actor, { keybindingMode: Main.KeybindingMode.LOCK_SCREEN });
|
||||||
|
this._isModal = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this._isActive) {
|
||||||
|
this._lightbox.show();
|
||||||
|
|
||||||
|
if (this._activationTime == 0)
|
||||||
|
this._activationTime = GLib.get_monotonic_time();
|
||||||
|
|
||||||
|
this._becameActiveId = this.idleMonitor.connect('became-active', Lang.bind(this, function() {
|
||||||
|
this.idleMonitor.disconnect(this._becameActiveId);
|
||||||
|
|
||||||
|
let lightboxWasShown = this._lightbox.shown;
|
||||||
|
this._lightbox.hide();
|
||||||
|
|
||||||
|
let shouldLock = lightboxWasShown && this._settings.get_boolean(LOCK_ENABLED_KEY);
|
||||||
|
if (shouldLock || this._isLocked) {
|
||||||
|
this.lock(false);
|
||||||
|
} else if (this._isActive) {
|
||||||
|
this.unlock();
|
||||||
}
|
}
|
||||||
}
|
}));
|
||||||
|
|
||||||
if (!this._isModal) {
|
this._isActive = true;
|
||||||
Main.pushModal(this.actor);
|
this.emit('lock-status-changed');
|
||||||
this._isModal = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this._isActive)
|
|
||||||
this._lightbox.show();
|
|
||||||
} else {
|
|
||||||
let lightboxWasShown = this._lightbox.shown;
|
|
||||||
this._lightbox.hide();
|
|
||||||
|
|
||||||
let shouldLock = lightboxWasShown && this._settings.get_boolean(LOCK_ENABLED_KEY);
|
|
||||||
if (shouldLock || this._isActive) {
|
|
||||||
this.lock(false);
|
|
||||||
} else if (this._isModal) {
|
|
||||||
this.unlock();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -578,8 +663,8 @@ const ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
this._isGreeter = Main.sessionMode.isGreeter;
|
this._isGreeter = Main.sessionMode.isGreeter;
|
||||||
this._ensureUnlockDialog();
|
this._ensureUnlockDialog(true, true);
|
||||||
this._hideLockScreen(false);
|
this._hideLockScreen(false, 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
_bumpLockScreen: function() {
|
_bumpLockScreen: function() {
|
||||||
@@ -597,19 +682,26 @@ const ScreenShield = new Lang.Class({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideLockScreen: function(animate) {
|
_hideLockScreen: function(animate, velocity) {
|
||||||
this._lockScreenState = MessageTray.State.HIDING;
|
this._lockScreenState = MessageTray.State.HIDING;
|
||||||
|
|
||||||
if (animate) {
|
if (animate) {
|
||||||
// Tween the lock screen out of screen
|
// Tween the lock screen out of screen
|
||||||
// try to use the same speed regardless of original position
|
// if velocity is not specified (i.e. we come here from pressing ESC),
|
||||||
|
// use the same speed regardless of original position
|
||||||
|
// if velocity is specified, it's in pixels per milliseconds
|
||||||
let h = global.stage.height;
|
let h = global.stage.height;
|
||||||
let time = CURTAIN_SLIDE_TIME * (h + this._lockScreenGroup.y) / h;
|
let delta = (h + this._lockScreenGroup.y);
|
||||||
|
let min_velocity = global.stage.height / (CURTAIN_SLIDE_TIME * 1000);
|
||||||
|
|
||||||
|
velocity = Math.max(min_velocity, velocity);
|
||||||
|
let time = (delta / velocity) / 1000;
|
||||||
|
|
||||||
Tweener.removeTweens(this._lockScreenGroup);
|
Tweener.removeTweens(this._lockScreenGroup);
|
||||||
Tweener.addTween(this._lockScreenGroup,
|
Tweener.addTween(this._lockScreenGroup,
|
||||||
{ y: -h,
|
{ y: -h,
|
||||||
time: time,
|
time: time,
|
||||||
transition: 'linear',
|
transition: 'easeInQuad',
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
this._lockScreenState = MessageTray.State.HIDDEN;
|
this._lockScreenState = MessageTray.State.HIDDEN;
|
||||||
this._lockScreenGroup.hide();
|
this._lockScreenGroup.hide();
|
||||||
@@ -621,22 +713,27 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._lockScreenGroup.hide();
|
this._lockScreenGroup.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
global.stage.show_cursor();
|
||||||
|
|
||||||
if (Main.sessionMode.currentMode == 'lock-screen')
|
if (Main.sessionMode.currentMode == 'lock-screen')
|
||||||
Main.sessionMode.popMode('lock-screen');
|
Main.sessionMode.popMode('lock-screen');
|
||||||
},
|
},
|
||||||
|
|
||||||
_ensureUnlockDialog: function() {
|
_ensureUnlockDialog: function(onPrimary, allowCancel) {
|
||||||
if (!this._dialog) {
|
if (!this._dialog) {
|
||||||
let constructor = Main.sessionMode.unlockDialog;
|
let constructor = Main.sessionMode.unlockDialog;
|
||||||
this._dialog = new constructor(this._lockDialogGroup);
|
if (!constructor) {
|
||||||
if (!this._dialog) {
|
|
||||||
// This session mode has no locking capabilities
|
// This session mode has no locking capabilities
|
||||||
this.unlock();
|
this.unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._dialog = new constructor(this._lockDialogGroup);
|
||||||
|
|
||||||
|
|
||||||
|
let time = global.get_current_time();
|
||||||
this._dialog.connect('loaded', Lang.bind(this, function() {
|
this._dialog.connect('loaded', Lang.bind(this, function() {
|
||||||
if (!this._dialog.open()) {
|
if (!this._dialog.open(time, onPrimary)) {
|
||||||
log('Could not open login dialog: failed to acquire grab');
|
log('Could not open login dialog: failed to acquire grab');
|
||||||
this.unlock();
|
this.unlock();
|
||||||
}
|
}
|
||||||
@@ -645,6 +742,8 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._dialog.connect('failed', Lang.bind(this, this._onUnlockFailed));
|
this._dialog.connect('failed', Lang.bind(this, this._onUnlockFailed));
|
||||||
this._dialog.connect('unlocked', Lang.bind(this, this._onUnlockSucceded));
|
this._dialog.connect('unlocked', Lang.bind(this, this._onUnlockSucceded));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._dialog.allowCancel = allowCancel;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUnlockFailed: function() {
|
_onUnlockFailed: function() {
|
||||||
@@ -669,7 +768,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
Tweener.addTween(this._lockScreenGroup,
|
Tweener.addTween(this._lockScreenGroup,
|
||||||
{ y: 0,
|
{ y: 0,
|
||||||
time: SHORT_FADE_TIME,
|
time: SHORT_FADE_TIME,
|
||||||
transition: 'linear',
|
transition: 'easeOutQuad',
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
this._lockScreenShown();
|
this._lockScreenShown();
|
||||||
},
|
},
|
||||||
@@ -708,6 +807,16 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));
|
this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));
|
||||||
this._animateArrows();
|
this._animateArrows();
|
||||||
|
|
||||||
|
let motionId = global.stage.connect('captured-event', function(stage, event) {
|
||||||
|
if (event.type() == Clutter.EventType.MOTION) {
|
||||||
|
global.stage.show_cursor();
|
||||||
|
global.stage.disconnect(motionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
global.stage.hide_cursor();
|
||||||
|
|
||||||
this._lockScreenState = MessageTray.State.SHOWN;
|
this._lockScreenState = MessageTray.State.SHOWN;
|
||||||
this._lockScreenGroup.fixed_position_set = false;
|
this._lockScreenGroup.fixed_position_set = false;
|
||||||
this._lockScreenScrollCounter = 0;
|
this._lockScreenScrollCounter = 0;
|
||||||
@@ -725,7 +834,8 @@ const ScreenShield = new Lang.Class({
|
|||||||
y_align: Clutter.ActorAlign.CENTER,
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
vertical: true });
|
vertical: true,
|
||||||
|
style_class: 'screen-shield-contents-box' });
|
||||||
this._clock = new Clock();
|
this._clock = new Clock();
|
||||||
this._lockScreenContentsBox.add(this._clock.actor, { x_fill: true,
|
this._lockScreenContentsBox.add(this._clock.actor, { x_fill: true,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
@@ -765,7 +875,12 @@ const ScreenShield = new Lang.Class({
|
|||||||
return this._isActive;
|
return this._isActive;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get activationTime() {
|
||||||
|
return this._activationTime;
|
||||||
|
},
|
||||||
|
|
||||||
_tweenUnlocked: function() {
|
_tweenUnlocked: function() {
|
||||||
|
this._inUnlockAnimation = true;
|
||||||
this.unlock();
|
this.unlock();
|
||||||
Tweener.addTween(this._lockDialogGroup, {
|
Tweener.addTween(this._lockDialogGroup, {
|
||||||
scale_x: 0,
|
scale_x: 0,
|
||||||
@@ -778,6 +893,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
}
|
}
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
|
this._inUnlockAnimation = false;
|
||||||
},
|
},
|
||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
});
|
});
|
||||||
@@ -799,23 +915,29 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._isModal = false;
|
this._isModal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.hide();
|
if (!this._inUnlockAnimation)
|
||||||
|
this.actor.hide();
|
||||||
|
|
||||||
if (Main.sessionMode.currentMode == 'lock-screen')
|
if (Main.sessionMode.currentMode == 'lock-screen')
|
||||||
Main.sessionMode.popMode('lock-screen');
|
Main.sessionMode.popMode('lock-screen');
|
||||||
if (Main.sessionMode.currentMode == 'unlock-dialog')
|
if (Main.sessionMode.currentMode == 'unlock-dialog')
|
||||||
Main.sessionMode.popMode('unlock-dialog');
|
Main.sessionMode.popMode('unlock-dialog');
|
||||||
|
|
||||||
|
this._activationTime = 0;
|
||||||
this._isActive = false;
|
this._isActive = false;
|
||||||
|
this._isLocked = false;
|
||||||
this.emit('lock-status-changed');
|
this.emit('lock-status-changed');
|
||||||
},
|
},
|
||||||
|
|
||||||
lock: function(animate) {
|
lock: function(animate) {
|
||||||
if (!this._isModal) {
|
if (!this._isModal) {
|
||||||
Main.pushModal(this.actor);
|
Main.pushModal(this.actor, { keybindingMode: Main.KeybindingMode.LOCK_SCREEN });
|
||||||
this._isModal = true;
|
this._isModal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._activationTime == 0)
|
||||||
|
this._activationTime = GLib.get_monotonic_time();
|
||||||
|
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
|
|
||||||
if (Main.sessionMode.currentMode != 'unlock-dialog' &&
|
if (Main.sessionMode.currentMode != 'unlock-dialog' &&
|
||||||
@@ -828,6 +950,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._resetLockScreen(animate, animate);
|
this._resetLockScreen(animate, animate);
|
||||||
|
|
||||||
this._isActive = true;
|
this._isActive = true;
|
||||||
|
this._isLocked = true;
|
||||||
this.emit('lock-status-changed');
|
this.emit('lock-status-changed');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -840,6 +963,8 @@ const ScreenShieldFallback = new Lang.Class({
|
|||||||
Name: 'ScreenShieldFallback',
|
Name: 'ScreenShieldFallback',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
Util.spawn(['gnome-screensaver']);
|
||||||
|
|
||||||
this._proxy = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
|
this._proxy = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
|
||||||
g_name: 'org.gnome.ScreenSaver',
|
g_name: 'org.gnome.ScreenSaver',
|
||||||
g_object_path: '/org/gnome/ScreenSaver',
|
g_object_path: '/org/gnome/ScreenSaver',
|
||||||
|
|||||||
180
js/ui/search.js
180
js/ui/search.js
@@ -1,183 +1,25 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Gio = imports.gi.Gio;
|
|
||||||
const GLib = imports.gi.GLib;
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Shell = imports.gi.Shell;
|
|
||||||
const Util = imports.misc.util;
|
|
||||||
|
|
||||||
const FileUtils = imports.misc.fileUtils;
|
const SEARCH_PROVIDERS_SCHEMA = 'org.gnome.desktop.search-providers';
|
||||||
const Main = imports.ui.main;
|
|
||||||
|
|
||||||
// Not currently referenced by the search API, but
|
|
||||||
// this enumeration can be useful for provider
|
|
||||||
// implementations.
|
|
||||||
const MatchType = {
|
|
||||||
NONE: 0,
|
|
||||||
SUBSTRING: 1,
|
|
||||||
PREFIX: 2
|
|
||||||
};
|
|
||||||
|
|
||||||
const SearchResultDisplay = new Lang.Class({
|
|
||||||
Name: 'SearchResultDisplay',
|
|
||||||
|
|
||||||
_init: function(provider) {
|
|
||||||
this.provider = provider;
|
|
||||||
this.actor = null;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* renderResults:
|
|
||||||
* @results: List of identifier strings
|
|
||||||
* @terms: List of search term strings
|
|
||||||
*
|
|
||||||
* Display the given search matches which resulted
|
|
||||||
* from the given terms. It's expected that not
|
|
||||||
* all results will fit in the space for the container
|
|
||||||
* actor; in this case, show as many as makes sense
|
|
||||||
* for your result type.
|
|
||||||
*
|
|
||||||
* The terms are useful for search match highlighting.
|
|
||||||
*/
|
|
||||||
renderResults: function(results, terms) {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* clear:
|
|
||||||
* Remove all results from this display.
|
|
||||||
*/
|
|
||||||
clear: function() {
|
|
||||||
this.actor.destroy_all_children();
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getVisibleResultCount:
|
|
||||||
*
|
|
||||||
* Returns: The number of actors visible.
|
|
||||||
*/
|
|
||||||
getVisibleResultCount: function() {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SearchProvider:
|
|
||||||
*
|
|
||||||
* Subclass this object to add a new result type
|
|
||||||
* to the search system, then call registerProvider()
|
|
||||||
* in SearchSystem with an instance.
|
|
||||||
* Search is asynchronous and uses the
|
|
||||||
* getInitialResultSet()/getSubsearchResultSet() methods.
|
|
||||||
*/
|
|
||||||
const SearchProvider = new Lang.Class({
|
|
||||||
Name: 'SearchProvider',
|
|
||||||
|
|
||||||
_init: function(title) {
|
|
||||||
this.title = title;
|
|
||||||
this.searchSystem = null;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getInitialResultSet:
|
|
||||||
* @terms: Array of search terms, treated as logical AND
|
|
||||||
*
|
|
||||||
* Called when the user first begins a search (most likely
|
|
||||||
* therefore a single term of length one or two), or when
|
|
||||||
* a new term is added.
|
|
||||||
*
|
|
||||||
* Should "return" an array of result identifier strings representing
|
|
||||||
* items which match the given search terms. This
|
|
||||||
* is expected to be a substring match on the metadata for a given
|
|
||||||
* item. Ordering of returned results is up to the discretion of the provider,
|
|
||||||
* but you should follow these heruistics:
|
|
||||||
*
|
|
||||||
* * Put items where the term matches multiple criteria (e.g. name and
|
|
||||||
* description) before single matches
|
|
||||||
* * Put items which match on a prefix before non-prefix substring matches
|
|
||||||
*
|
|
||||||
* We say "return" above, but in order to make the query asynchronous, use
|
|
||||||
* this.searchSystem.pushResults();. The return value should be ignored.
|
|
||||||
*
|
|
||||||
* This function should be fast; do not perform unindexed full-text searches
|
|
||||||
* or network queries.
|
|
||||||
*/
|
|
||||||
getInitialResultSet: function(terms) {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getSubsearchResultSet:
|
|
||||||
* @previousResults: Array of item identifiers
|
|
||||||
* @newTerms: Updated search terms
|
|
||||||
*
|
|
||||||
* Called when a search is performed which is a "subsearch" of
|
|
||||||
* the previous search; i.e. when every search term has exactly
|
|
||||||
* one corresponding term in the previous search which is a prefix
|
|
||||||
* of the new term.
|
|
||||||
*
|
|
||||||
* This allows search providers to only search through the previous
|
|
||||||
* result set, rather than possibly performing a full re-query.
|
|
||||||
*
|
|
||||||
* Similar to getInitialResultSet, the return value for this will
|
|
||||||
* be ignored; use this.searchSystem.pushResults();.
|
|
||||||
*/
|
|
||||||
getSubsearchResultSet: function(previousResults, newTerms) {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getResultMetas:
|
|
||||||
* @ids: Result identifier strings
|
|
||||||
*
|
|
||||||
* Call callback with array of objects with 'id', 'name', (both strings) and
|
|
||||||
* 'createIcon' (function(size) returning a Clutter.Texture) properties
|
|
||||||
* with the same number of members as @ids
|
|
||||||
*/
|
|
||||||
getResultMetas: function(ids, callback) {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* createResultActor:
|
|
||||||
* @resultMeta: Object with result metadata
|
|
||||||
* @terms: Array of search terms, should be used for highlighting
|
|
||||||
*
|
|
||||||
* Search providers may optionally override this to render a
|
|
||||||
* particular serch result in a custom fashion. The default
|
|
||||||
* implementation will show the icon next to the name.
|
|
||||||
*
|
|
||||||
* The actor should be an instance of St.Widget, with the style class
|
|
||||||
* 'search-result-content'.
|
|
||||||
*/
|
|
||||||
createResultActor: function(resultMeta, terms) {
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* activateResult:
|
|
||||||
* @id: Result identifier string
|
|
||||||
*
|
|
||||||
* Called when the user chooses a given result.
|
|
||||||
*/
|
|
||||||
activateResult: function(id) {
|
|
||||||
throw new Error('Not implemented');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Signals.addSignalMethods(SearchProvider.prototype);
|
|
||||||
|
|
||||||
const SearchSystem = new Lang.Class({
|
const SearchSystem = new Lang.Class({
|
||||||
Name: 'SearchSystem',
|
Name: 'SearchSystem',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._providers = [];
|
this._providers = [];
|
||||||
|
this._remoteProviders = [];
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
|
||||||
registerProvider: function (provider) {
|
registerProvider: function (provider) {
|
||||||
provider.searchSystem = this;
|
provider.searchSystem = this;
|
||||||
this._providers.push(provider);
|
this._providers.push(provider);
|
||||||
|
|
||||||
|
if (provider.isRemoteProvider)
|
||||||
|
this._remoteProviders.push(provider);
|
||||||
},
|
},
|
||||||
|
|
||||||
unregisterProvider: function (provider) {
|
unregisterProvider: function (provider) {
|
||||||
@@ -186,12 +28,20 @@ const SearchSystem = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
provider.searchSystem = null;
|
provider.searchSystem = null;
|
||||||
this._providers.splice(index, 1);
|
this._providers.splice(index, 1);
|
||||||
|
|
||||||
|
let remoteIndex = this._remoteProviders.indexOf(provider);
|
||||||
|
if (remoteIndex != -1)
|
||||||
|
this._remoteProviders.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
getProviders: function() {
|
getProviders: function() {
|
||||||
return this._providers;
|
return this._providers;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getRemoteProviders: function() {
|
||||||
|
return this._remoteProviders;
|
||||||
|
},
|
||||||
|
|
||||||
getTerms: function() {
|
getTerms: function() {
|
||||||
return this._previousTerms;
|
return this._previousTerms;
|
||||||
},
|
},
|
||||||
@@ -246,7 +96,7 @@ const SearchSystem = new Lang.Class({
|
|||||||
results.push([provider, []]);
|
results.push([provider, []]);
|
||||||
provider.getSubsearchResultSet(previousResults, terms);
|
provider.getSubsearchResultSet(previousResults, terms);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
|
log('A ' + error.name + ' has occured in ' + provider.id + ': ' + error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -256,7 +106,7 @@ const SearchSystem = new Lang.Class({
|
|||||||
results.push([provider, []]);
|
results.push([provider, []]);
|
||||||
provider.getInitialResultSet(terms);
|
provider.getInitialResultSet(terms);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
|
log('A ' + error.name + ' has occured in ' + provider.id + ': ' + error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,11 @@ const DND = imports.ui.dnd;
|
|||||||
const IconGrid = imports.ui.iconGrid;
|
const IconGrid = imports.ui.iconGrid;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Overview = imports.ui.overview;
|
const Overview = imports.ui.overview;
|
||||||
|
const Separator = imports.ui.separator;
|
||||||
const Search = imports.ui.search;
|
const Search = imports.ui.search;
|
||||||
|
|
||||||
const MAX_SEARCH_RESULTS_ROWS = 1;
|
const MAX_LIST_SEARCH_RESULTS_ROWS = 3;
|
||||||
|
const MAX_GRID_SEARCH_RESULTS_ROWS = 1;
|
||||||
|
|
||||||
const SearchResult = new Lang.Class({
|
const SearchResult = new Lang.Class({
|
||||||
Name: 'SearchResult',
|
Name: 'SearchResult',
|
||||||
@@ -22,33 +23,103 @@ const SearchResult = new Lang.Class({
|
|||||||
_init: function(provider, metaInfo, terms) {
|
_init: function(provider, metaInfo, terms) {
|
||||||
this.provider = provider;
|
this.provider = provider;
|
||||||
this.metaInfo = metaInfo;
|
this.metaInfo = metaInfo;
|
||||||
this.actor = new St.Button({ style_class: 'search-result',
|
this.terms = terms;
|
||||||
reactive: true,
|
|
||||||
|
this.actor = new St.Button({ reactive: true,
|
||||||
|
can_focus: true,
|
||||||
|
track_hover: true,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
|
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this._dragActorSource = null;
|
this.actor.connect('clicked', Lang.bind(this, this.activate));
|
||||||
|
},
|
||||||
|
|
||||||
|
activate: function() {
|
||||||
|
this.provider.activateResult(this.metaInfo.id, this.terms);
|
||||||
|
Main.overview.toggle();
|
||||||
|
},
|
||||||
|
|
||||||
|
setSelected: function(selected) {
|
||||||
|
if (selected)
|
||||||
|
this.actor.add_style_pseudo_class('selected');
|
||||||
|
else
|
||||||
|
this.actor.remove_style_pseudo_class('selected');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const ListSearchResult = new Lang.Class({
|
||||||
|
Name: 'ListSearchResult',
|
||||||
|
Extends: SearchResult,
|
||||||
|
|
||||||
|
ICON_SIZE: 64,
|
||||||
|
|
||||||
|
_init: function(provider, metaInfo, terms) {
|
||||||
|
this.parent(provider, metaInfo, terms);
|
||||||
|
|
||||||
|
this.actor.style_class = 'list-search-result';
|
||||||
|
this.actor.x_fill = true;
|
||||||
|
|
||||||
|
let content = new St.BoxLayout({ style_class: 'list-search-result-content',
|
||||||
|
vertical: false });
|
||||||
|
this.actor.set_child(content);
|
||||||
|
|
||||||
|
// An icon for, or thumbnail of, content
|
||||||
|
let icon = this.metaInfo['createIcon'](this.ICON_SIZE);
|
||||||
|
if (icon) {
|
||||||
|
content.add(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
let details = new St.BoxLayout({ vertical: true });
|
||||||
|
content.add(details, { x_fill: true,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.START,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
|
let title = new St.Label({ style_class: 'list-search-result-title',
|
||||||
|
text: this.metaInfo['name'] })
|
||||||
|
details.add(title, { x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.START,
|
||||||
|
y_align: St.Align.START });
|
||||||
|
|
||||||
|
// TODO: should highlight terms in the description here
|
||||||
|
if (this.metaInfo['description']) {
|
||||||
|
let description = new St.Label({ style_class: 'list-search-result-description',
|
||||||
|
text: '"' + this.metaInfo['description'] + '"' });
|
||||||
|
details.add(description, { x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.START,
|
||||||
|
y_align: St.Align.END });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const GridSearchResult = new Lang.Class({
|
||||||
|
Name: 'GridSearchResult',
|
||||||
|
Extends: SearchResult,
|
||||||
|
|
||||||
|
_init: function(provider, metaInfo, terms) {
|
||||||
|
this.parent(provider, metaInfo, terms);
|
||||||
|
|
||||||
|
this.actor.style_class = 'grid-search-result';
|
||||||
|
|
||||||
let content = provider.createResultActor(metaInfo, terms);
|
let content = provider.createResultActor(metaInfo, terms);
|
||||||
|
let dragSource = null;
|
||||||
|
|
||||||
if (content == null) {
|
if (content == null) {
|
||||||
content = new St.Bin({ style_class: 'search-result-content',
|
content = new St.Bin();
|
||||||
reactive: true,
|
|
||||||
can_focus: true,
|
|
||||||
track_hover: true,
|
|
||||||
accessible_role: Atk.Role.PUSH_BUTTON });
|
|
||||||
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
||||||
{ createIcon: this.metaInfo['createIcon'] });
|
{ createIcon: this.metaInfo['createIcon'] });
|
||||||
content.set_child(icon.actor);
|
content.set_child(icon.actor);
|
||||||
this._dragActorSource = icon.icon;
|
|
||||||
content.label_actor = icon.label;
|
content.label_actor = icon.label;
|
||||||
|
dragSource = icon.icon;
|
||||||
} else {
|
} else {
|
||||||
if (content._delegate && content._delegate.getDragActorSource)
|
if (content._delegate && content._delegate.getDragActorSource)
|
||||||
this._dragActorSource = content._delegate.getDragActorSource();
|
dragSource = content._delegate.getDragActorSource();
|
||||||
}
|
}
|
||||||
this._content = content;
|
|
||||||
this.actor.set_child(content);
|
|
||||||
|
|
||||||
this.actor.connect('clicked', Lang.bind(this, this._onResultClicked));
|
this.actor.set_child(content);
|
||||||
|
|
||||||
let draggable = DND.makeDraggable(this.actor);
|
let draggable = DND.makeDraggable(this.actor);
|
||||||
draggable.connect('drag-begin',
|
draggable.connect('drag-begin',
|
||||||
@@ -63,32 +134,18 @@ const SearchResult = new Lang.Class({
|
|||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
Main.overview.endItemDrag(this);
|
Main.overview.endItemDrag(this);
|
||||||
}));
|
}));
|
||||||
},
|
|
||||||
|
|
||||||
setSelected: function(selected) {
|
if (!dragSource)
|
||||||
if (selected)
|
// not exactly right, but alignment problems are hard to notice
|
||||||
this._content.add_style_pseudo_class('selected');
|
dragSource = content;
|
||||||
else
|
this._dragActorSource = dragSource;
|
||||||
this._content.remove_style_pseudo_class('selected');
|
|
||||||
},
|
|
||||||
|
|
||||||
activate: function() {
|
|
||||||
this.provider.activateResult(this.metaInfo.id);
|
|
||||||
Main.overview.toggle();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onResultClicked: function(actor) {
|
|
||||||
this.activate();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getDragActorSource: function() {
|
getDragActorSource: function() {
|
||||||
if (this._dragActorSource)
|
return this._dragActorSource;
|
||||||
return this._dragActorSource;
|
|
||||||
// not exactly right, but alignment problems are hard to notice
|
|
||||||
return this._content;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getDragActor: function(stageX, stageY) {
|
getDragActor: function() {
|
||||||
return this.metaInfo['createIcon'](Main.overview.dashIconSize);
|
return this.metaInfo['createIcon'](Main.overview.dashIconSize);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -96,51 +153,52 @@ const SearchResult = new Lang.Class({
|
|||||||
if (this.provider.dragActivateResult)
|
if (this.provider.dragActivateResult)
|
||||||
this.provider.dragActivateResult(this.metaInfo.id, params);
|
this.provider.dragActivateResult(this.metaInfo.id, params);
|
||||||
else
|
else
|
||||||
this.provider.activateResult(this.metaInfo.id, params);
|
this.provider.activateResult(this.metaInfo.id, this.terms);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const ListSearchResults = new Lang.Class({
|
||||||
|
Name: 'ListSearchResults',
|
||||||
|
|
||||||
const GridSearchResults = new Lang.Class({
|
_init: function(provider) {
|
||||||
Name: 'GridSearchResults',
|
this.provider = provider;
|
||||||
Extends: Search.SearchResultDisplay,
|
|
||||||
|
|
||||||
_init: function(provider, grid) {
|
this.actor = new St.BoxLayout({ style_class: 'search-section-content' });
|
||||||
this.parent(provider);
|
this.providerIcon = new ProviderIcon(provider);
|
||||||
|
this.providerIcon.connect('clicked', Lang.bind(this,
|
||||||
this._grid = grid || new IconGrid.IconGrid({ rowLimit: MAX_SEARCH_RESULTS_ROWS,
|
function() {
|
||||||
xAlign: St.Align.START });
|
provider.launchSearch(this._terms);
|
||||||
this.actor = new St.Bin({ x_align: St.Align.START });
|
Main.overview.toggle();
|
||||||
|
|
||||||
this.actor.set_child(this._grid.actor);
|
|
||||||
this._width = 0;
|
|
||||||
this.actor.connect('notify::width', Lang.bind(this, function() {
|
|
||||||
this._width = this.actor.width;
|
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
|
||||||
let results = this.getResultsForDisplay();
|
|
||||||
if (results.length == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
provider.getResultMetas(results, Lang.bind(this, this.renderResults));
|
|
||||||
}));
|
}));
|
||||||
}));
|
|
||||||
|
this.actor.add(this.providerIcon, { x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.START,
|
||||||
|
y_align: St.Align.START });
|
||||||
|
|
||||||
|
this._content = new St.BoxLayout({ style_class: 'list-search-results',
|
||||||
|
vertical: true });
|
||||||
|
this.actor.add_actor(this._content);
|
||||||
|
|
||||||
this._notDisplayedResult = [];
|
this._notDisplayedResult = [];
|
||||||
this._terms = [];
|
this._terms = [];
|
||||||
this._pendingClear = false;
|
this._pendingClear = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
getResultsForDisplay: function() {
|
getResultsForDisplay: function() {
|
||||||
let alreadyVisible = this._pendingClear ? 0 : this._grid.visibleItemsCount();
|
let alreadyVisible = this._pendingClear ? 0 : this.getVisibleResultCount();
|
||||||
let canDisplay = this._grid.childrenInRow(this._width) * this._grid.getRowLimit()
|
let canDisplay = MAX_LIST_SEARCH_RESULTS_ROWS - alreadyVisible;
|
||||||
- alreadyVisible;
|
|
||||||
|
|
||||||
let numResults = Math.min(this._notDisplayedResult.length, canDisplay);
|
let newResults = this._notDisplayedResult.splice(0, canDisplay);
|
||||||
|
return newResults;
|
||||||
return this._notDisplayedResult.splice(0, numResults);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getVisibleResultCount: function() {
|
getVisibleResultCount: function() {
|
||||||
return this._grid.visibleItemsCount();
|
return this._content.get_n_children();
|
||||||
|
},
|
||||||
|
|
||||||
|
hasMoreResults: function() {
|
||||||
|
return this._notDisplayedResult.length > 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
setResults: function(results, terms) {
|
setResults: function(results, terms) {
|
||||||
@@ -152,7 +210,68 @@ const GridSearchResults = new Lang.Class({
|
|||||||
|
|
||||||
renderResults: function(metas) {
|
renderResults: function(metas) {
|
||||||
for (let i = 0; i < metas.length; i++) {
|
for (let i = 0; i < metas.length; i++) {
|
||||||
let display = new SearchResult(this.provider, metas[i], this._terms);
|
let display = new ListSearchResult(this.provider, metas[i], this._terms);
|
||||||
|
this._content.add_actor(display.actor);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
clear: function () {
|
||||||
|
this._content.destroy_all_children();
|
||||||
|
this._pendingClear = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
getFirstResult: function() {
|
||||||
|
if (this.getVisibleResultCount() > 0)
|
||||||
|
return this._content.get_child_at_index(0)._delegate;
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const GridSearchResults = new Lang.Class({
|
||||||
|
Name: 'GridSearchResults',
|
||||||
|
|
||||||
|
_init: function(provider) {
|
||||||
|
this.provider = provider;
|
||||||
|
|
||||||
|
this._grid = new IconGrid.IconGrid({ rowLimit: MAX_GRID_SEARCH_RESULTS_ROWS,
|
||||||
|
xAlign: St.Align.START });
|
||||||
|
this.actor = new St.Bin({ x_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
|
this.actor.set_child(this._grid.actor);
|
||||||
|
|
||||||
|
this._notDisplayedResult = [];
|
||||||
|
this._terms = [];
|
||||||
|
this._pendingClear = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
getResultsForDisplay: function() {
|
||||||
|
let alreadyVisible = this._pendingClear ? 0 : this._grid.visibleItemsCount();
|
||||||
|
let canDisplay = this._grid.childrenInRow(this.actor.width) * this._grid.getRowLimit()
|
||||||
|
- alreadyVisible;
|
||||||
|
|
||||||
|
let newResults = this._notDisplayedResult.splice(0, canDisplay);
|
||||||
|
return newResults;
|
||||||
|
},
|
||||||
|
|
||||||
|
getVisibleResultCount: function() {
|
||||||
|
return this._grid.visibleItemsCount();
|
||||||
|
},
|
||||||
|
|
||||||
|
hasMoreResults: function() {
|
||||||
|
return this._notDisplayedResult.length > 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
setResults: function(results, terms) {
|
||||||
|
// copy the lists
|
||||||
|
this._notDisplayedResult = results.slice(0);
|
||||||
|
this._terms = terms.slice(0);
|
||||||
|
this._pendingClear = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
renderResults: function(metas) {
|
||||||
|
for (let i = 0; i < metas.length; i++) {
|
||||||
|
let display = new GridSearchResult(this.provider, metas[i], this._terms);
|
||||||
this._grid.addItem(display.actor);
|
this._grid.addItem(display.actor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -183,26 +302,20 @@ const SearchResults = new Lang.Class({
|
|||||||
this._content = new St.BoxLayout({ name: 'searchResultsContent',
|
this._content = new St.BoxLayout({ name: 'searchResultsContent',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
|
|
||||||
let scrollView = new St.ScrollView({ x_fill: true,
|
this._scrollView = new St.ScrollView({ x_fill: true,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
style_class: 'vfade' });
|
style_class: 'vfade' });
|
||||||
scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
||||||
scrollView.add_actor(this._content);
|
this._scrollView.add_actor(this._content);
|
||||||
|
let action = new Clutter.PanAction({ interpolate: true });
|
||||||
|
action.connect('pan', Lang.bind(this, this._onPan));
|
||||||
|
this._scrollView.add_action(action);
|
||||||
|
|
||||||
this.actor.add(scrollView, { x_fill: true,
|
this.actor.add(this._scrollView, { x_fill: true,
|
||||||
y_fill: true,
|
y_fill: true,
|
||||||
expand: true,
|
expand: true,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
y_align: St.Align.START });
|
y_align: St.Align.START });
|
||||||
this.actor.connect('notify::mapped', Lang.bind(this,
|
|
||||||
function() {
|
|
||||||
if (!this.actor.mapped)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let adjustment = scrollView.vscroll.adjustment;
|
|
||||||
let direction = Overview.SwipeScrollDirection.VERTICAL;
|
|
||||||
Main.overview.setScrollAdjustment(adjustment, direction);
|
|
||||||
}));
|
|
||||||
|
|
||||||
this._statusText = new St.Label({ style_class: 'search-statustext' });
|
this._statusText = new St.Label({ style_class: 'search-statustext' });
|
||||||
this._statusBin = new St.Bin({ x_align: St.Align.MIDDLE,
|
this._statusBin = new St.Bin({ x_align: St.Align.MIDDLE,
|
||||||
@@ -219,22 +332,37 @@ const SearchResults = new Lang.Class({
|
|||||||
this._defaultResult = null;
|
this._defaultResult = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onPan: function(action) {
|
||||||
|
let [dist, dx, dy] = action.get_motion_delta(0);
|
||||||
|
let adjustment = this._scrollView.vscroll.adjustment;
|
||||||
|
adjustment.value -= (dy / this.actor.height) * adjustment.page_size;
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
createProviderMeta: function(provider) {
|
createProviderMeta: function(provider) {
|
||||||
let providerBox = new St.BoxLayout({ style_class: 'search-section',
|
let providerBox = new St.BoxLayout({ style_class: 'search-section',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
let title = new St.Label({ style_class: 'search-section-header',
|
let providerIcon = null;
|
||||||
text: provider.title });
|
let resultDisplay = null;
|
||||||
providerBox.add(title);
|
|
||||||
|
|
||||||
let resultDisplayBin = new St.Bin({ style_class: 'search-section-results',
|
if (provider.appInfo) {
|
||||||
|
resultDisplay = new ListSearchResults(provider);
|
||||||
|
providerIcon = resultDisplay.providerIcon;
|
||||||
|
} else {
|
||||||
|
resultDisplay = new GridSearchResults(provider);
|
||||||
|
}
|
||||||
|
|
||||||
|
let resultDisplayBin = new St.Bin({ child: resultDisplay.actor,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
providerBox.add(resultDisplayBin, { expand: true });
|
providerBox.add(resultDisplayBin, { expand: true });
|
||||||
let resultDisplay = new GridSearchResults(provider);
|
|
||||||
resultDisplayBin.set_child(resultDisplay.actor);
|
let separator = new Separator.HorizontalSeparator({ style_class: 'search-section-separator' });
|
||||||
|
providerBox.add(separator.actor);
|
||||||
|
|
||||||
this._providerMeta.push({ provider: provider,
|
this._providerMeta.push({ provider: provider,
|
||||||
actor: providerBox,
|
actor: providerBox,
|
||||||
|
icon: providerIcon,
|
||||||
resultDisplay: resultDisplay });
|
resultDisplay: resultDisplay });
|
||||||
this._content.add(providerBox);
|
this._content.add(providerBox);
|
||||||
},
|
},
|
||||||
@@ -341,6 +469,11 @@ const SearchResults = new Lang.Class({
|
|||||||
meta.resultDisplay.setResults(providerResults, terms);
|
meta.resultDisplay.setResults(providerResults, terms);
|
||||||
let results = meta.resultDisplay.getResultsForDisplay();
|
let results = meta.resultDisplay.getResultsForDisplay();
|
||||||
|
|
||||||
|
if (meta.icon)
|
||||||
|
meta.icon.moreIcon.visible =
|
||||||
|
meta.resultDisplay.hasMoreResults() &&
|
||||||
|
provider.canLaunchSearch;
|
||||||
|
|
||||||
provider.getResultMetas(results, Lang.bind(this, function(metas) {
|
provider.getResultMetas(results, Lang.bind(this, function(metas) {
|
||||||
this._clearDisplayForProvider(provider);
|
this._clearDisplayForProvider(provider);
|
||||||
meta.actor.show();
|
meta.actor.show();
|
||||||
@@ -386,10 +519,37 @@ const SearchResults = new Lang.Class({
|
|||||||
|
|
||||||
let from = this._defaultResult ? this._defaultResult.actor : null;
|
let from = this._defaultResult ? this._defaultResult.actor : null;
|
||||||
this.actor.navigate_focus(from, direction, false);
|
this.actor.navigate_focus(from, direction, false);
|
||||||
if (this._defaultResult) {
|
}
|
||||||
// The default result appears focused, so navigate directly to the
|
});
|
||||||
// next result.
|
|
||||||
this.actor.navigate_focus(global.stage.key_focus, direction, false);
|
const ProviderIcon = new Lang.Class({
|
||||||
}
|
Name: 'ProviderIcon',
|
||||||
|
Extends: St.Button,
|
||||||
|
|
||||||
|
PROVIDER_ICON_SIZE: 48,
|
||||||
|
|
||||||
|
_init: function(provider) {
|
||||||
|
this.provider = provider;
|
||||||
|
this.parent({ style_class: 'search-provider-icon',
|
||||||
|
reactive: true,
|
||||||
|
can_focus: true,
|
||||||
|
track_hover: true });
|
||||||
|
|
||||||
|
this._content = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
|
this.set_child(this._content);
|
||||||
|
|
||||||
|
let rtl = (this.get_text_direction() == Clutter.TextDirection.RTL);
|
||||||
|
|
||||||
|
this.moreIcon = new St.Widget({ style_class: 'search-provider-icon-more',
|
||||||
|
visible: false,
|
||||||
|
x_align: rtl ? Clutter.ActorAlign.START : Clutter.ActorAlign.END,
|
||||||
|
y_align: Clutter.ActorAlign.END,
|
||||||
|
x_expand: true,
|
||||||
|
y_expand: true });
|
||||||
|
|
||||||
|
let icon = new St.Icon({ icon_size: this.PROVIDER_ICON_SIZE,
|
||||||
|
gicon: provider.appInfo.get_icon() });
|
||||||
|
this._content.add_actor(icon);
|
||||||
|
this._content.add_actor(this.moreIcon);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
34
js/ui/separator.js
Normal file
34
js/ui/separator.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Cairo = imports.cairo;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const HorizontalSeparator = new Lang.Class({
|
||||||
|
Name: 'HorizontalSeparator',
|
||||||
|
|
||||||
|
_init: function (params) {
|
||||||
|
this.actor = new St.DrawingArea(params);
|
||||||
|
this.actor.connect('repaint', Lang.bind(this, this._onRepaint));
|
||||||
|
},
|
||||||
|
|
||||||
|
_onRepaint: function(area) {
|
||||||
|
let cr = area.get_context();
|
||||||
|
let themeNode = area.get_theme_node();
|
||||||
|
let [width, height] = area.get_surface_size();
|
||||||
|
let margin = themeNode.get_length('-margin-horizontal');
|
||||||
|
let gradientHeight = themeNode.get_length('-gradient-height');
|
||||||
|
let startColor = themeNode.get_color('-gradient-start');
|
||||||
|
let endColor = themeNode.get_color('-gradient-end');
|
||||||
|
|
||||||
|
let gradientWidth = (width - margin * 2);
|
||||||
|
let gradientOffset = (height - gradientHeight) / 2;
|
||||||
|
let pattern = new Cairo.LinearGradient(margin, gradientOffset, width - margin, gradientOffset + gradientHeight);
|
||||||
|
pattern.addColorStopRGBA(0, startColor.red / 255, startColor.green / 255, startColor.blue / 255, startColor.alpha / 255);
|
||||||
|
pattern.addColorStopRGBA(0.5, endColor.red / 255, endColor.green / 255, endColor.blue / 255, endColor.alpha / 255);
|
||||||
|
pattern.addColorStopRGBA(1, startColor.red / 255, startColor.green / 255, startColor.blue / 255, startColor.alpha / 255);
|
||||||
|
cr.setSource(pattern);
|
||||||
|
cr.rectangle(margin, gradientOffset, gradientWidth, gradientHeight);
|
||||||
|
cr.fill();
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Mainloop = imports.mainloop;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
|
const FileUtils = imports.misc.fileUtils;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
@@ -10,11 +14,12 @@ const DEFAULT_MODE = 'restrictive';
|
|||||||
|
|
||||||
const _modes = {
|
const _modes = {
|
||||||
'restrictive': {
|
'restrictive': {
|
||||||
|
parentMode: null,
|
||||||
hasOverview: false,
|
hasOverview: false,
|
||||||
showCalendarEvents: false,
|
showCalendarEvents: false,
|
||||||
allowSettings: false,
|
allowSettings: false,
|
||||||
allowExtensions: false,
|
allowExtensions: false,
|
||||||
allowKeybindingsWhenModal: false,
|
enabledExtensions: [],
|
||||||
hasRunDialog: false,
|
hasRunDialog: false,
|
||||||
hasWorkspaces: false,
|
hasWorkspaces: false,
|
||||||
hasWindows: false,
|
hasWindows: false,
|
||||||
@@ -29,44 +34,47 @@ const _modes = {
|
|||||||
center: [],
|
center: [],
|
||||||
right: []
|
right: []
|
||||||
},
|
},
|
||||||
|
panelStyle: null
|
||||||
},
|
},
|
||||||
|
|
||||||
'gdm': {
|
'gdm': {
|
||||||
allowKeybindingsWhenModal: true,
|
|
||||||
hasNotifications: true,
|
hasNotifications: true,
|
||||||
isGreeter: true,
|
isGreeter: true,
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
unlockDialog: imports.gdm.loginDialog.LoginDialog,
|
unlockDialog: imports.gdm.loginDialog.LoginDialog,
|
||||||
components: ['polkitAgent'],
|
components: ['polkitAgent'],
|
||||||
panel: {
|
panel: {
|
||||||
left: [],
|
left: ['logo'],
|
||||||
center: ['dateMenu'],
|
center: ['dateMenu'],
|
||||||
right: ['a11y', 'display', 'keyboard',
|
right: ['a11y', 'display', 'keyboard',
|
||||||
'volume', 'battery', 'powerMenu']
|
'volume', 'battery', 'powerMenu']
|
||||||
}
|
},
|
||||||
|
panelStyle: 'login-screen'
|
||||||
},
|
},
|
||||||
|
|
||||||
'lock-screen': {
|
'lock-screen': {
|
||||||
isLocked: true,
|
isLocked: true,
|
||||||
isGreeter: undefined,
|
isGreeter: undefined,
|
||||||
unlockDialog: undefined,
|
unlockDialog: undefined,
|
||||||
components: ['networkAgent', 'polkitAgent', 'telepathyClient'],
|
components: ['polkitAgent', 'telepathyClient'],
|
||||||
panel: {
|
panel: {
|
||||||
left: ['userMenu'],
|
left: ['userMenu'],
|
||||||
center: [],
|
center: [],
|
||||||
right: ['lockScreen']
|
right: ['lockScreen']
|
||||||
},
|
},
|
||||||
|
panelStyle: 'lock-screen'
|
||||||
},
|
},
|
||||||
|
|
||||||
'unlock-dialog': {
|
'unlock-dialog': {
|
||||||
isLocked: true,
|
isLocked: true,
|
||||||
unlockDialog: undefined,
|
unlockDialog: undefined,
|
||||||
components: ['networkAgent', 'polkitAgent', 'telepathyClient'],
|
components: ['polkitAgent', 'telepathyClient'],
|
||||||
panel: {
|
panel: {
|
||||||
left: ['userMenu'],
|
left: ['userMenu'],
|
||||||
center: [],
|
center: [],
|
||||||
right: ['a11y', 'keyboard', 'lockScreen']
|
right: ['a11y', 'keyboard', 'lockScreen']
|
||||||
},
|
},
|
||||||
|
panelStyle: 'unlock-screen'
|
||||||
},
|
},
|
||||||
|
|
||||||
'initial-setup': {
|
'initial-setup': {
|
||||||
@@ -102,11 +110,48 @@ const _modes = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function _getModes(modesLoadedCallback) {
|
||||||
|
FileUtils.collectFromDatadirsAsync('modes',
|
||||||
|
{ processFile: _loadMode,
|
||||||
|
loadedCallback: modesLoadedCallback,
|
||||||
|
data: _modes });
|
||||||
|
}
|
||||||
|
|
||||||
|
function _loadMode(file, info, loadedData) {
|
||||||
|
let name = info.get_name();
|
||||||
|
let suffix = name.indexOf('.json');
|
||||||
|
let modeName = suffix == -1 ? name : name.slice(name, suffix);
|
||||||
|
|
||||||
|
if (loadedData.hasOwnProperty(modeName))
|
||||||
|
return;
|
||||||
|
|
||||||
|
let fileContent, success, tag, newMode;
|
||||||
|
try {
|
||||||
|
[success, fileContent, tag] = file.load_contents(null);
|
||||||
|
newMode = JSON.parse(fileContent);
|
||||||
|
} catch(e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
loadedData[modeName] = {};
|
||||||
|
let propBlacklist = ['unlockDialog'];
|
||||||
|
for (let prop in loadedData[DEFAULT_MODE]) {
|
||||||
|
if (newMode[prop] !== undefined &&
|
||||||
|
propBlacklist.indexOf(prop) == -1)
|
||||||
|
loadedData[modeName][prop]= newMode[prop];
|
||||||
|
}
|
||||||
|
loadedData[modeName]['isPrimary'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
function listModes() {
|
function listModes() {
|
||||||
let modes = Object.getOwnPropertyNames(_modes);
|
_getModes(function(modes) {
|
||||||
for (let i = 0; i < modes.length; i++)
|
let names = Object.getOwnPropertyNames(modes);
|
||||||
if (_modes[modes[i]].isPrimary)
|
for (let i = 0; i < names.length; i++)
|
||||||
print(modes[i]);
|
if (_modes[names[i]].isPrimary)
|
||||||
|
print(names[i]);
|
||||||
|
Mainloop.quit('listModes');
|
||||||
|
});
|
||||||
|
Mainloop.run('listModes');
|
||||||
}
|
}
|
||||||
|
|
||||||
const SessionMode = new Lang.Class({
|
const SessionMode = new Lang.Class({
|
||||||
@@ -114,10 +159,18 @@ const SessionMode = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
global.connect('notify::session-mode', Lang.bind(this, this._sync));
|
global.connect('notify::session-mode', Lang.bind(this, this._sync));
|
||||||
let mode = _modes[global.session_mode].isPrimary ? global.session_mode
|
this._modes = _modes;
|
||||||
: 'user';
|
this._modeStack = [DEFAULT_MODE];
|
||||||
this._modeStack = [mode];
|
|
||||||
this._sync();
|
this._sync();
|
||||||
|
|
||||||
|
_getModes(Lang.bind(this, function(modes) {
|
||||||
|
this._modes = modes;
|
||||||
|
let primary = modes[global.session_mode] &&
|
||||||
|
modes[global.session_mode].isPrimary;
|
||||||
|
let mode = primary ? global.session_mode : 'user';
|
||||||
|
this._modeStack = [mode];
|
||||||
|
this._sync();
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
pushMode: function(mode) {
|
pushMode: function(mode) {
|
||||||
@@ -144,8 +197,14 @@ const SessionMode = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_sync: function() {
|
_sync: function() {
|
||||||
let params = _modes[this.currentMode];
|
let params = this._modes[this.currentMode];
|
||||||
params = Params.parse(params, _modes[DEFAULT_MODE]);
|
let defaults;
|
||||||
|
if (params.parentMode)
|
||||||
|
defaults = Params.parse(this._modes[params.parentMode],
|
||||||
|
this._modes[DEFAULT_MODE]);
|
||||||
|
else
|
||||||
|
defaults = this._modes[DEFAULT_MODE];
|
||||||
|
params = Params.parse(params, defaults);
|
||||||
|
|
||||||
// A simplified version of Lang.copyProperties, handles
|
// A simplified version of Lang.copyProperties, handles
|
||||||
// undefined as a special case for "no change / inherit from previous mode"
|
// undefined as a special case for "no change / inherit from previous mode"
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
|
|||||||
<arg type="i" direction="in" name="width"/>
|
<arg type="i" direction="in" name="width"/>
|
||||||
<arg type="i" direction="in" name="height"/>
|
<arg type="i" direction="in" name="height"/>
|
||||||
</method>
|
</method>
|
||||||
|
<property name="Mode" type="s" access="read" />
|
||||||
<property name="OverviewActive" type="b" access="readwrite" />
|
<property name="OverviewActive" type="b" access="readwrite" />
|
||||||
<property name="ShellVersion" type="s" access="read" />
|
<property name="ShellVersion" type="s" access="read" />
|
||||||
</interface>;
|
</interface>;
|
||||||
@@ -57,7 +58,10 @@ const ScreenSaverIface = <interface name="org.gnome.ScreenSaver">
|
|||||||
<arg name="active" direction="out" type="b" />
|
<arg name="active" direction="out" type="b" />
|
||||||
</method>
|
</method>
|
||||||
<method name="SetActive">
|
<method name="SetActive">
|
||||||
<arg name="value" direction="in" type="u" />
|
<arg name="value" direction="in" type="b" />
|
||||||
|
</method>
|
||||||
|
<method name="GetActiveTime">
|
||||||
|
<arg name="value" direction="out" type="u" />
|
||||||
</method>
|
</method>
|
||||||
<signal name="ActiveChanged">
|
<signal name="ActiveChanged">
|
||||||
<arg name="new_value" type="b" />
|
<arg name="new_value" type="b" />
|
||||||
@@ -108,7 +112,7 @@ const GnomeShell = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onScreenshotComplete: function(obj, result, area, flash, invocation) {
|
_onScreenshotComplete: function(obj, result, area, flash, invocation) {
|
||||||
if (flash) {
|
if (flash && result) {
|
||||||
let flashspot = new Flashspot.Flashspot(area);
|
let flashspot = new Flashspot.Flashspot(area);
|
||||||
flashspot.fire();
|
flashspot.fire();
|
||||||
}
|
}
|
||||||
@@ -183,6 +187,8 @@ const GnomeShell = new Lang.Class({
|
|||||||
flashspot.fire();
|
flashspot.fire();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Mode: global.session_mode,
|
||||||
|
|
||||||
get OverviewActive() {
|
get OverviewActive() {
|
||||||
return Main.overview.visible;
|
return Main.overview.visible;
|
||||||
},
|
},
|
||||||
@@ -373,5 +379,13 @@ const ScreenSaverDBus = new Lang.Class({
|
|||||||
|
|
||||||
GetActive: function() {
|
GetActive: function() {
|
||||||
return this._screenShield.locked;
|
return this._screenShield.locked;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
GetActiveTime: function() {
|
||||||
|
let started = this._screenShield.activationTime;
|
||||||
|
if (started > 0)
|
||||||
|
return Math.floor((GLib.get_monotonic_time() - started) / 1000000);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ const ShellEntry = imports.ui.shellEntry;
|
|||||||
|
|
||||||
const LIST_ITEM_ICON_SIZE = 48;
|
const LIST_ITEM_ICON_SIZE = 48;
|
||||||
|
|
||||||
|
const REMEMBER_MOUNT_PASSWORD_KEY = 'remember-mount-password';
|
||||||
|
|
||||||
/* ------ Common Utils ------- */
|
/* ------ Common Utils ------- */
|
||||||
function _setLabelText(label, text) {
|
function _setLabelText(label, text) {
|
||||||
if (text) {
|
if (text) {
|
||||||
@@ -387,7 +389,8 @@ const ShellMountPasswordDialog = new Lang.Class({
|
|||||||
if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) {
|
if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) {
|
||||||
this._rememberChoice = new CheckBox.CheckBox();
|
this._rememberChoice = new CheckBox.CheckBox();
|
||||||
this._rememberChoice.getLabelActor().text = _("Remember Password");
|
this._rememberChoice.getLabelActor().text = _("Remember Password");
|
||||||
this._rememberChoice.actor.checked = true;
|
this._rememberChoice.actor.checked =
|
||||||
|
global.settings.get_boolean(REMEMBER_MOUNT_PASSWORD_KEY);
|
||||||
this._messageBox.add(this._rememberChoice.actor);
|
this._messageBox.add(this._rememberChoice.actor);
|
||||||
} else {
|
} else {
|
||||||
this._rememberChoice = null;
|
this._rememberChoice = null;
|
||||||
@@ -419,6 +422,8 @@ const ShellMountPasswordDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onEntryActivate: function() {
|
_onEntryActivate: function() {
|
||||||
|
global.settings.set_boolean(REMEMBER_MOUNT_PASSWORD_KEY,
|
||||||
|
this._rememberChoice && this._rememberChoice.actor.checked);
|
||||||
this.emit('response', 1,
|
this.emit('response', 1,
|
||||||
this._passwordEntry.get_text(),
|
this._passwordEntry.get_text(),
|
||||||
this._rememberChoice &&
|
this._rememberChoice &&
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const KEY_VISUAL_BELL = 'visual-bell';
|
|||||||
const DESKTOP_INTERFACE_SCHEMA = 'org.gnome.desktop.interface';
|
const DESKTOP_INTERFACE_SCHEMA = 'org.gnome.desktop.interface';
|
||||||
const KEY_GTK_THEME = 'gtk-theme';
|
const KEY_GTK_THEME = 'gtk-theme';
|
||||||
const KEY_ICON_THEME = 'icon-theme';
|
const KEY_ICON_THEME = 'icon-theme';
|
||||||
|
const KEY_WM_THEME = 'theme';
|
||||||
const KEY_TEXT_SCALING_FACTOR = 'text-scaling-factor';
|
const KEY_TEXT_SCALING_FACTOR = 'text-scaling-factor';
|
||||||
|
|
||||||
const HIGH_CONTRAST_THEME = 'HighContrast';
|
const HIGH_CONTRAST_THEME = 'HighContrast';
|
||||||
@@ -101,28 +102,35 @@ const ATIndicator = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_buildHCItem: function() {
|
_buildHCItem: function() {
|
||||||
let settings = new Gio.Settings({ schema: DESKTOP_INTERFACE_SCHEMA });
|
let interfaceSettings = new Gio.Settings({ schema: DESKTOP_INTERFACE_SCHEMA });
|
||||||
let gtkTheme = settings.get_string(KEY_GTK_THEME);
|
let wmSettings = new Gio.Settings({ schema: WM_SCHEMA });
|
||||||
let iconTheme = settings.get_string(KEY_ICON_THEME);
|
let gtkTheme = interfaceSettings.get_string(KEY_GTK_THEME);
|
||||||
|
let iconTheme = interfaceSettings.get_string(KEY_ICON_THEME);
|
||||||
|
let wmTheme = wmSettings.get_string(KEY_WM_THEME);
|
||||||
let hasHC = (gtkTheme == HIGH_CONTRAST_THEME);
|
let hasHC = (gtkTheme == HIGH_CONTRAST_THEME);
|
||||||
let highContrast = this._buildItemExtended(
|
let highContrast = this._buildItemExtended(
|
||||||
_("High Contrast"),
|
_("High Contrast"),
|
||||||
hasHC,
|
hasHC,
|
||||||
settings.is_writable(KEY_GTK_THEME) && settings.is_writable(KEY_ICON_THEME),
|
interfaceSettings.is_writable(KEY_GTK_THEME) &&
|
||||||
|
interfaceSettings.is_writable(KEY_ICON_THEME) &&
|
||||||
|
wmSettings.is_writable(KEY_WM_THEME),
|
||||||
function (enabled) {
|
function (enabled) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
settings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
|
interfaceSettings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
|
||||||
settings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
|
interfaceSettings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
|
||||||
|
wmSettings.set_string(KEY_WM_THEME, HIGH_CONTRAST_THEME);
|
||||||
} else if(!hasHC) {
|
} else if(!hasHC) {
|
||||||
settings.set_string(KEY_GTK_THEME, gtkTheme);
|
interfaceSettings.set_string(KEY_GTK_THEME, gtkTheme);
|
||||||
settings.set_string(KEY_ICON_THEME, iconTheme);
|
interfaceSettings.set_string(KEY_ICON_THEME, iconTheme);
|
||||||
|
wmSettings.set_string(KEY_WM_THEME, wmTheme);
|
||||||
} else {
|
} else {
|
||||||
settings.reset(KEY_GTK_THEME);
|
interfaceSettings.reset(KEY_GTK_THEME);
|
||||||
settings.reset(KEY_ICON_THEME);
|
interfaceSettings.reset(KEY_ICON_THEME);
|
||||||
|
wmSettings.reset(KEY_WM_THEME);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
settings.connect('changed::' + KEY_GTK_THEME, function() {
|
interfaceSettings.connect('changed::' + KEY_GTK_THEME, function() {
|
||||||
let value = settings.get_string(KEY_GTK_THEME);
|
let value = interfaceSettings.get_string(KEY_GTK_THEME);
|
||||||
if (value == HIGH_CONTRAST_THEME) {
|
if (value == HIGH_CONTRAST_THEME) {
|
||||||
highContrast.setToggleState(true);
|
highContrast.setToggleState(true);
|
||||||
} else {
|
} else {
|
||||||
@@ -130,11 +138,16 @@ const ATIndicator = new Lang.Class({
|
|||||||
gtkTheme = value;
|
gtkTheme = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
settings.connect('changed::' + KEY_ICON_THEME, function() {
|
interfaceSettings.connect('changed::' + KEY_ICON_THEME, function() {
|
||||||
let value = settings.get_string(KEY_ICON_THEME);
|
let value = interfaceSettings.get_string(KEY_ICON_THEME);
|
||||||
if (value != HIGH_CONTRAST_THEME)
|
if (value != HIGH_CONTRAST_THEME)
|
||||||
iconTheme = value;
|
iconTheme = value;
|
||||||
});
|
});
|
||||||
|
wmSettings.connect('changed::' + KEY_WM_THEME, function() {
|
||||||
|
let value = wmSettings.get_string(KEY_WM_THEME);
|
||||||
|
if (value != HIGH_CONTRAST_THEME)
|
||||||
|
wmTheme = value;
|
||||||
|
});
|
||||||
return highContrast;
|
return highContrast;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const Indicator = new Lang.Class({
|
|||||||
this._applet.connect('notify::show-full-menu', Lang.bind(this, this._updateFullMenu));
|
this._applet.connect('notify::show-full-menu', Lang.bind(this, this._updateFullMenu));
|
||||||
this._updateFullMenu();
|
this._updateFullMenu();
|
||||||
|
|
||||||
this.menu.addSettingsAction(_("Bluetooth Settings"), 'bluetooth-properties.desktop');
|
this.menu.addSettingsAction(_("Bluetooth Settings"), 'gnome-bluetooth-panel.desktop');
|
||||||
|
|
||||||
this._applet.connect('pincode-request', Lang.bind(this, this._pinRequest));
|
this._applet.connect('pincode-request', Lang.bind(this, this._pinRequest));
|
||||||
this._applet.connect('confirm-request', Lang.bind(this, this._confirmRequest));
|
this._applet.connect('confirm-request', Lang.bind(this, this._confirmRequest));
|
||||||
@@ -239,22 +239,6 @@ const Indicator = new Lang.Class({
|
|||||||
this._applet.send_to_address(device.bdaddr, device.alias);
|
this._applet.send_to_address(device.bdaddr, device.alias);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (device.capabilities & GnomeBluetoothApplet.Capabilities.OBEX_FILE_TRANSFER) {
|
|
||||||
item.menu.addAction(_("Browse Files..."), Lang.bind(this, function(event) {
|
|
||||||
this._applet.browse_address(device.bdaddr, event.get_time(),
|
|
||||||
Lang.bind(this, function(applet, result) {
|
|
||||||
try {
|
|
||||||
applet.browse_address_finish(result);
|
|
||||||
} catch (e) {
|
|
||||||
this._ensureSource();
|
|
||||||
this._source.notify(new MessageTray.Notification(this._source,
|
|
||||||
_("Bluetooth"),
|
|
||||||
_("Error browsing device"),
|
|
||||||
{ body: _("The requested device cannot be browsed, error is '%s'").format(e) }));
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (device.type) {
|
switch (device.type) {
|
||||||
case GnomeBluetoothApplet.Type.KEYBOARD:
|
case GnomeBluetoothApplet.Type.KEYBOARD:
|
||||||
@@ -369,6 +353,7 @@ const ConfirmNotification = new Lang.Class({
|
|||||||
_init: function(source, applet, device_path, name, long_name, pin) {
|
_init: function(source, applet, device_path, name, long_name, pin) {
|
||||||
this.parent(source,
|
this.parent(source,
|
||||||
_("Bluetooth"),
|
_("Bluetooth"),
|
||||||
|
/* Translators: argument is the device short name */
|
||||||
_("Pairing confirmation for %s").format(name),
|
_("Pairing confirmation for %s").format(name),
|
||||||
{ customContent: true });
|
{ customContent: true });
|
||||||
this.setResident(true);
|
this.setResident(true);
|
||||||
@@ -378,6 +363,7 @@ const ConfirmNotification = new Lang.Class({
|
|||||||
this.addBody(_("Device %s wants to pair with this computer").format(long_name));
|
this.addBody(_("Device %s wants to pair with this computer").format(long_name));
|
||||||
this.addBody(_("Please confirm whether the PIN '%06d' matches the one on the device.").format(pin));
|
this.addBody(_("Please confirm whether the PIN '%06d' matches the one on the device.").format(pin));
|
||||||
|
|
||||||
|
/* Translators: this is the verb, not the noun */
|
||||||
this.addButton('matches', _("Matches"));
|
this.addButton('matches', _("Matches"));
|
||||||
this.addButton('does-not-match', _("Does not match"));
|
this.addButton('does-not-match', _("Does not match"));
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const GnomeDesktop = imports.gi.GnomeDesktop;
|
const GnomeDesktop = imports.gi.GnomeDesktop;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
@@ -21,6 +23,7 @@ try {
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
|
const SwitcherPopup = imports.ui.switcherPopup;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources';
|
const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources';
|
||||||
@@ -47,6 +50,7 @@ const IBusManager = new Lang.Class({
|
|||||||
this._engines = {};
|
this._engines = {};
|
||||||
this._ready = false;
|
this._ready = false;
|
||||||
this._registerPropertiesId = 0;
|
this._registerPropertiesId = 0;
|
||||||
|
this._currentEngineName = null;
|
||||||
|
|
||||||
this._nameWatcherId = Gio.DBus.session.watch_name(IBus.SERVICE_IBUS,
|
this._nameWatcherId = Gio.DBus.session.watch_name(IBus.SERVICE_IBUS,
|
||||||
Gio.BusNameWatcherFlags.NONE,
|
Gio.BusNameWatcherFlags.NONE,
|
||||||
@@ -66,6 +70,10 @@ const IBusManager = new Lang.Class({
|
|||||||
this._engines = {};
|
this._engines = {};
|
||||||
this._ready = false;
|
this._ready = false;
|
||||||
this._registerPropertiesId = 0;
|
this._registerPropertiesId = 0;
|
||||||
|
this._currentEngineName = null;
|
||||||
|
|
||||||
|
if (this._readyCallback)
|
||||||
|
this._readyCallback(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onNameAppeared: function() {
|
_onNameAppeared: function() {
|
||||||
@@ -89,12 +97,10 @@ const IBusManager = new Lang.Class({
|
|||||||
let name = enginesList[i].get_name();
|
let name = enginesList[i].get_name();
|
||||||
this._engines[name] = enginesList[i];
|
this._engines[name] = enginesList[i];
|
||||||
}
|
}
|
||||||
|
this._updateReadiness();
|
||||||
} else {
|
} else {
|
||||||
this._clear();
|
this._clear();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._updateReadiness();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_initPanelService: function(ibus, result) {
|
_initPanelService: function(ibus, result) {
|
||||||
@@ -105,27 +111,31 @@ const IBusManager = new Lang.Class({
|
|||||||
this._candidatePopup.setPanelService(this._panelService);
|
this._candidatePopup.setPanelService(this._panelService);
|
||||||
// Need to set this to get 'global-engine-changed' emitions
|
// Need to set this to get 'global-engine-changed' emitions
|
||||||
this._ibus.set_watch_ibus_signal(true);
|
this._ibus.set_watch_ibus_signal(true);
|
||||||
this._ibus.connect('global-engine-changed', Lang.bind(this, this._resetProperties));
|
this._ibus.connect('global-engine-changed', Lang.bind(this, this._engineChanged));
|
||||||
this._panelService.connect('update-property', Lang.bind(this, this._updateProperty));
|
this._panelService.connect('update-property', Lang.bind(this, this._updateProperty));
|
||||||
this._resetProperties();
|
// If an engine is already active we need to get its properties
|
||||||
|
this._ibus.get_global_engine_async(-1, null, Lang.bind(this, function(i, result) {
|
||||||
|
let engine = this._ibus.get_global_engine_async_finish(result);
|
||||||
|
if (!engine)
|
||||||
|
return;
|
||||||
|
this._engineChanged(this._ibus, engine.get_name());
|
||||||
|
}));
|
||||||
|
this._updateReadiness();
|
||||||
} else {
|
} else {
|
||||||
this._clear();
|
this._clear();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._updateReadiness();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateReadiness: function() {
|
_updateReadiness: function() {
|
||||||
this._ready = (Object.keys(this._engines).length > 0 &&
|
this._ready = (Object.keys(this._engines).length > 0 &&
|
||||||
this._panelService != null);
|
this._panelService != null);
|
||||||
|
|
||||||
if (this._ready && this._readyCallback)
|
if (this._readyCallback)
|
||||||
this._readyCallback();
|
this._readyCallback(this._ready);
|
||||||
},
|
},
|
||||||
|
|
||||||
_resetProperties: function() {
|
_engineChanged: function(bus, engineName) {
|
||||||
this.emit('properties-registered', null);
|
this._currentEngineName = engineName;
|
||||||
|
|
||||||
if (this._registerPropertiesId != 0)
|
if (this._registerPropertiesId != 0)
|
||||||
return;
|
return;
|
||||||
@@ -138,25 +148,18 @@ const IBusManager = new Lang.Class({
|
|||||||
this._panelService.disconnect(this._registerPropertiesId);
|
this._panelService.disconnect(this._registerPropertiesId);
|
||||||
this._registerPropertiesId = 0;
|
this._registerPropertiesId = 0;
|
||||||
|
|
||||||
this.emit('properties-registered', props);
|
this.emit('properties-registered', this._currentEngineName, props);
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateProperty: function(panel, prop) {
|
_updateProperty: function(panel, prop) {
|
||||||
this.emit('property-updated', prop);
|
this.emit('property-updated', this._currentEngineName, prop);
|
||||||
},
|
},
|
||||||
|
|
||||||
activateProperty: function(key, state) {
|
activateProperty: function(key, state) {
|
||||||
this._panelService.property_activate(key, state);
|
this._panelService.property_activate(key, state);
|
||||||
},
|
},
|
||||||
|
|
||||||
hasProperties: function(id) {
|
|
||||||
if (id == 'anthy')
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
getEngineDesc: function(id) {
|
getEngineDesc: function(id) {
|
||||||
if (!IBus || !this._ready)
|
if (!IBus || !this._ready)
|
||||||
return null;
|
return null;
|
||||||
@@ -177,6 +180,124 @@ const LayoutMenuItem = new Lang.Class({
|
|||||||
this.indicator = new St.Label({ text: shortName });
|
this.indicator = new St.Label({ text: shortName });
|
||||||
this.addActor(this.label);
|
this.addActor(this.label);
|
||||||
this.addActor(this.indicator);
|
this.addActor(this.indicator);
|
||||||
|
this.actor.label_actor = this.label;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const InputSource = new Lang.Class({
|
||||||
|
Name: 'InputSource',
|
||||||
|
|
||||||
|
_init: function(type, id, displayName, shortName, index) {
|
||||||
|
this.type = type;
|
||||||
|
this.id = id;
|
||||||
|
this.displayName = displayName;
|
||||||
|
this._shortName = shortName;
|
||||||
|
this.index = index;
|
||||||
|
|
||||||
|
this._menuItem = new LayoutMenuItem(this.displayName, this._shortName);
|
||||||
|
this._menuItem.connect('activate', Lang.bind(this, this.activate));
|
||||||
|
this._indicatorLabel = new St.Label({ text: this._shortName });
|
||||||
|
|
||||||
|
this.properties = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
this._menuItem.destroy();
|
||||||
|
this._indicatorLabel.destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
get shortName() {
|
||||||
|
return this._shortName;
|
||||||
|
},
|
||||||
|
|
||||||
|
set shortName(v) {
|
||||||
|
this._shortName = v;
|
||||||
|
this._menuItem.indicator.set_text(v);
|
||||||
|
this._indicatorLabel.set_text(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
get menuItem() {
|
||||||
|
return this._menuItem;
|
||||||
|
},
|
||||||
|
|
||||||
|
get indicatorLabel() {
|
||||||
|
return this._indicatorLabel;
|
||||||
|
},
|
||||||
|
|
||||||
|
activate: function() {
|
||||||
|
this.emit('activate');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
Signals.addSignalMethods(InputSource.prototype);
|
||||||
|
|
||||||
|
const InputSourcePopup = new Lang.Class({
|
||||||
|
Name: 'InputSourcePopup',
|
||||||
|
Extends: SwitcherPopup.SwitcherPopup,
|
||||||
|
|
||||||
|
_init: function(items, action, actionBackward) {
|
||||||
|
this.parent(items);
|
||||||
|
|
||||||
|
this._action = action;
|
||||||
|
this._actionBackward = actionBackward;
|
||||||
|
},
|
||||||
|
|
||||||
|
_createSwitcher: function() {
|
||||||
|
this._switcherList = new InputSourceSwitcher(this._items);
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_initialSelection: function(backward, binding) {
|
||||||
|
if (binding == 'switch-input-source') {
|
||||||
|
if (backward)
|
||||||
|
this._selectedIndex = this._items.length - 1;
|
||||||
|
} else if (binding == 'switch-input-source-backward') {
|
||||||
|
if (!backward)
|
||||||
|
this._selectedIndex = this._items.length - 1;
|
||||||
|
}
|
||||||
|
this._select(this._selectedIndex);
|
||||||
|
},
|
||||||
|
|
||||||
|
_keyPressHandler: function(keysym, backwards, action) {
|
||||||
|
if (action == this._action)
|
||||||
|
this._select(backwards ? this._previous() : this._next());
|
||||||
|
else if (action == this._actionBackward)
|
||||||
|
this._select(backwards ? this._next() : this._previous());
|
||||||
|
else if (keysym == Clutter.Left)
|
||||||
|
this._select(this._previous());
|
||||||
|
else if (keysym == Clutter.Right)
|
||||||
|
this._select(this._next());
|
||||||
|
},
|
||||||
|
|
||||||
|
_finish : function() {
|
||||||
|
this.parent();
|
||||||
|
|
||||||
|
this._items[this._selectedIndex].activate();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const InputSourceSwitcher = new Lang.Class({
|
||||||
|
Name: 'InputSourceSwitcher',
|
||||||
|
Extends: SwitcherPopup.SwitcherList,
|
||||||
|
|
||||||
|
_init: function(items) {
|
||||||
|
this.parent(true);
|
||||||
|
|
||||||
|
for (let i = 0; i < items.length; i++)
|
||||||
|
this._addIcon(items[i]);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addIcon: function(item) {
|
||||||
|
let box = new St.BoxLayout({ vertical: true });
|
||||||
|
|
||||||
|
let bin = new St.Bin({ style_class: 'input-source-switcher-symbol' });
|
||||||
|
let symbol = new St.Label({ text: item.shortName });
|
||||||
|
bin.set_child(symbol);
|
||||||
|
box.add(bin, { x_fill: false, y_fill: false } );
|
||||||
|
|
||||||
|
let text = new St.Label({ text: item.displayName });
|
||||||
|
box.add(text, { x_fill: false });
|
||||||
|
|
||||||
|
this.addItem(box, text);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -184,12 +305,6 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
Name: 'InputSourceIndicator',
|
Name: 'InputSourceIndicator',
|
||||||
Extends: PanelMenu.Button,
|
Extends: PanelMenu.Button,
|
||||||
|
|
||||||
_propertiesWhitelist: [
|
|
||||||
'InputMode',
|
|
||||||
'TypingMode',
|
|
||||||
'DictMode'
|
|
||||||
],
|
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent(0.0, _("Keyboard"));
|
this.parent(0.0, _("Keyboard"));
|
||||||
|
|
||||||
@@ -200,14 +315,36 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
this.actor.add_actor(this._container);
|
this.actor.add_actor(this._container);
|
||||||
this.actor.add_style_class_name('panel-status-button');
|
this.actor.add_style_class_name('panel-status-button');
|
||||||
|
|
||||||
this._labelActors = {};
|
// All valid input sources currently in the gsettings
|
||||||
this._layoutItems = {};
|
// KEY_INPUT_SOURCES list indexed by their index there
|
||||||
|
this._inputSources = {};
|
||||||
|
// All valid input sources currently in the gsettings
|
||||||
|
// KEY_INPUT_SOURCES list of type INPUT_SOURCE_TYPE_IBUS
|
||||||
|
// indexed by the IBus ID
|
||||||
|
this._ibusSources = {};
|
||||||
|
|
||||||
|
this._currentSource = null;
|
||||||
|
|
||||||
|
// All valid input sources currently in the gsettings
|
||||||
|
// KEY_INPUT_SOURCES list ordered by most recently used
|
||||||
|
this._mruSources = [];
|
||||||
|
this._keybindingAction =
|
||||||
|
Main.wm.addKeybinding('switch-input-source',
|
||||||
|
new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }),
|
||||||
|
Meta.KeyBindingFlags.REVERSES,
|
||||||
|
Main.KeybindingMode.ALL,
|
||||||
|
Lang.bind(this, this._switchInputSource));
|
||||||
|
this._keybindingActionBackward =
|
||||||
|
Main.wm.addKeybinding('switch-input-source-backward',
|
||||||
|
new Gio.Settings({ schema: "org.gnome.desktop.wm.keybindings" }),
|
||||||
|
Meta.KeyBindingFlags.REVERSES |
|
||||||
|
Meta.KeyBindingFlags.REVERSED,
|
||||||
|
Main.KeybindingMode.ALL,
|
||||||
|
Lang.bind(this, this._switchInputSource));
|
||||||
this._settings = new Gio.Settings({ schema: DESKTOP_INPUT_SOURCES_SCHEMA });
|
this._settings = new Gio.Settings({ schema: DESKTOP_INPUT_SOURCES_SCHEMA });
|
||||||
this._settings.connect('changed::' + KEY_CURRENT_INPUT_SOURCE, Lang.bind(this, this._currentInputSourceChanged));
|
this._settings.connect('changed::' + KEY_CURRENT_INPUT_SOURCE, Lang.bind(this, this._currentInputSourceChanged));
|
||||||
this._settings.connect('changed::' + KEY_INPUT_SOURCES, Lang.bind(this, this._inputSourcesChanged));
|
this._settings.connect('changed::' + KEY_INPUT_SOURCES, Lang.bind(this, this._inputSourcesChanged));
|
||||||
|
|
||||||
this._currentSourceIndex = this._settings.get_uint(KEY_CURRENT_INPUT_SOURCE);
|
|
||||||
this._xkbInfo = new GnomeDesktop.XkbInfo();
|
this._xkbInfo = new GnomeDesktop.XkbInfo();
|
||||||
|
|
||||||
this._propSeparator = new PopupMenu.PopupSeparatorMenuItem();
|
this._propSeparator = new PopupMenu.PopupSeparatorMenuItem();
|
||||||
@@ -216,9 +353,8 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
this.menu.addMenuItem(this._propSection);
|
this.menu.addMenuItem(this._propSection);
|
||||||
this._propSection.actor.hide();
|
this._propSection.actor.hide();
|
||||||
|
|
||||||
this._properties = null;
|
this._ibusReady = false;
|
||||||
|
this._ibusManager = new IBusManager(Lang.bind(this, this._ibusReadyCallback));
|
||||||
this._ibusManager = new IBusManager(Lang.bind(this, this._inputSourcesChanged));
|
|
||||||
this._ibusManager.connect('properties-registered', Lang.bind(this, this._ibusPropertiesRegistered));
|
this._ibusManager.connect('properties-registered', Lang.bind(this, this._ibusPropertiesRegistered));
|
||||||
this._ibusManager.connect('property-updated', Lang.bind(this, this._ibusPropertyUpdated));
|
this._ibusManager.connect('property-updated', Lang.bind(this, this._ibusPropertyUpdated));
|
||||||
this._inputSourcesChanged();
|
this._inputSourcesChanged();
|
||||||
@@ -237,21 +373,32 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
// but at least for now it is used as "allow popping up windows
|
// but at least for now it is used as "allow popping up windows
|
||||||
// from shell menus"; we can always add a separate sessionMode
|
// from shell menus"; we can always add a separate sessionMode
|
||||||
// option if need arises.
|
// option if need arises.
|
||||||
this._showLayoutItem.visible = Main.sessionMode.allowSettings;
|
this._showLayoutItem.actor.visible = Main.sessionMode.allowSettings;
|
||||||
|
},
|
||||||
|
|
||||||
|
_ibusReadyCallback: function(ready) {
|
||||||
|
if (this._ibusReady == ready)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._ibusReady = ready;
|
||||||
|
this._mruSources = [];
|
||||||
|
this._inputSourcesChanged();
|
||||||
|
},
|
||||||
|
|
||||||
|
_switchInputSource: function(display, screen, window, binding) {
|
||||||
|
let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, this._keybindingActionBackward);
|
||||||
|
let modifiers = binding.get_modifiers();
|
||||||
|
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
||||||
|
if (!popup.show(backwards, binding.get_name(), binding.get_mask()))
|
||||||
|
popup.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
_currentInputSourceChanged: function() {
|
_currentInputSourceChanged: function() {
|
||||||
let nVisibleSources = Object.keys(this._layoutItems).length;
|
let nVisibleSources = Object.keys(this._inputSources).length;
|
||||||
let newCurrentSourceIndex = this._settings.get_uint(KEY_CURRENT_INPUT_SOURCE);
|
let newSourceIndex = this._settings.get_uint(KEY_CURRENT_INPUT_SOURCE);
|
||||||
let newLayoutItem = this._layoutItems[newCurrentSourceIndex];
|
let newSource = this._inputSources[newSourceIndex];
|
||||||
let hasProperties;
|
|
||||||
|
|
||||||
if (newLayoutItem)
|
if (!newSource || (nVisibleSources < 2 && !newSource.properties)) {
|
||||||
hasProperties = this._ibusManager.hasProperties(newLayoutItem.ibusEngineId);
|
|
||||||
else
|
|
||||||
hasProperties = false;
|
|
||||||
|
|
||||||
if (!newLayoutItem || (nVisibleSources < 2 && !hasProperties)) {
|
|
||||||
// This source index might be invalid if we weren't able
|
// This source index might be invalid if we weren't able
|
||||||
// to build a menu item for it, so we hide ourselves since
|
// to build a menu item for it, so we hide ourselves since
|
||||||
// we can't fix it here. *shrug*
|
// we can't fix it here. *shrug*
|
||||||
@@ -265,106 +412,121 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
|
|
||||||
if (this._layoutItems[this._currentSourceIndex]) {
|
let oldSource;
|
||||||
this._layoutItems[this._currentSourceIndex].setShowDot(false);
|
[oldSource, this._currentSource] = [this._currentSource, newSource];
|
||||||
this._container.set_skip_paint(this._labelActors[this._currentSourceIndex], true);
|
|
||||||
|
if (oldSource) {
|
||||||
|
oldSource.menuItem.setShowDot(false);
|
||||||
|
this._container.set_skip_paint(oldSource.indicatorLabel, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
newLayoutItem.setShowDot(true);
|
newSource.menuItem.setShowDot(true);
|
||||||
|
this._container.set_skip_paint(newSource.indicatorLabel, false);
|
||||||
|
|
||||||
let newLabelActor = this._labelActors[newCurrentSourceIndex];
|
this._buildPropSection(newSource.properties);
|
||||||
this._container.set_skip_paint(newLabelActor, false);
|
|
||||||
|
|
||||||
if (hasProperties)
|
for (let i = 1; i < this._mruSources.length; ++i)
|
||||||
newLabelActor.set_text(newLayoutItem.indicator.get_text());
|
if (this._mruSources[i] == newSource) {
|
||||||
|
let currentSource = this._mruSources.splice(i, 1);
|
||||||
this._currentSourceIndex = newCurrentSourceIndex;
|
this._mruSources = currentSource.concat(this._mruSources);
|
||||||
|
break;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_inputSourcesChanged: function() {
|
_inputSourcesChanged: function() {
|
||||||
let sources = this._settings.get_value(KEY_INPUT_SOURCES);
|
let sources = this._settings.get_value(KEY_INPUT_SOURCES);
|
||||||
let nSources = sources.n_children();
|
let nSources = sources.n_children();
|
||||||
|
|
||||||
for (let i in this._layoutItems)
|
for (let i in this._inputSources)
|
||||||
this._layoutItems[i].destroy();
|
this._inputSources[i].destroy();
|
||||||
|
|
||||||
for (let i in this._labelActors)
|
this._inputSources = {};
|
||||||
this._labelActors[i].destroy();
|
this._ibusSources = {};
|
||||||
|
|
||||||
this._layoutItems = {};
|
let inputSourcesByShortName = {};
|
||||||
this._labelActors = {};
|
|
||||||
|
|
||||||
let infos = [];
|
|
||||||
let infosByShortName = {};
|
|
||||||
|
|
||||||
for (let i = 0; i < nSources; i++) {
|
for (let i = 0; i < nSources; i++) {
|
||||||
let info = { exists: false };
|
let displayName;
|
||||||
|
let shortName;
|
||||||
let [type, id] = sources.get_child_value(i).deep_unpack();
|
let [type, id] = sources.get_child_value(i).deep_unpack();
|
||||||
|
let exists = false;
|
||||||
|
|
||||||
if (type == INPUT_SOURCE_TYPE_XKB) {
|
if (type == INPUT_SOURCE_TYPE_XKB) {
|
||||||
[info.exists, info.displayName, info.shortName, , ] =
|
[exists, displayName, shortName, , ] =
|
||||||
this._xkbInfo.get_layout_info(id);
|
this._xkbInfo.get_layout_info(id);
|
||||||
} else if (type == INPUT_SOURCE_TYPE_IBUS) {
|
} else if (type == INPUT_SOURCE_TYPE_IBUS) {
|
||||||
let engineDesc = this._ibusManager.getEngineDesc(id);
|
let engineDesc = this._ibusManager.getEngineDesc(id);
|
||||||
if (engineDesc) {
|
if (engineDesc) {
|
||||||
let language = IBus.get_language_name(engineDesc.get_language());
|
let language = IBus.get_language_name(engineDesc.get_language());
|
||||||
|
exists = true;
|
||||||
info.exists = true;
|
displayName = language + ' (' + engineDesc.get_longname() + ')';
|
||||||
info.displayName = language + ' (' + engineDesc.get_longname() + ')';
|
shortName = this._makeEngineShortName(engineDesc);
|
||||||
info.shortName = this._makeEngineShortName(engineDesc);
|
|
||||||
info.ibusEngineId = id;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!info.exists)
|
if (!exists)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
info.sourceIndex = i;
|
let is = new InputSource(type, id, displayName, shortName, i);
|
||||||
|
|
||||||
if (!(info.shortName in infosByShortName))
|
is.connect('activate', Lang.bind(this, function() {
|
||||||
infosByShortName[info.shortName] = [];
|
|
||||||
infosByShortName[info.shortName].push(info);
|
|
||||||
infos.push(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < infos.length; i++) {
|
|
||||||
let info = infos[i];
|
|
||||||
if (infosByShortName[info.shortName].length > 1) {
|
|
||||||
let sub = infosByShortName[info.shortName].indexOf(info) + 1;
|
|
||||||
info.shortName += String.fromCharCode(0x2080 + sub);
|
|
||||||
}
|
|
||||||
|
|
||||||
let item = new LayoutMenuItem(info.displayName, info.shortName);
|
|
||||||
item.ibusEngineId = info.ibusEngineId;
|
|
||||||
this._layoutItems[info.sourceIndex] = item;
|
|
||||||
this.menu.addMenuItem(item, i);
|
|
||||||
item.connect('activate', Lang.bind(this, function() {
|
|
||||||
this._settings.set_value(KEY_CURRENT_INPUT_SOURCE,
|
this._settings.set_value(KEY_CURRENT_INPUT_SOURCE,
|
||||||
GLib.Variant.new_uint32(info.sourceIndex));
|
GLib.Variant.new_uint32(is.index));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let shortLabel = new St.Label({ text: info.shortName });
|
if (!(is.shortName in inputSourcesByShortName))
|
||||||
this._labelActors[info.sourceIndex] = shortLabel;
|
inputSourcesByShortName[is.shortName] = [];
|
||||||
this._container.add_actor(shortLabel);
|
inputSourcesByShortName[is.shortName].push(is);
|
||||||
this._container.set_skip_paint(shortLabel, true);
|
|
||||||
|
this._inputSources[is.index] = is;
|
||||||
|
|
||||||
|
if (is.type == INPUT_SOURCE_TYPE_IBUS)
|
||||||
|
this._ibusSources[is.id] = is;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let menuIndex = 0;
|
||||||
|
for (let i in this._inputSources) {
|
||||||
|
let is = this._inputSources[i];
|
||||||
|
if (inputSourcesByShortName[is.shortName].length > 1) {
|
||||||
|
let sub = inputSourcesByShortName[is.shortName].indexOf(is) + 1;
|
||||||
|
is.shortName += String.fromCharCode(0x2080 + sub);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.menu.addMenuItem(is.menuItem, menuIndex++);
|
||||||
|
|
||||||
|
this._container.add_actor(is.indicatorLabel);
|
||||||
|
this._container.set_skip_paint(is.indicatorLabel, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
let sourcesList = [];
|
||||||
|
for (let i in this._inputSources)
|
||||||
|
sourcesList.push(this._inputSources[i]);
|
||||||
|
|
||||||
|
let mruSources = [];
|
||||||
|
for (let i = 0; i < this._mruSources.length; i++) {
|
||||||
|
for (let j = 0; j < sourcesList.length; j++)
|
||||||
|
if (this._mruSources[i].type == sourcesList[j].type &&
|
||||||
|
this._mruSources[i].id == sourcesList[j].id) {
|
||||||
|
mruSources = mruSources.concat(sourcesList.splice(j, 1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._mruSources = mruSources.concat(sourcesList);
|
||||||
|
|
||||||
this._currentInputSourceChanged();
|
this._currentInputSourceChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
_showLayout: function() {
|
_showLayout: function() {
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
|
|
||||||
let sources = this._settings.get_value(KEY_INPUT_SOURCES);
|
let source = this._currentSource;
|
||||||
let current = this._settings.get_uint(KEY_CURRENT_INPUT_SOURCE);
|
|
||||||
let [type, id] = sources.get_child_value(current).deep_unpack();
|
|
||||||
let xkbLayout = '';
|
let xkbLayout = '';
|
||||||
let xkbVariant = '';
|
let xkbVariant = '';
|
||||||
|
|
||||||
if (type == INPUT_SOURCE_TYPE_XKB) {
|
if (source.type == INPUT_SOURCE_TYPE_XKB) {
|
||||||
[, , , xkbLayout, xkbVariant] = this._xkbInfo.get_layout_info(id);
|
[, , , xkbLayout, xkbVariant] = this._xkbInfo.get_layout_info(source.id);
|
||||||
} else if (type == INPUT_SOURCE_TYPE_IBUS) {
|
} else if (source.type == INPUT_SOURCE_TYPE_IBUS) {
|
||||||
let engineDesc = this._ibusManager.getEngineDesc(id);
|
let engineDesc = this._ibusManager.getEngineDesc(source.id);
|
||||||
if (engineDesc) {
|
if (engineDesc) {
|
||||||
xkbLayout = engineDesc.get_layout();
|
xkbLayout = engineDesc.get_layout();
|
||||||
xkbVariant = '';
|
xkbVariant = '';
|
||||||
@@ -393,26 +555,25 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
return String.fromCharCode(0x2328); // keyboard glyph
|
return String.fromCharCode(0x2328); // keyboard glyph
|
||||||
},
|
},
|
||||||
|
|
||||||
_propertyWhitelisted: function(prop) {
|
_ibusPropertiesRegistered: function(im, engineName, props) {
|
||||||
for (let i = 0; i < this._propertiesWhitelist.length; ++i) {
|
let source = this._ibusSources[engineName];
|
||||||
let key = prop.get_key();
|
if (!source)
|
||||||
if (key.substr(0, this._propertiesWhitelist[i].length) == this._propertiesWhitelist[i])
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
_ibusPropertiesRegistered: function(im, props) {
|
|
||||||
this._properties = props;
|
|
||||||
this._buildPropSection();
|
|
||||||
},
|
|
||||||
|
|
||||||
_ibusPropertyUpdated: function(im, prop) {
|
|
||||||
if (!this._propertyWhitelisted(prop))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._updateSubProperty(this._properties, prop))
|
source.properties = props;
|
||||||
this._buildPropSection();
|
|
||||||
|
if (source == this._currentSource)
|
||||||
|
this._currentInputSourceChanged();
|
||||||
|
},
|
||||||
|
|
||||||
|
_ibusPropertyUpdated: function(im, engineName, prop) {
|
||||||
|
let source = this._ibusSources[engineName];
|
||||||
|
if (!source)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (this._updateSubProperty(source.properties, prop) &&
|
||||||
|
source == this._currentSource)
|
||||||
|
this._currentInputSourceChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSubProperty: function(props, prop) {
|
_updateSubProperty: function(props, prop) {
|
||||||
@@ -432,25 +593,12 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateIndicatorLabel: function(text) {
|
_buildPropSection: function(properties) {
|
||||||
let layoutItem = this._layoutItems[this._currentSourceIndex];
|
|
||||||
let hasProperties;
|
|
||||||
|
|
||||||
if (layoutItem)
|
|
||||||
hasProperties = this._ibusManager.hasProperties(layoutItem.ibusEngineId);
|
|
||||||
else
|
|
||||||
hasProperties = false;
|
|
||||||
|
|
||||||
if (hasProperties)
|
|
||||||
this._labelActors[this._currentSourceIndex].set_text(text);
|
|
||||||
},
|
|
||||||
|
|
||||||
_buildPropSection: function() {
|
|
||||||
this._propSeparator.actor.hide();
|
this._propSeparator.actor.hide();
|
||||||
this._propSection.actor.hide();
|
this._propSection.actor.hide();
|
||||||
this._propSection.removeAll();
|
this._propSection.removeAll();
|
||||||
|
|
||||||
this._buildPropSubMenu(this._propSection, this._properties);
|
this._buildPropSubMenu(this._propSection, properties);
|
||||||
|
|
||||||
if (!this._propSection.isEmpty()) {
|
if (!this._propSection.isEmpty()) {
|
||||||
this._propSection.actor.show();
|
this._propSection.actor.show();
|
||||||
@@ -467,8 +615,7 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
for (let i = 0; (p = props.get(i)) != null; ++i) {
|
for (let i = 0; (p = props.get(i)) != null; ++i) {
|
||||||
let prop = p;
|
let prop = p;
|
||||||
|
|
||||||
if (!this._propertyWhitelisted(prop) ||
|
if (!prop.get_visible())
|
||||||
!prop.get_visible())
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (prop.get_key() == 'InputMode') {
|
if (prop.get_key() == 'InputMode') {
|
||||||
@@ -479,15 +626,17 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
text = prop.get_label().get_text();
|
text = prop.get_label().get_text();
|
||||||
|
|
||||||
if (text && text.length > 0 && text.length < 3)
|
if (text && text.length > 0 && text.length < 3)
|
||||||
this._updateIndicatorLabel(text);
|
this._currentSource.indicatorLabel.set_text(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
let item;
|
let item;
|
||||||
let type = prop.get_prop_type();
|
switch (prop.get_prop_type()) {
|
||||||
if (type == IBus.PropType.MENU) {
|
case IBus.PropType.MENU:
|
||||||
item = new PopupMenu.PopupSubMenuMenuItem(prop.get_label().get_text());
|
item = new PopupMenu.PopupSubMenuMenuItem(prop.get_label().get_text());
|
||||||
this._buildPropSubMenu(item.menu, prop.get_sub_props());
|
this._buildPropSubMenu(item.menu, prop.get_sub_props());
|
||||||
} else if (type == IBus.PropType.RADIO) {
|
break;
|
||||||
|
|
||||||
|
case IBus.PropType.RADIO:
|
||||||
item = new PopupMenu.PopupMenuItem(prop.get_label().get_text());
|
item = new PopupMenu.PopupMenuItem(prop.get_label().get_text());
|
||||||
item.prop = prop;
|
item.prop = prop;
|
||||||
radioGroup.push(item);
|
radioGroup.push(item);
|
||||||
@@ -512,7 +661,39 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
} else {
|
break;
|
||||||
|
|
||||||
|
case IBus.PropType.TOGGLE:
|
||||||
|
item = new PopupMenu.PopupSwitchMenuItem(prop.get_label().get_text(), prop.get_state() == IBus.PropState.CHECKED);
|
||||||
|
item.prop = prop;
|
||||||
|
item.connect('toggled', Lang.bind(this, function() {
|
||||||
|
if (item.state) {
|
||||||
|
item.prop.set_state(IBus.PropState.CHECKED);
|
||||||
|
this._ibusManager.activateProperty(item.prop.get_key(),
|
||||||
|
IBus.PropState.CHECKED);
|
||||||
|
} else {
|
||||||
|
item.prop.set_state(IBus.PropState.UNCHECKED);
|
||||||
|
this._ibusManager.activateProperty(item.prop.get_key(),
|
||||||
|
IBus.PropState.UNCHECKED);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IBus.PropType.NORMAL:
|
||||||
|
item = new PopupMenu.PopupMenuItem(prop.get_label().get_text());
|
||||||
|
item.prop = prop;
|
||||||
|
item.connect('activate', Lang.bind(this, function() {
|
||||||
|
this._ibusManager.activateProperty(item.prop.get_key(),
|
||||||
|
IBus.PropState.CHECKED);
|
||||||
|
}));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IBus.PropType.SEPARATOR:
|
||||||
|
item = new PopupMenu.PopupSeparatorMenuItem();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
log ('IBus property %s has invalid type %d'.format(prop.get_key(), type));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,8 +708,9 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
// for those we don't actually display.
|
// for those we don't actually display.
|
||||||
let max_min_width = 0, max_natural_width = 0;
|
let max_min_width = 0, max_natural_width = 0;
|
||||||
|
|
||||||
for (let i in this._labelActors) {
|
for (let i in this._inputSources) {
|
||||||
let [min_width, natural_width] = this._labelActors[i].get_preferred_width(for_height);
|
let is = this._inputSources[i];
|
||||||
|
let [min_width, natural_width] = is.indicatorLabel.get_preferred_width(for_height);
|
||||||
max_min_width = Math.max(max_min_width, min_width);
|
max_min_width = Math.max(max_min_width, min_width);
|
||||||
max_natural_width = Math.max(max_natural_width, natural_width);
|
max_natural_width = Math.max(max_natural_width, natural_width);
|
||||||
}
|
}
|
||||||
@@ -540,8 +722,9 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
_containerGetPreferredHeight: function(container, for_width, alloc) {
|
_containerGetPreferredHeight: function(container, for_width, alloc) {
|
||||||
let max_min_height = 0, max_natural_height = 0;
|
let max_min_height = 0, max_natural_height = 0;
|
||||||
|
|
||||||
for (let i in this._labelActors) {
|
for (let i in this._inputSources) {
|
||||||
let [min_height, natural_height] = this._labelActors[i].get_preferred_height(for_width);
|
let is = this._inputSources[i];
|
||||||
|
let [min_height, natural_height] = is.indicatorLabel.get_preferred_height(for_width);
|
||||||
max_min_height = Math.max(max_min_height, min_height);
|
max_min_height = Math.max(max_min_height, min_height);
|
||||||
max_natural_height = Math.max(max_natural_height, natural_height);
|
max_natural_height = Math.max(max_natural_height, natural_height);
|
||||||
}
|
}
|
||||||
@@ -557,7 +740,9 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
box.y2 -= box.y1;
|
box.y2 -= box.y1;
|
||||||
box.y1 = 0;
|
box.y1 = 0;
|
||||||
|
|
||||||
for (let i in this._labelActors)
|
for (let i in this._inputSources) {
|
||||||
this._labelActors[i].allocate_align_fill(box, 0.5, 0, false, false, flags);
|
let is = this._inputSources[i];
|
||||||
|
is.indicatorLabel.allocate_align_fill(box, 0.5, 0, false, false, flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ const Indicator = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent(null, _("Volume, network, battery"));
|
this.parent(null, _("Volume, network, battery"));
|
||||||
|
this._box.style_class = 'lock-screen-status-button-box';
|
||||||
|
|
||||||
this._volume = Main.panel.statusArea.volume;
|
this._volume = Main.panel.statusArea.volume;
|
||||||
if (this._volume) {
|
if (this._volume) {
|
||||||
|
|||||||
@@ -233,20 +233,11 @@ const NMWirelessSectionTitleMenuItem = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const NMDevice = new Lang.Class({
|
const NMConnectionBased = new Lang.Class({
|
||||||
Name: 'NMDevice',
|
Name: 'NMConnectionBased',
|
||||||
Abstract: true,
|
Abstract: true,
|
||||||
|
|
||||||
_init: function(client, device, connections) {
|
_init: function(connections) {
|
||||||
this.device = device;
|
|
||||||
if (device) {
|
|
||||||
this.device._delegate = this;
|
|
||||||
this._stateChangedId = this.device.connect('state-changed', Lang.bind(this, this._deviceStateChanged));
|
|
||||||
} else
|
|
||||||
this._stateChangedId = 0;
|
|
||||||
|
|
||||||
// protected
|
|
||||||
this._client = client;
|
|
||||||
this._connections = [ ];
|
this._connections = [ ];
|
||||||
for (let i = 0; i < connections.length; i++) {
|
for (let i = 0; i < connections.length; i++) {
|
||||||
if (!connections[i].get_uuid())
|
if (!connections[i].get_uuid())
|
||||||
@@ -264,26 +255,115 @@ const NMDevice = new Lang.Class({
|
|||||||
this._connections.push(obj);
|
this._connections.push(obj);
|
||||||
}
|
}
|
||||||
this._connections.sort(this._connectionSortFunction);
|
this._connections.sort(this._connectionSortFunction);
|
||||||
|
},
|
||||||
|
|
||||||
|
checkConnection: function(connection) {
|
||||||
|
let pos = this._findConnection(connection.get_uuid());
|
||||||
|
let exists = pos != -1;
|
||||||
|
let valid = this.connectionValid(connection);
|
||||||
|
let similar = false;
|
||||||
|
if (exists) {
|
||||||
|
let existing = this._connections[pos];
|
||||||
|
|
||||||
|
// Check if connection changed name or id
|
||||||
|
similar = existing.name == connection.get_id() &&
|
||||||
|
existing.timestamp == connection._timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exists && valid && similar) {
|
||||||
|
// Nothing to do
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exists)
|
||||||
|
this.removeConnection(connection);
|
||||||
|
if (valid)
|
||||||
|
this.addConnection(connection);
|
||||||
|
},
|
||||||
|
|
||||||
|
addConnection: function(connection) {
|
||||||
|
// record the connection
|
||||||
|
let obj = {
|
||||||
|
connection: connection,
|
||||||
|
name: connection.get_id(),
|
||||||
|
uuid: connection.get_uuid(),
|
||||||
|
timestamp: connection._timestamp,
|
||||||
|
item: null,
|
||||||
|
};
|
||||||
|
Util.insertSorted(this._connections, obj, this._connectionSortFunction);
|
||||||
|
|
||||||
|
this._queueCreateSection();
|
||||||
|
},
|
||||||
|
|
||||||
|
removeConnection: function(connection) {
|
||||||
|
let pos = this._findConnection(connection.get_uuid());
|
||||||
|
if (pos == -1) {
|
||||||
|
// this connection was never added, nothing to do here
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let obj = this._connections[pos];
|
||||||
|
if (obj.item)
|
||||||
|
obj.item.destroy();
|
||||||
|
this._connections.splice(pos, 1);
|
||||||
|
|
||||||
|
if (this._connections.length <= 1) {
|
||||||
|
// We need to show the automatic connection again
|
||||||
|
// (or in the case of NMDeviceWired, we want to hide
|
||||||
|
// the only explicit connection)
|
||||||
|
this._queueCreateSection();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_findConnection: function(uuid) {
|
||||||
|
for (let i = 0; i < this._connections.length; i++) {
|
||||||
|
let obj = this._connections[i];
|
||||||
|
if (obj.uuid == uuid)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
},
|
||||||
|
|
||||||
|
_connectionSortFunction: function(one, two) {
|
||||||
|
if (one.timestamp == two.timestamp)
|
||||||
|
return GLib.utf8_collate(one.name, two.name);
|
||||||
|
|
||||||
|
return two.timestamp - one.timestamp;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
Signals.addSignalMethods(NMConnectionBased.prototype);
|
||||||
|
|
||||||
|
const NMDevice = new Lang.Class({
|
||||||
|
Name: 'NMDevice',
|
||||||
|
Abstract: true,
|
||||||
|
Extends: NMConnectionBased,
|
||||||
|
|
||||||
|
_init: function(client, device, connections) {
|
||||||
|
this.device = device;
|
||||||
|
this.device._delegate = this;
|
||||||
|
this._stateChangedId = this.device.connect('state-changed', Lang.bind(this, this._deviceStateChanged));
|
||||||
|
|
||||||
|
// protected
|
||||||
|
this._client = client;
|
||||||
|
this.parent(connections);
|
||||||
this._activeConnection = null;
|
this._activeConnection = null;
|
||||||
this._activeConnectionItem = null;
|
this._activeConnectionItem = null;
|
||||||
this._autoConnectionItem = null;
|
this._autoConnectionItem = null;
|
||||||
this._overflowItem = null;
|
this._overflowItem = null;
|
||||||
|
|
||||||
if (this.device) {
|
this.statusItem = new PopupMenu.PopupSwitchMenuItem(this._getDescription(), this.connected, { style_class: 'popup-subtitle-menu-item' });
|
||||||
this.statusItem = new PopupMenu.PopupSwitchMenuItem(this._getDescription(), this.connected, { style_class: 'popup-subtitle-menu-item' });
|
this._statusChanged = this.statusItem.connect('toggled', Lang.bind(this, function(item, state) {
|
||||||
this._statusChanged = this.statusItem.connect('toggled', Lang.bind(this, function(item, state) {
|
let ok;
|
||||||
let ok;
|
if (state)
|
||||||
if (state)
|
ok = this.activate();
|
||||||
ok = this.activate();
|
else
|
||||||
else
|
ok = this.deactivate();
|
||||||
ok = this.deactivate();
|
|
||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
item.setToggleState(!state);
|
item.setToggleState(!state);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._updateStatusItem();
|
this._updateStatusItem();
|
||||||
}
|
|
||||||
this.section = new PopupMenu.PopupMenuSection();
|
this.section = new PopupMenu.PopupMenuSection();
|
||||||
|
|
||||||
this._deferredWorkId = Main.initializeDeferredWork(this.section.actor, Lang.bind(this, this._createSection));
|
this._deferredWorkId = Main.initializeDeferredWork(this.section.actor, Lang.bind(this, this._createSection));
|
||||||
@@ -352,6 +432,10 @@ const NMDevice = new Lang.Class({
|
|||||||
return this.device.state == NetworkManager.DeviceState.ACTIVATED;
|
return this.device.state == NetworkManager.DeviceState.ACTIVATED;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearActiveConnection: function(activeConnection) {
|
||||||
|
this.setActiveConnection(null);
|
||||||
|
},
|
||||||
|
|
||||||
setActiveConnection: function(activeConnection) {
|
setActiveConnection: function(activeConnection) {
|
||||||
if (activeConnection == this._activeConnection)
|
if (activeConnection == this._activeConnection)
|
||||||
// nothing to do
|
// nothing to do
|
||||||
@@ -369,80 +453,13 @@ const NMDevice = new Lang.Class({
|
|||||||
this._queueCreateSection();
|
this._queueCreateSection();
|
||||||
},
|
},
|
||||||
|
|
||||||
checkConnection: function(connection) {
|
|
||||||
let pos = this._findConnection(connection.get_uuid());
|
|
||||||
let exists = pos != -1;
|
|
||||||
let valid = this.connectionValid(connection);
|
|
||||||
let similar = false;
|
|
||||||
if (exists) {
|
|
||||||
let existing = this._connections[pos];
|
|
||||||
|
|
||||||
// Check if connection changed name or id
|
|
||||||
similar = existing.name == connection.get_id() &&
|
|
||||||
existing.timestamp == connection._timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exists && valid && similar) {
|
|
||||||
// Nothing to do
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (exists)
|
|
||||||
this.removeConnection(connection);
|
|
||||||
if (valid)
|
|
||||||
this.addConnection(connection);
|
|
||||||
},
|
|
||||||
|
|
||||||
addConnection: function(connection) {
|
|
||||||
// record the connection
|
|
||||||
let obj = {
|
|
||||||
connection: connection,
|
|
||||||
name: connection.get_id(),
|
|
||||||
uuid: connection.get_uuid(),
|
|
||||||
timestamp: connection._timestamp,
|
|
||||||
item: null,
|
|
||||||
};
|
|
||||||
Util.insertSorted(this._connections, obj, this._connectionSortFunction);
|
|
||||||
|
|
||||||
this._clearSection();
|
|
||||||
this._queueCreateSection();
|
|
||||||
},
|
|
||||||
|
|
||||||
removeConnection: function(connection) {
|
|
||||||
let pos = this._findConnection(connection.get_uuid());
|
|
||||||
if (pos == -1) {
|
|
||||||
// this connection was never added, nothing to do here
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let obj = this._connections[pos];
|
|
||||||
if (obj.item)
|
|
||||||
obj.item.destroy();
|
|
||||||
this._connections.splice(pos, 1);
|
|
||||||
|
|
||||||
if (this._connections.length <= 1) {
|
|
||||||
// We need to show the automatic connection again
|
|
||||||
// (or in the case of NMDeviceWired, we want to hide
|
|
||||||
// the only explicit connection)
|
|
||||||
this._clearSection();
|
|
||||||
this._queueCreateSection();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
connectionValid: function(connection) {
|
connectionValid: function(connection) {
|
||||||
return this.device.connection_valid(connection);
|
return this.device.connection_valid(connection);
|
||||||
},
|
},
|
||||||
|
|
||||||
_connectionSortFunction: function(one, two) {
|
|
||||||
if (one.timestamp == two.timestamp)
|
|
||||||
return GLib.utf8_collate(one.name, two.name);
|
|
||||||
|
|
||||||
return two.timestamp - one.timestamp;
|
|
||||||
},
|
|
||||||
|
|
||||||
setEnabled: function(enabled) {
|
setEnabled: function(enabled) {
|
||||||
// do nothing by default, we want to keep the conneciton list visible
|
// do nothing by default, we want to keep the conneciton list visible
|
||||||
// in the majority of cases (wired, wwan, vpn)
|
// in the majority of cases (wired, wwan)
|
||||||
},
|
},
|
||||||
|
|
||||||
getStatusLabel: function() {
|
getStatusLabel: function() {
|
||||||
@@ -500,15 +517,6 @@ const NMDevice = new Lang.Class({
|
|||||||
throw new TypeError('Invoking pure virtual function NMDevice.createAutomaticConnection');
|
throw new TypeError('Invoking pure virtual function NMDevice.createAutomaticConnection');
|
||||||
},
|
},
|
||||||
|
|
||||||
_findConnection: function(uuid) {
|
|
||||||
for (let i = 0; i < this._connections.length; i++) {
|
|
||||||
let obj = this._connections[i];
|
|
||||||
if (obj.uuid == uuid)
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
_queueCreateSection: function() {
|
_queueCreateSection: function() {
|
||||||
this._clearSection();
|
this._clearSection();
|
||||||
Main.queueDeferredWork(this._deferredWorkId);
|
Main.queueDeferredWork(this._deferredWorkId);
|
||||||
@@ -601,7 +609,11 @@ const NMDevice = new Lang.Class({
|
|||||||
this.emit('network-lost');
|
this.emit('network-lost');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newstate == NetworkManager.DeviceState.FAILED) {
|
/* Emit a notification if activation fails, but don't do it
|
||||||
|
if the reason is no secrets, as that indicates the user
|
||||||
|
cancelled the agent dialog */
|
||||||
|
if (newstate == NetworkManager.DeviceState.FAILED &&
|
||||||
|
reason != NetworkManager.DeviceStateReason.NO_SECRETS) {
|
||||||
this.emit('activation-failed', reason);
|
this.emit('activation-failed', reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -652,15 +664,12 @@ const NMDevice = new Lang.Class({
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(NMDevice.prototype);
|
|
||||||
|
|
||||||
|
const NMDeviceSimple = new Lang.Class({
|
||||||
const NMDeviceWired = new Lang.Class({
|
Name: 'NMDeviceSimple',
|
||||||
Name: 'NMDeviceWired',
|
|
||||||
Extends: NMDevice,
|
Extends: NMDevice,
|
||||||
|
|
||||||
_init: function(client, device, connections) {
|
_init: function(client, device, connections) {
|
||||||
this._autoConnectionName = _("Auto Ethernet");
|
|
||||||
this.category = NMConnectionCategory.WIRED;
|
this.category = NMConnectionCategory.WIRED;
|
||||||
|
|
||||||
this.parent(client, device, connections);
|
this.parent(client, device, connections);
|
||||||
@@ -675,6 +684,18 @@ const NMDeviceWired = new Lang.Class({
|
|||||||
// we can do it here because addConnection and removeConnection
|
// we can do it here because addConnection and removeConnection
|
||||||
// both call _createSection at some point
|
// both call _createSection at some point
|
||||||
this.section.actor.visible = this._connections.length > 1;
|
this.section.actor.visible = this._connections.length > 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const NMDeviceWired = new Lang.Class({
|
||||||
|
Name: 'NMDeviceWired',
|
||||||
|
Extends: NMDeviceSimple,
|
||||||
|
|
||||||
|
_init: function(client, device, connections) {
|
||||||
|
this._autoConnectionName = _("Auto Ethernet");
|
||||||
|
this.category = NMConnectionCategory.WIRED;
|
||||||
|
|
||||||
|
this.parent(client, device, connections);
|
||||||
},
|
},
|
||||||
|
|
||||||
_createAutomaticConnection: function() {
|
_createAutomaticConnection: function() {
|
||||||
@@ -868,95 +889,6 @@ const NMDeviceBluetooth = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Not a real device, but I save a lot code this way
|
|
||||||
const NMDeviceVPN = new Lang.Class({
|
|
||||||
Name: 'NMDeviceVPN',
|
|
||||||
Extends: NMDevice,
|
|
||||||
|
|
||||||
_init: function(client, device, connections) {
|
|
||||||
// Disable autoconnections
|
|
||||||
this._autoConnectionName = null;
|
|
||||||
this.category = NMConnectionCategory.VPN;
|
|
||||||
|
|
||||||
this.parent(client, null, connections);
|
|
||||||
},
|
|
||||||
|
|
||||||
connectionValid: function(connection) {
|
|
||||||
return connection._type == NetworkManager.SETTING_VPN_SETTING_NAME;
|
|
||||||
},
|
|
||||||
|
|
||||||
get empty() {
|
|
||||||
return this._connections.length == 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
get connected() {
|
|
||||||
if (!this._activeConnection)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return this._activeConnection.vpn_state == NetworkManager.VPNConnectionState.ACTIVATED;
|
|
||||||
},
|
|
||||||
|
|
||||||
setActiveConnection: function(activeConnection) {
|
|
||||||
if (this._stateChangeId)
|
|
||||||
this._activeConnection.disconnect(this._stateChangeId);
|
|
||||||
this._stateChangeId = 0;
|
|
||||||
|
|
||||||
this.parent(activeConnection);
|
|
||||||
|
|
||||||
if (this._activeConnection)
|
|
||||||
this._stateChangeId = this._activeConnection.connect('vpn-state-changed',
|
|
||||||
Lang.bind(this, this._connectionStateChanged));
|
|
||||||
|
|
||||||
this.emit('state-changed');
|
|
||||||
},
|
|
||||||
|
|
||||||
_shouldShowConnectionList: function() {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
deactivate: function() {
|
|
||||||
if (this._activeConnection)
|
|
||||||
this._client.deactivate_connection(this._activeConnection);
|
|
||||||
},
|
|
||||||
|
|
||||||
getStatusLabel: function() {
|
|
||||||
if (!this._activeConnection) // Same as DISCONNECTED
|
|
||||||
return null;
|
|
||||||
|
|
||||||
switch(this._activeConnection.vpn_state) {
|
|
||||||
case NetworkManager.VPNConnectionState.DISCONNECTED:
|
|
||||||
case NetworkManager.VPNConnectionState.ACTIVATED:
|
|
||||||
return null;
|
|
||||||
case NetworkManager.VPNConnectionState.PREPARE:
|
|
||||||
case NetworkManager.VPNConnectionState.CONNECT:
|
|
||||||
case NetworkManager.VPNConnectionState.IP_CONFIG_GET:
|
|
||||||
return _("connecting...");
|
|
||||||
case NetworkManager.VPNConnectionState.NEED_AUTH:
|
|
||||||
/* Translators: this is for network connections that require some kind of key or password */
|
|
||||||
return _("authentication required");
|
|
||||||
case NetworkManager.VPNConnectionState.FAILED:
|
|
||||||
return _("connection failed");
|
|
||||||
default:
|
|
||||||
log('VPN connection state invalid, is %d'.format(this.device.state));
|
|
||||||
return 'invalid';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_connectionStateChanged: function(connection, newstate, reason) {
|
|
||||||
if (newstate == NetworkManager.VPNConnectionState.FAILED) {
|
|
||||||
// FIXME: if we ever want to show something based on reason,
|
|
||||||
// we need to convert from NetworkManager.VPNConnectionStateReason
|
|
||||||
// to NetworkManager.DeviceStateReason
|
|
||||||
this.emit('activation-failed', reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Differently from real NMDevices, there is no need to queue
|
|
||||||
// an update of the menu section, contents wouldn't change anyway
|
|
||||||
this.emit('state-changed');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const NMDeviceWireless = new Lang.Class({
|
const NMDeviceWireless = new Lang.Class({
|
||||||
Name: 'NMDeviceWireless',
|
Name: 'NMDeviceWireless',
|
||||||
Extends: NMDevice,
|
Extends: NMDevice,
|
||||||
@@ -1557,6 +1489,152 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const NMVPNSection = new Lang.Class({
|
||||||
|
Name: 'NMVPNSection',
|
||||||
|
Extends: NMConnectionBased,
|
||||||
|
category: NMConnectionCategory.VPN,
|
||||||
|
|
||||||
|
_init: function(client, connections) {
|
||||||
|
this.parent(connections);
|
||||||
|
this._client = client;
|
||||||
|
|
||||||
|
this.section = new PopupMenu.PopupMenuSection();
|
||||||
|
this._deferredWorkId = Main.initializeDeferredWork(this.section.actor, Lang.bind(this, this._createSection));
|
||||||
|
},
|
||||||
|
|
||||||
|
get empty() {
|
||||||
|
return this._connections.length == 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
connectionValid: function(connection) {
|
||||||
|
// filtering is done by NMApplet code
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
getStatusLabel: function(activeConnection) {
|
||||||
|
switch(activeConnection.vpn_state) {
|
||||||
|
case NetworkManager.VPNConnectionState.DISCONNECTED:
|
||||||
|
case NetworkManager.VPNConnectionState.ACTIVATED:
|
||||||
|
return null;
|
||||||
|
case NetworkManager.VPNConnectionState.PREPARE:
|
||||||
|
case NetworkManager.VPNConnectionState.CONNECT:
|
||||||
|
case NetworkManager.VPNConnectionState.IP_CONFIG_GET:
|
||||||
|
return _("connecting...");
|
||||||
|
case NetworkManager.VPNConnectionState.NEED_AUTH:
|
||||||
|
/* Translators: this is for network connections that require some kind of key or password */
|
||||||
|
return _("authentication required");
|
||||||
|
case NetworkManager.VPNConnectionState.FAILED:
|
||||||
|
return _("connection failed");
|
||||||
|
default:
|
||||||
|
log('VPN connection state invalid, is %d'.format(this.device.state));
|
||||||
|
return 'invalid';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
clearActiveConnection: function(activeConnection) {
|
||||||
|
let pos = this._findConnection(activeConnection.uuid);
|
||||||
|
if (pos < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let obj = this._connections[pos];
|
||||||
|
obj.active.disconnect(obj.stateChangedId);
|
||||||
|
obj.active = null;
|
||||||
|
|
||||||
|
if (obj.item) {
|
||||||
|
obj.item.setToggleState(false);
|
||||||
|
obj.item.setStatus(null);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setActiveConnection: function(activeConnection) {
|
||||||
|
let pos = this._findConnection(activeConnection.uuid);
|
||||||
|
if (pos < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let obj = this._connections[pos];
|
||||||
|
obj.active = activeConnection;
|
||||||
|
obj.stateChangedId = obj.active.connect('vpn-state-changed',
|
||||||
|
Lang.bind(this, this._connectionStateChanged));
|
||||||
|
|
||||||
|
if (obj.item) {
|
||||||
|
obj.item.setToggleState(obj.active.vpn_state ==
|
||||||
|
NetworkManager.VPNConnectionState.ACTIVATED);
|
||||||
|
obj.item.setStatus(this.getStatusLabel(obj.active));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_queueCreateSection: function() {
|
||||||
|
this.section.removeAll();
|
||||||
|
Main.queueDeferredWork(this._deferredWorkId);
|
||||||
|
},
|
||||||
|
|
||||||
|
_createConnectionItem: function(obj) {
|
||||||
|
let menuItem = new PopupMenu.PopupSwitchMenuItem(obj.name, false,
|
||||||
|
{ style_class: 'popup-subtitle-menu-item' });
|
||||||
|
menuItem.connect('toggled', Lang.bind(this, function(menuItem) {
|
||||||
|
if (menuItem.state) {
|
||||||
|
this._client.activate_connection(obj.connection, null, null, null);
|
||||||
|
// Immediately go back to disconnected, until NM tells us to change
|
||||||
|
menuItem.setToggleState(false);
|
||||||
|
} else if (obj.active) {
|
||||||
|
this._client.deactivate_connection(obj.active);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (obj.active) {
|
||||||
|
menuItem.setToggleState(obj.active.vpn_state ==
|
||||||
|
NetworkManager.VPNConnectionState.ACTIVATED);
|
||||||
|
menuItem.setStatus(this.getStatusLabel(obj.active));
|
||||||
|
}
|
||||||
|
|
||||||
|
return menuItem;
|
||||||
|
},
|
||||||
|
|
||||||
|
_createSection: function() {
|
||||||
|
if (this._connections.length > 0) {
|
||||||
|
this.section.actor.show();
|
||||||
|
|
||||||
|
for(let j = 0; j < this._connections.length; ++j) {
|
||||||
|
let obj = this._connections[j];
|
||||||
|
obj.item = this._createConnectionItem(obj);
|
||||||
|
|
||||||
|
if (j >= NUM_VISIBLE_NETWORKS) {
|
||||||
|
if (!this._overflowItem) {
|
||||||
|
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More..."));
|
||||||
|
this.section.addMenuItem(this._overflowItem);
|
||||||
|
}
|
||||||
|
this._overflowItem.menu.addMenuItem(obj.item);
|
||||||
|
} else
|
||||||
|
this.section.addMenuItem(obj.item);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.section.actor.hide()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_connectionStateChanged: function(vpnConnection, newstate, reason) {
|
||||||
|
if (newstate == NetworkManager.VPNConnectionState.FAILED &&
|
||||||
|
reason != NetworkManager.VPNConnectionStateReason.NO_SECRETS) {
|
||||||
|
// FIXME: if we ever want to show something based on reason,
|
||||||
|
// we need to convert from NetworkManager.VPNConnectionStateReason
|
||||||
|
// to NetworkManager.DeviceStateReason
|
||||||
|
this.emit('activation-failed', reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
let pos = this._findConnection(vpnConnection.uuid);
|
||||||
|
if (pos >= 0) {
|
||||||
|
let obj = this._connections[pos];
|
||||||
|
if (obj.item) {
|
||||||
|
obj.item.setToggleState(vpnConnection.vpn_state ==
|
||||||
|
NetworkManager.VPNConnectionState.ACTIVATED);
|
||||||
|
obj.item.setStatus(this.getStatusLabel(vpnConnection));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log('Could not find connection for vpn-state-changed handler');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const NMApplet = new Lang.Class({
|
const NMApplet = new Lang.Class({
|
||||||
Name: 'NMApplet',
|
Name: 'NMApplet',
|
||||||
Extends: PanelMenu.SystemStatusButton,
|
Extends: PanelMenu.SystemStatusButton,
|
||||||
@@ -1622,15 +1700,9 @@ const NMApplet = new Lang.Class({
|
|||||||
this.menu.addMenuItem(this._devices.wwan.section);
|
this.menu.addMenuItem(this._devices.wwan.section);
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
|
|
||||||
this._devices.vpn = {
|
this._vpnSection = new NMVPNSection(this._client, this._connections);
|
||||||
section: new PopupMenu.PopupMenuSection(),
|
this._vpnSection.connect('activation-failed', Lang.bind(this, this._onActivationFailed));
|
||||||
device: this._makeWrapperDevice(NMDeviceVPN, null),
|
this.menu.addMenuItem(this._vpnSection.section);
|
||||||
item: new NMWiredSectionTitleMenuItem(_("VPN Connections"))
|
|
||||||
};
|
|
||||||
this._devices.vpn.section.addMenuItem(this._devices.vpn.item);
|
|
||||||
this._devices.vpn.section.addMenuItem(this._devices.vpn.device.section);
|
|
||||||
this._devices.vpn.section.actor.hide();
|
|
||||||
this.menu.addMenuItem(this._devices.vpn.section);
|
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this.menu.addSettingsAction(_("Network Settings"), 'gnome-network-panel.desktop');
|
this.menu.addSettingsAction(_("Network Settings"), 'gnome-network-panel.desktop');
|
||||||
|
|
||||||
@@ -1640,6 +1712,7 @@ const NMApplet = new Lang.Class({
|
|||||||
this._dtypes[NetworkManager.DeviceType.WIFI] = NMDeviceWireless;
|
this._dtypes[NetworkManager.DeviceType.WIFI] = NMDeviceWireless;
|
||||||
this._dtypes[NetworkManager.DeviceType.MODEM] = NMDeviceModem;
|
this._dtypes[NetworkManager.DeviceType.MODEM] = NMDeviceModem;
|
||||||
this._dtypes[NetworkManager.DeviceType.BT] = NMDeviceBluetooth;
|
this._dtypes[NetworkManager.DeviceType.BT] = NMDeviceBluetooth;
|
||||||
|
this._dtypes[NetworkManager.DeviceType.INFINIBAND] = NMDeviceSimple;
|
||||||
// TODO: WiMax support
|
// TODO: WiMax support
|
||||||
|
|
||||||
// Connection types
|
// Connection types
|
||||||
@@ -1651,6 +1724,7 @@ const NMApplet = new Lang.Class({
|
|||||||
this._ctypes[NetworkManager.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.WWAN;
|
this._ctypes[NetworkManager.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.WWAN;
|
||||||
this._ctypes[NetworkManager.SETTING_CDMA_SETTING_NAME] = NMConnectionCategory.WWAN;
|
this._ctypes[NetworkManager.SETTING_CDMA_SETTING_NAME] = NMConnectionCategory.WWAN;
|
||||||
this._ctypes[NetworkManager.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN;
|
this._ctypes[NetworkManager.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN;
|
||||||
|
this._ctypes[NetworkManager.SETTING_INFINIBAND_SETTING_NAME] = NMConnectionCategory.WIRED;
|
||||||
this._ctypes[NetworkManager.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
|
this._ctypes[NetworkManager.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
|
||||||
|
|
||||||
this._settings = NMClient.RemoteSettings.new(null);
|
this._settings = NMClient.RemoteSettings.new(null);
|
||||||
@@ -1699,18 +1773,6 @@ const NMApplet = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_syncSectionTitle: function(category) {
|
_syncSectionTitle: function(category) {
|
||||||
if (category == NMConnectionCategory.VPN) {
|
|
||||||
// Special case VPN: it's only one device (and a fake one
|
|
||||||
// actually), and we don't show it if empty
|
|
||||||
let device = this._devices.vpn.device;
|
|
||||||
let section = this._devices.vpn.section;
|
|
||||||
let item = this._devices.vpn.item;
|
|
||||||
|
|
||||||
section.actor.visible = !device.empty;
|
|
||||||
item.updateForDevice(device);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let devices = this._devices[category].devices;
|
let devices = this._devices[category].devices;
|
||||||
let item = this._devices[category].item;
|
let item = this._devices[category].item;
|
||||||
let section = this._devices[category].section;
|
let section = this._devices[category].section;
|
||||||
@@ -1747,10 +1809,9 @@ const NMApplet = new Lang.Class({
|
|||||||
or this._source will be cleared */
|
or this._source will be cleared */
|
||||||
this._ensureSource();
|
this._ensureSource();
|
||||||
|
|
||||||
let icon = new St.Icon({ icon_name: iconName,
|
let gicon = new Gio.ThemedIcon({ name: iconName });
|
||||||
icon_size: MessageTray.NOTIFICATION_ICON_SIZE });
|
|
||||||
device._notification = new MessageTray.Notification(this._source, title, text,
|
device._notification = new MessageTray.Notification(this._source, title, text,
|
||||||
{ icon: icon });
|
{ gicon: gicon });
|
||||||
device._notification.setUrgency(urgency);
|
device._notification.setUrgency(urgency);
|
||||||
device._notification.setTransient(true);
|
device._notification.setTransient(true);
|
||||||
device._notification.connect('destroy', function() {
|
device._notification.connect('destroy', function() {
|
||||||
@@ -1759,17 +1820,20 @@ const NMApplet = new Lang.Class({
|
|||||||
this._source.notify(device._notification);
|
this._source.notify(device._notification);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onActivationFailed: function(device, reason) {
|
||||||
|
// XXX: nm-applet has no special text depending on reason
|
||||||
|
// but I'm not sure of this generic message
|
||||||
|
this._notifyForDevice(device, 'network-error-symbolic',
|
||||||
|
_("Connection failed"),
|
||||||
|
_("Activation of network connection failed"),
|
||||||
|
MessageTray.Urgency.HIGH);
|
||||||
|
},
|
||||||
|
|
||||||
_makeWrapperDevice: function(wrapperClass, device) {
|
_makeWrapperDevice: function(wrapperClass, device) {
|
||||||
let wrapper = new wrapperClass(this._client, device, this._connections);
|
let wrapper = new wrapperClass(this._client, device, this._connections);
|
||||||
|
|
||||||
wrapper._activationFailedId = wrapper.connect('activation-failed', Lang.bind(this, function(device, reason) {
|
wrapper._activationFailedId = wrapper.connect('activation-failed',
|
||||||
// XXX: nm-applet has no special text depending on reason
|
Lang.bind(this, this._onActivationFailed));
|
||||||
// but I'm not sure of this generic message
|
|
||||||
this._notifyForDevice(device, 'network-error-symbolic',
|
|
||||||
_("Connection failed"),
|
|
||||||
_("Activation of network connection failed"),
|
|
||||||
MessageTray.Urgency.HIGH);
|
|
||||||
}));
|
|
||||||
wrapper._deviceStateChangedId = wrapper.connect('state-changed', Lang.bind(this, function(dev) {
|
wrapper._deviceStateChangedId = wrapper.connect('state-changed', Lang.bind(this, function(dev) {
|
||||||
this._syncSectionTitle(dev.category);
|
this._syncSectionTitle(dev.category);
|
||||||
}));
|
}));
|
||||||
@@ -1852,7 +1916,7 @@ const NMApplet = new Lang.Class({
|
|||||||
for (let i = 0; i < closedConnections.length; i++) {
|
for (let i = 0; i < closedConnections.length; i++) {
|
||||||
let active = closedConnections[i];
|
let active = closedConnections[i];
|
||||||
if (active._primaryDevice) {
|
if (active._primaryDevice) {
|
||||||
active._primaryDevice.setActiveConnection(null);
|
active._primaryDevice.clearActiveConnection(active);
|
||||||
active._primaryDevice = null;
|
active._primaryDevice = null;
|
||||||
}
|
}
|
||||||
if (active._inited) {
|
if (active._inited) {
|
||||||
@@ -1919,7 +1983,7 @@ const NMApplet = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
a._primaryDevice = this._devices.vpn.device
|
a._primaryDevice = this._vpnSection;
|
||||||
|
|
||||||
if (a._primaryDevice)
|
if (a._primaryDevice)
|
||||||
a._primaryDevice.setActiveConnection(a);
|
a._primaryDevice.setActiveConnection(a);
|
||||||
@@ -2001,8 +2065,7 @@ const NMApplet = new Lang.Class({
|
|||||||
let section = connection._section;
|
let section = connection._section;
|
||||||
|
|
||||||
if (section == NMConnectionCategory.VPN) {
|
if (section == NMConnectionCategory.VPN) {
|
||||||
this._devices.vpn.device.removeConnection(connection);
|
this._vpnSection.removeConnection(connection);
|
||||||
this._syncSectionTitle(section);
|
|
||||||
} else if (section != NMConnectionCategory.INVALID) {
|
} else if (section != NMConnectionCategory.INVALID) {
|
||||||
let devices = this._devices[section].devices;
|
let devices = this._devices[section].devices;
|
||||||
for (let i = 0; i < devices.length; i++)
|
for (let i = 0; i < devices.length; i++)
|
||||||
@@ -2025,8 +2088,7 @@ const NMApplet = new Lang.Class({
|
|||||||
if (section == NMConnectionCategory.INVALID)
|
if (section == NMConnectionCategory.INVALID)
|
||||||
return;
|
return;
|
||||||
if (section == NMConnectionCategory.VPN) {
|
if (section == NMConnectionCategory.VPN) {
|
||||||
this._devices.vpn.device.checkConnection(connection);
|
this._vpnSection.checkConnection(connection);
|
||||||
this._syncSectionTitle(section);
|
|
||||||
} else {
|
} else {
|
||||||
let devices = this._devices[section].devices;
|
let devices = this._devices[section].devices;
|
||||||
for (let i = 0; i < devices.length; i++) {
|
for (let i = 0; i < devices.length; i++) {
|
||||||
@@ -2052,7 +2114,6 @@ const NMApplet = new Lang.Class({
|
|||||||
this._syncSectionTitle(NMConnectionCategory.WIRED);
|
this._syncSectionTitle(NMConnectionCategory.WIRED);
|
||||||
this._syncSectionTitle(NMConnectionCategory.WIRELESS);
|
this._syncSectionTitle(NMConnectionCategory.WIRELESS);
|
||||||
this._syncSectionTitle(NMConnectionCategory.WWAN);
|
this._syncSectionTitle(NMConnectionCategory.WWAN);
|
||||||
this._syncSectionTitle(NMConnectionCategory.VPN);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_syncNMState: function() {
|
_syncNMState: function() {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ const Indicator = new Lang.Class({
|
|||||||
let minutes = time % 60;
|
let minutes = time % 60;
|
||||||
let hours = Math.floor(time / 60);
|
let hours = Math.floor(time / 60);
|
||||||
let timestring;
|
let timestring;
|
||||||
if (time > 60) {
|
if (time >= 60) {
|
||||||
if (minutes == 0) {
|
if (minutes == 0) {
|
||||||
timestring = ngettext("%d hour remaining", "%d hours remaining", hours).format(hours);
|
timestring = ngettext("%d hour remaining", "%d hours remaining", hours).format(hours);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const Gvc = imports.gi.Gvc;
|
const Gvc = imports.gi.Gvc;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
@@ -32,6 +33,8 @@ const VolumeMenu = new Lang.Class({
|
|||||||
_init: function(control) {
|
_init: function(control) {
|
||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
|
this.hasHeadphones = false;
|
||||||
|
|
||||||
this._control = control;
|
this._control = control;
|
||||||
this._control.connect('state-changed', Lang.bind(this, this._onControlStateChanged));
|
this._control.connect('state-changed', Lang.bind(this, this._onControlStateChanged));
|
||||||
this._control.connect('default-sink-changed', Lang.bind(this, this._readOutput));
|
this._control.connect('default-sink-changed', Lang.bind(this, this._readOutput));
|
||||||
@@ -63,10 +66,7 @@ const VolumeMenu = new Lang.Class({
|
|||||||
this.addMenuItem(this._inputTitle);
|
this.addMenuItem(this._inputTitle);
|
||||||
this.addMenuItem(this._inputSlider);
|
this.addMenuItem(this._inputSlider);
|
||||||
|
|
||||||
if (this._control.get_state() == Gvc.MixerControlState.READY) {
|
this._onControlStateChanged();
|
||||||
this._readOutput();
|
|
||||||
this._readInput();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
scroll: function(direction) {
|
scroll: function(direction) {
|
||||||
@@ -95,25 +95,53 @@ const VolumeMenu = new Lang.Class({
|
|||||||
if (this._control.get_state() == Gvc.MixerControlState.READY) {
|
if (this._control.get_state() == Gvc.MixerControlState.READY) {
|
||||||
this._readOutput();
|
this._readOutput();
|
||||||
this._readInput();
|
this._readInput();
|
||||||
|
this._maybeShowInput();
|
||||||
} else {
|
} else {
|
||||||
this.emit('icon-changed', null);
|
this.emit('icon-changed', null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_findHeadphones: function(sink) {
|
||||||
|
// This only works for external headphones (e.g. bluetooth)
|
||||||
|
if (sink.get_form_factor() == 'headset' ||
|
||||||
|
sink.get_form_factor() == 'headphone')
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// a bit hackish, but ALSA/PulseAudio have a number
|
||||||
|
// of different identifiers for headphones, and I could
|
||||||
|
// not find the complete list
|
||||||
|
let port = sink.get_port();
|
||||||
|
if (port)
|
||||||
|
return port.port.indexOf('headphone') >= 0;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_portChanged: function() {
|
||||||
|
this.hasHeadphones = this._findHeadphones(this._output);
|
||||||
|
this.emit('headphones-changed');
|
||||||
|
},
|
||||||
|
|
||||||
_readOutput: function() {
|
_readOutput: function() {
|
||||||
if (this._outputVolumeId) {
|
if (this._outputVolumeId) {
|
||||||
this._output.disconnect(this._outputVolumeId);
|
this._output.disconnect(this._outputVolumeId);
|
||||||
this._output.disconnect(this._outputMutedId);
|
this._output.disconnect(this._outputMutedId);
|
||||||
|
this._output.disconnect(this._outputPortId);
|
||||||
this._outputVolumeId = 0;
|
this._outputVolumeId = 0;
|
||||||
this._outputMutedId = 0;
|
this._outputMutedId = 0;
|
||||||
|
this._outputPortId = 0;
|
||||||
}
|
}
|
||||||
this._output = this._control.get_default_sink();
|
this._output = this._control.get_default_sink();
|
||||||
if (this._output) {
|
if (this._output) {
|
||||||
this._outputMutedId = this._output.connect('notify::is-muted', Lang.bind(this, this._mutedChanged, '_output'));
|
this._outputMutedId = this._output.connect('notify::is-muted', Lang.bind(this, this._mutedChanged, '_output'));
|
||||||
this._outputVolumeId = this._output.connect('notify::volume', Lang.bind(this, this._volumeChanged, '_output'));
|
this._outputVolumeId = this._output.connect('notify::volume', Lang.bind(this, this._volumeChanged, '_output'));
|
||||||
this._mutedChanged (null, null, '_output');
|
this._outputPortId = this._output.connect('notify::port', Lang.bind(this, this._portChanged));
|
||||||
this._volumeChanged (null, null, '_output');
|
|
||||||
|
this._mutedChanged(null, null, '_output');
|
||||||
|
this._volumeChanged(null, null, '_output');
|
||||||
|
this._portChanged();
|
||||||
} else {
|
} else {
|
||||||
|
this.hasHeadphones = false;
|
||||||
this._outputSlider.setValue(0);
|
this._outputSlider.setValue(0);
|
||||||
this.emit('icon-changed', 'audio-volume-muted-symbolic');
|
this.emit('icon-changed', 'audio-volume-muted-symbolic');
|
||||||
}
|
}
|
||||||
@@ -229,6 +257,12 @@ const Indicator = new Lang.Class({
|
|||||||
this.setIcon(icon);
|
this.setIcon(icon);
|
||||||
this._syncVisibility();
|
this._syncVisibility();
|
||||||
}));
|
}));
|
||||||
|
this._volumeMenu.connect('headphones-changed', Lang.bind(this, function() {
|
||||||
|
this._syncVisibility();
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._headphoneIcon = this.addIcon(new Gio.ThemedIcon({ name: 'headphones-symbolic' }));
|
||||||
|
this._headphoneIcon.visible = false;
|
||||||
|
|
||||||
this.menu.addMenuItem(this._volumeMenu);
|
this.menu.addMenuItem(this._volumeMenu);
|
||||||
|
|
||||||
@@ -241,6 +275,7 @@ const Indicator = new Lang.Class({
|
|||||||
_syncVisibility: function() {
|
_syncVisibility: function() {
|
||||||
this.actor.visible = this._hasPulseAudio;
|
this.actor.visible = this._hasPulseAudio;
|
||||||
this.mainIcon.visible = this._hasPulseAudio;
|
this.mainIcon.visible = this._hasPulseAudio;
|
||||||
|
this._headphoneIcon.visible = this._hasPulseAudio && this._volumeMenu.hasHeadphones;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onScrollEvent: function(actor, event) {
|
_onScrollEvent: function(actor, event) {
|
||||||
|
|||||||
641
js/ui/switcherPopup.js
Normal file
641
js/ui/switcherPopup.js
Normal file
@@ -0,0 +1,641 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gtk = imports.gi.Gtk;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const Mainloop = imports.mainloop;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
|
const Signals = imports.signals;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
|
const POPUP_DELAY_TIMEOUT = 150; // milliseconds
|
||||||
|
|
||||||
|
const POPUP_SCROLL_TIME = 0.10; // seconds
|
||||||
|
const POPUP_FADE_OUT_TIME = 0.1; // seconds
|
||||||
|
|
||||||
|
const DISABLE_HOVER_TIMEOUT = 500; // milliseconds
|
||||||
|
|
||||||
|
function mod(a, b) {
|
||||||
|
return (a + b) % b;
|
||||||
|
}
|
||||||
|
|
||||||
|
function primaryModifier(mask) {
|
||||||
|
if (mask == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
let primary = 1;
|
||||||
|
while (mask > 1) {
|
||||||
|
mask >>= 1;
|
||||||
|
primary <<= 1;
|
||||||
|
}
|
||||||
|
return primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SwitcherPopup = new Lang.Class({
|
||||||
|
Name: 'SwitcherPopup',
|
||||||
|
Abstract: true,
|
||||||
|
|
||||||
|
_init: function(items) {
|
||||||
|
this._switcherList = null;
|
||||||
|
|
||||||
|
this._items = items || [];
|
||||||
|
this._selectedIndex = 0;
|
||||||
|
|
||||||
|
this.actor = new Shell.GenericContainer({ style_class: 'switcher-popup',
|
||||||
|
reactive: true });
|
||||||
|
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
||||||
|
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||||
|
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
||||||
|
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||||
|
|
||||||
|
Main.uiGroup.add_actor(this.actor);
|
||||||
|
|
||||||
|
this._haveModal = false;
|
||||||
|
this._modifierMask = 0;
|
||||||
|
|
||||||
|
this._motionTimeoutId = 0;
|
||||||
|
this._initialDelayTimeoutId = 0;
|
||||||
|
|
||||||
|
// Initially disable hover so we ignore the enter-event if
|
||||||
|
// the switcher appears underneath the current pointer location
|
||||||
|
this._disableHover();
|
||||||
|
},
|
||||||
|
|
||||||
|
_getPreferredWidth: function(actor, forHeight, alloc) {
|
||||||
|
let primary = Main.layoutManager.primaryMonitor;
|
||||||
|
|
||||||
|
alloc.min_size = primary.width;
|
||||||
|
alloc.natural_size = primary.width;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getPreferredHeight: function(actor, forWidth, alloc) {
|
||||||
|
let primary = Main.layoutManager.primaryMonitor;
|
||||||
|
|
||||||
|
alloc.min_size = primary.height;
|
||||||
|
alloc.natural_size = primary.height;
|
||||||
|
},
|
||||||
|
|
||||||
|
_allocate: function(actor, box, flags) {
|
||||||
|
let childBox = new Clutter.ActorBox();
|
||||||
|
let primary = Main.layoutManager.primaryMonitor;
|
||||||
|
|
||||||
|
let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT);
|
||||||
|
let rightPadding = this.actor.get_theme_node().get_padding(St.Side.RIGHT);
|
||||||
|
let bottomPadding = this.actor.get_theme_node().get_padding(St.Side.BOTTOM);
|
||||||
|
let vPadding = this.actor.get_theme_node().get_vertical_padding();
|
||||||
|
let hPadding = leftPadding + rightPadding;
|
||||||
|
|
||||||
|
// Allocate the switcherList
|
||||||
|
// We select a size based on an icon size that does not overflow the screen
|
||||||
|
let [childMinHeight, childNaturalHeight] = this._switcherList.actor.get_preferred_height(primary.width - hPadding);
|
||||||
|
let [childMinWidth, childNaturalWidth] = this._switcherList.actor.get_preferred_width(childNaturalHeight);
|
||||||
|
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
|
||||||
|
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
|
||||||
|
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
|
||||||
|
childBox.y2 = childBox.y1 + childNaturalHeight;
|
||||||
|
this._switcherList.actor.allocate(childBox, flags);
|
||||||
|
},
|
||||||
|
|
||||||
|
_createSwitcher: function() {
|
||||||
|
throw new Error('Not implemented');
|
||||||
|
},
|
||||||
|
|
||||||
|
_initialSelection: function(backward, binding) {
|
||||||
|
throw new Error('Not implemented');
|
||||||
|
},
|
||||||
|
|
||||||
|
show: function(backward, binding, mask) {
|
||||||
|
if (!this._createSwitcher())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!Main.pushModal(this.actor)) {
|
||||||
|
// Probably someone else has a pointer grab, try again with keyboard only
|
||||||
|
if (!Main.pushModal(this.actor, { options: Meta.ModalOptions.POINTER_ALREADY_GRABBED })) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._haveModal = true;
|
||||||
|
this._modifierMask = primaryModifier(mask);
|
||||||
|
|
||||||
|
this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent));
|
||||||
|
this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent));
|
||||||
|
|
||||||
|
this.actor.connect('button-press-event', Lang.bind(this, this._clickedOutside));
|
||||||
|
this.actor.connect('scroll-event', Lang.bind(this, this._scrollEvent));
|
||||||
|
|
||||||
|
this.actor.add_actor(this._switcherList.actor);
|
||||||
|
this._switcherList.connect('item-activated', Lang.bind(this, this._itemActivated));
|
||||||
|
this._switcherList.connect('item-entered', Lang.bind(this, this._itemEntered));
|
||||||
|
|
||||||
|
// Need to force an allocation so we can figure out whether we
|
||||||
|
// need to scroll when selecting
|
||||||
|
this.actor.opacity = 0;
|
||||||
|
this.actor.show();
|
||||||
|
this.actor.get_allocation_box();
|
||||||
|
|
||||||
|
if (this._items.length > 1)
|
||||||
|
this._selectedIndex = 1;
|
||||||
|
else
|
||||||
|
this._selectedIndex = 0;
|
||||||
|
|
||||||
|
this._initialSelection(backward, binding);
|
||||||
|
|
||||||
|
// There's a race condition; if the user released Alt before
|
||||||
|
// we got the grab, then we won't be notified. (See
|
||||||
|
// https://bugzilla.gnome.org/show_bug.cgi?id=596695 for
|
||||||
|
// details.) So we check now. (Have to do this after updating
|
||||||
|
// selection.)
|
||||||
|
let [x, y, mods] = global.get_pointer();
|
||||||
|
if (!(mods & this._modifierMask)) {
|
||||||
|
this._finish(global.get_current_time());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We delay showing the popup so that fast Alt+Tab users aren't
|
||||||
|
// disturbed by the popup briefly flashing.
|
||||||
|
this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT,
|
||||||
|
Lang.bind(this, function () {
|
||||||
|
this.actor.opacity = 255;
|
||||||
|
this._initialDelayTimeoutId = 0;
|
||||||
|
}));
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_next: function() {
|
||||||
|
return mod(this._selectedIndex + 1, this._items.length);
|
||||||
|
},
|
||||||
|
|
||||||
|
_previous: function() {
|
||||||
|
return mod(this._selectedIndex - 1, this._items.length);
|
||||||
|
},
|
||||||
|
|
||||||
|
_keyPressHandler: function(keysym, backwards, action) {
|
||||||
|
throw new Error('Not implemented');
|
||||||
|
},
|
||||||
|
|
||||||
|
_keyPressEvent: function(actor, event) {
|
||||||
|
let keysym = event.get_key_symbol();
|
||||||
|
let event_state = event.get_state();
|
||||||
|
let backwards = event_state & Clutter.ModifierType.SHIFT_MASK;
|
||||||
|
let action = global.display.get_keybinding_action(event.get_key_code(), event_state);
|
||||||
|
|
||||||
|
this._disableHover();
|
||||||
|
|
||||||
|
if (keysym == Clutter.Escape)
|
||||||
|
this.destroy();
|
||||||
|
else
|
||||||
|
this._keyPressHandler(keysym, backwards, action);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_keyReleaseEvent: function(actor, event) {
|
||||||
|
let [x, y, mods] = global.get_pointer();
|
||||||
|
let state = mods & this._modifierMask;
|
||||||
|
|
||||||
|
if (state == 0)
|
||||||
|
this._finish(event.get_time());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_clickedOutside: function(actor, event) {
|
||||||
|
this.destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
_scrollHandler: function(direction) {
|
||||||
|
if (direction == Clutter.ScrollDirection.UP)
|
||||||
|
this._select(this._previous());
|
||||||
|
else if (direction == Clutter.ScrollDirection.DOWN)
|
||||||
|
this._select(this._next());
|
||||||
|
},
|
||||||
|
|
||||||
|
_scrollEvent: function(actor, event) {
|
||||||
|
this._scrollHandler(event.get_scroll_direction());
|
||||||
|
},
|
||||||
|
|
||||||
|
_itemActivatedHandler: function(n) {
|
||||||
|
this._select(n);
|
||||||
|
},
|
||||||
|
|
||||||
|
_itemActivated: function(switcher, n) {
|
||||||
|
this._itemActivatedHandler(n);
|
||||||
|
this._finish(global.get_current_time());
|
||||||
|
},
|
||||||
|
|
||||||
|
_itemEnteredHandler: function(n) {
|
||||||
|
this._select(n);
|
||||||
|
},
|
||||||
|
|
||||||
|
_itemEntered: function(switcher, n) {
|
||||||
|
if (!this.mouseActive)
|
||||||
|
return;
|
||||||
|
this._itemEnteredHandler(n);
|
||||||
|
},
|
||||||
|
|
||||||
|
_disableHover: function() {
|
||||||
|
this.mouseActive = false;
|
||||||
|
|
||||||
|
if (this._motionTimeoutId != 0)
|
||||||
|
Mainloop.source_remove(this._motionTimeoutId);
|
||||||
|
|
||||||
|
this._motionTimeoutId = Mainloop.timeout_add(DISABLE_HOVER_TIMEOUT, Lang.bind(this, this._mouseTimedOut));
|
||||||
|
},
|
||||||
|
|
||||||
|
_mouseTimedOut: function() {
|
||||||
|
this._motionTimeoutId = 0;
|
||||||
|
this.mouseActive = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_popModal: function() {
|
||||||
|
if (this._haveModal) {
|
||||||
|
Main.popModal(this.actor);
|
||||||
|
this._haveModal = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
this._popModal();
|
||||||
|
if (this.actor.visible) {
|
||||||
|
Tweener.addTween(this.actor,
|
||||||
|
{ opacity: 0,
|
||||||
|
time: POPUP_FADE_OUT_TIME,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
this.actor.destroy();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} else
|
||||||
|
this.actor.destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
_finish: function(timestamp) {
|
||||||
|
this.destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDestroy: function() {
|
||||||
|
this._popModal();
|
||||||
|
|
||||||
|
if (this._motionTimeoutId != 0)
|
||||||
|
Mainloop.source_remove(this._motionTimeoutId);
|
||||||
|
if (this._initialDelayTimeoutId != 0)
|
||||||
|
Mainloop.source_remove(this._initialDelayTimeoutId);
|
||||||
|
},
|
||||||
|
|
||||||
|
_select: function(num) {
|
||||||
|
this._selectedIndex = num;
|
||||||
|
this._switcherList.highlight(num);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const SwitcherList = new Lang.Class({
|
||||||
|
Name: 'SwitcherList',
|
||||||
|
|
||||||
|
_init : function(squareItems) {
|
||||||
|
this.actor = new Shell.GenericContainer({ style_class: 'switcher-list' });
|
||||||
|
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
||||||
|
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||||
|
this.actor.connect('allocate', Lang.bind(this, this._allocateTop));
|
||||||
|
|
||||||
|
// Here we use a GenericContainer so that we can force all the
|
||||||
|
// children except the separator to have the same width.
|
||||||
|
this._list = new Shell.GenericContainer({ style_class: 'switcher-list-item-container' });
|
||||||
|
this._list.spacing = 0;
|
||||||
|
this._list.connect('style-changed', Lang.bind(this, function() {
|
||||||
|
this._list.spacing = this._list.get_theme_node().get_length('spacing');
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._list.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
||||||
|
this._list.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||||
|
this._list.connect('allocate', Lang.bind(this, this._allocate));
|
||||||
|
|
||||||
|
this._scrollView = new St.ScrollView({ style_class: 'hfade',
|
||||||
|
enable_mouse_scrolling: false });
|
||||||
|
this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER);
|
||||||
|
|
||||||
|
let scrollBox = new St.BoxLayout();
|
||||||
|
scrollBox.add_actor(this._list);
|
||||||
|
this._scrollView.add_actor(scrollBox);
|
||||||
|
this.actor.add_actor(this._scrollView);
|
||||||
|
|
||||||
|
// Those arrows indicate whether scrolling in one direction is possible
|
||||||
|
this._leftArrow = new St.DrawingArea({ style_class: 'switcher-arrow',
|
||||||
|
pseudo_class: 'highlighted' });
|
||||||
|
this._leftArrow.connect('repaint', Lang.bind(this,
|
||||||
|
function() { drawArrow(this._leftArrow, St.Side.LEFT); }));
|
||||||
|
this._rightArrow = new St.DrawingArea({ style_class: 'switcher-arrow',
|
||||||
|
pseudo_class: 'highlighted' });
|
||||||
|
this._rightArrow.connect('repaint', Lang.bind(this,
|
||||||
|
function() { drawArrow(this._rightArrow, St.Side.RIGHT); }));
|
||||||
|
|
||||||
|
this.actor.add_actor(this._leftArrow);
|
||||||
|
this.actor.add_actor(this._rightArrow);
|
||||||
|
|
||||||
|
this._items = [];
|
||||||
|
this._highlighted = -1;
|
||||||
|
this._separator = null;
|
||||||
|
this._squareItems = squareItems;
|
||||||
|
this._minSize = 0;
|
||||||
|
this._scrollableRight = true;
|
||||||
|
this._scrollableLeft = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_allocateTop: function(actor, box, flags) {
|
||||||
|
let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT);
|
||||||
|
let rightPadding = this.actor.get_theme_node().get_padding(St.Side.RIGHT);
|
||||||
|
|
||||||
|
let childBox = new Clutter.ActorBox();
|
||||||
|
let scrollable = this._minSize > box.x2 - box.x1;
|
||||||
|
|
||||||
|
box.y1 -= this.actor.get_theme_node().get_padding(St.Side.TOP);
|
||||||
|
box.y2 += this.actor.get_theme_node().get_padding(St.Side.BOTTOM);
|
||||||
|
this._scrollView.allocate(box, flags);
|
||||||
|
|
||||||
|
let arrowWidth = Math.floor(leftPadding / 3);
|
||||||
|
let arrowHeight = arrowWidth * 2;
|
||||||
|
childBox.x1 = leftPadding / 2;
|
||||||
|
childBox.y1 = this.actor.height / 2 - arrowWidth;
|
||||||
|
childBox.x2 = childBox.x1 + arrowWidth;
|
||||||
|
childBox.y2 = childBox.y1 + arrowHeight;
|
||||||
|
this._leftArrow.allocate(childBox, flags);
|
||||||
|
this._leftArrow.opacity = (this._scrollableLeft && scrollable) ? 255 : 0;
|
||||||
|
|
||||||
|
arrowWidth = Math.floor(rightPadding / 3);
|
||||||
|
arrowHeight = arrowWidth * 2;
|
||||||
|
childBox.x1 = this.actor.width - arrowWidth - rightPadding / 2;
|
||||||
|
childBox.y1 = this.actor.height / 2 - arrowWidth;
|
||||||
|
childBox.x2 = childBox.x1 + arrowWidth;
|
||||||
|
childBox.y2 = childBox.y1 + arrowHeight;
|
||||||
|
this._rightArrow.allocate(childBox, flags);
|
||||||
|
this._rightArrow.opacity = (this._scrollableRight && scrollable) ? 255 : 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
addItem : function(item, label) {
|
||||||
|
let bbox = new St.Button({ style_class: 'item-box',
|
||||||
|
reactive: true });
|
||||||
|
|
||||||
|
bbox.set_child(item);
|
||||||
|
this._list.add_actor(bbox);
|
||||||
|
|
||||||
|
let n = this._items.length;
|
||||||
|
bbox.connect('clicked', Lang.bind(this, function() { this._onItemClicked(n); }));
|
||||||
|
bbox.connect('enter-event', Lang.bind(this, function() { this._onItemEnter(n); }));
|
||||||
|
|
||||||
|
bbox.label_actor = label;
|
||||||
|
|
||||||
|
this._items.push(bbox);
|
||||||
|
|
||||||
|
return bbox;
|
||||||
|
},
|
||||||
|
|
||||||
|
_onItemClicked: function (index) {
|
||||||
|
this._itemActivated(index);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onItemEnter: function (index) {
|
||||||
|
this._itemEntered(index);
|
||||||
|
},
|
||||||
|
|
||||||
|
addSeparator: function () {
|
||||||
|
let box = new St.Bin({ style_class: 'separator' });
|
||||||
|
this._separator = box;
|
||||||
|
this._list.add_actor(box);
|
||||||
|
},
|
||||||
|
|
||||||
|
highlight: function(index, justOutline) {
|
||||||
|
if (this._highlighted != -1) {
|
||||||
|
this._items[this._highlighted].remove_style_pseudo_class('outlined');
|
||||||
|
this._items[this._highlighted].remove_style_pseudo_class('selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
this._highlighted = index;
|
||||||
|
|
||||||
|
if (this._highlighted != -1) {
|
||||||
|
if (justOutline)
|
||||||
|
this._items[this._highlighted].add_style_pseudo_class('outlined');
|
||||||
|
else
|
||||||
|
this._items[this._highlighted].add_style_pseudo_class('selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
let adjustment = this._scrollView.hscroll.adjustment;
|
||||||
|
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
|
||||||
|
let [absItemX, absItemY] = this._items[index].get_transformed_position();
|
||||||
|
let [result, posX, posY] = this.actor.transform_stage_point(absItemX, 0);
|
||||||
|
let [containerWidth, containerHeight] = this.actor.get_transformed_size();
|
||||||
|
if (posX + this._items[index].get_width() > containerWidth)
|
||||||
|
this._scrollToRight();
|
||||||
|
else if (this._items[index].allocation.x1 - value < 0)
|
||||||
|
this._scrollToLeft();
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
_scrollToLeft : function() {
|
||||||
|
let adjustment = this._scrollView.hscroll.adjustment;
|
||||||
|
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
|
||||||
|
|
||||||
|
let item = this._items[this._highlighted];
|
||||||
|
|
||||||
|
if (item.allocation.x1 < value)
|
||||||
|
value = Math.min(0, item.allocation.x1);
|
||||||
|
else if (item.allocation.x2 > value + pageSize)
|
||||||
|
value = Math.max(upper, item.allocation.x2 - pageSize);
|
||||||
|
|
||||||
|
this._scrollableRight = true;
|
||||||
|
Tweener.addTween(adjustment,
|
||||||
|
{ value: value,
|
||||||
|
time: POPUP_SCROLL_TIME,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: Lang.bind(this, function () {
|
||||||
|
if (this._highlighted == 0) {
|
||||||
|
this._scrollableLeft = false;
|
||||||
|
this.actor.queue_relayout();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_scrollToRight : function() {
|
||||||
|
let adjustment = this._scrollView.hscroll.adjustment;
|
||||||
|
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
|
||||||
|
|
||||||
|
let item = this._items[this._highlighted];
|
||||||
|
|
||||||
|
if (item.allocation.x1 < value)
|
||||||
|
value = Math.max(0, item.allocation.x1);
|
||||||
|
else if (item.allocation.x2 > value + pageSize)
|
||||||
|
value = Math.min(upper, item.allocation.x2 - pageSize);
|
||||||
|
|
||||||
|
this._scrollableLeft = true;
|
||||||
|
Tweener.addTween(adjustment,
|
||||||
|
{ value: value,
|
||||||
|
time: POPUP_SCROLL_TIME,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: Lang.bind(this, function () {
|
||||||
|
if (this._highlighted == this._items.length - 1) {
|
||||||
|
this._scrollableRight = false;
|
||||||
|
this.actor.queue_relayout();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_itemActivated: function(n) {
|
||||||
|
this.emit('item-activated', n);
|
||||||
|
},
|
||||||
|
|
||||||
|
_itemEntered: function(n) {
|
||||||
|
this.emit('item-entered', n);
|
||||||
|
},
|
||||||
|
|
||||||
|
_maxChildWidth: function (forHeight) {
|
||||||
|
let maxChildMin = 0;
|
||||||
|
let maxChildNat = 0;
|
||||||
|
|
||||||
|
for (let i = 0; i < this._items.length; i++) {
|
||||||
|
let [childMin, childNat] = this._items[i].get_preferred_width(forHeight);
|
||||||
|
maxChildMin = Math.max(childMin, maxChildMin);
|
||||||
|
maxChildNat = Math.max(childNat, maxChildNat);
|
||||||
|
|
||||||
|
if (this._squareItems) {
|
||||||
|
let [childMin, childNat] = this._items[i].get_preferred_height(-1);
|
||||||
|
maxChildMin = Math.max(childMin, maxChildMin);
|
||||||
|
maxChildNat = Math.max(childNat, maxChildNat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return [maxChildMin, maxChildNat];
|
||||||
|
},
|
||||||
|
|
||||||
|
_getPreferredWidth: function (actor, forHeight, alloc) {
|
||||||
|
let [maxChildMin, maxChildNat] = this._maxChildWidth(forHeight);
|
||||||
|
|
||||||
|
let separatorWidth = 0;
|
||||||
|
if (this._separator) {
|
||||||
|
let [sepMin, sepNat] = this._separator.get_preferred_width(forHeight);
|
||||||
|
separatorWidth = sepNat + this._list.spacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
let totalSpacing = this._list.spacing * (this._items.length - 1);
|
||||||
|
alloc.min_size = this._items.length * maxChildMin + separatorWidth + totalSpacing;
|
||||||
|
alloc.natural_size = alloc.min_size;
|
||||||
|
this._minSize = alloc.min_size;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getPreferredHeight: function (actor, forWidth, alloc) {
|
||||||
|
let maxChildMin = 0;
|
||||||
|
let maxChildNat = 0;
|
||||||
|
|
||||||
|
for (let i = 0; i < this._items.length; i++) {
|
||||||
|
let [childMin, childNat] = this._items[i].get_preferred_height(-1);
|
||||||
|
maxChildMin = Math.max(childMin, maxChildMin);
|
||||||
|
maxChildNat = Math.max(childNat, maxChildNat);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._squareItems) {
|
||||||
|
let [childMin, childNat] = this._maxChildWidth(-1);
|
||||||
|
maxChildMin = Math.max(childMin, maxChildMin);
|
||||||
|
maxChildNat = maxChildMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
alloc.min_size = maxChildMin;
|
||||||
|
alloc.natural_size = maxChildNat;
|
||||||
|
},
|
||||||
|
|
||||||
|
_allocate: function (actor, box, flags) {
|
||||||
|
let childHeight = box.y2 - box.y1;
|
||||||
|
|
||||||
|
let [maxChildMin, maxChildNat] = this._maxChildWidth(childHeight);
|
||||||
|
let totalSpacing = this._list.spacing * (this._items.length - 1);
|
||||||
|
|
||||||
|
let separatorWidth = 0;
|
||||||
|
if (this._separator) {
|
||||||
|
let [sepMin, sepNat] = this._separator.get_preferred_width(childHeight);
|
||||||
|
separatorWidth = sepNat;
|
||||||
|
totalSpacing += this._list.spacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
let childWidth = Math.floor(Math.max(0, box.x2 - box.x1 - totalSpacing - separatorWidth) / this._items.length);
|
||||||
|
|
||||||
|
let x = 0;
|
||||||
|
let children = this._list.get_children();
|
||||||
|
let childBox = new Clutter.ActorBox();
|
||||||
|
|
||||||
|
let primary = Main.layoutManager.primaryMonitor;
|
||||||
|
let parentRightPadding = this.actor.get_parent().get_theme_node().get_padding(St.Side.RIGHT);
|
||||||
|
|
||||||
|
for (let i = 0; i < children.length; i++) {
|
||||||
|
if (this._items.indexOf(children[i]) != -1) {
|
||||||
|
let [childMin, childNat] = children[i].get_preferred_height(childWidth);
|
||||||
|
let vSpacing = (childHeight - childNat) / 2;
|
||||||
|
childBox.x1 = x;
|
||||||
|
childBox.y1 = vSpacing;
|
||||||
|
childBox.x2 = x + childWidth;
|
||||||
|
childBox.y2 = childBox.y1 + childNat;
|
||||||
|
children[i].allocate(childBox, flags);
|
||||||
|
|
||||||
|
x += this._list.spacing + childWidth;
|
||||||
|
} else if (children[i] == this._separator) {
|
||||||
|
// We want the separator to be more compact than the rest.
|
||||||
|
childBox.x1 = x;
|
||||||
|
childBox.y1 = 0;
|
||||||
|
childBox.x2 = x + separatorWidth;
|
||||||
|
childBox.y2 = childHeight;
|
||||||
|
children[i].allocate(childBox, flags);
|
||||||
|
x += this._list.spacing + separatorWidth;
|
||||||
|
} else {
|
||||||
|
// Something else, eg, AppSwitcher's arrows;
|
||||||
|
// we don't allocate it.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Signals.addSignalMethods(SwitcherList.prototype);
|
||||||
|
|
||||||
|
function drawArrow(area, side) {
|
||||||
|
let themeNode = area.get_theme_node();
|
||||||
|
let borderColor = themeNode.get_border_color(side);
|
||||||
|
let bodyColor = themeNode.get_foreground_color();
|
||||||
|
|
||||||
|
let [width, height] = area.get_surface_size ();
|
||||||
|
let cr = area.get_context();
|
||||||
|
|
||||||
|
cr.setLineWidth(1.0);
|
||||||
|
Clutter.cairo_set_source_color(cr, borderColor);
|
||||||
|
|
||||||
|
switch (side) {
|
||||||
|
case St.Side.TOP:
|
||||||
|
cr.moveTo(0, height);
|
||||||
|
cr.lineTo(Math.floor(width * 0.5), 0);
|
||||||
|
cr.lineTo(width, height);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case St.Side.BOTTOM:
|
||||||
|
cr.moveTo(width, 0);
|
||||||
|
cr.lineTo(Math.floor(width * 0.5), height);
|
||||||
|
cr.lineTo(0, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case St.Side.LEFT:
|
||||||
|
cr.moveTo(width, height);
|
||||||
|
cr.lineTo(0, Math.floor(height * 0.5));
|
||||||
|
cr.lineTo(width, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case St.Side.RIGHT:
|
||||||
|
cr.moveTo(0, 0);
|
||||||
|
cr.lineTo(width, Math.floor(height * 0.5));
|
||||||
|
cr.lineTo(0, height);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
cr.strokePreserve();
|
||||||
|
|
||||||
|
Clutter.cairo_set_source_color(cr, bodyColor);
|
||||||
|
cr.fill();
|
||||||
|
}
|
||||||
|
|
||||||
@@ -5,6 +5,7 @@ const Clutter = imports.gi.Clutter;
|
|||||||
const Gdm = imports.gi.Gdm;
|
const Gdm = imports.gi.Gdm;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
|
const GnomeDesktop = imports.gi.GnomeDesktop;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
@@ -13,12 +14,14 @@ const St = imports.gi.St;
|
|||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
|
const Panel = imports.ui.panel;
|
||||||
const ShellEntry = imports.ui.shellEntry;
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const UserMenu = imports.ui.userMenu;
|
const UserMenu = imports.ui.userMenu;
|
||||||
|
|
||||||
const Batch = imports.gdm.batch;
|
const Batch = imports.gdm.batch;
|
||||||
const GdmUtil = imports.gdm.util;
|
const GdmUtil = imports.gdm.util;
|
||||||
|
const LoginDialog = imports.gdm.loginDialog;
|
||||||
|
|
||||||
// The timeout before going back automatically to the lock screen (in seconds)
|
// The timeout before going back automatically to the lock screen (in seconds)
|
||||||
const IDLE_TIMEOUT = 2 * 60;
|
const IDLE_TIMEOUT = 2 * 60;
|
||||||
@@ -112,6 +115,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
_init: function(parentActor) {
|
_init: function(parentActor) {
|
||||||
this.parent({ shellReactive: true,
|
this.parent({ shellReactive: true,
|
||||||
styleClass: 'login-dialog',
|
styleClass: 'login-dialog',
|
||||||
|
keybindingMode: Main.KeybindingMode.UNLOCK_SCREEN,
|
||||||
parentActor: parentActor
|
parentActor: parentActor
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -128,6 +132,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion));
|
this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion));
|
||||||
this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));
|
this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));
|
||||||
this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete));
|
this._userVerifier.connect('verification-complete', Lang.bind(this, this._onVerificationComplete));
|
||||||
|
this._userVerifier.connect('verification-failed', Lang.bind(this, this._onVerificationFailed));
|
||||||
this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
|
this._userVerifier.connect('reset', Lang.bind(this, this._onReset));
|
||||||
|
|
||||||
this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
|
this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
|
||||||
@@ -148,7 +153,9 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._promptEntry.clutter_text.set_password_char('\u25cf');
|
this._promptEntry.clutter_text.set_password_char('\u25cf');
|
||||||
ShellEntry.addContextMenu(this._promptEntry, { isPassword: true });
|
ShellEntry.addContextMenu(this._promptEntry, { isPassword: true });
|
||||||
this.setInitialKeyFocus(this._promptEntry);
|
this.setInitialKeyFocus(this._promptEntry);
|
||||||
this._promptEntry.clutter_text.connect('activate', Lang.bind(this, this._doUnlock));
|
this._promptEntry.clutter_text.connect('text-changed', Lang.bind(this, function() {
|
||||||
|
this._updateOkButtonSensitivity(this._promptEntry.text.length > 0);
|
||||||
|
}));
|
||||||
|
|
||||||
this._promptLayout.add(this._promptEntry,
|
this._promptLayout.add(this._promptEntry,
|
||||||
{ expand: true,
|
{ expand: true,
|
||||||
@@ -163,15 +170,33 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._promptLoginHint.hide();
|
this._promptLoginHint.hide();
|
||||||
this.contentLayout.add_actor(this._promptLoginHint);
|
this.contentLayout.add_actor(this._promptLoginHint);
|
||||||
|
|
||||||
let cancelButton = { label: _("Cancel"),
|
this._workSpinner = new Panel.AnimatedIcon('process-working.svg', LoginDialog.WORK_SPINNER_ICON_SIZE);
|
||||||
action: Lang.bind(this, this._escape),
|
this._workSpinner.actor.opacity = 0;
|
||||||
key: Clutter.KEY_Escape };
|
|
||||||
this._okButton = { label: _("Unlock"),
|
|
||||||
action: Lang.bind(this, this._doUnlock),
|
|
||||||
default: true };
|
|
||||||
this.setButtons([cancelButton, this._okButton]);
|
|
||||||
|
|
||||||
this._updateOkButton(true);
|
this.allowCancel = false;
|
||||||
|
this.buttonLayout.visible = true;
|
||||||
|
this.addButton({ label: _("Cancel"),
|
||||||
|
action: Lang.bind(this, this._escape),
|
||||||
|
key: Clutter.KEY_Escape },
|
||||||
|
{ expand: true,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.START,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
|
this.buttonLayout.add(this._workSpinner.actor,
|
||||||
|
{ expand: false,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.END,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
|
this._okButton = this.addButton({ label: _("Unlock"),
|
||||||
|
action: Lang.bind(this, this._doUnlock),
|
||||||
|
default: true },
|
||||||
|
{ expand: false,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.END,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
let otherUserLabel = new St.Label({ text: _("Log in as another user"),
|
let otherUserLabel = new St.Label({ text: _("Log in as another user"),
|
||||||
style_class: 'login-dialog-not-listed-label' });
|
style_class: 'login-dialog-not-listed-label' });
|
||||||
@@ -186,6 +211,8 @@ const UnlockDialog = new Lang.Class({
|
|||||||
{ x_align: St.Align.START,
|
{ x_align: St.Align.START,
|
||||||
x_fill: false });
|
x_fill: false });
|
||||||
|
|
||||||
|
this._updateSensitivity(true);
|
||||||
|
|
||||||
let batch = new Batch.Hold();
|
let batch = new Batch.Hold();
|
||||||
this._userVerifier.begin(this._userName, batch);
|
this._userVerifier.begin(this._userName, batch);
|
||||||
|
|
||||||
@@ -194,21 +221,55 @@ const UnlockDialog = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._idleMonitor = Shell.IdleMonitor.get();
|
Main.ctrlAltTabManager.addGroup(this.dialogLayout, _("Unlock Window"), 'dialog-password-symbolic');
|
||||||
// this dialog is only created after user activity (curtain drag or
|
|
||||||
// escape key press), so the timeout will fire after IDLE_TIMEOUT seconds of inactivity
|
this._idleMonitor = new GnomeDesktop.IdleMonitor();
|
||||||
this._idleWatchId = this._idleMonitor.add_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
|
this._idleWatchId = this._idleMonitor.add_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateOkButton: function(sensitive) {
|
_updateSensitivity: function(sensitive) {
|
||||||
this._okButton.button.reactive = sensitive;
|
this._promptEntry.reactive = sensitive;
|
||||||
this._okButton.button.can_focus = sensitive;
|
this._promptEntry.clutter_text.editable = sensitive;
|
||||||
|
this._updateOkButtonSensitivity(sensitive && this._promptEntry.text.length > 0);
|
||||||
|
this._otherUserButton.reactive = sensitive;
|
||||||
|
this._otherUserButton.can_focus = sensitive;
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateOkButtonSensitivity: function(sensitive) {
|
||||||
|
this._okButton.reactive = sensitive;
|
||||||
|
this._okButton.can_focus = sensitive;
|
||||||
|
},
|
||||||
|
|
||||||
|
_setWorking: function(working) {
|
||||||
|
if (working) {
|
||||||
|
this._workSpinner.play();
|
||||||
|
Tweener.addTween(this._workSpinner.actor,
|
||||||
|
{ opacity: 255,
|
||||||
|
delay: LoginDialog.WORK_SPINNER_ANIMATION_DELAY,
|
||||||
|
time: LoginDialog.WORK_SPINNER_ANIMATION_TIME,
|
||||||
|
transition: 'linear'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Tweener.addTween(this._workSpinner.actor,
|
||||||
|
{ opacity: 0,
|
||||||
|
time: LoginDialog.WORK_SPINNER_ANIMATION_TIME,
|
||||||
|
transition: 'linear',
|
||||||
|
onCompleteScope: this,
|
||||||
|
onComplete: function() {
|
||||||
|
this._workSpinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_showMessage: function(userVerifier, message, styleClass) {
|
_showMessage: function(userVerifier, message, styleClass) {
|
||||||
this._promptMessage.text = message;
|
if (message) {
|
||||||
this._promptMessage.styleClass = styleClass;
|
this._promptMessage.text = message;
|
||||||
GdmUtil.fadeInActor(this._promptMessage);
|
this._promptMessage.styleClass = styleClass;
|
||||||
|
GdmUtil.fadeInActor(this._promptMessage);
|
||||||
|
} else {
|
||||||
|
GdmUtil.fadeOutActor(this._promptMessage);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onAskQuestion: function(verifier, serviceName, question, passwordChar) {
|
_onAskQuestion: function(verifier, serviceName, question, passwordChar) {
|
||||||
@@ -230,7 +291,8 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._promptEntry.menu.isPassword = passwordChar != '';
|
this._promptEntry.menu.isPassword = passwordChar != '';
|
||||||
|
|
||||||
this._currentQuery = serviceName;
|
this._currentQuery = serviceName;
|
||||||
this._updateOkButton(true);
|
this._updateSensitivity(true);
|
||||||
|
this._setWorking(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_showLoginHint: function(verifier, message) {
|
_showLoginHint: function(verifier, message) {
|
||||||
@@ -248,7 +310,8 @@ const UnlockDialog = new Lang.Class({
|
|||||||
// and make ourself non-reactive
|
// and make ourself non-reactive
|
||||||
// the actual reply to GDM will be sent as soon as asked
|
// the actual reply to GDM will be sent as soon as asked
|
||||||
this._firstQuestionAnswer = this._promptEntry.text;
|
this._firstQuestionAnswer = this._promptEntry.text;
|
||||||
this._updateOkButton(false);
|
this._updateSensitivity(false);
|
||||||
|
this._setWorking(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +321,8 @@ const UnlockDialog = new Lang.Class({
|
|||||||
let query = this._currentQuery;
|
let query = this._currentQuery;
|
||||||
this._currentQuery = null;
|
this._currentQuery = null;
|
||||||
|
|
||||||
this._updateOkButton(false);
|
this._updateSensitivity(false);
|
||||||
|
this._setWorking(true);
|
||||||
|
|
||||||
this._userVerifier.answerQuery(query, this._promptEntry.text);
|
this._userVerifier.answerQuery(query, this._promptEntry.text);
|
||||||
},
|
},
|
||||||
@@ -272,9 +336,23 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this.emit('failed');
|
this.emit('failed');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onVerificationFailed: function() {
|
||||||
|
this._currentQuery = null;
|
||||||
|
this._firstQuestion = true;
|
||||||
|
|
||||||
|
this._promptEntry.text = '';
|
||||||
|
this._promptEntry.clutter_text.set_password_char('\u25cf');
|
||||||
|
this._promptEntry.menu.isPassword = true;
|
||||||
|
|
||||||
|
this._updateSensitivity(false);
|
||||||
|
this._setWorking(false);
|
||||||
|
},
|
||||||
|
|
||||||
_escape: function() {
|
_escape: function() {
|
||||||
this._userVerifier.cancel();
|
if (this.allowCancel) {
|
||||||
this.emit('failed');
|
this._userVerifier.cancel();
|
||||||
|
this.emit('failed');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_otherUserClicked: function(button, event) {
|
_otherUserClicked: function(button, event) {
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ const Pango = imports.gi.Pango;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Tp = imports.gi.TelepathyGLib;
|
const Tp = imports.gi.TelepathyGLib;
|
||||||
const UPowerGlib = imports.gi.UPowerGlib;
|
|
||||||
const Atk = imports.gi.Atk;
|
const Atk = imports.gi.Atk;
|
||||||
|
|
||||||
const BoxPointer = imports.ui.boxpointer;
|
const BoxPointer = imports.ui.boxpointer;
|
||||||
const GnomeSession = imports.misc.gnomeSession;
|
const GnomeSession = imports.misc.gnomeSession;
|
||||||
|
const LoginManager = imports.misc.loginManager;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
@@ -26,6 +26,8 @@ const DISABLE_USER_SWITCH_KEY = 'disable-user-switching';
|
|||||||
const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen';
|
const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen';
|
||||||
const DISABLE_LOG_OUT_KEY = 'disable-log-out';
|
const DISABLE_LOG_OUT_KEY = 'disable-log-out';
|
||||||
const LOCK_ENABLED_KEY = 'lock-enabled';
|
const LOCK_ENABLED_KEY = 'lock-enabled';
|
||||||
|
const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
|
||||||
|
const SHOW_FULL_NAME_KEY = 'show-full-name';
|
||||||
|
|
||||||
const DIALOG_ICON_SIZE = 64;
|
const DIALOG_ICON_SIZE = 64;
|
||||||
|
|
||||||
@@ -187,7 +189,7 @@ const IMStatusChooserItem = new Lang.Class({
|
|||||||
item = new IMStatusItem(_("Idle"), 'user-idle-symbolic');
|
item = new IMStatusItem(_("Idle"), 'user-idle-symbolic');
|
||||||
this._combo.addMenuItem(item, IMStatus.IDLE);
|
this._combo.addMenuItem(item, IMStatus.IDLE);
|
||||||
|
|
||||||
item = new IMStatusItem(_("Unavailable"), 'user-offline-symbolic');
|
item = new IMStatusItem(_("Offline"), 'user-offline-symbolic');
|
||||||
this._combo.addMenuItem(item, IMStatus.OFFLINE);
|
this._combo.addMenuItem(item, IMStatus.OFFLINE);
|
||||||
|
|
||||||
this._combo.connect('active-item-changed',
|
this._combo.connect('active-item-changed',
|
||||||
@@ -482,10 +484,11 @@ const UserMenuButton = new Lang.Class({
|
|||||||
this._presence = new GnomeSession.Presence();
|
this._presence = new GnomeSession.Presence();
|
||||||
this._session = new GnomeSession.SessionManager();
|
this._session = new GnomeSession.SessionManager();
|
||||||
this._haveShutdown = true;
|
this._haveShutdown = true;
|
||||||
|
this._haveSuspend = true;
|
||||||
|
|
||||||
this._accountMgr = Tp.AccountManager.dup();
|
this._accountMgr = Tp.AccountManager.dup();
|
||||||
|
|
||||||
this._upClient = new UPowerGlib.Client();
|
this._loginManager = LoginManager.getLoginManager();
|
||||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||||
|
|
||||||
this._iconBox = new St.Bin();
|
this._iconBox = new St.Bin();
|
||||||
@@ -548,9 +551,12 @@ const UserMenuButton = new Lang.Class({
|
|||||||
Lang.bind(this, this._updateSwitchUser));
|
Lang.bind(this, this._updateSwitchUser));
|
||||||
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
|
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
|
||||||
Lang.bind(this, this._updateLogout));
|
Lang.bind(this, this._updateLogout));
|
||||||
|
|
||||||
this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
|
this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
|
||||||
Lang.bind(this, this._updateLockScreen));
|
Lang.bind(this, this._updateLockScreen));
|
||||||
|
this._screenSaverSettings.connect('changed::' + SHOW_FULL_NAME_KEY,
|
||||||
|
Lang.bind(this, this._updateUserName));
|
||||||
|
global.settings.connect('changed::' + SHOW_FULL_NAME_KEY,
|
||||||
|
Lang.bind(this, this._updateUserName));
|
||||||
this._updateSwitchUser();
|
this._updateSwitchUser();
|
||||||
this._updateLogout();
|
this._updateLogout();
|
||||||
this._updateLockScreen();
|
this._updateLockScreen();
|
||||||
@@ -565,14 +571,15 @@ const UserMenuButton = new Lang.Class({
|
|||||||
// the lockdown setting changes, which should be close enough.
|
// the lockdown setting changes, which should be close enough.
|
||||||
this.menu.connect('open-state-changed', Lang.bind(this,
|
this.menu.connect('open-state-changed', Lang.bind(this,
|
||||||
function(menu, open) {
|
function(menu, open) {
|
||||||
if (open)
|
if (!open)
|
||||||
this._updateHaveShutdown();
|
return;
|
||||||
|
|
||||||
|
this._updateHaveShutdown();
|
||||||
|
this._updateHaveSuspend();
|
||||||
}));
|
}));
|
||||||
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
|
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
|
||||||
Lang.bind(this, this._updateHaveShutdown));
|
Lang.bind(this, this._updateHaveShutdown));
|
||||||
|
|
||||||
this._upClient.connect('notify::can-suspend', Lang.bind(this, this._updateSuspendOrPowerOff));
|
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
@@ -586,6 +593,7 @@ const UserMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
this.setSensitive(!Main.sessionMode.isLocked);
|
this.setSensitive(!Main.sessionMode.isLocked);
|
||||||
this._updatePresenceIcon();
|
this._updatePresenceIcon();
|
||||||
|
this._updateUserName();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy: function() {
|
_onDestroy: function() {
|
||||||
@@ -594,7 +602,10 @@ const UserMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateUserName: function() {
|
_updateUserName: function() {
|
||||||
if (this._user.is_loaded)
|
let settings = global.settings;
|
||||||
|
if (Main.sessionMode.isLocked)
|
||||||
|
settings = this._screenSaverSettings;
|
||||||
|
if (this._user.is_loaded && settings.get_boolean(SHOW_FULL_NAME_KEY))
|
||||||
this._name.set_text(this._user.get_real_name());
|
this._name.set_text(this._user.get_real_name());
|
||||||
else
|
else
|
||||||
this._name.set_text("");
|
this._name.set_text("");
|
||||||
@@ -608,19 +619,19 @@ const UserMenuButton = new Lang.Class({
|
|||||||
_updateSwitchUser: function() {
|
_updateSwitchUser: function() {
|
||||||
let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
|
let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
|
||||||
let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users;
|
let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users;
|
||||||
let multiSession = Gdm.get_session_ids().length > 1;
|
|
||||||
|
|
||||||
this._loginScreenItem.label.set_text(multiUser ? _("Switch User")
|
this._loginScreenItem.actor.visible = allowSwitch && multiUser;
|
||||||
: _("Switch Session"));
|
|
||||||
this._loginScreenItem.actor.visible = allowSwitch && (multiUser || multiSession);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateLogout: function() {
|
_updateLogout: function() {
|
||||||
let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
|
let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
|
||||||
|
let alwaysShow = global.settings.get_boolean(ALWAYS_SHOW_LOG_OUT_KEY);
|
||||||
|
let systemAccount = this._user.system_account;
|
||||||
|
let localAccount = this._user.local_account;
|
||||||
let multiUser = this._userManager.has_multiple_users;
|
let multiUser = this._userManager.has_multiple_users;
|
||||||
let multiSession = Gdm.get_session_ids().length > 1;
|
let multiSession = Gdm.get_session_ids().length > 1;
|
||||||
|
|
||||||
this._logoutItem.actor.visible = allowLogout && (multiUser || multiSession);
|
this._logoutItem.actor.visible = allowLogout && (alwaysShow || multiUser || multiSession || systemAccount || !localAccount);
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateLockScreen: function() {
|
_updateLockScreen: function() {
|
||||||
@@ -644,9 +655,15 @@ const UserMenuButton = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSuspendOrPowerOff: function() {
|
_updateHaveSuspend: function() {
|
||||||
this._haveSuspend = this._upClient.get_can_suspend();
|
this._loginManager.canSuspend(Lang.bind(this,
|
||||||
|
function(result) {
|
||||||
|
this._haveSuspend = result;
|
||||||
|
this._updateSuspendOrPowerOff();
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSuspendOrPowerOff: function() {
|
||||||
if (!this._suspendOrPowerOffItem)
|
if (!this._suspendOrPowerOffItem)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -743,7 +760,7 @@ const UserMenuButton = new Lang.Class({
|
|||||||
item = new PopupMenu.PopupSeparatorMenuItem();
|
item = new PopupMenu.PopupSeparatorMenuItem();
|
||||||
this.menu.addMenuItem(item);
|
this.menu.addMenuItem(item);
|
||||||
|
|
||||||
item = new PopupMenu.PopupMenuItem(_("System Settings"));
|
item = new PopupMenu.PopupMenuItem(_("Settings"));
|
||||||
item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
|
item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
|
||||||
this.menu.addMenuItem(item);
|
this.menu.addMenuItem(item);
|
||||||
this._systemSettings = item;
|
this._systemSettings = item;
|
||||||
@@ -820,9 +837,9 @@ const UserMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onLoginScreenActivate: function() {
|
_onLoginScreenActivate: function() {
|
||||||
|
this.menu.close(BoxPointer.PopupAnimation.NONE);
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
if (this._screenSaverSettings.get_boolean(LOCK_ENABLED_KEY))
|
Main.screenShield.lock(false);
|
||||||
Main.screenShield.lock(false);
|
|
||||||
Gdm.goto_login_session_sync(null);
|
Gdm.goto_login_session_sync(null);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -849,12 +866,13 @@ const UserMenuButton = new Lang.Class({
|
|||||||
let tmpId = Main.screenShield.connect('lock-screen-shown', Lang.bind(this, function() {
|
let tmpId = Main.screenShield.connect('lock-screen-shown', Lang.bind(this, function() {
|
||||||
Main.screenShield.disconnect(tmpId);
|
Main.screenShield.disconnect(tmpId);
|
||||||
|
|
||||||
this._upClient.suspend_sync(null);
|
this._loginManager.suspend();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this.menu.close(BoxPointer.PopupAnimation.NONE);
|
||||||
Main.screenShield.lock(true);
|
Main.screenShield.lock(true);
|
||||||
} else {
|
} else {
|
||||||
this._upClient.suspend_sync(null);
|
this._loginManager.suspend();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
@@ -19,6 +20,7 @@ const Tweener = imports.ui.tweener;
|
|||||||
const Wanda = imports.ui.wanda;
|
const Wanda = imports.ui.wanda;
|
||||||
const WorkspacesView = imports.ui.workspacesView;
|
const WorkspacesView = imports.ui.workspacesView;
|
||||||
|
|
||||||
|
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||||
|
|
||||||
const FocusTrap = new Lang.Class({
|
const FocusTrap = new Lang.Class({
|
||||||
Name: 'FocusTrap',
|
Name: 'FocusTrap',
|
||||||
@@ -37,17 +39,11 @@ const ViewSelector = new Lang.Class({
|
|||||||
Name: 'ViewSelector',
|
Name: 'ViewSelector',
|
||||||
|
|
||||||
_init : function(searchEntry, showAppsButton) {
|
_init : function(searchEntry, showAppsButton) {
|
||||||
this.actor = new St.BoxLayout({ name: 'viewSelector',
|
this.actor = new Shell.Stack({ name: 'viewSelector' });
|
||||||
vertical: true });
|
|
||||||
|
|
||||||
this._showAppsButton = showAppsButton;
|
this._showAppsButton = showAppsButton;
|
||||||
this._showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled));
|
this._showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled));
|
||||||
|
|
||||||
this._pageArea = new Shell.Stack();
|
|
||||||
this.actor.add(this._pageArea, { x_fill: true,
|
|
||||||
y_fill: true,
|
|
||||||
expand: true });
|
|
||||||
|
|
||||||
this._activePage = null;
|
this._activePage = null;
|
||||||
|
|
||||||
this.active = false;
|
this.active = false;
|
||||||
@@ -82,16 +78,21 @@ const ViewSelector = new Lang.Class({
|
|||||||
|
|
||||||
this._workspacesDisplay = new WorkspacesView.WorkspacesDisplay();
|
this._workspacesDisplay = new WorkspacesView.WorkspacesDisplay();
|
||||||
this._workspacesPage = this._addPage(this._workspacesDisplay.actor, null,
|
this._workspacesPage = this._addPage(this._workspacesDisplay.actor, null,
|
||||||
_("Windows"), 'text-x-generic-symbolic');
|
_("Windows"), 'emblem-documents-symbolic');
|
||||||
|
|
||||||
this._appDisplay = new AppDisplay.AllAppDisplay();
|
this._appDisplay = new AppDisplay.AllAppDisplay();
|
||||||
this._appsPage = this._addPage(this._appDisplay.actor, null,
|
this._appsPage = this._addPage(this._appDisplay.actor, null,
|
||||||
_("Applications"), 'system-run-symbolic');
|
_("Applications"), 'view-grid-symbolic');
|
||||||
|
|
||||||
this._searchResults = new SearchDisplay.SearchResults(this._searchSystem);
|
this._searchResults = new SearchDisplay.SearchResults(this._searchSystem);
|
||||||
this._searchPage = this._addPage(this._searchResults.actor, this._entry,
|
this._searchPage = this._addPage(this._searchResults.actor, this._entry,
|
||||||
_("Search"), 'edit-find-symbolic');
|
_("Search"), 'edit-find-symbolic');
|
||||||
|
|
||||||
|
this._searchSettings = new Gio.Settings({ schema: Search.SEARCH_PROVIDERS_SCHEMA });
|
||||||
|
this._searchSettings.connect('changed::disabled', Lang.bind(this, this._reloadRemoteProviders));
|
||||||
|
this._searchSettings.connect('changed::disable-external', Lang.bind(this, this._reloadRemoteProviders));
|
||||||
|
this._searchSettings.connect('changed::sort-order', Lang.bind(this, this._reloadRemoteProviders));
|
||||||
|
|
||||||
// Default search providers
|
// Default search providers
|
||||||
// Wanda comes obviously first
|
// Wanda comes obviously first
|
||||||
this.addSearchProvider(new Wanda.WandaSearchProvider());
|
this.addSearchProvider(new Wanda.WandaSearchProvider());
|
||||||
@@ -131,16 +132,17 @@ const ViewSelector = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Public constraints which may be used to tie actors' height or
|
Main.wm.addKeybinding('toggle-application-view',
|
||||||
// vertical position to the current tab's content; as the content's
|
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
// height and position depend on the view selector's style properties
|
Meta.KeyBindingFlags.NONE,
|
||||||
// (e.g. font size, padding, spacing, ...) it would be extremely hard
|
Main.KeybindingMode.NORMAL |
|
||||||
// and ugly to get these from the outside. While it would be possible
|
Main.KeybindingMode.OVERVIEW,
|
||||||
// to use position and height properties directly, outside code would
|
Lang.bind(this, this._toggleAppsPage));
|
||||||
// need to ensure that the content is properly allocated before
|
},
|
||||||
// accessing the properties.
|
|
||||||
this.constrainHeight = new Clutter.BindConstraint({ source: this._pageArea,
|
_toggleAppsPage: function() {
|
||||||
coordinate: Clutter.BindCoordinate.HEIGHT });
|
Main.overview.show();
|
||||||
|
this._showAppsButton.checked = !this._showAppsButton.checked;
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
@@ -183,8 +185,8 @@ const ViewSelector = new Lang.Class({
|
|||||||
this._a11yFocusPage(page);
|
this._a11yFocusPage(page);
|
||||||
})
|
})
|
||||||
});;
|
});;
|
||||||
this._pageArea.add_actor(page);
|
this.actor.add_actor(page);
|
||||||
return page
|
return page;
|
||||||
},
|
},
|
||||||
|
|
||||||
_showPage: function(page) {
|
_showPage: function(page) {
|
||||||
@@ -230,6 +232,11 @@ const ViewSelector = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onStageKeyPress: function(actor, event) {
|
_onStageKeyPress: function(actor, event) {
|
||||||
|
// Ignore events while anything but the overview has
|
||||||
|
// pushed a modal (system modals, looking glass, ...)
|
||||||
|
if (Main.modalCount > 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
let modifiers = event.get_state();
|
let modifiers = event.get_state();
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
|
|
||||||
@@ -421,7 +428,32 @@ const ViewSelector = new Lang.Class({
|
|||||||
this._showPage(this._searchPage);
|
this._showPage(this._searchPage);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_shouldUseSearchProvider: function(provider) {
|
||||||
|
// the disable-external GSetting only affects remote providers
|
||||||
|
if (!provider.isRemoteProvider)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (this._searchSettings.get_boolean('disable-external'))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
let appId = provider.appInfo.get_id();
|
||||||
|
let disable = this._searchSettings.get_strv('disabled');
|
||||||
|
return disable.indexOf(appId) == -1;
|
||||||
|
},
|
||||||
|
|
||||||
|
_reloadRemoteProviders: function() {
|
||||||
|
// removeSearchProvider() modifies the provider list we iterate on,
|
||||||
|
// so make a copy first
|
||||||
|
let remoteProviders = this._searchSystem.getRemoteProviders().slice(0);
|
||||||
|
|
||||||
|
remoteProviders.forEach(Lang.bind(this, this.removeSearchProvider));
|
||||||
|
RemoteSearch.loadRemoteSearchProviders(Lang.bind(this, this.addSearchProvider));
|
||||||
|
},
|
||||||
|
|
||||||
addSearchProvider: function(provider) {
|
addSearchProvider: function(provider) {
|
||||||
|
if (!this._shouldUseSearchProvider(provider))
|
||||||
|
return;
|
||||||
|
|
||||||
this._searchSystem.registerProvider(provider);
|
this._searchSystem.registerProvider(provider);
|
||||||
this._searchResults.createProviderMeta(provider);
|
this._searchResults.createProviderMeta(provider);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
|
||||||
const GdkPixbuf = imports.gi.GdkPixbuf;
|
const GdkPixbuf = imports.gi.GdkPixbuf;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Shell = imports.gi.Shell;
|
|
||||||
const Signals = imports.signals;
|
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
const IconGrid = imports.ui.iconGrid;
|
const IconGrid = imports.ui.iconGrid;
|
||||||
const Layout = imports.ui.layout;
|
const Layout = imports.ui.layout;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Search = imports.ui.search;
|
const Panel = imports.ui.panel;
|
||||||
|
|
||||||
// we could make these gsettings
|
// we could make these gsettings
|
||||||
const FISH_NAME = 'wanda';
|
const FISH_NAME = 'wanda';
|
||||||
@@ -55,20 +53,9 @@ const WandaIcon = new Lang.Class({
|
|||||||
icon_size: iconSize });
|
icon_size: iconSize });
|
||||||
}
|
}
|
||||||
|
|
||||||
this._animations = St.TextureCache.get_default().load_sliced_image(this._imageFile, this._imgWidth, this._imgHeight);
|
this._animations = new Panel.Animation(this._imageFile, this._imgWidth, this._imgHeight, FISH_SPEED);
|
||||||
this._animations.connect('notify::mapped', Lang.bind(this, function() {
|
this._animations.play();
|
||||||
if (this._animations.mapped && !this._timeoutId) {
|
return this._animations.actor;
|
||||||
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, FISH_SPEED, Lang.bind(this, this._update));
|
|
||||||
|
|
||||||
this._i = 0;
|
|
||||||
this._update();
|
|
||||||
} else if (!this._animations.mapped && this._timeoutId) {
|
|
||||||
GLib.source_remove(this._timeoutId);
|
|
||||||
this._timeoutId = 0;
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
return this._animations;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_createIconTexture: function(size) {
|
_createIconTexture: function(size) {
|
||||||
@@ -76,28 +63,14 @@ const WandaIcon = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this.parent(size);
|
this.parent(size);
|
||||||
},
|
}
|
||||||
|
|
||||||
_update: function() {
|
|
||||||
let n = this._animations.get_n_children();
|
|
||||||
if (n == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._animations.get_child_at_index(this._i).hide();
|
|
||||||
this._i = (this._i + 1) % n;
|
|
||||||
this._animations.get_child_at_index(this._i).show();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const WandaIconBin = new Lang.Class({
|
const WandaIconBin = new Lang.Class({
|
||||||
Name: 'WandaIconBin',
|
Name: 'WandaIconBin',
|
||||||
|
|
||||||
_init: function(fish, label, params) {
|
_init: function(fish, label, params) {
|
||||||
this.actor = new St.Bin({ style_class: 'search-result-content',
|
this.actor = new St.Bin({ reactive: true,
|
||||||
reactive: true,
|
|
||||||
track_hover: true });
|
track_hover: true });
|
||||||
this.icon = new WandaIcon(fish, label, params);
|
this.icon = new WandaIcon(fish, label, params);
|
||||||
|
|
||||||
@@ -158,10 +131,9 @@ function capitalize(str) {
|
|||||||
|
|
||||||
const WandaSearchProvider = new Lang.Class({
|
const WandaSearchProvider = new Lang.Class({
|
||||||
Name: 'WandaSearchProvider',
|
Name: 'WandaSearchProvider',
|
||||||
Extends: Search.SearchProvider,
|
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent(_("Your favorite Easter Egg"));
|
this.id = 'wanda';
|
||||||
},
|
},
|
||||||
|
|
||||||
getResultMetas: function(fish, callback) {
|
getResultMetas: function(fish, callback) {
|
||||||
@@ -169,15 +141,8 @@ const WandaSearchProvider = new Lang.Class({
|
|||||||
// only one which speaks the truth!
|
// only one which speaks the truth!
|
||||||
'name': capitalize(fish[0]),
|
'name': capitalize(fish[0]),
|
||||||
'createIcon': function(iconSize) {
|
'createIcon': function(iconSize) {
|
||||||
// for DND only (maybe could be improved)
|
return new St.Icon({ gicon: Gio.icon_new_for_string('face-smile'),
|
||||||
// DON'T use St.Icon here, it crashes the shell
|
icon_size: iconSize });
|
||||||
// (dnd.js code assumes it can query the actor size
|
|
||||||
// without parenting it, while StWidget accesses
|
|
||||||
// StThemeNode in get_preferred_width/height, which
|
|
||||||
// triggers an assertion failure)
|
|
||||||
return St.TextureCache.get_default().load_icon_name(null,
|
|
||||||
'face-smile',
|
|
||||||
iconSize);
|
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
},
|
},
|
||||||
@@ -194,7 +159,7 @@ const WandaSearchProvider = new Lang.Class({
|
|||||||
this.getInitialResultSet(terms);
|
this.getInitialResultSet(terms);
|
||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(fish, params) {
|
activateResult: function(fish) {
|
||||||
if (this._dialog)
|
if (this._dialog)
|
||||||
this._dialog.destroy();
|
this._dialog.destroy();
|
||||||
this._dialog = new FortuneDialog(capitalize(fish), FISH_COMMAND);
|
this._dialog = new FortuneDialog(capitalize(fish), FISH_COMMAND);
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ const WindowAttentionHandler = new Lang.Class({
|
|||||||
let [title, banner] = this._getTitleAndBanner(app, window);
|
let [title, banner] = this._getTitleAndBanner(app, window);
|
||||||
|
|
||||||
let notification = new MessageTray.Notification(source, title, banner);
|
let notification = new MessageTray.Notification(source, title, banner);
|
||||||
|
notification.setForFeedback(true);
|
||||||
|
|
||||||
source.notify(notification);
|
source.notify(notification);
|
||||||
|
|
||||||
source.signalIDs.push(window.connect('notify::title', Lang.bind(this, function() {
|
source.signalIDs.push(window.connect('notify::title', Lang.bind(this, function() {
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ const WindowManager = new Lang.Class({
|
|||||||
|
|
||||||
this._animationBlockCount = 0;
|
this._animationBlockCount = 0;
|
||||||
|
|
||||||
|
this._allowedKeybindings = {};
|
||||||
|
|
||||||
this._switchData = null;
|
this._switchData = null;
|
||||||
this._shellwm.connect('kill-switch-workspace', Lang.bind(this, this._switchWorkspaceDone));
|
this._shellwm.connect('kill-switch-workspace', Lang.bind(this, this._switchWorkspaceDone));
|
||||||
this._shellwm.connect('kill-window-effects', Lang.bind(this, function (shellwm, actor) {
|
this._shellwm.connect('kill-window-effects', Lang.bind(this, function (shellwm, actor) {
|
||||||
@@ -99,38 +101,79 @@ const WindowManager = new Lang.Class({
|
|||||||
this._shellwm.connect('unmaximize', Lang.bind(this, this._unmaximizeWindow));
|
this._shellwm.connect('unmaximize', Lang.bind(this, this._unmaximizeWindow));
|
||||||
this._shellwm.connect('map', Lang.bind(this, this._mapWindow));
|
this._shellwm.connect('map', Lang.bind(this, this._mapWindow));
|
||||||
this._shellwm.connect('destroy', Lang.bind(this, this._destroyWindow));
|
this._shellwm.connect('destroy', Lang.bind(this, this._destroyWindow));
|
||||||
|
this._shellwm.connect('filter-keybinding', Lang.bind(this, this._filterKeybinding));
|
||||||
|
|
||||||
this._workspaceSwitcherPopup = null;
|
this._workspaceSwitcherPopup = null;
|
||||||
Meta.keybindings_set_custom_handler('switch-to-workspace-left',
|
this.setCustomKeybindingHandler('switch-to-workspace-left',
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Main.KeybindingMode.NORMAL |
|
||||||
Meta.keybindings_set_custom_handler('switch-to-workspace-right',
|
Main.KeybindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
Meta.keybindings_set_custom_handler('switch-to-workspace-up',
|
this.setCustomKeybindingHandler('switch-to-workspace-right',
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Main.KeybindingMode.NORMAL |
|
||||||
Meta.keybindings_set_custom_handler('switch-to-workspace-down',
|
Main.KeybindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
Meta.keybindings_set_custom_handler('move-to-workspace-left',
|
this.setCustomKeybindingHandler('switch-to-workspace-up',
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Main.KeybindingMode.NORMAL |
|
||||||
Meta.keybindings_set_custom_handler('move-to-workspace-right',
|
Main.KeybindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
Meta.keybindings_set_custom_handler('move-to-workspace-up',
|
this.setCustomKeybindingHandler('switch-to-workspace-down',
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Main.KeybindingMode.NORMAL |
|
||||||
Meta.keybindings_set_custom_handler('move-to-workspace-down',
|
Main.KeybindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
Meta.keybindings_set_custom_handler('switch-windows',
|
this.setCustomKeybindingHandler('move-to-workspace-left',
|
||||||
Lang.bind(this, this._startAppSwitcher));
|
Main.KeybindingMode.NORMAL |
|
||||||
Meta.keybindings_set_custom_handler('switch-group',
|
Main.KeybindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._startAppSwitcher));
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
Meta.keybindings_set_custom_handler('switch-windows-backward',
|
this.setCustomKeybindingHandler('move-to-workspace-right',
|
||||||
Lang.bind(this, this._startAppSwitcher));
|
Main.KeybindingMode.NORMAL |
|
||||||
Meta.keybindings_set_custom_handler('switch-group-backward',
|
Main.KeybindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._startAppSwitcher));
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
Meta.keybindings_set_custom_handler('switch-panels',
|
this.setCustomKeybindingHandler('move-to-workspace-up',
|
||||||
Lang.bind(this, this._startA11ySwitcher));
|
Main.KeybindingMode.NORMAL |
|
||||||
global.display.add_keybinding('open-application-menu',
|
Main.KeybindingMode.OVERVIEW,
|
||||||
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
Meta.KeyBindingFlags.NONE,
|
this.setCustomKeybindingHandler('move-to-workspace-down',
|
||||||
Lang.bind(this, this._openAppMenu));
|
Main.KeybindingMode.NORMAL |
|
||||||
|
Main.KeybindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-applications',
|
||||||
|
Main.KeybindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._startAppSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-group',
|
||||||
|
Main.KeybindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._startAppSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-applications-backward',
|
||||||
|
Main.KeybindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._startAppSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-group-backward',
|
||||||
|
Main.KeybindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._startAppSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-windows',
|
||||||
|
Main.KeybindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._startWindowSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-windows-backward',
|
||||||
|
Main.KeybindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._startWindowSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-panels',
|
||||||
|
Main.KeybindingMode.NORMAL |
|
||||||
|
Main.KeybindingMode.OVERVIEW |
|
||||||
|
Main.KeybindingMode.LOCK_SCREEN |
|
||||||
|
Main.KeybindingMode.UNLOCK_SCREEN |
|
||||||
|
Main.KeybindingMode.LOGIN_SCREEN,
|
||||||
|
Lang.bind(this, this._startA11ySwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-panels-backward',
|
||||||
|
Main.KeybindingMode.NORMAL |
|
||||||
|
Main.KeybindingMode.OVERVIEW |
|
||||||
|
Main.KeybindingMode.LOCK_SCREEN |
|
||||||
|
Main.KeybindingMode.UNLOCK_SCREEN |
|
||||||
|
Main.KeybindingMode.LOGIN_SCREEN,
|
||||||
|
Lang.bind(this, this._startA11ySwitcher));
|
||||||
|
|
||||||
|
this.addKeybinding('open-application-menu',
|
||||||
|
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
|
Meta.KeyBindingFlags.NONE,
|
||||||
|
Main.KeybindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._openAppMenu));
|
||||||
|
|
||||||
Main.overview.connect('showing', Lang.bind(this, function() {
|
Main.overview.connect('showing', Lang.bind(this, function() {
|
||||||
for (let i = 0; i < this._dimmedWindows.length; i++)
|
for (let i = 0; i < this._dimmedWindows.length; i++)
|
||||||
@@ -142,6 +185,27 @@ const WindowManager = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setCustomKeybindingHandler: function(name, modes, handler) {
|
||||||
|
if (Meta.keybindings_set_custom_handler(name, handler))
|
||||||
|
this.allowKeybinding(name, modes);
|
||||||
|
},
|
||||||
|
|
||||||
|
addKeybinding: function(name, settings, flags, modes, handler) {
|
||||||
|
let action = global.display.add_keybinding(name, settings, flags, handler);
|
||||||
|
if (action != Meta.KeyBindingAction.NONE)
|
||||||
|
this.allowKeybinding(name, modes);
|
||||||
|
return action;
|
||||||
|
},
|
||||||
|
|
||||||
|
removeKeybinding: function(name) {
|
||||||
|
if (global.display.remove_keybinding(name))
|
||||||
|
this.allowKeybinding(name, Main.KeybindingMode.NONE);
|
||||||
|
},
|
||||||
|
|
||||||
|
allowKeybinding: function(name, modes) {
|
||||||
|
this._allowedKeybindings[name] = modes;
|
||||||
|
},
|
||||||
|
|
||||||
blockAnimations: function() {
|
blockAnimations: function() {
|
||||||
this._animationBlockCount++;
|
this._animationBlockCount++;
|
||||||
},
|
},
|
||||||
@@ -157,7 +221,9 @@ const WindowManager = new Lang.Class({
|
|||||||
_shouldAnimateActor: function(actor) {
|
_shouldAnimateActor: function(actor) {
|
||||||
if (!this._shouldAnimate())
|
if (!this._shouldAnimate())
|
||||||
return false;
|
return false;
|
||||||
return actor.meta_window.get_window_type() == Meta.WindowType.NORMAL;
|
let windowType = actor.meta_window.get_window_type();
|
||||||
|
return windowType == Meta.WindowType.NORMAL ||
|
||||||
|
windowType == Meta.WindowType.MODAL_DIALOG;
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeEffect : function(list, actor) {
|
_removeEffect : function(list, actor) {
|
||||||
@@ -183,16 +249,17 @@ const WindowManager = new Lang.Class({
|
|||||||
*/
|
*/
|
||||||
this._minimizing.push(actor);
|
this._minimizing.push(actor);
|
||||||
|
|
||||||
let primary = Main.layoutManager.primaryMonitor;
|
let monitor = Main.layoutManager.findMonitorForWindow(actor.meta_window);
|
||||||
let xDest = primary.x;
|
let xDest = monitor.x;
|
||||||
|
let yDest = monitor.y;
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||||
xDest += primary.width;
|
xDest += monitor.width;
|
||||||
|
|
||||||
Tweener.addTween(actor,
|
Tweener.addTween(actor,
|
||||||
{ scale_x: 0.0,
|
{ scale_x: 0.0,
|
||||||
scale_y: 0.0,
|
scale_y: 0.0,
|
||||||
x: xDest,
|
x: xDest,
|
||||||
y: 0,
|
y: yDest,
|
||||||
time: WINDOW_ANIMATION_TIME,
|
time: WINDOW_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: this._minimizeWindowDone,
|
onComplete: this._minimizeWindowDone,
|
||||||
@@ -307,57 +374,56 @@ const WindowManager = new Lang.Class({
|
|||||||
|
|
||||||
actor._windowType = type;
|
actor._windowType = type;
|
||||||
}));
|
}));
|
||||||
if (actor.meta_window.is_attached_dialog()) {
|
|
||||||
this._checkDimming(actor.get_meta_window().get_transient_for());
|
|
||||||
if (this._shouldAnimate()) {
|
|
||||||
actor.set_scale(1.0, 0.0);
|
|
||||||
actor.scale_gravity = Clutter.Gravity.CENTER;
|
|
||||||
actor.show();
|
|
||||||
this._mapping.push(actor);
|
|
||||||
|
|
||||||
Tweener.addTween(actor,
|
|
||||||
{ scale_y: 1,
|
|
||||||
time: WINDOW_ANIMATION_TIME,
|
|
||||||
transition: "easeOutQuad",
|
|
||||||
onComplete: this._mapWindowDone,
|
|
||||||
onCompleteScope: this,
|
|
||||||
onCompleteParams: [shellwm, actor],
|
|
||||||
onOverwrite: this._mapWindowOverwrite,
|
|
||||||
onOverwriteScope: this,
|
|
||||||
onOverwriteParams: [shellwm, actor]
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
shellwm.completed_map(actor);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this._shouldAnimateActor(actor)) {
|
if (!this._shouldAnimateActor(actor)) {
|
||||||
shellwm.completed_map(actor);
|
shellwm.completed_map(actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
actor.opacity = 0;
|
if (actor.meta_window.is_attached_dialog()) {
|
||||||
actor.show();
|
/* Scale the window from the center of the parent */
|
||||||
|
this._checkDimming(actor.get_meta_window().get_transient_for());
|
||||||
|
actor.set_scale(1.0, 0.0);
|
||||||
|
actor.scale_gravity = Clutter.Gravity.CENTER;
|
||||||
|
actor.show();
|
||||||
|
this._mapping.push(actor);
|
||||||
|
|
||||||
/* Fade window in */
|
Tweener.addTween(actor,
|
||||||
this._mapping.push(actor);
|
{ scale_y: 1,
|
||||||
Tweener.addTween(actor,
|
time: WINDOW_ANIMATION_TIME,
|
||||||
{ opacity: 255,
|
transition: "easeOutQuad",
|
||||||
time: WINDOW_ANIMATION_TIME,
|
onComplete: this._mapWindowDone,
|
||||||
transition: 'easeOutQuad',
|
onCompleteScope: this,
|
||||||
onComplete: this._mapWindowDone,
|
onCompleteParams: [shellwm, actor],
|
||||||
onCompleteScope: this,
|
onOverwrite: this._mapWindowOverwrite,
|
||||||
onCompleteParams: [shellwm, actor],
|
onOverwriteScope: this,
|
||||||
onOverwrite: this._mapWindowOverwrite,
|
onOverwriteParams: [shellwm, actor]
|
||||||
onOverwriteScope: this,
|
});
|
||||||
onOverwriteParams: [shellwm, actor]
|
} else {
|
||||||
});
|
/* Fade window in */
|
||||||
|
actor.opacity = 0;
|
||||||
|
actor.show();
|
||||||
|
this._mapping.push(actor);
|
||||||
|
|
||||||
|
Tweener.addTween(actor,
|
||||||
|
{ opacity: 255,
|
||||||
|
time: WINDOW_ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: this._mapWindowDone,
|
||||||
|
onCompleteScope: this,
|
||||||
|
onCompleteParams: [shellwm, actor],
|
||||||
|
onOverwrite: this._mapWindowOverwrite,
|
||||||
|
onOverwriteScope: this,
|
||||||
|
onOverwriteParams: [shellwm, actor]
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_mapWindowDone : function(shellwm, actor) {
|
_mapWindowDone : function(shellwm, actor) {
|
||||||
if (this._removeEffect(this._mapping, actor)) {
|
if (this._removeEffect(this._mapping, actor)) {
|
||||||
Tweener.removeTweens(actor);
|
Tweener.removeTweens(actor);
|
||||||
actor.opacity = 255;
|
actor.opacity = 255;
|
||||||
|
actor.scale_y = 1;
|
||||||
shellwm.completed_map(actor);
|
shellwm.completed_map(actor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -379,18 +445,21 @@ const WindowManager = new Lang.Class({
|
|||||||
return win != window;
|
return win != window;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this._shouldAnimateActor(actor)) {
|
||||||
|
shellwm.completed_destroy(actor);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._destroying.push(actor);
|
||||||
|
|
||||||
if (window.is_attached_dialog()) {
|
if (window.is_attached_dialog()) {
|
||||||
let parent = window.get_transient_for();
|
let parent = window.get_transient_for();
|
||||||
this._checkDimming(parent, window);
|
this._checkDimming(parent, window);
|
||||||
if (!this._shouldAnimate()) {
|
|
||||||
shellwm.completed_destroy(actor);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
actor.set_scale(1.0, 1.0);
|
actor.set_scale(1.0, 1.0);
|
||||||
actor.scale_gravity = Clutter.Gravity.CENTER;
|
actor.scale_gravity = Clutter.Gravity.CENTER;
|
||||||
actor.show();
|
actor.show();
|
||||||
this._destroying.push(actor);
|
|
||||||
|
|
||||||
actor._parentDestroyId = parent.connect('unmanaged', Lang.bind(this, function () {
|
actor._parentDestroyId = parent.connect('unmanaged', Lang.bind(this, function () {
|
||||||
Tweener.removeTweens(actor);
|
Tweener.removeTweens(actor);
|
||||||
@@ -424,6 +493,21 @@ const WindowManager = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_filterKeybinding: function(shellwm, binding) {
|
||||||
|
if (Main.keybindingMode == Main.KeybindingMode.NONE)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// There's little sense in implementing a keybinding in mutter and
|
||||||
|
// not having it work in NORMAL mode; handle this case generically
|
||||||
|
// so we don't have to explicitly allow all builtin keybindings in
|
||||||
|
// NORMAL mode.
|
||||||
|
if (Main.keybindingMode == Main.KeybindingMode.NORMAL &&
|
||||||
|
binding.is_builtin())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return !(this._allowedKeybindings[binding.get_name()] & Main.keybindingMode);
|
||||||
|
},
|
||||||
|
|
||||||
_switchWorkspace : function(shellwm, from, to, direction) {
|
_switchWorkspace : function(shellwm, from, to, direction) {
|
||||||
if (!this._shouldAnimate()) {
|
if (!this._shouldAnimate()) {
|
||||||
shellwm.completed_switch_workspace();
|
shellwm.completed_switch_workspace();
|
||||||
@@ -546,7 +630,20 @@ const WindowManager = new Lang.Class({
|
|||||||
if (this._workspaceSwitcherPopup != null)
|
if (this._workspaceSwitcherPopup != null)
|
||||||
this._workspaceSwitcherPopup.destroy();
|
this._workspaceSwitcherPopup.destroy();
|
||||||
|
|
||||||
let tabPopup = new AltTab.AltTabPopup();
|
let tabPopup = new AltTab.AppSwitcherPopup();
|
||||||
|
|
||||||
|
let modifiers = binding.get_modifiers();
|
||||||
|
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
||||||
|
if (!tabPopup.show(backwards, binding.get_name(), binding.get_mask()))
|
||||||
|
tabPopup.destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
_startWindowSwitcher : function(display, screen, window, binding) {
|
||||||
|
/* prevent a corner case where both popups show up at once */
|
||||||
|
if (this._workspaceSwitcherPopup != null)
|
||||||
|
this._workspaceSwitcherPopup.destroy();
|
||||||
|
|
||||||
|
let tabPopup = new AltTab.WindowSwitcherPopup();
|
||||||
|
|
||||||
let modifiers = binding.get_modifiers();
|
let modifiers = binding.get_modifiers();
|
||||||
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
||||||
@@ -557,7 +654,7 @@ const WindowManager = new Lang.Class({
|
|||||||
_startA11ySwitcher : function(display, screen, window, binding) {
|
_startA11ySwitcher : function(display, screen, window, binding) {
|
||||||
let modifiers = binding.get_modifiers();
|
let modifiers = binding.get_modifiers();
|
||||||
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
||||||
Main.ctrlAltTabManager.popup(backwards, binding.get_mask());
|
Main.ctrlAltTabManager.popup(backwards, binding.get_name(), binding.get_mask());
|
||||||
},
|
},
|
||||||
|
|
||||||
_openAppMenu : function(display, screen, window, event, binding) {
|
_openAppMenu : function(display, screen, window, event, binding) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
@@ -27,6 +28,8 @@ const WORKSPACE_CUT_SIZE = 10;
|
|||||||
|
|
||||||
const WORKSPACE_KEEP_ALIVE_TIME = 100;
|
const WORKSPACE_KEEP_ALIVE_TIME = 100;
|
||||||
|
|
||||||
|
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
|
||||||
|
|
||||||
const WindowClone = new Lang.Class({
|
const WindowClone = new Lang.Class({
|
||||||
Name: 'WindowClone',
|
Name: 'WindowClone',
|
||||||
|
|
||||||
@@ -541,6 +544,12 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.connect('button-press-event', function() { return true; });
|
this.actor.connect('button-press-event', function() { return true; });
|
||||||
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease));
|
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease));
|
||||||
|
this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
||||||
|
|
||||||
|
Main.overview.connect('showing',
|
||||||
|
Lang.bind(this, this._createThumbnails));
|
||||||
|
Main.overview.connect('hidden',
|
||||||
|
Lang.bind(this, this._destroyThumbnails));
|
||||||
|
|
||||||
Main.overview.connect('item-drag-begin',
|
Main.overview.connect('item-drag-begin',
|
||||||
Lang.bind(this, this._onDragBegin));
|
Lang.bind(this, this._onDragBegin));
|
||||||
@@ -554,6 +563,16 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
Lang.bind(this, this._onDragEnd));
|
Lang.bind(this, this._onDragEnd));
|
||||||
Main.overview.connect('window-drag-cancelled',
|
Main.overview.connect('window-drag-cancelled',
|
||||||
Lang.bind(this, this._onDragCancelled));
|
Lang.bind(this, this._onDragCancelled));
|
||||||
|
|
||||||
|
this._settings = new Gio.Settings({ schema: OVERRIDE_SCHEMA });
|
||||||
|
this._settings.connect('changed::dynamic-workspaces',
|
||||||
|
Lang.bind(this, this._updateSwitcherVisibility));
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSwitcherVisibility: function() {
|
||||||
|
this.actor.visible =
|
||||||
|
this._settings.get_boolean('dynamic-workspaces') ||
|
||||||
|
global.screen.n_workspaces > 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onButtonRelease: function(actor, event) {
|
_onButtonRelease: function(actor, event) {
|
||||||
@@ -620,9 +639,7 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler)
|
if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler)
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
|
|
||||||
if (!Meta.prefs_get_dynamic_workspaces())
|
let canCreateWorkspaces = Meta.prefs_get_dynamic_workspaces();
|
||||||
return DND.DragMotionResult.CONTINUE;
|
|
||||||
|
|
||||||
let spacing = this.actor.get_theme_node().get_length('spacing');
|
let spacing = this.actor.get_theme_node().get_length('spacing');
|
||||||
|
|
||||||
this._dropWorkspace = -1;
|
this._dropWorkspace = -1;
|
||||||
@@ -647,7 +664,7 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
if (i == this._dropPlaceholderPos)
|
if (i == this._dropPlaceholderPos)
|
||||||
targetBottom += this._dropPlaceholder.get_height();
|
targetBottom += this._dropPlaceholder.get_height();
|
||||||
|
|
||||||
if (y > targetTop && y <= targetBottom && source != Main.xdndHandler) {
|
if (y > targetTop && y <= targetBottom && source != Main.xdndHandler && canCreateWorkspaces) {
|
||||||
placeholderPos = i;
|
placeholderPos = i;
|
||||||
break;
|
break;
|
||||||
} else if (y > targetBottom && y <= nextTargetTop) {
|
} else if (y > targetBottom && y <= nextTargetTop) {
|
||||||
@@ -721,10 +738,16 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
_createThumbnails: function() {
|
||||||
this._switchWorkspaceNotifyId =
|
this._switchWorkspaceNotifyId =
|
||||||
global.window_manager.connect('switch-workspace',
|
global.window_manager.connect('switch-workspace',
|
||||||
Lang.bind(this, this._activeWorkspaceChanged));
|
Lang.bind(this, this._activeWorkspaceChanged));
|
||||||
|
this._nWorkspacesNotifyId =
|
||||||
|
global.screen.connect('notify::n-workspaces',
|
||||||
|
Lang.bind(this, this._workspacesChanged));
|
||||||
|
this._syncStackingId =
|
||||||
|
Main.overview.connect('windows-restacked',
|
||||||
|
Lang.bind(this, this._syncStacking));
|
||||||
|
|
||||||
this._targetScale = 0;
|
this._targetScale = 0;
|
||||||
this._scale = 0;
|
this._scale = 0;
|
||||||
@@ -746,19 +769,54 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.addThumbnails(0, global.screen.n_workspaces);
|
this.addThumbnails(0, global.screen.n_workspaces);
|
||||||
|
|
||||||
|
this._updateSwitcherVisibility();
|
||||||
},
|
},
|
||||||
|
|
||||||
hide: function() {
|
_destroyThumbnails: function() {
|
||||||
if (this._switchWorkspaceNotifyId > 0) {
|
if (this._switchWorkspaceNotifyId > 0) {
|
||||||
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
||||||
this._switchWorkspaceNotifyId = 0;
|
this._switchWorkspaceNotifyId = 0;
|
||||||
}
|
}
|
||||||
|
if (this._nWorkspacesNotifyId > 0) {
|
||||||
|
global.screen.disconnect(this._nWorkspacesNotifyId);
|
||||||
|
this._nWorkspacesNotifyId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._syncStackingId > 0) {
|
||||||
|
Main.overview.disconnect(this._syncStackingId);
|
||||||
|
this._syncStackingId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (let w = 0; w < this._thumbnails.length; w++)
|
for (let w = 0; w < this._thumbnails.length; w++)
|
||||||
this._thumbnails[w].destroy();
|
this._thumbnails[w].destroy();
|
||||||
this._thumbnails = [];
|
this._thumbnails = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_workspacesChanged: function() {
|
||||||
|
let oldNumWorkspaces = this._thumbnails.length;
|
||||||
|
let newNumWorkspaces = global.screen.n_workspaces;
|
||||||
|
let active = global.screen.get_active_workspace_index();
|
||||||
|
|
||||||
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
|
this.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
|
||||||
|
} else {
|
||||||
|
let removedIndex;
|
||||||
|
let removedNum = oldNumWorkspaces - newNumWorkspaces;
|
||||||
|
for (let w = 0; w < oldNumWorkspaces; w++) {
|
||||||
|
let metaWorkspace = global.screen.get_workspace_by_index(w);
|
||||||
|
if (this._thumbnails[w].metaWorkspace != metaWorkspace) {
|
||||||
|
removedIndex = w;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.removeThumbnails(removedIndex, removedNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
this._updateSwitcherVisibility();
|
||||||
|
},
|
||||||
|
|
||||||
addThumbnails: function(start, count) {
|
addThumbnails: function(start, count) {
|
||||||
for (let k = start; k < start + count; k++) {
|
for (let k = start; k < start + count; k++) {
|
||||||
let metaWorkspace = global.screen.get_workspace_by_index(k);
|
let metaWorkspace = global.screen.get_workspace_by_index(k);
|
||||||
@@ -785,7 +843,7 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
this._indicator.raise_top();
|
this._indicator.raise_top();
|
||||||
},
|
},
|
||||||
|
|
||||||
removeThumbmails: function(start, count) {
|
removeThumbnails: function(start, count) {
|
||||||
let currentPos = 0;
|
let currentPos = 0;
|
||||||
for (let k = 0; k < this._thumbnails.length; k++) {
|
for (let k = 0; k < this._thumbnails.length; k++) {
|
||||||
let thumbnail = this._thumbnails[k];
|
let thumbnail = this._thumbnails[k];
|
||||||
@@ -804,7 +862,7 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
this._queueUpdateStates();
|
this._queueUpdateStates();
|
||||||
},
|
},
|
||||||
|
|
||||||
syncStacking: function(stackIndices) {
|
_syncStacking: function(overview, stackIndices) {
|
||||||
for (let i = 0; i < this._thumbnails.length; i++)
|
for (let i = 0; i < this._thumbnails.length; i++)
|
||||||
this._thumbnails[i].syncStacking(stackIndices);
|
this._thumbnails[i].syncStacking(stackIndices);
|
||||||
},
|
},
|
||||||
@@ -1159,5 +1217,16 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
},
|
},
|
||||||
onCompleteScope: this
|
onCompleteScope: this
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_onScrollEvent: function (actor, event) {
|
||||||
|
switch (event.get_scroll_direction()) {
|
||||||
|
case Clutter.ScrollDirection.UP:
|
||||||
|
Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP);
|
||||||
|
break;
|
||||||
|
case Clutter.ScrollDirection.DOWN:
|
||||||
|
Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
@@ -51,7 +52,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._clipY = 0;
|
this._clipY = 0;
|
||||||
this._clipWidth = 0;
|
this._clipWidth = 0;
|
||||||
this._clipHeight = 0;
|
this._clipHeight = 0;
|
||||||
this._workspaceRatioSpacing = 0;
|
|
||||||
this._spacing = 0;
|
this._spacing = 0;
|
||||||
this._animating = false; // tweening
|
this._animating = false; // tweening
|
||||||
this._scrolling = false; // swipe-scrolling
|
this._scrolling = false; // swipe-scrolling
|
||||||
@@ -69,9 +69,10 @@ const WorkspacesView = new Lang.Class({
|
|||||||
|
|
||||||
// Add workspace actors
|
// Add workspace actors
|
||||||
for (let w = 0; w < global.screen.n_workspaces; w++)
|
for (let w = 0; w < global.screen.n_workspaces; w++)
|
||||||
this._workspaces[w].actor.reparent(this.actor);
|
this.actor.add_actor(this._workspaces[w].actor);
|
||||||
this._workspaces[activeWorkspaceIndex].actor.raise_top();
|
this._workspaces[activeWorkspaceIndex].actor.raise_top();
|
||||||
|
|
||||||
|
this._extraWorkspaces = [];
|
||||||
this._updateExtraWorkspaces();
|
this._updateExtraWorkspaces();
|
||||||
|
|
||||||
// Position/scale the desktop windows and their children after the
|
// Position/scale the desktop windows and their children after the
|
||||||
@@ -83,8 +84,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
for (let w = 0; w < this._workspaces.length; w++)
|
for (let w = 0; w < this._workspaces.length; w++)
|
||||||
this._workspaces[w].zoomToOverview();
|
this._workspaces[w].zoomToOverview();
|
||||||
if (!this._extraWorkspaces)
|
|
||||||
return;
|
|
||||||
for (let w = 0; w < this._extraWorkspaces.length; w++)
|
for (let w = 0; w < this._extraWorkspaces.length; w++)
|
||||||
this._extraWorkspaces[w].zoomToOverview();
|
this._extraWorkspaces[w].zoomToOverview();
|
||||||
}));
|
}));
|
||||||
@@ -124,38 +123,36 @@ const WorkspacesView = new Lang.Class({
|
|||||||
if (!this._settings.get_boolean('workspaces-only-on-primary'))
|
if (!this._settings.get_boolean('workspaces-only-on-primary'))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._extraWorkspaces = [];
|
|
||||||
let monitors = Main.layoutManager.monitors;
|
let monitors = Main.layoutManager.monitors;
|
||||||
for (let i = 0; i < monitors.length; i++) {
|
for (let i = 0; i < monitors.length; i++) {
|
||||||
if (i == Main.layoutManager.primaryIndex)
|
if (i == Main.layoutManager.primaryIndex)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
let ws = new Workspace.Workspace(null, i);
|
let ws = new Workspace.Workspace(null, i);
|
||||||
ws.setGeometry(monitors[i].x, monitors[i].y,
|
ws.setGeometry(monitors[i].x,
|
||||||
monitors[i].width, monitors[i].height);
|
monitors[i].y,
|
||||||
|
monitors[i].width,
|
||||||
|
monitors[i].height);
|
||||||
global.overlay_group.add_actor(ws.actor);
|
global.overlay_group.add_actor(ws.actor);
|
||||||
this._extraWorkspaces.push(ws);
|
this._extraWorkspaces.push(ws);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_destroyExtraWorkspaces: function() {
|
_destroyExtraWorkspaces: function() {
|
||||||
if (!this._extraWorkspaces)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (let m = 0; m < this._extraWorkspaces.length; m++)
|
for (let m = 0; m < this._extraWorkspaces.length; m++)
|
||||||
this._extraWorkspaces[m].destroy();
|
this._extraWorkspaces[m].destroy();
|
||||||
this._extraWorkspaces = null;
|
this._extraWorkspaces = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
setGeometry: function(x, y, width, height, spacing) {
|
setGeometry: function(x, y, width, height) {
|
||||||
if (this._x == x && this._y == y &&
|
if (this._x == x && this._y == y &&
|
||||||
this._width == width && this._height == height)
|
this._width == width && this._height == height)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._width = width;
|
this._width = width;
|
||||||
this._height = height;
|
this._height = height;
|
||||||
this._x = x;
|
this._x = x;
|
||||||
this._y = y;
|
this._y = y;
|
||||||
this._workspaceRatioSpacing = spacing;
|
|
||||||
|
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
this._workspaces[i].setGeometry(x, y, width, height);
|
this._workspaces[i].setGeometry(x, y, width, height);
|
||||||
@@ -191,8 +188,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
|
|
||||||
for (let w = 0; w < this._workspaces.length; w++)
|
for (let w = 0; w < this._workspaces.length; w++)
|
||||||
this._workspaces[w].zoomFromOverview();
|
this._workspaces[w].zoomFromOverview();
|
||||||
if (!this._extraWorkspaces)
|
|
||||||
return;
|
|
||||||
for (let w = 0; w < this._extraWorkspaces.length; w++)
|
for (let w = 0; w < this._extraWorkspaces.length; w++)
|
||||||
this._extraWorkspaces[w].zoomFromOverview();
|
this._extraWorkspaces[w].zoomFromOverview();
|
||||||
},
|
},
|
||||||
@@ -204,8 +199,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
syncStacking: function(stackIndices) {
|
syncStacking: function(stackIndices) {
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
this._workspaces[i].syncStacking(stackIndices);
|
this._workspaces[i].syncStacking(stackIndices);
|
||||||
if (!this._extraWorkspaces)
|
|
||||||
return;
|
|
||||||
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
||||||
this._extraWorkspaces[i].syncStacking(stackIndices);
|
this._extraWorkspaces[i].syncStacking(stackIndices);
|
||||||
},
|
},
|
||||||
@@ -215,11 +208,11 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._workspaces[w].positionWindows(Workspace.WindowPositionFlags.ANIMATE);
|
this._workspaces[w].positionWindows(Workspace.WindowPositionFlags.ANIMATE);
|
||||||
},
|
},
|
||||||
|
|
||||||
_scrollToActive: function(showAnimation) {
|
_scrollToActive: function() {
|
||||||
let active = global.screen.get_active_workspace_index();
|
let active = global.screen.get_active_workspace_index();
|
||||||
|
|
||||||
this._updateWorkspaceActors(showAnimation);
|
this._updateWorkspaceActors(true);
|
||||||
this._updateScrollAdjustment(active, showAnimation);
|
this._updateScrollAdjustment(active);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Update workspace actors parameters
|
// Update workspace actors parameters
|
||||||
@@ -234,7 +227,7 @@ const WorkspacesView = new Lang.Class({
|
|||||||
|
|
||||||
Tweener.removeTweens(workspace.actor);
|
Tweener.removeTweens(workspace.actor);
|
||||||
|
|
||||||
let y = (w - active) * (this._height + this._spacing + this._workspaceRatioSpacing);
|
let y = (w - active) * (this._height + this._spacing);
|
||||||
|
|
||||||
if (showAnimation) {
|
if (showAnimation) {
|
||||||
let params = { y: y,
|
let params = { y: y,
|
||||||
@@ -277,26 +270,21 @@ const WorkspacesView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateScrollAdjustment: function(index, showAnimation) {
|
_updateScrollAdjustment: function(index) {
|
||||||
if (this._scrolling)
|
if (this._scrolling)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._animatingScroll = true;
|
this._animatingScroll = true;
|
||||||
|
|
||||||
if (showAnimation) {
|
Tweener.addTween(this.scrollAdjustment, {
|
||||||
Tweener.addTween(this.scrollAdjustment, {
|
value: index,
|
||||||
value: index,
|
time: WORKSPACE_SWITCH_TIME,
|
||||||
time: WORKSPACE_SWITCH_TIME,
|
transition: 'easeOutQuad',
|
||||||
transition: 'easeOutQuad',
|
onComplete: Lang.bind(this,
|
||||||
onComplete: Lang.bind(this,
|
function() {
|
||||||
function() {
|
this._animatingScroll = false;
|
||||||
this._animatingScroll = false;
|
})
|
||||||
})
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.scrollAdjustment.value = index;
|
|
||||||
this._animatingScroll = false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
updateWorkspaces: function(oldNumWorkspaces, newNumWorkspaces) {
|
updateWorkspaces: function(oldNumWorkspaces, newNumWorkspaces) {
|
||||||
@@ -323,7 +311,7 @@ const WorkspacesView = new Lang.Class({
|
|||||||
if (this._scrolling)
|
if (this._scrolling)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._scrollToActive(true);
|
this._scrollToActive();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy: function() {
|
_onDestroy: function() {
|
||||||
@@ -376,9 +364,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._firstDragMotion = false;
|
this._firstDragMotion = false;
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
this._workspaces[i].setReservedSlot(dragEvent.dragActor._delegate);
|
this._workspaces[i].setReservedSlot(dragEvent.dragActor._delegate);
|
||||||
if (!this._extraWorkspaces)
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
|
||||||
|
|
||||||
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
||||||
this._extraWorkspaces[i].setReservedSlot(dragEvent.dragActor._delegate);
|
this._extraWorkspaces[i].setReservedSlot(dragEvent.dragActor._delegate);
|
||||||
}
|
}
|
||||||
@@ -392,9 +377,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
|
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
this._workspaces[i].setReservedSlot(null);
|
this._workspaces[i].setReservedSlot(null);
|
||||||
|
|
||||||
if (!this._extraWorkspaces)
|
|
||||||
return;
|
|
||||||
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
for (let i = 0; i < this._extraWorkspaces.length; i++)
|
||||||
this._extraWorkspaces[i].setReservedSlot(null);
|
this._extraWorkspaces[i].setReservedSlot(null);
|
||||||
},
|
},
|
||||||
@@ -403,24 +385,11 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._scrolling = true;
|
this._scrolling = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
endSwipeScroll: function(result) {
|
endSwipeScroll: function() {
|
||||||
this._scrolling = false;
|
this._scrolling = false;
|
||||||
|
|
||||||
if (result == Overview.SwipeScrollResult.CLICK) {
|
|
||||||
let [x, y, mod] = global.get_pointer();
|
|
||||||
let actor = global.stage.get_actor_at_pos(Clutter.PickMode.ALL,
|
|
||||||
x, y);
|
|
||||||
|
|
||||||
// Only switch to the workspace when there's no application
|
|
||||||
// windows open. The problem is that it's too easy to miss
|
|
||||||
// an app window and get the wrong one focused.
|
|
||||||
let active = global.screen.get_active_workspace_index();
|
|
||||||
if (this._workspaces[active].isEmpty() &&
|
|
||||||
this.actor.contains(actor))
|
|
||||||
Main.overview.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure title captions etc are shown as necessary
|
// Make sure title captions etc are shown as necessary
|
||||||
|
this._scrollToActive();
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -468,14 +437,51 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
Name: 'WorkspacesDisplay',
|
Name: 'WorkspacesDisplay',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.actor = new Shell.GenericContainer();
|
this.actor = new Shell.GenericContainer({ style_class: 'workspaces-display' });
|
||||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
||||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
||||||
this.actor.connect('notify::mapped', Lang.bind(this, this._setupSwipeScrolling));
|
|
||||||
this.actor.connect('parent-set', Lang.bind(this, this._parentSet));
|
this.actor.connect('parent-set', Lang.bind(this, this._parentSet));
|
||||||
this.actor.set_clip_to_allocation(true);
|
this.actor.set_clip_to_allocation(true);
|
||||||
|
|
||||||
|
this._spacing = 0;
|
||||||
|
this.actor.connect('style-changed', Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
let node = this.actor.get_theme_node();
|
||||||
|
let spacing = node.get_length('spacing');
|
||||||
|
if (spacing != this._spacing) {
|
||||||
|
this._spacing = spacing;
|
||||||
|
this._updateWorkspacesGeometry();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
let clickAction = new Clutter.ClickAction()
|
||||||
|
clickAction.connect('clicked', Lang.bind(this, function(action) {
|
||||||
|
// Only switch to the workspace when there's no application
|
||||||
|
// windows open. The problem is that it's too easy to miss
|
||||||
|
// an app window and get the wrong one focused.
|
||||||
|
if (action.get_button() == 1 &&
|
||||||
|
this._getPrimaryView().getActiveWorkspace().isEmpty())
|
||||||
|
Main.overview.hide();
|
||||||
|
}));
|
||||||
|
Main.overview.addAction(clickAction);
|
||||||
|
this.actor.bind_property('mapped', clickAction, 'enabled', GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
|
let panAction = new Clutter.PanAction();
|
||||||
|
panAction.connect('pan', Lang.bind(this, this._onPan));
|
||||||
|
panAction.connect('gesture-begin', Lang.bind(this, function() {
|
||||||
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
|
this._workspacesViews[i].startSwipeScroll();
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
panAction.connect('gesture-end', Lang.bind(this, function() {
|
||||||
|
clickAction.release();
|
||||||
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
|
this._workspacesViews[i].endSwipeScroll();
|
||||||
|
}));
|
||||||
|
Main.overview.addAction(panAction);
|
||||||
|
this.actor.bind_property('mapped', panAction, 'enabled', GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
let controls = new St.Bin({ style_class: 'workspace-controls',
|
let controls = new St.Bin({ style_class: 'workspace-controls',
|
||||||
request_mode: Clutter.RequestMode.WIDTH_FOR_HEIGHT,
|
request_mode: Clutter.RequestMode.WIDTH_FOR_HEIGHT,
|
||||||
y_align: St.Align.START,
|
y_align: St.Align.START,
|
||||||
@@ -487,15 +493,14 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
controls.track_hover = true;
|
controls.track_hover = true;
|
||||||
controls.connect('notify::hover',
|
controls.connect('notify::hover',
|
||||||
Lang.bind(this, this._onControlsHoverChanged));
|
Lang.bind(this, this._onControlsHoverChanged));
|
||||||
controls.connect('scroll-event',
|
|
||||||
Lang.bind(this, this._onScrollEvent));
|
|
||||||
|
|
||||||
this._primaryIndex = Main.layoutManager.primaryIndex;
|
this._primaryIndex = Main.layoutManager.primaryIndex;
|
||||||
|
|
||||||
this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
|
this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
|
||||||
controls.add_actor(this._thumbnailsBox.actor);
|
controls.add_actor(this._thumbnailsBox.actor);
|
||||||
|
|
||||||
this._workspacesViews = null;
|
this._workspacesViews = [];
|
||||||
|
this._workspaces = [];
|
||||||
this._primaryScrollAdjustment = null;
|
this._primaryScrollAdjustment = null;
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema: OVERRIDE_SCHEMA });
|
this._settings = new Gio.Settings({ schema: OVERRIDE_SCHEMA });
|
||||||
@@ -543,6 +548,13 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
this._swipeScrollEndId = 0;
|
this._swipeScrollEndId = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onPan: function(action) {
|
||||||
|
let [dist, dx, dy] = action.get_motion_delta(0);
|
||||||
|
let adjustment = this._scrollAdjustment;
|
||||||
|
adjustment.value -= (dy / this.actor.height) * adjustment.page_size;
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
if(!this._alwaysZoomOut) {
|
if(!this._alwaysZoomOut) {
|
||||||
let [mouseX, mouseY] = global.get_pointer();
|
let [mouseX, mouseY] = global.get_pointer();
|
||||||
@@ -562,12 +574,11 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
this._updateZoom();
|
this._updateZoom();
|
||||||
|
|
||||||
this._controls.show();
|
this._controls.show();
|
||||||
this._thumbnailsBox.show();
|
|
||||||
|
|
||||||
this._updateWorkspacesViews();
|
this._updateWorkspacesViews();
|
||||||
|
|
||||||
this._restackedNotifyId =
|
this._restackedNotifyId =
|
||||||
global.screen.connect('restacked',
|
Main.overview.connect('windows-restacked',
|
||||||
Lang.bind(this, this._onRestacked));
|
Lang.bind(this, this._onRestacked));
|
||||||
|
|
||||||
if (this._itemDragBeginId == 0)
|
if (this._itemDragBeginId == 0)
|
||||||
@@ -588,8 +599,6 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
if (this._windowDragEndId == 0)
|
if (this._windowDragEndId == 0)
|
||||||
this._windowDragEndId = Main.overview.connect('window-drag-end',
|
this._windowDragEndId = Main.overview.connect('window-drag-end',
|
||||||
Lang.bind(this, this._dragEnd));
|
Lang.bind(this, this._dragEnd));
|
||||||
|
|
||||||
this._onRestacked();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
zoomFromOverview: function() {
|
zoomFromOverview: function() {
|
||||||
@@ -600,13 +609,12 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
this._controls.hide();
|
this._controls.hide();
|
||||||
this._thumbnailsBox.hide();
|
|
||||||
|
|
||||||
if (!this._alwaysZoomOut)
|
if (!this._alwaysZoomOut)
|
||||||
this.zoomFraction = 0;
|
this.zoomFraction = 0;
|
||||||
|
|
||||||
if (this._restackedNotifyId > 0){
|
if (this._restackedNotifyId > 0){
|
||||||
global.screen.disconnect(this._restackedNotifyId);
|
Main.overview.disconnect(this._restackedNotifyId);
|
||||||
this._restackedNotifyId = 0;
|
this._restackedNotifyId = 0;
|
||||||
}
|
}
|
||||||
if (this._itemDragBeginId > 0) {
|
if (this._itemDragBeginId > 0) {
|
||||||
@@ -636,7 +644,7 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
this._workspacesViews[i].destroy();
|
this._workspacesViews[i].destroy();
|
||||||
this._workspacesViews = null;
|
this._workspacesViews = [];
|
||||||
|
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
for (let w = 0; w < this._workspaces[i].length; w++) {
|
for (let w = 0; w < this._workspaces[i].length; w++) {
|
||||||
@@ -645,33 +653,6 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_setupSwipeScrolling: function() {
|
|
||||||
if (this._swipeScrollBeginId)
|
|
||||||
Main.overview.disconnect(this._swipeScrollBeginId);
|
|
||||||
this._swipeScrollBeginId = 0;
|
|
||||||
|
|
||||||
if (this._swipeScrollEndId)
|
|
||||||
Main.overview.disconnect(this._swipeScrollEndId);
|
|
||||||
this._swipeScrollEndId = 0;
|
|
||||||
|
|
||||||
if (!this.actor.mapped)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let direction = Overview.SwipeScrollDirection.VERTICAL;
|
|
||||||
Main.overview.setScrollAdjustment(this._scrollAdjustment,
|
|
||||||
direction);
|
|
||||||
this._swipeScrollBeginId = Main.overview.connect('swipe-scroll-begin',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
|
||||||
this._workspacesViews[i].startSwipeScroll();
|
|
||||||
}));
|
|
||||||
this._swipeScrollEndId = Main.overview.connect('swipe-scroll-end',
|
|
||||||
Lang.bind(this, function(overview, result) {
|
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
|
||||||
this._workspacesViews[i].endSwipeScroll(result);
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
|
|
||||||
_workspacesOnlyOnPrimaryChanged: function() {
|
_workspacesOnlyOnPrimaryChanged: function() {
|
||||||
this._workspacesOnlyOnPrimary = this._settings.get_boolean('workspaces-only-on-primary');
|
this._workspacesOnlyOnPrimary = this._settings.get_boolean('workspaces-only-on-primary');
|
||||||
|
|
||||||
@@ -682,14 +663,12 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateWorkspacesViews: function() {
|
_updateWorkspacesViews: function() {
|
||||||
if (this._workspacesViews)
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
this._workspacesViews[i].destroy();
|
||||||
this._workspacesViews[i].destroy();
|
|
||||||
|
|
||||||
if (this._workspaces)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let w = 0; w < this._workspaces[i].length; w++)
|
||||||
for (let w = 0; w < this._workspaces[i].length; w++)
|
this._workspaces[i][w].destroy();
|
||||||
this._workspaces[i][w].destroy();
|
|
||||||
|
|
||||||
this._workspacesViews = [];
|
this._workspacesViews = [];
|
||||||
this._workspaces = [];
|
this._workspaces = [];
|
||||||
@@ -711,7 +690,6 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
this._scrollAdjustment = view.scrollAdjustment;
|
this._scrollAdjustment = view.scrollAdjustment;
|
||||||
this._scrollAdjustment.connect('notify::value',
|
this._scrollAdjustment.connect('notify::value',
|
||||||
Lang.bind(this, this._scrollValueChanged));
|
Lang.bind(this, this._scrollValueChanged));
|
||||||
this._setupSwipeScrolling();
|
|
||||||
}
|
}
|
||||||
this._workspacesViews.push(view);
|
this._workspacesViews.push(view);
|
||||||
}
|
}
|
||||||
@@ -738,7 +716,7 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_getPrimaryView: function() {
|
_getPrimaryView: function() {
|
||||||
if (!this._workspacesViews)
|
if (!this._workspacesViews.length)
|
||||||
return null;
|
return null;
|
||||||
if (this._workspacesOnlyOnPrimary)
|
if (this._workspacesOnlyOnPrimary)
|
||||||
return this._workspacesViews[0];
|
return this._workspacesViews[0];
|
||||||
@@ -847,7 +825,7 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateWorkspacesGeometry: function() {
|
_updateWorkspacesGeometry: function() {
|
||||||
if (!this._workspacesViews)
|
if (!this._workspacesViews.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let fullWidth = this.actor.allocation.x2 - this.actor.allocation.x1;
|
let fullWidth = this.actor.allocation.x2 - this.actor.allocation.x1;
|
||||||
@@ -864,28 +842,23 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);
|
let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);
|
||||||
|
|
||||||
let clipWidth = width - controlsVisible;
|
let clipWidth = width - controlsVisible;
|
||||||
let clipHeight = (fullHeight / fullWidth) * clipWidth;
|
let clipHeight = fullHeight;
|
||||||
let clipX = rtl ? x + controlsVisible : x;
|
let clipX = rtl ? x + controlsVisible : x;
|
||||||
let clipY = y + (fullHeight - clipHeight) / 2;
|
let clipY = y + (fullHeight - clipHeight) / 2;
|
||||||
|
|
||||||
let widthAdjust = this._zoomOut ? controlsNatural : controlsVisible;
|
let widthAdjust = this._zoomOut ? controlsNatural : controlsVisible;
|
||||||
|
widthAdjust += this._spacing;
|
||||||
width -= widthAdjust;
|
width -= widthAdjust;
|
||||||
if (rtl)
|
if (rtl)
|
||||||
x += widthAdjust;
|
x += widthAdjust;
|
||||||
|
|
||||||
height = (fullHeight / fullWidth) * width;
|
|
||||||
let difference = fullHeight - height;
|
|
||||||
y += difference / 2;
|
|
||||||
|
|
||||||
|
|
||||||
let monitors = Main.layoutManager.monitors;
|
let monitors = Main.layoutManager.monitors;
|
||||||
let m = 0;
|
let m = 0;
|
||||||
for (let i = 0; i < monitors.length; i++) {
|
for (let i = 0; i < monitors.length; i++) {
|
||||||
if (i == this._primaryIndex) {
|
if (i == this._primaryIndex) {
|
||||||
this._workspacesViews[m].setClipRect(clipX, clipY,
|
this._workspacesViews[m].setClipRect(clipX, clipY,
|
||||||
clipWidth, clipHeight);
|
clipWidth, clipHeight);
|
||||||
this._workspacesViews[m].setGeometry(x, y, width, height,
|
this._workspacesViews[m].setGeometry(x, y, width, height);
|
||||||
difference);
|
|
||||||
m++;
|
m++;
|
||||||
} else if (!this._workspacesOnlyOnPrimary) {
|
} else if (!this._workspacesOnlyOnPrimary) {
|
||||||
this._workspacesViews[m].setClipRect(monitors[i].x,
|
this._workspacesViews[m].setClipRect(monitors[i].x,
|
||||||
@@ -895,32 +868,22 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
this._workspacesViews[m].setGeometry(monitors[i].x,
|
this._workspacesViews[m].setGeometry(monitors[i].x,
|
||||||
monitors[i].y,
|
monitors[i].y,
|
||||||
monitors[i].width,
|
monitors[i].width,
|
||||||
monitors[i].height, 0);
|
monitors[i].height);
|
||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onRestacked: function() {
|
_onRestacked: function(overview, stackIndices) {
|
||||||
let stack = global.get_window_actors();
|
|
||||||
let stackIndices = {};
|
|
||||||
|
|
||||||
for (let i = 0; i < stack.length; i++) {
|
|
||||||
// Use the stable sequence for an integer to use as a hash key
|
|
||||||
stackIndices[stack[i].get_meta_window().get_stable_sequence()] = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
this._workspacesViews[i].syncStacking(stackIndices);
|
this._workspacesViews[i].syncStacking(stackIndices);
|
||||||
|
|
||||||
this._thumbnailsBox.syncStacking(stackIndices);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_workspacesChanged: function() {
|
_workspacesChanged: function() {
|
||||||
this._updateAlwaysZoom();
|
this._updateAlwaysZoom();
|
||||||
this._updateZoom();
|
this._updateZoom();
|
||||||
|
|
||||||
if (this._workspacesViews == null)
|
if (!this._workspacesViews.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let oldNumWorkspaces = this._workspaces[0].length;
|
let oldNumWorkspaces = this._workspaces[0].length;
|
||||||
@@ -932,19 +895,18 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
let monitors = Main.layoutManager.monitors;
|
let monitors = Main.layoutManager.monitors;
|
||||||
let m = 0;
|
let m = 0;
|
||||||
for (let i = 0; i < monitors.length; i++) {
|
for (let i = 0; i < monitors.length; i++) {
|
||||||
if (this._workspacesOnlyOnPrimaryChanged &&
|
if (this._workspacesOnlyOnPrimary &&
|
||||||
i != this._primaryIndex)
|
i != this._primaryIndex)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Assume workspaces are only added at the end
|
// Assume workspaces are only added at the end
|
||||||
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
||||||
let metaWorkspace = global.screen.get_workspace_by_index(w);
|
let metaWorkspace = global.screen.get_workspace_by_index(w);
|
||||||
this._workspaces[m++][w] =
|
this._workspaces[m][w] =
|
||||||
new Workspace.Workspace(metaWorkspace, i);
|
new Workspace.Workspace(metaWorkspace, i);
|
||||||
}
|
}
|
||||||
|
m++;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._thumbnailsBox.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
|
|
||||||
} else {
|
} else {
|
||||||
// Assume workspaces are only removed sequentially
|
// Assume workspaces are only removed sequentially
|
||||||
// (e.g. 2,3,4 - not 2,4,7)
|
// (e.g. 2,3,4 - not 2,4,7)
|
||||||
@@ -967,8 +929,6 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
lostWorkspaces[l].destroy();
|
lostWorkspaces[l].destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._thumbnailsBox.removeThumbmails(removedIndex, removedNum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
@@ -985,7 +945,7 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
this._zoomOut = shouldZoom;
|
this._zoomOut = shouldZoom;
|
||||||
this._updateWorkspacesGeometry();
|
this._updateWorkspacesGeometry();
|
||||||
|
|
||||||
if (!this._workspacesViews)
|
if (!this._workspacesViews.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Tweener.addTween(this,
|
Tweener.addTween(this,
|
||||||
@@ -1036,17 +996,6 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
// might as well avoid it.
|
// might as well avoid it.
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
||||||
Lang.bind(this, this._updateZoom));
|
Lang.bind(this, this._updateZoom));
|
||||||
},
|
|
||||||
|
|
||||||
_onScrollEvent: function (actor, event) {
|
|
||||||
switch ( event.get_scroll_direction() ) {
|
|
||||||
case Clutter.ScrollDirection.UP:
|
|
||||||
Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP);
|
|
||||||
break;
|
|
||||||
case Clutter.ScrollDirection.DOWN:
|
|
||||||
Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(WorkspacesDisplay.prototype);
|
Signals.addSignalMethods(WorkspacesDisplay.prototype);
|
||||||
|
|||||||
@@ -1 +1,19 @@
|
|||||||
dist_man_MANS = gnome-shell.1
|
XSLTPROC_FLAGS = \
|
||||||
|
--nonet \
|
||||||
|
--stringparam man.output.quietly 1 \
|
||||||
|
--stringparam funcsynopsis.style ansi \
|
||||||
|
--stringparam man.th.extra1.suppress 1 \
|
||||||
|
--stringparam man.authors.section.enabled 0 \
|
||||||
|
--stringparam man.copyright.section.enabled 0
|
||||||
|
|
||||||
|
.xml.1:
|
||||||
|
$(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||||
|
|
||||||
|
man_MANS = \
|
||||||
|
gnome-shell.1
|
||||||
|
|
||||||
|
xml_files = $(man_MANS:.1=.xml)
|
||||||
|
|
||||||
|
EXTRA_DIST = $(xml_files)
|
||||||
|
|
||||||
|
DISTCLEANFILES = $(man_MANS)
|
||||||
|
|||||||
@@ -1,94 +0,0 @@
|
|||||||
.\" Copyright (c) 2009, Marcelo Jorge Vieira (metal) <metal@alucinados.com>
|
|
||||||
.\"
|
|
||||||
.\" This is free documentation; you can redistribute it and/or
|
|
||||||
.\" modify it under the terms of the GNU General Public License as
|
|
||||||
.\" published by the Free Software Foundation; either version 2 of
|
|
||||||
.\" the License, or (at your option) any later version.
|
|
||||||
.\"
|
|
||||||
.\" The GNU General Public License's references to "object code"
|
|
||||||
.\" and "executables" are to be interpreted as the output of any
|
|
||||||
.\" document formatting or typesetting system, including
|
|
||||||
.\" intermediate and printed output.
|
|
||||||
.\"
|
|
||||||
.\" This manual is distributed in the hope that it will be useful,
|
|
||||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
.\" GNU General Public License for more details.
|
|
||||||
.\"
|
|
||||||
.\" You should have received a copy of the GNU General Public
|
|
||||||
.\" License along with this manual; if not, write to the Free
|
|
||||||
.\" Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
.\" Boston, MA 02111-1301 USA.
|
|
||||||
.TH GNOME-SHELL 1
|
|
||||||
.SH NAME
|
|
||||||
gnome-shell \- Graphical shell for the GNOME desktop
|
|
||||||
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B gnome-shell [options]
|
|
||||||
|
|
||||||
.SH DESCRIPTION
|
|
||||||
GNOME Shell provides core user interface functions for the GNOME 3
|
|
||||||
desktop, like switching to windows and launching applications. GNOME
|
|
||||||
Shell takes advantage of the capabilities of modern graphics hardware
|
|
||||||
and introduces innovative user interface concepts to provide a
|
|
||||||
visually attractive and easy to use experience.
|
|
||||||
|
|
||||||
.SH OPTIONS
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-replace
|
|
||||||
Replace the running window manager
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-sm-disable
|
|
||||||
Disable connection to the session manager
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-sm-client-id=ID
|
|
||||||
Specify session management ID
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-sm-save-file=FILE
|
|
||||||
Initialize session from savefile
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-screen=SCREEN
|
|
||||||
X screen to use
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-d, \-\-display=DISPLAY
|
|
||||||
X display to use
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-sync
|
|
||||||
Make X calls synchronous
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-version
|
|
||||||
Print version and exit
|
|
||||||
.br
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B \-\-help
|
|
||||||
Display help and exit
|
|
||||||
.br
|
|
||||||
|
|
||||||
.SH BUGS
|
|
||||||
The bug tracker can be reached by visiting the website
|
|
||||||
\fIhttps://bugzilla.gnome.org/buglist.cgi?product=gnome-shell\fR
|
|
||||||
|
|
||||||
Before sending a bug report, please verify that you have the latest
|
|
||||||
version of gnome-shell. Many bugs (major and minor) are fixed at each
|
|
||||||
release, and if yours is out of date, the problem may already have
|
|
||||||
been solved.
|
|
||||||
|
|
||||||
.SH ADDITIONAL INFORMATION
|
|
||||||
|
|
||||||
For further information, visit the website \fIhttp://live.gnome.org/GnomeShell\fR
|
|
||||||
159
man/gnome-shell.xml
Normal file
159
man/gnome-shell.xml
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
<?xml version='1.0'?>
|
||||||
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
|
<refentry id="gnome-shell">
|
||||||
|
|
||||||
|
<refentryinfo>
|
||||||
|
<title>gnome-shell</title>
|
||||||
|
<productname>gnome-shell</productname>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<contrib>wrote the original gnome-shell man page</contrib>
|
||||||
|
<firstname>Marcelo Jorge</firstname>
|
||||||
|
<surname>Vieira</surname>
|
||||||
|
<email>metal@alucinados.com</email>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
</refentryinfo>
|
||||||
|
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>gnome-shell</refentrytitle>
|
||||||
|
<manvolnum>1</manvolnum>
|
||||||
|
</refmeta>
|
||||||
|
|
||||||
|
<refnamediv>
|
||||||
|
<refname>gnome-shell</refname>
|
||||||
|
<refpurpose>Graphical shell for the GNOME desktop</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
|
<refsynopsisdiv>
|
||||||
|
<cmdsynopsis>
|
||||||
|
<command>gnome-shell <arg choice="opt" rep="repeat">OPTION</arg></command>
|
||||||
|
</cmdsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Description</title>
|
||||||
|
|
||||||
|
<para>GNOME shell provides core user
|
||||||
|
interface functions for the GNOME 3 desktop, like switching
|
||||||
|
to windows and launching applications. GNOME shell takes
|
||||||
|
advantage of the capabilities of modern graphics hardware
|
||||||
|
and introduces innovative user interface concepts to provide
|
||||||
|
a visually attractive and easy to use experience.</para>
|
||||||
|
|
||||||
|
<para>gnome-shell is a required component of
|
||||||
|
the GNOME desktop, i.e. it is listed in the
|
||||||
|
RequiredComponents field of
|
||||||
|
<filename>/usr/share/gnome-session/sessions/gnome.session</filename>.
|
||||||
|
It is started in the window manager phase of the session.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Options</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-r</option>, <option>--replace</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Replace the running window manager</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--sm-disable</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Disable connection to the session manager</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--sm-client-id=<replaceable>ID</replaceable></option></term>
|
||||||
|
|
||||||
|
<listitem><para>Specify session management <replaceable>ID</replaceable></para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--sm-save-file=<replaceable>FILE</replaceable></option></term>
|
||||||
|
|
||||||
|
<listitem><para>Initialize session from <replaceable>FILE</replaceable></para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--screen=<replaceable>SCREEN</replaceable></option></term>
|
||||||
|
|
||||||
|
<listitem><para>X screen to use</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-d</option>, <option>--display=<replaceable>DISPLAY</replaceable></option></term>
|
||||||
|
|
||||||
|
<listitem><para>X Display to use</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--sync</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Make X calls synchronous</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--version</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Print version and exit</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--help</option></term>
|
||||||
|
|
||||||
|
<listitem><para>Display help and exit</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--mode=<replaceable>MODE</replaceable></option></term>
|
||||||
|
|
||||||
|
<listitem><para>Use a specific mode, e.g. "gdm" for login screen</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--list-modes</option></term>
|
||||||
|
|
||||||
|
<listitem><para>List possible modes and exit</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Files</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<filename>/usr/share/gnome-session/sessions/gnome.session</filename>,
|
||||||
|
<filename>/usr/share/applications/gnome-shell.desktop</filename>.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Bugs</title>
|
||||||
|
|
||||||
|
<para>The bug tracker can be reached by visiting the
|
||||||
|
website <ulink url="https://bugzilla.gnome.org/buglist.cgi?product=gnome-shell">https://bugzilla.gnome.org/buglist.cgi?product=gnome-shell</ulink>.
|
||||||
|
Before sending a bug report, please verify that you have
|
||||||
|
the latest version of gnome-shell. Many bugs (major and
|
||||||
|
minor) are fixed at each release, and if yours is out of
|
||||||
|
date, the problem may already have been solved.</para>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Additional Information</title>
|
||||||
|
|
||||||
|
<para>For further information, visit the website
|
||||||
|
<ulink url="http://live.gnome.org/GnomeShell">http://live.gnome.org/GnomeShell</ulink>.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
</refentry>
|
||||||
@@ -34,6 +34,7 @@ kk
|
|||||||
kn
|
kn
|
||||||
ko
|
ko
|
||||||
ku
|
ku
|
||||||
|
ky
|
||||||
lt
|
lt
|
||||||
lv
|
lv
|
||||||
ml
|
ml
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ js/ui/components/networkAgent.js
|
|||||||
js/ui/components/polkitAgent.js
|
js/ui/components/polkitAgent.js
|
||||||
js/ui/components/recorder.js
|
js/ui/components/recorder.js
|
||||||
js/ui/components/telepathyClient.js
|
js/ui/components/telepathyClient.js
|
||||||
|
js/ui/ctrlAltTab.js
|
||||||
js/ui/dash.js
|
js/ui/dash.js
|
||||||
js/ui/dateMenu.js
|
js/ui/dateMenu.js
|
||||||
js/ui/endSessionDialog.js
|
js/ui/endSessionDialog.js
|
||||||
|
|||||||
390
po/be.po
390
po/be.po
@@ -5,8 +5,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: gnome-shell.master\n"
|
"Project-Id-Version: gnome-shell.master\n"
|
||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
||||||
"shell&keywords=I18N+L10N&component=general\n"
|
"shell&keywords=I18N+L10N&component=general\n"
|
||||||
"POT-Creation-Date: 2012-09-06 15:33+0000\n"
|
"POT-Creation-Date: 2012-10-15 23:38+0000\n"
|
||||||
"PO-Revision-Date: 2012-09-07 18:58+0300\n"
|
"PO-Revision-Date: 2012-10-16 12:05+0300\n"
|
||||||
"Last-Translator: Kasia Bondarava <kasia.bondarava@gmail.com>\n"
|
"Last-Translator: Kasia Bondarava <kasia.bondarava@gmail.com>\n"
|
||||||
"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
|
"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
|
||||||
"Language: be\n"
|
"Language: be\n"
|
||||||
@@ -18,6 +18,30 @@ msgstr ""
|
|||||||
"X-Generator: Virtaal 0.7.0\n"
|
"X-Generator: Virtaal 0.7.0\n"
|
||||||
"X-Project-Style: gnome\n"
|
"X-Project-Style: gnome\n"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:1
|
||||||
|
msgid "Screenshots"
|
||||||
|
msgstr "Здымка экрана"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:2
|
||||||
|
msgid "Record a screencast"
|
||||||
|
msgstr "Запіс скрынкасту"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:1
|
||||||
|
msgid "System"
|
||||||
|
msgstr "Сістэма"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:2
|
||||||
|
msgid "Show the message tray"
|
||||||
|
msgstr "Паказаць абшар апавяшчэнняў"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:3
|
||||||
|
msgid "Show all applications"
|
||||||
|
msgstr "Паказаць усе праграмы"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:4
|
||||||
|
msgid "Open the application menu"
|
||||||
|
msgstr "Адкрыць праграмнае меню"
|
||||||
|
|
||||||
#: ../data/gnome-shell.desktop.in.in.h:1
|
#: ../data/gnome-shell.desktop.in.in.h:1
|
||||||
msgid "GNOME Shell"
|
msgid "GNOME Shell"
|
||||||
msgstr "Абалонка GNOME"
|
msgstr "Абалонка GNOME"
|
||||||
@@ -95,18 +119,14 @@ msgstr ""
|
|||||||
"праграм."
|
"праграм."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:9
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:9
|
||||||
msgid "disabled OpenSearch providers"
|
|
||||||
msgstr "выключаныя правайдары OpenSearch"
|
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:10
|
|
||||||
msgid "History for command (Alt-F2) dialog"
|
msgid "History for command (Alt-F2) dialog"
|
||||||
msgstr "Журнал загаднага дыялогу (Alt-F2)"
|
msgstr "Журнал загаднага дыялогу (Alt-F2)"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:11
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:10
|
||||||
msgid "History for the looking glass dialog"
|
msgid "History for the looking glass dialog"
|
||||||
msgstr "Журнал дыялогу Looking Glass"
|
msgstr "Журнал дыялогу Looking Glass"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:12
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:11
|
||||||
msgid ""
|
msgid ""
|
||||||
"Internally used to store the last IM presence explicitly set by the user. "
|
"Internally used to store the last IM presence explicitly set by the user. "
|
||||||
"The value here is from the TpConnectionPresenceType enumeration."
|
"The value here is from the TpConnectionPresenceType enumeration."
|
||||||
@@ -115,7 +135,7 @@ msgstr ""
|
|||||||
"камунікатара, настаўленага асабіста карыстальнікам. Гэта значэнне - адно з "
|
"камунікатара, настаўленага асабіста карыстальнікам. Гэта значэнне - адно з "
|
||||||
"пераліку TpConnectionPresenceType."
|
"пераліку TpConnectionPresenceType."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:13
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:12
|
||||||
msgid ""
|
msgid ""
|
||||||
"Internally used to store the last session presence status for the user. The "
|
"Internally used to store the last session presence status for the user. The "
|
||||||
"value here is from the GsmPresenceStatus enumeration."
|
"value here is from the GsmPresenceStatus enumeration."
|
||||||
@@ -123,51 +143,60 @@ msgstr ""
|
|||||||
"Выкарыстоўваецца ўнутры сістэмы для захавання апошняга стану прысутнасці "
|
"Выкарыстоўваецца ўнутры сістэмы для захавання апошняга стану прысутнасці "
|
||||||
"камунікатара карыстальніка. Гэта значэнне - з пераліку GsmPresenceStatus."
|
"камунікатара карыстальніка. Гэта значэнне - з пераліку GsmPresenceStatus."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:14
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:13
|
||||||
msgid "Show the week date in the calendar"
|
msgid "Show the week date in the calendar"
|
||||||
msgstr "Паказваць тыдзень у календары"
|
msgstr "Паказваць тыдзень у календары"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:15
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:14
|
||||||
msgid "If true, display the ISO week date in the calendar."
|
msgid "If true, display the ISO week date in the calendar."
|
||||||
msgstr "Калі ўключана, паказваць тыдзень у календары ў ISO-фармаце."
|
msgstr "Калі ўключана, паказваць тыдзень у календары ў ISO-фармаце."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:16
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:15
|
||||||
msgid "Keybinding to open the application menu"
|
msgid "Keybinding to open the application menu"
|
||||||
msgstr "Клавіятурны скарот для адкрыцця праграмнага меню"
|
msgstr "Клавіятурны скарот для адкрыцця праграмнага меню"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:17
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:16
|
||||||
msgid "Keybinding to open the application menu."
|
msgid "Keybinding to open the application menu."
|
||||||
msgstr "Клавіятурны скарот для адкрыцця праграмнага меню."
|
msgstr "Клавіятурны скарот для адкрыцця праграмнага меню."
|
||||||
|
|
||||||
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:17
|
||||||
|
msgid "Keybinding to open the \"Show Applications\" view"
|
||||||
|
msgstr "Клавіятурны скарот для рэжыму \"Паказаць праграмы\""
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:18
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:18
|
||||||
|
msgid ""
|
||||||
|
"Keybinding to open the \"Show Applications\" view of the Activities Overview."
|
||||||
|
msgstr "Клавіятурны скарот для рэжыму \"Паказаць праграмы\" у Аглядзе Заняткаў."
|
||||||
|
|
||||||
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:19
|
||||||
msgid "Keybinding to toggle the visibility of the message tray"
|
msgid "Keybinding to toggle the visibility of the message tray"
|
||||||
msgstr "Клавіятурны скарот для ўключэння/выключэння абшару апавяшчэнняў"
|
msgstr "Клавіятурны скарот для ўключэння/выключэння абшару апавяшчэнняў"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:19
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:20
|
||||||
msgid "Keybinding to toggle the visibility of the message tray."
|
msgid "Keybinding to toggle the visibility of the message tray."
|
||||||
msgstr "Клавіятурны скарот для ўключэння/выключэння абшару апавяшчэнняў."
|
msgstr "Клавіятурны скарот для ўключэння/выключэння абшару апавяшчэнняў."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:20
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:21
|
||||||
msgid "Keybinding to toggle the screen recorder"
|
msgid "Keybinding to toggle the screen recorder"
|
||||||
msgstr "Клавіятурны скарот для ўключэння запісу экрана"
|
msgstr "Клавіятурны скарот для ўключэння запісу экрана"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:21
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:22
|
||||||
msgid "Keybinding to start/stop the builtin screen recorder."
|
msgid "Keybinding to start/stop the builtin screen recorder."
|
||||||
msgstr "Клавіятурны скарот для запуску/спынення ўбудаванага запісу экрана."
|
msgstr "Клавіятурны скарот для запуску/спынення ўбудаванага запісу экрана."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:22
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23
|
||||||
msgid "Which keyboard to use"
|
msgid "Which keyboard to use"
|
||||||
msgstr "Ужываная клавіятура"
|
msgstr "Ужываная клавіятура"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24
|
||||||
msgid "The type of keyboard to use."
|
msgid "The type of keyboard to use."
|
||||||
msgstr "Від ужыванай клавіятуры."
|
msgstr "Від ужыванай клавіятуры."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
||||||
msgid "Framerate used for recording screencasts."
|
msgid "Framerate used for recording screencasts."
|
||||||
msgstr "Частата змены кадраў для запісу скрынкасту."
|
msgstr "Частата змены кадраў для запісу скрынкасту."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:26
|
||||||
msgid ""
|
msgid ""
|
||||||
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
||||||
"screencast recorder in frames-per-second."
|
"screencast recorder in frames-per-second."
|
||||||
@@ -175,11 +204,11 @@ msgstr ""
|
|||||||
"Частата змены кадраў выніковага скрынкасту, запісанага пры дапамозе абалонкі "
|
"Частата змены кадраў выніковага скрынкасту, запісанага пры дапамозе абалонкі "
|
||||||
"GNOME (кадраў на секунду)."
|
"GNOME (кадраў на секунду)."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:26
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:27
|
||||||
msgid "The gstreamer pipeline used to encode the screencast"
|
msgid "The gstreamer pipeline used to encode the screencast"
|
||||||
msgstr "Канвеер gstreamer для кадавання скрынкастаў"
|
msgstr "Канвеер gstreamer для кадавання скрынкастаў"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
||||||
@@ -189,9 +218,9 @@ msgid ""
|
|||||||
"pipeline can also take care of its own output - this might be used to send "
|
"pipeline can also take care of its own output - this might be used to send "
|
||||||
"the output to an icecast server via shout2send or similar. When unset or set "
|
"the output to an icecast server via shout2send or similar. When unset or set "
|
||||||
"to an empty value, the default pipeline will be used. This is currently "
|
"to an empty value, the default pipeline will be used. This is currently "
|
||||||
"'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux' and records to WEBM "
|
"'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 "
|
||||||
"using the VP8 codec. %T is used as a placeholder for a guess at the optimal "
|
"threads=%T ! queue ! webmmux' and records to WEBM using the VP8 codec. %T is "
|
||||||
"thread count on the system."
|
"used as a placeholder for a guess at the optimal thread count on the system."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Настаўляе канвеер GStreamer для кадавання запісаў. Ён прытрымліваецца "
|
"Настаўляе канвеер GStreamer для кадавання запісаў. Ён прытрымліваецца "
|
||||||
"сінтаксіса gst-launch. Неабходна, каб з боку элемента канвеера, дзе "
|
"сінтаксіса gst-launch. Неабходна, каб з боку элемента канвеера, дзе "
|
||||||
@@ -200,15 +229,16 @@ msgstr ""
|
|||||||
"канвеер таксама можа самастойна абслугоўваць свой вывад. Напрыклад, гэта "
|
"канвеер таксама можа самастойна абслугоўваць свой вывад. Напрыклад, гэта "
|
||||||
"можа спатрэбіцца для пасылкі вываду на icecast-сервер пры дапамозе "
|
"можа спатрэбіцца для пасылкі вываду на icecast-сервер пры дапамозе "
|
||||||
"shout2send ці пад. Калі не настаўлена ці настаўлена пустое значэнне, будзе "
|
"shout2send ці пад. Калі не настаўлена ці настаўлена пустое значэнне, будзе "
|
||||||
"ўжыты прадвызначаны канвеер. Цяпер выкарыстоўваецца \"vp8enc quality=8 "
|
"ўжыты прадвызначаны канвеер. Цяпер выкарыстоўваецца \"vp8enc "
|
||||||
"speed=6 threads=%T ! queue ! webmmux\" і запісвае ў WEBM з дапамогай кодэка "
|
"min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! "
|
||||||
"VP8. %T ўжываецца ў якасці замены аптымальнай для сістэмы колькасці ніцяў."
|
"queue ! webmmux\" і запісвае ў WEBM з дапамогай кодэка VP8. %T ўжываецца ў "
|
||||||
|
"якасці замены аптымальнай для сістэмы колькасці ніцяў."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:30
|
||||||
msgid "File extension used for storing the screencast"
|
msgid "File extension used for storing the screencast"
|
||||||
msgstr "Пашырэнне файла для захавання скрынкасту"
|
msgstr "Пашырэнне файла для захавання скрынкасту"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:30
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:31
|
||||||
msgid ""
|
msgid ""
|
||||||
"The filename for recorded screencasts will be a unique filename based on the "
|
"The filename for recorded screencasts will be a unique filename based on the "
|
||||||
"current date, and use this extension. It should be changed when recording to "
|
"current date, and use this extension. It should be changed when recording to "
|
||||||
@@ -233,11 +263,11 @@ msgstr ""
|
|||||||
"Абярыце пашырэнне, каб настроіць графу з выплыўным спісам, якая знаходзіцца "
|
"Абярыце пашырэнне, каб настроіць графу з выплыўным спісам, якая знаходзіцца "
|
||||||
"вышэй."
|
"вышэй."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:526
|
#: ../js/gdm/loginDialog.js:529
|
||||||
msgid "Session..."
|
msgid "Session..."
|
||||||
msgstr "Сеанс..."
|
msgstr "Сеанс..."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:675
|
#: ../js/gdm/loginDialog.js:677
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Уваход"
|
msgstr "Уваход"
|
||||||
@@ -245,47 +275,56 @@ msgstr "Уваход"
|
|||||||
#. translators: this message is shown below the user list on the
|
#. translators: this message is shown below the user list on the
|
||||||
#. login screen. It can be activated to reveal an entry for
|
#. login screen. It can be activated to reveal an entry for
|
||||||
#. manually entering the username.
|
#. manually entering the username.
|
||||||
#: ../js/gdm/loginDialog.js:742
|
#: ../js/gdm/loginDialog.js:736
|
||||||
msgid "Not listed?"
|
msgid "Not listed?"
|
||||||
msgstr "Няма ў спісе?"
|
msgstr "Няма ў спісе?"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:895 ../js/ui/components/networkAgent.js:137
|
#: ../js/gdm/loginDialog.js:889 ../js/ui/components/networkAgent.js:137
|
||||||
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
||||||
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
||||||
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:135
|
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:167
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Скасаваць"
|
msgstr "Скасаваць"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:900
|
#: ../js/gdm/loginDialog.js:894
|
||||||
msgctxt "button"
|
msgctxt "button"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Увайсці"
|
msgstr "Увайсці"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:1239
|
#: ../js/gdm/loginDialog.js:1215
|
||||||
msgid "Login Window"
|
msgid "Login Window"
|
||||||
msgstr "Акно ўваходу"
|
msgstr "Акно ўваходу"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:88 ../js/ui/userMenu.js:657 ../js/ui/userMenu.js:661
|
#. Translators: accessible name of the power menu in the login screen
|
||||||
|
#: ../js/gdm/powerMenu.js:35
|
||||||
|
msgid "Power"
|
||||||
|
msgstr "Праца сістэмы"
|
||||||
|
|
||||||
|
#: ../js/gdm/powerMenu.js:89 ../js/ui/userMenu.js:660 ../js/ui/userMenu.js:664
|
||||||
#: ../js/ui/userMenu.js:775
|
#: ../js/ui/userMenu.js:775
|
||||||
msgid "Suspend"
|
msgid "Suspend"
|
||||||
msgstr "Прыпыніць камп'ютар"
|
msgstr "Прыпыніць камп'ютар"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:93
|
#: ../js/gdm/powerMenu.js:94
|
||||||
msgid "Restart"
|
msgid "Restart"
|
||||||
msgstr "Перазапусціць сістэму"
|
msgstr "Перазапусціць сістэму"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:98 ../js/ui/userMenu.js:659 ../js/ui/userMenu.js:661
|
#: ../js/gdm/powerMenu.js:99 ../js/ui/userMenu.js:662 ../js/ui/userMenu.js:664
|
||||||
#: ../js/ui/userMenu.js:774
|
#: ../js/ui/userMenu.js:774
|
||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Выключыць камп'ютар"
|
msgstr "Выключыць камп'ютар"
|
||||||
|
|
||||||
|
#: ../js/gdm/util.js:148
|
||||||
|
msgid "Authentication error"
|
||||||
|
msgstr "Памылка ідэнтыфікацыі"
|
||||||
|
|
||||||
#. Translators: this message is shown below the password entry field
|
#. Translators: this message is shown below the password entry field
|
||||||
#. to indicate the user can swipe their finger instead
|
#. to indicate the user can swipe their finger instead
|
||||||
#: ../js/gdm/util.js:247
|
#: ../js/gdm/util.js:265
|
||||||
msgid "(or swipe finger)"
|
msgid "(or swipe finger)"
|
||||||
msgstr "(або правядзіце пальцам)"
|
msgstr "(або правядзіце пальцам)"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:272
|
#: ../js/gdm/util.js:290
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(напр., карыстальнік ці %s)"
|
msgstr "(напр., карыстальнік ці %s)"
|
||||||
@@ -322,7 +361,7 @@ msgstr "НАСТРОЙКІ"
|
|||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "Новае акно"
|
msgstr "Новае акно"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:678 ../js/ui/dash.js:271
|
#: ../js/ui/appDisplay.js:678 ../js/ui/dash.js:290
|
||||||
msgid "Remove from Favorites"
|
msgid "Remove from Favorites"
|
||||||
msgstr "Выдаліць са спіса ўпадабанага"
|
msgstr "Выдаліць са спіса ўпадабанага"
|
||||||
|
|
||||||
@@ -486,16 +525,16 @@ msgstr "На гэтым тыдні"
|
|||||||
msgid "Next week"
|
msgid "Next week"
|
||||||
msgstr "На наступным тыдні"
|
msgstr "На наступным тыдні"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:278
|
#: ../js/ui/components/autorunManager.js:297
|
||||||
msgid "Removable Devices"
|
msgid "Removable Devices"
|
||||||
msgstr "Зменныя прыстасаванні"
|
msgstr "Зменныя прыстасаванні"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:571
|
#: ../js/ui/components/autorunManager.js:594
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Адкрыць у %s"
|
msgstr "Адкрыць у %s"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:597
|
#: ../js/ui/components/autorunManager.js:620
|
||||||
msgid "Eject"
|
msgid "Eject"
|
||||||
msgstr "Выняць"
|
msgstr "Выняць"
|
||||||
|
|
||||||
@@ -643,38 +682,46 @@ msgstr "Запыт на падпіску"
|
|||||||
msgid "Connection error"
|
msgid "Connection error"
|
||||||
msgstr "Памылка злучэння"
|
msgstr "Памылка злучэння"
|
||||||
|
|
||||||
|
#: ../js/ui/components/telepathyClient.js:491
|
||||||
|
msgid "Unmute"
|
||||||
|
msgstr "Вярнуць гук"
|
||||||
|
|
||||||
|
#: ../js/ui/components/telepathyClient.js:491
|
||||||
|
msgid "Mute"
|
||||||
|
msgstr "Абязгучыць"
|
||||||
|
|
||||||
#. Translators: this is a time format string followed by a date.
|
#. Translators: this is a time format string followed by a date.
|
||||||
#. If applicable, replace %X with a strftime format valid for your
|
#. If applicable, replace %X with a strftime format valid for your
|
||||||
#. locale, without seconds.
|
#. locale, without seconds.
|
||||||
#: ../js/ui/components/telepathyClient.js:934
|
#: ../js/ui/components/telepathyClient.js:948
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Sent at <b>%X</b> on <b>%A</b>"
|
msgid "Sent at <b>%X</b> on <b>%A</b>"
|
||||||
msgstr "Адпраўлена ў <b>%X</b>, <b>%A</b>"
|
msgstr "Адпраўлена ў <b>%X</b>, <b>%A</b>"
|
||||||
|
|
||||||
#. Translators: this is a time format in the style of "Wednesday, May 25",
|
#. Translators: this is a time format in the style of "Wednesday, May 25",
|
||||||
#. shown when you get a chat message in the same year.
|
#. shown when you get a chat message in the same year.
|
||||||
#: ../js/ui/components/telepathyClient.js:940
|
#: ../js/ui/components/telepathyClient.js:954
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Sent on <b>%A</b>, <b>%B %d</b>"
|
msgid "Sent on <b>%A</b>, <b>%B %d</b>"
|
||||||
msgstr "Адпраўлена ў <b>%A</b>, <b>%d %B</b>"
|
msgstr "Адпраўлена ў <b>%A</b>, <b>%d %B</b>"
|
||||||
|
|
||||||
#. Translators: this is a time format in the style of "Wednesday, May 25, 2012",
|
#. Translators: this is a time format in the style of "Wednesday, May 25, 2012",
|
||||||
#. shown when you get a chat message in a different year.
|
#. shown when you get a chat message in a different year.
|
||||||
#: ../js/ui/components/telepathyClient.js:945
|
#: ../js/ui/components/telepathyClient.js:959
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Sent on <b>%A</b>, <b>%B %d</b>, %Y"
|
msgid "Sent on <b>%A</b>, <b>%B %d</b>, %Y"
|
||||||
msgstr "Адпраўлена ў <b>%A</b>, <b>%d %B</b>, %Y"
|
msgstr "Адпраўлена ў <b>%A</b>, <b>%d %B</b>, %Y"
|
||||||
|
|
||||||
#. Translators: this is the other person changing their old IM name to their new
|
#. Translators: this is the other person changing their old IM name to their new
|
||||||
#. IM name.
|
#. IM name.
|
||||||
#: ../js/ui/components/telepathyClient.js:974
|
#: ../js/ui/components/telepathyClient.js:988
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is now known as %s"
|
msgid "%s is now known as %s"
|
||||||
msgstr "%s змяніў імя на %s"
|
msgstr "%s змяніў імя на %s"
|
||||||
|
|
||||||
#. translators: argument is a room name like
|
#. translators: argument is a room name like
|
||||||
#. * room@jabber.org for example.
|
#. * room@jabber.org for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1074
|
#: ../js/ui/components/telepathyClient.js:1088
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invitation to %s"
|
msgid "Invitation to %s"
|
||||||
msgstr "Запрашэнне ў %s"
|
msgstr "Запрашэнне ў %s"
|
||||||
@@ -682,42 +729,42 @@ msgstr "Запрашэнне ў %s"
|
|||||||
#. translators: first argument is the name of a contact and the second
|
#. translators: first argument is the name of a contact and the second
|
||||||
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
|
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
|
||||||
#. * for example.
|
#. * for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1082
|
#: ../js/ui/components/telepathyClient.js:1096
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is inviting you to join %s"
|
msgid "%s is inviting you to join %s"
|
||||||
msgstr "Удзельнік %s запрашае вас далучыцца да %s"
|
msgstr "Удзельнік %s запрашае вас далучыцца да %s"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1084
|
#: ../js/ui/components/telepathyClient.js:1098
|
||||||
#: ../js/ui/components/telepathyClient.js:1163
|
#: ../js/ui/components/telepathyClient.js:1177
|
||||||
#: ../js/ui/components/telepathyClient.js:1226
|
#: ../js/ui/components/telepathyClient.js:1240
|
||||||
msgid "Decline"
|
msgid "Decline"
|
||||||
msgstr "Адмовіцца"
|
msgstr "Адмовіцца"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1085
|
#: ../js/ui/components/telepathyClient.js:1099
|
||||||
#: ../js/ui/components/telepathyClient.js:1164
|
#: ../js/ui/components/telepathyClient.js:1178
|
||||||
#: ../js/ui/components/telepathyClient.js:1227
|
#: ../js/ui/components/telepathyClient.js:1241
|
||||||
msgid "Accept"
|
msgid "Accept"
|
||||||
msgstr "Прыняць"
|
msgstr "Прыняць"
|
||||||
|
|
||||||
#. translators: argument is a contact name like Alice for example.
|
#. translators: argument is a contact name like Alice for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1115
|
#: ../js/ui/components/telepathyClient.js:1129
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Video call from %s"
|
msgid "Video call from %s"
|
||||||
msgstr "Відэазванок ад %s"
|
msgstr "Відэазванок ад %s"
|
||||||
|
|
||||||
#. translators: argument is a contact name like Alice for example.
|
#. translators: argument is a contact name like Alice for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1118
|
#: ../js/ui/components/telepathyClient.js:1132
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Call from %s"
|
msgid "Call from %s"
|
||||||
msgstr "Званок ад %s"
|
msgstr "Званок ад %s"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1123
|
#: ../js/ui/components/telepathyClient.js:1137
|
||||||
#: ../js/ui/status/bluetooth.js:346
|
#: ../js/ui/status/bluetooth.js:346
|
||||||
msgid "Reject"
|
msgid "Reject"
|
||||||
msgstr "Адмовіць"
|
msgstr "Адмовіць"
|
||||||
|
|
||||||
#. translators: this is a button label (verb), not a noun
|
#. translators: this is a button label (verb), not a noun
|
||||||
#: ../js/ui/components/telepathyClient.js:1125
|
#: ../js/ui/components/telepathyClient.js:1139
|
||||||
msgid "Answer"
|
msgid "Answer"
|
||||||
msgstr "Адказаць"
|
msgstr "Адказаць"
|
||||||
|
|
||||||
@@ -726,108 +773,108 @@ msgstr "Адказаць"
|
|||||||
#. * file name. The string will be something
|
#. * file name. The string will be something
|
||||||
#. * like: "Alice is sending you test.ogg"
|
#. * like: "Alice is sending you test.ogg"
|
||||||
#.
|
#.
|
||||||
#: ../js/ui/components/telepathyClient.js:1157
|
#: ../js/ui/components/telepathyClient.js:1171
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is sending you %s"
|
msgid "%s is sending you %s"
|
||||||
msgstr "%s пасылае вам %s"
|
msgstr "%s пасылае вам %s"
|
||||||
|
|
||||||
#. To translators: The parameter is the contact's alias
|
#. To translators: The parameter is the contact's alias
|
||||||
#: ../js/ui/components/telepathyClient.js:1192
|
#: ../js/ui/components/telepathyClient.js:1206
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s would like permission to see when you are online"
|
msgid "%s would like permission to see when you are online"
|
||||||
msgstr "%s просіць дазволу на прагляд вашага сеткавага стану"
|
msgstr "%s просіць дазволу на прагляд вашага сеткавага стану"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1284
|
#: ../js/ui/components/telepathyClient.js:1298
|
||||||
msgid "Network error"
|
msgid "Network error"
|
||||||
msgstr "Сеткавая памылка"
|
msgstr "Сеткавая памылка"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1286
|
#: ../js/ui/components/telepathyClient.js:1300
|
||||||
msgid "Authentication failed"
|
msgid "Authentication failed"
|
||||||
msgstr "Няўдалая ідэнтыфікацыя"
|
msgstr "Няўдалая ідэнтыфікацыя"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1288
|
#: ../js/ui/components/telepathyClient.js:1302
|
||||||
msgid "Encryption error"
|
msgid "Encryption error"
|
||||||
msgstr "Памылка шыфравання"
|
msgstr "Памылка шыфравання"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1290
|
#: ../js/ui/components/telepathyClient.js:1304
|
||||||
msgid "Certificate not provided"
|
msgid "Certificate not provided"
|
||||||
msgstr "Сертыфікат не пададзены"
|
msgstr "Сертыфікат не пададзены"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1292
|
#: ../js/ui/components/telepathyClient.js:1306
|
||||||
msgid "Certificate untrusted"
|
msgid "Certificate untrusted"
|
||||||
msgstr "Сертыфікат не заслугоўвае даверу"
|
msgstr "Сертыфікат не заслугоўвае даверу"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1294
|
#: ../js/ui/components/telepathyClient.js:1308
|
||||||
msgid "Certificate expired"
|
msgid "Certificate expired"
|
||||||
msgstr "Сертыфікат састарэў"
|
msgstr "Сертыфікат састарэў"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1296
|
#: ../js/ui/components/telepathyClient.js:1310
|
||||||
msgid "Certificate not activated"
|
msgid "Certificate not activated"
|
||||||
msgstr "Сертыфікат не актывізаваны"
|
msgstr "Сертыфікат не актывізаваны"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1298
|
#: ../js/ui/components/telepathyClient.js:1312
|
||||||
msgid "Certificate hostname mismatch"
|
msgid "Certificate hostname mismatch"
|
||||||
msgstr "Назва камп'ютара ў сертыфікаце не адпавядае патрэбнай"
|
msgstr "Назва камп'ютара ў сертыфікаце не адпавядае патрэбнай"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1300
|
#: ../js/ui/components/telepathyClient.js:1314
|
||||||
msgid "Certificate fingerprint mismatch"
|
msgid "Certificate fingerprint mismatch"
|
||||||
msgstr "Адбітак сертыфіката не адпавядае патрэбнаму"
|
msgstr "Адбітак сертыфіката не адпавядае патрэбнаму"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1302
|
#: ../js/ui/components/telepathyClient.js:1316
|
||||||
msgid "Certificate self-signed"
|
msgid "Certificate self-signed"
|
||||||
msgstr "Сертыфікат уласнаручна падпісаны"
|
msgstr "Сертыфікат уласнаручна падпісаны"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1304
|
#: ../js/ui/components/telepathyClient.js:1318
|
||||||
msgid "Status is set to offline"
|
msgid "Status is set to offline"
|
||||||
msgstr "Уключаны рэжым па-за сеткай"
|
msgstr "Уключаны рэжым па-за сеткай"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1306
|
#: ../js/ui/components/telepathyClient.js:1320
|
||||||
msgid "Encryption is not available"
|
msgid "Encryption is not available"
|
||||||
msgstr "Шыфраванне недаступнае"
|
msgstr "Шыфраванне недаступнае"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1308
|
#: ../js/ui/components/telepathyClient.js:1322
|
||||||
msgid "Certificate is invalid"
|
msgid "Certificate is invalid"
|
||||||
msgstr "Хібны сертыфікат"
|
msgstr "Хібны сертыфікат"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1310
|
#: ../js/ui/components/telepathyClient.js:1324
|
||||||
msgid "Connection has been refused"
|
msgid "Connection has been refused"
|
||||||
msgstr "Адмоўлена ў злучэнні"
|
msgstr "Адмоўлена ў злучэнні"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1312
|
#: ../js/ui/components/telepathyClient.js:1326
|
||||||
msgid "Connection can't be established"
|
msgid "Connection can't be established"
|
||||||
msgstr "Не ўдалося ўсталяваць злучэнне"
|
msgstr "Не ўдалося ўсталяваць злучэнне"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1314
|
#: ../js/ui/components/telepathyClient.js:1328
|
||||||
msgid "Connection has been lost"
|
msgid "Connection has been lost"
|
||||||
msgstr "Злучэнне страчана"
|
msgstr "Злучэнне страчана"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1316
|
#: ../js/ui/components/telepathyClient.js:1330
|
||||||
msgid "This account is already connected to the server"
|
msgid "This account is already connected to the server"
|
||||||
msgstr "Гэты конт ужо злучаны з серверам"
|
msgstr "Гэты конт ужо злучаны з серверам"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1318
|
#: ../js/ui/components/telepathyClient.js:1332
|
||||||
msgid ""
|
msgid ""
|
||||||
"Connection has been replaced by a new connection using the same resource"
|
"Connection has been replaced by a new connection using the same resource"
|
||||||
msgstr "Злучэнне заменена новым для таго ж самага рэсурсу"
|
msgstr "Злучэнне заменена новым для таго ж самага рэсурсу"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1320
|
#: ../js/ui/components/telepathyClient.js:1334
|
||||||
msgid "The account already exists on the server"
|
msgid "The account already exists on the server"
|
||||||
msgstr "Такі конт ужо існуе на серверы"
|
msgstr "Такі конт ужо існуе на серверы"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1322
|
#: ../js/ui/components/telepathyClient.js:1336
|
||||||
msgid "Server is currently too busy to handle the connection"
|
msgid "Server is currently too busy to handle the connection"
|
||||||
msgstr "Сервер надта заняты і не можа абслужыць гэта злучэнне"
|
msgstr "Сервер надта заняты і не можа абслужыць гэта злучэнне"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1324
|
#: ../js/ui/components/telepathyClient.js:1338
|
||||||
msgid "Certificate has been revoked"
|
msgid "Certificate has been revoked"
|
||||||
msgstr "Сертыфікат быў адкліканы"
|
msgstr "Сертыфікат быў адкліканы"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1326
|
#: ../js/ui/components/telepathyClient.js:1340
|
||||||
msgid ""
|
msgid ""
|
||||||
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
|
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
|
||||||
msgstr "Для сертыфіката выкарыстаны слабы або небяспечны алгарытм шыфравання"
|
msgstr "Для сертыфіката выкарыстаны слабы або небяспечны алгарытм шыфравання"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1328
|
#: ../js/ui/components/telepathyClient.js:1342
|
||||||
msgid ""
|
msgid ""
|
||||||
"The length of the server certificate, or the depth of the server certificate "
|
"The length of the server certificate, or the depth of the server certificate "
|
||||||
"chain, exceed the limits imposed by the cryptography library"
|
"chain, exceed the limits imposed by the cryptography library"
|
||||||
@@ -835,30 +882,30 @@ msgstr ""
|
|||||||
"Даўжыня сертыфіката сервера або глыбіня яго ланцуга перавышае абмежаванне, "
|
"Даўжыня сертыфіката сервера або глыбіня яго ланцуга перавышае абмежаванне, "
|
||||||
"выстаўленае крыптаграфічнай бібліятэкай"
|
"выстаўленае крыптаграфічнай бібліятэкай"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1330
|
#: ../js/ui/components/telepathyClient.js:1344
|
||||||
msgid "Internal error"
|
msgid "Internal error"
|
||||||
msgstr "Унутраная памылка"
|
msgstr "Унутраная памылка"
|
||||||
|
|
||||||
#. translators: argument is the account name, like
|
#. translators: argument is the account name, like
|
||||||
#. * name@jabber.org for example.
|
#. * name@jabber.org for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1340
|
#: ../js/ui/components/telepathyClient.js:1354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Connection to %s failed"
|
msgid "Connection to %s failed"
|
||||||
msgstr "не ўдалося злучыцца з %s"
|
msgstr "не ўдалося злучыцца з %s"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1349
|
#: ../js/ui/components/telepathyClient.js:1363
|
||||||
msgid "Reconnect"
|
msgid "Reconnect"
|
||||||
msgstr "Перазлучыцца"
|
msgstr "Перазлучыцца"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1350
|
#: ../js/ui/components/telepathyClient.js:1364
|
||||||
msgid "Edit account"
|
msgid "Edit account"
|
||||||
msgstr "Рэдагаваць конт"
|
msgstr "Рэдагаваць конт"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1395
|
#: ../js/ui/components/telepathyClient.js:1409
|
||||||
msgid "Unknown reason"
|
msgid "Unknown reason"
|
||||||
msgstr "Невядомая прычына"
|
msgstr "Невядомая прычына"
|
||||||
|
|
||||||
#: ../js/ui/dash.js:245 ../js/ui/dash.js:273
|
#: ../js/ui/dash.js:253 ../js/ui/dash.js:292
|
||||||
msgid "Show Applications"
|
msgid "Show Applications"
|
||||||
msgstr "Паказаць праграмы"
|
msgstr "Паказаць праграмы"
|
||||||
|
|
||||||
@@ -866,14 +913,14 @@ msgstr "Паказаць праграмы"
|
|||||||
msgid "Date and Time Settings"
|
msgid "Date and Time Settings"
|
||||||
msgstr "Настройкі даты і часу"
|
msgstr "Настройкі даты і часу"
|
||||||
|
|
||||||
#: ../js/ui/dateMenu.js:109
|
#: ../js/ui/dateMenu.js:111
|
||||||
msgid "Open Calendar"
|
msgid "Open Calendar"
|
||||||
msgstr "Адкрыць каляндар"
|
msgstr "Адкрыць каляндар"
|
||||||
|
|
||||||
#. Translators: This is the date format to use when the calendar popup is
|
#. Translators: This is the date format to use when the calendar popup is
|
||||||
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
|
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
|
||||||
#.
|
#.
|
||||||
#: ../js/ui/dateMenu.js:175
|
#: ../js/ui/dateMenu.js:201
|
||||||
msgid "%A %B %e, %Y"
|
msgid "%A %B %e, %Y"
|
||||||
msgstr "%A, %e %B, %Y"
|
msgstr "%A, %e %B, %Y"
|
||||||
|
|
||||||
@@ -984,84 +1031,76 @@ msgstr "Усталяваць"
|
|||||||
msgid "Download and install '%s' from extensions.gnome.org?"
|
msgid "Download and install '%s' from extensions.gnome.org?"
|
||||||
msgstr "Сцягнуць і ўсталяваць \"%s\" з extensions.gnome.org?"
|
msgstr "Сцягнуць і ўсталяваць \"%s\" з extensions.gnome.org?"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:327
|
#: ../js/ui/keyboard.js:337
|
||||||
msgid "tray"
|
msgid "tray"
|
||||||
msgstr "трэй"
|
msgstr "трэй"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:545 ../js/ui/status/keyboard.js:146
|
#: ../js/ui/keyboard.js:584 ../js/ui/status/keyboard.js:195
|
||||||
#: ../js/ui/status/power.js:205
|
#: ../js/ui/status/power.js:205
|
||||||
msgid "Keyboard"
|
msgid "Keyboard"
|
||||||
msgstr "Клавіятура"
|
msgstr "Клавіятура"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:694
|
#: ../js/ui/lookingGlass.js:691
|
||||||
msgid "No extensions installed"
|
msgid "No extensions installed"
|
||||||
msgstr "Няма ўсталяваных пашырэнняў"
|
msgstr "Няма ўсталяваных пашырэнняў"
|
||||||
|
|
||||||
#. Translators: argument is an extension UUID.
|
#. Translators: argument is an extension UUID.
|
||||||
#: ../js/ui/lookingGlass.js:748
|
#: ../js/ui/lookingGlass.js:745
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s has not emitted any errors."
|
msgid "%s has not emitted any errors."
|
||||||
msgstr "%s не зрабіў ніякіх памылак."
|
msgstr "%s не зрабіў ніякіх памылак."
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:754
|
#: ../js/ui/lookingGlass.js:751
|
||||||
msgid "Hide Errors"
|
msgid "Hide Errors"
|
||||||
msgstr "Хаваць памылкі"
|
msgstr "Хаваць памылкі"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:758 ../js/ui/lookingGlass.js:818
|
#: ../js/ui/lookingGlass.js:755 ../js/ui/lookingGlass.js:815
|
||||||
msgid "Show Errors"
|
msgid "Show Errors"
|
||||||
msgstr "Паказваць памылкі"
|
msgstr "Паказваць памылкі"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:767
|
#: ../js/ui/lookingGlass.js:764
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "Уключана"
|
msgstr "Уключана"
|
||||||
|
|
||||||
#. translators:
|
#. translators:
|
||||||
#. * The device has been disabled
|
#. * The device has been disabled
|
||||||
#: ../js/ui/lookingGlass.js:770 ../src/gvc/gvc-mixer-control.c:1082
|
#: ../js/ui/lookingGlass.js:767 ../src/gvc/gvc-mixer-control.c:1082
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Выключана"
|
msgstr "Выключана"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:772
|
#: ../js/ui/lookingGlass.js:769
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Памылка"
|
msgstr "Памылка"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:774
|
#: ../js/ui/lookingGlass.js:771
|
||||||
msgid "Out of date"
|
msgid "Out of date"
|
||||||
msgstr "Састарэла"
|
msgstr "Састарэла"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:776
|
#: ../js/ui/lookingGlass.js:773
|
||||||
msgid "Downloading"
|
msgid "Downloading"
|
||||||
msgstr "Сцягванне"
|
msgstr "Сцягванне"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:800
|
#: ../js/ui/lookingGlass.js:797
|
||||||
msgid "View Source"
|
msgid "View Source"
|
||||||
msgstr "Паглядзець выточны код"
|
msgstr "Паглядзець выточны код"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:809
|
#: ../js/ui/lookingGlass.js:806
|
||||||
msgid "Web Page"
|
msgid "Web Page"
|
||||||
msgstr "Сеціўная старонка"
|
msgstr "Сеціўная старонка"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1233
|
#: ../js/ui/messageTray.js:1081
|
||||||
msgid "Open"
|
msgid "Open"
|
||||||
msgstr "Адкрыць"
|
msgstr "Адкрыць"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1240
|
#: ../js/ui/messageTray.js:1088
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Выдаліць"
|
msgstr "Выдаліць"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1250
|
#: ../js/ui/messageTray.js:1540
|
||||||
msgid "Unmute"
|
|
||||||
msgstr "Вярнуць гук"
|
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1250
|
|
||||||
msgid "Mute"
|
|
||||||
msgstr "Абязгучыць"
|
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2037
|
|
||||||
msgid "Message Tray"
|
msgid "Message Tray"
|
||||||
msgstr "Абшар апавяшчэнняў"
|
msgstr "Абшар апавяшчэнняў"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2485
|
#: ../js/ui/messageTray.js:2547
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "Сістэмная інфармацыя"
|
msgstr "Сістэмная інфармацыя"
|
||||||
|
|
||||||
@@ -1070,11 +1109,11 @@ msgctxt "program"
|
|||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Невядомая"
|
msgstr "Невядомая"
|
||||||
|
|
||||||
#: ../js/ui/overview.js:83
|
#: ../js/ui/overview.js:82
|
||||||
msgid "Undo"
|
msgid "Undo"
|
||||||
msgstr "Адрабіць"
|
msgstr "Адрабіць"
|
||||||
|
|
||||||
#: ../js/ui/overview.js:128
|
#: ../js/ui/overview.js:127
|
||||||
msgid "Overview"
|
msgid "Overview"
|
||||||
msgstr "Агляд"
|
msgstr "Агляд"
|
||||||
|
|
||||||
@@ -1082,13 +1121,13 @@ msgstr "Агляд"
|
|||||||
#. in the search entry when no search is
|
#. in the search entry when no search is
|
||||||
#. active; it should not exceed ~30
|
#. active; it should not exceed ~30
|
||||||
#. characters.
|
#. characters.
|
||||||
#: ../js/ui/overview.js:202
|
#: ../js/ui/overview.js:201
|
||||||
msgid "Type to search..."
|
msgid "Type to search..."
|
||||||
msgstr "Увядзіце тэкст для пошуку..."
|
msgstr "Увядзіце тэкст для пошуку..."
|
||||||
|
|
||||||
#. Translators: this is the name of the dock/favorites area on
|
#. Translators: this is the name of the dock/favorites area on
|
||||||
#. the left of the overview
|
#. the left of the overview
|
||||||
#: ../js/ui/overview.js:223
|
#: ../js/ui/overview.js:222
|
||||||
msgid "Dash"
|
msgid "Dash"
|
||||||
msgstr "Прыборная дошка"
|
msgstr "Прыборная дошка"
|
||||||
|
|
||||||
@@ -1106,25 +1145,12 @@ msgstr "Заняткі"
|
|||||||
msgid "Top Bar"
|
msgid "Top Bar"
|
||||||
msgstr "Верхняя панэль"
|
msgstr "Верхняя панэль"
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:115
|
|
||||||
#, c-format
|
|
||||||
msgid "Failed to unmount '%s'"
|
|
||||||
msgstr "Не ўдалося адмацаваць \"%s\""
|
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:118
|
|
||||||
msgid "Retry"
|
|
||||||
msgstr "Паўтарыць спробу"
|
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:349
|
|
||||||
msgid "PLACES & DEVICES"
|
|
||||||
msgstr "МЕСЦЫ І ПРЫСТАСАВАННІ"
|
|
||||||
|
|
||||||
#. Translators: this MUST be either "toggle-switch-us"
|
#. Translators: this MUST be either "toggle-switch-us"
|
||||||
#. (for toggle switches containing the English words
|
#. (for toggle switches containing the English words
|
||||||
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
|
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
|
||||||
#. switches containing "◯" and "|"). Other values will
|
#. switches containing "◯" and "|"). Other values will
|
||||||
#. simply result in invisible toggle switches.
|
#. simply result in invisible toggle switches.
|
||||||
#: ../js/ui/popupMenu.js:728
|
#: ../js/ui/popupMenu.js:731
|
||||||
msgid "toggle-switch-us"
|
msgid "toggle-switch-us"
|
||||||
msgstr "toggle-switch-intl"
|
msgstr "toggle-switch-intl"
|
||||||
|
|
||||||
@@ -1134,7 +1160,7 @@ msgstr "Увядзіце загад:"
|
|||||||
|
|
||||||
#. Translators: This is a time format for a date in
|
#. Translators: This is a time format for a date in
|
||||||
#. long format
|
#. long format
|
||||||
#: ../js/ui/screenShield.js:78
|
#: ../js/ui/screenShield.js:79
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %d %B"
|
msgstr "%A, %d %B"
|
||||||
|
|
||||||
@@ -1154,11 +1180,11 @@ msgstr[0] "%d новае апавяшчэнне"
|
|||||||
msgstr[1] "%d новыя апавяшчэнні"
|
msgstr[1] "%d новыя апавяшчэнні"
|
||||||
msgstr[2] "%d новых апавяшчэнняў"
|
msgstr[2] "%d новых апавяшчэнняў"
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:277
|
#: ../js/ui/searchDisplay.js:275
|
||||||
msgid "Searching..."
|
msgid "Searching..."
|
||||||
msgstr "Пошук..."
|
msgstr "Пошук..."
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:328
|
#: ../js/ui/searchDisplay.js:323
|
||||||
msgid "No results."
|
msgid "No results."
|
||||||
msgstr "Нічога не знойдзена."
|
msgstr "Нічога не знойдзена."
|
||||||
|
|
||||||
@@ -1170,11 +1196,11 @@ msgstr "Скапіраваць"
|
|||||||
msgid "Paste"
|
msgid "Paste"
|
||||||
msgstr "Уставіць"
|
msgstr "Уставіць"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:96
|
#: ../js/ui/shellEntry.js:102
|
||||||
msgid "Show Text"
|
msgid "Show Text"
|
||||||
msgstr "Паказваць тэкст"
|
msgstr "Паказваць тэкст"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:98
|
#: ../js/ui/shellEntry.js:104
|
||||||
msgid "Hide Text"
|
msgid "Hide Text"
|
||||||
msgstr "Хаваць тэкст"
|
msgstr "Хаваць тэкст"
|
||||||
|
|
||||||
@@ -1186,7 +1212,7 @@ msgstr "Пароль"
|
|||||||
msgid "Remember Password"
|
msgid "Remember Password"
|
||||||
msgstr "Запомніць пароль"
|
msgstr "Запомніць пароль"
|
||||||
|
|
||||||
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:138
|
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:170
|
||||||
msgid "Unlock"
|
msgid "Unlock"
|
||||||
msgstr "Разблакіраваць"
|
msgstr "Разблакіраваць"
|
||||||
|
|
||||||
@@ -1305,7 +1331,7 @@ msgstr "Настройкі клавіятуры"
|
|||||||
msgid "Mouse Settings"
|
msgid "Mouse Settings"
|
||||||
msgstr "Настройкі мышы"
|
msgstr "Настройкі мышы"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:236
|
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:234
|
||||||
msgid "Sound Settings"
|
msgid "Sound Settings"
|
||||||
msgstr "Настройкі гуку"
|
msgstr "Настройкі гуку"
|
||||||
|
|
||||||
@@ -1363,11 +1389,11 @@ msgstr "Увядзіце PIN, які паказвае прыстасаванне
|
|||||||
msgid "OK"
|
msgid "OK"
|
||||||
msgstr "Добра"
|
msgstr "Добра"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:170
|
#: ../js/ui/status/keyboard.js:228
|
||||||
msgid "Show Keyboard Layout"
|
msgid "Show Keyboard Layout"
|
||||||
msgstr "Паказаць раскладку"
|
msgstr "Паказаць раскладку"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:175
|
#: ../js/ui/status/keyboard.js:233
|
||||||
msgid "Region and Language Settings"
|
msgid "Region and Language Settings"
|
||||||
msgstr "Настройкі мясцовасці і мовы"
|
msgstr "Настройкі мясцовасці і мовы"
|
||||||
|
|
||||||
@@ -1594,7 +1620,7 @@ msgid "Unknown"
|
|||||||
msgstr "Невядомае"
|
msgstr "Невядомае"
|
||||||
|
|
||||||
#. Translators: This is the label for audio volume
|
#. Translators: This is the label for audio volume
|
||||||
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:223
|
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:221
|
||||||
msgid "Volume"
|
msgid "Volume"
|
||||||
msgstr "Гучнасць"
|
msgstr "Гучнасць"
|
||||||
|
|
||||||
@@ -1602,42 +1628,34 @@ msgstr "Гучнасць"
|
|||||||
msgid "Microphone"
|
msgid "Microphone"
|
||||||
msgstr "Мікрафон"
|
msgstr "Мікрафон"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:145
|
#: ../js/ui/unlockDialog.js:177
|
||||||
msgid "Log in as another user"
|
msgid "Log in as another user"
|
||||||
msgstr "Увайсці іншым карыстальнікам"
|
msgstr "Увайсці іншым карыстальнікам"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:174
|
#: ../js/ui/userMenu.js:180
|
||||||
msgid "Available"
|
msgid "Available"
|
||||||
msgstr "Даступны"
|
msgstr "Даступны"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:177
|
#: ../js/ui/userMenu.js:183
|
||||||
msgid "Busy"
|
msgid "Busy"
|
||||||
msgstr "Заняты"
|
msgstr "Заняты"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:180
|
#: ../js/ui/userMenu.js:186
|
||||||
msgid "Invisible"
|
msgid "Invisible"
|
||||||
msgstr "Нябачны"
|
msgstr "Нябачны"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:183
|
#: ../js/ui/userMenu.js:189
|
||||||
msgid "Away"
|
msgid "Away"
|
||||||
msgstr "Адсутны"
|
msgstr "Адсутны"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:186
|
#: ../js/ui/userMenu.js:192
|
||||||
msgid "Idle"
|
msgid "Idle"
|
||||||
msgstr "Бяздзейны"
|
msgstr "Бяздзейны"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:189
|
#: ../js/ui/userMenu.js:195
|
||||||
msgid "Unavailable"
|
msgid "Unavailable"
|
||||||
msgstr "Недаступны"
|
msgstr "Недаступны"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:612 ../js/ui/userMenu.js:756
|
|
||||||
msgid "Switch User"
|
|
||||||
msgstr "Перамяніць карыстальніка"
|
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:613
|
|
||||||
msgid "Switch Session"
|
|
||||||
msgstr "Перамяніць сеанс"
|
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:740
|
#: ../js/ui/userMenu.js:740
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Апавяшчэнні"
|
msgstr "Апавяшчэнні"
|
||||||
@@ -1646,6 +1664,10 @@ msgstr "Апавяшчэнні"
|
|||||||
msgid "System Settings"
|
msgid "System Settings"
|
||||||
msgstr "Сістэмныя настройкі"
|
msgstr "Сістэмныя настройкі"
|
||||||
|
|
||||||
|
#: ../js/ui/userMenu.js:756
|
||||||
|
msgid "Switch User"
|
||||||
|
msgstr "Перамяніць карыстальніка"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:761
|
#: ../js/ui/userMenu.js:761
|
||||||
msgid "Log Out"
|
msgid "Log Out"
|
||||||
msgstr "Выйсці з сеанса"
|
msgstr "Выйсці з сеанса"
|
||||||
@@ -1671,19 +1693,19 @@ msgstr ""
|
|||||||
"сеціўны стан абноўлены інфармацыяй аб тым, што вы можаце не ўбачыць чужых "
|
"сеціўны стан абноўлены інфармацыяй аб тым, што вы можаце не ўбачыць чужых "
|
||||||
"паведамленняў у час."
|
"паведамленняў у час."
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:86
|
#: ../js/ui/viewSelector.js:87
|
||||||
msgid "Windows"
|
msgid "Windows"
|
||||||
msgstr "Вокны"
|
msgstr "Вокны"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:90
|
#: ../js/ui/viewSelector.js:91
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "Праграмы"
|
msgstr "Праграмы"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:94 ../src/shell-util.c:250
|
#: ../js/ui/viewSelector.js:95
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Пошук"
|
msgstr "Пошук"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:123
|
#: ../js/ui/wanda.js:117
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sorry, no wisdom for you today:\n"
|
"Sorry, no wisdom for you today:\n"
|
||||||
@@ -1692,12 +1714,12 @@ msgstr ""
|
|||||||
"На жаль, на сёння не хапіла мудрасцяў:\n"
|
"На жаль, на сёння не хапіла мудрасцяў:\n"
|
||||||
"%s"
|
"%s"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:127
|
#: ../js/ui/wanda.js:121
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s the Oracle says"
|
msgid "%s the Oracle says"
|
||||||
msgstr "Так сказаў Вяшчун %s"
|
msgstr "Так сказаў Вяшчун %s"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:168
|
#: ../js/ui/wanda.js:162
|
||||||
msgid "Your favorite Easter Egg"
|
msgid "Your favorite Easter Egg"
|
||||||
msgstr "Ваша ўлюбёнае велікоднае яйка"
|
msgstr "Ваша ўлюбёнае велікоднае яйка"
|
||||||
|
|
||||||
@@ -1734,19 +1756,19 @@ msgstr[2] "%u уваходаў"
|
|||||||
msgid "System Sounds"
|
msgid "System Sounds"
|
||||||
msgstr "Сістэмныя гукі"
|
msgstr "Сістэмныя гукі"
|
||||||
|
|
||||||
#: ../src/main.c:330
|
#: ../src/main.c:332
|
||||||
msgid "Print version"
|
msgid "Print version"
|
||||||
msgstr "Вывесці нумар версіі праграмы"
|
msgstr "Вывесці нумар версіі праграмы"
|
||||||
|
|
||||||
#: ../src/main.c:336
|
#: ../src/main.c:338
|
||||||
msgid "Mode used by GDM for login screen"
|
msgid "Mode used by GDM for login screen"
|
||||||
msgstr "Рэжым, які выкарыстоўвае GDM для экрана ўваходу"
|
msgstr "Рэжым, які выкарыстоўвае GDM для экрана ўваходу"
|
||||||
|
|
||||||
#: ../src/main.c:342
|
#: ../src/main.c:344
|
||||||
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
|
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
|
||||||
msgstr "Ужыць асаблівы рэжым, напрыклад, \"gdm\" для экрана ўваходу"
|
msgstr "Ужыць асаблівы рэжым, напрыклад, \"gdm\" для экрана ўваходу"
|
||||||
|
|
||||||
#: ../src/main.c:348
|
#: ../src/main.c:350
|
||||||
msgid "List possible modes"
|
msgid "List possible modes"
|
||||||
msgstr "Вывесці спіс магчымых рэжымаў"
|
msgstr "Вывесці спіс магчымых рэжымаў"
|
||||||
|
|
||||||
@@ -1774,25 +1796,3 @@ msgstr "Прадвызначана"
|
|||||||
#: ../src/shell-polkit-authentication-agent.c:343
|
#: ../src/shell-polkit-authentication-agent.c:343
|
||||||
msgid "Authentication dialog was dismissed by the user"
|
msgid "Authentication dialog was dismissed by the user"
|
||||||
msgstr "Карыстальнік праігнараваў дыялогавае акенца ідэнтыфікацыі"
|
msgstr "Карыстальнік праігнараваў дыялогавае акенца ідэнтыфікацыі"
|
||||||
|
|
||||||
#. Translators: this is the same string as the one found in
|
|
||||||
#. * nautilus
|
|
||||||
#: ../src/shell-util.c:94
|
|
||||||
msgid "Home"
|
|
||||||
msgstr "Дом"
|
|
||||||
|
|
||||||
#. Translators: this is the same string as the one found in
|
|
||||||
#. * nautilus
|
|
||||||
#: ../src/shell-util.c:104
|
|
||||||
msgid "File System"
|
|
||||||
msgstr "Файлавая сістэма"
|
|
||||||
|
|
||||||
#. Translators: the first string is the name of a gvfs
|
|
||||||
#. * method, and the second string is a path. For
|
|
||||||
#. * example, "Trash: some-directory". It means that the
|
|
||||||
#. * directory called "some-directory" is in the trash.
|
|
||||||
#.
|
|
||||||
#: ../src/shell-util.c:300
|
|
||||||
#, c-format
|
|
||||||
msgid "%1$s: %2$s"
|
|
||||||
msgstr "%1$s: %2$s"
|
|
||||||
|
|||||||
215
po/bg.po
215
po/bg.po
@@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell master\n"
|
"Project-Id-Version: gnome-shell master\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2012-09-15 08:27+0300\n"
|
"POT-Creation-Date: 2012-10-02 05:37+0300\n"
|
||||||
"PO-Revision-Date: 2012-09-15 08:27+0300\n"
|
"PO-Revision-Date: 2012-10-02 05:38+0300\n"
|
||||||
"Last-Translator: Ivaylo Valkov <ivaylo@e-valkov.org>\n"
|
"Last-Translator: Ivaylo Valkov <ivaylo@e-valkov.org>\n"
|
||||||
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
|
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
|
||||||
"Language: bg\n"
|
"Language: bg\n"
|
||||||
@@ -17,6 +17,22 @@ msgstr ""
|
|||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:1
|
||||||
|
msgid "Screenshots"
|
||||||
|
msgstr "Снимки на екрана"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:2
|
||||||
|
msgid "Record a screencast"
|
||||||
|
msgstr "Записване на екрана"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:1
|
||||||
|
msgid "System"
|
||||||
|
msgstr "Системни"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:2
|
||||||
|
msgid "Show the message tray"
|
||||||
|
msgstr "Показване на областта за уведомяване"
|
||||||
|
|
||||||
#: ../data/gnome-shell.desktop.in.in.h:1
|
#: ../data/gnome-shell.desktop.in.in.h:1
|
||||||
msgid "GNOME Shell"
|
msgid "GNOME Shell"
|
||||||
msgstr "Обвивка на GNOME"
|
msgstr "Обвивка на GNOME"
|
||||||
@@ -190,21 +206,21 @@ msgid ""
|
|||||||
"pipeline can also take care of its own output - this might be used to send "
|
"pipeline can also take care of its own output - this might be used to send "
|
||||||
"the output to an icecast server via shout2send or similar. When unset or set "
|
"the output to an icecast server via shout2send or similar. When unset or set "
|
||||||
"to an empty value, the default pipeline will be used. This is currently "
|
"to an empty value, the default pipeline will be used. This is currently "
|
||||||
"'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux' and records to WEBM "
|
"'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 "
|
||||||
"using the VP8 codec. %T is used as a placeholder for a guess at the optimal "
|
"threads=%T ! queue ! webmmux' and records to WEBM using the VP8 codec. %T is "
|
||||||
"thread count on the system."
|
"used as a placeholder for a guess at the optimal thread count on the system."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Задава конвейера на GStreamer, който ще се използва за кодиране на записите. "
|
"Задава конвейера на GStreamer, който ще се използва за кодиране на записите. "
|
||||||
"Използвайте синтаксиса на gst-launch. Конвейерът трябва да бъде с несвързан "
|
"Използвайте синтаксиса на gst-launch. Конвейерът трябва да бъде с несвързан "
|
||||||
"блок-приемник, където се записва видеото. Обикновено конвейерът е с "
|
"блок-приемник, където се записва видеото. Обикновено конвейерът е с "
|
||||||
"несвързан блок-източник. Изходът от този блок ще бъде записан в изходния "
|
"несвързан блок-източник. Изходът от този блок ще бъде записан в изходния "
|
||||||
"файл. Въпреки това конвейерът може да задава собствен изход — това може да "
|
"файл. Въпреки това конвейерът може да задава собствен изход — това може да "
|
||||||
"се използва за изпращане на изхода към icecast сървър чрез „shout2send“ или "
|
"се използва за изпращане на изхода към сървър за icecast чрез „shout2send“ "
|
||||||
"подобен елемент. Когато този ключ не е зададен или стойността му e празна, "
|
"или подобен елемент. Когато този ключ не е зададен или стойността му e "
|
||||||
"се използва стандартния конвейер. За момента това е „vp8enc quality=8 "
|
"празна, се използва стандартния конвейер. За момента това е „vp8enc "
|
||||||
"speed=6 threads=%T ! queue ! webmmux“ и записва видео контейнер WEBM и "
|
"min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! "
|
||||||
"използва кодера VP8. Стойността в „%T“ указва предполагаемия оптимален брой "
|
"queue ! webmmux“ и записва видео контейнер WEBM и използва кодера VP8. "
|
||||||
"нишки за системата."
|
"Стойността в „%T“ указва предполагаемия оптимален брой нишки за системата."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
||||||
msgid "File extension used for storing the screencast"
|
msgid "File extension used for storing the screencast"
|
||||||
@@ -235,11 +251,11 @@ msgstr ""
|
|||||||
"Изберете разширение, което да се настрои като използвате падащото меню по-"
|
"Изберете разширение, което да се настрои като използвате падащото меню по-"
|
||||||
"горе."
|
"горе."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:526
|
#: ../js/gdm/loginDialog.js:528
|
||||||
msgid "Session..."
|
msgid "Session..."
|
||||||
msgstr "Сесия…"
|
msgstr "Сесия…"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:675
|
#: ../js/gdm/loginDialog.js:676
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Регистриране"
|
msgstr "Регистриране"
|
||||||
@@ -247,47 +263,56 @@ msgstr "Регистриране"
|
|||||||
#. translators: this message is shown below the user list on the
|
#. translators: this message is shown below the user list on the
|
||||||
#. login screen. It can be activated to reveal an entry for
|
#. login screen. It can be activated to reveal an entry for
|
||||||
#. manually entering the username.
|
#. manually entering the username.
|
||||||
#: ../js/gdm/loginDialog.js:742
|
#: ../js/gdm/loginDialog.js:743
|
||||||
msgid "Not listed?"
|
msgid "Not listed?"
|
||||||
msgstr "Липсва в списъка?"
|
msgstr "Липсва в списъка?"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:895 ../js/ui/components/networkAgent.js:137
|
#: ../js/gdm/loginDialog.js:896 ../js/ui/components/networkAgent.js:137
|
||||||
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
||||||
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
||||||
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:137
|
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:166
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Отказване"
|
msgstr "Отказване"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:900
|
#: ../js/gdm/loginDialog.js:901
|
||||||
msgctxt "button"
|
msgctxt "button"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Регистриране"
|
msgstr "Регистриране"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:1239
|
#: ../js/gdm/loginDialog.js:1240
|
||||||
msgid "Login Window"
|
msgid "Login Window"
|
||||||
msgstr "Екран за идентификация"
|
msgstr "Екран за идентификация"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:88 ../js/ui/userMenu.js:657 ../js/ui/userMenu.js:661
|
#. Translators: accessible name of the power menu in the login screen
|
||||||
#: ../js/ui/userMenu.js:772
|
#: ../js/gdm/powerMenu.js:35
|
||||||
|
msgid "Power"
|
||||||
|
msgstr "Спиране"
|
||||||
|
|
||||||
|
#: ../js/gdm/powerMenu.js:89 ../js/ui/userMenu.js:663 ../js/ui/userMenu.js:667
|
||||||
|
#: ../js/ui/userMenu.js:778
|
||||||
msgid "Suspend"
|
msgid "Suspend"
|
||||||
msgstr "Приспиване"
|
msgstr "Приспиване"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:93
|
#: ../js/gdm/powerMenu.js:94
|
||||||
msgid "Restart"
|
msgid "Restart"
|
||||||
msgstr "Рестартиране"
|
msgstr "Рестартиране"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:98 ../js/ui/userMenu.js:659 ../js/ui/userMenu.js:661
|
#: ../js/gdm/powerMenu.js:99 ../js/ui/userMenu.js:665 ../js/ui/userMenu.js:667
|
||||||
#: ../js/ui/userMenu.js:771
|
#: ../js/ui/userMenu.js:777
|
||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Изключване"
|
msgstr "Изключване"
|
||||||
|
|
||||||
|
#: ../js/gdm/util.js:148
|
||||||
|
msgid "Authentication error"
|
||||||
|
msgstr "Грешка при удостоверяване"
|
||||||
|
|
||||||
#. Translators: this message is shown below the password entry field
|
#. Translators: this message is shown below the password entry field
|
||||||
#. to indicate the user can swipe their finger instead
|
#. to indicate the user can swipe their finger instead
|
||||||
#: ../js/gdm/util.js:247
|
#: ../js/gdm/util.js:265
|
||||||
msgid "(or swipe finger)"
|
msgid "(or swipe finger)"
|
||||||
msgstr "(или се регистрирайте с пръстов отпечатък)"
|
msgstr "(или се регистрирайте с пръстов отпечатък)"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:272
|
#: ../js/gdm/util.js:290
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(напр. потребител или %s)"
|
msgstr "(напр. потребител или %s)"
|
||||||
@@ -990,76 +1015,76 @@ msgstr "Инсталиране"
|
|||||||
msgid "Download and install '%s' from extensions.gnome.org?"
|
msgid "Download and install '%s' from extensions.gnome.org?"
|
||||||
msgstr "Да се изтегли и инсталира ли „%s“ от from extensions.gnome.org?"
|
msgstr "Да се изтегли и инсталира ли „%s“ от from extensions.gnome.org?"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:327
|
#: ../js/ui/keyboard.js:337
|
||||||
msgid "tray"
|
msgid "tray"
|
||||||
msgstr "област за уведомяване"
|
msgstr "област за уведомяване"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:561 ../js/ui/status/keyboard.js:146
|
#: ../js/ui/keyboard.js:584 ../js/ui/status/keyboard.js:195
|
||||||
#: ../js/ui/status/power.js:205
|
#: ../js/ui/status/power.js:205
|
||||||
msgid "Keyboard"
|
msgid "Keyboard"
|
||||||
msgstr "Клавиатура"
|
msgstr "Клавиатура"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:694
|
#: ../js/ui/lookingGlass.js:691
|
||||||
msgid "No extensions installed"
|
msgid "No extensions installed"
|
||||||
msgstr "Няма инсталирани разширения"
|
msgstr "Няма инсталирани разширения"
|
||||||
|
|
||||||
#. Translators: argument is an extension UUID.
|
#. Translators: argument is an extension UUID.
|
||||||
#: ../js/ui/lookingGlass.js:748
|
#: ../js/ui/lookingGlass.js:745
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s has not emitted any errors."
|
msgid "%s has not emitted any errors."
|
||||||
msgstr "Разширението %s не е обозначило никакви грешки."
|
msgstr "Разширението %s не е обозначило никакви грешки."
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:754
|
#: ../js/ui/lookingGlass.js:751
|
||||||
msgid "Hide Errors"
|
msgid "Hide Errors"
|
||||||
msgstr "Скриване на грешките"
|
msgstr "Скриване на грешките"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:758 ../js/ui/lookingGlass.js:818
|
#: ../js/ui/lookingGlass.js:755 ../js/ui/lookingGlass.js:815
|
||||||
msgid "Show Errors"
|
msgid "Show Errors"
|
||||||
msgstr "Показване на грешките"
|
msgstr "Показване на грешките"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:767
|
#: ../js/ui/lookingGlass.js:764
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "Включено"
|
msgstr "Включено"
|
||||||
|
|
||||||
#. translators:
|
#. translators:
|
||||||
#. * The device has been disabled
|
#. * The device has been disabled
|
||||||
#: ../js/ui/lookingGlass.js:770 ../src/gvc/gvc-mixer-control.c:1082
|
#: ../js/ui/lookingGlass.js:767 ../src/gvc/gvc-mixer-control.c:1082
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Изключено"
|
msgstr "Изключено"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:772
|
#: ../js/ui/lookingGlass.js:769
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Грешка"
|
msgstr "Грешка"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:774
|
#: ../js/ui/lookingGlass.js:771
|
||||||
msgid "Out of date"
|
msgid "Out of date"
|
||||||
msgstr "Остаряло"
|
msgstr "Остаряло"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:776
|
#: ../js/ui/lookingGlass.js:773
|
||||||
msgid "Downloading"
|
msgid "Downloading"
|
||||||
msgstr "Изтегляне"
|
msgstr "Изтегляне"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:800
|
#: ../js/ui/lookingGlass.js:797
|
||||||
msgid "View Source"
|
msgid "View Source"
|
||||||
msgstr "Преглед на изходния код"
|
msgstr "Преглед на изходния код"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:809
|
#: ../js/ui/lookingGlass.js:806
|
||||||
msgid "Web Page"
|
msgid "Web Page"
|
||||||
msgstr "Домашна страница"
|
msgstr "Домашна страница"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1080
|
#: ../js/ui/messageTray.js:1081
|
||||||
msgid "Open"
|
msgid "Open"
|
||||||
msgstr "Отваряне"
|
msgstr "Отваряне"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1087
|
#: ../js/ui/messageTray.js:1088
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Изтриване"
|
msgstr "Изтриване"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2038
|
#: ../js/ui/messageTray.js:2088
|
||||||
msgid "Message Tray"
|
msgid "Message Tray"
|
||||||
msgstr "Област за уведомяване"
|
msgstr "Област за уведомяване"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2480
|
#: ../js/ui/messageTray.js:2551
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "Информация за системата"
|
msgstr "Информация за системата"
|
||||||
|
|
||||||
@@ -1104,19 +1129,6 @@ msgstr "Дейности"
|
|||||||
msgid "Top Bar"
|
msgid "Top Bar"
|
||||||
msgstr "Горна лента"
|
msgstr "Горна лента"
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:115
|
|
||||||
#, c-format
|
|
||||||
msgid "Failed to unmount '%s'"
|
|
||||||
msgstr "Неуспех при демонтиране на „%s“"
|
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:118
|
|
||||||
msgid "Retry"
|
|
||||||
msgstr "Нов опит"
|
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:349
|
|
||||||
msgid "PLACES & DEVICES"
|
|
||||||
msgstr "МЕСТА И УСТРОЙСТВА"
|
|
||||||
|
|
||||||
#. Translators: this MUST be either "toggle-switch-us"
|
#. Translators: this MUST be either "toggle-switch-us"
|
||||||
#. (for toggle switches containing the English words
|
#. (for toggle switches containing the English words
|
||||||
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
|
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
|
||||||
@@ -1132,18 +1144,18 @@ msgstr "Въведете команда:"
|
|||||||
|
|
||||||
#. Translators: This is a time format for a date in
|
#. Translators: This is a time format for a date in
|
||||||
#. long format
|
#. long format
|
||||||
#: ../js/ui/screenShield.js:78
|
#: ../js/ui/screenShield.js:79
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%3$d %2$B, %1$A"
|
msgstr "%3$d %2$B, %1$A"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:143
|
#: ../js/ui/screenShield.js:144
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d new message"
|
msgid "%d new message"
|
||||||
msgid_plural "%d new messages"
|
msgid_plural "%d new messages"
|
||||||
msgstr[0] "%d ново съобщение"
|
msgstr[0] "%d ново съобщение"
|
||||||
msgstr[1] "%d нови съобщения"
|
msgstr[1] "%d нови съобщения"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:145
|
#: ../js/ui/screenShield.js:146
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d new notification"
|
msgid "%d new notification"
|
||||||
msgid_plural "%d new notifications"
|
msgid_plural "%d new notifications"
|
||||||
@@ -1182,7 +1194,7 @@ msgstr "Парола"
|
|||||||
msgid "Remember Password"
|
msgid "Remember Password"
|
||||||
msgstr "Запомняне на паролата"
|
msgstr "Запомняне на паролата"
|
||||||
|
|
||||||
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:140
|
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:169
|
||||||
msgid "Unlock"
|
msgid "Unlock"
|
||||||
msgstr "Отключване"
|
msgstr "Отключване"
|
||||||
|
|
||||||
@@ -1300,7 +1312,7 @@ msgstr "Настройка на клавиатурата"
|
|||||||
msgid "Mouse Settings"
|
msgid "Mouse Settings"
|
||||||
msgstr "Настройки на мишката"
|
msgstr "Настройки на мишката"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:236
|
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:234
|
||||||
msgid "Sound Settings"
|
msgid "Sound Settings"
|
||||||
msgstr "Настройки на звука"
|
msgstr "Настройки на звука"
|
||||||
|
|
||||||
@@ -1358,11 +1370,11 @@ msgstr "Въведете кода на устройството %s."
|
|||||||
msgid "OK"
|
msgid "OK"
|
||||||
msgstr "Добре"
|
msgstr "Добре"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:170
|
#: ../js/ui/status/keyboard.js:228
|
||||||
msgid "Show Keyboard Layout"
|
msgid "Show Keyboard Layout"
|
||||||
msgstr "Показване на клавиатурната подредба"
|
msgstr "Показване на клавиатурната подредба"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:175
|
#: ../js/ui/status/keyboard.js:233
|
||||||
msgid "Region and Language Settings"
|
msgid "Region and Language Settings"
|
||||||
msgstr "Настройки на региона и езика"
|
msgstr "Настройки на региона и езика"
|
||||||
|
|
||||||
@@ -1585,7 +1597,7 @@ msgid "Unknown"
|
|||||||
msgstr "Неизвестно"
|
msgstr "Неизвестно"
|
||||||
|
|
||||||
#. Translators: This is the label for audio volume
|
#. Translators: This is the label for audio volume
|
||||||
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:223
|
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:221
|
||||||
msgid "Volume"
|
msgid "Volume"
|
||||||
msgstr "Сила на звука"
|
msgstr "Сила на звука"
|
||||||
|
|
||||||
@@ -1593,67 +1605,67 @@ msgstr "Сила на звука"
|
|||||||
msgid "Microphone"
|
msgid "Microphone"
|
||||||
msgstr "Микрофон"
|
msgstr "Микрофон"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:147
|
#: ../js/ui/unlockDialog.js:176
|
||||||
msgid "Log in as another user"
|
msgid "Log in as another user"
|
||||||
msgstr "Влезте като друг потребител"
|
msgstr "Влезте като друг потребител"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:174
|
#: ../js/ui/userMenu.js:180
|
||||||
msgid "Available"
|
msgid "Available"
|
||||||
msgstr "На линия"
|
msgstr "На линия"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:177
|
#: ../js/ui/userMenu.js:183
|
||||||
msgid "Busy"
|
msgid "Busy"
|
||||||
msgstr "Зает"
|
msgstr "Зает"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:180
|
#: ../js/ui/userMenu.js:186
|
||||||
msgid "Invisible"
|
msgid "Invisible"
|
||||||
msgstr "Невидим"
|
msgstr "Невидим"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:183
|
#: ../js/ui/userMenu.js:189
|
||||||
msgid "Away"
|
msgid "Away"
|
||||||
msgstr "Отсъстващ"
|
msgstr "Отсъстващ"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:186
|
#: ../js/ui/userMenu.js:192
|
||||||
msgid "Idle"
|
msgid "Idle"
|
||||||
msgstr "Бездействие"
|
msgstr "Бездействие"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:189
|
#: ../js/ui/userMenu.js:195
|
||||||
msgid "Unavailable"
|
msgid "Unavailable"
|
||||||
msgstr "Недостъпно"
|
msgstr "Недостъпно"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:612 ../js/ui/userMenu.js:753
|
#: ../js/ui/userMenu.js:618 ../js/ui/userMenu.js:759
|
||||||
msgid "Switch User"
|
msgid "Switch User"
|
||||||
msgstr "Смяна на потребител"
|
msgstr "Смяна на потребител"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:613
|
#: ../js/ui/userMenu.js:619
|
||||||
msgid "Switch Session"
|
msgid "Switch Session"
|
||||||
msgstr "Смяна на сесия"
|
msgstr "Смяна на сесия"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:737
|
#: ../js/ui/userMenu.js:743
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Известия"
|
msgstr "Известия"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:745
|
#: ../js/ui/userMenu.js:751
|
||||||
msgid "System Settings"
|
msgid "System Settings"
|
||||||
msgstr "Настройки на системата"
|
msgstr "Системни настройки"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:758
|
#: ../js/ui/userMenu.js:764
|
||||||
msgid "Log Out"
|
msgid "Log Out"
|
||||||
msgstr "Изход"
|
msgstr "Изход"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:763
|
#: ../js/ui/userMenu.js:769
|
||||||
msgid "Lock"
|
msgid "Lock"
|
||||||
msgstr "Заключване"
|
msgstr "Заключване"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:778
|
#: ../js/ui/userMenu.js:784
|
||||||
msgid "Install Updates & Restart"
|
msgid "Install Updates & Restart"
|
||||||
msgstr "Инсталиране на обновленията и рестартиране"
|
msgstr "Инсталиране на обновленията и рестартиране"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:796
|
#: ../js/ui/userMenu.js:802
|
||||||
msgid "Your chat status will be set to busy"
|
msgid "Your chat status will be set to busy"
|
||||||
msgstr "Състоянието ви ще се зададе да е „Зает“"
|
msgstr "Състоянието ви ще се зададе да е „Зает“"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:797
|
#: ../js/ui/userMenu.js:803
|
||||||
msgid ""
|
msgid ""
|
||||||
"Notifications are now disabled, including chat messages. Your online status "
|
"Notifications are now disabled, including chat messages. Your online status "
|
||||||
"has been adjusted to let others know that you might not see their messages."
|
"has been adjusted to let others know that you might not see their messages."
|
||||||
@@ -1662,19 +1674,19 @@ msgstr ""
|
|||||||
"онлайн е обновено, за да покаже на другите, че може и да не видите веднага "
|
"онлайн е обновено, за да покаже на другите, че може и да не видите веднага "
|
||||||
"техните съобщения."
|
"техните съобщения."
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:86
|
#: ../js/ui/viewSelector.js:85
|
||||||
msgid "Windows"
|
msgid "Windows"
|
||||||
msgstr "Прозорци"
|
msgstr "Прозорци"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:90
|
#: ../js/ui/viewSelector.js:89
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "Програми"
|
msgstr "Програми"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:94 ../src/shell-util.c:250
|
#: ../js/ui/viewSelector.js:93
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Търсене"
|
msgstr "Търсене"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:123
|
#: ../js/ui/wanda.js:119
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sorry, no wisdom for you today:\n"
|
"Sorry, no wisdom for you today:\n"
|
||||||
@@ -1683,12 +1695,12 @@ msgstr ""
|
|||||||
"Мъдрост днес не ще да има:\n"
|
"Мъдрост днес не ще да има:\n"
|
||||||
"%s"
|
"%s"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:127
|
#: ../js/ui/wanda.js:123
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s the Oracle says"
|
msgid "%s the Oracle says"
|
||||||
msgstr "А пророчицата рече «%s»"
|
msgstr "А пророчицата рече «%s»"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:168
|
#: ../js/ui/wanda.js:164
|
||||||
msgid "Your favorite Easter Egg"
|
msgid "Your favorite Easter Egg"
|
||||||
msgstr "Любимото ви великденско яйце"
|
msgstr "Любимото ви великденско яйце"
|
||||||
|
|
||||||
@@ -1763,34 +1775,3 @@ msgstr "Стандартно"
|
|||||||
#: ../src/shell-polkit-authentication-agent.c:343
|
#: ../src/shell-polkit-authentication-agent.c:343
|
||||||
msgid "Authentication dialog was dismissed by the user"
|
msgid "Authentication dialog was dismissed by the user"
|
||||||
msgstr "Прозорецът за упълномощаване беше затворен от потребителя"
|
msgstr "Прозорецът за упълномощаване беше затворен от потребителя"
|
||||||
|
|
||||||
#. Translators: this is the same string as the one found in
|
|
||||||
#. * nautilus
|
|
||||||
#: ../src/shell-util.c:94
|
|
||||||
msgid "Home"
|
|
||||||
msgstr "Домашна папка"
|
|
||||||
|
|
||||||
#. Translators: this is the same string as the one found in
|
|
||||||
#. * nautilus
|
|
||||||
#: ../src/shell-util.c:104
|
|
||||||
msgid "File System"
|
|
||||||
msgstr "Файлова система"
|
|
||||||
|
|
||||||
#. Translators: the first string is the name of a gvfs
|
|
||||||
#. * method, and the second string is a path. For
|
|
||||||
#. * example, "Trash: some-directory". It means that the
|
|
||||||
#. * directory called "some-directory" is in the trash.
|
|
||||||
#.
|
|
||||||
#: ../src/shell-util.c:300
|
|
||||||
#, c-format
|
|
||||||
msgid "%1$s: %2$s"
|
|
||||||
msgstr "%1$s: %2$s"
|
|
||||||
|
|
||||||
#~ msgid "disabled OpenSearch providers"
|
|
||||||
#~ msgstr "изключени доставчици на OpenSearch"
|
|
||||||
|
|
||||||
#~ msgid "Connect to..."
|
|
||||||
#~ msgstr "Свързване към…"
|
|
||||||
|
|
||||||
#~ msgid "Passphrase"
|
|
||||||
#~ msgstr "Парола"
|
|
||||||
|
|||||||
1649
po/ca@valencia.po
1649
po/ca@valencia.po
File diff suppressed because it is too large
Load Diff
189
po/el.po
189
po/el.po
@@ -4,8 +4,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: gnome-shell.po.master\n"
|
"Project-Id-Version: gnome-shell.po.master\n"
|
||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
||||||
"shell&keywords=I18N+L10N&component=general\n"
|
"shell&keywords=I18N+L10N&component=general\n"
|
||||||
"POT-Creation-Date: 2012-09-18 04:20+0000\n"
|
"POT-Creation-Date: 2012-10-16 20:41+0000\n"
|
||||||
"PO-Revision-Date: 2012-09-18 15:57+0200\n"
|
"PO-Revision-Date: 2012-10-23 15:39+0200\n"
|
||||||
"Last-Translator: Tom Tryfonidis <tomtryf@gmail.com>\n"
|
"Last-Translator: Tom Tryfonidis <tomtryf@gmail.com>\n"
|
||||||
"Language-Team: team@gnome.gr\n"
|
"Language-Team: team@gnome.gr\n"
|
||||||
"Language: el\n"
|
"Language: el\n"
|
||||||
@@ -17,6 +17,22 @@ msgstr ""
|
|||||||
"X-DamnedLies-Scope: partial\n"
|
"X-DamnedLies-Scope: partial\n"
|
||||||
"X-Poedit-SourceCharset: utf-8\n"
|
"X-Poedit-SourceCharset: utf-8\n"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:1
|
||||||
|
msgid "Screenshots"
|
||||||
|
msgstr "Στιγμιότυπα οθόνης"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:2
|
||||||
|
msgid "Record a screencast"
|
||||||
|
msgstr "Καταγραφή ενός βίντεο οθόνης"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:1
|
||||||
|
msgid "System"
|
||||||
|
msgstr "Σύστημα"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:2
|
||||||
|
msgid "Show the message tray"
|
||||||
|
msgstr "Εμφάνιση της περιοχής ειδοποιήσεων"
|
||||||
|
|
||||||
#: ../data/gnome-shell.desktop.in.in.h:1
|
#: ../data/gnome-shell.desktop.in.in.h:1
|
||||||
msgid "GNOME Shell"
|
msgid "GNOME Shell"
|
||||||
msgstr "GNOME Shell"
|
msgstr "GNOME Shell"
|
||||||
@@ -166,36 +182,24 @@ msgstr "Ο τύπος του πληκτρολογίου που θα χρησιμ
|
|||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23
|
||||||
msgid "Framerate used for recording screencasts."
|
msgid "Framerate used for recording screencasts."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ο ρυθμός καρέ που θα χρησιμοποιηθεί για την καταγραφή των στιγμιοτύπων "
|
"Ο ρυθμός καρέ που θα χρησιμοποιηθεί για την καταγραφή του βίντεο οθόνης."
|
||||||
"οθόνης."
|
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24
|
||||||
msgid ""
|
msgid ""
|
||||||
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
||||||
"screencast recorder in frames-per-second."
|
"screencast recorder in frames-per-second."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ο ρυθμός καρέ του στιγμιότυπου που παράγεται από τον εγγραφέα στιγμιοτύπων "
|
"Ο ρυθμός καρέ του στιγμιότυπου που παράγεται από τον εγγραφέα βίντεο οθόνης "
|
||||||
"οθόνης του GNOME Shell σε καρέ ανά δευτερόλεπτο."
|
"του GNOME Shell σε καρέ ανά δευτερόλεπτο."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
||||||
msgid "The gstreamer pipeline used to encode the screencast"
|
msgid "The gstreamer pipeline used to encode the screencast"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ο δίαυλος του gstreamer που χρησιμοποιήθηκε για την κωδικοποίηση του βίντεο "
|
"Ο δίαυλος του gstreamer που χρησιμοποιήθηκε για την κωδικοποίηση του βίντεο "
|
||||||
"παρουσίασης"
|
"οθόνης"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:27
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:27
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
#| msgid ""
|
|
||||||
#| "Sets the GStreamer pipeline used to encode recordings. It follows the "
|
|
||||||
#| "syntax used for gst-launch. The pipeline should have an unconnected sink "
|
|
||||||
#| "pad where the recorded video is recorded. It will normally have a "
|
|
||||||
#| "unconnected source pad; output from that pad will be written into the "
|
|
||||||
#| "output file. However the pipeline can also take care of its own output - "
|
|
||||||
#| "this might be used to send the output to an icecast server via shout2send "
|
|
||||||
#| "or similar. When unset or set to an empty value, the default pipeline "
|
|
||||||
#| "will be used. This is currently 'vp8enc quality=8 speed=6 threads=%T ! "
|
|
||||||
#| "queue ! webmmux' and records to WEBM using the VP8 codec. %T is used as a "
|
|
||||||
#| "placeholder for a guess at the optimal thread count on the system."
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
||||||
"used for gst-launch. The pipeline should have an unconnected sink pad where "
|
"used for gst-launch. The pipeline should have an unconnected sink pad where "
|
||||||
@@ -225,8 +229,7 @@ msgstr ""
|
|||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
||||||
msgid "File extension used for storing the screencast"
|
msgid "File extension used for storing the screencast"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Επέκταση αρχείου που θα χρησιμοποιηθεί για την αποθήκευση του βίντεο "
|
"Επέκταση αρχείου που θα χρησιμοποιηθεί για την αποθήκευση του βίντεο οθόνης"
|
||||||
"παρουσίασης"
|
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -234,7 +237,7 @@ msgid ""
|
|||||||
"current date, and use this extension. It should be changed when recording to "
|
"current date, and use this extension. It should be changed when recording to "
|
||||||
"a different container format."
|
"a different container format."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Το όνομα αρχείου για τα καταγεγραμμένα στιγμιότυπα οθόνης θα είναι μοναδικό, "
|
"Το όνομα αρχείου για τα καταγεγραμμένα βίντεο οθόνης θα είναι μοναδικό, "
|
||||||
"βασισμένο στην τρέχουσα ημερομηνία και θα χρησιμοποιεί αυτή την επέκταση. Θα "
|
"βασισμένο στην τρέχουσα ημερομηνία και θα χρησιμοποιεί αυτή την επέκταση. Θα "
|
||||||
"πρέπει να αλλάζει όταν γίνεται εγγραφή σε διαφορετικό πρότυπο περιέκτη."
|
"πρέπει να αλλάζει όταν γίνεται εγγραφή σε διαφορετικό πρότυπο περιέκτη."
|
||||||
|
|
||||||
@@ -255,11 +258,11 @@ msgstr ""
|
|||||||
"Επιλέξτε μια επέκταση για να την ρυθμίσετε χρησιμοποιώντας το πλαίσιο "
|
"Επιλέξτε μια επέκταση για να την ρυθμίσετε χρησιμοποιώντας το πλαίσιο "
|
||||||
"πολλαπλών επιλογών."
|
"πολλαπλών επιλογών."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:526
|
#: ../js/gdm/loginDialog.js:529
|
||||||
msgid "Session..."
|
msgid "Session..."
|
||||||
msgstr "Συνεδρία..."
|
msgstr "Συνεδρία..."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:675
|
#: ../js/gdm/loginDialog.js:677
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Σύνδεση"
|
msgstr "Σύνδεση"
|
||||||
@@ -267,47 +270,56 @@ msgstr "Σύνδεση"
|
|||||||
#. translators: this message is shown below the user list on the
|
#. translators: this message is shown below the user list on the
|
||||||
#. login screen. It can be activated to reveal an entry for
|
#. login screen. It can be activated to reveal an entry for
|
||||||
#. manually entering the username.
|
#. manually entering the username.
|
||||||
#: ../js/gdm/loginDialog.js:742
|
#: ../js/gdm/loginDialog.js:736
|
||||||
msgid "Not listed?"
|
msgid "Not listed?"
|
||||||
msgstr "Δεν είστε στη λίστα;"
|
msgstr "Δεν είστε στη λίστα;"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:895 ../js/ui/components/networkAgent.js:137
|
#: ../js/gdm/loginDialog.js:889 ../js/ui/components/networkAgent.js:137
|
||||||
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
||||||
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
||||||
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:137
|
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:167
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Ακύρωση"
|
msgstr "Ακύρωση"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:900
|
#: ../js/gdm/loginDialog.js:894
|
||||||
msgctxt "button"
|
msgctxt "button"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Σύνδεση"
|
msgstr "Σύνδεση"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:1239
|
#: ../js/gdm/loginDialog.js:1215
|
||||||
msgid "Login Window"
|
msgid "Login Window"
|
||||||
msgstr "Παράθυρο σύνδεσης"
|
msgstr "Παράθυρο σύνδεσης"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:88 ../js/ui/userMenu.js:657 ../js/ui/userMenu.js:661
|
#. Translators: accessible name of the power menu in the login screen
|
||||||
#: ../js/ui/userMenu.js:772
|
#: ../js/gdm/powerMenu.js:35
|
||||||
|
msgid "Power"
|
||||||
|
msgstr "Ενέργεια"
|
||||||
|
|
||||||
|
#: ../js/gdm/powerMenu.js:89 ../js/ui/userMenu.js:660 ../js/ui/userMenu.js:664
|
||||||
|
#: ../js/ui/userMenu.js:775
|
||||||
msgid "Suspend"
|
msgid "Suspend"
|
||||||
msgstr "Αναστολή"
|
msgstr "Αναστολή"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:93
|
#: ../js/gdm/powerMenu.js:94
|
||||||
msgid "Restart"
|
msgid "Restart"
|
||||||
msgstr "Επανεκκίνηση"
|
msgstr "Επανεκκίνηση"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:98 ../js/ui/userMenu.js:659 ../js/ui/userMenu.js:661
|
#: ../js/gdm/powerMenu.js:99 ../js/ui/userMenu.js:662 ../js/ui/userMenu.js:664
|
||||||
#: ../js/ui/userMenu.js:771
|
#: ../js/ui/userMenu.js:774
|
||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Απενεργοποίηση"
|
msgstr "Απενεργοποίηση"
|
||||||
|
|
||||||
|
#: ../js/gdm/util.js:148
|
||||||
|
msgid "Authentication error"
|
||||||
|
msgstr "Σφάλμα πιστοποίησης"
|
||||||
|
|
||||||
#. Translators: this message is shown below the password entry field
|
#. Translators: this message is shown below the password entry field
|
||||||
#. to indicate the user can swipe their finger instead
|
#. to indicate the user can swipe their finger instead
|
||||||
#: ../js/gdm/util.js:247
|
#: ../js/gdm/util.js:265
|
||||||
msgid "(or swipe finger)"
|
msgid "(or swipe finger)"
|
||||||
msgstr "(ή περάστε το δάκτυλο σας)"
|
msgstr "(ή περάστε το δάκτυλο σας)"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:272
|
#: ../js/gdm/util.js:290
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(π.χ χρήστης ή %s)"
|
msgstr "(π.χ χρήστης ή %s)"
|
||||||
@@ -344,7 +356,7 @@ msgstr "ΡΥΘΜΙΣΕΙΣ"
|
|||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "Νέο παράθυρο"
|
msgstr "Νέο παράθυρο"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:678 ../js/ui/dash.js:271
|
#: ../js/ui/appDisplay.js:678 ../js/ui/dash.js:290
|
||||||
msgid "Remove from Favorites"
|
msgid "Remove from Favorites"
|
||||||
msgstr "Αφαίρεση από τα αγαπημένα"
|
msgstr "Αφαίρεση από τα αγαπημένα"
|
||||||
|
|
||||||
@@ -508,16 +520,16 @@ msgstr "Αυτή η εβδομάδα"
|
|||||||
msgid "Next week"
|
msgid "Next week"
|
||||||
msgstr "Επόμενη εβδομάδα"
|
msgstr "Επόμενη εβδομάδα"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:278
|
#: ../js/ui/components/autorunManager.js:297
|
||||||
msgid "Removable Devices"
|
msgid "Removable Devices"
|
||||||
msgstr "Αφαιρούμενες συσκευές"
|
msgstr "Αφαιρούμενες συσκευές"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:575
|
#: ../js/ui/components/autorunManager.js:594
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Άνοιγμα με %s"
|
msgstr "Άνοιγμα με %s"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:601
|
#: ../js/ui/components/autorunManager.js:620
|
||||||
msgid "Eject"
|
msgid "Eject"
|
||||||
msgstr "Εξαγωγή"
|
msgstr "Εξαγωγή"
|
||||||
|
|
||||||
@@ -637,7 +649,7 @@ msgstr "Συγνώμη, αυτό δεν λειτούργησε. Παρακαλώ
|
|||||||
#: ../js/ui/components/recorder.js:44
|
#: ../js/ui/components/recorder.js:44
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Screencast from %d %t"
|
msgid "Screencast from %d %t"
|
||||||
msgstr "Βίντεο-παρουσίαση από %d %t"
|
msgstr "Βίντεο οθόνης από %d %t"
|
||||||
|
|
||||||
#. FIXME: We don't have a 'chat room' icon (bgo #653737) use
|
#. FIXME: We don't have a 'chat room' icon (bgo #653737) use
|
||||||
#. system-users for now as Empathy does.
|
#. system-users for now as Empathy does.
|
||||||
@@ -891,7 +903,7 @@ msgstr "Επεξεργασία λογαριασμού"
|
|||||||
msgid "Unknown reason"
|
msgid "Unknown reason"
|
||||||
msgstr "Άγνωστος λόγος"
|
msgstr "Άγνωστος λόγος"
|
||||||
|
|
||||||
#: ../js/ui/dash.js:245 ../js/ui/dash.js:273
|
#: ../js/ui/dash.js:253 ../js/ui/dash.js:292
|
||||||
msgid "Show Applications"
|
msgid "Show Applications"
|
||||||
msgstr "Προβολή εφαρμογών"
|
msgstr "Προβολή εφαρμογών"
|
||||||
|
|
||||||
@@ -899,14 +911,14 @@ msgstr "Προβολή εφαρμογών"
|
|||||||
msgid "Date and Time Settings"
|
msgid "Date and Time Settings"
|
||||||
msgstr "Ρυθμίσεις ώρας και ημερομηνίας"
|
msgstr "Ρυθμίσεις ώρας και ημερομηνίας"
|
||||||
|
|
||||||
#: ../js/ui/dateMenu.js:109
|
#: ../js/ui/dateMenu.js:111
|
||||||
msgid "Open Calendar"
|
msgid "Open Calendar"
|
||||||
msgstr "Άνοιγμα ημερολογίου"
|
msgstr "Άνοιγμα ημερολογίου"
|
||||||
|
|
||||||
#. Translators: This is the date format to use when the calendar popup is
|
#. Translators: This is the date format to use when the calendar popup is
|
||||||
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
|
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
|
||||||
#.
|
#.
|
||||||
#: ../js/ui/dateMenu.js:175
|
#: ../js/ui/dateMenu.js:201
|
||||||
msgid "%A %B %e, %Y"
|
msgid "%A %B %e, %Y"
|
||||||
msgstr "%A %B %e, %Y"
|
msgstr "%A %B %e, %Y"
|
||||||
|
|
||||||
@@ -959,7 +971,7 @@ msgstr "Απενεργοποίηση"
|
|||||||
msgid "Click Power Off to quit these applications and power off the system."
|
msgid "Click Power Off to quit these applications and power off the system."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Πατήστε Απενεργοποίηση για να κλείσετε αυτές τις εφαρμογές και να "
|
"Πατήστε Απενεργοποίηση για να κλείσετε αυτές τις εφαρμογές και να "
|
||||||
"απενεργοποιήσετε το σύστημα."
|
"τερματίσετε το σύστημα."
|
||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:84
|
#: ../js/ui/endSessionDialog.js:84
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1013,11 +1025,11 @@ msgstr "Εγκατάσταση"
|
|||||||
msgid "Download and install '%s' from extensions.gnome.org?"
|
msgid "Download and install '%s' from extensions.gnome.org?"
|
||||||
msgstr "Λήψη και εγκατάσταση '%s' από το extensions.gnome.org ;"
|
msgstr "Λήψη και εγκατάσταση '%s' από το extensions.gnome.org ;"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:327
|
#: ../js/ui/keyboard.js:337
|
||||||
msgid "tray"
|
msgid "tray"
|
||||||
msgstr "συρτάρι"
|
msgstr "περιοχή"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:561 ../js/ui/status/keyboard.js:146
|
#: ../js/ui/keyboard.js:584 ../js/ui/status/keyboard.js:195
|
||||||
#: ../js/ui/status/power.js:205
|
#: ../js/ui/status/power.js:205
|
||||||
msgid "Keyboard"
|
msgid "Keyboard"
|
||||||
msgstr "Πληκτρολόγιο"
|
msgstr "Πληκτρολόγιο"
|
||||||
@@ -1070,19 +1082,19 @@ msgstr "Προβολή πηγής"
|
|||||||
msgid "Web Page"
|
msgid "Web Page"
|
||||||
msgstr "Ιστοσελίδα"
|
msgstr "Ιστοσελίδα"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1080
|
#: ../js/ui/messageTray.js:1081
|
||||||
msgid "Open"
|
msgid "Open"
|
||||||
msgstr "Άνοιγμα"
|
msgstr "Άνοιγμα"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1087
|
#: ../js/ui/messageTray.js:1088
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Αφαίρεση"
|
msgstr "Αφαίρεση"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2041
|
#: ../js/ui/messageTray.js:1540
|
||||||
msgid "Message Tray"
|
msgid "Message Tray"
|
||||||
msgstr "Περιοχή ειδοποιήσεων"
|
msgstr "Περιοχή ειδοποιήσεων"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2483
|
#: ../js/ui/messageTray.js:2547
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "Πληροφορίες συστήματος"
|
msgstr "Πληροφορίες συστήματος"
|
||||||
|
|
||||||
@@ -1142,7 +1154,7 @@ msgstr "Παρακαλώ πληκτρολογήστε μία εντολή:"
|
|||||||
|
|
||||||
#. Translators: This is a time format for a date in
|
#. Translators: This is a time format for a date in
|
||||||
#. long format
|
#. long format
|
||||||
#: ../js/ui/screenShield.js:78
|
#: ../js/ui/screenShield.js:79
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %B %d"
|
msgstr "%A, %B %d"
|
||||||
|
|
||||||
@@ -1192,7 +1204,7 @@ msgstr "Κωδικός"
|
|||||||
msgid "Remember Password"
|
msgid "Remember Password"
|
||||||
msgstr "Απομνημόνευση κωδικού"
|
msgstr "Απομνημόνευση κωδικού"
|
||||||
|
|
||||||
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:140
|
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:170
|
||||||
msgid "Unlock"
|
msgid "Unlock"
|
||||||
msgstr "Ξεκλείδωμα"
|
msgstr "Ξεκλείδωμα"
|
||||||
|
|
||||||
@@ -1311,7 +1323,7 @@ msgstr "Ρυθμίσεις πληκτρολογίου"
|
|||||||
msgid "Mouse Settings"
|
msgid "Mouse Settings"
|
||||||
msgstr "Ρυθμίσεις ποντικιού"
|
msgstr "Ρυθμίσεις ποντικιού"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:236
|
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:234
|
||||||
msgid "Sound Settings"
|
msgid "Sound Settings"
|
||||||
msgstr "Ρυθμίσεις ήχου"
|
msgstr "Ρυθμίσεις ήχου"
|
||||||
|
|
||||||
@@ -1369,11 +1381,11 @@ msgstr "Παρακαλώ εισάγετε το PIN που αναφέρεται
|
|||||||
msgid "OK"
|
msgid "OK"
|
||||||
msgstr "Εντάξει"
|
msgstr "Εντάξει"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:170
|
#: ../js/ui/status/keyboard.js:228
|
||||||
msgid "Show Keyboard Layout"
|
msgid "Show Keyboard Layout"
|
||||||
msgstr "Εμφάνιση διάταξης πληκτρολογίου"
|
msgstr "Εμφάνιση διάταξης πληκτρολογίου"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:175
|
#: ../js/ui/status/keyboard.js:233
|
||||||
msgid "Region and Language Settings"
|
msgid "Region and Language Settings"
|
||||||
msgstr "Ρυθμίσεις περιοχής και γλώσσας"
|
msgstr "Ρυθμίσεις περιοχής και γλώσσας"
|
||||||
|
|
||||||
@@ -1596,7 +1608,7 @@ msgid "Unknown"
|
|||||||
msgstr "Άγνωστο"
|
msgstr "Άγνωστο"
|
||||||
|
|
||||||
#. Translators: This is the label for audio volume
|
#. Translators: This is the label for audio volume
|
||||||
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:223
|
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:221
|
||||||
msgid "Volume"
|
msgid "Volume"
|
||||||
msgstr "Ένταση ήχου"
|
msgstr "Ένταση ήχου"
|
||||||
|
|
||||||
@@ -1604,67 +1616,63 @@ msgstr "Ένταση ήχου"
|
|||||||
msgid "Microphone"
|
msgid "Microphone"
|
||||||
msgstr "Μικρόφωνο"
|
msgstr "Μικρόφωνο"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:147
|
#: ../js/ui/unlockDialog.js:177
|
||||||
msgid "Log in as another user"
|
msgid "Log in as another user"
|
||||||
msgstr "Είσοδος ως άλλος χρήστης"
|
msgstr "Είσοδος ως άλλος χρήστης"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:174
|
#: ../js/ui/userMenu.js:180
|
||||||
msgid "Available"
|
msgid "Available"
|
||||||
msgstr "Διαθέσιμος-η"
|
msgstr "Διαθέσιμος-η"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:177
|
#: ../js/ui/userMenu.js:183
|
||||||
msgid "Busy"
|
msgid "Busy"
|
||||||
msgstr "Απασχολημένος-η"
|
msgstr "Απασχολημένος-η"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:180
|
#: ../js/ui/userMenu.js:186
|
||||||
msgid "Invisible"
|
msgid "Invisible"
|
||||||
msgstr "Αόρατος-η"
|
msgstr "Αόρατος-η"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:183
|
#: ../js/ui/userMenu.js:189
|
||||||
msgid "Away"
|
msgid "Away"
|
||||||
msgstr "Απουσιάζει"
|
msgstr "Απουσιάζει"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:186
|
#: ../js/ui/userMenu.js:192
|
||||||
msgid "Idle"
|
msgid "Idle"
|
||||||
msgstr "Αδρανής"
|
msgstr "Αδρανής"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:189
|
#: ../js/ui/userMenu.js:195
|
||||||
msgid "Unavailable"
|
msgid "Unavailable"
|
||||||
msgstr "Μη διαθέσιμος-η"
|
msgstr "Μη διαθέσιμος-η"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:612 ../js/ui/userMenu.js:753
|
#: ../js/ui/userMenu.js:740
|
||||||
msgid "Switch User"
|
|
||||||
msgstr "Αλλαγή χρήστη"
|
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:613
|
|
||||||
msgid "Switch Session"
|
|
||||||
msgstr "Αλλαγή συνεδρίας"
|
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:737
|
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Ειδοποιήσεις"
|
msgstr "Ειδοποιήσεις"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:745
|
#: ../js/ui/userMenu.js:748
|
||||||
msgid "System Settings"
|
msgid "System Settings"
|
||||||
msgstr "Ρυθμίσεις συστήματος"
|
msgstr "Ρυθμίσεις συστήματος"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:758
|
#: ../js/ui/userMenu.js:756
|
||||||
|
msgid "Switch User"
|
||||||
|
msgstr "Αλλαγή χρήστη"
|
||||||
|
|
||||||
|
#: ../js/ui/userMenu.js:761
|
||||||
msgid "Log Out"
|
msgid "Log Out"
|
||||||
msgstr "Αποσύνδεση"
|
msgstr "Αποσύνδεση"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:763
|
#: ../js/ui/userMenu.js:766
|
||||||
msgid "Lock"
|
msgid "Lock"
|
||||||
msgstr "Κλείδωμα"
|
msgstr "Κλείδωμα"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:778
|
#: ../js/ui/userMenu.js:781
|
||||||
msgid "Install Updates & Restart"
|
msgid "Install Updates & Restart"
|
||||||
msgstr "Εγκατάσταση ενημερώσεων & επανεκκίνηση"
|
msgstr "Εγκατάσταση ενημερώσεων & επανεκκίνηση"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:796
|
#: ../js/ui/userMenu.js:799
|
||||||
msgid "Your chat status will be set to busy"
|
msgid "Your chat status will be set to busy"
|
||||||
msgstr "Η κατάσταση συνομιλίας σας θα ορισθεί σε απασχολημένος"
|
msgstr "Η κατάσταση συνομιλίας σας θα ορισθεί σε απασχολημένος"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:797
|
#: ../js/ui/userMenu.js:800
|
||||||
msgid ""
|
msgid ""
|
||||||
"Notifications are now disabled, including chat messages. Your online status "
|
"Notifications are now disabled, including chat messages. Your online status "
|
||||||
"has been adjusted to let others know that you might not see their messages."
|
"has been adjusted to let others know that you might not see their messages."
|
||||||
@@ -1685,7 +1693,7 @@ msgstr "Εφαρμογές"
|
|||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Αναζήτηση"
|
msgstr "Αναζήτηση"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:119
|
#: ../js/ui/wanda.js:117
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sorry, no wisdom for you today:\n"
|
"Sorry, no wisdom for you today:\n"
|
||||||
@@ -1694,12 +1702,12 @@ msgstr ""
|
|||||||
"Συγγνώμη, κανένα απόφθεγμα για εσάς σήμερα:\n"
|
"Συγγνώμη, κανένα απόφθεγμα για εσάς σήμερα:\n"
|
||||||
"%s"
|
"%s"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:123
|
#: ../js/ui/wanda.js:121
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s the Oracle says"
|
msgid "%s the Oracle says"
|
||||||
msgstr "%s ο Προφήτης λέει"
|
msgstr "%s ο Προφήτης λέει"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:164
|
#: ../js/ui/wanda.js:162
|
||||||
msgid "Your favorite Easter Egg"
|
msgid "Your favorite Easter Egg"
|
||||||
msgstr "Το αγαπημένο σας Easter Egg"
|
msgstr "Το αγαπημένο σας Easter Egg"
|
||||||
|
|
||||||
@@ -1734,20 +1742,20 @@ msgstr[1] "%u είσοδοι"
|
|||||||
msgid "System Sounds"
|
msgid "System Sounds"
|
||||||
msgstr "Ήχοι συστήματος"
|
msgstr "Ήχοι συστήματος"
|
||||||
|
|
||||||
#: ../src/main.c:330
|
#: ../src/main.c:332
|
||||||
msgid "Print version"
|
msgid "Print version"
|
||||||
msgstr "Εκτύπωση έκδοσης"
|
msgstr "Εκτύπωση έκδοσης"
|
||||||
|
|
||||||
#: ../src/main.c:336
|
#: ../src/main.c:338
|
||||||
msgid "Mode used by GDM for login screen"
|
msgid "Mode used by GDM for login screen"
|
||||||
msgstr "Λειτουργία που απαιτείται από το GDM για την οθόνη σύνδεσης"
|
msgstr "Λειτουργία που απαιτείται από το GDM για την οθόνη σύνδεσης"
|
||||||
|
|
||||||
#: ../src/main.c:342
|
#: ../src/main.c:344
|
||||||
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
|
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Χρησιμοποιήστε μια συγκεκριμένη λειτουργία, π.χ \"gdm\" για την οθόνη εισόδου"
|
"Χρησιμοποιήστε μια συγκεκριμένη λειτουργία, π.χ \"gdm\" για την οθόνη εισόδου"
|
||||||
|
|
||||||
#: ../src/main.c:348
|
#: ../src/main.c:350
|
||||||
msgid "List possible modes"
|
msgid "List possible modes"
|
||||||
msgstr "Λίστα πιθανών λειτουργιών"
|
msgstr "Λίστα πιθανών λειτουργιών"
|
||||||
|
|
||||||
@@ -1776,6 +1784,9 @@ msgstr "Προεπιλογή"
|
|||||||
msgid "Authentication dialog was dismissed by the user"
|
msgid "Authentication dialog was dismissed by the user"
|
||||||
msgstr "Το παράθυρο πιστοποίησης έκλεισε από τον χρήστη"
|
msgstr "Το παράθυρο πιστοποίησης έκλεισε από τον χρήστη"
|
||||||
|
|
||||||
|
#~ msgid "Switch Session"
|
||||||
|
#~ msgstr "Αλλαγή συνεδρίας"
|
||||||
|
|
||||||
#~ msgid "disabled OpenSearch providers"
|
#~ msgid "disabled OpenSearch providers"
|
||||||
#~ msgstr "απενεργοποιημένοι πάροχοι OpenSearch"
|
#~ msgstr "απενεργοποιημένοι πάροχοι OpenSearch"
|
||||||
|
|
||||||
@@ -1791,9 +1802,6 @@ msgstr "Το παράθυρο πιστοποίησης έκλεισε από τ
|
|||||||
#~ msgid "Home"
|
#~ msgid "Home"
|
||||||
#~ msgstr "Προσωπικός φάκελος"
|
#~ msgstr "Προσωπικός φάκελος"
|
||||||
|
|
||||||
#~ msgid "File System"
|
|
||||||
#~ msgstr "Σύστημα αρχείων"
|
|
||||||
|
|
||||||
#~ msgid "%1$s: %2$s"
|
#~ msgid "%1$s: %2$s"
|
||||||
#~ msgstr "%1$s: %2$s"
|
#~ msgstr "%1$s: %2$s"
|
||||||
|
|
||||||
@@ -1979,9 +1987,6 @@ msgstr "Το παράθυρο πιστοποίησης έκλεισε από τ
|
|||||||
#~ msgid "Opacity of the crosshairs"
|
#~ msgid "Opacity of the crosshairs"
|
||||||
#~ msgstr "Αδιαφάνεια του σκοπεύτρου"
|
#~ msgstr "Αδιαφάνεια του σκοπεύτρου"
|
||||||
|
|
||||||
#~ msgid "Screen position"
|
|
||||||
#~ msgstr "Θέση οθόνης"
|
|
||||||
|
|
||||||
#~ msgid "Scroll magnified contents beyond the edges of the desktop"
|
#~ msgid "Scroll magnified contents beyond the edges of the desktop"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Κύλιση σε μεγεθυμένα περιεχόμενα που βρίσκονται έξω από την επιφάνεια"
|
#~ "Κύλιση σε μεγεθυμένα περιεχόμενα που βρίσκονται έξω από την επιφάνεια"
|
||||||
|
|||||||
415
po/en_GB.po
415
po/en_GB.po
@@ -3,14 +3,16 @@
|
|||||||
# This file is distributed under the same license as the gnome-shell package.
|
# This file is distributed under the same license as the gnome-shell package.
|
||||||
# Philip Withnall <philip@tecnocode.co.uk>, 2009, 2010.
|
# Philip Withnall <philip@tecnocode.co.uk>, 2009, 2010.
|
||||||
# Bruce Cowan <bruce@bcowan.me.uk>, 2010, 2011, 2012.
|
# Bruce Cowan <bruce@bcowan.me.uk>, 2010, 2011, 2012.
|
||||||
|
# Chris Leonard <cjlhomeaddress@gmail.com>, 2012.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell master\n"
|
"Project-Id-Version: gnome-shell master\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
||||||
"POT-Creation-Date: 2012-09-05 13:55+0100\n"
|
"shell&keywords=I18N+L10N&component=general\n"
|
||||||
"PO-Revision-Date: 2012-09-05 13:57+0100\n"
|
"POT-Creation-Date: 2012-10-11 15:26+0000\n"
|
||||||
"Last-Translator: Bruce Cowan <bruce@bcowan.me.uk>\n"
|
"PO-Revision-Date: 2012-09-27 23:56-0400\n"
|
||||||
"Language-Team: British English <en@li.org>\n"
|
"Last-Translator: Chris Leonard <cjlhomeaddress@gmail.com>\n"
|
||||||
|
"Language-Team: Sugar Labs\n"
|
||||||
"Language: en_GB\n"
|
"Language: en_GB\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
@@ -19,6 +21,22 @@ msgstr ""
|
|||||||
"X-Generator: Virtaal 0.7.1\n"
|
"X-Generator: Virtaal 0.7.1\n"
|
||||||
"X-Project-Style: gnome\n"
|
"X-Project-Style: gnome\n"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:1
|
||||||
|
msgid "Screenshots"
|
||||||
|
msgstr "Screenshots"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:2
|
||||||
|
msgid "Record a screencast"
|
||||||
|
msgstr "Record a screencast"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:1
|
||||||
|
msgid "System"
|
||||||
|
msgstr "System"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:2
|
||||||
|
msgid "Show the message tray"
|
||||||
|
msgstr "Show the message tray"
|
||||||
|
|
||||||
#: ../data/gnome-shell.desktop.in.in.h:1
|
#: ../data/gnome-shell.desktop.in.in.h:1
|
||||||
msgid "GNOME Shell"
|
msgid "GNOME Shell"
|
||||||
msgstr "GNOME Shell"
|
msgstr "GNOME Shell"
|
||||||
@@ -93,78 +111,74 @@ msgstr ""
|
|||||||
"favourites area."
|
"favourites area."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:9
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:9
|
||||||
msgid "disabled OpenSearch providers"
|
|
||||||
msgstr "disabled OpenSearch providers"
|
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:10
|
|
||||||
msgid "History for command (Alt-F2) dialog"
|
msgid "History for command (Alt-F2) dialog"
|
||||||
msgstr "History for command (Alt+F2) dialogue"
|
msgstr "History for command (Alt+F2) dialogue"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:11
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:10
|
||||||
msgid "History for the looking glass dialog"
|
msgid "History for the looking glass dialog"
|
||||||
msgstr "History for the looking glass dialogue"
|
msgstr "History for the looking glass dialogue"
|
||||||
|
|
||||||
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:11
|
||||||
|
msgid ""
|
||||||
|
"Internally used to store the last IM presence explicitly set by the user. "
|
||||||
|
"The value here is from the TpConnectionPresenceType enumeration."
|
||||||
|
msgstr ""
|
||||||
|
"Internally used to store the last IM presence explicitly set by the user. "
|
||||||
|
"The value here is from the TpConnectionPresenceType enumeration."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:12
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:12
|
||||||
msgid ""
|
msgid ""
|
||||||
"Internally used to store the last IM presence explicitly set by the user. "
|
"Internally used to store the last session presence status for the user. The "
|
||||||
"The value here is from the TpConnectionPresenceType enumeration."
|
"value here is from the GsmPresenceStatus enumeration."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Internally used to store the last IM presence explicitly set by the user. "
|
"Internally used to store the last session presence status for the user. The "
|
||||||
"The value here is from the TpConnectionPresenceType enumeration."
|
"value here is from the GsmPresenceStatus enumeration."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:13
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:13
|
||||||
msgid ""
|
|
||||||
"Internally used to store the last session presence status for the user. The "
|
|
||||||
"value here is from the GsmPresenceStatus enumeration."
|
|
||||||
msgstr ""
|
|
||||||
"Internally used to store the last session presence status for the user. The "
|
|
||||||
"value here is from the GsmPresenceStatus enumeration."
|
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:14
|
|
||||||
msgid "Show the week date in the calendar"
|
msgid "Show the week date in the calendar"
|
||||||
msgstr "Show the week date in the calendar"
|
msgstr "Show the week date in the calendar"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:15
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:14
|
||||||
msgid "If true, display the ISO week date in the calendar."
|
msgid "If true, display the ISO week date in the calendar."
|
||||||
msgstr "If true, display the ISO week date in the calendar."
|
msgstr "If true, display the ISO week date in the calendar."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:16
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:15
|
||||||
msgid "Keybinding to open the application menu"
|
msgid "Keybinding to open the application menu"
|
||||||
msgstr "Keybinding to open the application menu"
|
msgstr "Keybinding to open the application menu"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:17
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:16
|
||||||
msgid "Keybinding to open the application menu."
|
msgid "Keybinding to open the application menu."
|
||||||
msgstr "Keybinding to open the application menu."
|
msgstr "Keybinding to open the application menu."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:18
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:17
|
||||||
msgid "Keybinding to toggle the visibility of the message tray"
|
msgid "Keybinding to toggle the visibility of the message tray"
|
||||||
msgstr "Keybinding to toggle the visibility of the message tray"
|
msgstr "Keybinding to toggle the visibility of the message tray"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:19
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:18
|
||||||
msgid "Keybinding to toggle the visibility of the message tray."
|
msgid "Keybinding to toggle the visibility of the message tray."
|
||||||
msgstr "Keybinding to toggle the visibility of the message tray."
|
msgstr "Keybinding to toggle the visibility of the message tray."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:20
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:19
|
||||||
msgid "Keybinding to toggle the screen recorder"
|
msgid "Keybinding to toggle the screen recorder"
|
||||||
msgstr "Keybinding to toggle the screen recorder"
|
msgstr "Keybinding to toggle the screen recorder"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:21
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:20
|
||||||
msgid "Keybinding to start/stop the builtin screen recorder."
|
msgid "Keybinding to start/stop the builtin screen recorder."
|
||||||
msgstr "Keybinding to start/stop the builtin screen recorder."
|
msgstr "Keybinding to start/stop the builtin screen recorder."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:22
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:21
|
||||||
msgid "Which keyboard to use"
|
msgid "Which keyboard to use"
|
||||||
msgstr "Which keyboard to use"
|
msgstr "Which keyboard to use"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:22
|
||||||
msgid "The type of keyboard to use."
|
msgid "The type of keyboard to use."
|
||||||
msgstr "The type of keyboard to use."
|
msgstr "The type of keyboard to use."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23
|
||||||
msgid "Framerate used for recording screencasts."
|
msgid "Framerate used for recording screencasts."
|
||||||
msgstr "Framerate used for recording screencasts."
|
msgstr "Framerate used for recording screencasts."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24
|
||||||
msgid ""
|
msgid ""
|
||||||
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
||||||
"screencast recorder in frames-per-second."
|
"screencast recorder in frames-per-second."
|
||||||
@@ -172,11 +186,11 @@ msgstr ""
|
|||||||
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
"The framerate of the resulting screencast recordered by GNOME Shell's "
|
||||||
"screencast recorder in frames per second."
|
"screencast recorder in frames per second."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:26
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
||||||
msgid "The gstreamer pipeline used to encode the screencast"
|
msgid "The gstreamer pipeline used to encode the screencast"
|
||||||
msgstr "The GStreamer pipeline used to encode the screencast"
|
msgstr "The GStreamer pipeline used to encode the screencast"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:27
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
||||||
@@ -186,9 +200,9 @@ msgid ""
|
|||||||
"pipeline can also take care of its own output - this might be used to send "
|
"pipeline can also take care of its own output - this might be used to send "
|
||||||
"the output to an icecast server via shout2send or similar. When unset or set "
|
"the output to an icecast server via shout2send or similar. When unset or set "
|
||||||
"to an empty value, the default pipeline will be used. This is currently "
|
"to an empty value, the default pipeline will be used. This is currently "
|
||||||
"'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux' and records to WEBM "
|
"'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 "
|
||||||
"using the VP8 codec. %T is used as a placeholder for a guess at the optimal "
|
"threads=%T ! queue ! webmmux' and records to WEBM using the VP8 codec. %T is "
|
||||||
"thread count on the system."
|
"used as a placeholder for a guess at the optimal thread count on the system."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
|
||||||
"used for gst-launch. The pipeline should have an unconnected sink pad where "
|
"used for gst-launch. The pipeline should have an unconnected sink pad where "
|
||||||
@@ -197,15 +211,15 @@ msgstr ""
|
|||||||
"pipeline can also take care of its own output - this might be used to send "
|
"pipeline can also take care of its own output - this might be used to send "
|
||||||
"the output to an icecast server via shout2send or similar. When unset or set "
|
"the output to an icecast server via shout2send or similar. When unset or set "
|
||||||
"to an empty value, the default pipeline will be used. This is currently "
|
"to an empty value, the default pipeline will be used. This is currently "
|
||||||
"'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux' and records to WEBM "
|
"'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 "
|
||||||
"using the VP8 codec. %T is used as a placeholder for a guess at the optimal "
|
"threads=%T ! queue ! webmmux' and records to WEBM using the VP8 codec. %T is "
|
||||||
"thread count on the system."
|
"used as a placeholder for a guess at the optimal thread count on the system."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
||||||
msgid "File extension used for storing the screencast"
|
msgid "File extension used for storing the screencast"
|
||||||
msgstr "File extension used for storing the screencast"
|
msgstr "File extension used for storing the screencast"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:30
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
||||||
msgid ""
|
msgid ""
|
||||||
"The filename for recorded screencasts will be a unique filename based on the "
|
"The filename for recorded screencasts will be a unique filename based on the "
|
||||||
"current date, and use this extension. It should be changed when recording to "
|
"current date, and use this extension. It should be changed when recording to "
|
||||||
@@ -228,11 +242,11 @@ msgstr "Extension"
|
|||||||
msgid "Select an extension to configure using the combobox above."
|
msgid "Select an extension to configure using the combobox above."
|
||||||
msgstr "Select an extension to configure using the combobox above."
|
msgstr "Select an extension to configure using the combobox above."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:526
|
#: ../js/gdm/loginDialog.js:529
|
||||||
msgid "Session..."
|
msgid "Session..."
|
||||||
msgstr "Session…"
|
msgstr "Session…"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:675
|
#: ../js/gdm/loginDialog.js:677
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Sign In"
|
msgstr "Sign In"
|
||||||
@@ -240,47 +254,56 @@ msgstr "Sign In"
|
|||||||
#. translators: this message is shown below the user list on the
|
#. translators: this message is shown below the user list on the
|
||||||
#. login screen. It can be activated to reveal an entry for
|
#. login screen. It can be activated to reveal an entry for
|
||||||
#. manually entering the username.
|
#. manually entering the username.
|
||||||
#: ../js/gdm/loginDialog.js:742
|
#: ../js/gdm/loginDialog.js:736
|
||||||
msgid "Not listed?"
|
msgid "Not listed?"
|
||||||
msgstr "Not listed?"
|
msgstr "Not listed?"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:895 ../js/ui/components/networkAgent.js:137
|
#: ../js/gdm/loginDialog.js:889 ../js/ui/components/networkAgent.js:137
|
||||||
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:373
|
||||||
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:396
|
||||||
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:134
|
#: ../js/ui/status/bluetooth.js:427 ../js/ui/unlockDialog.js:166
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Cancel"
|
msgstr "Cancel"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:900
|
#: ../js/gdm/loginDialog.js:894
|
||||||
msgctxt "button"
|
msgctxt "button"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Sign In"
|
msgstr "Sign In"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:1239
|
#: ../js/gdm/loginDialog.js:1215
|
||||||
msgid "Login Window"
|
msgid "Login Window"
|
||||||
msgstr "Login Window"
|
msgstr "Login Window"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:88 ../js/ui/userMenu.js:657 ../js/ui/userMenu.js:661
|
#. Translators: accessible name of the power menu in the login screen
|
||||||
|
#: ../js/gdm/powerMenu.js:35
|
||||||
|
msgid "Power"
|
||||||
|
msgstr "Power"
|
||||||
|
|
||||||
|
#: ../js/gdm/powerMenu.js:89 ../js/ui/userMenu.js:660 ../js/ui/userMenu.js:664
|
||||||
#: ../js/ui/userMenu.js:775
|
#: ../js/ui/userMenu.js:775
|
||||||
msgid "Suspend"
|
msgid "Suspend"
|
||||||
msgstr "Suspend"
|
msgstr "Suspend"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:93
|
#: ../js/gdm/powerMenu.js:94
|
||||||
msgid "Restart"
|
msgid "Restart"
|
||||||
msgstr "Restart"
|
msgstr "Restart"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:98 ../js/ui/userMenu.js:659 ../js/ui/userMenu.js:661
|
#: ../js/gdm/powerMenu.js:99 ../js/ui/userMenu.js:662 ../js/ui/userMenu.js:664
|
||||||
#: ../js/ui/userMenu.js:774
|
#: ../js/ui/userMenu.js:774
|
||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Power Off"
|
msgstr "Power Off"
|
||||||
|
|
||||||
|
#: ../js/gdm/util.js:148
|
||||||
|
msgid "Authentication error"
|
||||||
|
msgstr "Authentication error"
|
||||||
|
|
||||||
#. Translators: this message is shown below the password entry field
|
#. Translators: this message is shown below the password entry field
|
||||||
#. to indicate the user can swipe their finger instead
|
#. to indicate the user can swipe their finger instead
|
||||||
#: ../js/gdm/util.js:247
|
#: ../js/gdm/util.js:265
|
||||||
msgid "(or swipe finger)"
|
msgid "(or swipe finger)"
|
||||||
msgstr "(or swipe finger)"
|
msgstr "(or swipe finger)"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:272
|
#: ../js/gdm/util.js:290
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(e.g., user or %s)"
|
msgstr "(e.g., user or %s)"
|
||||||
@@ -317,7 +340,7 @@ msgstr "SETTINGS"
|
|||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "New Window"
|
msgstr "New Window"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:678 ../js/ui/dash.js:271
|
#: ../js/ui/appDisplay.js:678 ../js/ui/dash.js:290
|
||||||
msgid "Remove from Favorites"
|
msgid "Remove from Favorites"
|
||||||
msgstr "Remove from Favourites"
|
msgstr "Remove from Favourites"
|
||||||
|
|
||||||
@@ -481,16 +504,16 @@ msgstr "This week"
|
|||||||
msgid "Next week"
|
msgid "Next week"
|
||||||
msgstr "Next week"
|
msgstr "Next week"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:264
|
#: ../js/ui/components/autorunManager.js:297
|
||||||
msgid "Removable Devices"
|
msgid "Removable Devices"
|
||||||
msgstr "Removable Devices"
|
msgstr "Removable Devices"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:557
|
#: ../js/ui/components/autorunManager.js:594
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Open with %s"
|
msgstr "Open with %s"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:583
|
#: ../js/ui/components/autorunManager.js:620
|
||||||
msgid "Eject"
|
msgid "Eject"
|
||||||
msgstr "Eject"
|
msgstr "Eject"
|
||||||
|
|
||||||
@@ -636,38 +659,46 @@ msgstr "Subscription request"
|
|||||||
msgid "Connection error"
|
msgid "Connection error"
|
||||||
msgstr "Connection error"
|
msgstr "Connection error"
|
||||||
|
|
||||||
|
#: ../js/ui/components/telepathyClient.js:491
|
||||||
|
msgid "Unmute"
|
||||||
|
msgstr "Unmute"
|
||||||
|
|
||||||
|
#: ../js/ui/components/telepathyClient.js:491
|
||||||
|
msgid "Mute"
|
||||||
|
msgstr "Mute"
|
||||||
|
|
||||||
#. Translators: this is a time format string followed by a date.
|
#. Translators: this is a time format string followed by a date.
|
||||||
#. If applicable, replace %X with a strftime format valid for your
|
#. If applicable, replace %X with a strftime format valid for your
|
||||||
#. locale, without seconds.
|
#. locale, without seconds.
|
||||||
#: ../js/ui/components/telepathyClient.js:926
|
#: ../js/ui/components/telepathyClient.js:948
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Sent at <b>%X</b> on <b>%A</b>"
|
msgid "Sent at <b>%X</b> on <b>%A</b>"
|
||||||
msgstr "Sent at <b>%X</b> on <b>%A</b>"
|
msgstr "Sent at <b>%X</b> on <b>%A</b>"
|
||||||
|
|
||||||
#. Translators: this is a time format in the style of "Wednesday, May 25",
|
#. Translators: this is a time format in the style of "Wednesday, May 25",
|
||||||
#. shown when you get a chat message in the same year.
|
#. shown when you get a chat message in the same year.
|
||||||
#: ../js/ui/components/telepathyClient.js:932
|
#: ../js/ui/components/telepathyClient.js:954
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Sent on <b>%A</b>, <b>%B %d</b>"
|
msgid "Sent on <b>%A</b>, <b>%B %d</b>"
|
||||||
msgstr "Sent on <b>%A</b>, <b>%d B</b>"
|
msgstr "Sent on <b>%A</b>, <b>%d B</b>"
|
||||||
|
|
||||||
#. Translators: this is a time format in the style of "Wednesday, May 25, 2012",
|
#. Translators: this is a time format in the style of "Wednesday, May 25, 2012",
|
||||||
#. shown when you get a chat message in a different year.
|
#. shown when you get a chat message in a different year.
|
||||||
#: ../js/ui/components/telepathyClient.js:937
|
#: ../js/ui/components/telepathyClient.js:959
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Sent on <b>%A</b>, <b>%B %d</b>, %Y"
|
msgid "Sent on <b>%A</b>, <b>%B %d</b>, %Y"
|
||||||
msgstr "Sent on <b>%A</b>, <b>%d %B</b>, %Y"
|
msgstr "Sent on <b>%A</b>, <b>%d %B</b>, %Y"
|
||||||
|
|
||||||
#. Translators: this is the other person changing their old IM name to their new
|
#. Translators: this is the other person changing their old IM name to their new
|
||||||
#. IM name.
|
#. IM name.
|
||||||
#: ../js/ui/components/telepathyClient.js:966
|
#: ../js/ui/components/telepathyClient.js:988
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is now known as %s"
|
msgid "%s is now known as %s"
|
||||||
msgstr "%s is now known as %s"
|
msgstr "%s is now known as %s"
|
||||||
|
|
||||||
#. translators: argument is a room name like
|
#. translators: argument is a room name like
|
||||||
#. * room@jabber.org for example.
|
#. * room@jabber.org for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1066
|
#: ../js/ui/components/telepathyClient.js:1088
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invitation to %s"
|
msgid "Invitation to %s"
|
||||||
msgstr "Invitation to %s"
|
msgstr "Invitation to %s"
|
||||||
@@ -675,42 +706,42 @@ msgstr "Invitation to %s"
|
|||||||
#. translators: first argument is the name of a contact and the second
|
#. translators: first argument is the name of a contact and the second
|
||||||
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
|
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
|
||||||
#. * for example.
|
#. * for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1074
|
#: ../js/ui/components/telepathyClient.js:1096
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is inviting you to join %s"
|
msgid "%s is inviting you to join %s"
|
||||||
msgstr "%s is inviting you to join %s"
|
msgstr "%s is inviting you to join %s"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1076
|
#: ../js/ui/components/telepathyClient.js:1098
|
||||||
#: ../js/ui/components/telepathyClient.js:1155
|
#: ../js/ui/components/telepathyClient.js:1177
|
||||||
#: ../js/ui/components/telepathyClient.js:1218
|
#: ../js/ui/components/telepathyClient.js:1240
|
||||||
msgid "Decline"
|
msgid "Decline"
|
||||||
msgstr "Decline"
|
msgstr "Decline"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1077
|
#: ../js/ui/components/telepathyClient.js:1099
|
||||||
#: ../js/ui/components/telepathyClient.js:1156
|
#: ../js/ui/components/telepathyClient.js:1178
|
||||||
#: ../js/ui/components/telepathyClient.js:1219
|
#: ../js/ui/components/telepathyClient.js:1241
|
||||||
msgid "Accept"
|
msgid "Accept"
|
||||||
msgstr "Accept"
|
msgstr "Accept"
|
||||||
|
|
||||||
#. translators: argument is a contact name like Alice for example.
|
#. translators: argument is a contact name like Alice for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1107
|
#: ../js/ui/components/telepathyClient.js:1129
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Video call from %s"
|
msgid "Video call from %s"
|
||||||
msgstr "Video call from %s"
|
msgstr "Video call from %s"
|
||||||
|
|
||||||
#. translators: argument is a contact name like Alice for example.
|
#. translators: argument is a contact name like Alice for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1110
|
#: ../js/ui/components/telepathyClient.js:1132
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Call from %s"
|
msgid "Call from %s"
|
||||||
msgstr "Call from %s"
|
msgstr "Call from %s"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1115
|
#: ../js/ui/components/telepathyClient.js:1137
|
||||||
#: ../js/ui/status/bluetooth.js:346
|
#: ../js/ui/status/bluetooth.js:346
|
||||||
msgid "Reject"
|
msgid "Reject"
|
||||||
msgstr "Reject"
|
msgstr "Reject"
|
||||||
|
|
||||||
#. translators: this is a button label (verb), not a noun
|
#. translators: this is a button label (verb), not a noun
|
||||||
#: ../js/ui/components/telepathyClient.js:1117
|
#: ../js/ui/components/telepathyClient.js:1139
|
||||||
msgid "Answer"
|
msgid "Answer"
|
||||||
msgstr "Answer"
|
msgstr "Answer"
|
||||||
|
|
||||||
@@ -719,110 +750,110 @@ msgstr "Answer"
|
|||||||
#. * file name. The string will be something
|
#. * file name. The string will be something
|
||||||
#. * like: "Alice is sending you test.ogg"
|
#. * like: "Alice is sending you test.ogg"
|
||||||
#.
|
#.
|
||||||
#: ../js/ui/components/telepathyClient.js:1149
|
#: ../js/ui/components/telepathyClient.js:1171
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is sending you %s"
|
msgid "%s is sending you %s"
|
||||||
msgstr "%s is sending you %s"
|
msgstr "%s is sending you %s"
|
||||||
|
|
||||||
#. To translators: The parameter is the contact's alias
|
#. To translators: The parameter is the contact's alias
|
||||||
#: ../js/ui/components/telepathyClient.js:1184
|
#: ../js/ui/components/telepathyClient.js:1206
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s would like permission to see when you are online"
|
msgid "%s would like permission to see when you are online"
|
||||||
msgstr "%s would like permission to see when you are online"
|
msgstr "%s would like permission to see when you are online"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1276
|
#: ../js/ui/components/telepathyClient.js:1298
|
||||||
msgid "Network error"
|
msgid "Network error"
|
||||||
msgstr "Network error"
|
msgstr "Network error"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1278
|
#: ../js/ui/components/telepathyClient.js:1300
|
||||||
msgid "Authentication failed"
|
msgid "Authentication failed"
|
||||||
msgstr "Authentication failed"
|
msgstr "Authentication failed"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1280
|
#: ../js/ui/components/telepathyClient.js:1302
|
||||||
msgid "Encryption error"
|
msgid "Encryption error"
|
||||||
msgstr "Encryption error"
|
msgstr "Encryption error"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1282
|
#: ../js/ui/components/telepathyClient.js:1304
|
||||||
msgid "Certificate not provided"
|
msgid "Certificate not provided"
|
||||||
msgstr "Certificate not provided"
|
msgstr "Certificate not provided"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1284
|
#: ../js/ui/components/telepathyClient.js:1306
|
||||||
msgid "Certificate untrusted"
|
msgid "Certificate untrusted"
|
||||||
msgstr "Certificate untrusted"
|
msgstr "Certificate untrusted"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1286
|
#: ../js/ui/components/telepathyClient.js:1308
|
||||||
msgid "Certificate expired"
|
msgid "Certificate expired"
|
||||||
msgstr "Certificate expired"
|
msgstr "Certificate expired"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1288
|
#: ../js/ui/components/telepathyClient.js:1310
|
||||||
msgid "Certificate not activated"
|
msgid "Certificate not activated"
|
||||||
msgstr "Certificate not activated"
|
msgstr "Certificate not activated"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1290
|
#: ../js/ui/components/telepathyClient.js:1312
|
||||||
msgid "Certificate hostname mismatch"
|
msgid "Certificate hostname mismatch"
|
||||||
msgstr "Certificate hostname mismatch"
|
msgstr "Certificate hostname mismatch"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1292
|
#: ../js/ui/components/telepathyClient.js:1314
|
||||||
msgid "Certificate fingerprint mismatch"
|
msgid "Certificate fingerprint mismatch"
|
||||||
msgstr "Certificate fingerprint mismatch"
|
msgstr "Certificate fingerprint mismatch"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1294
|
#: ../js/ui/components/telepathyClient.js:1316
|
||||||
msgid "Certificate self-signed"
|
msgid "Certificate self-signed"
|
||||||
msgstr "Certificate self-signed"
|
msgstr "Certificate self-signed"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1296
|
#: ../js/ui/components/telepathyClient.js:1318
|
||||||
msgid "Status is set to offline"
|
msgid "Status is set to offline"
|
||||||
msgstr "Status is set to offline"
|
msgstr "Status is set to offline"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1298
|
#: ../js/ui/components/telepathyClient.js:1320
|
||||||
msgid "Encryption is not available"
|
msgid "Encryption is not available"
|
||||||
msgstr "Encryption is not available"
|
msgstr "Encryption is not available"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1300
|
#: ../js/ui/components/telepathyClient.js:1322
|
||||||
msgid "Certificate is invalid"
|
msgid "Certificate is invalid"
|
||||||
msgstr "Certificate is invalid"
|
msgstr "Certificate is invalid"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1302
|
#: ../js/ui/components/telepathyClient.js:1324
|
||||||
msgid "Connection has been refused"
|
msgid "Connection has been refused"
|
||||||
msgstr "Connection has been refused"
|
msgstr "Connection has been refused"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1304
|
#: ../js/ui/components/telepathyClient.js:1326
|
||||||
msgid "Connection can't be established"
|
msgid "Connection can't be established"
|
||||||
msgstr "Connection can't be established"
|
msgstr "Connection can't be established"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1306
|
#: ../js/ui/components/telepathyClient.js:1328
|
||||||
msgid "Connection has been lost"
|
msgid "Connection has been lost"
|
||||||
msgstr "Connection has been lost"
|
msgstr "Connection has been lost"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1308
|
#: ../js/ui/components/telepathyClient.js:1330
|
||||||
msgid "This account is already connected to the server"
|
msgid "This account is already connected to the server"
|
||||||
msgstr "This account is already connected to the server"
|
msgstr "This account is already connected to the server"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1310
|
#: ../js/ui/components/telepathyClient.js:1332
|
||||||
msgid ""
|
msgid ""
|
||||||
"Connection has been replaced by a new connection using the same resource"
|
"Connection has been replaced by a new connection using the same resource"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Connection has been replaced by a new connection using the same resource"
|
"Connection has been replaced by a new connection using the same resource"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1312
|
#: ../js/ui/components/telepathyClient.js:1334
|
||||||
msgid "The account already exists on the server"
|
msgid "The account already exists on the server"
|
||||||
msgstr "The account already exists on the server"
|
msgstr "The account already exists on the server"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1314
|
#: ../js/ui/components/telepathyClient.js:1336
|
||||||
msgid "Server is currently too busy to handle the connection"
|
msgid "Server is currently too busy to handle the connection"
|
||||||
msgstr "Server is currently too busy to handle the connection"
|
msgstr "Server is currently too busy to handle the connection"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1316
|
#: ../js/ui/components/telepathyClient.js:1338
|
||||||
msgid "Certificate has been revoked"
|
msgid "Certificate has been revoked"
|
||||||
msgstr "Certificate has been revoked"
|
msgstr "Certificate has been revoked"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1318
|
#: ../js/ui/components/telepathyClient.js:1340
|
||||||
msgid ""
|
msgid ""
|
||||||
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
|
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Certificate uses an insecure cypher algorithm or is cryptographically weak"
|
"Certificate uses an insecure cypher algorithm or is cryptographically weak"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1320
|
#: ../js/ui/components/telepathyClient.js:1342
|
||||||
msgid ""
|
msgid ""
|
||||||
"The length of the server certificate, or the depth of the server certificate "
|
"The length of the server certificate, or the depth of the server certificate "
|
||||||
"chain, exceed the limits imposed by the cryptography library"
|
"chain, exceed the limits imposed by the cryptography library"
|
||||||
@@ -830,30 +861,30 @@ msgstr ""
|
|||||||
"The length of the server certificate, or the depth of the server certificate "
|
"The length of the server certificate, or the depth of the server certificate "
|
||||||
"chain, exceed the limits imposed by the cryptography library"
|
"chain, exceed the limits imposed by the cryptography library"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1322
|
#: ../js/ui/components/telepathyClient.js:1344
|
||||||
msgid "Internal error"
|
msgid "Internal error"
|
||||||
msgstr "Internal error"
|
msgstr "Internal error"
|
||||||
|
|
||||||
#. translators: argument is the account name, like
|
#. translators: argument is the account name, like
|
||||||
#. * name@jabber.org for example.
|
#. * name@jabber.org for example.
|
||||||
#: ../js/ui/components/telepathyClient.js:1332
|
#: ../js/ui/components/telepathyClient.js:1354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Connection to %s failed"
|
msgid "Connection to %s failed"
|
||||||
msgstr "Connection to %s failed"
|
msgstr "Connection to %s failed"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1341
|
#: ../js/ui/components/telepathyClient.js:1363
|
||||||
msgid "Reconnect"
|
msgid "Reconnect"
|
||||||
msgstr "Reconnect"
|
msgstr "Reconnect"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1342
|
#: ../js/ui/components/telepathyClient.js:1364
|
||||||
msgid "Edit account"
|
msgid "Edit account"
|
||||||
msgstr "Edit account"
|
msgstr "Edit account"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1387
|
#: ../js/ui/components/telepathyClient.js:1409
|
||||||
msgid "Unknown reason"
|
msgid "Unknown reason"
|
||||||
msgstr "Unknown reason"
|
msgstr "Unknown reason"
|
||||||
|
|
||||||
#: ../js/ui/dash.js:245 ../js/ui/dash.js:273
|
#: ../js/ui/dash.js:253 ../js/ui/dash.js:292
|
||||||
msgid "Show Applications"
|
msgid "Show Applications"
|
||||||
msgstr "Show Applications"
|
msgstr "Show Applications"
|
||||||
|
|
||||||
@@ -861,14 +892,14 @@ msgstr "Show Applications"
|
|||||||
msgid "Date and Time Settings"
|
msgid "Date and Time Settings"
|
||||||
msgstr "Date and Time Settings"
|
msgstr "Date and Time Settings"
|
||||||
|
|
||||||
#: ../js/ui/dateMenu.js:109
|
#: ../js/ui/dateMenu.js:111
|
||||||
msgid "Open Calendar"
|
msgid "Open Calendar"
|
||||||
msgstr "Open Calendar"
|
msgstr "Open Calendar"
|
||||||
|
|
||||||
#. Translators: This is the date format to use when the calendar popup is
|
#. Translators: This is the date format to use when the calendar popup is
|
||||||
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
|
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
|
||||||
#.
|
#.
|
||||||
#: ../js/ui/dateMenu.js:175
|
#: ../js/ui/dateMenu.js:190
|
||||||
msgid "%A %B %e, %Y"
|
msgid "%A %B %e, %Y"
|
||||||
msgstr "%A %e %B, %Y"
|
msgstr "%A %e %B, %Y"
|
||||||
|
|
||||||
@@ -969,84 +1000,76 @@ msgstr "Install"
|
|||||||
msgid "Download and install '%s' from extensions.gnome.org?"
|
msgid "Download and install '%s' from extensions.gnome.org?"
|
||||||
msgstr "Download and install '%s' from extensions.gnome.org?"
|
msgstr "Download and install '%s' from extensions.gnome.org?"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:327
|
#: ../js/ui/keyboard.js:337
|
||||||
msgid "tray"
|
msgid "tray"
|
||||||
msgstr "tray"
|
msgstr "tray"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:545 ../js/ui/status/keyboard.js:146
|
#: ../js/ui/keyboard.js:584 ../js/ui/status/keyboard.js:195
|
||||||
#: ../js/ui/status/power.js:205
|
#: ../js/ui/status/power.js:205
|
||||||
msgid "Keyboard"
|
msgid "Keyboard"
|
||||||
msgstr "Keyboard"
|
msgstr "Keyboard"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:694
|
#: ../js/ui/lookingGlass.js:691
|
||||||
msgid "No extensions installed"
|
msgid "No extensions installed"
|
||||||
msgstr "No extensions installed"
|
msgstr "No extensions installed"
|
||||||
|
|
||||||
#. Translators: argument is an extension UUID.
|
#. Translators: argument is an extension UUID.
|
||||||
#: ../js/ui/lookingGlass.js:748
|
#: ../js/ui/lookingGlass.js:745
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s has not emitted any errors."
|
msgid "%s has not emitted any errors."
|
||||||
msgstr "%s has not emitted any errors."
|
msgstr "%s has not emitted any errors."
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:754
|
#: ../js/ui/lookingGlass.js:751
|
||||||
msgid "Hide Errors"
|
msgid "Hide Errors"
|
||||||
msgstr "Hide Errors"
|
msgstr "Hide Errors"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:758 ../js/ui/lookingGlass.js:818
|
#: ../js/ui/lookingGlass.js:755 ../js/ui/lookingGlass.js:815
|
||||||
msgid "Show Errors"
|
msgid "Show Errors"
|
||||||
msgstr "Show Errors"
|
msgstr "Show Errors"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:767
|
#: ../js/ui/lookingGlass.js:764
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "Enabled"
|
msgstr "Enabled"
|
||||||
|
|
||||||
#. translators:
|
#. translators:
|
||||||
#. * The device has been disabled
|
#. * The device has been disabled
|
||||||
#: ../js/ui/lookingGlass.js:770 ../src/gvc/gvc-mixer-control.c:1082
|
#: ../js/ui/lookingGlass.js:767 ../src/gvc/gvc-mixer-control.c:1082
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Disabled"
|
msgstr "Disabled"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:772
|
#: ../js/ui/lookingGlass.js:769
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Error"
|
msgstr "Error"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:774
|
#: ../js/ui/lookingGlass.js:771
|
||||||
msgid "Out of date"
|
msgid "Out of date"
|
||||||
msgstr "Out of date"
|
msgstr "Out of date"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:776
|
#: ../js/ui/lookingGlass.js:773
|
||||||
msgid "Downloading"
|
msgid "Downloading"
|
||||||
msgstr "Downloading"
|
msgstr "Downloading"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:800
|
#: ../js/ui/lookingGlass.js:797
|
||||||
msgid "View Source"
|
msgid "View Source"
|
||||||
msgstr "View Source"
|
msgstr "View Source"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:809
|
#: ../js/ui/lookingGlass.js:806
|
||||||
msgid "Web Page"
|
msgid "Web Page"
|
||||||
msgstr "Web Page"
|
msgstr "Web Page"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1232
|
#: ../js/ui/messageTray.js:1081
|
||||||
msgid "Open"
|
msgid "Open"
|
||||||
msgstr "Open"
|
msgstr "Open"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1239
|
#: ../js/ui/messageTray.js:1088
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Remove"
|
msgstr "Remove"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1249
|
#: ../js/ui/messageTray.js:1540
|
||||||
msgid "Unmute"
|
|
||||||
msgstr "Unmute"
|
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1249
|
|
||||||
msgid "Mute"
|
|
||||||
msgstr "Mute"
|
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2030
|
|
||||||
msgid "Message Tray"
|
msgid "Message Tray"
|
||||||
msgstr "Message Tray"
|
msgstr "Message Tray"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2475
|
#: ../js/ui/messageTray.js:2547
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "System Information"
|
msgstr "System Information"
|
||||||
|
|
||||||
@@ -1055,11 +1078,11 @@ msgctxt "program"
|
|||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Unknown"
|
msgstr "Unknown"
|
||||||
|
|
||||||
#: ../js/ui/overview.js:83
|
#: ../js/ui/overview.js:82
|
||||||
msgid "Undo"
|
msgid "Undo"
|
||||||
msgstr "Undo"
|
msgstr "Undo"
|
||||||
|
|
||||||
#: ../js/ui/overview.js:128
|
#: ../js/ui/overview.js:127
|
||||||
msgid "Overview"
|
msgid "Overview"
|
||||||
msgstr "Overview"
|
msgstr "Overview"
|
||||||
|
|
||||||
@@ -1067,13 +1090,13 @@ msgstr "Overview"
|
|||||||
#. in the search entry when no search is
|
#. in the search entry when no search is
|
||||||
#. active; it should not exceed ~30
|
#. active; it should not exceed ~30
|
||||||
#. characters.
|
#. characters.
|
||||||
#: ../js/ui/overview.js:202
|
#: ../js/ui/overview.js:201
|
||||||
msgid "Type to search..."
|
msgid "Type to search..."
|
||||||
msgstr "Type to search…"
|
msgstr "Type to search…"
|
||||||
|
|
||||||
#. Translators: this is the name of the dock/favorites area on
|
#. Translators: this is the name of the dock/favorites area on
|
||||||
#. the left of the overview
|
#. the left of the overview
|
||||||
#: ../js/ui/overview.js:223
|
#: ../js/ui/overview.js:222
|
||||||
msgid "Dash"
|
msgid "Dash"
|
||||||
msgstr "Dash"
|
msgstr "Dash"
|
||||||
|
|
||||||
@@ -1091,25 +1114,12 @@ msgstr "Activities"
|
|||||||
msgid "Top Bar"
|
msgid "Top Bar"
|
||||||
msgstr "Top Bar"
|
msgstr "Top Bar"
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:115
|
|
||||||
#, c-format
|
|
||||||
msgid "Failed to unmount '%s'"
|
|
||||||
msgstr "Failed to unmount '%s'"
|
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:118
|
|
||||||
msgid "Retry"
|
|
||||||
msgstr "Retry"
|
|
||||||
|
|
||||||
#: ../js/ui/placeDisplay.js:349
|
|
||||||
msgid "PLACES & DEVICES"
|
|
||||||
msgstr "PLACES & DEVICES"
|
|
||||||
|
|
||||||
#. Translators: this MUST be either "toggle-switch-us"
|
#. Translators: this MUST be either "toggle-switch-us"
|
||||||
#. (for toggle switches containing the English words
|
#. (for toggle switches containing the English words
|
||||||
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
|
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
|
||||||
#. switches containing "◯" and "|"). Other values will
|
#. switches containing "◯" and "|"). Other values will
|
||||||
#. simply result in invisible toggle switches.
|
#. simply result in invisible toggle switches.
|
||||||
#: ../js/ui/popupMenu.js:728
|
#: ../js/ui/popupMenu.js:731
|
||||||
msgid "toggle-switch-us"
|
msgid "toggle-switch-us"
|
||||||
msgstr "toggle-switch-us"
|
msgstr "toggle-switch-us"
|
||||||
|
|
||||||
@@ -1119,7 +1129,7 @@ msgstr "Please enter a command:"
|
|||||||
|
|
||||||
#. Translators: This is a time format for a date in
|
#. Translators: This is a time format for a date in
|
||||||
#. long format
|
#. long format
|
||||||
#: ../js/ui/screenShield.js:78
|
#: ../js/ui/screenShield.js:79
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %d %B"
|
msgstr "%A, %d %B"
|
||||||
|
|
||||||
@@ -1137,11 +1147,11 @@ msgid_plural "%d new notifications"
|
|||||||
msgstr[0] "%d new notification"
|
msgstr[0] "%d new notification"
|
||||||
msgstr[1] "%d new notifications"
|
msgstr[1] "%d new notifications"
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:277
|
#: ../js/ui/searchDisplay.js:275
|
||||||
msgid "Searching..."
|
msgid "Searching..."
|
||||||
msgstr "Searching…"
|
msgstr "Searching…"
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:328
|
#: ../js/ui/searchDisplay.js:323
|
||||||
msgid "No results."
|
msgid "No results."
|
||||||
msgstr "No results."
|
msgstr "No results."
|
||||||
|
|
||||||
@@ -1153,11 +1163,11 @@ msgstr "Copy"
|
|||||||
msgid "Paste"
|
msgid "Paste"
|
||||||
msgstr "Paste"
|
msgstr "Paste"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:96
|
#: ../js/ui/shellEntry.js:102
|
||||||
msgid "Show Text"
|
msgid "Show Text"
|
||||||
msgstr "Show Text"
|
msgstr "Show Text"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:98
|
#: ../js/ui/shellEntry.js:104
|
||||||
msgid "Hide Text"
|
msgid "Hide Text"
|
||||||
msgstr "Hide Text"
|
msgstr "Hide Text"
|
||||||
|
|
||||||
@@ -1169,7 +1179,7 @@ msgstr "Password"
|
|||||||
msgid "Remember Password"
|
msgid "Remember Password"
|
||||||
msgstr "Remember Password"
|
msgstr "Remember Password"
|
||||||
|
|
||||||
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:137
|
#: ../js/ui/shellMountOperation.js:400 ../js/ui/unlockDialog.js:169
|
||||||
msgid "Unlock"
|
msgid "Unlock"
|
||||||
msgstr "Unlock"
|
msgstr "Unlock"
|
||||||
|
|
||||||
@@ -1287,7 +1297,7 @@ msgstr "Keyboard Settings"
|
|||||||
msgid "Mouse Settings"
|
msgid "Mouse Settings"
|
||||||
msgstr "Mouse Settings"
|
msgstr "Mouse Settings"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:236
|
#: ../js/ui/status/bluetooth.js:269 ../js/ui/status/volume.js:234
|
||||||
msgid "Sound Settings"
|
msgid "Sound Settings"
|
||||||
msgstr "Sound Settings"
|
msgstr "Sound Settings"
|
||||||
|
|
||||||
@@ -1345,11 +1355,11 @@ msgstr "Please enter the PIN mentioned on the device."
|
|||||||
msgid "OK"
|
msgid "OK"
|
||||||
msgstr "OK"
|
msgstr "OK"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:170
|
#: ../js/ui/status/keyboard.js:228
|
||||||
msgid "Show Keyboard Layout"
|
msgid "Show Keyboard Layout"
|
||||||
msgstr "Show Keyboard Layout"
|
msgstr "Show Keyboard Layout"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:175
|
#: ../js/ui/status/keyboard.js:233
|
||||||
msgid "Region and Language Settings"
|
msgid "Region and Language Settings"
|
||||||
msgstr "Region and Language Settings"
|
msgstr "Region and Language Settings"
|
||||||
|
|
||||||
@@ -1572,7 +1582,7 @@ msgid "Unknown"
|
|||||||
msgstr "Unknown"
|
msgstr "Unknown"
|
||||||
|
|
||||||
#. Translators: This is the label for audio volume
|
#. Translators: This is the label for audio volume
|
||||||
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:223
|
#: ../js/ui/status/volume.js:47 ../js/ui/status/volume.js:221
|
||||||
msgid "Volume"
|
msgid "Volume"
|
||||||
msgstr "Volume"
|
msgstr "Volume"
|
||||||
|
|
||||||
@@ -1580,42 +1590,34 @@ msgstr "Volume"
|
|||||||
msgid "Microphone"
|
msgid "Microphone"
|
||||||
msgstr "Microphone"
|
msgstr "Microphone"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:144
|
#: ../js/ui/unlockDialog.js:176
|
||||||
msgid "Log in as another user"
|
msgid "Log in as another user"
|
||||||
msgstr "Log in as another user"
|
msgstr "Log in as another user"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:174
|
#: ../js/ui/userMenu.js:180
|
||||||
msgid "Available"
|
msgid "Available"
|
||||||
msgstr "Available"
|
msgstr "Available"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:177
|
#: ../js/ui/userMenu.js:183
|
||||||
msgid "Busy"
|
msgid "Busy"
|
||||||
msgstr "Busy"
|
msgstr "Busy"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:180
|
#: ../js/ui/userMenu.js:186
|
||||||
msgid "Invisible"
|
msgid "Invisible"
|
||||||
msgstr "Invisible"
|
msgstr "Invisible"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:183
|
#: ../js/ui/userMenu.js:189
|
||||||
msgid "Away"
|
msgid "Away"
|
||||||
msgstr "Away"
|
msgstr "Away"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:186
|
#: ../js/ui/userMenu.js:192
|
||||||
msgid "Idle"
|
msgid "Idle"
|
||||||
msgstr "Idle"
|
msgstr "Idle"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:189
|
#: ../js/ui/userMenu.js:195
|
||||||
msgid "Unavailable"
|
msgid "Unavailable"
|
||||||
msgstr "Unavailable"
|
msgstr "Unavailable"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:612 ../js/ui/userMenu.js:756
|
|
||||||
msgid "Switch User"
|
|
||||||
msgstr "Switch User"
|
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:613
|
|
||||||
msgid "Switch Session"
|
|
||||||
msgstr "Switch Session"
|
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:740
|
#: ../js/ui/userMenu.js:740
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Notifications"
|
msgstr "Notifications"
|
||||||
@@ -1624,6 +1626,10 @@ msgstr "Notifications"
|
|||||||
msgid "System Settings"
|
msgid "System Settings"
|
||||||
msgstr "System Settings"
|
msgstr "System Settings"
|
||||||
|
|
||||||
|
#: ../js/ui/userMenu.js:756
|
||||||
|
msgid "Switch User"
|
||||||
|
msgstr "Switch User"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:761
|
#: ../js/ui/userMenu.js:761
|
||||||
msgid "Log Out"
|
msgid "Log Out"
|
||||||
msgstr "Log Out"
|
msgstr "Log Out"
|
||||||
@@ -1648,19 +1654,19 @@ msgstr ""
|
|||||||
"Notifications are now disabled, including chat messages. Your online status "
|
"Notifications are now disabled, including chat messages. Your online status "
|
||||||
"has been adjusted to let others know that you might not see their messages."
|
"has been adjusted to let others know that you might not see their messages."
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:86
|
#: ../js/ui/viewSelector.js:85
|
||||||
msgid "Windows"
|
msgid "Windows"
|
||||||
msgstr "Windows"
|
msgstr "Windows"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:90
|
#: ../js/ui/viewSelector.js:89
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "Applications"
|
msgstr "Applications"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:94 ../src/shell-util.c:250
|
#: ../js/ui/viewSelector.js:93
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Search"
|
msgstr "Search"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:123
|
#: ../js/ui/wanda.js:117
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sorry, no wisdom for you today:\n"
|
"Sorry, no wisdom for you today:\n"
|
||||||
@@ -1669,12 +1675,12 @@ msgstr ""
|
|||||||
"Sorry, no wisdom for you today:\n"
|
"Sorry, no wisdom for you today:\n"
|
||||||
"%s"
|
"%s"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:127
|
#: ../js/ui/wanda.js:121
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s the Oracle says"
|
msgid "%s the Oracle says"
|
||||||
msgstr "%s the Oracle says"
|
msgstr "%s the Oracle says"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:168
|
#: ../js/ui/wanda.js:162
|
||||||
msgid "Your favorite Easter Egg"
|
msgid "Your favorite Easter Egg"
|
||||||
msgstr "Your favourite Easter Egg"
|
msgstr "Your favourite Easter Egg"
|
||||||
|
|
||||||
@@ -1709,19 +1715,19 @@ msgstr[1] "%u Inputs"
|
|||||||
msgid "System Sounds"
|
msgid "System Sounds"
|
||||||
msgstr "System Sounds"
|
msgstr "System Sounds"
|
||||||
|
|
||||||
#: ../src/main.c:330
|
#: ../src/main.c:332
|
||||||
msgid "Print version"
|
msgid "Print version"
|
||||||
msgstr "Print version"
|
msgstr "Print version"
|
||||||
|
|
||||||
#: ../src/main.c:336
|
#: ../src/main.c:338
|
||||||
msgid "Mode used by GDM for login screen"
|
msgid "Mode used by GDM for login screen"
|
||||||
msgstr "Mode used by GDM for login screen"
|
msgstr "Mode used by GDM for login screen"
|
||||||
|
|
||||||
#: ../src/main.c:342
|
#: ../src/main.c:344
|
||||||
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
|
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
|
||||||
msgstr "Use a specific mode, e.g. \"gdm\" for login screen"
|
msgstr "Use a specific mode, e.g. \"gdm\" for login screen"
|
||||||
|
|
||||||
#: ../src/main.c:348
|
#: ../src/main.c:350
|
||||||
msgid "List possible modes"
|
msgid "List possible modes"
|
||||||
msgstr "List possible modes"
|
msgstr "List possible modes"
|
||||||
|
|
||||||
@@ -1750,27 +1756,26 @@ msgstr "Default"
|
|||||||
msgid "Authentication dialog was dismissed by the user"
|
msgid "Authentication dialog was dismissed by the user"
|
||||||
msgstr "Authentication dialogue was dismissed by the user"
|
msgstr "Authentication dialogue was dismissed by the user"
|
||||||
|
|
||||||
#. Translators: this is the same string as the one found in
|
#~ msgid "Switch Session"
|
||||||
#. * nautilus
|
#~ msgstr "Switch Session"
|
||||||
#: ../src/shell-util.c:94
|
|
||||||
msgid "Home"
|
|
||||||
msgstr "Home"
|
|
||||||
|
|
||||||
#. Translators: this is the same string as the one found in
|
#~ msgid "disabled OpenSearch providers"
|
||||||
#. * nautilus
|
#~ msgstr "disabled OpenSearch providers"
|
||||||
#: ../src/shell-util.c:104
|
|
||||||
msgid "File System"
|
|
||||||
msgstr "File System"
|
|
||||||
|
|
||||||
#. Translators: the first string is the name of a gvfs
|
#~ msgid "Failed to unmount '%s'"
|
||||||
#. * method, and the second string is a path. For
|
#~ msgstr "Failed to unmount '%s'"
|
||||||
#. * example, "Trash: some-directory". It means that the
|
|
||||||
#. * directory called "some-directory" is in the trash.
|
#~ msgid "Retry"
|
||||||
#.
|
#~ msgstr "Retry"
|
||||||
#: ../src/shell-util.c:300
|
|
||||||
#, c-format
|
#~ msgid "PLACES & DEVICES"
|
||||||
msgid "%1$s: %2$s"
|
#~ msgstr "PLACES & DEVICES"
|
||||||
msgstr "%1$s: %2$s"
|
|
||||||
|
#~ msgid "Home"
|
||||||
|
#~ msgstr "Home"
|
||||||
|
|
||||||
|
#~ msgid "%1$s: %2$s"
|
||||||
|
#~ msgstr "%1$s: %2$s"
|
||||||
|
|
||||||
#~ msgid "Show time with seconds"
|
#~ msgid "Show time with seconds"
|
||||||
#~ msgstr "Show time with seconds"
|
#~ msgstr "Show time with seconds"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user