Compare commits
463 Commits
wip/gcampa
...
3.9.2
Author | SHA1 | Date | |
---|---|---|---|
bf0a0d5bad | |||
365cda386c | |||
5de5b7a66a | |||
d6de0a64ed | |||
26f8441f73 | |||
51bca08386 | |||
1579aad362 | |||
a2a580954a | |||
944c28f3b3 | |||
c13a597fe0 | |||
86e0ae0b93 | |||
f71ffed3c7 | |||
cae96d9023 | |||
676b649731 | |||
634ce34e00 | |||
6c3096f71f | |||
991ed2da72 | |||
907f02cd28 | |||
9ba78ce04a | |||
14a3d9f7fb | |||
f73a01295c | |||
ccfa3d3be1 | |||
727e4c0b37 | |||
6ce470b9b2 | |||
4b7e230531 | |||
aefe0d3ddd | |||
bbb23b515f | |||
976166a04a | |||
b20129c37e | |||
4fe1360b2c | |||
f0113c5ff5 | |||
a259016436 | |||
9a79c71e88 | |||
e62d22a50e | |||
402f2d939c | |||
374aee75d8 | |||
88ce65266e | |||
e0a6a623d2 | |||
d0310bd745 | |||
35c665156b | |||
3754a76f10 | |||
db2e6e5b95 | |||
d5f95db68d | |||
d96726c392 | |||
d1c54f55e6 | |||
176a73f4e9 | |||
54a9592e19 | |||
b2aa29e221 | |||
0eba0f8dd3 | |||
d8d0afff0b | |||
b799e8c0a6 | |||
583255e1a8 | |||
c68ccbf263 | |||
d658ec8de2 | |||
8727661c1c | |||
731e8bfe2b | |||
f88d9c06f5 | |||
248a0c1b6c | |||
434f1edb25 | |||
2a550e6466 | |||
4f4132943d | |||
62760d5b2d | |||
34aa501637 | |||
6330379f77 | |||
30c64baa7f | |||
cdbed0c615 | |||
f6e7034172 | |||
cd9c5b9c5d | |||
7833e21b01 | |||
12ba2b222f | |||
8583ca73e4 | |||
b588ae4e0e | |||
28abc15c00 | |||
4d663680d8 | |||
6505f8e94a | |||
ff3c20dda2 | |||
c698dee071 | |||
8891a41793 | |||
026f61f5aa | |||
af063dc2f2 | |||
3075f3cfe4 | |||
419f2dca15 | |||
5803f69605 | |||
bfd1cc99a0 | |||
a6a2cea414 | |||
10e857cebe | |||
ed76b54511 | |||
9659d056b7 | |||
b79b0952b4 | |||
fa44dc7d16 | |||
b0dc841e00 | |||
c72ae375c8 | |||
0fd6ae5330 | |||
c8792ccfa6 | |||
b689972e67 | |||
ae6d7bbfa3 | |||
2591bc90ac | |||
61fe000daa | |||
c864ebeabb | |||
24c530611f | |||
d44d00f0f4 | |||
dc3082e66d | |||
c61573a8b7 | |||
3b95560d32 | |||
990f68375e | |||
1290c98c9b | |||
08599afdd4 | |||
bb040918e3 | |||
6fac33ea7d | |||
e16c16b3ef | |||
1eeeead78f | |||
046a1a7af8 | |||
db89648f62 | |||
9c839cdc70 | |||
938b1ff06a | |||
ecd838bf01 | |||
855a31ff25 | |||
7464add904 | |||
7514607129 | |||
12a1d7b38d | |||
d6fe008b2c | |||
d920da6624 | |||
e2c86cef47 | |||
8e270dc246 | |||
22b6a25408 | |||
cde695d903 | |||
e98eb57e3e | |||
11d997c42b | |||
eab1ab0fac | |||
660b801775 | |||
eb80503bcc | |||
14ceb10555 | |||
d9a4688e98 | |||
092586c931 | |||
31478e9fb4 | |||
cc7630c236 | |||
c29810b2f6 | |||
c1240d3f2c | |||
654f1dd055 | |||
53c609c278 | |||
a2fcbb7e65 | |||
db14dc973a | |||
c29aaa047d | |||
49064ed56d | |||
72bc46d339 | |||
40b895d16b | |||
33cad9a824 | |||
e96d9e0ea1 | |||
ed63bda932 | |||
18107d567d | |||
608818fa9f | |||
9ae2440ec1 | |||
ef9c50e63a | |||
5d50b08351 | |||
123fc19c4e | |||
a9058e471c | |||
bd1f48d9fe | |||
66ab4d217d | |||
7a8b392607 | |||
bfdf069d2d | |||
b4b00a48d9 | |||
e5f226612e | |||
20619ad3c1 | |||
37dce7d4c3 | |||
a67b82e730 | |||
e0b8ad7911 | |||
dbb39d366e | |||
e1de36398d | |||
871c28aeeb | |||
c84dc6254d | |||
60cb1ad7c5 | |||
4a5ff5dcfb | |||
5c40307745 | |||
39426f03e6 | |||
92e5d2b8f5 | |||
09aa59f98b | |||
c9c1c89a27 | |||
96b76709e9 | |||
ca3107e21b | |||
2e4f223207 | |||
17df668186 | |||
aef70152de | |||
e0252f35be | |||
0f47534766 | |||
54feaa67e8 | |||
64ecfa49eb | |||
fdae613b14 | |||
c57c08b2c6 | |||
d2103995cb | |||
196fb0f16e | |||
c0afe7260a | |||
099c8703ae | |||
b03e480dbf | |||
8430353389 | |||
a123ec94ef | |||
4a2f54f6ff | |||
b5c85eaeca | |||
8b3b91d78d | |||
e1de3973fe | |||
c1993a6ffc | |||
ab26fc438a | |||
c37259b01d | |||
bde8cc3285 | |||
59ba5504d0 | |||
65eb5a3d05 | |||
b925322e9e | |||
f0c2ad00f8 | |||
fc53a25a4c | |||
58872d162b | |||
30f1b8f02a | |||
ee4f199a9f | |||
e3957f3bac | |||
2506673514 | |||
7cb12015fd | |||
caaac9b9ec | |||
1dac4d00c4 | |||
b41902f4df | |||
ada70dd683 | |||
7e5d8a8d54 | |||
e981cae27c | |||
d7c377c229 | |||
8772edcd33 | |||
254740cf68 | |||
c3775c0f56 | |||
5ecf40e967 | |||
45026df4bd | |||
b8830f4a09 | |||
811ee1d989 | |||
8c32102e99 | |||
1b135095c7 | |||
becf4396c9 | |||
929e066506 | |||
355ad9ac2c | |||
2cda0472bd | |||
4710753700 | |||
2b439ef209 | |||
2fc76e6d9e | |||
ff544450a5 | |||
b4590da686 | |||
6c4be0311a | |||
4a2cdc20f0 | |||
6ce79c62eb | |||
96994721ef | |||
f358bb1a96 | |||
1bce210c51 | |||
8a3c8d1b1c | |||
08b224de1f | |||
86c92c37d2 | |||
07053c3df7 | |||
4fb33c9b09 | |||
5e6a25c3c2 | |||
e14ef4a294 | |||
8b659f0f4c | |||
a6395c95d4 | |||
98e74dfd38 | |||
1d728186db | |||
2499f2ed80 | |||
963905adcd | |||
7c21ab0985 | |||
77d3712261 | |||
0376f22d41 | |||
007820b7c1 | |||
dc98711477 | |||
e98c6ff31b | |||
9eae74357a | |||
1ee88a2878 | |||
14189e6827 | |||
3dd6113a0a | |||
ae5cdea5af | |||
3c1f389e25 | |||
284d821233 | |||
78272e5592 | |||
098bc41083 | |||
c837090282 | |||
cdc1678e6f | |||
2a3d76b0cc | |||
29e89491de | |||
d63947aec4 | |||
512f0a67fb | |||
a7cd4657f5 | |||
bf02cde598 | |||
b7dbb35546 | |||
6fd5f0e3de | |||
e6469df065 | |||
d61fe357f6 | |||
965dd2ab67 | |||
78e011d558 | |||
76590d6c69 | |||
16dc6ce41a | |||
1dadcee5c9 | |||
bed3bb45f7 | |||
18d850d7d6 | |||
f920fd8b6f | |||
b9da6d9ef6 | |||
3be489c69e | |||
cab092aad7 | |||
0451cba343 | |||
12334cd9ad | |||
9d18a2dff4 | |||
869e1dc241 | |||
b878f3fc4a | |||
2aeabcc38b | |||
94778c0dac | |||
390491b37a | |||
f8ea825577 | |||
f77ad7d184 | |||
e467a53def | |||
9cd2e12915 | |||
627a6587b4 | |||
9b3b419f7a | |||
f37ed44837 | |||
dddc333407 | |||
75714fb784 | |||
5a6342a5fe | |||
e07379b406 | |||
54bfe34273 | |||
bef876e4b4 | |||
6ef9ab6a0b | |||
53ffdd8d68 | |||
ba198034cb | |||
58e66b9e1b | |||
ac7efcb43a | |||
b514b9ec7c | |||
f69942eb35 | |||
f28827f625 | |||
f20a6b3635 | |||
7f7ff3ce3e | |||
0abb0756ba | |||
070ed9396c | |||
307004a455 | |||
d097327bd8 | |||
f72f501931 | |||
e9584cfcab | |||
aec0e75d73 | |||
a6b4d49454 | |||
1cc726593e | |||
5001bd8810 | |||
46aa70aa09 | |||
41cf447c45 | |||
b328fd7aed | |||
917a24580b | |||
af36182879 | |||
160c721afc | |||
ee0040ef1c | |||
9e60a55dd7 | |||
57f27572ae | |||
ceae032112 | |||
d3ab367fcd | |||
0ceefb48c8 | |||
a9815ae1e9 | |||
79140fd132 | |||
6c0f48ce25 | |||
da7ab7057d | |||
499ae609dd | |||
e78b3644e4 | |||
ce6b39bd1c | |||
603f528b47 | |||
5fecd07045 | |||
8edd7ad32e | |||
3a27d0b849 | |||
b351536dee | |||
eeea8559b6 | |||
17591117c1 | |||
c4470fd1e6 | |||
45fc7ec01f | |||
dc54472ca5 | |||
4b3bf05aaf | |||
ec014a7ecf | |||
a8c87f3bab | |||
b39e76200a | |||
01deb9ef7d | |||
5c89568cca | |||
6119b44746 | |||
7af4a7bf88 | |||
04e4d69662 | |||
a87e0f028a | |||
31774a7711 | |||
a32f27a2aa | |||
805a409318 | |||
42d45bd14a | |||
5870709fbc | |||
0fdb7430ff | |||
4771f80d6f | |||
91405583fd | |||
f864303aac | |||
e5ebf4a2b2 | |||
725a36e37a | |||
78dacfa865 | |||
16547fb3c2 | |||
9eeabf79f9 | |||
81b71cc143 | |||
8301acd4d6 | |||
f80afb1755 | |||
71c6b60054 | |||
95a1b874d8 | |||
07de96ede9 | |||
209014b083 | |||
127f10e7a8 | |||
67615a0cbc | |||
dde20f0c76 | |||
ddced79475 | |||
e80795b7f0 | |||
080337a4e8 | |||
884af3c986 | |||
edc95b2cb7 | |||
96239e95ec | |||
331ad76675 | |||
29152d3022 | |||
73fa4b1cbd | |||
7766a91e8c | |||
b7bad765aa | |||
5af09a60e9 | |||
ef623cfbbd | |||
ce5faba185 | |||
40d9ed535b | |||
d5675765f3 | |||
65067c24cc | |||
e2463cb501 | |||
de2f2d7ef1 | |||
7cdb75e7ce | |||
1502e308b8 | |||
dd1fe68e5c | |||
85c1dc5a0c | |||
7b3a689aad | |||
2c28a12cca | |||
324021fd64 | |||
1dceae97c6 | |||
0bef925b51 | |||
0ba1f29e40 | |||
3b1e536822 | |||
9a83662a18 | |||
5bcead5b5c | |||
d8f9502ea2 | |||
020128b9ca | |||
1566a4e607 | |||
fbd59631ee | |||
6c36856499 | |||
f4cda49988 | |||
a6b49fe7d6 | |||
26966b2bf3 | |||
36a7429aa0 | |||
7be1fe09f1 | |||
62bf08d323 | |||
260c082c4e | |||
5e0ff7fd56 | |||
aac312ca34 | |||
a90401454a | |||
5679e6b3a9 | |||
194574bb0e | |||
337d2da38a | |||
df848aa084 | |||
0cc1615252 | |||
d4259fa8aa | |||
157d7e2b59 | |||
ee50904147 | |||
ec39aa3890 | |||
beb0fdf4b8 | |||
443fe813c3 | |||
69cdc5a9b9 | |||
dac54a6019 | |||
e5ca53e56c | |||
7a79236bab | |||
cd37e2908f |
207
NEWS
207
NEWS
@ -1,3 +1,210 @@
|
|||||||
|
3.9.2
|
||||||
|
=====
|
||||||
|
* Use a symbolic icon for DESKTOP windows [Matthias; #697914]
|
||||||
|
* Move paint state cache into StWidget [Jasper; #697274]
|
||||||
|
* gdm: Fix regression where domain login hint not shown [Stef; #698200]
|
||||||
|
* Make calendar keyboard navigable [Tanner; #667434]
|
||||||
|
* Hide "Open Calendar" item when no calendar app is installed [Lionel; #697725]
|
||||||
|
* Update how branding appears on login screen [Florian; #694912, #699877]
|
||||||
|
* Allow OSD popups to grow if necessary [Marta; #696523]
|
||||||
|
* Fix offset of shadow offscreen rendering [Lionel; #698301]
|
||||||
|
* Fix insensitive button preventing empty keyring password [Stef; #696304]
|
||||||
|
* Allow cancelling keyring dialog between prompts [Stef; #682830]
|
||||||
|
* modalDialog: Show spinner while working [Stef; #684438]
|
||||||
|
* overview: Only show close buttons for windows that may close [Jasper; #699269]
|
||||||
|
* Add input purpose and hints to StEntry and StIMText [Daiki; #691392]
|
||||||
|
* Set input-purpose property for password entries [Rui; #700043]
|
||||||
|
* Provide a DBus API for screencasting [Florian; #696247]
|
||||||
|
* overview: Disable hotcorner during DND [Jasper; #698484]
|
||||||
|
* polkitAgent: Allow retrying after mistyped passwords [Stef; #684431]
|
||||||
|
* Add a way to get backtraces from criticals and warnings [Giovanni; #700262]
|
||||||
|
* Allow switch-to-workspace-n keybindings in overview [Florian; #649977]
|
||||||
|
* Update man page [Matthias; #700339]
|
||||||
|
* Add FocusSearch DBus method [Florian; #700536]
|
||||||
|
* Hide frequent view when app monitoring is disabled [Florian; #699714]
|
||||||
|
* Show switcher popup for switch-to-workspace-n keybindings [Elad; #659288]
|
||||||
|
* gdm: Update the session chooser style [Allan; #695742]
|
||||||
|
* Fix some app folders getting truncated at the top [Florian; #694371]
|
||||||
|
* Don't block the message tray while a notification is showing [Jasper; #700639]
|
||||||
|
* popupMenu: Allow for an optional border for slider handle [Florian; #697917]
|
||||||
|
* Re-lock screen when restarted after a crash [Colin; #691987]
|
||||||
|
* Synchronize input source switching with key events [Rui; #697007]
|
||||||
|
* Switch input source on modifiers-only accelerator [Rui; #697008]
|
||||||
|
* Allow input source switching in message tray [Rui; #697009]
|
||||||
|
* Misc bug fixes and cleanups [Alban, Jasper, Giovanni, Florian, Rui, Tomeu,
|
||||||
|
Stef, Gustavo; #698863, #699799, #699800, #676285, #699975, #700097, #698812,
|
||||||
|
#698486, #700194, #695314, #700257, #699678, #700356, #700322, #700394,
|
||||||
|
#700409, #700595, #700625, #691746, #700620, #700807, #659288, #700784,
|
||||||
|
#700842, #700847, #700488, #700735, #696159, #700900, #700853, #700923,
|
||||||
|
#700944, #697661, #700854, #700190, #699189, #701097]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Elad Alfassa, Alban Browaeys, Giovanni Campagna, Matthias Clasen, Allan Day,
|
||||||
|
Tanner Doshier, Lionel Landwerlin, Rui Matos, Simon McVittie,
|
||||||
|
Marta Milakovic, Florian Müllner, Gustavo Padovan, Jasper St. Pierre,
|
||||||
|
Daiki Ueno, Tomeu Vizoso, Stef Walter, Colin Walters
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Matej Urbančič [sl], Kjartan Maraas [nb], Victor Ibragimov [tg],
|
||||||
|
Dušan Kazik [sk], Gil Forcada [ca], Daniel Mustieles [es]
|
||||||
|
|
||||||
|
3.9.1
|
||||||
|
=====
|
||||||
|
* Add additional toggle-overview keybinding [Matthias; #698251]
|
||||||
|
* Disable <super> shortcut when sticky keys are enabled [Matthias; #685974]
|
||||||
|
* Disable tray context menu while a notification displays [Jasper; #695800]
|
||||||
|
* Watch GApplication busy state [Cosimo; #697207]
|
||||||
|
* Disable style transitions if animations are disabled [Jasper; #698391]
|
||||||
|
* Filter out hidden applications from "Frequent" view [Giovanni; #696949]
|
||||||
|
* Fix window previews swapping place randomly [Jasper; #694469, #698776]
|
||||||
|
* Add support for serialized GIcons in remote search providers [Cosimo; #698761]
|
||||||
|
* Fix hotcorner regression in RTL locales [Jasper; #698884]
|
||||||
|
* Allow some keybindings to work while a top bar menu is open [Florian; #698938]
|
||||||
|
* Make open-app-menu keybinding a toggle action [Florian; #686756]
|
||||||
|
* Only recognize common URL schemes in notification messages [Monica; #661225]
|
||||||
|
* Misc fixes and cleanups [Tim, Jasper, Florian, Giovanni, Owen; #698531,
|
||||||
|
#698622, #698427, #698483, #698513, #697203, #698959, #698918, #699029,
|
||||||
|
#699075, #696720, #649748]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Cosimo Cecchi, Monica Chelliah, Matthias Clasen, Tim Lunn,
|
||||||
|
Florian Müllner, Jasper St. Pierre, Michael Wood, Owen W. Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Fran Diéguez [gl], Muhammet Kara [tr], Daniel Mustieles [es],
|
||||||
|
Gil Forcada [ia], Anish A [ml], Dimitris Spingos [el], Marek Černocký [cs],
|
||||||
|
Žygimantas Beručka [lt]
|
||||||
|
|
||||||
|
3.8.1
|
||||||
|
=====
|
||||||
|
* Clip window group during startup animation [Jasper; #696323]
|
||||||
|
* Check for logind rather than systemd [Martin; #696252]
|
||||||
|
* Don't special-case last remote search provider position [Giovanni; #694974]
|
||||||
|
* Fix memory leaks [Ray, Jasper; ##697119, #697295, #697300, #697395]
|
||||||
|
* AppSwitcherPopup: Activate only the selected window if any [Rui; #697480]
|
||||||
|
* Enable screen recorder keybinding in all modes [Florian; #696200]
|
||||||
|
* Remove box-shadow from screen shield for performance reasons [Adel; #697274]
|
||||||
|
* Add support for -st-natural-width/height CSS properties [Giovanni; #664411]
|
||||||
|
* Remove excessive padding from notification buttons [Allan; #664411]
|
||||||
|
* Fix thumbnail dragging in overview [Jasper; #697504]
|
||||||
|
* theme-node: Add get_url()/lookup_url() methods [Florian; #693688]
|
||||||
|
* Misc bug fixes and cleanups [Jasper, Rui, Colin, David, Ray, Matthias:
|
||||||
|
#695859, #696259, #696585, #696436, #697432, #697435, #697560, #697722,
|
||||||
|
#697709]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Matthias Clasen, Allan Day, Adel Gadllah, David Gumberg,
|
||||||
|
Rui Matos, Florian Müllner, Martin Pitt, Jasper St. Pierre, Ray Strode,
|
||||||
|
Colin Walters
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Daniel Martinez [an], Bruce Cowan [en_GB], Khaled Hosny [ar],
|
||||||
|
Ihar Hrachyshka [be], Aron Xu [zh_CN], Wojciech Szczęsny [pl],
|
||||||
|
Inaki Larranaga Murgoitio [eu], Kjartan Maraas [nb],
|
||||||
|
Милош Поповић [sr, sr@latin], Trần Ngọc Quân [vi]
|
||||||
|
|
||||||
|
3.8.0.1
|
||||||
|
=======
|
||||||
|
* Background bug fixes [Ray; #696712]
|
||||||
|
|
||||||
|
3.8.0
|
||||||
|
=====
|
||||||
|
* Remove blur and desaturation from lock screen [Jasper; #696322]
|
||||||
|
* Remove scroll view fade near edges [Adel; #696404]
|
||||||
|
* dateMenu: Open calendar component when using Evolution [Florian; #696432]
|
||||||
|
* Fix unlocking on fast user switch [Cosimo; #696287]
|
||||||
|
* Tweak screen shield animation [Rui; #696380]
|
||||||
|
* Fix major memory leak when changing backgrounds [Ray; #696157]
|
||||||
|
* Miscellaneous bug fixes [Jasper, Adel, Florian; #696199, #696212, #696422,
|
||||||
|
#696447, #696235]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Cosimo Cecchi, Adel Gadllah, Rui Matos, Florian Müllner,
|
||||||
|
Jasper St. Pierre, Ray Strode
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Alexandre Franke [fr], Victor Ibragimov [tg], Arash Mousavi [fa],
|
||||||
|
Gabor Kelemen [hu], Sandeep Sheshrao Shedmake [mr], ManojKumar Giri [or],
|
||||||
|
Shantha kumar [ta], Rajesh Ranjan [hi], Stas Solovey [ru],
|
||||||
|
Shankar Prasad [kn], Dušan Kazik [sk], Ihar Hrachyshka [be],
|
||||||
|
Wouter Bolsterlee [nl], Kris Thomsen [da], Jiro Matsuzawa [ja],
|
||||||
|
Daniel Korostil [uk], Ani Peter [ml], Krishnababu Krothapalli [te],
|
||||||
|
Mantas Kriaučiūnas [lt], Praveen Illa [te]
|
||||||
|
|
||||||
|
3.7.92
|
||||||
|
======
|
||||||
|
* Drop fallback lock implementation [Florian; #693403]
|
||||||
|
* Don't let the user trigger message-tray when in fullscreen [Jasper; #694997]
|
||||||
|
* Scroll search results when using keynav [Jasper; #689681]
|
||||||
|
* Allow raising the shield by starting to type the password [Jasper; #686740]
|
||||||
|
* Improve tracking of fullscreen windows [Owen; #649748]
|
||||||
|
* Improve animation of new windows in overview [Giovanni; #695582]
|
||||||
|
* workspace switcher: Animate new workspaces created by DND [Giovanni; #685285]
|
||||||
|
* Give user time to read messages on login screen [Ray; #694688]
|
||||||
|
* Misc bug fixes and cleanups [Jasper, Ray, Florian, Cosimo, Giovanni, Adel,
|
||||||
|
Stef, Takao, Rui, Neil; #695154, #694993, #695272, #691578, #694321, #695338,
|
||||||
|
#695409, #695458, #695526, #695601, #695471, #695324, #695650, #695656,
|
||||||
|
#695659, #695485, #695395, #694951, #695824, #695841, #695801, #694321,
|
||||||
|
#693708, #695800, #695607, #695882, #691578, #685851, #694371, #690857,
|
||||||
|
#694092, #695747, #696007, #693438, #696064, #696102
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Cosimo Cecchi, Allan Day, Takao Fujiwara, Adel Gadllah,
|
||||||
|
Tim Lunn, Rui Matos, Florian Müllner, Neil Roberts, Jasper St. Pierre,
|
||||||
|
Ray Strode, Stef Walter, Colin Walters, Owen W. Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Nilamdyuti Goswami [as], Chao-Hsiung Liao [zh_HK, zh_TW],
|
||||||
|
Yuri Myasoedov [ru], Gheyret Kenji [ug], Baurzhan Muftakhidinov [kk],
|
||||||
|
Ville-Pekka Vainio [fi], Matej Urbančič [sl],
|
||||||
|
Мирослав Николић [sr, sr@latin], Rūdolfs Mazurs [lv], Christian Kirbach [de],
|
||||||
|
Andika Triwidada [id], Gil Forcada [ca], Mattias Põldaru [et],
|
||||||
|
Duarte Loreto [pt], Adam Matoušek [cs], Changwoo Ryu [ko],
|
||||||
|
Ihar Hrachyshka [be], Carles Ferrando [ca@valencia], Sweta Kothari [gu]
|
||||||
|
|
||||||
|
3.7.91
|
||||||
|
======
|
||||||
|
* overview: Fade out controls during DND that are not targets [Cosimo; #686984]
|
||||||
|
* overview: Keep open when a Control key is held [Florian; #686984]
|
||||||
|
* Improve login screen => session transition [Ray; #694321]
|
||||||
|
* Center application grid horizontally [Florian; #694261]
|
||||||
|
* Fix hiding panel when fullscreen windows span multiple monitors [Adel; 646861]
|
||||||
|
* Tweak thresholds of pressure barrier [Jasper; #694467]
|
||||||
|
* Tweak window picker layout [Jasper; #694902]
|
||||||
|
* Expose key grab DBus API to gnome-settings-daemon [Florian; #643111]
|
||||||
|
* Don't always show message tray in overview, add message indicator
|
||||||
|
[Cosimo; #687787]
|
||||||
|
* Tweak startup animation [Ray; #694326]
|
||||||
|
* Add OSD popups and expose them to gnome-settings-daemon [Florian; #613543]
|
||||||
|
* Move loupe icon to the start of the search entry [Jasper; #695069]
|
||||||
|
* Don't show the input switcher with less than 2 items [Rui; 695000]
|
||||||
|
* Fix auto-completion of system modals immediately upon display [Stef; #692937]
|
||||||
|
* Ignore workspaces in alt-tab [Florian; #661156]
|
||||||
|
* Disable copying text from password entries [Florian; #695104]
|
||||||
|
* Use standard styling for ibus candidate popups [Allan; #694796]
|
||||||
|
* Fix calendar changing height on month changes [Giovanni; #641383]
|
||||||
|
* Port the hot corner to use pressure barriers [Jasper; #663661]
|
||||||
|
* Misc bug fixes and cleanups: [Hashem, Giovanni, Alban, Jasper, Cosimo,
|
||||||
|
Florian, Adel, Daniel, Matthias, Ray, Rui, Guillaume, Stef; #685849, #690643,
|
||||||
|
#694292, #693814, #694234, #694365, #694287, #694336, #694256, #694261,
|
||||||
|
#663601, #694441, #694284, #694463, #694475, #687248, #694394, #694320,
|
||||||
|
#694701, #694784, #694858, #694906, #694327, #694876, #694905, #694969,
|
||||||
|
#694970, #694988, #695006, #695001, #694998, #695023, #695002, #695073,
|
||||||
|
#695126, #687748, #694837, #693907, #679851, #694988]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Cosimo Cecchi, Matthias Clasen, Alban Crequy, Allan Day,
|
||||||
|
Guillaume Desmottes, Adel Gadllah, Rui Matos, Daniel Mustieles,
|
||||||
|
Hashem Nasarat, Jasper St. Pierre, Ray Strode, Stef Walter
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Yuri Myasoedov [ru], Adam Matoušek [cs], Piotr Drąg [pl], Matej Urbančič [sl],
|
||||||
|
Sweta Kothari [gu], Kjartan Maraas [nb], Nguyễn Thái Ngọc Duy [vi],
|
||||||
|
Chao-Hsiung Liao [zh_HK, zh_TW], Dimitris Spingos [el],
|
||||||
|
Inaki Larranaga Murgoitio [eu], Luca Ferretti [it], A S Alam [pa],
|
||||||
|
Gheyret Kenji [ug], Stas Solovey [ru], Enrico Nicoletto [pt_BR],
|
||||||
|
Fran Diéguez [gl], Daniel Mustieles [es], Aurimas Černius [lt]
|
||||||
|
|
||||||
3.7.90
|
3.7.90
|
||||||
======
|
======
|
||||||
* Let GNOME Shell work on EGL and GLES2 [Neil; #693225, #693438, #693339]
|
* Let GNOME Shell work on EGL and GLES2 [Neil; #693225, #693438, #693339]
|
||||||
|
10
configure.ac
10
configure.ac
@ -1,5 +1,5 @@
|
|||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AC_INIT([gnome-shell],[3.7.90],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
AC_INIT([gnome-shell],[3.9.2],[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])
|
||||||
@ -63,9 +63,9 @@ AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
|
|||||||
CLUTTER_MIN_VERSION=1.13.4
|
CLUTTER_MIN_VERSION=1.13.4
|
||||||
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
|
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
|
||||||
GJS_MIN_VERSION=1.35.4
|
GJS_MIN_VERSION=1.35.4
|
||||||
MUTTER_MIN_VERSION=3.7.90
|
MUTTER_MIN_VERSION=3.9.2
|
||||||
GTK_MIN_VERSION=3.7.9
|
GTK_MIN_VERSION=3.7.9
|
||||||
GIO_MIN_VERSION=2.35.0
|
GIO_MIN_VERSION=2.37.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
|
||||||
TELEPATHY_GLIB_MIN_VERSION=0.17.5
|
TELEPATHY_GLIB_MIN_VERSION=0.17.5
|
||||||
@ -74,7 +74,7 @@ STARTUP_NOTIFICATION_MIN_VERSION=0.11
|
|||||||
GCR_MIN_VERSION=3.3.90
|
GCR_MIN_VERSION=3.3.90
|
||||||
GNOME_DESKTOP_REQUIRED_VERSION=3.7.90
|
GNOME_DESKTOP_REQUIRED_VERSION=3.7.90
|
||||||
GNOME_MENUS_REQUIRED_VERSION=3.5.3
|
GNOME_MENUS_REQUIRED_VERSION=3.5.3
|
||||||
NETWORKMANAGER_MIN_VERSION=0.9.6
|
NETWORKMANAGER_MIN_VERSION=0.9.8
|
||||||
PULSE_MIN_VERS=2.0
|
PULSE_MIN_VERS=2.0
|
||||||
|
|
||||||
# Collect more than 20 libraries for a prize!
|
# Collect more than 20 libraries for a prize!
|
||||||
@ -96,7 +96,7 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
|
|||||||
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
|
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
|
||||||
libnm-glib libnm-util >= $NETWORKMANAGER_MIN_VERSION
|
libnm-glib libnm-util >= $NETWORKMANAGER_MIN_VERSION
|
||||||
libnm-gtk >= $NETWORKMANAGER_MIN_VERSION
|
libnm-gtk >= $NETWORKMANAGER_MIN_VERSION
|
||||||
gnome-keyring-1 gcr-3 >= $GCR_MIN_VERSION)
|
libsecret-unstable gcr-base-3 >= $GCR_MIN_VERSION)
|
||||||
|
|
||||||
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.8 x11)
|
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.8 x11)
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
<KeyListEntry name="focus-active-notification"
|
<KeyListEntry name="focus-active-notification"
|
||||||
_description="Focus the active notification"/>
|
_description="Focus the active notification"/>
|
||||||
|
|
||||||
|
<KeyListEntry name="toggle-overview"
|
||||||
|
_description="Show the overview"/>
|
||||||
|
|
||||||
<KeyListEntry name="toggle-application-view"
|
<KeyListEntry name="toggle-application-view"
|
||||||
_description="Show all applications"/>
|
_description="Show all applications"/>
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
wandadir = $(pkgdatadir)
|
||||||
|
dist_wanda_DATA = wanda.png
|
||||||
|
|
||||||
desktopdir=$(datadir)/applications
|
desktopdir=$(datadir)/applications
|
||||||
desktop_DATA = gnome-shell.desktop gnome-shell-extension-prefs.desktop
|
desktop_DATA = gnome-shell.desktop gnome-shell-extension-prefs.desktop
|
||||||
|
|
||||||
@ -12,6 +15,7 @@ desktop_DATA = gnome-shell.desktop gnome-shell-extension-prefs.desktop
|
|||||||
|
|
||||||
introspectiondir = $(datadir)/dbus-1/interfaces
|
introspectiondir = $(datadir)/dbus-1/interfaces
|
||||||
introspection_DATA = \
|
introspection_DATA = \
|
||||||
|
org.gnome.Shell.Screencast.xml \
|
||||||
org.gnome.Shell.Screenshot.xml \
|
org.gnome.Shell.Screenshot.xml \
|
||||||
org.gnome.ShellSearchProvider.xml \
|
org.gnome.ShellSearchProvider.xml \
|
||||||
org.gnome.ShellSearchProvider2.xml
|
org.gnome.ShellSearchProvider2.xml
|
||||||
|
96
data/org.gnome.Shell.Screencast.xml
Normal file
96
data/org.gnome.Shell.Screencast.xml
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<!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.Screencast:
|
||||||
|
@short_description: Screencast interface
|
||||||
|
|
||||||
|
The interface used to record screen contents.
|
||||||
|
-->
|
||||||
|
<interface name="org.gnome.Shell.Screencast">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Screencast:
|
||||||
|
@file_template: the template for the filename to use
|
||||||
|
@options: a dictionary of optional parameters
|
||||||
|
@success: whether the screencast was started successfully
|
||||||
|
@filename_used: the file where the screencast is being saved
|
||||||
|
|
||||||
|
Records a screencast of the whole screen and saves it
|
||||||
|
(by default) as webm video under a filename derived from
|
||||||
|
@file_template. The template is either a relative or absolute
|
||||||
|
filename which may contain some escape sequences - %d and %t
|
||||||
|
will be replaced by the start date and time of the recording.
|
||||||
|
If a relative name is used, the screencast will be saved in the
|
||||||
|
$XDG_VIDEOS_DIR if it exists, or the home directory otherwise.
|
||||||
|
The actual filename of the saved video is returned in @filename_used.
|
||||||
|
The set of optional parameters in @options currently consists of:
|
||||||
|
'draw-cursor'(b): whether the cursor should be included in the
|
||||||
|
recording (true)
|
||||||
|
'framerate'(i): the number of frames per second that should be
|
||||||
|
recorded if possible (30)
|
||||||
|
'pipeline'(s): the GStreamer pipeline used to encode recordings
|
||||||
|
in gst-launch format; if not specified, the
|
||||||
|
recorder will produce vp8 (webm) video (unset)
|
||||||
|
-->
|
||||||
|
<method name="Screencast">
|
||||||
|
<arg type="s" direction="in" name="file_template"/>
|
||||||
|
<arg type="a{sv}" direction="in" name="options"/>
|
||||||
|
<arg type="b" direction="in" name="flash"/>
|
||||||
|
<arg type="b" direction="out" name="success"/>
|
||||||
|
<arg type="s" direction="out" name="filename_used"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ScreencastArea:
|
||||||
|
@x: the X coordinate of the area to capture
|
||||||
|
@y: the Y coordinate of the area to capture
|
||||||
|
@width: the width of the area to capture
|
||||||
|
@height: the height of the area to capture
|
||||||
|
@file_template: the template for the filename to use
|
||||||
|
@options: a dictionary of optional parameters
|
||||||
|
@success: whether the screencast was started successfully
|
||||||
|
@filename_used: the file where the screencast is being saved
|
||||||
|
|
||||||
|
Records a screencast of the passed in area and saves it
|
||||||
|
(by default) as webm video under a filename derived from
|
||||||
|
@file_template. The template is either a relative or absolute
|
||||||
|
filename which may contain some escape sequences - %d and %t
|
||||||
|
will be replaced by the start date and time of the recording.
|
||||||
|
If a relative name is used, the screencast will be saved in the
|
||||||
|
$XDG_VIDEOS_DIR if it exists, or the home directory otherwise.
|
||||||
|
The actual filename of the saved video is returned in @filename_used.
|
||||||
|
The set of optional parameters in @options currently consists of:
|
||||||
|
'draw-cursor'(b): whether the cursor should be included in the
|
||||||
|
recording (true)
|
||||||
|
'framerate'(i): the number of frames per second that should be
|
||||||
|
recorded if possible (30)
|
||||||
|
'pipeline'(s): the GStreamer pipeline used to encode recordings
|
||||||
|
in gst-launch format; if not specified, the
|
||||||
|
recorder will produce vp8 (webm) video (unset)
|
||||||
|
-->
|
||||||
|
<method name="ScreencastArea">
|
||||||
|
<arg type="i" direction="in" name="x"/>
|
||||||
|
<arg type="i" direction="in" name="y"/>
|
||||||
|
<arg type="i" direction="in" name="width"/>
|
||||||
|
<arg type="i" direction="in" name="height"/>
|
||||||
|
<arg type="s" direction="in" name="file_template"/>
|
||||||
|
<arg type="a{sv}" direction="in" name="options"/>
|
||||||
|
<arg type="b" direction="out" name="success"/>
|
||||||
|
<arg type="s" direction="out" name="filename_used"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
StopScreencast:
|
||||||
|
@success: whether stopping the recording was successful
|
||||||
|
|
||||||
|
Stop the recording started by either Screencast or ScreencastArea.
|
||||||
|
-->
|
||||||
|
<method name="StopScreencast">
|
||||||
|
<arg type="b" direction="out" name="success"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
@ -46,7 +46,7 @@
|
|||||||
<!--
|
<!--
|
||||||
GetResultMetas:
|
GetResultMetas:
|
||||||
@identifiers: An array of result identifiers as returned by GetInitialResultSet() or GetSubsearchResultSet()
|
@identifiers: An array of result identifiers as returned by GetInitialResultSet() or GetSubsearchResultSet()
|
||||||
@metas: A dictionary describing the given search result, containing a human-readable 'name' (string), along with the result identifier this meta is for, 'id' (string). 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.
|
@metas: A dictionary describing the given search result, containing a human-readable 'name' (string), along with the result identifier this meta is for, 'id' (string). Optionally, 'icon' (a serialized GIcon as obtained by g_icon_serialize) can be specified if the result can be better served with a thumbnail of the content (such as with images). 'gicon' (a serialized GIcon as obtained by g_icon_to_string) or 'icon-data' (raw image data as (iiibiiay) - width, height, rowstride, has-alpha, bits per sample, channels, data) are deprecated values that can also be used for that purpose. 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
|
Return an array of meta data used to display each given result
|
||||||
-->
|
-->
|
||||||
|
@ -21,16 +21,6 @@
|
|||||||
EnableExtension and DisableExtension DBus methods on org.gnome.Shell.
|
EnableExtension and DisableExtension DBus methods on org.gnome.Shell.
|
||||||
</_description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
<key name="enable-app-monitoring" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<_summary>Whether to collect stats about applications usage</_summary>
|
|
||||||
<_description>
|
|
||||||
The shell normally monitors active applications in order to present
|
|
||||||
the most used ones (e.g. in launchers). While this data will be
|
|
||||||
kept private, you may want to disable this for privacy reasons.
|
|
||||||
Please note that doing so won't remove already saved data.
|
|
||||||
</_description>
|
|
||||||
</key>
|
|
||||||
<key name="favorite-apps" type="as">
|
<key name="favorite-apps" type="as">
|
||||||
<default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default>
|
<default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default>
|
||||||
<_summary>List of desktop file IDs for favorite applications</_summary>
|
<_summary>List of desktop file IDs for favorite applications</_summary>
|
||||||
@ -117,6 +107,13 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
|
|||||||
Overview.
|
Overview.
|
||||||
</_description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="toggle-overview" type="as">
|
||||||
|
<default>["<Super>s"]</default>
|
||||||
|
<_summary>Keybinding to open the overview</_summary>
|
||||||
|
<_description>
|
||||||
|
Keybinding to open 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>
|
||||||
|
@ -125,7 +125,12 @@ StScrollBar StButton#vhandle:active {
|
|||||||
|
|
||||||
/* PopupMenu */
|
/* PopupMenu */
|
||||||
|
|
||||||
.popup-menu-boxpointer {
|
.popup-menu-ornament {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-menu-boxpointer,
|
||||||
|
.candidate-popup-boxpointer {
|
||||||
-arrow-border-radius: 8px;
|
-arrow-border-radius: 8px;
|
||||||
-arrow-background-color: rgba(0,0,0,0.9);
|
-arrow-background-color: rgba(0,0,0,0.9);
|
||||||
-arrow-border-width: 2px;
|
-arrow-border-width: 2px;
|
||||||
@ -315,10 +320,20 @@ StScrollBar StButton#vhandle:active {
|
|||||||
.notification-button:focus,
|
.notification-button:focus,
|
||||||
.notification-icon-button:focus,
|
.notification-icon-button:focus,
|
||||||
.hotplug-notification-item:focus,
|
.hotplug-notification-item:focus,
|
||||||
.modal-dialog-button:focus {
|
.modal-dialog-button:focus,
|
||||||
|
.app-view-control:focus {
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-view-control:focus {
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-view-control:first-child:ltr:focus,
|
||||||
|
.app-view-control:last-child:rtl:focus {
|
||||||
|
border-right-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.candidate-page-button:active,
|
.candidate-page-button:active,
|
||||||
.candidate-page-button:pressed,
|
.candidate-page-button:pressed,
|
||||||
.notification-button:active,
|
.notification-button:active,
|
||||||
@ -501,6 +516,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#appMenu {
|
#appMenu {
|
||||||
|
spinner-image: url("process-working.svg");
|
||||||
spacing: 4px;
|
spacing: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,8 +902,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
.search-display > StBoxLayout,
|
.search-display > StBoxLayout,
|
||||||
.all-apps > StBoxLayout,
|
.all-apps > StBoxLayout,
|
||||||
.frequent-apps > StBoxLayout {
|
.frequent-apps > StBoxLayout {
|
||||||
/* horizontal padding to make sure the scrollbar doesn't overlap content */
|
/* horizontal padding to make sure scrollbars or dash don't overlap content */
|
||||||
padding: 0px 18px;
|
padding: 0px 88px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-folder-icon {
|
.app-folder-icon {
|
||||||
@ -963,6 +979,10 @@ StScrollBar StButton#vhandle:active {
|
|||||||
color:white;
|
color:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-display .app-well-app > .overview-icon {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.list-search-result:hover .list-search-result-description {
|
.list-search-result:hover .list-search-result-description {
|
||||||
text-shadow: rgba(0,0,0,0.8) 0px 1px 2px;
|
text-shadow: rgba(0,0,0,0.8) 0px 1px 2px;
|
||||||
}
|
}
|
||||||
@ -1168,7 +1188,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
background-image: url("calendar-arrow-right.svg");
|
background-image: url("calendar-arrow-right.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-change-month-back:hover {
|
.calendar-change-month-back:hover,
|
||||||
|
.calendar-change-month-back:focus {
|
||||||
background-color: #999999;
|
background-color: #999999;
|
||||||
}
|
}
|
||||||
.calendar-change-month-back:active {
|
.calendar-change-month-back:active {
|
||||||
@ -1186,7 +1207,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
background-image: url("calendar-arrow-left.svg");
|
background-image: url("calendar-arrow-left.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-change-month-forward:hover {
|
.calendar-change-month-forward:hover,
|
||||||
|
.calendar-change-month-forward:focus {
|
||||||
background-color: #999999;
|
background-color: #999999;
|
||||||
}
|
}
|
||||||
.calendar-change-month-forward:active {
|
.calendar-change-month-forward:active {
|
||||||
@ -1207,7 +1229,8 @@ StScrollBar StButton#vhandle:active {
|
|||||||
height: 2.4em;
|
height: 2.4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-day-base:hover {
|
.calendar-day-base:hover,
|
||||||
|
.calendar-day-base:focus {
|
||||||
background-color: #777777;
|
background-color: #777777;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1257,15 +1280,15 @@ StScrollBar StButton#vhandle:active {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-other-month-day {
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar-day-with-events {
|
.calendar-day-with-events {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendar-other-month-day {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
.events-header-vbox {
|
.events-header-vbox {
|
||||||
spacing: 6pt;
|
spacing: 6pt;
|
||||||
padding-right: .5em;
|
padding-right: .5em;
|
||||||
@ -1438,11 +1461,13 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.notification-button {
|
.notification-button {
|
||||||
padding: 4px 42px 5px;
|
-st-natural-width: 140px;
|
||||||
|
padding: 4px 4px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-button:focus {
|
.notification-button:focus {
|
||||||
padding: 3px 41px 4px;
|
-st-natural-width: 138px;
|
||||||
|
padding: 3px 4px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-icon-button {
|
.notification-icon-button {
|
||||||
@ -2129,23 +2154,12 @@ StScrollBar StButton#vhandle:active {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* IBus Candidate Popup */
|
/* IBus Candidate Popup */
|
||||||
.candidate-popup-boxpointer {
|
|
||||||
-arrow-border-radius: 8px;
|
|
||||||
-arrow-background-color: #707070;
|
|
||||||
-arrow-border-width: 0px;
|
|
||||||
-arrow-base: 24px;
|
|
||||||
-arrow-rise: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.candidate-popup-content {
|
.candidate-popup-content {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
spacing: 0.3em;
|
spacing: 0.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.candidate-popup-text {
|
|
||||||
font-size: 9pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.candidate-index {
|
.candidate-index {
|
||||||
padding: 0 0.5em 0 0;
|
padding: 0 0.5em 0 0;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
@ -2211,6 +2225,9 @@ StScrollBar StButton#vhandle:active {
|
|||||||
border: none;
|
border: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
|
padding-bottom: 80px;
|
||||||
|
padding-top: 80px;
|
||||||
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
min-height: 150px;
|
min-height: 150px;
|
||||||
max-height: 700px;
|
max-height: 700px;
|
||||||
@ -2328,52 +2345,47 @@ StScrollBar StButton#vhandle:active {
|
|||||||
width: 15em;
|
width: 15em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list {
|
.login-dialog-session-list,
|
||||||
color: #ffffff;
|
.login-dialog-session-list-item {
|
||||||
font-size: 10.5pt;
|
color: #babdb6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-dialog-session-list-button:focus,
|
||||||
|
.login-dialog-session-list-button:active,
|
||||||
|
.login-dialog-session-list-button:hover,
|
||||||
|
.login-dialog-session-list-item:focus,
|
||||||
|
.login-dialog-session-list-item:hover {
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list-button {
|
.login-dialog-session-list-button {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list-button:focus {
|
|
||||||
background-color: #4c4c4c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-dialog-session-list-button:active {
|
|
||||||
background-color: #4c4c4c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-dialog-session-list-button:hover {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-dialog-session-list-scroll-view {
|
.login-dialog-session-list-scroll-view {
|
||||||
background-gradient-start: rgba(80,80,80,0.3);
|
padding: 6px;
|
||||||
background-gradient-end: rgba(80,80,80,0.7);
|
|
||||||
background-gradient-direction: vertical;
|
|
||||||
box-shadow: inset 0px 2px 4px rgba(0,0,0,0.9);
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid rgba(80,80,80,1.0);
|
|
||||||
padding: .5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list-item:focus {
|
.login-dialog-session-list-item {
|
||||||
background-color: #666666;
|
padding-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list-triangle {
|
.login-dialog-session-list-triangle {
|
||||||
padding-right: .5em;
|
padding-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list-item-box {
|
.login-dialog-session-list-item-box {
|
||||||
spacing: .25em;
|
padding-left: 6px;
|
||||||
|
spacing: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog-session-list-item-dot {
|
.login-dialog-session-list-item-dot {
|
||||||
width: .75em;
|
width: 10px;
|
||||||
height: .75em;
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-dialog-logo-bin {
|
||||||
|
padding: 24px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog .modal-dialog-button-box {
|
.login-dialog .modal-dialog-button-box {
|
||||||
|
BIN
data/wanda.png
Normal file
BIN
data/wanda.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -46,6 +46,7 @@
|
|||||||
<xi:include href="doc-gen-org.gnome.Shell.SearchProvider.xml"/>
|
<xi:include href="doc-gen-org.gnome.Shell.SearchProvider.xml"/>
|
||||||
<xi:include href="doc-gen-org.gnome.Shell.SearchProvider2.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-keybinding-modes.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"/>
|
||||||
<xi:include href="xml/shell-util.xml"/>
|
<xi:include href="xml/shell-util.xml"/>
|
||||||
|
@ -66,11 +66,4 @@ its dependencies to build from tarballs.</description>
|
|||||||
<gnome:userid>fmuellner</gnome:userid>
|
<gnome:userid>fmuellner</gnome:userid>
|
||||||
</foaf:Person>
|
</foaf:Person>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<maintainer>
|
|
||||||
<foaf:Person>
|
|
||||||
<foaf:name>Ray Strode</foaf:name>
|
|
||||||
<foaf:mbox rdf:resource="mailto:halfline@gmail.com" />
|
|
||||||
<gnome:userid>halfline</gnome:userid>
|
|
||||||
</foaf:Person>
|
|
||||||
</maintainer>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -77,7 +77,9 @@ nobase_dist_js_DATA = \
|
|||||||
ui/pointerWatcher.js \
|
ui/pointerWatcher.js \
|
||||||
ui/popupMenu.js \
|
ui/popupMenu.js \
|
||||||
ui/remoteSearch.js \
|
ui/remoteSearch.js \
|
||||||
|
ui/remoteMenu.js \
|
||||||
ui/runDialog.js \
|
ui/runDialog.js \
|
||||||
|
ui/screencast.js \
|
||||||
ui/screenshot.js \
|
ui/screenshot.js \
|
||||||
ui/screenShield.js \
|
ui/screenShield.js \
|
||||||
ui/scripting.js \
|
ui/scripting.js \
|
||||||
|
@ -28,6 +28,7 @@ const Mainloop = imports.mainloop;
|
|||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Pango = imports.gi.Pango;
|
const Pango = imports.gi.Pango;
|
||||||
|
const Realmd = imports.gdm.realmd;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
@ -39,7 +40,6 @@ 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 PanelMenu = imports.ui.panelMenu;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const UserMenu = imports.ui.userMenu;
|
const UserMenu = imports.ui.userMenu;
|
||||||
@ -48,44 +48,10 @@ const UserWidget = imports.ui.userWidget;
|
|||||||
const _FADE_ANIMATION_TIME = 0.25;
|
const _FADE_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_HEIGHT = 16;
|
const _LOGO_ICON_HEIGHT = 48;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
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',
|
||||||
|
|
||||||
@ -552,6 +518,12 @@ const LoginDialog = new Lang.Class({
|
|||||||
Lang.bind(this, this._updateBanner));
|
Lang.bind(this, this._updateBanner));
|
||||||
this._settings.connect('changed::' + GdmUtil.DISABLE_USER_LIST_KEY,
|
this._settings.connect('changed::' + GdmUtil.DISABLE_USER_LIST_KEY,
|
||||||
Lang.bind(this, this._updateDisableUserList));
|
Lang.bind(this, this._updateDisableUserList));
|
||||||
|
this._settings.connect('changed::' + GdmUtil.LOGO_KEY,
|
||||||
|
Lang.bind(this, this._updateLogo));
|
||||||
|
|
||||||
|
this._textureCache = St.TextureCache.get_default();
|
||||||
|
this._textureCache.connect('texture-file-changed',
|
||||||
|
Lang.bind(this, this._updateLogoTexture));
|
||||||
|
|
||||||
this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
|
this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
@ -594,6 +566,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
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._promptEntryTextChangedId = 0;
|
||||||
|
this._promptEntryActivateId = 0;
|
||||||
this._promptBox.add(this._promptEntry,
|
this._promptBox.add(this._promptEntry,
|
||||||
{ expand: true,
|
{ expand: true,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
@ -608,7 +581,6 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._promptBox.add(this._promptLoginHint);
|
this._promptBox.add(this._promptLoginHint);
|
||||||
|
|
||||||
this._signInButton = null;
|
this._signInButton = null;
|
||||||
this._workSpinner = null;
|
|
||||||
|
|
||||||
this._sessionList = new SessionList();
|
this._sessionList = new SessionList();
|
||||||
this._sessionList.connect('session-activated',
|
this._sessionList.connect('session-activated',
|
||||||
@ -643,6 +615,11 @@ const LoginDialog = new Lang.Class({
|
|||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
x_fill: true });
|
x_fill: true });
|
||||||
|
|
||||||
|
this._logoBin = new St.Bin({ style_class: 'login-dialog-logo-bin', y_expand: true });
|
||||||
|
this._logoBin.set_y_align(Clutter.ActorAlign.END);
|
||||||
|
this.backgroundStack.add_actor(this._logoBin);
|
||||||
|
this._updateLogo();
|
||||||
|
|
||||||
if (!this._userManager.is_loaded)
|
if (!this._userManager.is_loaded)
|
||||||
this._userManagerLoadedId = this._userManager.connect('notify::is-loaded',
|
this._userManagerLoadedId = this._userManager.connect('notify::is-loaded',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
@ -689,7 +666,27 @@ const LoginDialog = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updateLogoTexture: function(cache, uri) {
|
||||||
|
if (this._logoFileUri != uri)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let icon = null;
|
||||||
|
if (this._logoFileUri)
|
||||||
|
icon = this._textureCache.load_uri_async(this._logoFileUri,
|
||||||
|
-1, _LOGO_ICON_HEIGHT);
|
||||||
|
this._logoBin.set_child(icon);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateLogo: function() {
|
||||||
|
let path = this._settings.get_string(GdmUtil.LOGO_KEY);
|
||||||
|
|
||||||
|
this._logoFileUri = path ? Gio.file_new_for_path(path).get_uri() : null;
|
||||||
|
this._updateLogoTexture(this._textureCache, this._logoFileUri);
|
||||||
|
},
|
||||||
|
|
||||||
_reset: function() {
|
_reset: function() {
|
||||||
|
this._userVerifier.clear();
|
||||||
|
|
||||||
this._updateSensitivity(true);
|
this._updateSensitivity(true);
|
||||||
this._promptMessage.hide();
|
this._promptMessage.hide();
|
||||||
this._user = null;
|
this._user = null;
|
||||||
@ -705,7 +702,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._promptEntry.text = '';
|
this._promptEntry.text = '';
|
||||||
|
|
||||||
this._updateSensitivity(true);
|
this._updateSensitivity(true);
|
||||||
this._setWorking(false);
|
this.setWorking(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDefaultSessionChanged: function(client, sessionId) {
|
_onDefaultSessionChanged: function(client, sessionId) {
|
||||||
@ -771,10 +768,6 @@ const LoginDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_prepareDialog: function(forSecret, hold) {
|
_prepareDialog: function(forSecret, hold) {
|
||||||
this._workSpinner = new Panel.AnimatedIcon('process-working.svg', WORK_SPINNER_ICON_SIZE);
|
|
||||||
this._workSpinner.actor.opacity = 0;
|
|
||||||
this._workSpinner.actor.show();
|
|
||||||
|
|
||||||
this.buttonLayout.visible = true;
|
this.buttonLayout.visible = true;
|
||||||
this.clearButtons();
|
this.clearButtons();
|
||||||
|
|
||||||
@ -787,8 +780,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
y_fill: false,
|
y_fill: false,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
y_align: St.Align.MIDDLE });
|
y_align: St.Align.MIDDLE });
|
||||||
this.buttonLayout.add(this._workSpinner.actor,
|
this.placeSpinner({ expand: false,
|
||||||
{ expand: false,
|
|
||||||
x_fill: false,
|
x_fill: false,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
x_align: St.Align.END,
|
x_align: St.Align.END,
|
||||||
@ -811,6 +803,11 @@ const LoginDialog = new Lang.Class({
|
|||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this._updateSignInButtonSensitivity(this._promptEntry.text.length > 0);
|
this._updateSignInButtonSensitivity(this._promptEntry.text.length > 0);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this._promptEntryActivateId =
|
||||||
|
this._promptEntry.clutter_text.connect('activate', function() {
|
||||||
|
hold.release();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSensitivity: function(sensitive) {
|
_updateSensitivity: function(sensitive) {
|
||||||
@ -835,7 +832,12 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._promptEntryTextChangedId = 0;
|
this._promptEntryTextChangedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._setWorking(false);
|
if (this._promptEntryActivateId > 0) {
|
||||||
|
this._promptEntry.clutter_text.disconnect(this._promptEntryActivateId);
|
||||||
|
this._promptEntryActivateId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setWorking(false);
|
||||||
this._promptBox.hide();
|
this._promptBox.hide();
|
||||||
this._promptLoginHint.hide();
|
this._promptLoginHint.hide();
|
||||||
|
|
||||||
@ -848,36 +850,9 @@ const LoginDialog = new Lang.Class({
|
|||||||
this._promptLoginHint.hide();
|
this._promptLoginHint.hide();
|
||||||
|
|
||||||
this.clearButtons();
|
this.clearButtons();
|
||||||
this._workSpinner = null;
|
|
||||||
this._signInButton = null;
|
this._signInButton = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
_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() {
|
|
||||||
if (this._workSpinner)
|
|
||||||
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);
|
||||||
|
|
||||||
@ -892,7 +867,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
function() {
|
function() {
|
||||||
let text = this._promptEntry.get_text();
|
let text = this._promptEntry.get_text();
|
||||||
this._updateSensitivity(false);
|
this._updateSensitivity(false);
|
||||||
this._setWorking(true);
|
this.setWorking(true);
|
||||||
this._userVerifier.answerQuery(serviceName, text);
|
this._userVerifier.answerQuery(serviceName, text);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@ -900,24 +875,47 @@ const LoginDialog = new Lang.Class({
|
|||||||
return batch.run();
|
return batch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_showRealmLoginHint: function(realmManager, hint) {
|
||||||
|
if (!hint)
|
||||||
|
return;
|
||||||
|
|
||||||
|
hint = hint.replace(/%U/g, 'user');
|
||||||
|
hint = hint.replace(/%D/g, 'DOMAIN');
|
||||||
|
hint = hint.replace(/%[^UD]/g, '');
|
||||||
|
|
||||||
|
// Translators: this message is shown below the username entry field
|
||||||
|
// to clue the user in on how to login to the local network realm
|
||||||
|
this._showLoginHint(null, _("(e.g., user or %s)").format(hint));
|
||||||
|
},
|
||||||
|
|
||||||
_askForUsernameAndLogIn: function() {
|
_askForUsernameAndLogIn: function() {
|
||||||
this._promptLabel.set_text(_("Username: "));
|
this._promptLabel.set_text(_("Username: "));
|
||||||
this._promptEntry.set_text('');
|
this._promptEntry.set_text('');
|
||||||
this._promptEntry.clutter_text.set_password_char('');
|
this._promptEntry.clutter_text.set_password_char('');
|
||||||
|
|
||||||
|
let realmManager = new Realmd.Manager();
|
||||||
|
let signalId = realmManager.connect('login-format-changed',
|
||||||
|
Lang.bind(this, this._showRealmLoginHint));
|
||||||
|
this._showRealmLoginHint(realmManager.loginFormat);
|
||||||
|
|
||||||
let tasks = [this._showPrompt,
|
let tasks = [this._showPrompt,
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
let userName = this._promptEntry.get_text();
|
let userName = this._promptEntry.get_text();
|
||||||
this._promptEntry.reactive = false;
|
this._promptEntry.reactive = false;
|
||||||
return this._beginVerificationForUser(userName);
|
return this._beginVerificationForUser(userName);
|
||||||
|
},
|
||||||
|
|
||||||
|
function() {
|
||||||
|
realmManager.disconnect(signalId)
|
||||||
|
realmManager.release();
|
||||||
}];
|
}];
|
||||||
|
|
||||||
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
let batch = new Batch.ConsecutiveBatch(this, tasks);
|
||||||
return batch.run();
|
return batch.run();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSessionOpened: function(client, serviceName) {
|
_startSession: function(serviceName) {
|
||||||
Tweener.addTween(this.dialogLayout,
|
Tweener.addTween(this.dialogLayout,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: _FADE_ANIMATION_TIME,
|
time: _FADE_ANIMATION_TIME,
|
||||||
@ -940,6 +938,18 @@ const LoginDialog = new Lang.Class({
|
|||||||
onCompleteScope: this });
|
onCompleteScope: this });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onSessionOpened: function(client, serviceName) {
|
||||||
|
if (!this._userVerifier.hasPendingMessages) {
|
||||||
|
this._startSession(serviceName);
|
||||||
|
} else {
|
||||||
|
let signalId = this._userVerifier.connect('no-more-messages',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this._userVerifier.disconnect(signalId);
|
||||||
|
this._startSession(serviceName);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_waitForItemForUser: function(userName) {
|
_waitForItemForUser: function(userName) {
|
||||||
let item = this._userList.getItemFromUserName(userName);
|
let item = this._userList.getItemFromUserName(userName);
|
||||||
|
|
||||||
@ -1003,7 +1013,7 @@ const LoginDialog = new Lang.Class({
|
|||||||
function() {
|
function() {
|
||||||
// If we're just starting out, start on the right
|
// If we're just starting out, start on the right
|
||||||
// item.
|
// item.
|
||||||
if (!this.is_loaded) {
|
if (!this._userManager.is_loaded) {
|
||||||
this._userList.jumpToItem(this._timedLoginItem);
|
this._userList.jumpToItem(this._timedLoginItem);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1141,15 +1151,6 @@ const LoginDialog = new Lang.Class({
|
|||||||
Lang.bind(this, function(userManager, user) {
|
Lang.bind(this, function(userManager, user) {
|
||||||
this._userList.removeUser(user);
|
this._userList.removeUser(user);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// emitted in idle so caller doesn't have to explicitly check if
|
|
||||||
// it's loaded immediately after construction
|
|
||||||
// (since there's no way the caller could be listening for
|
|
||||||
// 'loaded' yet)
|
|
||||||
Mainloop.idle_add(Lang.bind(this, function() {
|
|
||||||
this.emit('loaded');
|
|
||||||
this.is_loaded = true;
|
|
||||||
}));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onOpened: function() {
|
_onOpened: function() {
|
||||||
@ -1164,5 +1165,9 @@ const LoginDialog = new Lang.Class({
|
|||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
Main.ctrlAltTabManager.removeGroup(this.dialogLayout);
|
Main.ctrlAltTabManager.removeGroup(this.dialogLayout);
|
||||||
}
|
},
|
||||||
|
|
||||||
|
addCharacter: function(unichar) {
|
||||||
|
this._promptEntry.clutter_text.insert_unichar(unichar);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -63,7 +63,7 @@ const Manager = new Lang.Class({
|
|||||||
Lang.bind(this, this._reloadRealms))
|
Lang.bind(this, this._reloadRealms))
|
||||||
this._realms = {};
|
this._realms = {};
|
||||||
|
|
||||||
this._aggregateProvider.connect('g-properties-changed',
|
this._signalId = this._aggregateProvider.connect('g-properties-changed',
|
||||||
Lang.bind(this, function(proxy, properties) {
|
Lang.bind(this, function(proxy, properties) {
|
||||||
if ('Realms' in properties.deep_unpack())
|
if ('Realms' in properties.deep_unpack())
|
||||||
this._reloadRealms();
|
this._reloadRealms();
|
||||||
@ -106,7 +106,7 @@ const Manager = new Lang.Class({
|
|||||||
realm.connect('g-properties-changed',
|
realm.connect('g-properties-changed',
|
||||||
Lang.bind(this, function(proxy, properties) {
|
Lang.bind(this, function(proxy, properties) {
|
||||||
if ('Configured' in properties.deep_unpack())
|
if ('Configured' in properties.deep_unpack())
|
||||||
this._reloadRealm();
|
this._reloadRealm(realm);
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -134,6 +134,18 @@ const Manager = new Lang.Class({
|
|||||||
this._updateLoginFormat();
|
this._updateLoginFormat();
|
||||||
|
|
||||||
return this._loginFormat;
|
return this._loginFormat;
|
||||||
|
},
|
||||||
|
|
||||||
|
release: function() {
|
||||||
|
Service(Gio.DBus.system,
|
||||||
|
'org.freedesktop.realmd',
|
||||||
|
'/org/freedesktop/realmd',
|
||||||
|
function(service) {
|
||||||
|
service.ReleaseRemote();
|
||||||
|
});
|
||||||
|
this._aggregateProvider.disconnect(this._signalId);
|
||||||
|
this._realms = { };
|
||||||
|
this._updateLoginFormat();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(Manager.prototype)
|
Signals.addSignalMethods(Manager.prototype)
|
||||||
|
140
js/gdm/util.js
140
js/gdm/util.js
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
const Batch = imports.gdm.batch;
|
const Batch = imports.gdm.batch;
|
||||||
const Fprint = imports.gdm.fingerprint;
|
const Fprint = imports.gdm.fingerprint;
|
||||||
const Realmd = imports.gdm.realmd;
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
@ -27,6 +27,9 @@ const ALLOWED_FAILURES_KEY = 'allowed-failures';
|
|||||||
const LOGO_KEY = 'logo';
|
const LOGO_KEY = 'logo';
|
||||||
const DISABLE_USER_LIST_KEY = 'disable-user-list';
|
const DISABLE_USER_LIST_KEY = 'disable-user-list';
|
||||||
|
|
||||||
|
// Give user 16ms to read each character of a PAM message
|
||||||
|
const USER_READ_TIME = 16
|
||||||
|
|
||||||
function fadeInActor(actor) {
|
function fadeInActor(actor) {
|
||||||
if (actor.opacity == 255 && actor.visible)
|
if (actor.opacity == 255 && actor.visible)
|
||||||
return null;
|
return null;
|
||||||
@ -113,7 +116,9 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
this._settings = new Gio.Settings({ schema: LOGIN_SCREEN_SCHEMA });
|
this._settings = new Gio.Settings({ schema: LOGIN_SCREEN_SCHEMA });
|
||||||
|
|
||||||
this._fprintManager = new Fprint.FprintManager();
|
this._fprintManager = new Fprint.FprintManager();
|
||||||
this._realmManager = new Realmd.Manager();
|
this._messageQueue = [];
|
||||||
|
this._messageQueueTimeoutId = 0;
|
||||||
|
this.hasPendingMessages = false;
|
||||||
|
|
||||||
this._failCounter = 0;
|
this._failCounter = 0;
|
||||||
},
|
},
|
||||||
@ -153,13 +158,73 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
this._userVerifier.run_dispose();
|
this._userVerifier.run_dispose();
|
||||||
this._userVerifier = null;
|
this._userVerifier = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._clearMessageQueue();
|
||||||
},
|
},
|
||||||
|
|
||||||
answerQuery: function(serviceName, answer) {
|
answerQuery: function(serviceName, answer) {
|
||||||
// Clear any previous message
|
if (!this._userVerifier.hasPendingMessages) {
|
||||||
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);
|
||||||
|
} else {
|
||||||
|
let signalId = this._userVerifier.connect('no-more-messages',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this._userVerifier.disconnect(signalId);
|
||||||
|
this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_getIntervalForMessage: function(message) {
|
||||||
|
// We probably could be smarter here
|
||||||
|
return message.length * USER_READ_TIME;
|
||||||
|
},
|
||||||
|
|
||||||
|
finishMessageQueue: function() {
|
||||||
|
if (!this.hasPendingMessages)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._messageQueue = [];
|
||||||
|
|
||||||
|
this.hasPendingMessages = false;
|
||||||
|
this.emit('no-more-messages');
|
||||||
|
},
|
||||||
|
|
||||||
|
_queueMessageTimeout: function() {
|
||||||
|
if (this._messageQueue.length == 0) {
|
||||||
|
this.finishMessageQueue();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._messageQueueTimeoutId != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let message = this._messageQueue.shift();
|
||||||
|
this.emit('show-message', message.text, message.iconName);
|
||||||
|
|
||||||
|
this._messageQueueTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
||||||
|
message.interval,
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this._messageQueueTimeoutId = 0;
|
||||||
|
this._queueMessageTimeout();
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
_queueMessage: function(message, iconName) {
|
||||||
|
let interval = this._getIntervalForMessage(message);
|
||||||
|
|
||||||
|
this.hasPendingMessages = true;
|
||||||
|
this._messageQueue.push({ text: message, interval: interval, iconName: iconName });
|
||||||
|
this._queueMessageTimeout();
|
||||||
|
},
|
||||||
|
|
||||||
|
_clearMessageQueue: function() {
|
||||||
|
this.finishMessageQueue();
|
||||||
|
|
||||||
|
if (this._messageQueueTimeoutId != 0) {
|
||||||
|
GLib.source_remove(this._messageQueueTimeoutId);
|
||||||
|
this._messageQueueTimeoutId = 0;
|
||||||
|
}
|
||||||
|
this.emit('show-message', null, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
_checkForFingerprintReader: function() {
|
_checkForFingerprintReader: function() {
|
||||||
@ -179,7 +244,7 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
logError(error, where);
|
logError(error, where);
|
||||||
this._hold.release();
|
this._hold.release();
|
||||||
|
|
||||||
this.emit('show-message', _("Authentication error"), 'login-dialog-message-warning');
|
this._queueMessage(_("Authentication error"), 'login-dialog-message-warning');
|
||||||
this._verificationFailed(false);
|
this._verificationFailed(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -298,7 +363,7 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
// to indicate the user can swipe their finger instead
|
// to indicate the user can swipe their finger instead
|
||||||
this.emit('show-login-hint', _("(or swipe finger)"));
|
this.emit('show-login-hint', _("(or swipe finger)"));
|
||||||
} else if (serviceName == PASSWORD_SERVICE_NAME) {
|
} else if (serviceName == PASSWORD_SERVICE_NAME) {
|
||||||
this.emit('show-message', info, 'login-dialog-message-info');
|
this._queueMessage(info, 'login-dialog-message-info');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -307,22 +372,7 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
// users who haven't enrolled their fingerprint.
|
// users who haven't enrolled their fingerprint.
|
||||||
if (serviceName != PASSWORD_SERVICE_NAME)
|
if (serviceName != PASSWORD_SERVICE_NAME)
|
||||||
return;
|
return;
|
||||||
this.emit('show-message', problem, 'login-dialog-message-warning');
|
this._queueMessage(problem, 'login-dialog-message-warning');
|
||||||
},
|
|
||||||
|
|
||||||
_showRealmLoginHint: function() {
|
|
||||||
if (this._realmManager.loginFormat) {
|
|
||||||
let hint = this._realmManager.loginFormat;
|
|
||||||
|
|
||||||
hint = hint.replace(/%U/g, 'user');
|
|
||||||
hint = hint.replace(/%D/g, 'DOMAIN');
|
|
||||||
hint = hint.replace(/%[^UD]/g, '');
|
|
||||||
|
|
||||||
// Translators: this message is shown below the username entry field
|
|
||||||
// to clue the user in on how to login to the local network realm
|
|
||||||
this.emit('show-login-hint',
|
|
||||||
_("(e.g., user or %s)").format(hint));
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onInfoQuery: function(client, serviceName, question) {
|
_onInfoQuery: function(client, serviceName, question) {
|
||||||
@ -330,10 +380,6 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
if (serviceName != PASSWORD_SERVICE_NAME)
|
if (serviceName != PASSWORD_SERVICE_NAME)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._showRealmLoginHint();
|
|
||||||
this._realmLoginHintSignalId = this._realmManager.connect('login-format-changed',
|
|
||||||
Lang.bind(this, this._showRealmLoginHint));
|
|
||||||
|
|
||||||
this.emit('ask-question', serviceName, question, '');
|
this.emit('ask-question', serviceName, question, '');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -346,8 +392,6 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onReset: function() {
|
_onReset: function() {
|
||||||
this.clear();
|
|
||||||
|
|
||||||
// Clear previous attempts to authenticate
|
// Clear previous attempts to authenticate
|
||||||
this._failCounter = 0;
|
this._failCounter = 0;
|
||||||
|
|
||||||
@ -358,6 +402,15 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
this.emit('verification-complete');
|
this.emit('verification-complete');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_cancelAndReset: function() {
|
||||||
|
this.cancel();
|
||||||
|
this._onReset();
|
||||||
|
},
|
||||||
|
|
||||||
|
_retry: function() {
|
||||||
|
this.begin(this._userName, new Batch.Hold());
|
||||||
|
},
|
||||||
|
|
||||||
_verificationFailed: function(retry) {
|
_verificationFailed: function(retry) {
|
||||||
// For Not Listed / enterprise logins, immediately reset
|
// For Not Listed / enterprise logins, immediately reset
|
||||||
// the dialog
|
// the dialog
|
||||||
@ -369,16 +422,26 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
|
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
|
||||||
|
|
||||||
if (canRetry) {
|
if (canRetry) {
|
||||||
this.clear();
|
if (!this._userVerifier.hasPendingMessages) {
|
||||||
this.begin(this._userName, new Batch.Hold());
|
this._retry();
|
||||||
} else {
|
} else {
|
||||||
// Allow some time to see the message, then reset everything
|
let signalId = this._userVerifier.connect('no-more-messages',
|
||||||
Mainloop.timeout_add(3000, Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this.cancel();
|
this._userVerifier.disconnect(signalId);
|
||||||
|
this._retry();
|
||||||
this._onReset();
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (!this._userVerifier.hasPendingMessages) {
|
||||||
|
this._cancelAndReset();
|
||||||
|
} else {
|
||||||
|
let signalId = this._userVerifier.connect('no-more-messages',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this._userVerifier.disconnect(signalId);
|
||||||
|
this._cancelAndReset();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.emit('verification-failed');
|
this.emit('verification-failed');
|
||||||
},
|
},
|
||||||
@ -392,11 +455,6 @@ const ShellUserVerifier = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.emit('hide-login-hint');
|
this.emit('hide-login-hint');
|
||||||
|
|
||||||
if (this._realmLoginHintSignalId) {
|
|
||||||
this._realmManager.disconnect(this._realmLoginHintSignalId);
|
|
||||||
this._realmLoginHintSignalId = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ShellUserVerifier.prototype);
|
Signals.addSignalMethods(ShellUserVerifier.prototype);
|
||||||
|
@ -58,6 +58,7 @@ const Map = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(iterable) {
|
_init: function(iterable) {
|
||||||
this._pool = { };
|
this._pool = { };
|
||||||
|
this._size = 0;
|
||||||
|
|
||||||
if (iterable) {
|
if (iterable) {
|
||||||
for (let i = 0; i < iterable.length; i++) {
|
for (let i = 0; i < iterable.length; i++) {
|
||||||
@ -99,6 +100,7 @@ const Map = new Lang.Class({
|
|||||||
node.value = value;
|
node.value = value;
|
||||||
} else {
|
} else {
|
||||||
this._pool[hash] = { key: key, value: value };
|
this._pool[hash] = { key: key, value: value };
|
||||||
|
this._size++;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -108,6 +110,7 @@ const Map = new Lang.Class({
|
|||||||
|
|
||||||
if (node && _sameValue(node.key, key)) {
|
if (node && _sameValue(node.key, key)) {
|
||||||
delete this._pool[hash];
|
delete this._pool[hash];
|
||||||
|
this._size--;
|
||||||
return [node.key, node.value];
|
return [node.key, node.value];
|
||||||
} else {
|
} else {
|
||||||
return [null, null];
|
return [null, null];
|
||||||
@ -136,6 +139,6 @@ const Map = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
size: function() {
|
size: function() {
|
||||||
return Object.getOwnPropertyNames(this._pool).length;
|
return this._size;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -33,6 +33,10 @@ const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager
|
|||||||
<arg type='s' direction='in'/>
|
<arg type='s' direction='in'/>
|
||||||
<arg type='h' direction='out'/>
|
<arg type='h' direction='out'/>
|
||||||
</method>
|
</method>
|
||||||
|
<method name='GetSession'>
|
||||||
|
<arg type='s' direction='in'/>
|
||||||
|
<arg type='o' direction='out'/>
|
||||||
|
</method>
|
||||||
<method name='ListSessions'>
|
<method name='ListSessions'>
|
||||||
<arg name='sessions' type='a(susso)' direction='out'/>
|
<arg name='sessions' type='a(susso)' direction='out'/>
|
||||||
</method>
|
</method>
|
||||||
@ -72,7 +76,36 @@ const ConsoleKitSession = Gio.DBusProxy.makeProxyWrapper(ConsoleKitSessionIface)
|
|||||||
const ConsoleKitManager = Gio.DBusProxy.makeProxyWrapper(ConsoleKitManagerIface);
|
const ConsoleKitManager = Gio.DBusProxy.makeProxyWrapper(ConsoleKitManagerIface);
|
||||||
|
|
||||||
function haveSystemd() {
|
function haveSystemd() {
|
||||||
return GLib.access("/sys/fs/cgroup/systemd", 0) >= 0;
|
return GLib.access("/run/systemd/seats", 0) >= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function versionCompare(required, reference) {
|
||||||
|
required = required.split('.');
|
||||||
|
reference = reference.split('.');
|
||||||
|
|
||||||
|
for (let i = 0; i < required.length; i++) {
|
||||||
|
if (required[i] != reference[i])
|
||||||
|
return required[i] < reference[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function canLock() {
|
||||||
|
try {
|
||||||
|
let params = GLib.Variant.new('(ss)', ['org.gnome.DisplayManager.Manager', 'Version']);
|
||||||
|
let result = Gio.DBus.system.call_sync('org.gnome.DisplayManager',
|
||||||
|
'/org/gnome/DisplayManager/Manager',
|
||||||
|
'org.freedesktop.DBus.Properties',
|
||||||
|
'Get', params, null,
|
||||||
|
Gio.DBusCallFlags.NONE,
|
||||||
|
-1, null);
|
||||||
|
|
||||||
|
let version = result.deep_unpack()[0].deep_unpack();
|
||||||
|
return versionCompare('3.5.91', version);
|
||||||
|
} catch(e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let _loginManager = null;
|
let _loginManager = null;
|
||||||
@ -107,15 +140,23 @@ const LoginManagerSystemd = new Lang.Class({
|
|||||||
// 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
|
||||||
// session objects have different interfaces - but in both cases there are
|
// session objects have different interfaces - but in both cases there are
|
||||||
// Lock/Unlock signals, and that's all we count upon at the moment.
|
// Lock/Unlock signals, and that's all we count upon at the moment.
|
||||||
getCurrentSessionProxy: function() {
|
getCurrentSessionProxy: function(callback) {
|
||||||
if (!this._currentSession) {
|
if (this._currentSession) {
|
||||||
this._currentSession = new SystemdLoginSession(Gio.DBus.system,
|
callback (this._currentSession);
|
||||||
'org.freedesktop.login1',
|
return;
|
||||||
'/org/freedesktop/login1/session/' +
|
|
||||||
GLib.getenv('XDG_SESSION_ID'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._currentSession;
|
this._proxy.GetSessionRemote(GLib.getenv('XDG_SESSION_ID'), Lang.bind(this,
|
||||||
|
function(result, error) {
|
||||||
|
if (error) {
|
||||||
|
logError(error, 'Could not get a proxy for the current session');
|
||||||
|
} else {
|
||||||
|
this._currentSession = new SystemdLoginSession(Gio.DBus.system,
|
||||||
|
'org.freedesktop.login1',
|
||||||
|
result[0]);
|
||||||
|
callback(this._currentSession);
|
||||||
|
}
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
canPowerOff: function(asyncCallback) {
|
canPowerOff: function(asyncCallback) {
|
||||||
@ -204,15 +245,23 @@ const LoginManagerConsoleKit = new Lang.Class({
|
|||||||
// 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
|
||||||
// session objects have different interfaces - but in both cases there are
|
// session objects have different interfaces - but in both cases there are
|
||||||
// Lock/Unlock signals, and that's all we count upon at the moment.
|
// Lock/Unlock signals, and that's all we count upon at the moment.
|
||||||
getCurrentSessionProxy: function() {
|
getCurrentSessionProxy: function(callback) {
|
||||||
if (!this._currentSession) {
|
if (this._currentSession) {
|
||||||
let [currentSessionId] = this._proxy.GetCurrentSessionSync();
|
callback (this._currentSession);
|
||||||
this._currentSession = new ConsoleKitSession(Gio.DBus.system,
|
return;
|
||||||
'org.freedesktop.ConsoleKit',
|
|
||||||
currentSessionId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._currentSession;
|
this._proxy.GetCurrentSessionRemote(Lang.bind(this,
|
||||||
|
function(result, error) {
|
||||||
|
if (error) {
|
||||||
|
logError(error, 'Could not get a proxy for the current session');
|
||||||
|
} else {
|
||||||
|
this._currentSession = new ConsoleKitSession(Gio.DBus.system,
|
||||||
|
'org.freedesktop.ConsoleKit',
|
||||||
|
result[0]);
|
||||||
|
callback(this._currentSession);
|
||||||
|
}
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
canPowerOff: function(asyncCallback) {
|
canPowerOff: function(asyncCallback) {
|
||||||
|
@ -5,6 +5,9 @@ const GLib = imports.gi.GLib;
|
|||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
|
const SCROLL_TIME = 0.1;
|
||||||
|
|
||||||
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||||
const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)';
|
const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)';
|
||||||
@ -15,7 +18,7 @@ const _urlRegexp = new RegExp(
|
|||||||
'(^|' + _leadingJunk + ')' +
|
'(^|' + _leadingJunk + ')' +
|
||||||
'(' +
|
'(' +
|
||||||
'(?:' +
|
'(?:' +
|
||||||
'[a-z][\\w-]+://' + // scheme://
|
'(?:http|https|ftp)://' + // scheme://
|
||||||
'|' +
|
'|' +
|
||||||
'www\\d{0,3}[.]' + // www.
|
'www\\d{0,3}[.]' + // www.
|
||||||
'|' +
|
'|' +
|
||||||
@ -234,3 +237,39 @@ function makeCloseButton() {
|
|||||||
|
|
||||||
return closeButton;
|
return closeButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ensureActorVisibleInScrollView(scrollView, actor) {
|
||||||
|
let adjustment = scrollView.vscroll.adjustment;
|
||||||
|
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
|
||||||
|
|
||||||
|
let offset = 0;
|
||||||
|
let vfade = scrollView.get_effect("fade");
|
||||||
|
if (vfade)
|
||||||
|
offset = vfade.vfade_offset;
|
||||||
|
|
||||||
|
let box = actor.get_allocation_box();
|
||||||
|
let y1 = box.y1, y2 = box.y2;
|
||||||
|
|
||||||
|
let parent = actor.get_parent();
|
||||||
|
while (parent != scrollView) {
|
||||||
|
if (!parent)
|
||||||
|
throw new Error("actor not in scroll view");
|
||||||
|
|
||||||
|
let box = parent.get_allocation_box();
|
||||||
|
y1 += box.y1;
|
||||||
|
y2 += box.y1;
|
||||||
|
parent = parent.get_parent();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (y1 < value + offset)
|
||||||
|
value = Math.max(0, y1 - offset);
|
||||||
|
else if (y2 > value + pageSize - offset)
|
||||||
|
value = Math.min(upper, y2 + offset - pageSize);
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
Tweener.addTween(adjustment,
|
||||||
|
{ value: value,
|
||||||
|
time: SCROLL_TIME,
|
||||||
|
transition: 'easeOutQuad' });
|
||||||
|
}
|
||||||
|
@ -232,11 +232,13 @@ const AppSwitcherPopup = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_finish : function(timestamp) {
|
_finish : function(timestamp) {
|
||||||
this.parent();
|
|
||||||
|
|
||||||
let appIcon = this._items[this._selectedIndex];
|
let appIcon = this._items[this._selectedIndex];
|
||||||
let window = this._currentWindow > 0 ? this._currentWindow : 0;
|
if (this._currentWindow < 0)
|
||||||
appIcon.app.activate_window(appIcon.cachedWindows[window], timestamp);
|
appIcon.app.activate_window(appIcon.cachedWindows[0], timestamp);
|
||||||
|
else
|
||||||
|
Main.activateWindow(appIcon.cachedWindows[this._currentWindow], timestamp);
|
||||||
|
|
||||||
|
this.parent();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDestroy : function() {
|
_onDestroy : function() {
|
||||||
@ -395,9 +397,9 @@ const WindowSwitcherPopup = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_finish: function() {
|
_finish: function() {
|
||||||
this.parent();
|
|
||||||
|
|
||||||
Main.activateWindow(this._items[this._selectedIndex].window);
|
Main.activateWindow(this._items[this._selectedIndex].window);
|
||||||
|
|
||||||
|
this.parent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ const Util = imports.misc.util;
|
|||||||
|
|
||||||
const MAX_APPLICATION_WORK_MILLIS = 75;
|
const MAX_APPLICATION_WORK_MILLIS = 75;
|
||||||
const MENU_POPUP_TIMEOUT = 600;
|
const MENU_POPUP_TIMEOUT = 600;
|
||||||
const SCROLL_TIME = 0.1;
|
|
||||||
const MAX_COLUMNS = 6;
|
const MAX_COLUMNS = 6;
|
||||||
|
|
||||||
const INACTIVE_GRID_OPACITY = 77;
|
const INACTIVE_GRID_OPACITY = 77;
|
||||||
@ -157,6 +156,30 @@ const FolderView = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const AllViewLayout = new Lang.Class({
|
||||||
|
Name: 'AllViewLayout',
|
||||||
|
Extends: Clutter.BinLayout,
|
||||||
|
|
||||||
|
vfunc_get_preferred_height: function(container, forWidth) {
|
||||||
|
let minBottom = 0;
|
||||||
|
let naturalBottom = 0;
|
||||||
|
|
||||||
|
for (let child = container.get_first_child();
|
||||||
|
child;
|
||||||
|
child = child.get_next_sibling()) {
|
||||||
|
let childY = child.y;
|
||||||
|
let [childMin, childNatural] = child.get_preferred_height(forWidth);
|
||||||
|
|
||||||
|
if (childMin + childY > minBottom)
|
||||||
|
minBottom = childMin + childY;
|
||||||
|
|
||||||
|
if (childNatural + childY > naturalBottom)
|
||||||
|
naturalBottom = childNatural + childY;
|
||||||
|
}
|
||||||
|
return [minBottom, naturalBottom];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const AllView = new Lang.Class({
|
const AllView = new Lang.Class({
|
||||||
Name: 'AllView',
|
Name: 'AllView',
|
||||||
Extends: AlphabeticalView,
|
Extends: AlphabeticalView,
|
||||||
@ -164,8 +187,11 @@ const AllView = new Lang.Class({
|
|||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent();
|
this.parent();
|
||||||
|
|
||||||
|
this._grid.actor.y_align = Clutter.ActorAlign.START;
|
||||||
|
this._grid.actor.y_expand = true;
|
||||||
|
|
||||||
let box = new St.BoxLayout({ vertical: true });
|
let box = new St.BoxLayout({ vertical: true });
|
||||||
this._stack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this._stack = new St.Widget({ layout_manager: new AllViewLayout() });
|
||||||
this._stack.add_actor(this._grid.actor);
|
this._stack.add_actor(this._grid.actor);
|
||||||
this._eventBlocker = new St.Widget({ x_expand: true, y_expand: true });
|
this._eventBlocker = new St.Widget({ x_expand: true, y_expand: true });
|
||||||
this._stack.add_actor(this._eventBlocker);
|
this._stack.add_actor(this._eventBlocker);
|
||||||
@ -253,35 +279,17 @@ const AllView = new Lang.Class({
|
|||||||
this._eventBlocker.reactive = isOpen;
|
this._eventBlocker.reactive = isOpen;
|
||||||
this._currentPopup = isOpen ? popup : null;
|
this._currentPopup = isOpen ? popup : null;
|
||||||
this._updateIconOpacities(isOpen);
|
this._updateIconOpacities(isOpen);
|
||||||
if (isOpen)
|
if (isOpen) {
|
||||||
this._ensureIconVisible(popup.actor);
|
this._ensureIconVisible(popup.actor);
|
||||||
|
this._grid.actor.y = popup.parentOffset;
|
||||||
|
} else {
|
||||||
|
this._grid.actor.y = 0;
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_ensureIconVisible: function(icon) {
|
_ensureIconVisible: function(icon) {
|
||||||
let adjustment = this.actor.vscroll.adjustment;
|
Util.ensureActorVisibleInScrollView(this.actor, icon);
|
||||||
let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
|
|
||||||
|
|
||||||
let offset = 0;
|
|
||||||
let vfade = this.actor.get_effect("fade");
|
|
||||||
if (vfade)
|
|
||||||
offset = vfade.vfade_offset;
|
|
||||||
|
|
||||||
// If this gets called as part of a right-click, the actor
|
|
||||||
// will be needs_allocation, and so "icon.y" would return 0
|
|
||||||
let box = icon.get_allocation_box();
|
|
||||||
|
|
||||||
if (box.y1 < value + offset)
|
|
||||||
value = Math.max(0, box.y1 - offset);
|
|
||||||
else if (box.y2 > value + pageSize - offset)
|
|
||||||
value = Math.min(upper, box.y2 + offset - pageSize);
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
|
|
||||||
Tweener.addTween(adjustment,
|
|
||||||
{ value: value,
|
|
||||||
time: SCROLL_TIME,
|
|
||||||
transition: 'easeOutQuad' });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateIconOpacities: function(folderOpen) {
|
_updateIconOpacities: function(folderOpen) {
|
||||||
@ -315,6 +323,8 @@ const FrequentView = new Lang.Class({
|
|||||||
loadApps: function() {
|
loadApps: function() {
|
||||||
let mostUsed = this._usage.get_most_used ("");
|
let mostUsed = this._usage.get_most_used ("");
|
||||||
for (let i = 0; i < mostUsed.length; i++) {
|
for (let i = 0; i < mostUsed.length; i++) {
|
||||||
|
if (!mostUsed[i].get_app_info().should_show())
|
||||||
|
continue;
|
||||||
let appIcon = new AppIcon(mostUsed[i]);
|
let appIcon = new AppIcon(mostUsed[i]);
|
||||||
this._grid.addItem(appIcon.actor, -1);
|
this._grid.addItem(appIcon.actor, -1);
|
||||||
}
|
}
|
||||||
@ -340,6 +350,9 @@ const AppDisplay = new Lang.Class({
|
|||||||
global.settings.connect('changed::app-folder-categories', Lang.bind(this, function() {
|
global.settings.connect('changed::app-folder-categories', Lang.bind(this, function() {
|
||||||
Main.queueDeferredWork(this._allAppsWorkId);
|
Main.queueDeferredWork(this._allAppsWorkId);
|
||||||
}));
|
}));
|
||||||
|
this._privacySettings = new Gio.Settings({ schema: 'org.gnome.desktop.privacy' });
|
||||||
|
this._privacySettings.connect('changed::remember-app-usage',
|
||||||
|
Lang.bind(this, this._updateFrequentVisibility));
|
||||||
|
|
||||||
this._views = [];
|
this._views = [];
|
||||||
|
|
||||||
@ -383,6 +396,7 @@ const AppDisplay = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
this._showView(Views.FREQUENT);
|
this._showView(Views.FREQUENT);
|
||||||
|
this._updateFrequentVisibility();
|
||||||
|
|
||||||
// We need a dummy actor to catch the keyboard focus if the
|
// We need a dummy actor to catch the keyboard focus if the
|
||||||
// user Ctrl-Alt-Tabs here before the deferred work creates
|
// user Ctrl-Alt-Tabs here before the deferred work creates
|
||||||
@ -412,6 +426,19 @@ const AppDisplay = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updateFrequentVisibility: function() {
|
||||||
|
let enabled = this._privacySettings.get_boolean('remember-app-usage');
|
||||||
|
this._views[Views.FREQUENT].control.visible = enabled;
|
||||||
|
|
||||||
|
let visibleViews = this._views.filter(function(v) {
|
||||||
|
return v.control.visible;
|
||||||
|
});
|
||||||
|
this._controls.visible = visibleViews.length > 1;
|
||||||
|
|
||||||
|
if (!enabled && this._views[Views.FREQUENT].view.actor.visible)
|
||||||
|
this._showView(Views.ALL);
|
||||||
|
},
|
||||||
|
|
||||||
_redisplay: function() {
|
_redisplay: function() {
|
||||||
this._redisplayFrequentApps();
|
this._redisplayFrequentApps();
|
||||||
this._redisplayAllApps();
|
this._redisplayAllApps();
|
||||||
@ -571,7 +598,11 @@ const FolderIcon = new Lang.Class({
|
|||||||
// Position the popup above or below the source icon
|
// Position the popup above or below the source icon
|
||||||
if (side == St.Side.BOTTOM) {
|
if (side == St.Side.BOTTOM) {
|
||||||
this._popup.actor.show();
|
this._popup.actor.show();
|
||||||
this._popup.actor.y = this.actor.y - this._popup.actor.height;
|
let closeButtonOffset = -this._popup.closeButton.translation_y;
|
||||||
|
let y = this.actor.y - this._popup.actor.height;
|
||||||
|
let yWithButton = y - closeButtonOffset;
|
||||||
|
this._popup.parentOffset = yWithButton < 0 ? -yWithButton : 0;
|
||||||
|
this._popup.actor.y = Math.max(y, closeButtonOffset);
|
||||||
this._popup.actor.hide();
|
this._popup.actor.hide();
|
||||||
} else {
|
} else {
|
||||||
this._popup.actor.y = this.actor.y + this.actor.height;
|
this._popup.actor.y = this.actor.y + this.actor.height;
|
||||||
@ -594,6 +625,7 @@ const AppFolderPopup = new Lang.Class({
|
|||||||
this._arrowSide = side;
|
this._arrowSide = side;
|
||||||
|
|
||||||
this._isOpen = false;
|
this._isOpen = false;
|
||||||
|
this.parentOffset = 0;
|
||||||
|
|
||||||
this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
||||||
visible: false,
|
visible: false,
|
||||||
@ -617,17 +649,31 @@ const AppFolderPopup = new Lang.Class({
|
|||||||
this.actor.add_actor(this._boxPointer.actor);
|
this.actor.add_actor(this._boxPointer.actor);
|
||||||
this._boxPointer.bin.set_child(this._view.actor);
|
this._boxPointer.bin.set_child(this._view.actor);
|
||||||
|
|
||||||
let closeButton = Util.makeCloseButton();
|
this.closeButton = Util.makeCloseButton();
|
||||||
closeButton.connect('clicked', Lang.bind(this, this.popdown));
|
this.closeButton.connect('clicked', Lang.bind(this, this.popdown));
|
||||||
this.actor.add_actor(closeButton);
|
this.actor.add_actor(this.closeButton);
|
||||||
|
|
||||||
this._boxPointer.actor.bind_property('opacity', closeButton, 'opacity',
|
this._boxPointer.actor.bind_property('opacity', this.closeButton, 'opacity',
|
||||||
GObject.BindingFlags.SYNC_CREATE);
|
GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
|
global.focus_manager.add_group(this.actor);
|
||||||
|
|
||||||
source.actor.connect('destroy', Lang.bind(this,
|
source.actor.connect('destroy', Lang.bind(this,
|
||||||
function() {
|
function() {
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
}));
|
}));
|
||||||
|
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
|
||||||
|
},
|
||||||
|
|
||||||
|
_onKeyPress: function(actor, event) {
|
||||||
|
if (!this._isOpen)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (event.get_key_symbol() != Clutter.KEY_Escape)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
this.popdown();
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
@ -642,6 +688,7 @@ const AppFolderPopup = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
|
this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||||
|
|
||||||
this._boxPointer.setArrowActor(this._source.actor);
|
this._boxPointer.setArrowActor(this._source.actor);
|
||||||
this._boxPointer.show(BoxPointer.PopupAnimation.FADE |
|
this._boxPointer.show(BoxPointer.PopupAnimation.FADE |
|
||||||
|
@ -38,6 +38,7 @@ const BackgroundCache = new Lang.Class({
|
|||||||
_init: function() {
|
_init: function() {
|
||||||
this._patterns = [];
|
this._patterns = [];
|
||||||
this._images = [];
|
this._images = [];
|
||||||
|
this._pendingFileLoads = [];
|
||||||
this._fileMonitors = {};
|
this._fileMonitors = {};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -84,9 +85,9 @@ const BackgroundCache = new Lang.Class({
|
|||||||
} else {
|
} else {
|
||||||
content.load_gradient(params.shadingType, params.color, params.secondColor);
|
content.load_gradient(params.shadingType, params.color, params.secondColor);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this._patterns.push(content);
|
this._patterns.push(content);
|
||||||
}
|
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
},
|
},
|
||||||
@ -125,9 +126,81 @@ const BackgroundCache = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
removeImageContent: function(content) {
|
removeImageContent: function(content) {
|
||||||
|
let filename = content.get_filename();
|
||||||
|
|
||||||
|
if (filename && this._fileMonitors[filename])
|
||||||
|
delete this._fileMonitors[filename];
|
||||||
|
|
||||||
this._removeContent(this._images, content);
|
this._removeContent(this._images, content);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_loadImageContent: function(params) {
|
||||||
|
params = Params.parse(params, { monitorIndex: 0,
|
||||||
|
style: null,
|
||||||
|
filename: null,
|
||||||
|
effects: Meta.BackgroundEffects.NONE,
|
||||||
|
cancellable: null,
|
||||||
|
onFinished: null });
|
||||||
|
|
||||||
|
for (let i = 0; i < this._pendingFileLoads.length; i++) {
|
||||||
|
if (this._pendingFileLoads[i].filename == params.filename &&
|
||||||
|
this._pendingFileLoads[i].style == params.style) {
|
||||||
|
this._pendingFileLoads[i].callers.push({ shouldCopy: true,
|
||||||
|
monitorIndex: params.monitorIndex,
|
||||||
|
effects: params.effects,
|
||||||
|
onFinished: params.onFinished });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this._pendingFileLoads.push({ filename: params.filename,
|
||||||
|
style: params.style,
|
||||||
|
callers: [{ shouldCopy: false,
|
||||||
|
monitorIndex: params.monitorIndex,
|
||||||
|
effects: params.effects,
|
||||||
|
onFinished: params.onFinished }] });
|
||||||
|
|
||||||
|
let content = new Meta.Background({ meta_screen: global.screen,
|
||||||
|
monitor: params.monitorIndex,
|
||||||
|
effects: params.effects });
|
||||||
|
|
||||||
|
content.load_file_async(params.filename,
|
||||||
|
params.style,
|
||||||
|
params.cancellable,
|
||||||
|
Lang.bind(this,
|
||||||
|
function(object, result) {
|
||||||
|
try {
|
||||||
|
content.load_file_finish(result);
|
||||||
|
|
||||||
|
this._monitorFile(params.filename);
|
||||||
|
this._images.push(content);
|
||||||
|
} catch(e) {
|
||||||
|
content = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < this._pendingFileLoads.length; i++) {
|
||||||
|
let pendingLoad = this._pendingFileLoads[i];
|
||||||
|
if (pendingLoad.filename != params.filename ||
|
||||||
|
pendingLoad.style != params.style)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (let j = 0; j < pendingLoad.callers.length; j++) {
|
||||||
|
if (pendingLoad.callers[j].onFinished) {
|
||||||
|
if (content && pendingLoad.callers[j].shouldCopy) {
|
||||||
|
content = object.copy(pendingLoad.callers[j].monitorIndex,
|
||||||
|
pendingLoad.callers[j].effects);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pendingLoad.callers[j].onFinished(content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this._pendingFileLoads.splice(i, 1);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
getImageContent: function(params) {
|
getImageContent: function(params) {
|
||||||
params = Params.parse(params, { monitorIndex: 0,
|
params = Params.parse(params, { monitorIndex: 0,
|
||||||
style: null,
|
style: null,
|
||||||
@ -165,31 +238,19 @@ const BackgroundCache = new Lang.Class({
|
|||||||
|
|
||||||
if (params.cancellable && params.cancellable.is_cancelled())
|
if (params.cancellable && params.cancellable.is_cancelled())
|
||||||
content = null;
|
content = null;
|
||||||
|
else
|
||||||
|
this._images.push(content);
|
||||||
|
|
||||||
if (params.onFinished)
|
if (params.onFinished)
|
||||||
params.onFinished(content);
|
params.onFinished(content);
|
||||||
} else {
|
} else {
|
||||||
content = new Meta.Background({ meta_screen: global.screen,
|
this._loadImageContent({ filename: params.filename,
|
||||||
monitor: params.monitorIndex,
|
style: params.style,
|
||||||
effects: params.effects });
|
effects: params.effects,
|
||||||
|
monitorIndex: params.monitorIndex,
|
||||||
|
cancellable: params.cancellable,
|
||||||
|
onFinished: params.onFinished });
|
||||||
|
|
||||||
content.load_file_async(params.filename,
|
|
||||||
params.style,
|
|
||||||
params.cancellable,
|
|
||||||
Lang.bind(this,
|
|
||||||
function(object, result) {
|
|
||||||
try {
|
|
||||||
content.load_file_finish(result);
|
|
||||||
|
|
||||||
this._monitorFile(params.filename);
|
|
||||||
this._images.push(content);
|
|
||||||
} catch(e) {
|
|
||||||
content = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.onFinished)
|
|
||||||
params.onFinished(content);
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -267,9 +328,9 @@ const Background = new Lang.Class({
|
|||||||
_destroy: function() {
|
_destroy: function() {
|
||||||
this._cancellable.cancel();
|
this._cancellable.cancel();
|
||||||
|
|
||||||
if (this._animationUpdateTimeoutId) {
|
if (this._updateAnimationTimeoutId) {
|
||||||
GLib.source_remove (this._animationUpdateTimeoutId);
|
GLib.source_remove (this._updateAnimationTimeoutId);
|
||||||
this._animationUpdateTimeoutId = 0
|
this._updateAnimationTimeoutId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
let i;
|
let i;
|
||||||
@ -356,7 +417,10 @@ const Background = new Lang.Class({
|
|||||||
|
|
||||||
let actor = new Meta.BackgroundActor();
|
let actor = new Meta.BackgroundActor();
|
||||||
actor.content = content;
|
actor.content = content;
|
||||||
this.actor.add_child(actor);
|
|
||||||
|
// The background pattern is the first actor in
|
||||||
|
// the group, and all images should be above that.
|
||||||
|
this.actor.insert_child_at_index(actor, index + 1);
|
||||||
|
|
||||||
this._images[index] = actor;
|
this._images[index] = actor;
|
||||||
this._watchCacheFile(filename);
|
this._watchCacheFile(filename);
|
||||||
@ -367,27 +431,27 @@ const Background = new Lang.Class({
|
|||||||
content.brightness = this._brightness;
|
content.brightness = this._brightness;
|
||||||
content.vignette_sharpness = this._vignetteSharpness;
|
content.vignette_sharpness = this._vignetteSharpness;
|
||||||
|
|
||||||
|
this._cache.removeImageContent(this._images[index].content);
|
||||||
this._images[index].content = content;
|
this._images[index].content = content;
|
||||||
this._watchCacheFile(filename);
|
this._watchCacheFile(filename);
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateAnimationProgress: function() {
|
_updateAnimationProgress: function() {
|
||||||
if (this._images[1]) {
|
if (this._images[1])
|
||||||
this._images[1].raise_top();
|
|
||||||
this._images[1].opacity = this._animation.transitionProgress * 255;
|
this._images[1].opacity = this._animation.transitionProgress * 255;
|
||||||
}
|
|
||||||
|
|
||||||
this._queueAnimationUpdate();
|
this._queueUpdateAnimation();
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateAnimation: function() {
|
_updateAnimation: function() {
|
||||||
this._animationUpdateTimeoutId = 0;
|
this._updateAnimationTimeoutId = 0;
|
||||||
|
|
||||||
let files = this._animation.getKeyFrameFiles(this._layoutManager.monitors[this._monitorIndex]);
|
this._animation.update(this._layoutManager.monitors[this._monitorIndex]);
|
||||||
|
let files = this._animation.keyFrameFiles;
|
||||||
|
|
||||||
if (!files) {
|
if (files.length == 0) {
|
||||||
this._setLoaded();
|
this._setLoaded();
|
||||||
this._queueAnimationUpdate();
|
this._queueUpdateAnimation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,7 +470,7 @@ const Background = new Lang.Class({
|
|||||||
style: this._style,
|
style: this._style,
|
||||||
filename: files[i],
|
filename: files[i],
|
||||||
cancellable: this._cancellable,
|
cancellable: this._cancellable,
|
||||||
onFinished: Lang.bind(this, function(content) {
|
onFinished: Lang.bind(this, function(content, i) {
|
||||||
numPendingImages--;
|
numPendingImages--;
|
||||||
|
|
||||||
if (!content) {
|
if (!content) {
|
||||||
@ -426,27 +490,34 @@ const Background = new Lang.Class({
|
|||||||
this._setLoaded();
|
this._setLoaded();
|
||||||
this._updateAnimationProgress();
|
this._updateAnimationProgress();
|
||||||
}
|
}
|
||||||
})
|
}, i)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_queueAnimationUpdate: function() {
|
_queueUpdateAnimation: function() {
|
||||||
if (this._animationUpdateTimeoutId != 0)
|
if (this._updateAnimationTimeoutId != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!this._cancellable || this._cancellable.is_cancelled())
|
if (!this._cancellable || this._cancellable.is_cancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!this._animation.duration)
|
if (!this._animation.transitionDuration)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
let nSteps = 255 / ANIMATION_OPACITY_STEP_INCREMENT;
|
||||||
|
let timePerStep = (this._animation.transitionDuration * 1000) / nSteps;
|
||||||
|
|
||||||
let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
|
let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
|
||||||
ANIMATION_OPACITY_STEP_INCREMENT / this._animation.duration);
|
timePerStep);
|
||||||
this._animationUpdateTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
|
||||||
|
if (interval > GLib.MAXUINT32)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._updateAnimationTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
||||||
interval,
|
interval,
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this._animationUpdateTimeoutId = 0;
|
this._updateAnimationTimeoutId = 0;
|
||||||
this._updateAnimation();
|
this._updateAnimation();
|
||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
@ -585,9 +656,9 @@ const Animation = new Lang.Class({
|
|||||||
params = Params.parse(params, { filename: null });
|
params = Params.parse(params, { filename: null });
|
||||||
|
|
||||||
this.filename = params.filename;
|
this.filename = params.filename;
|
||||||
this._keyFrames = [];
|
this.keyFrameFiles = [];
|
||||||
this.duration = 0.0;
|
|
||||||
this.transitionProgress = 0.0;
|
this.transitionProgress = 0.0;
|
||||||
|
this.transitionDuration = 0.0;
|
||||||
this.loaded = false;
|
this.loaded = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -599,33 +670,31 @@ const Animation = new Lang.Class({
|
|||||||
this._show.load_async(null,
|
this._show.load_async(null,
|
||||||
Lang.bind(this,
|
Lang.bind(this,
|
||||||
function(object, result) {
|
function(object, result) {
|
||||||
this.duration = this._show.get_total_duration();
|
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
if (callback)
|
if (callback)
|
||||||
callback();
|
callback();
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
getKeyFrameFiles: function(monitor) {
|
update: function(monitor) {
|
||||||
|
this.keyFrameFiles = [];
|
||||||
|
|
||||||
if (!this._show)
|
if (!this._show)
|
||||||
return null;
|
return;
|
||||||
|
|
||||||
if (this._show.get_num_slides() < 1)
|
if (this._show.get_num_slides() < 1)
|
||||||
return null;
|
return;
|
||||||
|
|
||||||
let [progress, duration, isFixed, file1, file2] = this._show.get_current_slide(monitor.width, monitor.height);
|
let [progress, duration, isFixed, file1, file2] = this._show.get_current_slide(monitor.width, monitor.height);
|
||||||
|
|
||||||
|
this.transitionDuration = duration;
|
||||||
this.transitionProgress = progress;
|
this.transitionProgress = progress;
|
||||||
|
|
||||||
let files = [];
|
|
||||||
|
|
||||||
if (file1)
|
if (file1)
|
||||||
files.push(file1);
|
this.keyFrameFiles.push(file1);
|
||||||
|
|
||||||
if (file2)
|
if (file2)
|
||||||
files.push(file2);
|
this.keyFrameFiles.push(file2);
|
||||||
|
|
||||||
return files;
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(Animation.prototype);
|
Signals.addSignalMethods(Animation.prototype);
|
||||||
@ -648,17 +717,9 @@ const BackgroundManager = new Lang.Class({
|
|||||||
|
|
||||||
this.background = this._createBackground();
|
this.background = this._createBackground();
|
||||||
this._newBackground = null;
|
this._newBackground = null;
|
||||||
this._loadedSignalId = 0;
|
|
||||||
this._changedSignalId = 0;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
if (this._loadedSignalId)
|
|
||||||
this._newBackground.disconnect(this._loadedSignalId);
|
|
||||||
|
|
||||||
if (this._changedSignalId)
|
|
||||||
this.background.disconnect(this._changedSignalId);
|
|
||||||
|
|
||||||
if (this._newBackground) {
|
if (this._newBackground) {
|
||||||
this._newBackground.actor.destroy();
|
this._newBackground.actor.destroy();
|
||||||
this._newBackground = null;
|
this._newBackground = null;
|
||||||
@ -677,22 +738,28 @@ const BackgroundManager = new Lang.Class({
|
|||||||
newBackground.saturation = background.saturation;
|
newBackground.saturation = background.saturation;
|
||||||
newBackground.visible = background.visible;
|
newBackground.visible = background.visible;
|
||||||
|
|
||||||
let signalId = newBackground.connect('loaded',
|
newBackground.loadedSignalId = newBackground.connect('loaded',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
newBackground.disconnect(signalId);
|
newBackground.disconnect(newBackground.loadedSignalId);
|
||||||
|
newBackground.loadedSignalId = 0;
|
||||||
Tweener.addTween(background.actor,
|
Tweener.addTween(background.actor,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: FADE_ANIMATION_TIME,
|
time: FADE_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: Lang.bind(this, function() {
|
onComplete: Lang.bind(this, function() {
|
||||||
|
if (this._newBackground == newBackground) {
|
||||||
this.background = newBackground;
|
this.background = newBackground;
|
||||||
this._newBackground = null;
|
this._newBackground = null;
|
||||||
|
} else {
|
||||||
|
newBackground.actor.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
background.actor.destroy();
|
background.actor.destroy();
|
||||||
|
|
||||||
this.emit('changed');
|
this.emit('changed');
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
this._loadedSignalId = signalId;
|
|
||||||
|
|
||||||
this._newBackground = newBackground;
|
this._newBackground = newBackground;
|
||||||
},
|
},
|
||||||
@ -711,12 +778,19 @@ const BackgroundManager = new Lang.Class({
|
|||||||
background.actor.lower_bottom();
|
background.actor.lower_bottom();
|
||||||
}
|
}
|
||||||
|
|
||||||
let signalId = background.connect('changed', Lang.bind(this, function() {
|
background.changeSignalId = background.connect('changed', Lang.bind(this, function() {
|
||||||
background.disconnect(signalId);
|
background.disconnect(background.changeSignalId);
|
||||||
|
background.changeSignalId = 0;
|
||||||
this._updateBackground(background, this._monitorIndex);
|
this._updateBackground(background, this._monitorIndex);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._changedSignalId = signalId;
|
background.actor.connect('destroy', Lang.bind(this, function() {
|
||||||
|
if (background.changeSignalId)
|
||||||
|
background.disconnect(background.changeSignalId);
|
||||||
|
|
||||||
|
if (background.loadedSignalId)
|
||||||
|
background.disconnect(background.loadedSignalId);
|
||||||
|
}));
|
||||||
|
|
||||||
return background;
|
return background;
|
||||||
},
|
},
|
||||||
|
@ -46,8 +46,10 @@ function addBackgroundMenu(actor) {
|
|||||||
clickAction.connect('long-press', function(action, actor, state) {
|
clickAction.connect('long-press', function(action, actor, state) {
|
||||||
if (state == Clutter.LongPressState.QUERY)
|
if (state == Clutter.LongPressState.QUERY)
|
||||||
return action.get_button() == 1 && !actor._backgroundMenu.isOpen;
|
return action.get_button() == 1 && !actor._backgroundMenu.isOpen;
|
||||||
if (state == Clutter.LongPressState.ACTIVATE)
|
if (state == Clutter.LongPressState.ACTIVATE) {
|
||||||
openMenu();
|
openMenu();
|
||||||
|
actor._backgroundManager.ignoreRelease();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
clickAction.connect('clicked', function(action) {
|
clickAction.connect('clicked', function(action) {
|
||||||
@ -55,4 +57,12 @@ function addBackgroundMenu(actor) {
|
|||||||
openMenu();
|
openMenu();
|
||||||
});
|
});
|
||||||
actor.add_action(clickAction);
|
actor.add_action(clickAction);
|
||||||
|
|
||||||
|
actor.connect('destroy', function() {
|
||||||
|
actor._backgroundMenu.destroy();
|
||||||
|
actor._backgroundMenu = null;
|
||||||
|
actor._backgroundManager = null;
|
||||||
|
|
||||||
|
cursor.destroy();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ function _formatEventTime(event, clockFormat) {
|
|||||||
default:
|
default:
|
||||||
/* explicit fall-through */
|
/* explicit fall-through */
|
||||||
case '12h':
|
case '12h':
|
||||||
/* Transators: Shown in calendar event list, if 12h format,
|
/* Translators: Shown in calendar event list, if 12h format,
|
||||||
\u2236 is a ratio character, similar to : and \u2009 is
|
\u2236 is a ratio character, similar to : and \u2009 is
|
||||||
a thin space */
|
a thin space */
|
||||||
ret = event.date.toLocaleFormat(C_("event list time", "%l\u2236%M\u2009%p"));
|
ret = event.date.toLocaleFormat(C_("event list time", "%l\u2236%M\u2009%p"));
|
||||||
@ -168,6 +168,12 @@ const EmptyEventSource = new Lang.Class({
|
|||||||
Name: 'EmptyEventSource',
|
Name: 'EmptyEventSource',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
this.isLoading = false;
|
||||||
|
this.isDummy = true;
|
||||||
|
this.hasCalendars = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
requestRange: function(begin, end) {
|
requestRange: function(begin, end) {
|
||||||
@ -191,6 +197,7 @@ const CalendarServerIface = <interface name="org.gnome.Shell.CalendarServer">
|
|||||||
<arg type="b" direction="in" />
|
<arg type="b" direction="in" />
|
||||||
<arg type="a(sssbxxa{sv})" direction="out" />
|
<arg type="a(sssbxxa{sv})" direction="out" />
|
||||||
</method>
|
</method>
|
||||||
|
<property name="HasCalendars" type="b" access="read" />
|
||||||
<signal name="Changed" />
|
<signal name="Changed" />
|
||||||
</interface>;
|
</interface>;
|
||||||
|
|
||||||
@ -201,8 +208,7 @@ function CalendarServer() {
|
|||||||
g_interface_name: CalendarServerInfo.name,
|
g_interface_name: CalendarServerInfo.name,
|
||||||
g_interface_info: CalendarServerInfo,
|
g_interface_info: CalendarServerInfo,
|
||||||
g_name: 'org.gnome.Shell.CalendarServer',
|
g_name: 'org.gnome.Shell.CalendarServer',
|
||||||
g_object_path: '/org/gnome/Shell/CalendarServer',
|
g_object_path: '/org/gnome/Shell/CalendarServer' });
|
||||||
g_flags: Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _datesEqual(a, b) {
|
function _datesEqual(a, b) {
|
||||||
@ -229,6 +235,8 @@ const DBusEventSource = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._resetCache();
|
this._resetCache();
|
||||||
|
this.isLoading = false;
|
||||||
|
this.isDummy = false;
|
||||||
|
|
||||||
this._initialized = false;
|
this._initialized = false;
|
||||||
this._dbusProxy = new CalendarServer();
|
this._dbusProxy = new CalendarServer();
|
||||||
@ -249,11 +257,27 @@ const DBusEventSource = new Lang.Class({
|
|||||||
this._onNameVanished();
|
this._onNameVanished();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this._dbusProxy.connect('g-properties-changed', Lang.bind(this, function() {
|
||||||
|
this.emit('notify::has-calendars');
|
||||||
|
}));
|
||||||
|
|
||||||
this._initialized = true;
|
this._initialized = true;
|
||||||
|
this.emit('notify::has-calendars');
|
||||||
this._onNameAppeared();
|
this._onNameAppeared();
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
this._dbusProxy.run_dispose();
|
||||||
|
},
|
||||||
|
|
||||||
|
get hasCalendars() {
|
||||||
|
if (this._initialized)
|
||||||
|
return this._dbusProxy.HasCalendars;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
_resetCache: function() {
|
_resetCache: function() {
|
||||||
this._events = [];
|
this._events = [];
|
||||||
this._lastRequestBegin = null;
|
this._lastRequestBegin = null;
|
||||||
@ -293,6 +317,7 @@ const DBusEventSource = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._events = newEvents;
|
this._events = newEvents;
|
||||||
|
this.isLoading = false;
|
||||||
this.emit('changed');
|
this.emit('changed');
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -315,6 +340,7 @@ const DBusEventSource = new Lang.Class({
|
|||||||
|
|
||||||
requestRange: function(begin, end, forceReload) {
|
requestRange: function(begin, end, forceReload) {
|
||||||
if (forceReload || !(_datesEqual(begin, this._lastRequestBegin) && _datesEqual(end, this._lastRequestEnd))) {
|
if (forceReload || !(_datesEqual(begin, this._lastRequestBegin) && _datesEqual(end, this._lastRequestEnd))) {
|
||||||
|
this.isLoading = true;
|
||||||
this._lastRequestBegin = begin;
|
this._lastRequestBegin = begin;
|
||||||
this._lastRequestEnd = end;
|
this._lastRequestEnd = end;
|
||||||
this._curRequestBegin = begin;
|
this._curRequestBegin = begin;
|
||||||
@ -389,19 +415,11 @@ const Calendar = new Lang.Class({
|
|||||||
// @eventSource: is an object implementing the EventSource API, e.g. the
|
// @eventSource: is an object implementing the EventSource API, e.g. the
|
||||||
// requestRange(), getEvents(), hasEvents() methods and the ::changed signal.
|
// requestRange(), getEvents(), hasEvents() methods and the ::changed signal.
|
||||||
setEventSource: function(eventSource) {
|
setEventSource: function(eventSource) {
|
||||||
if (this._eventSource) {
|
|
||||||
this._eventSource.disconnect(this._eventSourceChangedId);
|
|
||||||
this._eventSource = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._eventSource = eventSource;
|
this._eventSource = eventSource;
|
||||||
|
this._eventSource.connect('changed', Lang.bind(this, function() {
|
||||||
if (this._eventSource) {
|
|
||||||
this._eventSourceChangedId = this._eventSource.connect('changed', Lang.bind(this, function() {
|
|
||||||
this._update(false);
|
this._update(false);
|
||||||
}));
|
}));
|
||||||
this._update(true);
|
this._update(true);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Sets the calendar to show a specific date
|
// Sets the calendar to show a specific date
|
||||||
@ -425,16 +443,18 @@ 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 });
|
||||||
|
|
||||||
let back = new St.Button({ style_class: 'calendar-change-month-back' });
|
this._backButton = new St.Button({ style_class: 'calendar-change-month-back',
|
||||||
this._topBox.add(back);
|
can_focus: true });
|
||||||
back.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
|
this._topBox.add(this._backButton);
|
||||||
|
this._backButton.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
|
||||||
|
|
||||||
this._monthLabel = new St.Label({style_class: 'calendar-month-label'});
|
this._monthLabel = new St.Label({style_class: 'calendar-month-label'});
|
||||||
this._topBox.add(this._monthLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
|
this._topBox.add(this._monthLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
let forward = new St.Button({ style_class: 'calendar-change-month-forward' });
|
this._forwardButton = new St.Button({ style_class: 'calendar-change-month-forward',
|
||||||
this._topBox.add(forward);
|
can_focus: true });
|
||||||
forward.connect('clicked', Lang.bind(this, this._onNextMonthButtonClicked));
|
this._topBox.add(this._forwardButton);
|
||||||
|
this._forwardButton.connect('clicked', Lang.bind(this, this._onNextMonthButtonClicked));
|
||||||
|
|
||||||
// Add weekday labels...
|
// Add weekday labels...
|
||||||
//
|
//
|
||||||
@ -493,6 +513,8 @@ const Calendar = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._backButton.grab_key_focus();
|
||||||
|
|
||||||
this.setDate(newDate, false);
|
this.setDate(newDate, false);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -515,6 +537,8 @@ const Calendar = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._forwardButton.grab_key_focus();
|
||||||
|
|
||||||
this.setDate(newDate, false);
|
this.setDate(newDate, false);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -538,30 +562,60 @@ const Calendar = new Lang.Class({
|
|||||||
children[i].destroy();
|
children[i].destroy();
|
||||||
|
|
||||||
// Start at the beginning of the week before the start of the month
|
// Start at the beginning of the week before the start of the month
|
||||||
|
//
|
||||||
|
// We want to show always 6 weeks (to keep the calendar menu at the same
|
||||||
|
// height if there are no events), so we pad it according to the following
|
||||||
|
// policy:
|
||||||
|
//
|
||||||
|
// 1 - If a month has 6 weeks, we place no padding (example: Dec 2012)
|
||||||
|
// 2 - If a month has 5 weeks and it starts on week start, we pad one week
|
||||||
|
// before it (example: Apr 2012)
|
||||||
|
// 3 - If a month has 5 weeks and it starts on any other day, we pad one week
|
||||||
|
// after it (example: Nov 2012)
|
||||||
|
// 4 - If a month has 4 weeks, we pad one week before and one after it
|
||||||
|
// (example: Feb 2010)
|
||||||
|
//
|
||||||
|
// Actually computing the number of weeks is complex, but we know that the
|
||||||
|
// problematic categories (2 and 4) always start on week start, and that
|
||||||
|
// all months at the end have 6 weeks.
|
||||||
|
|
||||||
let beginDate = new Date(this._selectedDate);
|
let beginDate = new Date(this._selectedDate);
|
||||||
beginDate.setDate(1);
|
beginDate.setDate(1);
|
||||||
beginDate.setSeconds(0);
|
beginDate.setSeconds(0);
|
||||||
beginDate.setHours(12);
|
beginDate.setHours(12);
|
||||||
|
let year = beginDate.getYear();
|
||||||
|
|
||||||
let daysToWeekStart = (7 + beginDate.getDay() - this._weekStart) % 7;
|
let daysToWeekStart = (7 + beginDate.getDay() - this._weekStart) % 7;
|
||||||
beginDate.setTime(beginDate.getTime() - daysToWeekStart * MSECS_IN_DAY);
|
let startsOnWeekStart = daysToWeekStart == 0;
|
||||||
|
let weekPadding = startsOnWeekStart ? 7 : 0;
|
||||||
|
|
||||||
|
beginDate.setTime(beginDate.getTime() - (weekPadding + daysToWeekStart) * MSECS_IN_DAY);
|
||||||
|
|
||||||
let iter = new Date(beginDate);
|
let iter = new Date(beginDate);
|
||||||
let row = 2;
|
let row = 2;
|
||||||
while (true) {
|
// nRows here means 6 weeks + one header + one navbar
|
||||||
let button = new St.Button({ label: iter.getDate().toString() });
|
let nRows = 8;
|
||||||
|
while (row < 8) {
|
||||||
|
let button = new St.Button({ label: iter.getDate().toString(),
|
||||||
|
can_focus: true });
|
||||||
let rtl = button.get_text_direction() == Clutter.TextDirection.RTL;
|
let rtl = button.get_text_direction() == Clutter.TextDirection.RTL;
|
||||||
|
|
||||||
if (!this._eventSource)
|
if (this._eventSource.isDummy)
|
||||||
button.reactive = false;
|
button.reactive = false;
|
||||||
|
|
||||||
let iterStr = iter.toUTCString();
|
let iterStr = iter.toUTCString();
|
||||||
button.connect('clicked', Lang.bind(this, function() {
|
button.connect('clicked', Lang.bind(this, function() {
|
||||||
|
this._shouldDateGrabFocus = true;
|
||||||
|
|
||||||
let newlySelectedDate = new Date(iterStr);
|
let newlySelectedDate = new Date(iterStr);
|
||||||
this.setDate(newlySelectedDate, false);
|
this.setDate(newlySelectedDate, false);
|
||||||
|
|
||||||
|
this._shouldDateGrabFocus = false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let hasEvents = this._eventSource && this._eventSource.hasEvents(iter);
|
let hasEvents = this._eventSource.hasEvents(iter);
|
||||||
let styleClass = 'calendar-day-base calendar-day';
|
let styleClass = 'calendar-day-base calendar-day';
|
||||||
|
|
||||||
if (_isWorkDay(iter))
|
if (_isWorkDay(iter))
|
||||||
styleClass += ' calendar-work-day'
|
styleClass += ' calendar-work-day'
|
||||||
else
|
else
|
||||||
@ -581,9 +635,6 @@ const Calendar = new Lang.Class({
|
|||||||
else if (iter.getMonth() != this._selectedDate.getMonth())
|
else if (iter.getMonth() != this._selectedDate.getMonth())
|
||||||
styleClass += ' calendar-other-month-day';
|
styleClass += ' calendar-other-month-day';
|
||||||
|
|
||||||
if (_sameDay(this._selectedDate, iter))
|
|
||||||
button.add_style_pseudo_class('active');
|
|
||||||
|
|
||||||
if (hasEvents)
|
if (hasEvents)
|
||||||
styleClass += ' calendar-day-with-events'
|
styleClass += ' calendar-day-with-events'
|
||||||
|
|
||||||
@ -593,6 +644,13 @@ const Calendar = new Lang.Class({
|
|||||||
this.actor.add(button,
|
this.actor.add(button,
|
||||||
{ row: row, col: offsetCols + (7 + iter.getDay() - this._weekStart) % 7 });
|
{ row: row, col: offsetCols + (7 + iter.getDay() - this._weekStart) % 7 });
|
||||||
|
|
||||||
|
if (_sameDay(this._selectedDate, iter)) {
|
||||||
|
button.add_style_pseudo_class('active');
|
||||||
|
|
||||||
|
if (this._shouldDateGrabFocus)
|
||||||
|
button.grab_key_focus();
|
||||||
|
}
|
||||||
|
|
||||||
if (this._useWeekdate && iter.getDay() == 4) {
|
if (this._useWeekdate && iter.getDay() == 4) {
|
||||||
let label = new St.Label({ text: _getCalendarWeekForDate(iter).toString(),
|
let label = new St.Label({ text: _getCalendarWeekForDate(iter).toString(),
|
||||||
style_class: 'calendar-day-base calendar-week-number'});
|
style_class: 'calendar-day-base calendar-week-number'});
|
||||||
@ -601,16 +659,12 @@ const Calendar = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
iter.setTime(iter.getTime() + MSECS_IN_DAY);
|
iter.setTime(iter.getTime() + MSECS_IN_DAY);
|
||||||
if (iter.getDay() == this._weekStart) {
|
|
||||||
// We stop on the first "first day of the week" after the month we are displaying
|
if (iter.getDay() == this._weekStart)
|
||||||
if (iter.getMonth() > this._selectedDate.getMonth() || iter.getYear() > this._selectedDate.getYear())
|
|
||||||
break;
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Signal to the event source that we are interested in events
|
// Signal to the event source that we are interested in events
|
||||||
// only from this date range
|
// only from this date range
|
||||||
if (this._eventSource)
|
|
||||||
this._eventSource.requestRange(beginDate, iter, forceReload);
|
this._eventSource.requestRange(beginDate, iter, forceReload);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -629,16 +683,8 @@ const EventsList = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setEventSource: function(eventSource) {
|
setEventSource: function(eventSource) {
|
||||||
if (this._eventSource) {
|
|
||||||
this._eventSource.disconnect(this._eventSourceChangedId);
|
|
||||||
this._eventSource = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._eventSource = eventSource;
|
this._eventSource = eventSource;
|
||||||
|
this._eventSource.connect('changed', Lang.bind(this, this._update));
|
||||||
if (this._eventSource) {
|
|
||||||
this._eventSourceChangedId = this._eventSource.connect('changed', Lang.bind(this, this._update));
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_addEvent: function(dayNameBox, timeBox, eventTitleBox, includeDayName, day, time, desc) {
|
_addEvent: function(dayNameBox, timeBox, eventTitleBox, includeDayName, day, time, desc) {
|
||||||
@ -655,9 +701,6 @@ const EventsList = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_addPeriod: function(header, begin, end, includeDayName, showNothingScheduled) {
|
_addPeriod: function(header, begin, end, includeDayName, showNothingScheduled) {
|
||||||
if (!this._eventSource)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let events = this._eventSource.getEvents(begin, end);
|
let events = this._eventSource.getEvents(begin, end);
|
||||||
|
|
||||||
let clockFormat = this._desktopSettings.get_string(CLOCK_FORMAT_KEY);;
|
let clockFormat = this._desktopSettings.get_string(CLOCK_FORMAT_KEY);;
|
||||||
@ -754,6 +797,9 @@ const EventsList = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_update: function() {
|
_update: function() {
|
||||||
|
if (this._eventSource.isLoading)
|
||||||
|
return;
|
||||||
|
|
||||||
let today = new Date();
|
let today = new Date();
|
||||||
if (_sameDay (this._date, today)) {
|
if (_sameDay (this._date, today)) {
|
||||||
this._showToday();
|
this._showToday();
|
||||||
|
@ -292,6 +292,7 @@ const AutorunResidentSource = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(manager) {
|
_init: function(manager) {
|
||||||
this.parent(_("Removable Devices"), 'media-removable');
|
this.parent(_("Removable Devices"), 'media-removable');
|
||||||
|
this.resident = true;
|
||||||
|
|
||||||
this._mounts = [];
|
this._mounts = [];
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ const KeyringDialog = new Lang.Class({
|
|||||||
this.prompt = new Shell.KeyringPrompt();
|
this.prompt = new Shell.KeyringPrompt();
|
||||||
this.prompt.connect('show-password', Lang.bind(this, this._onShowPassword));
|
this.prompt.connect('show-password', Lang.bind(this, this._onShowPassword));
|
||||||
this.prompt.connect('show-confirm', Lang.bind(this, this._onShowConfirm));
|
this.prompt.connect('show-confirm', Lang.bind(this, this._onShowConfirm));
|
||||||
this.prompt.connect('hide-prompt', Lang.bind(this, this._onHidePrompt));
|
this.prompt.connect('prompt-close', Lang.bind(this, this._onHidePrompt));
|
||||||
|
|
||||||
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
||||||
vertical: false });
|
vertical: false });
|
||||||
@ -63,11 +63,17 @@ const KeyringDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._cancelButton = this.addButton({ label: '',
|
this._cancelButton = this.addButton({ label: '',
|
||||||
action: Lang.bind(this, this._onCancelButton),
|
action: Lang.bind(this, this._onCancelButton),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape },
|
||||||
|
{ expand: true, x_fill: false, x_align: St.Align.START });
|
||||||
|
this.placeSpinner({ expand: false,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.END,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
this._continueButton = this.addButton({ label: '',
|
this._continueButton = this.addButton({ label: '',
|
||||||
action: Lang.bind(this, this._onContinueButton),
|
action: Lang.bind(this, this._onContinueButton),
|
||||||
default: true },
|
default: true },
|
||||||
{ expand: true, x_fill: false, x_align: St.Align.END });
|
{ expand: false, x_fill: false, x_align: St.Align.END });
|
||||||
|
|
||||||
this.prompt.bind_property('cancel-label', this._cancelButton, 'label', GObject.BindingFlags.SYNC_CREATE);
|
this.prompt.bind_property('cancel-label', this._cancelButton, 'label', GObject.BindingFlags.SYNC_CREATE);
|
||||||
this.prompt.bind_property('continue-label', this._continueButton, 'label', GObject.BindingFlags.SYNC_CREATE);
|
this.prompt.bind_property('continue-label', this._continueButton, 'label', GObject.BindingFlags.SYNC_CREATE);
|
||||||
@ -143,11 +149,19 @@ const KeyringDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateSensitivity: function(sensitive) {
|
_updateSensitivity: function(sensitive) {
|
||||||
|
if (this._passwordEntry) {
|
||||||
this._passwordEntry.reactive = sensitive;
|
this._passwordEntry.reactive = sensitive;
|
||||||
this._passwordEntry.clutter_text.editable = sensitive;
|
this._passwordEntry.clutter_text.editable = sensitive;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._confirmEntry) {
|
||||||
|
this._confirmEntry.reactive = sensitive;
|
||||||
|
this._confirmEntry.clutter_text.editable = sensitive;
|
||||||
|
}
|
||||||
|
|
||||||
this._continueButton.can_focus = sensitive;
|
this._continueButton.can_focus = sensitive;
|
||||||
this._continueButton.reactive = sensitive;
|
this._continueButton.reactive = sensitive;
|
||||||
|
this.setWorking(!sensitive);
|
||||||
},
|
},
|
||||||
|
|
||||||
_ensureOpen: function() {
|
_ensureOpen: function() {
|
||||||
@ -222,7 +236,7 @@ const KeyringPrompter = new Lang.Class({
|
|||||||
enable: function() {
|
enable: function() {
|
||||||
this._prompter.register(Gio.DBus.session);
|
this._prompter.register(Gio.DBus.session);
|
||||||
this._dbusId = Gio.DBus.session.own_name('org.gnome.keyring.SystemPrompter',
|
this._dbusId = Gio.DBus.session.own_name('org.gnome.keyring.SystemPrompter',
|
||||||
Gio.BusNameOwnerFlags.REPLACE, null, null);
|
Gio.BusNameOwnerFlags.ALLOW_REPLACEMENT, null, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
disable: function() {
|
disable: function() {
|
||||||
|
@ -31,7 +31,6 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
this.message = message;
|
this.message = message;
|
||||||
this.userNames = userNames;
|
this.userNames = userNames;
|
||||||
this._wasDismissed = false;
|
this._wasDismissed = false;
|
||||||
this._completed = false;
|
|
||||||
|
|
||||||
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
|
||||||
vertical: false });
|
vertical: false });
|
||||||
@ -161,26 +160,32 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._cancelButton = this.addButton({ label: _("Cancel"),
|
this._cancelButton = this.addButton({ label: _("Cancel"),
|
||||||
action: Lang.bind(this, this.cancel),
|
action: Lang.bind(this, this.cancel),
|
||||||
key: Clutter.Escape });
|
key: Clutter.Escape },
|
||||||
|
{ expand: true, x_fill: false, x_align: St.Align.START });
|
||||||
|
this.placeSpinner({ expand: false,
|
||||||
|
x_fill: false,
|
||||||
|
y_fill: false,
|
||||||
|
x_align: St.Align.END,
|
||||||
|
y_align: St.Align.MIDDLE });
|
||||||
this._okButton = this.addButton({ label: _("Authenticate"),
|
this._okButton = this.addButton({ label: _("Authenticate"),
|
||||||
action: Lang.bind(this, this._onAuthenticateButtonPressed),
|
action: Lang.bind(this, this._onAuthenticateButtonPressed),
|
||||||
default: true },
|
default: true },
|
||||||
{ expand: true, x_fill: false, x_align: St.Align.END });
|
{ expand: false, x_fill: false, x_align: St.Align.END });
|
||||||
|
|
||||||
this._doneEmitted = false;
|
this._doneEmitted = false;
|
||||||
|
|
||||||
this._identityToAuth = Polkit.UnixUser.new_for_name(userName);
|
this._identityToAuth = Polkit.UnixUser.new_for_name(userName);
|
||||||
this._cookie = cookie;
|
this._cookie = cookie;
|
||||||
|
},
|
||||||
|
|
||||||
|
performAuthentication: function() {
|
||||||
|
this.destroySession();
|
||||||
this._session = new PolkitAgent.Session({ identity: this._identityToAuth,
|
this._session = new PolkitAgent.Session({ identity: this._identityToAuth,
|
||||||
cookie: this._cookie });
|
cookie: this._cookie });
|
||||||
this._session.connect('completed', Lang.bind(this, this._onSessionCompleted));
|
this._session.connect('completed', Lang.bind(this, this._onSessionCompleted));
|
||||||
this._session.connect('request', Lang.bind(this, this._onSessionRequest));
|
this._session.connect('request', Lang.bind(this, this._onSessionRequest));
|
||||||
this._session.connect('show-error', Lang.bind(this, this._onSessionShowError));
|
this._session.connect('show-error', Lang.bind(this, this._onSessionShowError));
|
||||||
this._session.connect('show-info', Lang.bind(this, this._onSessionShowInfo));
|
this._session.connect('show-info', Lang.bind(this, this._onSessionShowInfo));
|
||||||
},
|
|
||||||
|
|
||||||
startAuthentication: function() {
|
|
||||||
this._session.initiate();
|
this._session.initiate();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -202,14 +207,14 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
log('polkitAuthenticationAgent: Failed to show modal dialog.' +
|
log('polkitAuthenticationAgent: Failed to show modal dialog.' +
|
||||||
' Dismissing authentication request for action-id ' + this.actionId +
|
' Dismissing authentication request for action-id ' + this.actionId +
|
||||||
' cookie ' + this._cookie);
|
' cookie ' + this._cookie);
|
||||||
this._emitDone(false, true);
|
this._emitDone(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_emitDone: function(keepVisible, dismissed) {
|
_emitDone: function(dismissed) {
|
||||||
if (!this._doneEmitted) {
|
if (!this._doneEmitted) {
|
||||||
this._doneEmitted = true;
|
this._doneEmitted = true;
|
||||||
this.emit('done', keepVisible, dismissed);
|
this.emit('done', dismissed);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -219,6 +224,7 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._okButton.can_focus = sensitive;
|
this._okButton.can_focus = sensitive;
|
||||||
this._okButton.reactive = sensitive;
|
this._okButton.reactive = sensitive;
|
||||||
|
this.setWorking(!sensitive);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEntryActivate: function() {
|
_onEntryActivate: function() {
|
||||||
@ -237,12 +243,16 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onSessionCompleted: function(session, gainedAuthorization) {
|
_onSessionCompleted: function(session, gainedAuthorization) {
|
||||||
if (this._completed)
|
if (this._completed || this._doneEmitted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._completed = true;
|
this._completed = true;
|
||||||
|
|
||||||
if (!gainedAuthorization) {
|
/* Yay, all done */
|
||||||
|
if (gainedAuthorization) {
|
||||||
|
this._emitDone(false);
|
||||||
|
|
||||||
|
} else {
|
||||||
/* Unless we are showing an existing error message from the PAM
|
/* Unless we are showing an existing error message from the PAM
|
||||||
* module (the PAM module could be reporting the authentication
|
* module (the PAM module could be reporting the authentication
|
||||||
* error providing authentication-method specific information),
|
* error providing authentication-method specific information),
|
||||||
@ -258,8 +268,10 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
this._infoMessageLabel.hide();
|
this._infoMessageLabel.hide();
|
||||||
this._nullMessageLabel.hide();
|
this._nullMessageLabel.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Try and authenticate again */
|
||||||
|
this.performAuthentication();
|
||||||
}
|
}
|
||||||
this._emitDone(!gainedAuthorization, false);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSessionRequest: function(session, request, echo_on) {
|
_onSessionRequest: function(session, request, echo_on) {
|
||||||
@ -303,6 +315,7 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
if (this._session) {
|
if (this._session) {
|
||||||
if (!this._completed)
|
if (!this._completed)
|
||||||
this._session.cancel();
|
this._session.cancel();
|
||||||
|
this._completed = false;
|
||||||
this._session = null;
|
this._session = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -317,7 +330,7 @@ const AuthenticationDialog = new Lang.Class({
|
|||||||
cancel: function() {
|
cancel: function() {
|
||||||
this._wasDismissed = true;
|
this._wasDismissed = true;
|
||||||
this.close(global.get_current_time());
|
this.close(global.get_current_time());
|
||||||
this._emitDone(false, true);
|
this._emitDone(true);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(AuthenticationDialog.prototype);
|
Signals.addSignalMethods(AuthenticationDialog.prototype);
|
||||||
@ -327,7 +340,6 @@ const AuthenticationAgent = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._currentDialog = null;
|
this._currentDialog = null;
|
||||||
this._isCompleting = false;
|
|
||||||
this._handle = null;
|
this._handle = null;
|
||||||
this._native = new Shell.PolkitAuthenticationAgent();
|
this._native = new Shell.PolkitAuthenticationAgent();
|
||||||
this._native.connect('initiate', Lang.bind(this, this._onInitiate));
|
this._native.connect('initiate', Lang.bind(this, this._onInitiate));
|
||||||
@ -364,45 +376,24 @@ const AuthenticationAgent = new Lang.Class({
|
|||||||
// discussion.
|
// discussion.
|
||||||
|
|
||||||
this._currentDialog.connect('done', Lang.bind(this, this._onDialogDone));
|
this._currentDialog.connect('done', Lang.bind(this, this._onDialogDone));
|
||||||
this._currentDialog.startAuthentication();
|
this._currentDialog.performAuthentication();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCancel: function(nativeAgent) {
|
_onCancel: function(nativeAgent) {
|
||||||
this._completeRequest(false, false);
|
this._completeRequest(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDialogDone: function(dialog, keepVisible, dismissed) {
|
_onDialogDone: function(dialog, dismissed) {
|
||||||
this._completeRequest(keepVisible, dismissed);
|
this._completeRequest(dismissed);
|
||||||
},
|
},
|
||||||
|
|
||||||
_reallyCompleteRequest: function(dismissed) {
|
_completeRequest: function(dismissed) {
|
||||||
this._currentDialog.close();
|
this._currentDialog.close();
|
||||||
this._currentDialog.destroySession();
|
this._currentDialog.destroySession();
|
||||||
this._currentDialog = null;
|
this._currentDialog = null;
|
||||||
this._isCompleting = false;
|
|
||||||
|
|
||||||
this._native.complete(dismissed)
|
this._native.complete(dismissed);
|
||||||
},
|
},
|
||||||
|
|
||||||
_completeRequest: function(keepVisible, wasDismissed) {
|
|
||||||
if (this._isCompleting)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._isCompleting = true;
|
|
||||||
|
|
||||||
if (keepVisible) {
|
|
||||||
// Give the user 2 seconds to read 'Authentication Failure' before
|
|
||||||
// dismissing the dialog
|
|
||||||
Mainloop.timeout_add(2000,
|
|
||||||
Lang.bind(this,
|
|
||||||
function() {
|
|
||||||
this._reallyCompleteRequest(wasDismissed);
|
|
||||||
return false;
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
this._reallyCompleteRequest(wasDismissed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const Component = AuthenticationAgent;
|
const Component = AuthenticationAgent;
|
||||||
|
@ -20,8 +20,7 @@ const Recorder = new Lang.Class({
|
|||||||
Main.wm.addKeybinding('toggle-recording',
|
Main.wm.addKeybinding('toggle-recording',
|
||||||
this._bindingSettings,
|
this._bindingSettings,
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.KeyBindingMode.NORMAL |
|
Shell.KeyBindingMode.ALL,
|
||||||
Shell.KeyBindingMode.OVERVIEW,
|
|
||||||
Lang.bind(this, this._toggleRecorder));
|
Lang.bind(this, this._toggleRecorder));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -61,8 +61,7 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
if (item.focusCallback) {
|
if (item.focusCallback) {
|
||||||
item.focusCallback(timestamp);
|
item.focusCallback(timestamp);
|
||||||
} else {
|
} else {
|
||||||
if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE ||
|
if (global.stage_input_mode == Shell.StageInputMode.NORMAL)
|
||||||
global.stage_input_mode == Shell.StageInputMode.NORMAL)
|
|
||||||
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
||||||
|
|
||||||
item.root.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
item.root.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||||
@ -89,21 +88,33 @@ const CtrlAltTabManager = new Lang.Class({
|
|||||||
let items = this._items.filter(function (item) { return item.proxy.mapped; });
|
let items = this._items.filter(function (item) { return item.proxy.mapped; });
|
||||||
|
|
||||||
// And add the windows metacity would show in its Ctrl-Alt-Tab list
|
// And add the windows metacity would show in its Ctrl-Alt-Tab list
|
||||||
if (!Main.overview.visible) {
|
if (Main.sessionMode.hasWindows && !Main.overview.visible) {
|
||||||
let screen = global.screen;
|
let screen = global.screen;
|
||||||
let display = screen.get_display();
|
let display = screen.get_display();
|
||||||
let windows = display.get_tab_list(Meta.TabList.DOCKS, screen, screen.get_active_workspace ());
|
let windows = display.get_tab_list(Meta.TabList.DOCKS, screen, screen.get_active_workspace ());
|
||||||
let windowTracker = Shell.WindowTracker.get_default();
|
let windowTracker = Shell.WindowTracker.get_default();
|
||||||
let textureCache = St.TextureCache.get_default();
|
let textureCache = St.TextureCache.get_default();
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
let icon;
|
let icon = null;
|
||||||
|
let iconName = null;
|
||||||
|
if (windows[i].get_window_type () == Meta.WindowType.DESKTOP) {
|
||||||
|
iconName = 'video-display-symbolic';
|
||||||
|
} else {
|
||||||
let app = windowTracker.get_window_app(windows[i]);
|
let app = windowTracker.get_window_app(windows[i]);
|
||||||
if (app)
|
if (app)
|
||||||
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({ name: windows[i].title,
|
items.push({ name: windows[i].title,
|
||||||
|
proxy: windows[i].get_compositor_private(),
|
||||||
|
focusCallback: Lang.bind(windows[i],
|
||||||
|
function(timestamp) {
|
||||||
|
Main.activateWindow(this, timestamp);
|
||||||
|
}),
|
||||||
iconActor: icon,
|
iconActor: icon,
|
||||||
|
iconName: iconName,
|
||||||
sortGroup: SortGroup.MIDDLE });
|
sortGroup: SortGroup.MIDDLE });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,11 +49,6 @@ const DateMenuButton = new Lang.Class({
|
|||||||
menuAlignment = 1.0 - menuAlignment;
|
menuAlignment = 1.0 - menuAlignment;
|
||||||
this.parent(menuAlignment);
|
this.parent(menuAlignment);
|
||||||
|
|
||||||
// At this moment calendar menu is not keyboard navigable at
|
|
||||||
// all (so not accessible), so it doesn't make sense to set as
|
|
||||||
// role ATK_ROLE_MENU like other elements of the panel.
|
|
||||||
this.actor.accessible_role = Atk.Role.LABEL;
|
|
||||||
|
|
||||||
this._clockDisplay = new St.Label();
|
this._clockDisplay = new St.Label();
|
||||||
this.actor.add_actor(this._clockDisplay);
|
this.actor.add_actor(this._clockDisplay);
|
||||||
|
|
||||||
@ -90,22 +85,18 @@ const DateMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
this._openCalendarItem = new PopupMenu.PopupMenuItem(_("Open Calendar"));
|
this._openCalendarItem = new PopupMenu.PopupMenuItem(_("Open Calendar"));
|
||||||
this._openCalendarItem.connect('activate', Lang.bind(this, this._onOpenCalendarActivate));
|
this._openCalendarItem.connect('activate', Lang.bind(this, this._onOpenCalendarActivate));
|
||||||
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._openClocksItem = new PopupMenu.PopupMenuItem(_("Open Clocks"));
|
this._openClocksItem = new PopupMenu.PopupMenuItem(_("Open Clocks"));
|
||||||
this._openClocksItem.connect('activate', Lang.bind(this, this._onOpenClocksActivate));
|
this._openClocksItem.connect('activate', Lang.bind(this, this._onOpenClocksActivate));
|
||||||
this._openClocksItem.actor.can_focus = false;
|
|
||||||
vbox.add(this._openClocksItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
vbox.add(this._openClocksItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
||||||
|
|
||||||
Shell.AppSystem.get_default().connect('installed-changed',
|
Shell.AppSystem.get_default().connect('installed-changed',
|
||||||
Lang.bind(this, this._appInstalledChanged));
|
Lang.bind(this, this._appInstalledChanged));
|
||||||
this._appInstalledChanged();
|
|
||||||
|
|
||||||
item = this.menu.addSettingsAction(_("Date & Time Settings"), 'gnome-datetime-panel.desktop');
|
item = this.menu.addSettingsAction(_("Date & Time Settings"), 'gnome-datetime-panel.desktop');
|
||||||
if (item) {
|
if (item) {
|
||||||
item.actor.show_on_set_parent = false;
|
item.actor.show_on_set_parent = false;
|
||||||
item.actor.can_focus = false;
|
|
||||||
item.actor.reparent(vbox);
|
item.actor.reparent(vbox);
|
||||||
this._dateAndTimeSeparator = separator;
|
this._dateAndTimeSeparator = separator;
|
||||||
}
|
}
|
||||||
@ -157,12 +148,16 @@ const DateMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_appInstalledChanged: function() {
|
_appInstalledChanged: function() {
|
||||||
let app = Shell.AppSystem.get_default().lookup_app('gnome-clocks.desktop');
|
this._calendarApp = undefined;
|
||||||
this._openClocksItem.actor.visible = app !== null;
|
this._updateEventsVisibility();
|
||||||
},
|
},
|
||||||
|
|
||||||
_setEventsVisibility: function(visible) {
|
_updateEventsVisibility: function() {
|
||||||
this._openCalendarItem.actor.visible = visible;
|
let visible = this._eventSource.hasCalendars;
|
||||||
|
this._openCalendarItem.actor.visible = visible &&
|
||||||
|
(this._getCalendarApp() != null);
|
||||||
|
this._openClocksItem.actor.visible = visible &&
|
||||||
|
(this._getClockApp() != null);
|
||||||
this._separator.visible = visible;
|
this._separator.visible = visible;
|
||||||
if (visible) {
|
if (visible) {
|
||||||
let alignment = 0.25;
|
let alignment = 0.25;
|
||||||
@ -177,8 +172,16 @@ const DateMenuButton = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_setEventSource: function(eventSource) {
|
_setEventSource: function(eventSource) {
|
||||||
|
if (this._eventSource)
|
||||||
|
this._eventSource.destroy();
|
||||||
|
|
||||||
this._calendar.setEventSource(eventSource);
|
this._calendar.setEventSource(eventSource);
|
||||||
this._eventList.setEventSource(eventSource);
|
this._eventList.setEventSource(eventSource);
|
||||||
|
|
||||||
|
this._eventSource = eventSource;
|
||||||
|
this._eventSource.connect('notify::has-calendars', Lang.bind(this, function() {
|
||||||
|
this._updateEventsVisibility();
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_sessionUpdated: function() {
|
_sessionUpdated: function() {
|
||||||
@ -187,10 +190,10 @@ const DateMenuButton = new Lang.Class({
|
|||||||
if (showEvents) {
|
if (showEvents) {
|
||||||
eventSource = new Calendar.DBusEventSource();
|
eventSource = new Calendar.DBusEventSource();
|
||||||
} else {
|
} else {
|
||||||
eventSource = null;
|
eventSource = new Calendar.EmptyEventSource();
|
||||||
}
|
}
|
||||||
this._setEventSource(eventSource);
|
this._setEventSource(eventSource);
|
||||||
this._setEventsVisibility(showEvents);
|
this._updateEventsVisibility();
|
||||||
|
|
||||||
// This needs to be handled manually, as the code to
|
// This needs to be handled manually, as the code to
|
||||||
// autohide separators doesn't work across the vbox
|
// autohide separators doesn't work across the vbox
|
||||||
@ -207,16 +210,34 @@ const DateMenuButton = new Lang.Class({
|
|||||||
this._date.set_text(displayDate.toLocaleFormat(dateFormat));
|
this._date.set_text(displayDate.toLocaleFormat(dateFormat));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_getCalendarApp: function() {
|
||||||
|
if (this._calendarApp !== undefined)
|
||||||
|
return this._calendarApp;
|
||||||
|
|
||||||
|
let apps = Gio.AppInfo.get_recommended_for_type('text/calendar');
|
||||||
|
if (apps && (apps.length > 0))
|
||||||
|
this._calendarApp = apps[0];
|
||||||
|
else
|
||||||
|
this._calendarApp = null;
|
||||||
|
return this._calendarApp;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getClockApp: function() {
|
||||||
|
return Shell.AppSystem.get_default().lookup_app('gnome-clocks.desktop');
|
||||||
|
},
|
||||||
|
|
||||||
_onOpenCalendarActivate: function() {
|
_onOpenCalendarActivate: function() {
|
||||||
this.menu.close();
|
this.menu.close();
|
||||||
|
|
||||||
let app = Gio.AppInfo.get_default_for_type('text/calendar', false);
|
let app = this._getCalendarApp();
|
||||||
|
if (app.get_id() == 'evolution.desktop')
|
||||||
|
app = Gio.DesktopAppInfo.new('evolution-calendar.desktop');
|
||||||
app.launch([], global.create_app_launch_context());
|
app.launch([], global.create_app_launch_context());
|
||||||
},
|
},
|
||||||
|
|
||||||
_onOpenClocksActivate: function() {
|
_onOpenClocksActivate: function() {
|
||||||
this.menu.close();
|
this.menu.close();
|
||||||
let app = Shell.AppSystem.get_default().lookup_app('gnome-clocks.desktop');
|
let app = this._getClockApp();
|
||||||
app.activate();
|
app.activate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
32
js/ui/dnd.js
32
js/ui/dnd.js
@ -43,9 +43,7 @@ let dragMonitors = [];
|
|||||||
|
|
||||||
function _getEventHandlerActor() {
|
function _getEventHandlerActor() {
|
||||||
if (!eventHandlerActor) {
|
if (!eventHandlerActor) {
|
||||||
eventHandlerActor = new Clutter.Rectangle();
|
eventHandlerActor = new Clutter.Actor({ width: 0, height: 0 });
|
||||||
eventHandlerActor.width = 0;
|
|
||||||
eventHandlerActor.height = 0;
|
|
||||||
Main.uiGroup.add_actor(eventHandlerActor);
|
Main.uiGroup.add_actor(eventHandlerActor);
|
||||||
// We connect to 'event' rather than 'captured-event' because the capturing phase doesn't happen
|
// We connect to 'event' rather than 'captured-event' because the capturing phase doesn't happen
|
||||||
// when you've grabbed the pointer.
|
// when you've grabbed the pointer.
|
||||||
@ -85,11 +83,13 @@ const _Draggable = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.connect('destroy', Lang.bind(this, function() {
|
this.actor.connect('destroy', Lang.bind(this, function() {
|
||||||
this._actorDestroyed = true;
|
this._actorDestroyed = true;
|
||||||
|
|
||||||
// If the drag actor is destroyed and we were going to fix
|
// If the drag actor is destroyed and we were going to fix
|
||||||
// up its hover state, fix up the parent hover state instead
|
// up its hover state, fix up the parent hover state instead
|
||||||
if (this.actor == this._firstLeaveActor)
|
if (this.actor == this._firstLeaveActor)
|
||||||
this._firstLeaveActor = this._dragOrigParent;
|
this._firstLeaveActor = this._dragOrigParent;
|
||||||
if (this._dragInProgress)
|
|
||||||
|
if (this._dragInProgress && this._dragCancellable)
|
||||||
this._cancelDrag(global.get_current_time());
|
this._cancelDrag(global.get_current_time());
|
||||||
this.disconnectAll();
|
this.disconnectAll();
|
||||||
}));
|
}));
|
||||||
@ -102,6 +102,7 @@ const _Draggable = new Lang.Class({
|
|||||||
this._buttonDown = false; // The mouse button has been pressed and has not yet been released.
|
this._buttonDown = false; // The mouse button has been pressed and has not yet been released.
|
||||||
this._dragInProgress = false; // The drag has been started, and has not been dropped or cancelled yet.
|
this._dragInProgress = false; // The drag has been started, and has not been dropped or cancelled yet.
|
||||||
this._animationInProgress = false; // The drag is over and the item is in the process of animating to its original position (snapping back or reverting).
|
this._animationInProgress = false; // The drag is over and the item is in the process of animating to its original position (snapping back or reverting).
|
||||||
|
this._dragCancellable = true;
|
||||||
|
|
||||||
// During the drag, we eat enter/leave events so that actors don't prelight.
|
// During the drag, we eat enter/leave events so that actors don't prelight.
|
||||||
// But we remember the actors that we first left/last entered so we can
|
// But we remember the actors that we first left/last entered so we can
|
||||||
@ -288,19 +289,19 @@ const _Draggable = new Lang.Class({
|
|||||||
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);
|
// Set the actor's scale such that it will keep the same
|
||||||
this._dragActor.raise_top();
|
// transformed size when it's reparented to the uiGroup
|
||||||
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
|
||||||
|
this._dragActor.set_scale(scaledWidth / this.actor.width,
|
||||||
|
scaledHeight / this.actor.height);
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
// Set the actor's scale such that it will keep the same
|
this._dragActor.reparent(Main.uiGroup);
|
||||||
// transformed size when it's reparented to the uiGroup
|
this._dragActor.raise_top();
|
||||||
let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
|
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
||||||
this.actor.set_scale(scaledWidth / this.actor.width,
|
|
||||||
scaledHeight / this.actor.height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dragOrigOpacity = this._dragActor.opacity;
|
this._dragOrigOpacity = this._dragActor.opacity;
|
||||||
@ -439,6 +440,11 @@ const _Draggable = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// At this point it is too late to cancel a drag by destroying
|
||||||
|
// the actor, the fate of which is decided by acceptDrop and its
|
||||||
|
// side-effects
|
||||||
|
this._dragCancellable = false;
|
||||||
|
|
||||||
while (target) {
|
while (target) {
|
||||||
if (target._delegate && target._delegate.acceptDrop) {
|
if (target._delegate && target._delegate.acceptDrop) {
|
||||||
let [r, targX, targY] = target.transform_stage_point(dropX, dropY);
|
let [r, targX, targY] = target.transform_stage_point(dropX, dropY);
|
||||||
@ -447,8 +453,6 @@ const _Draggable = new Lang.Class({
|
|||||||
targX,
|
targX,
|
||||||
targY,
|
targY,
|
||||||
event.get_time())) {
|
event.get_time())) {
|
||||||
if (this._actorDestroyed)
|
|
||||||
return true;
|
|
||||||
// If it accepted the drop without taking the actor,
|
// If it accepted the drop without taking the actor,
|
||||||
// handle it ourselves.
|
// handle it ourselves.
|
||||||
if (this._dragActor.get_parent() == Main.uiGroup) {
|
if (this._dragActor.get_parent() == Main.uiGroup) {
|
||||||
|
@ -225,7 +225,8 @@ const EndSessionDialog = new Lang.Class({
|
|||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.parent({ styleClass: 'end-session-dialog' });
|
this.parent({ styleClass: 'end-session-dialog',
|
||||||
|
destroyOnClose: false });
|
||||||
|
|
||||||
this._user = AccountsService.UserManager.get_default().get_user(GLib.get_user_name());
|
this._user = AccountsService.UserManager.get_default().get_user(GLib.get_user_name());
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ function disableAllExtensions() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (initted) {
|
if (initted) {
|
||||||
enabledExtensions.forEach(function(uuid) {
|
extensionOrder.slice().reverse().forEach(function(uuid) {
|
||||||
disableExtension(uuid);
|
disableExtension(uuid);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -211,10 +211,8 @@ const GrabHelper = new Lang.Class({
|
|||||||
this._grabbedFromKeynav = hadFocus;
|
this._grabbedFromKeynav = hadFocus;
|
||||||
this._preGrabInputMode = global.stage_input_mode;
|
this._preGrabInputMode = global.stage_input_mode;
|
||||||
|
|
||||||
if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE ||
|
if (this._preGrabInputMode == Shell.StageInputMode.NORMAL)
|
||||||
this._preGrabInputMode == Shell.StageInputMode.NORMAL) {
|
|
||||||
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
||||||
}
|
|
||||||
|
|
||||||
this._keyFocusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
|
this._keyFocusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
|
||||||
this._focusWindowChangedId = metaDisplay.connect('notify::focus-window', Lang.bind(this, this._focusWindowChanged));
|
this._focusWindowChangedId = metaDisplay.connect('notify::focus-window', Lang.bind(this, this._focusWindowChanged));
|
||||||
@ -248,7 +246,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
global.set_stage_input_mode(Shell.StageInputMode.FOCUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
global.screen.focus_default_window(global.get_current_time());
|
global.screen.focus_default_window(global.display.get_current_time_roundtrip());
|
||||||
},
|
},
|
||||||
|
|
||||||
// ignoreRelease:
|
// ignoreRelease:
|
||||||
@ -308,6 +306,8 @@ const GrabHelper = new Lang.Class({
|
|||||||
if (!this.grabbed && this._capturedEventId > 0) {
|
if (!this.grabbed && this._capturedEventId > 0) {
|
||||||
global.stage.disconnect(this._capturedEventId);
|
global.stage.disconnect(this._capturedEventId);
|
||||||
this._capturedEventId = 0;
|
this._capturedEventId = 0;
|
||||||
|
|
||||||
|
this._ignoreRelease = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hadFocus) {
|
if (hadFocus) {
|
||||||
@ -353,6 +353,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
this._ignoreRelease = true;
|
this._ignoreRelease = true;
|
||||||
let i = this._actorInGrabStack(event.get_source()) + 1;
|
let i = this._actorInGrabStack(event.get_source()) + 1;
|
||||||
this.ungrab({ actor: this._grabStack[i].actor, isUser: true });
|
this.ungrab({ actor: this._grabStack[i].actor, isUser: true });
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._modalCount > 0;
|
return this._modalCount > 0;
|
||||||
|
575
js/ui/layout.js
575
js/ui/layout.js
@ -18,7 +18,6 @@ const Main = imports.ui.main;
|
|||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
const HOT_CORNER_ACTIVATION_TIMEOUT = 0.5;
|
|
||||||
const STARTUP_ANIMATION_TIME = 0.5;
|
const STARTUP_ANIMATION_TIME = 0.5;
|
||||||
const KEYBOARD_ANIMATION_TIME = 0.15;
|
const KEYBOARD_ANIMATION_TIME = 0.15;
|
||||||
const BACKGROUND_FADE_ANIMATION_TIME = 1.0;
|
const BACKGROUND_FADE_ANIMATION_TIME = 1.0;
|
||||||
@ -29,6 +28,9 @@ const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
|||||||
const MESSAGE_TRAY_PRESSURE_THRESHOLD = 250; // pixels
|
const MESSAGE_TRAY_PRESSURE_THRESHOLD = 250; // pixels
|
||||||
const MESSAGE_TRAY_PRESSURE_TIMEOUT = 1000; // ms
|
const MESSAGE_TRAY_PRESSURE_TIMEOUT = 1000; // ms
|
||||||
|
|
||||||
|
const HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
|
||||||
|
const HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
|
||||||
|
|
||||||
function isPopupMetaWindow(actor) {
|
function isPopupMetaWindow(actor) {
|
||||||
switch(actor.meta_window.get_window_type()) {
|
switch(actor.meta_window.get_window_type()) {
|
||||||
case Meta.WindowType.DROPDOWN_MENU:
|
case Meta.WindowType.DROPDOWN_MENU:
|
||||||
@ -116,10 +118,25 @@ const MonitorConstraint = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const Monitor = new Lang.Class({
|
||||||
|
Name: 'Monitor',
|
||||||
|
|
||||||
|
_init: function(index, geometry) {
|
||||||
|
this.index = index;
|
||||||
|
this.x = geometry.x;
|
||||||
|
this.y = geometry.y;
|
||||||
|
this.width = geometry.width;
|
||||||
|
this.height = geometry.height;
|
||||||
|
},
|
||||||
|
|
||||||
|
get inFullscreen() {
|
||||||
|
return global.screen.get_monitor_in_fullscreen(this.index);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const defaultParams = {
|
const defaultParams = {
|
||||||
trackFullscreen: false,
|
trackFullscreen: false,
|
||||||
affectsStruts: false,
|
affectsStruts: false,
|
||||||
affectsInputRegion: true
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const LayoutManager = new Lang.Class({
|
const LayoutManager = new Lang.Class({
|
||||||
@ -130,9 +147,9 @@ const LayoutManager = new Lang.Class({
|
|||||||
this.monitors = [];
|
this.monitors = [];
|
||||||
this.primaryMonitor = null;
|
this.primaryMonitor = null;
|
||||||
this.primaryIndex = -1;
|
this.primaryIndex = -1;
|
||||||
|
this.hotCorners = [];
|
||||||
|
|
||||||
this._keyboardIndex = -1;
|
this._keyboardIndex = -1;
|
||||||
this._hotCorners = [];
|
|
||||||
this._leftPanelBarrier = null;
|
|
||||||
this._rightPanelBarrier = null;
|
this._rightPanelBarrier = null;
|
||||||
this._trayBarrier = null;
|
this._trayBarrier = null;
|
||||||
|
|
||||||
@ -140,6 +157,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
this._updateRegionIdle = 0;
|
this._updateRegionIdle = 0;
|
||||||
|
|
||||||
this._trackedActors = [];
|
this._trackedActors = [];
|
||||||
|
this._topActors = [];
|
||||||
this._isPopupWindowVisible = false;
|
this._isPopupWindowVisible = false;
|
||||||
this._startingUp = true;
|
this._startingUp = true;
|
||||||
|
|
||||||
@ -170,10 +188,12 @@ const LayoutManager = new Lang.Class({
|
|||||||
global.stage.remove_actor(global.window_group);
|
global.stage.remove_actor(global.window_group);
|
||||||
this.uiGroup.add_actor(global.window_group);
|
this.uiGroup.add_actor(global.window_group);
|
||||||
|
|
||||||
global.stage.remove_actor(global.overlay_group);
|
|
||||||
this.uiGroup.add_actor(global.overlay_group);
|
|
||||||
global.stage.add_child(this.uiGroup);
|
global.stage.add_child(this.uiGroup);
|
||||||
|
|
||||||
|
this.overviewGroup = new St.Widget({ name: 'overviewGroup',
|
||||||
|
visible: false });
|
||||||
|
this.addChrome(this.overviewGroup);
|
||||||
|
|
||||||
this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup',
|
this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup',
|
||||||
visible: false,
|
visible: false,
|
||||||
clip_to_allocation: true,
|
clip_to_allocation: true,
|
||||||
@ -191,6 +211,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
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._setupTrayPressure();
|
||||||
|
|
||||||
this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
|
this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
@ -218,25 +239,29 @@ const LayoutManager = new Lang.Class({
|
|||||||
Lang.bind(this, this._windowsRestacked));
|
Lang.bind(this, this._windowsRestacked));
|
||||||
global.screen.connect('monitors-changed',
|
global.screen.connect('monitors-changed',
|
||||||
Lang.bind(this, this._monitorsChanged));
|
Lang.bind(this, this._monitorsChanged));
|
||||||
|
global.screen.connect('in-fullscreen-changed',
|
||||||
|
Lang.bind(this, this._updateFullscreen));
|
||||||
this._monitorsChanged();
|
this._monitorsChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
// This is called by Main after everything else is constructed;
|
// This is called by Main after everything else is constructed
|
||||||
// it needs access to Main.overview, which didn't exist
|
|
||||||
// yet when the LayoutManager was constructed.
|
|
||||||
init: function() {
|
init: function() {
|
||||||
Main.overview.connect('showing', Lang.bind(this, this._overviewShowing));
|
|
||||||
Main.overview.connect('hidden', Lang.bind(this, this._overviewHidden));
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
|
|
||||||
|
this._loadBackground();
|
||||||
},
|
},
|
||||||
|
|
||||||
_overviewShowing: function() {
|
showOverview: function() {
|
||||||
|
this.overviewGroup.show();
|
||||||
|
|
||||||
this._inOverview = true;
|
this._inOverview = true;
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
this._queueUpdateRegions();
|
this._queueUpdateRegions();
|
||||||
},
|
},
|
||||||
|
|
||||||
_overviewHidden: function() {
|
hideOverview: function() {
|
||||||
|
this.overviewGroup.hide();
|
||||||
|
|
||||||
this._inOverview = false;
|
this._inOverview = false;
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
this._queueUpdateRegions();
|
this._queueUpdateRegions();
|
||||||
@ -253,7 +278,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
this.monitors = [];
|
this.monitors = [];
|
||||||
let nMonitors = screen.get_n_monitors();
|
let nMonitors = screen.get_n_monitors();
|
||||||
for (let i = 0; i < nMonitors; i++)
|
for (let i = 0; i < nMonitors; i++)
|
||||||
this.monitors.push(screen.get_monitor_geometry(i));
|
this.monitors.push(new Monitor(i, screen.get_monitor_geometry(i)));
|
||||||
|
|
||||||
if (nMonitors == 1) {
|
if (nMonitors == 1) {
|
||||||
this.primaryIndex = this.bottomIndex = 0;
|
this.primaryIndex = this.bottomIndex = 0;
|
||||||
@ -275,21 +300,23 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
_updateHotCorners: function() {
|
_updateHotCorners: function() {
|
||||||
// destroy old hot corners
|
// destroy old hot corners
|
||||||
for (let i = 0; i < this._hotCorners.length; i++)
|
this.hotCorners.forEach(function(corner) {
|
||||||
this._hotCorners[i].destroy();
|
if (corner)
|
||||||
this._hotCorners = [];
|
corner.destroy();
|
||||||
|
});
|
||||||
|
this.hotCorners = [];
|
||||||
|
|
||||||
|
let size = this.panelBox.height;
|
||||||
|
|
||||||
// build new hot corners
|
// build new hot corners
|
||||||
for (let i = 0; i < this.monitors.length; i++) {
|
for (let i = 0; i < this.monitors.length; i++) {
|
||||||
if (i == this.primaryIndex)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
let monitor = this.monitors[i];
|
let monitor = this.monitors[i];
|
||||||
let cornerX = this._rtl ? monitor.x + monitor.width : monitor.x;
|
let cornerX = this._rtl ? monitor.x + monitor.width : monitor.x;
|
||||||
let cornerY = monitor.y;
|
let cornerY = monitor.y;
|
||||||
|
|
||||||
let haveTopLeftCorner = true;
|
let haveTopLeftCorner = true;
|
||||||
|
|
||||||
|
if (i != this.primaryIndex) {
|
||||||
// Check if we have a top left (right for RTL) corner.
|
// Check if we have a top left (right for RTL) corner.
|
||||||
// I.e. if there is no monitor directly above or to the left(right)
|
// I.e. if there is no monitor directly above or to the left(right)
|
||||||
let besideX = this._rtl ? monitor.x + 1 : cornerX - 1;
|
let besideX = this._rtl ? monitor.x + 1 : cornerX - 1;
|
||||||
@ -316,15 +343,18 @@ const LayoutManager = new Lang.Class({
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!haveTopLeftCorner)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
let corner = new HotCorner(this);
|
|
||||||
this._hotCorners.push(corner);
|
|
||||||
corner.actor.set_position(cornerX, cornerY);
|
|
||||||
this.addChrome(corner.actor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (haveTopLeftCorner) {
|
||||||
|
let corner = new HotCorner(this, monitor, cornerX, cornerY);
|
||||||
|
corner.setBarrierSize(size);
|
||||||
|
this.hotCorners.push(corner);
|
||||||
|
} else {
|
||||||
|
this.hotCorners.push(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.emit('hot-corners-changed');
|
||||||
},
|
},
|
||||||
|
|
||||||
_createBackground: function(monitorIndex) {
|
_createBackground: function(monitorIndex) {
|
||||||
@ -394,16 +424,16 @@ const LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_panelBoxChanged: function() {
|
_panelBoxChanged: function() {
|
||||||
this.emit('panel-box-changed');
|
this._updatePanelBarrier();
|
||||||
this._updatePanelBarriers();
|
|
||||||
|
let size = this.panelBox.height;
|
||||||
|
this.hotCorners.forEach(function(corner) {
|
||||||
|
if (corner)
|
||||||
|
corner.setBarrierSize(size);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_updatePanelBarriers: function() {
|
_updatePanelBarrier: function() {
|
||||||
if (this._leftPanelBarrier) {
|
|
||||||
this._leftPanelBarrier.destroy();
|
|
||||||
this._leftPanelBarrier = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._rightPanelBarrier) {
|
if (this._rightPanelBarrier) {
|
||||||
this._rightPanelBarrier.destroy();
|
this._rightPanelBarrier.destroy();
|
||||||
this._rightPanelBarrier = null;
|
this._rightPanelBarrier = null;
|
||||||
@ -412,10 +442,6 @@ const LayoutManager = new Lang.Class({
|
|||||||
if (this.panelBox.height) {
|
if (this.panelBox.height) {
|
||||||
let primary = this.primaryMonitor;
|
let primary = this.primaryMonitor;
|
||||||
|
|
||||||
this._leftPanelBarrier = new Meta.Barrier({ display: global.display,
|
|
||||||
x1: primary.x, y1: primary.y,
|
|
||||||
x2: primary.x, y2: primary.y + this.panelBox.height,
|
|
||||||
directions: Meta.BarrierDirection.POSITIVE_X });
|
|
||||||
this._rightPanelBarrier = new Meta.Barrier({ display: global.display,
|
this._rightPanelBarrier = new Meta.Barrier({ display: global.display,
|
||||||
x1: primary.x + primary.width, y1: primary.y,
|
x1: primary.x + primary.width, y1: primary.y,
|
||||||
x2: primary.x + primary.width, y2: primary.y + this.panelBox.height,
|
x2: primary.x + primary.width, y2: primary.y + this.panelBox.height,
|
||||||
@ -423,28 +449,44 @@ const LayoutManager = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_setupTrayPressure: function() {
|
||||||
|
this._trayPressure = new PressureBarrier(MESSAGE_TRAY_PRESSURE_THRESHOLD,
|
||||||
|
MESSAGE_TRAY_PRESSURE_TIMEOUT,
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW);
|
||||||
|
this._trayPressure.setEventFilter(this._trayBarrierEventFilter);
|
||||||
|
this._trayPressure.connect('trigger', function(barrier) {
|
||||||
|
if (Main.layoutManager.bottomMonitor.inFullscreen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Main.messageTray.openTray();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
_updateTrayBarrier: function() {
|
_updateTrayBarrier: function() {
|
||||||
let monitor = this.bottomMonitor;
|
let monitor = this.bottomMonitor;
|
||||||
|
|
||||||
if (this._trayBarrier) {
|
if (this._trayBarrier) {
|
||||||
|
this._trayPressure.removeBarrier(this._trayBarrier);
|
||||||
this._trayBarrier.destroy();
|
this._trayBarrier.destroy();
|
||||||
this._trayBarrier = null;
|
this._trayBarrier = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._trayPressure) {
|
|
||||||
this._trayPressure.destroy();
|
|
||||||
this._trayPressure = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._trayBarrier = new Meta.Barrier({ display: global.display,
|
this._trayBarrier = new Meta.Barrier({ display: global.display,
|
||||||
x1: monitor.x, x2: monitor.x + monitor.width,
|
x1: monitor.x, x2: monitor.x + monitor.width,
|
||||||
y1: monitor.y + monitor.height, y2: monitor.y + monitor.height,
|
y1: monitor.y + monitor.height, y2: monitor.y + monitor.height,
|
||||||
directions: Meta.BarrierDirection.NEGATIVE_Y });
|
directions: Meta.BarrierDirection.NEGATIVE_Y });
|
||||||
|
this._trayPressure.addBarrier(this._trayBarrier);
|
||||||
|
},
|
||||||
|
|
||||||
this._trayPressure = new PressureBarrier(this._trayBarrier, MESSAGE_TRAY_PRESSURE_THRESHOLD, MESSAGE_TRAY_PRESSURE_TIMEOUT);
|
_trayBarrierEventFilter: function(event) {
|
||||||
this._trayPressure.connect('trigger', function(barrier) {
|
// Throw out all events where the pointer was grabbed by another
|
||||||
Main.messageTray.openTray();
|
// client, as the client that grabbed the pointer expects to have
|
||||||
});
|
// complete control over it
|
||||||
|
if (event.grabbed && Main.modalCount == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_monitorsChanged: function() {
|
_monitorsChanged: function() {
|
||||||
@ -515,6 +557,25 @@ const LayoutManager = new Lang.Class({
|
|||||||
return this._keyboardIndex;
|
return this._keyboardIndex;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_loadBackground: function() {
|
||||||
|
this._systemBackground = new Background.SystemBackground();
|
||||||
|
this._systemBackground.actor.hide();
|
||||||
|
|
||||||
|
global.stage.insert_child_below(this._systemBackground.actor, null);
|
||||||
|
|
||||||
|
let constraint = new Clutter.BindConstraint({ source: global.stage,
|
||||||
|
coordinate: Clutter.BindCoordinate.ALL });
|
||||||
|
this._systemBackground.actor.add_constraint(constraint);
|
||||||
|
|
||||||
|
let signalId = this._systemBackground.connect('loaded', Lang.bind(this, function() {
|
||||||
|
this._systemBackground.disconnect(signalId);
|
||||||
|
this._systemBackground.actor.show();
|
||||||
|
global.stage.show();
|
||||||
|
|
||||||
|
this._prepareStartupAnimation();
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
// Startup Animations
|
// Startup Animations
|
||||||
//
|
//
|
||||||
// We have two different animations, depending on whether we're a greeter
|
// We have two different animations, depending on whether we're a greeter
|
||||||
@ -534,7 +595,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
// MetaBackgroundActor inside global.window_group covers the entirety of the
|
// MetaBackgroundActor inside global.window_group covers the entirety of the
|
||||||
// screen. So, we set no_clear_hint at the end of the animation.
|
// screen. So, we set no_clear_hint at the end of the animation.
|
||||||
|
|
||||||
prepareStartupAnimation: function() {
|
_prepareStartupAnimation: function() {
|
||||||
// Set ourselves to FULLSCREEN input mode while the animation is running
|
// Set ourselves to FULLSCREEN input mode while the animation is running
|
||||||
// so events don't get delivered to X11 windows (which are distorted by the animation)
|
// so events don't get delivered to X11 windows (which are distorted by the animation)
|
||||||
global.stage_input_mode = Shell.StageInputMode.FULLSCREEN;
|
global.stage_input_mode = Shell.StageInputMode.FULLSCREEN;
|
||||||
@ -557,40 +618,24 @@ const LayoutManager = new Lang.Class({
|
|||||||
y / global.screen_height);
|
y / global.screen_height);
|
||||||
this.uiGroup.scale_x = this.uiGroup.scale_y = 0.5;
|
this.uiGroup.scale_x = this.uiGroup.scale_y = 0.5;
|
||||||
this.uiGroup.opacity = 0;
|
this.uiGroup.opacity = 0;
|
||||||
|
global.window_group.set_clip(monitor.x, monitor.y, monitor.width, monitor.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._systemBackground = new Background.SystemBackground();
|
this.emit('startup-prepared');
|
||||||
this._systemBackground.actor.hide();
|
|
||||||
|
|
||||||
global.stage.insert_child_below(this._systemBackground.actor, null);
|
|
||||||
|
|
||||||
let constraint = new Clutter.BindConstraint({ source: global.stage,
|
|
||||||
coordinate: Clutter.BindCoordinate.ALL });
|
|
||||||
this._systemBackground.actor.add_constraint(constraint);
|
|
||||||
|
|
||||||
let signalId = this._systemBackground.connect('loaded',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
this._systemBackground.disconnect(signalId);
|
|
||||||
this._systemBackground.actor.show();
|
|
||||||
|
|
||||||
// We're mostly prepared for the startup animation
|
// We're mostly prepared for the startup animation
|
||||||
// now, but since a lot is going on asynchronously
|
// now, but since a lot is going on asynchronously
|
||||||
// during startup, let's defer emission of the
|
// during startup, let's defer the startup animation
|
||||||
// startup-prepared signal until the event loop is
|
// until the event loop is uncontended and idle.
|
||||||
// uncontended and idle. This helps to prevent us
|
// This helps to prevent us from running the animation
|
||||||
// from running the animation when the system is
|
// when the system is bogged down
|
||||||
// bogged down
|
GLib.idle_add(GLib.PRIORITY_LOW, Lang.bind(this, function() {
|
||||||
GLib.idle_add(GLib.PRIORITY_LOW,
|
this._startupAnimation();
|
||||||
Lang.bind(this, function() {
|
|
||||||
this.emit('startup-prepared');
|
|
||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
}));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
startupAnimation: function() {
|
_startupAnimation: function() {
|
||||||
global.stage.show();
|
|
||||||
if (Main.sessionMode.isGreeter)
|
if (Main.sessionMode.isGreeter)
|
||||||
this._startupAnimationGreeter();
|
this._startupAnimationGreeter();
|
||||||
else
|
else
|
||||||
@ -633,16 +678,17 @@ const LayoutManager = new Lang.Class({
|
|||||||
this.trayBox.show();
|
this.trayBox.show();
|
||||||
this.keyboardBox.show();
|
this.keyboardBox.show();
|
||||||
|
|
||||||
if (!Main.sessionMode.isGreeter)
|
if (!Main.sessionMode.isGreeter) {
|
||||||
this._createSecondaryBackgrounds();
|
this._createSecondaryBackgrounds();
|
||||||
|
global.window_group.remove_clip();
|
||||||
this.emit('panel-box-changed');
|
}
|
||||||
|
|
||||||
this._queueUpdateRegions();
|
this._queueUpdateRegions();
|
||||||
|
|
||||||
|
this.emit('startup-complete');
|
||||||
},
|
},
|
||||||
|
|
||||||
showKeyboard: function () {
|
showKeyboard: function () {
|
||||||
this.keyboardBox.raise_top();
|
|
||||||
Tweener.addTween(this.keyboardBox,
|
Tweener.addTween(this.keyboardBox,
|
||||||
{ anchor_y: this.keyboardBox.height,
|
{ anchor_y: this.keyboardBox.height,
|
||||||
time: KEYBOARD_ANIMATION_TIME,
|
time: KEYBOARD_ANIMATION_TIME,
|
||||||
@ -687,11 +733,10 @@ const LayoutManager = new Lang.Class({
|
|||||||
// @actor: an actor to add to the chrome
|
// @actor: an actor to add to the chrome
|
||||||
// @params: (optional) additional params
|
// @params: (optional) additional params
|
||||||
//
|
//
|
||||||
// Adds @actor to the chrome, and (unless %affectsInputRegion in
|
// Adds @actor to the chrome, and extends the input region
|
||||||
// @params is %false) extends the input region to include it.
|
// to include it. Changes in @actor's size, position, and
|
||||||
// Changes in @actor's size, position, and visibility will
|
// visibility will automatically result in appropriate changes
|
||||||
// automatically result in appropriate changes to the input
|
// to the input region.
|
||||||
// region.
|
|
||||||
//
|
//
|
||||||
// If %affectsStruts in @params is %true (and @actor is along a
|
// If %affectsStruts in @params is %true (and @actor is along a
|
||||||
// screen edge), then @actor's size and position will also affect
|
// screen edge), then @actor's size and position will also affect
|
||||||
@ -814,6 +859,11 @@ const LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateVisibility: function() {
|
_updateVisibility: function() {
|
||||||
|
let windowsVisible = Main.sessionMode.hasWindows && !this._inOverview;
|
||||||
|
|
||||||
|
global.window_group.visible = windowsVisible;
|
||||||
|
global.top_window_group.visible = windowsVisible;
|
||||||
|
|
||||||
for (let i = 0; i < this._trackedActors.length; i++) {
|
for (let i = 0; i < this._trackedActors.length; i++) {
|
||||||
let actorData = this._trackedActors[i], visible;
|
let actorData = this._trackedActors[i], visible;
|
||||||
if (!actorData.trackFullscreen)
|
if (!actorData.trackFullscreen)
|
||||||
@ -821,7 +871,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
if (!actorData.isToplevel)
|
if (!actorData.isToplevel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (this._inOverview || !Main.sessionMode.hasWindows)
|
if (!windowsVisible)
|
||||||
visible = true;
|
visible = true;
|
||||||
else if (this.findMonitorForActor(actorData.actor).inFullscreen)
|
else if (this.findMonitorForActor(actorData.actor).inFullscreen)
|
||||||
visible = false;
|
visible = false;
|
||||||
@ -871,95 +921,20 @@ const LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateFullscreen: function() {
|
_updateFullscreen: function() {
|
||||||
let windows = this._getWindowActorsForWorkspace(global.screen.get_active_workspace());
|
this._updateVisibility();
|
||||||
|
this._queueUpdateRegions();
|
||||||
// Reset all monitors to not fullscreen
|
|
||||||
for (let i = 0; i < this.monitors.length; i++)
|
|
||||||
this.monitors[i].inFullscreen = false;
|
|
||||||
|
|
||||||
// Ordinary chrome should be visible unless there is a window
|
|
||||||
// with layer FULLSCREEN, or a window with layer
|
|
||||||
// OVERRIDE_REDIRECT that covers the whole screen.
|
|
||||||
// ('override_redirect' is not actually a layer above all
|
|
||||||
// other windows, but this seems to be how mutter treats it
|
|
||||||
// currently...) If we wanted to be extra clever, we could
|
|
||||||
// figure out when an OVERRIDE_REDIRECT window was trying to
|
|
||||||
// partially overlap us, and then adjust the input region and
|
|
||||||
// our clip region accordingly...
|
|
||||||
|
|
||||||
// @windows is sorted bottom to top.
|
|
||||||
|
|
||||||
for (let i = windows.length - 1; i > -1; i--) {
|
|
||||||
let window = windows[i];
|
|
||||||
let metaWindow = window.meta_window;
|
|
||||||
let layer = metaWindow.get_layer();
|
|
||||||
|
|
||||||
// Skip minimized windows
|
|
||||||
if (!metaWindow.showing_on_its_workspace())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (layer == Meta.StackLayer.FULLSCREEN ||
|
|
||||||
(layer == Meta.StackLayer.OVERRIDE_REDIRECT && metaWindow.is_monitor_sized())) {
|
|
||||||
if (metaWindow.is_screen_sized()) {
|
|
||||||
for (let i = 0; i < this.monitors.length; i++)
|
|
||||||
this.monitors[i].inFullscreen = true;
|
|
||||||
} else {
|
|
||||||
let monitors = metaWindow.get_all_monitors();
|
|
||||||
for (let i = 0; i < monitors.length; i++) {
|
|
||||||
let index = monitors[i];
|
|
||||||
this.monitors[index].inFullscreen = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowsRestacked: function() {
|
_windowsRestacked: function() {
|
||||||
let wasInFullscreen = [];
|
|
||||||
for (let i = 0; i < this.monitors.length; i++)
|
|
||||||
wasInFullscreen[i] = this.monitors[i].inFullscreen;
|
|
||||||
|
|
||||||
let primaryWasInFullscreen = this.primaryMonitor.inFullscreen;
|
|
||||||
|
|
||||||
this._updateFullscreen();
|
|
||||||
|
|
||||||
let changed = false;
|
let changed = false;
|
||||||
for (let i = 0; i < wasInFullscreen.length; i++) {
|
|
||||||
if (wasInFullscreen[i] != this.monitors[i].inFullscreen) {
|
|
||||||
changed = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!changed && (this._isPopupWindowVisible != global.top_window_group.get_children().some(isPopupMetaWindow)))
|
if (this._isPopupWindowVisible != global.top_window_group.get_children().some(isPopupMetaWindow))
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
this._queueUpdateRegions();
|
this._queueUpdateRegions();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (primaryWasInFullscreen != this.primaryMonitor.inFullscreen) {
|
|
||||||
let windows = this._getWindowActorsForWorkspace(global.screen.get_active_workspace());
|
|
||||||
for (let i = 0; i < windows.length; i++) {
|
|
||||||
let window = windows[i];
|
|
||||||
let metaWindow = window.meta_window;
|
|
||||||
|
|
||||||
// Skip minimized windows
|
|
||||||
if (!metaWindow.showing_on_its_workspace())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Skip windows that aren't on the primary monitor
|
|
||||||
if (!metaWindow.is_on_primary_monitor())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Minimize monitor sized windows that are not focused
|
|
||||||
if (metaWindow.is_monitor_sized() &&
|
|
||||||
!metaWindow.appears_focused)
|
|
||||||
metaWindow.minimize();
|
|
||||||
}
|
|
||||||
this.emit('primary-fullscreen-changed', this.primaryMonitor.inFullscreen);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateRegions: function() {
|
_updateRegions: function() {
|
||||||
@ -975,7 +950,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
for (i = 0; i < this._trackedActors.length; i++) {
|
for (i = 0; i < this._trackedActors.length; i++) {
|
||||||
let actorData = this._trackedActors[i];
|
let actorData = this._trackedActors[i];
|
||||||
if (!(actorData.affectsInputRegion && wantsInputRegion) && !actorData.affectsStruts)
|
if (!wantsInputRegion && !actorData.affectsStruts)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
let [x, y] = actorData.actor.get_transformed_position();
|
let [x, y] = actorData.actor.get_transformed_position();
|
||||||
@ -985,13 +960,8 @@ const LayoutManager = new Lang.Class({
|
|||||||
w = Math.round(w);
|
w = Math.round(w);
|
||||||
h = Math.round(h);
|
h = Math.round(h);
|
||||||
|
|
||||||
if (actorData.affectsInputRegion && wantsInputRegion) {
|
if (wantsInputRegion && actorData.actor.get_paint_visibility())
|
||||||
let rect = new Meta.Rectangle({ x: x, y: y, width: w, height: h});
|
rects.push(new Meta.Rectangle({ x: x, y: y, width: w, height: h }));
|
||||||
|
|
||||||
if (actorData.actor.get_paint_visibility() &&
|
|
||||||
!this.uiGroup.get_skip_paint(actorData.actor))
|
|
||||||
rects.push(rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actorData.affectsStruts) {
|
if (actorData.affectsStruts) {
|
||||||
// Limit struts to the size of the screen
|
// Limit struts to the size of the screen
|
||||||
@ -1089,54 +1059,25 @@ Signals.addSignalMethods(LayoutManager.prototype);
|
|||||||
const HotCorner = new Lang.Class({
|
const HotCorner = new Lang.Class({
|
||||||
Name: 'HotCorner',
|
Name: 'HotCorner',
|
||||||
|
|
||||||
_init : function(layoutManager) {
|
_init : function(layoutManager, monitor, x, y) {
|
||||||
// We use this flag to mark the case where the user has entered the
|
// We use this flag to mark the case where the user has entered the
|
||||||
// hot corner and has not left both the hot corner and a surrounding
|
// hot corner and has not left both the hot corner and a surrounding
|
||||||
// guard area (the "environs"). This avoids triggering the hot corner
|
// guard area (the "environs"). This avoids triggering the hot corner
|
||||||
// multiple times due to an accidental jitter.
|
// multiple times due to an accidental jitter.
|
||||||
this._entered = false;
|
this._entered = false;
|
||||||
|
|
||||||
this.actor = new Clutter.Actor({ name: 'hot-corner-environs',
|
this._monitor = monitor;
|
||||||
width: 3,
|
|
||||||
height: 3,
|
|
||||||
reactive: true });
|
|
||||||
|
|
||||||
this._corner = new Clutter.Rectangle({ name: 'hot-corner',
|
this._x = x;
|
||||||
width: 1,
|
this._y = y;
|
||||||
height: 1,
|
|
||||||
opacity: 0,
|
|
||||||
reactive: true });
|
|
||||||
this._corner._delegate = this;
|
|
||||||
|
|
||||||
this.actor.add_child(this._corner);
|
this._setupFallbackCornerIfNeeded(layoutManager);
|
||||||
|
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
|
this._pressureBarrier = new PressureBarrier(HOT_CORNER_PRESSURE_THRESHOLD,
|
||||||
this._corner.set_position(this.actor.width - this._corner.width, 0);
|
HOT_CORNER_PRESSURE_TIMEOUT,
|
||||||
this.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
Shell.KeyBindingMode.NORMAL |
|
||||||
} else {
|
Shell.KeyBindingMode.OVERVIEW);
|
||||||
this._corner.set_position(0, 0);
|
this._pressureBarrier.connect('trigger', Lang.bind(this, this._toggleOverview));
|
||||||
}
|
|
||||||
|
|
||||||
this._activationTime = 0;
|
|
||||||
|
|
||||||
this.actor.connect('leave-event',
|
|
||||||
Lang.bind(this, this._onEnvironsLeft));
|
|
||||||
|
|
||||||
// Clicking on the hot corner environs should result in the
|
|
||||||
// same behavior as clicking on the hot corner.
|
|
||||||
this.actor.connect('button-release-event',
|
|
||||||
Lang.bind(this, this._onCornerClicked));
|
|
||||||
|
|
||||||
// In addition to being triggered by the mouse enter event,
|
|
||||||
// the hot corner can be triggered by clicking on it. This is
|
|
||||||
// useful if the user wants to undo the effect of triggering
|
|
||||||
// the hot corner once in the hot corner.
|
|
||||||
this._corner.connect('enter-event',
|
|
||||||
Lang.bind(this, this._onCornerEntered));
|
|
||||||
this._corner.connect('button-release-event',
|
|
||||||
Lang.bind(this, this._onCornerClicked));
|
|
||||||
this._corner.connect('leave-event',
|
|
||||||
Lang.bind(this, this._onCornerLeft));
|
|
||||||
|
|
||||||
// Cache the three ripples instead of dynamically creating and destroying them.
|
// Cache the three ripples instead of dynamically creating and destroying them.
|
||||||
this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
|
this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
|
||||||
@ -1148,7 +1089,82 @@ const HotCorner = new Lang.Class({
|
|||||||
layoutManager.uiGroup.add_actor(this._ripple3);
|
layoutManager.uiGroup.add_actor(this._ripple3);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setBarrierSize: function(size) {
|
||||||
|
if (this._verticalBarrier) {
|
||||||
|
this._pressureBarrier.removeBarrier(this._verticalBarrier);
|
||||||
|
this._verticalBarrier.destroy();
|
||||||
|
this._verticalBarrier = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._horizontalBarrier) {
|
||||||
|
this._pressureBarrier.removeBarrier(this._horizontalBarrier);
|
||||||
|
this._horizontalBarrier.destroy();
|
||||||
|
this._horizontalBarrier = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size > 0) {
|
||||||
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
|
||||||
|
this._verticalBarrier = new Meta.Barrier({ display: global.display,
|
||||||
|
x1: this._x, x2: this._x, y1: this._y, y2: this._y + size,
|
||||||
|
directions: Meta.BarrierDirection.NEGATIVE_X });
|
||||||
|
this._horizontalBarrier = new Meta.Barrier({ display: global.display,
|
||||||
|
x1: this._x - size, x2: this._x, y1: this._y, y2: this._y,
|
||||||
|
directions: Meta.BarrierDirection.POSITIVE_Y });
|
||||||
|
} else {
|
||||||
|
this._verticalBarrier = new Meta.Barrier({ display: global.display,
|
||||||
|
x1: this._x, x2: this._x, y1: this._y, y2: this._y + size,
|
||||||
|
directions: Meta.BarrierDirection.POSITIVE_X });
|
||||||
|
this._horizontalBarrier = new Meta.Barrier({ display: global.display,
|
||||||
|
x1: this._x, x2: this._x + size, y1: this._y, y2: this._y,
|
||||||
|
directions: Meta.BarrierDirection.POSITIVE_Y });
|
||||||
|
}
|
||||||
|
|
||||||
|
this._pressureBarrier.addBarrier(this._verticalBarrier);
|
||||||
|
this._pressureBarrier.addBarrier(this._horizontalBarrier);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_setupFallbackCornerIfNeeded: function(layoutManager) {
|
||||||
|
if (!global.display.supports_extended_barriers()) {
|
||||||
|
this.actor = new Clutter.Actor({ name: 'hot-corner-environs',
|
||||||
|
x: this._x, y: this._y,
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
reactive: true });
|
||||||
|
|
||||||
|
this._corner = new Clutter.Actor({ name: 'hot-corner',
|
||||||
|
width: 1,
|
||||||
|
height: 1,
|
||||||
|
opacity: 0,
|
||||||
|
reactive: true });
|
||||||
|
this._corner._delegate = this;
|
||||||
|
|
||||||
|
this.actor.add_child(this._corner);
|
||||||
|
layoutManager.addChrome(this.actor);
|
||||||
|
|
||||||
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
|
||||||
|
this._corner.set_position(this.actor.width - this._corner.width, 0);
|
||||||
|
this.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
||||||
|
} else {
|
||||||
|
this._corner.set_position(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.actor.connect('leave-event',
|
||||||
|
Lang.bind(this, this._onEnvironsLeft));
|
||||||
|
|
||||||
|
this._corner.connect('enter-event',
|
||||||
|
Lang.bind(this, this._onCornerEntered));
|
||||||
|
this._corner.connect('leave-event',
|
||||||
|
Lang.bind(this, this._onCornerLeft));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
|
this.setBarrierSize(0);
|
||||||
|
this._pressureBarrier.destroy();
|
||||||
|
this._pressureBarrier = null;
|
||||||
|
|
||||||
|
if (this.actor)
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1169,9 +1185,8 @@ const HotCorner = new Lang.Class({
|
|||||||
ripple.opacity = 255 * Math.sqrt(startOpacity);
|
ripple.opacity = 255 * Math.sqrt(startOpacity);
|
||||||
ripple.scale_x = ripple.scale_y = startScale;
|
ripple.scale_x = ripple.scale_y = startScale;
|
||||||
|
|
||||||
let [x, y] = this._corner.get_transformed_position();
|
ripple.x = this._x;
|
||||||
ripple.x = x;
|
ripple.y = this._y;
|
||||||
ripple.y = y;
|
|
||||||
|
|
||||||
Tweener.addTween(ripple, { _opacity: 0,
|
Tweener.addTween(ripple, { _opacity: 0,
|
||||||
scale_x: finalScale,
|
scale_x: finalScale,
|
||||||
@ -1183,7 +1198,7 @@ const HotCorner = new Lang.Class({
|
|||||||
onComplete: function() { ripple.visible = false; } });
|
onComplete: function() { ripple.visible = false; } });
|
||||||
},
|
},
|
||||||
|
|
||||||
rippleAnimation: function() {
|
_rippleAnimation: function() {
|
||||||
// Show three concentric ripples expanding outwards; the exact
|
// Show three concentric ripples expanding outwards; the exact
|
||||||
// parameters were found by trial and error, so don't look
|
// parameters were found by trial and error, so don't look
|
||||||
// for them to make perfect sense mathematically
|
// for them to make perfect sense mathematically
|
||||||
@ -1194,14 +1209,21 @@ const HotCorner = new Lang.Class({
|
|||||||
this._animRipple(this._ripple3, 0.35, 1.0, 0.0, 0.3, 1);
|
this._animRipple(this._ripple3, 0.35, 1.0, 0.0, 0.3, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_toggleOverview: function() {
|
||||||
|
if (this._monitor.inFullscreen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Main.overview.shouldToggleByCornerOrButton()) {
|
||||||
|
this._rippleAnimation();
|
||||||
|
Main.overview.toggle();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
handleDragOver: function(source, actor, x, y, time) {
|
handleDragOver: function(source, actor, x, y, time) {
|
||||||
if (source != Main.xdndHandler)
|
if (source != Main.xdndHandler)
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
|
|
||||||
if (!Main.overview.visible && !Main.overview.animationInProgress) {
|
this._toggleOverview();
|
||||||
this.rippleAnimation();
|
|
||||||
Main.overview.showTemporarily();
|
|
||||||
}
|
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
@ -1209,22 +1231,11 @@ const HotCorner = new Lang.Class({
|
|||||||
_onCornerEntered : function() {
|
_onCornerEntered : function() {
|
||||||
if (!this._entered) {
|
if (!this._entered) {
|
||||||
this._entered = true;
|
this._entered = true;
|
||||||
if (!Main.overview.animationInProgress) {
|
this._toggleOverview();
|
||||||
this._activationTime = Date.now() / 1000;
|
|
||||||
|
|
||||||
this.rippleAnimation();
|
|
||||||
Main.overview.toggle();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCornerClicked : function() {
|
|
||||||
if (this.shouldToggleOverviewOnClick())
|
|
||||||
Main.overview.toggle();
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onCornerLeft : function(actor, event) {
|
_onCornerLeft : function(actor, event) {
|
||||||
if (event.get_related() != this.actor)
|
if (event.get_related() != this.actor)
|
||||||
this._entered = false;
|
this._entered = false;
|
||||||
@ -1236,42 +1247,47 @@ const HotCorner = new Lang.Class({
|
|||||||
if (event.get_related() != this._corner)
|
if (event.get_related() != this._corner)
|
||||||
this._entered = false;
|
this._entered = false;
|
||||||
return false;
|
return false;
|
||||||
},
|
|
||||||
|
|
||||||
// Checks if the Activities button is currently sensitive to
|
|
||||||
// clicks. The first call to this function within the
|
|
||||||
// HOT_CORNER_ACTIVATION_TIMEOUT time of the hot corner being
|
|
||||||
// triggered will return false. This avoids opening and closing
|
|
||||||
// the overview if the user both triggered the hot corner and
|
|
||||||
// clicked the Activities button.
|
|
||||||
shouldToggleOverviewOnClick: function() {
|
|
||||||
if (Main.overview.animationInProgress)
|
|
||||||
return false;
|
|
||||||
if (this._activationTime == 0 || Date.now() / 1000 - this._activationTime > HOT_CORNER_ACTIVATION_TIMEOUT)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const PressureBarrier = new Lang.Class({
|
const PressureBarrier = new Lang.Class({
|
||||||
Name: 'PressureBarrier',
|
Name: 'PressureBarrier',
|
||||||
|
|
||||||
_init: function(barrier, threshold, timeout) {
|
_init: function(threshold, timeout, keybindingMode) {
|
||||||
this._barrier = barrier;
|
|
||||||
this._threshold = threshold;
|
this._threshold = threshold;
|
||||||
this._timeout = timeout;
|
this._timeout = timeout;
|
||||||
this._orientation = (barrier.y1 == barrier.y2) ? Clutter.Orientation.HORIZONTAL : Clutter.Orientation.VERTICAL;
|
this._keybindingMode = keybindingMode;
|
||||||
|
this._barriers = [];
|
||||||
|
this._eventFilter = null;
|
||||||
|
|
||||||
|
this._isTriggered = false;
|
||||||
this._reset();
|
this._reset();
|
||||||
|
},
|
||||||
|
|
||||||
this._barrierHitId = this._barrier.connect('hit', Lang.bind(this, this._onBarrierHit));
|
addBarrier: function(barrier) {
|
||||||
this._barrierLeftId = this._barrier.connect('left', Lang.bind(this, this._onBarrierLeft));
|
barrier._pressureHitId = barrier.connect('hit', Lang.bind(this, this._onBarrierHit));
|
||||||
|
barrier._pressureLeftId = barrier.connect('left', Lang.bind(this, this._onBarrierLeft));
|
||||||
|
|
||||||
|
this._barriers.push(barrier);
|
||||||
|
},
|
||||||
|
|
||||||
|
_disconnectBarrier: function(barrier) {
|
||||||
|
barrier.disconnect(barrier._pressureHitId);
|
||||||
|
barrier.disconnect(barrier._pressureLeftId);
|
||||||
|
},
|
||||||
|
|
||||||
|
removeBarrier: function(barrier) {
|
||||||
|
this._disconnectBarrier(barrier);
|
||||||
|
this._barriers.splice(this._barriers.indexOf(barrier), 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
this._barrier.disconnect(this._barrierHitId);
|
this._barriers.forEach(Lang.bind(this, this._disconnectBarrier));
|
||||||
this._barrier.disconnect(this._barrierLeftId);
|
this._barriers = [];
|
||||||
this._barrier = null;
|
},
|
||||||
|
|
||||||
|
setEventFilter: function(filter) {
|
||||||
|
this._eventFilter = filter;
|
||||||
},
|
},
|
||||||
|
|
||||||
_reset: function() {
|
_reset: function() {
|
||||||
@ -1280,33 +1296,34 @@ const PressureBarrier = new Lang.Class({
|
|||||||
this._lastTime = 0;
|
this._lastTime = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
_getDistanceAcrossBarrier: function(event) {
|
_isHorizontal: function(barrier) {
|
||||||
if (this._orientation == Clutter.Orientation.HORIZONTAL)
|
return barrier.y1 == barrier.y2;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getDistanceAcrossBarrier: function(barrier, event) {
|
||||||
|
if (this._isHorizontal(barrier))
|
||||||
return Math.abs(event.dy);
|
return Math.abs(event.dy);
|
||||||
else
|
else
|
||||||
return Math.abs(event.dx);
|
return Math.abs(event.dx);
|
||||||
},
|
},
|
||||||
|
|
||||||
_getDistanceAlongBarrier: function(event) {
|
_getDistanceAlongBarrier: function(barrier, event) {
|
||||||
if (this._orientation == Clutter.Orientation.HORIZONTAL)
|
if (this._isHorizontal(barrier))
|
||||||
return Math.abs(event.dx);
|
return Math.abs(event.dx);
|
||||||
else
|
else
|
||||||
return Math.abs(event.dy);
|
return Math.abs(event.dy);
|
||||||
},
|
},
|
||||||
|
|
||||||
_isBarrierEventTooOld: function(event) {
|
|
||||||
// Ignore all events older than this time
|
|
||||||
let threshold = this._lastTime - this._timeout;
|
|
||||||
return event.time < threshold;
|
|
||||||
},
|
|
||||||
|
|
||||||
_trimBarrierEvents: function() {
|
_trimBarrierEvents: function() {
|
||||||
// Events are guaranteed to be sorted in time order from
|
// Events are guaranteed to be sorted in time order from
|
||||||
// oldest to newest, so just look for the first old event,
|
// oldest to newest, so just look for the first old event,
|
||||||
// and then chop events after that off.
|
// and then chop events after that off.
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
let threshold = this._lastTime - this._timeout;
|
||||||
|
|
||||||
while (i < this._barrierEvents.length) {
|
while (i < this._barrierEvents.length) {
|
||||||
if (!this._isBarrierEventTooOld(this._barrierEvents[i]))
|
let [time, distance] = this._barrierEvents[i];
|
||||||
|
if (time >= threshold)
|
||||||
break;
|
break;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@ -1314,7 +1331,8 @@ const PressureBarrier = new Lang.Class({
|
|||||||
let firstNewEvent = i;
|
let firstNewEvent = i;
|
||||||
|
|
||||||
for (i = 0; i < firstNewEvent; i++) {
|
for (i = 0; i < firstNewEvent; i++) {
|
||||||
this._currentPressure -= this._getDistanceAcrossBarrier(this._barrierEvents[i]);
|
let [time, distance] = this._barrierEvents[i];
|
||||||
|
this._currentPressure -= distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._barrierEvents = this._barrierEvents.slice(firstNewEvent);
|
this._barrierEvents = this._barrierEvents.slice(firstNewEvent);
|
||||||
@ -1322,29 +1340,30 @@ const PressureBarrier = new Lang.Class({
|
|||||||
|
|
||||||
_onBarrierLeft: function(barrier, event) {
|
_onBarrierLeft: function(barrier, event) {
|
||||||
this._reset();
|
this._reset();
|
||||||
|
this._isTriggered = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_trigger: function() {
|
_trigger: function() {
|
||||||
|
this._isTriggered = true;
|
||||||
this.emit('trigger');
|
this.emit('trigger');
|
||||||
this._reset();
|
this._reset();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onBarrierHit: function(barrier, event) {
|
_onBarrierHit: function(barrier, event) {
|
||||||
// Throw out all events where the pointer was grabbed by another
|
// If we've triggered the barrier, wait until the pointer has the
|
||||||
// client, as the client that grabbed the pointer expects to have
|
// left the barrier hitbox until we trigger it again.
|
||||||
// complete control over it
|
if (this._isTriggered)
|
||||||
if (event.grabbed && Main.modalCount == 0)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let isOverview = ((Main.keybindingMode & (Shell.KeyBindingMode.OVERVIEW)) != 0);
|
if (this._eventFilter && this._eventFilter(event))
|
||||||
|
|
||||||
// Throw out events where the grab is taken by something that's
|
|
||||||
// not the overview (modal dialogs, etc.)
|
|
||||||
if (event.grabbed && !isOverview)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let slide = this._getDistanceAlongBarrier(event);
|
// Throw out all events not in the proper keybinding mode
|
||||||
let distance = this._getDistanceAcrossBarrier(event);
|
if (!(this._keybindingMode & Main.keybindingMode))
|
||||||
|
return;
|
||||||
|
|
||||||
|
let slide = this._getDistanceAlongBarrier(barrier, event);
|
||||||
|
let distance = this._getDistanceAcrossBarrier(barrier, event);
|
||||||
|
|
||||||
if (distance >= this._threshold) {
|
if (distance >= this._threshold) {
|
||||||
this._trigger();
|
this._trigger();
|
||||||
@ -1360,8 +1379,10 @@ const PressureBarrier = new Lang.Class({
|
|||||||
this._lastTime = event.time;
|
this._lastTime = event.time;
|
||||||
|
|
||||||
this._trimBarrierEvents();
|
this._trimBarrierEvents();
|
||||||
this._barrierEvents.push(event);
|
distance = Math.min(15, distance);
|
||||||
this._currentPressure += Math.min(15, distance);
|
|
||||||
|
this._barrierEvents.push([event.time, distance]);
|
||||||
|
this._currentPressure += distance;
|
||||||
|
|
||||||
if (this._currentPressure >= this._threshold)
|
if (this._currentPressure >= this._threshold)
|
||||||
this._trigger();
|
this._trigger();
|
||||||
|
@ -308,10 +308,6 @@ const Result = new Lang.Class({
|
|||||||
box.add(resultTxt);
|
box.add(resultTxt);
|
||||||
let objLink = new ObjLink(this._lookingGlass, o);
|
let objLink = new ObjLink(this._lookingGlass, o);
|
||||||
box.add(objLink.actor);
|
box.add(objLink.actor);
|
||||||
let line = new Clutter.Rectangle({ name: 'Separator' });
|
|
||||||
let padBin = new St.Bin({ name: 'Separator', x_fill: true, y_fill: true });
|
|
||||||
padBin.add_actor(line);
|
|
||||||
this.actor.add(padBin);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -989,28 +985,18 @@ const LookingGlass = new Lang.Class({
|
|||||||
|
|
||||||
_showCompletions: function(completions) {
|
_showCompletions: function(completions) {
|
||||||
if (!this._completionActor) {
|
if (!this._completionActor) {
|
||||||
let actor = new St.BoxLayout({ vertical: true });
|
this._completionActor = new St.Label({ name: 'LookingGlassAutoCompletionText', style_class: 'lg-completions-text' });
|
||||||
|
this._completionActor.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
||||||
this._completionText = new St.Label({ name: 'LookingGlassAutoCompletionText', style_class: 'lg-completions-text' });
|
this._completionActor.clutter_text.line_wrap = true;
|
||||||
this._completionText.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
|
|
||||||
this._completionText.clutter_text.line_wrap = true;
|
|
||||||
actor.add(this._completionText);
|
|
||||||
|
|
||||||
let line = new Clutter.Rectangle();
|
|
||||||
let padBin = new St.Bin({ x_fill: true, y_fill: true });
|
|
||||||
padBin.add_actor(line);
|
|
||||||
actor.add(padBin);
|
|
||||||
|
|
||||||
this._completionActor = actor;
|
|
||||||
this._evalBox.insert_child_below(this._completionActor, this._entryArea);
|
this._evalBox.insert_child_below(this._completionActor, this._entryArea);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._completionText.set_text(completions.join(', '));
|
this._completionActor.set_text(completions.join(', '));
|
||||||
|
|
||||||
// Setting the height to -1 allows us to get its actual preferred height rather than
|
// Setting the height to -1 allows us to get its actual preferred height rather than
|
||||||
// whatever was last given in set_height by Tweener.
|
// whatever was last given in set_height by Tweener.
|
||||||
this._completionActor.set_height(-1);
|
this._completionActor.set_height(-1);
|
||||||
let [minHeight, naturalHeight] = this._completionText.get_preferred_height(this._resultsArea.get_width());
|
let [minHeight, naturalHeight] = this._completionActor.get_preferred_height(this._resultsArea.get_width());
|
||||||
|
|
||||||
// Don't reanimate if we are already visible
|
// Don't reanimate if we are already visible
|
||||||
if (this._completionActor.visible) {
|
if (this._completionActor.visible) {
|
||||||
|
257
js/ui/main.js
257
js/ui/main.js
@ -24,6 +24,7 @@ const Panel = imports.ui.panel;
|
|||||||
const Params = imports.misc.params;
|
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 LoginManager = imports.misc.loginManager;
|
||||||
const LookingGlass = imports.ui.lookingGlass;
|
const LookingGlass = imports.ui.lookingGlass;
|
||||||
const NotificationDaemon = imports.ui.notificationDaemon;
|
const NotificationDaemon = imports.ui.notificationDaemon;
|
||||||
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
|
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
|
||||||
@ -32,15 +33,16 @@ const Scripting = imports.ui.scripting;
|
|||||||
const SessionMode = imports.ui.sessionMode;
|
const SessionMode = imports.ui.sessionMode;
|
||||||
const ShellDBus = imports.ui.shellDBus;
|
const ShellDBus = imports.ui.shellDBus;
|
||||||
const ShellMountOperation = imports.ui.shellMountOperation;
|
const ShellMountOperation = imports.ui.shellMountOperation;
|
||||||
const UnlockDialog = imports.ui.unlockDialog;
|
|
||||||
const WindowManager = imports.ui.windowManager;
|
const WindowManager = imports.ui.windowManager;
|
||||||
const Magnifier = imports.ui.magnifier;
|
const Magnifier = imports.ui.magnifier;
|
||||||
const XdndHandler = imports.ui.xdndHandler;
|
const XdndHandler = imports.ui.xdndHandler;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
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 A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
|
||||||
|
const STICKY_KEYS_ENABLE = 'stickykeys-enable';
|
||||||
|
|
||||||
let componentManager = null;
|
let componentManager = null;
|
||||||
let panel = null;
|
let panel = null;
|
||||||
let overview = null;
|
let overview = null;
|
||||||
@ -58,7 +60,7 @@ let shellDBusService = null;
|
|||||||
let shellMountOpDBusService = null;
|
let shellMountOpDBusService = null;
|
||||||
let screenSaverDBus = null;
|
let screenSaverDBus = null;
|
||||||
let modalCount = 0;
|
let modalCount = 0;
|
||||||
let keybindingMode = Shell.KeyBindingMode.NORMAL;
|
let keybindingMode = Shell.KeyBindingMode.NONE;
|
||||||
let modalActorFocusStack = [];
|
let modalActorFocusStack = [];
|
||||||
let uiGroup = null;
|
let uiGroup = null;
|
||||||
let magnifier = null;
|
let magnifier = null;
|
||||||
@ -68,9 +70,11 @@ let layoutManager = null;
|
|||||||
let _startDate;
|
let _startDate;
|
||||||
let _defaultCssStylesheet = null;
|
let _defaultCssStylesheet = null;
|
||||||
let _cssStylesheet = null;
|
let _cssStylesheet = null;
|
||||||
let _overridesSettings = null;
|
let _a11ySettings = null;
|
||||||
|
|
||||||
function _sessionUpdated() {
|
function _sessionUpdated() {
|
||||||
|
_loadDefaultStylesheet();
|
||||||
|
|
||||||
wm.setCustomKeybindingHandler('panel-main-menu',
|
wm.setCustomKeybindingHandler('panel-main-menu',
|
||||||
Shell.KeyBindingMode.NORMAL |
|
Shell.KeyBindingMode.NORMAL |
|
||||||
Shell.KeyBindingMode.OVERVIEW,
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
@ -82,8 +86,9 @@ function _sessionUpdated() {
|
|||||||
Shell.KeyBindingMode.NORMAL |
|
Shell.KeyBindingMode.NORMAL |
|
||||||
Shell.KeyBindingMode.OVERVIEW,
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
sessionMode.hasRunDialog ? openRunDialog : null);
|
sessionMode.hasRunDialog ? openRunDialog : null);
|
||||||
if (sessionMode.isGreeter)
|
|
||||||
screenShield.showDialog();
|
if (!sessionMode.hasRunDialog && lookingGlass)
|
||||||
|
lookingGlass.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
@ -91,29 +96,27 @@ function start() {
|
|||||||
global.logError = window.log;
|
global.logError = window.log;
|
||||||
global.log = window.log;
|
global.log = window.log;
|
||||||
|
|
||||||
// Hide the stage until we're ready for it
|
|
||||||
global.stage.hide();
|
|
||||||
|
|
||||||
// Chain up async errors reported from C
|
// Chain up async errors reported from C
|
||||||
global.connect('notify-error', function (global, msg, detail) { notifyError(msg, detail); });
|
global.connect('notify-error', function (global, msg, detail) { notifyError(msg, detail); });
|
||||||
|
|
||||||
Gio.DesktopAppInfo.set_desktop_env('GNOME');
|
Gio.DesktopAppInfo.set_desktop_env('GNOME');
|
||||||
|
|
||||||
sessionMode = new SessionMode.SessionMode();
|
sessionMode = new SessionMode.SessionMode();
|
||||||
|
sessionMode.connect('sessions-loaded', _sessionsLoaded);
|
||||||
// start session after we know what mode we're running in
|
sessionMode.init();
|
||||||
let signalId = sessionMode.connect('updated', function() {
|
|
||||||
sessionMode.disconnect(signalId);
|
|
||||||
startSession();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function startSession() {
|
function _sessionsLoaded() {
|
||||||
sessionMode.connect('updated', _loadDefaultStylesheet);
|
sessionMode.connect('updated', _sessionUpdated);
|
||||||
|
_initializeUI();
|
||||||
|
|
||||||
shellDBusService = new ShellDBus.GnomeShell();
|
shellDBusService = new ShellDBus.GnomeShell();
|
||||||
shellMountOpDBusService = new ShellMountOperation.GnomeShellMountOpHandler();
|
shellMountOpDBusService = new ShellMountOperation.GnomeShellMountOpHandler();
|
||||||
|
|
||||||
|
_sessionUpdated();
|
||||||
|
}
|
||||||
|
|
||||||
|
function _initializeUI() {
|
||||||
// Ensure ShellWindowTracker and ShellAppUsage are initialized; this will
|
// Ensure ShellWindowTracker and ShellAppUsage are initialized; this will
|
||||||
// also initialize ShellAppSystem first. ShellAppSystem
|
// also initialize ShellAppSystem first. ShellAppSystem
|
||||||
// needs to load all the .desktop files, and ShellWindowTracker
|
// needs to load all the .desktop files, and ShellWindowTracker
|
||||||
@ -122,11 +125,9 @@ function startSession() {
|
|||||||
// and recalculate application associations, so to avoid
|
// and recalculate application associations, so to avoid
|
||||||
// races for now we initialize it here. It's better to
|
// races for now we initialize it here. It's better to
|
||||||
// be predictable anyways.
|
// be predictable anyways.
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
Shell.WindowTracker.get_default();
|
||||||
Shell.AppUsage.get_default();
|
Shell.AppUsage.get_default();
|
||||||
|
|
||||||
tracker.connect('startup-sequence-changed', _queueCheckWorkspaces);
|
|
||||||
|
|
||||||
_loadDefaultStylesheet();
|
_loadDefaultStylesheet();
|
||||||
|
|
||||||
// Setup the stage hierarchy early
|
// Setup the stage hierarchy early
|
||||||
@ -143,13 +144,9 @@ function startSession() {
|
|||||||
overview = new Overview.Overview();
|
overview = new Overview.Overview();
|
||||||
wm = new WindowManager.WindowManager();
|
wm = new WindowManager.WindowManager();
|
||||||
magnifier = new Magnifier.Magnifier();
|
magnifier = new Magnifier.Magnifier();
|
||||||
if (UnlockDialog.isSupported())
|
if (LoginManager.canLock())
|
||||||
screenShield = new ScreenShield.ScreenShield();
|
screenShield = new ScreenShield.ScreenShield();
|
||||||
else
|
|
||||||
screenShield = new ScreenShield.ScreenShieldFallback();
|
|
||||||
|
|
||||||
// The message tray relies on being constructed
|
|
||||||
// after the panel.
|
|
||||||
panel = new Panel.Panel();
|
panel = new Panel.Panel();
|
||||||
messageTray = new MessageTray.MessageTray();
|
messageTray = new MessageTray.MessageTray();
|
||||||
keyboard = new Keyboard.Keyboard();
|
keyboard = new Keyboard.Keyboard();
|
||||||
@ -158,14 +155,14 @@ function startSession() {
|
|||||||
componentManager = new Components.ComponentManager();
|
componentManager = new Components.ComponentManager();
|
||||||
|
|
||||||
layoutManager.init();
|
layoutManager.init();
|
||||||
layoutManager.prepareStartupAnimation();
|
|
||||||
overview.init();
|
overview.init();
|
||||||
|
|
||||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
_a11ySettings = new Gio.Settings({ schema: A11Y_SCHEMA });
|
||||||
false, -1, 1);
|
|
||||||
global.display.connect('overlay-key', Lang.bind(overview, overview.toggle));
|
global.display.connect('overlay-key', Lang.bind(overview, function () {
|
||||||
sessionMode.connect('updated', _sessionUpdated);
|
if (!_a11ySettings.get_boolean (STICKY_KEYS_ENABLE))
|
||||||
_sessionUpdated();
|
overview.toggle();
|
||||||
|
}));
|
||||||
|
|
||||||
// Provide the bus object for gnome-session to
|
// Provide the bus object for gnome-session to
|
||||||
// initiate logouts.
|
// initiate logouts.
|
||||||
@ -185,206 +182,25 @@ function startSession() {
|
|||||||
Scripting.runPerfScript(module, perfOutput);
|
Scripting.runPerfScript(module, perfOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
_overridesSettings = new Gio.Settings({ schema: OVERRIDES_SCHEMA });
|
|
||||||
_overridesSettings.connect('changed::dynamic-workspaces', _queueCheckWorkspaces);
|
|
||||||
|
|
||||||
global.screen.connect('notify::n-workspaces', _nWorkspacesChanged);
|
|
||||||
|
|
||||||
global.screen.connect('window-entered-monitor', _windowEnteredMonitor);
|
|
||||||
global.screen.connect('window-left-monitor', _windowLeftMonitor);
|
|
||||||
global.screen.connect('restacked', _windowsRestacked);
|
|
||||||
|
|
||||||
_nWorkspacesChanged();
|
|
||||||
|
|
||||||
ExtensionDownloader.init();
|
ExtensionDownloader.init();
|
||||||
ExtensionSystem.init();
|
ExtensionSystem.init();
|
||||||
|
|
||||||
|
if (sessionMode.isGreeter && screenShield) {
|
||||||
layoutManager.connect('startup-prepared', function() {
|
layoutManager.connect('startup-prepared', function() {
|
||||||
layoutManager.startupAnimation();
|
screenShield.showDialog();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let _workspaces = [];
|
layoutManager.connect('startup-complete', function() {
|
||||||
let _checkWorkspacesId = 0;
|
if (keybindingMode == Shell.KeyBindingMode.NONE) {
|
||||||
|
keybindingMode = Shell.KeyBindingMode.NORMAL;
|
||||||
/*
|
|
||||||
* When the last window closed on a workspace is a dialog or splash
|
|
||||||
* screen, we assume that it might be an initial window shown before
|
|
||||||
* the main window of an application, and give the app a grace period
|
|
||||||
* where it can map another window before we remove the workspace.
|
|
||||||
*/
|
|
||||||
const LAST_WINDOW_GRACE_TIME = 1000;
|
|
||||||
|
|
||||||
function _checkWorkspaces() {
|
|
||||||
let i;
|
|
||||||
let emptyWorkspaces = [];
|
|
||||||
|
|
||||||
if (!Meta.prefs_get_dynamic_workspaces()) {
|
|
||||||
_checkWorkspacesId = 0;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
if (screenShield) {
|
||||||
for (i = 0; i < _workspaces.length; i++) {
|
screenShield.lockIfWasLocked();
|
||||||
let lastRemoved = _workspaces[i]._lastRemovedWindow;
|
|
||||||
if ((lastRemoved &&
|
|
||||||
(lastRemoved.get_window_type() == Meta.WindowType.SPLASHSCREEN ||
|
|
||||||
lastRemoved.get_window_type() == Meta.WindowType.DIALOG ||
|
|
||||||
lastRemoved.get_window_type() == Meta.WindowType.MODAL_DIALOG)) ||
|
|
||||||
_workspaces[i]._keepAliveId)
|
|
||||||
emptyWorkspaces[i] = false;
|
|
||||||
else
|
|
||||||
emptyWorkspaces[i] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let sequences = Shell.WindowTracker.get_default().get_startup_sequences();
|
|
||||||
for (i = 0; i < sequences.length; i++) {
|
|
||||||
let index = sequences[i].get_workspace();
|
|
||||||
if (index >= 0 && index <= global.screen.n_workspaces)
|
|
||||||
emptyWorkspaces[index] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
let windows = global.get_window_actors();
|
|
||||||
for (i = 0; i < windows.length; i++) {
|
|
||||||
let win = windows[i];
|
|
||||||
|
|
||||||
if (win.get_meta_window().is_on_all_workspaces())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
let workspaceIndex = win.get_workspace();
|
|
||||||
emptyWorkspaces[workspaceIndex] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we don't have an empty workspace at the end, add one
|
|
||||||
if (!emptyWorkspaces[emptyWorkspaces.length -1]) {
|
|
||||||
global.screen.append_new_workspace(false, global.get_current_time());
|
|
||||||
emptyWorkspaces.push(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
|
||||||
let removingCurrentWorkspace = (emptyWorkspaces[activeWorkspaceIndex] &&
|
|
||||||
activeWorkspaceIndex < emptyWorkspaces.length - 1);
|
|
||||||
// Don't enter the overview when removing multiple empty workspaces at startup
|
|
||||||
let showOverview = (removingCurrentWorkspace &&
|
|
||||||
!emptyWorkspaces.every(function(x) { return x; }));
|
|
||||||
|
|
||||||
if (removingCurrentWorkspace) {
|
|
||||||
// "Merge" the empty workspace we are removing with the one at the end
|
|
||||||
wm.blockAnimations();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete other empty workspaces; do it from the end to avoid index changes
|
|
||||||
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
|
|
||||||
if (emptyWorkspaces[i])
|
|
||||||
global.screen.remove_workspace(_workspaces[i], global.get_current_time());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (removingCurrentWorkspace) {
|
|
||||||
global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time());
|
|
||||||
wm.unblockAnimations();
|
|
||||||
|
|
||||||
if (!overview.visible && showOverview)
|
|
||||||
overview.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
_checkWorkspacesId = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function keepWorkspaceAlive(workspace, duration) {
|
|
||||||
if (workspace._keepAliveId)
|
|
||||||
Mainloop.source_remove(workspace._keepAliveId);
|
|
||||||
|
|
||||||
workspace._keepAliveId = Mainloop.timeout_add(duration, function() {
|
|
||||||
workspace._keepAliveId = 0;
|
|
||||||
_queueCheckWorkspaces();
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function _windowRemoved(workspace, window) {
|
|
||||||
workspace._lastRemovedWindow = window;
|
|
||||||
_queueCheckWorkspaces();
|
|
||||||
Mainloop.timeout_add(LAST_WINDOW_GRACE_TIME, function() {
|
|
||||||
if (workspace._lastRemovedWindow == window) {
|
|
||||||
workspace._lastRemovedWindow = null;
|
|
||||||
_queueCheckWorkspaces();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function _windowLeftMonitor(metaScreen, monitorIndex, metaWin) {
|
|
||||||
// If the window left the primary monitor, that
|
|
||||||
// might make that workspace empty
|
|
||||||
if (monitorIndex == layoutManager.primaryIndex)
|
|
||||||
_queueCheckWorkspaces();
|
|
||||||
}
|
|
||||||
|
|
||||||
function _windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
|
|
||||||
// If the window entered the primary monitor, that
|
|
||||||
// might make that workspace non-empty
|
|
||||||
if (monitorIndex == layoutManager.primaryIndex)
|
|
||||||
_queueCheckWorkspaces();
|
|
||||||
}
|
|
||||||
|
|
||||||
function _windowsRestacked() {
|
|
||||||
// Figure out where the pointer is in case we lost track of
|
|
||||||
// it during a grab. (In particular, if a trayicon popup menu
|
|
||||||
// is dismissed, see if we need to close the message tray.)
|
|
||||||
global.sync_pointer();
|
|
||||||
}
|
|
||||||
|
|
||||||
function _queueCheckWorkspaces() {
|
|
||||||
if (_checkWorkspacesId == 0)
|
|
||||||
_checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, _checkWorkspaces);
|
|
||||||
}
|
|
||||||
|
|
||||||
function _nWorkspacesChanged() {
|
|
||||||
let oldNumWorkspaces = _workspaces.length;
|
|
||||||
let newNumWorkspaces = global.screen.n_workspaces;
|
|
||||||
|
|
||||||
if (oldNumWorkspaces == newNumWorkspaces)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
let lostWorkspaces = [];
|
|
||||||
if (newNumWorkspaces > oldNumWorkspaces) {
|
|
||||||
let w;
|
|
||||||
|
|
||||||
// Assume workspaces are only added at the end
|
|
||||||
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++)
|
|
||||||
_workspaces[w] = global.screen.get_workspace_by_index(w);
|
|
||||||
|
|
||||||
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
|
||||||
let workspace = _workspaces[w];
|
|
||||||
workspace._windowAddedId = workspace.connect('window-added', _queueCheckWorkspaces);
|
|
||||||
workspace._windowRemovedId = workspace.connect('window-removed', _windowRemoved);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// Assume workspaces are only removed sequentially
|
|
||||||
// (e.g. 2,3,4 - not 2,4,7)
|
|
||||||
let removedIndex;
|
|
||||||
let removedNum = oldNumWorkspaces - newNumWorkspaces;
|
|
||||||
for (let w = 0; w < oldNumWorkspaces; w++) {
|
|
||||||
let workspace = global.screen.get_workspace_by_index(w);
|
|
||||||
if (_workspaces[w] != workspace) {
|
|
||||||
removedIndex = w;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let lostWorkspaces = _workspaces.splice(removedIndex, removedNum);
|
|
||||||
lostWorkspaces.forEach(function(workspace) {
|
|
||||||
workspace.disconnect(workspace._windowAddedId);
|
|
||||||
workspace.disconnect(workspace._windowRemovedId);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_queueCheckWorkspaces();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _loadDefaultStylesheet() {
|
function _loadDefaultStylesheet() {
|
||||||
if (!sessionMode.isPrimary)
|
if (!sessionMode.isPrimary)
|
||||||
return;
|
return;
|
||||||
@ -435,7 +251,8 @@ function loadTheme() {
|
|||||||
if (_cssStylesheet != null)
|
if (_cssStylesheet != null)
|
||||||
cssStylesheet = _cssStylesheet;
|
cssStylesheet = _cssStylesheet;
|
||||||
|
|
||||||
let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
|
let theme = new St.Theme ({ application_stylesheet: cssStylesheet,
|
||||||
|
default_stylesheet: _defaultCssStylesheet });
|
||||||
|
|
||||||
if (previousTheme) {
|
if (previousTheme) {
|
||||||
let customStylesheets = previousTheme.get_custom_stylesheets();
|
let customStylesheets = previousTheme.get_custom_stylesheets();
|
||||||
|
@ -1530,11 +1530,7 @@ const MessageTrayContextMenu = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateClearSensitivity: function() {
|
_updateClearSensitivity: function() {
|
||||||
let sources = this._tray.getSources();
|
this._clearItem.setSensitive(this._tray.clearableCount > 0);
|
||||||
sources = sources.filter(function(source) {
|
|
||||||
return !source.trayIcon && !source.isChat && !source.resident;
|
|
||||||
});
|
|
||||||
this._clearItem.setSensitive(sources.length > 0);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setPosition: function(x, y) {
|
setPosition: function(x, y) {
|
||||||
@ -1557,23 +1553,22 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
this.actor = new St.Widget({ name: 'message-tray',
|
this.actor = new St.Widget({ name: 'message-tray',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
track_hover: true,
|
|
||||||
layout_manager: new Clutter.BinLayout(),
|
layout_manager: new Clutter.BinLayout(),
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
y_align: Clutter.ActorAlign.START,
|
y_align: Clutter.ActorAlign.START,
|
||||||
});
|
});
|
||||||
this.actor.connect('notify::hover', Lang.bind(this, this._onTrayHoverChanged));
|
|
||||||
|
|
||||||
this._notificationWidget = new St.Widget({ name: 'notification-container',
|
this._notificationWidget = new St.Widget({ name: 'notification-container',
|
||||||
|
reactive: true,
|
||||||
|
track_hover: true,
|
||||||
y_align: Clutter.ActorAlign.START,
|
y_align: Clutter.ActorAlign.START,
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
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._notificationWidget.connect('key-release-event', Lang.bind(this, this._onNotificationKeyRelease));
|
||||||
|
this._notificationWidget.connect('notify::hover', Lang.bind(this, this._onNotificationHoverChanged));
|
||||||
this.actor.add_actor(this._notificationWidget);
|
|
||||||
|
|
||||||
this._notificationBin = new St.Bin({ y_expand: true });
|
this._notificationBin = new St.Bin({ y_expand: true });
|
||||||
this._notificationBin.set_y_align(Clutter.ActorAlign.START);
|
this._notificationBin.set_y_align(Clutter.ActorAlign.START);
|
||||||
@ -1591,17 +1586,13 @@ const MessageTray = new Lang.Class({
|
|||||||
global.focus_manager.add_group(this.actor);
|
global.focus_manager.add_group(this.actor);
|
||||||
this._summary = new St.BoxLayout({ style_class: 'message-tray-summary',
|
this._summary = new St.BoxLayout({ style_class: 'message-tray-summary',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
track_hover: true,
|
|
||||||
x_align: Clutter.ActorAlign.END,
|
x_align: Clutter.ActorAlign.END,
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
y_expand: true });
|
y_expand: true });
|
||||||
this._summary.connect('notify::hover', Lang.bind(this, this._onSummaryHoverChanged));
|
|
||||||
this.actor.add_actor(this._summary);
|
this.actor.add_actor(this._summary);
|
||||||
this._summary.opacity = 0;
|
|
||||||
|
|
||||||
this._summaryMotionId = 0;
|
this._summaryMotionId = 0;
|
||||||
this._trayMotionId = 0;
|
|
||||||
|
|
||||||
this._summaryBoxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM,
|
this._summaryBoxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM,
|
||||||
{ reactive: true,
|
{ reactive: true,
|
||||||
@ -1632,19 +1623,27 @@ const MessageTray = new Lang.Class({
|
|||||||
{ keybindingMode: Shell.KeyBindingMode.MESSAGE_TRAY });
|
{ keybindingMode: Shell.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);
|
||||||
|
this._grabHelper.addActor(this._notificationWidget);
|
||||||
|
|
||||||
Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged));
|
Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged));
|
||||||
|
|
||||||
this._trayState = State.HIDDEN;
|
this._trayState = State.HIDDEN;
|
||||||
this._locked = false;
|
|
||||||
this._traySummoned = false;
|
this._traySummoned = false;
|
||||||
this._useLongerTrayLeftTimeout = false;
|
this._useLongerNotificationLeftTimeout = false;
|
||||||
this._trayLeftTimeoutId = 0;
|
this._trayLeftTimeoutId = 0;
|
||||||
this._pointerInTray = false;
|
|
||||||
this._pointerInKeyboard = false;
|
// pointerInNotification is sort of a misnomer -- it tracks whether
|
||||||
|
// a message tray notification should expand. The value is
|
||||||
|
// partially driven by the hover state of the notification, but has
|
||||||
|
// a lot of complex state related to timeouts and the current
|
||||||
|
// state of the pointer when a notification pops up.
|
||||||
|
this._pointerInNotification = false;
|
||||||
|
|
||||||
|
// This tracks this._notificationWidget.hover and is used to fizzle
|
||||||
|
// out non-changing hover notifications in onNotificationHoverChanged.
|
||||||
|
this._notificationHovered = false;
|
||||||
|
|
||||||
this._keyboardVisible = false;
|
this._keyboardVisible = false;
|
||||||
this._summaryState = State.HIDDEN;
|
|
||||||
this._pointerInSummary = false;
|
|
||||||
this._notificationClosed = false;
|
this._notificationClosed = false;
|
||||||
this._notificationState = State.HIDDEN;
|
this._notificationState = State.HIDDEN;
|
||||||
this._notificationTimeoutId = 0;
|
this._notificationTimeoutId = 0;
|
||||||
@ -1654,32 +1653,36 @@ const MessageTray = new Lang.Class({
|
|||||||
this._desktopCloneState = State.HIDDEN;
|
this._desktopCloneState = State.HIDDEN;
|
||||||
this._notificationRemoved = false;
|
this._notificationRemoved = false;
|
||||||
this._reNotifyAfterHideNotification = null;
|
this._reNotifyAfterHideNotification = null;
|
||||||
this._inFullscreen = false;
|
|
||||||
this._desktopClone = null;
|
this._desktopClone = null;
|
||||||
this._inCtrlAltTab = false;
|
this._inCtrlAltTab = false;
|
||||||
|
|
||||||
this._lightbox = new Lightbox.Lightbox(global.overlay_group,
|
this.clearableCount = 0;
|
||||||
|
|
||||||
|
this._lightboxes = [];
|
||||||
|
let lightboxContainers = [global.window_group,
|
||||||
|
Main.layoutManager.overviewGroup];
|
||||||
|
for (let i = 0; i < lightboxContainers.length; i++)
|
||||||
|
this._lightboxes.push(new Lightbox.Lightbox(lightboxContainers[i],
|
||||||
{ inhibitEvents: true,
|
{ inhibitEvents: true,
|
||||||
fadeInTime: ANIMATION_TIME,
|
fadeInTime: ANIMATION_TIME,
|
||||||
fadeOutTime: ANIMATION_TIME,
|
fadeOutTime: ANIMATION_TIME,
|
||||||
fadeFactor: 0.2
|
fadeFactor: 0.2
|
||||||
});
|
}));
|
||||||
|
|
||||||
Main.layoutManager.trayBox.add_actor(this.actor);
|
Main.layoutManager.trayBox.add_actor(this.actor);
|
||||||
this.actor.y = 0;
|
Main.layoutManager.trayBox.add_actor(this._notificationWidget);
|
||||||
Main.layoutManager.trackChrome(this.actor);
|
Main.layoutManager.trackChrome(this.actor);
|
||||||
Main.layoutManager.trackChrome(this._notificationWidget);
|
Main.layoutManager.trackChrome(this._notificationWidget);
|
||||||
Main.layoutManager.trackChrome(this._closeButton);
|
Main.layoutManager.trackChrome(this._closeButton);
|
||||||
|
|
||||||
Main.layoutManager.connect('primary-fullscreen-changed', Lang.bind(this, this._onFullscreenChanged));
|
global.screen.connect('in-fullscreen-changed', Lang.bind(this, this._updateState));
|
||||||
|
Main.layoutManager.connect('hot-corners-changed', Lang.bind(this, this._hotCornersChanged));
|
||||||
|
|
||||||
// If the overview shows or hides while we're in
|
// If the overview shows or hides while we're in
|
||||||
// the message tray, revert back to normal mode.
|
// the message tray, revert back to normal mode.
|
||||||
Main.overview.connect('showing', Lang.bind(this, this._escapeTray));
|
Main.overview.connect('showing', Lang.bind(this, this._escapeTray));
|
||||||
Main.overview.connect('hiding', Lang.bind(this, this._escapeTray));
|
Main.overview.connect('hiding', Lang.bind(this, this._escapeTray));
|
||||||
|
|
||||||
// Track if we've added the activities button
|
|
||||||
this._activitiesButtonAdded = false;
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
|
|
||||||
Main.wm.addKeybinding('toggle-message-tray',
|
Main.wm.addKeybinding('toggle-message-tray',
|
||||||
@ -1703,6 +1706,7 @@ const MessageTray = new Lang.Class({
|
|||||||
this._trayDwellTimeoutId = 0;
|
this._trayDwellTimeoutId = 0;
|
||||||
this._setupTrayDwellIfNeeded();
|
this._setupTrayDwellIfNeeded();
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
|
this._hotCornersChanged();
|
||||||
|
|
||||||
this._noMessages = new St.Label({ text: _("No Messages"),
|
this._noMessages = new St.Label({ text: _("No Messages"),
|
||||||
style_class: 'no-messages-label',
|
style_class: 'no-messages-label',
|
||||||
@ -1743,13 +1747,11 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
_openContextMenu: function () {
|
_openContextMenu: function () {
|
||||||
let [x, y, mask] = global.get_pointer();
|
let [x, y, mask] = global.get_pointer();
|
||||||
this._lock();
|
|
||||||
this._contextMenu.setPosition(Math.round(x), Math.round(y));
|
this._contextMenu.setPosition(Math.round(x), Math.round(y));
|
||||||
this._grabHelper.grab({ actor: this._contextMenu.actor,
|
this._grabHelper.grab({ actor: this._contextMenu.actor,
|
||||||
grabFocus: true,
|
modal: true,
|
||||||
onUngrab: Lang.bind(this, function () {
|
onUngrab: Lang.bind(this, function () {
|
||||||
this._contextMenu.close(BoxPointer.PopupAnimation.FULL);
|
this._contextMenu.close(BoxPointer.PopupAnimation.FULL);
|
||||||
this._unlock();
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
this._contextMenu.open(BoxPointer.PopupAnimation.FULL);
|
this._contextMenu.open(BoxPointer.PopupAnimation.FULL);
|
||||||
@ -1775,11 +1777,6 @@ const MessageTray = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_sessionUpdated: function() {
|
_sessionUpdated: function() {
|
||||||
if (!this._activitiesButtonAdded && Main.panel.statusArea.activities) {
|
|
||||||
this._activitiesButtonAdded = true;
|
|
||||||
this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((Main.sessionMode.isLocked || Main.sessionMode.isGreeter) && this._inCtrlAltTab) {
|
if ((Main.sessionMode.isLocked || Main.sessionMode.isGreeter) && this._inCtrlAltTab) {
|
||||||
Main.ctrlAltTabManager.removeGroup(this._summary);
|
Main.ctrlAltTabManager.removeGroup(this._summary);
|
||||||
this._inCtrlAltTab = false;
|
this._inCtrlAltTab = false;
|
||||||
@ -1798,12 +1795,12 @@ const MessageTray = new Lang.Class({
|
|||||||
y == monitor.y + monitor.height - 1);
|
y == monitor.y + monitor.height - 1);
|
||||||
if (shouldDwell) {
|
if (shouldDwell) {
|
||||||
// We only set up dwell timeout when the user is not hovering over the tray
|
// We only set up dwell timeout when the user is not hovering over the tray
|
||||||
// (!this.actor.hover). This avoids bringing up the message tray after the
|
// (!this._notificationHovered). This avoids bringing up the message tray after the
|
||||||
// user clicks on a notification with the pointer on the bottom pixel
|
// user clicks on a notification with the pointer on the bottom pixel
|
||||||
// of the monitor. The _trayDwelling variable is used so that we only try to
|
// of the monitor. The _trayDwelling variable is used so that we only try to
|
||||||
// fire off one tray dwell - if it fails (because, say, the user has the mouse down),
|
// fire off one tray dwell - if it fails (because, say, the user has the mouse down),
|
||||||
// we don't try again until the user moves the mouse up and down again.
|
// we don't try again until the user moves the mouse up and down again.
|
||||||
if (!this._trayDwelling && !this.actor.hover && this._trayDwellTimeoutId == 0) {
|
if (!this._trayDwelling && !this._notificationHovered && this._trayDwellTimeoutId == 0) {
|
||||||
// Save the interaction timestamp so we can detect user input
|
// Save the interaction timestamp so we can detect user input
|
||||||
let focusWindow = global.display.focus_window;
|
let focusWindow = global.display.focus_window;
|
||||||
this._trayDwellUserTime = focusWindow ? focusWindow.user_time : 0;
|
this._trayDwellUserTime = focusWindow ? focusWindow.user_time : 0;
|
||||||
@ -1828,6 +1825,9 @@ const MessageTray = new Lang.Class({
|
|||||||
_trayDwellTimeout: function() {
|
_trayDwellTimeout: function() {
|
||||||
this._trayDwellTimeoutId = 0;
|
this._trayDwellTimeoutId = 0;
|
||||||
|
|
||||||
|
if (Main.layoutManager.bottomMonitor.inFullscreen)
|
||||||
|
return false;
|
||||||
|
|
||||||
// We don't want to open the tray when a modal dialog
|
// We don't want to open the tray when a modal dialog
|
||||||
// is up, so we check the modal count for that. When we are in the
|
// is up, so we check the modal count for that. When we are in the
|
||||||
// overview we have to take the overview's modal push into account
|
// overview we have to take the overview's modal push into account
|
||||||
@ -1898,6 +1898,9 @@ const MessageTray = new Lang.Class({
|
|||||||
this._summary.insert_child_at_index(summaryItem.actor, this._chatSummaryItemsCount);
|
this._summary.insert_child_at_index(summaryItem.actor, this._chatSummaryItemsCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!source.trayIcon && !source.isChat && !source.resident)
|
||||||
|
this.clearableCount++;
|
||||||
|
|
||||||
this._sources.set(source, obj);
|
this._sources.set(source, obj);
|
||||||
|
|
||||||
obj.notifyId = source.connect('notify', Lang.bind(this, this._onNotify));
|
obj.notifyId = source.connect('notify', Lang.bind(this, this._onNotify));
|
||||||
@ -1939,6 +1942,9 @@ const MessageTray = new Lang.Class({
|
|||||||
if (source.isChat)
|
if (source.isChat)
|
||||||
this._chatSummaryItemsCount--;
|
this._chatSummaryItemsCount--;
|
||||||
|
|
||||||
|
if (!source.trayIcon && !source.isChat && !source.resident)
|
||||||
|
this.clearableCount--;
|
||||||
|
|
||||||
source.disconnect(obj.notifyId);
|
source.disconnect(obj.notifyId);
|
||||||
source.disconnect(obj.destroyId);
|
source.disconnect(obj.destroyId);
|
||||||
source.disconnect(obj.mutedChangedId);
|
source.disconnect(obj.mutedChangedId);
|
||||||
@ -1994,23 +2000,10 @@ const MessageTray = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let index = this._notificationQueue.indexOf(notification);
|
let index = this._notificationQueue.indexOf(notification);
|
||||||
notification.destroy();
|
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
this._notificationQueue.splice(index, 1);
|
this._notificationQueue.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
_lock: function() {
|
|
||||||
this._locked = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
_unlock: function() {
|
|
||||||
if (!this._locked)
|
|
||||||
return;
|
|
||||||
this._locked = false;
|
|
||||||
this._pointerInTray = this.actor.hover;
|
|
||||||
this._updateState();
|
|
||||||
},
|
|
||||||
|
|
||||||
openTray: function() {
|
openTray: function() {
|
||||||
if (Main.overview.animationInProgress)
|
if (Main.overview.animationInProgress)
|
||||||
return;
|
return;
|
||||||
@ -2035,8 +2028,6 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
this._traySummoned = false;
|
this._traySummoned = false;
|
||||||
this.actor.set_hover(false);
|
|
||||||
this._summary.set_hover(false);
|
|
||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2096,33 +2087,28 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSummaryHoverChanged: function() {
|
_hotCornersChanged: function() {
|
||||||
this._pointerInSummary = this._summary.hover;
|
let primary = Main.layoutManager.primaryIndex;
|
||||||
this._updateState();
|
let corner = Main.layoutManager.hotCorners[primary];
|
||||||
|
if (corner && corner.actor)
|
||||||
|
this._grabHelper.addActor(corner.actor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onTrayHoverChanged: function() {
|
_onNotificationHoverChanged: function() {
|
||||||
if (this.actor.hover) {
|
if (this._notificationWidget.hover == this._notificationHovered)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._notificationHovered = this._notificationWidget.hover;
|
||||||
|
if (this._notificationHovered) {
|
||||||
// No dwell inside notifications at the bottom of the screen
|
// No dwell inside notifications at the bottom of the screen
|
||||||
this._cancelTrayDwell();
|
this._cancelTrayDwell();
|
||||||
|
|
||||||
// Don't do anything if the one pixel area at the bottom is hovered over while the tray is hidden.
|
this._useLongerNotificationLeftTimeout = false;
|
||||||
if (this._trayState == State.HIDDEN && this._notificationState == State.HIDDEN)
|
if (this._notificationLeftTimeoutId) {
|
||||||
return;
|
Mainloop.source_remove(this._notificationLeftTimeoutId);
|
||||||
|
this._notificationLeftTimeoutId = 0;
|
||||||
// Don't do anything if this._useLongerTrayLeftTimeout is true, meaning the notification originally
|
this._notificationLeftMouseX = -1;
|
||||||
// popped up under the pointer, but this._trayLeftTimeoutId is 0, meaning the pointer didn't leave
|
this._notificationLeftMouseY = -1;
|
||||||
// the tray yet. We need to check for this case because sometimes _onTrayHoverChanged() gets called
|
|
||||||
// multiple times while this.actor.hover is true.
|
|
||||||
if (this._useLongerTrayLeftTimeout && !this._trayLeftTimeoutId)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._useLongerTrayLeftTimeout = false;
|
|
||||||
if (this._trayLeftTimeoutId) {
|
|
||||||
Mainloop.source_remove(this._trayLeftTimeoutId);
|
|
||||||
this._trayLeftTimeoutId = 0;
|
|
||||||
this._trayLeftMouseX = -1;
|
|
||||||
this._trayLeftMouseY = -1;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2131,32 +2117,32 @@ const MessageTray = new Lang.Class({
|
|||||||
global.stage.get_actor_at_pos(Clutter.PickMode.ALL, this._showNotificationMouseX, this._showNotificationMouseY);
|
global.stage.get_actor_at_pos(Clutter.PickMode.ALL, this._showNotificationMouseX, this._showNotificationMouseY);
|
||||||
this._showNotificationMouseX = -1;
|
this._showNotificationMouseX = -1;
|
||||||
this._showNotificationMouseY = -1;
|
this._showNotificationMouseY = -1;
|
||||||
// Don't set this._pointerInTray to true if the pointer was initially in the area where the notification
|
// Don't set this._pointerInNotification to true if the pointer was initially in the area where the notification
|
||||||
// popped up. That way we will not be expanding notifications that happen to pop up over the pointer
|
// popped up. That way we will not be expanding notifications that happen to pop up over the pointer
|
||||||
// automatically. Instead, the user is able to expand the notification by mousing away from it and then
|
// automatically. Instead, the user is able to expand the notification by mousing away from it and then
|
||||||
// mousing back in. Because this is an expected action, we set the boolean flag that indicates that a longer
|
// mousing back in. Because this is an expected action, we set the boolean flag that indicates that a longer
|
||||||
// timeout should be used before popping down the notification.
|
// timeout should be used before popping down the notification.
|
||||||
if (this.actor.contains(actorAtShowNotificationPosition)) {
|
if (this.actor.contains(actorAtShowNotificationPosition)) {
|
||||||
this._useLongerTrayLeftTimeout = true;
|
this._useLongerNotificationLeftTimeout = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._pointerInTray = true;
|
this._pointerInNotification = true;
|
||||||
this._updateState();
|
this._updateState();
|
||||||
} else {
|
} else {
|
||||||
// We record the position of the mouse the moment it leaves the tray. These coordinates are used in
|
// We record the position of the mouse the moment it leaves the tray. These coordinates are used in
|
||||||
// this._onTrayLeftTimeout() to determine if the mouse has moved far enough during the initial timeout for us
|
// this._onNotificationLeftTimeout() to determine if the mouse has moved far enough during the initial timeout for us
|
||||||
// to consider that the user intended to leave the tray and therefore hide the tray. If the mouse is still
|
// to consider that the user intended to leave the tray and therefore hide the tray. If the mouse is still
|
||||||
// close to its previous position, we extend the timeout once.
|
// close to its previous position, we extend the timeout once.
|
||||||
let [x, y, mods] = global.get_pointer();
|
let [x, y, mods] = global.get_pointer();
|
||||||
this._trayLeftMouseX = x;
|
this._notificationLeftMouseX = x;
|
||||||
this._trayLeftMouseY = y;
|
this._notificationLeftMouseY = y;
|
||||||
|
|
||||||
// We wait just a little before hiding the message tray in case the user quickly moves the mouse back into it.
|
// We wait just a little before hiding the message tray in case the user quickly moves the mouse back into it.
|
||||||
// We wait for a longer period if the notification popped up where the mouse pointer was already positioned.
|
// We wait for a longer period if the notification popped up where the mouse pointer was already positioned.
|
||||||
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
|
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
|
||||||
let timeout = this._useLongerTrayLeftTimeout ? LONGER_HIDE_TIMEOUT * 1000 : HIDE_TIMEOUT * 1000;
|
let timeout = this._useLongerNotificationLeftTimeout ? LONGER_HIDE_TIMEOUT * 1000 : HIDE_TIMEOUT * 1000;
|
||||||
this._trayLeftTimeoutId = Mainloop.timeout_add(timeout, Lang.bind(this, this._onTrayLeftTimeout));
|
this._notificationLeftTimeoutId = Mainloop.timeout_add(timeout, Lang.bind(this, this._onNotificationLeftTimeout));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2165,11 +2151,6 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onFullscreenChanged: function(obj, state) {
|
|
||||||
this._inFullscreen = state;
|
|
||||||
this._updateState();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onStatusChanged: function(status) {
|
_onStatusChanged: function(status) {
|
||||||
if (status == GnomeSession.PresenceStatus.BUSY) {
|
if (status == GnomeSession.PresenceStatus.BUSY) {
|
||||||
// remove notification and allow the summary to be closed now
|
// remove notification and allow the summary to be closed now
|
||||||
@ -2185,23 +2166,22 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onTrayLeftTimeout: function() {
|
_onNotificationLeftTimeout: function() {
|
||||||
let [x, y, mods] = global.get_pointer();
|
let [x, y, mods] = global.get_pointer();
|
||||||
// We extend the timeout once if the mouse moved no further than MOUSE_LEFT_ACTOR_THRESHOLD to either side or up.
|
// We extend the timeout once if the mouse moved no further than MOUSE_LEFT_ACTOR_THRESHOLD to either side or up.
|
||||||
// We don't check how far down the mouse moved because any point above the tray, but below the exit coordinate,
|
// We don't check how far down the mouse moved because any point above the tray, but below the exit coordinate,
|
||||||
// is close to the tray.
|
// is close to the tray.
|
||||||
if (this._trayLeftMouseX > -1 &&
|
if (this._notificationLeftMouseX > -1 &&
|
||||||
y > this._trayLeftMouseY - MOUSE_LEFT_ACTOR_THRESHOLD &&
|
y > this._notificationLeftMouseY - MOUSE_LEFT_ACTOR_THRESHOLD &&
|
||||||
x < this._trayLeftMouseX + MOUSE_LEFT_ACTOR_THRESHOLD &&
|
x < this._notificationLeftMouseX + MOUSE_LEFT_ACTOR_THRESHOLD &&
|
||||||
x > this._trayLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
|
x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
|
||||||
this._trayLeftMouseX = -1;
|
this._notificationLeftMouseX = -1;
|
||||||
this._trayLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
|
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
|
||||||
Lang.bind(this, this._onTrayLeftTimeout));
|
Lang.bind(this, this._onNotificationLeftTimeout));
|
||||||
} else {
|
} else {
|
||||||
this._trayLeftTimeoutId = 0;
|
this._notificationLeftTimeoutId = 0;
|
||||||
this._useLongerTrayLeftTimeout = false;
|
this._useLongerNotificationLeftTimeout = false;
|
||||||
this._pointerInTray = false;
|
this._pointerInNotification = false;
|
||||||
this._pointerInSummary = false;
|
|
||||||
this._updateNotificationTimeout(0);
|
this._updateNotificationTimeout(0);
|
||||||
this._updateState();
|
this._updateState();
|
||||||
}
|
}
|
||||||
@ -2209,9 +2189,7 @@ const MessageTray = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_escapeTray: function() {
|
_escapeTray: function() {
|
||||||
this._unlock();
|
this._pointerInNotification = false;
|
||||||
this._pointerInTray = false;
|
|
||||||
this._pointerInSummary = false;
|
|
||||||
this._traySummoned = false;
|
this._traySummoned = false;
|
||||||
this._setClickedSummaryItem(null);
|
this._setClickedSummaryItem(null);
|
||||||
this._updateNotificationTimeout(0);
|
this._updateNotificationTimeout(0);
|
||||||
@ -2220,33 +2198,37 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
// All of the logic for what happens when occurs here; the various
|
// All of the logic for what happens when occurs here; the various
|
||||||
// event handlers merely update variables such as
|
// event handlers merely update variables such as
|
||||||
// 'this._pointerInTray', 'this._summaryState', etc, and
|
// 'this._pointerInNotification', 'this._traySummoned', etc, and
|
||||||
// _updateState() figures out what (if anything) needs to be done
|
// _updateState() figures out what (if anything) needs to be done
|
||||||
// at the present time.
|
// at the present time.
|
||||||
_updateState: function() {
|
_updateState: function() {
|
||||||
// Notifications
|
// Notifications
|
||||||
let notificationQueue = this._notificationQueue;
|
let notificationQueue = this._notificationQueue.filter(function(n) {
|
||||||
|
return !n.acknowledged;
|
||||||
|
});
|
||||||
|
let hasNotifications = Main.sessionMode.hasNotifications;
|
||||||
|
|
||||||
|
this._notificationQueue = 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 notificationForFeedback = notificationQueue.length > 0 && notificationQueue[0].forFeedback;
|
||||||
let notificationsLimited = this._busy || this._inFullscreen;
|
let notificationsLimited = this._busy || Main.layoutManager.bottomMonitor.inFullscreen;
|
||||||
let notificationsPending = notificationQueue.length > 0 && (!notificationsLimited || notificationUrgent || notificationForFeedback) && Main.sessionMode.hasNotifications;
|
let notificationsPending = notificationQueue.length > 0 && (!notificationsLimited || notificationUrgent || notificationForFeedback) && 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._pointerInNotification && !this._notificationRemoved;
|
||||||
let notificationExpanded = this._notification && this._notification.expanded;
|
let notificationExpanded = this._notification && this._notification.expanded;
|
||||||
let notificationExpired = this._notificationTimeoutId == 0 &&
|
let notificationExpired = this._notificationTimeoutId == 0 &&
|
||||||
!(this._notification && this._notification.urgency == Urgency.CRITICAL) &&
|
!(this._notification && this._notification.urgency == Urgency.CRITICAL) &&
|
||||||
!(this._notification && this._notification.focused) &&
|
!(this._notification && this._notification.focused) &&
|
||||||
!this._pointerInTray &&
|
!this._pointerInNotification;
|
||||||
!this._locked &&
|
let notificationLockedOut = !hasNotifications && this._notification;
|
||||||
!(this._pointerInKeyboard && notificationExpanded);
|
let notificationMustClose = (this._notificationRemoved || notificationLockedOut ||
|
||||||
let notificationLockedOut = !Main.sessionMode.hasNotifications && this._notification;
|
(notificationExpired && this._userActiveWhileNotificationShown) ||
|
||||||
let notificationMustClose = this._notificationRemoved || notificationLockedOut || (notificationExpired && this._userActiveWhileNotificationShown) || this._notificationClosed;
|
this._notificationClosed || this._traySummoned);
|
||||||
let canShowNotification = notificationsPending && this._summaryState == State.HIDDEN;
|
let canShowNotification = notificationsPending && this._trayState == State.HIDDEN && !this._traySummoned;
|
||||||
|
|
||||||
if (this._notificationState == State.HIDDEN) {
|
if (this._notificationState == State.HIDDEN) {
|
||||||
if (canShowNotification) {
|
if (canShowNotification)
|
||||||
this._showNotification();
|
this._showNotification();
|
||||||
}
|
|
||||||
} else if (this._notificationState == State.SHOWN) {
|
} else if (this._notificationState == State.SHOWN) {
|
||||||
if (notificationMustClose)
|
if (notificationMustClose)
|
||||||
this._hideNotification();
|
this._hideNotification();
|
||||||
@ -2256,33 +2238,22 @@ const MessageTray = new Lang.Class({
|
|||||||
this._ensureNotificationFocused();
|
this._ensureNotificationFocused();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Summary
|
|
||||||
let summarySummoned = this._pointerInSummary || this._traySummoned;
|
|
||||||
let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
|
|
||||||
let summaryHovered = this._pointerInTray || this._pointerInSummary;
|
|
||||||
|
|
||||||
let notificationsVisible = this._notificationState != State.HIDDEN;
|
|
||||||
let notificationsDone = !notificationsVisible && !notificationsPending;
|
|
||||||
|
|
||||||
let mustHideSummary = ((notificationsPending && notificationUrgent)
|
|
||||||
|| notificationsVisible || !Main.sessionMode.hasNotifications);
|
|
||||||
|
|
||||||
if (this._summaryState == State.HIDDEN && !mustHideSummary && summarySummoned)
|
|
||||||
this._showSummary();
|
|
||||||
else if (this._summaryState == State.SHOWN && (!summaryPinned || mustHideSummary))
|
|
||||||
this._hideSummary();
|
|
||||||
|
|
||||||
// Summary notification
|
// Summary notification
|
||||||
let haveClickedSummaryItem = this._clickedSummaryItem != null;
|
let haveClickedSummaryItem = this._clickedSummaryItem != null;
|
||||||
let summarySourceIsMainNotificationSource = (haveClickedSummaryItem && this._notification &&
|
let summarySourceIsMainNotificationSource = (haveClickedSummaryItem && this._notification &&
|
||||||
this._clickedSummaryItem.source == this._notification.source);
|
this._clickedSummaryItem.source == this._notification.source);
|
||||||
let canShowSummaryBoxPointer = this._summaryState == State.SHOWN;
|
let canShowSummaryBoxPointer = this._trayState == State.SHOWN;
|
||||||
// We only have sources with empty notification stacks for legacy tray icons. Currently, we never attempt
|
// We only have sources with empty notification stacks for legacy tray icons. Currently, we never attempt
|
||||||
// to show notifications for legacy tray icons, but this would be necessary if we did.
|
// to show notifications for legacy tray icons, but this would be necessary if we did.
|
||||||
let requestedNotificationStackIsEmpty = (this._clickedSummaryItemMouseButton == 1 && this._clickedSummaryItem.source.notifications.length == 0);
|
let requestedNotificationStackIsEmpty = (haveClickedSummaryItem &&
|
||||||
let wrongSummaryNotificationStack = (this._clickedSummaryItemMouseButton == 1 &&
|
this._clickedSummaryItemMouseButton == 1 &&
|
||||||
|
this._clickedSummaryItem.source.notifications.length == 0);
|
||||||
|
let wrongSummaryNotificationStack = (haveClickedSummaryItem &&
|
||||||
|
this._clickedSummaryItemMouseButton == 1 &&
|
||||||
this._summaryBoxPointer.bin.child != this._clickedSummaryItem.notificationStackWidget);
|
this._summaryBoxPointer.bin.child != this._clickedSummaryItem.notificationStackWidget);
|
||||||
let wrongSummaryRightClickMenu = (this._clickedSummaryItemMouseButton == 3 &&
|
let wrongSummaryRightClickMenu = (haveClickedSummaryItem &&
|
||||||
|
this._clickedSummaryItemMouseButton == 3 &&
|
||||||
|
this._clickedSummaryItem.rightClickMenu != null &&
|
||||||
this._summaryBoxPointer.bin.child != this._clickedSummaryItem.rightClickMenu);
|
this._summaryBoxPointer.bin.child != this._clickedSummaryItem.rightClickMenu);
|
||||||
let wrongSummaryBoxPointer = (haveClickedSummaryItem &&
|
let wrongSummaryBoxPointer = (haveClickedSummaryItem &&
|
||||||
(wrongSummaryNotificationStack || wrongSummaryRightClickMenu));
|
(wrongSummaryNotificationStack || wrongSummaryRightClickMenu));
|
||||||
@ -2291,7 +2262,7 @@ const MessageTray = new Lang.Class({
|
|||||||
if (haveClickedSummaryItem && !summarySourceIsMainNotificationSource && canShowSummaryBoxPointer && !requestedNotificationStackIsEmpty)
|
if (haveClickedSummaryItem && !summarySourceIsMainNotificationSource && canShowSummaryBoxPointer && !requestedNotificationStackIsEmpty)
|
||||||
this._showSummaryBoxPointer();
|
this._showSummaryBoxPointer();
|
||||||
} else if (this._summaryBoxPointerState == State.SHOWN) {
|
} else if (this._summaryBoxPointerState == State.SHOWN) {
|
||||||
if (!haveClickedSummaryItem || !canShowSummaryBoxPointer || wrongSummaryBoxPointer || mustHideSummary) {
|
if (!haveClickedSummaryItem || !canShowSummaryBoxPointer || wrongSummaryBoxPointer || !hasNotifications) {
|
||||||
this._hideSummaryBoxPointer();
|
this._hideSummaryBoxPointer();
|
||||||
if (wrongSummaryBoxPointer)
|
if (wrongSummaryBoxPointer)
|
||||||
this._showSummaryBoxPointer();
|
this._showSummaryBoxPointer();
|
||||||
@ -2301,9 +2272,7 @@ const MessageTray = new Lang.Class({
|
|||||||
// Tray itself
|
// Tray itself
|
||||||
let trayIsVisible = (this._trayState == State.SHOWING ||
|
let trayIsVisible = (this._trayState == State.SHOWING ||
|
||||||
this._trayState == State.SHOWN);
|
this._trayState == State.SHOWN);
|
||||||
let trayShouldBeVisible = (this._summaryState == State.SHOWING ||
|
let trayShouldBeVisible = this._traySummoned && !this._keyboardVisible && hasNotifications;
|
||||||
this._summaryState == State.SHOWN) &&
|
|
||||||
!this._keyboardVisible;
|
|
||||||
if (!trayIsVisible && trayShouldBeVisible)
|
if (!trayIsVisible && trayShouldBeVisible)
|
||||||
trayShouldBeVisible = this._showTray();
|
trayShouldBeVisible = this._showTray();
|
||||||
else if (trayIsVisible && !trayShouldBeVisible)
|
else if (trayIsVisible && !trayShouldBeVisible)
|
||||||
@ -2360,7 +2329,8 @@ const MessageTray = new Lang.Class({
|
|||||||
transition: 'easeOutQuad'
|
transition: 'easeOutQuad'
|
||||||
});
|
});
|
||||||
|
|
||||||
this._lightbox.show();
|
for (let i = 0; i < this._lightboxes.length; i++)
|
||||||
|
this._lightboxes[i].show();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@ -2383,7 +2353,7 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
if (this._desktopClone)
|
if (this._desktopClone)
|
||||||
this._desktopClone.destroy();
|
this._desktopClone.destroy();
|
||||||
let cloneSource = Main.overview.visible ? global.overlay_group : global.window_group;
|
let cloneSource = Main.overview.visible ? Main.layoutManager.overviewGroup : global.window_group;
|
||||||
this._desktopClone = new Clutter.Clone({ source: cloneSource,
|
this._desktopClone = new Clutter.Clone({ source: cloneSource,
|
||||||
clip: new Clutter.Geometry(this._bottomMonitorGeometry) });
|
clip: new Clutter.Geometry(this._bottomMonitorGeometry) });
|
||||||
Main.uiGroup.insert_child_above(this._desktopClone, cloneSource);
|
Main.uiGroup.insert_child_above(this._desktopClone, cloneSource);
|
||||||
@ -2415,7 +2385,8 @@ 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 });
|
||||||
this._lightbox.hide();
|
for (let i = 0; i < this._lightboxes.length; i++)
|
||||||
|
this._lightboxes[i].hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideDesktopClone: function() {
|
_hideDesktopClone: function() {
|
||||||
@ -2441,7 +2412,7 @@ const MessageTray = new Lang.Class({
|
|||||||
_showNotification: function() {
|
_showNotification: function() {
|
||||||
this._notification = this._notificationQueue.shift();
|
this._notification = this._notificationQueue.shift();
|
||||||
|
|
||||||
this._userActiveWhileNotificationShown = this.idleMonitor.get_idletime() > IDLE_TIME;
|
this._userActiveWhileNotificationShown = this.idleMonitor.get_idletime() <= IDLE_TIME;
|
||||||
if (!this._userActiveWhileNotificationShown) {
|
if (!this._userActiveWhileNotificationShown) {
|
||||||
// If the user isn't active, set up a watch to let us know
|
// If the user isn't active, set up a watch to let us know
|
||||||
// when the user becomes active.
|
// when the user becomes active.
|
||||||
@ -2464,7 +2435,7 @@ const MessageTray = new Lang.Class({
|
|||||||
let [x, y, mods] = global.get_pointer();
|
let [x, y, mods] = global.get_pointer();
|
||||||
// We save the position of the mouse at the time when we started showing the notification
|
// We save the position of the mouse at the time when we started showing the notification
|
||||||
// in order to determine if the notification popped up under it. We make that check if
|
// in order to determine if the notification popped up under it. We make that check if
|
||||||
// the user starts moving the mouse and _onTrayHoverChanged() gets called. We don't
|
// the user starts moving the mouse and _onNotificationHoverChanged() gets called. We don't
|
||||||
// expand the notification if it just happened to pop up under the mouse unless the user
|
// expand the notification if it just happened to pop up under the mouse unless the user
|
||||||
// explicitly mouses away from it and then mouses back in.
|
// explicitly mouses away from it and then mouses back in.
|
||||||
this._showNotificationMouseX = x;
|
this._showNotificationMouseX = x;
|
||||||
@ -2526,13 +2497,13 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
_notificationTimeout: function() {
|
_notificationTimeout: function() {
|
||||||
let [x, y, mods] = global.get_pointer();
|
let [x, y, mods] = global.get_pointer();
|
||||||
if (y > this._lastSeenMouseY + 10 && !this.actor.hover) {
|
if (y > this._lastSeenMouseY + 10 && !this._notificationHovered) {
|
||||||
// The mouse is moving towards the notification, so don't
|
// The mouse is moving towards the notification, so don't
|
||||||
// hide it yet. (We just create a new timeout (and destroy
|
// hide it yet. (We just create a new timeout (and destroy
|
||||||
// the old one) each time because the bookkeeping is
|
// the old one) each time because the bookkeeping is
|
||||||
// simpler.)
|
// simpler.)
|
||||||
this._updateNotificationTimeout(1000);
|
this._updateNotificationTimeout(1000);
|
||||||
} else if (this._useLongerTrayLeftTimeout && !this._trayLeftTimeoutId &&
|
} else if (this._useLongerNotificationLeftTimeout && !this._notificationLeftTimeoutId &&
|
||||||
(x != this._lastSeenMouseX || y != this._lastSeenMouseY)) {
|
(x != this._lastSeenMouseX || y != this._lastSeenMouseY)) {
|
||||||
// Refresh the timeout if the notification originally
|
// Refresh the timeout if the notification originally
|
||||||
// popped up under the pointer, and the pointer is hovering
|
// popped up under the pointer, and the pointer is hovering
|
||||||
@ -2576,6 +2547,14 @@ const MessageTray = new Lang.Class({
|
|||||||
this._notificationUnfocusedId = 0;
|
this._notificationUnfocusedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._useLongerNotificationLeftTimeout = false;
|
||||||
|
if (this._notificationLeftTimeoutId) {
|
||||||
|
Mainloop.source_remove(this._notificationLeftTimeoutId);
|
||||||
|
this._notificationLeftTimeoutId = 0;
|
||||||
|
this._notificationLeftMouseX = -1;
|
||||||
|
this._notificationLeftMouseY = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._notificationRemoved) {
|
if (this._notificationRemoved) {
|
||||||
Tweener.removeTweens(this._notificationWidget);
|
Tweener.removeTweens(this._notificationWidget);
|
||||||
this._notificationWidget.y = this.actor.height;
|
this._notificationWidget.y = this.actor.height;
|
||||||
@ -2603,10 +2582,9 @@ const MessageTray = new Lang.Class({
|
|||||||
if (notification.isTransient)
|
if (notification.isTransient)
|
||||||
notification.destroy(NotificationDestroyedReason.EXPIRED);
|
notification.destroy(NotificationDestroyedReason.EXPIRED);
|
||||||
|
|
||||||
this._notificationRemoved = false;
|
|
||||||
this._closeButton.hide();
|
this._closeButton.hide();
|
||||||
this._pointerInTray = false;
|
this._pointerInNotification = false;
|
||||||
this.actor.hover = false; // Clutter doesn't emit notify::hover when actors move
|
this._notificationRemoved = false;
|
||||||
this._notificationBin.child = null;
|
this._notificationBin.child = null;
|
||||||
this._notificationWidget.hide();
|
this._notificationWidget.hide();
|
||||||
},
|
},
|
||||||
@ -2619,10 +2597,9 @@ const MessageTray = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_expandNotification: function(autoExpanding) {
|
_expandNotification: function(autoExpanding) {
|
||||||
// Don't grab focus in notifications that are auto-expanded.
|
// Don't focus notifications that are auto-expanding.
|
||||||
if (!autoExpanding)
|
if (!autoExpanding)
|
||||||
this._grabHelper.grab({ actor: this._notification.actor,
|
this._ensureNotificationFocused();
|
||||||
grabFocus: true });
|
|
||||||
|
|
||||||
if (!this._notificationExpandedId)
|
if (!this._notificationExpandedId)
|
||||||
this._notificationExpandedId =
|
this._notificationExpandedId =
|
||||||
@ -2652,30 +2629,11 @@ const MessageTray = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// We use this function to grab focus when the user moves the pointer
|
|
||||||
// to a notification with CRITICAL urgency that was already auto-expanded.
|
|
||||||
_ensureNotificationFocused: function() {
|
_ensureNotificationFocused: function() {
|
||||||
this._grabHelper.grab({ actor: this._notification.actor,
|
this._grabHelper.grab({ actor: this._notification.actor,
|
||||||
grabFocus: true });
|
grabFocus: true });
|
||||||
},
|
},
|
||||||
|
|
||||||
_showSummary: function() {
|
|
||||||
this._summary.opacity = 0;
|
|
||||||
this._tween(this._summary, '_summaryState', State.SHOWN,
|
|
||||||
{ opacity: 255,
|
|
||||||
time: ANIMATION_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_hideSummary: function() {
|
|
||||||
this._tween(this._summary, '_summaryState', State.HIDDEN,
|
|
||||||
{ opacity: 0,
|
|
||||||
time: ANIMATION_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_onSourceDoneDisplayingContent: function(source, closeTray) {
|
_onSourceDoneDisplayingContent: function(source, closeTray) {
|
||||||
if (closeTray) {
|
if (closeTray) {
|
||||||
this._escapeTray();
|
this._escapeTray();
|
||||||
@ -2686,40 +2644,38 @@ const MessageTray = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_showSummaryBoxPointer: function() {
|
_showSummaryBoxPointer: function() {
|
||||||
this._summaryBoxPointerItem = this._clickedSummaryItem;
|
let child;
|
||||||
|
let summaryItem = this._clickedSummaryItem;
|
||||||
|
if (this._clickedSummaryItemMouseButton == 1) {
|
||||||
|
// Acknowledge all our notifications
|
||||||
|
summaryItem.source.notifications.forEach(function(n) { n.acknowledged = true; });
|
||||||
|
|
||||||
|
child = summaryItem.notificationStackWidget;
|
||||||
|
|
||||||
|
let closeButton = summaryItem.closeButton;
|
||||||
|
closeButton.show();
|
||||||
|
this._summaryBoxPointerCloseClickedId = closeButton.connect('clicked', Lang.bind(this, this._hideSummaryBoxPointer));
|
||||||
|
summaryItem.prepareNotificationStackForShowing();
|
||||||
|
} else if (this._clickedSummaryItemMouseButton == 3) {
|
||||||
|
child = summaryItem.rightClickMenu;
|
||||||
|
this._summaryBoxPointerCloseClickedId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the user clicked the middle mouse button, or the item
|
||||||
|
// doesn't have a right-click menu, do nothing.
|
||||||
|
if (!child)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._summaryBoxPointerItem = summaryItem;
|
||||||
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._onSourceDoneDisplayingContent));
|
Lang.bind(this, this._onSourceDoneDisplayingContent));
|
||||||
|
|
||||||
let hasRightClickMenu = this._summaryBoxPointerItem.rightClickMenu != null;
|
this._summaryBoxPointer.bin.child = child;
|
||||||
if (this._clickedSummaryItemMouseButton == 1 || !hasRightClickMenu) {
|
|
||||||
let newQueue = [];
|
|
||||||
for (let i = 0; i < this._notificationQueue.length; i++) {
|
|
||||||
let notification = this._notificationQueue[i];
|
|
||||||
let sameSource = this._summaryBoxPointerItem.source == notification.source;
|
|
||||||
if (sameSource)
|
|
||||||
notification.acknowledged = true;
|
|
||||||
else
|
|
||||||
newQueue.push(notification);
|
|
||||||
}
|
|
||||||
this._notificationQueue = newQueue;
|
|
||||||
|
|
||||||
this._summaryBoxPointer.bin.child = this._summaryBoxPointerItem.notificationStackWidget;
|
|
||||||
|
|
||||||
let closeButton = this._summaryBoxPointerItem.closeButton;
|
|
||||||
closeButton.show();
|
|
||||||
this._summaryBoxPointerCloseClickedId = closeButton.connect('clicked', Lang.bind(this, this._hideSummaryBoxPointer));
|
|
||||||
this._summaryBoxPointerItem.prepareNotificationStackForShowing();
|
|
||||||
} else if (this._clickedSummaryItemMouseButton == 3) {
|
|
||||||
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,
|
||||||
grabFocus: true,
|
modal: true,
|
||||||
onUngrab: Lang.bind(this, this._onSummaryBoxPointerUngrabbed) });
|
onUngrab: Lang.bind(this, this._onSummaryBoxPointerUngrabbed) });
|
||||||
this._lock();
|
|
||||||
|
|
||||||
this._summaryBoxPointer.actor.opacity = 0;
|
this._summaryBoxPointer.actor.opacity = 0;
|
||||||
this._summaryBoxPointer.actor.show();
|
this._summaryBoxPointer.actor.show();
|
||||||
@ -2754,10 +2710,8 @@ const MessageTray = new Lang.Class({
|
|||||||
this._clickedSummaryItem.actor.remove_style_pseudo_class('selected');
|
this._clickedSummaryItem.actor.remove_style_pseudo_class('selected');
|
||||||
this._clickedSummaryItem.actor.disconnect(this._clickedSummaryItemAllocationChangedId);
|
this._clickedSummaryItem.actor.disconnect(this._clickedSummaryItemAllocationChangedId);
|
||||||
this._summary.disconnect(this._summaryMotionId);
|
this._summary.disconnect(this._summaryMotionId);
|
||||||
Main.layoutManager.trayBox.disconnect(this._trayMotionId);
|
|
||||||
this._clickedSummaryItemAllocationChangedId = 0;
|
this._clickedSummaryItemAllocationChangedId = 0;
|
||||||
this._summaryMotionId = 0;
|
this._summaryMotionId = 0;
|
||||||
this._trayMotionId = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._clickedSummaryItem = item;
|
this._clickedSummaryItem = item;
|
||||||
@ -2772,8 +2726,6 @@ const MessageTray = new Lang.Class({
|
|||||||
// _clickedSummaryItem.actor can change absolute position without changing allocation
|
// _clickedSummaryItem.actor can change absolute position without changing allocation
|
||||||
this._summaryMotionId = this._summary.connect('allocation-changed',
|
this._summaryMotionId = this._summary.connect('allocation-changed',
|
||||||
Lang.bind(this, this._adjustSummaryBoxPointerPosition));
|
Lang.bind(this, this._adjustSummaryBoxPointerPosition));
|
||||||
this._trayMotionId = Main.layoutManager.trayBox.connect('notify::anchor-y',
|
|
||||||
Lang.bind(this, this._adjustSummaryBoxPointerPosition));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -2810,8 +2762,6 @@ const MessageTray = new Lang.Class({
|
|||||||
this._sourceDoneDisplayingId = 0;
|
this._sourceDoneDisplayingId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._unlock();
|
|
||||||
|
|
||||||
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
|
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
|
||||||
this._summaryBoxPointer.actor.hide();
|
this._summaryBoxPointer.actor.hide();
|
||||||
this._hideSummaryBoxPointerCompleted();
|
this._hideSummaryBoxPointerCompleted();
|
||||||
@ -2833,17 +2783,14 @@ const MessageTray = new Lang.Class({
|
|||||||
this._summaryBoxPointerState = State.HIDDEN;
|
this._summaryBoxPointerState = State.HIDDEN;
|
||||||
this._summaryBoxPointer.bin.child = null;
|
this._summaryBoxPointer.bin.child = null;
|
||||||
|
|
||||||
let sourceNotificationStackDoneShowing = null;
|
|
||||||
if (doneShowingNotificationStack) {
|
if (doneShowingNotificationStack) {
|
||||||
this._summaryBoxPointerItem.doneShowingNotificationStack();
|
let source = this._summaryBoxPointerItem.source;
|
||||||
sourceNotificationStackDoneShowing = this._summaryBoxPointerItem.source;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
this._summaryBoxPointerItem.doneShowingNotificationStack();
|
||||||
this._summaryBoxPointerItem = null;
|
this._summaryBoxPointerItem = null;
|
||||||
|
|
||||||
if (sourceNotificationStackDoneShowing) {
|
if (source.isTransient && !this._reNotifyAfterHideNotification)
|
||||||
if (sourceNotificationStackDoneShowing.isTransient && !this._reNotifyAfterHideNotification)
|
source.destroy(NotificationDestroyedReason.EXPIRED);
|
||||||
sourceNotificationStackDoneShowing.destroy(NotificationDestroyedReason.EXPIRED);
|
|
||||||
if (this._reNotifyAfterHideNotification) {
|
if (this._reNotifyAfterHideNotification) {
|
||||||
this._onNotify(this._reNotifyAfterHideNotification.source, this._reNotifyAfterHideNotification);
|
this._onNotify(this._reNotifyAfterHideNotification.source, this._reNotifyAfterHideNotification);
|
||||||
this._reNotifyAfterHideNotification = null;
|
this._reNotifyAfterHideNotification = null;
|
||||||
|
@ -22,6 +22,10 @@ const Tweener = imports.ui.tweener;
|
|||||||
const OPEN_AND_CLOSE_TIME = 0.1;
|
const OPEN_AND_CLOSE_TIME = 0.1;
|
||||||
const FADE_OUT_DIALOG_TIME = 1.0;
|
const FADE_OUT_DIALOG_TIME = 1.0;
|
||||||
|
|
||||||
|
const WORK_SPINNER_ICON_SIZE = 24;
|
||||||
|
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
|
||||||
|
const WORK_SPINNER_ANIMATION_TIME = 0.3;
|
||||||
|
|
||||||
const State = {
|
const State = {
|
||||||
OPENED: 0,
|
OPENED: 0,
|
||||||
CLOSED: 1,
|
CLOSED: 1,
|
||||||
@ -38,13 +42,15 @@ const ModalDialog = new Lang.Class({
|
|||||||
styleClass: null,
|
styleClass: null,
|
||||||
parentActor: Main.uiGroup,
|
parentActor: Main.uiGroup,
|
||||||
keybindingMode: Shell.KeyBindingMode.SYSTEM_MODAL,
|
keybindingMode: Shell.KeyBindingMode.SYSTEM_MODAL,
|
||||||
shouldFadeIn: true });
|
shouldFadeIn: true,
|
||||||
|
destroyOnClose: true });
|
||||||
|
|
||||||
this.state = State.CLOSED;
|
this.state = State.CLOSED;
|
||||||
this._hasModal = false;
|
this._hasModal = false;
|
||||||
this._keybindingMode = params.keybindingMode;
|
this._keybindingMode = params.keybindingMode;
|
||||||
this._shellReactive = params.shellReactive;
|
this._shellReactive = params.shellReactive;
|
||||||
this._shouldFadeIn = params.shouldFadeIn;
|
this._shouldFadeIn = params.shouldFadeIn;
|
||||||
|
this._destroyOnClose = params.destroyOnClose;
|
||||||
|
|
||||||
this._group = new St.Widget({ visible: false,
|
this._group = new St.Widget({ visible: false,
|
||||||
x: 0,
|
x: 0,
|
||||||
@ -63,7 +69,9 @@ const ModalDialog = new Lang.Class({
|
|||||||
this._group.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
this._group.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
|
||||||
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.backgroundStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
|
this._backgroundBin = new St.Bin({ child: this.backgroundStack,
|
||||||
|
x_fill: true, y_fill: true });
|
||||||
this._monitorConstraint = new Layout.MonitorConstraint();
|
this._monitorConstraint = new Layout.MonitorConstraint();
|
||||||
this._backgroundBin.add_constraint(this._monitorConstraint);
|
this._backgroundBin.add_constraint(this._monitorConstraint);
|
||||||
this._group.add_actor(this._backgroundBin);
|
this._group.add_actor(this._backgroundBin);
|
||||||
@ -79,15 +87,10 @@ const ModalDialog = new Lang.Class({
|
|||||||
{ inhibitEvents: true });
|
{ inhibitEvents: true });
|
||||||
this._lightbox.highlight(this._backgroundBin);
|
this._lightbox.highlight(this._backgroundBin);
|
||||||
|
|
||||||
let stack = new Shell.Stack();
|
|
||||||
this._backgroundBin.child = stack;
|
|
||||||
|
|
||||||
this._eventBlocker = new Clutter.Actor({ reactive: true });
|
this._eventBlocker = new Clutter.Actor({ reactive: true });
|
||||||
stack.add_actor(this._eventBlocker);
|
this.backgroundStack.add_actor(this._eventBlocker);
|
||||||
stack.add_actor(this.dialogLayout);
|
|
||||||
} else {
|
|
||||||
this._backgroundBin.child = this.dialogLayout;
|
|
||||||
}
|
}
|
||||||
|
this.backgroundStack.add_actor(this.dialogLayout);
|
||||||
|
|
||||||
|
|
||||||
this.contentLayout = new St.BoxLayout({ vertical: true });
|
this.contentLayout = new St.BoxLayout({ vertical: true });
|
||||||
@ -108,6 +111,8 @@ const ModalDialog = new Lang.Class({
|
|||||||
this._initialKeyFocus = this.dialogLayout;
|
this._initialKeyFocus = this.dialogLayout;
|
||||||
this._initialKeyFocusDestroyId = 0;
|
this._initialKeyFocusDestroyId = 0;
|
||||||
this._savedKeyFocus = null;
|
this._savedKeyFocus = null;
|
||||||
|
|
||||||
|
this._workSpinner = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
@ -181,6 +186,44 @@ const ModalDialog = new Lang.Class({
|
|||||||
return button;
|
return button;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
placeSpinner: function(layoutInfo) {
|
||||||
|
/* This is here because of recursive imports */
|
||||||
|
const Panel = imports.ui.panel;
|
||||||
|
let spinnerIcon = global.datadir + '/theme/process-working.svg';
|
||||||
|
this._workSpinner = new Panel.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
|
||||||
|
this._workSpinner.actor.opacity = 0;
|
||||||
|
this._workSpinner.actor.show();
|
||||||
|
|
||||||
|
this.buttonLayout.add(this._workSpinner.actor, layoutInfo);
|
||||||
|
},
|
||||||
|
|
||||||
|
setWorking: function(working) {
|
||||||
|
if (!this._workSpinner)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Tweener.removeTweens(this._workSpinner.actor);
|
||||||
|
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() {
|
||||||
|
if (this._workSpinner)
|
||||||
|
this._workSpinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_onKeyPressEvent: function(object, event) {
|
_onKeyPressEvent: function(object, event) {
|
||||||
this._pressedKey = event.get_key_symbol();
|
this._pressedKey = event.get_key_symbol();
|
||||||
},
|
},
|
||||||
@ -277,6 +320,9 @@ const ModalDialog = new Lang.Class({
|
|||||||
this.state = State.CLOSED;
|
this.state = State.CLOSED;
|
||||||
this._group.hide();
|
this._group.hide();
|
||||||
this.emit('closed');
|
this.emit('closed');
|
||||||
|
|
||||||
|
if (this._destroyOnClose)
|
||||||
|
this.destroy();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -244,7 +244,7 @@ const NotificationDaemon = new Lang.Class({
|
|||||||
Main.overview.connect('hidden',
|
Main.overview.connect('hidden',
|
||||||
Lang.bind(this, this._onFocusAppChanged));
|
Lang.bind(this, this._onFocusAppChanged));
|
||||||
|
|
||||||
this._trayManager.manage_stage(global.stage, Main.messageTray.actor);
|
this._trayManager.manage_screen(global.screen, Main.messageTray.actor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_imageForNotificationData: function(hints) {
|
_imageForNotificationData: function(hints) {
|
||||||
|
@ -8,6 +8,7 @@ const Layout = imports.ui.layout;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
|
|
||||||
const HIDE_TIMEOUT = 1500;
|
const HIDE_TIMEOUT = 1500;
|
||||||
const FADE_TIME = 0.1;
|
const FADE_TIME = 0.1;
|
||||||
@ -71,6 +72,7 @@ const OsdWindow = new Lang.Class({
|
|||||||
Name: 'OsdWindow',
|
Name: 'OsdWindow',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
|
this._popupSize = 0;
|
||||||
this.actor = new St.Widget({ x_expand: true,
|
this.actor = new St.Widget({ x_expand: true,
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
@ -80,6 +82,15 @@ const OsdWindow = new Lang.Class({
|
|||||||
vertical: true });
|
vertical: true });
|
||||||
this.actor.add_actor(this._box);
|
this.actor.add_actor(this._box);
|
||||||
|
|
||||||
|
this._box.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
||||||
|
this._box.connect('notify::height', Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
this._box.width = this._box.height;
|
||||||
|
}));
|
||||||
|
}));
|
||||||
|
|
||||||
this._icon = new St.Icon();
|
this._icon = new St.Icon();
|
||||||
this._box.add(this._icon, { expand: true });
|
this._box.add(this._icon, { expand: true });
|
||||||
|
|
||||||
@ -96,7 +107,7 @@ const OsdWindow = new Lang.Class({
|
|||||||
Lang.bind(this, this._monitorsChanged));
|
Lang.bind(this, this._monitorsChanged));
|
||||||
this._monitorsChanged();
|
this._monitorsChanged();
|
||||||
|
|
||||||
Main.layoutManager.addChrome(this.actor, { affectsInputRegion: false });
|
Main.uiGroup.add_child(this.actor);
|
||||||
},
|
},
|
||||||
|
|
||||||
setIcon: function(icon) {
|
setIcon: function(icon) {
|
||||||
@ -164,16 +175,30 @@ const OsdWindow = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_monitorsChanged: function() {
|
_monitorsChanged: function() {
|
||||||
/* assume 130x130 on a 640x480 display and scale from there */
|
/* assume 110x110 on a 640x480 display and scale from there */
|
||||||
let monitor = Main.layoutManager.primaryMonitor;
|
let monitor = Main.layoutManager.primaryMonitor;
|
||||||
let scalew = monitor.width / 640.0;
|
let scalew = monitor.width / 640.0;
|
||||||
let scaleh = monitor.height / 480.0;
|
let scaleh = monitor.height / 480.0;
|
||||||
let scale = Math.min(scalew, scaleh);
|
let scale = Math.min(scalew, scaleh);
|
||||||
let size = 130 * Math.max(1, scale);
|
this._popupSize = 110 * Math.max(1, scale);
|
||||||
|
|
||||||
this._box.set_size(size, size);
|
|
||||||
this._box.translation_y = monitor.height / 4;
|
this._box.translation_y = monitor.height / 4;
|
||||||
|
this._icon.icon_size = this._popupSize / 2;
|
||||||
|
this._box.style_changed();
|
||||||
|
},
|
||||||
|
|
||||||
this._icon.icon_size = size / 2;
|
_onStyleChanged: function() {
|
||||||
|
let themeNode = this._box.get_theme_node();
|
||||||
|
let horizontalPadding = themeNode.get_horizontal_padding();
|
||||||
|
let verticalPadding = themeNode.get_vertical_padding();
|
||||||
|
let topBorder = themeNode.get_border_width(St.Side.TOP);
|
||||||
|
let bottomBorder = themeNode.get_border_width(St.Side.BOTTOM);
|
||||||
|
let leftBorder = themeNode.get_border_width(St.Side.LEFT);
|
||||||
|
let rightBorder = themeNode.get_border_width(St.Side.RIGHT);
|
||||||
|
|
||||||
|
let minWidth = this._popupSize - verticalPadding - leftBorder - rightBorder;
|
||||||
|
let minHeight = this._popupSize - horizontalPadding - topBorder - bottomBorder;
|
||||||
|
|
||||||
|
this._box.style = 'min-height: %dpx;'.format(Math.max(minWidth, minHeight));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -11,7 +11,6 @@ const Shell = imports.gi.Shell;
|
|||||||
const Gdk = imports.gi.Gdk;
|
const Gdk = imports.gi.Gdk;
|
||||||
|
|
||||||
const Background = imports.ui.background;
|
const Background = imports.ui.background;
|
||||||
const Dash = imports.ui.dash;
|
|
||||||
const DND = imports.ui.dnd;
|
const DND = imports.ui.dnd;
|
||||||
const LayoutManager = imports.ui.layout;
|
const LayoutManager = imports.ui.layout;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@ -20,7 +19,6 @@ const OverviewControls = imports.ui.overviewControls;
|
|||||||
const Panel = imports.ui.panel;
|
const Panel = imports.ui.panel;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const ViewSelector = imports.ui.viewSelector;
|
|
||||||
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
||||||
|
|
||||||
// Time for initial animation going into Overview mode
|
// Time for initial animation going into Overview mode
|
||||||
@ -33,6 +31,8 @@ const SHADE_ANIMATION_TIME = .20;
|
|||||||
|
|
||||||
const DND_WINDOW_SWITCH_TIMEOUT = 1250;
|
const DND_WINDOW_SWITCH_TIMEOUT = 1250;
|
||||||
|
|
||||||
|
const OVERVIEW_ACTIVATION_TIMEOUT = 0.5;
|
||||||
|
|
||||||
const ShellInfo = new Lang.Class({
|
const ShellInfo = new Lang.Class({
|
||||||
Name: 'ShellInfo',
|
Name: 'ShellInfo',
|
||||||
|
|
||||||
@ -93,9 +93,7 @@ const Overview = new Lang.Class({
|
|||||||
_init: function() {
|
_init: function() {
|
||||||
this._overviewCreated = false;
|
this._overviewCreated = false;
|
||||||
this._initCalled = false;
|
this._initCalled = false;
|
||||||
this._controlPressed = false;
|
|
||||||
|
|
||||||
global.stage.connect('captured-event', Lang.bind(this, this._capturedEvent));
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
@ -117,7 +115,7 @@ const Overview = new Lang.Class({
|
|||||||
let monitor = Main.layoutManager.primaryMonitor;
|
let monitor = Main.layoutManager.primaryMonitor;
|
||||||
|
|
||||||
this._desktopFade = new St.Bin();
|
this._desktopFade = new St.Bin();
|
||||||
global.overlay_group.add_actor(this._desktopFade);
|
Main.layoutManager.overviewGroup.add_child(this._desktopFade);
|
||||||
|
|
||||||
let layout = new Clutter.BinLayout();
|
let layout = new Clutter.BinLayout();
|
||||||
this._stack = new Clutter.Actor({ layout_manager: layout });
|
this._stack = new Clutter.Actor({ layout_manager: layout });
|
||||||
@ -133,22 +131,14 @@ const Overview = new Lang.Class({
|
|||||||
y_expand: true });
|
y_expand: true });
|
||||||
this._overview._delegate = this;
|
this._overview._delegate = this;
|
||||||
|
|
||||||
this._groupStack = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
|
||||||
x_expand: true, y_expand: true,
|
|
||||||
clip_to_allocation: true });
|
|
||||||
this._group = new St.BoxLayout({ name: 'overview-group',
|
|
||||||
reactive: true,
|
|
||||||
x_expand: true, y_expand: true });
|
|
||||||
this._groupStack.add_actor(this._group);
|
|
||||||
|
|
||||||
this._backgroundGroup = new Meta.BackgroundGroup();
|
this._backgroundGroup = new Meta.BackgroundGroup();
|
||||||
global.overlay_group.add_child(this._backgroundGroup);
|
Main.layoutManager.overviewGroup.add_child(this._backgroundGroup);
|
||||||
this._backgroundGroup.hide();
|
|
||||||
this._bgManagers = [];
|
this._bgManagers = [];
|
||||||
|
|
||||||
|
this._activationTime = 0;
|
||||||
|
|
||||||
this.visible = false; // animating to overview, in overview, animating out
|
this.visible = false; // animating to overview, in overview, animating out
|
||||||
this._shown = false; // show() and not hide()
|
this._shown = false; // show() and not hide()
|
||||||
this._shownTemporarily = false; // showTemporarily() and not hideTemporarily()
|
|
||||||
this._modal = false; // have a modal grab
|
this._modal = false; // have a modal grab
|
||||||
this.animationInProgress = false;
|
this.animationInProgress = false;
|
||||||
this.visibleTarget = false;
|
this.visibleTarget = false;
|
||||||
@ -156,14 +146,13 @@ const Overview = new Lang.Class({
|
|||||||
// During transitions, we raise this to the top to avoid having the overview
|
// During transitions, we raise this to the top to avoid having the overview
|
||||||
// area be reactive; it causes too many issues such as double clicks on
|
// area be reactive; it causes too many issues such as double clicks on
|
||||||
// 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.Actor({ opacity: 0,
|
||||||
reactive: true });
|
reactive: true });
|
||||||
this._overview.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._stack.hide();
|
|
||||||
this._stack.add_actor(this._overview);
|
this._stack.add_actor(this._overview);
|
||||||
global.overlay_group.add_actor(this._stack);
|
Main.layoutManager.overviewGroup.add_child(this._stack);
|
||||||
|
|
||||||
this._coverPane.hide();
|
this._coverPane.hide();
|
||||||
|
|
||||||
@ -176,7 +165,6 @@ const Overview = new Lang.Class({
|
|||||||
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));
|
global.screen.connect('restacked', Lang.bind(this, this._onRestacked));
|
||||||
this._group.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
|
||||||
|
|
||||||
this._windowSwitchTimeoutId = 0;
|
this._windowSwitchTimeoutId = 0;
|
||||||
this._windowSwitchTimestamp = 0;
|
this._windowSwitchTimestamp = 0;
|
||||||
@ -238,20 +226,6 @@ const Overview = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_capturedEvent: function(actor, event) {
|
|
||||||
let type = event.type();
|
|
||||||
if (type != Clutter.EventType.KEY_PRESS &&
|
|
||||||
type != Clutter.EventType.KEY_RELEASE)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
let symbol = event.get_key_symbol();
|
|
||||||
if (symbol == Clutter.KEY_Control_L ||
|
|
||||||
symbol == Clutter.KEY_Control_R)
|
|
||||||
this._controlPressed = type == Clutter.EventType.KEY_PRESS;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
_sessionUpdated: function() {
|
_sessionUpdated: function() {
|
||||||
this.isDummy = !Main.sessionMode.hasOverview;
|
this.isDummy = !Main.sessionMode.hasOverview;
|
||||||
this._createOverview();
|
this._createOverview();
|
||||||
@ -289,28 +263,13 @@ const Overview = new Lang.Class({
|
|||||||
this._overview.add_actor(this._searchEntryBin);
|
this._overview.add_actor(this._searchEntryBin);
|
||||||
|
|
||||||
// Create controls
|
// Create controls
|
||||||
this._dash = new Dash.Dash();
|
this._controls = new OverviewControls.ControlsManager(this._searchEntry);
|
||||||
this._viewSelector = new ViewSelector.ViewSelector(this._searchEntry,
|
this._dash = this._controls.dash;
|
||||||
this._dash.showAppsButton);
|
this._viewSelector = this._controls.viewSelector;
|
||||||
this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
|
|
||||||
this._controls = new OverviewControls.ControlsManager(this._dash,
|
|
||||||
this._thumbnailsBox,
|
|
||||||
this._viewSelector);
|
|
||||||
|
|
||||||
this._controls.dashActor.x_align = Clutter.ActorAlign.START;
|
|
||||||
this._controls.dashActor.y_expand = true;
|
|
||||||
|
|
||||||
// Put the dash in a separate layer to allow content to be centered
|
|
||||||
this._groupStack.add_actor(this._controls.dashActor);
|
|
||||||
|
|
||||||
// Pack all the actors into the group
|
|
||||||
this._group.add_actor(this._controls.dashSpacer);
|
|
||||||
this._group.add(this._viewSelector.actor, { x_fill: true,
|
|
||||||
expand: true });
|
|
||||||
this._group.add_actor(this._controls.thumbnailsActor);
|
|
||||||
|
|
||||||
// Add our same-line elements after the search entry
|
// Add our same-line elements after the search entry
|
||||||
this._overview.add(this._groupStack, { y_fill: true, expand: true });
|
this._overview.add(this._controls.actor, { y_fill: true, expand: true });
|
||||||
|
this._controls.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
||||||
|
|
||||||
this._stack.add_actor(this._controls.indicatorActor);
|
this._stack.add_actor(this._controls.indicatorActor);
|
||||||
|
|
||||||
@ -346,18 +305,22 @@ const Overview = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onDragBegin: function() {
|
_onDragBegin: function() {
|
||||||
|
this._inXdndDrag = true;
|
||||||
|
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
// Remember the workspace we started from
|
// Remember the workspace we started from
|
||||||
this._lastActiveWorkspaceIndex = global.screen.get_active_workspace_index();
|
this._lastActiveWorkspaceIndex = global.screen.get_active_workspace_index();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDragEnd: function(time) {
|
_onDragEnd: function(time) {
|
||||||
|
this._inXdndDrag = false;
|
||||||
|
|
||||||
// In case the drag was canceled while in the overview
|
// In case the drag was canceled while in the overview
|
||||||
// we have to go back to where we started and hide
|
// we have to go back to where we started and hide
|
||||||
// the overview
|
// the overview
|
||||||
if (this._shownTemporarily) {
|
if (this._shown) {
|
||||||
global.screen.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
|
global.screen.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
|
||||||
this.hideTemporarily();
|
this.hide();
|
||||||
}
|
}
|
||||||
this._resetWindowSwitchTimeout();
|
this._resetWindowSwitchTimeout();
|
||||||
this._lastHoveredWindow = null;
|
this._lastHoveredWindow = null;
|
||||||
@ -405,7 +368,7 @@ const Overview = new Lang.Class({
|
|||||||
this._needsFakePointerEvent = true;
|
this._needsFakePointerEvent = true;
|
||||||
Main.activateWindow(dragEvent.targetActor._delegate.metaWindow,
|
Main.activateWindow(dragEvent.targetActor._delegate.metaWindow,
|
||||||
this._windowSwitchTimestamp);
|
this._windowSwitchTimestamp);
|
||||||
this.hideTemporarily();
|
this.hide();
|
||||||
this._lastHoveredWindow = null;
|
this._lastHoveredWindow = null;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -470,6 +433,7 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
beginItemDrag: function(source) {
|
beginItemDrag: function(source) {
|
||||||
this.emit('item-drag-begin');
|
this.emit('item-drag-begin');
|
||||||
|
this._inDrag = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelledItemDrag: function(source) {
|
cancelledItemDrag: function(source) {
|
||||||
@ -478,10 +442,12 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
endItemDrag: function(source) {
|
endItemDrag: function(source) {
|
||||||
this.emit('item-drag-end');
|
this.emit('item-drag-end');
|
||||||
|
this._inDrag = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
beginWindowDrag: function(source) {
|
beginWindowDrag: function(source) {
|
||||||
this.emit('window-drag-begin');
|
this.emit('window-drag-begin');
|
||||||
|
this._inDrag = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
cancelledWindowDrag: function(source) {
|
cancelledWindowDrag: function(source) {
|
||||||
@ -490,6 +456,7 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
endWindowDrag: function(source) {
|
endWindowDrag: function(source) {
|
||||||
this.emit('window-drag-end');
|
this.emit('window-drag-end');
|
||||||
|
this._inDrag = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// show:
|
// show:
|
||||||
@ -501,12 +468,19 @@ const Overview = new Lang.Class({
|
|||||||
if (this._shown)
|
if (this._shown)
|
||||||
return;
|
return;
|
||||||
this._shown = true;
|
this._shown = true;
|
||||||
this._syncInputMode();
|
|
||||||
if (!this._modal)
|
if (!this._syncGrab())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Main.layoutManager.showOverview();
|
||||||
this._animateVisible();
|
this._animateVisible();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
focusSearch: function() {
|
||||||
|
this.show();
|
||||||
|
this._searchEntry.grab_key_focus();
|
||||||
|
},
|
||||||
|
|
||||||
fadeInDesktop: function() {
|
fadeInDesktop: function() {
|
||||||
this._desktopFade.opacity = 0;
|
this._desktopFade.opacity = 0;
|
||||||
this._desktopFade.show();
|
this._desktopFade.show();
|
||||||
@ -536,6 +510,7 @@ const Overview = new Lang.Class({
|
|||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.animationInProgress = true;
|
this.animationInProgress = true;
|
||||||
this.visibleTarget = true;
|
this.visibleTarget = true;
|
||||||
|
this._activationTime = Date.now() / 1000;
|
||||||
|
|
||||||
// All the the actors in the window group are completely obscured,
|
// All the the actors in the window group are completely obscured,
|
||||||
// hiding the group holding them while the Overview is displayed greatly
|
// hiding the group holding them while the Overview is displayed greatly
|
||||||
@ -547,10 +522,6 @@ 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.top_window_group.hide();
|
|
||||||
this._stack.show();
|
|
||||||
this._backgroundGroup.show();
|
|
||||||
this._viewSelector.show();
|
this._viewSelector.show();
|
||||||
|
|
||||||
this._stack.opacity = 0;
|
this._stack.opacity = 0;
|
||||||
@ -568,24 +539,6 @@ const Overview = new Lang.Class({
|
|||||||
this.emit('showing');
|
this.emit('showing');
|
||||||
},
|
},
|
||||||
|
|
||||||
// showTemporarily:
|
|
||||||
//
|
|
||||||
// Animates the overview visible without grabbing mouse and keyboard input;
|
|
||||||
// if show() has already been called, this has no immediate effect, but
|
|
||||||
// will result in the overview not being hidden until hideTemporarily() is
|
|
||||||
// called.
|
|
||||||
showTemporarily: function() {
|
|
||||||
if (this.isDummy)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (this._shownTemporarily)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._syncInputMode();
|
|
||||||
this._animateVisible();
|
|
||||||
this._shownTemporarily = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
// hide:
|
// hide:
|
||||||
//
|
//
|
||||||
// Reverses the effect of show()
|
// Reverses the effect of show()
|
||||||
@ -596,31 +549,20 @@ const Overview = new Lang.Class({
|
|||||||
if (!this._shown)
|
if (!this._shown)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._controlPressed)
|
let event = Clutter.get_current_event();
|
||||||
|
if (event) {
|
||||||
|
let type = event.type();
|
||||||
|
let button = (type == Clutter.EventType.BUTTON_PRESS ||
|
||||||
|
type == Clutter.EventType.BUTTON_RELEASE);
|
||||||
|
let ctrl = (event.get_state() & Clutter.ModifierType.CONTROL_MASK) != 0;
|
||||||
|
if (button && ctrl)
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this._shownTemporarily)
|
|
||||||
this._animateNotVisible();
|
this._animateNotVisible();
|
||||||
|
|
||||||
this._shown = false;
|
this._shown = false;
|
||||||
this._syncInputMode();
|
this._syncGrab();
|
||||||
},
|
|
||||||
|
|
||||||
// hideTemporarily:
|
|
||||||
//
|
|
||||||
// Reverses the effect of showTemporarily()
|
|
||||||
hideTemporarily: function() {
|
|
||||||
if (this.isDummy)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!this._shownTemporarily)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!this._shown)
|
|
||||||
this._animateNotVisible();
|
|
||||||
|
|
||||||
this._shownTemporarily = false;
|
|
||||||
this._syncInputMode();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
@ -633,37 +575,51 @@ const Overview = new Lang.Class({
|
|||||||
this.show();
|
this.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Checks if the Activities button is currently sensitive to
|
||||||
|
// clicks. The first call to this function within the
|
||||||
|
// OVERVIEW_ACTIVATION_TIMEOUT time of the hot corner being
|
||||||
|
// triggered will return false. This avoids opening and closing
|
||||||
|
// the overview if the user both triggered the hot corner and
|
||||||
|
// clicked the Activities button.
|
||||||
|
shouldToggleByCornerOrButton: function() {
|
||||||
|
if (this.animationInProgress)
|
||||||
|
return false;
|
||||||
|
if (this._inDrag)
|
||||||
|
return false;
|
||||||
|
if (this._activationTime == 0 || Date.now() / 1000 - this._activationTime > OVERVIEW_ACTIVATION_TIMEOUT)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
//// Private methods ////
|
//// Private methods ////
|
||||||
|
|
||||||
_syncInputMode: function() {
|
_syncGrab: function() {
|
||||||
// We delay input mode changes during animation so that when removing the
|
// We delay grab changes during animation so that when removing the
|
||||||
// overview we don't have a problem with the release of a press/release
|
// overview we don't have a problem with the release of a press/release
|
||||||
// going to an application.
|
// going to an application.
|
||||||
if (this.animationInProgress)
|
if (this.animationInProgress)
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
if (this._shown) {
|
if (this._shown) {
|
||||||
|
let shouldBeModal = !this._inXdndDrag;
|
||||||
|
if (shouldBeModal) {
|
||||||
if (!this._modal) {
|
if (!this._modal) {
|
||||||
if (Main.pushModal(this._overview,
|
if (Main.pushModal(this._overview,
|
||||||
{ keybindingMode: Shell.KeyBindingMode.OVERVIEW }))
|
{ keybindingMode: Shell.KeyBindingMode.OVERVIEW })) {
|
||||||
this._modal = true;
|
this._modal = true;
|
||||||
else
|
} else {
|
||||||
this.hide();
|
this.hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (this._shownTemporarily) {
|
|
||||||
if (this._modal) {
|
|
||||||
Main.popModal(this._overview);
|
|
||||||
this._modal = false;
|
|
||||||
}
|
}
|
||||||
global.stage_input_mode = Shell.StageInputMode.FULLSCREEN;
|
|
||||||
} else {
|
} else {
|
||||||
if (this._modal) {
|
if (this._modal) {
|
||||||
Main.popModal(this._overview);
|
Main.popModal(this._overview);
|
||||||
this._modal = false;
|
this._modal = false;
|
||||||
}
|
}
|
||||||
else if (global.stage_input_mode == Shell.StageInputMode.FULLSCREEN)
|
|
||||||
global.stage_input_mode = Shell.StageInputMode.NORMAL;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
_animateNotVisible: function() {
|
_animateNotVisible: function() {
|
||||||
@ -697,10 +653,10 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
this.emit('shown');
|
this.emit('shown');
|
||||||
// Handle any calls to hide* while we were showing
|
// Handle any calls to hide* while we were showing
|
||||||
if (!this._shown && !this._shownTemporarily)
|
if (!this._shown)
|
||||||
this._animateNotVisible();
|
this._animateNotVisible();
|
||||||
|
|
||||||
this._syncInputMode();
|
this._syncGrab();
|
||||||
global.sync_pointer();
|
global.sync_pointer();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -708,25 +664,21 @@ const Overview = new Lang.Class({
|
|||||||
// Re-enable unredirection
|
// Re-enable unredirection
|
||||||
Meta.enable_unredirect_for_screen(global.screen);
|
Meta.enable_unredirect_for_screen(global.screen);
|
||||||
|
|
||||||
global.window_group.show();
|
|
||||||
global.top_window_group.show();
|
|
||||||
|
|
||||||
this._viewSelector.hide();
|
this._viewSelector.hide();
|
||||||
this._desktopFade.hide();
|
this._desktopFade.hide();
|
||||||
this._backgroundGroup.hide();
|
this._coverPane.hide();
|
||||||
this._stack.hide();
|
|
||||||
|
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.animationInProgress = false;
|
this.animationInProgress = false;
|
||||||
|
|
||||||
this._coverPane.hide();
|
|
||||||
|
|
||||||
this.emit('hidden');
|
this.emit('hidden');
|
||||||
// Handle any calls to show* while we were hiding
|
// Handle any calls to show* while we were hiding
|
||||||
if (this._shown || this._shownTemporarily)
|
if (this._shown)
|
||||||
this._animateVisible();
|
this._animateVisible();
|
||||||
|
else
|
||||||
|
Main.layoutManager.hideOverview();
|
||||||
|
|
||||||
this._syncInputMode();
|
this._syncGrab();
|
||||||
|
|
||||||
// Fake a pointer event if requested
|
// Fake a pointer event if requested
|
||||||
if (this._needsFakePointerEvent) {
|
if (this._needsFakePointerEvent) {
|
||||||
|
@ -6,10 +6,12 @@ const Meta = imports.gi.Meta;
|
|||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
|
const Dash = imports.ui.dash;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const ViewSelector = imports.ui.viewSelector;
|
const ViewSelector = imports.ui.viewSelector;
|
||||||
|
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
|
||||||
|
|
||||||
const SIDE_CONTROLS_ANIMATION_TIME = 0.16;
|
const SIDE_CONTROLS_ANIMATION_TIME = 0.16;
|
||||||
|
|
||||||
@ -269,6 +271,11 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
return alwaysZoomOut;
|
return alwaysZoomOut;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getNonExpandedWidth: function() {
|
||||||
|
let child = this.actor.get_first_child();
|
||||||
|
return child.get_theme_node().get_length('visible-width');
|
||||||
|
},
|
||||||
|
|
||||||
getSlide: function() {
|
getSlide: function() {
|
||||||
if (!this.visible)
|
if (!this.visible)
|
||||||
return 0;
|
return 0;
|
||||||
@ -280,18 +287,16 @@ const ThumbnailsSlider = new Lang.Class({
|
|||||||
let child = this.actor.get_first_child();
|
let child = this.actor.get_first_child();
|
||||||
let preferredHeight = child.get_preferred_height(-1)[1];
|
let preferredHeight = child.get_preferred_height(-1)[1];
|
||||||
let expandedWidth = child.get_preferred_width(preferredHeight)[1];
|
let expandedWidth = child.get_preferred_width(preferredHeight)[1];
|
||||||
let visibleWidth = child.get_theme_node().get_length('visible-width');
|
|
||||||
|
|
||||||
return visibleWidth / expandedWidth;
|
return this.getNonExpandedWidth() / expandedWidth;
|
||||||
},
|
},
|
||||||
|
|
||||||
getVisibleWidth: function() {
|
getVisibleWidth: function() {
|
||||||
let alwaysZoomOut = this._getAlwaysZoomOut();
|
let alwaysZoomOut = this._getAlwaysZoomOut();
|
||||||
if (alwaysZoomOut)
|
if (alwaysZoomOut)
|
||||||
return this.parent();
|
return this.parent();
|
||||||
|
else
|
||||||
let child = this.actor.get_first_child();
|
return this.getNonExpandedWidth();
|
||||||
return child.get_theme_node().get_length('visible-width');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -309,6 +314,10 @@ const DashSlider = new Lang.Class({
|
|||||||
// available allocation
|
// available allocation
|
||||||
this._dash.actor.x_expand = true;
|
this._dash.actor.x_expand = true;
|
||||||
this._dash.actor.y_expand = true;
|
this._dash.actor.y_expand = true;
|
||||||
|
|
||||||
|
this.actor.x_align = Clutter.ActorAlign.START;
|
||||||
|
this.actor.y_expand = true;
|
||||||
|
|
||||||
this.actor.add_actor(this._dash.actor);
|
this.actor.add_actor(this._dash.actor);
|
||||||
|
|
||||||
this._dash.connect('icon-size-changed', Lang.bind(this, this.updateSlide));
|
this._dash.connect('icon-size-changed', Lang.bind(this, this.updateSlide));
|
||||||
@ -452,9 +461,11 @@ const MessagesIndicator = new Lang.Class({
|
|||||||
|
|
||||||
_updateCount: function() {
|
_updateCount: function() {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
let hasChats = false;
|
||||||
this._sources.forEach(Lang.bind(this,
|
this._sources.forEach(Lang.bind(this,
|
||||||
function(source) {
|
function(source) {
|
||||||
count += source.indicatorCount;
|
count += source.indicatorCount;
|
||||||
|
hasChats |= source.isChat;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._count = count;
|
this._count = count;
|
||||||
@ -462,6 +473,7 @@ const MessagesIndicator = new Lang.Class({
|
|||||||
"%d new messages",
|
"%d new messages",
|
||||||
count).format(count);
|
count).format(count);
|
||||||
|
|
||||||
|
this._icon.visible = hasChats;
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -476,39 +488,77 @@ const MessagesIndicator = new Lang.Class({
|
|||||||
const ControlsManager = new Lang.Class({
|
const ControlsManager = new Lang.Class({
|
||||||
Name: 'ControlsManager',
|
Name: 'ControlsManager',
|
||||||
|
|
||||||
_init: function(dash, thumbnails, viewSelector) {
|
_init: function(searchEntry) {
|
||||||
this._dashSlider = new DashSlider(dash);
|
this.dash = new Dash.Dash();
|
||||||
this.dashActor = this._dashSlider.actor;
|
this._dashSlider = new DashSlider(this.dash);
|
||||||
this.dashSpacer = new DashSpacer();
|
this._dashSpacer = new DashSpacer();
|
||||||
this.dashSpacer.setDashActor(this.dashActor);
|
this._dashSpacer.setDashActor(this._dashSlider.actor);
|
||||||
|
|
||||||
this._thumbnailsSlider = new ThumbnailsSlider(thumbnails);
|
this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
|
||||||
this.thumbnailsActor = this._thumbnailsSlider.actor;
|
this._thumbnailsSlider = new ThumbnailsSlider(this._thumbnailsBox);
|
||||||
|
|
||||||
this._indicator = new MessagesIndicator(viewSelector);
|
this.viewSelector = new ViewSelector.ViewSelector(searchEntry,
|
||||||
|
this.dash.showAppsButton);
|
||||||
|
this.viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));
|
||||||
|
this.viewSelector.connect('page-empty', Lang.bind(this, this._onPageEmpty));
|
||||||
|
|
||||||
|
this._indicator = new MessagesIndicator(this.viewSelector);
|
||||||
this.indicatorActor = this._indicator.actor;
|
this.indicatorActor = this._indicator.actor;
|
||||||
|
|
||||||
this._viewSelector = viewSelector;
|
this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
||||||
this._viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));
|
reactive: true,
|
||||||
this._viewSelector.connect('page-empty', Lang.bind(this, this._onPageEmpty));
|
x_expand: true, y_expand: true,
|
||||||
|
clip_to_allocation: true });
|
||||||
|
this._group = new St.BoxLayout({ name: 'overview-group',
|
||||||
|
x_expand: true, y_expand: true });
|
||||||
|
this.actor.add_actor(this._group);
|
||||||
|
|
||||||
|
this.actor.add_actor(this._dashSlider.actor);
|
||||||
|
|
||||||
|
this._group.add_actor(this._dashSpacer);
|
||||||
|
this._group.add(this.viewSelector.actor, { x_fill: true,
|
||||||
|
expand: true });
|
||||||
|
this._group.add_actor(this._thumbnailsSlider.actor);
|
||||||
|
|
||||||
|
this._group.connect('notify::allocation', Lang.bind(this, this._updateWorkspacesGeometry));
|
||||||
|
|
||||||
Main.overview.connect('showing', Lang.bind(this, this._updateSpacerVisibility));
|
Main.overview.connect('showing', Lang.bind(this, this._updateSpacerVisibility));
|
||||||
Main.overview.connect('item-drag-begin', Lang.bind(this,
|
Main.overview.connect('item-drag-begin', Lang.bind(this,
|
||||||
function() {
|
function() {
|
||||||
let activePage = this._viewSelector.getActivePage();
|
let activePage = this.viewSelector.getActivePage();
|
||||||
if (activePage != ViewSelector.ViewPage.WINDOWS)
|
if (activePage != ViewSelector.ViewPage.WINDOWS)
|
||||||
this._viewSelector.fadeHalf();
|
this.viewSelector.fadeHalf();
|
||||||
}));
|
}));
|
||||||
Main.overview.connect('item-drag-end', Lang.bind(this,
|
Main.overview.connect('item-drag-end', Lang.bind(this,
|
||||||
function() {
|
function() {
|
||||||
this._viewSelector.fadeIn();
|
this.viewSelector.fadeIn();
|
||||||
}));
|
}));
|
||||||
Main.overview.connect('item-drag-cancelled', Lang.bind(this,
|
Main.overview.connect('item-drag-cancelled', Lang.bind(this,
|
||||||
function() {
|
function() {
|
||||||
this._viewSelector.fadeIn();
|
this.viewSelector.fadeIn();
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updateWorkspacesGeometry: function() {
|
||||||
|
let [x, y] = this.actor.get_transformed_position();
|
||||||
|
let [width, height] = this.actor.get_transformed_size();
|
||||||
|
let geometry = { x: x, y: y, width: width, height: height };
|
||||||
|
|
||||||
|
let spacing = this.actor.get_theme_node().get_length('spacing');
|
||||||
|
let dashWidth = this._dashSlider.getVisibleWidth() + spacing;
|
||||||
|
let thumbnailsWidth = this._thumbnailsSlider.getNonExpandedWidth() + spacing;
|
||||||
|
|
||||||
|
geometry.width -= dashWidth;
|
||||||
|
geometry.width -= thumbnailsWidth;
|
||||||
|
|
||||||
|
if (this.actor.get_text_direction() == Clutter.TextDirection.LTR)
|
||||||
|
geometry.x += dashWidth;
|
||||||
|
else
|
||||||
|
geometry.x += thumbnailsWidth;
|
||||||
|
|
||||||
|
this.viewSelector.setWorkspacesFullGeometry(geometry);
|
||||||
|
},
|
||||||
|
|
||||||
_setVisibility: function() {
|
_setVisibility: function() {
|
||||||
// Ignore the case when we're leaving the overview, since
|
// Ignore the case when we're leaving the overview, since
|
||||||
// actors will be made visible again when entering the overview
|
// actors will be made visible again when entering the overview
|
||||||
@ -518,7 +568,7 @@ const ControlsManager = new Lang.Class({
|
|||||||
(Main.overview.animationInProgress && !Main.overview.visibleTarget))
|
(Main.overview.animationInProgress && !Main.overview.visibleTarget))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let activePage = this._viewSelector.getActivePage();
|
let activePage = this.viewSelector.getActivePage();
|
||||||
let dashVisible = (activePage == ViewSelector.ViewPage.WINDOWS ||
|
let dashVisible = (activePage == ViewSelector.ViewPage.WINDOWS ||
|
||||||
activePage == ViewSelector.ViewPage.APPS);
|
activePage == ViewSelector.ViewPage.APPS);
|
||||||
let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
|
let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
|
||||||
@ -538,8 +588,8 @@ const ControlsManager = new Lang.Class({
|
|||||||
if (Main.overview.animationInProgress && !Main.overview.visibleTarget)
|
if (Main.overview.animationInProgress && !Main.overview.visibleTarget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let activePage = this._viewSelector.getActivePage();
|
let activePage = this.viewSelector.getActivePage();
|
||||||
this.dashSpacer.visible = (activePage == ViewSelector.ViewPage.WINDOWS);
|
this._dashSpacer.visible = (activePage == ViewSelector.ViewPage.WINDOWS);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onPageEmpty: function() {
|
_onPageEmpty: function() {
|
||||||
|
157
js/ui/panel.js
157
js/ui/panel.js
@ -18,10 +18,10 @@ const Atk = imports.gi.Atk;
|
|||||||
const Config = imports.misc.config;
|
const Config = imports.misc.config;
|
||||||
const CtrlAltTab = imports.ui.ctrlAltTab;
|
const CtrlAltTab = imports.ui.ctrlAltTab;
|
||||||
const DND = imports.ui.dnd;
|
const DND = imports.ui.dnd;
|
||||||
const Layout = imports.ui.layout;
|
|
||||||
const Overview = imports.ui.overview;
|
const Overview = imports.ui.overview;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
|
const RemoteMenu = imports.ui.remoteMenu;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
@ -145,8 +145,8 @@ const AnimatedIcon = new Lang.Class({
|
|||||||
Name: 'AnimatedIcon',
|
Name: 'AnimatedIcon',
|
||||||
Extends: Animation,
|
Extends: Animation,
|
||||||
|
|
||||||
_init: function(name, size) {
|
_init: function(filename, size) {
|
||||||
this.parent(global.datadir + '/theme/' + name, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
|
this.parent(filename, size, size, ANIMATED_ICON_UPDATE_TIMEOUT);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -259,6 +259,7 @@ const AppMenuButton = new Lang.Class({
|
|||||||
this._actionGroupNotifyId = 0;
|
this._actionGroupNotifyId = 0;
|
||||||
|
|
||||||
let bin = new St.Bin({ name: 'appMenu' });
|
let bin = new St.Bin({ name: 'appMenu' });
|
||||||
|
bin.connect('style-changed', Lang.bind(this, this._onStyleChanged));
|
||||||
this.actor.add_actor(bin);
|
this.actor.add_actor(bin);
|
||||||
|
|
||||||
this.actor.bind_property("reactive", this.actor, "can-focus", 0);
|
this.actor.bind_property("reactive", this.actor, "can-focus", 0);
|
||||||
@ -289,26 +290,24 @@ const AppMenuButton = new Lang.Class({
|
|||||||
this._visible = !Main.overview.visible;
|
this._visible = !Main.overview.visible;
|
||||||
if (!this._visible)
|
if (!this._visible)
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
Main.overview.connect('hiding', Lang.bind(this, function () {
|
this._overviewHidingId = Main.overview.connect('hiding', Lang.bind(this, function () {
|
||||||
this.show();
|
this.show();
|
||||||
}));
|
}));
|
||||||
Main.overview.connect('showing', Lang.bind(this, function () {
|
this._overviewShowingId = Main.overview.connect('showing', Lang.bind(this, function () {
|
||||||
this.hide();
|
this.hide();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._stop = true;
|
this._stop = true;
|
||||||
|
|
||||||
this._spinner = new AnimatedIcon('process-working.svg',
|
this._spinner = null;
|
||||||
PANEL_ICON_SIZE);
|
|
||||||
this._container.add_actor(this._spinner.actor);
|
|
||||||
this._spinner.actor.hide();
|
|
||||||
this._spinner.actor.lower_bottom();
|
|
||||||
|
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
let appSys = Shell.AppSystem.get_default();
|
let appSys = Shell.AppSystem.get_default();
|
||||||
|
this._focusAppNotifyId =
|
||||||
tracker.connect('notify::focus-app', Lang.bind(this, this._focusAppChanged));
|
tracker.connect('notify::focus-app', Lang.bind(this, this._focusAppChanged));
|
||||||
|
this._appStateChangedSignalId =
|
||||||
appSys.connect('app-state-changed', Lang.bind(this, this._onAppStateChanged));
|
appSys.connect('app-state-changed', Lang.bind(this, this._onAppStateChanged));
|
||||||
|
this._switchWorkspaceNotifyId =
|
||||||
global.window_manager.connect('switch-workspace', Lang.bind(this, this._sync));
|
global.window_manager.connect('switch-workspace', Lang.bind(this, this._sync));
|
||||||
|
|
||||||
this._sync();
|
this._sync();
|
||||||
@ -355,6 +354,18 @@ const AppMenuButton = new Lang.Class({
|
|||||||
onCompleteScope: this });
|
onCompleteScope: this });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onStyleChanged: function(actor) {
|
||||||
|
let node = actor.get_theme_node();
|
||||||
|
let [success, icon] = node.lookup_url('spinner-image', false);
|
||||||
|
if (!success || this._spinnerIcon == icon)
|
||||||
|
return;
|
||||||
|
this._spinnerIcon = icon;
|
||||||
|
this._spinner = new AnimatedIcon(this._spinnerIcon, PANEL_ICON_SIZE);
|
||||||
|
this._container.add_actor(this._spinner.actor);
|
||||||
|
this._spinner.actor.hide();
|
||||||
|
this._spinner.actor.lower_bottom();
|
||||||
|
},
|
||||||
|
|
||||||
_onIconBoxStyleChanged: function() {
|
_onIconBoxStyleChanged: function() {
|
||||||
let node = this._iconBox.get_theme_node();
|
let node = this._iconBox.get_theme_node();
|
||||||
this._iconBottomClip = node.get_length('app-icon-bottom-clip');
|
this._iconBottomClip = node.get_length('app-icon-bottom-clip');
|
||||||
@ -386,6 +397,10 @@ const AppMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
this._stop = true;
|
this._stop = true;
|
||||||
this.actor.reactive = true;
|
this.actor.reactive = true;
|
||||||
|
|
||||||
|
if (this._spinner == null)
|
||||||
|
return;
|
||||||
|
|
||||||
Tweener.addTween(this._spinner.actor,
|
Tweener.addTween(this._spinner.actor,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: SPINNER_ANIMATION_TIME,
|
time: SPINNER_ANIMATION_TIME,
|
||||||
@ -402,6 +417,10 @@ const AppMenuButton = new Lang.Class({
|
|||||||
startAnimation: function() {
|
startAnimation: function() {
|
||||||
this._stop = false;
|
this._stop = false;
|
||||||
this.actor.reactive = false;
|
this.actor.reactive = false;
|
||||||
|
|
||||||
|
if (this._spinner == null)
|
||||||
|
return;
|
||||||
|
|
||||||
this._spinner.play();
|
this._spinner.play();
|
||||||
this._spinner.actor.show();
|
this._spinner.actor.show();
|
||||||
},
|
},
|
||||||
@ -464,6 +483,9 @@ const AppMenuButton = new Lang.Class({
|
|||||||
}
|
}
|
||||||
this._label.actor.allocate(childBox, flags);
|
this._label.actor.allocate(childBox, flags);
|
||||||
|
|
||||||
|
if (this._spinner == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (direction == Clutter.TextDirection.LTR) {
|
if (direction == Clutter.TextDirection.LTR) {
|
||||||
childBox.x1 = Math.floor(iconWidth / 2) + this._label.actor.width;
|
childBox.x1 = Math.floor(iconWidth / 2) + this._label.actor.width;
|
||||||
childBox.x2 = childBox.x1 + this._spinner.actor.width;
|
childBox.x2 = childBox.x1 + this._spinner.actor.width;
|
||||||
@ -547,13 +569,19 @@ const AppMenuButton = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (targetApp == this._targetApp) {
|
if (targetApp == this._targetApp) {
|
||||||
if (targetApp && targetApp.get_state() != Shell.AppState.STARTING) {
|
if (targetApp &&
|
||||||
|
targetApp.get_state() != Shell.AppState.STARTING &&
|
||||||
|
targetApp.get_state() != Shell.AppState.BUSY) {
|
||||||
this.stopAnimation();
|
this.stopAnimation();
|
||||||
this._maybeSetMenu();
|
this._maybeSetMenu();
|
||||||
|
} else if (targetApp &&
|
||||||
|
targetApp.get_state() == Shell.AppState.BUSY) {
|
||||||
|
this.startAnimation();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._spinner)
|
||||||
this._spinner.actor.hide();
|
this._spinner.actor.hide();
|
||||||
if (this._iconBox.child != null)
|
if (this._iconBox.child != null)
|
||||||
this._iconBox.child.destroy();
|
this._iconBox.child.destroy();
|
||||||
@ -581,7 +609,8 @@ const AppMenuButton = new Lang.Class({
|
|||||||
this._iconBox.set_child(icon);
|
this._iconBox.set_child(icon);
|
||||||
this._iconBox.show();
|
this._iconBox.show();
|
||||||
|
|
||||||
if (targetApp.get_state() == Shell.AppState.STARTING)
|
if (targetApp.get_state() == Shell.AppState.STARTING ||
|
||||||
|
targetApp.get_state() == Shell.AppState.BUSY)
|
||||||
this.startAnimation();
|
this.startAnimation();
|
||||||
else
|
else
|
||||||
this._maybeSetMenu();
|
this._maybeSetMenu();
|
||||||
@ -593,11 +622,11 @@ const AppMenuButton = new Lang.Class({
|
|||||||
let menu;
|
let menu;
|
||||||
|
|
||||||
if (this._targetApp.action_group && this._targetApp.menu) {
|
if (this._targetApp.action_group && this._targetApp.menu) {
|
||||||
if (this.menu instanceof PopupMenu.RemoteMenu &&
|
if (this.menu instanceof RemoteMenu.RemoteMenu &&
|
||||||
this.menu.actionGroup == this._targetApp.action_group)
|
this.menu.actionGroup == this._targetApp.action_group)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu = new PopupMenu.RemoteMenu(this.actor, this._targetApp.menu, this._targetApp.action_group);
|
menu = new RemoteMenu.RemoteMenu(this.actor, this._targetApp.menu, this._targetApp.action_group);
|
||||||
menu.connect('activate', Lang.bind(this, function() {
|
menu.connect('activate', Lang.bind(this, function() {
|
||||||
let win = this._targetApp.get_windows()[0];
|
let win = this._targetApp.get_windows()[0];
|
||||||
win.check_alive(global.get_current_time());
|
win.check_alive(global.get_current_time());
|
||||||
@ -617,6 +646,33 @@ const AppMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
this.setMenu(menu);
|
this.setMenu(menu);
|
||||||
this._menuManager.addMenu(menu);
|
this._menuManager.addMenu(menu);
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
if (this._appStateChangedSignalId > 0) {
|
||||||
|
let appSys = Shell.AppSystem.get_default();
|
||||||
|
appSys.disconnect(this._appStateChangedSignalId);
|
||||||
|
this._appStateChangedSignalId = 0;
|
||||||
|
}
|
||||||
|
if (this._focusAppNotifyId > 0) {
|
||||||
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
|
tracker.disconnect(this._focusAppNotifyId);
|
||||||
|
this._focusAppNotifyId = 0;
|
||||||
|
}
|
||||||
|
if (this._overviewHidingId > 0) {
|
||||||
|
Main.overview.disconnect(this._overviewHidingId);
|
||||||
|
this._overviewHidingId = 0;
|
||||||
|
}
|
||||||
|
if (this._overviewShowingId > 0) {
|
||||||
|
Main.overview.disconnect(this._overviewShowingId);
|
||||||
|
this._overviewShowingId = 0;
|
||||||
|
}
|
||||||
|
if (this._switchWorkspaceNotifyId > 0) {
|
||||||
|
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
||||||
|
this._switchWorkspaceNotifyId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.parent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -630,23 +686,15 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
this.parent(0.0, null, true);
|
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();
|
|
||||||
container.connect('get-preferred-width', Lang.bind(this, this._containerGetPreferredWidth));
|
|
||||||
container.connect('get-preferred-height', Lang.bind(this, this._containerGetPreferredHeight));
|
|
||||||
container.connect('allocate', Lang.bind(this, this._containerAllocate));
|
|
||||||
this.actor.add_actor(container);
|
|
||||||
this.actor.name = 'panelActivities';
|
this.actor.name = 'panelActivities';
|
||||||
|
|
||||||
/* Translators: If there is no suitable word for "Activities"
|
/* Translators: If there is no suitable word for "Activities"
|
||||||
in your language, you can use the word for "Overview". */
|
in your language, you can use the word for "Overview". */
|
||||||
this._label = new St.Label({ text: _("Activities") });
|
this._label = new St.Label({ text: _("Activities") });
|
||||||
container.add_actor(this._label);
|
this.actor.add_actor(this._label);
|
||||||
|
|
||||||
this.actor.label_actor = this._label;
|
this.actor.label_actor = this._label;
|
||||||
|
|
||||||
this.hotCorner = new Layout.HotCorner(Main.layoutManager);
|
|
||||||
container.add_actor(this.hotCorner.actor);
|
|
||||||
|
|
||||||
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));
|
||||||
@ -661,44 +709,6 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
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) {
|
|
||||||
[alloc.min_size, alloc.natural_size] = this._label.get_preferred_width(forHeight);
|
|
||||||
},
|
|
||||||
|
|
||||||
_containerGetPreferredHeight: function(actor, forWidth, alloc) {
|
|
||||||
[alloc.min_size, alloc.natural_size] = this._label.get_preferred_height(forWidth);
|
|
||||||
},
|
|
||||||
|
|
||||||
_containerAllocate: function(actor, box, flags) {
|
|
||||||
this._label.allocate(box, flags);
|
|
||||||
|
|
||||||
// The hot corner needs to be outside any padding/alignment
|
|
||||||
// that has been imposed on us
|
|
||||||
let primary = Main.layoutManager.primaryMonitor;
|
|
||||||
let hotBox = new Clutter.ActorBox();
|
|
||||||
let ok, x, y;
|
|
||||||
if (actor.get_text_direction() == Clutter.TextDirection.LTR) {
|
|
||||||
[ok, x, y] = actor.transform_stage_point(primary.x, primary.y)
|
|
||||||
} else {
|
|
||||||
[ok, x, y] = actor.transform_stage_point(primary.x + primary.width, primary.y);
|
|
||||||
// hotCorner.actor has northeast gravity, so we don't need
|
|
||||||
// to adjust x for its width
|
|
||||||
}
|
|
||||||
|
|
||||||
hotBox.x1 = Math.round(x);
|
|
||||||
hotBox.x2 = hotBox.x1 + this.hotCorner.actor.width;
|
|
||||||
hotBox.y1 = Math.round(y);
|
|
||||||
hotBox.y2 = hotBox.y1 + this.hotCorner.actor.height;
|
|
||||||
this.hotCorner.actor.allocate(hotBox, flags);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDragOver: function(source, actor, x, y, time) {
|
handleDragOver: function(source, actor, x, y, time) {
|
||||||
@ -708,14 +718,14 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
if (this._xdndTimeOut != 0)
|
if (this._xdndTimeOut != 0)
|
||||||
Mainloop.source_remove(this._xdndTimeOut);
|
Mainloop.source_remove(this._xdndTimeOut);
|
||||||
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT,
|
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT,
|
||||||
Lang.bind(this, this._xdndShowOverview, actor));
|
Lang.bind(this, this._xdndToggleOverview, actor));
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
|
|
||||||
_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 (!Main.overview.shouldToggleByCornerOrButton())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -732,15 +742,12 @@ const ActivitiesButton = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_xdndShowOverview: function(actor) {
|
_xdndToggleOverview: function(actor) {
|
||||||
let [x, y, mask] = global.get_pointer();
|
let [x, y, mask] = global.get_pointer();
|
||||||
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
|
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
|
||||||
|
|
||||||
if (pickedActor == this.actor) {
|
if (pickedActor == this.actor && Main.overview.shouldToggleByCornerOrButton())
|
||||||
if (!Main.overview.visible && !Main.overview.animationInProgress) {
|
Main.overview.toggle();
|
||||||
Main.overview.showTemporarily();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Mainloop.source_remove(this._xdndTimeOut);
|
Mainloop.source_remove(this._xdndTimeOut);
|
||||||
this._xdndTimeOut = 0;
|
this._xdndTimeOut = 0;
|
||||||
@ -923,7 +930,6 @@ 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
|
||||||
@ -952,7 +958,7 @@ const Panel = new Lang.Class({
|
|||||||
|
|
||||||
this.statusArea = {};
|
this.statusArea = {};
|
||||||
|
|
||||||
this.menuManager = new PopupMenu.PopupMenuManager(this);
|
this.menuManager = new PopupMenu.PopupMenuManager(this, { keybindingMode: Shell.KeyBindingMode.TOPBAR_POPUP });
|
||||||
|
|
||||||
this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
|
this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
|
||||||
this.actor.add_actor(this._leftBox);
|
this.actor.add_actor(this._leftBox);
|
||||||
@ -1106,16 +1112,17 @@ const Panel = new Lang.Class({
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
openAppMenu: function() {
|
toggleAppMenu: function() {
|
||||||
let indicator = this.statusArea.appMenu;
|
let indicator = this.statusArea.appMenu;
|
||||||
if (!indicator) // appMenu not supported by current session mode
|
if (!indicator) // appMenu not supported by current session mode
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let menu = indicator.menu;
|
let menu = indicator.menu;
|
||||||
if (!indicator.actor.reactive || menu.isOpen)
|
if (!indicator.actor.reactive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu.open();
|
menu.toggle();
|
||||||
|
if (menu.isOpen)
|
||||||
menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -184,6 +184,9 @@ const Button = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onMenuKeyPress: function(actor, event) {
|
_onMenuKeyPress: function(actor, event) {
|
||||||
|
if (global.focus_manager.navigate_from_event(event))
|
||||||
|
return true;
|
||||||
|
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
if (symbol == Clutter.KEY_Left || symbol == Clutter.KEY_Right) {
|
if (symbol == Clutter.KEY_Left || symbol == Clutter.KEY_Right) {
|
||||||
let group = global.focus_manager.get_group(this.actor);
|
let group = global.focus_manager.get_group(this.actor);
|
||||||
|
@ -19,6 +19,12 @@ 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 % */
|
||||||
|
|
||||||
|
const Ornament = {
|
||||||
|
NONE: 0,
|
||||||
|
DOT: 1,
|
||||||
|
CHECK: 2,
|
||||||
|
};
|
||||||
|
|
||||||
function _ensureStyle(actor) {
|
function _ensureStyle(actor) {
|
||||||
if (actor.get_children) {
|
if (actor.get_children) {
|
||||||
let children = actor.get_children();
|
let children = actor.get_children();
|
||||||
@ -53,7 +59,9 @@ const PopupBaseMenuItem = new Lang.Class({
|
|||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
|
||||||
this._children = [];
|
this._children = [];
|
||||||
this._dot = null;
|
this._ornament = Ornament.NONE;
|
||||||
|
this._ornamentLabel = new St.Label({ style_class: 'popup-menu-ornament' });
|
||||||
|
this.actor.add_actor(this._ornamentLabel);
|
||||||
this._columnWidths = null;
|
this._columnWidths = null;
|
||||||
this._spacing = 0;
|
this._spacing = 0;
|
||||||
this.active = false;
|
this.active = false;
|
||||||
@ -176,40 +184,24 @@ const PopupBaseMenuItem = new Lang.Class({
|
|||||||
this._removeChild(child);
|
this._removeChild(child);
|
||||||
},
|
},
|
||||||
|
|
||||||
setShowDot: function(show) {
|
setOrnament: function(ornament) {
|
||||||
if (show) {
|
if (ornament == this._ornament)
|
||||||
if (this._dot)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._dot = new St.DrawingArea({ style_class: 'popup-menu-item-dot' });
|
this._ornament = ornament;
|
||||||
this._dot.connect('repaint', Lang.bind(this, this._onRepaintDot));
|
|
||||||
this.actor.add_actor(this._dot);
|
if (ornament == Ornament.DOT) {
|
||||||
|
this._ornamentLabel.text = '\u2022';
|
||||||
this.actor.add_accessible_state(Atk.StateType.CHECKED);
|
this.actor.add_accessible_state(Atk.StateType.CHECKED);
|
||||||
} else {
|
} else if (ornament == Ornament.CHECK) {
|
||||||
if (!this._dot)
|
this._ornamentLabel.text = '\u2713';
|
||||||
return;
|
this.actor.add_accessible_state(Atk.StateType.CHECKED);
|
||||||
|
} else if (ornament == Ornament.NONE) {
|
||||||
this._dot.destroy();
|
this._ornamentLabel.text = '';
|
||||||
this._dot = null;
|
|
||||||
this.actor.remove_accessible_state(Atk.StateType.CHECKED);
|
this.actor.remove_accessible_state(Atk.StateType.CHECKED);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onRepaintDot: function(area) {
|
|
||||||
let cr = area.get_context();
|
|
||||||
let [width, height] = area.get_surface_size();
|
|
||||||
let color = area.get_theme_node().get_foreground_color();
|
|
||||||
|
|
||||||
cr.setSourceRGBA (
|
|
||||||
color.red / 255,
|
|
||||||
color.green / 255,
|
|
||||||
color.blue / 255,
|
|
||||||
color.alpha / 255);
|
|
||||||
cr.arc(width / 2, height / 2, width / 3, 0, 2 * Math.PI);
|
|
||||||
cr.fill();
|
|
||||||
cr.$dispose();
|
|
||||||
},
|
|
||||||
|
|
||||||
// This returns column widths in logical order (i.e. from the dot
|
// This returns column widths in logical order (i.e. from the dot
|
||||||
// to the image), not in visual order (left to right)
|
// to the image), not in visual order (left to right)
|
||||||
getColumnWidths: function() {
|
getColumnWidths: function() {
|
||||||
@ -280,26 +272,25 @@ const PopupBaseMenuItem = new Lang.Class({
|
|||||||
let height = box.y2 - box.y1;
|
let height = box.y2 - box.y1;
|
||||||
let direction = this.actor.get_text_direction();
|
let direction = this.actor.get_text_direction();
|
||||||
|
|
||||||
if (this._dot) {
|
// The ornament is placed outside box
|
||||||
// The dot is placed outside box
|
|
||||||
// one quarter of padding from the border of the container
|
// one quarter of padding from the border of the container
|
||||||
// (so 3/4 from the inner border)
|
// (so 3/4 from the inner border)
|
||||||
// (padding is box.x1)
|
// (padding is box.x1)
|
||||||
let dotBox = new Clutter.ActorBox();
|
let ornamentBox = new Clutter.ActorBox();
|
||||||
let dotWidth = Math.round(box.x1 / 2);
|
let ornamentWidth = box.x1;
|
||||||
|
|
||||||
if (direction == Clutter.TextDirection.LTR) {
|
ornamentBox.x1 = 0;
|
||||||
dotBox.x1 = Math.round(box.x1 / 4);
|
ornamentBox.x2 = ornamentWidth;
|
||||||
dotBox.x2 = dotBox.x1 + dotWidth;
|
ornamentBox.y1 = box.y1;
|
||||||
} else {
|
ornamentBox.y2 = box.y2;
|
||||||
dotBox.x2 = box.x2 + 3 * Math.round(box.x1 / 4);
|
|
||||||
dotBox.x1 = dotBox.x2 - dotWidth;
|
if (direction == Clutter.TextDirection.RTL) {
|
||||||
}
|
ornamentBox.x1 += box.x2;
|
||||||
dotBox.y1 = Math.round(box.y1 + (height - dotWidth) / 2);
|
ornamentBox.x2 += box.x2;
|
||||||
dotBox.y2 = dotBox.y1 + dotWidth;
|
|
||||||
this._dot.allocate(dotBox, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._ornamentLabel.allocate(ornamentBox, flags);
|
||||||
|
|
||||||
let x;
|
let x;
|
||||||
if (direction == Clutter.TextDirection.LTR)
|
if (direction == Clutter.TextDirection.LTR)
|
||||||
x = box.x1;
|
x = box.x1;
|
||||||
@ -402,12 +393,19 @@ const PopupSeparatorMenuItem = new Lang.Class({
|
|||||||
Name: 'PopupSeparatorMenuItem',
|
Name: 'PopupSeparatorMenuItem',
|
||||||
Extends: PopupBaseMenuItem,
|
Extends: PopupBaseMenuItem,
|
||||||
|
|
||||||
_init: function () {
|
_init: function (text) {
|
||||||
this.parent({ reactive: false,
|
this.parent({ reactive: false,
|
||||||
can_focus: false});
|
can_focus: false});
|
||||||
|
|
||||||
|
this._box = new St.BoxLayout();
|
||||||
|
this.addActor(this._box, { span: -1, expand: true });
|
||||||
|
|
||||||
|
this.label = new St.Label({ text: text || '' });
|
||||||
|
this._box.add(this.label);
|
||||||
|
this.actor.label_actor = this.label;
|
||||||
|
|
||||||
this._separator = new Separator.HorizontalSeparator({ style_class: 'popup-separator-menu-item' });
|
this._separator = new Separator.HorizontalSeparator({ style_class: 'popup-separator-menu-item' });
|
||||||
this.addActor(this._separator.actor, { span: -1, expand: true });
|
this._box.add(this._separator.actor, { expand: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -553,6 +551,10 @@ const PopupSliderMenuItem = new Lang.Class({
|
|||||||
|
|
||||||
let handleRadius = themeNode.get_length('-slider-handle-radius');
|
let handleRadius = themeNode.get_length('-slider-handle-radius');
|
||||||
|
|
||||||
|
let handleBorderWidth = themeNode.get_length('-slider-handle-border-width');
|
||||||
|
let [hasHandleColor, handleBorderColor] =
|
||||||
|
themeNode.lookup_color('-slider-handle-border-color', false);
|
||||||
|
|
||||||
let sliderWidth = width - 2 * handleRadius;
|
let sliderWidth = width - 2 * handleRadius;
|
||||||
let sliderHeight = themeNode.get_length('-slider-height');
|
let sliderHeight = themeNode.get_length('-slider-height');
|
||||||
|
|
||||||
@ -604,7 +606,16 @@ const PopupSliderMenuItem = new Lang.Class({
|
|||||||
color.blue / 255,
|
color.blue / 255,
|
||||||
color.alpha / 255);
|
color.alpha / 255);
|
||||||
cr.arc(handleX, handleY, handleRadius, 0, 2 * Math.PI);
|
cr.arc(handleX, handleY, handleRadius, 0, 2 * Math.PI);
|
||||||
cr.fill();
|
cr.fillPreserve();
|
||||||
|
if (hasHandleColor && handleBorderWidth) {
|
||||||
|
cr.setSourceRGBA(
|
||||||
|
handleBorderColor.red / 255,
|
||||||
|
handleBorderColor.green / 255,
|
||||||
|
handleBorderColor.blue / 255,
|
||||||
|
handleBorderColor.alpha / 255);
|
||||||
|
cr.setLineWidth(handleBorderWidth);
|
||||||
|
cr.stroke();
|
||||||
|
}
|
||||||
cr.$dispose();
|
cr.$dispose();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -992,6 +1003,9 @@ const PopupMenuBase = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateSeparatorVisibility: function(menuItem) {
|
_updateSeparatorVisibility: function(menuItem) {
|
||||||
|
if (menuItem.label.text)
|
||||||
|
return;
|
||||||
|
|
||||||
let children = this.box.get_children();
|
let children = this.box.get_children();
|
||||||
|
|
||||||
let index = children.indexOf(menuItem.actor);
|
let index = children.indexOf(menuItem.actor);
|
||||||
@ -1157,6 +1171,7 @@ const PopupMenuBase = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
|
this.close();
|
||||||
this.removeAll();
|
this.removeAll();
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
|
|
||||||
@ -1474,23 +1489,12 @@ const PopupMenuSection = new Lang.Class({
|
|||||||
this.actor = this.box;
|
this.actor = this.box;
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
this.isOpen = true;
|
this.isOpen = true;
|
||||||
|
|
||||||
// an array of externally managed separators
|
|
||||||
this.separators = [];
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// deliberately ignore any attempt to open() or close(), but emit the
|
// deliberately ignore any attempt to open() or close(), but emit the
|
||||||
// corresponding signal so children can still pick it up
|
// corresponding signal so children can still pick it up
|
||||||
open: function() { this.emit('open-state-changed', true); },
|
open: function() { this.emit('open-state-changed', true); },
|
||||||
close: function() { this.emit('open-state-changed', false); },
|
close: function() { this.emit('open-state-changed', false); },
|
||||||
|
|
||||||
destroy: function() {
|
|
||||||
for (let i = 0; i < this.separators.length; i++)
|
|
||||||
this.separators[i].destroy();
|
|
||||||
this.separators = [];
|
|
||||||
|
|
||||||
this.parent();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const PopupSubMenuMenuItem = new Lang.Class({
|
const PopupSubMenuMenuItem = new Lang.Class({
|
||||||
@ -1525,15 +1529,30 @@ const PopupSubMenuMenuItem = new Lang.Class({
|
|||||||
this.parent();
|
this.parent();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setSubmenuShown: function(open) {
|
||||||
|
if (open)
|
||||||
|
this.menu.open(BoxPointer.PopupAnimation.FULL);
|
||||||
|
else
|
||||||
|
this.menu.close(BoxPointer.PopupAnimation.FULL);
|
||||||
|
},
|
||||||
|
|
||||||
|
_setOpenState: function(open) {
|
||||||
|
this.setSubmenuShown(open);
|
||||||
|
},
|
||||||
|
|
||||||
|
_getOpenState: function() {
|
||||||
|
return this.menu.isOpen;
|
||||||
|
},
|
||||||
|
|
||||||
_onKeyPressEvent: function(actor, event) {
|
_onKeyPressEvent: function(actor, event) {
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
|
|
||||||
if (symbol == Clutter.KEY_Right) {
|
if (symbol == Clutter.KEY_Right) {
|
||||||
this.menu.open(BoxPointer.PopupAnimation.FULL);
|
this._setOpenState(true);
|
||||||
this.menu.actor.navigate_focus(null, Gtk.DirectionType.DOWN, false);
|
this.menu.actor.navigate_focus(null, Gtk.DirectionType.DOWN, false);
|
||||||
return true;
|
return true;
|
||||||
} else if (symbol == Clutter.KEY_Left && this.menu.isOpen) {
|
} else if (symbol == Clutter.KEY_Left && this._getOpenState()) {
|
||||||
this.menu.close();
|
this._setOpenState(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1541,11 +1560,11 @@ const PopupSubMenuMenuItem = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
activate: function(event) {
|
activate: function(event) {
|
||||||
this.menu.open(BoxPointer.PopupAnimation.FULL);
|
this._setOpenState(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onButtonReleaseEvent: function(actor) {
|
_onButtonReleaseEvent: function(actor) {
|
||||||
this.menu.toggle();
|
this._setOpenState(!this._getOpenState());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1791,269 +1810,15 @@ const PopupComboBoxMenuItem = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* RemoteMenu:
|
|
||||||
*
|
|
||||||
* A PopupMenu that tracks a GMenuModel and shows its actions
|
|
||||||
* (exposed by GApplication/GActionGroup)
|
|
||||||
*/
|
|
||||||
const RemoteMenu = new Lang.Class({
|
|
||||||
Name: 'RemoteMenu',
|
|
||||||
Extends: PopupMenu,
|
|
||||||
|
|
||||||
_init: function(sourceActor, model, actionGroup) {
|
|
||||||
this.parent(sourceActor, 0.0, St.Side.TOP);
|
|
||||||
|
|
||||||
this.model = model;
|
|
||||||
this.actionGroup = actionGroup;
|
|
||||||
|
|
||||||
this._actions = { };
|
|
||||||
this._modelChanged(this.model, 0, 0, this.model.get_n_items(), this);
|
|
||||||
|
|
||||||
this._actionStateChangeId = this.actionGroup.connect('action-state-changed', Lang.bind(this, this._actionStateChanged));
|
|
||||||
this._actionEnableChangeId = this.actionGroup.connect('action-enabled-changed', Lang.bind(this, this._actionEnabledChanged));
|
|
||||||
},
|
|
||||||
|
|
||||||
destroy: function() {
|
|
||||||
if (this._actionStateChangeId) {
|
|
||||||
this.actionGroup.disconnect(this._actionStateChangeId);
|
|
||||||
this._actionStateChangeId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._actionEnableChangeId) {
|
|
||||||
this.actionGroup.disconnect(this._actionEnableChangeId);
|
|
||||||
this._actionEnableChangeId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.parent();
|
|
||||||
},
|
|
||||||
|
|
||||||
_createMenuItem: function(model, index) {
|
|
||||||
let labelValue = model.get_item_attribute_value(index, Gio.MENU_ATTRIBUTE_LABEL, null);
|
|
||||||
let label = labelValue ? labelValue.deep_unpack() : '';
|
|
||||||
// remove all underscores that are not followed by another underscore
|
|
||||||
label = label.replace(/_([^_])/, '$1');
|
|
||||||
|
|
||||||
let section_link = model.get_item_link(index, Gio.MENU_LINK_SECTION);
|
|
||||||
if (section_link) {
|
|
||||||
let item = new PopupMenuSection();
|
|
||||||
if (label) {
|
|
||||||
let title = new PopupMenuItem(label, { reactive: false,
|
|
||||||
style_class: 'popup-subtitle-menu-item' });
|
|
||||||
item._titleMenuItem = title;
|
|
||||||
title._ignored = true;
|
|
||||||
item.addMenuItem(title);
|
|
||||||
}
|
|
||||||
this._modelChanged(section_link, 0, 0, section_link.get_n_items(), item);
|
|
||||||
return [item, true, ''];
|
|
||||||
}
|
|
||||||
|
|
||||||
let submenu_link = model.get_item_link(index, Gio.MENU_LINK_SUBMENU);
|
|
||||||
|
|
||||||
if (submenu_link) {
|
|
||||||
let item = new PopupSubMenuMenuItem(label);
|
|
||||||
this._modelChanged(submenu_link, 0, 0, submenu_link.get_n_items(), item.menu);
|
|
||||||
return [item, false, ''];
|
|
||||||
}
|
|
||||||
|
|
||||||
let action_id = model.get_item_attribute_value(index, Gio.MENU_ATTRIBUTE_ACTION, null).deep_unpack();
|
|
||||||
if (!this.actionGroup.has_action(action_id)) {
|
|
||||||
// the action may not be there yet, wait for action-added
|
|
||||||
return [null, false, 'action-added'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this._actions[action_id])
|
|
||||||
this._actions[action_id] = { enabled: this.actionGroup.get_action_enabled(action_id),
|
|
||||||
state: this.actionGroup.get_action_state(action_id),
|
|
||||||
items: [ ],
|
|
||||||
};
|
|
||||||
let action = this._actions[action_id];
|
|
||||||
let item, target, destroyId, specificSignalId;
|
|
||||||
|
|
||||||
if (action.state) {
|
|
||||||
// Docs have get_state_hint(), except that the DBus protocol
|
|
||||||
// has no provision for it (so ShellApp does not implement it,
|
|
||||||
// and neither GApplication), and g_action_get_state_hint()
|
|
||||||
// always returns null
|
|
||||||
// Funny :)
|
|
||||||
|
|
||||||
switch (String.fromCharCode(action.state.classify())) {
|
|
||||||
case 'b':
|
|
||||||
item = new PopupSwitchMenuItem(label, action.state.get_boolean());
|
|
||||||
action.items.push(item);
|
|
||||||
specificSignalId = item.connect('toggled', Lang.bind(this, function(item) {
|
|
||||||
this.actionGroup.activate_action(action_id, null);
|
|
||||||
}));
|
|
||||||
break;
|
|
||||||
case 's':
|
|
||||||
item = new PopupMenuItem(label);
|
|
||||||
item._remoteTarget = model.get_item_attribute_value(index, Gio.MENU_ATTRIBUTE_TARGET, null).deep_unpack();
|
|
||||||
action.items.push(item);
|
|
||||||
item.setShowDot(action.state.deep_unpack() == item._remoteTarget);
|
|
||||||
specificSignalId = item.connect('activate', Lang.bind(this, function(item) {
|
|
||||||
this.actionGroup.activate_action(action_id, GLib.Variant.new_string(item._remoteTarget));
|
|
||||||
}));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
log('Action "%s" has state of type %s, which is not supported'.format(action_id, action.state.get_type_string()));
|
|
||||||
return [null, false, 'action-state-changed'];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
target = model.get_item_attribute_value(index, Gio.MENU_ATTRIBUTE_TARGET, null);
|
|
||||||
item = new PopupMenuItem(label);
|
|
||||||
action.items.push(item);
|
|
||||||
specificSignalId = item.connect('activate', Lang.bind(this, function() {
|
|
||||||
this.actionGroup.activate_action(action_id, target);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
item.actor.reactive = item.actor.can_focus = action.enabled;
|
|
||||||
|
|
||||||
destroyId = item.connect('destroy', Lang.bind(this, function() {
|
|
||||||
item.disconnect(destroyId);
|
|
||||||
item.disconnect(specificSignalId);
|
|
||||||
|
|
||||||
let pos = action.items.indexOf(item);
|
|
||||||
if (pos != -1)
|
|
||||||
action.items.splice(pos, 1);
|
|
||||||
}));
|
|
||||||
|
|
||||||
return [item, false, ''];
|
|
||||||
},
|
|
||||||
|
|
||||||
_modelChanged: function(model, position, removed, added, target) {
|
|
||||||
let j, k;
|
|
||||||
let j0, k0;
|
|
||||||
|
|
||||||
let currentItems = target._getMenuItems();
|
|
||||||
|
|
||||||
k0 = 0;
|
|
||||||
// skip ignored items at the beginning
|
|
||||||
while (k0 < currentItems.length && currentItems[k0]._ignored)
|
|
||||||
k0++;
|
|
||||||
// find the right menu item matching the model item
|
|
||||||
for (j0 = 0; k0 < currentItems.length && j0 < position; j0++, k0++) {
|
|
||||||
if (currentItems[k0]._ignored)
|
|
||||||
k0++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (removed == -1) {
|
|
||||||
// special flag to indicate we should destroy everything
|
|
||||||
for (k = k0; k < currentItems.length; k++)
|
|
||||||
currentItems[k].destroy();
|
|
||||||
} else {
|
|
||||||
for (j = j0, k = k0; k < currentItems.length && j < j0 + removed; j++, k++) {
|
|
||||||
currentItems[k].destroy();
|
|
||||||
|
|
||||||
if (currentItems[k]._ignored)
|
|
||||||
j--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (j = j0, k = k0; j < j0 + added; j++, k++) {
|
|
||||||
let [item, addSeparator, changeSignal] = this._createMenuItem(model, j);
|
|
||||||
|
|
||||||
if (item) {
|
|
||||||
// separators must be added in the parent to make autohiding work
|
|
||||||
if (addSeparator) {
|
|
||||||
let separator = new PopupSeparatorMenuItem();
|
|
||||||
item.separators.push(separator);
|
|
||||||
separator._ignored = true;
|
|
||||||
target.addMenuItem(separator, k+1);
|
|
||||||
k++;
|
|
||||||
}
|
|
||||||
|
|
||||||
target.addMenuItem(item, k);
|
|
||||||
|
|
||||||
if (addSeparator) {
|
|
||||||
let separator = new PopupSeparatorMenuItem();
|
|
||||||
item.separators.push(separator);
|
|
||||||
separator._ignored = true;
|
|
||||||
target.addMenuItem(separator, k+1);
|
|
||||||
k++;
|
|
||||||
}
|
|
||||||
} else if (changeSignal) {
|
|
||||||
let signalId = this.actionGroup.connect(changeSignal, Lang.bind(this, function(actionGroup, actionName) {
|
|
||||||
actionGroup.disconnect(signalId);
|
|
||||||
if (this._actions[actionName]) return;
|
|
||||||
|
|
||||||
// force a full update
|
|
||||||
this._modelChanged(model, 0, -1, model.get_n_items(), target);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!model._changedId) {
|
|
||||||
model._changedId = model.connect('items-changed', Lang.bind(this, this._modelChanged, target));
|
|
||||||
model._destroyId = target.connect('destroy', function() {
|
|
||||||
if (model._changedId)
|
|
||||||
model.disconnect(model._changedId);
|
|
||||||
if (model._destroyId)
|
|
||||||
target.disconnect(model._destroyId);
|
|
||||||
model._changedId = 0;
|
|
||||||
model._destroyId = 0;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (target instanceof PopupMenuSection) {
|
|
||||||
if (target._titleMenuItem)
|
|
||||||
target.actor.visible = target.numMenuItems != 1;
|
|
||||||
else
|
|
||||||
target.actor.visible = target.numMenuItems != 0;
|
|
||||||
} else {
|
|
||||||
let sourceItem = target.sourceActor._delegate;
|
|
||||||
if (sourceItem instanceof PopupSubMenuMenuItem)
|
|
||||||
sourceItem.actor.visible = target.numMenuItems != 0;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_actionStateChanged: function(actionGroup, action_id) {
|
|
||||||
let action = this._actions[action_id];
|
|
||||||
if (!action)
|
|
||||||
return;
|
|
||||||
|
|
||||||
action.state = actionGroup.get_action_state(action_id);
|
|
||||||
if (action.items.length) {
|
|
||||||
switch (String.fromCharCode(action.state.classify())) {
|
|
||||||
case 'b':
|
|
||||||
for (let i = 0; i < action.items.length; i++)
|
|
||||||
action.items[i].setToggleState(action.state.get_boolean());
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
for (let i = 0; i < action.items.length; i++)
|
|
||||||
action.items[i].setValue(action.state.get_double());
|
|
||||||
break;
|
|
||||||
case 's':
|
|
||||||
for (let i = 0; i < action.items.length; i++)
|
|
||||||
action.items[i].setShowDot(action.items[i]._remoteTarget == action.state.deep_unpack());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_actionEnabledChanged: function(actionGroup, action_id) {
|
|
||||||
let action = this._actions[action_id];
|
|
||||||
if (!action)
|
|
||||||
return;
|
|
||||||
|
|
||||||
action.enabled = actionGroup.get_action_enabled(action_id);
|
|
||||||
if (action.items.length) {
|
|
||||||
for (let i = 0; i < action.items.length; i++) {
|
|
||||||
let item = action.items[i];
|
|
||||||
item.actor.reactive = item.actor.can_focus = action.enabled;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/* Basic implementation of a menu manager.
|
/* Basic implementation of a menu manager.
|
||||||
* Call addMenu to add menus
|
* Call addMenu to add menus
|
||||||
*/
|
*/
|
||||||
const PopupMenuManager = new Lang.Class({
|
const PopupMenuManager = new Lang.Class({
|
||||||
Name: 'PopupMenuManager',
|
Name: 'PopupMenuManager',
|
||||||
|
|
||||||
_init: function(owner) {
|
_init: function(owner, grabParams) {
|
||||||
this._owner = owner;
|
this._owner = owner;
|
||||||
this._grabHelper = new GrabHelper.GrabHelper(owner.actor);
|
this._grabHelper = new GrabHelper.GrabHelper(owner.actor, grabParams);
|
||||||
this._menus = [];
|
this._menus = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2086,7 +1851,7 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
removeMenu: function(menu) {
|
removeMenu: function(menu) {
|
||||||
if (menu == this._activeMenu)
|
if (menu == this.activeMenu)
|
||||||
this._closeMenu(menu);
|
this._closeMenu(menu);
|
||||||
|
|
||||||
let position = this._findMenu(menu);
|
let position = this._findMenu(menu);
|
||||||
@ -2110,9 +1875,9 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
get activeMenu() {
|
get activeMenu() {
|
||||||
let actor = this._grabHelper.currentGrab.actor;
|
let firstGrab = this._grabHelper.grabStack[0];
|
||||||
if (actor)
|
if (firstGrab)
|
||||||
return actor._delegate;
|
return firstGrab.actor._delegate;
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
@ -2123,6 +1888,8 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
|
|
||||||
_onMenuOpenState: function(menu, open) {
|
_onMenuOpenState: function(menu, open) {
|
||||||
if (open) {
|
if (open) {
|
||||||
|
if (this.activeMenu && !this.activeMenu.isChildMenu(menu))
|
||||||
|
this.activeMenu.close(BoxPointer.PopupAnimation.FADE);
|
||||||
this._grabHelper.grab({ actor: menu.actor, modal: true, focus: menu.sourceActor,
|
this._grabHelper.grab({ actor: menu.actor, modal: true, focus: menu.sourceActor,
|
||||||
onUngrab: Lang.bind(this, this._closeMenu, menu) });
|
onUngrab: Lang.bind(this, this._closeMenu, menu) });
|
||||||
} else {
|
} else {
|
||||||
@ -2139,13 +1906,8 @@ const PopupMenuManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_changeMenu: function(newMenu) {
|
_changeMenu: function(newMenu) {
|
||||||
let oldMenu = this.activeMenu;
|
newMenu.open(this.activeMenu ? BoxPointer.PopupAnimation.FADE
|
||||||
if (oldMenu) {
|
: BoxPointer.PopupAnimation.FULL);
|
||||||
oldMenu.close(BoxPointer.PopupAnimation.FADE);
|
|
||||||
newMenu.open(BoxPointer.PopupAnimation.FADE);
|
|
||||||
} else {
|
|
||||||
newMenu.open(BoxPointer.PopupAnimation.FULL);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMenuSourceEnter: function(menu) {
|
_onMenuSourceEnter: function(menu) {
|
||||||
|
199
js/ui/remoteMenu.js
Normal file
199
js/ui/remoteMenu.js
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Atk = imports.gi.Atk;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
|
const ShellMenu = imports.gi.ShellMenu;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
|
|
||||||
|
function stripMnemonics(label) {
|
||||||
|
if (!label)
|
||||||
|
return '';
|
||||||
|
|
||||||
|
// remove all underscores that are not followed by another underscore
|
||||||
|
return label.replace(/_([^_])/, '$1');
|
||||||
|
}
|
||||||
|
|
||||||
|
function _insertItem(menu, trackerItem, position) {
|
||||||
|
let mapper;
|
||||||
|
|
||||||
|
if (trackerItem.get_is_separator())
|
||||||
|
mapper = new RemoteMenuSeparatorItemMapper(trackerItem);
|
||||||
|
else if (trackerItem.get_has_submenu())
|
||||||
|
mapper = new RemoteMenuSubmenuItemMapper(trackerItem);
|
||||||
|
else
|
||||||
|
mapper = new RemoteMenuItemMapper(trackerItem);
|
||||||
|
|
||||||
|
let item = mapper.menuItem;
|
||||||
|
menu.addMenuItem(item, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _removeItem(menu, position) {
|
||||||
|
let items = menu._getMenuItems();
|
||||||
|
items[position].destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
const RemoteMenuSeparatorItemMapper = new Lang.Class({
|
||||||
|
Name: 'RemoteMenuSeparatorItemMapper',
|
||||||
|
|
||||||
|
_init: function(trackerItem) {
|
||||||
|
this._trackerItem = trackerItem;
|
||||||
|
this.menuItem = new PopupMenu.PopupSeparatorMenuItem();
|
||||||
|
this._trackerItem.connect('notify::label', Lang.bind(this, this._updateLabel));
|
||||||
|
this._updateLabel();
|
||||||
|
|
||||||
|
this.menuItem.connect('destroy', function() {
|
||||||
|
trackerItem.run_dispose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateLabel: function() {
|
||||||
|
this.menuItem.label.text = stripMnemonics(this._trackerItem.label);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const RequestSubMenu = new Lang.Class({
|
||||||
|
Name: 'RequestSubMenu',
|
||||||
|
Extends: PopupMenu.PopupSubMenuMenuItem,
|
||||||
|
|
||||||
|
_init: function() {
|
||||||
|
this.parent('');
|
||||||
|
this._requestOpen = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_setOpenState: function(open) {
|
||||||
|
this.emit('request-open', open);
|
||||||
|
this._requestOpen = open;
|
||||||
|
},
|
||||||
|
|
||||||
|
_getOpenState: function() {
|
||||||
|
return this._requestOpen;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const RemoteMenuSubmenuItemMapper = new Lang.Class({
|
||||||
|
Name: 'RemoteMenuSubmenuItemMapper',
|
||||||
|
|
||||||
|
_init: function(trackerItem) {
|
||||||
|
this._trackerItem = trackerItem;
|
||||||
|
this.menuItem = new RequestSubMenu();
|
||||||
|
this._trackerItem.connect('notify::label', Lang.bind(this, this._updateLabel));
|
||||||
|
this._updateLabel();
|
||||||
|
|
||||||
|
this._tracker = Shell.MenuTracker.new_for_item_submenu(this._trackerItem,
|
||||||
|
_insertItem.bind(null, this.menuItem.menu),
|
||||||
|
_removeItem.bind(null, this.menuItem.menu));
|
||||||
|
|
||||||
|
this.menuItem.connect('request-open', Lang.bind(this, function(menu, open) {
|
||||||
|
this._trackerItem.request_submenu_shown(open);
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._trackerItem.connect('notify::submenu-shown', Lang.bind(this, function() {
|
||||||
|
this.menuItem.setSubmenuShown(this._trackerItem.get_submenu_shown());
|
||||||
|
}));
|
||||||
|
|
||||||
|
this.menuItem.connect('destroy', function() {
|
||||||
|
trackerItem.run_dispose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
this._tracker.destroy();
|
||||||
|
this.parent();
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateLabel: function() {
|
||||||
|
this.menuItem.label.text = stripMnemonics(this._trackerItem.label);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const RemoteMenuItemMapper = new Lang.Class({
|
||||||
|
Name: 'RemoteMenuItemMapper',
|
||||||
|
|
||||||
|
_init: function(trackerItem) {
|
||||||
|
this._trackerItem = trackerItem;
|
||||||
|
|
||||||
|
this.menuItem = new PopupMenu.PopupBaseMenuItem();
|
||||||
|
this._label = new St.Label();
|
||||||
|
this.menuItem.addActor(this._label);
|
||||||
|
this.menuItem.actor.label_actor = this._label;
|
||||||
|
|
||||||
|
this.menuItem.connect('activate', Lang.bind(this, function() {
|
||||||
|
this._trackerItem.activated();
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._trackerItem.bind_property('visible', this.menuItem.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
|
||||||
|
|
||||||
|
this._trackerItem.connect('notify::label', Lang.bind(this, this._updateLabel));
|
||||||
|
this._trackerItem.connect('notify::sensitive', Lang.bind(this, this._updateSensitivity));
|
||||||
|
this._trackerItem.connect('notify::role', Lang.bind(this, this._updateRole));
|
||||||
|
this._trackerItem.connect('notify::toggled', Lang.bind(this, this._updateDecoration));
|
||||||
|
|
||||||
|
this._updateLabel();
|
||||||
|
this._updateSensitivity();
|
||||||
|
this._updateRole();
|
||||||
|
|
||||||
|
this.menuItem.connect('destroy', function() {
|
||||||
|
trackerItem.run_dispose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateLabel: function() {
|
||||||
|
this._label.text = stripMnemonics(this._trackerItem.label);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSensitivity: function() {
|
||||||
|
this.menuItem.setSensitive(this._trackerItem.sensitive);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateDecoration: function() {
|
||||||
|
let ornamentForRole = {};
|
||||||
|
ornamentForRole[ShellMenu.MenuTrackerItemRole.RADIO] = PopupMenu.Ornament.DOT;
|
||||||
|
ornamentForRole[ShellMenu.MenuTrackerItemRole.CHECK] = PopupMenu.Ornament.CHECK;
|
||||||
|
|
||||||
|
let ornament = PopupMenu.Ornament.NONE;
|
||||||
|
if (this._trackerItem.toggled)
|
||||||
|
ornament = ornamentForRole[this._trackerItem.role];
|
||||||
|
|
||||||
|
this.menuItem.setOrnament(ornament);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateRole: function() {
|
||||||
|
let a11yRoles = {};
|
||||||
|
a11yRoles[ShellMenu.MenuTrackerItemRole.NORMAL] = Atk.Role.MENU_ITEM;
|
||||||
|
a11yRoles[ShellMenu.MenuTrackerItemRole.RADIO] = Atk.Role.RADIO_MENU_ITEM;
|
||||||
|
a11yRoles[ShellMenu.MenuTrackerItemRole.CHECK] = Atk.Role.CHECK_MENU_ITEM;
|
||||||
|
|
||||||
|
let a11yRole = a11yRoles[this._trackerItem.role];
|
||||||
|
this.menuItem.actor.accessible_role = a11yRole;
|
||||||
|
|
||||||
|
this._updateDecoration();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const RemoteMenu = new Lang.Class({
|
||||||
|
Name: 'RemoteMenu',
|
||||||
|
Extends: PopupMenu.PopupMenu,
|
||||||
|
|
||||||
|
_init: function(sourceActor, model, actionGroup) {
|
||||||
|
this.parent(sourceActor, 0.0, St.Side.TOP);
|
||||||
|
|
||||||
|
this._model = model;
|
||||||
|
this._actionGroup = actionGroup;
|
||||||
|
this._tracker = Shell.MenuTracker.new(this._actionGroup,
|
||||||
|
this._model,
|
||||||
|
null, /* action namespace */
|
||||||
|
_insertItem.bind(null, this),
|
||||||
|
_removeItem.bind(null, this));
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
this._tracker.destroy();
|
||||||
|
this.parent();
|
||||||
|
},
|
||||||
|
});
|
@ -127,8 +127,6 @@ function remoteProvidersLoaded(loadState) {
|
|||||||
// Special case gnome-control-center to be always active and always first
|
// Special case gnome-control-center to be always active and always first
|
||||||
sortOrder.unshift('gnome-control-center.desktop');
|
sortOrder.unshift('gnome-control-center.desktop');
|
||||||
|
|
||||||
let numSorted = sortOrder.length;
|
|
||||||
|
|
||||||
loadState.loadedProviders.sort(
|
loadState.loadedProviders.sort(
|
||||||
function(providerA, providerB) {
|
function(providerA, providerB) {
|
||||||
let idxA, idxB;
|
let idxA, idxB;
|
||||||
@ -148,15 +146,6 @@ function remoteProvidersLoaded(loadState) {
|
|||||||
return GLib.utf8_collate(nameA, nameB);
|
return GLib.utf8_collate(nameA, nameB);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 providerA isn't found, it's sorted after providerB
|
||||||
if (idxA == -1)
|
if (idxA == -1)
|
||||||
return 1;
|
return 1;
|
||||||
@ -198,7 +187,9 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
|
|
||||||
createIcon: function(size, meta) {
|
createIcon: function(size, meta) {
|
||||||
let gicon;
|
let gicon;
|
||||||
if (meta['gicon']) {
|
if (meta['icon']) {
|
||||||
|
gicon = Gio.icon_deserialize(meta['icon']);
|
||||||
|
} else if (meta['gicon']) {
|
||||||
gicon = Gio.icon_new_for_string(meta['gicon']);
|
gicon = Gio.icon_new_for_string(meta['gicon']);
|
||||||
} else if (meta['icon-data']) {
|
} else if (meta['icon-data']) {
|
||||||
let [width, height, rowStride, hasAlpha,
|
let [width, height, rowStride, hasAlpha,
|
||||||
@ -251,8 +242,12 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
let metas = results[0];
|
let metas = results[0];
|
||||||
let resultMetas = [];
|
let resultMetas = [];
|
||||||
for (let i = 0; i < metas.length; i++) {
|
for (let i = 0; i < metas.length; i++) {
|
||||||
for (let prop in metas[i])
|
for (let prop in metas[i]) {
|
||||||
|
// we can use the serialized icon variant directly
|
||||||
|
if (prop != 'icon')
|
||||||
metas[i][prop] = metas[i][prop].deep_unpack();
|
metas[i][prop] = metas[i][prop].deep_unpack();
|
||||||
|
}
|
||||||
|
|
||||||
resultMetas.push({ id: metas[i]['id'],
|
resultMetas.push({ id: metas[i]['id'],
|
||||||
name: metas[i]['name'],
|
name: metas[i]['name'],
|
||||||
description: metas[i]['description'],
|
description: metas[i]['description'],
|
||||||
|
@ -30,144 +30,13 @@ const EXEC_ARG_KEY = 'exec-arg';
|
|||||||
|
|
||||||
const DIALOG_GROW_TIME = 0.1;
|
const DIALOG_GROW_TIME = 0.1;
|
||||||
|
|
||||||
const CommandCompleter = new Lang.Class({
|
|
||||||
Name: 'CommandCompleter',
|
|
||||||
|
|
||||||
_init : function() {
|
|
||||||
this._changedCount = 0;
|
|
||||||
this._paths = GLib.getenv('PATH').split(':');
|
|
||||||
this._paths.push(GLib.get_home_dir());
|
|
||||||
this._valid = false;
|
|
||||||
this._updateInProgress = false;
|
|
||||||
this._childs = new Array(this._paths.length);
|
|
||||||
this._monitors = new Array(this._paths.length);
|
|
||||||
for (let i = 0; i < this._paths.length; i++) {
|
|
||||||
this._childs[i] = [];
|
|
||||||
let file = Gio.file_new_for_path(this._paths[i]);
|
|
||||||
let info;
|
|
||||||
try {
|
|
||||||
info = file.query_info(Gio.FILE_ATTRIBUTE_STANDARD_TYPE, Gio.FileQueryInfoFlags.NONE, null);
|
|
||||||
} catch (e) {
|
|
||||||
// FIXME catchall
|
|
||||||
this._paths[i] = null;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (info.get_attribute_uint32(Gio.FILE_ATTRIBUTE_STANDARD_TYPE) != Gio.FileType.DIRECTORY)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
this._paths[i] = file.get_path();
|
|
||||||
this._monitors[i] = file.monitor_directory(Gio.FileMonitorFlags.NONE, null);
|
|
||||||
if (this._monitors[i] != null) {
|
|
||||||
this._monitors[i].connect('changed', Lang.bind(this, this._onChanged));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this._paths = this._paths.filter(function(a) {
|
|
||||||
return a != null;
|
|
||||||
});
|
|
||||||
this._update(0);
|
|
||||||
},
|
|
||||||
|
|
||||||
update : function() {
|
|
||||||
if (this._valid)
|
|
||||||
return;
|
|
||||||
this._update(0);
|
|
||||||
},
|
|
||||||
|
|
||||||
_update : function(i) {
|
|
||||||
if (i == 0 && this._updateInProgress)
|
|
||||||
return;
|
|
||||||
this._updateInProgress = true;
|
|
||||||
this._changedCount = 0;
|
|
||||||
this._i = i;
|
|
||||||
if (i >= this._paths.length) {
|
|
||||||
this._valid = true;
|
|
||||||
this._updateInProgress = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let file = Gio.file_new_for_path(this._paths[i]);
|
|
||||||
this._childs[this._i] = [];
|
|
||||||
FileUtils.listDirAsync(file, Lang.bind(this, function (files) {
|
|
||||||
for (let i = 0; i < files.length; i++) {
|
|
||||||
this._childs[this._i].push(files[i].get_name());
|
|
||||||
}
|
|
||||||
this._update(this._i + 1);
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
|
|
||||||
_onChanged : function(m, f, of, type) {
|
|
||||||
if (!this._valid)
|
|
||||||
return;
|
|
||||||
let path = f.get_parent().get_path();
|
|
||||||
let k = undefined;
|
|
||||||
for (let i = 0; i < this._paths.length; i++) {
|
|
||||||
if (this._paths[i] == path)
|
|
||||||
k = i;
|
|
||||||
}
|
|
||||||
if (k === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (type == Gio.FileMonitorEvent.CREATED) {
|
|
||||||
this._childs[k].push(f.get_basename());
|
|
||||||
}
|
|
||||||
if (type == Gio.FileMonitorEvent.DELETED) {
|
|
||||||
this._changedCount++;
|
|
||||||
if (this._changedCount > MAX_FILE_DELETED_BEFORE_INVALID) {
|
|
||||||
this._valid = false;
|
|
||||||
}
|
|
||||||
let name = f.get_basename();
|
|
||||||
this._childs[k] = this._childs[k].filter(function(e) {
|
|
||||||
return e != name;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (type == Gio.FileMonitorEvent.UNMOUNTED) {
|
|
||||||
this._childs[k] = [];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
getCompletion: function(text) {
|
|
||||||
let common = '';
|
|
||||||
let notInit = true;
|
|
||||||
if (!this._valid) {
|
|
||||||
this._update(0);
|
|
||||||
return common;
|
|
||||||
}
|
|
||||||
function _getCommon(s1, s2) {
|
|
||||||
let k = 0;
|
|
||||||
for (; k < s1.length && k < s2.length; k++) {
|
|
||||||
if (s1[k] != s2[k])
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (k == 0)
|
|
||||||
return '';
|
|
||||||
return s1.substr(0, k);
|
|
||||||
}
|
|
||||||
function _hasPrefix(s1, prefix) {
|
|
||||||
return s1.indexOf(prefix) == 0;
|
|
||||||
}
|
|
||||||
for (let i = 0; i < this._childs.length; i++) {
|
|
||||||
for (let k = 0; k < this._childs[i].length; k++) {
|
|
||||||
if (!_hasPrefix(this._childs[i][k], text))
|
|
||||||
continue;
|
|
||||||
if (notInit) {
|
|
||||||
common = this._childs[i][k];
|
|
||||||
notInit = false;
|
|
||||||
}
|
|
||||||
common = _getCommon(common, this._childs[i][k]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (common.length)
|
|
||||||
return common.substr(text.length);
|
|
||||||
return common;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const RunDialog = new Lang.Class({
|
const RunDialog = new Lang.Class({
|
||||||
Name: 'RunDialog',
|
Name: 'RunDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
|
|
||||||
_init : function() {
|
_init : function() {
|
||||||
this.parent({ styleClass: 'run-dialog' });
|
this.parent({ styleClass: 'run-dialog',
|
||||||
|
destroyOnClose: false });
|
||||||
|
|
||||||
this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
|
this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
|
||||||
this._terminalSettings = new Gio.Settings({ schema: TERMINAL_SCHEMA });
|
this._terminalSettings = new Gio.Settings({ schema: TERMINAL_SCHEMA });
|
||||||
@ -242,8 +111,6 @@ const RunDialog = new Lang.Class({
|
|||||||
key: Clutter.Escape }]);
|
key: Clutter.Escape }]);
|
||||||
|
|
||||||
this._pathCompleter = new Gio.FilenameCompleter();
|
this._pathCompleter = new Gio.FilenameCompleter();
|
||||||
this._commandCompleter = new CommandCompleter();
|
|
||||||
this._group.connect('notify::visible', Lang.bind(this._commandCompleter, this._commandCompleter.update));
|
|
||||||
|
|
||||||
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
|
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
|
||||||
entry: this._entryText });
|
entry: this._entryText });
|
||||||
@ -259,18 +126,6 @@ const RunDialog = new Lang.Class({
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (symbol == Clutter.slash) {
|
|
||||||
// Need preload data before get completion. GFilenameCompleter load content of parent directory.
|
|
||||||
// Parent directory for /usr/include/ is /usr/. So need to add fake name('a').
|
|
||||||
let text = o.get_text().concat('/a');
|
|
||||||
let prefix;
|
|
||||||
if (text.lastIndexOf(' ') == -1)
|
|
||||||
prefix = text;
|
|
||||||
else
|
|
||||||
prefix = text.substr(text.lastIndexOf(' ') + 1);
|
|
||||||
this._getCompletion(prefix);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (symbol == Clutter.Tab) {
|
if (symbol == Clutter.Tab) {
|
||||||
let text = o.get_text();
|
let text = o.get_text();
|
||||||
let prefix;
|
let prefix;
|
||||||
@ -282,8 +137,6 @@ const RunDialog = new Lang.Class({
|
|||||||
if (postfix != null && postfix.length > 0) {
|
if (postfix != null && postfix.length > 0) {
|
||||||
o.insert_text(postfix, -1);
|
o.insert_text(postfix, -1);
|
||||||
o.set_cursor_position(text.length + postfix.length);
|
o.set_cursor_position(text.length + postfix.length);
|
||||||
if (postfix[postfix.length - 1] == '/')
|
|
||||||
this._getCompletion(text + postfix + 'a');
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -291,11 +144,53 @@ const RunDialog = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_getCommandCompletion: function(text) {
|
||||||
|
function _getCommon(s1, s2) {
|
||||||
|
if (s1 == null)
|
||||||
|
return s2;
|
||||||
|
|
||||||
|
let k = 0;
|
||||||
|
for (; k < s1.length && k < s2.length; k++) {
|
||||||
|
if (s1[k] != s2[k])
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (k == 0)
|
||||||
|
return '';
|
||||||
|
return s1.substr(0, k);
|
||||||
|
}
|
||||||
|
|
||||||
|
let paths = GLib.getenv('PATH').split(':');
|
||||||
|
paths.push(GLib.get_home_dir());
|
||||||
|
let someResults = paths.map(function(path) {
|
||||||
|
let results = [];
|
||||||
|
try {
|
||||||
|
let file = Gio.File.new_for_path(path);
|
||||||
|
let fileEnum = file.enumerate_children('standard::name', Gio.FileQueryInfoFlags.NONE, null);
|
||||||
|
let info;
|
||||||
|
while ((info = fileEnum.next_file(null))) {
|
||||||
|
let name = info.get_name();
|
||||||
|
if (name.slice(0, text.length) == text)
|
||||||
|
results.push(name);
|
||||||
|
}
|
||||||
|
} catch (e if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
|
||||||
|
!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))) {
|
||||||
|
log(e);
|
||||||
|
} finally {
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let results = someResults.reduce(function(a, b) {
|
||||||
|
return a.concat(b);
|
||||||
|
}, []);
|
||||||
|
let common = results.reduce(_getCommon, null);
|
||||||
|
return common.substr(text.length);
|
||||||
|
},
|
||||||
|
|
||||||
_getCompletion : function(text) {
|
_getCompletion : function(text) {
|
||||||
if (text.indexOf('/') != -1) {
|
if (text.indexOf('/') != -1) {
|
||||||
return this._pathCompleter.get_completion_suffix(text);
|
return this._pathCompleter.get_completion_suffix(text);
|
||||||
} else {
|
} else {
|
||||||
return this._commandCompleter.getCompletion(text);
|
return this._getCommandCompletion(text);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
|
|||||||
const LOCK_ENABLED_KEY = 'lock-enabled';
|
const LOCK_ENABLED_KEY = 'lock-enabled';
|
||||||
const LOCK_DELAY_KEY = 'lock-delay';
|
const LOCK_DELAY_KEY = 'lock-delay';
|
||||||
|
|
||||||
|
const LOCKED_STATE_STR = 'screenShield.locked';
|
||||||
// fraction of screen height the arrow must reach before completing
|
// fraction of screen height the arrow must reach before completing
|
||||||
// the slide up automatically
|
// the slide up automatically
|
||||||
const ARROW_DRAG_THRESHOLD = 0.1;
|
const ARROW_DRAG_THRESHOLD = 0.1;
|
||||||
@ -38,11 +39,7 @@ const ARROW_DRAG_THRESHOLD = 0.1;
|
|||||||
const N_ARROWS = 3;
|
const N_ARROWS = 3;
|
||||||
const ARROW_ANIMATION_TIME = 0.6;
|
const ARROW_ANIMATION_TIME = 0.6;
|
||||||
const ARROW_ANIMATION_PEAK_OPACITY = 0.4;
|
const ARROW_ANIMATION_PEAK_OPACITY = 0.4;
|
||||||
|
const ARROW_IDLE_TIME = 30000; // ms
|
||||||
// The distance in px that the lock screen will move to when pressing
|
|
||||||
// a key that has no effect in the lock screen (bumping it)
|
|
||||||
const BUMP_SIZE = 25;
|
|
||||||
const BUMP_TIME = 0.3;
|
|
||||||
|
|
||||||
const SUMMARY_ICON_SIZE = 48;
|
const SUMMARY_ICON_SIZE = 48;
|
||||||
|
|
||||||
@ -54,7 +51,7 @@ const SUMMARY_ICON_SIZE = 48;
|
|||||||
// - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
|
// - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
|
||||||
// - INITIAL_FADE_IN_TIME is used for the initial fade in at startup
|
// - INITIAL_FADE_IN_TIME is used for the initial fade in at startup
|
||||||
const STANDARD_FADE_TIME = 10;
|
const STANDARD_FADE_TIME = 10;
|
||||||
const MANUAL_FADE_TIME = 0.8;
|
const MANUAL_FADE_TIME = 0.3;
|
||||||
const BACKGROUND_FADE_TIME = 1.0;
|
const BACKGROUND_FADE_TIME = 1.0;
|
||||||
const CURTAIN_SLIDE_TIME = 0.3;
|
const CURTAIN_SLIDE_TIME = 0.3;
|
||||||
const INITIAL_FADE_IN_TIME = 0.25;
|
const INITIAL_FADE_IN_TIME = 0.25;
|
||||||
@ -218,6 +215,7 @@ const NotificationsBox = new Lang.Class({
|
|||||||
|
|
||||||
if (musicNotification != null &&
|
if (musicNotification != null &&
|
||||||
this._musicBin.child == null) {
|
this._musicBin.child == null) {
|
||||||
|
musicNotification.acknowledged = true;
|
||||||
if (musicNotification.actor.get_parent() != null)
|
if (musicNotification.actor.get_parent() != null)
|
||||||
musicNotification.actor.get_parent().remove_actor(musicNotification.actor);
|
musicNotification.actor.get_parent().remove_actor(musicNotification.actor);
|
||||||
this._musicBin.child = musicNotification.actor;
|
this._musicBin.child = musicNotification.actor;
|
||||||
@ -250,6 +248,7 @@ const NotificationsBox = new Lang.Class({
|
|||||||
sourceCountChangedId: 0,
|
sourceCountChangedId: 0,
|
||||||
sourceTitleChangedId: 0,
|
sourceTitleChangedId: 0,
|
||||||
sourceUpdatedId: 0,
|
sourceUpdatedId: 0,
|
||||||
|
sourceNotifyId: 0,
|
||||||
musicNotification: null,
|
musicNotification: null,
|
||||||
sourceBox: null,
|
sourceBox: null,
|
||||||
titleLabel: null,
|
titleLabel: null,
|
||||||
@ -260,6 +259,12 @@ const NotificationsBox = new Lang.Class({
|
|||||||
this._showSource(source, obj, obj.sourceBox);
|
this._showSource(source, obj, obj.sourceBox);
|
||||||
this._notificationBox.add(obj.sourceBox, { x_fill: false, x_align: St.Align.START });
|
this._notificationBox.add(obj.sourceBox, { x_fill: false, x_align: St.Align.START });
|
||||||
|
|
||||||
|
if (obj.musicNotification) {
|
||||||
|
obj.sourceNotifyId = source.connect('notify', Lang.bind(this, function(source, notification) {
|
||||||
|
notification.acknowledged = true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
obj.sourceCountChangedId = source.connect('count-updated', Lang.bind(this, function(source) {
|
obj.sourceCountChangedId = source.connect('count-updated', Lang.bind(this, function(source) {
|
||||||
this._countChanged(source, obj);
|
this._countChanged(source, obj);
|
||||||
}));
|
}));
|
||||||
@ -340,6 +345,8 @@ const NotificationsBox = new Lang.Class({
|
|||||||
if (obj.musicNotification) {
|
if (obj.musicNotification) {
|
||||||
this._musicBin.child = null;
|
this._musicBin.child = null;
|
||||||
obj.musicNotification = null;
|
obj.musicNotification = null;
|
||||||
|
|
||||||
|
source.disconnect(obj.sourceNotifyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
source.disconnect(obj.sourceDestroyId);
|
source.disconnect(obj.sourceDestroyId);
|
||||||
@ -435,8 +442,8 @@ const ScreenShield = new Lang.Class({
|
|||||||
name: 'lockScreenGroup',
|
name: 'lockScreenGroup',
|
||||||
visible: false,
|
visible: false,
|
||||||
});
|
});
|
||||||
this._lockScreenGroup.connect('key-release-event',
|
this._lockScreenGroup.connect('key-press-event',
|
||||||
Lang.bind(this, this._onLockScreenKeyRelease));
|
Lang.bind(this, this._onLockScreenKeyPress));
|
||||||
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');
|
Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic');
|
||||||
@ -456,6 +463,9 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._updateBackgrounds();
|
this._updateBackgrounds();
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._updateBackgrounds));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._updateBackgrounds));
|
||||||
|
|
||||||
|
this._arrowAnimationId = 0;
|
||||||
|
this._arrowWatchId = 0;
|
||||||
|
this._arrowActiveWatchId = 0;
|
||||||
this._arrowContainer = new St.BoxLayout({ style_class: 'screen-shield-arrows',
|
this._arrowContainer = new St.BoxLayout({ style_class: 'screen-shield-arrows',
|
||||||
vertical: true,
|
vertical: true,
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
@ -507,14 +517,18 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._screenSaverDBus = new ShellDBus.ScreenSaverDBus(this);
|
this._screenSaverDBus = new ShellDBus.ScreenSaverDBus(this);
|
||||||
|
|
||||||
this._inhibitor = null;
|
this._inhibitor = null;
|
||||||
|
this._aboutToSuspend = false;
|
||||||
this._loginManager = LoginManager.getLoginManager();
|
this._loginManager = LoginManager.getLoginManager();
|
||||||
this._loginManager.connect('prepare-for-sleep',
|
this._loginManager.connect('prepare-for-sleep',
|
||||||
Lang.bind(this, this._prepareForSleep));
|
Lang.bind(this, this._prepareForSleep));
|
||||||
this._inhibitSuspend();
|
this._inhibitSuspend();
|
||||||
|
|
||||||
this._loginSession = this._loginManager.getCurrentSessionProxy();
|
this._loginManager.getCurrentSessionProxy(Lang.bind(this,
|
||||||
|
function(sessionProxy) {
|
||||||
|
this._loginSession = sessionProxy;
|
||||||
this._loginSession.connectSignal('Lock', Lang.bind(this, function() { this.lock(false); }));
|
this._loginSession.connectSignal('Lock', Lang.bind(this, function() { this.lock(false); }));
|
||||||
this._loginSession.connectSignal('Unlock', Lang.bind(this, function() { this.deactivate(false); }));
|
this._loginSession.connectSignal('Unlock', Lang.bind(this, function() { this.deactivate(false); }));
|
||||||
|
}));
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema: SCREENSAVER_SCHEMA });
|
this._settings = new Gio.Settings({ schema: SCREENSAVER_SCHEMA });
|
||||||
|
|
||||||
@ -547,9 +561,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
let bgManager = new Background.BackgroundManager({ container: widget,
|
let bgManager = new Background.BackgroundManager({ container: widget,
|
||||||
monitorIndex: monitorIndex,
|
monitorIndex: monitorIndex,
|
||||||
effects: Meta.BackgroundEffects.BLUR | Meta.BackgroundEffects.DESATURATE,
|
|
||||||
controlPosition: false });
|
controlPosition: false });
|
||||||
bgManager.background.saturation = 0.6;
|
|
||||||
|
|
||||||
this._bgManagers.push(bgManager);
|
this._bgManagers.push(bgManager);
|
||||||
|
|
||||||
@ -561,6 +573,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._bgManagers[i].destroy();
|
this._bgManagers[i].destroy();
|
||||||
|
|
||||||
this._bgManagers = [];
|
this._bgManagers = [];
|
||||||
|
this._backgroundGroup.destroy_all_children();
|
||||||
|
|
||||||
for (let i = 0; i < Main.layoutManager.monitors.length; i++)
|
for (let i = 0; i < Main.layoutManager.monitors.length; i++)
|
||||||
this._createBackground(i);
|
this._createBackground(i);
|
||||||
@ -590,28 +603,28 @@ const ScreenShield = new Lang.Class({
|
|||||||
return this._isModal;
|
return this._isModal;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onLockScreenKeyRelease: function(actor, event) {
|
_onLockScreenKeyPress: function(actor, event) {
|
||||||
let symbol = event.get_key_symbol();
|
let symbol = event.get_key_symbol();
|
||||||
|
let unichar = event.get_key_unicode();
|
||||||
|
|
||||||
// Do nothing if the lock screen is not fully shown.
|
// Do nothing if the lock screen is not fully shown.
|
||||||
// This avoids reusing the previous (and stale) unlock
|
// This avoids reusing the previous (and stale) unlock
|
||||||
// dialog if esc is pressed while the curtain is going
|
// dialog if esc is pressed while the curtain is going
|
||||||
// down after cancel.
|
// 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)
|
if (this._lockScreenState != MessageTray.State.SHOWN)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (symbol == Clutter.KEY_Escape ||
|
let isEnter = (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_KP_Enter);
|
||||||
symbol == Clutter.KEY_Return ||
|
if (!isEnter && !(GLib.unichar_isprint(unichar) || symbol == Clutter.KEY_Escape))
|
||||||
symbol == Clutter.KEY_KP_Enter) {
|
return false;
|
||||||
this._liftShield(false, 0);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._bumpLockScreen();
|
this._ensureUnlockDialog(true, true);
|
||||||
|
|
||||||
|
if (GLib.unichar_isgraph(unichar))
|
||||||
|
this._dialog.addCharacter(unichar);
|
||||||
|
|
||||||
|
this._liftShield(true, 0);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -649,6 +662,8 @@ const ScreenShield = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_prepareForSleep: function(loginManager, aboutToSuspend) {
|
_prepareForSleep: function(loginManager, aboutToSuspend) {
|
||||||
|
this._aboutToSuspend = aboutToSuspend;
|
||||||
|
|
||||||
if (aboutToSuspend) {
|
if (aboutToSuspend) {
|
||||||
if (!this._settings.get_boolean(LOCK_ENABLED_KEY)) {
|
if (!this._settings.get_boolean(LOCK_ENABLED_KEY)) {
|
||||||
this._uninhibitSuspend();
|
this._uninhibitSuspend();
|
||||||
@ -849,21 +864,6 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._hideLockScreen(false, 0);
|
this._hideLockScreen(false, 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
_bumpLockScreen: function() {
|
|
||||||
Tweener.removeTweens(this._lockScreenGroup);
|
|
||||||
Tweener.addTween(this._lockScreenGroup,
|
|
||||||
{ y: -BUMP_SIZE,
|
|
||||||
time: BUMP_TIME / 2,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: function() {
|
|
||||||
Tweener.addTween(this,
|
|
||||||
{ y: 0,
|
|
||||||
time: BUMP_TIME / 2,
|
|
||||||
transition: 'easeInQuad' });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_hideLockScreenComplete: function() {
|
_hideLockScreenComplete: function() {
|
||||||
if (Main.sessionMode.currentMode == 'lock-screen')
|
if (Main.sessionMode.currentMode == 'lock-screen')
|
||||||
Main.sessionMode.popMode('lock-screen');
|
Main.sessionMode.popMode('lock-screen');
|
||||||
@ -917,14 +917,12 @@ const ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
|
|
||||||
let time = global.get_current_time();
|
let time = global.get_current_time();
|
||||||
this._dialog.connect('loaded', Lang.bind(this, function() {
|
|
||||||
if (!this._dialog.open(time, onPrimary)) {
|
if (!this._dialog.open(time, onPrimary)) {
|
||||||
// This is kind of an impossible error: we're already modal
|
// This is kind of an impossible error: we're already modal
|
||||||
// by the time we reach this...
|
// by the time we reach this...
|
||||||
log('Could not open login dialog: failed to acquire grab');
|
log('Could not open login dialog: failed to acquire grab');
|
||||||
this.deactivate(true);
|
this.deactivate(true);
|
||||||
}
|
}
|
||||||
}));
|
|
||||||
|
|
||||||
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));
|
||||||
@ -990,16 +988,60 @@ const ScreenShield = new Lang.Class({
|
|||||||
Main.sessionMode.pushMode('lock-screen');
|
Main.sessionMode.pushMode('lock-screen');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_startArrowAnimation: function() {
|
||||||
|
this._arrowActiveWatchId = 0;
|
||||||
|
|
||||||
|
if (!this._arrowAnimationId) {
|
||||||
|
this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));
|
||||||
|
this._animateArrows();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this._arrowWatchId)
|
||||||
|
this._arrowWatchId = this.idleMonitor.add_idle_watch(ARROW_IDLE_TIME,
|
||||||
|
Lang.bind(this, this._pauseArrowAnimation));
|
||||||
|
},
|
||||||
|
|
||||||
|
_pauseArrowAnimation: function() {
|
||||||
|
if (this._arrowAnimationId) {
|
||||||
|
Mainloop.source_remove(this._arrowAnimationId);
|
||||||
|
this._arrowAnimationId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this._arrowActiveWatchId)
|
||||||
|
this._arrowActiveWatchId = this.idleMonitor.add_user_active_watch(Lang.bind(this, this._startArrowAnimation));
|
||||||
|
},
|
||||||
|
|
||||||
|
_stopArrowAnimation: function() {
|
||||||
|
if (this._arrowAnimationId) {
|
||||||
|
Mainloop.source_remove(this._arrowAnimationId);
|
||||||
|
this._arrowAnimationId = 0;
|
||||||
|
}
|
||||||
|
if (this._arrowActiveWatchId) {
|
||||||
|
this.idleMonitor.remove_watch(this._arrowActiveWatchId);
|
||||||
|
this._arrowActiveWatchId = 0;
|
||||||
|
}
|
||||||
|
if (this._arrowWatchId) {
|
||||||
|
this.idleMonitor.remove_watch(this._arrowWatchId);
|
||||||
|
this._arrowWatchId = 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_checkArrowAnimation: function() {
|
||||||
|
let idleTime = this.idleMonitor.get_idletime();
|
||||||
|
|
||||||
|
if (idleTime < ARROW_IDLE_TIME)
|
||||||
|
this._startArrowAnimation();
|
||||||
|
else
|
||||||
|
this._pauseArrowAnimation();
|
||||||
|
},
|
||||||
|
|
||||||
_lockScreenShown: function() {
|
_lockScreenShown: function() {
|
||||||
if (this._dialog && !this._isGreeter) {
|
if (this._dialog && !this._isGreeter) {
|
||||||
this._dialog.destroy();
|
this._dialog.destroy();
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._arrowAnimationId)
|
this._checkArrowAnimation();
|
||||||
Mainloop.source_remove(this._arrowAnimationId);
|
|
||||||
this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));
|
|
||||||
this._animateArrows();
|
|
||||||
|
|
||||||
let motionId = global.stage.connect('captured-event', function(stage, event) {
|
let motionId = global.stage.connect('captured-event', function(stage, event) {
|
||||||
if (event.type() == Clutter.EventType.MOTION) {
|
if (event.type() == Clutter.EventType.MOTION) {
|
||||||
@ -1021,6 +1063,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
if (prevIsActive != this._isActive)
|
if (prevIsActive != this._isActive)
|
||||||
this.emit('active-changed');
|
this.emit('active-changed');
|
||||||
|
|
||||||
|
if (this._aboutToSuspend)
|
||||||
this._uninhibitSuspend();
|
this._uninhibitSuspend();
|
||||||
|
|
||||||
this.emit('lock-screen-shown');
|
this.emit('lock-screen-shown');
|
||||||
@ -1061,12 +1104,9 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._notificationsBox = null;
|
this._notificationsBox = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._lockScreenContentsBox.destroy();
|
this._stopArrowAnimation();
|
||||||
|
|
||||||
if (this._arrowAnimationId) {
|
this._lockScreenContentsBox.destroy();
|
||||||
Mainloop.source_remove(this._arrowAnimationId);
|
|
||||||
this._arrowAnimationId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._hasLockScreen = false;
|
this._hasLockScreen = false;
|
||||||
},
|
},
|
||||||
@ -1086,11 +1126,22 @@ const ScreenShield = new Lang.Class({
|
|||||||
deactivate: function(animate) {
|
deactivate: function(animate) {
|
||||||
this._hideLockScreen(animate, 0);
|
this._hideLockScreen(animate, 0);
|
||||||
|
|
||||||
|
if (this._hasLockScreen)
|
||||||
|
this._clearLockScreen();
|
||||||
|
|
||||||
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');
|
||||||
|
|
||||||
|
if (this._dialog && !this._isGreeter)
|
||||||
|
this._dialog.popModal();
|
||||||
|
|
||||||
|
if (this._isModal) {
|
||||||
|
Main.popModal(this.actor);
|
||||||
|
this._isModal = false;
|
||||||
|
}
|
||||||
|
|
||||||
Tweener.addTween(this._lockDialogGroup, {
|
Tweener.addTween(this._lockDialogGroup, {
|
||||||
scale_x: 0,
|
scale_x: 0,
|
||||||
scale_y: 0,
|
scale_y: 0,
|
||||||
@ -1102,21 +1153,12 @@ const ScreenShield = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_completeDeactivate: function() {
|
_completeDeactivate: function() {
|
||||||
if (this._hasLockScreen)
|
|
||||||
this._clearLockScreen();
|
|
||||||
|
|
||||||
if (this._dialog && !this._isGreeter) {
|
if (this._dialog && !this._isGreeter) {
|
||||||
this._dialog.destroy();
|
this._dialog.destroy();
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._lightbox.hide();
|
this._lightbox.hide();
|
||||||
|
|
||||||
if (this._isModal) {
|
|
||||||
Main.popModal(this.actor);
|
|
||||||
this._isModal = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
|
|
||||||
if (this._becameActiveId != 0) {
|
if (this._becameActiveId != 0) {
|
||||||
@ -1134,6 +1176,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._isLocked = false;
|
this._isLocked = false;
|
||||||
this.emit('active-changed');
|
this.emit('active-changed');
|
||||||
this.emit('locked-changed');
|
this.emit('locked-changed');
|
||||||
|
global.set_runtime_state(LOCKED_STATE_STR, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
activate: function(animate) {
|
activate: function(animate) {
|
||||||
@ -1150,6 +1193,7 @@ const ScreenShield = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._resetLockScreen(animate, animate);
|
this._resetLockScreen(animate, animate);
|
||||||
|
global.set_runtime_state(LOCKED_STATE_STR, GLib.Variant.new('b', true));
|
||||||
|
|
||||||
// We used to set isActive and emit active-changed here,
|
// We used to set isActive and emit active-changed here,
|
||||||
// but now we do that from lockScreenShown, which means
|
// but now we do that from lockScreenShown, which means
|
||||||
@ -1176,64 +1220,15 @@ const ScreenShield = new Lang.Class({
|
|||||||
|
|
||||||
this.emit('locked-changed');
|
this.emit('locked-changed');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// If the previous shell crashed, and gnome-session restarted us, then re-lock
|
||||||
|
lockIfWasLocked: function() {
|
||||||
|
let wasLocked = global.get_runtime_state('b', LOCKED_STATE_STR);
|
||||||
|
if (wasLocked === null)
|
||||||
|
return;
|
||||||
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
||||||
|
this.lock(false);
|
||||||
|
}));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ScreenShield.prototype);
|
Signals.addSignalMethods(ScreenShield.prototype);
|
||||||
|
|
||||||
/* Fallback code to handle session locking using gnome-screensaver,
|
|
||||||
in case the required GDM dependency is not there
|
|
||||||
*/
|
|
||||||
const ScreenShieldFallback = new Lang.Class({
|
|
||||||
Name: 'ScreenShieldFallback',
|
|
||||||
|
|
||||||
_init: function() {
|
|
||||||
Util.spawn(['gnome-screensaver']);
|
|
||||||
|
|
||||||
this._proxy = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
|
|
||||||
g_name: 'org.gnome.ScreenSaver',
|
|
||||||
g_object_path: '/org/gnome/ScreenSaver',
|
|
||||||
g_interface_name: 'org.gnome.ScreenSaver',
|
|
||||||
g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START |
|
|
||||||
Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES),
|
|
||||||
});
|
|
||||||
this._proxy.init(null);
|
|
||||||
|
|
||||||
this._proxy.connect('g-signal', Lang.bind(this, this._onSignal));
|
|
||||||
this._proxy.connect('notify::g-name-owner', Lang.bind(this, this._onNameOwnerChanged));
|
|
||||||
},
|
|
||||||
|
|
||||||
_onNameOwnerChanged: function(object, pspec) {
|
|
||||||
if (this._proxy.g_name_owner)
|
|
||||||
[this._locked] = this._proxy.call_sync('GetActive', null,
|
|
||||||
Gio.DBusCallFlags.NONE, -1, null).deep_unpack();
|
|
||||||
else
|
|
||||||
this._locked = false;
|
|
||||||
|
|
||||||
this.emit('active-changed', this._locked);
|
|
||||||
},
|
|
||||||
|
|
||||||
_onSignal: function(proxy, senderName, signalName, params) {
|
|
||||||
if (signalName == 'ActiveChanged') {
|
|
||||||
[this._locked] = params.deep_unpack();
|
|
||||||
this.emit('active-changed', this._locked);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
get locked() {
|
|
||||||
return this._locked;
|
|
||||||
},
|
|
||||||
|
|
||||||
lock: function() {
|
|
||||||
this._proxy.call('Lock', null, Gio.DBusCallFlags.NONE, -1, null,
|
|
||||||
Lang.bind(this, function(proxy, result) {
|
|
||||||
proxy.call_finish(result);
|
|
||||||
|
|
||||||
this.emit('lock-screen-shown');
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
|
|
||||||
unlock: function() {
|
|
||||||
this._proxy.call('SetActive', GLib.Variant.new('(b)', false),
|
|
||||||
Gio.DBusCallFlags.NONE, -1, null, null);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
Signals.addSignalMethods(ScreenShieldFallback.prototype);
|
|
||||||
|
140
js/ui/screencast.js
Normal file
140
js/ui/screencast.js
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
// -*- 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 Shell = imports.gi.Shell;
|
||||||
|
|
||||||
|
const Hash = imports.misc.hash;
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
|
const ScreencastIface = <interface name="org.gnome.Shell.Screencast">
|
||||||
|
<method name="Screencast">
|
||||||
|
<arg type="s" direction="in" name="file_template"/>
|
||||||
|
<arg type="a{sv}" direction="in" name="options"/>
|
||||||
|
<arg type="b" direction="out" name="success"/>
|
||||||
|
<arg type="s" direction="out" name="filename_used"/>
|
||||||
|
</method>
|
||||||
|
<method name="ScreencastArea">
|
||||||
|
<arg type="i" direction="in" name="x"/>
|
||||||
|
<arg type="i" direction="in" name="y"/>
|
||||||
|
<arg type="i" direction="in" name="width"/>
|
||||||
|
<arg type="i" direction="in" name="height"/>
|
||||||
|
<arg type="s" direction="in" name="file_template"/>
|
||||||
|
<arg type="a{sv}" direction="in" name="options"/>
|
||||||
|
<arg type="b" direction="out" name="success"/>
|
||||||
|
<arg type="s" direction="out" name="filename_used"/>
|
||||||
|
</method>
|
||||||
|
<method name="StopScreencast">
|
||||||
|
<arg type="b" direction="out" name="success"/>
|
||||||
|
</method>
|
||||||
|
</interface>;
|
||||||
|
|
||||||
|
const ScreencastService = new Lang.Class({
|
||||||
|
Name: 'ScreencastService',
|
||||||
|
|
||||||
|
_init: function() {
|
||||||
|
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(ScreencastIface, this);
|
||||||
|
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell/Screencast');
|
||||||
|
|
||||||
|
Gio.DBus.session.own_name('org.gnome.Shell.Screencast', Gio.BusNameOwnerFlags.REPLACE, null, null);
|
||||||
|
|
||||||
|
this._recorders = new Hash.Map();
|
||||||
|
|
||||||
|
Main.sessionMode.connect('updated',
|
||||||
|
Lang.bind(this, this._sessionModeChanged));
|
||||||
|
},
|
||||||
|
|
||||||
|
_ensureRecorderForSender: function(sender) {
|
||||||
|
let recorder = this._recorders.get(sender);
|
||||||
|
if (!recorder) {
|
||||||
|
recorder = new Shell.Recorder({ stage: global.stage });
|
||||||
|
recorder._watchNameId =
|
||||||
|
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
||||||
|
Lang.bind(this, this._onNameVanished));
|
||||||
|
this._recorders.set(sender, recorder);
|
||||||
|
}
|
||||||
|
return recorder;
|
||||||
|
},
|
||||||
|
|
||||||
|
_sessionModeChanged: function() {
|
||||||
|
if (Main.sessionMode.allowScreencast)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (let sender in this._recorders.keys())
|
||||||
|
this._recorders.delete(sender);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onNameVanished: function(connection, name) {
|
||||||
|
this._stopRecordingForSender(name);
|
||||||
|
},
|
||||||
|
|
||||||
|
_stopRecordingForSender: function(sender) {
|
||||||
|
let recorder = this._recorders.get(sender);
|
||||||
|
if (!recorder)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Gio.bus_unwatch_name(recorder._watchNameId);
|
||||||
|
recorder.close();
|
||||||
|
this._recorders.delete(sender);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_applyOptionalParameters: function(recorder, options) {
|
||||||
|
for (let option in options)
|
||||||
|
options[option] = options[option].deep_unpack();
|
||||||
|
|
||||||
|
if (options['pipeline'])
|
||||||
|
recorder.set_pipeline(options['pipeline']);
|
||||||
|
if (options['framerate'])
|
||||||
|
recorder.set_framerate(options['framerate']);
|
||||||
|
if (options['draw-cursor'])
|
||||||
|
recorder.set_draw_cursor(options['draw-cursor']);
|
||||||
|
},
|
||||||
|
|
||||||
|
ScreencastAsync: function(params, invocation) {
|
||||||
|
let returnValue = [false, ''];
|
||||||
|
if (!Main.sessionMode.allowScreencast)
|
||||||
|
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
|
||||||
|
|
||||||
|
let sender = invocation.get_sender();
|
||||||
|
let recorder = this._ensureRecorderForSender(sender);
|
||||||
|
if (!recorder.is_recording()) {
|
||||||
|
let [fileTemplate, options] = params;
|
||||||
|
|
||||||
|
recorder.set_file_template(fileTemplate);
|
||||||
|
this._applyOptionalParameters(recorder, options);
|
||||||
|
let [success, fileName] = recorder.record();
|
||||||
|
returnValue = [success, fileName ? fileName : ''];
|
||||||
|
}
|
||||||
|
|
||||||
|
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
|
||||||
|
},
|
||||||
|
|
||||||
|
ScreencastAreaAsync: function(params, invocation) {
|
||||||
|
let returnValue = [false, ''];
|
||||||
|
if (!Main.sessionMode.allowScreencast)
|
||||||
|
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
|
||||||
|
|
||||||
|
let sender = invocation.get_sender();
|
||||||
|
let recorder = this._ensureRecorderForSender(sender);
|
||||||
|
|
||||||
|
if (!recorder.is_recording()) {
|
||||||
|
let [x, y, width, height, fileTemplate, options] = params;
|
||||||
|
|
||||||
|
recorder.set_file_template(fileTemplate);
|
||||||
|
recorder.set_area(x, y, width, height);
|
||||||
|
this._applyOptionalParameters(recorder, options);
|
||||||
|
let [success, fileName] = recorder.record();
|
||||||
|
returnValue = [success, fileName ? fileName : ''];
|
||||||
|
}
|
||||||
|
|
||||||
|
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
|
||||||
|
},
|
||||||
|
|
||||||
|
StopScreencastAsync: function(params, invocation) {
|
||||||
|
let success = this._stopRecordingForSender(invocation.get_sender());
|
||||||
|
invocation.return_value(GLib.Variant.new('(b)', [success]));
|
||||||
|
}
|
||||||
|
});
|
@ -4,6 +4,7 @@ const Clutter = imports.gi.Clutter;
|
|||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
|
const Signals = imports.signals;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Atk = imports.gi.Atk;
|
const Atk = imports.gi.Atk;
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ const Main = imports.ui.main;
|
|||||||
const Overview = imports.ui.overview;
|
const Overview = imports.ui.overview;
|
||||||
const Separator = imports.ui.separator;
|
const Separator = imports.ui.separator;
|
||||||
const Search = imports.ui.search;
|
const Search = imports.ui.search;
|
||||||
|
const Util = imports.misc.util;
|
||||||
|
|
||||||
const MAX_LIST_SEARCH_RESULTS_ROWS = 3;
|
const MAX_LIST_SEARCH_RESULTS_ROWS = 3;
|
||||||
const MAX_GRID_SEARCH_RESULTS_ROWS = 1;
|
const MAX_GRID_SEARCH_RESULTS_ROWS = 1;
|
||||||
@ -102,6 +104,7 @@ const ListSearchResult = new Lang.Class({
|
|||||||
y_fill: false,
|
y_fill: false,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
y_align: St.Align.START });
|
y_align: St.Align.START });
|
||||||
|
this.actor.label_actor = title;
|
||||||
|
|
||||||
if (this.metaInfo['description']) {
|
if (this.metaInfo['description']) {
|
||||||
let description = new St.Label({ style_class: 'list-search-result-description' });
|
let description = new St.Label({ style_class: 'list-search-result-description' });
|
||||||
@ -139,6 +142,7 @@ const GridSearchResult = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.actor.set_child(content);
|
this.actor.set_child(content);
|
||||||
|
this.actor.label_actor = content.label_actor;
|
||||||
|
|
||||||
let draggable = DND.makeDraggable(this.actor);
|
let draggable = DND.makeDraggable(this.actor);
|
||||||
draggable.connect('drag-begin',
|
draggable.connect('drag-begin',
|
||||||
@ -227,9 +231,14 @@ const ListSearchResults = new Lang.Class({
|
|||||||
this._pendingClear = true;
|
this._pendingClear = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_keyFocusIn: function(icon) {
|
||||||
|
this.emit('key-focus-in', icon);
|
||||||
|
},
|
||||||
|
|
||||||
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 ListSearchResult(this.provider, metas[i], this._terms);
|
let display = new ListSearchResult(this.provider, metas[i], this._terms);
|
||||||
|
display.actor.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
||||||
this._content.add_actor(display.actor);
|
this._content.add_actor(display.actor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -246,6 +255,7 @@ const ListSearchResults = new Lang.Class({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Signals.addSignalMethods(ListSearchResults.prototype);
|
||||||
|
|
||||||
const GridSearchResults = new Lang.Class({
|
const GridSearchResults = new Lang.Class({
|
||||||
Name: 'GridSearchResults',
|
Name: 'GridSearchResults',
|
||||||
@ -288,9 +298,14 @@ const GridSearchResults = new Lang.Class({
|
|||||||
this._pendingClear = true;
|
this._pendingClear = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_keyFocusIn: function(icon) {
|
||||||
|
this.emit('key-focus-in', icon);
|
||||||
|
},
|
||||||
|
|
||||||
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 GridSearchResult(this.provider, metas[i], this._terms);
|
let display = new GridSearchResult(this.provider, metas[i], this._terms);
|
||||||
|
display.actor.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
||||||
this._grid.addItem(display.actor);
|
this._grid.addItem(display.actor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -307,6 +322,7 @@ const GridSearchResults = new Lang.Class({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Signals.addSignalMethods(GridSearchResults.prototype);
|
||||||
|
|
||||||
const SearchResults = new Lang.Class({
|
const SearchResults = new Lang.Class({
|
||||||
Name: 'SearchResults',
|
Name: 'SearchResults',
|
||||||
@ -366,6 +382,10 @@ const SearchResults = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_keyFocusIn: function(provider, icon) {
|
||||||
|
Util.ensureActorVisibleInScrollView(this._scrollView, icon);
|
||||||
|
},
|
||||||
|
|
||||||
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 });
|
||||||
@ -379,6 +399,8 @@ const SearchResults = new Lang.Class({
|
|||||||
resultDisplay = new GridSearchResults(provider);
|
resultDisplay = new GridSearchResults(provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultDisplay.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
||||||
|
|
||||||
let resultDisplayBin = new St.Bin({ child: resultDisplay.actor,
|
let resultDisplayBin = new St.Bin({ child: resultDisplay.actor,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
@ -557,6 +579,7 @@ const ProviderIcon = new Lang.Class({
|
|||||||
this.parent({ style_class: 'search-provider-icon',
|
this.parent({ style_class: 'search-provider-icon',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
|
accessible_name: provider.appInfo.get_name(),
|
||||||
track_hover: true });
|
track_hover: true });
|
||||||
|
|
||||||
this._content = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this._content = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
|
@ -45,7 +45,7 @@ const _modes = {
|
|||||||
unlockDialog: imports.gdm.loginDialog.LoginDialog,
|
unlockDialog: imports.gdm.loginDialog.LoginDialog,
|
||||||
components: ['polkitAgent'],
|
components: ['polkitAgent'],
|
||||||
panel: {
|
panel: {
|
||||||
left: ['logo'],
|
left: [],
|
||||||
center: ['dateMenu'],
|
center: ['dateMenu'],
|
||||||
right: ['a11yGreeter', 'display', 'keyboard',
|
right: ['a11yGreeter', 'display', 'keyboard',
|
||||||
'volume', 'battery', 'powerMenu']
|
'volume', 'battery', 'powerMenu']
|
||||||
@ -78,16 +78,6 @@ const _modes = {
|
|||||||
panelStyle: 'unlock-screen'
|
panelStyle: 'unlock-screen'
|
||||||
},
|
},
|
||||||
|
|
||||||
'initial-setup': {
|
|
||||||
isPrimary: true,
|
|
||||||
components: ['keyring'],
|
|
||||||
panel: {
|
|
||||||
left: [],
|
|
||||||
center: ['dateMenu'],
|
|
||||||
right: ['a11yGreeter', 'keyboard', 'volume']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
'user': {
|
'user': {
|
||||||
hasOverview: true,
|
hasOverview: true,
|
||||||
showCalendarEvents: true,
|
showCalendarEvents: true,
|
||||||
@ -158,12 +148,7 @@ function listModes() {
|
|||||||
const SessionMode = new Lang.Class({
|
const SessionMode = new Lang.Class({
|
||||||
Name: 'SessionMode',
|
Name: 'SessionMode',
|
||||||
|
|
||||||
_init: function() {
|
init: function() {
|
||||||
global.connect('notify::session-mode', Lang.bind(this, this._sync));
|
|
||||||
this._modes = _modes;
|
|
||||||
this._modeStack = [DEFAULT_MODE];
|
|
||||||
this._sync();
|
|
||||||
|
|
||||||
_getModes(Lang.bind(this, function(modes) {
|
_getModes(Lang.bind(this, function(modes) {
|
||||||
this._modes = modes;
|
this._modes = modes;
|
||||||
let primary = modes[global.session_mode] &&
|
let primary = modes[global.session_mode] &&
|
||||||
@ -171,6 +156,8 @@ const SessionMode = new Lang.Class({
|
|||||||
let mode = primary ? global.session_mode : 'user';
|
let mode = primary ? global.session_mode : 'user';
|
||||||
this._modeStack = [mode];
|
this._modeStack = [mode];
|
||||||
this._sync();
|
this._sync();
|
||||||
|
|
||||||
|
this.emit('sessions-loaded');
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -197,6 +184,10 @@ const SessionMode = new Lang.Class({
|
|||||||
return this._modeStack[this._modeStack.length - 1];
|
return this._modeStack[this._modeStack.length - 1];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get allowScreencast() {
|
||||||
|
return this.components.indexOf('recorder') != -1;
|
||||||
|
},
|
||||||
|
|
||||||
_sync: function() {
|
_sync: function() {
|
||||||
let params = this._modes[this.currentMode];
|
let params = this._modes[this.currentMode];
|
||||||
let defaults;
|
let defaults;
|
||||||
|
@ -12,6 +12,7 @@ const ExtensionDownloader = imports.ui.extensionDownloader;
|
|||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Hash = imports.misc.hash;
|
const Hash = imports.misc.hash;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
const Screencast = imports.ui.screencast;
|
||||||
const Screenshot = imports.ui.screenshot;
|
const Screenshot = imports.ui.screenshot;
|
||||||
|
|
||||||
const GnomeShellIface = <interface name="org.gnome.Shell">
|
const GnomeShellIface = <interface name="org.gnome.Shell">
|
||||||
@ -20,6 +21,7 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
|
|||||||
<arg type="b" direction="out" name="success" />
|
<arg type="b" direction="out" name="success" />
|
||||||
<arg type="s" direction="out" name="result" />
|
<arg type="s" direction="out" name="result" />
|
||||||
</method>
|
</method>
|
||||||
|
<method name="FocusSearch"/>
|
||||||
<method name="ShowOSD">
|
<method name="ShowOSD">
|
||||||
<arg type="a{sv}" direction="in" name="params"/>
|
<arg type="a{sv}" direction="in" name="params"/>
|
||||||
</method>
|
</method>
|
||||||
@ -70,6 +72,7 @@ const GnomeShell = new Lang.Class({
|
|||||||
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell');
|
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell');
|
||||||
|
|
||||||
this._extensionsService = new GnomeShellExtensions();
|
this._extensionsService = new GnomeShellExtensions();
|
||||||
|
this._screencastService = new Screencast.ScreencastService();
|
||||||
this._screenshotService = new Screenshot.ScreenshotService();
|
this._screenshotService = new Screenshot.ScreenshotService();
|
||||||
|
|
||||||
this._grabbedAccelerators = new Hash.Map();
|
this._grabbedAccelerators = new Hash.Map();
|
||||||
@ -97,7 +100,7 @@ const GnomeShell = new Lang.Class({
|
|||||||
*/
|
*/
|
||||||
Eval: function(code) {
|
Eval: function(code) {
|
||||||
if (!global.settings.get_boolean('development-tools'))
|
if (!global.settings.get_boolean('development-tools'))
|
||||||
return [false, null];
|
return [false, ''];
|
||||||
|
|
||||||
let returnValue;
|
let returnValue;
|
||||||
let success;
|
let success;
|
||||||
@ -114,6 +117,10 @@ const GnomeShell = new Lang.Class({
|
|||||||
return [success, returnValue];
|
return [success, returnValue];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
FocusSearch: function() {
|
||||||
|
Main.overview.focusSearch();
|
||||||
|
},
|
||||||
|
|
||||||
ShowOSD: function(params) {
|
ShowOSD: function(params) {
|
||||||
for (let param in params)
|
for (let param in params)
|
||||||
params[param] = params[param].deep_unpack();
|
params[param] = params[param].deep_unpack();
|
||||||
@ -397,7 +404,7 @@ const ScreenSaverDBus = new Lang.Class({
|
|||||||
if (active)
|
if (active)
|
||||||
this._screenShield.activate(true);
|
this._screenShield.activate(true);
|
||||||
else
|
else
|
||||||
this._screenShield.unlock(false);
|
this._screenShield.deactivate(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
GetActive: function() {
|
GetActive: function() {
|
||||||
|
@ -14,9 +14,7 @@ const EntryMenu = new Lang.Class({
|
|||||||
Name: 'ShellEntryMenu',
|
Name: 'ShellEntryMenu',
|
||||||
Extends: PopupMenu.PopupMenu,
|
Extends: PopupMenu.PopupMenu,
|
||||||
|
|
||||||
_init: function(entry, params) {
|
_init: function(entry) {
|
||||||
params = Params.parse (params, { isPassword: false });
|
|
||||||
|
|
||||||
this.parent(entry, 0, St.Side.TOP);
|
this.parent(entry, 0, St.Side.TOP);
|
||||||
|
|
||||||
this.actor.add_style_class_name('entry-context-menu');
|
this.actor.add_style_class_name('entry-context-menu');
|
||||||
@ -37,8 +35,6 @@ const EntryMenu = new Lang.Class({
|
|||||||
this._pasteItem = item;
|
this._pasteItem = item;
|
||||||
|
|
||||||
this._passwordItem = null;
|
this._passwordItem = null;
|
||||||
if (params.isPassword)
|
|
||||||
this._makePasswordItem();
|
|
||||||
|
|
||||||
Main.uiGroup.add_actor(this.actor);
|
Main.uiGroup.add_actor(this.actor);
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
@ -60,11 +56,13 @@ const EntryMenu = new Lang.Class({
|
|||||||
if (v == this.isPassword)
|
if (v == this.isPassword)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (v)
|
if (v) {
|
||||||
this._makePasswordItem();
|
this._makePasswordItem();
|
||||||
else {
|
this._entry.input_purpose = Gtk.InputPurpose.PASSWORD;
|
||||||
|
} else {
|
||||||
this._passwordItem.destroy();
|
this._passwordItem.destroy();
|
||||||
this._passwordItem = null;
|
this._passwordItem = null;
|
||||||
|
this._entry.input_purpose = Gtk.InputPurpose.FREE_FORM;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -82,11 +80,6 @@ const EntryMenu = new Lang.Class({
|
|||||||
this.actor.grab_key_focus();
|
this.actor.grab_key_focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function(animate) {
|
|
||||||
this._entry.grab_key_focus();
|
|
||||||
this.parent(animate);
|
|
||||||
},
|
|
||||||
|
|
||||||
_updateCopyItem: function() {
|
_updateCopyItem: function() {
|
||||||
let selection = this._entry.clutter_text.get_selection();
|
let selection = this._entry.clutter_text.get_selection();
|
||||||
this._copyItem.setSensitive(!this._entry.clutter_text.password_char &&
|
this._copyItem.setSensitive(!this._entry.clutter_text.password_char &&
|
||||||
@ -160,7 +153,10 @@ function addContextMenu(entry, params) {
|
|||||||
if (entry.menu)
|
if (entry.menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
entry.menu = new EntryMenu(entry, params);
|
params = Params.parse (params, { isPassword: false });
|
||||||
|
|
||||||
|
entry.menu = new EntryMenu(entry);
|
||||||
|
entry.menu.isPassword = params.isPassword;
|
||||||
entry._menuManager = new PopupMenu.PopupMenuManager({ actor: entry });
|
entry._menuManager = new PopupMenu.PopupMenuManager({ actor: entry });
|
||||||
entry._menuManager.addMenu(entry.menu);
|
entry._menuManager.addMenu(entry.menu);
|
||||||
|
|
||||||
@ -171,4 +167,10 @@ function addContextMenu(entry, params) {
|
|||||||
entry.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry));
|
entry.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry));
|
||||||
|
|
||||||
entry.connect('popup-menu', Lang.bind(null, _onPopup, entry));
|
entry.connect('popup-menu', Lang.bind(null, _onPopup, entry));
|
||||||
|
|
||||||
|
entry.connect('destroy', function() {
|
||||||
|
entry.menu.destroy();
|
||||||
|
entry.menu = null;
|
||||||
|
entry._menuManager = null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -363,7 +363,7 @@ const ConfirmNotification = new Lang.Class({
|
|||||||
this._applet = applet;
|
this._applet = applet;
|
||||||
this._devicePath = device_path;
|
this._devicePath = device_path;
|
||||||
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 Passkey '%06d' matches the one on the device.").format(pin));
|
||||||
|
|
||||||
/* Translators: this is the verb, not the noun */
|
/* Translators: this is the verb, not the noun */
|
||||||
this.addButton('matches', _("Matches"));
|
this.addButton('matches', _("Matches"));
|
||||||
|
@ -33,6 +33,33 @@ const KEY_INPUT_SOURCES = 'sources';
|
|||||||
const INPUT_SOURCE_TYPE_XKB = 'xkb';
|
const INPUT_SOURCE_TYPE_XKB = 'xkb';
|
||||||
const INPUT_SOURCE_TYPE_IBUS = 'ibus';
|
const INPUT_SOURCE_TYPE_IBUS = 'ibus';
|
||||||
|
|
||||||
|
// This is the longest we'll keep the keyboard frozen until an input
|
||||||
|
// source is active.
|
||||||
|
const MAX_INPUT_SOURCE_ACTIVATION_TIME = 4000; // ms
|
||||||
|
|
||||||
|
const BUS_NAME = 'org.gnome.SettingsDaemon.Keyboard';
|
||||||
|
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Keyboard';
|
||||||
|
|
||||||
|
const KeyboardManagerInterface =
|
||||||
|
<interface name="org.gnome.SettingsDaemon.Keyboard">
|
||||||
|
<method name="SetInputSource">
|
||||||
|
<arg type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
</interface>;
|
||||||
|
|
||||||
|
const KeyboardManagerProxy = Gio.DBusProxy.makeProxyWrapper(KeyboardManagerInterface);
|
||||||
|
|
||||||
|
function releaseKeyboard() {
|
||||||
|
if (Main.modalCount > 0)
|
||||||
|
global.display.unfreeze_keyboard(global.get_current_time());
|
||||||
|
else
|
||||||
|
global.display.ungrab_keyboard(global.get_current_time());
|
||||||
|
}
|
||||||
|
|
||||||
|
function holdKeyboard() {
|
||||||
|
global.freeze_keyboard(global.get_current_time());
|
||||||
|
}
|
||||||
|
|
||||||
const IBusManager = new Lang.Class({
|
const IBusManager = new Lang.Class({
|
||||||
Name: 'IBusManager',
|
Name: 'IBusManager',
|
||||||
|
|
||||||
@ -45,26 +72,24 @@ const IBusManager = new Lang.Class({
|
|||||||
this._readyCallback = readyCallback;
|
this._readyCallback = readyCallback;
|
||||||
this._candidatePopup = new IBusCandidatePopup.CandidatePopup();
|
this._candidatePopup = new IBusCandidatePopup.CandidatePopup();
|
||||||
|
|
||||||
this._ibus = null;
|
|
||||||
this._panelService = null;
|
this._panelService = null;
|
||||||
this._engines = {};
|
this._engines = {};
|
||||||
this._ready = false;
|
this._ready = false;
|
||||||
this._registerPropertiesId = 0;
|
this._registerPropertiesId = 0;
|
||||||
this._currentEngineName = null;
|
this._currentEngineName = null;
|
||||||
|
|
||||||
this._nameWatcherId = Gio.DBus.session.watch_name(IBus.SERVICE_IBUS,
|
this._ibus = IBus.Bus.new_async();
|
||||||
Gio.BusNameWatcherFlags.NONE,
|
this._ibus.connect('connected', Lang.bind(this, this._onConnected));
|
||||||
Lang.bind(this, this._onNameAppeared),
|
this._ibus.connect('disconnected', Lang.bind(this, this._clear));
|
||||||
Lang.bind(this, this._clear));
|
// Need to set this to get 'global-engine-changed' emitions
|
||||||
|
this._ibus.set_watch_ibus_signal(true);
|
||||||
|
this._ibus.connect('global-engine-changed', Lang.bind(this, this._engineChanged));
|
||||||
},
|
},
|
||||||
|
|
||||||
_clear: function() {
|
_clear: function() {
|
||||||
if (this._panelService)
|
if (this._panelService)
|
||||||
this._panelService.destroy();
|
this._panelService.destroy();
|
||||||
if (this._ibus)
|
|
||||||
this._ibus.destroy();
|
|
||||||
|
|
||||||
this._ibus = null;
|
|
||||||
this._panelService = null;
|
this._panelService = null;
|
||||||
this._candidatePopup.setPanelService(null);
|
this._candidatePopup.setPanelService(null);
|
||||||
this._engines = {};
|
this._engines = {};
|
||||||
@ -76,18 +101,12 @@ const IBusManager = new Lang.Class({
|
|||||||
this._readyCallback(false);
|
this._readyCallback(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onNameAppeared: function() {
|
|
||||||
this._ibus = IBus.Bus.new_async();
|
|
||||||
this._ibus.connect('connected', Lang.bind(this, this._onConnected));
|
|
||||||
},
|
|
||||||
|
|
||||||
_onConnected: function() {
|
_onConnected: function() {
|
||||||
this._ibus.list_engines_async(-1, null, Lang.bind(this, this._initEngines));
|
this._ibus.list_engines_async(-1, null, Lang.bind(this, this._initEngines));
|
||||||
this._ibus.request_name_async(IBus.SERVICE_PANEL,
|
this._ibus.request_name_async(IBus.SERVICE_PANEL,
|
||||||
IBus.BusNameFlag.REPLACE_EXISTING,
|
IBus.BusNameFlag.REPLACE_EXISTING,
|
||||||
-1, null,
|
-1, null,
|
||||||
Lang.bind(this, this._initPanelService));
|
Lang.bind(this, this._initPanelService));
|
||||||
this._ibus.connect('disconnected', Lang.bind(this, this._clear));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_initEngines: function(ibus, result) {
|
_initEngines: function(ibus, result) {
|
||||||
@ -109,9 +128,6 @@ const IBusManager = new Lang.Class({
|
|||||||
this._panelService = new IBus.PanelService({ connection: this._ibus.get_connection(),
|
this._panelService = new IBus.PanelService({ connection: this._ibus.get_connection(),
|
||||||
object_path: IBus.PATH_PANEL });
|
object_path: IBus.PATH_PANEL });
|
||||||
this._candidatePopup.setPanelService(this._panelService);
|
this._candidatePopup.setPanelService(this._panelService);
|
||||||
// Need to set this to get 'global-engine-changed' emitions
|
|
||||||
this._ibus.set_watch_ibus_signal(true);
|
|
||||||
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));
|
||||||
// If an engine is already active we need to get its properties
|
// 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) {
|
this._ibus.get_global_engine_async(-1, null, Lang.bind(this, function(i, result) {
|
||||||
@ -140,6 +156,9 @@ const IBusManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_engineChanged: function(bus, engineName) {
|
_engineChanged: function(bus, engineName) {
|
||||||
|
if (!this._ready)
|
||||||
|
return;
|
||||||
|
|
||||||
this._currentEngineName = engineName;
|
this._currentEngineName = engineName;
|
||||||
|
|
||||||
if (this._registerPropertiesId != 0)
|
if (this._registerPropertiesId != 0)
|
||||||
@ -364,6 +383,15 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
this._ibusManager.connect('property-updated', Lang.bind(this, this._ibusPropertyUpdated));
|
this._ibusManager.connect('property-updated', Lang.bind(this, this._ibusPropertyUpdated));
|
||||||
this._inputSourcesChanged();
|
this._inputSourcesChanged();
|
||||||
|
|
||||||
|
this._keyboardManager = new KeyboardManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH,
|
||||||
|
function(proxy, error) {
|
||||||
|
if (error)
|
||||||
|
log(error.message);
|
||||||
|
});
|
||||||
|
this._keyboardManager.g_default_timeout = MAX_INPUT_SOURCE_ACTIVATION_TIME;
|
||||||
|
|
||||||
|
global.display.connect('modifiers-accelerator-activated', Lang.bind(this, this._modifiersSwitcher));
|
||||||
|
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this._showLayoutItem = this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, this._showLayout));
|
this._showLayoutItem = this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, this._showLayout));
|
||||||
|
|
||||||
@ -397,10 +425,43 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
this._inputSourcesChanged();
|
this._inputSourcesChanged();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_modifiersSwitcher: function() {
|
||||||
|
let sourceIndexes = Object.keys(this._inputSources);
|
||||||
|
if (sourceIndexes.length == 0) {
|
||||||
|
releaseKeyboard();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
let is = this._currentSource;
|
||||||
|
if (!is)
|
||||||
|
is = this._inputSources[sourceIndexes[0]];
|
||||||
|
|
||||||
|
let nextIndex = is.index + 1;
|
||||||
|
if (nextIndex > sourceIndexes[sourceIndexes.length - 1])
|
||||||
|
nextIndex = 0;
|
||||||
|
|
||||||
|
while (!(is = this._inputSources[nextIndex]))
|
||||||
|
nextIndex += 1;
|
||||||
|
|
||||||
|
is.activate();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
_switchInputSource: function(display, screen, window, binding) {
|
_switchInputSource: function(display, screen, window, binding) {
|
||||||
if (this._mruSources.length < 2)
|
if (this._mruSources.length < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// HACK: Fall back on simple input source switching since we
|
||||||
|
// can't show a popup switcher while a GrabHelper grab is in
|
||||||
|
// effect without considerable work to consolidate the usage
|
||||||
|
// of pushModal/popModal and grabHelper. See
|
||||||
|
// https://bugzilla.gnome.org/show_bug.cgi?id=695143 .
|
||||||
|
if (Main.keybindingMode == Shell.KeyBindingMode.MESSAGE_TRAY ||
|
||||||
|
Main.keybindingMode == Shell.KeyBindingMode.TOPBAR_POPUP) {
|
||||||
|
this._modifiersSwitcher();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, this._keybindingActionBackward);
|
let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, this._keybindingActionBackward);
|
||||||
let modifiers = binding.get_modifiers();
|
let modifiers = binding.get_modifiers();
|
||||||
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
||||||
@ -416,6 +477,11 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
let oldSource;
|
let oldSource;
|
||||||
[oldSource, this._currentSource] = [this._currentSource, newSource];
|
[oldSource, this._currentSource] = [this._currentSource, newSource];
|
||||||
|
|
||||||
|
if (oldSource) {
|
||||||
|
oldSource.menuItem.setOrnament(PopupMenu.Ornament.NONE);
|
||||||
|
oldSource.indicatorLabel.hide();
|
||||||
|
}
|
||||||
|
|
||||||
if (!newSource || (nVisibleSources < 2 && !newSource.properties)) {
|
if (!newSource || (nVisibleSources < 2 && !newSource.properties)) {
|
||||||
// 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
|
||||||
@ -430,12 +496,7 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
|
|
||||||
if (oldSource) {
|
newSource.menuItem.setOrnament(PopupMenu.Ornament.DOT);
|
||||||
oldSource.menuItem.setShowDot(false);
|
|
||||||
oldSource.indicatorLabel.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
newSource.menuItem.setShowDot(true);
|
|
||||||
newSource.indicatorLabel.show();
|
newSource.indicatorLabel.show();
|
||||||
|
|
||||||
this._buildPropSection(newSource.properties);
|
this._buildPropSection(newSource.properties);
|
||||||
@ -459,6 +520,7 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
|
|
||||||
this._inputSources = {};
|
this._inputSources = {};
|
||||||
this._ibusSources = {};
|
this._ibusSources = {};
|
||||||
|
this._currentSource = null;
|
||||||
|
|
||||||
let inputSourcesByShortName = {};
|
let inputSourcesByShortName = {};
|
||||||
|
|
||||||
@ -487,10 +549,8 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
let is = new InputSource(type, id, displayName, shortName, i);
|
let is = new InputSource(type, id, displayName, shortName, i);
|
||||||
|
|
||||||
is.connect('activate', Lang.bind(this, function() {
|
is.connect('activate', Lang.bind(this, function() {
|
||||||
if (this._currentSource.index == is.index)
|
holdKeyboard();
|
||||||
return;
|
this._keyboardManager.SetInputSourceRemote(is.index, releaseKeyboard);
|
||||||
this._settings.set_value(KEY_CURRENT_INPUT_SOURCE,
|
|
||||||
GLib.Variant.new_uint32(is.index));
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (!(is.shortName in inputSourcesByShortName))
|
if (!(is.shortName in inputSourcesByShortName))
|
||||||
@ -660,7 +720,8 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
item.prop = prop;
|
item.prop = prop;
|
||||||
radioGroup.push(item);
|
radioGroup.push(item);
|
||||||
item.radioGroup = radioGroup;
|
item.radioGroup = radioGroup;
|
||||||
item.setShowDot(prop.get_state() == IBus.PropState.CHECKED);
|
item.setOrnament(prop.get_state() == IBus.PropState.CHECKED ?
|
||||||
|
PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
|
||||||
item.connect('activate', Lang.bind(this, function() {
|
item.connect('activate', Lang.bind(this, function() {
|
||||||
if (item.prop.get_state() == IBus.PropState.CHECKED)
|
if (item.prop.get_state() == IBus.PropState.CHECKED)
|
||||||
return;
|
return;
|
||||||
@ -668,12 +729,12 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
let group = item.radioGroup;
|
let group = item.radioGroup;
|
||||||
for (let i = 0; i < group.length; ++i) {
|
for (let i = 0; i < group.length; ++i) {
|
||||||
if (group[i] == item) {
|
if (group[i] == item) {
|
||||||
item.setShowDot(true);
|
item.setOrnament(PopupMenu.Ornament.DOT);
|
||||||
item.prop.set_state(IBus.PropState.CHECKED);
|
item.prop.set_state(IBus.PropState.CHECKED);
|
||||||
this._ibusManager.activateProperty(item.prop.get_key(),
|
this._ibusManager.activateProperty(item.prop.get_key(),
|
||||||
IBus.PropState.CHECKED);
|
IBus.PropState.CHECKED);
|
||||||
} else {
|
} else {
|
||||||
group[i].setShowDot(false);
|
group[i].setOrnament(PopupMenu.Ornament.NONE);
|
||||||
group[i].prop.set_state(IBus.PropState.UNCHECKED);
|
group[i].prop.set_state(IBus.PropState.UNCHECKED);
|
||||||
this._ibusManager.activateProperty(group[i].prop.get_key(),
|
this._ibusManager.activateProperty(group[i].prop.get_key(),
|
||||||
IBus.PropState.UNCHECKED);
|
IBus.PropState.UNCHECKED);
|
||||||
@ -703,7 +764,7 @@ const InputSourceIndicator = new Lang.Class({
|
|||||||
item.prop = prop;
|
item.prop = prop;
|
||||||
item.connect('activate', Lang.bind(this, function() {
|
item.connect('activate', Lang.bind(this, function() {
|
||||||
this._ibusManager.activateProperty(item.prop.get_key(),
|
this._ibusManager.activateProperty(item.prop.get_key(),
|
||||||
IBus.PropState.CHECKED);
|
item.prop.get_state());
|
||||||
}));
|
}));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -5,17 +5,10 @@ const Gio = imports.gi.Gio;
|
|||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const NetworkManager = imports.gi.NetworkManager;
|
const NetworkManager = imports.gi.NetworkManager;
|
||||||
const NMClient = imports.gi.NMClient;
|
const NMClient = imports.gi.NMClient;
|
||||||
|
const NMGtk = imports.gi.NMGtk;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
// Some of the new code depends on as-yet-unreleased NM
|
|
||||||
var NMGtk;
|
|
||||||
try {
|
|
||||||
NMGtk = imports.gi.NMGtk;
|
|
||||||
} catch(e) {
|
|
||||||
NMGtk = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
||||||
@ -34,7 +27,6 @@ const NMConnectionCategory = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const NMAccessPointSecurity = {
|
const NMAccessPointSecurity = {
|
||||||
UNKNOWN: 0,
|
|
||||||
NONE: 1,
|
NONE: 1,
|
||||||
WEP: 2,
|
WEP: 2,
|
||||||
WPA_PSK: 3,
|
WPA_PSK: 3,
|
||||||
@ -52,20 +44,6 @@ const NM80211ApSecurityFlags = NetworkManager['80211ApSecurityFlags'];
|
|||||||
// (the remaining are placed into More…)
|
// (the remaining are placed into More…)
|
||||||
const NUM_VISIBLE_NETWORKS = 5;
|
const NUM_VISIBLE_NETWORKS = 5;
|
||||||
|
|
||||||
function macToArray(string) {
|
|
||||||
return string.split(':').map(function(el) {
|
|
||||||
return parseInt(el, 16);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function macCompare(one, two) {
|
|
||||||
for (let i = 0; i < 6; i++) {
|
|
||||||
if (one[i] != two[i])
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ssidCompare(one, two) {
|
function ssidCompare(one, two) {
|
||||||
if (!one || !two)
|
if (!one || !two)
|
||||||
return false;
|
return false;
|
||||||
@ -91,13 +69,6 @@ function signalToIcon(value) {
|
|||||||
return 'none';
|
return 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
// shared between NMNetworkMenuItem and NMDeviceWireless
|
|
||||||
function sortAccessPoints(accessPoints) {
|
|
||||||
return accessPoints.sort(function (one, two) {
|
|
||||||
return two.strength - one.strength;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function ssidToLabel(ssid) {
|
function ssidToLabel(ssid) {
|
||||||
let label = NetworkManager.utils_ssid_to_utf8(ssid);
|
let label = NetworkManager.utils_ssid_to_utf8(ssid);
|
||||||
if (!label)
|
if (!label)
|
||||||
@ -130,8 +101,7 @@ const NMNetworkMenuItem = new Lang.Class({
|
|||||||
this._icons.add_actor(this._signalIcon);
|
this._icons.add_actor(this._signalIcon);
|
||||||
|
|
||||||
this._secureIcon = new St.Icon({ style_class: 'popup-menu-icon' });
|
this._secureIcon = new St.Icon({ style_class: 'popup-menu-icon' });
|
||||||
if (this.bestAP._secType != NMAccessPointSecurity.UNKNOWN &&
|
if (this.bestAP._secType != NMAccessPointSecurity.NONE)
|
||||||
this.bestAP._secType != NMAccessPointSecurity.NONE)
|
|
||||||
this._secureIcon.icon_name = 'network-wireless-encrypted-symbolic';
|
this._secureIcon.icon_name = 'network-wireless-encrypted-symbolic';
|
||||||
this._icons.add_actor(this._secureIcon);
|
this._icons.add_actor(this._secureIcon);
|
||||||
},
|
},
|
||||||
@ -153,18 +123,12 @@ const NMWirelessSectionTitleMenuItem = new Lang.Class({
|
|||||||
Name: 'NMWirelessSectionTitleMenuItem',
|
Name: 'NMWirelessSectionTitleMenuItem',
|
||||||
Extends: PopupMenu.PopupSwitchMenuItem,
|
Extends: PopupMenu.PopupSwitchMenuItem,
|
||||||
|
|
||||||
_init: function(client, property, title, params) {
|
_init: function(client) {
|
||||||
params = params || { };
|
this.parent(_("Wi-Fi"), false, { style_class: 'popup-subtitle-menu-item' });
|
||||||
params.style_class = 'popup-subtitle-menu-item';
|
|
||||||
this.parent(title, false, params);
|
|
||||||
|
|
||||||
this._client = client;
|
this._client = client;
|
||||||
this._property = property + '_enabled';
|
this._client.connect('notify::wireless-enabled', Lang.bind(this, this._propertyChanged));
|
||||||
this._propertyHardware = property + '_hardware_enabled';
|
this._client.connect('notify::wireless-hardware-enabled', Lang.bind(this, this._propertyChanged));
|
||||||
this._setEnabledFunc = property + '_set_enabled';
|
|
||||||
|
|
||||||
this._client.connect('notify::' + property + '-enabled', Lang.bind(this, this._propertyChanged));
|
|
||||||
this._client.connect('notify::' + property + '-hardware-enabled', Lang.bind(this, this._propertyChanged));
|
|
||||||
|
|
||||||
this._propertyChanged();
|
this._propertyChanged();
|
||||||
},
|
},
|
||||||
@ -186,12 +150,12 @@ const NMWirelessSectionTitleMenuItem = new Lang.Class({
|
|||||||
activate: function(event) {
|
activate: function(event) {
|
||||||
this.parent(event);
|
this.parent(event);
|
||||||
|
|
||||||
this._client[this._setEnabledFunc](this._switch.state);
|
this._client.wireless_set_enabled(this._switch.state);
|
||||||
},
|
},
|
||||||
|
|
||||||
_propertyChanged: function() {
|
_propertyChanged: function() {
|
||||||
this._softwareEnabled = this._client[this._property];
|
this._softwareEnabled = this._client.wireless_enabled;
|
||||||
this._hardwareEnabled = this._client[this._propertyHardware];
|
this._hardwareEnabled = this._client.wireless_hardware_enabled;
|
||||||
|
|
||||||
let enabled = this._softwareEnabled && this._hardwareEnabled;
|
let enabled = this._softwareEnabled && this._hardwareEnabled;
|
||||||
this.setToggleState(enabled);
|
this.setToggleState(enabled);
|
||||||
@ -209,22 +173,7 @@ const NMConnectionBased = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(connections) {
|
_init: function(connections) {
|
||||||
this._connections = [ ];
|
this._connections = [ ];
|
||||||
for (let i = 0; i < connections.length; i++) {
|
connections.forEach(Lang.bind(this, this.checkConnection));
|
||||||
if (!connections[i].get_uuid())
|
|
||||||
continue;
|
|
||||||
if (!this.connectionValid(connections[i]))
|
|
||||||
continue;
|
|
||||||
// record the connection
|
|
||||||
let obj = {
|
|
||||||
connection: connections[i],
|
|
||||||
name: connections[i].get_id(),
|
|
||||||
uuid: connections[i].get_uuid(),
|
|
||||||
timestamp: connections[i]._timestamp,
|
|
||||||
item: null,
|
|
||||||
};
|
|
||||||
this._connections.push(obj);
|
|
||||||
}
|
|
||||||
this._connections.sort(this._connectionSortFunction);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
checkConnection: function(connection) {
|
checkConnection: function(connection) {
|
||||||
@ -315,7 +264,6 @@ const NMDevice = new Lang.Class({
|
|||||||
|
|
||||||
this._activeConnection = null;
|
this._activeConnection = null;
|
||||||
this._activeConnectionItem = null;
|
this._activeConnectionItem = null;
|
||||||
this._autoConnectionItem = null;
|
|
||||||
this._overflowItem = null;
|
this._overflowItem = null;
|
||||||
|
|
||||||
this.statusItem = new PopupMenu.PopupSwitchMenuItem('', this.connected, { style_class: 'popup-subtitle-menu-item' });
|
this.statusItem = new PopupMenu.PopupSwitchMenuItem('', this.connected, { style_class: 'popup-subtitle-menu-item' });
|
||||||
@ -402,13 +350,9 @@ const NMDevice = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_activateAutomaticConnection: function() {
|
_activateAutomaticConnection: function() {
|
||||||
let connection = this._createAutomaticConnection();
|
let connection = new NetworkManager.Connection();
|
||||||
if (connection) {
|
|
||||||
this._client.add_and_activate_connection(connection, this.device, null, null);
|
this._client.add_and_activate_connection(connection, this.device, null, null);
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
get connected() {
|
get connected() {
|
||||||
@ -502,11 +446,6 @@ const NMDevice = new Lang.Class({
|
|||||||
this.statusItem.label.text = this.device._description;
|
this.statusItem.label.text = this.device._description;
|
||||||
},
|
},
|
||||||
|
|
||||||
// protected
|
|
||||||
_createAutomaticConnection: function() {
|
|
||||||
throw new TypeError('Invoking pure virtual function NMDevice.createAutomaticConnection');
|
|
||||||
},
|
|
||||||
|
|
||||||
_queueCreateSection: function() {
|
_queueCreateSection: function() {
|
||||||
if (this._deferredWorkId) {
|
if (this._deferredWorkId) {
|
||||||
this._clearSection();
|
this._clearSection();
|
||||||
@ -517,7 +456,6 @@ const NMDevice = new Lang.Class({
|
|||||||
_clearSection: function() {
|
_clearSection: function() {
|
||||||
// Clear everything
|
// Clear everything
|
||||||
this.section.removeAll();
|
this.section.removeAll();
|
||||||
this._autoConnectionItem = null;
|
|
||||||
this._activeConnectionItem = null;
|
this._activeConnectionItem = null;
|
||||||
this._overflowItem = null;
|
this._overflowItem = null;
|
||||||
for (let i = 0; i < this._connections.length; i++) {
|
for (let i = 0; i < this._connections.length; i++) {
|
||||||
@ -556,14 +494,6 @@ const NMDevice = new Lang.Class({
|
|||||||
} else
|
} else
|
||||||
this.section.addMenuItem(obj.item);
|
this.section.addMenuItem(obj.item);
|
||||||
}
|
}
|
||||||
} else if (this._autoConnectionName) {
|
|
||||||
this._autoConnectionItem = new PopupMenu.PopupMenuItem(this._autoConnectionName);
|
|
||||||
this._autoConnectionItem.connect('activate', Lang.bind(this, function() {
|
|
||||||
let connection = this._createAutomaticConnection();
|
|
||||||
if (connection)
|
|
||||||
this._client.add_and_activate_connection(connection, this.device, null, null);
|
|
||||||
}));
|
|
||||||
this.section.addMenuItem(this._autoConnectionItem);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -588,7 +518,7 @@ const NMDevice = new Lang.Class({
|
|||||||
title = _("Connected (private)");
|
title = _("Connected (private)");
|
||||||
}
|
}
|
||||||
this._activeConnectionItem = new PopupMenu.PopupMenuItem(title, { reactive: false });
|
this._activeConnectionItem = new PopupMenu.PopupMenuItem(title, { reactive: false });
|
||||||
this._activeConnectionItem.setShowDot(true);
|
this._activeConnectionItem.setOrnament(PopupMenu.Ornament.DOT);
|
||||||
},
|
},
|
||||||
|
|
||||||
_deviceStateChanged: function(device, newstate, oldstate, reason) {
|
_deviceStateChanged: function(device, newstate, oldstate, reason) {
|
||||||
@ -665,24 +595,10 @@ const NMDeviceWired = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(client, device, connections) {
|
_init: function(client, device, connections) {
|
||||||
device._description = _("Wired");
|
device._description = _("Wired");
|
||||||
this._autoConnectionName = _("Auto Ethernet");
|
|
||||||
this.category = NMConnectionCategory.WIRED;
|
this.category = NMConnectionCategory.WIRED;
|
||||||
|
|
||||||
this.parent(client, device, connections);
|
this.parent(client, device, connections);
|
||||||
},
|
},
|
||||||
|
|
||||||
_createAutomaticConnection: function() {
|
|
||||||
let connection = new NetworkManager.Connection();
|
|
||||||
let uuid = NetworkManager.utils_uuid_generate();
|
|
||||||
connection.add_setting(new NetworkManager.SettingWired());
|
|
||||||
connection.add_setting(new NetworkManager.SettingConnection({
|
|
||||||
uuid: uuid,
|
|
||||||
id: this._autoConnectionName,
|
|
||||||
type: NetworkManager.SETTING_WIRED_SETTING_NAME,
|
|
||||||
autoconnect: true
|
|
||||||
}));
|
|
||||||
return connection;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const NMDeviceModem = new Lang.Class({
|
const NMDeviceModem = new Lang.Class({
|
||||||
@ -723,13 +639,10 @@ const NMDeviceModem = new Lang.Class({
|
|||||||
this._connectionType = NetworkManager.SETTING_GSM_SETTING_NAME;
|
this._connectionType = NetworkManager.SETTING_GSM_SETTING_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_wwan) {
|
if (is_wwan)
|
||||||
this.category = NMConnectionCategory.WWAN;
|
this.category = NMConnectionCategory.WWAN;
|
||||||
this._autoConnectionName = _("Auto broadband");
|
else
|
||||||
} else {
|
|
||||||
this.category = NMConnectionCategory.WIRED;
|
this.category = NMConnectionCategory.WIRED;
|
||||||
this._autoConnectionName = _("Auto dial-up");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mobileDevice) {
|
if (this.mobileDevice) {
|
||||||
this._operatorNameId = this.mobileDevice.connect('notify::operator-name', Lang.bind(this, function() {
|
this._operatorNameId = this.mobileDevice.connect('notify::operator-name', Lang.bind(this, function() {
|
||||||
@ -824,50 +737,20 @@ const NMDeviceBluetooth = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(client, device, connections) {
|
_init: function(client, device, connections) {
|
||||||
device._description = _("Bluetooth");
|
device._description = _("Bluetooth");
|
||||||
this._autoConnectionName = this._makeConnectionName(device);
|
|
||||||
device.connect('notify::name', Lang.bind(this, this._updateAutoConnectionName));
|
|
||||||
|
|
||||||
this.category = NMConnectionCategory.WWAN;
|
this.category = NMConnectionCategory.WWAN;
|
||||||
|
|
||||||
this.parent(client, device, connections);
|
this.parent(client, device, connections);
|
||||||
},
|
},
|
||||||
|
|
||||||
_createAutomaticConnection: function() {
|
|
||||||
let connection = new NetworkManager.Connection;
|
|
||||||
let uuid = NetworkManager.utils_uuid_generate();
|
|
||||||
connection.add_setting(new NetworkManager.SettingBluetooth);
|
|
||||||
connection.add_setting(new NetworkManager.SettingConnection({
|
|
||||||
uuid: uuid,
|
|
||||||
id: this._autoConnectionName,
|
|
||||||
type: NetworkManager.SETTING_BLUETOOTH_SETTING_NAME,
|
|
||||||
autoconnect: false
|
|
||||||
}));
|
|
||||||
return connection;
|
|
||||||
},
|
|
||||||
|
|
||||||
_activateAutomaticConnection: function() {
|
_activateAutomaticConnection: function() {
|
||||||
// FIXME: DUN devices are configured like modems, so
|
// FIXME: DUN devices are configured like modems, so
|
||||||
// we need to spawn the mobile wizard
|
// We need to spawn the mobile wizard
|
||||||
// but the network panel doesn't support bluetooth at the moment
|
// but the network panel doesn't support bluetooth at the moment
|
||||||
// so we just create an empty connection and hope
|
// so we just create an empty connection and hope
|
||||||
// that this phone supports PAN
|
// that this phone supports PAN
|
||||||
|
|
||||||
return this.parent();
|
return this.parent();
|
||||||
},
|
|
||||||
|
|
||||||
_makeConnectionName: function(device) {
|
|
||||||
let name = device.name;
|
|
||||||
if (name)
|
|
||||||
return _("Auto %s").format(name);
|
|
||||||
else
|
|
||||||
return _("Auto bluetooth");
|
|
||||||
},
|
|
||||||
|
|
||||||
_updateAutoConnectionName: function() {
|
|
||||||
this._autoConnectionName = this._makeConnectionName(this.device);
|
|
||||||
|
|
||||||
this._queueCreateSection();
|
|
||||||
this._updateStatusItem();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -881,76 +764,19 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
this._overflowItem = null;
|
this._overflowItem = null;
|
||||||
this._networks = [ ];
|
this._networks = [ ];
|
||||||
|
|
||||||
// breaking the layers with this, but cannot call
|
this.parent(client, device, connections);
|
||||||
// this.connectionValid until I have a device
|
|
||||||
this.device = device;
|
|
||||||
|
|
||||||
let validConnections = connections.filter(Lang.bind(this, function(connection) {
|
|
||||||
return this.connectionValid(connection);
|
|
||||||
}));
|
|
||||||
let accessPoints = device.get_access_points() || [ ];
|
let accessPoints = device.get_access_points() || [ ];
|
||||||
for (let i = 0; i < accessPoints.length; i++) {
|
accessPoints.forEach(Lang.bind(this, function(ap) {
|
||||||
// Access points are grouped by network
|
this._accessPointAdded(this.device, ap);
|
||||||
let ap = accessPoints[i];
|
}));
|
||||||
|
|
||||||
if (ap.get_ssid() == null) {
|
this._activeApChanged();
|
||||||
// hidden access point cannot be added, we need to know
|
|
||||||
// the SSID and security details to connect
|
|
||||||
// nevertheless, the access point can acquire a SSID when
|
|
||||||
// NetworkManager connects to it (via nmcli or the control-center)
|
|
||||||
ap._notifySsidId = ap.connect('notify::ssid', Lang.bind(this, this._notifySsidCb));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let pos = this._findNetwork(ap);
|
|
||||||
let obj;
|
|
||||||
if (pos != -1) {
|
|
||||||
obj = this._networks[pos];
|
|
||||||
obj.accessPoints.push(ap);
|
|
||||||
} else {
|
|
||||||
obj = { ssid: ap.get_ssid(),
|
|
||||||
mode: ap.mode,
|
|
||||||
security: this._getApSecurityType(ap),
|
|
||||||
connections: [ ],
|
|
||||||
item: null,
|
|
||||||
accessPoints: [ ap ]
|
|
||||||
};
|
|
||||||
obj.ssidText = ssidToLabel(obj.ssid);
|
|
||||||
this._networks.push(obj);
|
|
||||||
}
|
|
||||||
ap._updateId = ap.connect('notify::strength', Lang.bind(this, this._onApStrengthChanged));
|
|
||||||
|
|
||||||
// Check if some connection is valid for this AP
|
|
||||||
for (let j = 0; j < validConnections.length; j++) {
|
|
||||||
let connection = validConnections[j];
|
|
||||||
if (ap.connection_valid(connection) &&
|
|
||||||
obj.connections.indexOf(connection) == -1) {
|
|
||||||
obj.connections.push(connection);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sort APs within each network by strength
|
|
||||||
for (let i = 0; i < this._networks.length; i++)
|
|
||||||
sortAccessPoints(this._networks[i].accessPoints);
|
|
||||||
|
|
||||||
if (this.device.active_access_point) {
|
|
||||||
let networkPos = this._findNetwork(this.device.active_access_point);
|
|
||||||
|
|
||||||
if (networkPos == -1) // the connected access point is invisible
|
|
||||||
this._activeNetwork = null;
|
|
||||||
else
|
|
||||||
this._activeNetwork = this._networks[networkPos];
|
|
||||||
} else {
|
|
||||||
this._activeNetwork = null;
|
|
||||||
}
|
|
||||||
this._networks.sort(this._networkSortFunction);
|
this._networks.sort(this._networkSortFunction);
|
||||||
|
|
||||||
this._apChangedId = device.connect('notify::active-access-point', Lang.bind(this, this._activeApChanged));
|
this._apChangedId = device.connect('notify::active-access-point', Lang.bind(this, this._activeApChanged));
|
||||||
this._apAddedId = device.connect('access-point-added', Lang.bind(this, this._accessPointAdded));
|
this._apAddedId = device.connect('access-point-added', Lang.bind(this, this._accessPointAdded));
|
||||||
this._apRemovedId = device.connect('access-point-removed', Lang.bind(this, this._accessPointRemoved));
|
this._apRemovedId = device.connect('access-point-removed', Lang.bind(this, this._accessPointRemoved));
|
||||||
|
|
||||||
this.parent(client, device, validConnections);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
@ -1090,9 +916,9 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
|
|
||||||
_findExistingNetwork: function(accessPoint) {
|
_findExistingNetwork: function(accessPoint) {
|
||||||
for (let i = 0; i < this._networks.length; i++) {
|
for (let i = 0; i < this._networks.length; i++) {
|
||||||
let apObj = this._networks[i];
|
let network = this._networks[i];
|
||||||
for (let j = 0; j < apObj.accessPoints.length; j++) {
|
for (let j = 0; j < network.accessPoints.length; j++) {
|
||||||
if (apObj.accessPoints[j] == accessPoint)
|
if (network.accessPoints[j] == accessPoint)
|
||||||
return { network: i, ap: j };
|
return { network: i, ap: j };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1140,30 +966,30 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let pos = this._findNetwork(accessPoint);
|
let pos = this._findNetwork(accessPoint);
|
||||||
let apObj;
|
let network;
|
||||||
let needsupdate = false;
|
let needsupdate = false;
|
||||||
|
|
||||||
if (pos != -1) {
|
if (pos != -1) {
|
||||||
apObj = this._networks[pos];
|
network = this._networks[pos];
|
||||||
if (apObj.accessPoints.indexOf(accessPoint) != -1) {
|
if (network.accessPoints.indexOf(accessPoint) != -1) {
|
||||||
log('Access point was already seen, not adding again');
|
log('Access point was already seen, not adding again');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.insertSorted(apObj.accessPoints, accessPoint, function(one, two) {
|
Util.insertSorted(network.accessPoints, accessPoint, function(one, two) {
|
||||||
return two.strength - one.strength;
|
return two.strength - one.strength;
|
||||||
});
|
});
|
||||||
if (apObj.item)
|
if (network.item)
|
||||||
apObj.item.updateBestAP(apObj.accessPoints[0]);
|
network.item.updateBestAP(network.accessPoints[0]);
|
||||||
} else {
|
} else {
|
||||||
apObj = { ssid: accessPoint.get_ssid(),
|
network = { ssid: accessPoint.get_ssid(),
|
||||||
mode: accessPoint.mode,
|
mode: accessPoint.mode,
|
||||||
security: this._getApSecurityType(accessPoint),
|
security: this._getApSecurityType(accessPoint),
|
||||||
connections: [ ],
|
connections: [ ],
|
||||||
item: null,
|
item: null,
|
||||||
accessPoints: [ accessPoint ]
|
accessPoints: [ accessPoint ]
|
||||||
};
|
};
|
||||||
apObj.ssidText = ssidToLabel(apObj.ssid);
|
network.ssidText = ssidToLabel(network.ssid);
|
||||||
}
|
}
|
||||||
accessPoint._updateId = accessPoint.connect('notify::strength', Lang.bind(this, this._onApStrengthChanged));
|
accessPoint._updateId = accessPoint.connect('notify::strength', Lang.bind(this, this._onApStrengthChanged));
|
||||||
|
|
||||||
@ -1171,14 +997,14 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
for (let i = 0; i < this._connections.length; i++) {
|
for (let i = 0; i < this._connections.length; i++) {
|
||||||
let connection = this._connections[i].connection;
|
let connection = this._connections[i].connection;
|
||||||
if (accessPoint.connection_valid(connection) &&
|
if (accessPoint.connection_valid(connection) &&
|
||||||
apObj.connections.indexOf(connection) == -1) {
|
network.connections.indexOf(connection) == -1) {
|
||||||
apObj.connections.push(connection);
|
network.connections.push(connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos != -1)
|
if (pos != -1)
|
||||||
this._networks.splice(pos, 1);
|
this._networks.splice(pos, 1);
|
||||||
let newPos = Util.insertSorted(this._networks, apObj, this._networkSortFunction);
|
let newPos = Util.insertSorted(this._networks, network, this._networkSortFunction);
|
||||||
|
|
||||||
// Queue an update of the UI if we changed the order
|
// Queue an update of the UI if we changed the order
|
||||||
if (newPos != pos)
|
if (newPos != pos)
|
||||||
@ -1198,28 +1024,28 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let apObj = this._networks[res.network];
|
let network = this._networks[res.network];
|
||||||
apObj.accessPoints.splice(res.ap, 1);
|
network.accessPoints.splice(res.ap, 1);
|
||||||
|
|
||||||
if (apObj.accessPoints.length == 0) {
|
if (network.accessPoints.length == 0) {
|
||||||
if (this._activeNetwork == apObj)
|
if (this._activeNetwork == network)
|
||||||
this._activeNetwork = null;
|
this._activeNetwork = null;
|
||||||
|
|
||||||
if (apObj.item)
|
if (network.item)
|
||||||
apObj.item.destroy();
|
network.item.destroy();
|
||||||
|
|
||||||
if (this._overflowItem) {
|
if (this._overflowItem) {
|
||||||
if (!apObj.isMore) {
|
if (!network.isMore) {
|
||||||
// we removed an item in the main menu, and we have a more submenu
|
// we removed an item in the main menu, and we have a more submenu
|
||||||
// we need to extract the first item in more and move it to the submenu
|
// we need to extract the first item in more and move it to the submenu
|
||||||
|
|
||||||
let item = this._overflowItem.menu.firstMenuItem;
|
let item = this._overflowItem.menu.firstMenuItem;
|
||||||
if (item && item._apObj) {
|
if (item && item._network) {
|
||||||
item.destroy();
|
item.destroy();
|
||||||
// clear the cycle, and allow the construction of the new item
|
// clear the cycle, and allow the construction of the new item
|
||||||
item._apObj.item = null;
|
item._network.item = null;
|
||||||
|
|
||||||
this._createNetworkItem(item._apObj, NUM_VISIBLE_NETWORKS-1);
|
this._createNetworkItem(item._network, NUM_VISIBLE_NETWORKS-1);
|
||||||
} else {
|
} else {
|
||||||
log('The more... menu was existing and empty! This should not happen');
|
log('The more... menu was existing and empty! This should not happen');
|
||||||
}
|
}
|
||||||
@ -1238,14 +1064,14 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
let okPrev = true, okNext = true;
|
let okPrev = true, okNext = true;
|
||||||
|
|
||||||
if (res.network > 0)
|
if (res.network > 0)
|
||||||
okPrev = this._networkSortFunction(this._networks[res.network - 1], apObj) >= 0;
|
okPrev = this._networkSortFunction(this._networks[res.network - 1], network) >= 0;
|
||||||
if (res.network < this._networks.length-1)
|
if (res.network < this._networks.length-1)
|
||||||
okNext = this._networkSortFunction(this._networks[res.network + 1], apObj) <= 0;
|
okNext = this._networkSortFunction(this._networks[res.network + 1], network) <= 0;
|
||||||
|
|
||||||
if (!okPrev || !okNext)
|
if (!okPrev || !okNext)
|
||||||
this._queueCreateSection();
|
this._queueCreateSection();
|
||||||
else if (apObj.item)
|
else if (network.item)
|
||||||
apObj.item.updateBestAP(apObj.accessPoints[0]);
|
network.item.updateBestAP(network.accessPoints[0]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1284,20 +1110,20 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
|
|
||||||
let forceupdate = false;
|
let forceupdate = false;
|
||||||
for (let i = 0; i < this._networks.length; i++) {
|
for (let i = 0; i < this._networks.length; i++) {
|
||||||
let apObj = this._networks[i];
|
let network = this._networks[i];
|
||||||
let connections = apObj.connections;
|
let connections = network.connections;
|
||||||
for (let k = 0; k < connections.length; k++) {
|
for (let k = 0; k < connections.length; k++) {
|
||||||
if (connections[k].get_uuid() == connection.get_uuid()) {
|
if (connections[k].get_uuid() == connection.get_uuid()) {
|
||||||
// remove the connection from the access point group
|
// remove the connection from the access point group
|
||||||
connections.splice(k);
|
connections.splice(k, 1);
|
||||||
forceupdate = forceupdate || connections.length == 0;
|
forceupdate = forceupdate || connections.length == 0;
|
||||||
|
|
||||||
if (forceupdate)
|
if (forceupdate)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (apObj.item) {
|
if (network.item) {
|
||||||
if (apObj.item instanceof PopupMenu.PopupSubMenuMenuItem) {
|
if (network.item instanceof PopupMenu.PopupSubMenuMenuItem) {
|
||||||
let items = apObj.item.menu._getMenuItems();
|
let items = network.item.menu._getMenuItems();
|
||||||
if (items.length == 2) {
|
if (items.length == 2) {
|
||||||
// we need to update the connection list to convert this to a normal item
|
// we need to update the connection list to convert this to a normal item
|
||||||
forceupdate = true;
|
forceupdate = true;
|
||||||
@ -1310,8 +1136,8 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
apObj.item.destroy();
|
network.item.destroy();
|
||||||
apObj.item = null;
|
network.item = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1337,13 +1163,13 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
// find an appropriate access point
|
// find an appropriate access point
|
||||||
let forceupdate = false;
|
let forceupdate = false;
|
||||||
for (let i = 0; i < this._networks.length; i++) {
|
for (let i = 0; i < this._networks.length; i++) {
|
||||||
let apObj = this._networks[i];
|
let network = this._networks[i];
|
||||||
|
|
||||||
// Check if connection is valid for any of these access points
|
// Check if connection is valid for any of these access points
|
||||||
for (let k = 0; k < apObj.accessPoints.length; k++) {
|
for (let k = 0; k < network.accessPoints.length; k++) {
|
||||||
let ap = apObj.accessPoints[k];
|
let ap = network.accessPoints[k];
|
||||||
if (ap.connection_valid(connection)) {
|
if (ap.connection_valid(connection)) {
|
||||||
apObj.connections.push(connection);
|
network.connections.push(connection);
|
||||||
// this potentially changes the sorting order
|
// this potentially changes the sorting order
|
||||||
forceupdate = true;
|
forceupdate = true;
|
||||||
break;
|
break;
|
||||||
@ -1364,55 +1190,30 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
else
|
else
|
||||||
title = _("Connected (private)");
|
title = _("Connected (private)");
|
||||||
|
|
||||||
if (this._activeNetwork)
|
|
||||||
this._activeConnectionItem = new NMNetworkMenuItem(this.device.active_access_point, undefined,
|
this._activeConnectionItem = new NMNetworkMenuItem(this.device.active_access_point, undefined,
|
||||||
{ reactive: false });
|
{ reactive: false });
|
||||||
else
|
this._activeConnectionItem.setOrnament(PopupMenu.Ornament.DOT);
|
||||||
this._activeConnectionItem = new PopupMenu.PopupImageMenuItem(title,
|
|
||||||
'network-wireless-connected-symbolic',
|
|
||||||
{ reactive: false });
|
|
||||||
this._activeConnectionItem.setShowDot(true);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_createAutomaticConnection: function(apObj) {
|
_createNetworkItem: function(network, position) {
|
||||||
let name;
|
if(!network.accessPoints || network.accessPoints.length == 0) {
|
||||||
let ssid = NetworkManager.utils_ssid_to_utf8(apObj.ssid);
|
|
||||||
if (ssid) {
|
|
||||||
/* TRANSLATORS: this the automatic wireless connection name (including the network name) */
|
|
||||||
name = _("Auto %s").format(ssid);
|
|
||||||
} else
|
|
||||||
name = _("Auto wireless");
|
|
||||||
|
|
||||||
let connection = new NetworkManager.Connection();
|
|
||||||
connection.add_setting(new NetworkManager.SettingWireless());
|
|
||||||
connection.add_setting(new NetworkManager.SettingConnection({
|
|
||||||
id: name,
|
|
||||||
autoconnect: true, // NetworkManager will know to ignore this if appropriate
|
|
||||||
uuid: NetworkManager.utils_uuid_generate(),
|
|
||||||
type: NetworkManager.SETTING_WIRELESS_SETTING_NAME
|
|
||||||
}));
|
|
||||||
return connection;
|
|
||||||
},
|
|
||||||
|
|
||||||
_createNetworkItem: function(apObj, position) {
|
|
||||||
if(!apObj.accessPoints || apObj.accessPoints.length == 0) {
|
|
||||||
// this should not happen, but I have no idea why it happens
|
// this should not happen, but I have no idea why it happens
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(apObj.connections.length > 0) {
|
if(network.connections.length > 0) {
|
||||||
if (apObj.connections.length == 1) {
|
if (network.connections.length == 1) {
|
||||||
apObj.item = this._createAPItem(apObj.connections[0], apObj, false);
|
network.item = this._createAPItem(network.connections[0], network, false);
|
||||||
} else {
|
} else {
|
||||||
let title = apObj.ssidText;
|
let title = network.ssidText;
|
||||||
apObj.item = new PopupMenu.PopupSubMenuMenuItem(title);
|
network.item = new PopupMenu.PopupSubMenuMenuItem(title);
|
||||||
for (let i = 0; i < apObj.connections.length; i++)
|
for (let i = 0; i < network.connections.length; i++)
|
||||||
apObj.item.menu.addMenuItem(this._createAPItem(apObj.connections[i], apObj, true));
|
network.item.menu.addMenuItem(this._createAPItem(network.connections[i], network, true));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
apObj.item = new NMNetworkMenuItem(apObj.accessPoints[0]);
|
network.item = new NMNetworkMenuItem(network.accessPoints[0]);
|
||||||
apObj.item.connect('activate', Lang.bind(this, function() {
|
network.item.connect('activate', Lang.bind(this, function() {
|
||||||
let accessPoints = apObj.accessPoints;
|
let accessPoints = network.accessPoints;
|
||||||
if ( (accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
|
if ( (accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
|
||||||
|| (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
|
|| (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
|
||||||
// 802.1x-enabled APs require further configuration, so they're
|
// 802.1x-enabled APs require further configuration, so they're
|
||||||
@ -1420,23 +1221,23 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
Util.spawn(['gnome-control-center', 'network', 'connect-8021x-wifi',
|
Util.spawn(['gnome-control-center', 'network', 'connect-8021x-wifi',
|
||||||
this.device.get_path(), accessPoints[0].dbus_path]);
|
this.device.get_path(), accessPoints[0].dbus_path]);
|
||||||
} else {
|
} else {
|
||||||
let connection = this._createAutomaticConnection(apObj);
|
let connection = new NetworkManager.Connection();
|
||||||
this._client.add_and_activate_connection(connection, this.device, accessPoints[0].dbus_path, null)
|
this._client.add_and_activate_connection(connection, this.device, accessPoints[0].dbus_path, null)
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
apObj.item._apObj = apObj;
|
network.item._network = network;
|
||||||
|
|
||||||
if (position < NUM_VISIBLE_NETWORKS) {
|
if (position < NUM_VISIBLE_NETWORKS) {
|
||||||
apObj.isMore = false;
|
network.isMore = false;
|
||||||
this.section.addMenuItem(apObj.item, position);
|
this.section.addMenuItem(network.item, position);
|
||||||
} else {
|
} else {
|
||||||
if (!this._overflowItem) {
|
if (!this._overflowItem) {
|
||||||
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More…"));
|
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More…"));
|
||||||
this.section.addMenuItem(this._overflowItem);
|
this.section.addMenuItem(this._overflowItem);
|
||||||
}
|
}
|
||||||
this._overflowItem.menu.addMenuItem(apObj.item, position - NUM_VISIBLE_NETWORKS);
|
this._overflowItem.menu.addMenuItem(network.item, position - NUM_VISIBLE_NETWORKS);
|
||||||
apObj.isMore = true;
|
network.isMore = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1452,13 +1253,13 @@ const NMDeviceWireless = new Lang.Class({
|
|||||||
let activeOffset = this._activeConnectionItem ? 1 : 0;
|
let activeOffset = this._activeConnectionItem ? 1 : 0;
|
||||||
|
|
||||||
for(let j = 0; j < this._networks.length; j++) {
|
for(let j = 0; j < this._networks.length; j++) {
|
||||||
let apObj = this._networks[j];
|
let network = this._networks[j];
|
||||||
if (apObj == this._activeNetwork) {
|
if (network == this._activeNetwork) {
|
||||||
activeOffset--;
|
activeOffset--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._createNetworkItem(apObj, j + activeOffset);
|
this._createNetworkItem(network, j + activeOffset);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -1518,18 +1319,14 @@ const NMVPNSection = new Lang.Class({
|
|||||||
Extends: NMConnectionBased,
|
Extends: NMConnectionBased,
|
||||||
category: NMConnectionCategory.VPN,
|
category: NMConnectionCategory.VPN,
|
||||||
|
|
||||||
_init: function(client, connections) {
|
_init: function(client) {
|
||||||
this.parent(connections);
|
this.parent([]);
|
||||||
this._client = client;
|
this._client = client;
|
||||||
|
|
||||||
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));
|
||||||
},
|
},
|
||||||
|
|
||||||
get empty() {
|
|
||||||
return this._connections.length == 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
connectionValid: function(connection) {
|
connectionValid: function(connection) {
|
||||||
// filtering is done by NMApplet code
|
// filtering is done by NMApplet code
|
||||||
return true;
|
return true;
|
||||||
@ -1680,11 +1477,9 @@ const NMApplet = new Lang.Class({
|
|||||||
|
|
||||||
// Virtual device types
|
// Virtual device types
|
||||||
this._vtypes = { };
|
this._vtypes = { };
|
||||||
if (NMGtk) {
|
|
||||||
this._vtypes[NetworkManager.SETTING_VLAN_SETTING_NAME] = NMDeviceVirtual;
|
this._vtypes[NetworkManager.SETTING_VLAN_SETTING_NAME] = NMDeviceVirtual;
|
||||||
this._vtypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMDeviceVirtual;
|
this._vtypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMDeviceVirtual;
|
||||||
this._vtypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMDeviceVirtual;
|
this._vtypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMDeviceVirtual;
|
||||||
}
|
|
||||||
|
|
||||||
// Connection types
|
// Connection types
|
||||||
this._ctypes = { };
|
this._ctypes = { };
|
||||||
@ -1696,11 +1491,9 @@ const NMApplet = new Lang.Class({
|
|||||||
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_INFINIBAND_SETTING_NAME] = NMConnectionCategory.WIRED;
|
||||||
if (NMGtk) {
|
|
||||||
this._ctypes[NetworkManager.SETTING_VLAN_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
|
this._ctypes[NetworkManager.SETTING_VLAN_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
|
||||||
this._ctypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
|
this._ctypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
|
||||||
this._ctypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
|
this._ctypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
|
||||||
}
|
|
||||||
this._ctypes[NetworkManager.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
|
this._ctypes[NetworkManager.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
|
||||||
|
|
||||||
NMClient.Client.new_async(null, Lang.bind(this, this._clientGot));
|
NMClient.Client.new_async(null, Lang.bind(this, this._clientGot));
|
||||||
@ -1768,7 +1561,7 @@ const NMApplet = new Lang.Class({
|
|||||||
this._devices.wireless = {
|
this._devices.wireless = {
|
||||||
section: new PopupMenu.PopupMenuSection(),
|
section: new PopupMenu.PopupMenuSection(),
|
||||||
devices: [ ],
|
devices: [ ],
|
||||||
item: this._makeToggleItem('wireless', _("Wi-Fi"))
|
item: this._makeWirelessToggle()
|
||||||
};
|
};
|
||||||
this._devices.wireless.section.addMenuItem(this._devices.wireless.item);
|
this._devices.wireless.section.addMenuItem(this._devices.wireless.item);
|
||||||
this._devices.wireless.section.actor.hide();
|
this._devices.wireless.section.actor.hide();
|
||||||
@ -1783,7 +1576,7 @@ 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._vpnSection = new NMVPNSection(this._client, this._connections);
|
this._vpnSection = new NMVPNSection(this._client);
|
||||||
this._vpnSection.connect('activation-failed', Lang.bind(this, this._onActivationFailed));
|
this._vpnSection.connect('activation-failed', Lang.bind(this, this._onActivationFailed));
|
||||||
this.menu.addMenuItem(this._vpnSection.section);
|
this.menu.addMenuItem(this._vpnSection.section);
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
@ -1815,14 +1608,14 @@ const NMApplet = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_makeToggleItem: function(type, title) {
|
_makeWirelessToggle: function() {
|
||||||
let item = new NMWirelessSectionTitleMenuItem(this._client, type, title);
|
let item = new NMWirelessSectionTitleMenuItem(this._client);
|
||||||
item.connect('enabled-changed', Lang.bind(this, function(item, enabled) {
|
item.connect('enabled-changed', Lang.bind(this, function(item, enabled) {
|
||||||
let devices = this._devices[type].devices;
|
let devices = this._devices.wireless.devices;
|
||||||
devices.forEach(function(dev) {
|
devices.forEach(function(dev) {
|
||||||
dev.setEnabled(enabled);
|
dev.setEnabled(enabled);
|
||||||
});
|
});
|
||||||
this._syncSectionTitle(type);
|
this._syncSectionTitle('wireless');
|
||||||
}));
|
}));
|
||||||
return item;
|
return item;
|
||||||
},
|
},
|
||||||
@ -1900,7 +1693,6 @@ const NMApplet = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_syncDeviceNames: function() {
|
_syncDeviceNames: function() {
|
||||||
if (NMGtk) {
|
|
||||||
let names = NMGtk.utils_disambiguate_device_names(this._nmDevices);
|
let names = NMGtk.utils_disambiguate_device_names(this._nmDevices);
|
||||||
for (let i = 0; i < this._nmDevices.length; i++) {
|
for (let i = 0; i < this._nmDevices.length; i++) {
|
||||||
let device = this._nmDevices[i];
|
let device = this._nmDevices[i];
|
||||||
@ -1908,12 +1700,6 @@ const NMApplet = new Lang.Class({
|
|||||||
if (device._delegate)
|
if (device._delegate)
|
||||||
device._delegate.syncDescription();
|
device._delegate.syncDescription();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
for (let i = 0; i < this._nmDevices.length; i++) {
|
|
||||||
let device = this._nmDevices[i];
|
|
||||||
device._delegate.syncDescription();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_deviceAdded: function(client, device, skipSyncDeviceNames) {
|
_deviceAdded: function(client, device, skipSyncDeviceNames) {
|
||||||
@ -1948,11 +1734,6 @@ const NMApplet = new Lang.Class({
|
|||||||
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);
|
||||||
}));
|
}));
|
||||||
wrapper._destroyId = wrapper.connect('destroy', function(wrapper) {
|
|
||||||
wrapper.disconnect(wrapper._activationFailedId);
|
|
||||||
wrapper.disconnect(wrapper._deviceStateChangedId);
|
|
||||||
wrapper.disconnect(wrapper._destroyId);
|
|
||||||
});
|
|
||||||
|
|
||||||
let section = this._devices[wrapper.category].section;
|
let section = this._devices[wrapper.category].section;
|
||||||
section.addMenuItem(wrapper.statusItem);
|
section.addMenuItem(wrapper.statusItem);
|
||||||
@ -1984,6 +1765,8 @@ const NMApplet = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_removeDeviceWrapper: function(wrapper) {
|
_removeDeviceWrapper: function(wrapper) {
|
||||||
|
wrapper.disconnect(wrapper._activationFailedId);
|
||||||
|
wrapper.disconnect(wrapper._deviceStateChangedId);
|
||||||
wrapper.destroy();
|
wrapper.destroy();
|
||||||
|
|
||||||
let devices = this._devices[wrapper.category].devices;
|
let devices = this._devices[wrapper.category].devices;
|
||||||
@ -2047,6 +1830,7 @@ const NMApplet = new Lang.Class({
|
|||||||
let default_ip4 = null;
|
let default_ip4 = null;
|
||||||
let default_ip6 = null;
|
let default_ip6 = null;
|
||||||
let active_vpn = null;
|
let active_vpn = null;
|
||||||
|
let active_any = null;
|
||||||
for (let i = 0; i < this._activeConnections.length; i++) {
|
for (let i = 0; i < this._activeConnections.length; i++) {
|
||||||
let a = this._activeConnections[i];
|
let a = this._activeConnections[i];
|
||||||
|
|
||||||
@ -2077,24 +1861,21 @@ const NMApplet = new Lang.Class({
|
|||||||
if (a.default6)
|
if (a.default6)
|
||||||
default_ip6 = a;
|
default_ip6 = a;
|
||||||
|
|
||||||
if (a._type == 'vpn')
|
if (a.state == NetworkManager.ActiveConnectionState.ACTIVATING)
|
||||||
active_vpn = a;
|
|
||||||
else if (a.state == NetworkManager.ActiveConnectionState.ACTIVATING)
|
|
||||||
activating = a;
|
activating = a;
|
||||||
|
else if (a.state == NetworkManager.ActiveConnectionState.ACTIVATED)
|
||||||
|
active_any = a;
|
||||||
|
|
||||||
|
if (a._type == 'vpn' &&
|
||||||
|
(a.state == NetworkManager.ActiveConnectionState.ACTIVATING ||
|
||||||
|
a.state == NetworkManager.ActiveConnectionState.ACTIVATED))
|
||||||
|
active_vpn = a;
|
||||||
|
|
||||||
if (!a._primaryDevice) {
|
if (!a._primaryDevice) {
|
||||||
if (a._type != NetworkManager.SETTING_VPN_SETTING_NAME) {
|
if (a._type != NetworkManager.SETTING_VPN_SETTING_NAME)
|
||||||
// find a good device to be considered primary
|
// This list is guaranteed to have one device in it.
|
||||||
a._primaryDevice = null;
|
a._primaryDevice = a.get_devices()[0]._delegate;
|
||||||
let devices = a.get_devices() || [];
|
else
|
||||||
for (let j = 0; j < devices.length; j++) {
|
|
||||||
let d = devices[j];
|
|
||||||
if (d._delegate) {
|
|
||||||
a._primaryDevice = d._delegate;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
a._primaryDevice = this._vpnSection;
|
a._primaryDevice = this._vpnSection;
|
||||||
|
|
||||||
if (a._primaryDevice)
|
if (a._primaryDevice)
|
||||||
@ -2108,7 +1889,7 @@ const NMApplet = new Lang.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._mainConnection = activating || default_ip4 || default_ip6 || this._activeConnections[0] || null;
|
this._mainConnection = activating || default_ip4 || default_ip6 || active_any || null;
|
||||||
this._vpnConnection = active_vpn;
|
this._vpnConnection = active_vpn;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2134,25 +1915,7 @@ const NMApplet = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_readConnections: function() {
|
_addConnection: function(connection) {
|
||||||
let connections = this._settings.list_connections();
|
|
||||||
for (let i = 0; i < connections.length; i++) {
|
|
||||||
let connection = connections[i];
|
|
||||||
if (this._ignoreConnection(connection))
|
|
||||||
continue;
|
|
||||||
if (connection._updatedId) {
|
|
||||||
// connection was already seen (for example because NetworkManager was restarted)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
connection._removedId = connection.connect('removed', Lang.bind(this, this._connectionRemoved));
|
|
||||||
connection._updatedId = connection.connect('updated', Lang.bind(this, this._updateConnection));
|
|
||||||
|
|
||||||
this._updateConnection(connection);
|
|
||||||
this._connections.push(connection);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_newConnection: function(settings, connection) {
|
|
||||||
if (this._ignoreConnection(connection))
|
if (this._ignoreConnection(connection))
|
||||||
return;
|
return;
|
||||||
if (connection._updatedId) {
|
if (connection._updatedId) {
|
||||||
@ -2165,14 +1928,22 @@ const NMApplet = new Lang.Class({
|
|||||||
|
|
||||||
this._updateConnection(connection);
|
this._updateConnection(connection);
|
||||||
this._connections.push(connection);
|
this._connections.push(connection);
|
||||||
|
},
|
||||||
|
|
||||||
|
_readConnections: function() {
|
||||||
|
let connections = this._settings.list_connections();
|
||||||
|
connections.forEach(Lang.bind(this, this._addConnection));
|
||||||
|
},
|
||||||
|
|
||||||
|
_newConnection: function(settings, connection) {
|
||||||
|
this._addConnection(connection);
|
||||||
this._updateIcon();
|
this._updateIcon();
|
||||||
},
|
},
|
||||||
|
|
||||||
_connectionRemoved: function(connection) {
|
_connectionRemoved: function(connection) {
|
||||||
let pos = this._connections.indexOf(connection);
|
let pos = this._connections.indexOf(connection);
|
||||||
if (pos != -1)
|
if (pos != -1)
|
||||||
this._connections.splice(connection);
|
this._connections.splice(connection, 1);
|
||||||
|
|
||||||
let section = connection._section;
|
let section = connection._section;
|
||||||
|
|
||||||
|
@ -307,7 +307,7 @@ const Indicator = new Lang.Class({
|
|||||||
this._headphoneIcon.visible = value;
|
this._headphoneIcon.visible = value;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._headphoneIcon = this.addIcon(new Gio.ThemedIcon({ name: 'headphones-symbolic' }));
|
this._headphoneIcon = this.addIcon(new Gio.ThemedIcon({ name: 'audio-headphones-symbolic' }));
|
||||||
this._headphoneIcon.visible = false;
|
this._headphoneIcon.visible = false;
|
||||||
|
|
||||||
this.menu.addMenuItem(this._volumeMenu);
|
this.menu.addMenuItem(this._volumeMenu);
|
||||||
|
@ -27,35 +27,6 @@ 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;
|
||||||
|
|
||||||
function versionCompare(required, reference) {
|
|
||||||
required = required.split('.');
|
|
||||||
reference = reference.split('.');
|
|
||||||
|
|
||||||
for (let i = 0; i < required.length; i++) {
|
|
||||||
if (required[i] != reference[i])
|
|
||||||
return required[i] < reference[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isSupported() {
|
|
||||||
try {
|
|
||||||
let params = GLib.Variant.new('(ss)', ['org.gnome.DisplayManager.Manager', 'Version']);
|
|
||||||
let result = Gio.DBus.system.call_sync('org.gnome.DisplayManager',
|
|
||||||
'/org/gnome/DisplayManager/Manager',
|
|
||||||
'org.freedesktop.DBus.Properties',
|
|
||||||
'Get', params, null,
|
|
||||||
Gio.DBusCallFlags.NONE,
|
|
||||||
-1, null);
|
|
||||||
|
|
||||||
let version = result.deep_unpack()[0].deep_unpack();
|
|
||||||
return versionCompare('3.5.91', version);
|
|
||||||
} catch(e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const UnlockDialog = new Lang.Class({
|
const UnlockDialog = new Lang.Class({
|
||||||
Name: 'UnlockDialog',
|
Name: 'UnlockDialog',
|
||||||
Extends: ModalDialog.ModalDialog,
|
Extends: ModalDialog.ModalDialog,
|
||||||
@ -76,6 +47,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._greeterClient = new Gdm.Client();
|
this._greeterClient = new Gdm.Client();
|
||||||
this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient, { reauthenticationOnly: true });
|
this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient, { reauthenticationOnly: true });
|
||||||
|
this._userVerified = false;
|
||||||
|
|
||||||
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));
|
||||||
@ -98,6 +70,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
|
|
||||||
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._promptEntry.clutter_text.connect('activate', Lang.bind(this, this._doUnlock));
|
||||||
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);
|
||||||
@ -118,9 +91,6 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._promptLoginHint.hide();
|
this._promptLoginHint.hide();
|
||||||
this.contentLayout.add_actor(this._promptLoginHint);
|
this.contentLayout.add_actor(this._promptLoginHint);
|
||||||
|
|
||||||
this._workSpinner = new Panel.AnimatedIcon('process-working.svg', LoginDialog.WORK_SPINNER_ICON_SIZE);
|
|
||||||
this._workSpinner.actor.opacity = 0;
|
|
||||||
|
|
||||||
this.allowCancel = false;
|
this.allowCancel = false;
|
||||||
this.buttonLayout.visible = true;
|
this.buttonLayout.visible = true;
|
||||||
this.addButton({ label: _("Cancel"),
|
this.addButton({ label: _("Cancel"),
|
||||||
@ -131,8 +101,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
y_fill: false,
|
y_fill: false,
|
||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
y_align: St.Align.MIDDLE });
|
y_align: St.Align.MIDDLE });
|
||||||
this.buttonLayout.add(this._workSpinner.actor,
|
this.placeSpinner({ expand: false,
|
||||||
{ expand: false,
|
|
||||||
x_fill: false,
|
x_fill: false,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
x_align: St.Align.END,
|
x_align: St.Align.END,
|
||||||
@ -169,11 +138,6 @@ const UnlockDialog = new Lang.Class({
|
|||||||
let batch = new Batch.Hold();
|
let batch = new Batch.Hold();
|
||||||
this._userVerifier.begin(this._userName, batch);
|
this._userVerifier.begin(this._userName, batch);
|
||||||
|
|
||||||
GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
|
|
||||||
this.emit('loaded');
|
|
||||||
return false;
|
|
||||||
}));
|
|
||||||
|
|
||||||
Main.ctrlAltTabManager.addGroup(this.dialogLayout, _("Unlock Window"), 'dialog-password-symbolic');
|
Main.ctrlAltTabManager.addGroup(this.dialogLayout, _("Unlock Window"), 'dialog-password-symbolic');
|
||||||
|
|
||||||
this._idleMonitor = new GnomeDesktop.IdleMonitor();
|
this._idleMonitor = new GnomeDesktop.IdleMonitor();
|
||||||
@ -195,28 +159,6 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._okButton.can_focus = 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) {
|
||||||
if (message) {
|
if (message) {
|
||||||
this._promptMessage.text = message;
|
this._promptMessage.text = message;
|
||||||
@ -247,7 +189,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
|
|
||||||
this._currentQuery = serviceName;
|
this._currentQuery = serviceName;
|
||||||
this._updateSensitivity(true);
|
this._updateSensitivity(true);
|
||||||
this._setWorking(false);
|
this.setWorking(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_showLoginHint: function(verifier, message) {
|
_showLoginHint: function(verifier, message) {
|
||||||
@ -266,7 +208,7 @@ const UnlockDialog = new Lang.Class({
|
|||||||
// 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._updateSensitivity(false);
|
this._updateSensitivity(false);
|
||||||
this._setWorking(true);
|
this.setWorking(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,30 +219,47 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._currentQuery = null;
|
this._currentQuery = null;
|
||||||
|
|
||||||
this._updateSensitivity(false);
|
this._updateSensitivity(false);
|
||||||
this._setWorking(true);
|
this.setWorking(true);
|
||||||
|
|
||||||
this._userVerifier.answerQuery(query, this._promptEntry.text);
|
this._userVerifier.answerQuery(query, this._promptEntry.text);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onVerificationComplete: function() {
|
_finishUnlock: function() {
|
||||||
this._userVerifier.clear();
|
this._userVerifier.clear();
|
||||||
this.emit('unlocked');
|
this.emit('unlocked');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onVerificationComplete: function() {
|
||||||
|
this._userVerified = true;
|
||||||
|
if (!this._userVerifier.hasPendingMessages) {
|
||||||
|
this._finishUnlock();
|
||||||
|
} else {
|
||||||
|
let signalId = this._userVerifier.connect('no-more-messages',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this._userVerifier.disconnect(signalId);
|
||||||
|
this._finishUnlock();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_onReset: function() {
|
_onReset: function() {
|
||||||
|
if (!this._userVerified) {
|
||||||
|
this._userVerifier.clear();
|
||||||
this.emit('failed');
|
this.emit('failed');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onVerificationFailed: function() {
|
_onVerificationFailed: function() {
|
||||||
this._currentQuery = null;
|
this._currentQuery = null;
|
||||||
this._firstQuestion = true;
|
this._firstQuestion = true;
|
||||||
|
this._userVerified = false;
|
||||||
|
|
||||||
this._promptEntry.text = '';
|
this._promptEntry.text = '';
|
||||||
this._promptEntry.clutter_text.set_password_char('\u25cf');
|
this._promptEntry.clutter_text.set_password_char('\u25cf');
|
||||||
this._promptEntry.menu.isPassword = true;
|
this._promptEntry.menu.isPassword = true;
|
||||||
|
|
||||||
this._updateSensitivity(false);
|
this._updateSensitivity(false);
|
||||||
this._setWorking(false);
|
this.setWorking(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_escape: function() {
|
_escape: function() {
|
||||||
@ -333,4 +292,8 @@ const UnlockDialog = new Lang.Class({
|
|||||||
|
|
||||||
this.destroy();
|
this.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addCharacter: function(unichar) {
|
||||||
|
this._promptEntry.clutter_text.insert_unichar(unichar);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -600,6 +600,7 @@ const UserMenuButton = new Lang.Class({
|
|||||||
Lang.bind(this, this._updateHaveShutdown));
|
Lang.bind(this, this._updateHaveShutdown));
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
|
if (Main.screenShield)
|
||||||
Main.screenShield.connect('locked-changed', Lang.bind(this, this._updatePresenceIcon));
|
Main.screenShield.connect('locked-changed', Lang.bind(this, this._updatePresenceIcon));
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
},
|
},
|
||||||
@ -656,7 +657,7 @@ const UserMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
_updateLockScreen: function() {
|
_updateLockScreen: function() {
|
||||||
let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
|
let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
|
||||||
this._lockScreenItem.actor.visible = allowLockScreen;
|
this._lockScreenItem.actor.visible = allowLockScreen && LoginManager.canLock();
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateInstallUpdates: function() {
|
_updateInstallUpdates: function() {
|
||||||
@ -864,6 +865,7 @@ const UserMenuButton = new Lang.Class({
|
|||||||
_onLoginScreenActivate: function() {
|
_onLoginScreenActivate: function() {
|
||||||
this.menu.close(BoxPointer.PopupAnimation.NONE);
|
this.menu.close(BoxPointer.PopupAnimation.NONE);
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
|
if (Main.screenShield)
|
||||||
Main.screenShield.lock(false);
|
Main.screenShield.lock(false);
|
||||||
Gdm.goto_login_session_sync(null);
|
Gdm.goto_login_session_sync(null);
|
||||||
},
|
},
|
||||||
@ -915,8 +917,10 @@ const UserMenuButton = new Lang.Class({
|
|||||||
session.user.get_real_name() : session.username;
|
session.user.get_real_name() : session.username;
|
||||||
|
|
||||||
if (session.info.remote)
|
if (session.info.remote)
|
||||||
|
/* Translators: Remote here refers to a remote session, like a ssh login */
|
||||||
userLabelText = _("%s (remote)").format(userName);
|
userLabelText = _("%s (remote)").format(userName);
|
||||||
else if (session.info.type == "tty")
|
else if (session.info.type == "tty")
|
||||||
|
/* Translators: Console here refers to a tty like a VT console */
|
||||||
userLabelText = _("%s (console)").format(userName);
|
userLabelText = _("%s (console)").format(userName);
|
||||||
else
|
else
|
||||||
userLabelText = userName;
|
userLabelText = userName;
|
||||||
|
@ -16,6 +16,7 @@ const UserWidget = new Lang.Class({
|
|||||||
|
|
||||||
this.actor = new St.BoxLayout({ style_class: 'user-widget',
|
this.actor = new St.BoxLayout({ style_class: 'user-widget',
|
||||||
vertical: false });
|
vertical: false });
|
||||||
|
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||||
|
|
||||||
this._avatar = new UserMenu.UserAvatarWidget(user);
|
this._avatar = new UserMenu.UserAvatarWidget(user);
|
||||||
this.actor.add(this._avatar.actor,
|
this.actor.add(this._avatar.actor,
|
||||||
@ -36,7 +37,7 @@ const UserWidget = new Lang.Class({
|
|||||||
this._updateUser();
|
this._updateUser();
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
_onDestroy: function() {
|
||||||
if (this._userLoadedId != 0) {
|
if (this._userLoadedId != 0) {
|
||||||
this._user.disconnect(this._userLoadedId);
|
this._user.disconnect(this._userLoadedId);
|
||||||
this._userLoadedId = 0;
|
this._userLoadedId = 0;
|
||||||
@ -46,8 +47,6 @@ const UserWidget = new Lang.Class({
|
|||||||
this._user.disconnect(this._userChangedId);
|
this._user.disconnect(this._userChangedId);
|
||||||
this._userChangedId = 0;
|
this._userChangedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.destroy();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateUser: function() {
|
_updateUser: function() {
|
||||||
|
@ -150,6 +150,14 @@ const ViewSelector = new Lang.Class({
|
|||||||
Shell.KeyBindingMode.NORMAL |
|
Shell.KeyBindingMode.NORMAL |
|
||||||
Shell.KeyBindingMode.OVERVIEW,
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._toggleAppsPage));
|
Lang.bind(this, this._toggleAppsPage));
|
||||||
|
|
||||||
|
Main.wm.addKeybinding('toggle-overview',
|
||||||
|
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
|
Meta.KeyBindingFlags.NONE,
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(Main.overview, Main.overview.toggle));
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleAppsPage: function() {
|
_toggleAppsPage: function() {
|
||||||
@ -178,6 +186,10 @@ const ViewSelector = new Lang.Class({
|
|||||||
Main.overview.fadeInDesktop();
|
Main.overview.fadeInDesktop();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setWorkspacesFullGeometry: function(geom) {
|
||||||
|
this._workspacesDisplay.setWorkspacesFullGeometry(geom);
|
||||||
|
},
|
||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
this._workspacesDisplay.hide();
|
this._workspacesDisplay.hide();
|
||||||
},
|
},
|
||||||
|
@ -11,12 +11,14 @@ const Layout = imports.ui.layout;
|
|||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Panel = imports.ui.panel;
|
const Panel = imports.ui.panel;
|
||||||
|
|
||||||
// we could make these gsettings
|
|
||||||
const FISH_NAME = 'wanda';
|
const FISH_NAME = 'wanda';
|
||||||
|
const FISH_FILENAME = 'wanda.png';
|
||||||
const FISH_SPEED = 300;
|
const FISH_SPEED = 300;
|
||||||
const FISH_COMMAND = 'fortune';
|
const FISH_COMMAND = 'fortune';
|
||||||
|
// The size of an individual frame in the animation
|
||||||
|
const FISH_HEIGHT = 22;
|
||||||
|
const FISH_WIDTH = 36;
|
||||||
|
|
||||||
const GNOME_PANEL_PIXMAPDIR = '../gnome-panel/fish';
|
|
||||||
const FISH_GROUP = 'Fish Animation';
|
const FISH_GROUP = 'Fish Animation';
|
||||||
|
|
||||||
const MAGIC_FISH_KEY = 'free the fish';
|
const MAGIC_FISH_KEY = 'free the fish';
|
||||||
@ -26,33 +28,16 @@ const WandaIcon = new Lang.Class({
|
|||||||
Extends: IconGrid.BaseIcon,
|
Extends: IconGrid.BaseIcon,
|
||||||
|
|
||||||
_init : function(fish, label, params) {
|
_init : function(fish, label, params) {
|
||||||
this._fish = fish;
|
|
||||||
let file = GLib.build_filenamev([global.datadir, GNOME_PANEL_PIXMAPDIR, fish + '.fish']);
|
|
||||||
|
|
||||||
if (GLib.file_test(file, GLib.FileTest.EXISTS)) {
|
|
||||||
this._keyfile = new GLib.KeyFile();
|
|
||||||
this._keyfile.load_from_file(file, GLib.KeyFileFlags.NONE);
|
|
||||||
|
|
||||||
this._imageFile = GLib.build_filenamev([global.datadir, GNOME_PANEL_PIXMAPDIR,
|
|
||||||
this._keyfile.get_string(FISH_GROUP, 'image')]);
|
|
||||||
|
|
||||||
let tmpPixbuf = GdkPixbuf.Pixbuf.new_from_file(this._imageFile);
|
|
||||||
|
|
||||||
this._imgHeight = tmpPixbuf.height;
|
|
||||||
this._imgWidth = tmpPixbuf.width / this._keyfile.get_integer(FISH_GROUP, 'frames');
|
|
||||||
} else {
|
|
||||||
this._imageFile = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.parent(label, params);
|
this.parent(label, params);
|
||||||
|
|
||||||
|
this._fish = fish;
|
||||||
|
this._imageFile = GLib.build_filenamev([global.datadir, fish + '.png']);
|
||||||
|
|
||||||
|
this._imgHeight = FISH_HEIGHT;
|
||||||
|
this._imgWidth = FISH_WIDTH;
|
||||||
},
|
},
|
||||||
|
|
||||||
createIcon: function(iconSize) {
|
createIcon: function(iconSize) {
|
||||||
if (!this._imageFile) {
|
|
||||||
return new St.Icon({ icon_name: 'face-smile',
|
|
||||||
icon_size: iconSize });
|
|
||||||
}
|
|
||||||
|
|
||||||
this._animations = new Panel.Animation(this._imageFile, this._imgWidth, this._imgHeight, FISH_SPEED);
|
this._animations = new Panel.Animation(this._imageFile, this._imgWidth, this._imgHeight, FISH_SPEED);
|
||||||
this._animations.play();
|
this._animations.play();
|
||||||
return this._animations.actor;
|
return this._animations.actor;
|
||||||
|
@ -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 Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
|
const Mainloop = imports.mainloop;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
@ -66,6 +67,209 @@ function getWindowDimmer(actor) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When the last window closed on a workspace is a dialog or splash
|
||||||
|
* screen, we assume that it might be an initial window shown before
|
||||||
|
* the main window of an application, and give the app a grace period
|
||||||
|
* where it can map another window before we remove the workspace.
|
||||||
|
*/
|
||||||
|
const LAST_WINDOW_GRACE_TIME = 1000;
|
||||||
|
|
||||||
|
const WorkspaceTracker = new Lang.Class({
|
||||||
|
Name: 'WorkspaceTracker',
|
||||||
|
|
||||||
|
_init: function(wm) {
|
||||||
|
this._wm = wm;
|
||||||
|
|
||||||
|
this._workspaces = [];
|
||||||
|
this._checkWorkspacesId = 0;
|
||||||
|
|
||||||
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
|
tracker.connect('startup-sequence-changed', Lang.bind(this, this._queueCheckWorkspaces));
|
||||||
|
|
||||||
|
global.screen.connect('notify::n-workspaces', Lang.bind(this, this._nWorkspacesChanged));
|
||||||
|
|
||||||
|
global.screen.connect('window-entered-monitor', Lang.bind(this, this._windowEnteredMonitor));
|
||||||
|
global.screen.connect('window-left-monitor', Lang.bind(this, this._windowLeftMonitor));
|
||||||
|
global.screen.connect('restacked', Lang.bind(this, this._windowsRestacked));
|
||||||
|
|
||||||
|
this._overrideSettings = new Gio.Settings({ schema: 'org.gnome.shell.overrides' });
|
||||||
|
this._overrideSettings.connect('changed::dynamic-workspaces', Lang.bind(this, this._queueCheckWorkspaces));
|
||||||
|
|
||||||
|
this._nWorkspacesChanged();
|
||||||
|
},
|
||||||
|
|
||||||
|
_checkWorkspaces: function() {
|
||||||
|
let i;
|
||||||
|
let emptyWorkspaces = [];
|
||||||
|
|
||||||
|
if (!Meta.prefs_get_dynamic_workspaces()) {
|
||||||
|
this._checkWorkspacesId = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < this._workspaces.length; i++) {
|
||||||
|
let lastRemoved = this._workspaces[i]._lastRemovedWindow;
|
||||||
|
if ((lastRemoved &&
|
||||||
|
(lastRemoved.get_window_type() == Meta.WindowType.SPLASHSCREEN ||
|
||||||
|
lastRemoved.get_window_type() == Meta.WindowType.DIALOG ||
|
||||||
|
lastRemoved.get_window_type() == Meta.WindowType.MODAL_DIALOG)) ||
|
||||||
|
this._workspaces[i]._keepAliveId)
|
||||||
|
emptyWorkspaces[i] = false;
|
||||||
|
else
|
||||||
|
emptyWorkspaces[i] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
let sequences = Shell.WindowTracker.get_default().get_startup_sequences();
|
||||||
|
for (i = 0; i < sequences.length; i++) {
|
||||||
|
let index = sequences[i].get_workspace();
|
||||||
|
if (index >= 0 && index <= global.screen.n_workspaces)
|
||||||
|
emptyWorkspaces[index] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let windows = global.get_window_actors();
|
||||||
|
for (i = 0; i < windows.length; i++) {
|
||||||
|
let win = windows[i];
|
||||||
|
|
||||||
|
if (win.get_meta_window().is_on_all_workspaces())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
let workspaceIndex = win.get_workspace();
|
||||||
|
emptyWorkspaces[workspaceIndex] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we don't have an empty workspace at the end, add one
|
||||||
|
if (!emptyWorkspaces[emptyWorkspaces.length -1]) {
|
||||||
|
global.screen.append_new_workspace(false, global.get_current_time());
|
||||||
|
emptyWorkspaces.push(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
||||||
|
let removingCurrentWorkspace = (emptyWorkspaces[activeWorkspaceIndex] &&
|
||||||
|
activeWorkspaceIndex < emptyWorkspaces.length - 1);
|
||||||
|
// Don't enter the overview when removing multiple empty workspaces at startup
|
||||||
|
let showOverview = (removingCurrentWorkspace &&
|
||||||
|
!emptyWorkspaces.every(function(x) { return x; }));
|
||||||
|
|
||||||
|
if (removingCurrentWorkspace) {
|
||||||
|
// "Merge" the empty workspace we are removing with the one at the end
|
||||||
|
this._wm.blockAnimations();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete other empty workspaces; do it from the end to avoid index changes
|
||||||
|
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
|
||||||
|
if (emptyWorkspaces[i])
|
||||||
|
global.screen.remove_workspace(this._workspaces[i], global.get_current_time());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (removingCurrentWorkspace) {
|
||||||
|
global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time());
|
||||||
|
this._wm.unblockAnimations();
|
||||||
|
|
||||||
|
if (!Main.overview.visible && showOverview)
|
||||||
|
Main.overview.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
this._checkWorkspacesId = 0;
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
keepWorkspaceAlive: function(workspace, duration) {
|
||||||
|
if (workspace._keepAliveId)
|
||||||
|
Mainloop.source_remove(workspace._keepAliveId);
|
||||||
|
|
||||||
|
workspace._keepAliveId = Mainloop.timeout_add(duration, Lang.bind(this, function() {
|
||||||
|
workspace._keepAliveId = 0;
|
||||||
|
this._queueCheckWorkspaces();
|
||||||
|
return false;
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
_windowRemoved: function(workspace, window) {
|
||||||
|
workspace._lastRemovedWindow = window;
|
||||||
|
this._queueCheckWorkspaces();
|
||||||
|
Mainloop.timeout_add(LAST_WINDOW_GRACE_TIME, Lang.bind(this, function() {
|
||||||
|
if (workspace._lastRemovedWindow == window) {
|
||||||
|
workspace._lastRemovedWindow = null;
|
||||||
|
this._queueCheckWorkspaces();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
_windowLeftMonitor: function(metaScreen, monitorIndex, metaWin) {
|
||||||
|
// If the window left the primary monitor, that
|
||||||
|
// might make that workspace empty
|
||||||
|
if (monitorIndex == Main.layoutManager.primaryIndex)
|
||||||
|
this._queueCheckWorkspaces();
|
||||||
|
},
|
||||||
|
|
||||||
|
_windowEnteredMonitor: function(metaScreen, monitorIndex, metaWin) {
|
||||||
|
// If the window entered the primary monitor, that
|
||||||
|
// might make that workspace non-empty
|
||||||
|
if (monitorIndex == Main.layoutManager.primaryIndex)
|
||||||
|
this._queueCheckWorkspaces();
|
||||||
|
},
|
||||||
|
|
||||||
|
_windowsRestacked: function() {
|
||||||
|
// Figure out where the pointer is in case we lost track of
|
||||||
|
// it during a grab. (In particular, if a trayicon popup menu
|
||||||
|
// is dismissed, see if we need to close the message tray.)
|
||||||
|
global.sync_pointer();
|
||||||
|
},
|
||||||
|
|
||||||
|
_queueCheckWorkspaces: function() {
|
||||||
|
if (this._checkWorkspacesId == 0)
|
||||||
|
this._checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, this._checkWorkspaces));
|
||||||
|
},
|
||||||
|
|
||||||
|
_nWorkspacesChanged: function() {
|
||||||
|
let oldNumWorkspaces = this._workspaces.length;
|
||||||
|
let newNumWorkspaces = global.screen.n_workspaces;
|
||||||
|
|
||||||
|
if (oldNumWorkspaces == newNumWorkspaces)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
let lostWorkspaces = [];
|
||||||
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
|
let w;
|
||||||
|
|
||||||
|
// Assume workspaces are only added at the end
|
||||||
|
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++)
|
||||||
|
this._workspaces[w] = global.screen.get_workspace_by_index(w);
|
||||||
|
|
||||||
|
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
||||||
|
let workspace = this._workspaces[w];
|
||||||
|
workspace._windowAddedId = workspace.connect('window-added', Lang.bind(this, this._queueCheckWorkspaces));
|
||||||
|
workspace._windowRemovedId = workspace.connect('window-removed', Lang.bind(this, this._windowRemoved));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Assume workspaces are only removed sequentially
|
||||||
|
// (e.g. 2,3,4 - not 2,4,7)
|
||||||
|
let removedIndex;
|
||||||
|
let removedNum = oldNumWorkspaces - newNumWorkspaces;
|
||||||
|
for (let w = 0; w < oldNumWorkspaces; w++) {
|
||||||
|
let workspace = global.screen.get_workspace_by_index(w);
|
||||||
|
if (this._workspaces[w] != workspace) {
|
||||||
|
removedIndex = w;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let lostWorkspaces = this._workspaces.splice(removedIndex, removedNum);
|
||||||
|
lostWorkspaces.forEach(function(workspace) {
|
||||||
|
workspace.disconnect(workspace._windowAddedId);
|
||||||
|
workspace.disconnect(workspace._windowRemovedId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this._queueCheckWorkspaces();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const WindowManager = new Lang.Class({
|
const WindowManager = new Lang.Class({
|
||||||
Name: 'WindowManager',
|
Name: 'WindowManager',
|
||||||
|
|
||||||
@ -136,6 +340,90 @@ const WindowManager = new Lang.Class({
|
|||||||
Shell.KeyBindingMode.NORMAL |
|
Shell.KeyBindingMode.NORMAL |
|
||||||
Shell.KeyBindingMode.OVERVIEW,
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
Lang.bind(this, this._showWorkspaceSwitcher));
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-1',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-2',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-3',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-4',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-5',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-6',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-7',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-8',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-9',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-10',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-11',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('switch-to-workspace-12',
|
||||||
|
Shell.KeyBindingMode.NORMAL |
|
||||||
|
Shell.KeyBindingMode.OVERVIEW,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-1',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-2',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-3',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-4',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-5',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-6',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-7',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-8',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-9',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-10',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-11',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
|
this.setCustomKeybindingHandler('move-to-workspace-12',
|
||||||
|
Shell.KeyBindingMode.NORMAL,
|
||||||
|
Lang.bind(this, this._showWorkspaceSwitcher));
|
||||||
this.setCustomKeybindingHandler('switch-applications',
|
this.setCustomKeybindingHandler('switch-applications',
|
||||||
Shell.KeyBindingMode.NORMAL,
|
Shell.KeyBindingMode.NORMAL,
|
||||||
Lang.bind(this, this._startAppSwitcher));
|
Lang.bind(this, this._startAppSwitcher));
|
||||||
@ -172,8 +460,9 @@ const WindowManager = new Lang.Class({
|
|||||||
this.addKeybinding('open-application-menu',
|
this.addKeybinding('open-application-menu',
|
||||||
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.KeyBindingMode.NORMAL,
|
Shell.KeyBindingMode.NORMAL |
|
||||||
Lang.bind(this, this._openAppMenu));
|
Shell.KeyBindingMode.TOPBAR_POPUP,
|
||||||
|
Lang.bind(this, this._toggleAppMenu));
|
||||||
|
|
||||||
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++)
|
||||||
@ -183,6 +472,11 @@ const WindowManager = new Lang.Class({
|
|||||||
for (let i = 0; i < this._dimmedWindows.length; i++)
|
for (let i = 0; i < this._dimmedWindows.length; i++)
|
||||||
this._dimWindow(this._dimmedWindows[i]);
|
this._dimWindow(this._dimmedWindows[i]);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this._workspaceTracker = new WorkspaceTracker(this);
|
||||||
|
|
||||||
|
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
||||||
|
false, -1, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
setCustomKeybindingHandler: function(name, modes, handler) {
|
setCustomKeybindingHandler: function(name, modes, handler) {
|
||||||
@ -679,27 +973,39 @@ const WindowManager = new Lang.Class({
|
|||||||
Main.ctrlAltTabManager.popup(backwards, binding.get_name(), binding.get_mask());
|
Main.ctrlAltTabManager.popup(backwards, binding.get_name(), binding.get_mask());
|
||||||
},
|
},
|
||||||
|
|
||||||
_openAppMenu : function(display, screen, window, event, binding) {
|
_toggleAppMenu : function(display, screen, window, event, binding) {
|
||||||
Main.panel.openAppMenu();
|
Main.panel.toggleAppMenu();
|
||||||
},
|
},
|
||||||
|
|
||||||
_showWorkspaceSwitcher : function(display, screen, window, binding) {
|
_showWorkspaceSwitcher : function(display, screen, window, binding) {
|
||||||
if (screen.n_workspaces == 1)
|
if (screen.n_workspaces == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let [action,,,direction] = binding.get_name().split('-');
|
let [action,,,target] = binding.get_name().split('-');
|
||||||
let direction = Meta.MotionDirection[direction.toUpperCase()];
|
|
||||||
let newWs;
|
let newWs;
|
||||||
|
let direction;
|
||||||
|
|
||||||
|
if (isNaN(target)) {
|
||||||
|
direction = Meta.MotionDirection[target.toUpperCase()];
|
||||||
|
newWs = screen.get_active_workspace().get_neighbor(direction);
|
||||||
|
} else if (target > 0) {
|
||||||
|
target--;
|
||||||
|
newWs = screen.get_workspace_by_index(target);
|
||||||
|
|
||||||
|
if (screen.get_active_workspace().index() > target)
|
||||||
|
direction = Meta.MotionDirection.UP;
|
||||||
|
else
|
||||||
|
direction = Meta.MotionDirection.DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
if (direction != Meta.MotionDirection.UP &&
|
if (direction != Meta.MotionDirection.UP &&
|
||||||
direction != Meta.MotionDirection.DOWN)
|
direction != Meta.MotionDirection.DOWN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (action == 'switch')
|
if (action == 'switch')
|
||||||
newWs = this.actionMoveWorkspace(direction);
|
this.actionMoveWorkspace(newWs);
|
||||||
else
|
else
|
||||||
newWs = this.actionMoveWindow(window, direction);
|
this.actionMoveWindow(window, newWs);
|
||||||
|
|
||||||
if (!Main.overview.visible) {
|
if (!Main.overview.visible) {
|
||||||
if (this._workspaceSwitcherPopup == null) {
|
if (this._workspaceSwitcherPopup == null) {
|
||||||
@ -712,31 +1018,27 @@ const WindowManager = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
actionMoveWorkspace: function(direction) {
|
actionMoveWorkspace: function(workspace) {
|
||||||
let activeWorkspace = global.screen.get_active_workspace();
|
let activeWorkspace = global.screen.get_active_workspace();
|
||||||
let toActivate = activeWorkspace.get_neighbor(direction);
|
|
||||||
|
|
||||||
if (activeWorkspace != toActivate)
|
if (activeWorkspace != workspace)
|
||||||
toActivate.activate(global.get_current_time());
|
workspace.activate(global.get_current_time());
|
||||||
|
|
||||||
return toActivate;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
actionMoveWindow: function(window, direction) {
|
actionMoveWindow: function(window, workspace) {
|
||||||
let activeWorkspace = global.screen.get_active_workspace();
|
let activeWorkspace = global.screen.get_active_workspace();
|
||||||
let toActivate = activeWorkspace.get_neighbor(direction);
|
|
||||||
|
|
||||||
if (activeWorkspace != toActivate) {
|
if (activeWorkspace != workspace) {
|
||||||
// This won't have any effect for "always sticky" windows
|
// This won't have any effect for "always sticky" windows
|
||||||
// (like desktop windows or docks)
|
// (like desktop windows or docks)
|
||||||
|
|
||||||
this._movingWindow = window;
|
this._movingWindow = window;
|
||||||
window.change_workspace(toActivate);
|
window.change_workspace(workspace);
|
||||||
|
|
||||||
global.display.clear_mouse_mode();
|
global.display.clear_mouse_mode();
|
||||||
toActivate.activate_with_focus (window, global.get_current_time());
|
workspace.activate_with_focus (window, global.get_current_time());
|
||||||
}
|
}
|
||||||
|
|
||||||
return toActivate;
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -121,15 +121,33 @@ const WindowClone = new Lang.Class({
|
|||||||
return this._slot;
|
return this._slot;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Find the actor just below us, respecting reparenting done
|
||||||
|
// by DND code
|
||||||
|
getActualStackAbove: function() {
|
||||||
|
if (this._stackAbove == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (this.inDrag || this._zooming) {
|
||||||
|
if (this._stackAbove._delegate)
|
||||||
|
return this._stackAbove._delegate.getActualStackAbove();
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return this._stackAbove;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
setStackAbove: function (actor) {
|
setStackAbove: function (actor) {
|
||||||
this._stackAbove = actor;
|
this._stackAbove = actor;
|
||||||
if (this.inDrag)
|
if (this.inDrag)
|
||||||
// We'll fix up the stack after the drag
|
// We'll fix up the stack after the drag
|
||||||
return;
|
return;
|
||||||
if (this._stackAbove == null)
|
|
||||||
|
let actualAbove = this.getActualStackAbove();
|
||||||
|
if (actualAbove == null)
|
||||||
this.actor.lower_bottom();
|
this.actor.lower_bottom();
|
||||||
else
|
else
|
||||||
this.actor.raise(this._stackAbove);
|
this.actor.raise(actualAbove);
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
@ -435,6 +453,10 @@ const WindowOverlay = new Lang.Class({
|
|||||||
metaWindow.delete(global.get_current_time());
|
metaWindow.delete(global.get_current_time());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_windowCanClose: function() {
|
||||||
|
return this._windowClone.metaWindow.can_close();
|
||||||
|
},
|
||||||
|
|
||||||
_onWindowAdded: function(workspace, win) {
|
_onWindowAdded: function(workspace, win) {
|
||||||
let metaWindow = this._windowClone.metaWindow;
|
let metaWindow = this._windowClone.metaWindow;
|
||||||
|
|
||||||
@ -470,12 +492,14 @@ const WindowOverlay = new Lang.Class({
|
|||||||
_animateVisible: function() {
|
_animateVisible: function() {
|
||||||
this._parentActor.raise_top();
|
this._parentActor.raise_top();
|
||||||
|
|
||||||
|
if (this._windowCanClose()) {
|
||||||
this.closeButton.show();
|
this.closeButton.show();
|
||||||
this.closeButton.opacity = 0;
|
this.closeButton.opacity = 0;
|
||||||
Tweener.addTween(this.closeButton,
|
Tweener.addTween(this.closeButton,
|
||||||
{ opacity: 255,
|
{ opacity: 255,
|
||||||
time: CLOSE_BUTTON_FADE_TIME,
|
time: CLOSE_BUTTON_FADE_TIME,
|
||||||
transition: 'easeOutQuad' });
|
transition: 'easeOutQuad' });
|
||||||
|
}
|
||||||
|
|
||||||
this.border.show();
|
this.border.show();
|
||||||
this.border.opacity = 0;
|
this.border.opacity = 0;
|
||||||
@ -735,13 +759,6 @@ const LayoutStrategy = new Lang.Class({
|
|||||||
layout.space = space;
|
layout.space = space;
|
||||||
},
|
},
|
||||||
|
|
||||||
_getDistance: function (row, actor) {
|
|
||||||
let dist_x = actor.x - row.x;
|
|
||||||
let dist_y = actor.y - row.y;
|
|
||||||
|
|
||||||
return Math.sqrt(Math.pow(dist_x, 2) + Math.pow(dist_y, 2));
|
|
||||||
},
|
|
||||||
|
|
||||||
computeWindowSlots: function(layout, area) {
|
computeWindowSlots: function(layout, area) {
|
||||||
this._computeRowSizes(layout);
|
this._computeRowSizes(layout);
|
||||||
|
|
||||||
@ -749,28 +766,36 @@ const LayoutStrategy = new Lang.Class({
|
|||||||
|
|
||||||
let slots = [];
|
let slots = [];
|
||||||
|
|
||||||
let y = 0;
|
// Do this in three parts.
|
||||||
|
let height = 0;
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
let row = rows[i];
|
let row = rows[i];
|
||||||
row.x = area.x + (area.width - row.width) / 2;
|
height += row.height + this._rowSpacing;
|
||||||
row.y = area.y + y;
|
|
||||||
y += row.height + this._rowSpacing;
|
|
||||||
row.windows.sort(Lang.bind(this, function(a, b) {
|
|
||||||
return this._getDistance(row, a.realWindow) - this._getDistance(row, b.realWindow);
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let height = y - this._rowSpacing;
|
height -= this._rowSpacing;
|
||||||
let baseY = (area.height - height) / 2;
|
|
||||||
|
let y = 0;
|
||||||
|
|
||||||
|
for (let i = 0; i < rows.length; i++) {
|
||||||
|
let row = rows[i];
|
||||||
|
|
||||||
|
// If this window layout row doesn't fit in the actual
|
||||||
|
// geometry, then apply an additional scale to it.
|
||||||
|
row.additionalScale = Math.min(1, area.width / row.width, area.height / height);
|
||||||
|
|
||||||
|
row.x = area.x + (Math.max(area.width - row.width, 0) / 2) * row.additionalScale;
|
||||||
|
row.y = area.y + (y + Math.max(area.height - height, 0) / 2) * row.additionalScale;
|
||||||
|
y += row.height + this._rowSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
let row = rows[i];
|
let row = rows[i];
|
||||||
row.y += baseY;
|
|
||||||
let x = row.x;
|
let x = row.x;
|
||||||
for (let j = 0; j < row.windows.length; j++) {
|
for (let j = 0; j < row.windows.length; j++) {
|
||||||
let window = row.windows[j];
|
let window = row.windows[j];
|
||||||
|
|
||||||
let s = scale * this._computeWindowScale(window);
|
let s = scale * this._computeWindowScale(window) * row.additionalScale;
|
||||||
let cellWidth = window.actor.width * s;
|
let cellWidth = window.actor.width * s;
|
||||||
let cellHeight = window.actor.height * s;
|
let cellHeight = window.actor.height * s;
|
||||||
|
|
||||||
@ -814,6 +839,13 @@ const UnalignedLayoutStrategy = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_sortRow: function(row) {
|
||||||
|
// Sort windows horizontally to minimize travel distance
|
||||||
|
row.windows.sort(function(a, b) {
|
||||||
|
return a.realWindow.x - b.realWindow.x;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
computeLayout: function(windows, layout) {
|
computeLayout: function(windows, layout) {
|
||||||
let numRows = layout.numRows;
|
let numRows = layout.numRows;
|
||||||
|
|
||||||
@ -844,6 +876,7 @@ const UnalignedLayoutStrategy = new Lang.Class({
|
|||||||
row.windows.push(window);
|
row.windows.push(window);
|
||||||
row.fullWidth += width;
|
row.fullWidth += width;
|
||||||
} else {
|
} else {
|
||||||
|
this._sortRow(row);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -865,6 +898,14 @@ const UnalignedLayoutStrategy = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function padArea(area, padding) {
|
||||||
|
return {
|
||||||
|
x: area.x + padding.left,
|
||||||
|
y: area.y + padding.top,
|
||||||
|
width: area.width - padding.left - padding.right,
|
||||||
|
height: area.height - padding.top - padding.bottom,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @metaWorkspace: a #Meta.Workspace, or null
|
* @metaWorkspace: a #Meta.Workspace, or null
|
||||||
@ -876,10 +917,19 @@ const Workspace = new Lang.Class({
|
|||||||
// When dragging a window, we use this slot for reserve space.
|
// When dragging a window, we use this slot for reserve space.
|
||||||
this._reservedSlot = null;
|
this._reservedSlot = null;
|
||||||
this.metaWorkspace = metaWorkspace;
|
this.metaWorkspace = metaWorkspace;
|
||||||
this._x = 0;
|
|
||||||
this._y = 0;
|
// The full geometry is the geometry we should try and position
|
||||||
this._width = 0;
|
// windows for. The actual geometry we allocate may be less than
|
||||||
this._height = 0;
|
// this, like if the workspace switcher is slid out.
|
||||||
|
this._fullGeometry = null;
|
||||||
|
|
||||||
|
// The actual geometry is the geometry we need to arrange windows
|
||||||
|
// in. If this is a smaller area than the full geometry, we'll
|
||||||
|
// do some simple aspect ratio like math to fit the layout calculated
|
||||||
|
// for the full geometry into this area.
|
||||||
|
this._actualGeometry = null;
|
||||||
|
|
||||||
|
this._currentLayout = null;
|
||||||
|
|
||||||
this.monitorIndex = monitorIndex;
|
this.monitorIndex = monitorIndex;
|
||||||
this._monitor = Main.layoutManager.monitors[this.monitorIndex];
|
this._monitor = Main.layoutManager.monitors[this.monitorIndex];
|
||||||
@ -892,7 +942,7 @@ const Workspace = new Lang.Class({
|
|||||||
this.actor.add_style_class_name('external-monitor');
|
this.actor.add_style_class_name('external-monitor');
|
||||||
this.actor.set_size(0, 0);
|
this.actor.set_size(0, 0);
|
||||||
|
|
||||||
this._dropRect = new Clutter.Rectangle({ opacity: 0 });
|
this._dropRect = new Clutter.Actor({ opacity: 0 });
|
||||||
this._dropRect._delegate = this;
|
this._dropRect._delegate = this;
|
||||||
|
|
||||||
this.actor.add_actor(this._dropRect);
|
this.actor.add_actor(this._dropRect);
|
||||||
@ -908,7 +958,7 @@ const Workspace = new Lang.Class({
|
|||||||
this._windowOverlays = [];
|
this._windowOverlays = [];
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
if (this._isOverviewWindow(windows[i])) {
|
if (this._isOverviewWindow(windows[i])) {
|
||||||
this._addWindowClone(windows[i]);
|
this._addWindowClone(windows[i], true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -929,23 +979,29 @@ const Workspace = new Lang.Class({
|
|||||||
|
|
||||||
this._positionWindowsFlags = 0;
|
this._positionWindowsFlags = 0;
|
||||||
this._positionWindowsId = 0;
|
this._positionWindowsId = 0;
|
||||||
|
|
||||||
this._currentLayout = null;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setGeometry: function(x, y, width, height) {
|
setFullGeometry: function(geom) {
|
||||||
this._x = x;
|
this._fullGeometry = geom;
|
||||||
this._y = y;
|
this._recalculateWindowPositions(WindowPositionFlags.NONE);
|
||||||
this._width = width;
|
},
|
||||||
this._height = height;
|
|
||||||
|
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
setActualGeometry: function(geom) {
|
||||||
this._dropRect.set_position(x, y);
|
this._actualGeometry = geom;
|
||||||
this._dropRect.set_size(width, height);
|
|
||||||
|
if (this._actualGeometryLater)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._actualGeometryLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
||||||
|
let geom = this._actualGeometry;
|
||||||
|
|
||||||
|
this._dropRect.set_position(geom.x, geom.y);
|
||||||
|
this._dropRect.set_size(geom.width, geom.height);
|
||||||
|
this._updateWindowPositions(WindowPositionFlags.NONE);
|
||||||
|
|
||||||
|
this._actualGeometryLater = 0;
|
||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.positionWindows(WindowPositionFlags.NONE);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_lookupIndex: function (metaWindow) {
|
_lookupIndex: function (metaWindow) {
|
||||||
@ -973,37 +1029,32 @@ const Workspace = new Lang.Class({
|
|||||||
clone = null;
|
clone = null;
|
||||||
|
|
||||||
this._reservedSlot = clone;
|
this._reservedSlot = clone;
|
||||||
this._currentLayout = null;
|
this._recalculateWindowPositions(WindowPositionFlags.ANIMATE);
|
||||||
this.positionWindows(WindowPositionFlags.ANIMATE);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
_recalculateWindowPositions: function(flags) {
|
||||||
* positionWindows:
|
|
||||||
* @flags:
|
|
||||||
* INITIAL - this is the initial positioning of the windows.
|
|
||||||
* ANIMATE - Indicates that we need animate changing position.
|
|
||||||
*/
|
|
||||||
positionWindows: function(flags) {
|
|
||||||
this._positionWindowsFlags |= flags;
|
this._positionWindowsFlags |= flags;
|
||||||
|
|
||||||
if (this._positionWindowsId > 0)
|
if (this._positionWindowsId > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._positionWindowsId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
this._positionWindowsId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
|
||||||
this._realPositionWindows(this._positionWindowsFlags);
|
this._realRecalculateWindowPositions(this._positionWindowsFlags);
|
||||||
this._positionWindowsFlags = 0;
|
this._positionWindowsFlags = 0;
|
||||||
this._positionWindowsId = 0;
|
this._positionWindowsId = 0;
|
||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_realPositionWindows : function(flags) {
|
_realRecalculateWindowPositions: function(flags) {
|
||||||
if (this._repositionWindowsId > 0) {
|
if (this._repositionWindowsId > 0) {
|
||||||
Mainloop.source_remove(this._repositionWindowsId);
|
Mainloop.source_remove(this._repositionWindowsId);
|
||||||
this._repositionWindowsId = 0;
|
this._repositionWindowsId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
let clones = this._windows.slice();
|
let clones = this._windows.slice();
|
||||||
|
if (clones.length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
clones.sort(function(a, b) {
|
clones.sort(function(a, b) {
|
||||||
return a.metaWindow.get_stable_sequence() - b.metaWindow.get_stable_sequence();
|
return a.metaWindow.get_stable_sequence() - b.metaWindow.get_stable_sequence();
|
||||||
@ -1012,11 +1063,25 @@ const Workspace = new Lang.Class({
|
|||||||
if (this._reservedSlot)
|
if (this._reservedSlot)
|
||||||
clones.push(this._reservedSlot);
|
clones.push(this._reservedSlot);
|
||||||
|
|
||||||
|
this._currentLayout = this._computeLayout(clones);
|
||||||
|
this._updateWindowPositions(flags);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateWindowPositions: function(flags) {
|
||||||
|
if (this._currentLayout == null) {
|
||||||
|
this._recalculateWindowPositions(flags);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let initialPositioning = flags & WindowPositionFlags.INITIAL;
|
let initialPositioning = flags & WindowPositionFlags.INITIAL;
|
||||||
let animate = flags & WindowPositionFlags.ANIMATE;
|
let animate = flags & WindowPositionFlags.ANIMATE;
|
||||||
|
|
||||||
// Start the animations
|
let layout = this._currentLayout;
|
||||||
let slots = this._computeAllWindowSlots(clones);
|
let strategy = layout.strategy;
|
||||||
|
|
||||||
|
let [, , padding] = this._getSpacingAndPadding();
|
||||||
|
let area = padArea(this._actualGeometry, padding);
|
||||||
|
let slots = strategy.computeWindowSlots(layout, area);
|
||||||
|
|
||||||
let currentWorkspace = global.screen.get_active_workspace();
|
let currentWorkspace = global.screen.get_active_workspace();
|
||||||
let isOnCurrentWorkspace = this.metaWorkspace == null || this.metaWorkspace == currentWorkspace;
|
let isOnCurrentWorkspace = this.metaWorkspace == null || this.metaWorkspace == currentWorkspace;
|
||||||
@ -1033,11 +1098,23 @@ const Workspace = new Lang.Class({
|
|||||||
if (clone.inDrag)
|
if (clone.inDrag)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
clone.slot = [x, y, clone.actor.width * scale, clone.actor.height * scale];
|
let cloneWidth = clone.actor.width * scale;
|
||||||
|
let cloneHeight = clone.actor.height * scale;
|
||||||
|
clone.slot = [x, y, cloneWidth, cloneHeight];
|
||||||
|
|
||||||
if (overlay && initialPositioning)
|
if (overlay && (initialPositioning || !clone.positioned))
|
||||||
overlay.hide();
|
overlay.hide();
|
||||||
|
|
||||||
|
if (!clone.positioned) {
|
||||||
|
// This window appeared after the overview was already up
|
||||||
|
// Grow the clone from the center of the slot
|
||||||
|
clone.actor.x = x + cloneWidth / 2;
|
||||||
|
clone.actor.y = y + cloneHeight / 2;
|
||||||
|
clone.actor.scale_x = 0;
|
||||||
|
clone.actor.scale_y = 0;
|
||||||
|
clone.positioned = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (animate && isOnCurrentWorkspace) {
|
if (animate && isOnCurrentWorkspace) {
|
||||||
if (!metaWindow.showing_on_its_workspace()) {
|
if (!metaWindow.showing_on_its_workspace()) {
|
||||||
/* Hidden windows should fade in and grow
|
/* Hidden windows should fade in and grow
|
||||||
@ -1118,8 +1195,8 @@ const Workspace = new Lang.Class({
|
|||||||
let [x, y, mask] = global.get_pointer();
|
let [x, y, mask] = global.get_pointer();
|
||||||
|
|
||||||
let pointerHasMoved = (this._cursorX != x && this._cursorY != y);
|
let pointerHasMoved = (this._cursorX != x && this._cursorY != y);
|
||||||
let inWorkspace = (this._x < x && x < this._x + this._width &&
|
let inWorkspace = (this._fullGeometry.x < x && x < this._fullGeometry.x + this._fullGeometry.width &&
|
||||||
this._y < y && y < this._y + this._height);
|
this._fullGeometry.y < y && y < this._fullGeometry.y + this._fullGeometry.height);
|
||||||
|
|
||||||
if (pointerHasMoved && inWorkspace) {
|
if (pointerHasMoved && inWorkspace) {
|
||||||
// store current cursor position
|
// store current cursor position
|
||||||
@ -1134,7 +1211,7 @@ const Workspace = new Lang.Class({
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.positionWindows(WindowPositionFlags.ANIMATE);
|
this._recalculateWindowPositions(WindowPositionFlags.ANIMATE);
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1223,7 +1300,7 @@ const Workspace = new Lang.Class({
|
|||||||
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
|
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let [clone, overlay] = this._addWindowClone(win);
|
let [clone, overlay] = this._addWindowClone(win, false);
|
||||||
|
|
||||||
if (win._overviewHint) {
|
if (win._overviewHint) {
|
||||||
let x = win._overviewHint.x - this.actor.x;
|
let x = win._overviewHint.x - this.actor.x;
|
||||||
@ -1232,20 +1309,14 @@ const Workspace = new Lang.Class({
|
|||||||
delete win._overviewHint;
|
delete win._overviewHint;
|
||||||
|
|
||||||
clone.slot = [x, y, clone.actor.width * scale, clone.actor.height * scale];
|
clone.slot = [x, y, clone.actor.width * scale, clone.actor.height * scale];
|
||||||
|
clone.positioned = true;
|
||||||
clone.actor.set_position (x, y);
|
clone.actor.set_position (x, y);
|
||||||
clone.actor.set_scale (scale, scale);
|
clone.actor.set_scale (scale, scale);
|
||||||
clone.overlay.relayout(false);
|
clone.overlay.relayout(false);
|
||||||
} else {
|
|
||||||
// Position new windows at the top corner of the workspace rather
|
|
||||||
// than where they were placed for real to avoid the window
|
|
||||||
// being clipped to the workspaceView. Its not really more
|
|
||||||
// natural for the window to suddenly appear in the overview
|
|
||||||
// on some seemingly random location anyway.
|
|
||||||
clone.actor.set_position (this._x, this._y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._currentLayout = null;
|
this._currentLayout = null;
|
||||||
this.positionWindows(WindowPositionFlags.ANIMATE);
|
this._recalculateWindowPositions(WindowPositionFlags.ANIMATE);
|
||||||
},
|
},
|
||||||
|
|
||||||
_windowAdded : function(metaWorkspace, metaWin) {
|
_windowAdded : function(metaWorkspace, metaWin) {
|
||||||
@ -1282,13 +1353,8 @@ const Workspace = new Lang.Class({
|
|||||||
|
|
||||||
// Animate the full-screen to Overview transition.
|
// Animate the full-screen to Overview transition.
|
||||||
zoomToOverview : function() {
|
zoomToOverview : function() {
|
||||||
this._currentLayout = null;
|
|
||||||
|
|
||||||
// Position and scale the windows.
|
// Position and scale the windows.
|
||||||
if (Main.overview.animationInProgress)
|
this._recalculateWindowPositions(WindowPositionFlags.ANIMATE | WindowPositionFlags.INITIAL);
|
||||||
this.positionWindows(WindowPositionFlags.ANIMATE | WindowPositionFlags.INITIAL);
|
|
||||||
else
|
|
||||||
this.positionWindows(WindowPositionFlags.INITIAL);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Animates the return from Overview mode
|
// Animates the return from Overview mode
|
||||||
@ -1388,10 +1454,11 @@ const Workspace = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Create a clone of a (non-desktop) window and add it to the window list
|
// Create a clone of a (non-desktop) window and add it to the window list
|
||||||
_addWindowClone : function(win) {
|
_addWindowClone : function(win, positioned) {
|
||||||
let clone = new WindowClone(win, this);
|
let clone = new WindowClone(win, this);
|
||||||
let overlay = new WindowOverlay(clone, this._windowOverlaysGroup);
|
let overlay = new WindowOverlay(clone, this._windowOverlaysGroup);
|
||||||
clone.overlay = overlay;
|
clone.overlay = overlay;
|
||||||
|
clone.positioned = positioned;
|
||||||
|
|
||||||
clone.connect('selected',
|
clone.connect('selected',
|
||||||
Lang.bind(this, this._onCloneSelected));
|
Lang.bind(this, this._onCloneSelected));
|
||||||
@ -1411,7 +1478,7 @@ const Workspace = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
clone.connect('size-changed',
|
clone.connect('size-changed',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this.positionWindows(0);
|
this._recalculateWindowPositions(WindowPositionFlags.NONE);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.actor.add_actor(clone.actor);
|
this.actor.add_actor(clone.actor);
|
||||||
@ -1460,12 +1527,14 @@ const Workspace = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_computeLayout: function(windows, area, rowSpacing, columnSpacing) {
|
_getBestLayout: function(windows, area, rowSpacing, columnSpacing) {
|
||||||
// We look for the largest scale that allows us to fit the
|
// We look for the largest scale that allows us to fit the
|
||||||
// largest row/tallest column on the workspace.
|
// largest row/tallest column on the workspace.
|
||||||
|
|
||||||
let lastLayout = {};
|
let lastLayout = {};
|
||||||
|
|
||||||
|
let strategy = new UnalignedLayoutStrategy(this._monitor, rowSpacing, columnSpacing);
|
||||||
|
|
||||||
for (let numRows = 1; ; numRows++) {
|
for (let numRows = 1; ; numRows++) {
|
||||||
let numColumns = Math.ceil(windows.length / numRows);
|
let numColumns = Math.ceil(windows.length / numRows);
|
||||||
|
|
||||||
@ -1475,8 +1544,6 @@ const Workspace = new Lang.Class({
|
|||||||
if (numColumns == lastLayout.numColumns)
|
if (numColumns == lastLayout.numColumns)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
let strategy = new UnalignedLayoutStrategy(this._monitor, rowSpacing, columnSpacing);
|
|
||||||
|
|
||||||
let layout = { area: area, strategy: strategy, numRows: numRows, numColumns: numColumns };
|
let layout = { area: area, strategy: strategy, numRows: numRows, numColumns: numColumns };
|
||||||
strategy.computeLayout(windows, layout);
|
strategy.computeLayout(windows, layout);
|
||||||
strategy.computeScaleAndSpace(layout);
|
strategy.computeScaleAndSpace(layout);
|
||||||
@ -1490,18 +1557,7 @@ const Workspace = new Lang.Class({
|
|||||||
return lastLayout;
|
return lastLayout;
|
||||||
},
|
},
|
||||||
|
|
||||||
_rectEqual: function(one, two) {
|
_getSpacingAndPadding: function() {
|
||||||
if (one == two)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return (one.x == two.x &&
|
|
||||||
one.y == two.y &&
|
|
||||||
one.width == two.width &&
|
|
||||||
one.height == two.height);
|
|
||||||
},
|
|
||||||
|
|
||||||
_computeAllWindowSlots: function(windows) {
|
|
||||||
let totalWindows = windows.length;
|
|
||||||
let node = this.actor.get_theme_node();
|
let node = this.actor.get_theme_node();
|
||||||
|
|
||||||
// Window grid spacing
|
// Window grid spacing
|
||||||
@ -1514,21 +1570,14 @@ const Workspace = new Lang.Class({
|
|||||||
right: node.get_padding(St.Side.RIGHT),
|
right: node.get_padding(St.Side.RIGHT),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!totalWindows)
|
|
||||||
return [];
|
|
||||||
|
|
||||||
let closeButtonHeight, captionHeight;
|
let closeButtonHeight, captionHeight;
|
||||||
let leftBorder, rightBorder;
|
let leftBorder, rightBorder;
|
||||||
if (this._windowOverlays.length) {
|
|
||||||
// All of the overlays have the same chrome sizes,
|
// All of the overlays have the same chrome sizes,
|
||||||
// so just pick the first one.
|
// so just pick the first one.
|
||||||
let overlay = this._windowOverlays[0];
|
let overlay = this._windowOverlays[0];
|
||||||
[closeButtonHeight, captionHeight] = overlay.chromeHeights();
|
[closeButtonHeight, captionHeight] = overlay.chromeHeights();
|
||||||
[leftBorder, rightBorder] = overlay.chromeWidths();
|
[leftBorder, rightBorder] = overlay.chromeWidths();
|
||||||
} else {
|
|
||||||
[closeButtonHeight, captionHeight] = [0, 0];
|
|
||||||
[leftBorder, rightBorder] = [0, 0];
|
|
||||||
}
|
|
||||||
|
|
||||||
rowSpacing += captionHeight;
|
rowSpacing += captionHeight;
|
||||||
columnSpacing += (rightBorder + leftBorder) / 2;
|
columnSpacing += (rightBorder + leftBorder) / 2;
|
||||||
@ -1537,25 +1586,13 @@ const Workspace = new Lang.Class({
|
|||||||
padding.left += leftBorder;
|
padding.left += leftBorder;
|
||||||
padding.right += rightBorder;
|
padding.right += rightBorder;
|
||||||
|
|
||||||
let area = {
|
return [rowSpacing, columnSpacing, padding];
|
||||||
x: this._x + padding.left,
|
},
|
||||||
y: this._y + padding.top,
|
|
||||||
width: this._width - padding.left - padding.right,
|
|
||||||
height: this._height - padding.top - padding.bottom,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!this._currentLayout)
|
_computeLayout: function(windows) {
|
||||||
this._currentLayout = this._computeLayout(windows, area, rowSpacing, columnSpacing);
|
let [rowSpacing, columnSpacing, padding] = this._getSpacingAndPadding();
|
||||||
|
let area = padArea(this._fullGeometry, padding);
|
||||||
let layout = this._currentLayout;
|
return this._getBestLayout(windows, area, rowSpacing, columnSpacing);
|
||||||
let strategy = layout.strategy;
|
|
||||||
|
|
||||||
if (!this._rectEqual(area, layout.area)) {
|
|
||||||
layout.area = area;
|
|
||||||
strategy.computeScaleAndSpace(layout);
|
|
||||||
}
|
|
||||||
|
|
||||||
return strategy.computeWindowSlots(layout, area);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCloneSelected : function (clone, time) {
|
_onCloneSelected : function (clone, time) {
|
||||||
|
@ -62,12 +62,35 @@ const WindowClone = new Lang.Class({
|
|||||||
this.inDrag = false;
|
this.inDrag = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Find the actor just below us, respecting reparenting done
|
||||||
|
// by DND code
|
||||||
|
getActualStackAbove: function() {
|
||||||
|
if (this._stackAbove == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (this.inDrag) {
|
||||||
|
if (this._stackAbove._delegate)
|
||||||
|
return this._stackAbove._delegate.getActualStackAbove();
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return this._stackAbove;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
setStackAbove: function (actor) {
|
setStackAbove: function (actor) {
|
||||||
this._stackAbove = actor;
|
this._stackAbove = actor;
|
||||||
if (this._stackAbove == null)
|
|
||||||
|
// Don't apply the new stacking now, it will be applied
|
||||||
|
// when dragging ends and window are stacked again
|
||||||
|
if (actor.inDrag)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let actualAbove = this.getActualStackAbove();
|
||||||
|
if (actualAbove == null)
|
||||||
this.actor.lower_bottom();
|
this.actor.lower_bottom();
|
||||||
else
|
else
|
||||||
this.actor.raise(this._stackAbove);
|
this.actor.raise(actualAbove);
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function () {
|
destroy: function () {
|
||||||
@ -361,9 +384,8 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
destroy : function() {
|
destroy : function() {
|
||||||
|
if (this.actor)
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
this._bgManager.destroy();
|
|
||||||
this._bgManager = null;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
workspaceRemoved : function() {
|
workspaceRemoved : function() {
|
||||||
@ -384,6 +406,11 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
_onDestroy: function(actor) {
|
_onDestroy: function(actor) {
|
||||||
this.workspaceRemoved();
|
this.workspaceRemoved();
|
||||||
|
|
||||||
|
if (this._bgManager) {
|
||||||
|
this._bgManager.destroy();
|
||||||
|
this._bgManager = null;
|
||||||
|
}
|
||||||
|
|
||||||
this._windows = [];
|
this._windows = [];
|
||||||
this.actor = null;
|
this.actor = null;
|
||||||
},
|
},
|
||||||
@ -535,6 +562,7 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
this._dropPlaceholderPos = -1;
|
this._dropPlaceholderPos = -1;
|
||||||
this._dropPlaceholder = new St.Bin({ style_class: 'placeholder' });
|
this._dropPlaceholder = new St.Bin({ style_class: 'placeholder' });
|
||||||
this.actor.add_actor(this._dropPlaceholder);
|
this.actor.add_actor(this._dropPlaceholder);
|
||||||
|
this._spliceIndex = -1;
|
||||||
|
|
||||||
this._targetScale = 0;
|
this._targetScale = 0;
|
||||||
this._scale = 0;
|
this._scale = 0;
|
||||||
@ -717,6 +745,8 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
return win.get_workspace() >= newWorkspaceIndex;
|
return win.get_workspace() >= newWorkspaceIndex;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this._spliceIndex = newWorkspaceIndex;
|
||||||
|
|
||||||
// ... move them down one.
|
// ... move them down one.
|
||||||
windows.forEach(function(win) {
|
windows.forEach(function(win) {
|
||||||
win.meta_window.change_workspace_by_index(win.get_workspace() + 1,
|
win.meta_window.change_workspace_by_index(win.get_workspace() + 1,
|
||||||
@ -738,6 +768,14 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
WORKSPACE_KEEP_ALIVE_TIME);
|
WORKSPACE_KEEP_ALIVE_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start the animation on the workspace (which is actually
|
||||||
|
// an old one which just became empty)
|
||||||
|
let thumbnail = this._thumbnails[newWorkspaceIndex];
|
||||||
|
this._setThumbnailState(thumbnail, ThumbnailState.NEW);
|
||||||
|
thumbnail.slidePosition = 1;
|
||||||
|
|
||||||
|
this._queueUpdateStates();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -825,7 +863,8 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
this._thumbnails.push(thumbnail);
|
this._thumbnails.push(thumbnail);
|
||||||
this.actor.add_actor(thumbnail.actor);
|
this.actor.add_actor(thumbnail.actor);
|
||||||
|
|
||||||
if (start > 0) { // not the initial fill
|
if (start > 0 && this._spliceIndex == -1) {
|
||||||
|
// not the initial fill, and not splicing via DND
|
||||||
thumbnail.state = ThumbnailState.NEW;
|
thumbnail.state = ThumbnailState.NEW;
|
||||||
thumbnail.slidePosition = 1; // start slid out
|
thumbnail.slidePosition = 1; // start slid out
|
||||||
this._haveNewThumbnails = true;
|
this._haveNewThumbnails = true;
|
||||||
@ -840,6 +879,9 @@ const ThumbnailsBox = new Lang.Class({
|
|||||||
|
|
||||||
// The thumbnails indicator actually needs to be on top of the thumbnails
|
// The thumbnails indicator actually needs to be on top of the thumbnails
|
||||||
this._indicator.raise_top();
|
this._indicator.raise_top();
|
||||||
|
|
||||||
|
// Clear the splice index, we got the message
|
||||||
|
this._spliceIndex = -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
removeThumbnails: function(start, count) {
|
removeThumbnails: function(start, count) {
|
||||||
|
@ -23,6 +23,18 @@ const MAX_WORKSPACES = 16;
|
|||||||
|
|
||||||
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
|
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
|
||||||
|
|
||||||
|
function rectEqual(one, two) {
|
||||||
|
if (one == two)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!one || !two)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return (one.x == two.x &&
|
||||||
|
one.y == two.y &&
|
||||||
|
one.width == two.width &&
|
||||||
|
one.height == two.height);
|
||||||
|
}
|
||||||
|
|
||||||
const WorkspacesView = new Lang.Class({
|
const WorkspacesView = new Lang.Class({
|
||||||
Name: 'WorkspacesView',
|
Name: 'WorkspacesView',
|
||||||
@ -43,10 +55,9 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._updateWorkspaceActors(false);
|
this._updateWorkspaceActors(false);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._width = 0;
|
this._fullGeometry = null;
|
||||||
this._height = 0;
|
this._actualGeometry = null;
|
||||||
this._x = 0;
|
|
||||||
this._y = 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
|
||||||
@ -85,8 +96,8 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._overviewShownId =
|
this._overviewShownId =
|
||||||
Main.overview.connect('shown',
|
Main.overview.connect('shown',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this.actor.set_clip(this._x, this._y,
|
this.actor.set_clip(this._fullGeometry.x, this._fullGeometry.y,
|
||||||
this._width, this._height);
|
this._fullGeometry.width, this._fullGeometry.height);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
|
this.scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
|
||||||
@ -124,11 +135,9 @@ const WorkspacesView = new Lang.Class({
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
let ws = new Workspace.Workspace(null, i);
|
let ws = new Workspace.Workspace(null, i);
|
||||||
ws.setGeometry(monitors[i].x,
|
ws.setFullGeometry(monitors[i]);
|
||||||
monitors[i].y,
|
ws.setActualGeometry(monitors[i]);
|
||||||
monitors[i].width,
|
Main.layoutManager.overviewGroup.add_actor(ws.actor);
|
||||||
monitors[i].height);
|
|
||||||
global.overlay_group.add_actor(ws.actor);
|
|
||||||
this._extraWorkspaces.push(ws);
|
this._extraWorkspaces.push(ws);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -139,18 +148,24 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._extraWorkspaces = [];
|
this._extraWorkspaces = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
setGeometry: function(x, y, width, height) {
|
setFullGeometry: function(geom) {
|
||||||
if (this._x == x && this._y == y &&
|
if (rectEqual(this._fullGeometry, geom))
|
||||||
this._width == width && this._height == height)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._width = width;
|
this._fullGeometry = geom;
|
||||||
this._height = height;
|
|
||||||
this._x = x;
|
|
||||||
this._y = y;
|
|
||||||
|
|
||||||
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].setFullGeometry(geom);
|
||||||
|
},
|
||||||
|
|
||||||
|
setActualGeometry: function(geom) {
|
||||||
|
if (rectEqual(this._actualGeometry, geom))
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._actualGeometry = geom;
|
||||||
|
|
||||||
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
|
this._workspaces[i].setActualGeometry(geom);
|
||||||
},
|
},
|
||||||
|
|
||||||
_lookupWorkspaceForMetaWindow: function (metaWindow) {
|
_lookupWorkspaceForMetaWindow: function (metaWindow) {
|
||||||
@ -210,7 +225,7 @@ const WorkspacesView = new Lang.Class({
|
|||||||
|
|
||||||
Tweener.removeTweens(workspace.actor);
|
Tweener.removeTweens(workspace.actor);
|
||||||
|
|
||||||
let y = (w - active) * (this._height + this._spacing);
|
let y = (w - active) * (this._fullGeometry.height + this._spacing);
|
||||||
|
|
||||||
if (showAnimation) {
|
if (showAnimation) {
|
||||||
let params = { y: y,
|
let params = { y: y,
|
||||||
@ -281,8 +296,9 @@ const WorkspacesView = new Lang.Class({
|
|||||||
|
|
||||||
if (newNumWorkspaces > oldNumWorkspaces) {
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
||||||
this._workspaces[w].setGeometry(this._x, this._y,
|
this._workspaces[w].setFullGeometry(this._fullGeometry);
|
||||||
this._width, this._height);
|
if (this._actualGeometry)
|
||||||
|
this._workspaces[w].setActualGeometry(this._actualGeometry);
|
||||||
this.actor.add_actor(this._workspaces[w].actor);
|
this.actor.add_actor(this._workspaces[w].actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -386,6 +402,15 @@ const WorkspacesView = new Lang.Class({
|
|||||||
let current = Math.round(adj.value);
|
let current = Math.round(adj.value);
|
||||||
|
|
||||||
if (active != current) {
|
if (active != current) {
|
||||||
|
if (!this._workspaces[current]) {
|
||||||
|
// The current workspace was destroyed. This could happen
|
||||||
|
// when you are on the last empty workspace, and consolidate
|
||||||
|
// windows using the thumbnail bar.
|
||||||
|
// In that case, the intended behavior is to stay on the empty
|
||||||
|
// workspace, which is the last one, so pick it.
|
||||||
|
current = this._workspaces.length - 1;
|
||||||
|
}
|
||||||
|
|
||||||
let metaWorkspace = this._workspaces[current].metaWorkspace;
|
let metaWorkspace = this._workspaces[current].metaWorkspace;
|
||||||
metaWorkspace.activate(global.get_current_time());
|
metaWorkspace.activate(global.get_current_time());
|
||||||
}
|
}
|
||||||
@ -421,7 +446,7 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.actor = new St.Widget({ clip_to_allocation: true });
|
this.actor = new St.Widget({ clip_to_allocation: true });
|
||||||
this.actor.connect('notify::allocation', Lang.bind(this, this._updateWorkspacesGeometry));
|
this.actor.connect('notify::allocation', Lang.bind(this, this._updateWorkspacesActualGeometry));
|
||||||
this.actor.connect('parent-set', Lang.bind(this, this._parentSet));
|
this.actor.connect('parent-set', Lang.bind(this, this._parentSet));
|
||||||
|
|
||||||
let clickAction = new Clutter.ClickAction()
|
let clickAction = new Clutter.ClickAction()
|
||||||
@ -475,6 +500,8 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
this._notifyOpacityId = 0;
|
this._notifyOpacityId = 0;
|
||||||
this._scrollEventId = 0;
|
this._scrollEventId = 0;
|
||||||
|
|
||||||
|
this._fullGeometry = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onPan: function(action) {
|
_onPan: function(action) {
|
||||||
@ -563,10 +590,11 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
this._workspacesViews.push(view);
|
this._workspacesViews.push(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._updateWorkspacesGeometry();
|
this._updateWorkspacesFullGeometry();
|
||||||
|
this._updateWorkspacesActualGeometry();
|
||||||
|
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++)
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
global.overlay_group.add_actor(this._workspacesViews[i].actor);
|
Main.layoutManager.overviewGroup.add_actor(this._workspacesViews[i].actor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_scrollValueChanged: function() {
|
_scrollValueChanged: function() {
|
||||||
@ -610,7 +638,7 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
// This is kinda hackish - we want the primary view to
|
// This is kinda hackish - we want the primary view to
|
||||||
// appear as parent of this.actor, though in reality it
|
// appear as parent of this.actor, though in reality it
|
||||||
// is added directly to overlay_group
|
// is added directly to Main.layoutManager.overviewGroup
|
||||||
this._notifyOpacityId = newParent.connect('notify::opacity',
|
this._notifyOpacityId = newParent.connect('notify::opacity',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
let opacity = this.actor.get_parent().opacity;
|
let opacity = this.actor.get_parent().opacity;
|
||||||
@ -623,31 +651,48 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateWorkspacesGeometry: function() {
|
// This geometry should always be the fullest geometry
|
||||||
|
// the workspaces switcher can ever be allocated, as if
|
||||||
|
// the sliding controls were never slid in at all.
|
||||||
|
setWorkspacesFullGeometry: function(geom) {
|
||||||
|
this._fullGeometry = geom;
|
||||||
|
this._updateWorkspacesFullGeometry();
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateWorkspacesFullGeometry: function() {
|
||||||
if (!this._workspacesViews.length)
|
if (!this._workspacesViews.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let fullWidth = this.actor.allocation.x2 - this.actor.allocation.x1;
|
|
||||||
let fullHeight = this.actor.allocation.y2 - this.actor.allocation.y1;
|
|
||||||
|
|
||||||
let width = fullWidth;
|
|
||||||
let height = fullHeight;
|
|
||||||
|
|
||||||
let [x, y] = this.actor.get_transformed_position();
|
|
||||||
|
|
||||||
let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);
|
|
||||||
|
|
||||||
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].setGeometry(x, y, width, height);
|
this._workspacesViews[m].setFullGeometry(this._fullGeometry);
|
||||||
m++;
|
m++;
|
||||||
} else if (!this._workspacesOnlyOnPrimary) {
|
} else if (!this._workspacesOnlyOnPrimary) {
|
||||||
this._workspacesViews[m].setGeometry(monitors[i].x,
|
this._workspacesViews[m].setFullGeometry(monitors[i]);
|
||||||
monitors[i].y,
|
m++;
|
||||||
monitors[i].width,
|
}
|
||||||
monitors[i].height);
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateWorkspacesActualGeometry: function() {
|
||||||
|
if (!this._workspacesViews.length)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let [x, y] = this.actor.get_transformed_position();
|
||||||
|
let width = this.actor.allocation.x2 - this.actor.allocation.x1;
|
||||||
|
let height = this.actor.allocation.y2 - this.actor.allocation.y1;
|
||||||
|
let geometry = { x: x, y: y, width: width, height: height };
|
||||||
|
|
||||||
|
let monitors = Main.layoutManager.monitors;
|
||||||
|
let m = 0;
|
||||||
|
for (let i = 0; i < monitors.length; i++) {
|
||||||
|
if (i == this._primaryIndex) {
|
||||||
|
this._workspacesViews[m].setActualGeometry(geometry);
|
||||||
|
m++;
|
||||||
|
} else if (!this._workspacesOnlyOnPrimary) {
|
||||||
|
this._workspacesViews[m].setActualGeometry(monitors[i]);
|
||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -715,15 +760,20 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
_onScrollEvent: function(actor, event) {
|
_onScrollEvent: function(actor, event) {
|
||||||
if (!this.actor.mapped)
|
if (!this.actor.mapped)
|
||||||
return false;
|
return false;
|
||||||
|
let activeWs = global.screen.get_active_workspace();
|
||||||
|
let ws;
|
||||||
switch (event.get_scroll_direction()) {
|
switch (event.get_scroll_direction()) {
|
||||||
case Clutter.ScrollDirection.UP:
|
case Clutter.ScrollDirection.UP:
|
||||||
Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP);
|
ws = activeWs.get_neighbor(Meta.MotionDirection.UP);
|
||||||
return true;
|
break;
|
||||||
case Clutter.ScrollDirection.DOWN:
|
case Clutter.ScrollDirection.DOWN:
|
||||||
Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
|
ws = activeWs.get_neighbor(Meta.MotionDirection.DOWN);
|
||||||
return true;
|
break;
|
||||||
}
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Main.wm.actionMoveWorkspace(ws);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(WorkspacesDisplay.prototype);
|
Signals.addSignalMethods(WorkspacesDisplay.prototype);
|
||||||
|
@ -16,7 +16,7 @@ const XdndHandler = new Lang.Class({
|
|||||||
this._cursorWindowClone = null;
|
this._cursorWindowClone = null;
|
||||||
|
|
||||||
// Used as a drag actor in case we don't have a cursor window clone
|
// Used as a drag actor in case we don't have a cursor window clone
|
||||||
this._dummy = new Clutter.Rectangle({ width: 1, height: 1, opacity: 0 });
|
this._dummy = new Clutter.Actor({ width: 1, height: 1, opacity: 0 });
|
||||||
Main.uiGroup.add_actor(this._dummy);
|
Main.uiGroup.add_actor(this._dummy);
|
||||||
Shell.util_set_hidden_from_pick(this._dummy, true);
|
Shell.util_set_hidden_from_pick(this._dummy, true);
|
||||||
this._dummy.hide();
|
this._dummy.hide();
|
||||||
|
@ -125,6 +125,12 @@
|
|||||||
<listitem><para>List possible modes and exit</para></listitem>
|
<listitem><para>List possible modes and exit</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--clutter-display=<replaceable>DISPLAY</replaceable></option></term>
|
||||||
|
|
||||||
|
<listitem><para>Clutter the option display (otherwise ignored)</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -28,6 +28,7 @@ gu
|
|||||||
he
|
he
|
||||||
hi
|
hi
|
||||||
hu
|
hu
|
||||||
|
ia
|
||||||
id
|
id
|
||||||
it
|
it
|
||||||
ja
|
ja
|
||||||
@ -60,6 +61,7 @@ sr@latin
|
|||||||
sv
|
sv
|
||||||
ta
|
ta
|
||||||
te
|
te
|
||||||
|
tg
|
||||||
th
|
th
|
||||||
tr
|
tr
|
||||||
ug
|
ug
|
||||||
|
@ -55,6 +55,7 @@ js/ui/viewSelector.js
|
|||||||
js/ui/wanda.js
|
js/ui/wanda.js
|
||||||
js/ui/windowAttentionHandler.js
|
js/ui/windowAttentionHandler.js
|
||||||
src/calendar-server/evolution-calendar.desktop.in.in
|
src/calendar-server/evolution-calendar.desktop.in.in
|
||||||
|
# Please do not remove this file from POTFILES.in. Run "git submodule init && git submodule update" to get it.
|
||||||
src/gvc/gvc-mixer-control.c
|
src/gvc/gvc-mixer-control.c
|
||||||
src/main.c
|
src/main.c
|
||||||
src/shell-app.c
|
src/shell-app.c
|
||||||
|
File diff suppressed because it is too large
Load Diff
239
po/el.po
239
po/el.po
@ -5,8 +5,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: 2013-03-02 23:02+0000\n"
|
"POT-Creation-Date: 2013-04-19 02:48+0000\n"
|
||||||
"PO-Revision-Date: 2013-03-03 13:22+0300\n"
|
"PO-Revision-Date: 2013-04-25 08:11+0300\n"
|
||||||
"Last-Translator: Dimitris Spingos (Δημήτρης Σπίγγος) <dmtrs32@gmail.com>\n"
|
"Last-Translator: Dimitris Spingos (Δημήτρης Σπίγγος) <dmtrs32@gmail.com>\n"
|
||||||
"Language-Team: team@gnome.gr\n"
|
"Language-Team: team@gnome.gr\n"
|
||||||
"Language: el\n"
|
"Language: el\n"
|
||||||
@ -40,10 +40,14 @@ msgid "Focus the active notification"
|
|||||||
msgstr "Εστίαση στην ενεργή ειδοποίηση"
|
msgstr "Εστίαση στην ενεργή ειδοποίηση"
|
||||||
|
|
||||||
#: ../data/50-gnome-shell-system.xml.in.h:4
|
#: ../data/50-gnome-shell-system.xml.in.h:4
|
||||||
|
msgid "Show the overview"
|
||||||
|
msgstr "Εμφάνιση της επισκόπησης"
|
||||||
|
|
||||||
|
#: ../data/50-gnome-shell-system.xml.in.h:5
|
||||||
msgid "Show all applications"
|
msgid "Show all applications"
|
||||||
msgstr "Προβολή όλων των εφαρμογών"
|
msgstr "Προβολή όλων των εφαρμογών"
|
||||||
|
|
||||||
#: ../data/50-gnome-shell-system.xml.in.h:5
|
#: ../data/50-gnome-shell-system.xml.in.h:6
|
||||||
msgid "Open the application menu"
|
msgid "Open the application menu"
|
||||||
msgstr "Άνοιγμα του μενού εφαρμογών"
|
msgstr "Άνοιγμα του μενού εφαρμογών"
|
||||||
|
|
||||||
@ -223,45 +227,55 @@ msgstr ""
|
|||||||
"επισκόπησης ενεργειών."
|
"επισκόπησης ενεργειών."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
|
||||||
|
#| msgid "Keybinding to open the \"Show Applications\" view"
|
||||||
|
msgid "Keybinding to open the overview"
|
||||||
|
msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της επισκόπησης"
|
||||||
|
|
||||||
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:26
|
||||||
|
#| msgid "Keybinding to open the \"Show Applications\" view"
|
||||||
|
msgid "Keybinding to open the Activities Overview."
|
||||||
|
msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της προβολής ενέργειες."
|
||||||
|
|
||||||
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:27
|
||||||
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:26
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
||||||
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:27
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
||||||
msgid "Keybinding to focus the active notification"
|
msgid "Keybinding to focus the active notification"
|
||||||
msgstr "Ο συνδυασμός πλήκτρων για εστίαση της ενεργής ειδοποίησης"
|
msgstr "Ο συνδυασμός πλήκτρων για εστίαση της ενεργής ειδοποίησης"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:28
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:30
|
||||||
msgid "Keybinding to focus the active notification."
|
msgid "Keybinding to focus the active notification."
|
||||||
msgstr "Ο συνδυασμός πλήκτρων για εστίαση της ενεργής ειδοποίησης."
|
msgstr "Ο συνδυασμός πλήκτρων για εστίαση της ενεργής ειδοποίησης."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:31
|
||||||
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:30
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:32
|
||||||
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:31
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:33
|
||||||
msgid "Which keyboard to use"
|
msgid "Which keyboard to use"
|
||||||
msgstr "Ποιο πληκτρολόγιο θα χρησιμοποιηθεί"
|
msgstr "Ποιο πληκτρολόγιο θα χρησιμοποιηθεί"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:32
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:34
|
||||||
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:33
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:35
|
||||||
msgid "Framerate used for recording screencasts."
|
msgid "Framerate used for recording screencasts."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ο ρυθμός καρέ που θα χρησιμοποιηθεί για την καταγραφή του βίντεο οθόνης."
|
"Ο ρυθμός καρέ που θα χρησιμοποιηθεί για την καταγραφή του βίντεο οθόνης."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:34
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:36
|
||||||
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."
|
||||||
@ -269,13 +283,13 @@ msgstr ""
|
|||||||
"Ο ρυθμός καρέ του στιγμιότυπου που παράγεται από τον εγγραφέα βίντεο οθόνης "
|
"Ο ρυθμός καρέ του στιγμιότυπου που παράγεται από τον εγγραφέα βίντεο οθόνης "
|
||||||
"του GNOME Shell σε καρέ ανά δευτερόλεπτο."
|
"του GNOME Shell σε καρέ ανά δευτερόλεπτο."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:35
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:37
|
||||||
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:37
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:39
|
||||||
#, 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 "
|
||||||
@ -303,12 +317,12 @@ msgstr ""
|
|||||||
"χρησιμοποιείται ως παράδειγμα για το πιθανό βέλτιστο αριθμό πυρήνων του "
|
"χρησιμοποιείται ως παράδειγμα για το πιθανό βέλτιστο αριθμό πυρήνων του "
|
||||||
"συστήματος."
|
"συστήματος."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:38
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:40
|
||||||
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:39
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:41
|
||||||
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 "
|
||||||
@ -318,11 +332,11 @@ msgstr ""
|
|||||||
"βασισμένο στην τρέχουσα ημερομηνία και θα χρησιμοποιεί αυτή την επέκταση. Θα "
|
"βασισμένο στην τρέχουσα ημερομηνία και θα χρησιμοποιεί αυτή την επέκταση. Θα "
|
||||||
"πρέπει να αλλάζει όταν γίνεται εγγραφή σε διαφορετικό πρότυπο περιέκτη."
|
"πρέπει να αλλάζει όταν γίνεται εγγραφή σε διαφορετικό πρότυπο περιέκτη."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:40
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:42
|
||||||
msgid "The application icon mode."
|
msgid "The application icon mode."
|
||||||
msgstr "Η κατάσταση εικονιδίου εφαρμογής."
|
msgstr "Η κατάσταση εικονιδίου εφαρμογής."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:41
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:43
|
||||||
msgid ""
|
msgid ""
|
||||||
"Configures how the windows are shown in the switcher. Valid possibilities "
|
"Configures how the windows are shown in the switcher. Valid possibilities "
|
||||||
"are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-"
|
"are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-"
|
||||||
@ -333,22 +347,22 @@ msgstr ""
|
|||||||
"παραθύρου), 'app-icon-only' (εμφανίζει μόνο το εικονίδιο της εφαρμογής) ή "
|
"παραθύρου), 'app-icon-only' (εμφανίζει μόνο το εικονίδιο της εφαρμογής) ή "
|
||||||
"'both' - και τα δύο."
|
"'both' - και τα δύο."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:42
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:44
|
||||||
msgid "Attach modal dialog to the parent window"
|
msgid "Attach modal dialog to the parent window"
|
||||||
msgstr "Προσάρτηση αναγκαστικού διαλόγου στο γονικό παράθυρο"
|
msgstr "Προσάρτηση αναγκαστικού διαλόγου στο γονικό παράθυρο"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:43
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:45
|
||||||
msgid ""
|
msgid ""
|
||||||
"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."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Αυτό το κλειδί υπερισχύει του κλειδιού στο org.gnome.mutter όταν εκτελείται "
|
"Αυτό το κλειδί υπερισχύει του κλειδιού στο org.gnome.mutter όταν εκτελείται "
|
||||||
"το κέλυφος GNOME."
|
"το κέλυφος GNOME."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:44
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:46
|
||||||
msgid "Arrangement of buttons on the titlebar"
|
msgid "Arrangement of buttons on the titlebar"
|
||||||
msgstr "Διάταξη των κουμπιών στη γραμμή τίτλου"
|
msgstr "Διάταξη των κουμπιών στη γραμμή τίτλου"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:45
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:47
|
||||||
msgid ""
|
msgid ""
|
||||||
"This key overrides the key in org.gnome.desktop.wm.preferences when running "
|
"This key overrides the key in org.gnome.desktop.wm.preferences when running "
|
||||||
"GNOME Shell."
|
"GNOME Shell."
|
||||||
@ -356,17 +370,17 @@ msgstr ""
|
|||||||
"Αυτό το κλειδί υπερισχύει του κλειδιού στο org.gnome.desktop.wm.preferences "
|
"Αυτό το κλειδί υπερισχύει του κλειδιού στο org.gnome.desktop.wm.preferences "
|
||||||
"όταν εκτελείται το κέλυφος GNOME."
|
"όταν εκτελείται το κέλυφος GNOME."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:46
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:48
|
||||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ενεργοποίηση της παράθεσης άκρων όταν αποθέτετε παράθυρα στις άκρες της "
|
"Ενεργοποίηση της παράθεσης άκρων όταν αποθέτετε παράθυρα στις άκρες της "
|
||||||
"οθόνης"
|
"οθόνης"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:47
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:49
|
||||||
msgid "Workspaces are managed dynamically"
|
msgid "Workspaces are managed dynamically"
|
||||||
msgstr "Οι χώροι εργασίας διαχειρίζονται δυναμικά"
|
msgstr "Οι χώροι εργασίας διαχειρίζονται δυναμικά"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:48
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:50
|
||||||
msgid "Workspaces only on primary monitor"
|
msgid "Workspaces only on primary monitor"
|
||||||
msgstr "Χώροι εργασίας μόνο στην κύρια οθόνη"
|
msgstr "Χώροι εργασίας μόνο στην κύρια οθόνη"
|
||||||
|
|
||||||
@ -388,43 +402,42 @@ msgstr ""
|
|||||||
"πολλαπλών επιλογών."
|
"πολλαπλών επιλογών."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:405
|
#: ../js/gdm/loginDialog.js:405
|
||||||
#| msgid "Session..."
|
|
||||||
msgid "Session…"
|
msgid "Session…"
|
||||||
msgstr "Συνεδρία…"
|
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:629
|
#: ../js/gdm/loginDialog.js:630
|
||||||
msgid "Not listed?"
|
msgid "Not listed?"
|
||||||
msgstr "Δεν είστε στη λίστα;"
|
msgstr "Δεν είστε στη λίστα;"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:783 ../js/ui/components/networkAgent.js:137
|
#: ../js/gdm/loginDialog.js:787 ../js/ui/components/networkAgent.js:137
|
||||||
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:375
|
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:376
|
||||||
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
|
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
|
||||||
#: ../js/ui/status/bluetooth.js:415 ../js/ui/unlockDialog.js:126
|
#: ../js/ui/status/bluetooth.js:415 ../js/ui/unlockDialog.js:100
|
||||||
#: ../js/ui/userMenu.js:932
|
#: ../js/ui/userMenu.js:938
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Ακύρωση"
|
msgstr "Ακύρωση"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:799
|
#: ../js/gdm/loginDialog.js:803
|
||||||
msgctxt "button"
|
msgctxt "button"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Σύνδεση"
|
msgstr "Σύνδεση"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:799
|
#: ../js/gdm/loginDialog.js:803
|
||||||
msgid "Next"
|
msgid "Next"
|
||||||
msgstr "Επόμενο"
|
msgstr "Επόμενο"
|
||||||
|
|
||||||
#. TTLS and PEAP are actually much more complicated, but this complication
|
#. TTLS and PEAP are actually much more complicated, but this complication
|
||||||
#. is not visible here since we only care about phase2 authentication
|
#. is not visible here since we only care about phase2 authentication
|
||||||
#. (and don't even care of which one)
|
#. (and don't even care of which one)
|
||||||
#: ../js/gdm/loginDialog.js:904 ../js/ui/components/networkAgent.js:260
|
#: ../js/gdm/loginDialog.js:918 ../js/ui/components/networkAgent.js:260
|
||||||
#: ../js/ui/components/networkAgent.js:278
|
#: ../js/ui/components/networkAgent.js:278
|
||||||
msgid "Username: "
|
msgid "Username: "
|
||||||
msgstr "Όνομα χρήστη: "
|
msgstr "Όνομα χρήστη: "
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:1157
|
#: ../js/gdm/loginDialog.js:1174
|
||||||
msgid "Login Window"
|
msgid "Login Window"
|
||||||
msgstr "Παράθυρο σύνδεσης"
|
msgstr "Παράθυρο σύνδεσης"
|
||||||
|
|
||||||
@ -433,8 +446,8 @@ msgstr "Παράθυρο σύνδεσης"
|
|||||||
msgid "Power"
|
msgid "Power"
|
||||||
msgstr "Ενέργεια"
|
msgstr "Ενέργεια"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:93 ../js/ui/userMenu.js:694 ../js/ui/userMenu.js:698
|
#: ../js/gdm/powerMenu.js:93 ../js/ui/userMenu.js:696 ../js/ui/userMenu.js:700
|
||||||
#: ../js/ui/userMenu.js:814
|
#: ../js/ui/userMenu.js:816
|
||||||
msgid "Suspend"
|
msgid "Suspend"
|
||||||
msgstr "Αναστολή"
|
msgstr "Αναστολή"
|
||||||
|
|
||||||
@ -442,58 +455,58 @@ msgstr "Αναστολή"
|
|||||||
msgid "Restart"
|
msgid "Restart"
|
||||||
msgstr "Επανεκκίνηση"
|
msgstr "Επανεκκίνηση"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:103 ../js/ui/userMenu.js:696
|
#: ../js/gdm/powerMenu.js:103 ../js/ui/userMenu.js:698
|
||||||
#: ../js/ui/userMenu.js:698 ../js/ui/userMenu.js:813 ../js/ui/userMenu.js:936
|
#: ../js/ui/userMenu.js:700 ../js/ui/userMenu.js:815 ../js/ui/userMenu.js:942
|
||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Απενεργοποίηση"
|
msgstr "Απενεργοποίηση"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:182
|
#: ../js/gdm/util.js:249
|
||||||
msgid "Authentication error"
|
msgid "Authentication error"
|
||||||
msgstr "Σφάλμα πιστοποίησης"
|
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:299
|
#: ../js/gdm/util.js:366
|
||||||
msgid "(or swipe finger)"
|
msgid "(or swipe finger)"
|
||||||
msgstr "(ή περάστε το δάκτυλο σας)"
|
msgstr "(ή περάστε το δάκτυλο σας)"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:324
|
#: ../js/gdm/util.js:391
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(π.χ χρήστης ή %s)"
|
msgstr "(π.χ χρήστης ή %s)"
|
||||||
|
|
||||||
#: ../js/misc/util.js:94
|
#: ../js/misc/util.js:97
|
||||||
msgid "Command not found"
|
msgid "Command not found"
|
||||||
msgstr "Δε βρέθηκε η εντολή"
|
msgstr "Δε βρέθηκε η εντολή"
|
||||||
|
|
||||||
#. Replace "Error invoking GLib.shell_parse_argv: " with
|
#. Replace "Error invoking GLib.shell_parse_argv: " with
|
||||||
#. something nicer
|
#. something nicer
|
||||||
#: ../js/misc/util.js:127
|
#: ../js/misc/util.js:130
|
||||||
msgid "Could not parse command:"
|
msgid "Could not parse command:"
|
||||||
msgstr "Δεν ήταν δυνατό να επεξεργαστεί η εντολή:"
|
msgstr "Δεν ήταν δυνατό να επεξεργαστεί η εντολή:"
|
||||||
|
|
||||||
#: ../js/misc/util.js:135
|
#: ../js/misc/util.js:138
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Execution of '%s' failed:"
|
msgid "Execution of '%s' failed:"
|
||||||
msgstr "Η εκτέλεση του '%s' απέτυχε:"
|
msgstr "Η εκτέλεση του '%s' απέτυχε:"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:348
|
#: ../js/ui/appDisplay.js:349
|
||||||
msgid "Frequent"
|
msgid "Frequent"
|
||||||
msgstr "Συχνό"
|
msgstr "Συχνό"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:355
|
#: ../js/ui/appDisplay.js:356
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "Όλα"
|
msgstr "Όλα"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:913
|
#: ../js/ui/appDisplay.js:914
|
||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "Νέο παράθυρο"
|
msgstr "Νέο παράθυρο"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:916 ../js/ui/dash.js:284
|
#: ../js/ui/appDisplay.js:917 ../js/ui/dash.js:284
|
||||||
msgid "Remove from Favorites"
|
msgid "Remove from Favorites"
|
||||||
msgstr "Αφαίρεση από τα αγαπημένα"
|
msgstr "Αφαίρεση από τα αγαπημένα"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:917
|
#: ../js/ui/appDisplay.js:918
|
||||||
msgid "Add to Favorites"
|
msgid "Add to Favorites"
|
||||||
msgstr "Προσθήκη στα αγαπημένα"
|
msgstr "Προσθήκη στα αγαπημένα"
|
||||||
|
|
||||||
@ -507,7 +520,7 @@ msgstr "Tο %s προστέθηκε στα αγαπημένα σας."
|
|||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "Tο %s αφαιρέθηκε από τα αγαπημένα σας."
|
msgstr "Tο %s αφαιρέθηκε από τα αγαπημένα σας."
|
||||||
|
|
||||||
#: ../js/ui/backgroundMenu.js:19 ../js/ui/userMenu.js:787
|
#: ../js/ui/backgroundMenu.js:19 ../js/ui/userMenu.js:789
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr "Ρυθμίσεις"
|
msgstr "Ρυθμίσεις"
|
||||||
|
|
||||||
@ -530,7 +543,7 @@ msgctxt "event list time"
|
|||||||
msgid "%H\\u2236%M"
|
msgid "%H\\u2236%M"
|
||||||
msgstr "%Ω\\u2236%Λ"
|
msgstr "%Ω\\u2236%Λ"
|
||||||
|
|
||||||
#. Transators: Shown in calendar event list, if 12h format,
|
#. Translators: Shown in calendar event list, if 12h format,
|
||||||
#. \u2236 is a ratio character, similar to : and \u2009 is
|
#. \u2236 is a ratio character, similar to : and \u2009 is
|
||||||
#. a thin space
|
#. a thin space
|
||||||
#: ../js/ui/calendar.js:77
|
#: ../js/ui/calendar.js:77
|
||||||
@ -632,35 +645,35 @@ msgid "S"
|
|||||||
msgstr "Σ"
|
msgstr "Σ"
|
||||||
|
|
||||||
#. Translators: Text to show if there are no events
|
#. Translators: Text to show if there are no events
|
||||||
#: ../js/ui/calendar.js:692
|
#: ../js/ui/calendar.js:720
|
||||||
msgid "Nothing Scheduled"
|
msgid "Nothing Scheduled"
|
||||||
msgstr "Τίποτα προγραμματισμένο"
|
msgstr "Τίποτα προγραμματισμένο"
|
||||||
|
|
||||||
#. Translators: Shown on calendar heading when selected day occurs on current year
|
#. Translators: Shown on calendar heading when selected day occurs on current year
|
||||||
#: ../js/ui/calendar.js:708
|
#: ../js/ui/calendar.js:736
|
||||||
msgctxt "calendar heading"
|
msgctxt "calendar heading"
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %B %d"
|
msgstr "%A, %B %d"
|
||||||
|
|
||||||
#. Translators: Shown on calendar heading when selected day occurs on different year
|
#. Translators: Shown on calendar heading when selected day occurs on different year
|
||||||
#: ../js/ui/calendar.js:711
|
#: ../js/ui/calendar.js:739
|
||||||
msgctxt "calendar heading"
|
msgctxt "calendar heading"
|
||||||
msgid "%A, %B %d, %Y"
|
msgid "%A, %B %d, %Y"
|
||||||
msgstr "%A, %B %d, %Y"
|
msgstr "%A, %B %d, %Y"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:721
|
#: ../js/ui/calendar.js:749
|
||||||
msgid "Today"
|
msgid "Today"
|
||||||
msgstr "Σήμερα"
|
msgstr "Σήμερα"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:725
|
#: ../js/ui/calendar.js:753
|
||||||
msgid "Tomorrow"
|
msgid "Tomorrow"
|
||||||
msgstr "Αύριο"
|
msgstr "Αύριο"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:736
|
#: ../js/ui/calendar.js:764
|
||||||
msgid "This week"
|
msgid "This week"
|
||||||
msgstr "Αυτή η εβδομάδα"
|
msgstr "Αυτή η εβδομάδα"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:744
|
#: ../js/ui/calendar.js:772
|
||||||
msgid "Next week"
|
msgid "Next week"
|
||||||
msgstr "Επόμενη εβδομάδα"
|
msgstr "Επόμενη εβδομάδα"
|
||||||
|
|
||||||
@ -676,12 +689,12 @@ msgstr "Αποσυνδέθηκε εξωτερικός δίσκος"
|
|||||||
msgid "Removable Devices"
|
msgid "Removable Devices"
|
||||||
msgstr "Αφαιρούμενες συσκευές"
|
msgstr "Αφαιρούμενες συσκευές"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:593
|
#: ../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:619
|
#: ../js/ui/components/autorunManager.js:620
|
||||||
msgid "Eject"
|
msgid "Eject"
|
||||||
msgstr "Εξαγωγή"
|
msgstr "Εξαγωγή"
|
||||||
|
|
||||||
@ -790,7 +803,7 @@ msgid "Sorry, that didn't work. Please try again."
|
|||||||
msgstr "Συγνώμη, αυτό δεν λειτούργησε. Παρακαλώ προσπαθήστε ξανά."
|
msgstr "Συγνώμη, αυτό δεν λειτούργησε. Παρακαλώ προσπαθήστε ξανά."
|
||||||
|
|
||||||
#. Translators: this is a filename used for screencast recording
|
#. Translators: this is a filename used for screencast recording
|
||||||
#: ../js/ui/components/recorder.js:48
|
#: ../js/ui/components/recorder.js:47
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Screencast from %d %t"
|
msgid "Screencast from %d %t"
|
||||||
msgstr "Βίντεο οθόνης από %d %t"
|
msgstr "Βίντεο οθόνης από %d %t"
|
||||||
@ -1037,7 +1050,7 @@ msgstr "Προβολή λογαριασμού"
|
|||||||
msgid "Unknown reason"
|
msgid "Unknown reason"
|
||||||
msgstr "Άγνωστος λόγος"
|
msgstr "Άγνωστος λόγος"
|
||||||
|
|
||||||
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:97
|
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:96
|
||||||
msgid "Windows"
|
msgid "Windows"
|
||||||
msgstr "Παράθυρα"
|
msgstr "Παράθυρα"
|
||||||
|
|
||||||
@ -1066,7 +1079,7 @@ 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:205
|
#: ../js/ui/dateMenu.js:215
|
||||||
msgid "%A %B %e, %Y"
|
msgid "%A %B %e, %Y"
|
||||||
msgstr "%A %B %e, %Y"
|
msgstr "%A %B %e, %Y"
|
||||||
|
|
||||||
@ -1235,7 +1248,6 @@ msgid "Remove"
|
|||||||
msgstr "Αφαίρεση"
|
msgstr "Αφαίρεση"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1501
|
#: ../js/ui/messageTray.js:1501
|
||||||
#| msgid "No Messages"
|
|
||||||
msgid "Clear Messages"
|
msgid "Clear Messages"
|
||||||
msgstr "Καθαρισμός μηνυμάτων"
|
msgstr "Καθαρισμός μηνυμάτων"
|
||||||
|
|
||||||
@ -1243,15 +1255,15 @@ msgstr "Καθαρισμός μηνυμάτων"
|
|||||||
msgid "Notification Settings"
|
msgid "Notification Settings"
|
||||||
msgstr "Ρυθμίσεις ειδοποιήσεων"
|
msgstr "Ρυθμίσεις ειδοποιήσεων"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1707
|
#: ../js/ui/messageTray.js:1709
|
||||||
msgid "No Messages"
|
msgid "No Messages"
|
||||||
msgstr "Κανένα μήνυμα"
|
msgstr "Κανένα μήνυμα"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1787
|
#: ../js/ui/messageTray.js:1785
|
||||||
msgid "Message Tray"
|
msgid "Message Tray"
|
||||||
msgstr "Περιοχή ειδοποιήσεων"
|
msgstr "Περιοχή ειδοποιήσεων"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2864
|
#: ../js/ui/messageTray.js:2813
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "Πληροφορίες συστήματος"
|
msgstr "Πληροφορίες συστήματος"
|
||||||
|
|
||||||
@ -1260,14 +1272,14 @@ msgctxt "program"
|
|||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Άγνωστο"
|
msgstr "Άγνωστο"
|
||||||
|
|
||||||
#: ../js/ui/overviewControls.js:460 ../js/ui/screenShield.js:153
|
#: ../js/ui/overviewControls.js:463 ../js/ui/screenShield.js:149
|
||||||
#, 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/overview.js:82
|
#: ../js/ui/overview.js:84
|
||||||
msgid "Undo"
|
msgid "Undo"
|
||||||
msgstr "Αναίρεση"
|
msgstr "Αναίρεση"
|
||||||
|
|
||||||
@ -1279,22 +1291,21 @@ 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:284
|
#: ../js/ui/overview.js:271
|
||||||
#| msgid "Type to search..."
|
|
||||||
msgid "Type to search…"
|
msgid "Type to search…"
|
||||||
msgstr "Πληκτρολογήστε για αναζήτηση…"
|
msgstr "Πληκτρολογήστε για αναζήτηση…"
|
||||||
|
|
||||||
#: ../js/ui/panel.js:613
|
#: ../js/ui/panel.js:633
|
||||||
msgid "Quit"
|
msgid "Quit"
|
||||||
msgstr "Έξοδος"
|
msgstr "Έξοδος"
|
||||||
|
|
||||||
#. Translators: If there is no suitable word for "Activities"
|
#. Translators: If there is no suitable word for "Activities"
|
||||||
#. in your language, you can use the word for "Overview".
|
#. in your language, you can use the word for "Overview".
|
||||||
#: ../js/ui/panel.js:642
|
#: ../js/ui/panel.js:657
|
||||||
msgid "Activities"
|
msgid "Activities"
|
||||||
msgstr "Δραστηριότητες"
|
msgstr "Δραστηριότητες"
|
||||||
|
|
||||||
#: ../js/ui/panel.js:983
|
#: ../js/ui/panel.js:954
|
||||||
msgid "Top Bar"
|
msgid "Top Bar"
|
||||||
msgstr "Πάνω μπάρα"
|
msgstr "Πάνω μπάρα"
|
||||||
|
|
||||||
@ -1307,32 +1318,32 @@ msgstr "Πάνω μπάρα"
|
|||||||
msgid "toggle-switch-us"
|
msgid "toggle-switch-us"
|
||||||
msgstr "toggle-switch-intl"
|
msgstr "toggle-switch-intl"
|
||||||
|
|
||||||
#: ../js/ui/runDialog.js:205
|
#: ../js/ui/runDialog.js:74
|
||||||
msgid "Enter a Command"
|
msgid "Enter a Command"
|
||||||
msgstr "Εισαγωγή εντολής"
|
msgstr "Εισαγωγή εντολής"
|
||||||
|
|
||||||
#: ../js/ui/runDialog.js:241
|
#: ../js/ui/runDialog.js:110
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "Κλείσιμο"
|
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:90
|
#: ../js/ui/screenShield.js:86
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %B %d"
|
msgstr "%A, %B %d"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:155
|
#: ../js/ui/screenShield.js:151
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d new notification"
|
msgid "%d new notification"
|
||||||
msgid_plural "%d new notifications"
|
msgid_plural "%d new notifications"
|
||||||
msgstr[0] "%d νέα ειδοποίηση"
|
msgstr[0] "%d νέα ειδοποίηση"
|
||||||
msgstr[1] "%d νέες ειδοποιήσεις"
|
msgstr[1] "%d νέες ειδοποιήσεις"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:442 ../js/ui/userMenu.js:805
|
#: ../js/ui/screenShield.js:438 ../js/ui/userMenu.js:807
|
||||||
msgid "Lock"
|
msgid "Lock"
|
||||||
msgstr "Κλείδωμα"
|
msgstr "Κλείδωμα"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:639
|
#: ../js/ui/screenShield.js:641
|
||||||
msgid "GNOME needs to lock the screen"
|
msgid "GNOME needs to lock the screen"
|
||||||
msgstr "Το GNOME χρειάζεται να κλειδώσει την οθόνη"
|
msgstr "Το GNOME χρειάζεται να κλειδώσει την οθόνη"
|
||||||
|
|
||||||
@ -1343,21 +1354,19 @@ msgstr "Το GNOME χρειάζεται να κλειδώσει την οθόν
|
|||||||
#.
|
#.
|
||||||
#. XXX: another option is to kick the user into the gdm login
|
#. XXX: another option is to kick the user into the gdm login
|
||||||
#. screen, where we're not affected by grabs
|
#. screen, where we're not affected by grabs
|
||||||
#: ../js/ui/screenShield.js:758 ../js/ui/screenShield.js:1169
|
#: ../js/ui/screenShield.js:762 ../js/ui/screenShield.js:1198
|
||||||
#| msgid "Unable to connect to %s"
|
|
||||||
msgid "Unable to lock"
|
msgid "Unable to lock"
|
||||||
msgstr "Αδυναμία κλειδώματος"
|
msgstr "Αδυναμία κλειδώματος"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:759 ../js/ui/screenShield.js:1170
|
#: ../js/ui/screenShield.js:763 ../js/ui/screenShield.js:1199
|
||||||
msgid "Lock was blocked by an application"
|
msgid "Lock was blocked by an application"
|
||||||
msgstr "Το κλείδωμα εμποδίστηκε από μια εφαρμογή"
|
msgstr "Το κλείδωμα εμποδίστηκε από μια εφαρμογή"
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:431
|
#: ../js/ui/searchDisplay.js:453
|
||||||
#| msgid "Searching..."
|
|
||||||
msgid "Searching…"
|
msgid "Searching…"
|
||||||
msgstr "Αναζήτηση…"
|
msgstr "Αναζήτηση…"
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:475
|
#: ../js/ui/searchDisplay.js:497
|
||||||
msgid "No results."
|
msgid "No results."
|
||||||
msgstr "Δε βρέθηκαν αποτελέσματα."
|
msgstr "Δε βρέθηκαν αποτελέσματα."
|
||||||
|
|
||||||
@ -1369,11 +1378,11 @@ msgstr "Αντιγραφή"
|
|||||||
msgid "Paste"
|
msgid "Paste"
|
||||||
msgstr "Επικόλληση"
|
msgstr "Επικόλληση"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:105
|
#: ../js/ui/shellEntry.js:101
|
||||||
msgid "Show Text"
|
msgid "Show Text"
|
||||||
msgstr "Εμφάνιση κειμένου"
|
msgstr "Εμφάνιση κειμένου"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:107
|
#: ../js/ui/shellEntry.js:103
|
||||||
msgid "Hide Text"
|
msgid "Hide Text"
|
||||||
msgstr "Απόκρυψη κειμένου"
|
msgstr "Απόκρυψη κειμένου"
|
||||||
|
|
||||||
@ -1385,7 +1394,7 @@ msgstr "Κωδικός"
|
|||||||
msgid "Remember Password"
|
msgid "Remember Password"
|
||||||
msgstr "Απομνημόνευση κωδικού"
|
msgstr "Απομνημόνευση κωδικού"
|
||||||
|
|
||||||
#: ../js/ui/shellMountOperation.js:403 ../js/ui/unlockDialog.js:140
|
#: ../js/ui/shellMountOperation.js:403 ../js/ui/unlockDialog.js:114
|
||||||
msgid "Unlock"
|
msgid "Unlock"
|
||||||
msgstr "Ξεκλείδωμα"
|
msgstr "Ξεκλείδωμα"
|
||||||
|
|
||||||
@ -1449,12 +1458,10 @@ msgid "Visibility"
|
|||||||
msgstr "Ορατότητα"
|
msgstr "Ορατότητα"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:59
|
#: ../js/ui/status/bluetooth.js:59
|
||||||
#| msgid "Send Files to Device..."
|
|
||||||
msgid "Send Files to Device…"
|
msgid "Send Files to Device…"
|
||||||
msgstr "Αποστολή αρχείων σε συσκευή…"
|
msgstr "Αποστολή αρχείων σε συσκευή…"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:60
|
#: ../js/ui/status/bluetooth.js:60
|
||||||
#| msgid "Set Up a New Device..."
|
|
||||||
msgid "Set Up a New Device…"
|
msgid "Set Up a New Device…"
|
||||||
msgstr "Ρύθμιση νέας συσκευής…"
|
msgstr "Ρύθμιση νέας συσκευής…"
|
||||||
|
|
||||||
@ -1481,7 +1488,6 @@ msgid "connecting..."
|
|||||||
msgstr "σύνδεση..."
|
msgstr "σύνδεση..."
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:239
|
#: ../js/ui/status/bluetooth.js:239
|
||||||
#| msgid "Send Files..."
|
|
||||||
msgid "Send Files…"
|
msgid "Send Files…"
|
||||||
msgstr "Αποστολή αρχείων…"
|
msgstr "Αποστολή αρχείων…"
|
||||||
|
|
||||||
@ -1694,7 +1700,6 @@ msgstr "Ρυθμίσεις τροφοδοσίας"
|
|||||||
#. 0 is reported when UPower does not have enough data
|
#. 0 is reported when UPower does not have enough data
|
||||||
#. to estimate battery life
|
#. to estimate battery life
|
||||||
#: ../js/ui/status/power.js:99
|
#: ../js/ui/status/power.js:99
|
||||||
#| msgid "Estimating..."
|
|
||||||
msgid "Estimating…"
|
msgid "Estimating…"
|
||||||
msgstr "Υπολογισμός…"
|
msgstr "Υπολογισμός…"
|
||||||
|
|
||||||
@ -1794,59 +1799,59 @@ msgstr "Ένταση ήχου"
|
|||||||
msgid "Microphone"
|
msgid "Microphone"
|
||||||
msgstr "Μικρόφωνο"
|
msgstr "Μικρόφωνο"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:151
|
#: ../js/ui/unlockDialog.js:125
|
||||||
msgid "Log in as another user"
|
msgid "Log in as another user"
|
||||||
msgstr "Είσοδος ως άλλος χρήστης"
|
msgstr "Είσοδος ως άλλος χρήστης"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:177
|
#: ../js/ui/unlockDialog.js:146
|
||||||
msgid "Unlock Window"
|
msgid "Unlock Window"
|
||||||
msgstr "Ξεκλείδωμα παραθύρου"
|
msgstr "Ξεκλείδωμα παραθύρου"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:192
|
#: ../js/ui/userMenu.js:193
|
||||||
msgid "Available"
|
msgid "Available"
|
||||||
msgstr "Διαθέσιμος-η"
|
msgstr "Διαθέσιμος-η"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:195
|
#: ../js/ui/userMenu.js:196
|
||||||
msgid "Busy"
|
msgid "Busy"
|
||||||
msgstr "Απασχολημένος-η"
|
msgstr "Απασχολημένος-η"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:198
|
#: ../js/ui/userMenu.js:199
|
||||||
msgid "Invisible"
|
msgid "Invisible"
|
||||||
msgstr "Αόρατος-η"
|
msgstr "Αόρατος-η"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:201
|
#: ../js/ui/userMenu.js:202
|
||||||
msgid "Away"
|
msgid "Away"
|
||||||
msgstr "Απουσιάζει"
|
msgstr "Απουσιάζει"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:204
|
#: ../js/ui/userMenu.js:205
|
||||||
msgid "Idle"
|
msgid "Idle"
|
||||||
msgstr "Αδρανής"
|
msgstr "Αδρανής"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:207
|
#: ../js/ui/userMenu.js:208
|
||||||
msgid "Offline"
|
msgid "Offline"
|
||||||
msgstr "Εκτός σύνδεσης"
|
msgstr "Εκτός σύνδεσης"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:779
|
#: ../js/ui/userMenu.js:781
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Ειδοποιήσεις"
|
msgstr "Ειδοποιήσεις"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:795
|
#: ../js/ui/userMenu.js:797
|
||||||
msgid "Switch User"
|
msgid "Switch User"
|
||||||
msgstr "Αλλαγή χρήστη"
|
msgstr "Αλλαγή χρήστη"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:800
|
#: ../js/ui/userMenu.js:802
|
||||||
msgid "Log Out"
|
msgid "Log Out"
|
||||||
msgstr "Αποσύνδεση"
|
msgstr "Αποσύνδεση"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:820
|
#: ../js/ui/userMenu.js:822
|
||||||
msgid "Install Updates & Restart"
|
msgid "Install Updates & Restart"
|
||||||
msgstr "Εγκατάσταση ενημερώσεων & επανεκκίνηση"
|
msgstr "Εγκατάσταση ενημερώσεων & επανεκκίνηση"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:838
|
#: ../js/ui/userMenu.js:840
|
||||||
msgid "Your chat status will be set to busy"
|
msgid "Your chat status will be set to busy"
|
||||||
msgstr "Η κατάσταση συνομιλίας σας θα ορισθεί σε απασχολημένος"
|
msgstr "Η κατάσταση συνομιλίας σας θα ορισθεί σε απασχολημένος"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:839
|
#: ../js/ui/userMenu.js:841
|
||||||
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."
|
||||||
@ -1855,34 +1860,36 @@ msgstr ""
|
|||||||
"κατάσταση σας έχει ορισθεί έτσι ώστε να γίνεται γνωστό ότι πιθανόν να μην "
|
"κατάσταση σας έχει ορισθεί έτσι ώστε να γίνεται γνωστό ότι πιθανόν να μην "
|
||||||
"δείτε τα μηνύματα τους."
|
"δείτε τα μηνύματα τους."
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:885
|
#: ../js/ui/userMenu.js:888
|
||||||
msgid "Other users are logged in."
|
msgid "Other users are logged in."
|
||||||
msgstr "Και άλλοι χρήστες είναι συνδεμένοι."
|
msgstr "Και άλλοι χρήστες είναι συνδεμένοι."
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:890
|
#: ../js/ui/userMenu.js:893
|
||||||
msgid "Shutting down might cause them to lose unsaved work."
|
msgid "Shutting down might cause them to lose unsaved work."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Κλείνοντας μπορεί να τους προκαλέσετε την απώλεια αναποθήκευτης εργασίας."
|
"Κλείνοντας μπορεί να τους προκαλέσετε την απώλεια αναποθήκευτης εργασίας."
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:916
|
#. Translators: Remote here refers to a remote session, like a ssh login
|
||||||
|
#: ../js/ui/userMenu.js:921
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s (remote)"
|
msgid "%s (remote)"
|
||||||
msgstr "%s (απομακρυσμένο)"
|
msgstr "%s (απομακρυσμένο)"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:918
|
#. Translators: Console here refers to a tty like a VT console
|
||||||
|
#: ../js/ui/userMenu.js:924
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s (console)"
|
msgid "%s (console)"
|
||||||
msgstr "%s (κονσόλα)"
|
msgstr "%s (κονσόλα)"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:101
|
#: ../js/ui/viewSelector.js:100
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "Εφαρμογές"
|
msgstr "Εφαρμογές"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:105
|
#: ../js/ui/viewSelector.js:104
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Αναζήτηση"
|
msgstr "Αναζήτηση"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:92
|
#: ../js/ui/wanda.js:77
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sorry, no wisdom for you today:\n"
|
"Sorry, no wisdom for you today:\n"
|
||||||
@ -1891,7 +1898,7 @@ msgstr ""
|
|||||||
"Συγγνώμη, κανένα απόφθεγμα για εσάς σήμερα:\n"
|
"Συγγνώμη, κανένα απόφθεγμα για εσάς σήμερα:\n"
|
||||||
"%s"
|
"%s"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:96
|
#: ../js/ui/wanda.js:81
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s the Oracle says"
|
msgid "%s the Oracle says"
|
||||||
msgstr "%s ο Προφήτης λέει"
|
msgstr "%s ο Προφήτης λέει"
|
||||||
|
1164
po/en_GB.po
1164
po/en_GB.po
File diff suppressed because it is too large
Load Diff
275
po/et.po
275
po/et.po
@ -13,8 +13,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-12-09 13:03+0000\n"
|
"POT-Creation-Date: 2013-03-11 22:02+0000\n"
|
||||||
"PO-Revision-Date: 2012-12-19 16:47+0300\n"
|
"PO-Revision-Date: 2013-03-12 16:28+0300\n"
|
||||||
"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
|
"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
|
||||||
"Language-Team: Estonian <>\n"
|
"Language-Team: Estonian <>\n"
|
||||||
"Language: et\n"
|
"Language: et\n"
|
||||||
@ -104,6 +104,16 @@ msgid ""
|
|||||||
"favorites area."
|
"favorites area."
|
||||||
msgstr "Nendele tunnustele vastavaid rakendusi kuvatakse lemmikutes."
|
msgstr "Nendele tunnustele vastavaid rakendusi kuvatakse lemmikutes."
|
||||||
|
|
||||||
|
msgid "List of categories that should be displayed as folders"
|
||||||
|
msgstr "Kategooriad, mida tuleb kuvada kaustadena"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Each category name in this list will be represented as folder in the "
|
||||||
|
"application view, rather than being displayed inline in the main view."
|
||||||
|
msgstr ""
|
||||||
|
"Kõiki selles loetelus olevaid kategooriaid kuvatakse rakenduste vaates "
|
||||||
|
"kaustadena, mitte peavaates teistega koos."
|
||||||
|
|
||||||
msgid "History for command (Alt-F2) dialog"
|
msgid "History for command (Alt-F2) dialog"
|
||||||
msgstr "Käsudialoogi (Alt-F2) ajalugu"
|
msgstr "Käsudialoogi (Alt-F2) ajalugu"
|
||||||
|
|
||||||
@ -135,12 +145,6 @@ msgstr ""
|
|||||||
"See võti keelab automaatse 'Logi välja' menüükirje peitmise, kui arvutis on "
|
"See võti keelab automaatse 'Logi välja' menüükirje peitmise, kui arvutis on "
|
||||||
"üks kasutaja ning avatud üks seanss."
|
"üks kasutaja ning avatud üks seanss."
|
||||||
|
|
||||||
msgid "Show full name in the user menu"
|
|
||||||
msgstr "Kasutajamenüüs näidatakse kasutaja tervet nime"
|
|
||||||
|
|
||||||
msgid "Whether the users full name is shown in the user menu or not."
|
|
||||||
msgstr "Kas kasutajamenüüs näidatakse kasutaja kogu nime või mitte."
|
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Whether to remember password for mounting encrypted or remote filesystems"
|
"Whether to remember password for mounting encrypted or remote filesystems"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -299,12 +303,8 @@ msgstr "Laiendus"
|
|||||||
msgid "Select an extension to configure using the combobox above."
|
msgid "Select an extension to configure using the combobox above."
|
||||||
msgstr "Vali seadistatav laiendus kasutades ülemist valikukasti."
|
msgstr "Vali seadistatav laiendus kasutades ülemist valikukasti."
|
||||||
|
|
||||||
msgid "Session..."
|
msgid "Session…"
|
||||||
msgstr "Seanss..."
|
msgstr "Seanss…"
|
||||||
|
|
||||||
msgctxt "title"
|
|
||||||
msgid "Sign In"
|
|
||||||
msgstr "Sisselogimine"
|
|
||||||
|
|
||||||
#. 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
|
||||||
@ -368,16 +368,12 @@ msgstr "Käsku pole võimalik analüüsida:"
|
|||||||
msgid "Execution of '%s' failed:"
|
msgid "Execution of '%s' failed:"
|
||||||
msgstr "'%s' käivitamine nurjus:"
|
msgstr "'%s' käivitamine nurjus:"
|
||||||
|
|
||||||
#. Translators: Filter to display all applications
|
msgid "Frequent"
|
||||||
|
msgstr "Sage"
|
||||||
|
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "Kõik"
|
msgstr "Kõik"
|
||||||
|
|
||||||
msgid "APPLICATIONS"
|
|
||||||
msgstr "RAKENDUSED"
|
|
||||||
|
|
||||||
msgid "SETTINGS"
|
|
||||||
msgstr "SEADED"
|
|
||||||
|
|
||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "Uus aken"
|
msgstr "Uus aken"
|
||||||
|
|
||||||
@ -395,6 +391,12 @@ msgstr "%s lisati lemmikutesse."
|
|||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "%s eemaldati lemmikutest."
|
msgstr "%s eemaldati lemmikutest."
|
||||||
|
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Sätted"
|
||||||
|
|
||||||
|
msgid "Change Background…"
|
||||||
|
msgstr "Muuda tausta…"
|
||||||
|
|
||||||
#. Translators: Shown in calendar event list for all day events
|
#. Translators: Shown in calendar event list for all day events
|
||||||
#. * Keep it short, best if you can use less then 10 characters
|
#. * Keep it short, best if you can use less then 10 characters
|
||||||
#.
|
#.
|
||||||
@ -402,15 +404,18 @@ msgctxt "event list time"
|
|||||||
msgid "All Day"
|
msgid "All Day"
|
||||||
msgstr "Kogu päev"
|
msgstr "Kogu päev"
|
||||||
|
|
||||||
#. Translators: Shown in calendar event list, if 24h format
|
#. Translators: Shown in calendar event list, if 24h format,
|
||||||
|
#. \u2236 is a ratio character, similar to :
|
||||||
msgctxt "event list time"
|
msgctxt "event list time"
|
||||||
msgid "%H:%M"
|
msgid "%H\\u2236%M"
|
||||||
msgstr "%H:%M"
|
msgstr "%H\\u2236%M"
|
||||||
|
|
||||||
#. Transators: Shown in calendar event list, if 12h format
|
#. Transators: Shown in calendar event list, if 12h format,
|
||||||
|
#. \u2236 is a ratio character, similar to : and \u2009 is
|
||||||
|
#. a thin space
|
||||||
msgctxt "event list time"
|
msgctxt "event list time"
|
||||||
msgid "%l:%M %p"
|
msgid "%l\\u2236%M\\u2009%p"
|
||||||
msgstr "%l:%M %p"
|
msgstr "%l\\u2236%M\\u2009%p"
|
||||||
|
|
||||||
#. Translators: Calendar grid abbreviation for Sunday.
|
#. Translators: Calendar grid abbreviation for Sunday.
|
||||||
#. *
|
#. *
|
||||||
@ -517,6 +522,12 @@ msgstr "Käesolev nädal"
|
|||||||
msgid "Next week"
|
msgid "Next week"
|
||||||
msgstr "Järgmine nädal"
|
msgstr "Järgmine nädal"
|
||||||
|
|
||||||
|
msgid "External drive connected"
|
||||||
|
msgstr "Väline ketas ühendati"
|
||||||
|
|
||||||
|
msgid "External drive disconnected"
|
||||||
|
msgstr "Väline ketas eemaldati"
|
||||||
|
|
||||||
msgid "Removable Devices"
|
msgid "Removable Devices"
|
||||||
msgstr "Eemaldatavad seadmed"
|
msgstr "Eemaldatavad seadmed"
|
||||||
|
|
||||||
@ -801,12 +812,20 @@ msgstr "Aknad"
|
|||||||
msgid "Show Applications"
|
msgid "Show Applications"
|
||||||
msgstr "Rakenduste kuvamine"
|
msgstr "Rakenduste kuvamine"
|
||||||
|
|
||||||
msgid "Date and Time Settings"
|
#. Translators: this is the name of the dock/favorites area on
|
||||||
msgstr "Kuupäeva ja kellaaja sätted"
|
#. the left of the overview
|
||||||
|
msgid "Dash"
|
||||||
|
msgstr "Dokk"
|
||||||
|
|
||||||
msgid "Open Calendar"
|
msgid "Open Calendar"
|
||||||
msgstr "Ava kalender"
|
msgstr "Ava kalender"
|
||||||
|
|
||||||
|
msgid "Open Clocks"
|
||||||
|
msgstr "Ava kell"
|
||||||
|
|
||||||
|
msgid "Date & Time Settings"
|
||||||
|
msgstr "Kuupäeva ja kella sätted"
|
||||||
|
|
||||||
#. 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").
|
||||||
#.
|
#.
|
||||||
@ -897,9 +916,6 @@ msgstr "Paigalda"
|
|||||||
msgid "Download and install '%s' from extensions.gnome.org?"
|
msgid "Download and install '%s' from extensions.gnome.org?"
|
||||||
msgstr "Kas laadida alla ja paigaldada '%s' aadressilt extensions.gnome.org?"
|
msgstr "Kas laadida alla ja paigaldada '%s' aadressilt extensions.gnome.org?"
|
||||||
|
|
||||||
msgid "tray"
|
|
||||||
msgstr "salv"
|
|
||||||
|
|
||||||
msgid "Keyboard"
|
msgid "Keyboard"
|
||||||
msgstr "Klaviatuur"
|
msgstr "Klaviatuur"
|
||||||
|
|
||||||
@ -920,6 +936,8 @@ msgstr "Näita vigu"
|
|||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "Lubatud"
|
msgstr "Lubatud"
|
||||||
|
|
||||||
|
#. translators:
|
||||||
|
#. * The device has been disabled
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Keelatud"
|
msgstr "Keelatud"
|
||||||
|
|
||||||
@ -944,6 +962,12 @@ msgstr "Ava"
|
|||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Eemalda"
|
msgstr "Eemalda"
|
||||||
|
|
||||||
|
msgid "Clear Messages"
|
||||||
|
msgstr "Kustuta teated"
|
||||||
|
|
||||||
|
msgid "Notification Settings"
|
||||||
|
msgstr "Märguannete sätted"
|
||||||
|
|
||||||
msgid "No Messages"
|
msgid "No Messages"
|
||||||
msgstr "Teateid pole"
|
msgstr "Teateid pole"
|
||||||
|
|
||||||
@ -957,6 +981,12 @@ msgctxt "program"
|
|||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Tundmatu"
|
msgstr "Tundmatu"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "%d new message"
|
||||||
|
msgid_plural "%d new messages"
|
||||||
|
msgstr[0] "%d uus sõnum"
|
||||||
|
msgstr[1] "%d uut sõnumit"
|
||||||
|
|
||||||
msgid "Undo"
|
msgid "Undo"
|
||||||
msgstr "Võta tagasi"
|
msgstr "Võta tagasi"
|
||||||
|
|
||||||
@ -967,13 +997,8 @@ msgstr "Ülevaade"
|
|||||||
#. 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.
|
||||||
msgid "Type to search..."
|
msgid "Type to search…"
|
||||||
msgstr "Otsing..."
|
msgstr "Otsing…"
|
||||||
|
|
||||||
#. Translators: this is the name of the dock/favorites area on
|
|
||||||
#. the left of the overview
|
|
||||||
msgid "Dash"
|
|
||||||
msgstr "Dokk"
|
|
||||||
|
|
||||||
msgid "Quit"
|
msgid "Quit"
|
||||||
msgstr "Sulge"
|
msgstr "Sulge"
|
||||||
@ -1005,12 +1030,6 @@ msgstr "Sulge"
|
|||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %d. %B"
|
msgstr "%A, %d. %B"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%d new message"
|
|
||||||
msgid_plural "%d new messages"
|
|
||||||
msgstr[0] "%d uus sõnum"
|
|
||||||
msgstr[1] "%d uut sõnumit"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d new notification"
|
msgid "%d new notification"
|
||||||
msgid_plural "%d new notifications"
|
msgid_plural "%d new notifications"
|
||||||
@ -1020,8 +1039,24 @@ msgstr[1] "%d uut märguannet"
|
|||||||
msgid "Lock"
|
msgid "Lock"
|
||||||
msgstr "Lukusta"
|
msgstr "Lukusta"
|
||||||
|
|
||||||
msgid "Searching..."
|
msgid "GNOME needs to lock the screen"
|
||||||
msgstr "Otsimine..."
|
msgstr "GNOME peab ekraani lukustama"
|
||||||
|
|
||||||
|
#. We could not become modal, so we can't activate the
|
||||||
|
#. screenshield. The user is probably very upset at this
|
||||||
|
#. point, but any application using global grabs is broken
|
||||||
|
#. Just tell him to stop using this app
|
||||||
|
#.
|
||||||
|
#. XXX: another option is to kick the user into the gdm login
|
||||||
|
#. screen, where we're not affected by grabs
|
||||||
|
msgid "Unable to lock"
|
||||||
|
msgstr "Pole võimalik lukustada"
|
||||||
|
|
||||||
|
msgid "Lock was blocked by an application"
|
||||||
|
msgstr "Rakendus blokeeris lukustamise"
|
||||||
|
|
||||||
|
msgid "Searching…"
|
||||||
|
msgstr "Otsing…"
|
||||||
|
|
||||||
msgid "No results."
|
msgid "No results."
|
||||||
msgstr "Tulemused puuduvad."
|
msgstr "Tulemused puuduvad."
|
||||||
@ -1089,11 +1124,11 @@ msgstr "Bluetooth"
|
|||||||
msgid "Visibility"
|
msgid "Visibility"
|
||||||
msgstr "Nähtavus"
|
msgstr "Nähtavus"
|
||||||
|
|
||||||
msgid "Send Files to Device..."
|
msgid "Send Files to Device…"
|
||||||
msgstr "Failide saatmine seadmesse..."
|
msgstr "Failide saatmine seadmesse…"
|
||||||
|
|
||||||
msgid "Set up a New Device..."
|
msgid "Set Up a New Device…"
|
||||||
msgstr "Uue seadme häälestamine..."
|
msgstr "Uue seadme häälestamine…"
|
||||||
|
|
||||||
msgid "Bluetooth Settings"
|
msgid "Bluetooth Settings"
|
||||||
msgstr "Bluetoothi sätted"
|
msgstr "Bluetoothi sätted"
|
||||||
@ -1111,8 +1146,8 @@ msgstr "ühenduse katkestamine..."
|
|||||||
msgid "connecting..."
|
msgid "connecting..."
|
||||||
msgstr "ühendumine..."
|
msgstr "ühendumine..."
|
||||||
|
|
||||||
msgid "Send Files..."
|
msgid "Send Files…"
|
||||||
msgstr "Failide saatmine..."
|
msgstr "Failide saatmine…"
|
||||||
|
|
||||||
msgid "Keyboard Settings"
|
msgid "Keyboard Settings"
|
||||||
msgstr "Klaviatuurisätted"
|
msgstr "Klaviatuurisätted"
|
||||||
@ -1173,7 +1208,7 @@ msgstr "Olgu"
|
|||||||
msgid "Show Keyboard Layout"
|
msgid "Show Keyboard Layout"
|
||||||
msgstr "Klaviatuuripaigutuse kuvamine"
|
msgstr "Klaviatuuripaigutuse kuvamine"
|
||||||
|
|
||||||
msgid "Region and Language Settings"
|
msgid "Region & Language Settings"
|
||||||
msgstr "Asukoha ja keele sätted"
|
msgstr "Asukoha ja keele sätted"
|
||||||
|
|
||||||
msgid "Volume, network, battery"
|
msgid "Volume, network, battery"
|
||||||
@ -1212,17 +1247,23 @@ msgstr "pole saadaval"
|
|||||||
msgid "connection failed"
|
msgid "connection failed"
|
||||||
msgstr "ühendumine nurjus"
|
msgstr "ühendumine nurjus"
|
||||||
|
|
||||||
msgid "More..."
|
msgid "More…"
|
||||||
msgstr "Veel..."
|
msgstr "Veel…"
|
||||||
|
|
||||||
#. TRANSLATORS: this is the indication that a connection for another logged in user is active,
|
#. TRANSLATORS: this is the indication that a connection for another logged in user is active,
|
||||||
#. and we cannot access its settings (including the name)
|
#. and we cannot access its settings (including the name)
|
||||||
msgid "Connected (private)"
|
msgid "Connected (private)"
|
||||||
msgstr "Ühendatud (privaatne)"
|
msgstr "Ühendatud (privaatne)"
|
||||||
|
|
||||||
|
msgid "Wired"
|
||||||
|
msgstr "Juhtmega"
|
||||||
|
|
||||||
msgid "Auto Ethernet"
|
msgid "Auto Ethernet"
|
||||||
msgstr "Automaatne ethernet"
|
msgstr "Automaatne ethernet"
|
||||||
|
|
||||||
|
msgid "Mobile broadband"
|
||||||
|
msgstr "Mobiiliühendus"
|
||||||
|
|
||||||
msgid "Auto broadband"
|
msgid "Auto broadband"
|
||||||
msgstr "Automaatne lairibaühendus"
|
msgstr "Automaatne lairibaühendus"
|
||||||
|
|
||||||
@ -1269,8 +1310,8 @@ msgstr "Toitesätted..."
|
|||||||
|
|
||||||
#. 0 is reported when UPower does not have enough data
|
#. 0 is reported when UPower does not have enough data
|
||||||
#. to estimate battery life
|
#. to estimate battery life
|
||||||
msgid "Estimating..."
|
msgid "Estimating…"
|
||||||
msgstr "Andmete kogumine..."
|
msgstr "Andmete kogumine…"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d hour remaining"
|
msgid "%d hour remaining"
|
||||||
@ -1304,10 +1345,10 @@ msgctxt "percent of battery remaining"
|
|||||||
msgid "%d%%"
|
msgid "%d%%"
|
||||||
msgstr "%d%%"
|
msgstr "%d%%"
|
||||||
|
|
||||||
msgid "AC adapter"
|
msgid "AC Adapter"
|
||||||
msgstr "Võrgutoite adapter"
|
msgstr "Laadija"
|
||||||
|
|
||||||
msgid "Laptop battery"
|
msgid "Laptop Battery"
|
||||||
msgstr "Sülearvuti aku"
|
msgstr "Sülearvuti aku"
|
||||||
|
|
||||||
msgid "UPS"
|
msgid "UPS"
|
||||||
@ -1322,10 +1363,10 @@ msgstr "Hiir"
|
|||||||
msgid "PDA"
|
msgid "PDA"
|
||||||
msgstr "Elektronmärkmik"
|
msgstr "Elektronmärkmik"
|
||||||
|
|
||||||
msgid "Cell phone"
|
msgid "Cell Phone"
|
||||||
msgstr "Mobiiltelefon"
|
msgstr "Mobiiltelefon"
|
||||||
|
|
||||||
msgid "Media player"
|
msgid "Media Player"
|
||||||
msgstr "Meediaesitaja"
|
msgstr "Meediaesitaja"
|
||||||
|
|
||||||
msgid "Tablet"
|
msgid "Tablet"
|
||||||
@ -1338,6 +1379,9 @@ msgctxt "device"
|
|||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Tundmatu"
|
msgstr "Tundmatu"
|
||||||
|
|
||||||
|
msgid "Volume changed"
|
||||||
|
msgstr "Helivaljus muutus"
|
||||||
|
|
||||||
#. Translators: This is the label for audio volume
|
#. Translators: This is the label for audio volume
|
||||||
msgid "Volume"
|
msgid "Volume"
|
||||||
msgstr "Helivaljus"
|
msgstr "Helivaljus"
|
||||||
@ -1372,9 +1416,6 @@ msgstr "Ühendamata"
|
|||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Märguanded"
|
msgstr "Märguanded"
|
||||||
|
|
||||||
msgid "Settings"
|
|
||||||
msgstr "Sätted"
|
|
||||||
|
|
||||||
msgid "Switch User"
|
msgid "Switch User"
|
||||||
msgstr "Vaheta kasutajat"
|
msgstr "Vaheta kasutajat"
|
||||||
|
|
||||||
@ -1394,6 +1435,22 @@ msgstr ""
|
|||||||
"Märguanded on nüüd keelatud, sealhulgas vestlusteated. Sinu netiolekut "
|
"Märguanded on nüüd keelatud, sealhulgas vestlusteated. Sinu netiolekut "
|
||||||
"muudeti, et teised teaksid, et sa ei pruugi nende teateid näha."
|
"muudeti, et teised teaksid, et sa ei pruugi nende teateid näha."
|
||||||
|
|
||||||
|
msgid "Other users are logged in."
|
||||||
|
msgstr "Teised kasutajad on sisse logitud."
|
||||||
|
|
||||||
|
msgid "Shutting down might cause them to lose unsaved work."
|
||||||
|
msgstr "Väljalülitamine võib põhjustada salvestamata töö kaotsimineku."
|
||||||
|
|
||||||
|
#. Translators: Remote here refers to a remote session, like a ssh login
|
||||||
|
#, c-format
|
||||||
|
msgid "%s (remote)"
|
||||||
|
msgstr "%s (kaugühendus)"
|
||||||
|
|
||||||
|
#. Translators: Console here refers to a tty like a VT console
|
||||||
|
#, c-format
|
||||||
|
msgid "%s (console)"
|
||||||
|
msgstr "%s (konsool)"
|
||||||
|
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "Rakendused"
|
msgstr "Rakendused"
|
||||||
|
|
||||||
@ -1412,9 +1469,6 @@ msgstr ""
|
|||||||
msgid "%s the Oracle says"
|
msgid "%s the Oracle says"
|
||||||
msgstr "Oraakel %s ütleb"
|
msgstr "Oraakel %s ütleb"
|
||||||
|
|
||||||
msgid "Your favorite Easter Egg"
|
|
||||||
msgstr "Sinu lemmiküllatusmuna"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "'%s' is ready"
|
msgid "'%s' is ready"
|
||||||
msgstr "'%s' on valmis"
|
msgstr "'%s' on valmis"
|
||||||
@ -1422,6 +1476,25 @@ msgstr "'%s' on valmis"
|
|||||||
msgid "Evolution Calendar"
|
msgid "Evolution Calendar"
|
||||||
msgstr "Evolutioni kalender"
|
msgstr "Evolutioni kalender"
|
||||||
|
|
||||||
|
#. translators:
|
||||||
|
#. * The number of sound outputs on a particular device
|
||||||
|
#, c-format
|
||||||
|
msgid "%u Output"
|
||||||
|
msgid_plural "%u Outputs"
|
||||||
|
msgstr[0] "%u väljund"
|
||||||
|
msgstr[1] "%u väljundit"
|
||||||
|
|
||||||
|
#. translators:
|
||||||
|
#. * The number of sound inputs on a particular device
|
||||||
|
#, c-format
|
||||||
|
msgid "%u Input"
|
||||||
|
msgid_plural "%u Inputs"
|
||||||
|
msgstr[0] "%u sisend"
|
||||||
|
msgstr[1] "%u sisendit"
|
||||||
|
|
||||||
|
msgid "System Sounds"
|
||||||
|
msgstr "Süsteemi helid"
|
||||||
|
|
||||||
msgid "Print version"
|
msgid "Print version"
|
||||||
msgstr "Printimise versioon"
|
msgstr "Printimise versioon"
|
||||||
|
|
||||||
@ -1444,15 +1517,48 @@ msgstr "Paroolid ei kattu."
|
|||||||
msgid "Password cannot be blank"
|
msgid "Password cannot be blank"
|
||||||
msgstr "Parool ei saa olla tühi"
|
msgstr "Parool ei saa olla tühi"
|
||||||
|
|
||||||
msgid "United Kingdom"
|
|
||||||
msgstr "Suurbritannia"
|
|
||||||
|
|
||||||
msgid "Default"
|
|
||||||
msgstr "Vaikimisi"
|
|
||||||
|
|
||||||
msgid "Authentication dialog was dismissed by the user"
|
msgid "Authentication dialog was dismissed by the user"
|
||||||
msgstr "Kasutaja katkestas autentimisdialoogi"
|
msgstr "Kasutaja katkestas autentimisdialoogi"
|
||||||
|
|
||||||
|
#~ msgid "Show full name in the user menu"
|
||||||
|
#~ msgstr "Kasutajamenüüs näidatakse kasutaja tervet nime"
|
||||||
|
|
||||||
|
#~ msgid "Whether the users full name is shown in the user menu or not."
|
||||||
|
#~ msgstr "Kas kasutajamenüüs näidatakse kasutaja kogu nime või mitte."
|
||||||
|
|
||||||
|
#~ msgctxt "title"
|
||||||
|
#~ msgid "Sign In"
|
||||||
|
#~ msgstr "Sisselogimine"
|
||||||
|
|
||||||
|
#~ msgid "APPLICATIONS"
|
||||||
|
#~ msgstr "RAKENDUSED"
|
||||||
|
|
||||||
|
#~ msgid "SETTINGS"
|
||||||
|
#~ msgstr "SEADED"
|
||||||
|
|
||||||
|
#~ msgctxt "event list time"
|
||||||
|
#~ msgid "%H:%M"
|
||||||
|
#~ msgstr "%H:%M"
|
||||||
|
|
||||||
|
#~ msgctxt "event list time"
|
||||||
|
#~ msgid "%l:%M %p"
|
||||||
|
#~ msgstr "%l:%M %p"
|
||||||
|
|
||||||
|
#~ msgid "tray"
|
||||||
|
#~ msgstr "salv"
|
||||||
|
|
||||||
|
#~ msgid "More..."
|
||||||
|
#~ msgstr "Veel..."
|
||||||
|
|
||||||
|
#~ msgid "Your favorite Easter Egg"
|
||||||
|
#~ msgstr "Sinu lemmiküllatusmuna"
|
||||||
|
|
||||||
|
#~ msgid "United Kingdom"
|
||||||
|
#~ msgstr "Suurbritannia"
|
||||||
|
|
||||||
|
#~ msgid "Default"
|
||||||
|
#~ msgstr "Vaikimisi"
|
||||||
|
|
||||||
#~ msgid "Subscription request"
|
#~ msgid "Subscription request"
|
||||||
#~ msgstr "Tellimuse päring"
|
#~ msgstr "Tellimuse päring"
|
||||||
|
|
||||||
@ -1471,28 +1577,9 @@ msgstr "Kasutaja katkestas autentimisdialoogi"
|
|||||||
#~ msgid "Reconnect"
|
#~ msgid "Reconnect"
|
||||||
#~ msgstr "Ühendu uuesti"
|
#~ msgstr "Ühendu uuesti"
|
||||||
|
|
||||||
#~ msgid "Wired"
|
|
||||||
#~ msgstr "Juhtmega"
|
|
||||||
|
|
||||||
#~ msgid "Wireless"
|
#~ msgid "Wireless"
|
||||||
#~ msgstr "Juhtmeta"
|
#~ msgstr "Juhtmeta"
|
||||||
|
|
||||||
#~ msgid "Mobile broadband"
|
|
||||||
#~ msgstr "Mobiiliühendus"
|
|
||||||
|
|
||||||
#~ msgid "%u Output"
|
|
||||||
#~ msgid_plural "%u Outputs"
|
|
||||||
#~ msgstr[0] "%u väljund"
|
|
||||||
#~ msgstr[1] "%u väljundit"
|
|
||||||
|
|
||||||
#~ msgid "%u Input"
|
|
||||||
#~ msgid_plural "%u Inputs"
|
|
||||||
#~ msgstr[0] "%u sisend"
|
|
||||||
#~ msgstr[1] "%u sisendit"
|
|
||||||
|
|
||||||
#~ msgid "System Sounds"
|
|
||||||
#~ msgstr "Süsteemi helid"
|
|
||||||
|
|
||||||
#~ msgid "disabled OpenSearch providers"
|
#~ msgid "disabled OpenSearch providers"
|
||||||
#~ msgstr "keelatud OpenSearch pakkujad"
|
#~ msgstr "keelatud OpenSearch pakkujad"
|
||||||
|
|
||||||
|
219
po/gl.po
219
po/gl.po
@ -10,10 +10,9 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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: \n"
|
||||||
"shell&keywords=I18N+L10N&component=general\n"
|
"POT-Creation-Date: 2013-04-18 01:27+0200\n"
|
||||||
"POT-Creation-Date: 2013-03-02 23:02+0000\n"
|
"PO-Revision-Date: 2013-04-18 01:42+0200\n"
|
||||||
"PO-Revision-Date: 2013-03-04 12:40+0200\n"
|
|
||||||
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
|
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
|
||||||
"Language-Team: gnome-l10n-gl@gnome.org\n"
|
"Language-Team: gnome-l10n-gl@gnome.org\n"
|
||||||
"Language: gl\n"
|
"Language: gl\n"
|
||||||
@ -30,7 +29,7 @@ msgstr "Capturas de pantalla"
|
|||||||
|
|
||||||
#: ../data/50-gnome-shell-screenshot.xml.in.h:2
|
#: ../data/50-gnome-shell-screenshot.xml.in.h:2
|
||||||
msgid "Record a screencast"
|
msgid "Record a screencast"
|
||||||
msgstr "Gravar unha gravación de pantalla"
|
msgstr "Facer unha gravación da pantalla"
|
||||||
|
|
||||||
#: ../data/50-gnome-shell-system.xml.in.h:1
|
#: ../data/50-gnome-shell-system.xml.in.h:1
|
||||||
msgid "System"
|
msgid "System"
|
||||||
@ -63,16 +62,16 @@ msgstr "Xestor de xanelas e inicio de aplicativos"
|
|||||||
#: ../data/gnome-shell-extension-prefs.desktop.in.in.h:1
|
#: ../data/gnome-shell-extension-prefs.desktop.in.in.h:1
|
||||||
#: ../js/extensionPrefs/main.js:153
|
#: ../js/extensionPrefs/main.js:153
|
||||||
msgid "GNOME Shell Extension Preferences"
|
msgid "GNOME Shell Extension Preferences"
|
||||||
msgstr "Preferencias de extensións de GNOME Shell"
|
msgstr "Preferencias das extensións de GNOME Shell"
|
||||||
|
|
||||||
#: ../data/gnome-shell-extension-prefs.desktop.in.in.h:2
|
#: ../data/gnome-shell-extension-prefs.desktop.in.in.h:2
|
||||||
msgid "Configure GNOME Shell Extensions"
|
msgid "Configure GNOME Shell Extensions"
|
||||||
msgstr "Configurar as extensións de GNOME Shell"
|
msgstr "Configure as extensións de GNOME Shell"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:1
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:1
|
||||||
msgid "Enable internal tools useful for developers and testers from Alt-F2"
|
msgid "Enable internal tools useful for developers and testers from Alt-F2"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Activar as ferramentas internas útiles para os desenvolvedores e probadores, "
|
"Activar as ferramentas internas útiles para os desenvolvedores e probadores "
|
||||||
"usando Alt-F2"
|
"usando Alt-F2"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:2
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:2
|
||||||
@ -85,7 +84,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:3
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:3
|
||||||
msgid "Uuids of extensions to enable"
|
msgid "Uuids of extensions to enable"
|
||||||
msgstr "Uuid das extensións que activar"
|
msgstr "UUIDs das extensións a activar"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:4
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:4
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -375,43 +374,42 @@ msgstr ""
|
|||||||
"Seleccione unha extensión que configurar usando a caixa combinada de arriba."
|
"Seleccione unha extensión que configurar usando a caixa combinada de arriba."
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:405
|
#: ../js/gdm/loginDialog.js:405
|
||||||
#| msgid "Session..."
|
|
||||||
msgid "Session…"
|
msgid "Session…"
|
||||||
msgstr "Sesión…"
|
msgstr "Sesión…"
|
||||||
|
|
||||||
#. 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:629
|
#: ../js/gdm/loginDialog.js:630
|
||||||
msgid "Not listed?"
|
msgid "Not listed?"
|
||||||
msgstr "Non está na lista?"
|
msgstr "Non está na lista?"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:783 ../js/ui/components/networkAgent.js:137
|
#: ../js/gdm/loginDialog.js:787 ../js/ui/components/networkAgent.js:137
|
||||||
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:375
|
#: ../js/ui/components/polkitAgent.js:162 ../js/ui/endSessionDialog.js:376
|
||||||
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
|
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
|
||||||
#: ../js/ui/status/bluetooth.js:415 ../js/ui/unlockDialog.js:126
|
#: ../js/ui/status/bluetooth.js:415 ../js/ui/unlockDialog.js:100
|
||||||
#: ../js/ui/userMenu.js:932
|
#: ../js/ui/userMenu.js:938
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Cancelar"
|
msgstr "Cancelar"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:799
|
#: ../js/gdm/loginDialog.js:803
|
||||||
msgctxt "button"
|
msgctxt "button"
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr "Iniciar sesión"
|
msgstr "Iniciar sesión"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:799
|
#: ../js/gdm/loginDialog.js:803
|
||||||
msgid "Next"
|
msgid "Next"
|
||||||
msgstr "Seguinte"
|
msgstr "Seguinte"
|
||||||
|
|
||||||
#. TTLS and PEAP are actually much more complicated, but this complication
|
#. TTLS and PEAP are actually much more complicated, but this complication
|
||||||
#. is not visible here since we only care about phase2 authentication
|
#. is not visible here since we only care about phase2 authentication
|
||||||
#. (and don't even care of which one)
|
#. (and don't even care of which one)
|
||||||
#: ../js/gdm/loginDialog.js:904 ../js/ui/components/networkAgent.js:260
|
#: ../js/gdm/loginDialog.js:918 ../js/ui/components/networkAgent.js:260
|
||||||
#: ../js/ui/components/networkAgent.js:278
|
#: ../js/ui/components/networkAgent.js:278
|
||||||
msgid "Username: "
|
msgid "Username: "
|
||||||
msgstr "Nome de usuario: "
|
msgstr "Nome de usuario: "
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:1157
|
#: ../js/gdm/loginDialog.js:1174
|
||||||
msgid "Login Window"
|
msgid "Login Window"
|
||||||
msgstr "Xanela de inicio de sesión"
|
msgstr "Xanela de inicio de sesión"
|
||||||
|
|
||||||
@ -420,8 +418,8 @@ msgstr "Xanela de inicio de sesión"
|
|||||||
msgid "Power"
|
msgid "Power"
|
||||||
msgstr "Apagar"
|
msgstr "Apagar"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:93 ../js/ui/userMenu.js:694 ../js/ui/userMenu.js:698
|
#: ../js/gdm/powerMenu.js:93 ../js/ui/userMenu.js:696 ../js/ui/userMenu.js:700
|
||||||
#: ../js/ui/userMenu.js:814
|
#: ../js/ui/userMenu.js:816
|
||||||
msgid "Suspend"
|
msgid "Suspend"
|
||||||
msgstr "Suspender"
|
msgstr "Suspender"
|
||||||
|
|
||||||
@ -429,58 +427,58 @@ msgstr "Suspender"
|
|||||||
msgid "Restart"
|
msgid "Restart"
|
||||||
msgstr "Reiniciar"
|
msgstr "Reiniciar"
|
||||||
|
|
||||||
#: ../js/gdm/powerMenu.js:103 ../js/ui/userMenu.js:696
|
#: ../js/gdm/powerMenu.js:103 ../js/ui/userMenu.js:698
|
||||||
#: ../js/ui/userMenu.js:698 ../js/ui/userMenu.js:813 ../js/ui/userMenu.js:936
|
#: ../js/ui/userMenu.js:700 ../js/ui/userMenu.js:815 ../js/ui/userMenu.js:942
|
||||||
msgid "Power Off"
|
msgid "Power Off"
|
||||||
msgstr "Apagar"
|
msgstr "Apagar"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:182
|
#: ../js/gdm/util.js:249
|
||||||
msgid "Authentication error"
|
msgid "Authentication error"
|
||||||
msgstr "Erro de autenticación"
|
msgstr "Erro de autenticación"
|
||||||
|
|
||||||
#. 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:299
|
#: ../js/gdm/util.js:366
|
||||||
msgid "(or swipe finger)"
|
msgid "(or swipe finger)"
|
||||||
msgstr "(ou pase o dedo)"
|
msgstr "(ou pase o dedo)"
|
||||||
|
|
||||||
#: ../js/gdm/util.js:324
|
#: ../js/gdm/util.js:391
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(p.ex., usuario ou %s)"
|
msgstr "(p.ex., usuario ou %s)"
|
||||||
|
|
||||||
#: ../js/misc/util.js:94
|
#: ../js/misc/util.js:97
|
||||||
msgid "Command not found"
|
msgid "Command not found"
|
||||||
msgstr "Orde non atopada"
|
msgstr "Orde non atopada"
|
||||||
|
|
||||||
#. Replace "Error invoking GLib.shell_parse_argv: " with
|
#. Replace "Error invoking GLib.shell_parse_argv: " with
|
||||||
#. something nicer
|
#. something nicer
|
||||||
#: ../js/misc/util.js:127
|
#: ../js/misc/util.js:130
|
||||||
msgid "Could not parse command:"
|
msgid "Could not parse command:"
|
||||||
msgstr "Non foi posíbel analizar a orde:"
|
msgstr "Non foi posíbel analizar a orde:"
|
||||||
|
|
||||||
#: ../js/misc/util.js:135
|
#: ../js/misc/util.js:138
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Execution of '%s' failed:"
|
msgid "Execution of '%s' failed:"
|
||||||
msgstr "Produciuse un fallo na execución de «%s»:"
|
msgstr "Produciuse un fallo na execución de «%s»:"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:348
|
#: ../js/ui/appDisplay.js:349
|
||||||
msgid "Frequent"
|
msgid "Frequent"
|
||||||
msgstr "Frecuentes"
|
msgstr "Frecuentes"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:355
|
#: ../js/ui/appDisplay.js:356
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "Todos"
|
msgstr "Todos"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:913
|
#: ../js/ui/appDisplay.js:914
|
||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "Xanela nova"
|
msgstr "Xanela nova"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:916 ../js/ui/dash.js:284
|
#: ../js/ui/appDisplay.js:917 ../js/ui/dash.js:284
|
||||||
msgid "Remove from Favorites"
|
msgid "Remove from Favorites"
|
||||||
msgstr "Retirar dos marcadores"
|
msgstr "Retirar dos marcadores"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:917
|
#: ../js/ui/appDisplay.js:918
|
||||||
msgid "Add to Favorites"
|
msgid "Add to Favorites"
|
||||||
msgstr "Engadir aos favoritos"
|
msgstr "Engadir aos favoritos"
|
||||||
|
|
||||||
@ -494,7 +492,7 @@ msgstr "%s foi engadido aos seus favoritos."
|
|||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "%s retirouse dos seus marcadores."
|
msgstr "%s retirouse dos seus marcadores."
|
||||||
|
|
||||||
#: ../js/ui/backgroundMenu.js:19 ../js/ui/userMenu.js:787
|
#: ../js/ui/backgroundMenu.js:19 ../js/ui/userMenu.js:789
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr "Preferencias"
|
msgstr "Preferencias"
|
||||||
|
|
||||||
@ -517,7 +515,7 @@ msgctxt "event list time"
|
|||||||
msgid "%H\\u2236%M"
|
msgid "%H\\u2236%M"
|
||||||
msgstr "%H\\u2236%M"
|
msgstr "%H\\u2236%M"
|
||||||
|
|
||||||
#. Transators: Shown in calendar event list, if 12h format,
|
#. Translators: Shown in calendar event list, if 12h format,
|
||||||
#. \u2236 is a ratio character, similar to : and \u2009 is
|
#. \u2236 is a ratio character, similar to : and \u2009 is
|
||||||
#. a thin space
|
#. a thin space
|
||||||
#: ../js/ui/calendar.js:77
|
#: ../js/ui/calendar.js:77
|
||||||
@ -619,35 +617,35 @@ msgid "S"
|
|||||||
msgstr "S"
|
msgstr "S"
|
||||||
|
|
||||||
#. Translators: Text to show if there are no events
|
#. Translators: Text to show if there are no events
|
||||||
#: ../js/ui/calendar.js:692
|
#: ../js/ui/calendar.js:720
|
||||||
msgid "Nothing Scheduled"
|
msgid "Nothing Scheduled"
|
||||||
msgstr "Nada programado"
|
msgstr "Nada programado"
|
||||||
|
|
||||||
#. Translators: Shown on calendar heading when selected day occurs on current year
|
#. Translators: Shown on calendar heading when selected day occurs on current year
|
||||||
#: ../js/ui/calendar.js:708
|
#: ../js/ui/calendar.js:736
|
||||||
msgctxt "calendar heading"
|
msgctxt "calendar heading"
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %d de %B"
|
msgstr "%A, %d de %B"
|
||||||
|
|
||||||
#. Translators: Shown on calendar heading when selected day occurs on different year
|
#. Translators: Shown on calendar heading when selected day occurs on different year
|
||||||
#: ../js/ui/calendar.js:711
|
#: ../js/ui/calendar.js:739
|
||||||
msgctxt "calendar heading"
|
msgctxt "calendar heading"
|
||||||
msgid "%A, %B %d, %Y"
|
msgid "%A, %B %d, %Y"
|
||||||
msgstr "%A, %d de %B de %Y"
|
msgstr "%A, %d de %B de %Y"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:721
|
#: ../js/ui/calendar.js:749
|
||||||
msgid "Today"
|
msgid "Today"
|
||||||
msgstr "Hoxe"
|
msgstr "Hoxe"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:725
|
#: ../js/ui/calendar.js:753
|
||||||
msgid "Tomorrow"
|
msgid "Tomorrow"
|
||||||
msgstr "Mañá"
|
msgstr "Mañá"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:736
|
#: ../js/ui/calendar.js:764
|
||||||
msgid "This week"
|
msgid "This week"
|
||||||
msgstr "Esta semana"
|
msgstr "Esta semana"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:744
|
#: ../js/ui/calendar.js:772
|
||||||
msgid "Next week"
|
msgid "Next week"
|
||||||
msgstr "A vindeira semana"
|
msgstr "A vindeira semana"
|
||||||
|
|
||||||
@ -663,12 +661,12 @@ msgstr "Unidade externa desconectada"
|
|||||||
msgid "Removable Devices"
|
msgid "Removable Devices"
|
||||||
msgstr "Dispositivos extraíbeis"
|
msgstr "Dispositivos extraíbeis"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:593
|
#: ../js/ui/components/autorunManager.js:594
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Open with %s"
|
msgid "Open with %s"
|
||||||
msgstr "Abrir con %s"
|
msgstr "Abrir con %s"
|
||||||
|
|
||||||
#: ../js/ui/components/autorunManager.js:619
|
#: ../js/ui/components/autorunManager.js:620
|
||||||
msgid "Eject"
|
msgid "Eject"
|
||||||
msgstr "Expulsar"
|
msgstr "Expulsar"
|
||||||
|
|
||||||
@ -777,7 +775,7 @@ msgid "Sorry, that didn't work. Please try again."
|
|||||||
msgstr "Desculpe, iso non funcionou. Ténteo de novo."
|
msgstr "Desculpe, iso non funcionou. Ténteo de novo."
|
||||||
|
|
||||||
#. Translators: this is a filename used for screencast recording
|
#. Translators: this is a filename used for screencast recording
|
||||||
#: ../js/ui/components/recorder.js:48
|
#: ../js/ui/components/recorder.js:47
|
||||||
#, no-c-format
|
#, no-c-format
|
||||||
msgid "Screencast from %d %t"
|
msgid "Screencast from %d %t"
|
||||||
msgstr "Screencast desde %d %t"
|
msgstr "Screencast desde %d %t"
|
||||||
@ -1024,7 +1022,7 @@ msgstr "Ver conta"
|
|||||||
msgid "Unknown reason"
|
msgid "Unknown reason"
|
||||||
msgstr "Razón descoñecida"
|
msgstr "Razón descoñecida"
|
||||||
|
|
||||||
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:97
|
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:96
|
||||||
msgid "Windows"
|
msgid "Windows"
|
||||||
msgstr "Xanelas"
|
msgstr "Xanelas"
|
||||||
|
|
||||||
@ -1040,7 +1038,7 @@ msgstr "Taboleiro"
|
|||||||
|
|
||||||
#: ../js/ui/dateMenu.js:91
|
#: ../js/ui/dateMenu.js:91
|
||||||
msgid "Open Calendar"
|
msgid "Open Calendar"
|
||||||
msgstr "Abrir o calendario"
|
msgstr "Abrir Calendario"
|
||||||
|
|
||||||
#: ../js/ui/dateMenu.js:96
|
#: ../js/ui/dateMenu.js:96
|
||||||
msgid "Open Clocks"
|
msgid "Open Clocks"
|
||||||
@ -1053,7 +1051,7 @@ msgstr "Preferencias de data e hora"
|
|||||||
#. 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:205
|
#: ../js/ui/dateMenu.js:215
|
||||||
msgid "%A %B %e, %Y"
|
msgid "%A %B %e, %Y"
|
||||||
msgstr "%a, %e de %B, %Y"
|
msgstr "%a, %e de %B, %Y"
|
||||||
|
|
||||||
@ -1071,7 +1069,7 @@ msgstr "Saír da sesión"
|
|||||||
#: ../js/ui/endSessionDialog.js:65
|
#: ../js/ui/endSessionDialog.js:65
|
||||||
msgid "Click Log Out to quit these applications and log out of the system."
|
msgid "Click Log Out to quit these applications and log out of the system."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Prema sobre «Saír da sesión» para saír deses aplicativos e saír da sesión do "
|
"Prema en «Saír da sesión» para pechar estes aplicativos e saír da sesión do "
|
||||||
"sistema."
|
"sistema."
|
||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:67
|
#: ../js/ui/endSessionDialog.js:67
|
||||||
@ -1090,7 +1088,7 @@ msgstr[1] "A súa sesión pecharase automaticamente en %d segundos."
|
|||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:76
|
#: ../js/ui/endSessionDialog.js:76
|
||||||
msgid "Logging out of the system."
|
msgid "Logging out of the system."
|
||||||
msgstr "Saíndo da sesión."
|
msgstr "Saíndo da sesión do sistema."
|
||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:78
|
#: ../js/ui/endSessionDialog.js:78
|
||||||
msgctxt "button"
|
msgctxt "button"
|
||||||
@ -1104,7 +1102,7 @@ msgstr "Apagar"
|
|||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:84
|
#: ../js/ui/endSessionDialog.js:84
|
||||||
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 "Prema sobre «Apagar» para saír deses aplicativos e apagar o sistema."
|
msgstr "Prema sobre «Apagar» para pechar estes aplicativos e apagar o sistema."
|
||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:86
|
#: ../js/ui/endSessionDialog.js:86
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -1134,7 +1132,7 @@ msgstr "Reiniciar"
|
|||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:101
|
#: ../js/ui/endSessionDialog.js:101
|
||||||
msgid "Click Restart to quit these applications and restart the system."
|
msgid "Click Restart to quit these applications and restart the system."
|
||||||
msgstr "Prema «Reiniciar» para saír deses aplicativos e reiniciar o sistema."
|
msgstr "Prema «Reiniciar» para pechar estes aplicativos e reiniciar o sistema."
|
||||||
|
|
||||||
#: ../js/ui/endSessionDialog.js:103
|
#: ../js/ui/endSessionDialog.js:103
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -1169,7 +1167,7 @@ msgstr "Non hai ningunha extensión instalada"
|
|||||||
#: ../js/ui/lookingGlass.js:747
|
#: ../js/ui/lookingGlass.js:747
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s has not emitted any errors."
|
msgid "%s has not emitted any errors."
|
||||||
msgstr "%s non xerou ningún erro."
|
msgstr "%s non emitiu ningún erro."
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:753
|
#: ../js/ui/lookingGlass.js:753
|
||||||
msgid "Hide Errors"
|
msgid "Hide Errors"
|
||||||
@ -1195,7 +1193,7 @@ msgstr "Erro"
|
|||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:773
|
#: ../js/ui/lookingGlass.js:773
|
||||||
msgid "Out of date"
|
msgid "Out of date"
|
||||||
msgstr "Caducado"
|
msgstr "Obsoleto"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:775
|
#: ../js/ui/lookingGlass.js:775
|
||||||
msgid "Downloading"
|
msgid "Downloading"
|
||||||
@ -1218,7 +1216,6 @@ msgid "Remove"
|
|||||||
msgstr "Retirar"
|
msgstr "Retirar"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1501
|
#: ../js/ui/messageTray.js:1501
|
||||||
#| msgid "No Messages"
|
|
||||||
msgid "Clear Messages"
|
msgid "Clear Messages"
|
||||||
msgstr "Limpar mensaxes"
|
msgstr "Limpar mensaxes"
|
||||||
|
|
||||||
@ -1226,15 +1223,15 @@ msgstr "Limpar mensaxes"
|
|||||||
msgid "Notification Settings"
|
msgid "Notification Settings"
|
||||||
msgstr "Preferencias das notificacións"
|
msgstr "Preferencias das notificacións"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1707
|
#: ../js/ui/messageTray.js:1709
|
||||||
msgid "No Messages"
|
msgid "No Messages"
|
||||||
msgstr "Non hai mensaxes"
|
msgstr "Non hai mensaxes"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:1787
|
#: ../js/ui/messageTray.js:1785
|
||||||
msgid "Message Tray"
|
msgid "Message Tray"
|
||||||
msgstr "Bandexa de mensaxes"
|
msgstr "Bandexa de mensaxes"
|
||||||
|
|
||||||
#: ../js/ui/messageTray.js:2864
|
#: ../js/ui/messageTray.js:2813
|
||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "Información do sistema"
|
msgstr "Información do sistema"
|
||||||
|
|
||||||
@ -1243,14 +1240,14 @@ msgctxt "program"
|
|||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Descoñecido"
|
msgstr "Descoñecido"
|
||||||
|
|
||||||
#: ../js/ui/overviewControls.js:460 ../js/ui/screenShield.js:153
|
#: ../js/ui/overviewControls.js:463 ../js/ui/screenShield.js:149
|
||||||
#, 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 mensaxe nova"
|
msgstr[0] "%d mensaxe nova"
|
||||||
msgstr[1] "%d mensaxes novas"
|
msgstr[1] "%d mensaxes novas"
|
||||||
|
|
||||||
#: ../js/ui/overview.js:82
|
#: ../js/ui/overview.js:84
|
||||||
msgid "Undo"
|
msgid "Undo"
|
||||||
msgstr "Desfacer"
|
msgstr "Desfacer"
|
||||||
|
|
||||||
@ -1262,22 +1259,21 @@ msgstr "Vista xeral"
|
|||||||
#. 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:284
|
#: ../js/ui/overview.js:271
|
||||||
#| msgid "Type to search..."
|
|
||||||
msgid "Type to search…"
|
msgid "Type to search…"
|
||||||
msgstr "Escriba para buscar…"
|
msgstr "Escriba para buscar…"
|
||||||
|
|
||||||
#: ../js/ui/panel.js:613
|
#: ../js/ui/panel.js:633
|
||||||
msgid "Quit"
|
msgid "Quit"
|
||||||
msgstr "Saír"
|
msgstr "Saír"
|
||||||
|
|
||||||
#. Translators: If there is no suitable word for "Activities"
|
#. Translators: If there is no suitable word for "Activities"
|
||||||
#. in your language, you can use the word for "Overview".
|
#. in your language, you can use the word for "Overview".
|
||||||
#: ../js/ui/panel.js:642
|
#: ../js/ui/panel.js:657
|
||||||
msgid "Activities"
|
msgid "Activities"
|
||||||
msgstr "Actividades"
|
msgstr "Actividades"
|
||||||
|
|
||||||
#: ../js/ui/panel.js:983
|
#: ../js/ui/panel.js:954
|
||||||
msgid "Top Bar"
|
msgid "Top Bar"
|
||||||
msgstr "Barra superior"
|
msgstr "Barra superior"
|
||||||
|
|
||||||
@ -1290,34 +1286,34 @@ msgstr "Barra superior"
|
|||||||
msgid "toggle-switch-us"
|
msgid "toggle-switch-us"
|
||||||
msgstr "toggle-switch-intl"
|
msgstr "toggle-switch-intl"
|
||||||
|
|
||||||
#: ../js/ui/runDialog.js:205
|
#: ../js/ui/runDialog.js:74
|
||||||
msgid "Enter a Command"
|
msgid "Enter a Command"
|
||||||
msgstr "Escriba unha orde"
|
msgstr "Escriba unha orde"
|
||||||
|
|
||||||
#: ../js/ui/runDialog.js:241
|
#: ../js/ui/runDialog.js:110
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "Pechar"
|
msgstr "Pechar"
|
||||||
|
|
||||||
#. 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:90
|
#: ../js/ui/screenShield.js:86
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %d de %B"
|
msgstr "%A, %d de %B"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:155
|
#: ../js/ui/screenShield.js:151
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d new notification"
|
msgid "%d new notification"
|
||||||
msgid_plural "%d new notifications"
|
msgid_plural "%d new notifications"
|
||||||
msgstr[0] "%d notificación nova"
|
msgstr[0] "%d notificación nova"
|
||||||
msgstr[1] "%d notificacións novas"
|
msgstr[1] "%d notificacións novas"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:442 ../js/ui/userMenu.js:805
|
#: ../js/ui/screenShield.js:438 ../js/ui/userMenu.js:807
|
||||||
msgid "Lock"
|
msgid "Lock"
|
||||||
msgstr "Bloquear"
|
msgstr "Bloquear"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:639
|
#: ../js/ui/screenShield.js:641
|
||||||
msgid "GNOME needs to lock the screen"
|
msgid "GNOME needs to lock the screen"
|
||||||
msgstr "GNOME debe bloquear a pantalla"
|
msgstr "GNOME precisa bloquear a pantalla"
|
||||||
|
|
||||||
#. We could not become modal, so we can't activate the
|
#. We could not become modal, so we can't activate the
|
||||||
#. screenshield. The user is probably very upset at this
|
#. screenshield. The user is probably very upset at this
|
||||||
@ -1326,22 +1322,19 @@ msgstr "GNOME debe bloquear a pantalla"
|
|||||||
#.
|
#.
|
||||||
#. XXX: another option is to kick the user into the gdm login
|
#. XXX: another option is to kick the user into the gdm login
|
||||||
#. screen, where we're not affected by grabs
|
#. screen, where we're not affected by grabs
|
||||||
#: ../js/ui/screenShield.js:758 ../js/ui/screenShield.js:1169
|
#: ../js/ui/screenShield.js:762 ../js/ui/screenShield.js:1198
|
||||||
#| msgid "Unable to connect to %s"
|
|
||||||
msgid "Unable to lock"
|
msgid "Unable to lock"
|
||||||
msgstr "Non foi posíbel bloquear"
|
msgstr "Non foi posíbel bloquear"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:759 ../js/ui/screenShield.js:1170
|
#: ../js/ui/screenShield.js:763 ../js/ui/screenShield.js:1199
|
||||||
#| msgid "No such application"
|
|
||||||
msgid "Lock was blocked by an application"
|
msgid "Lock was blocked by an application"
|
||||||
msgstr "O bloqueo foi impedido por un aplicativo"
|
msgstr "Un aplicativo impediu o bloqueo"
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:431
|
#: ../js/ui/searchDisplay.js:453
|
||||||
#| msgid "Searching..."
|
|
||||||
msgid "Searching…"
|
msgid "Searching…"
|
||||||
msgstr "Buscando…"
|
msgstr "Buscando…"
|
||||||
|
|
||||||
#: ../js/ui/searchDisplay.js:475
|
#: ../js/ui/searchDisplay.js:497
|
||||||
msgid "No results."
|
msgid "No results."
|
||||||
msgstr "Sen resultados."
|
msgstr "Sen resultados."
|
||||||
|
|
||||||
@ -1353,11 +1346,11 @@ msgstr "Copiar"
|
|||||||
msgid "Paste"
|
msgid "Paste"
|
||||||
msgstr "Pegar"
|
msgstr "Pegar"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:105
|
#: ../js/ui/shellEntry.js:101
|
||||||
msgid "Show Text"
|
msgid "Show Text"
|
||||||
msgstr "Mostrar texto"
|
msgstr "Mostrar texto"
|
||||||
|
|
||||||
#: ../js/ui/shellEntry.js:107
|
#: ../js/ui/shellEntry.js:103
|
||||||
msgid "Hide Text"
|
msgid "Hide Text"
|
||||||
msgstr "Ocultar texto"
|
msgstr "Ocultar texto"
|
||||||
|
|
||||||
@ -1367,9 +1360,9 @@ msgstr "Contrasinal"
|
|||||||
|
|
||||||
#: ../js/ui/shellMountOperation.js:391
|
#: ../js/ui/shellMountOperation.js:391
|
||||||
msgid "Remember Password"
|
msgid "Remember Password"
|
||||||
msgstr "Lembrar o contrasinal"
|
msgstr "Lembrar contrasinal"
|
||||||
|
|
||||||
#: ../js/ui/shellMountOperation.js:403 ../js/ui/unlockDialog.js:140
|
#: ../js/ui/shellMountOperation.js:403 ../js/ui/unlockDialog.js:114
|
||||||
msgid "Unlock"
|
msgid "Unlock"
|
||||||
msgstr "Desbloquear"
|
msgstr "Desbloquear"
|
||||||
|
|
||||||
@ -1433,12 +1426,10 @@ msgid "Visibility"
|
|||||||
msgstr "Visibilidade"
|
msgstr "Visibilidade"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:59
|
#: ../js/ui/status/bluetooth.js:59
|
||||||
#| msgid "Send Files to Device..."
|
|
||||||
msgid "Send Files to Device…"
|
msgid "Send Files to Device…"
|
||||||
msgstr "Enviar ficheiros ao dispositivo…"
|
msgstr "Enviar ficheiros ao dispositivo…"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:60
|
#: ../js/ui/status/bluetooth.js:60
|
||||||
#| msgid "Set Up a New Device..."
|
|
||||||
msgid "Set Up a New Device…"
|
msgid "Set Up a New Device…"
|
||||||
msgstr "Configurar un dispositivo novo…"
|
msgstr "Configurar un dispositivo novo…"
|
||||||
|
|
||||||
@ -1465,7 +1456,6 @@ msgid "connecting..."
|
|||||||
msgstr "conectando…"
|
msgstr "conectando…"
|
||||||
|
|
||||||
#: ../js/ui/status/bluetooth.js:239
|
#: ../js/ui/status/bluetooth.js:239
|
||||||
#| msgid "Send Files..."
|
|
||||||
msgid "Send Files…"
|
msgid "Send Files…"
|
||||||
msgstr "Enviar ficheiros…"
|
msgstr "Enviar ficheiros…"
|
||||||
|
|
||||||
@ -1547,7 +1537,7 @@ msgstr "Mostrar a distribución do teclado"
|
|||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:373
|
#: ../js/ui/status/keyboard.js:373
|
||||||
msgid "Region & Language Settings"
|
msgid "Region & Language Settings"
|
||||||
msgstr "Configuración rexional e de idioma"
|
msgstr "Preferencias de rexión e idioma"
|
||||||
|
|
||||||
#: ../js/ui/status/lockScreenMenu.js:43
|
#: ../js/ui/status/lockScreenMenu.js:43
|
||||||
msgid "Volume, network, battery"
|
msgid "Volume, network, battery"
|
||||||
@ -1592,7 +1582,7 @@ msgstr "non dispoñíbel"
|
|||||||
|
|
||||||
#: ../js/ui/status/network.js:493 ../js/ui/status/network.js:1551
|
#: ../js/ui/status/network.js:493 ../js/ui/status/network.js:1551
|
||||||
msgid "connection failed"
|
msgid "connection failed"
|
||||||
msgstr "conexión fallida"
|
msgstr "conexión fallada"
|
||||||
|
|
||||||
#: ../js/ui/status/network.js:552 ../js/ui/status/network.js:1435
|
#: ../js/ui/status/network.js:552 ../js/ui/status/network.js:1435
|
||||||
#: ../js/ui/status/network.js:1627
|
#: ../js/ui/status/network.js:1627
|
||||||
@ -1678,7 +1668,6 @@ msgstr "Preferencias de enerxía"
|
|||||||
#. 0 is reported when UPower does not have enough data
|
#. 0 is reported when UPower does not have enough data
|
||||||
#. to estimate battery life
|
#. to estimate battery life
|
||||||
#: ../js/ui/status/power.js:99
|
#: ../js/ui/status/power.js:99
|
||||||
#| msgid "Estimating..."
|
|
||||||
msgid "Estimating…"
|
msgid "Estimating…"
|
||||||
msgstr "Estimando…"
|
msgstr "Estimando…"
|
||||||
|
|
||||||
@ -1778,59 +1767,59 @@ msgstr "Volume"
|
|||||||
msgid "Microphone"
|
msgid "Microphone"
|
||||||
msgstr "Micrófono"
|
msgstr "Micrófono"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:151
|
#: ../js/ui/unlockDialog.js:125
|
||||||
msgid "Log in as another user"
|
msgid "Log in as another user"
|
||||||
msgstr "Iniciar sesión como outro usuario"
|
msgstr "Iniciar sesión como outro usuario"
|
||||||
|
|
||||||
#: ../js/ui/unlockDialog.js:177
|
#: ../js/ui/unlockDialog.js:146
|
||||||
msgid "Unlock Window"
|
msgid "Unlock Window"
|
||||||
msgstr "Desbloquear xanela"
|
msgstr "Desbloquear xanela"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:192
|
#: ../js/ui/userMenu.js:193
|
||||||
msgid "Available"
|
msgid "Available"
|
||||||
msgstr "Dispoñíbel"
|
msgstr "Dispoñíbel"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:195
|
#: ../js/ui/userMenu.js:196
|
||||||
msgid "Busy"
|
msgid "Busy"
|
||||||
msgstr "Ocupado"
|
msgstr "Ocupado"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:198
|
#: ../js/ui/userMenu.js:199
|
||||||
msgid "Invisible"
|
msgid "Invisible"
|
||||||
msgstr "Invisíbel"
|
msgstr "Invisíbel"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:201
|
#: ../js/ui/userMenu.js:202
|
||||||
msgid "Away"
|
msgid "Away"
|
||||||
msgstr "Ausente"
|
msgstr "Ausente"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:204
|
#: ../js/ui/userMenu.js:205
|
||||||
msgid "Idle"
|
msgid "Idle"
|
||||||
msgstr "Inactivo"
|
msgstr "Inactivo"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:207
|
#: ../js/ui/userMenu.js:208
|
||||||
msgid "Offline"
|
msgid "Offline"
|
||||||
msgstr "Desconectado"
|
msgstr "Desconectado"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:779
|
#: ../js/ui/userMenu.js:781
|
||||||
msgid "Notifications"
|
msgid "Notifications"
|
||||||
msgstr "Notificacións"
|
msgstr "Notificacións"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:795
|
#: ../js/ui/userMenu.js:797
|
||||||
msgid "Switch User"
|
msgid "Switch User"
|
||||||
msgstr "Cambiar de usuario"
|
msgstr "Cambiar de usuario"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:800
|
#: ../js/ui/userMenu.js:802
|
||||||
msgid "Log Out"
|
msgid "Log Out"
|
||||||
msgstr "Saír da sesión"
|
msgstr "Saír da sesión"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:820
|
#: ../js/ui/userMenu.js:822
|
||||||
msgid "Install Updates & Restart"
|
msgid "Install Updates & Restart"
|
||||||
msgstr "Instalar actualizacións e reiniciar"
|
msgstr "Instalar actualizacións e reiniciar"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:838
|
#: ../js/ui/userMenu.js:840
|
||||||
msgid "Your chat status will be set to busy"
|
msgid "Your chat status will be set to busy"
|
||||||
msgstr "O seu estado de conversa definirase como «ocupado»"
|
msgstr "O seu estado de conversa estabelecerase a «ocupado»"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:839
|
#: ../js/ui/userMenu.js:841
|
||||||
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."
|
||||||
@ -1839,33 +1828,35 @@ msgstr ""
|
|||||||
"conversa. O seu estado de conexión axustouse para que outros saiban que non "
|
"conversa. O seu estado de conexión axustouse para que outros saiban que non "
|
||||||
"quere ver as súas mensaxes."
|
"quere ver as súas mensaxes."
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:885
|
#: ../js/ui/userMenu.js:888
|
||||||
msgid "Other users are logged in."
|
msgid "Other users are logged in."
|
||||||
msgstr "Hai outros usuarios conectados."
|
msgstr "Hai outros usuarios conectados."
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:890
|
#: ../js/ui/userMenu.js:893
|
||||||
msgid "Shutting down might cause them to lose unsaved work."
|
msgid "Shutting down might cause them to lose unsaved work."
|
||||||
msgstr "Se apaga o computador pode perder o traballo que non gardou."
|
msgstr "Se apaga o computador pode perder o traballo que non gardou."
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:916
|
#. Translators: Remote here refers to a remote session, like a ssh login
|
||||||
|
#: ../js/ui/userMenu.js:921
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s (remote)"
|
msgid "%s (remote)"
|
||||||
msgstr "%s (remoto)"
|
msgstr "%s (remoto)"
|
||||||
|
|
||||||
#: ../js/ui/userMenu.js:918
|
#. Translators: Console here refers to a tty like a VT console
|
||||||
|
#: ../js/ui/userMenu.js:924
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s (console)"
|
msgid "%s (console)"
|
||||||
msgstr "%s (consola)"
|
msgstr "%s (consola)"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:101
|
#: ../js/ui/viewSelector.js:100
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "Aplicativos"
|
msgstr "Aplicativos"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:105
|
#: ../js/ui/viewSelector.js:104
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Buscar"
|
msgstr "Buscar"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:92
|
#: ../js/ui/wanda.js:77
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Sorry, no wisdom for you today:\n"
|
"Sorry, no wisdom for you today:\n"
|
||||||
@ -1874,7 +1865,7 @@ msgstr ""
|
|||||||
"Hoxe non ten ningunha mensaxe:\n"
|
"Hoxe non ten ningunha mensaxe:\n"
|
||||||
"%s"
|
"%s"
|
||||||
|
|
||||||
#: ../js/ui/wanda.js:96
|
#: ../js/ui/wanda.js:81
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s the Oracle says"
|
msgid "%s the Oracle says"
|
||||||
msgstr "%s o oráculo dí"
|
msgstr "%s o oráculo dí"
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user