Compare commits

..

113 Commits

Author SHA1 Message Date
20e7dd31a8 shell-global: Make saving of persistent state asynchronous
This is an expensive operation that is best avoided in the main loop. Given
the call doesn't care much about returning error or status, it can just
be made async within.

Every operation on a given file will be destructive wrt previous
operations on the same file, so we just cancel any pending operation on
it before batching the current one.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/815

(cherry picked from commit 86a00b6872)
2020-08-17 13:53:07 +02:00
ac3738f4be keyboardManager: Avoid idempotent calls to meta_backend_set_keymap()
But still try to apply the keymap whenever the input sources changed. This
is a different approach to gnome-shell#240 that still avoid redundant
changes to the current keymap, but actually trigger one when input sources
are added.

https://bugzilla.redhat.com/show_bug.cgi?id=1637418

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/691


(cherry picked from commit b405ed6442)
2020-08-17 11:52:20 +00:00
b48e95cba2 Revert "util: cache local GTimeZone"
This reverts commit f597a0a11c.
2020-02-26 23:43:25 -08:00
5ccf92e804 Revert "ShellAppCache: add cache to help keep I/O off main thread"
This reverts commit 2c549bfbbe.
2020-02-26 23:43:18 -08:00
2040c380bd Revert "appDisplay: use ShellAppCache to translate folder names"
This reverts commit f87b9f374a.
2020-02-26 23:43:10 -08:00
4e22989f07 Revert "appDisplay: use ShellAppCache to access GAppInfo"
This reverts commit cfb92ad392.
2020-02-26 23:43:00 -08:00
cfb92ad392 appDisplay: use ShellAppCache to access GAppInfo
Calls to Gio.AppInfo.get_all() can perform quite a bit of I/O on the
calling thread. This can potentially stall the compositor if the disk
controller is saturated.

Instead we can call the new ShellAppCache which contains cached information
and performs all update I/O on a thread.

Notifications of changes work very similar to GAppInfoMonitor via the
ShellAppCache::changed() signal.
2020-02-26 23:12:22 -08:00
f87b9f374a appDisplay: use ShellAppCache to translate folder names
This was performing quite a bit of I/O on the main thread previously. Now,
all the I/O is deferred to a worker thread and the translated names are
cached for immediate lookup.
2020-02-26 23:12:22 -08:00
2c549bfbbe ShellAppCache: add cache to help keep I/O off main thread
A number of things can result in doing I/O on the main thread such as
loading GAppInfo or folder translations. The ShellAppCache provides a
layer of abstraction around those things so that we can keep that work
off the main thread by delaying a short while and processing the work
synchronously off-main-thread.

The results can then be marshalled back to the main thread for use by
the rest of the system via the ShellAppCache::changed() signal.
2020-02-26 23:12:22 -08:00
f597a0a11c util: cache local GTimeZone
This ensures that we do not create a new GTimeZone with
g_time_zone_new_local() repeatedly. Currently, that will cause GTimeZone
to open(), mmap() and parse /etc/localtime while on the main thread.

We already track timezone changes, so we can cache this value and reuse
it if we:

 1) Clear the cache when timezone changes
 2) Use the only GDateTime API available to us here, which means we
    imply the current time. But this is how environment.js uses the
    date and time anyway, so no loss.

We maintain the old form for plugin compatibility.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2279
2020-02-26 23:12:22 -08:00
3f35ad0cbf submodules: Replace non-functional git.gnome.org URL by GNOME Gitlab URL
Fixes #606
2020-01-20 23:23:37 +01:00
bd3227e23f Update Japanese translation 2019-10-04 15:29:47 +00:00
04f847a3c2 Update Japanese translation 2019-09-05 11:54:20 +00:00
41fe2d2c01 Update Japanese translation 2019-09-05 11:52:26 +00:00
161beb71eb osk-layouts: Fix French layout
The script to convert XML keyboard layouts to json has a small bug
that causes the French-Canadian layout to end up as French.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/997


(cherry picked from commit 859aef78c4)
2019-06-14 16:47:59 +00:00
13ec3169a6 Bump version to 3.28.4
Update NEWS.
2019-05-14 17:28:08 +00:00
8702d6647b st-adjustment: Mark all properties as EXPLICIT_NOTIFY
All adjustment setter functions take good care of avoiding emission of
notify:: when it's not needed. The set_property() implementation already
calls into the setter functions, so mark the properties as EXPLICITY_NOTIFY
in order to optimize notify:: emission away through g_object_set (rather
common from JS code).

(cherry picked from commit b1b455ff1a)

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1270
2019-05-08 15:29:54 +08:00
5703a25e2b dialog: Really set ellipsize mode in subtitle and body
Dialog's subtitle or body could not be properly wrapped, while it's ellipsized
when the text's width doesn't exceed the container size.

Clutter text has an `ellipsize` property, however in dialog's subtitle and body
we have been setting the `ellipsize-mode` property to Pango.EllipsizeMode.NONE
that is not present in the underlying GObject.

Not being an error in javascript, gjs didn't warn us about this, while at the
same time the St.Label's default Pango.EllipsizeMode.END was used.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/922

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/531


(cherry picked from commit 3121c9aa29)
2019-05-03 21:32:24 +00:00
09fbb4a127 windowManager: listen actively to windows being destroyed during WS switch
Prevents gjs from dealing with already dispose()d objects.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/539

(cherry-picked from b087752b55)
2019-05-02 14:27:53 -05:00
4c7b20e584 dnd: Only handle touch events in wayland
There are serveral issues around touch passive grab and touch/pointer doubly
handling to use these on X11, so we stick to single-touch/pointer there.

Cherry picked from commit 60ccdc2deb

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1015
2019-03-13 18:26:32 +00:00
b3045cb964 closeDialog: Untrack chrome when window loses focus
On X11, reactive chrome must be added to the input region in order
to work as expected. However that region works independently from
any window stacking, with the result that the unresponsive-app dialog
currently blocks all input in the "covered" area, even in windows
stacked above the unresponsive window.

The correct fix would be to track the unobscured parts of the dialog
and set the input region from that, but that's quite cumbersome. So
instead, only track chrome when the corresponding window is focused
(or the dialog itself of course).

https://gitlab.gnome.org/GNOME/gnome-shell/issues/273
2019-01-24 16:47:33 +01:00
c41175af45 closeDialog: Periodically check for window to become responsive again
The close dialog for non-responding windows is closed automatically
when we detect that the window is responding again. However as we
currently only ping the window in response to certain user actions
(like focusing the window or opening the window menu), this can
easily go undetected.

Address this by periodically pinging the window while the close
dialog is shown.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/298
2019-01-24 16:47:33 +01:00
7b1544a7a2 closeDialog: Disable unredirection while showing
The dialog won't be visible when unredirection is in place (for example
while a fullscreen window is focused), so disable unredirection while
the dialog is up.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/298
2019-01-24 16:47:33 +01:00
a0f1ac87e9 messageTray: Fix sloppy backport
Commit 8111286463 was cherry-picked without accounting for the
screen/display API difference between 3-30 and 3-28.
2019-01-24 16:47:33 +01:00
1045b35c8b ibusManager: Don't pass undefined callback to ibus
Since commit 551e827841, we don't always pass a callback parameter.
However passing it on as undefined to ibus doesn't work, as gjs doesn't
accept that as a valid callback value and throw an error. As a result,
we can end up with no layout selected in the keyboard menu and an "empty"
indicator. Fix this by explicitly passing null if no callback has been
provided.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/293


(cherry picked from commit 74bb9e6249)
2019-01-21 16:28:20 +00:00
24cdcc56da st-bin: Destroy child in ClutterActor:destroy vfunc
According to Clutter documentation, "[…] actors implementing the
ClutterContainer interface should override the default implementation
of the class handler of this signal and call clutter_actor_destroy()
on their  children."

StBin was doing that in GObject:dispose() instead. Move the child
destruction to a new ClutterActor:destroy() vfunc override.


(cherry picked from commit b719744e75)
2019-01-16 00:05:59 +00:00
1b28cdfbf4 keyboard: Do not call KeyboardManager.holdKeyboard() with set-content-type
When gnome-shell receives the signal of 'set-content-type' from ibus,
gnome-shell calls KeyboardManager.holdKeyboard() and
KeyboardManager.releaseKeyboard() and the functions change the current
input focus in GNOME Xorg and it could result in closing a popup window
which has a password entry by focusing on the entry.
The solution is to stop to call the APIs on 'set-content-type' signal.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/391


(cherry picked from commit 551e827841)
2019-01-15 15:24:40 +00:00
a73294312f altSwitcher: Fix error when all alternatives are disabled
While we do consider the case that we don't have a child to show for the
visibility, we are still trying to move the click action unconditionally.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/783

(cherry picked from commit e77463b875)
2019-01-11 11:30:27 +00:00
5e7a7e31a1 messageTray: Re-enable unredirection when banner is destroyed
The intention of commit 4dc20398 was to disable unredirection while
banners are shown, but the ::done-displaying signal currently used for
re-enabling unredirection is only emitted under some circumstances, so
it's possible that unredirection is left disabled indefinitely, whoops.

Fix this by tying disabling unredirection explicitly to the lifetime
of the banner actor.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/799

(cherry picked from commit e5ce3d541e)
2019-01-11 11:30:27 +00:00
8111286463 messageTray: Disable unredirection while showing banners
We don't usually show notification banners while the monitor is in
fullscreen, but when we do - the notification is urgent - we should
actually show the banner, even if the top-most window is unredirected.
To achieve that, disable unredirection while the banner is showing.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/430

(cherry picked from commit 4dc2039859)
2019-01-11 11:30:26 +00:00
06c6ecc15b workspacesView: initialize self._restackedNotifyId
This attribute was previously only assigned in show(). hide() compares
this attribute to 0. If hide() is called before show() is first called,
the comparison would give the correct result (undefined > 0 is false)
but log a warning:

    JS WARNING: [resource:///org/gnome/shell/ui/workspacesView.js 529]:
    reference to undefined property "_restackedNotifyId"

Initialize this attribute in _init(), alongside _scrollEventId and
_keyPressEventId which are also used in hide().

(cherry picked from commit b2fabd9356)
2019-01-11 11:30:26 +00:00
36f9dcd2bd endSessionDialog: squash "reference to undefined property" warning
dialogContent is set to one of the elements of the list DialogContent,
but not all of those have a checkBoxText property. When logging out (as
opposed to shutting down), this causes a warning:

    JS WARNING: [resource:///org/gnome/shell/ui/endSessionDialog.js
    763]: reference to undefined property "checkBoxText"

(The line number corresponds to this line in 3.28.3.)

The warning is apparently not triggered if the undefined property is
used as part of a boolean expression:

    gjs> var x = {};
    gjs> x.a;
    typein:2:1 strict warning: reference to undefined property "a"
    gjs> if (x.b) { log('oh no'); }
    gjs> x.c || ''
    ""
_setCheckBoxLabel() just checks the truthiness of its 'text' argument,
and the empty string is false-y, so passing '' rather than undefined has
no functional effect.

(cherry picked from commit 0892b5dcdb)
2019-01-11 11:30:26 +00:00
219118e633 viewSelector: Don't unfocus other modals on reset
Don't drop the key focus on Clutter's side if anything but the overview has
pushed a modal (e.g. system modals when activated using the overview).

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/618

(cherry picked from commit fffe58f829)
2019-01-11 11:30:26 +00:00
1e929357e0 panel: Also ignore hidden windows for proximity
We currently only ignore minimized windows, not windows that are
hidden for other reasons - namely on wayland windows are initially
hidden until they are placed.

This fixes a flicker in the transparent top bar on wayland when the
"position" of an unplaced window wrongly suggests the window is
overlapping the top bar.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/693

(cherry-picked from commit a0dc8dc7ef)
2019-01-11 11:30:26 +00:00
e7463e38ca notificationDaemon: support file:// or icon theme names for image-path
While this sounds counter-intuitive, the image-path hint value might also
be used with URIs or icon names.

As per freedesktop standard:
  The "app_icon" parameter and "image-path" hint should be either an URI
  (file:// is the only URI schema supported right now) or a name in a
  freedesktop.org-compliant icon theme (not a GTK+ stock ID).

Thus the image-path hint should also be parsed as it happens for the
app_icon.

Reuse same logic, by falling back on _iconForNotificationData with the
hint value.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/285

(cherry picked from commit 33b8537bf5)
2019-01-11 11:30:26 +00:00
420c1cbfd1 dash: destroy items's child before tooltip
Destroy the DashItemContainer's child from the same handler as the tooltip. This
will prevent invalid reads when the item is destroyed while its quicklist is
still open.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/781

(cherry picked from commit ff2fbf5ae4)
2019-01-11 11:30:26 +00:00
d53bd98532 StWidget: don't forget to invalidate the paint state if not on stage
If the actor is not on the stage yet (i.e. does not have a theme
node), but has a paint state cached, we currently fail to invalidate
it, which will lead to the actor painting with old contents once it
gets onto the stage.

This commit fixes the issue by changing our invalidation strategy;
previously we were looking at the widget's own theme node to determine
if it should be invalidated or not.
Now we look at the theme nodes of our cached paint states. When the
widget is mapped on stage, those are the same as the widget's own
theme node, but when the widget is not on the stage, we'll still be
able to invalidate them.

As part of this, we move the invalidation API to StThemeNodePaintState,
which is a more natural place for our use case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/314

(cherry picked from commit 6743c18fdf)
2019-01-11 11:30:26 +00:00
128a501b9a StTextureCache: use right event to detect file changes
StTextureCache installs file monitors that invalidate caches when
contents of the underlying file change.
At the moment, the cache uses the Gio.FileMonitorEvent.CHANGED event
type to make that determination.

However, that is suboptimal for at least two reasons:
- while a file is being written to disk, many CHANGED events will be
  emitted in sequence. That will cause needless cache invalidations,
  and we will risk loading the file before it's fully loaded.
- if an existing file is replaced, e.g. with g_file_replace(), we may
  not get a CHANGED event but a CREATED one instead, so the cache ends
  up never getting invalidated.

The good news is that in both of those cases GFileMonitor will send a
CHANGES_DONE_HINT event after changes have settled, or after the file
is replaced.

This commit fixes both cases by switching from the CHANGED event to
CHANGES_DONE_HINT to determine that a file has in fact changed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/286

(cherry picked from commit ca3f4cfb41)
2019-01-11 11:30:26 +00:00
b29e243fec st: Avoid integer overflow on unpremultiply
When computing the effective border color, we operate on colors with
premultiplied alpha to simplify the calculations, then unpremultiply
the result. However we miss a bounds check in the last check, so any
color component can overflow the allowed maximum of 0xff and shift the
result in unexpected ways.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/305

(cherry picked from commit 925a25da17)
2019-01-11 11:30:26 +00:00
fa2ddcc52f dnd: Repick target actor if destroyed mid iteration
The picked target actor may be destroyed (e.g. hover style change
resulting in the ClutterTexture to be destroyed). If we don't handle
this, GJS will abort when it sees the exception caused by Javascript
code trying to access the destroyed target actor.

To handle it, listen on the 'destroy' signal on the target actor, and
repick, so a valid actor is passed to the next motion callback.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/632

(cherry picked from commit 4259676f6e)
2019-01-11 11:30:26 +00:00
fbf194f6a1 st-button: Ignore pointer emulated touch events
In X11, pointer emulated touch events are replicated with normal PRESS, RELEASE
pair events which are generated by the server. Thus for a single tap we get:
 - TOUCH_BEGIN -> TOUCH_END, PRESS -> RELEASE

This will cause st-button to send two "clicked" signals, instead of just one,
breaking extensions (like dash-to-dock) that show buttons in the main stage
which will be checked two times or that will receive the same signal two times.


(cherry picked from commit 4c11d15a07)
2018-11-26 21:22:10 +00:00
5610a2435d iconGrid: Defer and group animation cleanup
The `reactive` property of icon actors was being restored 24 times over
the course of the spring animation, all at slightly different times as
each icon finished animating at different times.

The problem is that toggling `reactive` on an `StWidget` incurs a style
change of the `insensitive` pseudo class, and style changes would quickly
queue relayouts incurring full stage reallocation. This occurred many times
during a spring animation hogging the CPU and limiting the frame rate.

The solution is defer and batch the cleanup for all icons until after the
last icon has finished animating. This way the CPU impact of the style
change and stage relayout isn't felt during the animation so the frame
rate remains higher and smoother. The overall CPU usage of the animation
is also reduced as the remaining relayouts are much more likely to be
grouped into a single frame.

Icon spring animation performance on an i7-7700:
Before: 83% CPU and 47 FPS
After : 78% CPU and 54 FPS
which is about a 22% increase in performance per clock (FPS/CPU).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/253


(cherry picked from commit a5e6dd52d2)
2018-11-20 19:52:16 +00:00
a5b36fc7f4 osdWindow: Disconnect signals on destroy
Since we started to show OSD windows on all monitors, OSD windows are
destroyed when the corresponding monitor is disconnected. We shouldn't
leave any signal handlers around in that case - they prevent the object
from being garbage collected, and trigger warnings for accessing proper-
ties of invalidated GObjects.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/602
2018-10-30 13:13:50 +01:00
923d80bba8 Updated Czech translation 2018-10-07 14:32:30 +02:00
9e196d2765 workspace: Avoid setting an undefined width
Since commit c04289853f the `width` parameter may be undefined, but
it is still set unconditionally, whoops.
2018-09-04 17:30:56 +02:00
94897492be calendar: chain up to parent on _onDestroy
(cherry picked from commit 5bca4a884e)
2018-09-03 23:39:40 +00:00
6baf82eb83 messageList: stop syncing if closeButton has been destroyed
The _sync function for Message only updates the close button visibility,
so we can safely stop doing that if the close button get get destroyed earlier
(as it happens when clicking on it).

https://bugzilla.gnome.org/show_bug.cgi?id=791233


(cherry picked from commit 87da623d86)
2018-09-03 23:38:47 +00:00
65d27aaa43 automountManager: remove allowAutorun expire timeout on volume removal
If the volume is removed before AUTORUN_EXPIRE_TIMEOUT_SECS seconds, we can stop
the timeout earlier as there's nothing to unset, while the volume instance
won't be valid anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=791233


(cherry picked from commit 9c41736a81)
2018-09-03 23:38:17 +00:00
176aaa4a97 extensionSystem: Unset stylesheet file reference when unloaded
We must remove the GFile reference from the representing object when an
extension has been unloaded as this won't be used anymore later (e.g. as cached
ref).


(cherry picked from commit 72f5802be9)
2018-09-03 23:36:00 +00:00
5ae5811155 js/main: Throw error if no valid default stylesheet is found
Throw an error using an informative message in case a mode uses a stylesheet
that can't be loaded, instead of crashing later because the theming can't be
properly computed, and thus the minimum size of the actors.


(cherry picked from commit 30cb2127a1)
2018-09-03 23:35:30 +00:00
e027af9548 extensionSystem: Unload stylesheet if extension is not loaded
We should not keep any reference to an extension custom stylesheet in case we
got an error while enabling that


(cherry picked from commit 3aea290adc)
2018-09-03 23:34:54 +00:00
73649a0d6a extensionSystem: Don't load an extension with invalid stylesheet
We currently assign the stylesheet to an extension whenever the file exists,
regardless of whether it actually loaded successfully or not.
And thus we load an extension that ships a stylesheet even if that file can't
be used.

There is no point in trying to load an extension if its stylesheet wasn't
loaded in the first place, so make sure this happens only on success.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/188


(cherry picked from commit 5b3ff7184e)
2018-09-03 23:34:26 +00:00
7dbcd26619 network: Don't assume the active connection has been processed first
`NMConnectionDevice._sync()` is responsible for setting up the active
connection that we'll end up displaying. It expects the active
connection to already be in a map `_connectionItems`. If it isn't in
there, we get a null dereference and the indicator can get into a weird
state where it doesn't display devices / connections properly.

Let's change this expectation. If there is an active connection,
`_deviceAdded()` will eventually get to it and call `_sync()` to set up
the active connection state. We make `_sync()` tolerate there being no
active connection when it's called.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/140


(cherry picked from commit 5d61e2563d)
2018-09-03 23:34:07 +00:00
f30ec4a4c8 workspace: Don't initially hide the title of window overlays
To be able to read the properties of the title correctly during the
first relayout of the overlay, the title, just like the border, can't be
hidden. Otherwise the title can be misaligned some pixels to the left
sometimes.

This slighty worsens the issue that windows moved to a separate
workspace using DND will show an overlay when the workspace is shown in
the overview even though no window is pointed at. Before this commit,
only the border would be visible for windows moved to another workspace,
now the title also is.
2018-09-04 01:18:00 +02:00
c04289853f workspace: Avoid setting overlay title width
Avoid setting the width of the overlay title ourselves to keep the
default width of -1, this way StLabel will change its width by itself as
soon as the text is updated.

The width only needs to be changed if the window title changes, and we
don't animate it in this case anyway so there's no need to pass a width
to _animateOverlayActor().

Setting the title width to the preferred width on relayout is impossible
because get_preferred_width() will always return the width we set the
label to before. If the width is not set to -1, there's no way to get
the new preferred width without calculating it ourselves from the
underlying ClutterText instance.

https://bugzilla.gnome.org/show_bug.cgi?id=787260
2018-09-04 01:18:00 +02:00
b72b773d87 search: Ignore search provider results metas if search is cancelled
When a search has been cancelled, it is expected that providers don't
return the requested number of results, so don't log a warning in that
case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/205
2018-09-04 01:12:24 +02:00
da7cd2807f search: Cancel search provider operations on clear
Ensure that the search provider operations (just getResultMetas requests
in the current implementation) in progress are properly cancelled when we
clear the UI, otherwise returned results might still be added when not
needed.

This is triggered for each provider by the SearchResults reset.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/205
2018-09-04 01:12:12 +02:00
20373ba64e viewSelector: Cancel search on overview hidden
Currently when the overview is hidden, any pending search is kept alive,
not only at remote search provider level (as per issue #183), but even
the shell providers proxies continue to get and process data. This happens
even if this is not needed anymore, while the UI reset is performed only
next time that the overview is shown (causing some more computation
presentation time).

In order to stop this to happen, when the overview is hidden, we have to
unset the search entry to an empty value as this would make SearchResults
to have empty terms list and that would make the proxies cancellable to
be triggered (without causing any further search to start).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/205
2018-09-04 01:12:04 +02:00
025f6eb68e objectManager: correct other invalid index code in onNameVanished
The object manager tries to synthesize interface removal
events if the bus name of a remote object drops off the bus.

The code had bad typos in it, though: it reuses the `i`
index variable in its inner loop, where it should be using
the `j` index variable.

This commit corrects the i/j confusion.
2018-09-04 01:11:40 +02:00
dc5df5c4c9 objectManager: correct invalid index code in onNameVanished
The object manager tries to synthesize interface removal
events if the bus name of a remote object drops off the bus.

The code has a bad typo in it, though: it confuses `objectPaths`
(the list of all object paths) and `objectPath` (the object
currently being processed this iteration of the loop).

That leads to a failure to synthesize the interface removal
events, and spew in the log.

This commit corrects the objectPath/objectPaths confusion.
2018-09-04 01:11:40 +02:00
81db908339 layoutManager: Return null monitor if focusIndex is invalid
https://bugzilla.gnome.org/show_bug.cgi?id=788882


(cherry picked from commit 996dd74157)
2018-08-31 14:40:35 +00:00
706a2259b8 windowManager: Don't animate unmanaged windows on (un)minimization
(cherry picked from commit 878946962d)
2018-08-31 14:40:01 +00:00
e94af71430 keyboard: Handle case where keyboardMonitor is unset
This may be the case where keyboardIndex is -1, which may be the
case where either the keyboard monitor hasn't been set yet, or
the keyboard is being unmanaged and meta_window_get_monitor
returns -1

https://bugzilla.gnome.org/show_bug.cgi?id=788882


(cherry picked from commit 19e864ed3b)
2018-08-31 14:39:12 +00:00
a662e7bb87 windowMenu: Check if monitorIndex is valid before using it
Calling meta_window_get_monitor on an unmanaged window may return
-1, so we need to check the return value.

https://bugzilla.gnome.org/show_bug.cgi?id=788882


(cherry picked from commit c9bf72c5c4)
2018-08-31 14:38:54 +00:00
0b82388c49 overviewControls: Sync hover after drag operations
During global grabs, actors miss enter and leave events required
for correct hover tracking. This can cause the workspace switcher
to get stuck while slid out, so ensure the actor's hover state is
synced after drag operations.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/161


(cherry picked from commit 328c63bf64)
2018-08-31 14:28:11 +00:00
b359b937e9 layout: Mark chrome container as NO_LAYOUT
Showing and hiding children does not affect the allocation of the uiGroup
nor its other children. We can avoid full relayout/redraw in those
situations.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/197


(cherry picked from commit 73d8c82640)
2018-08-31 14:27:15 +00:00
98fb7c33f2 windowManager: Declare variables
Fixes warnings from GJS.


(cherry picked from commit 2f76951658)
2018-08-31 14:22:21 +00:00
4dfc2e0fd1 st-texture-cache: Obey cache policy in st_texture_cache_load
https://bugzilla.gnome.org/show_bug.cgi?id=663461


(cherry picked from commit 50e849a186)
2018-08-31 14:15:30 +00:00
9152d3a286 st-box-layout: Queue relayout on adjustment changes
The actor allocation doesn't change per-se, but apply_transform()
will practically transform it. In order to have the paint volume
update accordingly, queue a relayout.


(cherry picked from commit ab4c72d758)
2018-08-31 14:11:58 +00:00
ba33a05dd2 st: Clip StEntry to allocation
The default get_paint_volume() implementation will do the union
of children, and the child ClutterText paint volume may expand
beyond StEntry size when text overflows.

We actually want all content to be clipped to the StEntry, so
implement get_paint_volume() and tell it so.


(cherry picked from commit 86a520b880)
2018-08-31 14:11:05 +00:00
ddb309815c st: Make StScrollables' paint volume reflect the unconstrained view
And constrain it in StScrollView instead (instead of falling back to an
infinite paint volume, as the actor as paint/pick impls, but no
corresponding get_paint_volume one).

Fixes artifacts with the AppView (and possibly other places) when paint
volumes are aggressively cached.


(cherry picked from commit 4bf033a885)
2018-08-31 14:08:57 +00:00
6a796675bd keyboard: Handle no-window case in FocusTracker
For windows, the cursor location needs to be adjusted by the frame
offsets. However we cannot assume that there is a window, as the
shell itself can have the key focus.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/414


(cherry picked from commit 0dee82fb9f)
2018-08-31 13:48:21 +00:00
d08497414f workspace: Fix infinite loop when finding parent window of dialogs
When a dialog is added to a window while the overview is shown, we get
its parent using get_transient_for() so we can add it to the right
window clone.

If we have multiple layers of dialogs we have to do this recursively
until we find the root ancestor. This case currently results in an
infinite loop: Since parent is always set to the same window, the
while-condition will always be true.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/180


(cherry picked from commit 52cbc299a7)
2018-08-30 02:39:37 +00:00
82886b7ee8 overview: Use whole stage size for cover pane
We show a cover pane on top of the overview during transitions to
prevent issues caused by clicks and mouseover events when the overview
is not ready. Right now, this pane is only being shown on the primary
monitor, which obviosly allows interactions to happen before the
animations are finished on the secondary monitors.

To fix this, use the size of the whole stage for the cover pane.


(cherry picked from commit 02d06bb1f3)
2018-08-30 02:37:28 +00:00
dca43c7b24 st: Use ClutterClickAction on StEntry primary/secondary icons
This makes them work on touchscreens as well.

Closes: #116


(cherry picked from commit dd59212d3f)
2018-08-19 21:12:22 +00:00
af50a7829f runDialog: Use ClutterText::activate for enter handling
Instead of consuming the event in front of the input method. Enter
is sometimes overriden by those, so it seems better to let the IM
handle the key event, and react later to it if it got propagated
anyway. That is what ::activate does, so use this signal.

This used to work before ClutterInputMethod/InputFocus because the
IM received the events directly from stage captured events. This
is not the case anymore.

Closes: #440


(cherry picked from commit 3ab9e9e8ad)
2018-08-19 21:11:37 +00:00
67cb02d46a Revert "workspaceThumbnail: rebuild thumbnails if workareas size changed"
It is unclear what the change was supposed to be fixing, but it
broke animations of workspace additions and removals, as those
events trigger the ::workareas-changed signal.

This reverts commit c29bd46e7a.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/162
2018-08-19 15:12:28 +02:00
721ce54037 panel: Allow restoring maximized/tiled windows by touch
Maximized and tiled windows can be restored with a drag gesture,
not only from their titlebars, but also from any non-reactive
parts of the top bar above the window. Currently this only works
for actual pointer devices, extend the behavior to handle touch
as well.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/112


(cherry picked from commit 905801b178)
2018-07-31 00:17:49 +00:00
445eed40a7 popupMenu: Don't handle key presses directly if there are modifiers
Key events involved in a keyboard shortcut are not completely consumed by
Mutter. That means that if the popupMenu is bound to a shortcut (e.g.
Alt<Space>) and the user keeps the keys pressed, the same key-event will be
delivered to the popupMenu. We can workaround this issue filtering out all the
events where a a modifier is down (except capslock).

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/372


(cherry picked from commit 2e90c5fa4b)
2018-07-31 00:14:53 +00:00
fddd122956 gdm, util: Always allow to retry login in unlock mode
When in lockscreen mode there's no point of resetting the auth login as there's
no welcome screen, and that would just cause the UI to freeze, with no reason.
This could have been useful if we were stopping the user to login for a given
time after ALLOWED_FAILURES attempts, but this is not the case yet.


(cherry picked from commit cf69fe4b18)
2018-07-25 20:38:58 +00:00
df1b46eee2 authPrompt: Do not enable sensitivity if retries are disallowed
Set the sensitivity of the UI according to the canRetry parameter and thus
if no more logins are allowed don't take any input.

Fixes #311


(cherry picked from commit 8f848925f6)
2018-07-25 20:37:42 +00:00
bf318df7f3 authPrompt: Unset preemptiveAnswer on reset
When we get a reset signal the preemptiveAnswer should be also unset or it will
be used next time the user authPrompt will be activated, even without any further
user interaction.

Fixes #311


(cherry picked from commit d21657fe61)
2018-07-25 20:37:20 +00:00
2a2f3c981e workspaceThumbnail: Sync clone position changes with actor
We need to update the clone position if window actor (not the meta window)
position changed.

https://bugzilla.gnome.org/show_bug.cgi?id=776588
2018-07-24 13:11:39 +02:00
8e5eab0498 workspace: Recompute bounding box on window 'position-changed'
We need to update the clone position if window size changed
also, rename meta window 'size-changed' callback accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=792681
2018-07-24 13:11:39 +02:00
6ed21e1ce0 Bump version to 3.28.3
Update NEWS.
2018-07-18 22:53:05 +02:00
9c51c87d8c events: Re-use event messages where possible
Destroying and recreating the entire events list on every change is not only
wasteful, it also breaks the clear functionality as messages scheduled for
removal are replaced with "new" messages after the first message has been
removed.

Address both issues by keeping track of all messages and re-use them
whenever possible.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/325
2018-07-13 23:03:42 +02:00
db2245d60b workspaceThumbnail: Don't keep stale clones in list
If a clone gets destroyed before the corresponding MetaWindow is
removed from the workspace, we will still find it in the list of
clones and try to destroy it again. Avoid the resulting warnings
by updating the list of clones immediately when a clone is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
2018-07-13 15:11:43 +02:00
f26cc3ac23 workspace: Don't keep stale clones in list
If a clone gets destroyed before the corresponding MetaWindow is
removed from the workspace, we will still find it in the list of
clones and try to destroy it again. Avoid the resulting warnings
by updating the list of clones immediately when a clone is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=791233
2018-07-13 15:11:43 +02:00
02c5b4b947 workspaceThumbnail: remove unused private win reference 2018-07-13 15:11:43 +02:00
df57829ea1 keyboard: Implement standalone FocusTracker
And stop using FocusCaretTracker for caret position purposes. This
new object uses 1) the text-input protocol in wayland and 2) Info
from IBusPanelService for X11 (which is meant to work for XIM too).

This drops the usage of AtspiEventListener for OSK purposes, which
is best to avoid.
2018-07-11 18:52:27 +02:00
da96408098 ui: Theme lookup should respect XDG_DATA_DIRS
Modes, extensions and other GNOME Shell assets are searched in appropriate
subdirectories of each directory in XDG_DATA_DIRS, falling back
to global.datadir.
However, this isn't the case for themes, which are currently always expected
in global.datadir, even when referenced by a mode in a different XDG_DATA_DIR.

The fix is to have the theme finding pattern follow the same logic as other
elements.
Fixes #167.


(cherry picked from commit d6d09fd3c8)
2018-06-20 23:24:07 +00:00
4b2e0247af st-texture-cache: Save cairo surfaces to a different map
The default keyed_surface is meant to handle CoglTextures thus we can't
add cairo surfaces to it, as the DestroyNotify function won't handle them.

Then the quicker way is to just add another Hash table for handling
such types of textures, with proper destroy function.


(cherry picked from commit 1f03599d1c)
2018-06-20 23:00:20 +00:00
2c617e5a3a st-texture-cache: Don't add NULL textures to cache
This might cause a crash when cleaning up the cache as the hash table has
cogl_object_unref as DestroyNotify function but that assumes that
the passed object is a valid CoglObject.

Fixes: #210


(cherry picked from commit a24999b7a3)
2018-06-20 22:59:29 +00:00
4ff7e84c51 Change "const" to "var"
These variables are in fact used from other modules, so gjs complains about them
being const.


(cherry picked from commit 8237a1f6e0)
2018-06-20 22:30:17 +00:00
9f76b6e4a2 magnifier.js: Fix zoom juddering
Make Zoom respond to the mouse silky-smoothly.

It was previously hard-coded to: 1000/50 = 20 FPS.

https://bugzilla.gnome.org/show_bug.cgi?id=682013
https://launchpad.net/bugs/1691675


(cherry picked from commit 94101e8bb8)
2018-06-07 08:42:32 +00:00
0ac0f7e85b Update Scottish Gaelic translation 2018-06-01 10:36:10 +00:00
73b00ff1a7 st-label: Unset clutter text instance on disposal
The instance is owned by the actor (being its child), and thus when the
disposal happens for the parent the text is disposed too, thus it's just
safer to nullify its reference so that we won't try to access to invalid
objects later, and this might be the case since the JS objects could be kept
around until they aren't finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=788931


(cherry picked from commit 44894262f4)
2018-05-29 09:57:50 +00:00
a52597ac5b Update Afrikaans translation 2018-05-19 20:59:51 +00:00
9a2597f80b network: Update the icon in the panel whenever NM's state changes
Similar to what it's done when the main connection changes, we need
to make sure that the icon in the panel gets updated before calling
_syncConnectivity(), so that the icon gets always updated if needed,
regardless of whether there's an active connection or not.

