Compare commits
163 Commits
wip/exalm/
...
gnome-3-34
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6ace7a325 | ||
|
|
c38196dd85 | ||
|
|
059af4c4cd | ||
|
|
aba60dcac8 | ||
|
|
3d7ee7856f | ||
|
|
0a50b6ea01 | ||
|
|
c5dd9a9341 | ||
|
|
2756806f84 | ||
|
|
bb9c286e3f | ||
|
|
cf2ab505a0 | ||
|
|
b7389b328c | ||
|
|
99d948559b | ||
|
|
f21a0ff458 | ||
|
|
ec852ab265 | ||
|
|
a8bb7c0a2a | ||
|
|
8a8c6e2f23 | ||
|
|
f7fe7bc676 | ||
|
|
a35f9a5226 | ||
|
|
fb74394d58 | ||
|
|
9f7b1bd677 | ||
|
|
afd2ce2353 | ||
|
|
61fccf188a | ||
|
|
5043e6d6bd | ||
|
|
7be1729cde | ||
|
|
f92cb46b02 | ||
|
|
56902542c7 | ||
|
|
523eea4527 | ||
|
|
a7b0e96304 | ||
|
|
bb24df2f9d | ||
|
|
9150cbca3e | ||
|
|
35bb67bb2f | ||
|
|
d4c2f9d0ef | ||
|
|
e211c68a5c | ||
|
|
af95883807 | ||
|
|
91f41105d5 | ||
|
|
45fa520cca | ||
|
|
334762ee9e | ||
|
|
88e3dfa104 | ||
|
|
4b89314813 | ||
|
|
a9fa4cc49e | ||
|
|
9476c9c4ca | ||
|
|
24df43d579 | ||
|
|
363336e4a1 | ||
|
|
070c784412 | ||
|
|
455eb67a49 | ||
|
|
23cc59f52a | ||
|
|
19bb459a57 | ||
|
|
48477443fa | ||
|
|
40b2fbf465 | ||
|
|
7800bd2158 | ||
|
|
d4f07410a1 | ||
|
|
64b62de5df | ||
|
|
9b0d42309b | ||
|
|
cf249ab870 | ||
|
|
c752682ab9 | ||
|
|
a6e4ef862c | ||
|
|
8d2365b7b9 | ||
|
|
03219f745d | ||
|
|
7d34dee77f | ||
|
|
f0e59ea088 | ||
|
|
f8a90f6583 | ||
|
|
aa1d297bdf | ||
|
|
b88f7d0655 | ||
|
|
59daa4192c | ||
|
|
d08cd1f523 | ||
|
|
a85cddada0 | ||
|
|
ae8568a2e0 | ||
|
|
4a3ca40c48 | ||
|
|
e257be64d0 | ||
|
|
96ac00b53c | ||
|
|
7e8884a601 | ||
|
|
ef726bf313 | ||
|
|
a43c22e3af | ||
|
|
22b6a09cd7 | ||
|
|
65110968c5 | ||
|
|
d142f59478 | ||
|
|
c1ecd304e7 | ||
|
|
750c5acd30 | ||
|
|
246150d8b6 | ||
|
|
072a9a4842 | ||
|
|
7149da3f4f | ||
|
|
6c2a82258e | ||
|
|
279024afc2 | ||
|
|
ef8000d2e6 | ||
|
|
986600ab31 | ||
|
|
3d39b32a0b | ||
|
|
6205d5eb27 | ||
|
|
a722b4c51d | ||
|
|
31fe517007 | ||
|
|
31d915a38a | ||
|
|
e00878ab75 | ||
|
|
3b5675b79a | ||
|
|
ee97512bcc | ||
|
|
085531b43d | ||
|
|
9e8b97d474 | ||
|
|
a3a7953704 | ||
|
|
92c0171aeb | ||
|
|
6a6d66486d | ||
|
|
1cc766d636 | ||
|
|
60cad01880 | ||
|
|
63c9a6efd0 | ||
|
|
1d1b42756f | ||
|
|
a95601afdb | ||
|
|
2dbdf792db | ||
|
|
e23ce37e62 | ||
|
|
a05cb76e0d | ||
|
|
60cab56f86 | ||
|
|
70a5c3875c | ||
|
|
0fdbde9101 | ||
|
|
2156577333 | ||
|
|
f3e09b2b2f | ||
|
|
6180f59c13 | ||
|
|
506b75fc7f | ||
|
|
a0d0a17d68 | ||
|
|
92e5713e29 | ||
|
|
856c32db91 | ||
|
|
7b45ffa511 | ||
|
|
b6754d7db7 | ||
|
|
2a9977a5b3 | ||
|
|
dab60d5580 | ||
|
|
8e3aac8ed7 | ||
|
|
147cb53140 | ||
|
|
54f369404a | ||
|
|
af1aabff75 | ||
|
|
d6ba6dc554 | ||
|
|
42188b7698 | ||
|
|
48adb2ef4b | ||
|
|
f8e648b7e3 | ||
|
|
daa5452af2 | ||
|
|
259874d731 | ||
|
|
23344701de | ||
|
|
00e95de114 | ||
|
|
942758bb30 | ||
|
|
e0947b01bd | ||
|
|
cf00231aa8 | ||
|
|
5c3f4f5f8b | ||
|
|
5f10047b58 | ||
|
|
3094f86334 | ||
|
|
8ffea9d5c5 | ||
|
|
4f3c8b8d69 | ||
|
|
edf6bd6909 | ||
|
|
3e58af10ca | ||
|
|
9e55d262f9 | ||
|
|
252e694979 | ||
|
|
efed695eca | ||
|
|
b446667df6 | ||
|
|
133a1e7bef | ||
|
|
5b3935fa43 | ||
|
|
471165ca9b | ||
|
|
111f87a1b2 | ||
|
|
93525539c2 | ||
|
|
a77377efe7 | ||
|
|
81ab2865f7 | ||
|
|
e585f7d97b | ||
|
|
1a32e3e74a | ||
|
|
8d6820c4df | ||
|
|
2546445884 | ||
|
|
e44b7df078 | ||
|
|
3a9eaa39ea | ||
|
|
af87bd8c87 | ||
|
|
4bfb4a0e3d | ||
|
|
d1a6601e60 | ||
|
|
817aec5466 |
@@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
shell_branch=$(git describe --contains --all HEAD)
|
|
||||||
mutter_target=
|
mutter_target=
|
||||||
|
|
||||||
git clone https://gitlab.gnome.org/GNOME/mutter.git
|
git clone https://gitlab.gnome.org/GNOME/mutter.git
|
||||||
@@ -26,8 +25,7 @@ if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$mutter_target" ]; then
|
if [ -z "$mutter_target" ]; then
|
||||||
mutter_target=$(git branch -r -l origin/$shell_branch)
|
mutter_target=$(git branch -r -l origin/$CI_COMMIT_REF_NAME)
|
||||||
mutter_target=${mutter_target:-$(git branch -r -l ${shell_branch#remotes/})}
|
|
||||||
mutter_target=${mutter_target:-origin/master}
|
mutter_target=${mutter_target:-origin/master}
|
||||||
echo Using $mutter_target instead
|
echo Using $mutter_target instead
|
||||||
fi
|
fi
|
||||||
|
|||||||
116
NEWS
116
NEWS
@@ -1,3 +1,119 @@
|
|||||||
|
3.34.5
|
||||||
|
======
|
||||||
|
* Leave overview when locking the screen [Jonas D.; !1043]
|
||||||
|
* Avoid IO on the main thread [Christian; !1050]
|
||||||
|
* Fix OSK layout fallback for unsupported variants [Florian; #2471]
|
||||||
|
* Fix high-contrast/symbolic icon mix-up [Florian; #2414]
|
||||||
|
* Misc. bug fixes and cleanups [Jonas Å., Florian; !1032, #2386]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Dreßler, Christian Hergert, Florian Müllner, Jwtiyar Nariman,
|
||||||
|
Jonas Ådahl
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Jwtiyar Nariman [ckb]
|
||||||
|
|
||||||
|
3.34.4
|
||||||
|
======
|
||||||
|
* Switch screen-recorder back to VP8 [Björn; #256]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Björn Daase
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Jor Teron [mjw], Dušan Kazik [sk]
|
||||||
|
|
||||||
|
3.34.3
|
||||||
|
======
|
||||||
|
* polkitAgent: Fix confirming via keyboard when password-less [Jonas; #2066]
|
||||||
|
* Misc. bug fixes and cleanups [Florian; !906]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Dreßler, Florian Müllner
|
||||||
|
|
||||||
|
3.34.2
|
||||||
|
======
|
||||||
|
* Fix unredirection after cancelled animations [Florian; #1788]
|
||||||
|
* Use cached coordinates for window sorting in overview [Andrew; !763]
|
||||||
|
* Include shadow in window screenshots [Robert; !762]
|
||||||
|
* Use correct timezones for events [Milan, Florian; !806, #1895]
|
||||||
|
* Adjust style of system menu action buttons [monday; !802]
|
||||||
|
* Fix windows getting stuck on screen if closed while animating [Florian; !815]
|
||||||
|
* Hide stopped spinner in top bar [Joonas; !834]
|
||||||
|
* Reuse existing icons when updating the app picker grid [Georges; !841]
|
||||||
|
* Fix not-responding dialog size when using geometry scaling [Jonas; !783]
|
||||||
|
* Fix battery icon glitch in "100% but charging" case [Philip; !814]
|
||||||
|
* Update window titles in app menu [Florian; #1830]
|
||||||
|
* Improve modifier-less keyboard navigation of switcher popups [Florian; #1883]
|
||||||
|
* Use better OSK layout fallback for unsupported variants [Florian; #1907]
|
||||||
|
* Fix creating app folders with no pre-existing folders [Jonas; #1652]
|
||||||
|
* Improve DND page switching in app picker [Florian, Jonas; #1693]
|
||||||
|
* Show polkit confirmation dialog for users with no password [Joaquim; !829]
|
||||||
|
* Fix interacting with applications when magnifier is enabled [Jonas; !754]
|
||||||
|
* Tweak styling of notifications/media constrols [Joonas; !855, !865]
|
||||||
|
* Fix disable command of gnome-extensions tool [Florian; #1946]
|
||||||
|
* Enable clean session shutdown after gnome-shell failure [Benjamin; !858]
|
||||||
|
* Also remove scaled keys when texture cache is cleared [Daniel; !567]
|
||||||
|
* Don't show overflow indicator in switchers that fit screen [Florian; #1834]
|
||||||
|
* Place launched applications into a systemd scope [Benjamin; !863]
|
||||||
|
* Fix weather forecasts for automatic location when Weather is not sandboxed
|
||||||
|
[Florian; #1823]
|
||||||
|
* Dismiss switcher popups when a system modal dialogs opens [Florian; #1536]
|
||||||
|
* Misc. bug fixes and cleanups [Marco, Philip, Florian, cunidev, Jonas, Joonas;
|
||||||
|
!758, !749, !777, !811, #1884, !823, !840, !782, !847, #1836, !852, !851,
|
||||||
|
!788, #1916, !866, !884]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Marco Trevisan (Treviño), Benjamin Berg, Philip Chimento, Milan Crha,
|
||||||
|
Jonas Dreßler, Joonas Henriksson, Robert Mader, Daniel García Moreno,
|
||||||
|
Florian Müllner, Georges Basile Stavracas Neto, Joaquim Rocha, Andrew Watson,
|
||||||
|
cunidev, monday
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Stas Solovey [ru], Ricardo Silva Veloso [pt_BR], Yi-Jyun Pan [zh_TW],
|
||||||
|
Umarzuki Bin Mochlis Moktar [ms]
|
||||||
|
|
||||||
|
3.34.1
|
||||||
|
======
|
||||||
|
* Fix "Frequent" view icons disappearing on hover [Jonas D.; #1502]
|
||||||
|
* Allow editing app folder names [Georges, Marco; !675, !720]
|
||||||
|
* Skip property transitions while hidden [Florian; !708]
|
||||||
|
* Make menu animations more consistent [Florian, GB_2; #1595, !717]
|
||||||
|
* Improve performance when enabling/disabling all extensions [Jonas D.; !96]
|
||||||
|
* Fix extra icons appearing in "Frequent" view animation [Georges; !696]
|
||||||
|
* Fix fading out desktop icons [Harshula; #1616]
|
||||||
|
* Fix box-shadow glitch with prerendered resources [Daniel; #1186]
|
||||||
|
* Fix accidentally skipped animations [Florian; #1572]
|
||||||
|
* Fix screenshots and window animations when scaled [Robert; !728]
|
||||||
|
* Don't leak NOTIFY_SOCKET environment variable to applications [Benjamin; !741]
|
||||||
|
* Fix lock-up on X11 when ibus is already running on startup [Marco; #1712]
|
||||||
|
* Fix screen dimming on idle [Marco; #1683]
|
||||||
|
* Do not notify systemd before initialization is complete [Iain; !750]
|
||||||
|
* Support SAE secrets in network agent [Lubomir; !751]
|
||||||
|
* Fix various regressions with dynamic workspaces [Florian; #1497]
|
||||||
|
* Fixed crashes [Florian, Marco; #1678, !746]
|
||||||
|
* Misc. bug fixes and cleanups [Marco, Jonas D., Florian, Iain, Georges,
|
||||||
|
Jonas Å., Martin, Takao, Carlos; !700, !705, !709, !711, !707, #1538, !710,
|
||||||
|
!713, !699, !715, !718, !716, !719, !721, #1243, !725, !731, #1614, !683,
|
||||||
|
!732, !121, !735, !736, !740, #573, #1641, #1571]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Marco Trevisan (Treviño), Benjamin Berg, Jonas Dreßler, Takao Fujiwara, GB_2,
|
||||||
|
Carlos Garnacho, Harshula Jayasuriya, Iain Lane, Robert Mader,
|
||||||
|
Daniel García Moreno, Florian Müllner, Georges Basile Stavracas Neto,
|
||||||
|
Lubomir Rintel, Martin Zurowietz, Jonas Ådahl
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Rafael Fontenelle [pt_BR], Fran Dieguez [gl], Balázs Úr [hu],
|
||||||
|
Milo Casagrande [it], Daniel Șerbănescu [ro], Kukuh Syafaat [id],
|
||||||
|
Jiri Grönroos [fi], Daniel Mustieles [es], Piotr Drąg [pl],
|
||||||
|
Anders Jonsson [sv], Marek Černocký [cs], Jordi Mas [ca],
|
||||||
|
Aurimas Černius [lt], Christian Kirbach [de], Emin Tufan Çetin [tr],
|
||||||
|
Enrico Nicoletto [pt_BR], Danial Behzadi [fa], Марко Костић [sr],
|
||||||
|
Alexandre Franke [fr], Charles Monzat [fr], Kjartan Maraas [nb],
|
||||||
|
Ryuta Fujii [ja], Nathan Follens [nl], Dušan Kazik [sk], Fabio Tomat [fur],
|
||||||
|
Matej Urbančič [sl], Ask Hjorth Larsen [da], Alan Mortensen [da]
|
||||||
|
|
||||||
3.34.0
|
3.34.0
|
||||||
======
|
======
|
||||||
* Handle startup/shutdown of misc X11 services [Carlos; !680]
|
* Handle startup/shutdown of misc X11 services [Carlos; !680]
|
||||||
|
|||||||
@@ -30,3 +30,6 @@
|
|||||||
|
|
||||||
/* Define if fdwalk is available in libc */
|
/* Define if fdwalk is available in libc */
|
||||||
#mesondefine HAVE_FDWALK
|
#mesondefine HAVE_FDWALK
|
||||||
|
|
||||||
|
/* Define if we have gnome-desktop systemd utils */
|
||||||
|
#mesondefine HAVE_GNOME_SYSTEMD
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Disable GNOME Shell extensions after failure
|
Description=Disable GNOME Shell extensions after failure
|
||||||
|
# Note that this unit must not conflict with anything, and must
|
||||||
|
# be able to run in parallel with the gnome-session-shutdown.target.
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
|
|
||||||
# Only disable extensions for a short period of time after login.
|
# We want to disable extensions only if gnome-shell has flagged the extensions
|
||||||
# This means we err on the side of failing the first login after a broken
|
# to be a likely cause of trouble.
|
||||||
# extension was installed.
|
ConditionPathExists=%t/gnome-shell-disable-extensions
|
||||||
Requisite=gnome-session-stable.timer
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|||||||
@@ -610,13 +610,12 @@ StScrollBar {
|
|||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Rename popup
|
// Rename popup
|
||||||
|
.rename-folder-popup {
|
||||||
.rename-folder-popup-box {
|
.rename-folder-popup-item {
|
||||||
spacing: 6px;
|
spacing: 6px;
|
||||||
margin-left: 12px;
|
&:ltr, &:rtl { padding: 0, 12px; }
|
||||||
margin-right: 12px;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Background menu
|
// Background menu
|
||||||
@@ -750,7 +749,7 @@ StScrollBar {
|
|||||||
|
|
||||||
.ws-switcher-active-up, .ws-switcher-active-down,
|
.ws-switcher-active-up, .ws-switcher-active-down,
|
||||||
.ws-switcher-active-left, .ws-switcher-active-right {
|
.ws-switcher-active-left, .ws-switcher-active-right {
|
||||||
height: 50px;
|
height: 52px;
|
||||||
background-color: $selected_bg_color;
|
background-color: $selected_bg_color;
|
||||||
color: $selected_fg_color;
|
color: $selected_fg_color;
|
||||||
background-size: 32px;
|
background-size: 32px;
|
||||||
@@ -1062,9 +1061,9 @@ StScrollBar {
|
|||||||
}
|
}
|
||||||
.calendar-today {
|
.calendar-today {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
//color: lighten($fg_color,10%);
|
color: lighten($fg_color,5%);
|
||||||
//background-color: darken($bg_color,5%);
|
background-color: darken($bg_color,5%);
|
||||||
border: 1px solid $_bubble_borders_color;
|
// border: 1px solid lighten($_bubble_borders_color,20%);
|
||||||
}
|
}
|
||||||
.calendar-day-with-events {
|
.calendar-day-with-events {
|
||||||
color: lighten($fg_color,10%);
|
color: lighten($fg_color,10%);
|
||||||
@@ -1154,14 +1153,21 @@ StScrollBar {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.message-close-button {
|
||||||
|
color: lighten($fg_color, 15%);
|
||||||
|
&:hover { color: if($variant=='light', lighten($fg_color, 30%), darken($fg_color, 10%)); }
|
||||||
|
&:active { color: if($variant=='light', lighten($fg_color, 40%), darken($fg_color, 20%)); }
|
||||||
|
}
|
||||||
|
|
||||||
.message-media-control {
|
.message-media-control {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
color: lighten($fg_color, 15%);
|
color: lighten($fg_color, 15%);
|
||||||
|
|
||||||
&:last-child:ltr { padding-right: 18px; }
|
&:last-child:ltr { padding-right: 18px; }
|
||||||
&:last-child:rtl { padding-left: 18px; }
|
&:last-child:rtl { padding-left: 18px; }
|
||||||
&:hover { color: $fg_color; }
|
&:hover { color: if($variant=='light', lighten($fg_color, 30%), darken($fg_color, 10%)); }
|
||||||
&:insensitive { color: darken($fg_color,40%); }
|
&:active { color: if($variant=='light', lighten($fg_color, 40%), darken($fg_color, 20%)); }
|
||||||
|
&:insensitive { color: if($variant=='light', lighten($fg_color, 50%), darken($fg_color, 40%)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.media-message-cover-icon {
|
.media-message-cover-icon {
|
||||||
@@ -1210,12 +1216,11 @@ StScrollBar {
|
|||||||
&:hover, &:focus {
|
&:hover, &:focus {
|
||||||
background-color: $_hover_bg_color;
|
background-color: $_hover_bg_color;
|
||||||
color: $fg_color;
|
color: $fg_color;
|
||||||
border: none;
|
|
||||||
padding: 14px;
|
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
background-color: $selected_bg_color;
|
background-color: $selected_bg_color;
|
||||||
color: $selected_fg_color;
|
color: $selected_fg_color;
|
||||||
|
border-color: $selected_borders_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > StIcon { icon-size: 16px; }
|
& > StIcon { icon-size: 16px; }
|
||||||
|
|||||||
@@ -285,8 +285,9 @@ var Application = GObject.registerClass({
|
|||||||
log(`Failed to connect to shell proxy: ${e}`);
|
log(`Failed to connect to shell proxy: ${e}`);
|
||||||
this._mainStack.add_named(new NoShellPlaceholder(), 'noshell');
|
this._mainStack.add_named(new NoShellPlaceholder(), 'noshell');
|
||||||
this._mainStack.visible_child_name = 'noshell';
|
this._mainStack.visible_child_name = 'noshell';
|
||||||
} else
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,6 @@ var ConsecutiveBatch = class extends Batch {
|
|||||||
hold.disconnect(signalId);
|
hold.disconnect(signalId);
|
||||||
this.nextTask();
|
this.nextTask();
|
||||||
});
|
});
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
// This task finished, process the next one
|
// This task finished, process the next one
|
||||||
this.nextTask();
|
this.nextTask();
|
||||||
|
|||||||
@@ -921,7 +921,7 @@ var LoginDialog = GObject.registerClass({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._bindOpacity();
|
this._bindOpacity();
|
||||||
this.actor.ease({
|
this.ease({
|
||||||
opacity: 255,
|
opacity: 255,
|
||||||
duration: _FADE_ANIMATION_TIME,
|
duration: _FADE_ANIMATION_TIME,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
@@ -944,7 +944,7 @@ var LoginDialog = GObject.registerClass({
|
|||||||
|
|
||||||
_startSession(serviceName) {
|
_startSession(serviceName) {
|
||||||
this._bindOpacity();
|
this._bindOpacity();
|
||||||
this.actor.ease({
|
this.ease({
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: _FADE_ANIMATION_TIME,
|
duration: _FADE_ANIMATION_TIME,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
|
|||||||
@@ -15,6 +15,5 @@ var LOCALEDIR = '@datadir@/locale';
|
|||||||
/* other standard directories */
|
/* other standard directories */
|
||||||
var LIBEXECDIR = '@libexecdir@';
|
var LIBEXECDIR = '@libexecdir@';
|
||||||
var PKGDATADIR = '@datadir@/@PACKAGE_NAME@';
|
var PKGDATADIR = '@datadir@/@PACKAGE_NAME@';
|
||||||
var VPNDIR = '@vpndir@';
|
|
||||||
/* g-i package versions */
|
/* g-i package versions */
|
||||||
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
|
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ var HistoryManager = class {
|
|||||||
this._entry = params.entry;
|
this._entry = params.entry;
|
||||||
|
|
||||||
if (this._entry) {
|
if (this._entry) {
|
||||||
this._entry.connect('key-press-event',
|
this._entry.connect('key-press-event',
|
||||||
this._onEntryKeyPress.bind(this));
|
this._onEntryKeyPress.bind(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,16 @@ var IBusManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_clear() {
|
_clear() {
|
||||||
|
if (this._cancellable) {
|
||||||
|
this._cancellable.cancel();
|
||||||
|
this._cancellable = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._preloadEnginesId) {
|
||||||
|
GLib.source_remove(this._preloadEnginesId);
|
||||||
|
this._preloadEnginesId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._panelService)
|
if (this._panelService)
|
||||||
this._panelService.destroy();
|
this._panelService.destroy();
|
||||||
|
|
||||||
@@ -86,28 +96,41 @@ var IBusManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onConnected() {
|
_onConnected() {
|
||||||
this._ibus.list_engines_async(-1, null, this._initEngines.bind(this));
|
this._cancellable = new Gio.Cancellable();
|
||||||
|
this._ibus.list_engines_async(-1, this._cancellable,
|
||||||
|
this._initEngines.bind(this));
|
||||||
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, this._cancellable,
|
||||||
-1, null,
|
this._initPanelService.bind(this));
|
||||||
this._initPanelService.bind(this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_initEngines(ibus, result) {
|
_initEngines(ibus, result) {
|
||||||
let enginesList = this._ibus.list_engines_async_finish(result);
|
try {
|
||||||
if (enginesList) {
|
let enginesList = this._ibus.list_engines_async_finish(result);
|
||||||
for (let i = 0; i < enginesList.length; ++i) {
|
for (let i = 0; i < enginesList.length; ++i) {
|
||||||
let name = enginesList[i].get_name();
|
let name = enginesList[i].get_name();
|
||||||
this._engines.set(name, enginesList[i]);
|
this._engines.set(name, enginesList[i]);
|
||||||
}
|
}
|
||||||
this._updateReadiness();
|
this._updateReadiness();
|
||||||
} else {
|
} catch (e) {
|
||||||
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
|
return;
|
||||||
|
|
||||||
|
logError(e);
|
||||||
this._clear();
|
this._clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_initPanelService(ibus, result) {
|
_initPanelService(ibus, result) {
|
||||||
let success = this._ibus.request_name_async_finish(result);
|
let success = false;
|
||||||
|
try {
|
||||||
|
success = !!this._ibus.request_name_async_finish(result);
|
||||||
|
} catch (e) {
|
||||||
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
|
return;
|
||||||
|
logError(e);
|
||||||
|
}
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
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 });
|
||||||
@@ -134,7 +157,7 @@ var IBusManager = class {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
// 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, (i, result) => {
|
this._ibus.get_global_engine_async(-1, this._cancellable, (_bus, result) => {
|
||||||
let engine;
|
let engine;
|
||||||
try {
|
try {
|
||||||
engine = this._ibus.get_global_engine_async_finish(result);
|
engine = this._ibus.get_global_engine_async_finish(result);
|
||||||
@@ -206,8 +229,18 @@ var IBusManager = class {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._ibus.set_global_engine_async(id, this._MAX_INPUT_SOURCE_ACTIVATION_TIME,
|
this._ibus.set_global_engine_async(id,
|
||||||
null, callback || null);
|
this._MAX_INPUT_SOURCE_ACTIVATION_TIME,
|
||||||
|
this._cancellable, (_bus, res) => {
|
||||||
|
try {
|
||||||
|
this._ibus.set_global_engine_async_finish(res);
|
||||||
|
} catch (e) {
|
||||||
|
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
|
logError(e);
|
||||||
|
}
|
||||||
|
if (callback)
|
||||||
|
callback();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
preloadEngines(ids) {
|
preloadEngines(ids) {
|
||||||
@@ -227,7 +260,7 @@ var IBusManager = class {
|
|||||||
this._ibus.preload_engines_async(
|
this._ibus.preload_engines_async(
|
||||||
ids,
|
ids,
|
||||||
-1,
|
-1,
|
||||||
null,
|
this._cancellable,
|
||||||
null);
|
null);
|
||||||
this._preloadEnginesId = 0;
|
this._preloadEnginesId = 0;
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported InputMethod */
|
/* exported InputMethod */
|
||||||
const { Clutter, GLib, GObject, IBus } = imports.gi;
|
const { Clutter, GLib, Gio, GObject, IBus } = imports.gi;
|
||||||
|
|
||||||
const Keyboard = imports.ui.status.keyboard;
|
const Keyboard = imports.ui.status.keyboard;
|
||||||
|
|
||||||
@@ -36,15 +36,7 @@ class InputMethod extends Clutter.InputMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateCapabilities() {
|
_updateCapabilities() {
|
||||||
let caps = 0;
|
let caps = IBus.Capabilite.PREEDIT_TEXT | IBus.Capabilite.FOCUS | IBus.Capabilite.SURROUNDING_TEXT;
|
||||||
|
|
||||||
if (this.can_show_preedit)
|
|
||||||
caps |= IBus.Capabilite.PREEDIT_TEXT;
|
|
||||||
|
|
||||||
if (this._currentFocus)
|
|
||||||
caps |= IBus.Capabilite.FOCUS | IBus.Capabilite.SURROUNDING_TEXT;
|
|
||||||
else
|
|
||||||
caps |= IBus.Capabilite.PREEDIT_TEXT | IBus.Capabilite.AUXILIARY_TEXT | IBus.Capabilite.LOOKUP_TABLE | IBus.Capabilite.PROPERTY;
|
|
||||||
|
|
||||||
if (this._context)
|
if (this._context)
|
||||||
this._context.set_capabilities(caps);
|
this._context.set_capabilities(caps);
|
||||||
@@ -55,12 +47,22 @@ class InputMethod extends Clutter.InputMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onConnected() {
|
_onConnected() {
|
||||||
this._ibus.create_input_context_async ('gnome-shell', -1, null,
|
this._cancellable = new Gio.Cancellable();
|
||||||
this._setContext.bind(this));
|
this._ibus.create_input_context_async ('gnome-shell', -1,
|
||||||
|
this._cancellable, this._setContext.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
_setContext(bus, res) {
|
_setContext(bus, res) {
|
||||||
this._context = this._ibus.create_input_context_async_finish(res);
|
try {
|
||||||
|
this._context = this._ibus.create_input_context_async_finish(res);
|
||||||
|
} catch (e) {
|
||||||
|
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
|
||||||
|
logError(e);
|
||||||
|
this._clear();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._context.connect('commit-text', this._onCommitText.bind(this));
|
this._context.connect('commit-text', this._onCommitText.bind(this));
|
||||||
this._context.connect('delete-surrounding-text', this._onDeleteSurroundingText.bind(this));
|
this._context.connect('delete-surrounding-text', this._onDeleteSurroundingText.bind(this));
|
||||||
this._context.connect('update-preedit-text', this._onUpdatePreeditText.bind(this));
|
this._context.connect('update-preedit-text', this._onUpdatePreeditText.bind(this));
|
||||||
@@ -72,6 +74,11 @@ class InputMethod extends Clutter.InputMethod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_clear() {
|
_clear() {
|
||||||
|
if (this._cancellable) {
|
||||||
|
this._cancellable.cancel();
|
||||||
|
this._cancellable = null;
|
||||||
|
}
|
||||||
|
|
||||||
this._context = null;
|
this._context = null;
|
||||||
this._hints = 0;
|
this._hints = 0;
|
||||||
this._purpose = 0;
|
this._purpose = 0;
|
||||||
@@ -137,7 +144,6 @@ class InputMethod extends Clutter.InputMethod {
|
|||||||
this._currentFocus = focus;
|
this._currentFocus = focus;
|
||||||
if (this._context) {
|
if (this._context) {
|
||||||
this._context.focus_in();
|
this._context.focus_in();
|
||||||
this._updateCapabilities();
|
|
||||||
this._emitRequestSurrounding();
|
this._emitRequestSurrounding();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,10 +155,8 @@ class InputMethod extends Clutter.InputMethod {
|
|||||||
|
|
||||||
vfunc_focus_out() {
|
vfunc_focus_out() {
|
||||||
this._currentFocus = null;
|
this._currentFocus = null;
|
||||||
if (this._context) {
|
if (this._context)
|
||||||
this._context.focus_out();
|
this._context.focus_out();
|
||||||
this._updateCapabilities();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._preeditStr) {
|
if (this._preeditStr) {
|
||||||
// Unset any preedit text
|
// Unset any preedit text
|
||||||
@@ -255,17 +259,19 @@ class InputMethod extends Clutter.InputMethod {
|
|||||||
if (event.type() == Clutter.EventType.KEY_RELEASE)
|
if (event.type() == Clutter.EventType.KEY_RELEASE)
|
||||||
state |= IBus.ModifierType.RELEASE_MASK;
|
state |= IBus.ModifierType.RELEASE_MASK;
|
||||||
|
|
||||||
this._context.process_key_event_async(event.get_key_symbol(),
|
this._context.process_key_event_async(
|
||||||
event.get_key_code() - 8, // Convert XKB keycodes to evcodes
|
event.get_key_symbol(),
|
||||||
state, -1, null,
|
event.get_key_code() - 8, // Convert XKB keycodes to evcodes
|
||||||
(context, res) => {
|
state, -1, this._cancellable,
|
||||||
try {
|
(context, res) => {
|
||||||
let retval = context.process_key_event_async_finish(res);
|
try {
|
||||||
this.notify_key_event(event, retval);
|
let retval = context.process_key_event_async_finish(res);
|
||||||
} catch (e) {
|
this.notify_key_event(event, retval);
|
||||||
log(`Error processing key on IM: ${e.message}`);
|
} catch (e) {
|
||||||
}
|
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
|
||||||
});
|
log(`Error processing key on IM: ${e.message}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,6 +40,15 @@ var IntrospectService = class {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this._syncRunningApplications();
|
this._syncRunningApplications();
|
||||||
|
|
||||||
|
this._whitelistMap = new Map();
|
||||||
|
APP_WHITELIST.forEach(appName => {
|
||||||
|
Gio.DBus.watch_name(Gio.BusType.SESSION,
|
||||||
|
appName,
|
||||||
|
Gio.BusNameWatcherFlags.NONE,
|
||||||
|
(conn, name, owner) => this._whitelistMap.set(name, owner),
|
||||||
|
(conn, name) => this._whitelistMap.delete(name));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_isStandaloneApp(app) {
|
_isStandaloneApp(app) {
|
||||||
@@ -51,7 +60,7 @@ var IntrospectService = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_isSenderWhitelisted(sender) {
|
_isSenderWhitelisted(sender) {
|
||||||
return APP_WHITELIST.includes(sender);
|
return [...this._whitelistMap.values()].includes(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
_getSandboxedAppId(app) {
|
_getSandboxedAppId(app) {
|
||||||
@@ -127,7 +136,8 @@ var IntrospectService = class {
|
|||||||
let apps = this._appSystem.get_running();
|
let apps = this._appSystem.get_running();
|
||||||
let windowsList = {};
|
let windowsList = {};
|
||||||
|
|
||||||
if (!this._isIntrospectEnabled()) {
|
if (!this._isIntrospectEnabled() &&
|
||||||
|
!this._isSenderWhitelisted(invocation.get_sender())) {
|
||||||
invocation.return_error_literal(Gio.DBusError,
|
invocation.return_error_literal(Gio.DBusError,
|
||||||
Gio.DBusError.ACCESS_DENIED,
|
Gio.DBusError.ACCESS_DENIED,
|
||||||
'App introspection not allowed');
|
'App introspection not allowed');
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ function getPropertyNamesFromExpression(expr, commandHeader = '') {
|
|||||||
|
|
||||||
// Make sure propsUnique contains one key for every
|
// Make sure propsUnique contains one key for every
|
||||||
// property so we end up with a unique list of properties
|
// property so we end up with a unique list of properties
|
||||||
allProps.map(p => propsUnique[p] = null);
|
allProps.map(p => (propsUnique[p] = null));
|
||||||
}
|
}
|
||||||
return Object.keys(propsUnique).sort();
|
return Object.keys(propsUnique).sort();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ jsconf.set10('HAVE_BLUETOOTH', bt_dep.found())
|
|||||||
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
|
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
|
||||||
jsconf.set('datadir', datadir)
|
jsconf.set('datadir', datadir)
|
||||||
jsconf.set('libexecdir', libexecdir)
|
jsconf.set('libexecdir', libexecdir)
|
||||||
jsconf.set('vpndir', vpndir)
|
|
||||||
|
|
||||||
config_js = configure_file(
|
config_js = configure_file(
|
||||||
input: 'config.js.in',
|
input: 'config.js.in',
|
||||||
|
|||||||
@@ -84,9 +84,9 @@ function _findProviderForSid(sid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
// ----------------------------------------------------- //
|
||||||
// Support for the old ModemManager interface (MM < 0.7)
|
// Support for the old ModemManager interface (MM < 0.7) //
|
||||||
//------------------------------------------------------------------------------
|
// ----------------------------------------------------- //
|
||||||
|
|
||||||
|
|
||||||
// The following are not the complete interfaces, just the methods we need
|
// The following are not the complete interfaces, just the methods we need
|
||||||
@@ -182,9 +182,9 @@ var ModemCdma = class {
|
|||||||
Signals.addSignalMethods(ModemCdma.prototype);
|
Signals.addSignalMethods(ModemCdma.prototype);
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
// ------------------------------------------------------- //
|
||||||
// Support for the new ModemManager1 interface (MM >= 0.7)
|
// Support for the new ModemManager1 interface (MM >= 0.7) //
|
||||||
//------------------------------------------------------------------------------
|
// ------------------------------------------------------- //
|
||||||
|
|
||||||
const BroadbandModemInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem');
|
const BroadbandModemInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem');
|
||||||
const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface);
|
const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface);
|
||||||
|
|||||||
@@ -244,8 +244,9 @@ const SystemActions = GObject.registerClass({
|
|||||||
|
|
||||||
_updateOrientationLockIcon() {
|
_updateOrientationLockIcon() {
|
||||||
let locked = this._orientationSettings.get_boolean('orientation-lock');
|
let locked = this._orientationSettings.get_boolean('orientation-lock');
|
||||||
let iconName = locked ? 'rotation-locked-symbolic'
|
let iconName = locked
|
||||||
: 'rotation-allowed-symbolic';
|
? 'rotation-locked-symbolic'
|
||||||
|
: 'rotation-allowed-symbolic';
|
||||||
this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName = iconName;
|
this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName = iconName;
|
||||||
|
|
||||||
this.notify('orientation-lock-icon');
|
this.notify('orientation-lock-icon');
|
||||||
@@ -268,7 +269,7 @@ const SystemActions = GObject.registerClass({
|
|||||||
|
|
||||||
getMatchingActions(terms) {
|
getMatchingActions(terms) {
|
||||||
// terms is a list of strings
|
// terms is a list of strings
|
||||||
terms = terms.map((term) => term.toLowerCase());
|
terms = terms.map(term => term.toLowerCase());
|
||||||
|
|
||||||
let results = [];
|
let results = [];
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
formatTime, formatTimeSpan, createTimeLabel, insertSorted,
|
formatTime, formatTimeSpan, createTimeLabel, insertSorted,
|
||||||
makeCloseButton, ensureActorVisibleInScrollView */
|
makeCloseButton, ensureActorVisibleInScrollView */
|
||||||
|
|
||||||
const { Clutter, Gio, GLib, GObject, Shell, St } = imports.gi;
|
const { Clutter, Gio, GLib, GObject, Shell, St, GnomeDesktop } = imports.gi;
|
||||||
const Gettext = imports.gettext;
|
const Gettext = imports.gettext;
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@@ -14,7 +14,7 @@ var SCROLL_TIME = 100;
|
|||||||
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||||
const _balancedParens = '\\([^\\s()<>]+\\)';
|
const _balancedParens = '\\([^\\s()<>]+\\)';
|
||||||
const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]';
|
const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]';
|
||||||
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\u2018\u2019]';
|
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u200E\u200F\u201C\u201D\u2018\u2019\u202A\u202C]';
|
||||||
|
|
||||||
const _urlRegexp = new RegExp(
|
const _urlRegexp = new RegExp(
|
||||||
`(^|${_leadingJunk})` +
|
`(^|${_leadingJunk})` +
|
||||||
@@ -127,6 +127,14 @@ function trySpawn(argv) {
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Async call, we don't need the reply though
|
||||||
|
try {
|
||||||
|
GnomeDesktop.start_systemd_scope(argv[0], pid, null, null, null, () => {});
|
||||||
|
} catch (err) {
|
||||||
|
// Ignore error; it likely means GnomeDesktop is too old
|
||||||
|
}
|
||||||
|
|
||||||
// Dummy child watch; we don't want to double-fork internally
|
// Dummy child watch; we don't want to double-fork internally
|
||||||
// because then we lose the parent-child relationship, which
|
// because then we lose the parent-child relationship, which
|
||||||
// can break polkit. See https://bugzilla.redhat.com//show_bug.cgi?id=819275
|
// can break polkit. See https://bugzilla.redhat.com//show_bug.cgi?id=819275
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ var WeatherClient = class {
|
|||||||
this._gclueStarting = false;
|
this._gclueStarting = false;
|
||||||
this._gclueLocationChangedId = 0;
|
this._gclueLocationChangedId = 0;
|
||||||
|
|
||||||
|
this._needsAuth = true;
|
||||||
this._weatherAuthorized = false;
|
this._weatherAuthorized = false;
|
||||||
this._permStore = new PermissionStore.PermissionStore((proxy, error) => {
|
this._permStore = new PermissionStore.PermissionStore((proxy, error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
@@ -142,7 +143,7 @@ var WeatherClient = class {
|
|||||||
get _useAutoLocation() {
|
get _useAutoLocation() {
|
||||||
return this._autoLocationRequested &&
|
return this._autoLocationRequested &&
|
||||||
this._locationSettings.get_boolean('enabled') &&
|
this._locationSettings.get_boolean('enabled') &&
|
||||||
this._weatherAuthorized;
|
(!this._needsAuth || this._weatherAuthorized);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onWeatherProxyReady(o, res) {
|
_onWeatherProxyReady(o, res) {
|
||||||
@@ -175,6 +176,13 @@ var WeatherClient = class {
|
|||||||
|
|
||||||
if (hadApp !== haveApp)
|
if (hadApp !== haveApp)
|
||||||
this.emit('changed');
|
this.emit('changed');
|
||||||
|
|
||||||
|
let neededAuth = this._needsAuth;
|
||||||
|
this._needsAuth = this._weatherApp === null ||
|
||||||
|
this._weatherApp.app_info.has_key('X-Flatpak');
|
||||||
|
|
||||||
|
if (neededAuth !== this._needsAuth)
|
||||||
|
this._updateAutoLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
_loadInfo() {
|
_loadInfo() {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ function waitAndDraw(milliseconds) {
|
|||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
return callback => cb = callback;
|
return callback => (cb = callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function waitSignal(object, signal) {
|
function waitSignal(object, signal) {
|
||||||
@@ -69,7 +69,7 @@ function waitSignal(object, signal) {
|
|||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
return callback => cb = callback;
|
return callback => (cb = callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractBootTimestamp() {
|
function extractBootTimestamp() {
|
||||||
@@ -137,9 +137,9 @@ function *run() {
|
|||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
yield Scripting.waitLeisure();
|
yield Scripting.waitLeisure();
|
||||||
|
|
||||||
////////////////////////////////////////
|
// --------------------- //
|
||||||
// Tests of redraw speed
|
// Tests of redraw speed //
|
||||||
////////////////////////////////////////
|
// --------------------- //
|
||||||
|
|
||||||
global.frame_timestamps = true;
|
global.frame_timestamps = true;
|
||||||
global.frame_finish_timestamp = true;
|
global.frame_finish_timestamp = true;
|
||||||
@@ -186,8 +186,6 @@ function *run() {
|
|||||||
|
|
||||||
yield Scripting.sleep(1000);
|
yield Scripting.sleep(1000);
|
||||||
|
|
||||||
////////////////////////////////////////
|
|
||||||
|
|
||||||
let appSys = Shell.AppSystem.get_default();
|
let appSys = Shell.AppSystem.get_default();
|
||||||
let app = appSys.lookup_app('org.gnome.gedit.desktop');
|
let app = appSys.lookup_app('org.gnome.gedit.desktop');
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ var AccessDialogDBus = class {
|
|||||||
subtitle, body, options);
|
subtitle, body, options);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
|
|
||||||
dialog.connect('closed', () => this._accessDialog = null);
|
dialog.connect('closed', () => (this._accessDialog = null));
|
||||||
|
|
||||||
this._accessDialog = dialog;
|
this._accessDialog = dialog;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -437,8 +437,8 @@ class CyclerHighlight {
|
|||||||
if (this._clone.source)
|
if (this._clone.source)
|
||||||
this._clone.source.sync_visibility();
|
this._clone.source.sync_visibility();
|
||||||
|
|
||||||
let windowActor = this._window ? this._window.get_compositor_private()
|
let windowActor = this._window
|
||||||
: null;
|
? this._window.get_compositor_private() : null;
|
||||||
|
|
||||||
if (windowActor)
|
if (windowActor)
|
||||||
windowActor.hide();
|
windowActor.hide();
|
||||||
@@ -877,9 +877,9 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
|
|||||||
_init(windows) {
|
_init(windows) {
|
||||||
super._init(false);
|
super._init(false);
|
||||||
|
|
||||||
this._labels = new Array();
|
this._labels = [];
|
||||||
this._thumbnailBins = new Array();
|
this._thumbnailBins = [];
|
||||||
this._clones = new Array();
|
this._clones = [];
|
||||||
this._windows = windows;
|
this._windows = windows;
|
||||||
|
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
@@ -940,7 +940,7 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we only do this once
|
// Make sure we only do this once
|
||||||
this._thumbnailBins = new Array();
|
this._thumbnailBins = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeThumbnail(source, clone) {
|
_removeThumbnail(source, clone) {
|
||||||
@@ -1014,9 +1014,9 @@ class WindowIcon extends St.BoxLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_createAppIcon(app, size) {
|
_createAppIcon(app, size) {
|
||||||
let appIcon = app ? app.create_icon_texture(size)
|
let appIcon = app
|
||||||
: new St.Icon({ icon_name: 'icon-missing',
|
? app.create_icon_texture(size)
|
||||||
icon_size: size });
|
: new St.Icon({ icon_name: 'icon-missing', icon_size: size });
|
||||||
appIcon.x_expand = appIcon.y_expand = true;
|
appIcon.x_expand = appIcon.y_expand = true;
|
||||||
appIcon.x_align = appIcon.y_align = Clutter.ActorAlign.END;
|
appIcon.x_align = appIcon.y_align = Clutter.ActorAlign.END;
|
||||||
|
|
||||||
@@ -1043,7 +1043,7 @@ class WindowList extends SwitcherPopup.SwitcherList {
|
|||||||
this.addItem(icon, icon.label);
|
this.addItem(icon, icon.label);
|
||||||
this.icons.push(icon);
|
this.icons.push(icon);
|
||||||
|
|
||||||
icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
|
icon._unmanagedSignalId = icon.window.connect('unmanaged', window => {
|
||||||
this._removeWindow(window);
|
this._removeWindow(window);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
const { Clutter, GLib, Gio, St } = imports.gi;
|
const { Clutter, GLib, Gio, St } = imports.gi;
|
||||||
|
|
||||||
|
const Params = imports.misc.params;
|
||||||
|
|
||||||
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
|
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
|
||||||
var SPINNER_ANIMATION_TIME = 300;
|
var SPINNER_ANIMATION_TIME = 300;
|
||||||
var SPINNER_ANIMATION_DELAY = 1000;
|
var SPINNER_ANIMATION_DELAY = 1000;
|
||||||
@@ -131,12 +133,22 @@ var AnimatedIcon = class extends Animation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var Spinner = class extends AnimatedIcon {
|
var Spinner = class extends AnimatedIcon {
|
||||||
constructor(size, animate = false) {
|
constructor(size, params) {
|
||||||
|
// Compatibility with older callers
|
||||||
|
if (params === true || params === false)
|
||||||
|
params = { animate: params };
|
||||||
|
|
||||||
|
params = Params.parse(params, {
|
||||||
|
animate: false,
|
||||||
|
hideOnStop: false,
|
||||||
|
});
|
||||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/process-working.svg');
|
||||||
super(file, size);
|
super(file, size);
|
||||||
|
|
||||||
this.actor.opacity = 0;
|
this.actor.opacity = 0;
|
||||||
this._animate = animate;
|
this._animate = params.animate;
|
||||||
|
this._hideOnStop = params.hideOnStop;
|
||||||
|
this.actor.visible = !this._hideOnStop;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
@@ -146,6 +158,7 @@ var Spinner = class extends AnimatedIcon {
|
|||||||
|
|
||||||
play() {
|
play() {
|
||||||
this.actor.remove_all_transitions();
|
this.actor.remove_all_transitions();
|
||||||
|
this.actor.show();
|
||||||
|
|
||||||
if (this._animate) {
|
if (this._animate) {
|
||||||
super.play();
|
super.play();
|
||||||
@@ -167,13 +180,20 @@ var Spinner = class extends AnimatedIcon {
|
|||||||
if (this._animate) {
|
if (this._animate) {
|
||||||
this.actor.ease({
|
this.actor.ease({
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
time: SPINNER_ANIMATION_TIME,
|
duration: SPINNER_ANIMATION_TIME,
|
||||||
transition: 'linear',
|
mode: Clutter.AnimationMode.LINEAR,
|
||||||
onComplete: () => super.stop()
|
onComplete: () => {
|
||||||
|
super.stop();
|
||||||
|
if (this._hideOnStop)
|
||||||
|
this.actor.hide();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.actor.opacity = 0;
|
this.actor.opacity = 0;
|
||||||
super.stop();
|
super.stop();
|
||||||
|
|
||||||
|
if (this._hideOnStop)
|
||||||
|
this.actor.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ var PAGE_SWITCH_TIME = 300;
|
|||||||
var APP_ICON_SCALE_IN_TIME = 500;
|
var APP_ICON_SCALE_IN_TIME = 500;
|
||||||
var APP_ICON_SCALE_IN_DELAY = 700;
|
var APP_ICON_SCALE_IN_DELAY = 700;
|
||||||
|
|
||||||
|
const OVERSHOOT_THRESHOLD = 20;
|
||||||
|
const OVERSHOOT_TIMEOUT = 1000;
|
||||||
|
|
||||||
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
|
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
|
||||||
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
|
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
|
||||||
|
|
||||||
@@ -97,7 +100,10 @@ function _findBestFolderName(apps) {
|
|||||||
let commonCategories = [];
|
let commonCategories = [];
|
||||||
|
|
||||||
appInfos.reduce((categories, appInfo) => {
|
appInfos.reduce((categories, appInfo) => {
|
||||||
for (let category of appInfo.get_categories().split(';')) {
|
const appCategories = appInfo.get_categories();
|
||||||
|
if (!appCategories)
|
||||||
|
return categories;
|
||||||
|
for (let category of appCategories.split(';')) {
|
||||||
if (!(category in categoryCounter))
|
if (!(category in categoryCounter))
|
||||||
categoryCounter[category] = 0;
|
categoryCounter[category] = 0;
|
||||||
|
|
||||||
@@ -173,10 +179,11 @@ class BaseAppView {
|
|||||||
// Remove old app icons
|
// Remove old app icons
|
||||||
removedApps.forEach(icon => {
|
removedApps.forEach(icon => {
|
||||||
let iconIndex = this._allItems.indexOf(icon);
|
let iconIndex = this._allItems.indexOf(icon);
|
||||||
|
let id = icon.id;
|
||||||
|
|
||||||
this._allItems.splice(iconIndex, 1);
|
this._allItems.splice(iconIndex, 1);
|
||||||
this._grid.removeItem(icon);
|
icon.actor.destroy();
|
||||||
delete this._items[icon.id];
|
delete this._items[id];
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add new app icons
|
// Add new app icons
|
||||||
@@ -308,7 +315,12 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
|
|
||||||
this._grid.currentPage = 0;
|
this._grid.currentPage = 0;
|
||||||
this._stack.add_actor(this._grid);
|
this._stack.add_actor(this._grid);
|
||||||
this._eventBlocker = new St.Widget({ x_expand: true, y_expand: true });
|
this._eventBlocker = new St.Widget({
|
||||||
|
x_expand: true,
|
||||||
|
y_expand: true,
|
||||||
|
reactive: true,
|
||||||
|
visible: false,
|
||||||
|
});
|
||||||
this._stack.add_actor(this._eventBlocker);
|
this._stack.add_actor(this._eventBlocker);
|
||||||
|
|
||||||
box.add_actor(this._stack);
|
box.add_actor(this._stack);
|
||||||
@@ -335,12 +347,16 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
});
|
});
|
||||||
this._eventBlocker.add_action(this._clickAction);
|
this._eventBlocker.add_action(this._clickAction);
|
||||||
|
|
||||||
|
this._currentPopup = null;
|
||||||
this._displayingPopup = false;
|
this._displayingPopup = false;
|
||||||
this._currentPopupDestroyId = 0;
|
this._currentPopupDestroyId = 0;
|
||||||
|
|
||||||
this._availWidth = 0;
|
this._availWidth = 0;
|
||||||
this._availHeight = 0;
|
this._availHeight = 0;
|
||||||
|
|
||||||
|
this._lastOvershootY = -1;
|
||||||
|
this._lastOvershootTimeoutId = 0;
|
||||||
|
|
||||||
Main.overview.connect('hidden', () => this.goToPage(0));
|
Main.overview.connect('hidden', () => this.goToPage(0));
|
||||||
this._grid.connect('space-opened', () => {
|
this._grid.connect('space-opened', () => {
|
||||||
let fadeEffect = this._scrollView.get_effect('fade');
|
let fadeEffect = this._scrollView.get_effect('fade');
|
||||||
@@ -377,8 +393,6 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
|
|
||||||
Main.overview.connect('item-drag-begin', this._onDragBegin.bind(this));
|
Main.overview.connect('item-drag-begin', this._onDragBegin.bind(this));
|
||||||
Main.overview.connect('item-drag-end', this._onDragEnd.bind(this));
|
Main.overview.connect('item-drag-end', this._onDragEnd.bind(this));
|
||||||
|
|
||||||
this._nEventBlockerInhibits = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_redisplay() {
|
_redisplay() {
|
||||||
@@ -425,7 +439,7 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_loadApps() {
|
_loadApps() {
|
||||||
let newApps = [];
|
let appIcons = [];
|
||||||
this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
|
this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
|
||||||
try {
|
try {
|
||||||
(appInfo.get_id()); // catch invalid file encodings
|
(appInfo.get_id()); // catch invalid file encodings
|
||||||
@@ -450,7 +464,7 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
icon.connect('name-changed', this._itemNameChanged.bind(this));
|
icon.connect('name-changed', this._itemNameChanged.bind(this));
|
||||||
icon.connect('apps-changed', this._redisplay.bind(this));
|
icon.connect('apps-changed', this._redisplay.bind(this));
|
||||||
}
|
}
|
||||||
newApps.push(icon);
|
appIcons.push(icon);
|
||||||
this.folderIcons.push(icon);
|
this.folderIcons.push(icon);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -463,14 +477,19 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
let favoritesWritable = global.settings.is_writable('favorite-apps');
|
let favoritesWritable = global.settings.is_writable('favorite-apps');
|
||||||
|
|
||||||
apps.forEach(appId => {
|
apps.forEach(appId => {
|
||||||
let app = appSys.lookup_app(appId);
|
let icon = this._items[appId];
|
||||||
|
if (!icon) {
|
||||||
|
let app = appSys.lookup_app(appId);
|
||||||
|
|
||||||
let icon = new AppIcon(app,
|
icon = new AppIcon(app, {
|
||||||
{ isDraggable: favoritesWritable });
|
isDraggable: favoritesWritable,
|
||||||
newApps.push(icon);
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
appIcons.push(icon);
|
||||||
});
|
});
|
||||||
|
|
||||||
return newApps;
|
return appIcons;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overridden from BaseAppView
|
// Overridden from BaseAppView
|
||||||
@@ -505,7 +524,7 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: VIEWS_SWITCH_TIME,
|
duration: VIEWS_SWITCH_TIME,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
onComplete: () => this.opacity = 255
|
onComplete: () => (this.opacity = 255)
|
||||||
});
|
});
|
||||||
|
|
||||||
if (animationDirection == IconGrid.AnimationDirection.OUT)
|
if (animationDirection == IconGrid.AnimationDirection.OUT)
|
||||||
@@ -648,7 +667,7 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
addFolderPopup(popup) {
|
addFolderPopup(popup) {
|
||||||
this._stack.add_actor(popup.actor);
|
this._stack.add_actor(popup.actor);
|
||||||
popup.connect('open-state-changed', (popup, isOpen) => {
|
popup.connect('open-state-changed', (popup, isOpen) => {
|
||||||
this._eventBlocker.reactive = isOpen;
|
this._eventBlocker.visible = isOpen;
|
||||||
|
|
||||||
if (this._currentPopup) {
|
if (this._currentPopup) {
|
||||||
this._currentPopup.actor.disconnect(this._currentPopupDestroyId);
|
this._currentPopup.actor.disconnect(this._currentPopupDestroyId);
|
||||||
@@ -662,7 +681,7 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
this._currentPopupDestroyId = popup.actor.connect('destroy', () => {
|
this._currentPopupDestroyId = popup.actor.connect('destroy', () => {
|
||||||
this._currentPopup = null;
|
this._currentPopup = null;
|
||||||
this._currentPopupDestroyId = 0;
|
this._currentPopupDestroyId = 0;
|
||||||
this._eventBlocker.reactive = false;
|
this._eventBlocker.visible = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this._updateIconOpacities(isOpen);
|
this._updateIconOpacities(isOpen);
|
||||||
@@ -730,30 +749,58 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
this.folderIcons[i].adaptToSize(availWidth, availHeight);
|
this.folderIcons[i].adaptToSize(availWidth, availHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_resetOvershoot() {
|
||||||
|
if (this._lastOvershootTimeoutId)
|
||||||
|
GLib.source_remove(this._lastOvershootTimeoutId);
|
||||||
|
this._lastOvershootTimeoutId = 0;
|
||||||
|
this._lastOvershootY = -1;
|
||||||
|
}
|
||||||
|
|
||||||
_handleDragOvershoot(dragEvent) {
|
_handleDragOvershoot(dragEvent) {
|
||||||
let [, gridY] = this.actor.get_transformed_position();
|
let [, gridY] = this.actor.get_transformed_position();
|
||||||
let [, gridHeight] = this.actor.get_transformed_size();
|
let [, gridHeight] = this.actor.get_transformed_size();
|
||||||
let gridBottom = gridY + gridHeight;
|
let gridBottom = gridY + gridHeight;
|
||||||
|
|
||||||
// Within the grid boundaries, or already animating
|
// Already animating
|
||||||
if (dragEvent.y > gridY && dragEvent.y < gridBottom ||
|
if (this._adjustment.get_transition('value') !== null)
|
||||||
this._adjustment.get_transition('value') != null) {
|
return;
|
||||||
|
|
||||||
|
// Within the grid boundaries
|
||||||
|
if (dragEvent.y > gridY && dragEvent.y < gridBottom) {
|
||||||
|
// Check whether we moved out the area of the last switch
|
||||||
|
if (Math.abs(this._lastOvershootY - dragEvent.y) > OVERSHOOT_THRESHOLD)
|
||||||
|
this._resetOvershoot();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Moving above the grid
|
// Still in the area of the previous page switch
|
||||||
|
if (this._lastOvershootY >= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
let currentY = this._adjustment.value;
|
let currentY = this._adjustment.value;
|
||||||
if (dragEvent.y <= gridY && currentY > 0) {
|
|
||||||
this.goToPage(this._grid.currentPage - 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Moving below the grid
|
|
||||||
let maxY = this._adjustment.upper - this._adjustment.page_size;
|
let maxY = this._adjustment.upper - this._adjustment.page_size;
|
||||||
if (dragEvent.y >= gridBottom && currentY < maxY) {
|
|
||||||
|
if (dragEvent.y <= gridY && currentY > 0)
|
||||||
|
this.goToPage(this._grid.currentPage - 1);
|
||||||
|
else if (dragEvent.y >= gridBottom && currentY < maxY)
|
||||||
this.goToPage(this._grid.currentPage + 1);
|
this.goToPage(this._grid.currentPage + 1);
|
||||||
return;
|
else
|
||||||
}
|
return; // don't go beyond first/last page
|
||||||
|
|
||||||
|
this._lastOvershootY = dragEvent.y;
|
||||||
|
|
||||||
|
if (this._lastOvershootTimeoutId > 0)
|
||||||
|
GLib.source_remove(this._lastOvershootTimeoutId);
|
||||||
|
|
||||||
|
this._lastOvershootTimeoutId =
|
||||||
|
GLib.timeout_add(GLib.PRIORITY_DEFAULT, OVERSHOOT_TIMEOUT, () => {
|
||||||
|
this._resetOvershoot();
|
||||||
|
this._handleDragOvershoot(dragEvent);
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
GLib.Source.set_name_by_id(this._lastOvershootTimeoutId,
|
||||||
|
'[gnome-shell] this._lastOvershootTimeoutId');
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragBegin() {
|
_onDragBegin() {
|
||||||
@@ -761,6 +808,8 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
dragMotion: this._onDragMotion.bind(this)
|
dragMotion: this._onDragMotion.bind(this)
|
||||||
};
|
};
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
|
|
||||||
|
this._eventBlocker.visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragMotion(dragEvent) {
|
_onDragMotion(dragEvent) {
|
||||||
@@ -783,6 +832,9 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
DND.removeDragMonitor(this._dragMonitor);
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
this._dragMonitor = null;
|
this._dragMonitor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._eventBlocker.visible = this._currentPopup !== null;
|
||||||
|
this._resetOvershoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
_canAccept(source) {
|
_canAccept(source) {
|
||||||
@@ -816,19 +868,6 @@ var AllView = class AllView extends BaseAppView {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
inhibitEventBlocker() {
|
|
||||||
this._nEventBlockerInhibits++;
|
|
||||||
this._eventBlocker.visible = this._nEventBlockerInhibits == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uninhibitEventBlocker() {
|
|
||||||
if (this._nEventBlockerInhibits === 0)
|
|
||||||
throw new Error('Not inhibited');
|
|
||||||
|
|
||||||
this._nEventBlockerInhibits--;
|
|
||||||
this._eventBlocker.visible = this._nEventBlockerInhibits == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
createFolder(apps) {
|
createFolder(apps) {
|
||||||
let newFolderId = GLib.uuid_string_random();
|
let newFolderId = GLib.uuid_string_random();
|
||||||
|
|
||||||
@@ -919,8 +958,12 @@ var FrequentView = class FrequentView extends BaseAppView {
|
|||||||
for (let i = 0; i < mostUsed.length; i++) {
|
for (let i = 0; i < mostUsed.length; i++) {
|
||||||
if (!mostUsed[i].get_app_info().should_show())
|
if (!mostUsed[i].get_app_info().should_show())
|
||||||
continue;
|
continue;
|
||||||
let appIcon = new AppIcon(mostUsed[i],
|
let appIcon = this._items[mostUsed[i].get_id()];
|
||||||
{ isDraggable: favoritesWritable });
|
if (!appIcon) {
|
||||||
|
appIcon = new AppIcon(mostUsed[i], {
|
||||||
|
isDraggable: favoritesWritable,
|
||||||
|
});
|
||||||
|
}
|
||||||
apps.push(appIcon);
|
apps.push(appIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1107,8 +1150,9 @@ var AppDisplay = class AppDisplay {
|
|||||||
else
|
else
|
||||||
this._views[i].control.remove_style_pseudo_class('checked');
|
this._views[i].control.remove_style_pseudo_class('checked');
|
||||||
|
|
||||||
let animationDirection = i == activeIndex ? IconGrid.AnimationDirection.IN :
|
let animationDirection = i == activeIndex
|
||||||
IconGrid.AnimationDirection.OUT;
|
? IconGrid.AnimationDirection.IN
|
||||||
|
: IconGrid.AnimationDirection.OUT;
|
||||||
this._views[i].view.animateSwitch(animationDirection);
|
this._views[i].view.animateSwitch(animationDirection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1349,7 +1393,10 @@ var FolderView = class FolderView extends BaseAppView {
|
|||||||
if (apps.some(appIcon => appIcon.id == appId))
|
if (apps.some(appIcon => appIcon.id == appId))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let icon = new AppIcon(app);
|
let icon = this._items[appId];
|
||||||
|
if (!icon)
|
||||||
|
icon = new AppIcon(app);
|
||||||
|
|
||||||
apps.push(icon);
|
apps.push(icon);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1387,15 +1434,15 @@ var FolderView = class FolderView extends BaseAppView {
|
|||||||
// Remove the folder if this is the last app icon; otherwise,
|
// Remove the folder if this is the last app icon; otherwise,
|
||||||
// just remove the icon
|
// just remove the icon
|
||||||
if (folderApps.length == 0) {
|
if (folderApps.length == 0) {
|
||||||
let settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
|
|
||||||
let folders = settings.get_strv('folder-children');
|
|
||||||
folders.splice(folders.indexOf(this._id), 1);
|
|
||||||
settings.set_strv('folder-children', folders);
|
|
||||||
|
|
||||||
// Resetting all keys deletes the relocatable schema
|
// Resetting all keys deletes the relocatable schema
|
||||||
let keys = this._folder.settings_schema.list_keys();
|
let keys = this._folder.settings_schema.list_keys();
|
||||||
for (let key of keys)
|
for (let key of keys)
|
||||||
this._folder.reset(key);
|
this._folder.reset(key);
|
||||||
|
|
||||||
|
let settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
|
||||||
|
let folders = settings.get_strv('folder-children');
|
||||||
|
folders.splice(folders.indexOf(this._id), 1);
|
||||||
|
settings.set_strv('folder-children', folders);
|
||||||
} else {
|
} else {
|
||||||
this._folder.set_strv('apps', folderApps);
|
this._folder.set_strv('apps', folderApps);
|
||||||
}
|
}
|
||||||
@@ -1487,8 +1534,6 @@ var FolderIcon = class FolderIcon {
|
|||||||
dragMotion: this._onDragMotion.bind(this),
|
dragMotion: this._onDragMotion.bind(this),
|
||||||
};
|
};
|
||||||
DND.addDragMonitor(this._dragMonitor);
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
|
|
||||||
this._parentView.inhibitEventBlocker();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragMotion(dragEvent) {
|
_onDragMotion(dragEvent) {
|
||||||
@@ -1504,7 +1549,6 @@ var FolderIcon = class FolderIcon {
|
|||||||
|
|
||||||
_onDragEnd() {
|
_onDragEnd() {
|
||||||
this.actor.remove_style_pseudo_class('drop');
|
this.actor.remove_style_pseudo_class('drop');
|
||||||
this._parentView.uninhibitEventBlocker();
|
|
||||||
DND.removeDragMonitor(this._dragMonitor);
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1696,12 +1740,10 @@ var FolderIcon = class FolderIcon {
|
|||||||
this.actor.connect('destroy', () => {
|
this.actor.connect('destroy', () => {
|
||||||
Main.overview.disconnect(id);
|
Main.overview.disconnect(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._menuManager.addMenu(this._menu);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.set_hover(true);
|
this.actor.set_hover(true);
|
||||||
this._menu.popup();
|
this._menu.open();
|
||||||
this._menuManager.ignoreRelease();
|
this._menuManager.ignoreRelease();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1715,30 +1757,28 @@ var FolderIcon = class FolderIcon {
|
|||||||
};
|
};
|
||||||
Signals.addSignalMethods(FolderIcon.prototype);
|
Signals.addSignalMethods(FolderIcon.prototype);
|
||||||
|
|
||||||
var RenameFolderMenu = class RenameFolderMenu extends PopupMenu.PopupMenu {
|
var RenameFolderMenuItem = GObject.registerClass(
|
||||||
constructor(source, folder) {
|
class RenameFolderMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||||
super(source.actor, 0.5, St.Side.BOTTOM);
|
_init(folder) {
|
||||||
|
super._init({
|
||||||
|
style_class: 'rename-folder-popup-item',
|
||||||
|
reactive: false,
|
||||||
|
});
|
||||||
|
this.setOrnament(PopupMenu.Ornament.HIDDEN);
|
||||||
|
|
||||||
this._source = source;
|
|
||||||
this._folder = folder;
|
this._folder = folder;
|
||||||
|
|
||||||
// We want to keep the item hovered while the menu is up
|
|
||||||
this.blockSourceEvents = true;
|
|
||||||
|
|
||||||
let box = new St.BoxLayout({ style_class: 'rename-folder-popup-box' });
|
|
||||||
this.box.add_child(box);
|
|
||||||
|
|
||||||
// Entry
|
// Entry
|
||||||
this._entry = new St.Entry({
|
this._entry = new St.Entry({
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
width: 200,
|
width: 200,
|
||||||
});
|
});
|
||||||
box.add_child(this._entry);
|
this.add_child(this._entry);
|
||||||
|
|
||||||
this._entry.clutter_text.connect('notify::text',
|
this._entry.clutter_text.connect(
|
||||||
this._validate.bind(this));
|
'notify::text', this._validate.bind(this));
|
||||||
this._entry.clutter_text.connect('activate',
|
this._entry.clutter_text.connect(
|
||||||
this._updateFolderName.bind(this));
|
'activate', this._updateFolderName.bind(this));
|
||||||
|
|
||||||
// Rename button
|
// Rename button
|
||||||
this._button = new St.Button({
|
this._button = new St.Button({
|
||||||
@@ -1746,32 +1786,22 @@ var RenameFolderMenu = class RenameFolderMenu extends PopupMenu.PopupMenu {
|
|||||||
reactive: true,
|
reactive: true,
|
||||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO,
|
button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO,
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
label: _("Rename"),
|
label: _('Rename'),
|
||||||
});
|
});
|
||||||
box.add_child(this._button);
|
this.add_child(this._button);
|
||||||
|
|
||||||
this._button.connect('clicked', this._updateFolderName.bind(this));
|
this._button.connect('clicked', this._updateFolderName.bind(this));
|
||||||
|
|
||||||
// Chain our visibility and lifecycle to that of the source
|
|
||||||
this._sourceMappedId = source.actor.connect('notify::mapped', () => {
|
|
||||||
if (!source.actor.mapped)
|
|
||||||
this.close();
|
|
||||||
});
|
|
||||||
source.actor.connect('destroy', () => {
|
|
||||||
source.actor.disconnect(this._sourceMappedId);
|
|
||||||
this.destroy();
|
|
||||||
});
|
|
||||||
|
|
||||||
Main.uiGroup.add_actor(this.actor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
popup() {
|
vfunc_map() {
|
||||||
let folderName = _getFolderName(this._folder);
|
this._entry.text = _getFolderName(this._folder);
|
||||||
|
this._entry.clutter_text.set_selection(0, -1);
|
||||||
|
super.vfunc_map();
|
||||||
|
}
|
||||||
|
|
||||||
this._entry.text = folderName;
|
vfunc_key_focus_in() {
|
||||||
this._entry.clutter_text.set_selection(0, folderName.length);
|
super.vfunc_key_focus_in();
|
||||||
|
this._entry.clutter_text.grab_key_focus();
|
||||||
this.open();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_isValidFolderName() {
|
_isValidFolderName() {
|
||||||
@@ -1794,7 +1824,35 @@ var RenameFolderMenu = class RenameFolderMenu extends PopupMenu.PopupMenu {
|
|||||||
let newFolderName = this._entry.text.trim();
|
let newFolderName = this._entry.text.trim();
|
||||||
this._folder.set_string('name', newFolderName);
|
this._folder.set_string('name', newFolderName);
|
||||||
this._folder.set_boolean('translate', false);
|
this._folder.set_boolean('translate', false);
|
||||||
this.close();
|
this.activate(Clutter.get_current_event());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var RenameFolderMenu = class RenameFolderMenu extends PopupMenu.PopupMenu {
|
||||||
|
constructor(source, folder) {
|
||||||
|
super(source.actor, 0.5, St.Side.BOTTOM);
|
||||||
|
this.actor.add_style_class_name('rename-folder-popup');
|
||||||
|
|
||||||
|
// We want to keep the item hovered while the menu is up
|
||||||
|
this.blockSourceEvents = true;
|
||||||
|
|
||||||
|
let menuItem = new RenameFolderMenuItem(folder);
|
||||||
|
this.addMenuItem(menuItem);
|
||||||
|
|
||||||
|
// Focus the text entry on menu pop-up
|
||||||
|
this.focusActor = menuItem;
|
||||||
|
|
||||||
|
// Chain our visibility and lifecycle to that of the source
|
||||||
|
this._sourceMappedId = source.actor.connect('notify::mapped', () => {
|
||||||
|
if (!source.actor.mapped)
|
||||||
|
this.close();
|
||||||
|
});
|
||||||
|
source.actor.connect('destroy', () => {
|
||||||
|
source.actor.disconnect(this._sourceMappedId);
|
||||||
|
this.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
|
Main.uiGroup.add_actor(this.actor);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Signals.addSignalMethods(RenameFolderMenu.prototype);
|
Signals.addSignalMethods(RenameFolderMenu.prototype);
|
||||||
@@ -1884,15 +1942,17 @@ var AppFolderPopup = class AppFolderPopup {
|
|||||||
direction = St.DirectionType.TAB_FORWARD;
|
direction = St.DirectionType.TAB_FORWARD;
|
||||||
break;
|
break;
|
||||||
case Clutter.Right:
|
case Clutter.Right:
|
||||||
direction = isLtr ? St.DirectionType.TAB_FORWARD :
|
direction = isLtr
|
||||||
St.DirectionType.TAB_BACKWARD;
|
? St.DirectionType.TAB_FORWARD
|
||||||
|
: St.DirectionType.TAB_BACKWARD;
|
||||||
break;
|
break;
|
||||||
case Clutter.Up:
|
case Clutter.Up:
|
||||||
direction = St.DirectionType.TAB_BACKWARD;
|
direction = St.DirectionType.TAB_BACKWARD;
|
||||||
break;
|
break;
|
||||||
case Clutter.Left:
|
case Clutter.Left:
|
||||||
direction = isLtr ? St.DirectionType.TAB_BACKWARD :
|
direction = isLtr
|
||||||
St.DirectionType.TAB_FORWARD;
|
? St.DirectionType.TAB_BACKWARD
|
||||||
|
: St.DirectionType.TAB_FORWARD;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
@@ -1978,17 +2038,10 @@ var AppIcon = class AppIcon {
|
|||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
|
|
||||||
this._dot = new St.Widget({ style_class: 'app-well-app-running-dot',
|
|
||||||
layout_manager: new Clutter.BinLayout(),
|
|
||||||
x_expand: true, y_expand: true,
|
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
|
||||||
y_align: Clutter.ActorAlign.END });
|
|
||||||
|
|
||||||
this._iconContainer = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
this._iconContainer = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
||||||
x_expand: true, y_expand: true });
|
x_expand: true, y_expand: true });
|
||||||
|
|
||||||
this.actor.set_child(this._iconContainer);
|
this.actor.set_child(this._iconContainer);
|
||||||
this._iconContainer.add_child(this._dot);
|
|
||||||
|
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
|
||||||
@@ -2005,6 +2058,16 @@ var AppIcon = class AppIcon {
|
|||||||
this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams);
|
this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams);
|
||||||
this._iconContainer.add_child(this.icon);
|
this._iconContainer.add_child(this.icon);
|
||||||
|
|
||||||
|
this._dot = new St.Widget({
|
||||||
|
style_class: 'app-well-app-running-dot',
|
||||||
|
layout_manager: new Clutter.BinLayout(),
|
||||||
|
x_expand: true,
|
||||||
|
y_expand: true,
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
y_align: Clutter.ActorAlign.END,
|
||||||
|
});
|
||||||
|
this._iconContainer.add_child(this._dot);
|
||||||
|
|
||||||
this.actor.label_actor = this.icon.label;
|
this.actor.label_actor = this.icon.label;
|
||||||
|
|
||||||
this.actor.connect('leave-event', this._onLeaveEvent.bind(this));
|
this.actor.connect('leave-event', this._onLeaveEvent.bind(this));
|
||||||
@@ -2035,6 +2098,7 @@ var AppIcon = class AppIcon {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._dragMonitor = null;
|
||||||
this._itemDragBeginId = Main.overview.connect(
|
this._itemDragBeginId = Main.overview.connect(
|
||||||
'item-drag-begin', this._onDragBegin.bind(this));
|
'item-drag-begin', this._onDragBegin.bind(this));
|
||||||
this._itemDragEndId = Main.overview.connect(
|
this._itemDragEndId = Main.overview.connect(
|
||||||
@@ -2059,6 +2123,12 @@ var AppIcon = class AppIcon {
|
|||||||
}
|
}
|
||||||
if (this._stateChangedId > 0)
|
if (this._stateChangedId > 0)
|
||||||
this.app.disconnect(this._stateChangedId);
|
this.app.disconnect(this._stateChangedId);
|
||||||
|
|
||||||
|
if (this._dragMonitor) {
|
||||||
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
|
this._dragMonitor = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._draggable) {
|
if (this._draggable) {
|
||||||
if (this._dragging)
|
if (this._dragging)
|
||||||
Main.overview.endItemDrag(this);
|
Main.overview.endItemDrag(this);
|
||||||
@@ -2206,6 +2276,10 @@ var AppIcon = class AppIcon {
|
|||||||
this.icon.animateZoomOut();
|
this.icon.animateZoomOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
animateLaunchAtPos(x, y) {
|
||||||
|
this.icon.animateZoomOutAtPos(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
scaleIn() {
|
scaleIn() {
|
||||||
this.actor.scale_x = 0;
|
this.actor.scale_x = 0;
|
||||||
this.actor.scale_y = 0;
|
this.actor.scale_y = 0;
|
||||||
@@ -2213,13 +2287,16 @@ var AppIcon = class AppIcon {
|
|||||||
this.actor.ease({
|
this.actor.ease({
|
||||||
scale_x: 1,
|
scale_x: 1,
|
||||||
scale_y: 1,
|
scale_y: 1,
|
||||||
time: APP_ICON_SCALE_IN_TIME,
|
duration: APP_ICON_SCALE_IN_TIME,
|
||||||
delay: APP_ICON_SCALE_IN_DELAY,
|
delay: APP_ICON_SCALE_IN_DELAY,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUINT
|
mode: Clutter.AnimationMode.EASE_OUT_QUINT
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
shellWorkspaceLaunch(params) {
|
shellWorkspaceLaunch(params) {
|
||||||
|
let { stack } = new Error();
|
||||||
|
log(`shellWorkspaceLaunch is deprecated, use app.open_new_window() instead\n${stack}`);
|
||||||
|
|
||||||
params = Params.parse(params, { workspace: -1,
|
params = Params.parse(params, { workspace: -1,
|
||||||
timestamp: 0 });
|
timestamp: 0 });
|
||||||
|
|
||||||
@@ -2396,8 +2473,8 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
|||||||
);
|
);
|
||||||
|
|
||||||
windows.forEach(window => {
|
windows.forEach(window => {
|
||||||
let title = window.title ? window.title
|
let title = window.title
|
||||||
: this._source.app.get_name();
|
? window.title : this._source.app.get_name();
|
||||||
let item = this._appendMenuItem(title);
|
let item = this._appendMenuItem(title);
|
||||||
item.connect('activate', () => {
|
item.connect('activate', () => {
|
||||||
this.emit('activate-window', window);
|
this.emit('activate-window', window);
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ var AudioDeviceSelectionDBus = class AudioDeviceSelectionDBus {
|
|||||||
|
|
||||||
let [deviceNames] = params;
|
let [deviceNames] = params;
|
||||||
let devices = 0;
|
let devices = 0;
|
||||||
deviceNames.forEach(n => devices |= AudioDevice[n.toUpperCase()]);
|
deviceNames.forEach(n => (devices |= AudioDevice[n.toUpperCase()]));
|
||||||
|
|
||||||
let dialog;
|
let dialog;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -172,8 +172,8 @@ var BoxPointer = GObject.registerClass({
|
|||||||
let borderWidth = themeNode.get_length('-arrow-border-width');
|
let borderWidth = themeNode.get_length('-arrow-border-width');
|
||||||
minSize += borderWidth * 2;
|
minSize += borderWidth * 2;
|
||||||
natSize += borderWidth * 2;
|
natSize += borderWidth * 2;
|
||||||
if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM))
|
if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM)) ||
|
||||||
|| (isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
|
(isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
|
||||||
let rise = themeNode.get_length('-arrow-rise');
|
let rise = themeNode.get_length('-arrow-rise');
|
||||||
minSize += rise;
|
minSize += rise;
|
||||||
natSize += rise;
|
natSize += rise;
|
||||||
|
|||||||
@@ -581,8 +581,9 @@ var Calendar = class Calendar {
|
|||||||
if (row == 2)
|
if (row == 2)
|
||||||
styleClass = `calendar-day-top ${styleClass}`;
|
styleClass = `calendar-day-top ${styleClass}`;
|
||||||
|
|
||||||
let leftMost = rtl ? iter.getDay() == (this._weekStart + 6) % 7
|
let leftMost = rtl
|
||||||
: iter.getDay() == this._weekStart;
|
? iter.getDay() == (this._weekStart + 6) % 7
|
||||||
|
: iter.getDay() == this._weekStart;
|
||||||
if (leftMost)
|
if (leftMost)
|
||||||
styleClass = `calendar-day-left ${styleClass}`;
|
styleClass = `calendar-day-left ${styleClass}`;
|
||||||
|
|
||||||
@@ -680,8 +681,9 @@ var EventMessage = class EventMessage extends MessageList.Message {
|
|||||||
*/
|
*/
|
||||||
title = C_("event list time", "All Day");
|
title = C_("event list time", "All Day");
|
||||||
} else {
|
} else {
|
||||||
let date = this._event.date >= periodBegin ? this._event.date
|
let date = this._event.date >= periodBegin
|
||||||
: this._event.end;
|
? this._event.date
|
||||||
|
: this._event.end;
|
||||||
title = Util.formatTime(date, { timeOnly: true });
|
title = Util.formatTime(date, { timeOnly: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1071,7 +1073,7 @@ var CalendarMessageList = class CalendarMessageList {
|
|||||||
this._clearButton.set_x_align(Clutter.ActorAlign.END);
|
this._clearButton.set_x_align(Clutter.ActorAlign.END);
|
||||||
this._clearButton.connect('clicked', () => {
|
this._clearButton.connect('clicked', () => {
|
||||||
let sections = [...this._sections.keys()];
|
let sections = [...this._sections.keys()];
|
||||||
sections.forEach((s) => s.clear());
|
sections.forEach(s => s.clear());
|
||||||
});
|
});
|
||||||
box.add_actor(this._clearButton);
|
box.add_actor(this._clearButton);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported CloseDialog */
|
/* exported CloseDialog */
|
||||||
|
|
||||||
const { Clutter, Gio, GLib, GObject, Meta, Shell } = imports.gi;
|
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
|
||||||
|
|
||||||
const Dialog = imports.ui.dialog;
|
const Dialog = imports.ui.dialog;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@@ -46,6 +46,18 @@ var CloseDialog = GObject.registerClass({
|
|||||||
return new Dialog.MessageDialogContent({ icon, title, subtitle });
|
return new Dialog.MessageDialogContent({ icon, title, subtitle });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_updateScale() {
|
||||||
|
// Since this is a child of MetaWindowActor (which, for Wayland clients,
|
||||||
|
// applies the geometry scale factor to its children itself, see
|
||||||
|
// meta_window_actor_set_geometry_scale()), make sure we don't apply
|
||||||
|
// the factor twice in the end.
|
||||||
|
if (this._window.get_client_type() !== Meta.WindowClientType.WAYLAND)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
|
||||||
|
this._dialog.set_scale(1 / scaleFactor, 1 / scaleFactor);
|
||||||
|
}
|
||||||
|
|
||||||
_initDialog() {
|
_initDialog() {
|
||||||
if (this._dialog)
|
if (this._dialog)
|
||||||
return;
|
return;
|
||||||
@@ -64,6 +76,11 @@ var CloseDialog = GObject.registerClass({
|
|||||||
key: Clutter.Escape });
|
key: Clutter.Escape });
|
||||||
|
|
||||||
global.focus_manager.add_group(this._dialog);
|
global.focus_manager.add_group(this._dialog);
|
||||||
|
|
||||||
|
let themeContext = St.ThemeContext.get_for_stage(global.stage);
|
||||||
|
themeContext.connect('notify::scale-factor', this._updateScale.bind(this));
|
||||||
|
|
||||||
|
this._updateScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
_addWindowEffect() {
|
_addWindowEffect() {
|
||||||
@@ -145,10 +162,10 @@ var CloseDialog = GObject.registerClass({
|
|||||||
this._addWindowEffect();
|
this._addWindowEffect();
|
||||||
this._initDialog();
|
this._initDialog();
|
||||||
|
|
||||||
this._dialog.scale_y = 0;
|
this._dialog._dialog.scale_y = 0;
|
||||||
this._dialog.set_pivot_point(0.5, 0.5);
|
this._dialog._dialog.set_pivot_point(0.5, 0.5);
|
||||||
|
|
||||||
this._dialog.ease({
|
this._dialog._dialog.ease({
|
||||||
scale_y: 1,
|
scale_y: 1,
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
mode: Clutter.AnimationMode.LINEAR,
|
||||||
duration: DIALOG_TRANSITION_TIME,
|
duration: DIALOG_TRANSITION_TIME,
|
||||||
@@ -175,7 +192,8 @@ var CloseDialog = GObject.registerClass({
|
|||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
this._removeWindowEffect();
|
this._removeWindowEffect();
|
||||||
|
|
||||||
dialog.ease({
|
dialog.makeInactive();
|
||||||
|
dialog._dialog.ease({
|
||||||
scale_y: 0,
|
scale_y: 0,
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
mode: Clutter.AnimationMode.LINEAR,
|
||||||
duration: DIALOG_TRANSITION_TIME,
|
duration: DIALOG_TRANSITION_TIME,
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ var AutomountManager = class {
|
|||||||
!volume.should_automount() ||
|
!volume.should_automount() ||
|
||||||
!volume.can_mount()) {
|
!volume.can_mount()) {
|
||||||
// allow the autorun to run anyway; this can happen if the
|
// allow the autorun to run anyway; this can happen if the
|
||||||
// mount gets added programmatically later, even if
|
// mount gets added programmatically later, even if
|
||||||
// should_automount() or can_mount() are false, like for
|
// should_automount() or can_mount() are false, like for
|
||||||
// blank optical media.
|
// blank optical media.
|
||||||
this._allowAutorun(volume);
|
this._allowAutorun(volume);
|
||||||
@@ -222,14 +222,14 @@ var AutomountManager = class {
|
|||||||
GLib.source_remove(volume._allowAutorunExpireId);
|
GLib.source_remove(volume._allowAutorunExpireId);
|
||||||
delete volume._allowAutorunExpireId;
|
delete volume._allowAutorunExpireId;
|
||||||
}
|
}
|
||||||
this._volumeQueue =
|
this._volumeQueue =
|
||||||
this._volumeQueue.filter(element => (element != volume));
|
this._volumeQueue.filter(element => (element != volume));
|
||||||
}
|
}
|
||||||
|
|
||||||
_reaskPassword(volume) {
|
_reaskPassword(volume) {
|
||||||
let prevOperation = this._activeOperations.get(volume);
|
let prevOperation = this._activeOperations.get(volume);
|
||||||
let existingDialog = prevOperation ? prevOperation.borrowDialog() : null;
|
let existingDialog = prevOperation ? prevOperation.borrowDialog() : null;
|
||||||
let operation =
|
let operation =
|
||||||
new ShellMountOperation.ShellMountOperation(volume,
|
new ShellMountOperation.ShellMountOperation(volume,
|
||||||
{ existingDialog: existingDialog });
|
{ existingDialog: existingDialog });
|
||||||
this._mountVolume(volume, operation);
|
this._mountVolume(volume, operation);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ function startAppForMount(app, mount) {
|
|||||||
files.push(root);
|
files.push(root);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
retval = app.launch(files,
|
retval = app.launch(files,
|
||||||
global.create_app_launch_context(0, -1));
|
global.create_app_launch_context(0, -1));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Unable to launch the application ${app.get_name()}: ${e}`);
|
log(`Unable to launch the application ${app.get_name()}: ${e}`);
|
||||||
@@ -72,8 +72,6 @@ function startAppForMount(app, mount) {
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
|
|
||||||
const HotplugSnifferIface = loadInterfaceXML('org.gnome.Shell.HotplugSniffer');
|
const HotplugSnifferIface = loadInterfaceXML('org.gnome.Shell.HotplugSniffer');
|
||||||
const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
|
const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
|
||||||
function HotplugSniffer() {
|
function HotplugSniffer() {
|
||||||
@@ -117,9 +115,9 @@ var ContentTypeDiscoverer = class {
|
|||||||
|
|
||||||
let hotplugSniffer = new HotplugSniffer();
|
let hotplugSniffer = new HotplugSniffer();
|
||||||
hotplugSniffer.SniffURIRemote(root.get_uri(),
|
hotplugSniffer.SniffURIRemote(root.get_uri(),
|
||||||
([contentTypes]) => {
|
([contentTypes]) => {
|
||||||
this._emitCallback(mount, contentTypes);
|
this._emitCallback(mount, contentTypes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,11 +213,11 @@ var AutorunDispatcher = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_addSource(mount, apps) {
|
_addSource(mount, apps) {
|
||||||
// if we already have a source showing for this
|
// if we already have a source showing for this
|
||||||
// mount, return
|
// mount, return
|
||||||
if (this._getSourceForMount(mount))
|
if (this._getSourceForMount(mount))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// add a new source
|
// add a new source
|
||||||
this._sources.push(new AutorunSource(this._manager, mount, apps));
|
this._sources.push(new AutorunSource(this._manager, mount, apps));
|
||||||
}
|
}
|
||||||
@@ -264,7 +262,7 @@ var AutorunDispatcher = class {
|
|||||||
|
|
||||||
removeMount(mount) {
|
removeMount(mount) {
|
||||||
let source = this._getSourceForMount(mount);
|
let source = this._getSourceForMount(mount);
|
||||||
|
|
||||||
// if we aren't tracking this mount, don't do anything
|
// if we aren't tracking this mount, don't do anything
|
||||||
if (!source)
|
if (!source)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ class KeyringDialog extends ModalDialog.ModalDialog {
|
|||||||
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
||||||
this._passwordEntry.clutter_text.connect('activate', this._onPasswordActivate.bind(this));
|
this._passwordEntry.clutter_text.connect('activate', this._onPasswordActivate.bind(this));
|
||||||
|
|
||||||
this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, true);
|
this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, {
|
||||||
|
animate: true,
|
||||||
|
});
|
||||||
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
layout.attach(this._workSpinner.actor, 0, row, 1, 1);
|
layout.attach(this._workSpinner.actor, 0, row, 1, 1);
|
||||||
@@ -232,8 +234,9 @@ var KeyringPrompter = class {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this._prompter = new Gcr.SystemPrompter();
|
this._prompter = new Gcr.SystemPrompter();
|
||||||
this._prompter.connect('new-prompt', () => {
|
this._prompter.connect('new-prompt', () => {
|
||||||
let dialog = this._enabled ? new KeyringDialog()
|
let dialog = this._enabled
|
||||||
: new KeyringDummyDialog();
|
? new KeyringDialog()
|
||||||
|
: new KeyringDummyDialog();
|
||||||
this._currentPrompt = dialog.prompt;
|
this._currentPrompt = dialog.prompt;
|
||||||
return this._currentPrompt;
|
return this._currentPrompt;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
|
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
const Config = imports.misc.config;
|
|
||||||
const Dialog = imports.ui.dialog;
|
const Dialog = imports.ui.dialog;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const MessageTray = imports.ui.messageTray;
|
const MessageTray = imports.ui.messageTray;
|
||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
const ShellEntry = imports.ui.shellEntry;
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
|
|
||||||
|
Gio._promisify(Shell.NetworkAgent.prototype,
|
||||||
|
'search_vpn_plugin', 'search_vpn_plugin_finish');
|
||||||
|
|
||||||
const VPN_UI_GROUP = 'VPN Plugin UI';
|
const VPN_UI_GROUP = 'VPN Plugin UI';
|
||||||
|
|
||||||
var NetworkSecretDialog = GObject.registerClass(
|
var NetworkSecretDialog = GObject.registerClass(
|
||||||
@@ -164,9 +166,9 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
if (value.length == 64) {
|
if (value.length == 64) {
|
||||||
// must be composed of hexadecimal digits only
|
// must be composed of hexadecimal digits only
|
||||||
for (let i = 0; i < 64; i++) {
|
for (let i = 0; i < 64; i++) {
|
||||||
if (!((value[i] >= 'a' && value[i] <= 'f')
|
if (!((value[i] >= 'a' && value[i] <= 'f') ||
|
||||||
|| (value[i] >= 'A' && value[i] <= 'F')
|
(value[i] >= 'A' && value[i] <= 'F') ||
|
||||||
|| (value[i] >= '0' && value[i] <= '9')))
|
(value[i] >= '0' && value[i] <= '9')))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -180,15 +182,15 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
if (secret.wep_key_type == NM.WepKeyType.KEY) {
|
if (secret.wep_key_type == NM.WepKeyType.KEY) {
|
||||||
if (value.length == 10 || value.length == 26) {
|
if (value.length == 10 || value.length == 26) {
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
if (!((value[i] >= 'a' && value[i] <= 'f')
|
if (!((value[i] >= 'a' && value[i] <= 'f') ||
|
||||||
|| (value[i] >= 'A' && value[i] <= 'F')
|
(value[i] >= 'A' && value[i] <= 'F') ||
|
||||||
|| (value[i] >= '0' && value[i] <= '9')))
|
(value[i] >= '0' && value[i] <= '9')))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (value.length == 5 || value.length == 13) {
|
} else if (value.length == 5 || value.length == 13) {
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
if (!((value[i] >= 'a' && value[i] <= 'z')
|
if (!((value[i] >= 'a' && value[i] <= 'z') ||
|
||||||
|| (value[i] >= 'A' && value[i] <= 'Z')))
|
(value[i] >= 'A' && value[i] <= 'Z')))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -213,6 +215,7 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
|||||||
// First the easy ones
|
// First the easy ones
|
||||||
case 'wpa-none':
|
case 'wpa-none':
|
||||||
case 'wpa-psk':
|
case 'wpa-psk':
|
||||||
|
case 'sae':
|
||||||
secrets.push({ label: _("Password: "), key: 'psk',
|
secrets.push({ label: _("Password: "), key: 'psk',
|
||||||
value: wirelessSecuritySetting.psk || '',
|
value: wirelessSecuritySetting.psk || '',
|
||||||
validate: this._validateWpaPsk, password: true });
|
validate: this._validateWpaPsk, password: true });
|
||||||
@@ -621,14 +624,6 @@ var NetworkAgent = class {
|
|||||||
this._vpnRequests = { };
|
this._vpnRequests = { };
|
||||||
this._notifications = { };
|
this._notifications = { };
|
||||||
|
|
||||||
this._pluginDir = Gio.file_new_for_path(Config.VPNDIR);
|
|
||||||
try {
|
|
||||||
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
|
|
||||||
monitor.connect('changed', () => this._vpnCacheBuilt = false);
|
|
||||||
} catch (e) {
|
|
||||||
log(`Failed to create monitor for VPN plugin dir: ${e.message}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
this._native.connect('new-request', this._newRequest.bind(this));
|
this._native.connect('new-request', this._newRequest.bind(this));
|
||||||
this._native.connect('cancel-request', this._cancelRequest.bind(this));
|
this._native.connect('cancel-request', this._cancelRequest.bind(this));
|
||||||
|
|
||||||
@@ -768,13 +763,11 @@ var NetworkAgent = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_vpnRequest(requestId, connection, hints, flags) {
|
async _vpnRequest(requestId, connection, hints, flags) {
|
||||||
let vpnSetting = connection.get_setting_vpn();
|
let vpnSetting = connection.get_setting_vpn();
|
||||||
let serviceType = vpnSetting.service_type;
|
let serviceType = vpnSetting.service_type;
|
||||||
|
|
||||||
this._buildVPNServiceCache();
|
let binary = await this._findAuthBinary(serviceType);
|
||||||
|
|
||||||
let binary = this._vpnBinaries[serviceType];
|
|
||||||
if (!binary) {
|
if (!binary) {
|
||||||
log('Invalid VPN service type (cannot find authentication binary)');
|
log('Invalid VPN service type (cannot find authentication binary)');
|
||||||
|
|
||||||
@@ -790,36 +783,30 @@ var NetworkAgent = class {
|
|||||||
this._vpnRequests[requestId] = vpnRequest;
|
this._vpnRequests[requestId] = vpnRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
_buildVPNServiceCache() {
|
async _findAuthBinary(serviceType) {
|
||||||
if (this._vpnCacheBuilt)
|
let plugin;
|
||||||
return;
|
|
||||||
|
|
||||||
this._vpnCacheBuilt = true;
|
try {
|
||||||
this._vpnBinaries = { };
|
plugin = await this._native.search_vpn_plugin(serviceType);
|
||||||
|
} catch (e) {
|
||||||
|
logError(e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
NM.VpnPluginInfo.list_load().forEach(plugin => {
|
const fileName = plugin.get_auth_dialog();
|
||||||
let service = plugin.get_service();
|
if (!GLib.file_test(fileName, GLib.FileTest.IS_EXECUTABLE)) {
|
||||||
let fileName = plugin.get_auth_dialog();
|
log('VPN plugin at %s is not executable'.format(fileName));
|
||||||
let supportsHints = plugin.supports_hints();
|
return null;
|
||||||
let externalUIMode = false;
|
}
|
||||||
|
|
||||||
let prop = plugin.lookup_property('GNOME', 'supports-external-ui-mode');
|
const prop = plugin.lookup_property('GNOME', 'supports-external-ui-mode');
|
||||||
if (prop) {
|
const trimmedProp = prop ? prop.trim().toLowerCase() : '';
|
||||||
prop = prop.trim().toLowerCase();
|
|
||||||
externalUIMode = ['true', 'yes', 'on', '1'].includes(prop);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GLib.file_test(fileName, GLib.FileTest.IS_EXECUTABLE)) {
|
return {
|
||||||
let binary = { fileName, externalUIMode, supportsHints };
|
fileName,
|
||||||
this._vpnBinaries[service] = binary;
|
supportsHints: plugin.supports_hints(),
|
||||||
|
externalUIMode: ['true', 'yes', 'on', '1'].includes(trimmedProp),
|
||||||
plugin.get_aliases().forEach(alias => {
|
};
|
||||||
this._vpnBinaries[alias] = binary;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
log('VPN plugin at %s is not executable'.format(fileName));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var Component = NetworkAgent;
|
var Component = NetworkAgent;
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ const ModalDialog = imports.ui.modalDialog;
|
|||||||
const ShellEntry = imports.ui.shellEntry;
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
const UserWidget = imports.ui.userWidget;
|
const UserWidget = imports.ui.userWidget;
|
||||||
|
|
||||||
|
const DialogMode = {
|
||||||
|
AUTH: 0,
|
||||||
|
CONFIRM: 1,
|
||||||
|
};
|
||||||
|
|
||||||
var DIALOG_ICON_SIZE = 48;
|
var DIALOG_ICON_SIZE = 48;
|
||||||
|
|
||||||
var WORK_SPINNER_ICON_SIZE = 16;
|
var WORK_SPINNER_ICON_SIZE = 16;
|
||||||
@@ -51,47 +56,32 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
userName = userNames[0];
|
userName = userNames[0];
|
||||||
|
|
||||||
this._user = AccountsService.UserManager.get_default().get_user(userName);
|
this._user = AccountsService.UserManager.get_default().get_user(userName);
|
||||||
let userRealName = this._user.get_real_name();
|
|
||||||
this._userLoadedId = this._user.connect('notify::is_loaded',
|
|
||||||
this._onUserChanged.bind(this));
|
|
||||||
this._userChangedId = this._user.connect('changed',
|
|
||||||
this._onUserChanged.bind(this));
|
|
||||||
|
|
||||||
// Special case 'root'
|
let userBox = new St.BoxLayout({
|
||||||
let userIsRoot = false;
|
style_class: 'polkit-dialog-user-layout',
|
||||||
if (userName == 'root') {
|
vertical: false,
|
||||||
userIsRoot = true;
|
});
|
||||||
userRealName = _("Administrator");
|
content.messageBox.add(userBox);
|
||||||
}
|
|
||||||
|
|
||||||
if (userIsRoot) {
|
this._userAvatar = new UserWidget.Avatar(this._user, {
|
||||||
let userLabel = new St.Label(({ style_class: 'polkit-dialog-user-root-label',
|
iconSize: DIALOG_ICON_SIZE,
|
||||||
text: userRealName }));
|
styleClass: 'polkit-dialog-user-icon',
|
||||||
content.messageBox.add(userLabel, { x_fill: false,
|
});
|
||||||
x_align: St.Align.START });
|
this._userAvatar.actor.hide();
|
||||||
} else {
|
userBox.add_child(this._userAvatar.actor);
|
||||||
let userBox = new St.BoxLayout({ style_class: 'polkit-dialog-user-layout',
|
|
||||||
vertical: false });
|
|
||||||
content.messageBox.add(userBox);
|
|
||||||
this._userAvatar = new UserWidget.Avatar(this._user,
|
|
||||||
{ iconSize: DIALOG_ICON_SIZE,
|
|
||||||
styleClass: 'polkit-dialog-user-icon' });
|
|
||||||
this._userAvatar.actor.hide();
|
|
||||||
userBox.add(this._userAvatar.actor,
|
|
||||||
{ x_fill: true,
|
|
||||||
y_fill: false,
|
|
||||||
x_align: St.Align.END,
|
|
||||||
y_align: St.Align.START });
|
|
||||||
let userLabel = new St.Label(({ style_class: 'polkit-dialog-user-label',
|
|
||||||
text: userRealName }));
|
|
||||||
userBox.add(userLabel,
|
|
||||||
{ x_fill: true,
|
|
||||||
y_fill: false,
|
|
||||||
x_align: St.Align.END,
|
|
||||||
y_align: St.Align.MIDDLE });
|
|
||||||
}
|
|
||||||
|
|
||||||
this._onUserChanged();
|
this._userLabel = new St.Label({
|
||||||
|
style_class: userName === 'root'
|
||||||
|
? 'polkit-dialog-user-root-label'
|
||||||
|
: 'polkit-dialog-user-label',
|
||||||
|
x_expand: true,
|
||||||
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (userName === 'root')
|
||||||
|
this._userLabel.text = _('Administrator');
|
||||||
|
|
||||||
|
userBox.add_child(this._userLabel);
|
||||||
|
|
||||||
this._passwordBox = new St.BoxLayout({ vertical: false, style_class: 'prompt-dialog-password-box' });
|
this._passwordBox = new St.BoxLayout({ vertical: false, style_class: 'prompt-dialog-password-box' });
|
||||||
content.messageBox.add(this._passwordBox);
|
content.messageBox.add(this._passwordBox);
|
||||||
@@ -105,10 +95,11 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
this._passwordBox.add(this._passwordEntry,
|
this._passwordBox.add(this._passwordEntry,
|
||||||
{ expand: true });
|
{ expand: true });
|
||||||
|
|
||||||
this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, true);
|
this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, {
|
||||||
|
animate: true,
|
||||||
|
});
|
||||||
this._passwordBox.add(this._workSpinner.actor);
|
this._passwordBox.add(this._workSpinner.actor);
|
||||||
|
|
||||||
this.setInitialKeyFocus(this._passwordEntry);
|
|
||||||
this._passwordBox.hide();
|
this._passwordBox.hide();
|
||||||
|
|
||||||
this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label' });
|
this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label' });
|
||||||
@@ -144,8 +135,16 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
|
|
||||||
this._doneEmitted = false;
|
this._doneEmitted = false;
|
||||||
|
|
||||||
|
this._mode = -1;
|
||||||
|
|
||||||
this._identityToAuth = Polkit.UnixUser.new_for_name(userName);
|
this._identityToAuth = Polkit.UnixUser.new_for_name(userName);
|
||||||
this._cookie = cookie;
|
this._cookie = cookie;
|
||||||
|
|
||||||
|
this._userLoadedId = this._user.connect('notify::is-loaded',
|
||||||
|
this._onUserChanged.bind(this));
|
||||||
|
this._userChangedId = this._user.connect('changed',
|
||||||
|
this._onUserChanged.bind(this));
|
||||||
|
this._onUserChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
_setWorking(working) {
|
_setWorking(working) {
|
||||||
@@ -155,8 +154,9 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
this._workSpinner.stop();
|
this._workSpinner.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
performAuthentication() {
|
_initiateSession() {
|
||||||
this._destroySession();
|
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._sessionCompletedId = this._session.connect('completed', this._onSessionCompleted.bind(this));
|
this._sessionCompletedId = this._session.connect('completed', this._onSessionCompleted.bind(this));
|
||||||
@@ -216,7 +216,10 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onAuthenticateButtonPressed() {
|
_onAuthenticateButtonPressed() {
|
||||||
this._onEntryActivate();
|
if (this._mode === DialogMode.CONFIRM)
|
||||||
|
this._initiateSession();
|
||||||
|
else
|
||||||
|
this._onEntryActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
_onSessionCompleted(session, gainedAuthorization) {
|
_onSessionCompleted(session, gainedAuthorization) {
|
||||||
@@ -247,7 +250,7 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Try and authenticate again */
|
/* Try and authenticate again */
|
||||||
this.performAuthentication();
|
this._initiateSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,9 +268,10 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
|
|
||||||
this._passwordBox.show();
|
this._passwordBox.show();
|
||||||
this._passwordEntry.set_text('');
|
this._passwordEntry.set_text('');
|
||||||
this._passwordEntry.grab_key_focus();
|
|
||||||
this._updateSensitivity(true);
|
this._updateSensitivity(true);
|
||||||
|
|
||||||
this._ensureOpen();
|
this._ensureOpen();
|
||||||
|
this._passwordEntry.grab_key_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
_onSessionShowError(session, text) {
|
_onSessionShowError(session, text) {
|
||||||
@@ -303,10 +307,40 @@ var AuthenticationDialog = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onUserChanged() {
|
_onUserChanged() {
|
||||||
if (this._user.is_loaded && this._userAvatar) {
|
if (!this._user.is_loaded)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let userName = this._user.get_user_name();
|
||||||
|
let realName = this._user.get_real_name();
|
||||||
|
|
||||||
|
if (userName !== 'root') {
|
||||||
|
this._userLabel.set_text(realName);
|
||||||
|
|
||||||
this._userAvatar.update();
|
this._userAvatar.update();
|
||||||
this._userAvatar.actor.show();
|
this._userAvatar.actor.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._user.get_password_mode() === AccountsService.UserPasswordMode.NONE) {
|
||||||
|
if (this._mode === DialogMode.CONFIRM)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._mode = DialogMode.CONFIRM;
|
||||||
|
this._destroySession();
|
||||||
|
|
||||||
|
this._okButton.reactive = true;
|
||||||
|
|
||||||
|
/* We normally open the dialog when we get a "request" signal, but
|
||||||
|
* since in this case initiating a session would perform the
|
||||||
|
* authentication, only open the dialog and initiate the session
|
||||||
|
* when the user confirmed. */
|
||||||
|
this._ensureOpen();
|
||||||
|
} else {
|
||||||
|
if (this._mode === DialogMode.AUTH)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._mode = DialogMode.AUTH;
|
||||||
|
this._initiateSession();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
@@ -369,19 +403,7 @@ var AuthenticationAgent = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._currentDialog = new AuthenticationDialog(actionId, message, cookie, userNames);
|
this._currentDialog = new AuthenticationDialog(actionId, message, cookie, userNames);
|
||||||
|
|
||||||
// We actually don't want to open the dialog until we know for
|
|
||||||
// sure that we're going to interact with the user. For
|
|
||||||
// example, if the password for the identity to auth is blank
|
|
||||||
// (which it will be on a live CD) then there will be no
|
|
||||||
// conversation at all... of course, we don't *know* that
|
|
||||||
// until we actually try it.
|
|
||||||
//
|
|
||||||
// See https://bugzilla.gnome.org/show_bug.cgi?id=643062 for more
|
|
||||||
// discussion.
|
|
||||||
|
|
||||||
this._currentDialog.connect('done', this._onDialogDone.bind(this));
|
this._currentDialog.connect('done', this._onDialogDone.bind(this));
|
||||||
this._currentDialog.performAuthentication();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onCancel(_nativeAgent) {
|
_onCancel(_nativeAgent) {
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ var ChatSource = class extends MessageTray.Source {
|
|||||||
|
|
||||||
let msg = Tp.ClientMessage.new_text(type, text);
|
let msg = Tp.ClientMessage.new_text(type, text);
|
||||||
this._channel.send_message_async(msg, 0, (src, result) => {
|
this._channel.send_message_async(msg, 0, (src, result) => {
|
||||||
this._channel.send_message_finish(result);
|
this._channel.send_message_finish(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -653,7 +653,7 @@ var ChatNotification = class extends MessageTray.Notification {
|
|||||||
* sender: the name of the sender,
|
* sender: the name of the sender,
|
||||||
* timestamp: the time the message was sent
|
* timestamp: the time the message was sent
|
||||||
* direction: a #NotificationDirection
|
* direction: a #NotificationDirection
|
||||||
*
|
*
|
||||||
* @noTimestamp: Whether to add a timestamp. If %true, no timestamp
|
* @noTimestamp: Whether to add a timestamp. If %true, no timestamp
|
||||||
* will be added, regardless of the difference since the
|
* will be added, regardless of the difference since the
|
||||||
* last timestamp
|
* last timestamp
|
||||||
@@ -673,8 +673,8 @@ var ChatNotification = class extends MessageTray.Notification {
|
|||||||
{ datetime: GLib.DateTime.new_from_unix_local (message.timestamp),
|
{ datetime: GLib.DateTime.new_from_unix_local (message.timestamp),
|
||||||
bannerMarkup: true });
|
bannerMarkup: true });
|
||||||
|
|
||||||
let group = (message.direction == NotificationDirection.RECEIVED ?
|
let group = (message.direction == NotificationDirection.RECEIVED
|
||||||
'received' : 'sent');
|
? 'received' : 'sent');
|
||||||
|
|
||||||
this._append({ body: messageBody,
|
this._append({ body: messageBody,
|
||||||
group: group,
|
group: group,
|
||||||
@@ -696,8 +696,8 @@ var ChatNotification = class extends MessageTray.Notification {
|
|||||||
// SCROLLBACK_RECENT_LENGTH previous messages. Otherwise
|
// SCROLLBACK_RECENT_LENGTH previous messages. Otherwise
|
||||||
// we'll keep SCROLLBACK_IDLE_LENGTH messages.
|
// we'll keep SCROLLBACK_IDLE_LENGTH messages.
|
||||||
|
|
||||||
let maxLength = (lastMessageTime < currentTime - SCROLLBACK_RECENT_TIME) ?
|
let maxLength = (lastMessageTime < currentTime - SCROLLBACK_RECENT_TIME)
|
||||||
SCROLLBACK_IDLE_LENGTH : SCROLLBACK_RECENT_LENGTH;
|
? SCROLLBACK_IDLE_LENGTH : SCROLLBACK_RECENT_LENGTH;
|
||||||
|
|
||||||
let filteredHistory = this.messages.filter(item => item.realMessage);
|
let filteredHistory = this.messages.filter(item => item.realMessage);
|
||||||
if (filteredHistory.length > maxLength) {
|
if (filteredHistory.length > maxLength) {
|
||||||
|
|||||||
@@ -623,7 +623,7 @@ var Dash = class Dash {
|
|||||||
icon.icon.ease({
|
icon.icon.ease({
|
||||||
width: targetWidth,
|
width: targetWidth,
|
||||||
height: targetHeight,
|
height: targetHeight,
|
||||||
time: DASH_ANIMATION_TIME,
|
duration: DASH_ANIMATION_TIME,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -703,8 +703,8 @@ var Dash = class Dash {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// App moved
|
// App moved
|
||||||
let nextApp = newApps.length > newIndex + 1 ? newApps[newIndex + 1]
|
let nextApp = newApps.length > newIndex + 1
|
||||||
: null;
|
? newApps[newIndex + 1] : null;
|
||||||
let insertHere = nextApp && nextApp == oldApp;
|
let insertHere = nextApp && nextApp == oldApp;
|
||||||
let alreadyRemoved = removedActors.reduce((result, actor) => {
|
let alreadyRemoved = removedActors.reduce((result, actor) => {
|
||||||
let removedApp = actor.child._delegate.app;
|
let removedApp = actor.child._delegate.app;
|
||||||
|
|||||||
@@ -148,8 +148,9 @@ var WorldClocksSection = class WorldClocksSection {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let layout = this._grid.layout_manager;
|
let layout = this._grid.layout_manager;
|
||||||
let title = (this._locations.length == 0) ? _("Add world clocks…")
|
let title = (this._locations.length == 0)
|
||||||
: _("World Clocks");
|
? _("Add world clocks…")
|
||||||
|
: _("World Clocks");
|
||||||
let header = new St.Label({ style_class: 'world-clocks-header',
|
let header = new St.Label({ style_class: 'world-clocks-header',
|
||||||
x_align: Clutter.ActorAlign.START,
|
x_align: Clutter.ActorAlign.START,
|
||||||
text: title });
|
text: title });
|
||||||
@@ -412,7 +413,7 @@ var MessagesIndicator = class MessagesIndicator {
|
|||||||
|
|
||||||
_updateCount() {
|
_updateCount() {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
this._sources.forEach(source => count += source.unseenCount);
|
this._sources.forEach(source => (count += source.unseenCount));
|
||||||
count -= Main.messageTray.queueCount;
|
count -= Main.messageTray.queueCount;
|
||||||
|
|
||||||
this.actor.visible = (count > 0);
|
this.actor.visible = (count > 0);
|
||||||
|
|||||||
@@ -51,10 +51,16 @@ class Dialog extends St.Widget {
|
|||||||
y_align: St.Align.START });
|
y_align: St.Align.START });
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
makeInactive() {
|
||||||
if (this._eventId != 0)
|
if (this._eventId != 0)
|
||||||
this._parentActor.disconnect(this._eventId);
|
this._parentActor.disconnect(this._eventId);
|
||||||
this._eventId = 0;
|
this._eventId = 0;
|
||||||
|
|
||||||
|
this.buttonLayout.get_children().forEach(c => c.set_reactive(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
_onDestroy() {
|
||||||
|
this.makeInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
_modalEventHandler(actor, event) {
|
_modalEventHandler(actor, event) {
|
||||||
|
|||||||
14
js/ui/dnd.js
14
js/ui/dnd.js
@@ -573,11 +573,15 @@ var _Draggable = class _Draggable {
|
|||||||
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);
|
||||||
if (target._delegate.acceptDrop(this.actor._delegate,
|
let accepted = false;
|
||||||
this._dragActor,
|
try {
|
||||||
targX,
|
accepted = target._delegate.acceptDrop(this.actor._delegate,
|
||||||
targY,
|
this._dragActor, targX, targY, event.get_time());
|
||||||
event.get_time())) {
|
} catch (e) {
|
||||||
|
// On error, skip this target
|
||||||
|
logError(e, "Skipping drag target");
|
||||||
|
}
|
||||||
|
if (accepted) {
|
||||||
// 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 && this._dragActor.get_parent() == Main.uiGroup) {
|
if (this._dragActor && this._dragActor.get_parent() == Main.uiGroup) {
|
||||||
|
|||||||
@@ -109,8 +109,6 @@ function _easeActor(actor, params) {
|
|||||||
actor.set_easing_mode(params.mode);
|
actor.set_easing_mode(params.mode);
|
||||||
delete params.mode;
|
delete params.mode;
|
||||||
|
|
||||||
Meta.disable_unredirect_for_display(global.display);
|
|
||||||
|
|
||||||
let cleanup = () => Meta.enable_unredirect_for_display(global.display);
|
let cleanup = () => Meta.enable_unredirect_for_display(global.display);
|
||||||
let callback = _makeEaseCallback(params, cleanup);
|
let callback = _makeEaseCallback(params, cleanup);
|
||||||
|
|
||||||
@@ -121,7 +119,14 @@ function _easeActor(actor, params) {
|
|||||||
actor.set(params);
|
actor.set(params);
|
||||||
actor.restore_easing_state();
|
actor.restore_easing_state();
|
||||||
|
|
||||||
let transition = actor.get_transition(animatedProps[0]);
|
let transition = animatedProps.map(p => actor.get_transition(p))
|
||||||
|
.find(t => t !== null);
|
||||||
|
|
||||||
|
if (transition && transition.delay)
|
||||||
|
transition.connect('started', () => Meta.disable_unredirect_for_display(global.display));
|
||||||
|
else
|
||||||
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
|
|
||||||
if (transition)
|
if (transition)
|
||||||
transition.connect('stopped', (t, finished) => callback(finished));
|
transition.connect('stopped', (t, finished) => callback(finished));
|
||||||
else
|
else
|
||||||
@@ -143,8 +148,6 @@ function _easeActorProperty(actor, propName, target, params) {
|
|||||||
if (actor instanceof Clutter.Actor && !actor.mapped)
|
if (actor instanceof Clutter.Actor && !actor.mapped)
|
||||||
duration = 0;
|
duration = 0;
|
||||||
|
|
||||||
Meta.disable_unredirect_for_display(global.display);
|
|
||||||
|
|
||||||
let cleanup = () => Meta.enable_unredirect_for_display(global.display);
|
let cleanup = () => Meta.enable_unredirect_for_display(global.display);
|
||||||
let callback = _makeEaseCallback(params, cleanup);
|
let callback = _makeEaseCallback(params, cleanup);
|
||||||
|
|
||||||
@@ -155,6 +158,7 @@ function _easeActorProperty(actor, propName, target, params) {
|
|||||||
let [obj, prop] = _getPropertyTarget(actor, propName);
|
let [obj, prop] = _getPropertyTarget(actor, propName);
|
||||||
obj[prop] = target;
|
obj[prop] = target;
|
||||||
|
|
||||||
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
callback(true);
|
callback(true);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -170,6 +174,11 @@ function _easeActorProperty(actor, propName, target, params) {
|
|||||||
|
|
||||||
transition.set_to(target);
|
transition.set_to(target);
|
||||||
|
|
||||||
|
if (transition.delay)
|
||||||
|
transition.connect('started', () => Meta.disable_unredirect_for_display(global.display));
|
||||||
|
else
|
||||||
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
|
|
||||||
transition.connect('stopped', (t, finished) => callback(finished));
|
transition.connect('stopped', (t, finished) => callback(finished));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported init connect disconnect */
|
/* exported init connect disconnect */
|
||||||
|
|
||||||
const { Gio, St } = imports.gi;
|
const { GLib, Gio, St } = imports.gi;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
@@ -28,6 +28,23 @@ var ExtensionManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
// The following file should exist for a period of time when extensions
|
||||||
|
// are enabled after start. If it exists, then the systemd unit will
|
||||||
|
// disable extensions should gnome-shell crash.
|
||||||
|
// Should the file already exist from a previous login, then this is OK.
|
||||||
|
let disableFilename = GLib.build_filenamev([GLib.get_user_runtime_dir(), 'gnome-shell-disable-extensions']);
|
||||||
|
let disableFile = Gio.File.new_for_path(disableFilename);
|
||||||
|
try {
|
||||||
|
disableFile.create(Gio.FileCreateFlags.REPLACE_DESTINATION, null);
|
||||||
|
} catch (e) {
|
||||||
|
log(`Failed to create file ${disableFilename}: ${e.message}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 60, () => {
|
||||||
|
FileUtils.deleteGFile(disableFile);
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
|
||||||
this._sessionUpdated();
|
this._sessionUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,7 +303,7 @@ var ExtensionManager = class {
|
|||||||
reloadExtension(oldExtension) {
|
reloadExtension(oldExtension) {
|
||||||
// Grab the things we'll need to pass to createExtensionObject
|
// Grab the things we'll need to pass to createExtensionObject
|
||||||
// to reload it.
|
// to reload it.
|
||||||
let { uuid: uuid, dir: dir, type: type } = oldExtension;
|
let { uuid, dir, type } = oldExtension;
|
||||||
|
|
||||||
// Then unload the old extension.
|
// Then unload the old extension.
|
||||||
this.unloadExtension(oldExtension);
|
this.unloadExtension(oldExtension);
|
||||||
|
|||||||
@@ -126,6 +126,9 @@ Signals.addSignalMethods(CandidateArea.prototype);
|
|||||||
|
|
||||||
var CandidatePopup = class CandidatePopup {
|
var CandidatePopup = class CandidatePopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
this._dummyCursor = new St.Widget({ opacity: 0 });
|
||||||
|
Main.layoutManager.uiGroup.add_actor(this._dummyCursor);
|
||||||
|
|
||||||
this._boxPointer = new BoxPointer.BoxPointer(St.Side.TOP);
|
this._boxPointer = new BoxPointer.BoxPointer(St.Side.TOP);
|
||||||
this._boxPointer.visible = false;
|
this._boxPointer.visible = false;
|
||||||
this._boxPointer.style_class = 'candidate-popup-boxpointer';
|
this._boxPointer.style_class = 'candidate-popup-boxpointer';
|
||||||
@@ -272,9 +275,11 @@ var CandidatePopup = class CandidatePopup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_setDummyCursorGeometry(x, y, w, h) {
|
_setDummyCursorGeometry(x, y, w, h) {
|
||||||
Main.layoutManager.setDummyCursorGeometry(x, y, w, h);
|
this._dummyCursor.set_position(Math.round(x), Math.round(y));
|
||||||
|
this._dummyCursor.set_size(Math.round(w), Math.round(h));
|
||||||
|
|
||||||
if (this._boxPointer.visible)
|
if (this._boxPointer.visible)
|
||||||
this._boxPointer.setPosition(Main.layoutManager.dummyCursor, 0);
|
this._boxPointer.setPosition(this._dummyCursor, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateVisibility() {
|
_updateVisibility() {
|
||||||
@@ -284,7 +289,7 @@ var CandidatePopup = class CandidatePopup {
|
|||||||
this._candidateArea.actor.visible));
|
this._candidateArea.actor.visible));
|
||||||
|
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
this._boxPointer.setPosition(Main.layoutManager.dummyCursor, 0);
|
this._boxPointer.setPosition(this._dummyCursor, 0);
|
||||||
this._boxPointer.open(BoxPointer.PopupAnimation.NONE);
|
this._boxPointer.open(BoxPointer.PopupAnimation.NONE);
|
||||||
this._boxPointer.raise_top();
|
this._boxPointer.raise_top();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -142,6 +142,10 @@ class BaseIcon extends St.Bin {
|
|||||||
zoomOutActor(this.child);
|
zoomOutActor(this.child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
animateZoomOutAtPos(x, y) {
|
||||||
|
zoomOutActorAtPos(this.child, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
this._createIconTexture(this.iconSize);
|
this._createIconTexture(this.iconSize);
|
||||||
}
|
}
|
||||||
@@ -152,10 +156,15 @@ function clamp(value, min, max) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function zoomOutActor(actor) {
|
function zoomOutActor(actor) {
|
||||||
|
let [x, y] = actor.get_transformed_position();
|
||||||
|
zoomOutActorAtPos(actor, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
function zoomOutActorAtPos(actor, x, y) {
|
||||||
let actorClone = new Clutter.Clone({ source: actor,
|
let actorClone = new Clutter.Clone({ source: actor,
|
||||||
reactive: false });
|
reactive: false });
|
||||||
let [width, height] = actor.get_transformed_size();
|
let [width, height] = actor.get_transformed_size();
|
||||||
let [x, y] = actor.get_transformed_position();
|
|
||||||
actorClone.set_size(width, height);
|
actorClone.set_size(width, height);
|
||||||
actorClone.set_position(x, y);
|
actorClone.set_position(x, y);
|
||||||
actorClone.opacity = 255;
|
actorClone.opacity = 255;
|
||||||
@@ -273,9 +282,9 @@ var IconGrid = GObject.registerClass({
|
|||||||
return [0, 0];
|
return [0, 0];
|
||||||
|
|
||||||
let nChildren = this.get_n_children();
|
let nChildren = this.get_n_children();
|
||||||
let nColumns = this._colLimit ? Math.min(this._colLimit,
|
let nColumns = this._colLimit
|
||||||
nChildren)
|
? Math.min(this._colLimit, nChildren)
|
||||||
: nChildren;
|
: nChildren;
|
||||||
let totalSpacing = Math.max(0, nColumns - 1) * this._getSpacing();
|
let totalSpacing = Math.max(0, nColumns - 1) * this._getSpacing();
|
||||||
// Kind of a lie, but not really an issue right now. If
|
// Kind of a lie, but not really an issue right now. If
|
||||||
// we wanted to support some sort of hidden/overflow that would
|
// we wanted to support some sort of hidden/overflow that would
|
||||||
@@ -787,8 +796,9 @@ var IconGrid = GObject.registerClass({
|
|||||||
let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth;
|
let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth;
|
||||||
let neededHeight = this.usedHeightForNRows(this._minRows) - availHeight;
|
let neededHeight = this.usedHeightForNRows(this._minRows) - availHeight;
|
||||||
|
|
||||||
let neededSpacePerItem = (neededWidth > neededHeight) ? Math.ceil(neededWidth / this._minColumns)
|
let neededSpacePerItem = (neededWidth > neededHeight)
|
||||||
: Math.ceil(neededHeight / this._minRows);
|
? Math.ceil(neededWidth / this._minColumns)
|
||||||
|
: Math.ceil(neededHeight / this._minRows);
|
||||||
this._fixedHItemSize = Math.max(this._hItemSize - neededSpacePerItem, MIN_ICON_SIZE);
|
this._fixedHItemSize = Math.max(this._hItemSize - neededSpacePerItem, MIN_ICON_SIZE);
|
||||||
this._fixedVItemSize = Math.max(this._vItemSize - neededSpacePerItem, MIN_ICON_SIZE);
|
this._fixedVItemSize = Math.max(this._vItemSize - neededSpacePerItem, MIN_ICON_SIZE);
|
||||||
|
|
||||||
@@ -963,8 +973,7 @@ var PaginatedIconGrid = GObject.registerClass({
|
|||||||
let childrenPerRow = this._childrenPerPage / this._rowsPerPage;
|
let childrenPerRow = this._childrenPerPage / this._rowsPerPage;
|
||||||
let sourceRow = Math.floor((index - pageOffset) / childrenPerRow);
|
let sourceRow = Math.floor((index - pageOffset) / childrenPerRow);
|
||||||
|
|
||||||
let nRowsAbove = (side == St.Side.TOP) ? sourceRow + 1
|
let nRowsAbove = (side == St.Side.TOP) ? sourceRow + 1 : sourceRow;
|
||||||
: sourceRow;
|
|
||||||
let nRowsBelow = this._rowsPerPage - nRowsAbove;
|
let nRowsBelow = this._rowsPerPage - nRowsAbove;
|
||||||
|
|
||||||
let nRowsUp, nRowsDown;
|
let nRowsUp, nRowsDown;
|
||||||
|
|||||||
@@ -76,8 +76,9 @@ var InhibitShortcutsDialog = GObject.registerClass({
|
|||||||
let name = this._app ? this._app.get_name() : this._window.title;
|
let name = this._app ? this._app.get_name() : this._window.title;
|
||||||
|
|
||||||
/* Translators: %s is an application name like "Settings" */
|
/* Translators: %s is an application name like "Settings" */
|
||||||
let title = name ? _("%s wants to inhibit shortcuts").format(name)
|
let title = name
|
||||||
: _("Application wants to inhibit shortcuts");
|
? _("%s wants to inhibit shortcuts").format(name)
|
||||||
|
: _("Application wants to inhibit shortcuts");
|
||||||
let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' });
|
let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' });
|
||||||
|
|
||||||
let contentParams = { icon, title };
|
let contentParams = { icon, title };
|
||||||
|
|||||||
@@ -28,23 +28,23 @@ class KbdA11yDialog extends GObject.Object {
|
|||||||
if (whatChanged & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) {
|
if (whatChanged & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) {
|
||||||
key = KEY_SLOW_KEYS_ENABLED;
|
key = KEY_SLOW_KEYS_ENABLED;
|
||||||
enabled = (newFlags & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) > 0;
|
enabled = (newFlags & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) > 0;
|
||||||
title = enabled ?
|
title = enabled
|
||||||
_("Slow Keys Turned On") :
|
? _("Slow Keys Turned On")
|
||||||
_("Slow Keys Turned Off");
|
: _("Slow Keys Turned Off");
|
||||||
body = _("You just held down the Shift key for 8 seconds. This is the shortcut " +
|
body = _("You just held down the Shift key for 8 seconds. This is the shortcut " +
|
||||||
"for the Slow Keys feature, which affects the way your keyboard works.");
|
"for the Slow Keys feature, which affects the way your keyboard works.");
|
||||||
|
|
||||||
} else if (whatChanged & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) {
|
} else if (whatChanged & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) {
|
||||||
key = KEY_STICKY_KEYS_ENABLED;
|
key = KEY_STICKY_KEYS_ENABLED;
|
||||||
enabled = (newFlags & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) > 0;
|
enabled = (newFlags & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) > 0;
|
||||||
title = enabled ?
|
title = enabled
|
||||||
_("Sticky Keys Turned On") :
|
? _("Sticky Keys Turned On")
|
||||||
_("Sticky Keys Turned Off");
|
: _("Sticky Keys Turned Off");
|
||||||
body = enabled ?
|
body = enabled
|
||||||
_("You just pressed the Shift key 5 times in a row. This is the shortcut " +
|
? _("You just pressed the Shift key 5 times in a row. This is the shortcut " +
|
||||||
"for the Sticky Keys feature, which affects the way your keyboard works.") :
|
"for the Sticky Keys feature, which affects the way your keyboard works.")
|
||||||
_("You just pressed two keys at once, or pressed the Shift key 5 times in a row. " +
|
: _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. " +
|
||||||
"This turns off the Sticky Keys feature, which affects the way your keyboard works.");
|
"This turns off the Sticky Keys feature, which affects the way your keyboard works.");
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,9 +104,10 @@ class KeyContainer extends St.Widget {
|
|||||||
this._currentRow++;
|
this._currentRow++;
|
||||||
this._currentCol = 0;
|
this._currentCol = 0;
|
||||||
|
|
||||||
let row = new Object();
|
let row = {
|
||||||
row.keys = [];
|
keys: [],
|
||||||
row.width = 0;
|
width: 0,
|
||||||
|
};
|
||||||
this._rows.push(row);
|
this._rows.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,10 +466,17 @@ Signals.addSignalMethods(Key.prototype);
|
|||||||
|
|
||||||
var KeyboardModel = class {
|
var KeyboardModel = class {
|
||||||
constructor(groupName) {
|
constructor(groupName) {
|
||||||
try {
|
let names = [groupName];
|
||||||
this._model = this._loadModel(groupName);
|
if (groupName.includes('+'))
|
||||||
} catch (e) {
|
names.push(groupName.replace(/\+.*/, ''));
|
||||||
this._model = this._loadModel('us');
|
names.push('us');
|
||||||
|
|
||||||
|
for (let i = 0; i < names.length; i++) {
|
||||||
|
try {
|
||||||
|
this._model = this._loadModel(names[i]);
|
||||||
|
break;
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -886,7 +894,7 @@ var EmojiSelection = class EmojiSelection {
|
|||||||
this._emojiPager.connect('emoji', (pager, str) => {
|
this._emojiPager.connect('emoji', (pager, str) => {
|
||||||
this.emit('emoji-selected', str);
|
this.emit('emoji-selected', str);
|
||||||
});
|
});
|
||||||
this.actor.add(this._emojiPager.actor, { expand: true });
|
this.actor.add(this._emojiPager, { expand: true });
|
||||||
|
|
||||||
this._pageIndicator = new PageIndicators.PageIndicators(false);
|
this._pageIndicator = new PageIndicators.PageIndicators(false);
|
||||||
this.actor.add(this._pageIndicator, { expand: true, x_fill: false, y_fill: false });
|
this.actor.add(this._pageIndicator, { expand: true, x_fill: false, y_fill: false });
|
||||||
@@ -1080,7 +1088,7 @@ var Keyboard = class Keyboard {
|
|||||||
this.hide();
|
this.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
Meta.get_backend().connect('last-device-changed',
|
Meta.get_backend().connect('last-device-changed',
|
||||||
(backend, deviceId) => {
|
(backend, deviceId) => {
|
||||||
let manager = Clutter.DeviceManager.get_default();
|
let manager = Clutter.DeviceManager.get_default();
|
||||||
let device = manager.get_device(deviceId);
|
let device = manager.get_device(deviceId);
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ var LayoutManager = GObject.registerClass({
|
|||||||
'startup-complete': {},
|
'startup-complete': {},
|
||||||
'startup-prepared': {},
|
'startup-prepared': {},
|
||||||
'monitors-changed': {},
|
'monitors-changed': {},
|
||||||
|
'system-modal-opened': {},
|
||||||
'keyboard-visible-changed': { param_types: [GObject.TYPE_BOOLEAN] } },
|
'keyboard-visible-changed': { param_types: [GObject.TYPE_BOOLEAN] } },
|
||||||
}, class LayoutManager extends GObject.Object {
|
}, class LayoutManager extends GObject.Object {
|
||||||
_init() {
|
_init() {
|
||||||
@@ -771,8 +772,7 @@ var LayoutManager = GObject.registerClass({
|
|||||||
this.keyboardBox.ease({
|
this.keyboardBox.ease({
|
||||||
anchor_y: 0,
|
anchor_y: 0,
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: immediate ? 0
|
duration: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
|
||||||
: KEYBOARD_ANIMATION_TIME,
|
|
||||||
mode: Clutter.AnimationMode.EASE_IN_QUAD,
|
mode: Clutter.AnimationMode.EASE_IN_QUAD,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
this._hideKeyboardComplete();
|
this._hideKeyboardComplete();
|
||||||
@@ -856,8 +856,9 @@ var LayoutManager = GObject.registerClass({
|
|||||||
index = this._findActor(ancestor);
|
index = this._findActor(ancestor);
|
||||||
}
|
}
|
||||||
|
|
||||||
let ancestorData = ancestor ? this._trackedActors[index]
|
let ancestorData = ancestor
|
||||||
: defaultParams;
|
? this._trackedActors[index]
|
||||||
|
: defaultParams;
|
||||||
// We can't use Params.parse here because we want to drop
|
// We can't use Params.parse here because we want to drop
|
||||||
// the extra values like ancestorData.actor
|
// the extra values like ancestorData.actor
|
||||||
for (let prop in defaultParams) {
|
for (let prop in defaultParams) {
|
||||||
@@ -1015,11 +1016,6 @@ var LayoutManager = GObject.registerClass({
|
|||||||
if (Main.modalCount > 0)
|
if (Main.modalCount > 0)
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
|
|
||||||
// Bug workaround - get_transformed_position()/get_transformed_size() don't work after
|
|
||||||
// a change in stage size until the first pick or paint.
|
|
||||||
// https://bugzilla.gnome.org/show_bug.cgi?id=761565
|
|
||||||
global.stage.get_actor_at_pos(Clutter.PickMode.ALL, 0, 0);
|
|
||||||
|
|
||||||
let rects = [], struts = [], i;
|
let rects = [], struts = [], i;
|
||||||
let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
|
let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
|
||||||
let wantsInputRegion = !isPopupMenuVisible;
|
let wantsInputRegion = !isPopupMenuVisible;
|
||||||
@@ -1075,16 +1071,17 @@ var LayoutManager = GObject.registerClass({
|
|||||||
side = Meta.Side.RIGHT;
|
side = Meta.Side.RIGHT;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
} else if (x1 <= monitor.x)
|
} else if (x1 <= monitor.x) {
|
||||||
side = Meta.Side.LEFT;
|
side = Meta.Side.LEFT;
|
||||||
else if (y1 <= monitor.y)
|
} else if (y1 <= monitor.y) {
|
||||||
side = Meta.Side.TOP;
|
side = Meta.Side.TOP;
|
||||||
else if (x2 >= monitor.x + monitor.width)
|
} else if (x2 >= monitor.x + monitor.width) {
|
||||||
side = Meta.Side.RIGHT;
|
side = Meta.Side.RIGHT;
|
||||||
else if (y2 >= monitor.y + monitor.height)
|
} else if (y2 >= monitor.y + monitor.height) {
|
||||||
side = Meta.Side.BOTTOM;
|
side = Meta.Side.BOTTOM;
|
||||||
else
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 });
|
let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 });
|
||||||
let strut = new Meta.Strut({ rect: strutRect, side: side });
|
let strut = new Meta.Strut({ rect: strutRect, side: side });
|
||||||
|
|||||||
@@ -185,6 +185,8 @@ var Lightbox = class Lightbox {
|
|||||||
this.emit('shown');
|
this.emit('shown');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.actor.show();
|
||||||
|
|
||||||
if (this._radialEffect) {
|
if (this._radialEffect) {
|
||||||
this.actor.ease_property(
|
this.actor.ease_property(
|
||||||
'@effects.radial.brightness', VIGNETTE_BRIGHTNESS, easeProps);
|
'@effects.radial.brightness', VIGNETTE_BRIGHTNESS, easeProps);
|
||||||
@@ -197,8 +199,6 @@ var Lightbox = class Lightbox {
|
|||||||
onComplete
|
onComplete
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hide(fadeOutTime) {
|
hide(fadeOutTime) {
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ var ObjInspector = class ObjInspector {
|
|||||||
scale_x: 1,
|
scale_x: 1,
|
||||||
scale_y: 1,
|
scale_y: 1,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
time: 200
|
duration: 200
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.actor.set_scale(1, 1);
|
this.actor.set_scale(1, 1);
|
||||||
@@ -881,7 +881,7 @@ var LookingGlass = class LookingGlass {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
|
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
|
||||||
entry: this._entry.clutter_text });
|
entry: this._entry.clutter_text });
|
||||||
|
|
||||||
this._autoComplete = new AutoComplete(this._entry);
|
this._autoComplete = new AutoComplete(this._entry);
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ var Magnifier = class Magnifier {
|
|||||||
* Show the system mouse pointer.
|
* Show the system mouse pointer.
|
||||||
*/
|
*/
|
||||||
showSystemCursor() {
|
showSystemCursor() {
|
||||||
|
if (this._cursorTracker.set_keep_focus_while_hidden)
|
||||||
|
this._cursorTracker.set_keep_focus_while_hidden(false);
|
||||||
this._cursorTracker.set_pointer_visible(true);
|
this._cursorTracker.set_pointer_visible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,6 +137,8 @@ var Magnifier = class Magnifier {
|
|||||||
* Hide the system mouse pointer.
|
* Hide the system mouse pointer.
|
||||||
*/
|
*/
|
||||||
hideSystemCursor() {
|
hideSystemCursor() {
|
||||||
|
if (this._cursorTracker.set_keep_focus_while_hidden)
|
||||||
|
this._cursorTracker.set_keep_focus_while_hidden(true);
|
||||||
this._cursorTracker.set_pointer_visible(false);
|
this._cursorTracker.set_pointer_visible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +173,7 @@ var Magnifier = class Magnifier {
|
|||||||
// Make sure system mouse pointer is shown when all zoom regions are
|
// Make sure system mouse pointer is shown when all zoom regions are
|
||||||
// invisible.
|
// invisible.
|
||||||
if (!activate)
|
if (!activate)
|
||||||
this._cursorTracker.set_pointer_visible(true);
|
this.showSystemCursor();
|
||||||
|
|
||||||
// Notify interested parties of this change
|
// Notify interested parties of this change
|
||||||
this.emit('active-changed', activate);
|
this.emit('active-changed', activate);
|
||||||
@@ -264,7 +268,7 @@ var Magnifier = class Magnifier {
|
|||||||
zoomRegion.setViewPort(viewPort);
|
zoomRegion.setViewPort(viewPort);
|
||||||
|
|
||||||
// We ignore the redundant width/height on the ROI
|
// We ignore the redundant width/height on the ROI
|
||||||
let fixedROI = new Object(roi);
|
let fixedROI = Object.create(roi);
|
||||||
fixedROI.width = viewPort.width / xMagFactor;
|
fixedROI.width = viewPort.width / xMagFactor;
|
||||||
fixedROI.height = viewPort.height / yMagFactor;
|
fixedROI.height = viewPort.height / yMagFactor;
|
||||||
zoomRegion.setROI(fixedROI);
|
zoomRegion.setROI(fixedROI);
|
||||||
@@ -451,15 +455,11 @@ var Magnifier = class Magnifier {
|
|||||||
* @clip: Flag to indicate whether to clip the crosshairs.
|
* @clip: Flag to indicate whether to clip the crosshairs.
|
||||||
*/
|
*/
|
||||||
setCrosshairsClip(clip) {
|
setCrosshairsClip(clip) {
|
||||||
if (clip) {
|
if (!this._crossHairs)
|
||||||
if (this._crossHairs)
|
return;
|
||||||
this._crossHairs.setClip(CROSSHAIRS_CLIP_SIZE);
|
|
||||||
} else {
|
// Setting no clipping on crosshairs means a zero sized clip rectangle.
|
||||||
// Setting no clipping on crosshairs means a zero sized clip
|
this._crossHairs.setClip(clip ? CROSSHAIRS_CLIP_SIZE : [0, 0]);
|
||||||
// rectangle.
|
|
||||||
if (this._crossHairs)
|
|
||||||
this._crossHairs.setClip([0, 0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -229,7 +229,11 @@ function _initializeUI() {
|
|||||||
EndSessionDialog.init();
|
EndSessionDialog.init();
|
||||||
|
|
||||||
// We're ready for the session manager to move to the next phase
|
// We're ready for the session manager to move to the next phase
|
||||||
Meta.register_with_session();
|
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
||||||
|
Shell.util_sd_notify();
|
||||||
|
Meta.register_with_session();
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
|
||||||
_startDate = new Date();
|
_startDate = new Date();
|
||||||
|
|
||||||
@@ -705,7 +709,6 @@ function queueDeferredWork(workId) {
|
|||||||
_deferredWorkQueue.push(workId);
|
_deferredWorkQueue.push(workId);
|
||||||
if (data.actor.mapped) {
|
if (data.actor.mapped) {
|
||||||
_queueBeforeRedraw(workId);
|
_queueBeforeRedraw(workId);
|
||||||
return;
|
|
||||||
} else if (_deferredTimeoutId == 0) {
|
} else if (_deferredTimeoutId == 0) {
|
||||||
_deferredTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, DEFERRED_TIMEOUT_SECONDS, () => {
|
_deferredTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, DEFERRED_TIMEOUT_SECONDS, () => {
|
||||||
_runAllDeferredWork();
|
_runAllDeferredWork();
|
||||||
|
|||||||
@@ -333,7 +333,10 @@ var Message = class Message {
|
|||||||
|
|
||||||
let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic',
|
let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic',
|
||||||
icon_size: 16 });
|
icon_size: 16 });
|
||||||
this._closeButton = new St.Button({ child: closeIcon, opacity: 0 });
|
this._closeButton = new St.Button({
|
||||||
|
style_class: 'message-close-button',
|
||||||
|
child: closeIcon, opacity: 0,
|
||||||
|
});
|
||||||
titleBox.add_actor(this._closeButton);
|
titleBox.add_actor(this._closeButton);
|
||||||
|
|
||||||
this._bodyStack = new St.Widget({ x_expand: true });
|
this._bodyStack = new St.Widget({ x_expand: true });
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ class NotificationApplicationPolicy extends NotificationPolicy {
|
|||||||
// event sound is played when the notification is shown (if the policy for
|
// event sound is played when the notification is shown (if the policy for
|
||||||
// @source allows playing sounds).
|
// @source allows playing sounds).
|
||||||
//
|
//
|
||||||
// [1] https://developer.gnome.org/notification-spec/#markup
|
// [1] https://developer.gnome.org/notification-spec/#markup
|
||||||
var Notification = class Notification {
|
var Notification = class Notification {
|
||||||
constructor(source, title, banner, params) {
|
constructor(source, title, banner, params) {
|
||||||
this.source = source;
|
this.source = source;
|
||||||
@@ -735,8 +735,9 @@ var Source = class Source {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get narrowestPrivacyScope() {
|
get narrowestPrivacyScope() {
|
||||||
return this.notifications.every(n => n.privacyScope == PrivacyScope.SYSTEM) ? PrivacyScope.SYSTEM
|
return this.notifications.every(n => n.privacyScope == PrivacyScope.SYSTEM)
|
||||||
: PrivacyScope.USER;
|
? PrivacyScope.SYSTEM
|
||||||
|
: PrivacyScope.USER;
|
||||||
}
|
}
|
||||||
|
|
||||||
setTitle(newTitle) {
|
setTitle(newTitle) {
|
||||||
|
|||||||
@@ -216,6 +216,8 @@ var ModalDialog = GObject.registerClass({
|
|||||||
if (!Main.pushModal(this, params))
|
if (!Main.pushModal(this, params))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Main.layoutManager.emit('system-modal-opened');
|
||||||
|
|
||||||
this._hasModal = true;
|
this._hasModal = true;
|
||||||
if (this._savedKeyFocus) {
|
if (this._savedKeyFocus) {
|
||||||
this._savedKeyFocus.grab_key_focus();
|
this._savedKeyFocus.grab_key_focus();
|
||||||
@@ -253,7 +255,7 @@ var ModalDialog = GObject.registerClass({
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: FADE_OUT_DIALOG_TIME,
|
duration: FADE_OUT_DIALOG_TIME,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
onComplete: () => this.state = State.FADED_OUT
|
onComplete: () => (this.state = State.FADED_OUT)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -71,8 +71,9 @@ var MediaMessage = class MediaMessage extends MessageList.Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let isPlaying = this._player.status == 'Playing';
|
let isPlaying = this._player.status == 'Playing';
|
||||||
let iconName = isPlaying ? 'media-playback-pause-symbolic'
|
let iconName = isPlaying
|
||||||
: 'media-playback-start-symbolic';
|
? 'media-playback-pause-symbolic'
|
||||||
|
: 'media-playback-start-symbolic';
|
||||||
this._playPauseButton.child.icon_name = iconName;
|
this._playPauseButton.child.icon_name = iconName;
|
||||||
|
|
||||||
this._updateNavButton(this._prevButton, this._player.canGoPrevious);
|
this._updateNavButton(this._prevButton, this._player.canGoPrevious);
|
||||||
|
|||||||
@@ -346,8 +346,9 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
|
|||||||
notification.setTransient(!!hints['transient']);
|
notification.setTransient(!!hints['transient']);
|
||||||
|
|
||||||
let privacyScope = (hints['x-gnome-privacy-scope'] || 'user');
|
let privacyScope = (hints['x-gnome-privacy-scope'] || 'user');
|
||||||
notification.setPrivacyScope(privacyScope == 'system' ? MessageTray.PrivacyScope.SYSTEM
|
notification.setPrivacyScope(privacyScope == 'system'
|
||||||
: MessageTray.PrivacyScope.USER);
|
? MessageTray.PrivacyScope.SYSTEM
|
||||||
|
: MessageTray.PrivacyScope.USER);
|
||||||
|
|
||||||
let sourceGIcon = source.useNotificationIcon ? gicon : null;
|
let sourceGIcon = source.useNotificationIcon ? gicon : null;
|
||||||
source.processNotification(notification, sourceGIcon);
|
source.processNotification(notification, sourceGIcon);
|
||||||
@@ -540,22 +541,23 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
|
|||||||
super(source);
|
super(source);
|
||||||
this._serialized = GLib.Variant.new('a{sv}', notification);
|
this._serialized = GLib.Variant.new('a{sv}', notification);
|
||||||
|
|
||||||
let { "title": title,
|
let { title,
|
||||||
"body": body,
|
body,
|
||||||
"icon": gicon,
|
icon: gicon,
|
||||||
"urgent": urgent,
|
urgent,
|
||||||
"priority": priority,
|
priority,
|
||||||
"buttons": buttons,
|
buttons,
|
||||||
"default-action": defaultAction,
|
"default-action": defaultAction,
|
||||||
"default-action-target": defaultActionTarget,
|
"default-action-target": defaultActionTarget,
|
||||||
"timestamp": time } = notification;
|
timestamp: time } = notification;
|
||||||
|
|
||||||
if (priority) {
|
if (priority) {
|
||||||
let urgency = PRIORITY_URGENCY_MAP[priority.unpack()];
|
let urgency = PRIORITY_URGENCY_MAP[priority.unpack()];
|
||||||
this.setUrgency(urgency != undefined ? urgency : MessageTray.Urgency.NORMAL);
|
this.setUrgency(urgency != undefined ? urgency : MessageTray.Urgency.NORMAL);
|
||||||
} else if (urgent) {
|
} else if (urgent) {
|
||||||
this.setUrgency(urgent.unpack() ? MessageTray.Urgency.CRITICAL
|
this.setUrgency(urgent.unpack()
|
||||||
: MessageTray.Urgency.NORMAL);
|
? MessageTray.Urgency.CRITICAL
|
||||||
|
: MessageTray.Urgency.NORMAL);
|
||||||
} else {
|
} else {
|
||||||
this.setUrgency(MessageTray.Urgency.NORMAL);
|
this.setUrgency(MessageTray.Urgency.NORMAL);
|
||||||
}
|
}
|
||||||
@@ -588,8 +590,8 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onButtonClicked(button) {
|
_onButtonClicked(button) {
|
||||||
let { 'action': action, 'target': actionTarget } = button;
|
let { action, target } = button;
|
||||||
this._activateAction(action.unpack(), actionTarget);
|
this._activateAction(action.unpack(), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
activate() {
|
activate() {
|
||||||
@@ -616,7 +618,7 @@ function getPlatformData() {
|
|||||||
|
|
||||||
function InvalidAppError() {}
|
function InvalidAppError() {}
|
||||||
|
|
||||||
var GtkNotificationDaemonAppSource =
|
var GtkNotificationDaemonAppSource =
|
||||||
class GtkNotificationDaemonAppSource extends MessageTray.Source {
|
class GtkNotificationDaemonAppSource extends MessageTray.Source {
|
||||||
constructor(appId) {
|
constructor(appId) {
|
||||||
let objectPath = objectPathFromAppId(appId);
|
let objectPath = objectPathFromAppId(appId);
|
||||||
|
|||||||
@@ -199,7 +199,11 @@ var Overview = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_sessionUpdated() {
|
_sessionUpdated() {
|
||||||
this.isDummy = !Main.sessionMode.hasOverview;
|
const { hasOverview } = Main.sessionMode;
|
||||||
|
if (!hasOverview)
|
||||||
|
this.hide();
|
||||||
|
|
||||||
|
this.isDummy = !hasOverview;
|
||||||
this._createOverview();
|
this._createOverview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,7 +456,7 @@ var Overview = class {
|
|||||||
this._desktopFade.show();
|
this._desktopFade.show();
|
||||||
this._desktopFade.ease({
|
this._desktopFade.ease({
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
mode: Clutter.Animates.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
duration: ANIMATION_TIME
|
duration: ANIMATION_TIME
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ var SIDE_CONTROLS_ANIMATION_TIME = 160;
|
|||||||
function getRtlSlideDirection(direction, actor) {
|
function getRtlSlideDirection(direction, actor) {
|
||||||
let rtl = (actor.text_direction == Clutter.TextDirection.RTL);
|
let rtl = (actor.text_direction == Clutter.TextDirection.RTL);
|
||||||
if (rtl)
|
if (rtl)
|
||||||
direction = (direction == SlideDirection.LEFT) ?
|
direction = (direction == SlideDirection.LEFT)
|
||||||
SlideDirection.RIGHT : SlideDirection.LEFT;
|
? SlideDirection.RIGHT : SlideDirection.LEFT;
|
||||||
|
|
||||||
return direction;
|
return direction;
|
||||||
}
|
}
|
||||||
@@ -67,8 +67,9 @@ var SlideLayout = GObject.registerClass({
|
|||||||
// flags only determine what to do if the allocated box is bigger
|
// flags only determine what to do if the allocated box is bigger
|
||||||
// than the actor's box.
|
// than the actor's box.
|
||||||
let realDirection = getRtlSlideDirection(this._direction, child);
|
let realDirection = getRtlSlideDirection(this._direction, child);
|
||||||
let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth)
|
let alignX = (realDirection == SlideDirection.LEFT)
|
||||||
: (availWidth - natWidth * this._slideX);
|
? availWidth - natWidth
|
||||||
|
: availWidth - natWidth * this._slideX;
|
||||||
|
|
||||||
let actorBox = new Clutter.ActorBox();
|
let actorBox = new Clutter.ActorBox();
|
||||||
actorBox.x1 = box.x1 + alignX + this._translationX;
|
actorBox.x1 = box.x1 + alignX + this._translationX;
|
||||||
|
|||||||
@@ -126,12 +126,14 @@ class AnimatedPageIndicators extends PageIndicators {
|
|||||||
offset = children[0].width;
|
offset = children[0].width;
|
||||||
|
|
||||||
let isAnimationIn = animationDirection == AnimationDirection.IN;
|
let isAnimationIn = animationDirection == AnimationDirection.IN;
|
||||||
let delay = isAnimationIn ? INDICATORS_ANIMATION_DELAY :
|
let delay = isAnimationIn
|
||||||
INDICATORS_ANIMATION_DELAY_OUT;
|
? INDICATORS_ANIMATION_DELAY
|
||||||
|
: INDICATORS_ANIMATION_DELAY_OUT;
|
||||||
let baseTime = isAnimationIn ? INDICATORS_BASE_TIME : INDICATORS_BASE_TIME_OUT;
|
let baseTime = isAnimationIn ? INDICATORS_BASE_TIME : INDICATORS_BASE_TIME_OUT;
|
||||||
let totalAnimationTime = baseTime + delay * this._nPages;
|
let totalAnimationTime = baseTime + delay * this._nPages;
|
||||||
let maxTime = isAnimationIn ? INDICATORS_ANIMATION_MAX_TIME :
|
let maxTime = isAnimationIn
|
||||||
INDICATORS_ANIMATION_MAX_TIME_OUT;
|
? INDICATORS_ANIMATION_MAX_TIME
|
||||||
|
: INDICATORS_ANIMATION_MAX_TIME_OUT;
|
||||||
if (totalAnimationTime > maxTime)
|
if (totalAnimationTime > maxTime)
|
||||||
delay -= (totalAnimationTime - maxTime) / this._nPages;
|
delay -= (totalAnimationTime - maxTime) / this._nPages;
|
||||||
|
|
||||||
|
|||||||
@@ -170,9 +170,13 @@ class AppMenu extends PopupMenu.PopupMenu {
|
|||||||
let windows = this._app.get_windows();
|
let windows = this._app.get_windows();
|
||||||
windows.forEach(window => {
|
windows.forEach(window => {
|
||||||
let title = window.title || this._app.get_name();
|
let title = window.title || this._app.get_name();
|
||||||
this._windowSection.addAction(title, event => {
|
let item = this._windowSection.addAction(title, event => {
|
||||||
Main.activateWindow(window, event.get_time());
|
Main.activateWindow(window, event.get_time());
|
||||||
});
|
});
|
||||||
|
let id = window.connect('notify::title', () => {
|
||||||
|
item.label.text = window.title || this._app.get_name();
|
||||||
|
});
|
||||||
|
item.connect('destroy', () => window.disconnect(id));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -234,7 +238,10 @@ var AppMenuButton = GObject.registerClass({
|
|||||||
this._overviewHidingId = Main.overview.connect('hiding', this._sync.bind(this));
|
this._overviewHidingId = Main.overview.connect('hiding', this._sync.bind(this));
|
||||||
this._overviewShowingId = Main.overview.connect('showing', this._sync.bind(this));
|
this._overviewShowingId = Main.overview.connect('showing', this._sync.bind(this));
|
||||||
|
|
||||||
this._spinner = new Animation.Spinner(PANEL_ICON_SIZE, true);
|
this._spinner = new Animation.Spinner(PANEL_ICON_SIZE, {
|
||||||
|
animate: true,
|
||||||
|
hideOnStop: true,
|
||||||
|
});
|
||||||
this._container.add_actor(this._spinner.actor);
|
this._container.add_actor(this._spinner.actor);
|
||||||
|
|
||||||
let menu = new AppMenu(this);
|
let menu = new AppMenu(this);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ var Ornament = {
|
|||||||
NONE: 0,
|
NONE: 0,
|
||||||
DOT: 1,
|
DOT: 1,
|
||||||
CHECK: 2,
|
CHECK: 2,
|
||||||
|
HIDDEN: 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
function isPopupMenuItemVisible(child) {
|
function isPopupMenuItemVisible(child) {
|
||||||
@@ -248,10 +249,12 @@ var PopupBaseMenuItem = GObject.registerClass({
|
|||||||
} else if (ornament == Ornament.CHECK) {
|
} else if (ornament == Ornament.CHECK) {
|
||||||
this._ornamentLabel.text = '\u2713';
|
this._ornamentLabel.text = '\u2713';
|
||||||
this.add_accessible_state(Atk.StateType.CHECKED);
|
this.add_accessible_state(Atk.StateType.CHECKED);
|
||||||
} else if (ornament == Ornament.NONE) {
|
} else if (ornament == Ornament.NONE || ornament == Ornament.HIDDEN) {
|
||||||
this._ornamentLabel.text = '';
|
this._ornamentLabel.text = '';
|
||||||
this.remove_accessible_state(Atk.StateType.CHECKED);
|
this.remove_accessible_state(Atk.StateType.CHECKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._ornamentLabel.visible = ornament != Ornament.HIDDEN;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -425,6 +428,7 @@ var PopupMenuBase = class {
|
|||||||
throw new TypeError(`Cannot instantiate abstract class ${this.constructor.name}`);
|
throw new TypeError(`Cannot instantiate abstract class ${this.constructor.name}`);
|
||||||
|
|
||||||
this.sourceActor = sourceActor;
|
this.sourceActor = sourceActor;
|
||||||
|
this.focusActor = sourceActor;
|
||||||
this._parent = null;
|
this._parent = null;
|
||||||
|
|
||||||
if (styleClass !== undefined) {
|
if (styleClass !== undefined) {
|
||||||
@@ -549,7 +553,7 @@ var PopupMenuBase = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_connectItemSignals(menuItem) {
|
_connectItemSignals(menuItem) {
|
||||||
menuItem._activeChangeId = menuItem.connect('notify::active', (menuItem) => {
|
menuItem._activeChangeId = menuItem.connect('notify::active', menuItem => {
|
||||||
let active = menuItem.active;
|
let active = menuItem.active;
|
||||||
if (active && this._activeMenuItem != menuItem) {
|
if (active && this._activeMenuItem != menuItem) {
|
||||||
if (this._activeMenuItem)
|
if (this._activeMenuItem)
|
||||||
@@ -613,8 +617,8 @@ var PopupMenuBase = class {
|
|||||||
while (childBeforeIndex >= 0 && !isPopupMenuItemVisible(children[childBeforeIndex]))
|
while (childBeforeIndex >= 0 && !isPopupMenuItemVisible(children[childBeforeIndex]))
|
||||||
childBeforeIndex--;
|
childBeforeIndex--;
|
||||||
|
|
||||||
if (childBeforeIndex < 0
|
if (childBeforeIndex < 0 ||
|
||||||
|| children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
||||||
menuItem.actor.hide();
|
menuItem.actor.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -624,8 +628,8 @@ var PopupMenuBase = class {
|
|||||||
while (childAfterIndex < children.length && !isPopupMenuItemVisible(children[childAfterIndex]))
|
while (childAfterIndex < children.length && !isPopupMenuItemVisible(children[childAfterIndex]))
|
||||||
childAfterIndex++;
|
childAfterIndex++;
|
||||||
|
|
||||||
if (childAfterIndex >= children.length
|
if (childAfterIndex >= children.length ||
|
||||||
|| children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
|
||||||
menuItem.actor.hide();
|
menuItem.actor.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -718,10 +722,11 @@ var PopupMenuBase = class {
|
|||||||
this.disconnect(openStateChangeId);
|
this.disconnect(openStateChangeId);
|
||||||
menuItem.disconnect(destroyId);
|
menuItem.disconnect(destroyId);
|
||||||
});
|
});
|
||||||
} else if (menuItem instanceof PopupBaseMenuItem)
|
} else if (menuItem instanceof PopupBaseMenuItem) {
|
||||||
this._connectItemSignals(menuItem);
|
this._connectItemSignals(menuItem);
|
||||||
else
|
} else {
|
||||||
throw TypeError("Invalid argument to PopupMenuBase.addMenuItem()");
|
throw TypeError("Invalid argument to PopupMenuBase.addMenuItem()");
|
||||||
|
}
|
||||||
|
|
||||||
menuItem._setParent(this);
|
menuItem._setParent(this);
|
||||||
|
|
||||||
@@ -799,6 +804,7 @@ var PopupMenu = class extends PopupMenuBase {
|
|||||||
this._keyPressId = this.sourceActor.connect('key-press-event',
|
this._keyPressId = this.sourceActor.connect('key-press-event',
|
||||||
this._onKeyPress.bind(this));
|
this._onKeyPress.bind(this));
|
||||||
|
|
||||||
|
this._systemModalOpenedId = 0;
|
||||||
this._openedSubMenu = null;
|
this._openedSubMenu = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -873,6 +879,11 @@ var PopupMenu = class extends PopupMenuBase {
|
|||||||
if (this.isEmpty())
|
if (this.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!this._systemModalOpenedId) {
|
||||||
|
this._systemModalOpenedId =
|
||||||
|
Main.layoutManager.connect('system-modal-opened', () => this.close());
|
||||||
|
}
|
||||||
|
|
||||||
this.isOpen = true;
|
this.isOpen = true;
|
||||||
|
|
||||||
this._boxPointer.setPosition(this.sourceActor, this._arrowAlignment);
|
this._boxPointer.setPosition(this.sourceActor, this._arrowAlignment);
|
||||||
@@ -903,6 +914,11 @@ var PopupMenu = class extends PopupMenuBase {
|
|||||||
destroy() {
|
destroy() {
|
||||||
if (this._keyPressId)
|
if (this._keyPressId)
|
||||||
this.sourceActor.disconnect(this._keyPressId);
|
this.sourceActor.disconnect(this._keyPressId);
|
||||||
|
|
||||||
|
if (this._systemModalOpenedId)
|
||||||
|
Main.layoutManager.disconnect(this._systemModalOpenedId);
|
||||||
|
this._systemModalOpenedId = 0;
|
||||||
|
|
||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1296,18 +1312,20 @@ var PopupMenuManager = class {
|
|||||||
if (open) {
|
if (open) {
|
||||||
if (this.activeMenu)
|
if (this.activeMenu)
|
||||||
this.activeMenu.close(BoxPointer.PopupAnimation.FADE);
|
this.activeMenu.close(BoxPointer.PopupAnimation.FADE);
|
||||||
this._grabHelper.grab({ actor: menu.actor, focus: menu.sourceActor,
|
this._grabHelper.grab({
|
||||||
onUngrab: isUser => {
|
actor: menu.actor,
|
||||||
this._closeMenu(isUser, menu);
|
focus: menu.focusActor,
|
||||||
} });
|
onUngrab: isUser => this._closeMenu(isUser, menu),
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this._grabHelper.ungrab({ actor: menu.actor });
|
this._grabHelper.ungrab({ actor: menu.actor });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_changeMenu(newMenu) {
|
_changeMenu(newMenu) {
|
||||||
newMenu.open(this.activeMenu ? BoxPointer.PopupAnimation.FADE
|
newMenu.open(this.activeMenu
|
||||||
: BoxPointer.PopupAnimation.FULL);
|
? BoxPointer.PopupAnimation.FADE
|
||||||
|
: BoxPointer.PopupAnimation.FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onMenuSourceEnter(menu) {
|
_onMenuSourceEnter(menu) {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ var Ripples = class Ripples {
|
|||||||
delay,
|
delay,
|
||||||
duration,
|
duration,
|
||||||
mode: Clutter.AnimationMode.LINEAR,
|
mode: Clutter.AnimationMode.LINEAR,
|
||||||
onComplete: () => ripple.visible = false
|
onComplete: () => (ripple.visible = false)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class RunDialog extends ModalDialog.ModalDialog {
|
|||||||
|
|
||||||
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
|
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
|
||||||
entry: this._entryText });
|
entry: this._entryText });
|
||||||
this._entryText.connect('activate', (o) => {
|
this._entryText.connect('activate', o => {
|
||||||
this.popModal();
|
this.popModal();
|
||||||
this._run(o.get_text(),
|
this._run(o.get_text(),
|
||||||
Clutter.get_current_event().get_state() & Clutter.ModifierType.CONTROL_MASK);
|
Clutter.get_current_event().get_state() & Clutter.ModifierType.CONTROL_MASK);
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ const MessageTray = imports.ui.messageTray;
|
|||||||
const ShellDBus = imports.ui.shellDBus;
|
const ShellDBus = imports.ui.shellDBus;
|
||||||
const SmartcardManager = imports.misc.smartcardManager;
|
const SmartcardManager = imports.misc.smartcardManager;
|
||||||
|
|
||||||
|
const { adjustAnimationTime } = imports.ui.environment;
|
||||||
|
|
||||||
const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
|
const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
|
||||||
const LOCK_ENABLED_KEY = 'lock-enabled';
|
const LOCK_ENABLED_KEY = 'lock-enabled';
|
||||||
const LOCK_DELAY_KEY = 'lock-delay';
|
const LOCK_DELAY_KEY = 'lock-delay';
|
||||||
@@ -51,11 +53,17 @@ var Clock = class {
|
|||||||
this.actor = new St.BoxLayout({ style_class: 'screen-shield-clock',
|
this.actor = new St.BoxLayout({ style_class: 'screen-shield-clock',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
|
|
||||||
this._time = new St.Label({ style_class: 'screen-shield-clock-time' });
|
this._time = new St.Label({
|
||||||
this._date = new St.Label({ style_class: 'screen-shield-clock-date' });
|
style_class: 'screen-shield-clock-time',
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
this._date = new St.Label({
|
||||||
|
style_class: 'screen-shield-clock-date',
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
|
|
||||||
this.actor.add(this._time, { x_align: St.Align.MIDDLE });
|
this.actor.add_child(this._time);
|
||||||
this.actor.add(this._date, { x_align: St.Align.MIDDLE });
|
this.actor.add_child(this._date);
|
||||||
|
|
||||||
this._wallClock = new GnomeDesktop.WallClock({ time_only: true });
|
this._wallClock = new GnomeDesktop.WallClock({ time_only: true });
|
||||||
this._wallClock.connect('notify::clock', this._updateClock.bind(this));
|
this._wallClock.connect('notify::clock', this._updateClock.bind(this));
|
||||||
@@ -91,7 +99,7 @@ var NotificationsBox = class {
|
|||||||
style_class: 'screen-shield-notifications-container' });
|
style_class: 'screen-shield-notifications-container' });
|
||||||
this._scrollView.add_actor(this._notificationBox);
|
this._scrollView.add_actor(this._notificationBox);
|
||||||
|
|
||||||
this.actor.add(this._scrollView, { x_fill: true, x_align: St.Align.START });
|
this.actor.add_child(this._scrollView);
|
||||||
|
|
||||||
this._sources = new Map();
|
this._sources = new Map();
|
||||||
Main.messageTray.getSources().forEach(source => {
|
Main.messageTray.getSources().forEach(source => {
|
||||||
@@ -132,10 +140,10 @@ var NotificationsBox = class {
|
|||||||
|
|
||||||
_makeNotificationSource(source, box) {
|
_makeNotificationSource(source, box) {
|
||||||
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
|
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
|
||||||
box.add(sourceActor, { y_fill: true });
|
box.add_child(sourceActor);
|
||||||
|
|
||||||
let textBox = new St.BoxLayout({ vertical: true });
|
let textBox = new St.BoxLayout({ vertical: true });
|
||||||
box.add(textBox, { y_fill: false, y_align: St.Align.START });
|
box.add_child(textBox);
|
||||||
|
|
||||||
let title = new St.Label({ text: source.title,
|
let title = new St.Label({ text: source.title,
|
||||||
style_class: 'screen-shield-notification-label' });
|
style_class: 'screen-shield-notification-label' });
|
||||||
@@ -158,7 +166,7 @@ var NotificationsBox = class {
|
|||||||
box.add(sourceBin);
|
box.add(sourceBin);
|
||||||
|
|
||||||
let textBox = new St.BoxLayout({ vertical: true });
|
let textBox = new St.BoxLayout({ vertical: true });
|
||||||
box.add(textBox, { y_fill: false, y_align: St.Align.START });
|
box.add_child(textBox);
|
||||||
|
|
||||||
let title = new St.Label({ text: source.title,
|
let title = new St.Label({ text: source.title,
|
||||||
style_class: 'screen-shield-notification-label' });
|
style_class: 'screen-shield-notification-label' });
|
||||||
@@ -173,8 +181,9 @@ var NotificationsBox = class {
|
|||||||
|
|
||||||
let body = '';
|
let body = '';
|
||||||
if (n.bannerBodyText) {
|
if (n.bannerBodyText) {
|
||||||
body = n.bannerBodyMarkup ? n.bannerBodyText
|
body = n.bannerBodyMarkup
|
||||||
: GLib.markup_escape_text(n.bannerBodyText, -1);
|
? n.bannerBodyText
|
||||||
|
: GLib.markup_escape_text(n.bannerBodyText, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
let label = new St.Label({ style_class: 'screen-shield-notification-count-text' });
|
let label = new St.Label({ style_class: 'screen-shield-notification-count-text' });
|
||||||
@@ -219,7 +228,7 @@ var NotificationsBox = class {
|
|||||||
obj.sourceBox = new St.BoxLayout({ style_class: 'screen-shield-notification-source',
|
obj.sourceBox = new St.BoxLayout({ style_class: 'screen-shield-notification-source',
|
||||||
x_expand: true });
|
x_expand: true });
|
||||||
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_child(obj.sourceBox);
|
||||||
|
|
||||||
obj.sourceCountChangedId = source.connect('count-updated', source => {
|
obj.sourceCountChangedId = source.connect('count-updated', source => {
|
||||||
this._countChanged(source, obj);
|
this._countChanged(source, obj);
|
||||||
@@ -831,7 +840,7 @@ var ScreenShield = class {
|
|||||||
|
|
||||||
if (shouldLock) {
|
if (shouldLock) {
|
||||||
let lockTimeout = Math.max(
|
let lockTimeout = Math.max(
|
||||||
STANDARD_FADE_TIME,
|
adjustAnimationTime(STANDARD_FADE_TIME),
|
||||||
this._settings.get_uint(LOCK_DELAY_KEY) * 1000);
|
this._settings.get_uint(LOCK_DELAY_KEY) * 1000);
|
||||||
this._lockTimeoutId = GLib.timeout_add(
|
this._lockTimeoutId = GLib.timeout_add(
|
||||||
GLib.PRIORITY_DEFAULT,
|
GLib.PRIORITY_DEFAULT,
|
||||||
@@ -915,8 +924,8 @@ var ScreenShield = class {
|
|||||||
this._lockScreenGroup.hide();
|
this._lockScreenGroup.hide();
|
||||||
|
|
||||||
if (this._dialog) {
|
if (this._dialog) {
|
||||||
this._dialog.actor.grab_key_focus();
|
this._dialog.grab_key_focus();
|
||||||
this._dialog.actor.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
|
this._dialog.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1130,16 +1139,13 @@ var ScreenShield = class {
|
|||||||
vertical: true,
|
vertical: true,
|
||||||
style_class: 'screen-shield-contents-box' });
|
style_class: 'screen-shield-contents-box' });
|
||||||
this._clock = new Clock();
|
this._clock = new Clock();
|
||||||
this._lockScreenContentsBox.add(this._clock.actor, { x_fill: true,
|
this._lockScreenContentsBox.add_child(this._clock.actor);
|
||||||
y_fill: true });
|
|
||||||
|
|
||||||
this._lockScreenContents.add_actor(this._lockScreenContentsBox);
|
this._lockScreenContents.add_actor(this._lockScreenContentsBox);
|
||||||
|
|
||||||
this._notificationsBox = new NotificationsBox();
|
this._notificationsBox = new NotificationsBox();
|
||||||
this._wakeUpScreenId = this._notificationsBox.connect('wake-up-screen', this._wakeUpScreen.bind(this));
|
this._wakeUpScreenId = this._notificationsBox.connect('wake-up-screen', this._wakeUpScreen.bind(this));
|
||||||
this._lockScreenContentsBox.add(this._notificationsBox.actor, { x_fill: true,
|
this._lockScreenContentsBox.add_child(this._notificationsBox.actor);
|
||||||
y_fill: true,
|
|
||||||
expand: true });
|
|
||||||
|
|
||||||
this._hasLockScreen = true;
|
this._hasLockScreen = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ var ScreenshotService = class {
|
|||||||
try {
|
try {
|
||||||
let [result, area, filenameUsed] =
|
let [result, area, filenameUsed] =
|
||||||
screenshot.screenshot_area_finish(res);
|
screenshot.screenshot_area_finish(res);
|
||||||
this._onScreenshotComplete(result, area, filenameUsed,
|
this._onScreenshotComplete(
|
||||||
flash, invocation);
|
result, area, filenameUsed, flash, invocation);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
invocation.return_gerror (e);
|
invocation.return_gerror (e);
|
||||||
}
|
}
|
||||||
@@ -134,8 +134,8 @@ var ScreenshotService = class {
|
|||||||
try {
|
try {
|
||||||
let [result, area, filenameUsed] =
|
let [result, area, filenameUsed] =
|
||||||
screenshot.screenshot_window_finish(res);
|
screenshot.screenshot_window_finish(res);
|
||||||
this._onScreenshotComplete(result, area, filenameUsed,
|
this._onScreenshotComplete(
|
||||||
flash, invocation);
|
result, area, filenameUsed, flash, invocation);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
invocation.return_gerror (e);
|
invocation.return_gerror (e);
|
||||||
}
|
}
|
||||||
@@ -152,8 +152,8 @@ var ScreenshotService = class {
|
|||||||
try {
|
try {
|
||||||
let [result, area, filenameUsed] =
|
let [result, area, filenameUsed] =
|
||||||
screenshot.screenshot_finish(res);
|
screenshot.screenshot_finish(res);
|
||||||
this._onScreenshotComplete(result, area, filenameUsed,
|
this._onScreenshotComplete(
|
||||||
flash, invocation);
|
result, area, filenameUsed, flash, invocation);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
invocation.return_gerror (e);
|
invocation.return_gerror (e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ async function runPerfScript(scriptModule, outputFile) {
|
|||||||
|
|
||||||
for (let step of scriptModule.run()) {
|
for (let step of scriptModule.run()) {
|
||||||
try {
|
try {
|
||||||
await step;
|
await step; // eslint-disable-line no-await-in-loop
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log(`Script failed: ${err}\n${err.stack}`);
|
log(`Script failed: ${err}\n${err.stack}`);
|
||||||
Meta.exit(Meta.ExitCode.ERROR);
|
Meta.exit(Meta.ExitCode.ERROR);
|
||||||
|
|||||||
@@ -710,8 +710,9 @@ var SearchResults = class {
|
|||||||
navigateFocus(direction) {
|
navigateFocus(direction) {
|
||||||
let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL;
|
let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL;
|
||||||
if (direction == St.DirectionType.TAB_BACKWARD ||
|
if (direction == St.DirectionType.TAB_BACKWARD ||
|
||||||
direction == (rtl ? St.DirectionType.RIGHT
|
direction == (rtl
|
||||||
: St.DirectionType.LEFT) ||
|
? St.DirectionType.RIGHT
|
||||||
|
: St.DirectionType.LEFT) ||
|
||||||
direction == St.DirectionType.UP) {
|
direction == St.DirectionType.UP) {
|
||||||
this.actor.navigate_focus(null, direction, false);
|
this.actor.navigate_focus(null, direction, false);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -92,11 +92,11 @@ const _modes = {
|
|||||||
isLocked: false,
|
isLocked: false,
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
unlockDialog: imports.ui.unlockDialog.UnlockDialog,
|
unlockDialog: imports.ui.unlockDialog.UnlockDialog,
|
||||||
components: Config.HAVE_NETWORKMANAGER ?
|
components: Config.HAVE_NETWORKMANAGER
|
||||||
['networkAgent', 'polkitAgent', 'telepathyClient',
|
? ['networkAgent', 'polkitAgent', 'telepathyClient',
|
||||||
'keyring', 'autorunManager', 'automountManager'] :
|
'keyring', 'autorunManager', 'automountManager']
|
||||||
['polkitAgent', 'telepathyClient',
|
: ['polkitAgent', 'telepathyClient',
|
||||||
'keyring', 'autorunManager', 'automountManager'],
|
'keyring', 'autorunManager', 'automountManager'],
|
||||||
|
|
||||||
panel: {
|
panel: {
|
||||||
left: ['activities', 'appMenu'],
|
left: ['activities', 'appMenu'],
|
||||||
|
|||||||
@@ -151,9 +151,13 @@ var GnomeShell = class {
|
|||||||
let connection = this._dbusImpl.get_connection();
|
let connection = this._dbusImpl.get_connection();
|
||||||
let info = this._dbusImpl.get_info();
|
let info = this._dbusImpl.get_info();
|
||||||
let params = { 'device-id': GLib.Variant.new('u', device.get_device_id()),
|
let params = { 'device-id': GLib.Variant.new('u', device.get_device_id()),
|
||||||
'device-node': GLib.Variant.new('s', device.get_device_node()),
|
|
||||||
'timestamp': GLib.Variant.new('u', timestamp),
|
'timestamp': GLib.Variant.new('u', timestamp),
|
||||||
'action-mode': GLib.Variant.new('u', Main.actionMode) };
|
'action-mode': GLib.Variant.new('u', Main.actionMode) };
|
||||||
|
|
||||||
|
let deviceNode = device.get_device_node();
|
||||||
|
if (deviceNode)
|
||||||
|
params['device-node'] = GLib.Variant.new('s', deviceNode);
|
||||||
|
|
||||||
connection.emit_signal(destination,
|
connection.emit_signal(destination,
|
||||||
this._dbusImpl.get_object_path(),
|
this._dbusImpl.get_object_path(),
|
||||||
info ? info.name : null,
|
info ? info.name : null,
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ var ShellMountOperation = class {
|
|||||||
_onShowUnmountProgress(op, message, timeLeft, bytesLeft) {
|
_onShowUnmountProgress(op, message, timeLeft, bytesLeft) {
|
||||||
if (!this._notifier)
|
if (!this._notifier)
|
||||||
this._notifier = new ShellUnmountNotifier();
|
this._notifier = new ShellUnmountNotifier();
|
||||||
|
|
||||||
if (bytesLeft == 0)
|
if (bytesLeft == 0)
|
||||||
this._notifier.done(message);
|
this._notifier.done(message);
|
||||||
else
|
else
|
||||||
@@ -359,7 +359,9 @@ var ShellMountPasswordDialog = GObject.registerClass({
|
|||||||
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
|
||||||
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
|
||||||
this.setInitialKeyFocus(this._passwordEntry);
|
this.setInitialKeyFocus(this._passwordEntry);
|
||||||
this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, true);
|
this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, {
|
||||||
|
animate: true,
|
||||||
|
});
|
||||||
this._passwordEntry.secondary_icon = this._workSpinner.actor;
|
this._passwordEntry.secondary_icon = this._workSpinner.actor;
|
||||||
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
|
|||||||
@@ -100,10 +100,15 @@ var Slider = GObject.registerClass({
|
|||||||
|
|
||||||
_endDragging() {
|
_endDragging() {
|
||||||
if (this._dragging) {
|
if (this._dragging) {
|
||||||
if (this._releaseId)
|
if (this._releaseId) {
|
||||||
this.disconnect(this._releaseId);
|
this.disconnect(this._releaseId);
|
||||||
if (this._motionId)
|
this._releaseId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._motionId) {
|
||||||
this.disconnect(this._motionId);
|
this.disconnect(this._motionId);
|
||||||
|
this._motionId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (this._grabbedSequence != null)
|
if (this._grabbedSequence != null)
|
||||||
this._grabbedDevice.sequence_ungrab(this._grabbedSequence);
|
this._grabbedDevice.sequence_ungrab(this._grabbedSequence);
|
||||||
|
|||||||
@@ -138,14 +138,14 @@ class ATIndicator extends PanelMenu.Button {
|
|||||||
interfaceSettings.is_writable(KEY_ICON_THEME),
|
interfaceSettings.is_writable(KEY_ICON_THEME),
|
||||||
enabled => {
|
enabled => {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
interfaceSettings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
|
|
||||||
interfaceSettings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
|
interfaceSettings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
|
||||||
|
interfaceSettings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
|
||||||
} else if (!hasHC) {
|
} else if (!hasHC) {
|
||||||
interfaceSettings.set_string(KEY_GTK_THEME, gtkTheme);
|
|
||||||
interfaceSettings.set_string(KEY_ICON_THEME, iconTheme);
|
interfaceSettings.set_string(KEY_ICON_THEME, iconTheme);
|
||||||
|
interfaceSettings.set_string(KEY_GTK_THEME, gtkTheme);
|
||||||
} else {
|
} else {
|
||||||
interfaceSettings.reset(KEY_GTK_THEME);
|
|
||||||
interfaceSettings.reset(KEY_ICON_THEME);
|
interfaceSettings.reset(KEY_ICON_THEME);
|
||||||
|
interfaceSettings.reset(KEY_GTK_THEME);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -179,8 +179,8 @@ class ATIndicator extends PanelMenu.Button {
|
|||||||
settings.is_writable(KEY_TEXT_SCALING_FACTOR),
|
settings.is_writable(KEY_TEXT_SCALING_FACTOR),
|
||||||
enabled => {
|
enabled => {
|
||||||
if (enabled)
|
if (enabled)
|
||||||
settings.set_double(KEY_TEXT_SCALING_FACTOR,
|
settings.set_double(
|
||||||
DPI_FACTOR_LARGE);
|
KEY_TEXT_SCALING_FACTOR, DPI_FACTOR_LARGE);
|
||||||
else
|
else
|
||||||
settings.reset(KEY_TEXT_SCALING_FACTOR);
|
settings.reset(KEY_TEXT_SCALING_FACTOR);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -976,8 +976,8 @@ class InputSourceIndicator extends PanelMenu.Button {
|
|||||||
item.prop = prop;
|
item.prop = prop;
|
||||||
radioGroup.push(item);
|
radioGroup.push(item);
|
||||||
item.radioGroup = radioGroup;
|
item.radioGroup = radioGroup;
|
||||||
item.setOrnament(prop.get_state() == IBus.PropState.CHECKED ?
|
item.setOrnament(prop.get_state() == IBus.PropState.CHECKED
|
||||||
PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
|
? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
|
||||||
item.connect('activate', () => {
|
item.connect('activate', () => {
|
||||||
if (item.prop.get_state() == IBus.PropState.CHECKED)
|
if (item.prop.get_state() == IBus.PropState.CHECKED)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -168,8 +168,9 @@ var Indicator = class extends PanelMenu.SystemIndicator {
|
|||||||
|
|
||||||
_updateMenuLabels() {
|
_updateMenuLabels() {
|
||||||
if (this._settings.get_boolean(ENABLED)) {
|
if (this._settings.get_boolean(ENABLED)) {
|
||||||
this._item.label.text = this._indicator.visible ? _("Location In Use")
|
this._item.label.text = this._indicator.visible
|
||||||
: _("Location Enabled");
|
? _("Location In Use")
|
||||||
|
: _("Location Enabled");
|
||||||
this._onOffAction.label.text = _("Disable");
|
this._onOffAction.label.text = _("Disable");
|
||||||
} else {
|
} else {
|
||||||
this._item.label.text = _("Location Disabled");
|
this._item.label.text = _("Location Disabled");
|
||||||
|
|||||||
@@ -909,8 +909,8 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
|||||||
this._client.activate_connection_async(connection, this._device, null, null, null);
|
this._client.activate_connection_async(connection, this._device, null, null, null);
|
||||||
} else {
|
} else {
|
||||||
let accessPoints = network.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
|
||||||
// handled in gnome-control-center
|
// handled in gnome-control-center
|
||||||
Util.spawn(['gnome-control-center', 'wifi', 'connect-8021x-wifi',
|
Util.spawn(['gnome-control-center', 'wifi', 'connect-8021x-wifi',
|
||||||
@@ -1676,7 +1676,7 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
|
|||||||
'network-transmit-receive');
|
'network-transmit-receive');
|
||||||
this._source.policy = new MessageTray.NotificationApplicationPolicy('gnome-network-panel');
|
this._source.policy = new MessageTray.NotificationApplicationPolicy('gnome-network-panel');
|
||||||
|
|
||||||
this._source.connect('destroy', () => this._source = null);
|
this._source.connect('destroy', () => (this._source = null));
|
||||||
Main.messageTray.add(this._source);
|
Main.messageTray.add(this._source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1976,7 +1976,6 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
|
|||||||
// or we get to full connectivity through other means
|
// or we get to full connectivity through other means
|
||||||
} else if (result == PortalHelperResult.COMPLETED) {
|
} else if (result == PortalHelperResult.COMPLETED) {
|
||||||
this._closeConnectivityCheck(path);
|
this._closeConnectivityCheck(path);
|
||||||
return;
|
|
||||||
} else if (result == PortalHelperResult.RECHECK) {
|
} else if (result == PortalHelperResult.RECHECK) {
|
||||||
this._client.check_connectivity_async(null, (client, result) => {
|
this._client.check_connectivity_async(null, (client, result) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -58,10 +58,12 @@ var Indicator = class extends PanelMenu.SystemIndicator {
|
|||||||
let visible = this._proxy.NightLightActive;
|
let visible = this._proxy.NightLightActive;
|
||||||
let disabled = this._proxy.DisabledUntilTomorrow;
|
let disabled = this._proxy.DisabledUntilTomorrow;
|
||||||
|
|
||||||
this._item.label.text = disabled ? _("Night Light Disabled")
|
this._item.label.text = disabled
|
||||||
: _("Night Light On");
|
? _("Night Light Disabled")
|
||||||
this._disableItem.label.text = disabled ? _("Resume")
|
: _("Night Light On");
|
||||||
: _("Disable Until Tomorrow");
|
this._disableItem.label.text = disabled
|
||||||
|
? _("Resume")
|
||||||
|
: _("Disable Until Tomorrow");
|
||||||
this._item.visible = this._indicator.visible = visible;
|
this._item.visible = this._indicator.visible = visible;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -111,9 +111,12 @@ var Indicator = class extends PanelMenu.SystemIndicator {
|
|||||||
let chargingState = this._proxy.State == UPower.DeviceState.CHARGING
|
let chargingState = this._proxy.State == UPower.DeviceState.CHARGING
|
||||||
? '-charging' : '';
|
? '-charging' : '';
|
||||||
let fillLevel = 10 * Math.floor(this._proxy.Percentage / 10);
|
let fillLevel = 10 * Math.floor(this._proxy.Percentage / 10);
|
||||||
let icon = this._proxy.State == UPower.DeviceState.FULLY_CHARGED
|
let icon;
|
||||||
? 'battery-level-100-charged-symbolic'
|
if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED ||
|
||||||
: `battery-level-${fillLevel}${chargingState}-symbolic`;
|
fillLevel === 100)
|
||||||
|
icon = 'battery-level-100-charged-symbolic';
|
||||||
|
else
|
||||||
|
icon = `battery-level-${fillLevel}${chargingState}-symbolic`;
|
||||||
|
|
||||||
// Make sure we fall back to fallback-icon-name and not GThemedIcon's
|
// Make sure we fall back to fallback-icon-name and not GThemedIcon's
|
||||||
// default fallbacks
|
// default fallbacks
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ var AltSwitcher = class {
|
|||||||
|
|
||||||
this.actor = new St.Bin();
|
this.actor = new St.Bin();
|
||||||
this.actor.connect('destroy', this._onDestroy.bind(this));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this.actor.connect('notify::mapped', () => this._flipped = false);
|
this.actor.connect('notify::mapped', () => (this._flipped = false));
|
||||||
}
|
}
|
||||||
|
|
||||||
_sync() {
|
_sync() {
|
||||||
|
|||||||
@@ -156,12 +156,12 @@ var AuthRobot = class {
|
|||||||
|
|
||||||
/* check if authorization is enabled in the daemon. if not
|
/* check if authorization is enabled in the daemon. if not
|
||||||
* we won't even bother authorizing, because we will only
|
* we won't even bother authorizing, because we will only
|
||||||
* get an error back. The exact contents of AuthMode might
|
* get an error back. The exact contents of AuthMode might
|
||||||
* change in the future, but must contain AuthMode.ENABLED
|
* change in the future, but must contain AuthMode.ENABLED
|
||||||
* if it is enabled. */
|
* if it is enabled. */
|
||||||
if (!cli.authMode.split('|').includes(AuthMode.ENABLED))
|
if (!cli.authMode.split('|').includes(AuthMode.ENABLED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* check if we should enroll the device */
|
/* check if we should enroll the device */
|
||||||
let res = [false];
|
let res = [false];
|
||||||
this.emit('enroll-device', dev, res);
|
this.emit('enroll-device', dev, res);
|
||||||
@@ -260,7 +260,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
|
|||||||
if (!this._source) {
|
if (!this._source) {
|
||||||
this._source = new MessageTray.Source(_("Thunderbolt"),
|
this._source = new MessageTray.Source(_("Thunderbolt"),
|
||||||
'thunderbolt-symbolic');
|
'thunderbolt-symbolic');
|
||||||
this._source.connect('destroy', () => this._source = null);
|
this._source.connect('destroy', () => (this._source = null));
|
||||||
|
|
||||||
Main.messageTray.add(this._source);
|
Main.messageTray.add(this._source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,9 +228,9 @@ var OutputStreamSlider = class extends StreamSlider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateSliderIcon() {
|
_updateSliderIcon() {
|
||||||
this._icon.icon_name = (this._hasHeadphones ?
|
this._icon.icon_name = (this._hasHeadphones
|
||||||
'audio-headphones-symbolic' :
|
? 'audio-headphones-symbolic'
|
||||||
'audio-speakers-symbolic');
|
: 'audio-speakers-symbolic');
|
||||||
}
|
}
|
||||||
|
|
||||||
_portChanged() {
|
_portChanged() {
|
||||||
@@ -259,18 +259,17 @@ var InputStreamSlider = class extends StreamSlider {
|
|||||||
_maybeShowInput() {
|
_maybeShowInput() {
|
||||||
// only show input widgets if any application is recording audio
|
// only show input widgets if any application is recording audio
|
||||||
let showInput = false;
|
let showInput = false;
|
||||||
let recordingApps = this._control.get_source_outputs();
|
if (this._stream) {
|
||||||
if (this._stream && recordingApps) {
|
// skip gnome-volume-control and pavucontrol which appear
|
||||||
for (let i = 0; i < recordingApps.length; i++) {
|
// as recording because they show the input level
|
||||||
let outputStream = recordingApps[i];
|
let skippedApps = [
|
||||||
let id = outputStream.get_application_id();
|
'org.gnome.VolumeControl',
|
||||||
// but skip gnome-volume-control and pavucontrol
|
'org.PulseAudio.pavucontrol'
|
||||||
// (that appear as recording because they show the input level)
|
];
|
||||||
if (!id || (id != 'org.gnome.VolumeControl' && id != 'org.PulseAudio.pavucontrol')) {
|
|
||||||
showInput = true;
|
showInput = this._control.get_source_outputs().some(output => {
|
||||||
break;
|
return !skippedApps.includes(output.get_application_id());
|
||||||
}
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._showInput = showInput;
|
this._showInput = showInput;
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ var SwitcherPopup = GObject.registerClass({
|
|||||||
|
|
||||||
Main.uiGroup.add_actor(this);
|
Main.uiGroup.add_actor(this);
|
||||||
|
|
||||||
|
this._systemModalOpenedId =
|
||||||
|
Main.layoutManager.connect('system-modal-opened', () => this.destroy());
|
||||||
|
|
||||||
this._haveModal = false;
|
this._haveModal = false;
|
||||||
this._modifierMask = 0;
|
this._modifierMask = 0;
|
||||||
|
|
||||||
@@ -180,6 +183,14 @@ var SwitcherPopup = GObject.registerClass({
|
|||||||
if (keysym == Clutter.Escape || keysym == Clutter.Tab)
|
if (keysym == Clutter.Escape || keysym == Clutter.Tab)
|
||||||
this.fadeAndDestroy();
|
this.fadeAndDestroy();
|
||||||
|
|
||||||
|
// Allow to explicitly select the current item; this is particularly
|
||||||
|
// useful for no-modifier popups
|
||||||
|
if (keysym === Clutter.KEY_space ||
|
||||||
|
keysym === Clutter.KEY_Return ||
|
||||||
|
keysym === Clutter.KEY_KP_Enter ||
|
||||||
|
keysym === Clutter.KEY_ISO_Enter)
|
||||||
|
this._finish(event.get_time());
|
||||||
|
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,7 +281,7 @@ var SwitcherPopup = GObject.registerClass({
|
|||||||
GLib.PRIORITY_DEFAULT,
|
GLib.PRIORITY_DEFAULT,
|
||||||
NO_MODS_TIMEOUT,
|
NO_MODS_TIMEOUT,
|
||||||
() => {
|
() => {
|
||||||
this._finish(global.get_current_time());
|
this._finish(global.display.get_current_time_roundtrip());
|
||||||
this._noModsTimeoutId = 0;
|
this._noModsTimeoutId = 0;
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
});
|
});
|
||||||
@@ -304,6 +315,8 @@ var SwitcherPopup = GObject.registerClass({
|
|||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
this._popModal();
|
this._popModal();
|
||||||
|
|
||||||
|
Main.layoutManager.disconnect(this._systemModalOpenedId);
|
||||||
|
|
||||||
if (this._motionTimeoutId != 0)
|
if (this._motionTimeoutId != 0)
|
||||||
GLib.source_remove(this._motionTimeoutId);
|
GLib.source_remove(this._motionTimeoutId);
|
||||||
if (this._initialDelayTimeoutId != 0)
|
if (this._initialDelayTimeoutId != 0)
|
||||||
@@ -560,10 +573,10 @@ var SwitcherList = GObject.registerClass({
|
|||||||
let leftPadding = this.get_theme_node().get_padding(St.Side.LEFT);
|
let leftPadding = this.get_theme_node().get_padding(St.Side.LEFT);
|
||||||
let rightPadding = this.get_theme_node().get_padding(St.Side.RIGHT);
|
let rightPadding = this.get_theme_node().get_padding(St.Side.RIGHT);
|
||||||
|
|
||||||
let [, natScrollViewWidth] = this._scrollView.get_preferred_width(height);
|
let [minListWidth] = this._list.get_preferred_width(height);
|
||||||
|
|
||||||
let childBox = new Clutter.ActorBox();
|
let childBox = new Clutter.ActorBox();
|
||||||
let scrollable = natScrollViewWidth > width;
|
let scrollable = minListWidth > width;
|
||||||
|
|
||||||
this._scrollView.allocate(contentBox, flags);
|
this._scrollView.allocate(contentBox, flags);
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
/* exported UnlockDialog */
|
/* exported UnlockDialog */
|
||||||
|
|
||||||
const { AccountsService, Atk, Clutter,
|
const { AccountsService, Atk, Clutter,
|
||||||
Gdm, Gio, GLib, Meta, Shell, St } = imports.gi;
|
Gdm, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
|
||||||
const Signals = imports.signals;
|
|
||||||
|
|
||||||
const Layout = imports.ui.layout;
|
const Layout = imports.ui.layout;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@@ -13,15 +12,19 @@ const AuthPrompt = imports.gdm.authPrompt;
|
|||||||
// 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;
|
||||||
|
|
||||||
var UnlockDialog = class {
|
var UnlockDialog = GObject.registerClass({
|
||||||
constructor(parentActor) {
|
Signals: { 'failed': {} },
|
||||||
this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
|
}, class UnlockDialog extends St.Widget {
|
||||||
style_class: 'login-dialog',
|
_init(parentActor) {
|
||||||
layout_manager: new Clutter.BoxLayout(),
|
super._init({
|
||||||
visible: false });
|
accessible_role: Atk.Role.WINDOW,
|
||||||
|
style_class: 'login-dialog',
|
||||||
|
layout_manager: new Clutter.BoxLayout(),
|
||||||
|
visible: false,
|
||||||
|
});
|
||||||
|
|
||||||
this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
this.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
||||||
parentActor.add_child(this.actor);
|
parentActor.add_child(this);
|
||||||
|
|
||||||
this._userManager = AccountsService.UserManager.get_default();
|
this._userManager = AccountsService.UserManager.get_default();
|
||||||
this._userName = GLib.get_user_name();
|
this._userName = GLib.get_user_name();
|
||||||
@@ -32,7 +35,7 @@ var UnlockDialog = class {
|
|||||||
y_align: Clutter.ActorAlign.CENTER,
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
x_expand: true,
|
x_expand: true,
|
||||||
y_expand: true });
|
y_expand: true });
|
||||||
this.actor.add_child(this._promptBox);
|
this.add_child(this._promptBox);
|
||||||
|
|
||||||
this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
||||||
this._authPrompt.connect('failed', this._fail.bind(this));
|
this._authPrompt.connect('failed', this._fail.bind(this));
|
||||||
@@ -64,10 +67,12 @@ var UnlockDialog = class {
|
|||||||
this._authPrompt.reset();
|
this._authPrompt.reset();
|
||||||
this._updateSensitivity(true);
|
this._updateSensitivity(true);
|
||||||
|
|
||||||
Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic');
|
Main.ctrlAltTabManager.addGroup(this, _("Unlock Window"), 'dialog-password-symbolic');
|
||||||
|
|
||||||
this._idleMonitor = Meta.IdleMonitor.get_core();
|
this._idleMonitor = Meta.IdleMonitor.get_core();
|
||||||
this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, this._escape.bind(this));
|
this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, this._escape.bind(this));
|
||||||
|
|
||||||
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateSensitivity(sensitive) {
|
_updateSensitivity(sensitive) {
|
||||||
@@ -106,9 +111,8 @@ var UnlockDialog = class {
|
|||||||
this._authPrompt.cancel();
|
this._authPrompt.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
_onDestroy() {
|
||||||
this.popModal();
|
this.popModal();
|
||||||
this.actor.destroy();
|
|
||||||
|
|
||||||
if (this._idleWatchId) {
|
if (this._idleWatchId) {
|
||||||
this._idleMonitor.remove_watch(this._idleWatchId);
|
this._idleMonitor.remove_watch(this._idleWatchId);
|
||||||
@@ -131,13 +135,16 @@ var UnlockDialog = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
open(timestamp) {
|
open(timestamp) {
|
||||||
this.actor.show();
|
this.show();
|
||||||
|
|
||||||
if (this._isModal)
|
if (this._isModal)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!Main.pushModal(this.actor, { timestamp: timestamp,
|
let modalParams = {
|
||||||
actionMode: Shell.ActionMode.UNLOCK_SCREEN }))
|
timestamp,
|
||||||
|
actionMode: Shell.ActionMode.UNLOCK_SCREEN,
|
||||||
|
};
|
||||||
|
if (!Main.pushModal(this, modalParams))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this._isModal = true;
|
this._isModal = true;
|
||||||
@@ -147,9 +154,8 @@ var UnlockDialog = class {
|
|||||||
|
|
||||||
popModal(timestamp) {
|
popModal(timestamp) {
|
||||||
if (this._isModal) {
|
if (this._isModal) {
|
||||||
Main.popModal(this.actor, timestamp);
|
Main.popModal(this, timestamp);
|
||||||
this._isModal = false;
|
this._isModal = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
Signals.addSignalMethods(UnlockDialog.prototype);
|
|
||||||
|
|||||||
@@ -389,8 +389,8 @@ var ViewSelector = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onShowAppsButtonToggled() {
|
_onShowAppsButtonToggled() {
|
||||||
this._showPage(this._showAppsButton.checked ?
|
this._showPage(this._showAppsButton.checked
|
||||||
this._appsPage : this._workspacesPage);
|
? this._appsPage : this._workspacesPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onStageKeyPress(actor, event) {
|
_onStageKeyPress(actor, event) {
|
||||||
@@ -424,8 +424,9 @@ var ViewSelector = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_searchCancelled() {
|
_searchCancelled() {
|
||||||
this._showPage(this._showAppsButton.checked ? this._appsPage
|
this._showPage(this._showAppsButton.checked
|
||||||
: this._workspacesPage);
|
? this._appsPage
|
||||||
|
: this._workspacesPage);
|
||||||
|
|
||||||
// Leave the entry focused when it doesn't have any text;
|
// Leave the entry focused when it doesn't have any text;
|
||||||
// when replacing a selected search term, Clutter emits
|
// when replacing a selected search term, Clutter emits
|
||||||
@@ -576,6 +577,7 @@ var ViewSelector = class {
|
|||||||
if (event.type() == Clutter.EventType.BUTTON_PRESS) {
|
if (event.type() == Clutter.EventType.BUTTON_PRESS) {
|
||||||
let source = event.get_source();
|
let source = event.get_source();
|
||||||
if (source != this._text &&
|
if (source != this._text &&
|
||||||
|
this._text.has_key_focus() &&
|
||||||
this._text.text == '' &&
|
this._text.text == '' &&
|
||||||
!this._text.has_preedit () &&
|
!this._text.has_preedit () &&
|
||||||
!Main.layoutManager.keyboardBox.contains(source)) {
|
!Main.layoutManager.keyboardBox.contains(source)) {
|
||||||
|
|||||||
@@ -187,6 +187,9 @@ var WorkspaceTracker = class {
|
|||||||
let workspaceManager = global.workspace_manager;
|
let workspaceManager = global.workspace_manager;
|
||||||
workspaceManager.connect('notify::n-workspaces',
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
this._nWorkspacesChanged.bind(this));
|
this._nWorkspacesChanged.bind(this));
|
||||||
|
workspaceManager.connect('workspaces-reordered', () => {
|
||||||
|
this._workspaces.sort((a, b) => a.index() - b.index());
|
||||||
|
});
|
||||||
global.window_manager.connect('switch-workspace',
|
global.window_manager.connect('switch-workspace',
|
||||||
this._queueCheckWorkspaces.bind(this));
|
this._queueCheckWorkspaces.bind(this));
|
||||||
|
|
||||||
@@ -630,9 +633,9 @@ var AppSwitchAction = GObject.registerClass({
|
|||||||
let nPoints = this.get_n_current_points();
|
let nPoints = this.get_n_current_points();
|
||||||
let event = this.get_last_event (nPoints - 1);
|
let event = this.get_last_event (nPoints - 1);
|
||||||
|
|
||||||
if (nPoints == 3)
|
if (nPoints == 3) {
|
||||||
this._longPressStartTime = event.get_time();
|
this._longPressStartTime = event.get_time();
|
||||||
else if (nPoints == 4) {
|
} else if (nPoints == 4) {
|
||||||
// Check whether the 4th finger press happens after a 3-finger long press,
|
// Check whether the 4th finger press happens after a 3-finger long press,
|
||||||
// this only needs to be checked on the first 4th finger press
|
// this only needs to be checked on the first 4th finger press
|
||||||
if (this._longPressStartTime != null &&
|
if (this._longPressStartTime != null &&
|
||||||
@@ -697,23 +700,24 @@ var WindowManager = class {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this._shellwm = global.window_manager;
|
this._shellwm = global.window_manager;
|
||||||
|
|
||||||
this._minimizing = [];
|
this._minimizing = new Set();
|
||||||
this._unminimizing = [];
|
this._unminimizing = new Set();
|
||||||
this._mapping = [];
|
this._mapping = new Set();
|
||||||
this._resizing = [];
|
this._resizing = new Set();
|
||||||
this._destroying = [];
|
this._resizePending = new Set();
|
||||||
|
this._destroying = new Set();
|
||||||
this._movingWindow = null;
|
this._movingWindow = null;
|
||||||
|
|
||||||
this._dimmedWindows = [];
|
this._dimmedWindows = [];
|
||||||
|
|
||||||
this._skippedActors = [];
|
this._skippedActors = new Set();
|
||||||
|
|
||||||
this._allowedKeybindings = {};
|
this._allowedKeybindings = {};
|
||||||
|
|
||||||
this._isWorkspacePrepended = false;
|
this._isWorkspacePrepended = false;
|
||||||
|
|
||||||
this._switchData = null;
|
this._switchData = null;
|
||||||
this._shellwm.connect('kill-switch-workspace', (shellwm) => {
|
this._shellwm.connect('kill-switch-workspace', shellwm => {
|
||||||
if (this._switchData) {
|
if (this._switchData) {
|
||||||
if (this._switchData.inProgress)
|
if (this._switchData.inProgress)
|
||||||
this._switchWorkspaceDone(shellwm);
|
this._switchWorkspaceDone(shellwm);
|
||||||
@@ -1022,7 +1026,6 @@ var WindowManager = class {
|
|||||||
(proxy, error) => {
|
(proxy, error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
log(error.message);
|
log(error.message);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1115,7 +1118,7 @@ var WindowManager = class {
|
|||||||
|
|
||||||
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
|
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
|
||||||
this._currentPadOsd = new PadOsd.PadOsd(device, settings, imagePath, editionMode, monitorIndex);
|
this._currentPadOsd = new PadOsd.PadOsd(device, settings, imagePath, editionMode, monitorIndex);
|
||||||
this._currentPadOsd.connect('closed', () => this._currentPadOsd = null);
|
this._currentPadOsd.connect('closed', () => (this._currentPadOsd = null));
|
||||||
|
|
||||||
return this._currentPadOsd.actor;
|
return this._currentPadOsd.actor;
|
||||||
}
|
}
|
||||||
@@ -1210,9 +1213,41 @@ var WindowManager = class {
|
|||||||
if (!Meta.prefs_get_dynamic_workspaces())
|
if (!Meta.prefs_get_dynamic_workspaces())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let newWs = workspaceManager.append_new_workspace(
|
workspaceManager.append_new_workspace(false, global.get_current_time());
|
||||||
false, global.get_current_time());
|
|
||||||
workspaceManager.reorder_workspace(newWs, pos);
|
let windows = global.get_window_actors().map(a => a.meta_window);
|
||||||
|
|
||||||
|
// To create a new workspace, we slide all the windows on workspaces
|
||||||
|
// below us to the next workspace, leaving a blank workspace for us
|
||||||
|
// to recycle.
|
||||||
|
windows.forEach(window => {
|
||||||
|
// If the window is attached to an ancestor, we don't need/want
|
||||||
|
// to move it
|
||||||
|
if (window.get_transient_for() != null)
|
||||||
|
return;
|
||||||
|
// Same for OR windows
|
||||||
|
if (window.is_override_redirect())
|
||||||
|
return;
|
||||||
|
// Sticky windows don't need moving, in fact moving would
|
||||||
|
// unstick them
|
||||||
|
if (window.on_all_workspaces)
|
||||||
|
return;
|
||||||
|
// Windows on workspaces below pos don't need moving
|
||||||
|
let index = window.get_workspace().index();
|
||||||
|
if (index < pos)
|
||||||
|
return;
|
||||||
|
window.change_workspace_by_index(index + 1, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
// If the new workspace was inserted before the active workspace,
|
||||||
|
// activate the workspace to which its windows went
|
||||||
|
let activeIndex = workspaceManager.get_active_workspace_index();
|
||||||
|
if (activeIndex >= pos) {
|
||||||
|
let newWs = workspaceManager.get_workspace_by_index(activeIndex + 1);
|
||||||
|
this._blockAnimations = true;
|
||||||
|
newWs.activate(global.get_current_time());
|
||||||
|
this._blockAnimations = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
keepWorkspaceAlive(workspace, duration) {
|
keepWorkspaceAlive(workspace, duration) {
|
||||||
@@ -1223,7 +1258,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
skipNextEffect(actor) {
|
skipNextEffect(actor) {
|
||||||
this._skippedActors.push(actor);
|
this._skippedActors.add(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
setCustomKeybindingHandler(name, modes, handler) {
|
setCustomKeybindingHandler(name, modes, handler) {
|
||||||
@@ -1252,7 +1287,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_shouldAnimateActor(actor, types) {
|
_shouldAnimateActor(actor, types) {
|
||||||
if (this._removeEffect(this._skippedActors, actor))
|
if (this._skippedActors.delete(actor))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!this._shouldAnimate())
|
if (!this._shouldAnimate())
|
||||||
@@ -1265,15 +1300,6 @@ var WindowManager = class {
|
|||||||
return types.includes(type);
|
return types.includes(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeEffect(list, actor) {
|
|
||||||
let idx = list.indexOf(actor);
|
|
||||||
if (idx != -1) {
|
|
||||||
list.splice(idx, 1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_minimizeWindow(shellwm, actor) {
|
_minimizeWindow(shellwm, actor) {
|
||||||
let types = [Meta.WindowType.NORMAL,
|
let types = [Meta.WindowType.NORMAL,
|
||||||
Meta.WindowType.MODAL_DIALOG,
|
Meta.WindowType.MODAL_DIALOG,
|
||||||
@@ -1285,7 +1311,7 @@ var WindowManager = class {
|
|||||||
|
|
||||||
actor.set_scale(1.0, 1.0);
|
actor.set_scale(1.0, 1.0);
|
||||||
|
|
||||||
this._minimizing.push(actor);
|
this._minimizing.add(actor);
|
||||||
|
|
||||||
if (actor.meta_window.is_monitor_sized()) {
|
if (actor.meta_window.is_monitor_sized()) {
|
||||||
actor.ease({
|
actor.ease({
|
||||||
@@ -1339,7 +1365,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_minimizeWindowDone(shellwm, actor) {
|
_minimizeWindowDone(shellwm, actor) {
|
||||||
if (this._removeEffect(this._minimizing, actor)) {
|
if (this._minimizing.delete(actor)) {
|
||||||
actor.remove_all_transitions();
|
actor.remove_all_transitions();
|
||||||
actor.set_scale(1.0, 1.0);
|
actor.set_scale(1.0, 1.0);
|
||||||
actor.set_opacity(255);
|
actor.set_opacity(255);
|
||||||
@@ -1350,7 +1376,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_minimizeWindowOverwritten(shellwm, actor) {
|
_minimizeWindowOverwritten(shellwm, actor) {
|
||||||
if (this._removeEffect(this._minimizing, actor)) {
|
if (this._minimizing.delete(actor)) {
|
||||||
shellwm.completed_minimize(actor);
|
shellwm.completed_minimize(actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1364,7 +1390,7 @@ var WindowManager = class {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._unminimizing.push(actor);
|
this._unminimizing.add(actor);
|
||||||
|
|
||||||
if (actor.meta_window.is_monitor_sized()) {
|
if (actor.meta_window.is_monitor_sized()) {
|
||||||
actor.opacity = 0;
|
actor.opacity = 0;
|
||||||
@@ -1421,7 +1447,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_unminimizeWindowDone(shellwm, actor) {
|
_unminimizeWindowDone(shellwm, actor) {
|
||||||
if (this._removeEffect(this._unminimizing, actor)) {
|
if (this._unminimizing.delete(actor)) {
|
||||||
actor.remove_all_transitions();
|
actor.remove_all_transitions();
|
||||||
actor.set_scale(1.0, 1.0);
|
actor.set_scale(1.0, 1.0);
|
||||||
actor.set_opacity(255);
|
actor.set_opacity(255);
|
||||||
@@ -1432,7 +1458,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_unminimizeWindowOverwritten(shellwm, actor) {
|
_unminimizeWindowOverwritten(shellwm, actor) {
|
||||||
if (this._removeEffect(this._unminimizing, actor)) {
|
if (this._unminimizing.delete(actor)) {
|
||||||
shellwm.completed_unminimize(actor);
|
shellwm.completed_unminimize(actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1467,6 +1493,7 @@ var WindowManager = class {
|
|||||||
this._clearAnimationInfo(actor);
|
this._clearAnimationInfo(actor);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this._resizePending.add(actor);
|
||||||
actor.__animationInfo = { clone: actorClone,
|
actor.__animationInfo = { clone: actorClone,
|
||||||
oldRect: oldFrameRect,
|
oldRect: oldFrameRect,
|
||||||
destroyId: destroyId };
|
destroyId: destroyId };
|
||||||
@@ -1475,7 +1502,7 @@ var WindowManager = class {
|
|||||||
_sizeChangedWindow(shellwm, actor) {
|
_sizeChangedWindow(shellwm, actor) {
|
||||||
if (!actor.__animationInfo)
|
if (!actor.__animationInfo)
|
||||||
return;
|
return;
|
||||||
if (this._resizing.includes(actor))
|
if (this._resizing.has(actor))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let actorClone = actor.__animationInfo.clone;
|
let actorClone = actor.__animationInfo.clone;
|
||||||
@@ -1485,7 +1512,8 @@ var WindowManager = class {
|
|||||||
let scaleX = targetRect.width / sourceRect.width;
|
let scaleX = targetRect.width / sourceRect.width;
|
||||||
let scaleY = targetRect.height / sourceRect.height;
|
let scaleY = targetRect.height / sourceRect.height;
|
||||||
|
|
||||||
this._resizing.push(actor);
|
this._resizePending.delete(actor);
|
||||||
|
this._resizing.add(actor);
|
||||||
|
|
||||||
// Now scale and fade out the clone
|
// Now scale and fade out the clone
|
||||||
actorClone.ease({
|
actorClone.ease({
|
||||||
@@ -1538,7 +1566,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_sizeChangeWindowDone(shellwm, actor) {
|
_sizeChangeWindowDone(shellwm, actor) {
|
||||||
if (this._removeEffect(this._resizing, actor)) {
|
if (this._resizing.delete(actor)) {
|
||||||
actor.remove_all_transitions();
|
actor.remove_all_transitions();
|
||||||
actor.scale_x = 1.0;
|
actor.scale_x = 1.0;
|
||||||
actor.scale_y = 1.0;
|
actor.scale_y = 1.0;
|
||||||
@@ -1546,10 +1574,13 @@ var WindowManager = class {
|
|||||||
actor.translation_y = 0;
|
actor.translation_y = 0;
|
||||||
this._clearAnimationInfo(actor);
|
this._clearAnimationInfo(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._resizePending.delete(actor))
|
||||||
|
this._shellwm.completed_size_change(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
_sizeChangeWindowOverwritten(shellwm, actor) {
|
_sizeChangeWindowOverwritten(shellwm, actor) {
|
||||||
if (this._removeEffect(this._resizing, actor))
|
if (this._resizing.delete(actor))
|
||||||
this._clearAnimationInfo(actor);
|
this._clearAnimationInfo(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1642,7 +1673,7 @@ var WindowManager = class {
|
|||||||
actor.scale_y = 0.05;
|
actor.scale_y = 0.05;
|
||||||
actor.opacity = 0;
|
actor.opacity = 0;
|
||||||
actor.show();
|
actor.show();
|
||||||
this._mapping.push(actor);
|
this._mapping.add(actor);
|
||||||
|
|
||||||
actor.ease({
|
actor.ease({
|
||||||
opacity: 255,
|
opacity: 255,
|
||||||
@@ -1664,7 +1695,7 @@ var WindowManager = class {
|
|||||||
actor.scale_y = 0;
|
actor.scale_y = 0;
|
||||||
actor.opacity = 0;
|
actor.opacity = 0;
|
||||||
actor.show();
|
actor.show();
|
||||||
this._mapping.push(actor);
|
this._mapping.add(actor);
|
||||||
|
|
||||||
actor.ease({
|
actor.ease({
|
||||||
opacity: 255,
|
opacity: 255,
|
||||||
@@ -1682,12 +1713,11 @@ var WindowManager = class {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shellwm.completed_map(actor);
|
shellwm.completed_map(actor);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_mapWindowDone(shellwm, actor) {
|
_mapWindowDone(shellwm, actor) {
|
||||||
if (this._removeEffect(this._mapping, actor)) {
|
if (this._mapping.delete(actor)) {
|
||||||
actor.remove_all_transitions();
|
actor.remove_all_transitions();
|
||||||
actor.opacity = 255;
|
actor.opacity = 255;
|
||||||
actor.set_pivot_point(0, 0);
|
actor.set_pivot_point(0, 0);
|
||||||
@@ -1700,7 +1730,7 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_mapWindowOverwrite(shellwm, actor) {
|
_mapWindowOverwrite(shellwm, actor) {
|
||||||
if (this._removeEffect(this._mapping, actor)) {
|
if (this._mapping.delete(actor)) {
|
||||||
shellwm.completed_map(actor);
|
shellwm.completed_map(actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1730,7 +1760,7 @@ var WindowManager = class {
|
|||||||
switch (actor.meta_window.window_type) {
|
switch (actor.meta_window.window_type) {
|
||||||
case Meta.WindowType.NORMAL:
|
case Meta.WindowType.NORMAL:
|
||||||
actor.set_pivot_point(0.5, 0.5);
|
actor.set_pivot_point(0.5, 0.5);
|
||||||
this._destroying.push(actor);
|
this._destroying.add(actor);
|
||||||
|
|
||||||
actor.ease({
|
actor.ease({
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
@@ -1744,7 +1774,7 @@ var WindowManager = class {
|
|||||||
case Meta.WindowType.MODAL_DIALOG:
|
case Meta.WindowType.MODAL_DIALOG:
|
||||||
case Meta.WindowType.DIALOG:
|
case Meta.WindowType.DIALOG:
|
||||||
actor.set_pivot_point(0.5, 0.5);
|
actor.set_pivot_point(0.5, 0.5);
|
||||||
this._destroying.push(actor);
|
this._destroying.add(actor);
|
||||||
|
|
||||||
if (window.is_attached_dialog()) {
|
if (window.is_attached_dialog()) {
|
||||||
let parent = window.get_transient_for();
|
let parent = window.get_transient_for();
|
||||||
@@ -1763,12 +1793,11 @@ var WindowManager = class {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
shellwm.completed_destroy(actor);
|
shellwm.completed_destroy(actor);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_destroyWindowDone(shellwm, actor) {
|
_destroyWindowDone(shellwm, actor) {
|
||||||
if (this._removeEffect(this._destroying, actor)) {
|
if (this._destroying.delete(actor)) {
|
||||||
let parent = actor.get_meta_window().get_transient_for();
|
let parent = actor.get_meta_window().get_transient_for();
|
||||||
if (parent && actor._parentDestroyId) {
|
if (parent && actor._parentDestroyId) {
|
||||||
parent.disconnect(actor._parentDestroyId);
|
parent.disconnect(actor._parentDestroyId);
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let waitId = 0;
|
let waitId = 0;
|
||||||
let id = global.display.connect('grab-op-end', (display) => {
|
let id = global.display.connect('grab-op-end', display => {
|
||||||
display.disconnect(id);
|
display.disconnect(id);
|
||||||
GLib.source_remove(waitId);
|
GLib.source_remove(waitId);
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ var WindowClone = GObject.registerClass({
|
|||||||
this.x = this._boundingBox.x;
|
this.x = this._boundingBox.x;
|
||||||
this.y = this._boundingBox.y;
|
this.y = this._boundingBox.y;
|
||||||
|
|
||||||
|
this._computeWindowCenter();
|
||||||
|
|
||||||
let clickAction = new Clutter.ClickAction();
|
let clickAction = new Clutter.ClickAction();
|
||||||
clickAction.connect('clicked', this._onClicked.bind(this));
|
clickAction.connect('clicked', this._onClicked.bind(this));
|
||||||
clickAction.connect('long-press', this._onLongPress.bind(this));
|
clickAction.connect('long-press', this._onLongPress.bind(this));
|
||||||
@@ -299,6 +301,18 @@ var WindowClone = GObject.registerClass({
|
|||||||
this.layout_manager.boundingBox = rect;
|
this.layout_manager.boundingBox = rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get windowCenter() {
|
||||||
|
return this._windowCenter;
|
||||||
|
}
|
||||||
|
|
||||||
|
_computeWindowCenter() {
|
||||||
|
let box = this.realWindow.get_allocation_box();
|
||||||
|
this._windowCenter = new Clutter.Point({
|
||||||
|
x: box.get_x() + box.get_width() / 2,
|
||||||
|
y: box.get_y() + box.get_height() / 2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Find the actor just below us, respecting reparenting done by DND code
|
// Find the actor just below us, respecting reparenting done by DND code
|
||||||
getActualStackAbove() {
|
getActualStackAbove() {
|
||||||
if (this._stackAbove == null)
|
if (this._stackAbove == null)
|
||||||
@@ -412,8 +426,6 @@ var WindowClone = GObject.registerClass({
|
|||||||
|
|
||||||
_onDragBegin(_draggable, _time) {
|
_onDragBegin(_draggable, _time) {
|
||||||
this._dragSlot = this._slot;
|
this._dragSlot = this._slot;
|
||||||
[this.dragOrigX, this.dragOrigY] = this.get_position();
|
|
||||||
this.dragOrigScale = this.scale_x;
|
|
||||||
this.inDrag = true;
|
this.inDrag = true;
|
||||||
this.emit('drag-begin');
|
this.emit('drag-begin');
|
||||||
}
|
}
|
||||||
@@ -423,7 +435,7 @@ var WindowClone = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
acceptDrop(source, actor, x, y, time) {
|
acceptDrop(source, actor, x, y, time) {
|
||||||
this._workspace.acceptDrop(source, actor, x, y, time);
|
return this._workspace.acceptDrop(source, actor, x, y, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragCancelled(_draggable, _time) {
|
_onDragCancelled(_draggable, _time) {
|
||||||
@@ -468,7 +480,8 @@ var WindowOverlay = class {
|
|||||||
this.border = new St.Bin({ style_class: 'window-clone-border' });
|
this.border = new St.Bin({ style_class: 'window-clone-border' });
|
||||||
|
|
||||||
this.title = new St.Label({ style_class: 'window-caption',
|
this.title = new St.Label({ style_class: 'window-caption',
|
||||||
text: this._getCaption() });
|
text: this._getCaption(),
|
||||||
|
reactive: true });
|
||||||
this.title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
this.title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
||||||
windowClone.label_actor = this.title;
|
windowClone.label_actor = this.title;
|
||||||
|
|
||||||
@@ -493,7 +506,6 @@ var WindowOverlay = class {
|
|||||||
this.closeButton.hide();
|
this.closeButton.hide();
|
||||||
|
|
||||||
// Don't block drop targets
|
// Don't block drop targets
|
||||||
Shell.util_set_hidden_from_pick(this.title, true);
|
|
||||||
Shell.util_set_hidden_from_pick(this.border, true);
|
Shell.util_set_hidden_from_pick(this.border, true);
|
||||||
|
|
||||||
parentActor.add_actor(this.border);
|
parentActor.add_actor(this.border);
|
||||||
@@ -686,19 +698,22 @@ var WindowOverlay = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onHideChrome() {
|
_onHideChrome() {
|
||||||
if (this._idleHideOverlayId == 0) {
|
if (this._idleHideOverlayId > 0)
|
||||||
this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this));
|
GLib.source_remove(this._idleHideOverlayId);
|
||||||
GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
|
|
||||||
}
|
this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this));
|
||||||
|
GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
|
||||||
}
|
}
|
||||||
|
|
||||||
_idleHideOverlay() {
|
_idleHideOverlay() {
|
||||||
this._idleHideOverlayId = 0;
|
if (this.closeButton['has-pointer'] ||
|
||||||
|
this.title['has-pointer'])
|
||||||
|
return GLib.SOURCE_CONTINUE;
|
||||||
|
|
||||||
if (!this._windowClone['has-pointer'] &&
|
if (!this._windowClone['has-pointer'])
|
||||||
!this.closeButton['has-pointer'])
|
|
||||||
this._animateInvisible();
|
this._animateInvisible();
|
||||||
|
|
||||||
|
this._idleHideOverlayId = 0;
|
||||||
return GLib.SOURCE_REMOVE;
|
return GLib.SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,7 +918,7 @@ var LayoutStrategy = class {
|
|||||||
computeWindowSlots(layout, area) {
|
computeWindowSlots(layout, area) {
|
||||||
this._computeRowSizes(layout);
|
this._computeRowSizes(layout);
|
||||||
|
|
||||||
let { rows: rows, scale: scale } = layout;
|
let { rows, scale } = layout;
|
||||||
|
|
||||||
let slots = [];
|
let slots = [];
|
||||||
|
|
||||||
@@ -978,7 +993,7 @@ var LayoutStrategy = class {
|
|||||||
|
|
||||||
var UnalignedLayoutStrategy = class extends LayoutStrategy {
|
var UnalignedLayoutStrategy = class extends LayoutStrategy {
|
||||||
_computeRowSizes(layout) {
|
_computeRowSizes(layout) {
|
||||||
let { rows: rows, scale: scale } = layout;
|
let { rows, scale } = layout;
|
||||||
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.width = row.fullWidth * scale + (row.windows.length - 1) * this._columnSpacing;
|
row.width = row.fullWidth * scale + (row.windows.length - 1) * this._columnSpacing;
|
||||||
@@ -1002,11 +1017,7 @@ var UnalignedLayoutStrategy = class extends LayoutStrategy {
|
|||||||
_sortRow(row) {
|
_sortRow(row) {
|
||||||
// Sort windows horizontally to minimize travel distance.
|
// Sort windows horizontally to minimize travel distance.
|
||||||
// This affects in what order the windows end up in a row.
|
// This affects in what order the windows end up in a row.
|
||||||
row.windows.sort((a, b) => {
|
row.windows.sort((a, b) => a.windowCenter.x - b.windowCenter.x);
|
||||||
let aCenter = a.realWindow.x + a.realWindow.width / 2;
|
|
||||||
let bCenter = b.realWindow.x + b.realWindow.width / 2;
|
|
||||||
return aCenter - bCenter;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
computeLayout(windows, layout) {
|
computeLayout(windows, layout) {
|
||||||
@@ -1025,11 +1036,7 @@ var UnalignedLayoutStrategy = class extends LayoutStrategy {
|
|||||||
// Sort windows vertically to minimize travel distance.
|
// Sort windows vertically to minimize travel distance.
|
||||||
// This affects what rows the windows get placed in.
|
// This affects what rows the windows get placed in.
|
||||||
let sortedWindows = windows.slice();
|
let sortedWindows = windows.slice();
|
||||||
sortedWindows.sort((a, b) => {
|
sortedWindows.sort((a, b) => a.windowCenter.y - b.windowCenter.y);
|
||||||
let aCenter = a.realWindow.y + a.realWindow.height / 2;
|
|
||||||
let bCenter = b.realWindow.y + b.realWindow.height / 2;
|
|
||||||
return aCenter - bCenter;
|
|
||||||
});
|
|
||||||
|
|
||||||
let windowIdx = 0;
|
let windowIdx = 0;
|
||||||
for (let i = 0; i < numRows; i++) {
|
for (let i = 0; i < numRows; i++) {
|
||||||
@@ -1993,13 +2000,20 @@ var Workspace = class {
|
|||||||
handleDragOver(source, _actor, _x, _y, _time) {
|
handleDragOver(source, _actor, _x, _y, _time) {
|
||||||
if (source.realWindow && !this._isMyWindow(source.realWindow))
|
if (source.realWindow && !this._isMyWindow(source.realWindow))
|
||||||
return DND.DragMotionResult.MOVE_DROP;
|
return DND.DragMotionResult.MOVE_DROP;
|
||||||
if (source.shellWorkspaceLaunch)
|
if (source.app && source.app.can_open_new_window())
|
||||||
|
return DND.DragMotionResult.COPY_DROP;
|
||||||
|
if (!source.app && source.shellWorkspaceLaunch)
|
||||||
return DND.DragMotionResult.COPY_DROP;
|
return DND.DragMotionResult.COPY_DROP;
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
acceptDrop(source, actor, x, y, time) {
|
acceptDrop(source, actor, x, y, time) {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let workspaceIndex = this.metaWorkspace
|
||||||
|
? this.metaWorkspace.index()
|
||||||
|
: workspaceManager.get_active_workspace_index();
|
||||||
|
|
||||||
if (source.realWindow) {
|
if (source.realWindow) {
|
||||||
let win = source.realWindow;
|
let win = source.realWindow;
|
||||||
if (this._isMyWindow(win))
|
if (this._isMyWindow(win))
|
||||||
@@ -2021,12 +2035,18 @@ var Workspace = class {
|
|||||||
if (metaWindow.get_monitor() != this.monitorIndex)
|
if (metaWindow.get_monitor() != this.monitorIndex)
|
||||||
metaWindow.move_to_monitor(this.monitorIndex);
|
metaWindow.move_to_monitor(this.monitorIndex);
|
||||||
|
|
||||||
let workspaceManager = global.workspace_manager;
|
metaWindow.change_workspace_by_index(workspaceIndex, false);
|
||||||
let index = this.metaWorkspace ? this.metaWorkspace.index() : workspaceManager.get_active_workspace_index();
|
|
||||||
metaWindow.change_workspace_by_index(index, false);
|
|
||||||
return true;
|
return true;
|
||||||
} else if (source.shellWorkspaceLaunch) {
|
} else if (source.app && source.app.can_open_new_window()) {
|
||||||
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
|
if (source.animateLaunchAtPos)
|
||||||
|
source.animateLaunchAtPos(actor.x, actor.y);
|
||||||
|
|
||||||
|
source.app.open_new_window(workspaceIndex);
|
||||||
|
return true;
|
||||||
|
} else if (!source.app && source.shellWorkspaceLaunch) {
|
||||||
|
// While unused in our own drag sources, shellWorkspaceLaunch allows
|
||||||
|
// extensions to define custom actions for their drag sources.
|
||||||
|
source.shellWorkspaceLaunch({ workspace: workspaceIndex,
|
||||||
timestamp: time });
|
timestamp: time });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ var WorkspaceThumbnail = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draggable target interface used only by ThumbnailsBox
|
// Draggable target interface used only by ThumbnailsBox
|
||||||
handleDragOverInternal(source, time) {
|
handleDragOverInternal(source, actor, time) {
|
||||||
if (source == Main.xdndHandler) {
|
if (source == Main.xdndHandler) {
|
||||||
this.metaWorkspace.activate(time);
|
this.metaWorkspace.activate(time);
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
@@ -572,13 +572,15 @@ var WorkspaceThumbnail = GObject.registerClass({
|
|||||||
|
|
||||||
if (source.realWindow && !this._isMyWindow(source.realWindow))
|
if (source.realWindow && !this._isMyWindow(source.realWindow))
|
||||||
return DND.DragMotionResult.MOVE_DROP;
|
return DND.DragMotionResult.MOVE_DROP;
|
||||||
if (source.shellWorkspaceLaunch)
|
if (source.app && source.app.can_open_new_window())
|
||||||
|
return DND.DragMotionResult.COPY_DROP;
|
||||||
|
if (!source.app && source.shellWorkspaceLaunch)
|
||||||
return DND.DragMotionResult.COPY_DROP;
|
return DND.DragMotionResult.COPY_DROP;
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
acceptDropInternal(source, time) {
|
acceptDropInternal(source, actor, time) {
|
||||||
if (this.state > ThumbnailState.NORMAL)
|
if (this.state > ThumbnailState.NORMAL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -597,8 +599,16 @@ var WorkspaceThumbnail = GObject.registerClass({
|
|||||||
|
|
||||||
metaWindow.change_workspace_by_index(this.metaWorkspace.index(), false);
|
metaWindow.change_workspace_by_index(this.metaWorkspace.index(), false);
|
||||||
return true;
|
return true;
|
||||||
} else if (source.shellWorkspaceLaunch) {
|
} else if (source.app && source.app.can_open_new_window()) {
|
||||||
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
|
if (source.animateLaunchAtPos)
|
||||||
|
source.animateLaunchAtPos(actor.x, actor.y);
|
||||||
|
|
||||||
|
source.app.open_new_window(this.metaWorkspace.index());
|
||||||
|
return true;
|
||||||
|
} else if (!source.app && source.shellWorkspaceLaunch) {
|
||||||
|
// While unused in our own drag sources, shellWorkspaceLaunch allows
|
||||||
|
// extensions to define custom actions for their drag sources.
|
||||||
|
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace.index(),
|
||||||
timestamp: time });
|
timestamp: time });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -779,7 +789,10 @@ var ThumbnailsBox = GObject.registerClass({
|
|||||||
|
|
||||||
// Draggable target interface
|
// Draggable target interface
|
||||||
handleDragOver(source, actor, x, y, time) {
|
handleDragOver(source, actor, x, y, time) {
|
||||||
if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler)
|
if (!source.realWindow &&
|
||||||
|
(!source.app || !source.app.can_open_new_window()) &&
|
||||||
|
(source.app || !source.shellWorkspaceLaunch) &&
|
||||||
|
source != Main.xdndHandler)
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
|
|
||||||
let canCreateWorkspaces = Meta.prefs_get_dynamic_workspaces();
|
let canCreateWorkspaces = Meta.prefs_get_dynamic_workspaces();
|
||||||
@@ -825,7 +838,7 @@ var ThumbnailsBox = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this._dropWorkspace != -1)
|
if (this._dropWorkspace != -1)
|
||||||
return this._thumbnails[this._dropWorkspace].handleDragOverInternal(source, time);
|
return this._thumbnails[this._dropWorkspace].handleDragOverInternal(source, actor, time);
|
||||||
else if (this._dropPlaceholderPos != -1)
|
else if (this._dropPlaceholderPos != -1)
|
||||||
return source.realWindow ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.COPY_DROP;
|
return source.realWindow ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.COPY_DROP;
|
||||||
else
|
else
|
||||||
@@ -834,9 +847,11 @@ var ThumbnailsBox = GObject.registerClass({
|
|||||||
|
|
||||||
acceptDrop(source, actor, x, y, time) {
|
acceptDrop(source, actor, x, y, time) {
|
||||||
if (this._dropWorkspace != -1) {
|
if (this._dropWorkspace != -1) {
|
||||||
return this._thumbnails[this._dropWorkspace].acceptDropInternal(source, time);
|
return this._thumbnails[this._dropWorkspace].acceptDropInternal(source, actor, time);
|
||||||
} else if (this._dropPlaceholderPos != -1) {
|
} else if (this._dropPlaceholderPos != -1) {
|
||||||
if (!source.realWindow && !source.shellWorkspaceLaunch)
|
if (!source.realWindow &&
|
||||||
|
(!source.app || !source.app.can_open_new_window()) &&
|
||||||
|
(source.app || !source.shellWorkspaceLaunch))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let isWindow = !!source.realWindow;
|
let isWindow = !!source.realWindow;
|
||||||
@@ -853,9 +868,19 @@ var ThumbnailsBox = GObject.registerClass({
|
|||||||
if (source.metaWindow.get_monitor() != thumbMonitor)
|
if (source.metaWindow.get_monitor() != thumbMonitor)
|
||||||
source.metaWindow.move_to_monitor(thumbMonitor);
|
source.metaWindow.move_to_monitor(thumbMonitor);
|
||||||
source.metaWindow.change_workspace_by_index(newWorkspaceIndex, true);
|
source.metaWindow.change_workspace_by_index(newWorkspaceIndex, true);
|
||||||
} else if (source.shellWorkspaceLaunch) {
|
} else if (source.app && source.app.can_open_new_window()) {
|
||||||
|
if (source.animateLaunchAtPos)
|
||||||
|
source.animateLaunchAtPos(actor.x, actor.y);
|
||||||
|
|
||||||
|
source.app.open_new_window(newWorkspaceIndex);
|
||||||
|
} else if (!source.app && source.shellWorkspaceLaunch) {
|
||||||
|
// While unused in our own drag sources, shellWorkspaceLaunch allows
|
||||||
|
// extensions to define custom actions for their drag sources.
|
||||||
source.shellWorkspaceLaunch({ workspace: newWorkspaceIndex,
|
source.shellWorkspaceLaunch({ workspace: newWorkspaceIndex,
|
||||||
timestamp: time });
|
timestamp: time });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (source.app || (!source.app && source.shellWorkspaceLaunch)) {
|
||||||
// This new workspace will be automatically removed if the application fails
|
// This new workspace will be automatically removed if the application fails
|
||||||
// to open its first window within some time, as tracked by Shell.WindowTracker.
|
// to open its first window within some time, as tracked by Shell.WindowTracker.
|
||||||
// Here, we only add a very brief timeout to avoid the _immediate_ removal of the
|
// Here, we only add a very brief timeout to avoid the _immediate_ removal of the
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ var WorkspacesView = class extends WorkspacesViewBase {
|
|||||||
this.scrollAdjustment.ease(index, {
|
this.scrollAdjustment.ease(index, {
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
duration: WORKSPACE_SWITCH_TIME,
|
duration: WORKSPACE_SWITCH_TIME,
|
||||||
onComplete: () => this._animatingScroll = false
|
onComplete: () => (this._animatingScroll = false)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
4,
|
4,
|
||||||
{
|
{
|
||||||
"ignoredNodes": [
|
"ignoredNodes": [
|
||||||
"ConditionalExpression",
|
|
||||||
"CallExpression > ArrowFunctionExpression",
|
|
||||||
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
|
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
|
||||||
],
|
],
|
||||||
"CallExpression": { "arguments": "first" },
|
"CallExpression": { "arguments": "first" },
|
||||||
|
|||||||
13
meson.build
13
meson.build
@@ -1,5 +1,5 @@
|
|||||||
project('gnome-shell', 'c',
|
project('gnome-shell', 'c',
|
||||||
version: '3.34.0',
|
version: '3.34.5',
|
||||||
meson_version: '>= 0.47.0',
|
meson_version: '>= 0.47.0',
|
||||||
license: 'GPLv2+'
|
license: 'GPLv2+'
|
||||||
)
|
)
|
||||||
@@ -31,6 +31,7 @@ polkit_req = '>= 0.100'
|
|||||||
schemas_req = '>= 3.33.1'
|
schemas_req = '>= 3.33.1'
|
||||||
startup_req = '>= 0.11'
|
startup_req = '>= 0.11'
|
||||||
ibus_req = '>= 1.5.2'
|
ibus_req = '>= 1.5.2'
|
||||||
|
gnome_desktop_req = '>= 3.32'
|
||||||
|
|
||||||
bt_req = '>= 3.9.0'
|
bt_req = '>= 3.9.0'
|
||||||
gst_req = '>= 0.11.92'
|
gst_req = '>= 0.11.92'
|
||||||
@@ -97,6 +98,7 @@ startup_dep = dependency('libstartup-notification-1.0', version: startup_req)
|
|||||||
ibus_dep = dependency('ibus-1.0', version: ibus_req)
|
ibus_dep = dependency('ibus-1.0', version: ibus_req)
|
||||||
x11_dep = dependency('x11')
|
x11_dep = dependency('x11')
|
||||||
schemas_dep = dependency('gsettings-desktop-schemas', version: schemas_req)
|
schemas_dep = dependency('gsettings-desktop-schemas', version: schemas_req)
|
||||||
|
gnome_desktop_dep = dependency('gnome-desktop-3.0', version: gnome_desktop_req)
|
||||||
|
|
||||||
bt_dep = dependency('gnome-bluetooth-1.0', version: bt_req, required: false)
|
bt_dep = dependency('gnome-bluetooth-1.0', version: bt_req, required: false)
|
||||||
gst_dep = dependency('gstreamer-1.0', version: gst_req, required: false)
|
gst_dep = dependency('gstreamer-1.0', version: gst_req, required: false)
|
||||||
@@ -113,12 +115,8 @@ if get_option('networkmanager')
|
|||||||
nm_deps += dependency('libnm', version: nm_req)
|
nm_deps += dependency('libnm', version: nm_req)
|
||||||
nm_deps += dependency('libsecret-1', version: secret_req)
|
nm_deps += dependency('libsecret-1', version: secret_req)
|
||||||
|
|
||||||
vpndir = nm_deps[0].get_pkgconfig_variable('vpnservicedir')
|
|
||||||
|
|
||||||
have_networkmanager = true
|
have_networkmanager = true
|
||||||
else
|
else
|
||||||
vpndir = prefix
|
|
||||||
|
|
||||||
have_networkmanager = false
|
have_networkmanager = false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -177,6 +175,11 @@ cdata.set('HAVE__NL_TIME_FIRST_WEEKDAY',
|
|||||||
cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
|
cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# New API added in gnome-desktop3 3.34.2/3.35.2
|
||||||
|
cdata.set('HAVE_GNOME_SYSTEMD',
|
||||||
|
cc.has_header('libgnome-desktop/gnome-systemd.h', dependencies: gnome_desktop_dep)
|
||||||
|
)
|
||||||
|
|
||||||
cdata.set('HAVE_FDWALK',
|
cdata.set('HAVE_FDWALK',
|
||||||
cc.has_function('fdwalk')
|
cc.has_function('fdwalk')
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ bn_IN
|
|||||||
bs
|
bs
|
||||||
ca
|
ca
|
||||||
ca@valencia
|
ca@valencia
|
||||||
|
ckb
|
||||||
cs
|
cs
|
||||||
da
|
da
|
||||||
de
|
de
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user