This is needed because there's at least one case when an icon should
be shown when the computer is not connected to any network: when a
hotspot has been enabled, which can be useful even if there's not
an internet connection to share (e.g. to easily allow connecting
other devices to the computer.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/214


(cherry picked from commit d8b9e23502)
2018-05-17 20:28:26 +00:00
e1ed4b25e1 networkAgent: Fix fallout from libnm port
While the libnm-glib version of the function returns a GByteArray*
that gjs can directly cast to the required gutf8*, the libnm function
returns GBytes* from which we need to explicitly fetch the data.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/136


(cherry picked from commit c0a453f64f)
2018-05-09 14:53:15 +00:00
c70b18764b Bump version to 3.28.2
Update NEWS.
2018-05-08 22:18:02 +02:00
4398516520 build: Include Cally in St introspection
CallyActor is exposed indirectly via StAccessible's parent type,
so add the dependency to shut up a gjs warning.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2018-05-08 22:02:11 +02:00
220514d10e remoteSearch: Actually return icons
Since commit 3b1330880f, a remote search result's createIcon() method
no longer returns the created icon, whoops ...

https://gitlab.gnome.org/GNOME/gnome-shell/issues/249
2018-05-08 22:02:11 +02:00
18312d9ccd osdWindow: Fix blurriness at certain resolutions
The y position wasn't rounded, leading to some blurriness at vertical
resolutions that aren't a multiple of 4 (e.g. 1050).

https://bugzilla.gnome.org/show_bug.cgi?id=782011
2018-05-08 22:02:11 +02:00
234b1441e4 keyboardManager: take group index into account when preserving keymap
commit 642107a2 attempts to avoid resetting the current keymap on
spurious input source changes.

It does this by checking if the current layout id is found in
the new list of layouts and resetting the current layout to the
associated match in the list. By not nullifying the current
layout, it won't get subsequently reset.

Unfortunately, if the order of the list changes, resetting the
current keymap is still necessary, since the order corresponds
with the index of the activated group.

This commit changes the code to nullify the current layout if
its group index changes.

https://bugzilla.redhat.com/show_bug.cgi?id=1573923
2018-05-08 13:56:55 -04:00
e909db5848 Update Brazilian Portuguese translation 2018-05-02 18:46:32 +00:00
702338bc7d keyboardManager: Preserve current keymap across reloads
The IM can pretty much update the input sources anytime (even if
to set the same ones). That ends up triggering rebuilding all user
defined keymaps, and losing modifier state if we are unfortunate
enough that this caught us while pressing one.

One common situation seems to be password entries, resulting in
the wrong character being printed if the first character happens
to require the shift key.

If the current keymap is not found in the newly loaded list,
this._current will end up null, with the same behavior as we get
currently (immediate keymap reload).

https://bugzilla.redhat.com/show_bug.cgi?id=1569211

https://gitlab.gnome.org/GNOME/gnome-shell/issues/240

Closes: #240
2018-04-29 17:52:56 +02:00
7c9dbc66d9 polkitAgent: Guard against repeated close() calls
We use the close() method to disconnect signal handlers set up in
init(), however the handler ID is only valid in the first call in
case the method is called more than once.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/221
2018-04-21 22:39:15 +02:00
0d031dc20f Update Russian translation 2018-04-19 20:32:53 +00:00
b476e851b7 workspaceThumbnail: only update _porthole if the overview is visible
Otherwise it happens that porthole is computed again after that the
overlay is hidden (triggered by a layout reallocation) and thus not
regenerated again afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=792687


(cherry picked from commit 5fcf40b973)
2018-04-18 00:35:42 +00:00
a27be6a540 workspaceThumbnail: rebuild thumbnails if workareas size changed
https://bugzilla.gnome.org/show_bug.cgi?id=792687


(cherry picked from commit c29bd46e7a)
2018-04-18 00:34:45 +00:00
4b6a57fabe workspaceThumbnail: initialize porthole based on workArea
https://bugzilla.gnome.org/show_bug.cgi?id=792687


(cherry picked from commit b99e304f1e)
2018-04-18 00:33:39 +00:00
92758890bb popupMenu: Fix wrong call to clutter_actor_add_child()
Specify the horizontal alignment via the x_align property when creating
the StIcon, since this function expects one argument, not two.


(cherry picked from commit cdbc99e992)
2018-04-18 00:32:37 +00:00
143 changed files with 5678 additions and 6444 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "subprojects/gvc"]
path = subprojects/gvc
url = https://git.gnome.org/browse/libgnome-volume-control
url = https://gitlab.gnome.org/GNOME/libgnome-volume-control.git

0
AUTHORS Normal file
View File

View File

@ -1,16 +1,19 @@
# Coding guide
Coding guide
============
Our goal is to have all JavaScript code in GNOME follow a consistent style. In
a dynamic language like JavaScript, it is essential to be rigorous about style
(and unit tests), or you rapidly end up with a spaghetti-code mess.
## A quick note
A quick note
------------
Life isn't fun if you can't break the rules. If a rule seems unnecessarily
restrictive while you're coding, ignore it, and let the patch reviewer decide
what to do.
## Indentation and whitespace
Indentation and whitespace
--------------------------
Use four-space indents. Braces are on the same line as their associated
statements. You should only omit braces if *both* sides of the statement are
@ -19,7 +22,7 @@ on one line.
* One space after the `function` keyword. No space between the function name
* in a declaration or a call. One space before the parens in the `if`
* statements, or `while`, or `for` loops.
```javascript
function foo(a, b) {
let bar;
@ -36,20 +39,22 @@ on one line.
print(20);
}
}
```
## Semicolons
Semicolons
----------
JavaScript allows omitting semicolons at the end of lines, but don't. Always
end statements with a semicolon.
## js2-mode
js2-mode
--------
If using Emacs, do not use js2-mode. It is outdated and hasn't worked for a
while. emacs now has a built-in JavaScript mode, js-mode, based on
espresso-mode. It is the de facto emacs mode for JavaScript.
## File naming and creation
File naming and creation
------------------------
For JavaScript files, use lowerCamelCase-style names, with a `.js` extension.
@ -62,13 +67,14 @@ library name followed by a dash, e.g. `shell-app-system.c`. Create a
`-private.h` header when you want to share code internally in the
library. These headers are not installed, distributed or introspected.
## Imports
Imports
-------
Use UpperCamelCase when importing modules to distinguish them from ordinary
variables, e.g.
```javascript
const GLib = imports.gi.GLib;
```
Imports should be categorized into one of two places. The top-most import block
should contain only "environment imports". These are either modules from
gobject-introspection or modules added by gjs itself.
@ -79,7 +85,7 @@ e.g. `imports.ui.popupMenu`.
Each import block should be sorted alphabetically. Don't import modules you
don't use.
```javascript
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
@ -89,22 +95,23 @@ don't use.
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const Util = imports.misc.util;
```
The alphabetical ordering should be done independently of the location of the
location. Never reference `imports` in actual code.
## Constants
Constants
---------
We use CONSTANTS_CASE to define constants. All constants should be directly
under the imports:
```javascript
const MY_DBUS_INTERFACE = 'org.my.Interface';
```
## Variable declaration
const MY_DBUS_INTERFACE = 'org.my.Interface';
Variable declaration
--------------------
Always use either `const` or `let` when defining a variable.
```javascript
// Iterating over an array
for (let i = 0; i < arr.length; ++i) {
let item = arr[i];
@ -114,17 +121,17 @@ Always use either `const` or `let` when defining a variable.
for (let prop in someobj) {
...
}
```
If you use "var" then the variable is added to function scope, not block scope.
See [What's new in JavaScript 1.7](https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.7#Block_scope_with_let_%28Merge_into_let_Statement%29)
## Classes
Classes
-------
There are many approaches to classes in JavaScript. We use our own class framework
(sigh), which is built in gjs. The advantage is that it supports inheriting from
GObjects, although this feature isn't used very often in the Shell itself.
```javascript
var IconLabelMenuItem = new Lang.Class({
Name: 'IconLabelMenuItem',
Extends: PopupMenu.PopupMenuBaseItem,
@ -139,7 +146,6 @@ GObjects, although this feature isn't used very often in the Shell itself.
log("menu opened!");
}
});
```
* 'Name' is required. 'Extends' is optional. If you leave it out, you will
automatically inherit from Object.
@ -156,12 +162,13 @@ GObjects, although this feature isn't used very often in the Shell itself.
still a giant function call, even though it may resemble a more
conventional syntax.
## GObject Introspection
GObject Introspection
---------------------
GObject Introspection is a powerful feature that allows us to have native
bindings for almost any library built around GObject. If a library requires
you to inherit from a type to use it, you can do so:
```javascript
var MyClutterActor = new Lang.Class({
Name: 'MyClutterActor',
Extends: Clutter.Actor,
@ -181,9 +188,9 @@ you to inherit from a type to use it, you can do so:
alloc.x2, alloc.y2);
}
});
```
## Translatable strings, `environment.js`
Translatable strings, `environment.js`
--------------------------------------
We use gettext to translate the GNOME Shell into all the languages that GNOME
supports. The `gettext` function is aliased globally as `_`, you do not need to
@ -197,7 +204,8 @@ and "double quotes" for strings that the user may see. This allows us to
quickly find untranslated or mistranslated strings by grepping through the
sources for double quotes without a gettext call around them.
## `actor` and `_delegate`
`actor` and `_delegate`
-----------------------
gjs allows us to set so-called "expando properties" on introspected objects,
allowing us to treat them like any other. Because the Shell was built before
@ -206,7 +214,7 @@ that has a property called `actor`. We call this wrapper class the "delegate".
We sometimes use expando properties to set a property called `_delegate` on
the actor itself:
```javascript
var MyClass = new Lang.Class({
Name: 'MyClass',
@ -221,7 +229,6 @@ the actor itself:
actor.set_label("You clicked the button!");
}
});
```
The 'delegate' property is important for anything which trying to get the
delegate object from an associated actor. For instance, the drag and drop
@ -229,14 +236,16 @@ system calls the `handleDragOver` function on the delegate of a "drop target"
when the user drags an item over it. If you do not set the `_delegate`
property, your actor will not be able to be dropped onto.
## Functional style
Functional style
----------------
JavaScript Array objects offer a lot of common functional programming
capabilities such as forEach, map, filter and so on. You can use these when
they make sense, but please don't have a spaghetti mess of function programming
messed in a procedural style. Use your best judgment.
## Closures
Closures
--------
`this` will not be captured in a closure, it is relative to how the closure is
invoked, not to the value of this where the closure is created, because "this"
@ -245,16 +254,15 @@ variable that can be captured in closures.
All closures should be wrapped with Function.prototype.bind or use arrow
notation.
```javascript
const Lang = imports.lang;
let closure1 = () => { this._fnorbate(); };
let closure2 = this._fnorbate.bind(this);
```
A more realistic example would be connecting to a signal on a method of a
prototype:
```javascript
const Lang = imports.lang;
const FnorbLib = imports.fborbLib;
@ -268,21 +276,19 @@ prototype:
this._updateFnorb();
}
});
```
## Object literal syntax
Object literal syntax
---------------------
In JavaScript, these are equivalent:
```javascript
foo = { 'bar': 42 };
foo = { bar: 42 };
```
and so are these:
```javascript
var b = foo['bar'];
var b = foo.bar;
```
If your usage of an object is like an object, then you're defining "member
variables." For member variables, use the no-quotes no-brackets syntax: `{ bar:
@ -292,13 +298,14 @@ If your usage of an object is like a hash table (and thus conceptually the keys
can have special chars in them), don't use quotes, but use brackets: `{ bar: 42
}`, `foo['bar']`.
## Getters, setters, and Tweener
Getters, setters, and Tweener
-----------------------------
Getters and setters should be used when you are dealing with an API that is
designed around setting properties, like Tweener. If you want to animate an
arbitrary property, create a getter and setter, and use Tweener to animate the
property.
```javascript
var ANIMATION_TIME = 2000;
var MyClass = new Lang.Class({
@ -324,4 +331,3 @@ property.
{ position: 100,
time: ANIMATION_TIME,
transition: 'easeOutQuad' });
```

7
MAINTAINERS Normal file
View File

@ -0,0 +1,7 @@
Owen Taylor
E-mail: otaylor@redhat.com
Userid: otaylor
Colin Walters
E-mail: walters@verbum.org
Userid: walters

100
NEWS
View File

@ -1,85 +1,57 @@
3.29.90
=======
* Add remote access indication on wayland [Jonas; !160]
3.28.4
======
* Fix wrong window positions in overview on wayland [Marco; #776588]
* Add gesture to unfullscreen a window [Jan-Michael; !123]
* Add PickColor method to screenshot D-Bus interface [Florian; #286]
* Consider "new-window" action when opening new windows [Florian; #756844]
* Make workspace switching gestures follow motion [Carlos; #788994]
* Support audio volumes above 100% [Didier; #790280]
* Misc. bug fixes [Florian, Daniel; #424, !132, !182, #433, !179, #786496]
* overview: Fix handling of confirmation dialogs on wayland [verdre; !180]
* Avoid some full relayout/redraws [Carlos; !197]
* Keep workspace switcher slid out when workspaces are in use [Florian; !161]
* Cancel search on overview hiding [Marco; !205]
* Fix disappearing network icon [Iain; #140]
* Improve performance of app icon animations [Daniel; !253]
* notifications: Support icon theme names in 'image-path' hint [Marco; !285]
* Avoid focus changes when updating keyboard options [Takao; #391]
* Fix unresponsive-app dialog blocking input in other windows [Florian; #273]
* Fix ellipsization in dialog subtitles/bodies [Marco; !531]
* Misc. bug fixes [Marco, Andrea, Florian, Jasper, Sam, verdre, Jonas,
Cosimo, Carlos; #792681, #372, !112, !162, #414, #663461, #788882, #787260,
!188, #791233, #602, #632, !305, !286, !314, #781, #693, #618, #430, #799,
#783, !293, #298, #1015, #539, #1270]
Contributors:
Jonas Ådahl, Jan-Michael Brummer, Piotr Drąg, Daniel Drake, Carlos Garnacho,
Florian Müllner, Georges Basile Stavracas Neto, Didier Roche, Jakub Steiner,
Marco Trevisan (Treviño)
Jonas Ådahl, Andrea Azzarone, Cosimo Cecchi, Takao Fujiwara, Carlos Garnacho,
Iain Lane, Florian Müllner, Georges Basile Stavracas Neto, Jasper St. Pierre,
Sam Spilsbury, Ray Strode, Will Thompson, Marco Trevisan (Treviño), verdre,
Daniel van Vugt
Translators:
Charles Monzat [fr], Daniel Mustieles [es]
Marek Černocký [cs]
3.29.4
3.28.3
======
* Fix "Clear All" for calendar events [Florian; #325]
* Allow cancelling direct switch operations [Xavier; #315]
* Support being started by systemd --user [Iain; !137, !138]
* Support key event forwarding required by some input methods [Carlos; #275]
* Misc. bug fixes and cleanups [Jasper, Andrea, Florian; #663461, #372, !112,
#414, !151]
Contributors:
Andrea Azzarone, Carlos Garnacho, Xavier Johnson, Iain Lane, Florian Müllner,
Jasper St. Pierre
Translators:
Stas Solovey [ru]
3.29.3
======
* Save creation time in screenshot metadata [Florian; #790481]
* Improve consistency between ctrl- and middle-click on app icons [Xavier; #316]
* Add support for font-feature-settings CSS property [Ryan; #34]
* Adjust to MetaScreen removal [Jonas; #759538]
* Misc. bug fixes [Florian, Marco, Sam; #298, #788931, #26, #76, !54, #788882,
#791233]
Contributors:
Jonas Ådahl, Ryan Hendrickson, Xavier Johnson, Florian Müllner, Joe Rabinoff,
Sam Spilsbury, Marco Trevisan (Treviño)
Translators:
Gun Chleoc [gd], Yi-Jyun Pan [zh_TW], Cédric Valmary [oc], Jordi Mas [ca]
3.29.2
======
* Guard against untimely keyboard map changes [Carlos; #240]
* Fix icons in search provider results [Florian; #249]
* Fix blurriness of OSD under some resolutions [Silvère; #782011]
* Fix lagging pointer when zoomed [Daniel; #682013]
* Misc. bug fixes [Milan, Xiaoguang, Florian, Mario, Ole; #244, #787871,
#781471, #136, #214, #294]
* Fix "Clear All" for calendar events [Florian; #325]
* Misc. bug fixes [Florian, Mario, Marco; #136, #214, #788931, #791233]
Contributors:
Ole Jørgen Brønner, Milan Crha, Carlos Garnacho, Yussuf Khalil,
Silvère Latchurié, Florian Müllner, Mario Sanchez Prada, Ray Strode,
Daniel van Vugt, Xiaoguang Wang
Carlos Garnacho, Florian Müllner, Mario Sanchez Prada, Joe Rabinoff,
Didier Roche, Marco Trevisan (Treviño), Daniel van Vugt
Translators:
Rafael Fontenelle [pt_BR], Kukuh Syafaat [id], Marcos Lans [gl],
Anders Jonsson [sv], Mingcong Bai [zh_CN]
Pieter Schalk Schoeman [af], Gun Chleoc [gd]
3.29.1
3.28.2
======
* Support icons in app-menu [Florian; #760985]
* Misc. bug fixes [Marco, Florian, Lubomir; #792687, #221, !63]
* Fix lock-up on cancelling polkit dialog [Florian; #221]
* Guard against untimely keyboard map changes [Carlos; #240]
* Fix blurriness of OSD under some resolutions [Silvère; #782011]
* Fix icons in search provider results [Florian; #249]
* Misc. bug fixes [Marco, Florian; #792687, #781471]
Contributors:
Piotr Drąg, Takao Fujiwara, Christian Kellner, Florian Müllner,
Mario Sanchez Prada, Lubomir Rintel, Didier Roche, Marco Trevisan (Treviño),
verdre
Carlos Garnacho, Silvère Latchurié, Florian Müllner, Mario Sanchez Prada,
Ray Strode, Marco Trevisan (Treviño)
Translators:
gogo [hr], Stas Solovey [ru], Matej Urbančič [sl], Daniel Șerbănescu [ro],
Fabio Tomat [fur], Marek Cernocky [cs], Daniel Mustieles [es]
Stas Solovey [ru], Rafael Fontenelle [pt_BR]
3.28.1
======

View File

@ -1,4 +1,3 @@
# GNOME Shell
GNOME Shell provides core user interface functions for the GNOME 3 desktop,
like switching to windows and launching applications. GNOME Shell takes
advantage of the capabilities of modern graphics hardware and introduces
@ -7,14 +6,15 @@ easy to use experience.
For more information about GNOME Shell, including instructions on how
to build GNOME Shell from source and how to get involved with the project,
see the [project wiki][wiki]
see:
Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
https://wiki.gnome.org/Projects/GnomeShell
## License
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
product.
License
=======
GNOME Shell is distributed under the terms of the GNU General Public License,
version 2 or later. See the [COPYING][license] file for details.
version 2 or later. See the COPYING file for details.
[project-wiki]: https://wiki.gnome.org/Projects/GnomeShell
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell/issues
[license]: COPYING

View File

@ -4,14 +4,14 @@ the extensions repository to provide good integration, letting the website
know which extensions are enabled and disabled, and allowing the website to
enable, disable and install them.
Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
product.
## License
License
=======
The GNOME Shell Browser Plugin, like GNOME Shell itself is distributed under
the GNU General Public License, version 2 or later. The plugin also contains
header files from the "NPAPI SDK" project, tri-licensed under MPL 1.1, GPL 2.0
and LGPL 2.1. These headers are third-party sources and can be retrieved from:
http://code.google.com/p/npapi-sdk/
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell/issues

View File

@ -24,9 +24,3 @@
/* Define if _NL_TIME_FIRST_WEEKDATE is available */
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
/* Define if you have the `g_desktop_app_info_launch_uris_as_manager_with_fds` function */
#mesondefine HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS
/* Define if fdwalk is available in libc */
#mesondefine HAVE_FDWALK

View File

@ -1,6 +0,0 @@
[org.gnome.mutter:GNOME]
attach-modal-dialogs=true
edge-tiling=true
dynamic-workspaces=true
workspaces-only-on-primary=true
focus-change-on-pointer-rest=true

View File

@ -6,6 +6,7 @@
<file>be.json</file>
<file>bg.json</file>
<file>by.json</file>
<file>ca.json</file>
<file>cz.json</file>
<file>de.json</file>
<file>dk.json</file>

View File

@ -1,5 +0,0 @@
[Desktop Entry]
Type=Application
Name=GNOME settings overrides migration
NoDisplay=true
Exec=@libexecdir@/gnome-shell-overrides-migration.sh

View File

@ -1,5 +0,0 @@
[Unit]
Description=GNOME Shell (wayland sync point)
After=gnome-shell.service
BindsTo=gnome-shell.service
Conflicts=gnome-shell-x11.target

View File

@ -1,5 +0,0 @@
[Unit]
Description=GNOME Shell (x11 sync point)
After=gnome-shell.service
BindsTo=gnome-shell.service
Conflicts=gnome-shell-wayland.target

View File

@ -1,11 +0,0 @@
[Unit]
Description=GNOME Shell
Wants=gnome-session.service
After=graphical-session-pre.target gnome-session-bus.target
PartOf=graphical-session.target
[Service]
Type=dbus
ExecStart=@bindir@/gnome-shell
Restart=on-failure
BusName=org.gnome.Shell

View File

@ -92,33 +92,6 @@ schema = configure_file(
configuration: schemaconf,
install_dir: schemadir
)
install_data('00_org.gnome.shell.gschema.override', install_dir: schemadir)
overrides_migration_conf = configuration_data()
overrides_migration_conf.set('libexecdir', libexecdir)
overrides_migration = configure_file(
input: 'gnome-shell-overrides-migration.desktop.in',
output: 'gnome-shell-overrides-migration.desktop',
configuration: overrides_migration_conf,
install_dir: autostartdir
)
if have_systemd
unitconf = configuration_data()
unitconf.set('bindir', bindir)
unit = configure_file(
input: 'gnome-shell.service.in',
output: 'gnome-shell.service',
configuration: unitconf,
install_dir: systemduserunitdir
)
units = files('gnome-shell-wayland.target',
'gnome-shell-x11.target')
install_data(units, install_dir: systemduserunitdir)
endif
# for unit tests - gnome.compile_schemas() only looks in srcdir
custom_target('compile-schemas',

View File

@ -91,23 +91,6 @@
<arg type="s" direction="out" name="filename_used"/>
</method>
<!--
PickColor:
Picks a color and returns the result.
The @result vardict contains:
<variablelist>
<varlistentry>
<term>color (ddd)</term>
<listitem><para>The color, RGB values in the range [0,1].</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="PickColor">
<arg type="a{sv}" direction="out" name="result"/>
</method>
<!--
FlashArea:
@x: the X coordinate of the area to flash

View File

@ -190,7 +190,6 @@
</key>
</schema>
<!-- unused, change 00_org.gnome.shell.gschema.override instead -->
<schema id="org.gnome.shell.overrides" path="/org/gnome/shell/overrides/"
gettext-domain="@GETTEXT_PACKAGE@">
<key name="attach-modal-dialogs" type="b">

599
data/osk-layouts/ca.json Normal file
View File

@ -0,0 +1,599 @@
{
"levels": [
{
"level": "",
"mode": "default",
"rows": [
[
[
"q"
],
[
"w"
],
[
"e",
"é",
"è",
"ê",
"ë",
"%",
"ę",
"ė",
"ē"
],
[
"r"
],
[
"t"
],
[
"y",
"%",
"ÿ"
],
[
"u",
"ù",
"û",
"%",
"ü",
"ú",
"ū"
],
[
"i",
"î",
"%",
"ï",
"ì",
"í",
"į",
"ī"
],
[
"o",
"ô",
"œ",
"%",
"ö",
"ò",
"ó",
"õ",
"ø",
"ō",
"º"
],
[
"p"
]
],
[
[
"a",
"à",
"â",
"%",
"æ",
"á",
"ä",
"ã",
"å",
"ā",
"ª"
],
[
"s"
],
[
"d"
],
[
"f"
],
[
"g"
],
[
"h"
],
[
"j"
],
[
"k"
],
[
"l"
]
],
[
[
"z"
],
[
"x"
],
[
"c",
"ç",
"ć",
"č"
],
[
"v"
],
[
"b"
],
[
"n"
],
[
"m"
]
],
[
[
","
],
[
" "
],
[
".",
"#",
"!",
",",
"?",
"-",
":",
"'",
"@"
]
]
]
},
{
"level": "shift",
"mode": "latched",
"rows": [
[
[
"Q"
],
[
"W"
],
[
"E",
"É",
"È",
"Ê",
"Ë",
"%",
"Ę",
"Ė",
"Ē"
],
[
"R"
],
[
"T"
],
[
"Y",
"%",
"Ÿ"
],
[
"U",
"Ù",
"Û",
"%",
"Ü",
"Ú",
"Ū"
],
[
"I",
"Î",
"%",
"Ï",
"Ì",
"Í",
"Į",
"Ī"
],
[
"O",
"Ô",
"Œ",
"%",
"Ö",
"Ò",
"Ó",
"Õ",
"Ø",
"Ō",
"º"
],
[
"P"
]
],
[
[
"A",
"À",
"Â",
"%",
"Æ",
"Á",
"Ä",
"Ã",
"Å",
"Ā",
"ª"
],
[
"S"
],
[
"D"
],
[
"F"
],
[
"G"
],
[
"H"
],
[
"J"
],
[
"K"
],
[
"L"
]
],
[
[
"Z"
],
[
"X"
],
[
"C",
"Ç",
"Ć",
"Č"
],
[
"V"
],
[
"B"
],
[
"N"
],
[
"M"
]
],
[
[
","
],
[
" "
],
[
".",
"#",
"!",
",",
"?",
"-",
":",
"'",
"@"
]
]
]
},
{
"level": "opt",
"mode": "locked",
"rows": [
[
[
"1",
"¹",
"½",
"⅓",
"¼",
"⅛"
],
[
"2",
"²",
"⅔"
],
[
"3",
"³",
"¾",
"⅜"
],
[
"4",
"⁴"
],
[
"5",
"⅝"
],
[
"6"
],
[
"7",
"⅞"
],
[
"8"
],
[
"9"
],
[
"0",
"ⁿ",
"∅"
]
],
[
[
"@"
],
[
"#"
],
[
"$",
"¢",
"£",
"€",
"¥",
"₱"
],
[
"%",
"‰"
],
[
"&"
],
[
"-",
"_",
"",
"—",
"·"
],
[
"+",
"±"
],
[
"(",
"<",
"{",
"["
],
[
")",
">",
"}",
"]"
]
],
[
[
"*",
"†",
"‡",
"★"
],
[
"\"",
"“",
"”",
"«",
"»"
],
[
"'",
"",
"",
"",
""
],
[
":"
],
[
";"
],
[
"!",
"¡"
],
[
"?",
"¿"
]
],
[
[
"_"
],
[
"/"
],
[
" "
],
[
","
],
[
".",
"…"
]
]
]
},
{
"level": "opt+shift",
"mode": "locked",
"rows": [
[
[
"~"
],
[
"`"
],
[
"|"
],
[
"•",
"♪",
"♥",
"♠",
"♦",
"♣"
],
[
"√"
],
[
"Π",
"π"
],
[
"÷"
],
[
"×"
],
[
"¶",
"§"
],
[
"∆"
]
],
[
[
"£"
],
[
"¢"
],
[
"€"
],
[
"¥"
],
[
"^",
"↑",
"↓",
"←",
"→"
],
[
"°",
"",
"″"
],
[
"=",
"≠",
"≈",
"∞"
],
[
"{"
],
[
"}"
]
],
[
[
"\\"
],
[
"©"
],
[
"®"
],
[
"™"
],
[
"℅"
],
[
"["
],
[
"]"
]
],
[
[
"<",
"",
"≤",
"«"
],
[
">",
"",
"≥",
"»"
],
[
" "
],
[
","
],
[
".",
"…"
]
]
]
}
],
"locale": "fr-CA",
"name": "French Canada"
}

View File

@ -6,10 +6,20 @@
"rows": [
[
[
"q"
"a",
"à",
"â",
"%",
"æ",
"á",
"ä",
"ã",
"å",
"ā",
"ª"
],
[
"w"
"z"
],
[
"e",
@ -71,17 +81,7 @@
],
[
[
"a",
"à",
"â",
"%",
"æ",
"á",
"ä",
"ã",
"å",
"ā",
"ª"
"q"
],
[
"s"
@ -106,11 +106,14 @@
],
[
"l"
],
[
"m"
]
],
[
[
"z"
"w"
],
[
"x"
@ -131,7 +134,11 @@
"n"
],
[
"m"
"'",
"",
"",
"",
""
]
],
[
@ -161,10 +168,20 @@
"rows": [
[
[
"Q"
"A",
"À",
"Â",
"%",
"Æ",
"Á",
"Ä",
"Ã",
"Å",
"Ā",
"ª"
],
[
"W"
"Z"
],
[
"E",
@ -226,17 +243,7 @@
],
[
[
"A",
"À",
"Â",
"%",
"Æ",
"Á",
"Ä",
"Ã",
"Å",
"Ā",
"ª"
"Q"
],
[
"S"
@ -261,11 +268,14 @@
],
[
"L"
],
[
"M"
]
],
[
[
"Z"
"W"
],
[
"X"
@ -286,7 +296,11 @@
"N"
],
[
"M"
"'",
"",
"",
"",
""
]
],
[
@ -369,10 +383,10 @@
"#"
],
[
"$",
"",
"¢",
"£",
"",
"$",
"¥",
"₱"
],
@ -511,13 +525,14 @@
"£"
],
[
"¥"
],
[
"$",
"¢"
],
[
""
],
[
"¥"
"¢"
],
[
"^",
@ -594,6 +609,6 @@
]
}
],
"locale": "fr-CA",
"name": "French Canada"
"locale": "fr",
"name": "French"
}

3
data/theme/HACKING Normal file
View File

@ -0,0 +1,3 @@
To generate the css files, from the project directory:
sass --sourcemap=none --update .

31
data/theme/README Normal file
View File

@ -0,0 +1,31 @@
Summary
-------
* Do not edit the CSS directly, edit the source SCSS files and the CSS files will be generated
automatically when building with meson + ninja and left inside the build directory to be
incorporated into the gresource XML (you'll need to have sassc installed).
How to tweak the theme
----------------------
Adwaita is a complex theme, so to keep it maintainable it's written and processed in SASS, the
generated CSS is then transformed into a gresource file during gtk build and used at runtime in a
non-legible or editable form.
It is very likely your change will happen in the _common.scss file. That's where all the widget
selectors are defined. Here's a rundown of the "supporting" stylesheets, that are unlikely to be the
right place for a drive by stylesheet fix:
_colors.scss - global color definitions. We keep the number of defined colors to a necessary minimum,
most colors are derived from a handful of basics. It is an exact copy of the gtk+
counterpart. Light theme is used for the classic theme and dark is for GNOME3 shell
default.
_drawing.scss - drawing helper mixings/functions to allow easier definition of widget drawing under
specific context. This is why Adwaita isn't 15000 LOC.
_common.scss - actual definitions of style for each widget. This is where you are likely to add/remove
your changes.
You can read about SASS at http://sass-lang.com/documentation/. Once you make your changes to the
_common.scss file, you can run ninja to generate the final CSS files.

View File

@ -1,32 +0,0 @@
## Summary
Do not edit the CSS directly, edit the source SCSS files and the CSS files
will be generated automatically when building with meson + ninja and left
inside the build directory to be incorporated into the gresource XML (you'll
need to have sassc installed).
## How to tweak the theme
Adwaita is a complex theme, so to keep it maintainable it's written and
processed in SASS, the generated CSS is then transformed into a gresource
file during gtk build and used at runtime in a non-legible or editable form.
It is very likely your change will happen in the [_common.scss][common] file.
That's where all the widget selectors are defined. Here's a rundown of
the "supporting" stylesheets, that are unlikely to be the right place
for a drive by stylesheet fix:
| File | Description |
| ------------------------ | ----------------- |
| [_colors.scss][colors] | global color definitions. We keep the number of defined colors to a necessary minimum, most colors are derived from a handful of basics. It is an exact copy of the gtk+ counterpart. Light theme is used for the classic theme and dark is for GNOME3 shell default. |
| [_drawing.scss][drawing] | drawing helper mixings/functions to allow easier definition of widget drawing under specific context. This is why Adwaita isn't 15000 LOC. |
| [_common.scss][common] | actual definitions of style for each widget. This is where you are likely to add/remove your changes. |
You can read about SASS on its [web page][sass-web]. Once you make your
changes to the [_common.scss][common] file, you can run ninja to generate the
final CSS files.
[common]: data/theme/gnome-shell-sass/_common.scss
[colors]: data/theme/gnome-shell-sass/_colors.scss
[drawing]: data/theme/gnome-shell-sass/_drawing.scss
[sass-web]: http://sass-lang.com/documentation/

View File

@ -0,0 +1,6 @@
--- Generating the css file ---
You need sass to generate the css file.
To generate them run from a command line in the project directory:
sass --sourcemap=none --update ./

View File

@ -0,0 +1,7 @@
GNOME Shell Sass is a project intended to allow the sharing of the theme sources in sass between gnome-shell and other projects like gnome-shell-extensions.
License
=======
GNOME Shell Sass is distributed under the terms of the GNU General Public License,
version 2 or later. See the COPYING file for details.

View File

@ -1,16 +0,0 @@
# GNOME Shell Sass
GNOME Shell Sass is a project intended to allow the sharing of the
theme sources in sass between gnome-shell and other projects like
gnome-shell-extensions.
Any changes should be done in the [GNOME Shell subtree][shell-subtree]
and not the stand-alone [gnome-shell-sass repository][sass-repo]. They
will then be synchronized periodically before releases.
## License
GNOME Shell Sass is distributed under the terms of the GNU General Public
License, version 2 or later. See the [COPYING][license] file for details.
[shell-subtree]: https://gitlab.gnome.org/GNOME/gnome-shell/tree/master/data/theme/gnome-shell-sass
[sass-repo]: https://gitlab.gnome.org/GNOME/gnome-shell-sass
[license]: COPYING

View File

@ -128,15 +128,12 @@ StScrollBar {
.slider {
height: 1em;
-barlevel-height: 0.3em;
-barlevel-background-color: $insensitive_bg_color; //background of the trough
-barlevel-border-color: $borders_color; //trough border color
-barlevel-active-background-color: $selected_bg_color; //active trough fill
-barlevel-active-border-color: darken($selected_bg_color,10%); //active trough border
-barlevel-overdrive-color: $destructive_color;
-barlevel-overdrive-border-color: darken($destructive_color,10%);
-barlevel-overdrive-separator-width: 0.2em;
-barlevel-border-width: 1px;
-slider-height: 0.3em;
-slider-background-color: $insensitive_bg_color; //background of the trough
-slider-border-color: $borders_color; //trough border color
-slider-active-background-color: $selected_bg_color; //active trough fill
-slider-active-border-color: darken($selected_bg_color,10%); //active trough border
-slider-border-width: 1px;
-slider-handle-radius: 6px;
}
@ -588,11 +585,13 @@ StScrollBar {
.osd-monitor-label { font-size: 3em; }
.level {
height: 0.6em;
-barlevel-height: 0.6em;
-barlevel-background-color: transparentize(darken($osd_bg_color,15%),0.5);
-barlevel-active-background-color: $osd_fg_color;
-barlevel-overdrive-color: $destructive_color;
-barlevel-overdrive-separator-width: 0.2em;
border-radius: 0.3em;
background-color: transparentize(darken($osd_bg_color,15%),0.5);
color: $osd_fg_color;
}
.level-bar {
background-color: $osd_fg_color;
border-radius: 0.3em;
}
}
@ -734,7 +733,6 @@ StScrollBar {
transition-duration: 500ms;
font-weight: bold;
height: 1.86em;
font-feature-settings: "tnum";
&.unlock-screen,
&.login-screen,
@ -826,8 +824,6 @@ StScrollBar {
.screencast-indicator { color: $warning_color; }
.remote-access-indicator { color: $warning_color; }
&.solid {
background-color: black;
/* transition from transparent to solid */
@ -962,7 +958,6 @@ StScrollBar {
padding: 0.1em;
margin: 2px;
border-radius: 1.4em;
font-feature-settings: "tnum";
&:hover,&:focus { background-color: lighten($bg_color,5%); }
&:active,&:selected {
color: lighten($selected_fg_color,5%);
@ -1125,7 +1120,6 @@ StScrollBar {
}
.system-menu-action {
-st-icon-style: symbolic;
color: $fg_color;
border-radius: 32px; /* wish we could do 50% */
padding: 13px;
@ -1794,19 +1788,20 @@ StScrollBar {
.login-dialog-user-list-view { -st-vfade-offset: 1em; }
.login-dialog-user-list {
spacing: 12px;
padding: .2em;
width: 23em;
&:expanded .login-dialog-user-list-item:selected { background-color: $selected_bg_color; color: $selected_fg_color; }
&:expanded .login-dialog-user-list-item:logged-in { border-right: 2px solid $selected_bg_color; }
}
.login-dialog-user-list-item {
border-radius: 5px;
padding: 6px;
padding: .2em;
color: darken($osd_fg_color,30%);
&:ltr .user-widget { padding-right: 1em; }
&:rtl .user-widget { padding-left: 1em; }
&:ltr { padding-right: 1em; }
&:rtl { padding-left: 1em; }
.login-dialog-timed-login-indicator {
height: 2px;
margin-top: 6px;
margin: 2px 0 0 0;
background-color: $osd_fg_color;
}
&:focus .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
@ -1821,8 +1816,8 @@ StScrollBar {
padding-left: 15px;
}
.user-widget-label {
&:ltr { padding-left: 14px; }
&:rtl { padding-right: 14px; }
&:ltr { padding-left: 18px; }
&:rtl { padding-right: 18px; }
}
.login-dialog-prompt-layout {
@ -1873,7 +1868,6 @@ StScrollBar {
.screen-shield-clock-time {
font-size: 72pt;
text-shadow: 0px 2px 2px rgba(0,0,0,0.4);
font-feature-settings: "tnum";
}
.screen-shield-clock-date {

View File

@ -14,7 +14,7 @@
id="svg7384"
height="32"
sodipodi:docname="key-layout.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
@ -24,21 +24,17 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3440"
inkscape:window-height="1376"
inkscape:window-width="1919"
inkscape:window-height="1011"
id="namedview19"
showgrid="false"
inkscape:zoom="1"
inkscape:cx="46.246852"
inkscape:cy="17.474578"
inkscape:zoom="14.75"
inkscape:cx="1.220339"
inkscape:cy="11.842802"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg7384">
<inkscape:grid
type="xygrid"
id="grid861" />
</sodipodi:namedview>
inkscape:window-y="55"
inkscape:window-maximized="0"
inkscape:current-layer="svg7384" />
<metadata
id="metadata90">
<rdf:RDF>
@ -96,34 +92,23 @@
style="display:inline"
id="g4953" />
<g
style="stroke-width:0.5;enable-background:new"
id="g3561"
inkscape:label="preferences-desktop-locale"
transform="matrix(2,0,0,2,135.99464,-895.9793)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3535"
d="m -65,450 v 12"
style="fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:#e5e5e5;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path3537"
d="m -65,456 h 4 l 1,2 h 5 v -6 h -4 l -1,-2 h -5 z"
style="fill:none;fill-rule:evenodd;stroke:#e5e5e5;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="opacity:1;vector-effect:none;fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m -65,456 h 4 l 1,2 h 5 v -6 h -4 l -1,-2 h -5 z"
id="path3539"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" />
id="g11728"
transform="matrix(2,0,0,2,-522.0004,-1086)"
style="display:inline;stroke-width:1">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:0.89050001;marker:none;enable-background:new"
id="rect3543"
y="448"
x="-68"
style="fill:none;stroke:none;stroke-width:1"
id="rect11724"
width="16"
height="16"
width="16" />
x="20"
y="326"
transform="translate(241.0002,217)" />
<path
style="fill:#e5e5e5;fill-opacity:1;stroke:none;stroke-width:1"
d="m 265.69612,545.23396 c -3.58218,0 -4.66582,1.39975 -4.66582,1.39975 v 10.04946 c 0,0 1.08364,-1.07673 4.66582,-1.07673 2.9161,0 4.47225,1.07673 7.17818,1.07673 2.08923,0 3.19429,-1.39975 3.19429,-1.39975 v -10.04946 c 0,0 -1.14095,1.04084 -3.23018,1.04084 -3.3734,0 -3.97619,-1.04084 -7.14229,-1.04084 z m 2.93145,2.77148 c 1.32876,0 2.375,1.08037 2.375,2.4375 0,1.35713 -1.04624,2.46875 -2.375,2.46875 -1.32876,0 -2.40625,-1.11162 -2.40625,-2.46875 0,-1.35713 1.07749,-2.4375 2.40625,-2.4375 z m -4.5625,0.96875 0.96875,1.03125 -0.9375,-0.0312 0.9375,1 -0.96875,-0.0312 0.96875,1.03125 -1,-0.0312 0.0312,-1 h -0.0312 l 0.0312,-0.9688 h -0.0312 z m 4.5625,0 c -0.794,0 -1.46875,0.6578 -1.46875,1.46875 0,0.81095 0.67475,1.46875 1.46875,1.46875 0.79399,0 1.4375,-0.6578 1.4375,-1.46875 0,-0.81095 -0.64351,-1.46875 -1.4375,-1.46875 z m 4.375,0 v 1 l 0.0312,0.96875 h -0.0312 l 0.0312,1 -1,0.0312 0.96875,-1.03125 -0.96875,0.0312 0.9375,-1 -0.9375,0.0312 z m -7.9375,2.96875 0.96875,1.03125 -1,-0.0312 z m 6.9375,0 0.0312,1 -1,0.0312 z m -5.9375,1 0.96875,1.03125 -1,-0.0312 z m 4.9375,0 0.0312,1 -1,0.0312 z"
id="path11726"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sccssccsssssssccccccccccccsssssccccccccccccccccccccccccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -13,102 +13,10 @@
height="64px"
id="svg3393"
version="1.1"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="no-notifications.svg">
inkscape:version="0.48.5 r10040"
sodipodi:docname="New document 2">
<defs
id="defs3395">
<clipPath
id="clipPath6262-0"
clipPathUnits="userSpaceOnUse">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
id="rect6264-6"
width="3.8250003"
height="6.3750005"
x="26.849981"
y="220.75" />
</clipPath>
<clipPath
id="clipPath6258-0"
clipPathUnits="userSpaceOnUse">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
id="rect6260-6"
width="2.8977275"
height="5.3129687"
x="26.965673"
y="221.28162" />
</clipPath>
<clipPath
id="clipPath6254-6"
clipPathUnits="userSpaceOnUse">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none"
id="rect6256-6"
width="1.876245"
height="4.8783236"
x="26.998718"
y="221.50153" />
</clipPath>
<clipPath
id="clipPath8028-3"
clipPathUnits="userSpaceOnUse">
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -73,-30 -7,-7 v -4.5 h 16.5 v 4.5 l -7.5,7 z"
id="path8030-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath6810-7-87-7">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none"
id="rect6812-2-4-5"
width="14"
height="11"
x="21"
y="281" />
</clipPath>
<clipPath
id="clipPath6262"
clipPathUnits="userSpaceOnUse">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
id="rect6264"
width="3.8250003"
height="6.3750005"
x="26.849981"
y="220.75" />
</clipPath>
<clipPath
id="clipPath6258"
clipPathUnits="userSpaceOnUse">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none"
id="rect6260"
width="2.8977275"
height="5.3129687"
x="26.965673"
y="221.28162" />
</clipPath>
<clipPath
id="clipPath6254"
clipPathUnits="userSpaceOnUse">
<rect
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;marker:none"
id="rect6256"
width="1.876245"
height="4.8783236"
x="26.998718"
y="221.50153" />
</clipPath>
<inkscape:path-effect
effect="spiro"
id="path-effect3951"
is_visible="true" />
</defs>
id="defs3395" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
@ -116,17 +24,17 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="125.08157"
inkscape:cy="-13.805087"
inkscape:zoom="5.5"
inkscape:cx="32"
inkscape:cy="32"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1664"
inkscape:window-height="1034"
inkscape:window-x="1479"
inkscape:window-y="252"
inkscape:window-width="697"
inkscape:window-height="613"
inkscape:window-x="100"
inkscape:window-y="77"
inkscape:window-maximized="0" />
<metadata
id="metadata3398">
@ -146,7 +54,7 @@
inkscape:groupmode="layer">
<g
style="display:inline"
transform="matrix(4,0,0,4,-79.702662,-0.35415646)"
transform="matrix(4,0,0,4,0.29733827,-0.35415646)"
id="g19245">
<g
id="g19247"
@ -163,15 +71,15 @@
transform="translate(-323.02908,-649.02581)">
<path
inkscape:connector-curvature="0"
d="m 331.9377,653 c 0.0187,0.16677 0.0625,0.32822 0.0625,0.5 0,2.48528 -2.01472,4.5 -4.5,4.5 -0.11769,0 -0.22834,-0.0224 -0.34375,-0.0312 v 2.21875 c 0,1.00412 0.80838,1.8125 1.8125,1.8125 l 1.54511,-5e-5 2,2.04688 2.0625,-2.04688 h 1.61114 c 1.00413,0 1.8125,-0.80838 1.8125,-1.8125 v -5.375 c 0,-1.00412 -0.80837,-1.8125 -1.8125,-1.8125 z"
d="m 331.9377,653 c 0.0187,0.16677 0.0625,0.32822 0.0625,0.5 0,2.48528 -2.01472,4.5 -4.5,4.5 -0.11769,0 -0.22834,-0.0224 -0.34375,-0.0312 l 0,2.21875 c 0,1.00412 0.80838,1.8125 1.8125,1.8125 l 1.54511,-5e-5 2,2.04688 2.0625,-2.04688 1.61114,0 c 1.00413,0 1.8125,-0.80838 1.8125,-1.8125 l 0,-5.375 c 0,-1.00412 -0.80837,-1.8125 -1.8125,-1.8125 z"
id="path19253"
sodipodi:nodetypes="csscsscccssssc"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#c3c3c3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;enable-background:accumulate" />
style="opacity:0.5;color:#000000;fill:#c3c3c3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
d="m 327.5002,650 c -1.933,0 -3.5,1.567 -3.5,3.5 0,1.933 1.567,3.5 3.5,3.5 1.933,0 3.5,-1.567 3.5,-3.5 0,-1.933 -1.567,-3.5 -3.5,-3.5 z m -0.53125,1 h 1.03125 l -0.0625,1.375 a 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.125,0.125 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 l 1.15625,-0.75 0.5,0.90625 -1.21875,0.625 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0.0937 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0625 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0312 l 1.25,0.625 -0.53125,0.90625 -1.15625,-0.781 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,0 0.19951718,0.19951718 0 0 0 -0.125,0.0937 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0,0.0625 L 328.0002,656 h -1.03125 l 0.0937,-1.375 a 0.19951718,0.19951718 0 0 0 -0.0312,-0.0937 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0937,0.0312 l -1.1875,0.78125 -0.5,-0.90625 1.25,-0.625 a 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0312,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 l -1.25,-0.625 0.5,-0.90625 1.1875,0.75 a 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 z"
d="m 327.5002,650 c -1.933,0 -3.5,1.567 -3.5,3.5 0,1.933 1.567,3.5 3.5,3.5 1.933,0 3.5,-1.567 3.5,-3.5 0,-1.933 -1.567,-3.5 -3.5,-3.5 z m -0.53125,1 1.03125,0 -0.0625,1.375 a 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.125,0.125 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 l 1.15625,-0.75 0.5,0.90625 -1.21875,0.625 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0.0937 0.19951718,0.19951718 0 0 0 0,0.0625 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0625 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0312,0.0312 l 1.25,0.625 -0.53125,0.90625 -1.15625,-0.781 a 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,0 0.19951718,0.19951718 0 0 0 -0.125,0.0937 0.19951718,0.19951718 0 0 0 -0.0312,0.0312 0.19951718,0.19951718 0 0 0 0,0.0312 0.19951718,0.19951718 0 0 0 0,0.0625 l 0.0625,1.3751 -1.03125,0 0.0937,-1.375 a 0.19951718,0.19951718 0 0 0 -0.0312,-0.0937 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0625,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 0.19951718,0.19951718 0 0 0 -0.0937,0.0312 l -1.1875,0.78125 -0.5,-0.90625 1.25,-0.625 a 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,-0.0625 0.19951718,0.19951718 0 0 0 -0.0312,-0.0312 0.19951718,0.19951718 0 0 0 -0.0312,0 l -1.25,-0.625 0.5,-0.90625 1.1875,0.75 a 0.19951718,0.19951718 0 0 0 0.0312,0.0312 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0625,0 0.19951718,0.19951718 0 0 0 0.0312,0 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0312 0.19951718,0.19951718 0 0 0 0,-0.0312 0.19951718,0.19951718 0 0 0 0.0312,-0.0625 0.19951718,0.19951718 0 0 0 0,-0.0312 L 326.96895,651 z"
id="path19255"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;enable-background:accumulate" />
style="color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
<g
id="g19257"
@ -202,22 +110,5 @@
style="display:inline"
transform="translate(-323.02908,-649.02581)" />
</g>
<g
style="opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:new"
inkscape:label="preferences-system-notifications"
id="g13967"
transform="matrix(4,0,0,4,-1044.0008,-2172)">
<path
inkscape:connector-curvature="0"
d="m 268.94244,544.94838 c -2.20914,0 -3.33013,1.5 -4,4 l -1,5 c -0.10831,0.54156 -0.44772,1 -1,1 v 1 h 12 v -1 c -0.55229,0 -0.89169,-0.45844 -1,-1 l -1,-5 c -0.53033,-2.5 -1.79086,-4 -4,-4 z"
id="path40220"
sodipodi:nodetypes="ccsccccscc"
style="opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal" />
<path
inkscape:connector-curvature="0"
d="m 269.11822,556.94838 a 1.5,1.5 0 0 0 1.41211,1 1.5,1.5 0 0 0 1.41211,-1 z"
id="path40774"
style="opacity:1;vector-effect:none;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -25,6 +25,7 @@ const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Pango = imports.gi.Pango;
const Shell = imports.gi.Shell;
@ -85,8 +86,7 @@ var UserListItem = new Lang.Class({
GObject.BindingFlags.SYNC_CREATE);
this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
scale_x: 0,
visible: false });
scale_x: 0 });
layout.add(this._timedLoginIndicator);
this.actor.connect('clicked', this._onClicked.bind(this));
@ -126,8 +126,6 @@ var UserListItem = new Lang.Class({
this.hideTimedLoginIndicator();
this._timedLoginIndicator.visible = true;
let startTime = GLib.get_monotonic_time();
this._timedLoginTimeoutId = GLib.timeout_add (GLib.PRIORITY_DEFAULT, 33,
@ -154,8 +152,6 @@ var UserListItem = new Lang.Class({
GLib.source_remove(this._timedLoginTimeoutId);
this._timedLoginTimeoutId = 0;
}
this._timedLoginIndicator.visible = false;
this._timedLoginIndicator.scale_x = 0.;
}
});
@ -995,81 +991,59 @@ var LoginDialog = new Lang.Class({
return hold;
},
_showTimedLoginAnimation() {
this._timedLoginItem.actor.grab_key_focus();
return this._timedLoginItem.showTimedLoginIndicator(this._timedLoginAnimationTime);
},
_blockTimedLoginUntilIdle() {
// This blocks timed login from starting until a few
// seconds after the user stops interacting with the
// login screen.
//
// We skip this step if the timed login delay is very
// short.
if ((this._timedLoginDelay - _TIMED_LOGIN_IDLE_THRESHOLD) <= 0)
return null;
let hold = new Batch.Hold();
this._timedLoginIdleTimeOutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, _TIMED_LOGIN_IDLE_THRESHOLD,
this._timedLoginIdleTimeOutId = Mainloop.timeout_add_seconds(_TIMED_LOGIN_IDLE_THRESHOLD,
() => {
this._timedLoginIdleTimeOutId = 0;
this._timedLoginAnimationTime -= _TIMED_LOGIN_IDLE_THRESHOLD;
hold.release();
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._timedLoginIdleTimeOutId, '[gnome-shell] this._timedLoginIdleTimeOutId');
GLib.Source.set_name_by_id(this._timedLoginIdleTimeOutId, '[gnome-shell] this._timedLoginAnimationTime');
return hold;
},
_startTimedLogin(userName, delay) {
let firstRun = true;
// Cancel execution of old batch
if (this._timedLoginBatch) {
this._timedLoginBatch.cancel();
this._timedLoginBatch = null;
firstRun = false;
}
// Reset previous idle-timeout
if (this._timedLoginIdleTimeOutId) {
GLib.source_remove(this._timedLoginIdleTimeOutId);
this._timedLoginIdleTimeOutId = 0;
}
let loginItem = null;
let animationTime;
this._timedLoginItem = null;
this._timedLoginDelay = delay;
this._timedLoginAnimationTime = delay;
let tasks = [() => this._waitForItemForUser(userName),
() => {
loginItem = this._userList.getItemFromUserName(userName);
// If there is an animation running on the item, reset it.
loginItem.hideTimedLoginIndicator();
this._timedLoginItem = this._userList.getItemFromUserName(userName);
},
() => {
// If we're just starting out, start on the right item.
// If we're just starting out, start on the right
// item.
if (!this._userManager.is_loaded) {
this._userList.jumpToItem(loginItem);
this._userList.jumpToItem(this._timedLoginItem);
}
},
this._blockTimedLoginUntilIdle,
() => {
// This blocks the timed login animation until a few
// seconds after the user stops interacting with the
// login screen.
// We skip this step if the timed login delay is very short.
if (delay > _TIMED_LOGIN_IDLE_THRESHOLD) {
animationTime = delay - _TIMED_LOGIN_IDLE_THRESHOLD;
return this._blockTimedLoginUntilIdle();
} else {
animationTime = delay;
}
this._userList.scrollToItem(this._timedLoginItem);
},
() => {
// If idle timeout is done, make sure the timed login indicator is shown
if (delay > _TIMED_LOGIN_IDLE_THRESHOLD &&
this._authPrompt.actor.visible)
this._authPrompt.cancel();
if (delay > _TIMED_LOGIN_IDLE_THRESHOLD || firstRun) {
this._userList.scrollToItem(loginItem);
loginItem.actor.grab_key_focus();
}
},
() => loginItem.showTimedLoginIndicator(animationTime),
this._showTimedLoginAnimation,
() => {
this._timedLoginBatch = null;
@ -1081,17 +1055,37 @@ var LoginDialog = new Lang.Class({
return this._timedLoginBatch.run();
},
_onTimedLoginRequested(client, userName, seconds) {
if (this._timedLoginBatch)
return;
_resetTimedLogin() {
if (this._timedLoginBatch) {
this._timedLoginBatch.cancel();
this._timedLoginBatch = null;
}
if (this._timedLoginItem)
this._timedLoginItem.hideTimedLoginIndicator();
let userName = this._timedLoginItem.user.get_user_name();
if (userName)
this._startTimedLogin(userName, this._timedLoginDelay);
},
_onTimedLoginRequested(client, userName, seconds) {
this._startTimedLogin(userName, seconds);
// Restart timed login on user interaction
global.stage.connect('captured-event', (actor, event) => {
if (this._timedLoginDelay == undefined)
return Clutter.EVENT_PROPAGATE;
if (event.type() == Clutter.EventType.KEY_PRESS ||
event.type() == Clutter.EventType.BUTTON_PRESS) {
this._startTimedLogin(userName, seconds);
if (this._timedLoginBatch) {
this._timedLoginBatch.cancel();
this._timedLoginBatch = null;
}
} else if (event.type() == Clutter.EventType.KEY_RELEASE ||
event.type() == Clutter.EventType.BUTTON_RELEASE) {
this._resetTimedLogin();
}
return Clutter.EVENT_PROPAGATE;

View File

@ -350,19 +350,16 @@ var ShellUserVerifier = new Lang.Class({
try {
this._clearUserVerifier();
this._userVerifier = client.open_reauthentication_channel_finish(result);
} catch(e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
if (e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
return;
} catch(e if e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
!this._reauthOnly) {
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there
// is no session to reauthenticate. Fall back to performing
// verification from this login session
client.get_user_verifier(this._cancellable,
this._userVerifierGot.bind(this));
return;
}
// Gdm emits org.freedesktop.DBus.Error.AccessDenied when there is
// no session to reauthenticate. Fall back to performing verification
// from this login session
client.get_user_verifier(this._cancellable, this._userVerifierGot.bind(this));
return;
} catch(e) {
this._reportInitError('Failed to open reauthentication channel', e);
return;
}
@ -377,9 +374,9 @@ var ShellUserVerifier = new Lang.Class({
try {
this._clearUserVerifier();
this._userVerifier = client.get_user_verifier_finish(result);
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
return;
} catch(e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
this._reportInitError('Failed to obtain user verifier', e);
return;
}
@ -437,9 +434,9 @@ var ShellUserVerifier = new Lang.Class({
(obj, result) => {
try {
obj.call_begin_verification_for_user_finish(result);
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
return;
} catch(e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
this._reportInitError('Failed to start verification for user', e);
return;
}
@ -452,9 +449,9 @@ var ShellUserVerifier = new Lang.Class({
(obj, result) => {
try {
obj.call_begin_verification_finish(result);
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
return;
} catch(e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
this._reportInitError('Failed to start verification', e);
return;
}

View File

@ -43,7 +43,6 @@
<file>ui/audioDeviceSelection.js</file>
<file>ui/backgroundMenu.js</file>
<file>ui/background.js</file>
<file>ui/barLevel.js</file>
<file>ui/boxpointer.js</file>
<file>ui/calendar.js</file>
<file>ui/checkBox.js</file>
@ -131,7 +130,6 @@
<file>ui/status/rfkill.js</file>
<file>ui/status/volume.js</file>
<file>ui/status/bluetooth.js</file>
<file>ui/status/remoteAccess.js</file>
<file>ui/status/screencast.js</file>
<file>ui/status/system.js</file>
<file>ui/status/thunderbolt.js</file>

View File

@ -112,8 +112,6 @@ function createExtensionObject(uuid, dir, type) {
let metadataContents, success, tag;
try {
[success, metadataContents, tag] = metadataFile.load_contents(null);
if (metadataContents instanceof Uint8Array)
metadataContents = imports.byteArray.toString(metadataContents);
} catch (e) {
throw new Error('Failed to load metadata.json: ' + e);
}

View File

@ -205,7 +205,7 @@ var IBusManager = new Lang.Class({
}
this._ibus.set_global_engine_async(id, this._MAX_INPUT_SOURCE_ACTIVATION_TIME,
null, callback);
null, callback || null);
},
preloadEngines(ids) {

View File

@ -15,8 +15,6 @@ var InputMethod = new Lang.Class({
this._purpose = 0;
this._enabled = true;
this._currentFocus = null;
this._currentEvent = null;
this._doForwardEvent = false;
this._ibus = IBus.Bus.new_async();
this._ibus.connect('connected', this._onConnected.bind(this));
this._ibus.connect('disconnected', this._clear.bind(this));
@ -27,9 +25,6 @@ var InputMethod = new Lang.Class({
this._onSourceChanged.bind(this));
this._currentSource = this._inputSourceManager.currentSource;
let deviceManager = Clutter.DeviceManager.get_default();
this._virtualDevice = deviceManager.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
if (this._ibus.is_connected())
this._onConnected();
},
@ -69,7 +64,6 @@ var InputMethod = new Lang.Class({
this._context.connect('commit-text', this._onCommitText.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('forward-key-event', this._onForwardKeyEvent.bind(this));
this._updateCapabilities();
},
@ -102,24 +96,6 @@ var InputMethod = new Lang.Class({
this.set_preedit_text(str, pos);
},
_onForwardKeyEvent(context, keyval, keycode, state) {
let press = (state & IBus.ModifierType.RELEASE_MASK) == 0;
if (this._currentEvent) {
// If we are handling this same event in filter_key_press(),
// just let it go through, sending the same event again will
// be silenced away because the key counts as pressed.
if (this._currentEvent.get_key_symbol() == keyval &&
(this._currentEvent.type() == Clutter.EventType.KEY_PRESS) == press) {
this._doForwardEvent = true;
return;
}
}
this._virtualDevice.notify_key(Clutter.get_current_event_time(), keycode,
press ? Clutter.KeyState.PRESSED : Clutter.KeyState.RELEASED);
},
vfunc_focus_in(focus) {
this._currentFocus = focus;
if (this._context) {
@ -221,23 +197,13 @@ var InputMethod = new Lang.Class({
if (event.type() == Clutter.EventType.KEY_RELEASE)
state |= IBus.ModifierType.RELEASE_MASK;
this._currentEvent = event;
this._doForwardEvent = false;
this._context.process_key_event_async(event.get_key_symbol(),
event.get_key_code() - 8, // Convert XKB keycodes to evcodes
state, -1, null,
(context, res) => {
try {
let retval = context.process_key_event_async_finish(res);
if (this._doForwardEvent)
retval = false;
this.notify_key_event(event, retval);
this._doForwardEvent = false;
this._currentEvent = null;
} catch (e) {
log('Error processing key on IM: ' + e.message);
}

View File

@ -52,11 +52,20 @@ var KeyboardManager = new Lang.Class({
this._current = null;
this._localeLayoutInfo = this._getLocaleLayout();
this._layoutInfos = {};
this._currentKeymap = null;
},
_applyLayoutGroup(group) {
let options = this._buildOptionsString();
let [layouts, variants] = this._buildGroupStrings(group);
if (this._currentKeymap &&
this._currentKeymap.layouts == layouts &&
this._currentKeymap.variants == variants &&
this._currentKeymap.options == options)
return;
this._currentKeymap = {layouts, variants, options};
Meta.get_backend().set_keymap(layouts, variants, options);
},
@ -89,8 +98,6 @@ var KeyboardManager = new Lang.Class({
},
setUserLayouts(ids) {
let currentId = this._current ? this._current.id : null;
let currentGroupIndex = this._current ? this._current.groupIndex : null;
this._current = null;
this._layoutInfos = {};
@ -117,9 +124,6 @@ var KeyboardManager = new Lang.Class({
info.group = group;
info.groupIndex = groupIndex;
if (currentId == id && currentGroupIndex == groupIndex)
this._current = info;
i += 1;
}
},

View File

@ -40,24 +40,14 @@ const SystemdLoginSessionIface = '<node> \
<signal name="Lock" /> \
<signal name="Unlock" /> \
<property name="Active" type="b" access="read" /> \
<property name="Class" type="s" access="read" /> \
<property name="Id" type="s" access="read" /> \
<method name="SetLockedHint"> \
<arg type="b" direction="in"/> \
</method> \
</interface> \
</node>';
const SystemdLoginUserIface = '<node> \
<interface name="org.freedesktop.login1.User"> \
<property name="Display" type="(so)" access="read" /> \
<property name="Sessions" type="a(so)" access="read" /> \
</interface> \
</node>';
const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface);
const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface);
const SystemdLoginUser = Gio.DBusProxy.makeProxyWrapper(SystemdLoginUserIface);
function haveSystemd() {
return GLib.access("/run/systemd/seats", 0) >= 0;
@ -119,9 +109,6 @@ var LoginManagerSystemd = new Lang.Class({
this._proxy = new SystemdLoginManager(Gio.DBus.system,
'org.freedesktop.login1',
'/org/freedesktop/login1');
this._userProxy = new SystemdLoginUser(Gio.DBus.system,
'org.freedesktop.login1',
'/org/freedesktop/login1/user/self');
this._proxy.connectSignal('PrepareForSleep',
this._prepareForSleep.bind(this));
},
@ -134,31 +121,8 @@ var LoginManagerSystemd = new Lang.Class({
let sessionId = GLib.getenv('XDG_SESSION_ID');
if (!sessionId) {
log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.');
let [session, objectPath] = this._userProxy.Display;
if (session) {
log(`Will monitor session ${session}`);
sessionId = session;
} else {
log('Failed to find "Display" session; are we the greeter?');
for (let [session, objectPath] of this._userProxy.Sessions) {
let sessionProxy = new SystemdLoginSession(Gio.DBus.system,
'org.freedesktop.login1',
objectPath);
log(`Considering ${session}, class=${sessionProxy.Class}`);
if (sessionProxy.Class == 'greeter') {
log(`Yes, will monitor session ${session}`);
sessionId = session;
break;
}
}
if (!sessionId) {
log('No, failed to get session from logind.');
return;
}
}
log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session.');
return;
}
this._proxy.GetSessionRemote(sessionId, (result, error) => {

View File

@ -236,11 +236,12 @@ var ObjectManager = new Lang.Class({
_onNameVanished() {
let objectPaths = Object.keys(this._objects);
for (let i = 0; i < objectPaths.length; i++) {
let object = this._objects[objectPaths];
let objectPath = objectPaths[i];
let object = this._objects[objectPath];
let interfaceNames = Object.keys(object);
for (let j = 0; i < interfaceNames.length; i++) {
let interfaceName = interfaceNames[i];
for (let j = 0; j < interfaceNames.length; j++) {
let interfaceName = interfaceNames[j];
if (object[interfaceName])
this._removeInterface(objectPath, interfaceName);

View File

@ -136,7 +136,8 @@ function run() {
global.frame_finish_timestamp = true;
for (let k = 0; k < 5; k++)
yield Scripting.createTestWindow({ maximized: true });
yield Scripting.createTestWindow(640, 480,
{ maximized: true });
yield Scripting.waitTestWindows();
yield Scripting.sleep(1000);
@ -157,7 +158,8 @@ function run() {
yield Scripting.destroyTestWindows();
Main.overview.hide();
yield Scripting.createTestWindow({ maximized: true,
yield Scripting.createTestWindow(640, 480,
{ maximized: true,
redraws: true});
yield Scripting.waitTestWindows();

View File

@ -502,8 +502,7 @@ var CyclerPopup = new Lang.Class({
_finish() {
let window = this._items[this._selectedIndex];
let ws = window.get_workspace();
let workspaceManager = global.workspace_manager;
let activeWs = workspaceManager.get_active_workspace();
let activeWs = global.screen.get_active_workspace();
if (window.minimized) {
Main.wm.skipNextEffect(window.get_compositor_private());
@ -573,14 +572,7 @@ var WindowSwitcherPopup = new Lang.Class({
},
_getWindowList() {
let workspace = null;
if (this._settings.get_boolean('current-workspace-only')) {
let workspaceManager = global.workspace_manager;
workspace = workspaceManager.get_active_workspace();
}
let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
return getWindows(workspace);
},
@ -628,14 +620,7 @@ var WindowCyclerPopup = new Lang.Class({
},
_getWindows() {
let workspace = null;
if (this._settings.get_boolean('current-workspace-only')) {
let workspaceManager = global.workspace_manager;
workspace = workspaceManager.get_active_workspace();
}
let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
return getWindows(workspace);
},
@ -684,14 +669,8 @@ var AppSwitcher = new Lang.Class({
let windowTracker = Shell.WindowTracker.get_default();
let settings = new Gio.Settings({ schema_id: 'org.gnome.shell.app-switcher' });
let workspace = null;
if (settings.get_boolean('current-workspace-only')) {
let workspaceManager = global.workspace_manager;
workspace = workspaceManager.get_active_workspace();
}
let workspace = settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace()
: null;
let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
// Construct the AppIcons, add to the popup

View File

@ -1778,11 +1778,10 @@ var AppIcon = new Lang.Class({
activate(button) {
let event = Clutter.get_current_event();
let modifiers = event ? event.get_state() : 0;
let isMiddleButton = button && button == Clutter.BUTTON_MIDDLE;
let isCtrlPressed = (modifiers & Clutter.ModifierType.CONTROL_MASK) != 0;
let openNewWindow = this.app.can_open_new_window() &&
this.app.state == Shell.AppState.RUNNING &&
(isCtrlPressed || isMiddleButton);
let openNewWindow = this.app.can_open_new_window () &&
modifiers & Clutter.ModifierType.CONTROL_MASK &&
this.app.state == Shell.AppState.RUNNING ||
button && button == 2;
if (this.app.state == Shell.AppState.STOPPED || openNewWindow)
this.animateLaunch();
@ -1862,8 +1861,7 @@ var AppIconMenu = new Lang.Class({
// Display the app windows menu items and the separator between windows
// of the current desktop and other windows.
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let activeWorkspace = global.screen.get_active_workspace();
let separatorShown = windows.length > 0 && windows[0].get_workspace() != activeWorkspace;
for (let i = 0; i < windows.length; i++) {
@ -1872,9 +1870,7 @@ var AppIconMenu = new Lang.Class({
this._appendSeparator();
separatorShown = true;
}
let title = window.title ? window.title
: this._source.app.get_name();
let item = this._appendMenuItem(title);
let item = this._appendMenuItem(window.title);
item.connect('activate', () => {
this.emit('activate-window', window);
});

View File

@ -240,7 +240,7 @@ var Background = new Lang.Class({
file: null,
style: null });
this.background = new Meta.Background({ meta_display: global.display });
this.background = new Meta.Background({ meta_screen: global.screen });
this.background._delegate = this;
this._settings = params.settings;
@ -499,12 +499,12 @@ var SystemBackground = new Lang.Class({
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png');
if (_systemBackground == null) {
_systemBackground = new Meta.Background({ meta_display: global.display });
_systemBackground = new Meta.Background({ meta_screen: global.screen });
_systemBackground.set_color(DEFAULT_BACKGROUND_COLOR);
_systemBackground.set_file(file, GDesktopEnums.BackgroundStyle.WALLPAPER);
}
this.actor = new Meta.BackgroundActor({ meta_display: global.display,
this.actor = new Meta.BackgroundActor({ meta_screen: global.screen,
monitor: 0,
background: _systemBackground });
@ -538,10 +538,8 @@ var BackgroundSource = new Lang.Class({
this._settings = new Gio.Settings({ schema_id: settingsSchema });
this._backgrounds = [];
let monitorManager = Meta.MonitorManager.get();
this._monitorsChangedId =
monitorManager.connect('monitors-changed',
this._onMonitorsChanged.bind(this));
this._monitorsChangedId = global.screen.connect('monitors-changed',
this._onMonitorsChanged.bind(this));
},
_onMonitorsChanged() {
@ -606,8 +604,7 @@ var BackgroundSource = new Lang.Class({
},
destroy() {
let monitorManager = Meta.MonitorManager.get();
monitorManager.disconnect(this._monitorsChangedId);
global.screen.disconnect(this._monitorsChangedId);
for (let monitorIndex in this._backgrounds) {
let background = this._backgrounds[monitorIndex];
@ -754,7 +751,7 @@ var BackgroundManager = new Lang.Class({
_createBackgroundActor() {
let background = this._backgroundSource.getBackground(this._monitorIndex);
let backgroundActor = new Meta.BackgroundActor({ meta_display: global.display,
let backgroundActor = new Meta.BackgroundActor({ meta_screen: global.screen,
monitor: this._monitorIndex,
background: background.background,
vignette: this._vignette,

View File

@ -1,210 +0,0 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Atk = imports.gi.Atk;
const Cairo = imports.cairo;
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const St = imports.gi.St;
const Signals = imports.signals;
var BarLevel = new Lang.Class({
Name: "BarLevel",
_init(value, params) {
if (isNaN(value))
// Avoid spreading NaNs around
throw TypeError('The bar level value must be a number');
this._maxValue = 1;
this._value = Math.max(Math.min(value, this._maxValue), 0);
this._overdriveStart = 1;
this._barLevelWidth = 0;
if (params == undefined)
params = {}
this.actor = new St.DrawingArea({ styleClass: params['styleClass'] || 'barlevel',
can_focus: params['canFocus'] || false,
reactive: params['reactive'] || false,
accessible_role: params['accessibleRole'] || Atk.Role.LEVEL_BAR });
this.actor.connect('repaint', this._barLevelRepaint.bind(this));
this.actor.connect('allocation-changed', (actor, box) => {
this._barLevelWidth = box.get_width();
});
this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
this.actor.set_accessible(this._customAccessible);
this._customAccessible.connect('get-current-value', this._getCurrentValue.bind(this));
this._customAccessible.connect('get-minimum-value', this._getMinimumValue.bind(this));
this._customAccessible.connect('get-maximum-value', this._getMaximumValue.bind(this));
this._customAccessible.connect('set-current-value', this._setCurrentValue.bind(this));
this.connect('value-changed', this._valueChanged.bind(this));
},
setValue(value) {
if (isNaN(value))
throw TypeError('The bar level value must be a number');
this._value = Math.max(Math.min(value, this._maxValue), 0);
this.actor.queue_repaint();
},
setMaximumValue(value) {
if (isNaN(value))
throw TypeError('The bar level max value must be a number');
this._maxValue = Math.max(value, 1);
this._overdriveStart = Math.min(this._overdriveStart, this._maxValue);
this.actor.queue_repaint();
},
setOverdriveStart(value) {
if (isNaN(value))
throw TypeError('The overdrive limit value must be a number');
if (value > this._maxValue)
throw new Error(`Tried to set overdrive value to ${value}, ` +
`which is a number greater than the maximum allowed value ${this._maxValue}`);
this._overdriveStart = value;
this._value = Math.max(Math.min(value, this._maxValue), 0);
this.actor.queue_repaint();
},
_barLevelRepaint(area) {
let cr = area.get_context();
let themeNode = area.get_theme_node();
let [width, height] = area.get_surface_size();
let barLevelHeight = themeNode.get_length('-barlevel-height');
let barLevelBorderRadius = Math.min(width, barLevelHeight) / 2;
let fgColor = themeNode.get_foreground_color();
let barLevelColor = themeNode.get_color('-barlevel-background-color');
let barLevelActiveColor = themeNode.get_color('-barlevel-active-background-color');
let barLevelOverdriveColor = themeNode.get_color('-barlevel-overdrive-color');
let barLevelBorderWidth = Math.min(themeNode.get_length('-barlevel-border-width'), 1);
let [hasBorderColor, barLevelBorderColor] =
themeNode.lookup_color('-barlevel-border-color', false);
if (!hasBorderColor)
barLevelBorderColor = barLevelColor;
let [hasActiveBorderColor, barLevelActiveBorderColor] =
themeNode.lookup_color('-barlevel-active-border-color', false);
if (!hasActiveBorderColor)
barLevelActiveBorderColor = barLevelActiveColor;
let [hasOverdriveBorderColor, barLevelOverdriveBorderColor] =
themeNode.lookup_color('-barlevel-overdrive-border-color', false);
if (!hasOverdriveBorderColor)
barLevelOverdriveBorderColor = barLevelOverdriveColor;
const TAU = Math.PI * 2;
let endX = 0;
if (this._maxValue > 0)
endX = barLevelBorderRadius + (width - 2 * barLevelBorderRadius) * this._value / this._maxValue;
let overdriveSeparatorX = barLevelBorderRadius + (width - 2 * barLevelBorderRadius) * this._overdriveStart / this._maxValue;
let overdriveActive = this._overdriveStart !== this._maxValue;
let overdriveSeparatorWidth = 0;
if (overdriveActive)
overdriveSeparatorWidth = themeNode.get_length('-barlevel-overdrive-separator-width');
/* background bar */
cr.arc(width - barLevelBorderRadius - barLevelBorderWidth, height / 2, barLevelBorderRadius, TAU * 3 / 4, TAU * 1 / 4);
cr.lineTo(endX, (height + barLevelHeight) / 2);
cr.lineTo(endX, (height - barLevelHeight) / 2);
cr.lineTo(width - barLevelBorderRadius - barLevelBorderWidth, (height - barLevelHeight) / 2);
Clutter.cairo_set_source_color(cr, barLevelColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelBorderColor);
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
/* normal progress bar */
let x = Math.min(endX, overdriveSeparatorX - overdriveSeparatorWidth / 2);
cr.arc(barLevelBorderRadius + barLevelBorderWidth, height / 2, barLevelBorderRadius, TAU * 1 / 4, TAU * 3 / 4);
cr.lineTo(x, (height - barLevelHeight) / 2);
cr.lineTo(x, (height + barLevelHeight) / 2);
cr.lineTo(barLevelBorderRadius + barLevelBorderWidth, (height + barLevelHeight) / 2);
Clutter.cairo_set_source_color(cr, barLevelActiveColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelActiveBorderColor);
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
/* overdrive progress barLevel */
x = Math.min(endX, overdriveSeparatorX) + overdriveSeparatorWidth / 2;
if (this._value > this._overdriveStart) {
cr.moveTo(x, (height - barLevelHeight) / 2);
cr.lineTo(endX, (height - barLevelHeight) / 2);
cr.lineTo(endX, (height + barLevelHeight) / 2);
cr.lineTo(x, (height + barLevelHeight) / 2);
cr.lineTo(x, (height - barLevelHeight) / 2);
Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelOverdriveBorderColor);
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
}
/* end progress bar arc */
if (this._value <= this._overdriveStart)
Clutter.cairo_set_source_color(cr, barLevelActiveColor);
else
Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
cr.arc(endX, height / 2, barLevelBorderRadius, TAU * 3 / 4, TAU * 1 / 4);
cr.lineTo(Math.floor(endX), (height + barLevelHeight) / 2);
cr.lineTo(Math.floor(endX), (height - barLevelHeight) / 2);
cr.lineTo(endX, (height - barLevelHeight) / 2);
cr.fillPreserve();
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
/* draw overdrive separator */
if (overdriveActive) {
cr.moveTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX + overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX + overdriveSeparatorWidth / 2, (height + barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height + barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
if (this._value <= this._overdriveStart)
Clutter.cairo_set_source_color(cr, fgColor);
else
Clutter.cairo_set_source_color(cr, barLevelColor);
cr.fill();
}
cr.$dispose();
},
_getCurrentValue(actor) {
return this._value;
},
_getOverdriveStart(actor) {
return this._overdriveStart;
},
_getMinimumValue(actor) {
return 0;
},
_getMaximumValue(actor) {
return this._maxValue;
},
_setCurrentValue(actor, value) {
this._value = value;
},
_valueChanged(barLevel, value, property) {
this._customAccessible.notify("accessible-value");
},
get value() {
return this._value;
}
});
Signals.addSignalMethods(BarLevel.prototype);

View File

@ -802,6 +802,8 @@ var NotificationMessage = new Lang.Class({
},
_onDestroy() {
this.parent();
if (this._updatedId)
this.notification.disconnect(this._updatedId);
this._updatedId = 0;

View File

@ -28,7 +28,10 @@ var CloseDialog = new Lang.Class({
this.parent();
this._window = window;
this._dialog = null;
this._tracked = undefined;
this._timeoutId = 0;
this._windowFocusChangedId = 0;
this._keyFocusChangedId = 0;
},
get window() {
@ -96,11 +99,42 @@ var CloseDialog = new Lang.Class({
this.response(Meta.CloseDialogResponse.FORCE_CLOSE);
},
_onFocusChanged() {
if (Meta.is_wayland_compositor())
return;
let focusWindow = global.display.focus_window;
let keyFocus = global.stage.key_focus;
let shouldTrack;
if (focusWindow != null)
shouldTrack = focusWindow == this._window;
else
shouldTrack = keyFocus && this._dialog.contains(keyFocus);
if (this._tracked === shouldTrack)
return;
if (shouldTrack)
Main.layoutManager.trackChrome(this._dialog,
{ affectsInputRegion: true });
else
Main.layoutManager.untrackChrome(this._dialog);
// The buttons are broken when they aren't added to the input region,
// so disable them properly in that case
this._dialog.buttonLayout.get_children().forEach(b => {
b.reactive = shouldTrack;
});
this._tracked = shouldTrack;
},
vfunc_show() {
if (this._dialog != null)
return;
Meta.disable_unredirect_for_display(global.display);
Meta.disable_unredirect_for_screen(global.screen);
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, ALIVE_TIMEOUT,
() => {
@ -108,6 +142,14 @@ var CloseDialog = new Lang.Class({
return GLib.SOURCE_CONTINUE;
});
this._windowFocusChangedId =
global.display.connect('notify::focus-window',
this._onFocusChanged.bind(this));
this._keyFocusChangedId =
global.stage.connect('notify::key-focus',
this._onFocusChanged.bind(this));
this._addWindowEffect();
this._initDialog();
@ -118,9 +160,7 @@ var CloseDialog = new Lang.Class({
{ scale_y: 1,
transition: 'linear',
time: DIALOG_TRANSITION_TIME,
onComplete: () => {
Main.layoutManager.trackChrome(this._dialog, { affectsInputRegion: true });
}
onComplete: this._onFocusChanged.bind(this)
});
},
@ -128,11 +168,17 @@ var CloseDialog = new Lang.Class({
if (this._dialog == null)
return;
Meta.enable_unredirect_for_display(global.display);
Meta.enable_unredirect_for_screen(global.screen);
GLib.source_remove(this._timeoutId);
this._timeoutId = 0;
global.display.disconnect(this._windowFocusChangedId)
this._windowFocusChangedId = 0;
global.stage.disconnect(this._keyFocusChangedId);
this._keyFocusChangedId = 0;
let dialog = this._dialog;
this._dialog = null;
this._removeWindowEffect();

View File

@ -210,6 +210,10 @@ var AutomountManager = new Lang.Class({
},
_onVolumeRemoved(monitor, volume) {
if (volume._allowAutorunExpireId && volume._allowAutorunExpireId > 0) {
Mainloop.source_remove(volume._allowAutorunExpireId);
delete volume._allowAutorunExpireId;
}
this._volumeQueue =
this._volumeQueue.filter(element => (element != volume));
},
@ -234,8 +238,10 @@ var AutomountManager = new Lang.Class({
_allowAutorunExpire(volume) {
let id = Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, () => {
volume.allowAutorun = false;
delete volume._allowAutorunExpireId;
return GLib.SOURCE_REMOVE;
});
volume._allowAutorunExpireId = id;
GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
}
});

View File

@ -604,17 +604,12 @@ var NetworkAgent = new Lang.Class({
this._native.connect('new-request', this._newRequest.bind(this));
this._native.connect('cancel-request', this._cancelRequest.bind(this));
this._initialized = false;
this._native.init_async(GLib.PRIORITY_DEFAULT, null, (o, res) => {
try {
this._native.init_finish(res);
this._initialized = true;
} catch(e) {
this._native = null;
logError(e, 'error initializing the NetworkManager Agent');
}
});
try {
this._native.init(null);
} catch(e) {
this._native = null;
logError(e, 'error initializing the NetworkManager Agent');
}
},
enable() {
@ -622,7 +617,7 @@ var NetworkAgent = new Lang.Class({
return;
this._native.auto_register = true;
if (this._initialized && !this._native.registered)
if (!this._native.registered)
this._native.register_async(null, null);
},
@ -645,7 +640,7 @@ var NetworkAgent = new Lang.Class({
return;
this._native.auto_register = false;
if (this._initialized && this._native.registered)
if (this._native.registered)
this._native.unregister_async(null, null);
},

View File

@ -85,11 +85,9 @@ var CtrlAltTabManager = new Lang.Class({
// And add the windows metacity would show in its Ctrl-Alt-Tab list
if (Main.sessionMode.hasWindows && !Main.overview.visible) {
let display = global.display;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let windows = display.get_tab_list(Meta.TabList.DOCKS,
activeWorkspace);
let screen = global.screen;
let display = screen.get_display();
let windows = display.get_tab_list(Meta.TabList.DOCKS, screen.get_active_workspace ());
let windowTracker = Shell.WindowTracker.get_default();
let textureCache = St.TextureCache.get_default();
for (let i = 0; i < windows.length; i++) {
@ -133,7 +131,7 @@ var CtrlAltTabManager = new Lang.Class({
},
_focusWindows(timestamp) {
global.display.focus_default_window(timestamp);
global.screen.focus_default_window(timestamp);
}
});

View File

@ -52,6 +52,8 @@ var DashItemContainer = new Lang.Class({
this.animatingOut = false;
this.connect('destroy', () => {
if (this.child != null)
this.child.destroy();
this.label.destroy();
});
},

View File

@ -183,7 +183,7 @@ var MessageDialogContent = new Lang.Class({
this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`);
});
let textProps = { ellipsize_mode: Pango.EllipsizeMode.NONE,
let textProps = { ellipsize: Pango.EllipsizeMode.NONE,
line_wrap: true };
Object.assign(this._subtitle.clutter_text, textProps);
Object.assign(this._body.clutter_text, textProps);

View File

@ -125,6 +125,16 @@ var _Draggable = new Lang.Class({
},
_onTouchEvent(actor, event) {
// Here we only handle touch events on wayland. On X11
// we do get emulated pointer events, which already works
// for single-touch cases. Besides, the X11 passive touch grab
// set up by Mutter will make us see first the touch events
// and later the pointer events, so it will look like two
// unrelated series of events, we want to avoid double handling
// in these cases.
if (!Meta.is_wayland_compositor())
return Clutter.EVENT_PROPAGATE;
if (event.type() != Clutter.EventType.TOUCH_BEGIN ||
!global.display.is_pointer_emulating_sequence(event.get_event_sequence()))
return Clutter.EVENT_PROPAGATE;
@ -280,7 +290,7 @@ var _Draggable = new Lang.Class({
this._touchSequence = sequence;
this._grabEvents();
global.display.set_cursor(Meta.Cursor.DND_IN_DRAG);
global.screen.set_cursor(Meta.Cursor.DND_IN_DRAG);
this._dragX = this._dragStartX = stageX;
this._dragY = this._dragStartY = stageY;
@ -396,10 +406,15 @@ var _Draggable = new Lang.Class({
return true;
},
_pickTargetActor() {
return this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
this._dragX, this._dragY);
},
_updateDragHover() {
this._updateHoverId = 0;
let target = this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
this._dragX, this._dragY);
let target = this._pickTargetActor();
let dragEvent = {
x: this._dragX,
y: this._dragY,
@ -407,16 +422,29 @@ var _Draggable = new Lang.Class({
source: this.actor._delegate,
targetActor: target
};
let targetActorDestroyHandlerId;
let handleTargetActorDestroyClosure;
handleTargetActorDestroyClosure = () => {
target = this._pickTargetActor();
dragEvent.targetActor = target;
targetActorDestroyHandlerId =
target.connect('destroy', handleTargetActorDestroyClosure);
};
targetActorDestroyHandlerId =
target.connect('destroy', handleTargetActorDestroyClosure);
for (let i = 0; i < dragMonitors.length; i++) {
let motionFunc = dragMonitors[i].dragMotion;
if (motionFunc) {
let result = motionFunc(dragEvent);
if (result != DragMotionResult.CONTINUE) {
global.display.set_cursor(DRAG_CURSOR_MAP[result]);
global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
return GLib.SOURCE_REMOVE;
}
}
}
dragEvent.targetActor.disconnect(targetActorDestroyHandlerId);
while (target) {
if (target._delegate && target._delegate.handleDragOver) {
@ -430,13 +458,13 @@ var _Draggable = new Lang.Class({
targY,
0);
if (result != DragMotionResult.CONTINUE) {
global.display.set_cursor(DRAG_CURSOR_MAP[result]);
global.screen.set_cursor(DRAG_CURSOR_MAP[result]);
return GLib.SOURCE_REMOVE;
}
}
target = target.get_parent();
}
global.display.set_cursor(Meta.Cursor.DND_IN_DRAG);
global.screen.set_cursor(Meta.Cursor.DND_IN_DRAG);
return GLib.SOURCE_REMOVE;
},
@ -509,7 +537,7 @@ var _Draggable = new Lang.Class({
}
this._dragInProgress = false;
global.display.set_cursor(Meta.Cursor.DEFAULT);
global.screen.set_cursor(Meta.Cursor.DEFAULT);
this.emit('drag-end', event.get_time(), true);
this._dragComplete();
return true;
@ -561,7 +589,7 @@ var _Draggable = new Lang.Class({
let [snapBackX, snapBackY, snapBackScale] = this._getRestoreLocation();
if (this._actorDestroyed) {
global.display.set_cursor(Meta.Cursor.DEFAULT);
global.screen.set_cursor(Meta.Cursor.DEFAULT);
if (!this._buttonDown)
this._dragComplete();
this.emit('drag-end', eventTime, false);
@ -620,7 +648,7 @@ var _Draggable = new Lang.Class({
if (!this._buttonDown)
this._dragComplete();
global.display.set_cursor(Meta.Cursor.DEFAULT);
global.screen.set_cursor(Meta.Cursor.DEFAULT);
},
_onAnimationComplete(dragActor, eventTime) {

View File

@ -27,9 +27,9 @@ var EdgeDragAction = new Lang.Class({
_getMonitorRect(x, y) {
let rect = new Meta.Rectangle({ x: x - 1, y: y - 1, width: 1, height: 1 });
let monitorIndex = global.display.get_monitor_index_for_rect(rect);
let monitorIndex = global.screen.get_monitor_index_for_rect(rect);
return global.display.get_monitor_geometry(monitorIndex);
return global.screen.get_monitor_geometry(monitorIndex);
},
vfunc_gesture_prepare(action, actor) {

View File

@ -697,14 +697,7 @@ var EndSessionDialog = new Lang.Class({
if (proxy.State == 'closing')
continue;
let sessionId = GLib.getenv('XDG_SESSION_ID');
if (!sessionId)
this._loginManager.getCurrentSessionProxy(currentSessionProxy => {
sessionId = currentSessionProxy.Id;
log(`endSessionDialog: No XDG_SESSION_ID, fetched from logind: ${sessionId}`);
});
if (proxy.Id == sessionId)
if (proxy.Id == GLib.getenv('XDG_SESSION_ID'))
continue;
let session = { user: this._userManager.get_user(userName),
@ -767,7 +760,7 @@ var EndSessionDialog = new Lang.Class({
let updatePrepared = this._pkOfflineProxy.UpdatePrepared;
let updatesAllowed = this._updatesPermission && this._updatesPermission.allowed;
_setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText);
_setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText || '');
this._checkBox.actor.visible = (dialogContent.checkBoxText && updatePrepared && updatesAllowed);
this._checkBox.actor.checked = (updatePrepared && updateTriggered);

View File

@ -76,6 +76,7 @@ function disableExtension(uuid) {
if (extension.stylesheet) {
let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
theme.unload_stylesheet(extension.stylesheet);
delete extension.stylesheet;
}
try {
@ -115,13 +116,18 @@ function enableExtension(uuid) {
extensionOrder.push(uuid);
let stylesheetNames = [global.session_mode + '.css', 'stylesheet.css'];
let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
for (let i = 0; i < stylesheetNames.length; i++) {
let stylesheetFile = extension.dir.get_child(stylesheetNames[i]);
if (stylesheetFile.query_exists(null)) {
let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
try {
let stylesheetFile = extension.dir.get_child(stylesheetNames[i]);
theme.load_stylesheet(stylesheetFile);
extension.stylesheet = stylesheetFile;
break;
} catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND))
continue; // not an error
log(`Failed to load stylesheet for extension ${uuid}: ${e.message}`);
return;
}
}
@ -131,6 +137,10 @@ function enableExtension(uuid) {
_signals.emit('extension-state-changed', extension);
return;
} catch(e) {
if (extension.stylesheet) {
theme.unload_stylesheet(extension.stylesheet);
delete extension.stylesheet;
}
logExtensionError(uuid, e);
return;
}

View File

@ -166,7 +166,7 @@ var CandidatePopup = new Lang.Class({
this._panelService.cursor_down();
});
this._candidateArea.connect('candidate-clicked', (area, index, button, state) => {
this._candidateArea.connect('candidate-clicked', () => {
this._panelService.candidate_clicked(index, button, state);
});

View File

@ -418,6 +418,11 @@ var IconGrid = new Lang.Class({
},
_animationDone() {
this._clonesAnimating.forEach(clone => {
clone.source.reactive = true;
clone.source.opacity = 255;
clone.destroy();
});
this._clonesAnimating = [];
this.emit('animation-done');
},
@ -538,10 +543,6 @@ var IconGrid = new Lang.Class({
onComplete: () => {
if (isLastItem)
this._animationDone();
actor.opacity = 255;
actor.reactive = true;
actorClone.destroy();
}};
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
transition: 'easeInOutQuad',
@ -562,12 +563,8 @@ var IconGrid = new Lang.Class({
scale_x: scaleX,
scale_y: scaleY,
onComplete: () => {
if (isLastItem) {
if (isLastItem)
this._animationDone();
this._restoreItemsOpacity();
}
actor.reactive = true;
actorClone.destroy();
}};
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
transition: 'easeInOutQuad',
@ -581,12 +578,6 @@ var IconGrid = new Lang.Class({
}
},
_restoreItemsOpacity() {
for (let index = 0; index < this._items.length; index++) {
this._items[index].actor.opacity = 255;
}
},
_getAllocatedChildSizeAndSpacing(child) {
let [,, natWidth, natHeight] = child.get_preferred_size();
let width = Math.min(this._getHItemSize(), natWidth);

View File

@ -472,8 +472,6 @@ var KeyboardModel = new Lang.Class({
_loadModel(groupName) {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/%s.json'.format(groupName));
let [success, contents] = file.load_contents(null);
if (contents instanceof Uint8Array)
contents = imports.byteArray.toString(contents);
return JSON.parse(contents);
},
@ -492,18 +490,13 @@ var FocusTracker = new Lang.Class({
_init() {
this._currentWindow = null;
this._currentWindowPositionId = 0;
global.display.connect('notify::focus-window', () => {
this._setCurrentWindow(global.display.focus_window);
global.screen.get_display().connect('notify::focus-window', () => {
this._setCurrentWindow(global.screen.get_display().focus_window);
this.emit('window-changed', this._currentWindow);
});
global.display.connect('grab-op-begin', (display, window, op) => {
if (window == this._currentWindow &&
(op == Meta.GrabOp.MOVING || op == Meta.GrabOp.KEYBOARD_MOVING))
this.emit('reset');
});
/* Valid for wayland clients */
Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
let newRect = { x: rect.get_x(), y: rect.get_y(), width: rect.get_width(), height: rect.get_height() };
@ -525,7 +518,18 @@ var FocusTracker = new Lang.Class({
},
_setCurrentWindow(window) {
if (this._currentWindow)
this._currentWindow.disconnect(this._currentWindowPositionId);
this._currentWindow = window;
if (window) {
this._currentWindowPositionId = this._currentWindow.connect('position-changed', () => {
if (global.display.get_grab_op() == Meta.GrabOp.NONE)
this.emit('position-changed');
else
this.emit('reset');
});
}
},
_setCurrentRect(rect) {

View File

@ -109,7 +109,7 @@ var MonitorConstraint = new Lang.Class({
if (!this._workareasChangedId) {
this._workareasChangedId =
global.display.connect('workareas-changed', () => {
global.screen.connect('workareas-changed', () => {
if (this._workArea)
this.actor.queue_relayout();
});
@ -120,7 +120,7 @@ var MonitorConstraint = new Lang.Class({
this._monitorsChangedId = 0;
if (this._workareasChangedId)
global.display.disconnect(this._workareasChangedId);
global.screen.disconnect(this._workareasChangedId);
this._workareasChangedId = 0;
}
@ -142,8 +142,7 @@ var MonitorConstraint = new Lang.Class({
let rect;
if (this._workArea) {
let workspaceManager = global.workspace_manager;
let ws = workspaceManager.get_workspace_by_index(0);
let ws = global.screen.get_workspace_by_index(0);
rect = ws.get_work_area_for_monitor(index);
} else {
rect = Main.layoutManager.monitors[index];
@ -165,7 +164,7 @@ var Monitor = new Lang.Class({
},
get inFullscreen() {
return global.display.get_monitor_in_fullscreen(this.index);
return global.screen.get_monitor_in_fullscreen(this.index);
}
})
@ -204,6 +203,7 @@ var LayoutManager = new Lang.Class({
// Set up stage hierarchy to group all UI actors under one container.
this.uiGroup = new Shell.GenericContainer({ name: 'uiGroup' });
this.uiGroup.set_flags(Clutter.ActorFlags.NO_LAYOUT);
this.uiGroup.connect('allocate', (actor, box, flags) => {
let children = actor.get_children();
for (let i = 0; i < children.length; i++)
@ -260,7 +260,7 @@ var LayoutManager = new Lang.Class({
global.stage.remove_actor(global.top_window_group);
this.uiGroup.add_actor(global.top_window_group);
let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
let feedbackGroup = Meta.get_feedback_group_for_screen(global.screen);
global.stage.remove_actor(feedbackGroup);
this.uiGroup.add_actor(feedbackGroup);
@ -270,19 +270,14 @@ var LayoutManager = new Lang.Class({
this._bgManagers = [];
// Need to update struts on new workspaces when they are added
let workspaceManager = global.workspace_manager;
workspaceManager.connect('notify::n-workspaces',
this._queueUpdateRegions.bind(this));
let display = global.display;
display.connect('restacked',
this._windowsRestacked.bind(this));
display.connect('in-fullscreen-changed',
this._updateFullscreen.bind(this));
let monitorManager = Meta.MonitorManager.get();
monitorManager.connect('monitors-changed',
this._monitorsChanged.bind(this));
global.screen.connect('notify::n-workspaces',
this._queueUpdateRegions.bind(this));
global.screen.connect('restacked',
this._windowsRestacked.bind(this));
global.screen.connect('monitors-changed',
this._monitorsChanged.bind(this));
global.screen.connect('in-fullscreen-changed',
this._updateFullscreen.bind(this));
this._monitorsChanged();
// NVIDIA drivers don't preserve FBO contents across
@ -325,12 +320,12 @@ var LayoutManager = new Lang.Class({
},
_updateMonitors() {
let display = global.display;
let screen = global.screen;
this.monitors = [];
let nMonitors = display.get_n_monitors();
let nMonitors = screen.get_n_monitors();
for (let i = 0; i < nMonitors; i++)
this.monitors.push(new Monitor(i, display.get_monitor_geometry(i)));
this.monitors.push(new Monitor(i, screen.get_monitor_geometry(i)));
if (nMonitors == 0) {
this.primaryIndex = this.bottomIndex = -1;
@ -339,7 +334,7 @@ var LayoutManager = new Lang.Class({
} else {
// If there are monitors below the primary, then we need
// to split primary from bottom.
this.primaryIndex = this.bottomIndex = display.get_primary_monitor();
this.primaryIndex = this.bottomIndex = screen.get_primary_monitor();
for (let i = 0; i < this.monitors.length; i++) {
let monitor = this.monitors[i];
if (this._isAboveOrBelowPrimary(monitor)) {
@ -544,7 +539,7 @@ var LayoutManager = new Lang.Class({
},
get currentMonitor() {
let index = global.display.get_current_monitor();
let index = global.screen.get_current_monitor();
return this.monitors[index];
},
@ -917,8 +912,7 @@ var LayoutManager = new Lang.Class({
getWorkAreaForMonitor(monitorIndex) {
// Assume that all workspaces will have the same
// struts and pick the first one.
let workspaceManager = global.workspace_manager;
let ws = workspaceManager.get_workspace_by_index(0);
let ws = global.screen.get_workspace_by_index(0);
return ws.get_work_area_for_monitor(monitorIndex);
},
@ -928,7 +922,7 @@ var LayoutManager = new Lang.Class({
let [x, y] = actor.get_transformed_position();
let [w, h] = actor.get_transformed_size();
let rect = new Meta.Rectangle({ x: x, y: y, width: w, height: h });
return global.display.get_monitor_index_for_rect(rect);
return global.screen.get_monitor_index_for_rect(rect);
},
findMonitorForActor(actor) {
@ -1061,9 +1055,9 @@ var LayoutManager = new Lang.Class({
global.set_stage_input_region(rects);
this._isPopupWindowVisible = isPopupMenuVisible;
let workspaceManager = global.workspace_manager;
for (let w = 0; w < workspaceManager.n_workspaces; w++) {
let workspace = workspaceManager.get_workspace_by_index(w);
let screen = global.screen;
for (let w = 0; w < screen.n_workspaces; w++) {
let workspace = screen.get_workspace_by_index(w);
workspace.set_builtin_struts(struts);
}

View File

@ -61,7 +61,7 @@ var Magnifier = new Lang.Class({
this._zoomRegions = [];
// Create small clutter tree for the magnified mouse.
let cursorTracker = Meta.CursorTracker.get_for_display(global.display);
let cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
this._mouseSprite = new Clutter.Texture();
Shell.util_cursor_tracker_to_clutter(cursorTracker, this._mouseSprite);
this._cursorRoot = new Clutter.Actor();
@ -116,10 +116,10 @@ var Magnifier = new Lang.Class({
if (isActive != activate) {
if (activate) {
Meta.disable_unredirect_for_display(global.display);
Meta.disable_unredirect_for_screen(global.screen);
this.startTrackingMouse();
} else {
Meta.enable_unredirect_for_display(global.display);
Meta.enable_unredirect_for_screen(global.screen);
this.stopTrackingMouse();
}
}

View File

@ -343,6 +343,9 @@ function loadTheme() {
let theme = new St.Theme ({ application_stylesheet: _cssStylesheet,
default_stylesheet: _defaultCssStylesheet });
if (theme.default_stylesheet == null)
throw new Error("No valid stylesheet found for '%s'".format(sessionMode.stylesheetName));
if (previousTheme) {
let customStylesheets = previousTheme.get_custom_stylesheets();
@ -429,7 +432,7 @@ function pushModal(actor, params) {
log('pushModal: invocation of begin_modal failed');
return false;
}
Meta.disable_unredirect_for_display(global.display);
Meta.disable_unredirect_for_screen(global.screen);
}
modalCount += 1;
@ -528,7 +531,7 @@ function popModal(actor, timestamp) {
layoutManager.modalEnded();
global.end_modal(timestamp);
Meta.enable_unredirect_for_display(global.display);
Meta.enable_unredirect_for_screen(global.screen);
actionMode = Shell.ActionMode.NORMAL;
}
@ -556,15 +559,14 @@ function openRunDialog() {
* and switching out of the overview if it's currently active
*/
function activateWindow(window, time, workspaceNum) {
let workspaceManager = global.workspace_manager;
let activeWorkspaceNum = workspaceManager.get_active_workspace_index();
let activeWorkspaceNum = global.screen.get_active_workspace_index();
let windowWorkspaceNum = (workspaceNum !== undefined) ? workspaceNum : window.get_workspace().index();
if (!time)
time = global.get_current_time();
if (windowWorkspaceNum != activeWorkspaceNum) {
let workspace = workspaceManager.get_workspace_by_index(windowWorkspaceNum);
let workspace = global.screen.get_workspace_by_index(windowWorkspaceNum);
workspace.activate_with_focus(window, time);
} else {
window.activate(time);

View File

@ -27,7 +27,6 @@ function _fixMarkup(text, allowMarkup) {
// Support <b>, <i>, and <u>, escape anything else
// so it displays as raw markup.
// Ref: https://developer.gnome.org/notification-spec/#markup
_text = _text.replace(/<(?!\/?[biu]>)/g, '&lt;');
try {
@ -96,10 +95,10 @@ var URLHighlighter = new Lang.Class({
let urlId = this._findUrlAtPos(event);
if (urlId != -1 && !this._cursorChanged) {
global.display.set_cursor(Meta.Cursor.POINTING_HAND);
global.screen.set_cursor(Meta.Cursor.POINTING_HAND);
this._cursorChanged = true;
} else if (urlId == -1) {
global.display.set_cursor(Meta.Cursor.DEFAULT);
global.screen.set_cursor(Meta.Cursor.DEFAULT);
this._cursorChanged = false;
}
return Clutter.EVENT_PROPAGATE;
@ -110,7 +109,7 @@ var URLHighlighter = new Lang.Class({
if (this._cursorChanged) {
this._cursorChanged = false;
global.display.set_cursor(Meta.Cursor.DEFAULT);
global.screen.set_cursor(Meta.Cursor.DEFAULT);
}
return Clutter.EVENT_PROPAGATE;
});
@ -363,7 +362,8 @@ var Message = new Lang.Class({
this.setBody(body);
this._closeButton.connect('clicked', this.close.bind(this));
this.actor.connect('notify::hover', this._sync.bind(this));
let actorHoverId = this.actor.connect('notify::hover', this._sync.bind(this));
this._closeButton.connect('destroy', this.actor.disconnect.bind(this.actor, actorHoverId));
this.actor.connect('clicked', this._onClicked.bind(this));
this.actor.connect('destroy', this._onDestroy.bind(this));
this._sync();

View File

@ -315,10 +315,10 @@ var NotificationApplicationPolicy = new Lang.Class({
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
// is no fallback for this icon.
//
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
// the parameter is not present, then anything that looks like markup
// in @banner will appear literally in the output.
// If @params contains 'bannerMarkup', with the value %true, then
// the corresponding element is assumed to use pango markup. If the
// parameter is not present for an element, then anything that looks
// like markup in that element will appear literally in the output.
//
// If @params contains a 'clear' parameter with the value %true, then
// the content and the action area of the notification will be cleared.
@ -328,8 +328,6 @@ var NotificationApplicationPolicy = new Lang.Class({
// If @params contains 'soundName' or 'soundFile', the corresponding
// event sound is played when the notification is shown (if the policy for
// @source allows playing sounds).
//
// [1] https://developer.gnome.org/notification-spec/#markup
var Notification = new Lang.Class({
Name: 'Notification',
@ -917,7 +915,7 @@ var MessageTray = new Lang.Class({
Main.layoutManager.addChrome(this.actor, { affectsInputRegion: false });
Main.layoutManager.trackChrome(this._bannerBin, { affectsInputRegion: true });
global.display.connect('in-fullscreen-changed', this._updateState.bind(this));
global.screen.connect('in-fullscreen-changed', this._updateState.bind(this));
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
@ -1322,6 +1320,7 @@ var MessageTray = new Lang.Class({
this._bannerBin.y = -this._banner.actor.height;
this.actor.show();
Meta.disable_unredirect_for_screen(global.screen);
this._updateShowingNotification();
let [x, y, mods] = global.get_pointer();
@ -1459,6 +1458,7 @@ var MessageTray = new Lang.Class({
this._pointerInNotification = false;
this._notificationRemoved = false;
Meta.enable_unredirect_for_screen(global.screen);
this._banner.actor.destroy();
this._banner = null;

View File

@ -116,7 +116,7 @@ var ModalDialog = new Lang.Class({
if (onPrimary)
this._monitorConstraint.primary = true;
else
this._monitorConstraint.index = global.display.get_current_monitor();
this._monitorConstraint.index = global.screen.get_current_monitor();
this.state = State.OPENING;

View File

@ -117,10 +117,8 @@ var FdoNotificationDaemon = new Lang.Class({
bitsPerSample, nChannels, data] = hints['image-data'];
return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
bitsPerSample, width, height, rowStride);
} else if (hints['image-path']) {
return new Gio.FileIcon({ file: Gio.File.new_for_path(hints['image-path']) });
}
return null;
return this._iconForNotificationData(hints['image-path']);
},
_fallbackIconForNotificationData(hints) {
@ -831,10 +829,8 @@ var GtkNotificationDaemon = new Lang.Class({
let source;
try {
source = this._ensureAppSource(appId);
} catch(e) {
if (e instanceof InvalidAppError)
return;
throw e;
} catch(e if e instanceof InvalidAppError) {
return;
}
notifications.forEach(([notificationId, notification]) => {
@ -865,12 +861,9 @@ var GtkNotificationDaemon = new Lang.Class({
let source;
try {
source = this._ensureAppSource(appId);
} catch(e) {
if (e instanceof InvalidAppError) {
invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
return;
}
throw e;
} catch(e if e instanceof InvalidAppError) {
invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
return;
}
let timestamp = GLib.DateTime.new_now_local().to_unix();

View File

@ -32,7 +32,7 @@ var OsdMonitorLabel = new Lang.Class({
Main.uiGroup.set_child_above_sibling(this._actor, null);
this._position();
Meta.disable_unredirect_for_display(global.display);
Meta.disable_unredirect_for_screen(global.screen);
},
_position() {
@ -48,7 +48,7 @@ var OsdMonitorLabel = new Lang.Class({
destroy() {
this._actor.destroy();
Meta.enable_unredirect_for_display(global.display);
Meta.enable_unredirect_for_screen(global.screen);
}
});

View File

@ -4,7 +4,6 @@ const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const St = imports.gi.St;
const BarLevel = imports.ui.barLevel;
const Lang = imports.lang;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
@ -18,18 +17,16 @@ var LEVEL_ANIMATION_TIME = 0.1;
var LevelBar = new Lang.Class({
Name: 'LevelBar',
Extends: BarLevel.BarLevel,
_init() {
this._level = 0;
this._maxLevel = 100;
let params = {
styleClass: 'level',
}
this.parent(this._level, params);
this.actor = new St.Bin({ style_class: 'level',
x_align: St.Align.START,
y_fill: true });
this._bar = new St.Widget({ style_class: 'level-bar' });
this.actor.accessible_name = _("Volume");
this.actor.set_child(this._bar);
this.actor.connect('notify::width', () => { this.level = this.level; });
},
@ -39,19 +36,12 @@ var LevelBar = new Lang.Class({
},
set level(value) {
this._level = Math.max(0, Math.min(value, this._maxLevel));
this._level = Math.max(0, Math.min(value, 100));
this.setValue(this._level / 100);
},
get maxLevel() {
return this._maxLevel;
},
set maxLevel(value) {
this._maxLevel = Math.max(100, value);
this.setMaximumValue(this._maxLevel / 100);
let alloc = this.actor.get_allocation_box();
let newWidth = Math.round((alloc.x2 - alloc.x1) * this._level / 100);
if (newWidth != this._bar.width)
this._bar.width = newWidth;
}
});
@ -118,15 +108,30 @@ var OsdWindow = new Lang.Class({
this._hideTimeoutId = 0;
this._reset();
Main.layoutManager.connect('monitors-changed',
this._relayout.bind(this));
this.actor.connect('destroy', this._onDestroy.bind(this));
this._monitorsChangedId =
Main.layoutManager.connect('monitors-changed',
this._relayout.bind(this));
let themeContext = St.ThemeContext.get_for_stage(global.stage);
themeContext.connect('notify::scale-factor',
this._relayout.bind(this));
this._scaleChangedId =
themeContext.connect('notify::scale-factor',
this._relayout.bind(this));
this._relayout();
Main.uiGroup.add_child(this.actor);
},
_onDestroy() {
if (this._monitorsChangedId)
Main.layoutManager.disconnect(this._monitorsChangedId);
this._monitorsChangedId = 0;
let themeContext = St.ThemeContext.get_for_stage(global.stage);
if (this._scaleChangedId)
themeContext.disconnect(this._scaleChangedId);
this._scaleChangedId = 0;
},
setIcon(icon) {
this._icon.gicon = icon;
},
@ -150,18 +155,12 @@ var OsdWindow = new Lang.Class({
}
},
setMaxLevel(maxLevel) {
if (maxLevel === undefined)
maxLevel = 100;
this._level.maxLevel = maxLevel;
},
show() {
if (!this._icon.gicon)
return;
if (!this.actor.visible) {
Meta.disable_unredirect_for_display(global.display);
Meta.disable_unredirect_for_screen(global.screen);
this.actor.show();
this.actor.opacity = 0;
this.actor.get_parent().set_child_above_sibling(this.actor, null);
@ -195,7 +194,7 @@ var OsdWindow = new Lang.Class({
transition: 'easeOutQuad',
onComplete: () => {
this._reset();
Meta.enable_unredirect_for_display(global.display);
Meta.enable_unredirect_for_screen(global.screen);
}
});
return GLib.SOURCE_REMOVE;
@ -205,7 +204,6 @@ var OsdWindow = new Lang.Class({
this.actor.hide();
this.setLabel(null);
this.setLevel(null);
this.setMaxLevel(null);
},
_relayout() {
@ -250,25 +248,24 @@ var OsdWindowManager = new Lang.Class({
this._osdWindows.length = Main.layoutManager.monitors.length;
},
_showOsdWindow(monitorIndex, icon, label, level, maxLevel) {
_showOsdWindow(monitorIndex, icon, label, level) {
this._osdWindows[monitorIndex].setIcon(icon);
this._osdWindows[monitorIndex].setLabel(label);
this._osdWindows[monitorIndex].setLevel(level);
this._osdWindows[monitorIndex].setMaxLevel(maxLevel);
this._osdWindows[monitorIndex].show();
},
show(monitorIndex, icon, label, level, maxLevel) {
show(monitorIndex, icon, label, level) {
if (monitorIndex != -1) {
for (let i = 0; i < this._osdWindows.length; i++) {
if (i == monitorIndex)
this._showOsdWindow(i, icon, label, level, maxLevel);
this._showOsdWindow(i, icon, label, level);
else
this._osdWindows[i].cancel();
}
} else {
for (let i = 0; i < this._osdWindows.length; i++)
this._showOsdWindow(i, icon, label, level, maxLevel);
this._showOsdWindow(i, icon, label, level);
}
},

View File

@ -157,7 +157,7 @@ var Overview = new Lang.Class({
Main.xdndHandler.connect('drag-begin', this._onDragBegin.bind(this));
Main.xdndHandler.connect('drag-end', this._onDragEnd.bind(this));
global.display.connect('restacked', this._onRestacked.bind(this));
global.screen.connect('restacked', this._onRestacked.bind(this));
this._windowSwitchTimeoutId = 0;
this._windowSwitchTimestamp = 0;
@ -286,8 +286,7 @@ var Overview = new Lang.Class({
DND.addDragMonitor(this._dragMonitor);
// Remember the workspace we started from
let workspaceManager = global.workspace_manager;
this._lastActiveWorkspaceIndex = workspaceManager.get_active_workspace_index();
this._lastActiveWorkspaceIndex = global.screen.get_active_workspace_index();
},
_onDragEnd(time) {
@ -297,8 +296,7 @@ var Overview = new Lang.Class({
// we have to go back to where we started and hide
// the overview
if (this._shown) {
let workspaceManager = global.workspace_manager;
workspaceManager.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
global.screen.get_workspace_by_index(this._lastActiveWorkspaceIndex).activate(time);
this.hide();
}
this._resetWindowSwitchTimeout();
@ -319,9 +317,9 @@ var Overview = new Lang.Class({
let display = Gdk.Display.get_default();
let deviceManager = display.get_device_manager();
let pointer = deviceManager.get_client_pointer();
let [gdkScreen, pointerX, pointerY] = pointer.get_position();
let [screen, pointerX, pointerY] = pointer.get_position();
pointer.warp(gdkScreen, pointerX, pointerY);
pointer.warp(screen, pointerX, pointerY);
},
_onDragMotion(dragEvent) {
@ -395,10 +393,8 @@ var Overview = new Lang.Class({
if (!Main.layoutManager.primaryMonitor)
return;
let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
this._coverPane.set_position(0, workArea.y);
this._coverPane.set_size(workArea.width, workArea.height);
this._coverPane.set_position(0, 0);
this._coverPane.set_size(global.screen_width, global.screen_height);
this._updateBackgrounds();
},
@ -552,7 +548,7 @@ var Overview = new Lang.Class({
this.visibleTarget = true;
this._activationTime = GLib.get_monotonic_time() / GLib.USEC_PER_SEC;
Meta.disable_unredirect_for_display(global.display);
Meta.disable_unredirect_for_screen(global.screen);
this.viewSelector.show();
this._overview.opacity = 0;
@ -637,7 +633,7 @@ var Overview = new Lang.Class({
_hideDone() {
// Re-enable unredirection
Meta.enable_unredirect_for_display(global.display);
Meta.enable_unredirect_for_screen(global.screen);
this.viewSelector.hide();
this._desktopFade.hide();

View File

@ -284,6 +284,11 @@ var ThumbnailsSlider = new Lang.Class({
return child.get_theme_node().get_length('visible-width');
},
_onDragEnd() {
this.actor.sync_hover();
this.parent();
},
_getSlide() {
if (!this._visible)
return 0;

View File

@ -313,8 +313,6 @@ var PadDiagram = new Lang.Class({
_init(params) {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
let [success, css, etag] = file.load_contents(null);
if (css instanceof Uint8Array)
css = imports.byteArray.toString(css);
this._curEdited = null;
this._prevEdited = null;
this._css = css;

View File

@ -265,8 +265,7 @@ var AppMenuButton = new Lang.Class({
},
_findTargetApp() {
let workspaceManager = global.workspace_manager;
let workspace = workspaceManager.get_active_workspace();
let workspace = global.screen.get_active_workspace();
let tracker = Shell.WindowTracker.get_default();
let focusedApp = tracker.focus_app;
if (focusedApp && focusedApp.is_on_workspace(workspace))
@ -710,7 +709,6 @@ var AggregateMenu = new Lang.Class({
this._bluetooth = null;
}
this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet();
this._power = new imports.ui.status.power.Indicator();
this._rfkill = new imports.ui.status.rfkill.Indicator();
this._volume = new imports.ui.status.volume.Indicator();
@ -731,7 +729,6 @@ var AggregateMenu = new Lang.Class({
if (this._bluetooth) {
this._indicators.add_child(this._bluetooth.indicators);
}
this._indicators.add_child(this._remoteAccess.indicators);
this._indicators.add_child(this._rfkill.indicators);
this._indicators.add_child(this._volume.indicators);
this._indicators.add_child(this._power.indicators);
@ -746,7 +743,6 @@ var AggregateMenu = new Lang.Class({
if (this._bluetooth) {
this.menu.addMenuItem(this._bluetooth.menu);
}
this.menu.addMenuItem(this._remoteAccess.menu);
this.menu.addMenuItem(this._location.menu);
this.menu.addMenuItem(this._rfkill.menu);
this.menu.addMenuItem(this._power.menu);
@ -823,7 +819,7 @@ var Panel = new Lang.Class({
global.window_group.connect('actor-removed', this._onWindowActorRemoved.bind(this));
global.window_manager.connect('switch-workspace', this._updateSolidStyle.bind(this));
global.display.connect('workareas-changed', () => { this.actor.queue_relayout(); });
global.screen.connect('workareas-changed', () => { this.actor.queue_relayout(); });
this._updatePanel();
},
@ -971,7 +967,8 @@ var Panel = new Lang.Class({
if (!allowDrag)
return Clutter.EVENT_PROPAGATE;
global.display.begin_grab_op(dragWindow,
global.display.begin_grab_op(global.screen,
dragWindow,
Meta.GrabOp.MOVING,
false, /* pointer grab */
true, /* frame action */
@ -986,7 +983,7 @@ var Panel = new Lang.Class({
_onKeyPress(actor, event) {
let symbol = event.get_key_symbol();
if (symbol == Clutter.KEY_Escape) {
global.display.focus_default_window(event.get_time());
global.screen.focus_default_window(event.get_time());
return Clutter.EVENT_STOP;
}
@ -1084,11 +1081,11 @@ var Panel = new Lang.Class({
return;
/* Get all the windows in the active workspace that are in the primary monitor and visible */
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let activeWorkspace = global.screen.get_active_workspace();
let windows = activeWorkspace.list_windows().filter(metaWindow => {
return metaWindow.is_on_primary_monitor() &&
metaWindow.showing_on_its_workspace() &&
!metaWindow.is_hidden() &&
metaWindow.get_window_type() != Meta.WindowType.DESKTOP;
});

View File

@ -119,9 +119,6 @@ var RemoteMenuItemMapper = new Lang.Class({
this._trackerItem = trackerItem;
this.menuItem = new PopupMenu.PopupBaseMenuItem();
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.menuItem.actor.add_child(this._icon);
this._label = new St.Label();
this.menuItem.actor.add_child(this._label);
this.menuItem.actor.label_actor = this._label;
@ -132,13 +129,11 @@ var RemoteMenuItemMapper = new Lang.Class({
this._trackerItem.bind_property('visible', this.menuItem.actor, 'visible', GObject.BindingFlags.SYNC_CREATE);
this._trackerItem.connect('notify::icon', this._updateIcon.bind(this));
this._trackerItem.connect('notify::label', this._updateLabel.bind(this));
this._trackerItem.connect('notify::sensitive', this._updateSensitivity.bind(this));
this._trackerItem.connect('notify::role', this._updateRole.bind(this));
this._trackerItem.connect('notify::toggled', this._updateDecoration.bind(this));
this._updateIcon();
this._updateLabel();
this._updateSensitivity();
this._updateRole();
@ -148,11 +143,6 @@ var RemoteMenuItemMapper = new Lang.Class({
});
},
_updateIcon() {
this._icon.gicon = this._trackerItem.icon;
this._icon.visible = (this._icon.gicon != null);
},
_updateLabel() {
this._label.text = stripMnemonics(this._trackerItem.label);
},

View File

@ -62,11 +62,7 @@ var RunDialog = new Lang.Class({
'rt': () => {
Main.reloadThemeResource();
Main.loadTheme();
},
'check_cloexec_fds': () => {
Shell.util_check_cloexec_fds();
},
}
};
@ -118,18 +114,16 @@ var RunDialog = new Lang.Class({
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
entry: this._entryText });
this._entryText.connect('activate', (o) => {
this.popModal();
this._run(o.get_text(),
Clutter.get_current_event().get_state() & Clutter.ModifierType.CONTROL_MASK);
if (!this._commandError ||
!this.pushModal())
this.close();
});
this._entryText.connect('key-press-event', (o, e) => {
let symbol = e.get_key_symbol();
if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
this.popModal();
this._run(o.get_text(),
e.get_state() & Clutter.ModifierType.CONTROL_MASK);
if (!this._commandError ||
!this.pushModal())
this.close();
return Clutter.EVENT_STOP;
}
if (symbol == Clutter.Tab) {
let text = o.get_text();
let prefix;
@ -176,10 +170,9 @@ var RunDialog = new Lang.Class({
if (name.slice(0, text.length) == text)
results.push(name);
}
} catch (e) {
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))
log(e);
} catch (e if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))) {
log(e);
} finally {
return results;
}

View File

@ -570,7 +570,7 @@ var ScreenShield = new Lang.Class({
this._shortLightbox.connect('shown', this._onShortLightboxShown.bind(this));
this.idleMonitor = Meta.IdleMonitor.get_core();
this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
this._cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
this._syncInhibitor();
},

View File

@ -56,7 +56,7 @@ var ScreencastService = new Lang.Class({
let recorder = this._recorders.get(sender);
if (!recorder) {
recorder = new Shell.Recorder({ stage: global.stage,
display: global.display });
screen: global.screen });
recorder._watchNameId =
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
this._onNameVanished.bind(this));

View File

@ -55,9 +55,6 @@ const ScreenshotIface = '<node> \
<arg type="i" direction="in" name="width"/> \
<arg type="i" direction="in" name="height"/> \
</method> \
<method name="PickColor"> \
<arg type="a{sv}" direction="out" name="result"/> \
</method> \
</interface> \
</node>';
@ -75,13 +72,10 @@ var ScreenshotService = new Lang.Class({
Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
},
_createScreenshot(invocation, needsDisk=true) {
let lockedDown = false;
if (needsDisk)
lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk')
_createScreenshot(invocation) {
let sender = invocation.get_sender();
if (this._screenShooter.has(sender) || lockedDown) {
if (this._screenShooter.has(sender) ||
this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', [false, '']));
return null;
}
@ -116,7 +110,7 @@ var ScreenshotService = new Lang.Class({
y + height <= global.screen_height;
},
_onScreenshotComplete(result, area, filenameUsed, flash, invocation) {
_onScreenshotComplete(obj, result, area, filenameUsed, flash, invocation) {
if (result) {
if (flash) {
let flashspot = new Flashspot(area);
@ -163,15 +157,9 @@ var ScreenshotService = new Lang.Class({
if (!screenshot)
return;
screenshot.screenshot_area (x, y, width, height, filename,
(o, res) => {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_area_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
(obj, result, area, filenameUsed) => {
this._onScreenshotComplete(obj, result, area, filenameUsed,
flash, invocation);
});
},
@ -181,15 +169,9 @@ var ScreenshotService = new Lang.Class({
if (!screenshot)
return;
screenshot.screenshot_window (include_frame, include_cursor, filename,
(o, res) => {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_window_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
(obj, result, area, filenameUsed) => {
this._onScreenshotComplete(obj, result, area, filenameUsed,
flash, invocation);
});
},
@ -199,15 +181,9 @@ var ScreenshotService = new Lang.Class({
if (!screenshot)
return;
screenshot.screenshot(include_cursor, filename,
(o, res) => {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
(obj, result, area, filenameUsed) => {
this._onScreenshotComplete(obj, result, area, filenameUsed,
flash, invocation);
});
},
@ -239,34 +215,6 @@ var ScreenshotService = new Lang.Class({
let flashspot = new Flashspot({ x : x, y : y, width: width, height: height});
flashspot.fire();
invocation.return_value(null);
},
PickColorAsync(params, invocation) {
let pickPixel = new PickPixel();
pickPixel.show();
pickPixel.connect('finished', (pickPixel, coords) => {
if (coords) {
let screenshot = this._createScreenshot(invocation, false);
if (!screenshot)
return;
screenshot.pick_color(...coords, (o, res) => {
let [success, color] = screenshot.pick_color_finish(res);
let { red, green, blue } = color;
let retval = GLib.Variant.new('(a{sv})', [{
color: GLib.Variant.new('(ddd)', [
red / 255.0,
green / 255.0,
blue / 255.0
])
}]);
this._removeShooterForSender(invocation.get_sender());
invocation.return_value(retval);
});
} else {
invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
"Operation was cancelled");
}
});
}
});
@ -313,7 +261,7 @@ var SelectArea = new Lang.Class({
onUngrab: this._onUngrab.bind(this) }))
return;
global.display.set_cursor(Meta.Cursor.CROSSHAIR);
global.screen.set_cursor(Meta.Cursor.CROSSHAIR);
Main.uiGroup.set_child_above_sibling(this._group, null);
this._group.visible = true;
},
@ -382,7 +330,7 @@ var SelectArea = new Lang.Class({
},
_onUngrab() {
global.display.set_cursor(Meta.Cursor.DEFAULT);
global.screen.set_cursor(Meta.Cursor.DEFAULT);
this.emit('finished', this._result);
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
@ -393,54 +341,6 @@ var SelectArea = new Lang.Class({
});
Signals.addSignalMethods(SelectArea.prototype);
var PickPixel = new Lang.Class({
Name: 'PickPixel',
_init() {
this._result = null;
this._group = new St.Widget({ visible: false,
reactive: true });
Main.uiGroup.add_actor(this._group);
this._grabHelper = new GrabHelper.GrabHelper(this._group);
this._group.connect('button-release-event',
this._onButtonRelease.bind(this));
let constraint = new Clutter.BindConstraint({ source: global.stage,
coordinate: Clutter.BindCoordinate.ALL });
this._group.add_constraint(constraint);
},
show() {
if (!this._grabHelper.grab({ actor: this._group,
onUngrab: this._onUngrab.bind(this) }))
return;
global.display.set_cursor(Meta.Cursor.CROSSHAIR);
Main.uiGroup.set_child_above_sibling(this._group, null);
this._group.visible = true;
},
_onButtonRelease(actor, event) {
this._result = event.get_coords();
this._grabHelper.ungrab();
return Clutter.EVENT_PROPAGATE;
},
_onUngrab() {
global.display.set_cursor(Meta.Cursor.DEFAULT);
this.emit('finished', this._result);
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this._group.destroy();
return GLib.SOURCE_REMOVE;
});
}
});
Signals.addSignalMethods(PickPixel.prototype);
var FLASHSPOT_ANIMATION_OUT_TIME = 0.5; // seconds
var Flashspot = new Lang.Class({

View File

@ -133,7 +133,7 @@ function _callRemote(obj, method, ...args) {
* because of the normal X asynchronous mapping process, to actually wait
* until the window has been mapped and exposed, use waitTestWindows().
*/
function createTestWindow(params) {
function createTestWindow(width, height, params) {
params = Params.parse(params, { width: 640,
height: 480,
alpha: false,
@ -216,14 +216,12 @@ function _step(g, finish, onError) {
if (onError)
onError(err);
});
} catch (err if err instanceof StopIteration) {
if (finish)
finish();
} catch (err) {
if (err instanceof StopIteration) {
if (finish)
finish();
} else {
if (onError)
onError(err);
}
if (onError)
onError(err);
}
}

View File

@ -192,6 +192,7 @@ var SearchResultsBase = new Lang.Class({
},
clear() {
this._cancellable.cancel();
for (let resultId in this._resultDisplays)
this._resultDisplays[resultId].actor.destroy();
this._resultDisplays = {};
@ -225,6 +226,12 @@ var SearchResultsBase = new Lang.Class({
this._cancellable.reset();
this.provider.getResultMetas(metasNeeded, metas => {
if (this._cancellable.is_cancelled()) {
if (metas.length > 0)
log(`Search provider ${this.provider.id} returned results after the request was canceled`);
callback(false);
return;
}
if (metas.length != metasNeeded.length) {
log('Wrong number of result metas returned by search provider ' + this.provider.id +
': expected ' + metasNeeded.length + ' but got ' + metas.length);

View File

@ -117,8 +117,6 @@ function _loadMode(file, info) {
let fileContent, success, tag, newMode;
try {
[success, fileContent, tag] = file.load_contents(null);
if (fileContent instanceof Uint8Array)
fileContent = imports.byteArray.toString(fileContent);
newMode = JSON.parse(fileContent);
} catch(e) {
return;

View File

@ -145,20 +145,15 @@ var GnomeShell = new Lang.Class({
for (let param in params)
params[param] = params[param].deep_unpack();
let { monitor: monitorIndex,
label,
level,
max_level: maxLevel,
icon: serializedIcon } = params;
if (monitorIndex === undefined)
monitorIndex = -1;
let monitorIndex = params['monitor'] || -1;
let label = params['label'] || undefined;
let level = params['level'] || undefined;
let icon = null;
if (serializedIcon)
icon = Gio.Icon.new_for_string(serializedIcon);
if (params['icon'])
icon = Gio.Icon.new_for_string(params['icon']);
Main.osdWindowManager.show(monitorIndex, icon, label, level, maxLevel);
Main.osdWindowManager.show(monitorIndex, icon, label, level);
},
FocusApp(id) {

View File

@ -7,38 +7,55 @@ const Lang = imports.lang;
const St = imports.gi.St;
const Signals = imports.signals;
const BarLevel = imports.ui.barLevel;
var SLIDER_SCROLL_STEP = 0.02; /* Slider scrolling step in % */
var Slider = new Lang.Class({
Name: "Slider",
Extends: BarLevel.BarLevel,
_init(value) {
let params = {
styleClass: 'slider',
canFocus: true,
reactive: true,
accessibleRole: Atk.Role.SLIDER,
}
this.parent(value, params)
if (isNaN(value))
// Avoid spreading NaNs around
throw TypeError('The slider value must be a number');
this._value = Math.max(Math.min(value, 1), 0);
this._sliderWidth = 0;
this.actor = new St.DrawingArea({ style_class: 'slider',
can_focus: true,
reactive: true,
accessible_role: Atk.Role.SLIDER });
this.actor.connect('repaint', this._sliderRepaint.bind(this));
this.actor.connect('button-press-event', this._startDragging.bind(this));
this.actor.connect('touch-event', this._touchDragging.bind(this));
this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
this.actor.connect('key-press-event', this.onKeyPressEvent.bind(this));
this.actor.connect('allocation-changed', (actor, box) => {
this._sliderWidth = box.get_width();
});
this._releaseId = this._motionId = 0;
this._dragging = false;
this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
this.actor.set_accessible(this._customAccessible);
this._customAccessible.connect('get-current-value', this._getCurrentValue.bind(this));
this._customAccessible.connect('get-minimum-value', this._getMinimumValue.bind(this));
this._customAccessible.connect('get-maximum-value', this._getMaximumValue.bind(this));
this._customAccessible.connect('get-minimum-increment', this._getMinimumIncrement.bind(this));
this._customAccessible.connect('set-current-value', this._setCurrentValue.bind(this));
this.connect('value-changed', this._valueChanged.bind(this));
},
_barLevelRepaint(area) {
this.parent(area);
setValue(value) {
if (isNaN(value))
throw TypeError('The slider value must be a number');
// Add handle
this._value = Math.max(Math.min(value, 1), 0);
this.actor.queue_repaint();
},
_sliderRepaint(area) {
let cr = area.get_context();
let themeNode = area.get_theme_node();
let [width, height] = area.get_surface_size();
@ -49,9 +66,41 @@ var Slider = new Lang.Class({
let [hasHandleColor, handleBorderColor] =
themeNode.lookup_color('-slider-handle-border-color', false);
let sliderHeight = themeNode.get_length('-slider-height');
let sliderBorderWidth = themeNode.get_length('-slider-border-width');
let sliderBorderRadius = Math.min(width, sliderHeight) / 2;
let sliderBorderColor = themeNode.get_color('-slider-border-color');
let sliderColor = themeNode.get_color('-slider-background-color');
let sliderActiveBorderColor = themeNode.get_color('-slider-active-border-color');
let sliderActiveColor = themeNode.get_color('-slider-active-background-color');
const TAU = Math.PI * 2;
let handleX = handleRadius + (width - 2 * handleRadius) * this._value / this._maxValue;
let handleX = handleRadius + (width - 2 * handleRadius) * this._value;
cr.arc(sliderBorderRadius + sliderBorderWidth, height / 2, sliderBorderRadius, TAU * 1/4, TAU * 3/4);
cr.lineTo(handleX, (height - sliderHeight) / 2);
cr.lineTo(handleX, (height + sliderHeight) / 2);
cr.lineTo(sliderBorderRadius + sliderBorderWidth, (height + sliderHeight) / 2);
Clutter.cairo_set_source_color(cr, sliderActiveColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, sliderActiveBorderColor);
cr.setLineWidth(sliderBorderWidth);
cr.stroke();
cr.arc(width - sliderBorderRadius - sliderBorderWidth, height / 2, sliderBorderRadius, TAU * 3/4, TAU * 1/4);
cr.lineTo(handleX, (height + sliderHeight) / 2);
cr.lineTo(handleX, (height - sliderHeight) / 2);
cr.lineTo(width - sliderBorderRadius - sliderBorderWidth, (height - sliderHeight) / 2);
Clutter.cairo_set_source_color(cr, sliderColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, sliderBorderColor);
cr.setLineWidth(sliderBorderWidth);
cr.stroke();
let handleY = height / 2;
let color = themeNode.get_foreground_color();
@ -159,7 +208,7 @@ var Slider = new Lang.Class({
delta = -dy * SLIDER_SCROLL_STEP;
}
this._value = Math.min(Math.max(0, this._value + delta), this._maxValue);
this._value = Math.min(Math.max(0, this._value + delta), 1);
this.actor.queue_repaint();
this.emit('value-changed', this._value);
@ -181,7 +230,7 @@ var Slider = new Lang.Class({
let key = event.get_key_symbol();
if (key == Clutter.KEY_Right || key == Clutter.KEY_Left) {
let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
this._value = Math.max(0, Math.min(this._value + delta, this._maxValue));
this._value = Math.max(0, Math.min(this._value + delta, 1));
this.actor.queue_repaint();
this.emit('drag-begin');
this.emit('value-changed', this._value);
@ -197,7 +246,7 @@ var Slider = new Lang.Class({
relX = absX - sliderX;
relY = absY - sliderY;
let width = this._barLevelWidth;
let width = this._sliderWidth;
let handleRadius = this.actor.get_theme_node().get_length('-slider-handle-radius');
let newvalue;
@ -207,14 +256,38 @@ var Slider = new Lang.Class({
newvalue = 1;
else
newvalue = (relX - handleRadius) / (width - 2 * handleRadius);
this._value = newvalue * this._maxValue;
this._value = newvalue;
this.actor.queue_repaint();
this.emit('value-changed', this._value);
},
_getCurrentValue(actor) {
return this._value;
},
_getMinimumValue(actor) {
return 0;
},
_getMaximumValue(actor) {
return 1;
},
_getMinimumIncrement(actor) {
return 0.1;
},
_setCurrentValue(actor, value) {
this._value = value;
},
_valueChanged(slider, value, property) {
this._customAccessible.notify ("accessible-value");
},
get value() {
return this._value;
}
});
Signals.addSignalMethods(Slider.prototype);

View File

@ -360,11 +360,14 @@ var InputSourceManager = new Lang.Class({
this._settings.connect('per-window-changed', this._sourcesPerWindowChanged.bind(this));
this._sourcesPerWindowChanged();
this._disableIBus = false;
this._reloading = false;
},
reload() {
this._reloading = true;
this._keyboardManager.setKeyboardOptions(this._settings.keyboardOptions);
this._inputSourcesChanged();
this._reloading = false;
},
_ibusReadyCallback(im, ready) {
@ -398,7 +401,7 @@ var InputSourceManager = new Lang.Class({
return true;
},
_switchInputSource(display, window, binding) {
_switchInputSource(display, screen, window, binding) {
if (this._mruSources.length < 2)
return;
@ -458,7 +461,15 @@ var InputSourceManager = new Lang.Class({
},
activateInputSource(is, interactive) {
KeyboardManager.holdKeyboard();
// The focus changes during holdKeyboard/releaseKeyboard may trick
// the client into hiding UI containing the currently focused entry.
// So holdKeyboard/releaseKeyboard are not called when
// 'set-content-type' signal is received.
// E.g. Focusing on a password entry in a popup in Xorg Firefox
// will emit 'set-content-type' signal.
// https://gitlab.gnome.org/GNOME/gnome-shell/issues/391
if (!this._reloading)
KeyboardManager.holdKeyboard();
this._keyboardManager.apply(is.xkbId);
// All the "xkb:..." IBus engines simply "echo" back symbols,
@ -473,7 +484,10 @@ var InputSourceManager = new Lang.Class({
else
engine = 'xkb:us::eng';
this._ibusManager.setEngine(engine, KeyboardManager.releaseKeyboard);
if (!this._reloading)
this._ibusManager.setEngine(engine, KeyboardManager.releaseKeyboard);
else
this._ibusManager.setEngine(engine);
this._currentInputSourceChanged(is);
if (interactive)

View File

@ -419,12 +419,14 @@ var NMConnectionDevice = new Lang.Class({
this._deactivateItem.actor.visible = this._device.state > NM.DeviceState.DISCONNECTED;
if (this._activeConnection == null) {
this._activeConnection = this._device.active_connection;
if (this._activeConnection) {
ensureActiveConnectionProps(this._activeConnection, this._client);
let item = this._connectionItems.get(this._activeConnection.connection.get_uuid());
item.setActiveConnection(this._activeConnection);
let activeConnection = this._device.active_connection;
if (activeConnection && activeConnection.connection) {
let item = this._connectionItems.get(activeConnection.connection.get_uuid());
if (item) {
this._activeConnection = activeConnection;
ensureActiveConnectionProps(this._activeConnection, this._client);
item.setActiveConnection(this._activeConnection);
}
}
}
@ -995,16 +997,8 @@ var NMWirelessDialog = new Lang.Class({
else if (!oneHasConnection && twoHasConnection)
return 1;
let oneAp = one.accessPoints[0] || null;
let twoAp = two.accessPoints[0] || null;
if (oneAp != null && twoAp == null)
return -1;
else if (oneAp == null && twoAp != null)
return 1;
let oneStrength = oneAp.strength;
let twoStrength = twoAp.strength;
let oneStrength = one.accessPoints[0].strength;
let twoStrength = two.accessPoints[0].strength;
// place stronger connections first
if (oneStrength != twoStrength)
@ -1164,11 +1158,6 @@ var NMWirelessDialog = new Lang.Class({
Util.ensureActorVisibleInScrollView(this._scrollView, network.item.actor);
this._selectNetwork(network);
});
network.item.actor.connect('destroy', () => {
let keyFocus = global.stage.key_focus;
if (keyFocus && keyFocus.contains(network.item.actor))
this._itemBox.grab_key_focus();
});
},
});

View File

@ -1,81 +0,0 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Lang = imports.lang;
const Meta = imports.gi.Meta;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
var RemoteAccessApplet = new Lang.Class({
Name: 'RemoteAccessApplet',
Extends: PanelMenu.SystemIndicator,
_init() {
this.parent();
let backend = Meta.get_backend();
let controller = backend.get_remote_access_controller();
if (!controller)
return;
// We can't possibly know about all types of screen sharing on X11, so
// showing these controls on X11 might give a false sense of security.
// Thus, only enable these controls when using Wayland, where we are
// in control of sharing.
if (!Meta.is_wayland_compositor())
return;
this._handles = new Set();
this._indicator = null;
this._menuSection = null;
controller.connect('new-handle', (controller, handle) => {
this._onNewHandle(handle);
});
},
_ensureControls() {
if (this._indicator)
return;
this._indicator = this._addIndicator();
this._indicator.icon_name = 'screen-shared-symbolic';
this._indicator.add_style_class_name('remote-access-indicator');
this._item =
new PopupMenu.PopupSubMenuMenuItem(_("Screen is Being Shared"),
true);
this._item.menu.addAction(_("Turn off"),
() => {
for (let handle of this._handles)
handle.stop();
});
this._item.icon.icon_name = 'screen-shared-symbolic';
this.menu.addMenuItem(this._item);
},
_sync() {
if (this._handles.size == 0) {
this._indicator.visible = false;
this._item.actor.visible = false;
} else {
this._indicator.visible = true;
this._item.actor.visible = true;
}
},
_onStopped(handle) {
this._handles.delete(handle);
this._sync();
},
_onNewHandle(handle) {
this._handles.add(handle);
handle.connect('stopped', this._onStopped.bind(this));
if (this._handles.size == 1) {
this._ensureControls();
this._sync();
}
},
});

View File

@ -58,6 +58,9 @@ var AltSwitcher = new Lang.Class({
childToShow = this._standard;
} else if (this._alternate.visible) {
childToShow = this._alternate;
} else {
this.actor.hide();
return;
}
let childShown = this.actor.get_child();
@ -79,7 +82,7 @@ var AltSwitcher = new Lang.Class({
global.sync_pointer();
}
this.actor.visible = (childToShow != null);
this.actor.show();
},
_onDestroy() {
@ -261,19 +264,8 @@ var Indicator = new Lang.Class({
item = new PopupMenu.PopupBaseMenuItem({ reactive: false,
can_focus: false });
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
'gnome-control-center.desktop'
);
if (app) {
let [icon, name] = [app.app_info.get_icon().names[0],
app.get_name()];
this._settingsAction = this._createActionButton(icon, name);
this._settingsAction.connect('clicked',
this._onSettingsClicked.bind(this));
} else {
log('Missing required core component Settings, expect trouble…');
this._settingsAction = new St.Widget();
}
this._settingsAction = this._createActionButton('preferences-system-symbolic', _("Settings"));
this._settingsAction.connect('clicked', () => { this._onSettingsClicked(); });
item.actor.add(this._settingsAction, { expand: true, x_fill: false });
this._orientationLockAction = this._createActionButton('', _("Orientation Lock"));
@ -291,7 +283,7 @@ var Indicator = new Lang.Class({
'icon-name',
bindFlags);
this._lockScreenAction = this._createActionButton('changes-prevent', _("Lock"));
this._lockScreenAction = this._createActionButton('changes-prevent-symbolic', _("Lock"));
this._lockScreenAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activateLockScreen();
@ -302,7 +294,7 @@ var Indicator = new Lang.Class({
'visible',
bindFlags);
this._suspendAction = this._createActionButton('media-playback-pause', _("Suspend"));
this._suspendAction = this._createActionButton('media-playback-pause-symbolic', _("Suspend"));
this._suspendAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activateSuspend();
@ -312,7 +304,7 @@ var Indicator = new Lang.Class({
'visible',
bindFlags);
this._powerOffAction = this._createActionButton('system-shutdown', _("Power Off"));
this._powerOffAction = this._createActionButton('system-shutdown-symbolic', _("Power Off"));
this._powerOffAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activatePowerOff();
@ -341,7 +333,8 @@ var Indicator = new Lang.Class({
_onSettingsClicked() {
this.menu.itemActivated();
let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop');
Main.overview.hide();
this._settingsApp.activate();
app.activate();
}
});

View File

@ -49,17 +49,19 @@ const BoltDeviceInterface = '<node> \
</interface> \
</node>';
const BoltClientProxy = Gio.DBusProxy.makeProxyWrapper(BoltClientInterface);
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);
/* */
var Status = {
DISCONNECTED: 'disconnected',
CONNECTING: 'connecting',
CONNECTED: 'connected',
AUTHORIZING: 'authorizing',
AUTH_ERROR: 'auth-error',
AUTHORIZED: 'authorized'
AUTHORIZED: 'authorized',
AUTHORIZED_SECURE: 'authorized-secure',
AUTHORIZED_NEWKEY: 'authorized-newkey'
};
var Policy = {
@ -68,7 +70,7 @@ var Policy = {
AUTO: 'auto'
};
var AuthCtrl = {
var AuthFlags = {
NONE: 'none',
};
@ -77,7 +79,6 @@ var AuthMode = {
ENABLED: 'enabled'
};
const BOLT_DBUS_CLIENT_IFACE = 'org.freedesktop.bolt1.Manager';
const BOLT_DBUS_NAME = 'org.freedesktop.bolt';
const BOLT_DBUS_PATH = '/org/freedesktop/bolt';
@ -87,26 +88,22 @@ var Client = new Lang.Class({
_init() {
this._proxy = null;
let nodeInfo = Gio.DBusNodeInfo.new_for_xml(BoltClientInterface);
Gio.DBusProxy.new(Gio.DBus.system,
Gio.DBusProxyFlags.DO_NOT_AUTO_START,
nodeInfo.lookup_interface(BOLT_DBUS_CLIENT_IFACE),
BOLT_DBUS_NAME,
BOLT_DBUS_PATH,
BOLT_DBUS_CLIENT_IFACE,
null,
this._onProxyReady.bind(this));
new BoltClientProxy(
Gio.DBus.system,
BOLT_DBUS_NAME,
BOLT_DBUS_PATH,
this._onProxyReady.bind(this)
);
this.probing = false;
},
_onProxyReady(o, res) {
try {
this._proxy = Gio.DBusProxy.new_finish(res);
} catch(e) {
log('error creating bolt proxy: %s'.format(e.message));
return;
}
_onProxyReady(proxy, error) {
if (error !== null) {
log('error creating bolt proxy: %s'.format(error.message));
return;
}
this._proxy = proxy;
this._propsChangedId = this._proxy.connect('g-properties-changed', this._onPropertiesChanged.bind(this));
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', this._onDeviceAdded.bind(this));
@ -144,10 +141,9 @@ var Client = new Lang.Class({
},
enrollDevice(id, policy, callback) {
this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE,
this._proxy.EnrollDeviceRemote(id, policy, AuthFlags.NONE,
(res, error) => {
if (error) {
Gio.DBusError.strip_remote_error(error);
callback(null, error);
return;
}
@ -232,7 +228,7 @@ var AuthRobot = new Lang.Class({
_onEnrollDone(device, error) {
if (error)
this.emit('enroll-failed', device, error);
this.emit('enroll-failed', error, device);
/* TODO: scan the list of devices to be authorized for children
* of this device and remove them (and their children and
@ -358,7 +354,7 @@ var Indicator = new Lang.Class({
_onEnrollFailed(obj, device, error) {
const title = _('Thunderbolt authorization error');
const body = _('Could not authorize the Thunderbolt device: %s'.format(error.message));
const body = _('Could not authorize the thunderbolt device: %s'.format(error.message));
this._notify(title, body);
}

View File

@ -12,8 +12,6 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Slider = imports.ui.slider;
const ALLOW_AMPLIFIED_VOLUME_KEY = 'allow-volume-above-100-percent';
var VOLUME_NOTIFY_ID = 1;
// Each Gvc.MixerControl is a connection to PulseAudio,
@ -38,11 +36,6 @@ var StreamSlider = new Lang.Class({
this.item = new PopupMenu.PopupBaseMenuItem({ activate: false });
this._slider = new Slider.Slider(0);
this._soundSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.sound' });
this._soundSettings.connect('changed::' + ALLOW_AMPLIFIED_VOLUME_KEY, this._amplifySettingsChanged.bind(this));
this._amplifySettingsChanged();
this._slider.connect('value-changed', this._sliderChanged.bind(this));
this._slider.connect('drag-end', this._notifyVolumeChange.bind(this));
@ -142,40 +135,21 @@ var StreamSlider = new Lang.Class({
this.emit('stream-updated');
},
_amplifySettingsChanged() {
this._allowAmplified = this._soundSettings.get_boolean(ALLOW_AMPLIFIED_VOLUME_KEY);
if (this._allowAmplified)
this._slider.setMaximumValue(this.getMaxLevel() / 100);
else
this._slider.setMaximumValue(1);
if (this._stream)
this._updateVolume();
},
getIcon() {
if (!this._stream)
return null;
let icons = ["audio-volume-muted-symbolic",
"audio-volume-low-symbolic",
"audio-volume-medium-symbolic",
"audio-volume-high-symbolic",
"audio-volume-overamplified-symbolic"];
let volume = this._stream.volume;
let n;
if (this._stream.is_muted || volume <= 0) {
n = 0;
return 'audio-volume-muted-symbolic';
} else {
n = Math.ceil(3 * volume / this._control.get_vol_max_norm());
if (n < 1)
n = 1;
else if (n > 3)
n = 4;
let n = Math.floor(3 * volume / this._control.get_vol_max_norm()) + 1;
if (n < 2)
return 'audio-volume-low-symbolic';
if (n >= 3)
return 'audio-volume-high-symbolic';
return 'audio-volume-medium-symbolic';
}
return icons[n];
},
getLevel() {
@ -183,14 +157,6 @@ var StreamSlider = new Lang.Class({
return null;
return 100 * this._stream.volume / this._control.get_vol_max_norm();
},
getMaxLevel() {
let maxVolume = this._control.get_vol_max_norm();
if (this._allowAmplified)
maxVolume = this._control.get_vol_max_amplified();
return 100 * maxVolume / this._control.get_vol_max_norm();
}
});
Signals.addSignalMethods(StreamSlider.prototype);
@ -344,10 +310,6 @@ var VolumeMenu = new Lang.Class({
getLevel() {
return this._output.getLevel();
},
getMaxLevel() {
return this._output.getMaxLevel();
}
});
@ -384,9 +346,8 @@ var Indicator = new Lang.Class({
return result;
let gicon = new Gio.ThemedIcon({ name: this._volumeMenu.getIcon() });
let level = parseInt(this._volumeMenu.getLevel());
let maxLevel = parseInt(this._volumeMenu.getMaxLevel());
Main.osdWindowManager.show(-1, gicon, null, level, maxLevel);
let level = this._volumeMenu.getLevel();
Main.osdWindowManager.show(-1, gicon, null, level);
return result;
}
});

View File

@ -192,9 +192,7 @@ var SwitcherPopup = new Lang.Class({
if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
return Clutter.EVENT_STOP;
// Note: pressing one of the below keys will destroy the popup only if
// that key is not used by the active popup's keyboard shortcut
if (keysym == Clutter.Escape || keysym == Clutter.Tab)
if (keysym == Clutter.Escape)
this.destroy();
return Clutter.EVENT_STOP;

View File

@ -311,6 +311,7 @@ var ViewSelector = new Lang.Class({
},
hide() {
this.reset();
this._workspacesDisplay.hide();
},
@ -459,7 +460,11 @@ var ViewSelector = new Lang.Class({
},
reset() {
global.stage.set_key_focus(null);
// Don't drop the key focus on Clutter's side if anything but the
// overview has pushed a modal (e.g. system modals when activated using
// the overview).
if (Main.modalCount <= 1)
global.stage.set_key_focus(null);
this._entry.text = '';

View File

@ -3,7 +3,6 @@
const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const GObject = imports.gi.GObject;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
@ -35,7 +34,6 @@ var WINDOW_ANIMATION_TIME = 0.25;
var DIM_BRIGHTNESS = -0.3;
var DIM_TIME = 0.500;
var UNDIM_TIME = 0.250;
var MOTION_THRESHOLD = 100;
var ONE_SECOND = 1000; // in ms
@ -202,25 +200,27 @@ var WorkspaceTracker = new Lang.Class({
let tracker = Shell.WindowTracker.get_default();
tracker.connect('startup-sequence-changed', this._queueCheckWorkspaces.bind(this));
let workspaceManager = global.workspace_manager;
workspaceManager.connect('notify::n-workspaces',
this._nWorkspacesChanged.bind(this));
global.window_manager.connect('switch-workspace',
this._queueCheckWorkspaces.bind(this));
global.screen.connect('notify::n-workspaces', this._nWorkspacesChanged.bind(this));
global.window_manager.connect('switch-workspace', this._queueCheckWorkspaces.bind(this));
global.display.connect('window-entered-monitor',
this._windowEnteredMonitor.bind(this));
global.display.connect('window-left-monitor',
this._windowLeftMonitor.bind(this));
global.display.connect('restacked',
this._windowsRestacked.bind(this));
global.screen.connect('window-entered-monitor', this._windowEnteredMonitor.bind(this));
global.screen.connect('window-left-monitor', this._windowLeftMonitor.bind(this));
global.screen.connect('restacked', this._windowsRestacked.bind(this));
this._workspaceSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
this._workspaceSettings = this._getWorkspaceSettings();
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
this._nWorkspacesChanged();
},
_getWorkspaceSettings() {
let settings = global.get_overrides_settings();
if (settings &&
settings.settings_schema.list_keys().indexOf('dynamic-workspaces') > -1)
return settings;
return new Gio.Settings({ schema_id: 'org.gnome.mutter' });
},
blockUpdates() {
this._pauseWorkspaceCheck = true;
},
@ -230,7 +230,6 @@ var WorkspaceTracker = new Lang.Class({
},
_checkWorkspaces() {
let workspaceManager = global.workspace_manager;
let i;
let emptyWorkspaces = [];
@ -258,7 +257,7 @@ var WorkspaceTracker = new Lang.Class({
let sequences = Shell.WindowTracker.get_default().get_startup_sequences();
for (i = 0; i < sequences.length; i++) {
let index = sequences[i].get_workspace();
if (index >= 0 && index <= workspaceManager.n_workspaces)
if (index >= 0 && index <= global.screen.n_workspaces)
emptyWorkspaces[index] = false;
}
@ -276,17 +275,17 @@ var WorkspaceTracker = new Lang.Class({
// If we don't have an empty workspace at the end, add one
if (!emptyWorkspaces[emptyWorkspaces.length -1]) {
workspaceManager.append_new_workspace(false, global.get_current_time());
global.screen.append_new_workspace(false, global.get_current_time());
emptyWorkspaces.push(false);
}
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
emptyWorkspaces[activeWorkspaceIndex] = false;
// Delete other empty workspaces; do it from the end to avoid index changes
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
if (emptyWorkspaces[i])
workspaceManager.remove_workspace(this._workspaces[i], global.get_current_time());
global.screen.remove_workspace(this._workspaces[i], global.get_current_time());
}
this._checkWorkspacesId = 0;
@ -318,14 +317,14 @@ var WorkspaceTracker = new Lang.Class({
GLib.Source.set_name_by_id(id, '[gnome-shell] this._queueCheckWorkspaces');
},
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
_windowLeftMonitor(metaScreen, monitorIndex, metaWin) {
// If the window left the primary monitor, that
// might make that workspace empty
if (monitorIndex == Main.layoutManager.primaryIndex)
this._queueCheckWorkspaces();
},
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
_windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
// If the window entered the primary monitor, that
// might make that workspace non-empty
if (monitorIndex == Main.layoutManager.primaryIndex)
@ -345,9 +344,8 @@ var WorkspaceTracker = new Lang.Class({
},
_nWorkspacesChanged() {
let workspaceManager = global.workspace_manager;
let oldNumWorkspaces = this._workspaces.length;
let newNumWorkspaces = workspaceManager.n_workspaces;
let newNumWorkspaces = global.screen.n_workspaces;
if (oldNumWorkspaces == newNumWorkspaces)
return false;
@ -358,7 +356,7 @@ var WorkspaceTracker = new Lang.Class({
// Assume workspaces are only added at the end
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++)
this._workspaces[w] = workspaceManager.get_workspace_by_index(w);
this._workspaces[w] = global.screen.get_workspace_by_index(w);
for (w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
let workspace = this._workspaces[w];
@ -372,7 +370,7 @@ var WorkspaceTracker = new Lang.Class({
let removedIndex;
let removedNum = oldNumWorkspaces - newNumWorkspaces;
for (let w = 0; w < oldNumWorkspaces; w++) {
let workspace = workspaceManager.get_workspace_by_index(w);
let workspace = global.screen.get_workspace_by_index(w);
if (this._workspaces[w] != workspace) {
removedIndex = w;
break;
@ -489,8 +487,13 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({
},
_checkActivated() {
const MOTION_THRESHOLD = 50;
let allowedModes = Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW;
let dir;
if ((allowedModes & Main.actionMode) == 0)
return;
if (this._dy < -MOTION_THRESHOLD)
dir = Meta.MotionDirection.DOWN;
else if (this._dy > MOTION_THRESHOLD)
@ -500,35 +503,26 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({
else if (this._dx > MOTION_THRESHOLD)
dir = Meta.MotionDirection.LEFT;
else
return false;
return;
this.emit('activated', dir);
return true;
},
_handleEvent(actor, event) {
let allowedModes = Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW;
if (event.type() != Clutter.EventType.TOUCHPAD_SWIPE)
return Clutter.EVENT_PROPAGATE;
if (event.get_touchpad_gesture_finger_count() != 4)
return Clutter.EVENT_PROPAGATE;
if ((allowedModes & Main.actionMode) == 0)
return Clutter.EVENT_PROPAGATE;
if (event.get_gesture_phase() == Clutter.TouchpadGesturePhase.UPDATE) {
let [dx, dy] = event.get_gesture_motion_delta();
// Scale deltas up a bit to make it feel snappier
this._dx += dx * 2;
this._dy += dy * 2;
this.emit('motion', this._dx, this._dy);
this._dx += dx;
this._dy += dy;
} else {
if ((event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END && ! this._checkActivated()) ||
event.get_gesture_phase() == Clutter.TouchpadGesturePhase.CANCEL)
this.emit('cancel');
if (event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END)
this._checkActivated();
this._dx = 0;
this._dy = 0;
@ -542,14 +536,14 @@ Signals.addSignalMethods(TouchpadWorkspaceSwitchAction.prototype);
var WorkspaceSwitchAction = new Lang.Class({
Name: 'WorkspaceSwitchAction',
Extends: Clutter.SwipeAction,
Signals: { 'activated': { param_types: [Meta.MotionDirection.$gtype] },
'motion': { param_types: [GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'cancel': { param_types: [] }},
Signals: { 'activated': { param_types: [Meta.MotionDirection.$gtype] } },
_init() {
const MOTION_THRESHOLD = 50;
this.parent();
this.set_n_touch_points(4);
this._swept = false;
this.set_threshold_trigger_distance(MOTION_THRESHOLD, MOTION_THRESHOLD);
global.display.connect('grab-op-begin', () => {
this.cancel();
@ -559,35 +553,13 @@ var WorkspaceSwitchAction = new Lang.Class({
vfunc_gesture_prepare(actor) {
let allowedModes = Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW;
this._swept = false;
if (!this.parent(actor))
return false;
return (allowedModes & Main.actionMode);
},
vfunc_gesture_progress(actor) {
let [x, y] = this.get_motion_coords(0);
let [xPress, yPress] = this.get_press_coords(0);
this.emit('motion', x - xPress, y - yPress);
return true;
},
vfunc_gesture_cancel(actor) {
if (!this._swept)
this.emit('cancel');
},
vfunc_swipe(actor, direction) {
let [x, y] = this.get_motion_coords(0);
let [xPress, yPress] = this.get_press_coords(0);
if (Math.abs(x - xPress) < MOTION_THRESHOLD &&
Math.abs(y - yPress) < MOTION_THRESHOLD) {
this.emit('cancel');
return;
}
vfunc_swept(actor, direction) {
let dir;
if (direction & Clutter.SwipeDirection.UP)
@ -599,7 +571,6 @@ var WorkspaceSwitchAction = new Lang.Class({
else if (direction & Clutter.SwipeDirection.RIGHT)
dir = Meta.MotionDirection.LEFT;
this._swept = true;
this.emit('activated', dir);
}
});
@ -721,14 +692,7 @@ var WindowManager = new Lang.Class({
this._isWorkspacePrepended = false;
this._switchData = null;
this._shellwm.connect('kill-switch-workspace', (shellwm) => {
if (this._switchData) {
if (this._switchData.inProgress)
this._switchWorkspaceDone(shellwm);
else if (!this._switchData.gestureActivated)
this._finishWorkspaceSwitch(this._switchData);
}
});
this._shellwm.connect('kill-switch-workspace', this._switchWorkspaceDone.bind(this));
this._shellwm.connect('kill-window-effects', (shellwm, actor) => {
this._minimizeWindowDone(shellwm, actor);
this._mapWindowDone(shellwm, actor);
@ -750,7 +714,7 @@ var WindowManager = new Lang.Class({
this._shellwm.connect('confirm-display-change', this._confirmDisplayChange.bind(this));
this._shellwm.connect('create-close-dialog', this._createCloseDialog.bind(this));
this._shellwm.connect('create-inhibit-shortcuts-dialog', this._createInhibitShortcutsDialog.bind(this));
global.display.connect('restacked', this._syncStacking.bind(this));
global.screen.connect('restacked', this._syncStacking.bind(this));
this._workspaceSwitcherPopup = null;
this._tilePreview = null;
@ -1006,20 +970,16 @@ var WindowManager = new Lang.Class({
if (Main.sessionMode.hasWorkspaces)
this._workspaceTracker = new WorkspaceTracker(this);
global.workspace_manager.override_workspace_layout(Meta.DisplayCorner.TOPLEFT,
false, -1, 1);
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
false, -1, 1);
let gesture = new WorkspaceSwitchAction();
gesture.connect('motion', this._switchWorkspaceMotion.bind(this));
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
gesture.connect('cancel', this._switchWorkspaceCancel.bind(this));
global.stage.add_action(gesture);
// This is not a normal Clutter.GestureAction, doesn't need add_action()
gesture = new TouchpadWorkspaceSwitchAction(global.stage);
gesture.connect('motion', this._switchWorkspaceMotion.bind(this));
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
gesture.connect('cancel', this._switchWorkspaceCancel.bind(this));
gesture = new AppSwitchAction();
gesture.connect('activated', this._switchApp.bind(this));
@ -1031,14 +991,6 @@ var WindowManager = new Lang.Class({
Main.keyboard.show(Main.layoutManager.bottomIndex);
});
global.stage.add_action(gesture);
gesture = new EdgeDragAction.EdgeDragAction(St.Side.TOP, mode);
gesture.connect('activated', () => {
let currentWindow = global.display.focus_window;
if (currentWindow)
currentWindow.unmake_fullscreen();
});
global.stage.add_action(gesture);
},
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
@ -1048,52 +1000,9 @@ var WindowManager = new Lang.Class({
return this._currentPadOsd.actor;
},
_switchWorkspaceMotion(action, xRel, yRel) {
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
if (!this._switchData)
this._prepareWorkspaceSwitch(activeWorkspace.index(), -1);
if (yRel < 0 && !this._switchData.surroundings[Meta.MotionDirection.DOWN])
yRel = 0;
if (yRel > 0 && !this._switchData.surroundings[Meta.MotionDirection.UP])
yRel = 0;
if (xRel < 0 && !this._switchData.surroundings[Meta.MotionDirection.RIGHT])
xRel = 0;
if (xRel > 0 && !this._switchData.surroundings[Meta.MotionDirection.LEFT])
xRel = 0;
this._switchData.container.set_position(xRel, yRel);
},
_switchWorkspaceCancel() {
if (!this._switchData || this._switchData.inProgress)
return;
let switchData = this._switchData;
this._switchData = null;
Tweener.addTween(switchData.container,
{ x: 0,
y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._finishWorkspaceSwitch,
onCompleteScope: this,
onCompleteParams: [switchData],
});
},
_actionSwitchWorkspace(action, direction) {
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let newWs = activeWorkspace.get_neighbor(direction);
if (newWs == activeWorkspace) {
this._switchWorkspaceCancel();
} else {
this._switchData.gestureActivated = true;
let newWs = global.screen.get_active_workspace().get_neighbor(direction);
this.actionMoveWorkspace(newWs);
}
},
_lookupIndex(windows, metaWindow) {
@ -1108,10 +1017,8 @@ var WindowManager = new Lang.Class({
_switchApp() {
let windows = global.get_window_actors().filter(actor => {
let win = actor.metaWindow;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
return (!win.is_override_redirect() &&
win.located_on_workspace(activeWorkspace));
win.located_on_workspace(global.screen.get_active_workspace()));
});
if (windows.length == 0)
@ -1135,12 +1042,10 @@ var WindowManager = new Lang.Class({
},
insertWorkspace(pos) {
let workspaceManager = global.workspace_manager;
if (!Meta.prefs_get_dynamic_workspaces())
return;
workspaceManager.append_new_workspace(false, global.get_current_time());
global.screen.append_new_workspace(false, global.get_current_time());
let windows = global.get_window_actors().map(a => a.meta_window);
@ -1164,9 +1069,9 @@ var WindowManager = new Lang.Class({
// 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();
let activeIndex = global.screen.get_active_workspace_index();
if (activeIndex >= pos) {
let newWs = workspaceManager.get_workspace_by_index(activeIndex + 1);
let newWs = global.screen.get_workspace_by_index(activeIndex + 1);
this._blockAnimations = true;
newWs.activate(global.get_current_time());
this._blockAnimations = false;
@ -1773,104 +1678,63 @@ var WindowManager = new Lang.Class({
if (this._switchData == null)
return;
// Update stacking of windows in inGroup (aka the workspace we are
// switching to). Windows in outGroup are about to be hidden anyway,
// so we just ignore them here.
let windows = global.get_window_actors();
let lastCurSibling = null;
let lastDirSibling = [];
let sibling = null;
for (let i = 0; i < windows.length; i++) {
if (windows[i].get_parent() == this._switchData.curGroup) {
this._switchData.curGroup.set_child_above_sibling(windows[i], lastCurSibling);
lastCurSibling = windows[i];
} else {
for (let dir of Object.values(Meta.MotionDirection)) {
let info = this._switchData.surroundings[dir];
if (!info || windows[i].get_parent() != info.actor)
continue;
if (windows[i].get_parent() != this._switchData.inGroup)
continue;
let sibling = lastDirSibling[dir];
if (sibling == undefined)
sibling = null;
info.actor.set_child_above_sibling(windows[i], sibling);
lastDirSibling[dir] = windows[i];
break;
}
}
this._switchData.inGroup.set_child_above_sibling(windows[i], sibling);
sibling = windows[i];
}
},
_getPositionForDirection(direction) {
_switchWorkspace(shellwm, from, to, direction) {
if (!Main.sessionMode.hasWorkspaces || !this._shouldAnimate()) {
shellwm.completed_switch_workspace();
return;
}
let windows = global.get_window_actors();
/* @direction is the direction that the "camera" moves, so the
* screen contents have to move one screen's worth in the
* opposite direction.
*/
let xDest = 0, yDest = 0;
if (direction == Meta.MotionDirection.UP ||
direction == Meta.MotionDirection.UP_LEFT ||
direction == Meta.MotionDirection.UP_RIGHT)
yDest = -global.screen_height + Main.panel.actor.height;
yDest = global.screen_height - Main.panel.actor.height;
else if (direction == Meta.MotionDirection.DOWN ||
direction == Meta.MotionDirection.DOWN_LEFT ||
direction == Meta.MotionDirection.DOWN_RIGHT)
yDest = global.screen_height - Main.panel.actor.height;
yDest = -global.screen_height + Main.panel.actor.height;
if (direction == Meta.MotionDirection.LEFT ||
direction == Meta.MotionDirection.UP_LEFT ||
direction == Meta.MotionDirection.DOWN_LEFT)
xDest = -global.screen_width;
xDest = global.screen_width;
else if (direction == Meta.MotionDirection.RIGHT ||
direction == Meta.MotionDirection.UP_RIGHT ||
direction == Meta.MotionDirection.DOWN_RIGHT)
xDest = global.screen_width;
xDest = -global.screen_width;
return [xDest, yDest];
},
_prepareWorkspaceSwitch(from, to, direction) {
if (this._switchData)
return;
let wgroup = global.window_group;
let windows = global.get_window_actors();
let switchData = {};
this._switchData = switchData;
switchData.curGroup = new Clutter.Actor();
switchData.inGroup = new Clutter.Actor();
switchData.outGroup = new Clutter.Actor();
switchData.movingWindowBin = new Clutter.Actor();
switchData.windows = [];
switchData.surroundings = {};
switchData.gestureActivated = false;
switchData.inProgress = false;
switchData.container = new Clutter.Actor();
switchData.container.add_actor(switchData.curGroup);
let wgroup = global.window_group;
wgroup.add_actor(switchData.inGroup);
wgroup.add_actor(switchData.outGroup);
wgroup.add_actor(switchData.movingWindowBin);
wgroup.add_actor(switchData.container);
let workspaceManager = global.workspace_manager;
let curWs = workspaceManager.get_workspace_by_index (from);
for (let dir of Object.values(Meta.MotionDirection)) {
let ws = null;
if (to < 0)
ws = curWs.get_neighbor(dir);
else if (dir == direction)
ws = workspaceManager.get_workspace_by_index(to);
if (ws == null || ws == curWs) {
switchData.surroundings[dir] = null;
continue;
}
let info = { index: ws.index(),
actor: new Clutter.Actor() };
switchData.surroundings[dir] = info;
switchData.container.add_actor(info.actor);
info.actor.raise_top();
let [x, y] = this._getPositionForDirection(dir);
info.actor.set_position(x, y);
}
switchData.movingWindowBin.raise_top();
for (let i = 0; i < windows.length; i++) {
let actor = windows[i];
@ -1891,70 +1755,28 @@ var WindowManager = new Lang.Class({
actor.reparent(switchData.movingWindowBin);
} else if (window.get_workspace().index() == from) {
switchData.windows.push(record);
actor.reparent(switchData.curGroup);
} else {
let visible = false;
for (let dir of Object.values(Meta.MotionDirection)) {
let info = switchData.surroundings[dir];
if (!info || info.index != window.get_workspace().index())
continue;
switchData.windows.push(record);
actor.reparent(info.actor);
visible = true;
break;
}
actor.visible = visible;
actor.reparent(switchData.outGroup);
} else if (window.get_workspace().index() == to) {
switchData.windows.push(record);
actor.reparent(switchData.inGroup);
actor.show();
}
}
},
_finishWorkspaceSwitch(switchData) {
this._switchData = null;
for (let i = 0; i < switchData.windows.length; i++) {
let w = switchData.windows[i];
if (w.window.is_destroyed()) // Window gone
continue;
w.window.reparent(w.parent);
if (w.window.get_meta_window().get_workspace() !=
global.workspace_manager.get_active_workspace())
w.window.hide();
}
Tweener.removeTweens(switchData.container);
switchData.container.destroy();
switchData.movingWindowBin.destroy();
this._movingWindow = null;
},
_switchWorkspace(shellwm, from, to, direction) {
if (!Main.sessionMode.hasWorkspaces || !this._shouldAnimate()) {
shellwm.completed_switch_workspace();
return;
w.windowDestroyId = w.window.connect('destroy', () => {
switchData.windows.splice(switchData.windows.indexOf(w), 1);
});
}
// If we come from a gesture, switchData will already be set,
// and we don't want to overwrite it.
if (!this._switchData)
this._prepareWorkspaceSwitch(from, to, direction);
switchData.inGroup.set_position(-xDest, -yDest);
switchData.inGroup.raise_top();
this._switchData.inProgress = true;
switchData.movingWindowBin.raise_top();
let [xDest, yDest] = this._getPositionForDirection(direction);
/* @direction is the direction that the "camera" moves, so the
* screen contents have to move one screen's worth in the
* opposite direction.
*/
xDest = -xDest;
yDest = -yDest;
Tweener.addTween(this._switchData.container,
Tweener.addTween(switchData.outGroup,
{ x: xDest,
y: yDest,
time: WINDOW_ANIMATION_TIME,
@ -1963,10 +1785,39 @@ var WindowManager = new Lang.Class({
onCompleteScope: this,
onCompleteParams: [shellwm]
});
Tweener.addTween(switchData.inGroup,
{ x: 0,
y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad'
});
},
_switchWorkspaceDone(shellwm) {
this._finishWorkspaceSwitch(this._switchData);
let switchData = this._switchData;
if (!switchData)
return;
this._switchData = null;
for (let i = 0; i < switchData.windows.length; i++) {
let w = switchData.windows[i];
w.window.disconnect(w.windowDestroyId);
if (w.window.get_parent() == switchData.outGroup) {
w.window.reparent(w.parent);
w.window.hide();
} else
w.window.reparent(w.parent);
}
Tweener.removeTweens(switchData.inGroup);
Tweener.removeTweens(switchData.outGroup);
switchData.inGroup.destroy();
switchData.outGroup.destroy();
switchData.movingWindowBin.destroy();
if (this._movingWindow)
this._movingWindow = null;
shellwm.completed_switch_workspace();
},
@ -1986,7 +1837,7 @@ var WindowManager = new Lang.Class({
this._windowMenuManager.showWindowMenuForWindow(window, menu, rect);
},
_startSwitcher(display, window, binding) {
_startSwitcher(display, screen, window, binding) {
let constructor = null;
switch (binding.get_name()) {
case 'switch-applications':
@ -2025,15 +1876,15 @@ var WindowManager = new Lang.Class({
tabPopup.destroy();
},
_startA11ySwitcher(display, window, binding) {
_startA11ySwitcher(display, screen, window, binding) {
Main.ctrlAltTabManager.popup(binding.is_reversed(), binding.get_name(), binding.get_mask());
},
_toggleAppMenu(display, window, event, binding) {
_toggleAppMenu(display, screen, window, event, binding) {
Main.panel.toggleAppMenu();
},
_toggleCalendar(display, window, event, binding) {
_toggleCalendar(display, screen, window, event, binding) {
Main.panel.toggleCalendar();
},
@ -2046,13 +1897,11 @@ var WindowManager = new Lang.Class({
OrigTweener.resumeAllTweens();
},
_showWorkspaceSwitcher(display, window, binding) {
let workspaceManager = display.get_workspace_manager();
_showWorkspaceSwitcher(display, screen, window, binding) {
if (!Main.sessionMode.hasWorkspaces)
return;
if (workspaceManager.n_workspaces == 1)
if (screen.n_workspaces == 1)
return;
let [action,,,target] = binding.get_name().split('-');
@ -2071,22 +1920,22 @@ var WindowManager = new Lang.Class({
if (target == 'last') {
direction = Meta.MotionDirection.DOWN;
newWs = workspaceManager.get_workspace_by_index(workspaceManager.n_workspaces - 1);
newWs = screen.get_workspace_by_index(screen.n_workspaces - 1);
} else if (isNaN(target)) {
// Prepend a new workspace dynamically
if (workspaceManager.get_active_workspace_index() == 0 &&
if (screen.get_active_workspace_index() == 0 &&
action == 'move' && target == 'up' && this._isWorkspacePrepended == false) {
this.insertWorkspace(0);
this._isWorkspacePrepended = true;
}
direction = Meta.MotionDirection[target.toUpperCase()];
newWs = workspaceManager.get_active_workspace().get_neighbor(direction);
newWs = screen.get_active_workspace().get_neighbor(direction);
} else if (target > 0) {
target--;
newWs = workspaceManager.get_workspace_by_index(target);
newWs = screen.get_workspace_by_index(target);
if (workspaceManager.get_active_workspace().index() > target)
if (screen.get_active_workspace().index() > target)
direction = Meta.MotionDirection.UP;
else
direction = Meta.MotionDirection.DOWN;
@ -2119,8 +1968,7 @@ var WindowManager = new Lang.Class({
if (!Main.sessionMode.hasWorkspaces)
return;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let activeWorkspace = global.screen.get_active_workspace();
if (activeWorkspace != workspace)
workspace.activate(global.get_current_time());
@ -2130,8 +1978,7 @@ var WindowManager = new Lang.Class({
if (!Main.sessionMode.hasWorkspaces)
return;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let activeWorkspace = global.screen.get_active_workspace();
if (activeWorkspace != workspace) {
// This won't have any effect for "always sticky" windows

View File

@ -126,15 +126,15 @@ var WindowMenu = new Lang.Class({
}
}
let display = global.display;
let nMonitors = display.get_n_monitors();
let screen = global.screen;
let nMonitors = screen.get_n_monitors();
let monitorIndex = window.get_monitor();
if (nMonitors > 1 && monitorIndex >= 0) {
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
let dir = Meta.ScreenDirection.UP;
let upMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
screen.get_monitor_neighbor_index(monitorIndex, dir);
if (upMonitorIndex != -1) {
this.addAction(_("Move to Monitor Up"), () => {
window.move_to_monitor(upMonitorIndex);
@ -143,7 +143,7 @@ var WindowMenu = new Lang.Class({
dir = Meta.ScreenDirection.DOWN;
let downMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
screen.get_monitor_neighbor_index(monitorIndex, dir);
if (downMonitorIndex != -1) {
this.addAction(_("Move to Monitor Down"), () => {
window.move_to_monitor(downMonitorIndex);
@ -152,7 +152,7 @@ var WindowMenu = new Lang.Class({
dir = Meta.ScreenDirection.LEFT;
let leftMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
screen.get_monitor_neighbor_index(monitorIndex, dir);
if (leftMonitorIndex != -1) {
this.addAction(_("Move to Monitor Left"), () => {
window.move_to_monitor(leftMonitorIndex);
@ -161,7 +161,7 @@ var WindowMenu = new Lang.Class({
dir = Meta.ScreenDirection.RIGHT;
let rightMonitorIndex =
display.get_monitor_neighbor_index(monitorIndex, dir);
screen.get_monitor_neighbor_index(monitorIndex, dir);
if (rightMonitorIndex != -1) {
this.addAction(_("Move to Monitor Right"), () => {
window.move_to_monitor(rightMonitorIndex);

View File

@ -110,7 +110,6 @@ var WindowClone = new Lang.Class({
this.metaWindow = realWindow.meta_window;
this.metaWindow._delegate = this;
this._workspace = workspace;
this._attachedDialogs = [];
this._windowClone = new Clutter.Clone({ source: realWindow });
// We expect this.actor to be used for all interaction rather than
@ -180,7 +179,6 @@ var WindowClone = new Lang.Class({
this.inDrag = false;
this._selected = false;
this._closeRequested = false;
},
set slot(slot) {
@ -196,6 +194,7 @@ var WindowClone = new Lang.Class({
deleteAll() {
// Delete all windows, starting from the bottom-most (most-modal) one
let windows = this.actor.get_children();
for (let i = windows.length - 1; i >= 1; i--) {
let realWindow = windows[i].source;
@ -205,34 +204,15 @@ var WindowClone = new Lang.Class({
}
this.metaWindow.delete(global.get_current_time());
this._closeRequested = true;
},
addDialog(win) {
let realWin = win.get_compositor_private();
if (this._attachedDialogs.includes(realWin))
return;
this._attachedDialogs.push(realWin);
let parent = win.get_transient_for();
while (parent.is_attached_dialog())
parent = parent.get_transient_for();
// Display dialog if it is attached to our metaWindow
if (win.is_attached_dialog() && parent == this.metaWindow) {
this._doAddAttachedDialog(win, win.get_compositor_private());
this._onMetaWindowSizeChanged();
}
// The dialog popped up after the user tried to close the window,
// assume it's a close confirmation and leave the overview
if (this._closeRequested)
this._activate();
addAttachedDialog(win) {
this._doAddAttachedDialog(win, win.get_compositor_private());
this._onMetaWindowSizeChanged();
},
hasAttachedDialogs() {
return this._attachedDialogs.length > 1;
return this.actor.get_n_children() > 1;
},
_doAddAttachedDialog(metaWin, realWin) {
@ -242,9 +222,6 @@ var WindowClone = new Lang.Class({
clone._posChangedId = metaWin.connect('position-changed',
this._onMetaWindowSizeChanged.bind(this));
clone._destroyId = realWin.connect('destroy', () => {
let idx = this._attachedDialogs.indexOf(realWin);
this._attachedDialogs.splice(idx, 1);
clone.destroy();
this._onMetaWindowSizeChanged();
@ -471,13 +448,12 @@ var WindowOverlay = new Lang.Class({
this.border = new St.Bin({ style_class: 'window-clone-border' });
let title = new St.Label({ style_class: 'window-caption',
text: this._getCaption() });
text: metaWindow.title });
title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
windowClone.actor.label_actor = title;
this._updateCaptionId = metaWindow.connect('notify::title', w => {
this.title.text = w.title;
this.title.text = this._getCaption();
this.relayout(false);
});
@ -485,14 +461,15 @@ var WindowOverlay = new Lang.Class({
button._overlap = 0;
this._idleToggleCloseId = 0;
button.connect('clicked', () => this._windowClone.deleteAll());
button.connect('clicked', this._closeWindow.bind(this));
windowClone.actor.connect('destroy', this._onDestroy.bind(this));
windowClone.connect('show-chrome', this._onShowChrome.bind(this));
windowClone.connect('hide-chrome', this._onHideChrome.bind(this));
this._windowAddedId = 0;
button.hide();
title.hide();
this.title = title;
this.closeButton = button;
@ -567,12 +544,10 @@ var WindowOverlay = new Lang.Class({
let titleX = cloneX + (cloneWidth - title.width) / 2;
let titleY = cloneY + cloneHeight - (title.height - this.borderSize) / 2;
if (animate) {
this._animateOverlayActor(title, Math.floor(titleX), Math.floor(titleY), title.width);
} else {
title.width = title.width;
if (animate)
this._animateOverlayActor(title, Math.floor(titleX), Math.floor(titleY));
else
title.set_position(Math.floor(titleX), Math.floor(titleY));
}
let borderX = cloneX - this.borderSize;
let borderY = cloneY - this.borderSize;
@ -588,35 +563,58 @@ var WindowOverlay = new Lang.Class({
}
},
_getCaption() {
let metaWindow = this._windowClone.metaWindow;
if (metaWindow.title)
return metaWindow.title;
let tracker = Shell.WindowTracker.get_default();
let app = tracker.get_window_app(metaWindow);
return app.get_name();
},
_animateOverlayActor(actor, x, y, width, height) {
let params = { x: x,
y: y,
width: width,
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad' };
if (width !== undefined)
params.width = width;
if (height !== undefined)
params.height = height;
Tweener.addTween(actor, params);
},
_closeWindow(actor) {
let metaWindow = this._windowClone.metaWindow;
this._workspace = metaWindow.get_workspace();
this._windowAddedId = this._workspace.connect('window-added',
this._onWindowAdded.bind(this));
this._windowClone.deleteAll();
},
_windowCanClose() {
return this._windowClone.metaWindow.can_close() &&
!this._windowClone.hasAttachedDialogs();
},
_onWindowAdded(workspace, win) {
let metaWindow = this._windowClone.metaWindow;
if (win.get_transient_for() == metaWindow) {
workspace.disconnect(this._windowAddedId);
this._windowAddedId = 0;
// use an idle handler to avoid mapping problems -
// see comment in Workspace._windowAdded
let id = Mainloop.idle_add(() => {
this._windowClone.emit('selected');
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(id, '[gnome-shell] this._windowClone.emit');
}
},
_onDestroy() {
if (this._windowAddedId > 0) {
this._workspace.disconnect(this._windowAddedId);
this._windowAddedId = 0;
}
if (this._idleToggleCloseId > 0) {
Mainloop.source_remove(this._idleToggleCloseId);
this._idleToggleCloseId = 0;
@ -1147,10 +1145,10 @@ var Workspace = new Lang.Class({
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
this._windowRemoved.bind(this));
}
this._windowEnteredMonitorId = global.display.connect('window-entered-monitor',
this._windowEnteredMonitor.bind(this));
this._windowLeftMonitorId = global.display.connect('window-left-monitor',
this._windowLeftMonitor.bind(this));
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
this._windowEnteredMonitor.bind(this));
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
this._windowLeftMonitor.bind(this));
this._repositionWindowsId = 0;
this.leavingOverview = false;
@ -1296,8 +1294,7 @@ var Workspace = new Lang.Class({
let area = padArea(this._actualGeometry, padding);
let slots = strategy.computeWindowSlots(layout, area);
let workspaceManager = global.workspace_manager;
let currentWorkspace = workspaceManager.get_active_workspace();
let currentWorkspace = global.screen.get_active_workspace();
let isOnCurrentWorkspace = this.metaWorkspace == null || this.metaWorkspace == currentWorkspace;
for (let i = 0; i < slots.length; i++) {
@ -1506,17 +1503,21 @@ var Workspace = new Lang.Class({
return;
if (!this._isOverviewWindow(win)) {
if (metaWin.get_transient_for() == null)
return;
if (metaWin.is_attached_dialog()) {
let parent = metaWin.get_transient_for();
while (parent.is_attached_dialog())
parent = parent.get_transient_for();
// Let the top-most ancestor handle all transients
let parent = metaWin.find_root_ancestor();
let clone = this._windows.find(c => c.metaWindow == parent);
let idx = this._lookupIndex (parent);
if (idx < 0) {
// parent was not created yet, it will take care
// of the dialog when created
return;
}
// If no clone was found, the parent hasn't been created yet
// and will take care of the dialog when added
if (clone)
clone.addDialog(metaWin);
let clone = this._windows[idx];
clone.addAttachedDialog(metaWin);
}
return;
}
@ -1548,13 +1549,13 @@ var Workspace = new Lang.Class({
this._doRemoveWindow(metaWin);
},
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
_windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
if (monitorIndex == this.monitorIndex) {
this._doAddWindow(metaWin);
}
},
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
_windowLeftMonitor(metaScreen, monitorIndex, metaWin) {
if (monitorIndex == this.monitorIndex) {
this._doRemoveWindow(metaWin);
}
@ -1579,9 +1580,7 @@ var Workspace = new Lang.Class({
if (this._windows.length == 0)
return;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
if (this.metaWorkspace != null && this.metaWorkspace != activeWorkspace)
if (this.metaWorkspace != null && this.metaWorkspace != global.screen.get_active_workspace())
return;
// Special case maximized windows, since it doesn't make sense
@ -1637,9 +1636,7 @@ var Workspace = new Lang.Class({
this._repositionWindowsId = 0;
}
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
if (this.metaWorkspace != null && this.metaWorkspace != activeWorkspace)
if (this.metaWorkspace != null && this.metaWorkspace != global.screen.get_active_workspace())
return;
// Special case maximized windows, since it doesn't make sense
@ -1709,8 +1706,7 @@ var Workspace = new Lang.Class({
},
zoomFromOverview() {
let workspaceManager = global.workspace_manager;
let currentWorkspace = workspaceManager.get_active_workspace();
let currentWorkspace = global.screen.get_active_workspace();
this.leavingOverview = true;
@ -1778,8 +1774,8 @@ var Workspace = new Lang.Class({
this.metaWorkspace.disconnect(this._windowAddedId);
this.metaWorkspace.disconnect(this._windowRemovedId);
}
global.display.disconnect(this._windowEnteredMonitorId);
global.display.disconnect(this._windowLeftMonitorId);
global.screen.disconnect(this._windowEnteredMonitorId);
global.screen.disconnect(this._windowLeftMonitorId);
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
@ -2014,8 +2010,7 @@ var Workspace = new Lang.Class({
if (metaWindow.get_monitor() != this.monitorIndex)
metaWindow.move_to_monitor(this.monitorIndex);
let workspaceManager = global.workspace_manager;
let index = this.metaWorkspace ? this.metaWorkspace.index() : workspaceManager.get_active_workspace_index();
let index = this.metaWorkspace ? this.metaWorkspace.index() : global.screen.get_active_workspace_index();
metaWindow.change_workspace_by_index(index, false);
return true;
} else if (source.shellWorkspaceLaunch) {

View File

@ -47,12 +47,9 @@ var WorkspaceSwitcherPopup = new Lang.Class({
this.actor.hide();
let workspaceManager = global.workspace_manager;
this._workspaceManagerSignals = [];
this._workspaceManagerSignals.push(workspaceManager.connect('workspace-added',
this._redisplay.bind(this)));
this._workspaceManagerSignals.push(workspaceManager.connect('workspace-removed',
this._redisplay.bind(this)));
this._globalSignals = [];
this._globalSignals.push(global.screen.connect('workspace-added', this._redisplay.bind(this)));
this._globalSignals.push(global.screen.connect('workspace-removed', this._redisplay.bind(this)));
},
_getPreferredHeight(actor, forWidth, alloc) {
@ -71,12 +68,11 @@ var WorkspaceSwitcherPopup = new Lang.Class({
height += childNaturalHeight * workArea.width / workArea.height;
}
let workspaceManager = global.workspace_manager;
let spacing = this._itemSpacing * (workspaceManager.n_workspaces - 1);
let spacing = this._itemSpacing * (global.screen.n_workspaces - 1);
height += spacing;
height = Math.min(height, availHeight);
this._childHeight = (height - spacing) / workspaceManager.n_workspaces;
this._childHeight = (height - spacing) / global.screen.n_workspaces;
alloc.min_size = height;
alloc.natural_size = height;
@ -108,11 +104,9 @@ var WorkspaceSwitcherPopup = new Lang.Class({
},
_redisplay() {
let workspaceManager = global.workspace_manager;
this._list.destroy_all_children();
for (let i = 0; i < workspaceManager.n_workspaces; i++) {
for (let i = 0; i < global.screen.n_workspaces; i++) {
let indicator = null;
if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP)
@ -170,9 +164,8 @@ var WorkspaceSwitcherPopup = new Lang.Class({
Mainloop.source_remove(this._timeoutId);
this._timeoutId = 0;
let workspaceManager = global.workspace_manager;
for (let i = 0; i < this._workspaceManagerSignals.length; i++)
workspaceManager.disconnect(this._workspaceManagerSignals[i]);
for (let i = 0; i < this._globalSignals.length; i++)
global.screen.disconnect(this._globalSignals[i]);
this.actor.destroy();

View File

@ -151,7 +151,7 @@ var WindowClone = new Lang.Class({
_doAddAttachedDialog(metaDialog, realDialog) {
let clone = new Clutter.Clone({ source: realDialog });
this._updateDialogPosition(metaDialog, clone);
this._updateDialogPosition(realDialog, clone);
clone._updateId = realDialog.connect('notify::position', dialog => {
this._updateDialogPosition(dialog, clone);
@ -162,7 +162,8 @@ var WindowClone = new Lang.Class({
this.actor.add_child(clone);
},
_updateDialogPosition(metaDialog, cloneDialog) {
_updateDialogPosition(realDialog, cloneDialog) {
let metaDialog = realDialog.meta_window;
let dialogRect = metaDialog.get_frame_rect();
let rect = this.metaWindow.get_frame_rect();
@ -302,9 +303,9 @@ var WorkspaceThumbnail = new Lang.Class({
this._windowAdded.bind(this));
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
this._windowRemoved.bind(this));
this._windowEnteredMonitorId = global.display.connect('window-entered-monitor',
this._windowEnteredMonitor.bind(this));
this._windowLeftMonitorId = global.display.connect('window-left-monitor',
this._windowEnteredMonitorId = global.screen.connect('window-entered-monitor',
this._windowEnteredMonitor.bind(this));
this._windowLeftMonitorId = global.screen.connect('window-left-monitor',
this._windowLeftMonitor.bind(this));
this.state = ThumbnailState.NORMAL;
@ -444,13 +445,13 @@ var WorkspaceThumbnail = new Lang.Class({
this._doRemoveWindow(metaWin);
},
_windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
_windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
if (monitorIndex == this.monitorIndex) {
this._doAddWindow(metaWin);
}
},
_windowLeftMonitor(metaDisplay, monitorIndex, metaWin) {
_windowLeftMonitor(metaScreen, monitorIndex, metaWin) {
if (monitorIndex == this.monitorIndex) {
this._doRemoveWindow(metaWin);
}
@ -476,8 +477,8 @@ var WorkspaceThumbnail = new Lang.Class({
this.metaWorkspace.disconnect(this._windowAddedId);
this.metaWorkspace.disconnect(this._windowRemovedId);
global.display.disconnect(this._windowEnteredMonitorId);
global.display.disconnect(this._windowLeftMonitorId);
global.screen.disconnect(this._windowEnteredMonitorId);
global.screen.disconnect(this._windowLeftMonitorId);
for (let i = 0; i < this._allWindows.length; i++)
this._allWindows[i].disconnect(this._minimizedChangedIds[i]);
@ -554,9 +555,7 @@ var WorkspaceThumbnail = new Lang.Class({
return;
// a click on the already current workspace should go back to the main view
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
if (this.metaWorkspace == activeWorkspace)
if (this.metaWorkspace == global.screen.get_active_workspace())
Main.overview.hide();
else
this.metaWorkspace.activate(time);
@ -677,20 +676,17 @@ var ThumbnailsBox = new Lang.Class({
this._settings.connect('changed::dynamic-workspaces',
this._updateSwitcherVisibility.bind(this));
Main.layoutManager.connect('monitors-changed', this._rebuildThumbnails.bind(this));
this._switchWorkspaceNotifyId = 0;
this._nWorkspacesNotifyId = 0;
this._syncStackingId = 0;
this._workareasChangedId = 0;
Main.layoutManager.connect('monitors-changed', () => {
this._destroyThumbnails();
if (Main.overview.visible)
this._createThumbnails();
});
},
_updateSwitcherVisibility() {
let workspaceManager = global.workspace_manager;
this.actor.visible =
this._settings.get_boolean('dynamic-workspaces') ||
workspaceManager.n_workspaces > 1;
global.screen.n_workspaces > 1;
},
_activateThumbnailAtPoint(stageX, stageY, time) {
@ -848,8 +844,7 @@ var ThumbnailsBox = new Lang.Class({
// 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
// workspace while we wait for the startup sequence to load.
let workspaceManager = global.workspace_manager;
Main.wm.keepWorkspaceAlive(workspaceManager.get_workspace_by_index(newWorkspaceIndex),
Main.wm.keepWorkspaceAlive(global.screen.get_workspace_by_index(newWorkspaceIndex),
WORKSPACE_KEEP_ALIVE_TIME);
}
@ -868,22 +863,16 @@ var ThumbnailsBox = new Lang.Class({
},
_createThumbnails() {
let workspaceManager = global.workspace_manager;
this._switchWorkspaceNotifyId =
global.window_manager.connect('switch-workspace',
this._activeWorkspaceChanged.bind(this));
this._nWorkspacesNotifyId =
workspaceManager.connect('notify::n-workspaces',
this._workspacesChanged.bind(this));
global.screen.connect('notify::n-workspaces',
this._workspacesChanged.bind(this));
this._syncStackingId =
Main.overview.connect('windows-restacked',
this._syncStacking.bind(this));
this._workareasChangedId =
global.display.connect('workareas-changed',
this._rebuildThumbnails.bind(this));
this._targetScale = 0;
this._scale = 0;
this._pendingScaleUpdate = false;
@ -893,22 +882,18 @@ var ThumbnailsBox = new Lang.Class({
for (let key in ThumbnailState)
this._stateCounts[ThumbnailState[key]] = 0;
this.addThumbnails(0, workspaceManager.n_workspaces);
this.addThumbnails(0, global.screen.n_workspaces);
this._updateSwitcherVisibility();
},
_destroyThumbnails() {
if (this._thumbnails.length == 0)
return;
if (this._switchWorkspaceNotifyId > 0) {
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
this._switchWorkspaceNotifyId = 0;
}
if (this._nWorkspacesNotifyId > 0) {
let workspaceManager = global.workspace_manager;
workspaceManager.disconnect(this._nWorkspacesNotifyId);
global.screen.disconnect(this._nWorkspacesNotifyId);
this._nWorkspacesNotifyId = 0;
}
@ -917,31 +902,18 @@ var ThumbnailsBox = new Lang.Class({
this._syncStackingId = 0;
}
if (this._workareasChangedId > 0) {
global.display.disconnect(this._workareasChangedId);
this._workareasChangedId = 0;
}
for (let w = 0; w < this._thumbnails.length; w++)
this._thumbnails[w].destroy();
this._thumbnails = [];
this._porthole = null;
},
_rebuildThumbnails() {
this._destroyThumbnails();
if (Main.overview.visible)
this._createThumbnails();
},
_workspacesChanged() {
let validThumbnails =
this._thumbnails.filter(t => t.state <= ThumbnailState.NORMAL);
let workspaceManager = global.workspace_manager;
let oldNumWorkspaces = validThumbnails.length;
let newNumWorkspaces = workspaceManager.n_workspaces;
let active = workspaceManager.get_active_workspace_index();
let newNumWorkspaces = global.screen.n_workspaces;
let active = global.screen.get_active_workspace_index();
if (newNumWorkspaces > oldNumWorkspaces) {
this.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
@ -949,7 +921,7 @@ var ThumbnailsBox = new Lang.Class({
let removedIndex;
let removedNum = oldNumWorkspaces - newNumWorkspaces;
for (let w = 0; w < oldNumWorkspaces; w++) {
let metaWorkspace = workspaceManager.get_workspace_by_index(w);
let metaWorkspace = global.screen.get_workspace_by_index(w);
if (this._thumbnails[w].metaWorkspace != metaWorkspace) {
removedIndex = w;
break;
@ -963,12 +935,10 @@ var ThumbnailsBox = new Lang.Class({
},
addThumbnails(start, count) {
let workspaceManager = global.workspace_manager;
if (!this._ensurePorthole())
return;
for (let k = start; k < start + count; k++) {
let metaWorkspace = workspaceManager.get_workspace_by_index(k);
let metaWorkspace = global.screen.get_workspace_by_index(k);
let thumbnail = new WorkspaceThumbnail(metaWorkspace);
thumbnail.setPorthole(this._porthole.x, this._porthole.y,
this._porthole.width, this._porthole.height);
@ -1154,11 +1124,10 @@ var ThumbnailsBox = new Lang.Class({
return;
}
let workspaceManager = global.workspace_manager;
let themeNode = this.actor.get_theme_node();
let spacing = themeNode.get_length('spacing');
let nWorkspaces = workspaceManager.n_workspaces;
let nWorkspaces = global.screen.n_workspaces;
let totalSpacing = (nWorkspaces - 1) * spacing;
alloc.min_size = totalSpacing;
@ -1172,11 +1141,10 @@ var ThumbnailsBox = new Lang.Class({
return;
}
let workspaceManager = global.workspace_manager;
let themeNode = this.actor.get_theme_node();
let spacing = this.actor.get_theme_node().get_length('spacing');
let nWorkspaces = workspaceManager.n_workspaces;
let nWorkspaces = global.screen.n_workspaces;
let totalSpacing = (nWorkspaces - 1) * spacing;
let avail = forHeight - totalSpacing;
@ -1207,7 +1175,6 @@ var ThumbnailsBox = new Lang.Class({
if (this._thumbnails.length == 0) // not visible
return;
let workspaceManager = global.workspace_manager;
let themeNode = this.actor.get_theme_node();
let portholeWidth = this._porthole.width;
@ -1215,7 +1182,7 @@ var ThumbnailsBox = new Lang.Class({
let spacing = themeNode.get_length('spacing');
// Compute the scale we'll need once everything is updated
let nWorkspaces = workspaceManager.n_workspaces;
let nWorkspaces = global.screen.n_workspaces;
let totalSpacing = (nWorkspaces - 1) * spacing;
let avail = (box.y2 - box.y1) - totalSpacing;
@ -1249,8 +1216,7 @@ var ThumbnailsBox = new Lang.Class({
let indicatorY1 = this._indicatorY;
let indicatorY2;
// when not animating, the workspace position overrides this._indicatorY
let activeWorkspace = workspaceManager.get_active_workspace();
let indicatorWorkspace = !this._animatingIndicator ? activeWorkspace : null;
let indicatorWorkspace = !this._animatingIndicator ? global.screen.get_active_workspace() : null;
let indicatorThemeNode = this._indicator.get_theme_node();
let indicatorTopFullBorder = indicatorThemeNode.get_padding(St.Side.TOP) + indicatorThemeNode.get_border_width(St.Side.TOP);
@ -1341,8 +1307,7 @@ var ThumbnailsBox = new Lang.Class({
_activeWorkspaceChanged(wm, from, to, direction) {
let thumbnail;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let activeWorkspace = global.screen.get_active_workspace();
for (let i = 0; i < this._thumbnails.length; i++) {
if (this._thumbnails[i].metaWorkspace == activeWorkspace) {
thumbnail = this._thumbnails[i];

View File

@ -91,29 +91,25 @@ var WorkspacesView = new Lang.Class({
Extends: WorkspacesViewBase,
_init(monitorIndex) {
let workspaceManager = global.workspace_manager;
this.parent(monitorIndex);
this._animating = false; // tweening
this._scrolling = false; // swipe-scrolling
this._animatingScroll = false; // programatically updating the adjustment
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
this.scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
lower: 0,
page_increment: 1,
page_size: 1,
step_increment: 0,
upper: workspaceManager.n_workspaces });
upper: global.screen.n_workspaces });
this.scrollAdjustment.connect('notify::value',
this._onScroll.bind(this));
this._workspaces = [];
this._updateWorkspaces();
this._updateWorkspacesId =
workspaceManager.connect('notify::n-workspaces',
this._updateWorkspaces.bind(this));
this._updateWorkspacesId = global.screen.connect('notify::n-workspaces', this._updateWorkspaces.bind(this));
this._overviewShownId =
Main.overview.connect('shown', () => {
@ -142,8 +138,7 @@ var WorkspacesView = new Lang.Class({
},
getActiveWorkspace() {
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
let active = global.screen.get_active_workspace_index();
return this._workspaces[active];
},
@ -174,8 +169,7 @@ var WorkspacesView = new Lang.Class({
},
_scrollToActive() {
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
let active = global.screen.get_active_workspace_index();
this._updateWorkspaceActors(true);
this._updateScrollAdjustment(active);
@ -184,8 +178,7 @@ var WorkspacesView = new Lang.Class({
// Update workspace actors parameters
// @showAnimation: iff %true, transition between states
_updateWorkspaceActors(showAnimation) {
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
let active = global.screen.get_active_workspace_index();
this._animating = showAnimation;
@ -221,8 +214,7 @@ var WorkspacesView = new Lang.Class({
},
_updateVisibility() {
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
let active = global.screen.get_active_workspace_index();
for (let w = 0; w < this._workspaces.length; w++) {
let workspace = this._workspaces[w];
@ -254,14 +246,13 @@ var WorkspacesView = new Lang.Class({
},
_updateWorkspaces() {
let workspaceManager = global.workspace_manager;
let newNumWorkspaces = workspaceManager.n_workspaces;
let newNumWorkspaces = global.screen.n_workspaces;
this.scrollAdjustment.upper = newNumWorkspaces;
let needsUpdate = false;
for (let j = 0; j < newNumWorkspaces; j++) {
let metaWorkspace = workspaceManager.get_workspace_by_index(j);
let metaWorkspace = global.screen.get_workspace_by_index(j);
let workspace;
if (j >= this._workspaces.length) { /* added */
@ -299,8 +290,7 @@ var WorkspacesView = new Lang.Class({
this.scrollAdjustment.run_dispose();
Main.overview.disconnect(this._overviewShownId);
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
let workspaceManager = global.workspace_manager;
workspaceManager.disconnect(this._updateWorkspacesId);
global.screen.disconnect(this._updateWorkspacesId);
},
startSwipeScroll() {
@ -321,8 +311,7 @@ var WorkspacesView = new Lang.Class({
if (this._animatingScroll)
return;
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
let active = global.screen.get_active_workspace_index();
let current = Math.round(adj.value);
if (active != current) {
@ -481,6 +470,7 @@ var WorkspacesDisplay = new Lang.Class({
this._switchWorkspaceNotifyId = 0;
this._notifyOpacityId = 0;
this._restackedNotifyId = 0;
this._scrollEventId = 0;
this._keyPressEventId = 0;
@ -604,7 +594,7 @@ var WorkspacesDisplay = new Lang.Class({
_getMonitorIndexForEvent(event) {
let [x, y] = event.get_coords();
let rect = new Meta.Rectangle({ x: x, y: y, width: 1, height: 1 });
return global.display.get_monitor_index_for_rect(rect);
return global.screen.get_monitor_index_for_rect(rect);
},
_getPrimaryView() {
@ -690,8 +680,7 @@ var WorkspacesDisplay = new Lang.Class({
this._getMonitorIndexForEvent(event) != this._primaryIndex)
return Clutter.EVENT_PROPAGATE;
let workspaceManager = global.workspace_manager;
let activeWs = workspaceManager.get_active_workspace();
let activeWs = global.screen.get_active_workspace();
let ws;
switch (event.get_scroll_direction()) {
case Clutter.ScrollDirection.UP:
@ -710,8 +699,7 @@ var WorkspacesDisplay = new Lang.Class({
_onKeyPressEvent(actor, event) {
if (!this.actor.mapped)
return Clutter.EVENT_PROPAGATE;
let workspaceManager = global.workspace_manager;
let activeWs = workspaceManager.get_active_workspace();
let activeWs = global.screen.get_active_workspace();
let ws;
switch (event.get_key_symbol()) {
case Clutter.KEY_Page_Up:

View File

@ -1,12 +1,12 @@
project('gnome-shell', 'c',
version: '3.29.90',
version: '3.28.4',
meson_version: '>= 0.42.0',
license: 'GPLv2+'
)
# We depend on a specific version of the libmutter API. The mutter variants of
# the Cogl and Clutter libraries also use this API version.
mutter_api_version = '3'
mutter_api_version = '2'
clutter_pc = 'mutter-clutter-' + mutter_api_version
cogl_pc = 'mutter-cogl-' + mutter_api_version
@ -23,15 +23,15 @@ gi_req = '>= 1.49.1'
gjs_req = '>= 1.47.0'
gtk_req = '>= 3.15.0'
json_glib_req = '>= 0.13.2'
mutter_req = '>= 3.29.90'
mutter_req = '>= 3.28.0'
polkit_req = '>= 0.100'
schemas_req = '>= 3.27.90'
schemas_req = '>= 3.21.3'
startup_req = '>= 0.11'
ibus_req = '>= 1.5.2'
bt_req = '>= 3.9.0'
gst_req = '>= 0.11.92'
nm_req = '>= 1.10.4'
nm_req = '>= 0.9.8'
secret_req = '>= 0.18'
gnome = import('gnome')
@ -44,12 +44,10 @@ datadir = join_paths(prefix, get_option('datadir'))
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
mandir = join_paths(prefix, get_option('mandir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
pkgdatadir = join_paths(datadir, meson.project_name())
pkglibdir = join_paths(libdir, meson.project_name())
autostartdir = join_paths(sysconfdir, 'xdg', 'autostart')
convertdir = join_paths(datadir, 'GConf', 'gsettings')
desktopdir = join_paths(datadir, 'applications')
ifacedir = join_paths(datadir, 'dbus-1', 'interfaces')
@ -61,13 +59,6 @@ servicedir = join_paths(datadir, 'dbus-1', 'services')
plugindir = get_variable('BROWSER_PLUGIN_DIR', mozplugindir)
# XXX: Once https://github.com/systemd/systemd/issues/9595 is fixed and we can
# depend on this version, replace with something like:
# systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
# define_variable: ['prefix', prefix])
# and uncomment systemd_dep below
systemduserunitdir = join_paths(prefix, 'lib', 'systemd', 'user')
keybindings_dep = dependency('gnome-keybindings', required: false)
if keybindings_dep.found()
keysdir = keybindings_dep.get_pkgconfig_variable('keysdir')
@ -126,12 +117,10 @@ else
endif
if get_option('systemd')
libsystemd_dep = dependency('libsystemd')
# XXX: see systemduserunitdir
# systemd_dep = dependency('systemd')
have_systemd = true
systemd_dep = dependency('libsystemd')
have_systemd = systemd_dep.found()
else
libsystemd_dep = []
systemd_dep = []
have_systemd = false
endif
@ -163,11 +152,6 @@ cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
cdata.set('HAVE_NETWORKMANAGER', have_networkmanager)
cdata.set('HAVE_SYSTEMD', have_systemd)
# New API added in glib-2.57.2
cdata.set('HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS',
cc.has_function('g_desktop_app_info_launch_uris_as_manager_with_fds',
dependencies : gio_dep)
)
cdata.set('HAVE_FDWALK', cc.has_function('fdwalk'))
cdata.set('HAVE_MALLINFO', cc.has_function('mallinfo'))
cdata.set('HAVE_SYS_RESOURCE_H', cc.has_header('sys/resource.h'))
@ -175,10 +159,6 @@ cdata.set('HAVE__NL_TIME_FIRST_WEEKDAY',
cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
)
cdata.set('HAVE_FDWALK',
cc.has_function('fdwalk')
)
config_h = configure_file(
input: 'config.h.meson',
output: 'config.h',
@ -205,7 +185,6 @@ subdir('src')
subdir('po')
subdir('data')
subdir('tests')
subdir('tools')
if get_option('gtk_doc')
subdir('docs/reference')

View File

@ -40,7 +40,6 @@ js/ui/messageList.js
js/ui/messageTray.js
js/ui/mpris.js
js/ui/notificationDaemon.js
js/ui/osdWindow.js
js/ui/overviewControls.js
js/ui/overview.js
js/ui/padOsd.js
@ -59,7 +58,6 @@ js/ui/status/location.js
js/ui/status/network.js
js/ui/status/nightLight.js
js/ui/status/power.js
js/ui/status/remoteAccess.js
js/ui/status/rfkill.js
js/ui/status/system.js
js/ui/status/thunderbolt.js

1500
po/af.po

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: HEAD\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
"POT-Creation-Date: 2018-03-10 12:32+0000\n"
"PO-Revision-Date: 2018-03-10 21:24+0100\n"
"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
@ -349,7 +349,7 @@ msgid "There was an error loading the preferences dialog for %s:"
msgstr "S'ha produït un error en carregar el diàleg de preferències de %s:"
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
msgid "Cancel"
@ -669,12 +669,12 @@ msgstr "Afegeix als preferits"
msgid "Show Details"
msgstr "Mostra els detalls"
#: js/ui/appFavorites.js:140
#: js/ui/appFavorites.js:138
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "S'ha afegit %s als preferits."
#: js/ui/appFavorites.js:174
#: js/ui/appFavorites.js:172
#, javascript-format
msgid "%s has been removed from your favorites."
msgstr "S'ha suprimit %s dels preferits."
@ -869,7 +869,7 @@ msgstr "S'ha desconnectat un dispositiu extern"
msgid "Open with %s"
msgstr "Obre amb %s"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
msgid "Password:"
msgstr "Contrasenya:"
@ -957,15 +957,15 @@ msgstr "Cal introduir una contrasenya per connectar-vos a «%s»."
msgid "Network Manager"
msgstr "Gestor de connexions de xarxa"
#: js/ui/components/polkitAgent.js:48
#: js/ui/components/polkitAgent.js:43
msgid "Authentication Required"
msgstr "Cal autenticació"
#: js/ui/components/polkitAgent.js:76
#: js/ui/components/polkitAgent.js:71
msgid "Administrator"
msgstr "Administrador"
#: js/ui/components/polkitAgent.js:156
#: js/ui/components/polkitAgent.js:151
msgid "Authenticate"
msgstr "Autentica"
@ -973,7 +973,7 @@ msgstr "Autentica"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "No ha funcionat. Torneu-ho a provar."
@ -1021,7 +1021,7 @@ msgstr "Afegeix rellotges del món…"
msgid "World Clocks"
msgstr "Rellotges del món"
#: js/ui/dateMenu.js:227
#: js/ui/dateMenu.js:225
msgid "Weather"
msgstr "El temps"
@ -1029,7 +1029,7 @@ msgstr "El temps"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:291
#: js/ui/dateMenu.js:289
#, javascript-format
msgid "%s all day."
msgstr "%s tot el dia."
@ -1038,7 +1038,7 @@ msgstr "%s tot el dia."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:297
#: js/ui/dateMenu.js:295
#, javascript-format
msgid "%s, then %s later."
msgstr "%s, llavors %s més tard."
@ -1047,30 +1047,30 @@ msgstr "%s, llavors %s més tard."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:303
#: js/ui/dateMenu.js:301
#, javascript-format
msgid "%s, then %s, followed by %s later."
msgstr "%s, llavors %s, seguit per %s més tard."
#: js/ui/dateMenu.js:314
#: js/ui/dateMenu.js:312
msgid "Select a location…"
msgstr "Trieu una ubicació…"
#: js/ui/dateMenu.js:317
#: js/ui/dateMenu.js:315
msgid "Loading…"
msgstr "S'està carregant…"
#. Translators: %s is a temperature with unit, e.g. "23℃"
#: js/ui/dateMenu.js:323
#: js/ui/dateMenu.js:321
#, javascript-format
msgid "Feels like %s."
msgstr "Sensació tèrmica de %s."
#: js/ui/dateMenu.js:326
#: js/ui/dateMenu.js:324
msgid "Go online for weather information"
msgstr "Vés en línia per a informació sobre el temps"
#: js/ui/dateMenu.js:328
#: js/ui/dateMenu.js:326
msgid "Weather information is currently unavailable"
msgstr "La informació sobre el temps no està disponible"
@ -1990,17 +1990,16 @@ msgid ""
"New device has been detected while you were away. Please disconnect and "
"reconnect the device to start using it."
msgstr ""
"El nou dispositiu s'ha detectat mentre estàveu absents. Desconnecteu i "
"torneu a connectar el dispositiu per a començar a utilitzar-lo."
"El nou dispositiu s'ha detectat mentre estàveu absents. Desconnecteu i torneu a connectar el dispositiu per a començar a utilitzar-lo."
#: js/ui/status/thunderbolt.js:356
msgid "Thunderbolt authorization error"
msgstr "S'ha produït un error d'autorització a Thunderbolt"
#: js/ui/status/thunderbolt.js:357
#, javascript-format
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "No s'ha pogut autoritzar el dispositiu Thunderbolt: %s"
#, javascript-format
msgid "Could not authorize the thunderbolt device: %s"
msgstr "No s'ha pogut autoritzar el dispositiu thunderbolt: %s"
#: js/ui/status/volume.js:128
msgid "Volume changed"

View File

@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
"PO-Revision-Date: 2018-04-24 17:32+0200\n"
"POT-Creation-Date: 2018-02-26 12:57+0000\n"
"PO-Revision-Date: 2018-02-26 17:57+0100\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
"Language: cs\n"
@ -332,7 +332,7 @@ msgstr ""
"Nastala chyba při načítání dialogového okna předvoleb pro rozšíření %s:"
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
msgid "Cancel"
@ -667,12 +667,12 @@ msgstr "Přidat mezi oblíbené"
msgid "Show Details"
msgstr "Zobrazit podrobnosti"
#: js/ui/appFavorites.js:140
#: js/ui/appFavorites.js:138
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "%s byl přidán mezi oblíbené."
#: js/ui/appFavorites.js:174
#: js/ui/appFavorites.js:172
#, javascript-format
msgid "%s has been removed from your favorites."
msgstr "%s byl odstraněn z oblíbených."
@ -867,7 +867,7 @@ msgstr "Externí svazek odpojen"
msgid "Open with %s"
msgstr "Otevřít pomocí %s"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
msgid "Password:"
msgstr "Heslo:"
@ -955,15 +955,15 @@ msgstr "Pro připojení k „%s“ je vyžadováno heslo."
msgid "Network Manager"
msgstr "Network Manager"
#: js/ui/components/polkitAgent.js:48
#: js/ui/components/polkitAgent.js:43
msgid "Authentication Required"
msgstr "Je vyžadováno ověření"
#: js/ui/components/polkitAgent.js:76
#: js/ui/components/polkitAgent.js:71
msgid "Administrator"
msgstr "Správce"
#: js/ui/components/polkitAgent.js:156
#: js/ui/components/polkitAgent.js:151
msgid "Authenticate"
msgstr "Ověřit"
@ -971,7 +971,7 @@ msgstr "Ověřit"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "Ověření bohužel nebylo úspěšné. Zkuste to prosím znovu."
@ -1021,7 +1021,7 @@ msgstr "Přidat světový čas…"
msgid "World Clocks"
msgstr "Světové hodiny"
#: js/ui/dateMenu.js:227
#: js/ui/dateMenu.js:225
msgid "Weather"
msgstr "Počasí"
@ -1029,7 +1029,7 @@ msgstr "Počasí"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:291
#: js/ui/dateMenu.js:289
#, javascript-format
msgid "%s all day."
msgstr "%s celý den."
@ -1038,7 +1038,7 @@ msgstr "%s celý den."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:297
#: js/ui/dateMenu.js:295
#, javascript-format
msgid "%s, then %s later."
msgstr "%s, později %s."
@ -1047,30 +1047,30 @@ msgstr "%s, později %s."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:303
#: js/ui/dateMenu.js:301
#, javascript-format
msgid "%s, then %s, followed by %s later."
msgstr "%s, pak %s a později %s."
#: js/ui/dateMenu.js:314
#: js/ui/dateMenu.js:312
msgid "Select a location…"
msgstr "Vybrat místo…"
#: js/ui/dateMenu.js:317
#: js/ui/dateMenu.js:315
msgid "Loading…"
msgstr "Načítá se…"
#. Translators: %s is a temperature with unit, e.g. "23℃"
#: js/ui/dateMenu.js:323
#: js/ui/dateMenu.js:321
#, javascript-format
msgid "Feels like %s."
msgstr "Pocitově jako %s."
msgstr "Pocitová teplota %s."
#: js/ui/dateMenu.js:326
#: js/ui/dateMenu.js:324
msgid "Go online for weather information"
msgstr "Připojit se kvůli informacím o počasí"
#: js/ui/dateMenu.js:328
#: js/ui/dateMenu.js:326
msgid "Weather information is currently unavailable"
msgstr "Informace o počasí nejsou nyní dostupné"
@ -1986,16 +1986,16 @@ msgstr "Uspat do paměti"
msgid "Power Off"
msgstr "Vypnout"
#: js/ui/status/thunderbolt.js:294
#: js/ui/status/thunderbolt.js:272
msgid "Thunderbolt"
msgstr "Thunderbolt"
#. we are done
#: js/ui/status/thunderbolt.js:350
#: js/ui/status/thunderbolt.js:328
msgid "Unknown Thunderbolt device"
msgstr "Neznámé zařízení Thunderbolt"
#: js/ui/status/thunderbolt.js:351
#: js/ui/status/thunderbolt.js:329
msgid ""
"New device has been detected while you were away. Please disconnect and "
"reconnect the device to start using it."
@ -2003,13 +2003,13 @@ msgstr ""
"Zatímco jste byli pryč, bylo nalezeno nové zařízení. Odpojte jej prosím a "
"znovu připojte, abyste jej mohli používat."
#: js/ui/status/thunderbolt.js:356
#: js/ui/status/thunderbolt.js:334
msgid "Thunderbolt authorization error"
msgstr "Chyba ověření Thunderbolt"
#: js/ui/status/thunderbolt.js:357
#: js/ui/status/thunderbolt.js:335
#, javascript-format
msgid "Could not authorize the Thunderbolt device: %s"
msgid "Could not authorize the thunderbolt device: %s"
msgstr "Nezdařilo se provést ověření zařízení Thunderbolt: %s"
#: js/ui/status/volume.js:128
@ -2233,3 +2233,15 @@ msgstr[2] "%u vstupů"
#: subprojects/gvc/gvc-mixer-control.c:2738
msgid "System Sounds"
msgstr "Systémové zvuky"
#~ msgctxt "search-result"
#~ msgid "Power off"
#~ msgstr "Vypnout"
#~ msgctxt "search-result"
#~ msgid "Log out"
#~ msgstr "Odhlásit se"
#~ msgctxt "search-result"
#~ msgid "Switch user"
#~ msgstr "Přepnout uživatele"

195
po/es.po
View File

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell.master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-07-24 18:34+0000\n"
"PO-Revision-Date: 2018-07-27 13:15+0200\n"
"POT-Creation-Date: 2018-02-22 09:24+0000\n"
"PO-Revision-Date: 2018-02-23 08:26+0100\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: es <gnome-es-list@gnome.org>\n"
"Language: es\n"
@ -18,7 +18,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 2.91.7\n"
"X-Generator: Gtranslator 2.91.6\n"
#: data/50-gnome-shell-system.xml:6
msgid "System"
@ -346,7 +346,7 @@ msgid "There was an error loading the preferences dialog for %s:"
msgstr "Hubo un error al lanzar el diálogo de preferencias para %s:"
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
msgid "Cancel"
@ -366,20 +366,20 @@ msgctxt "button"
msgid "Sign In"
msgstr "Iniciar sesión"
#: js/gdm/loginDialog.js:319
#: js/gdm/loginDialog.js:315
msgid "Choose Session"
msgstr "Elegir sesión"
#. translators: this message is shown below the user list on the
#. login screen. It can be activated to reveal an entry for
#. manually entering the username.
#: js/gdm/loginDialog.js:462
#: js/gdm/loginDialog.js:458
msgid "Not listed?"
msgstr "¿No está en la lista?"
#. Translators: this message is shown below the username entry field
#. to clue the user in on how to login to the local network realm
#: js/gdm/loginDialog.js:891
#: js/gdm/loginDialog.js:887
#, javascript-format
msgid "(e.g., user or %s)"
msgstr "(ej., usuario o %s)"
@ -387,12 +387,12 @@ msgstr "(ej., usuario o %s)"
#. TTLS and PEAP are actually much more complicated, but this complication
#. is not visible here since we only care about phase2 authentication
#. (and don't even care of which one)
#: js/gdm/loginDialog.js:896 js/ui/components/networkAgent.js:243
#: js/gdm/loginDialog.js:892 js/ui/components/networkAgent.js:243
#: js/ui/components/networkAgent.js:261
msgid "Username: "
msgstr "Nombre de usuario:"
#: js/gdm/loginDialog.js:1234
#: js/gdm/loginDialog.js:1228
msgid "Login Window"
msgstr "Ventana de inicio de sesión"
@ -405,7 +405,7 @@ msgstr "Error de autenticación"
#. as a cue to display our own message.
#. Translators: this message is shown below the password entry field
#. to indicate the user can swipe their finger instead
#: js/gdm/util.js:485
#: js/gdm/util.js:482
msgid "(or swipe finger)"
msgstr "(o pase el dedo)"
@ -645,32 +645,32 @@ msgstr "Frecuentes"
msgid "All"
msgstr "Todas"
#: js/ui/appDisplay.js:1890
#: js/ui/appDisplay.js:1886
msgid "New Window"
msgstr "Ventana nueva"
#: js/ui/appDisplay.js:1904
#: js/ui/appDisplay.js:1900
msgid "Launch using Dedicated Graphics Card"
msgstr "Lanzar usando la tarjeta gráfica dedicada"
#: js/ui/appDisplay.js:1931 js/ui/dash.js:285
#: js/ui/appDisplay.js:1927 js/ui/dash.js:285
msgid "Remove from Favorites"
msgstr "Quitar de los favoritos"
#: js/ui/appDisplay.js:1937
#: js/ui/appDisplay.js:1933
msgid "Add to Favorites"
msgstr "Añadir a los favoritos"
#: js/ui/appDisplay.js:1947
#: js/ui/appDisplay.js:1943
msgid "Show Details"
msgstr "Mostrar detalles"
#: js/ui/appFavorites.js:140
#: js/ui/appFavorites.js:138
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "Se ha añadido %s a sus favoritos."
#: js/ui/appFavorites.js:174
#: js/ui/appFavorites.js:172
#, javascript-format
msgid "%s has been removed from your favorites."
msgstr "Se ha quitado %s de sus favoritos."
@ -808,35 +808,35 @@ msgctxt "event list time"
msgid "All Day"
msgstr "Todo el día"
#: js/ui/calendar.js:866
#: js/ui/calendar.js:864
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%A, %d de %B"
#: js/ui/calendar.js:870
#: js/ui/calendar.js:868
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%A, %d de %B de %Y"
#: js/ui/calendar.js:1100
#: js/ui/calendar.js:1086
msgid "No Notifications"
msgstr "No hay notificaciones"
#: js/ui/calendar.js:1103
#: js/ui/calendar.js:1089
msgid "No Events"
msgstr "No hay eventos"
#: js/ui/calendar.js:1131
#: js/ui/calendar.js:1117
msgid "Clear All"
msgstr "Limpiar todo"
#. Translators: %s is an application name
#: js/ui/closeDialog.js:47
#: js/ui/closeDialog.js:44
#, javascript-format
msgid "“%s” is not responding."
msgstr "«%s» no responde."
#: js/ui/closeDialog.js:48
#: js/ui/closeDialog.js:45
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@ -844,11 +844,11 @@ msgstr ""
"Puede elegir esperar un momento para que continúe o forzar a la aplicación a "
"terminar."
#: js/ui/closeDialog.js:64
#: js/ui/closeDialog.js:61
msgid "Force Quit"
msgstr "Forzar la salida"
#: js/ui/closeDialog.js:67
#: js/ui/closeDialog.js:64
msgid "Wait"
msgstr "Esperar"
@ -865,7 +865,7 @@ msgstr "Dispositivo externo desconectado"
msgid "Open with %s"
msgstr "Abrir con %s"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:297
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
msgid "Password:"
msgstr "Contraseña:"
@ -902,11 +902,11 @@ msgstr "Contraseña de la clave privada:"
msgid "Service: "
msgstr "Servicio:"
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:664
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:659
msgid "Authentication required by wireless network"
msgstr "La red inalámbrica requiere autenticación"
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:665
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:660
#, javascript-format
msgid ""
"Passwords or encryption keys are required to access the wireless network "
@ -915,7 +915,7 @@ msgstr ""
"Se necesitan contraseñas o claves de cifrado para acceder a la red "
"inalámbrica «%s»."
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:668
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:663
msgid "Wired 802.1X authentication"
msgstr "Autenticación 802.1X cableada"
@ -923,15 +923,15 @@ msgstr "Autenticación 802.1X cableada"
msgid "Network name: "
msgstr "Nombre de la red: "
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:672
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:667
msgid "DSL authentication"
msgstr "Autenticación DSL"
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:678
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:673
msgid "PIN code required"
msgstr "Código PIN requerido"
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:679
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:674
msgid "PIN code is needed for the mobile broadband device"
msgstr "Se necesita un código PIN para el dispositivo de banda ancha móvil"
@ -939,29 +939,29 @@ msgstr "Se necesita un código PIN para el dispositivo de banda ancha móvil"
msgid "PIN: "
msgstr "PIN: "
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:685
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:680
msgid "Mobile broadband network password"
msgstr "Contraseña de la red de banda ancha móvil"
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:669
#: js/ui/components/networkAgent.js:673 js/ui/components/networkAgent.js:686
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:664
#: js/ui/components/networkAgent.js:668 js/ui/components/networkAgent.js:681
#, javascript-format
msgid "A password is required to connect to “%s”."
msgstr "Se requiere una contraseña para conectarse a «%s»."
#: js/ui/components/networkAgent.js:653 js/ui/status/network.js:1704
#: js/ui/components/networkAgent.js:648 js/ui/status/network.js:1691
msgid "Network Manager"
msgstr "Gestor de la red"
#: js/ui/components/polkitAgent.js:48
#: js/ui/components/polkitAgent.js:43
msgid "Authentication Required"
msgstr "Se necesita autenticación"
#: js/ui/components/polkitAgent.js:76
#: js/ui/components/polkitAgent.js:71
msgid "Administrator"
msgstr "Administrador"
#: js/ui/components/polkitAgent.js:156
#: js/ui/components/polkitAgent.js:151
msgid "Authenticate"
msgstr "Autenticar"
@ -969,7 +969,7 @@ msgstr "Autenticar"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:283 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "Eso no ha funcionado. Inténtelo de nuevo."
@ -1017,7 +1017,7 @@ msgstr "Añadir relojes del mundo…"
msgid "World Clocks"
msgstr "Relojes del mundo"
#: js/ui/dateMenu.js:227
#: js/ui/dateMenu.js:225
msgid "Weather"
msgstr "Meteorología"
@ -1025,7 +1025,7 @@ msgstr "Meteorología"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:291
#: js/ui/dateMenu.js:289
#, javascript-format
msgid "%s all day."
msgstr "%s todo el día."
@ -1034,7 +1034,7 @@ msgstr "%s todo el día."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:297
#: js/ui/dateMenu.js:295
#, javascript-format
msgid "%s, then %s later."
msgstr "%s, luego %s."
@ -1043,30 +1043,30 @@ msgstr "%s, luego %s."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:303
#: js/ui/dateMenu.js:301
#, javascript-format
msgid "%s, then %s, followed by %s later."
msgstr "%s, luego %s seguido de %s."
#: js/ui/dateMenu.js:314
#: js/ui/dateMenu.js:312
msgid "Select a location…"
msgstr "Seleccionar ubicación…"
#: js/ui/dateMenu.js:317
#: js/ui/dateMenu.js:315
msgid "Loading…"
msgstr "Cargando…"
#. Translators: %s is a temperature with unit, e.g. "23℃"
#: js/ui/dateMenu.js:323
#: js/ui/dateMenu.js:321
#, javascript-format
msgid "Feels like %s."
msgstr "Sensación térmica de %s."
#: js/ui/dateMenu.js:326
#: js/ui/dateMenu.js:324
msgid "Go online for weather information"
msgstr "Conectarse para obtener la información meteorológica"
#: js/ui/dateMenu.js:328
#: js/ui/dateMenu.js:326
msgid "Weather information is currently unavailable"
msgstr "La información meteorológica no está disponible actualmente."
@ -1301,13 +1301,13 @@ msgid "Leave On"
msgstr "Dejar activada"
#: js/ui/kbdA11yDialog.js:59 js/ui/status/bluetooth.js:143
#: js/ui/status/network.js:1294
#: js/ui/status/network.js:1281
msgid "Turn On"
msgstr "Encender"
#: js/ui/kbdA11yDialog.js:67 js/ui/status/bluetooth.js:143
#: js/ui/status/network.js:154 js/ui/status/network.js:337
#: js/ui/status/network.js:1294 js/ui/status/network.js:1409
#: js/ui/status/network.js:1281 js/ui/status/network.js:1396
#: js/ui/status/nightLight.js:47 js/ui/status/rfkill.js:90
#: js/ui/status/rfkill.js:117
msgid "Turn Off"
@ -1369,7 +1369,7 @@ msgstr "Ver fuente"
msgid "Web Page"
msgstr "Página web"
#: js/ui/messageTray.js:1495
#: js/ui/messageTray.js:1493
msgid "System Information"
msgstr "Información del sistema"
@ -1443,22 +1443,22 @@ msgstr "Pulse Esc para salir"
msgid "Press any key to exit"
msgstr "Pulse cualquier tecla para salir"
#: js/ui/panel.js:356
#: js/ui/panel.js:355
msgid "Quit"
msgstr "Salir"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview".
#: js/ui/panel.js:412
#: js/ui/panel.js:411
msgid "Activities"
msgstr "Actividades"
#: js/ui/panel.js:693
#: js/ui/panel.js:692
msgctxt "System menu in the top bar"
msgid "System"
msgstr "Sistema"
#: js/ui/panel.js:816
#: js/ui/panel.js:811
msgid "Top Bar"
msgstr "Barra superior"
@ -1467,7 +1467,7 @@ msgstr "Barra superior"
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
#. switches containing "◯" and "|"). Other values will
#. simply result in invisible toggle switches.
#: js/ui/popupMenu.js:300
#: js/ui/popupMenu.js:291
msgid "toggle-switch-us"
msgstr "toggle-switch-intl"
@ -1475,15 +1475,15 @@ msgstr "toggle-switch-intl"
msgid "Enter a Command"
msgstr "Introducir un comando"
#: js/ui/runDialog.js:110 js/ui/windowMenu.js:174
#: js/ui/runDialog.js:110 js/ui/windowMenu.js:175
msgid "Close"
msgstr "Cerrar"
#: js/ui/runDialog.js:274
#: js/ui/runDialog.js:273
msgid "Restart is not available on Wayland"
msgstr "Reiniciar si no está disponible en Wayland"
#: js/ui/runDialog.js:279
#: js/ui/runDialog.js:278
msgid "Restarting…"
msgstr "Reiniciando…"
@ -1690,7 +1690,7 @@ msgid "<unknown>"
msgstr "<desconocido>"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:441 js/ui/status/network.js:1323
#: js/ui/status/network.js:441 js/ui/status/network.js:1310
#, javascript-format
msgid "%s Off"
msgstr "%s apagada"
@ -1716,7 +1716,7 @@ msgid "%s Disconnecting"
msgstr "Desconectando %s"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:459 js/ui/status/network.js:1315
#: js/ui/status/network.js:459 js/ui/status/network.js:1302
#, javascript-format
msgid "%s Connecting"
msgstr "Conectando %s"
@ -1756,7 +1756,7 @@ msgid "Mobile Broadband Settings"
msgstr "Configuración de banda ancha móvil"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:578 js/ui/status/network.js:1320
#: js/ui/status/network.js:578 js/ui/status/network.js:1307
#, javascript-format
msgid "%s Hardware Disabled"
msgstr "Hardware %s desactivado"
@ -1812,81 +1812,81 @@ msgstr "No hay redes"
msgid "Use hardware switch to turn off"
msgstr "Usar el interruptor hardware para apagar"
#: js/ui/status/network.js:1186
#: js/ui/status/network.js:1173
msgid "Select Network"
msgstr "Seleccionar red"
#: js/ui/status/network.js:1192
#: js/ui/status/network.js:1179
msgid "Wi-Fi Settings"
msgstr "Configuración de Wi-Fi"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1311
#: js/ui/status/network.js:1298
#, javascript-format
msgid "%s Hotspot Active"
msgstr "Punto de acceso %s activo"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1326
#: js/ui/status/network.js:1313
#, javascript-format
msgid "%s Not Connected"
msgstr "%s no conectado"
#: js/ui/status/network.js:1426
#: js/ui/status/network.js:1413
msgid "connecting…"
msgstr "conectando…"
#. Translators: this is for network connections that require some kind of key or password
#: js/ui/status/network.js:1429
#: js/ui/status/network.js:1416
msgid "authentication required"
msgstr "se necesita autenticación"
#: js/ui/status/network.js:1431
#: js/ui/status/network.js:1418
msgid "connection failed"
msgstr "falló la conexión"
#: js/ui/status/network.js:1485
#: js/ui/status/network.js:1472
msgid "VPN Settings"
msgstr "Configuración de VPN"
#: js/ui/status/network.js:1498
#: js/ui/status/network.js:1485
msgid "VPN"
msgstr "VPN"
#: js/ui/status/network.js:1508
#: js/ui/status/network.js:1495
msgid "VPN Off"
msgstr "VPN apagada"
#: js/ui/status/network.js:1572 js/ui/status/rfkill.js:93
#: js/ui/status/network.js:1559 js/ui/status/rfkill.js:93
msgid "Network Settings"
msgstr "Configuración de la red"
#: js/ui/status/network.js:1601
#: js/ui/status/network.js:1588
#, javascript-format
msgid "%s Wired Connection"
msgid_plural "%s Wired Connections"
msgstr[0] "%s conexión cableada"
msgstr[1] "%s conexiones cableadas"
#: js/ui/status/network.js:1605
#: js/ui/status/network.js:1592
#, javascript-format
msgid "%s Wi-Fi Connection"
msgid_plural "%s Wi-Fi Connections"
msgstr[0] "%s conexión inalámbrica"
msgstr[1] "%s conexiones inalámbricas"
#: js/ui/status/network.js:1609
#: js/ui/status/network.js:1596
#, javascript-format
msgid "%s Modem Connection"
msgid_plural "%s Modem Connections"
msgstr[0] "%s conexión por módem"
msgstr[1] "%s conexiones por módem"
#: js/ui/status/network.js:1741
#: js/ui/status/network.js:1728
msgid "Connection failed"
msgstr "Falló la conexión"
#: js/ui/status/network.js:1742
#: js/ui/status/network.js:1729
msgid "Activation of network connection failed"
msgstr "Falló la activación de la conexión de red"
@ -1937,15 +1937,6 @@ msgstr "%d%02d para la carga completa (%d%%)"
msgid "%d%%"
msgstr "%d%%"
#: js/ui/status/remoteAccess.js:45
msgid "Screen is Being Shared"
msgstr "Se está compartiendo la pantalla"
#: js/ui/status/remoteAccess.js:47
#| msgid "Turn Off"
msgid "Turn off"
msgstr "Apagar"
#. The menu only appears when airplane mode is on, so just
#. statically build it as if it was on, rather than dynamically
#. changing the menu contents.
@ -1977,16 +1968,16 @@ msgstr "Suspender"
msgid "Power Off"
msgstr "Apagar"
#: js/ui/status/thunderbolt.js:298
#: js/ui/status/thunderbolt.js:272
msgid "Thunderbolt"
msgstr "Thunderbolt"
#. we are done
#: js/ui/status/thunderbolt.js:354
#: js/ui/status/thunderbolt.js:328
msgid "Unknown Thunderbolt device"
msgstr "Dispositivo Thunderbolt desconocido"
#: js/ui/status/thunderbolt.js:355
#: js/ui/status/thunderbolt.js:329
msgid ""
"New device has been detected while you were away. Please disconnect and "
"reconnect the device to start using it."
@ -1994,13 +1985,13 @@ msgstr ""
"Se ha detectado un dispositivo nuevo mientras estaba fuera. Desconéctelo y "
"vuélvalo a conectar para empezar a usarlo."
#: js/ui/status/thunderbolt.js:360
#: js/ui/status/thunderbolt.js:334
msgid "Thunderbolt authorization error"
msgstr "Error de autorización de Thunderbolt"
#: js/ui/status/thunderbolt.js:361
#: js/ui/status/thunderbolt.js:335
#, javascript-format
msgid "Could not authorize the Thunderbolt device: %s"
msgid "Could not authorize the thunderbolt device: %s"
msgstr "No se pudo autorizar el dispositivo Thunderbolt: %s"
#: js/ui/status/volume.js:128
@ -2084,7 +2075,7 @@ msgstr[1] "La configuración se revertirá en %d segundos"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:668
#: js/ui/windowManager.js:660
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@ -2137,19 +2128,19 @@ msgstr "Subir a un área de trabajo"
msgid "Move to Workspace Down"
msgstr "Bajar a un área de trabajo"
#: js/ui/windowMenu.js:139
#: js/ui/windowMenu.js:140
msgid "Move to Monitor Up"
msgstr "Mover a la pantalla de arriba"
#: js/ui/windowMenu.js:148
#: js/ui/windowMenu.js:149
msgid "Move to Monitor Down"
msgstr "Mover a la pantalla de abajo"
#: js/ui/windowMenu.js:157
#: js/ui/windowMenu.js:158
msgid "Move to Monitor Left"
msgstr "Mover a la pantalla de la izquierda"
#: js/ui/windowMenu.js:166
#: js/ui/windowMenu.js:167
msgid "Move to Monitor Right"
msgstr "Mover a la pantalla de la derecha"
@ -2180,12 +2171,12 @@ msgstr ""
msgid "List possible modes"
msgstr "Listar los modos posibles"
#: src/shell-app.c:272
#: src/shell-app.c:270
msgctxt "program"
msgid "Unknown"
msgstr "Desconocido"
#: src/shell-app.c:523
#: src/shell-app.c:511
#, c-format
msgid "Failed to launch “%s”"
msgstr "Falló al lanzar «%s»"

View File

@ -14,22 +14,22 @@
# Alain Lojewski <allomervan@gmail.com>, 2014-2018.
# Erwan Georget <egeorget@opmbx.org>, 2016.
# Claude Paroz <claude@2xlibre.net>, 2010-2011, 2016.
# Charles Monzat <superboa@hotmail.fr>, 2016, 2018.
# Charles Monzat <superboa@hotmail.fr>, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master fr\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
"PO-Revision-Date: 2018-04-18 19:30+0200\n"
"Last-Translator: Charles Monzat <superboa@hotmail.fr>\n"
"POT-Creation-Date: 2018-03-03 10:22+0000\n"
"PO-Revision-Date: 2018-03-01 09:00+0100\n"
"Last-Translator: Alain Lojewski <allomervan@gmail.com>\n"
"Language-Team: français <gnomefr@traduc.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Gtranslator 2.91.7\n"
"X-Generator: Poedit 1.8.12\n"
#: data/50-gnome-shell-system.xml:6
msgid "System"
@ -234,7 +234,7 @@ msgstr ""
#: data/org.gnome.shell.gschema.xml.in:116
msgid "Keybinding to open the overview"
msgstr "Combinaison de touches pour ouvrir la vue densemble"
msgstr "Combinaison de touches pour ouvrir la vue d'ensemble"
#: data/org.gnome.shell.gschema.xml.in:117
msgid "Keybinding to open the Activities Overview."
@ -329,7 +329,7 @@ msgstr ""
#: data/org.gnome.shell.gschema.xml.in:206
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr "Activer lempilage des fenêtres déposées sur les bords de lécran"
msgstr "Activer lempilage des fenêtres déposées sur les bords de l'écran"
#: data/org.gnome.shell.gschema.xml.in:214
msgid "Workspaces are managed dynamically"
@ -362,7 +362,7 @@ msgstr ""
"préférences de %s :"
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
msgid "Cancel"
@ -682,12 +682,12 @@ msgstr "Ajouter aux favoris"
msgid "Show Details"
msgstr "Afficher les détails"
#: js/ui/appFavorites.js:140
#: js/ui/appFavorites.js:138
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "%s a été ajouté à vos favoris."
#: js/ui/appFavorites.js:174
#: js/ui/appFavorites.js:172
#, javascript-format
msgid "%s has been removed from your favorites."
msgstr "%s a été supprimé de vos favoris."
@ -897,7 +897,7 @@ msgstr "Disque externe déconnecté"
msgid "Open with %s"
msgstr "Ouvrir avec %s"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
msgid "Password:"
msgstr "Mot de passe :"
@ -985,15 +985,15 @@ msgstr "Un mot de passe est requis pour se connecter à « %s »."
msgid "Network Manager"
msgstr "Gestionnaire de réseau"
#: js/ui/components/polkitAgent.js:48
#: js/ui/components/polkitAgent.js:43
msgid "Authentication Required"
msgstr "Authentification nécessaire"
#: js/ui/components/polkitAgent.js:76
#: js/ui/components/polkitAgent.js:71
msgid "Administrator"
msgstr "Administrateur"
#: js/ui/components/polkitAgent.js:156
#: js/ui/components/polkitAgent.js:151
msgid "Authenticate"
msgstr "Sauthentifier"
@ -1001,7 +1001,7 @@ msgstr "Sauthentifier"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "Échec de lauthentification. Essayez à nouveau."
@ -1061,7 +1061,7 @@ msgstr "Ajouter des horloges locales…"
msgid "World Clocks"
msgstr "Horloges locales"
#: js/ui/dateMenu.js:227
#: js/ui/dateMenu.js:225
msgid "Weather"
msgstr "Météo"
@ -1069,7 +1069,7 @@ msgstr "Météo"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:291
#: js/ui/dateMenu.js:289
#, javascript-format
msgid "%s all day."
msgstr "%s toute la journée."
@ -1078,7 +1078,7 @@ msgstr "%s toute la journée."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:297
#: js/ui/dateMenu.js:295
#, javascript-format
msgid "%s, then %s later."
msgstr "%s, puis %s plus tard."
@ -1087,30 +1087,30 @@ msgstr "%s, puis %s plus tard."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:303
#: js/ui/dateMenu.js:301
#, javascript-format
msgid "%s, then %s, followed by %s later."
msgstr "%s, puis %s, suivi par %s plus tard."
#: js/ui/dateMenu.js:314
#: js/ui/dateMenu.js:312
msgid "Select a location…"
msgstr "Choisir un emplacement…"
#: js/ui/dateMenu.js:317
#: js/ui/dateMenu.js:315
msgid "Loading…"
msgstr "Chargement…"
#. Translators: %s is a temperature with unit, e.g. "23℃"
#: js/ui/dateMenu.js:323
#: js/ui/dateMenu.js:321
#, javascript-format
msgid "Feels like %s."
msgstr "Température ressentie : %s."
#: js/ui/dateMenu.js:326
#: js/ui/dateMenu.js:324
msgid "Go online for weather information"
msgstr "Chercher les informations météorologiques en ligne"
#: js/ui/dateMenu.js:328
#: js/ui/dateMenu.js:326
msgid "Weather information is currently unavailable"
msgstr "Les informations météorologiques ne sont pas disponibles actuellement"
@ -1706,7 +1706,7 @@ msgstr "Paramètres de confidentialité"
#: js/ui/status/location.js:196
msgid "Location In Use"
msgstr "Localisation en cours dutilisation"
msgstr "Localisation en cours d'utilisation"
#: js/ui/status/location.js:200
msgid "Location Disabled"
@ -1947,11 +1947,11 @@ msgstr "Reprendre"
#: js/ui/status/nightLight.js:71
msgid "Disable Until Tomorrow"
msgstr "Désactiver jusquà demain"
msgstr "Désactiver jusqu'à demain"
#: js/ui/status/power.js:61
msgid "Power Settings"
msgstr "Paramètres de gestion de lénergie"
msgstr "Paramètres de gestion de l'énergie"
#: js/ui/status/power.js:77
msgid "Fully Charged"
@ -2011,16 +2011,16 @@ msgstr "Mettre en veille"
msgid "Power Off"
msgstr "Éteindre"
#: js/ui/status/thunderbolt.js:294
#: js/ui/status/thunderbolt.js:272
msgid "Thunderbolt"
msgstr "Interface Thunderbolt"
#. we are done
#: js/ui/status/thunderbolt.js:350
#: js/ui/status/thunderbolt.js:328
msgid "Unknown Thunderbolt device"
msgstr "Périphérique Thunderbolt inconnu"
#: js/ui/status/thunderbolt.js:351
#: js/ui/status/thunderbolt.js:329
msgid ""
"New device has been detected while you were away. Please disconnect and "
"reconnect the device to start using it."
@ -2028,14 +2028,13 @@ msgstr ""
"Un nouveau périphérique a été détecté pendant votre absence. Veuillez le "
"débrancher et rebrancher avant de commencer à lutiliser"
#: js/ui/status/thunderbolt.js:356
#: js/ui/status/thunderbolt.js:334
msgid "Thunderbolt authorization error"
msgstr "Erreur dautorisation Thunderbolt"
#: js/ui/status/thunderbolt.js:357
#: js/ui/status/thunderbolt.js:335
#, javascript-format
#| msgid "Could not authorize the thunderbolt device: %s"
msgid "Could not authorize the Thunderbolt device: %s"
msgid "Could not authorize the thunderbolt device: %s"
msgstr "Impossible dautoriser le périphérique Thunderbolt : %s"
#: js/ui/status/volume.js:128

Some files were not shown because too many files have changed in this diff Show More