Compare commits

..

248 Commits

Author SHA1 Message Date
e7a502e5c3 wip: Port extensions app/portal to GTK4 2020-08-01 04:00:16 +02:00
b689b35b7d data: Place the shell into session.slice when using systemd
This way we conform more to https://systemd.io/DESKTOP_ENVIRONMENTS

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00
01a927f388 windowManager: Wait for X11 services using systemd
To do this, we now wait for the start/stop job to complete. We also have
two targets in gnome-session to ensure that everything is working as
expected.

In order to start the services, we simply request the
gnome-session-x11-services-ready.target unit, and wait for it to become
available. To stop, we use the gnome-session-x11-services.target unit
which should stop all services in a way that is entirely race free.

This requires both gnome-session and gnome-settings-daemon changes to
work (which are in the corresponding merge requests).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00
41d5b1455f data: Create generic org.gnome.Shell.target
Move the GNOME shell service file adapation for x11/wayland into the
target/service files. This means that the session definition can simply
pull in org.gnome.Shell.target, without having to care about whether it
is starting an X11 or wayland session.

Note that this currently requires fork'ing to do the test. This will
however not be needed in the long term when ConditionEnvironment becomes
available (see https://github.com/systemd/systemd/pull/15817).

We technically do not need to use template units. But doing so means
that the unit can be translated to the app id more easily (though it is
not yet completely clear how this should look like in the long term).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00
b710c6e275 data: Remove unused, commented and obsolete Conflicts lines
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00
4c9f42eea9 data: Use org.gnome.Shell prefix for systemd units
In general we want to move towards using reverse domain names for
systemd units. Doing this also means we have a consistent name between
desktop file and systemd unit, allowing us to create a generator that
pulls in the unit as defined in the sessions RequiredComponents.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00
2b0731ab81 Move screencasting into a separate service process
Move the screencasting into a separate D-Bus service process, using
PipeWire instead of Clutter API. The service is implemented in
Javascript using the dbusService.js helper, and implements the same API
as was done by screencast.js and the corresponding C code.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1372
2020-07-31 10:51:12 +02:00
a9b803f075 introspect: Introspect screen size
To be used by the screen cast service.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1372
2020-07-31 10:51:12 +02:00
73436b5276 dbusService: Queue shutdown check on startup
If something started the service, but crashed before managing to make a
method call, we'd end up with the service running indefinitely. Fix this
by queueing a shutdown check immediately on startup.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1372
2020-07-31 10:51:12 +02:00
20dcc8aa87 status/remote-access: Visualize recordings as screen recording
If a remote access is marked as a recording, visualize it the same way
as a built in recording. Also don't stop it if there is an actual screen
sharing going on, so that one can use a plain "recording" while still
disabling what is an actual screen sharing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1372
2020-07-31 10:51:12 +02:00
fdac0602db background: Mark pattern backgrounds as loaded
Otherwise we don't let GNOME Shell startup to proceed. Noticed
by accidentally running on the memory GSettings backend.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1381
2020-07-30 11:48:13 +02:00
e5272c84d7 Update Turkish translation 2020-07-29 21:57:19 +00:00
1812db7aa8 panelMenu: Destroy menu before chaining up
This avoid some (harmless but annoying) warnings, and is closer to
the original code prior to commit fc342fe8c5 and 557b232c89.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3022
2020-07-29 19:40:54 +00:00
260405a49e popupMenu: Ungrab when removing active menu
While we do have some handling for removing the active menu, it has
been a no-op for years. The bit that we really care about from the
PopupMenuManager's point of view is the existing grab though. Drop
that instead of calling _closeMenu() directly; ungrabbing will still
call the method indirectly, and it will still be a no-op :-)

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3022
2020-07-29 19:40:54 +00:00
71d37bffdf util: Remove shell_util_get_transformed_allocation
This helper function could be replaced with the new
clutter_actor_get_transformed_extents, that does the same.

See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1386

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1380
2020-07-29 18:09:53 +02:00
95436a08b5 Updated Spanish translation 2020-07-29 12:42:11 +02:00
13137aad9d loginDialog: Reset auth prompt on vt switch before fade in
At the moment, if a user switches to the login screen vt,
the login screen fades in whatever was on screen prior, and
then does a reset.

It makes more sense to reset first, so we fade in what the
user is going to interact with instead of what they interacted
with before.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2997
2020-07-27 16:18:44 -04:00
71f55643b2 layout: Only show ripple animation when overview was toggled
On X11, clients can grab keyboard on pointer (for example for popup
menus), and as a result the pushModal() call when opening the overview
fails.

However when the hot corner was used to toggle the overview, we still
show the ripple animation in that case, which is confusing as the action
did not actually happen.

Fix this by only showing the ripples if the overview is animating after
calling toggle(), as that should be a reliable indication of whether
the call was successful.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3005
2020-07-27 13:13:14 +00:00
5c550daecb backgroundManager: Always emit 'loaded' signal
As backgrounds are cached, it is possible that we never emit the
'loaded' signal added in commit f386103bc1. We are relying on the
signal though, so do the same as Background and emit the signal
from an idle if the background was already loaded.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1371
2020-07-22 11:02:24 +00:00
4e0492c517 Update Catalan translation 2020-07-22 08:47:17 +02:00
f386103bc1 Delay login animation until after wallpaper has loaded
Currently, the login animation can occur before the user's wallpaper has
been loaded. When this happens, we wind up displaying a solid blue
background for half a second or so before the proper background is
displayed. This looks jarring and bad. It's great that we can start
GNOME quickly, but starting up before the wallpaper is ready is *too*
quickly.

I've been meaning to fix this since 2014. Better late than never! We can
just have BackgroundManager emit a loaded signal the first time it loads
its first background, and have the startup animation code wait for that
before proceeding.

Some of this code is by Florian, who helped with promisifying. Thanks!

https://bugzilla.gnome.org/show_bug.cgi?id=734996
2020-07-21 20:25:31 -05:00
26e66aa4fd popupMenu: Handle keypress if numlock is enabled
On Wayland, navigating menus with the keyboard would not open drop-down
menus when NumLock is enabled.

That's old issue (gnome-shell#550) that was not completely fixed with
commit 88556226 because the lock mask needs to be filtered out in
_onKeyPress() as well.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/550
2020-07-21 16:38:15 +02:00
4420f52080 Update Romanian translation 2020-07-21 07:08:22 +00:00
b4082063de Update Ukrainian translation 2020-07-21 05:43:54 +00:00
bde974087a appDisplay: Append new icons at the first available page after first
As per design discussion, the first page is a somewhat of a special
page where we really don't want to change anything unless necessary.

Append new icons at the first available slot after the first page.
Make the placeholder icon be appended to the first available page
as well, since it's always used when dragging from folder dialogs.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
d93b51e135 appDisplay: Use a drag monitor to check for out-of-dialog drags
When the app folder dialog handles a drag hover, it starts a timeout
to popdown if dragging outside the "real" dialog area. However, when
dragging inside it, BaseAppView handles all drag hover events which
would disarm the popdown timeout. In cases like this, it's almost
impossible to prevent the timeout from triggering, which always pops
down the dialog.

Add a drag monitor when handling any drag hover (which only happens
when dragging outside the folder's icon grid); and eventually disarm
the popdown timeout from the monitor's motion event. Remove the drag
monitor when dragging over the folder dialog again.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
730a68dffc appDisplay: Increase folder dialog popdown timeout
App folders are now customizable, and the way to move icons to
another page is by throwing the cursor to either the left or
the right of the grid.

However, doing that triggers the popdown timeout, wich is 600ms
as of now, which is considerably short for such interaction.

Increase this timeout to 1.5 seconds.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
f06c257952 appDisplay: Allow reordering folders
Implement the methods to sort and query item positions
using the index in the GSettings key, and store the
updated positions when accepting the drop.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
7afab2c28c appDisplay: Factor out folder loading code
We'll reuse this code to implement custom positioning in
folders.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
16a18f2ae7 appDisplay: Only handle DnD when mapped
Now that the DnD code is shared between AppDisplay and
FolderView, we hit an unexpected problem: FolderView is
handling drag events even when the folder dialog is hidden.
As a side effect, this spams the journal with warnings.

Only handle drag events when mapped. On unmap, disable
the view's drag monitor, and disconnect from all drag
events.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
704e08dc08 appDisplay: Move DnD code to BaseAppView
This code will be shared with FolderView in the next commit, so
avoid duplication already and move the to-be-shared code into the
base class.

Because BaseAppView can handle vertical and horizontal orientations,
adapt the drag overshoot code to also handle horizontal overshoot.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
60311aa4d1 appDisplay: Fully hide icon when dragging
The partially visible icon causes more problems than
it solves, visually speaking. Fade it out completely
while dragging.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
cceb74706a appDisplay: Ensure icons always are at the correct position
When redisplaying, we currently only remove and add icons, but
never adjust the position of already added icons. If the icon
position changed, it wouldn't be reflected on the icon grid.

Make sure to move already added icons.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
578ae29ed2 appDisplay: Add placeholder when moving from folder dialog
When moving an icon from a folder dialog, the app grid doesn't
really have an icon to move around.

Add a placeholder icon and hijack it in the various places.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
701d110493 appDisplay: Restore dragged item's position on drag cancel
Otherwise we end up with the grid in an inconsistent state.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
d1cbf6c7a9 appDisplay: Allow overshooting any icon
Now that the icon being dragged can come from AppDisplay and also
a folder dialog, the check for when to overshoot is broken. Check
if the icon is a BaseAppView icon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
b64ce217e4 appDisplay: Create app folder where the drop happened
Create the app folder where the icon we drop at is located. This
ensures the folder icon doesn't go into the last page, hidden and
solitary.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
783dbe2aa9 appDisplay: Don't resort folders when name changes
With a customizable app grid, we don't want folders to move
after renaming. Their position is fixed.

Remove the sort-after-rename code from AppDisplay.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
f4ce1cf462 appDisplay: Make FolderIcon draggable
By making it a subclass of AppViewItem, it automagically inherits
the DnD code.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
d04d6e069d appDisplay: Check 'app-picker-layout' to make icons draggable
Now we drag not only to the Dash, but also to the icon grid itself,
so make the app icon draggable only when either one or the other is
writable.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
40de201056 appDisplay: Factor out draggable code into AppViewItem
This will be shared by the FolderIcon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
18234ea91a appDisplay: Use custom function to retrieve item page and position
It is important that '_loadApps()' return a sorted list -- adding the
same icons at the same positions but in different orders results in
a wrong icon grid.

Add support for using a custom positioning function, and implement it
in AppDisplay. Because FolderView doesn't implement a custom sorting
function, the items are still sorted alphabetically.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
e3f3297cba appDisplay: Save pages after dropping
Save the icon grid layout after dropping, and only in
that moment.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
e1ea1d2954 appDisplay: Introduce PageManager
The PageManager does the heavy lifting between reading the
'app-picker-layout' GSettings key, and saving the new pages.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
8e23ff8111 gschema: Introduce the 'app-picker-layout' key
This is the key that will be used to store the pages and the icons in
each page. The idea is that we we store an a{sv} variant for each page.
This variant will contain <icon id> → array of properties, where we
can store arbitrary data for each icon. The expected output of this
key is:

[
  {
    'polari.desktop': <{ 'position': 0 }>,
    'epiphany.deskop': <{ 'position': 1 }>,
  },
  {
    'telegram.desktop': <{ 'position': 2 }>,
    'builder.desktop': <{ 'position': 0 }>,
    'gitg.desktop': <{ 'position': 1 }>,
  }
]

The toplevel array is sorted, and pages of the grid always show in the
order they are stored.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:20 +00:00
8a50a8e64c appDisplay: Allow incomplete pages
Allow incomplete pages in the main grid, but not on folders.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:19 +00:00
fae207811a appDisplay: Move icons when hovering the grid
Implement a minimal version of the reflow-on-hover behavior,
which gives a better sense of physicality to the grid.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:19 +00:00
1d86424942 appDisplay: Factor out item addition and removal methods
It'll be useful later.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:19 +00:00
2bc8175219 appDisplay: Accept dropping any kind of icon over it
The grid will be able to handle them. As of now, it doesn't
do anything with folder icons, or icons in folders.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:19 +00:00
1e31caf0b8 appDisplay: Introduce moveItem API
This is a simplistic API that basically removes the
icon from it's old location, and adds it to its new
location.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:19 +00:00
8e24ac6b26 appDisplay: Ignore dragging over leeways
The leeways are parts of the icon that ignore incoming drag
events. This is how IconGrid and IconGridLayout treat it, and
this is how the icons should treat themselves too.

Make AppIcon ignore dragging over the left and right leeways.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:19 +00:00
427b9ac75f iconGrid: Add drop target API
Add a new drop target API. The bulk of it is implemented by
IconGridLayout, since it's the layout manager that knows where
each icon is placed at.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
2020-07-20 16:13:19 +00:00
f50205e9b4 calendar-server: Remove delay before event emission
The timeout seems to have been carried over from the old code that
relied on gnome-shell calling 'GetEvents' after every 'Changed' signal
where it was used to throttle the signal. In the new code where
calendar-server is sending the changes themselves via signals this is no
longer necessary and actually causes a delay when switching between
months.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2992
2020-07-20 13:50:21 +02:00
168cfdd86b keyboard: Fix missing key icons in numeric level
Those were missed in commit 57669bca1b.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2631
2020-07-20 01:24:16 +02:00
d339c94c18 keyboard: Move named icons into subdirectories
While GtkIconTheme does look up icons in the toplevel icons resource
path, it will only use them as ultimate fallback. That is, if the
icon theme (or the hicolor fallback) include a "keyboard" icon, it
will be used over the "keyboard-enter-symbolic" icon in the resource.

Moving the icons to appropriate subdirectories gives them higher
priority than the fallback names, and thus fixes the issue.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2631
2020-07-20 01:08:25 +02:00
97509bf1d2 Update Brazilian Portuguese translation 2020-07-19 12:54:47 +00:00
4a9c2ee805 Update Brazilian Portuguese translation
(cherry picked from commit 222919cfc1)
2020-07-18 13:44:05 +00:00
51e1e6d15c Update Brazilian Portuguese translation
(cherry picked from commit db30fbe3e9)
2020-07-17 21:36:25 +00:00
f0d2509dc3 extensionDownloader: Fix check for updates with several extensions
When having several extensions installed checking for updates fails.
This is because we are using GET and query params and since we are
sending all the metadata of the extension the server returns 502
when the URL is too long. This error code is ignored safely.

It is only needed to send the version of the extension to check if it
has updates.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2962
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1363
2020-07-15 18:26:11 -06:00
95bb194356 layout: Remove redundant background refresh
When using the NVIDIA driver, textures tend to loose their pixels when
suspending. In the past we handled this by figuring out when the NVIDIA
driver was used, and reload the background whenever we noticed we
resumed from suspend.

This shouldn't be needed anymore after
https://gitlab.gnome.org/GNOME/mutter/merge_requests/600, as it should
handle this by listening to video-memory-purged signal. Thus remove our
special handling here.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1358
2020-07-14 23:14:39 +00:00
de8b43a45d Update Greek translation 2020-07-14 20:43:58 +00:00
82be010fd8 workspace: Always set state at the end of overview transition
We don't change to the zoomed out state when fading to the overview,
however we should do that after the transition in case the user
switches to the window picker.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
2020-07-13 17:24:43 +00:00
2a0c116757 workspace: Reset window opacity after overview transitions
When using the fade animation when transitioning to the overview instead
of zoom, we fade out all window previews to fully transparent. But after
commit 751189253a removed the old _updateWindowPositions() function,
nothing resets the opacity again, so when switching from the app- to the
window picker, all previews are hidden.

Fix this by always resetting the window preview opacity after showing
or hiding the overview.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
2020-07-13 17:24:43 +00:00
6cdaec4001 workspace: Always use floating layout for fade transition
We don't animate size and position when fading, so we want all previews
to already be at their final position. However when the app picker is
opened from within the overview, window previews use the zoomed layout,
so that's the state we are then fading when leaving the overview from
the app picker.

Fix that by setting the correct state at the start of the fade transition.

(In the case of fadeToOverview(), the value should always be correct
already, but set it anyway for symmetry with fadeFromOverview())

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
2020-07-13 17:24:43 +00:00
ed4baec40f workspacesView: Really don't animate primary view when fading
In commit 9297d87775 we stopped syncing the primary view's actual
geometry at the start of the transition when doing a fade animation,
however the view animation may still be triggered by an allocation
change.

Prevent those unwanted size changes during fade by keeping track of
the fade state and explicitly skip syncing the geometry while a fade
is ongoing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
2020-07-13 17:24:43 +00:00
9e8883c922 workspacesView: Do not skip entire overview transition
Since commit af543daf1c, we skip the overview transition when the
actual geometry hasn't been set yet. However with the new layout
manager, the only bit that still needs the separate geometry is
the transition of the view, the workspaces can do their transition
just fine.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969
2020-07-13 17:24:42 +00:00
9bb64da895 Update Friulian translation 2020-07-12 16:08:10 +00:00
049f348e25 Update Chinese (China) translation 2020-07-12 02:35:34 +00:00
be190cc4d9 Update Chinese (China) translation 2020-07-12 02:14:16 +00:00
0893789b34 workspacesView: Update visibily when gesture drag begins
When dragging the workspaces through the swipe gesture, all
workspaces must be visible. WorkspacesView's _updateVisibility()
method special-cases this and ensures that.

However, this method is only called when (1) going to the active
workspace, and (2) when the gesture ends. That means, if there
is any workspace hidden by the time a gesture starts, it is never
shown!

Call _updateVisibility() on startTouchGesture() as well.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2969

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1360
2020-07-10 11:14:12 -03:00
7b5c6b657a Update German translation 2020-07-09 20:29:47 +00:00
9363fd3524 workspaceSwitcherPopup: Set offscreen redirect always
Because for most frames during a workspace switch it's not changing and
we can repaint it faster if it's cached on the GPU as a single texture.

This seems to reduce the render time for workspace switching by more
than 20%.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1356
2020-07-09 11:49:59 +08:00
0ad242a81e shell/window-tracker: Tighten sandbox ID prefix check
Since commit b60836932 we only allow WM_CLASS matches for sandboxed
applications if the found app's ID is prefixed by the sandbox ID.

The existing check still has a hole in it though: "org.example.Foo"
and "org.example.FooDevel" are different applications, yet the former
is a prefix of the latter.

So tighten the check by including a trailing "." in the checked prefix;
this excludes cases like the above, while still working for the regular
case of a single .desktop file because our app IDs include the ".desktop"
suffix.

Spotted by wjt.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1357
2020-07-08 12:23:10 +02:00
7031449f01 Bump version to 3.37.3
Update NEWS.
2020-07-07 19:01:21 +02:00
06df79286d windowPreview: Adapt to ClutterActor API changes
The API of clutter_actor_allocate_preferred_size() changed with
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1310, so adapt to
this change and pass the origin to the function.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1322
2020-07-07 16:51:33 +00:00
9297d87775 workspacesView: Do not animate primary view geometry when fading
When going straight to the app picker, we fade in the overview instead
of doing the full-blown zoom transition. In order to keep windows at
their floating position, we must apply the same to the view itself
and not transition to the overview geometry when fading.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
ef56b14553 workspacesView: Always sync geometry after showing overview
We don't always want to sync the geometry when entering the overview,
namely when the fade transition is used.

However we do want the correct geometry once we have entered the overview,
so that workspaces are at their place when switching from the app picker.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
30ff76272e workspacesView: Decouple syncing geometry from updating views
This gives us more control over when the geometry is synced. We
will soon use that to keep the primary view at the work area
geometry while fading to the overview.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
52a7481ba6 workspacesView: Only animate primary view
Non-primary views always use their monitor's work area for their
geometry, so there's nothing to animate when leaving the overview.

The animation is already limited to the primary view when entering
the overview, so this is also more consistent.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
14cfd74f08 workspace: Always start in FLOATING state
It doesn't matter which animation we use to enter the overview,
we always want to start and end with the floating layout.

The simplest way to achieve that is by creating the state adjustment
with the correct value in the first place.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353
2020-07-07 13:41:54 +02:00
fa97f7141b workspace: Remove reserved slots
This is a pre-3.0 feature that was dropped before
the 3.0 release, but managed to find its way until
now, 11 years later.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1352
2020-07-07 12:26:59 +02:00
03bcd4c05b unlockDialog: Small cleanup
It's silly to initialize a variable to 0 right before setting it
to its actual value.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1352
2020-07-07 12:26:58 +02:00
89574abc83 windowPreview: Remove slotId property
We're no longer using that property, so clean up a bit and remove the
last occurences of it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1351
2020-07-07 11:22:20 +02:00
602078cbde workspacesView: Add back overview transition
The transition was temporarily removed when switching to the new
workspace layout manager. Now everything is in place to reimplement
it with a combination of the layout manager's state adjustment and
the view's allocation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:09:29 +02:00
96f63b08c2 workspacesView: Properly allocate workspaces
So far we've been allocating workspaces in a stack, and relied on
translation to move them to the right position. And as the position
depends on both the workspace's index and the view's viewport, some
care is needed to prevent gestures/scrolling from interfering with
layout updates.

Clean that up by properly allocating workspaces in a row or column,
and use a translation to reflect the current scroll position.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
d66cd0d206 workspacesView: Don't set full geometry
It's not used anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
ff13ad9e71 workspacesView: Stop using full geometry
Since the workspaces themselves stopped using it, there is little
reason for upholding the difference between "full" and "actual"
geometry.

Just base positioning/swiping on the view's allocation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
5e4b65d37e workspacesView: Use work area for default geometry
The workspace's layout manager keeps the workspace at the same ratio as
the work area, so it makes more sense to base the views' default geometry
on that as well than the monitor area we are using right now.

(It shouldn't matter much in practice, as this only affects views on
non-primary monitors where the work area usually matches the monitor area)

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
51fd0875d1 workspacesView: Simplify syncing actual geometry
We adjust the size and position of the primary view to match the workspaces
display, but views on other monitors are always set to fill their monitor.

Take that into account and create views with a fixed size and position, then
only sync the primary view to the new geometry.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
75f8903c7e workspace: Use actual container allocation
We currently assume that the passed in Clutter.ActorBox matches
the container allocation, but in reality it is the container's
content area.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
124eb1ca18 workspace: Account for window picker padding
Workspaces are supposed to request the work area as their preferred
size, however the widget will adjust the sizes returned by the
layout manager to account for borders and padding.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
b5d925817f workspace: Disable preview overlays unless fully zoomed out
The overlays are only meant to be shown when the workspace is fully
zoomed out, not when using the floating layout or some in-between state.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:53 +02:00
c134091268 windowPreview: Allow to disable overlay
WindowPreviews now contain and manage overlaid elements like close
button or title label themselves. That's generally better, but right now
the only way to disable those overlays (for example during transitions)
is to prevent any hover or focus events from getting to the preview.

Instead, add some explicit API for enabling or disabling overlay support.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:06:49 +02:00
ff89693998 workspace: Handle minimized windows in layout
The new layout manager always uses the window's regular size and position
for the floating state, but the preview of minimized windows should be
hidden instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345
2020-07-07 00:05:36 +02:00
c26860dcb7 windowPreview: Ensure style as soon as preview is realized
For the windowPreview we need to ensure the style information of the
border and title is up-to-date when chromeWidths() or chromeHeights() is
called. Since the introduction of the WorkspaceLayout those functions
may be called during an allocation cycle, which means we should avoid
calling queuing relayouts inside them. Calling StWidgets ensure_style()
method will queue a relayout though in case the newly generated theme
node has a different geometry.

So avoid queueing a relayout during allocation cycles (and the warning
Clutter logs because of that) by ensuring the style of the border and
title earlier, as soon as the WindowPreview is attached to a stage.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
6757c7d20a workspace: Animate opening new windows while in overview
Use the pivot point and scale to animate in new windows which are opened
while the overview is shown.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
751189253a workspace: Use the new WorkspaceLayout for allocating window clones
Switch to the new WorkspaceLayout layout manager to allocate the window
clones of the overview properly using Clutters layouting mechanisms.

Since we now no longer make use of the fullGeometry, we can remove the
setFullGeometry() function from the Workspace class. Also we can stop
setting the actualGeometry on the Workspaces and WorkspaceViews and
instead just set the fixed position and size of the views to their
full or actual geometry. This also has the benefit that we no longer
have to set a custom clip, but can simply enable clip_to_allocation.

The geometry needs to be set inside a BEFORE_REDRAW later because
_updateWorkspacesActualGeometry() is called from a notify::allocation
handler.

This isn't doing any animations when showing/hiding the overview yet,
we'll add that in the next commit.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
21187a4cec workspace: Introduce layout manager for allocating the Workspace
Add a new ClutterLayoutManager for layouting the workspaces of the
overview, WorkspaceLayout.

This layout manager integrates the existing LayoutStrategies used to
layout the window clones of the overview and supports freezing the
layout, animating between layout changes and adjusting the spacing for
the width and height of the window chrome. It also adds support for a
layout of the windows that looks the same as the actual workspace,
transitioning between that layout and the LayoutStrategy can be done by
setting the value of an StAdjustment, available using the
stateAdjustment getter function.

This will replace the current static-positioning based layouting of the
window clones in the next commit.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
b7db56ca9b workspacesViews: Use translation for showing Workspaces
We're going to use fixed position for positioning workspaces when
they're allocated by their own layout manager, using those positions to
scroll between different workspaces interferes with that, so do that
using translations instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305
2020-07-06 23:16:15 +02:00
261d36ba72 keyboard: Request a bigger size in portrait orientation
In portrait orientation, we set the height to the preferred height
for the monitor width (or, if smaller, a third o the screen height).

However as the forWidth currently doesn't make a difference, the height
is effectively controlled by the natural height of the keys - which is
rather small.

Address this by making AspectContainer request an appropriate preferred
size based on the fixed ratio.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2349
2020-07-06 15:16:35 +00:00
1e72874192 keyboard: Fix setting height in portrait orientation
get_preferred_height() returns both the minimum and natural height,
not a single size. Math.min() doesn't handle that and returns NaN,
whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2349
2020-07-06 15:16:35 +00:00
f29dbd1f18 shell/window-tracker: Match on WM_CLASS first
Currently our heuristics for matching a window to its app check
for the application ID before the WM_CLASS, as the ID is more
reliable in so far that it is outside the application's control
and so it cannot use it to spoof a different application.

However this also prevents applications with multiple .desktop
files like LibreOffice from matching any .desktop files other
than the one under the main ID.

Since we now no longer allow the WM_CLASS to match a .desktop
file that doesn't belong to the sandboxed application, we can
fix that issue by checking the WM_CLASS first, without opening
the door to spoofing.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/219
2020-07-06 14:59:51 +00:00
b60836932a shell/window-tracker: Enforce prefix for sandboxed applications
At least flatpak (no idea about snap, sorry) enforces that all .desktop
files exported by a sandboxed app use the application ID as prefix.

Add the same check when trying to find a match based on the WM_CLASS,
to prevent sandboxed apps from matching a .desktop file they do not
own.

At the moment this is unlikely as we check for a match on the
sandboxed app ID first, but we are about to change that.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/219
2020-07-06 14:59:51 +00:00
bf47d1b22d shell/window-tracker: Minor simplification
Switching to autocleanup gives us a better separation between the
app/no-app cases.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/219
2020-07-06 14:59:51 +00:00
4ea0fca4fc gdm: Introduce vmware credential manager for pre-authenticated logins
The previous commit implemented a new CredentialManager interface to
    facilitate adding additional providers for pre-authenticating the user
    at the login screen.

    This commit implements a new credential manager using that interface
    for vmware deployments.

    Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1983
2020-07-04 08:11:49 +08:00
809f820cd4 gdm: Refactor oVirt to a generic CredentialManager interface
Commit 4cda61a1 added support for pre-authenticated logins in
    oVirt environments. This feature prevents a user from having
    to type their password twice (once to the oVirt management machine,
    and then immediately again in the provisioned guest running gnome-shell).
    That feature is currently oVirt specific, but a similar feature would
    be useful in non-oVirt based virt farm environments.

    Toward that end, this commit generalizes the various aspects of the
    oVirt integration code, so that it can be reused in a subsequent
    commit for adding single sign on support in vmware deployments, too.

    Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1983
2020-07-04 08:11:49 +08:00
75235624b2 background: Use actor.content.background
Because actor.background no longer exists and emitted errors when
referenced.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1343
2020-07-03 14:41:48 +08:00
5ea54426b9 st/adjustment: Add ::actor property
Will be used by transitions to set the timeline actor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1299
2020-07-02 20:50:03 +00:00
4aabcd9e7d shell/global: Adapt to after-paint signal type signature
A stage view parameter was added.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1299
2020-07-02 20:50:03 +00:00
918b3eeb42 st/theme-node-transition: Pass actor when constructing timeline
Timelines now take an actor, to be able to derive an appropriate frame
clock, so pass the one of the actor we're transitioning on.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1299
2020-07-02 20:50:03 +00:00
482c655590 messageTray: Remove SourceActorWithLabel class
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1346
2020-07-01 20:20:26 -03:00
86b5a43008 shell/app: Add new get_icon() method
Now that we can always associate a GIcon with the app, add a method
to access it. While create_icon_texture() is still likely to be more
convenient in most cases, exposing the icon can still be useful, for
example to add it to a different kind of actor or to compare it with
other GIcons.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1342
2020-07-01 12:42:57 +02:00
d7cb2eeebc st/texture-cache: Return a GIcon from bind_cairo_surface_property()
We still load the surface into an StImageContent, but instead of
adding the content to an actor we hand out, return the content
itself (as GIcon).

That means we lose the ability to specify an icon size, but as we
get the pixel data from a fixed-size surface anyway, that shouldn't
matter much in practice.

Not to mention that the function is only used for fallback X11 icons,
which are already shit more often than not.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1342
2020-07-01 12:42:57 +02:00
770231c2d7 st/image-content: Implement GIcon interface
On the one hand, this is a bit of a stretch: StImageContent is what
we create from GIcons.

But on the other hand, there's some justification: StImageContent does
represent an image (and likely icon) after all, and there's some
precedent with GdkPixbuf.

In the end as we don't care about serialization or loading from other
API, we can go with a very crude implementation that allows us to
pass out a content as GIcon and use it directly when "loading" it.

We will use that soon to represent X11 window icons as GIcons, which
in turn will allow us to unify app icon handling.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1342
2020-07-01 12:42:57 +02:00
ecdf62d63e st/viewport: Invalidate transform when it changes
Since ClutterActor now caches the whole transformation matrix for an
actor, we need to invalidate the cached transform if the matrix returned
by apply_transform() implementations changes.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1308
2020-06-30 19:17:58 +02:00
d885486397 st/widget: Remove get_resource_scale function
ClutterActor provides the same function, but with a different return
value. So since we already switched to the ClutterActor implementation
in our C code, we can now safely remove st_widget_get_resource_scale()
and update the JS code that's still using the old API.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1287
2020-06-30 13:42:18 +00:00
1524abc947 Switch to ClutterActors resource-scale-changed signal
Instead of using the "notify::resource-scale" signal and StWidgets
"resource-scale-changed" signal, use the new "resource-scale-changed"
signal of ClutterActor, which replaces its "resource-scale" property.

Since we'd now have two "resource-scale-changed" signals, one on
ClutterActor and one on StWidget, remove the StWidget one in favour of
the new one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1287
2020-06-30 13:42:18 +00:00
cb9842e4a4 Use new clutter_actor_get_resource_scale() API
Update the existing users of clutter_actor_get_resource_scale() to the
new API which doesn't return a boolean value.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1287
2020-06-30 13:42:18 +00:00
140ab4dec1 unlockDialog: Fix scale-factor handling on multihead
The blur effect needs to take the scale-factor into account, so we
listen for scale changes. However we set up the signal handler when
creating a background, which is repeated for each monitor, and every
time the monitor configuration changes. But we only disconnect the
last handler that was connected, and only when we are destroyed,
not when recreating backgrounds.

Fix this by splitting out updating the effect parameters to a separate
method that iterates over all backgrounds, so we can simply set up the
handler from the constructor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1341
2020-06-30 13:12:08 +00:00
845122497b altTab: Remove down arrow when removing an app from switcher
The arrow of the removed app was still left in the list with the
visibility of the arrow still depending on the original list order. This
could either lead to apps with just one window now suddenly having a
down arrow or apps with multiple windows not having one. If the last
window in the list had a down arrow, it would have been displayed
outside the window switcher.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1340
2020-06-29 22:51:41 +02:00
d51a622fc0 Update Latvian translation 2020-06-29 18:12:25 +00:00
e90466347a cleanup: Use Meta.Workspace.active property
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1337
2020-06-29 17:09:38 +02:00
73f8c1c482 inhibitShortcutsDialog: Enable line wrapping for additional label
The inhibitShortcutsDialog can show an additional label which explains
how to restore shortcuts. This label is not managed by the
MessageDialogContent, so we need to enable line wrapping and disable
ellipsization ourselves.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336
2020-06-29 10:17:07 +00:00
0ff75941ea dialog: Return GLib.SOURCE_REMOVE instead of false
This is more readable than just returning false.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336
2020-06-29 10:17:07 +00:00
e4bb2037ca dialog: Check whether text changed when setting title or description
As usually with GObject setters, we should check whether the property
actually changed before setting the value and notifying the property. So
check whether the title or description text actually changed before
setting it.

This fixes a bug which makes the title flicker and change its size,
because when updating the title we remove the "leightweight" css class
and reapply it inside a later, which makes the title appear larger for
one frame.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336
2020-06-29 10:17:07 +00:00
481014ac9e st/viewport: Only extend child allocation when scrolled
When scrolled, the container's allocation is smaller than the allocation
of the content. To account for that, commit 2717ca9d08 added the
additional size reported by the layout manager to the content allocation.

However as it did so unconditionally, we now allow children to extend
outside the parent even when *not* scrolled, which breaks any constraints
set on the container (like "width" or "max-height").

Fix this by only extending the child allocation in scrollable dimensions.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2491
2020-06-29 00:42:03 +02:00
6dbcb5f9da Update Kazakh translation 2020-06-27 18:29:23 +00:00
c1f06daf88 st/tests: Replace ClutterGroup by ClutterActor
ClutterGroup is deprecated and can be 1:1 replaced by ClutterActor,
so let's do it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1334
2020-06-26 21:03:57 +00:00
0717f76362 Replace anchor point by translation and pivot point
Anchor point is deprecated and will eventually be removed from
Mutter's Clutter. Replace them by a combination of pivot point
and translation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1334
2020-06-26 21:03:57 +00:00
da738988cd workspacesView: Small cleanup
scrollToActive() and friends are only used for handling the 'switch-workspace'
animation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1333
2020-06-26 16:19:57 +02:00
e86e88ea47 workspacesView: Don't make reactive
Since commit a11f417cd0, scroll events are handled by the SwipeTracker.
There's no other reason for the view to be reactive, so don't make it so.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1333
2020-06-26 16:19:57 +02:00
ae338af1e8 st-label: Keep labels fully pre-rendered on the GPU
The performance of the icon grid was being hindered by a large number
of primitives (a few hundred) being copied from the CPU to the GPU on
each frame. This was first noticed in mutter#971 but we failed to
investigate all the issues at the time.

You can also see the high number using `COGL_DEBUG=batching` or
`COGL_DEBUG=disable-texturing`. So now it's obvious that high number is
every letter of every label being uploaded as a separate quad. Let's not
do that and instead treat the whole label as a single quad/texture.

Measured performance on an i7-7700 at UHD 3840x2160:

Journal entries per frame on the icon grid:
 * Before: 288 (18 KB copied from CPU to GPU)
 * After:   73 ( 4 KB copied from CPU to GPU)

Spring animation:
 * Before: 20-30 FPS, avg 22/peak 45 milliseconds per frame
 * After:  30-40 FPS, avg 14/peak 28 milliseconds per frame

Scrolling the icon grid:
 * Before: 15 FPS, 50 milliseconds per frame
 * After:  30 FPS, 28 milliseconds per frame

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1329
2020-06-25 09:09:36 +00:00
3f9cc0ed37 Update Kazakh translation
(cherry picked from commit d3384d29e4)
2020-06-25 04:34:40 +00:00
8f8ecdb983 appDisplay: Update folder dialog field before ungrabbing
Noticed while working on customizable folders. Calling GrabHelper.ungrab()
ends up calling FolderDialog.popdown(), but at this point the '_isOpen'
field isn't updated yet, so we end up calling popdown() twice.

Update the '_isOpen' field before ungrabbing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1332
2020-06-24 18:06:21 -03:00
8f547c9d5d iconGrid: Adjust animation delay
As per design feedback, adjust the animation delay to be shorter.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1332
2020-06-24 18:06:21 -03:00
821f3e8ddf overview: Pass drag source on item-drag-* signals
Overview has signals to notify about starting, cancelling, and
finishing icon drags, but none of these signals pass the dragged
item to the callbacks.

Pass the dragged items to the 'item-drag-*' overview signals.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1332
2020-06-24 18:06:21 -03:00
81be25bbd6 Update Kazakh translation 2020-06-24 16:17:48 +00:00
26d27fdbf8 overview: Define ANIMATION_TIME earlier
Commit c7e597cf72 tried to improve the slide animations when entering
the overview by using the same time as the overall overview animation,
but in fact broke the animation most of the times.

That is because the Overview imports OverviewControls before defining
the ANIMATION_TIME variable, so any javascript code that is evaluated
during that import will see the value as "undefined" (which is converted
to 0 for the animation).

Fix this by moving the ANIMATION_TIME variable before the imports instead
of the usual placement.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1331
2020-06-24 15:41:12 +02:00
c7e597cf72 overviewControls: Animate sidebars the same duration as windows
When you tap Super and see the sidebars and windows slide, it looks more
cohesive if those animations complete at the same time.

Previously there were 0.09 seconds difference between the two animations
which was enough to make it look slightly buggy. Now it doesn't.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1289
2020-06-23 19:07:30 +00:00
e4db68a1da Revert "workspacesView: Work around spurious allocation changes"
We now found the underlying bug: The ControlsManager (which causes the
bad call to `_updateWorkspacesFullGeometry()`) is getting (re-)allocated
while we add the view to the overviewGroup actor because the
overviewGroup is already visible and the view is immediately getting
mapped by `clutter_actor_add_child_internal()`. That causes a
resource-scale calculation and that indirectly causes a call to
`_clutter_stage_maybe_relayout()` (explained more detailed in the last
commit).

So now that we got rid of the immediate relayout happening when mapping
the view, we can revert this fix.

This reverts commit 6cc19ee6f0.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1315
2020-06-23 19:05:05 +00:00
980a90f8fb dateMenu: Do not ellipsize clock
This addresses the issue with ellipsized clock that occurs when using
extensions that move the clock from the middle to the side of the top
bar.

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

Signed-off-by: MOZGIII <mike-n@narod.ru>
2020-06-23 16:14:24 +00:00
87e4bf52b7 windowPreview: Fix a division by zero
When the bounding box size is 0 during allocation (which happens right
after creating a window for example), we're doing a division by zero and
end up with a NaN scale. This ends up making the childBox NaN, which
triggers an error in Clutters allocation machinery.

So fix that and fall back to a scale of 1 in case the bounding box is
empty.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1320
2020-06-23 15:50:03 +00:00
a368df61ac volume: Update indicator when microphone volume changes
The current microphone indicator only indicates if the microphone is in
use. Users might be also interested if their microphone is recording
or is muted, this commit enables that without opening the pop-up
menu. The microphone icon changes itself, depending on the sensitivity
of the microphone. It behaves similar to the already existing volume
indicator.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2902
2020-06-23 11:34:16 +02:00
5e66b104dc Updated Lithuanian translation 2020-06-21 22:18:03 +03:00
08a5f41505 windowManager: Support prepending workspace with horizontal layouts
Commit ce35d523a2 implemented that behavior for vertical workspace layouts,
there is no reason to not allow the same for horizontal layouts.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2916
2020-06-20 08:15:44 +00:00
ec36762309 st: Add st_clipboard_get_content()
Complementing st_clipboard_set_content(), this function allows retrieving
specific mimetypes from the selection as GBytes.

Related: https://gitlab.gnome.org/GNOME/nautilus/-/issues/634

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1321
2020-06-19 13:44:15 +02:00
aa70020bc8 appDisplay: Compare indicator and grid pages
In the past, the icon grid would update the number of pages
during the call to adaptToSize(). However, after the new grid
layout landed, the number of pages is updated by the time an
item is added or removed.

Instead of comparing the old and new number of pages in the
icon grid, compare the pages shown by the indicator, and the
grid pages.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:54:31 -03:00
1e77e6fc79 pageIndicator: Add getter for current number of pages
Add a getter to PageIndicators to retrieve the number of pages
it currently displays.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:54:31 -03:00
68203e7091 appDisplay: Allow a slighly bigger area for drag overshoot
Now that we don't have the Frequent tab anymore, and subsequently
the buttons to switch tabs, the app grid fill all the way to the
bottom, leaving no room for drag overshoot.

Add a 20px (i.e. OVERSHOOT_THRESHOLD) area at the bottom of the
grid where dragging actually scrolls to the next page.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:54:31 -03:00
cff0752bcc appDisplay: Factor out shared code into BaseAppView
The two BaseAppView subclasses now share a lot in terms of
widgetry: they both have a scroll view, pagination dots, swipe
management, etc.

Move this shared code into BaseAppView. Notice, however, that
BaseAppView only creates the widgetry, but it doesn't add them
to any specific layout. FolderView arranges the widgetry in a
vertical box, while AppDisplay arranges it in a ShellStack.

Add a new 'orientation' parameter to BaseAppView and use it
to determine the orientation of the pagination dots, the swipe
tracker direction, and the scroll event handling.

It is worth noticing that the scroll event is a bit more
sophisticated now: when the orientation is horizontal, it
handles all directions since mice wheels usually only generate
up/down events.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:54:31 -03:00
45d8e11123 Add pagination to the folder dialog
Make the folder dialog's app grid horizontal, and add
paginators to it as well. Add a new _createGrid() method
to BaseAppView that created an IconGrid.IconGrid by
default, and make FolderView override it to return the
new FolderGrid class.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:54:22 -03:00
5aee714b70 theme: Adjust folder dialog CSS
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:32:01 -03:00
3c3c3b7c69 appDisplay: Don't destroy FolderView directly
When FolderIcon is destroyed, it destroyed the FolderView and, if
there's a folder dialog present, it destroys the dialog as well.

Turns out, the folder dialog adds the icon's FolderView to itself.
The view becomes part of the dialog's actor tree. When the dialog
is destroyed, it also tries to destroy the view - but the folder
view was already destroyed by FolderIcon!

Fix that by letting the dialog destroy the folder view if it exists,
otherwise destroy the folder view directly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:32:01 -03:00
6ba2913075 appDisplay: Add items in order
Add app icons to the exact page and position they're located
instead of always appending. This will be useful later when
custom icon positions are in place.

For now, it assumes pages are always filled, which is true,
but this will also change with custom icon positions.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:31:57 -03:00
75c4e1cd63 appDisplay: Actually destroy icons
AppDisplay currently adds all icons, and hides the ones inside
a folder. Change that to only add the icons that are not inside
folders. Adding an icon to a folder removes the icon from the
main grid.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:30:12 -03:00
fb4a4ca4a2 appDisplay: Redisplay folders before AppDisplay
When filtering out the app icons, AppDisplay calls FolderIcon.getAppIds(),
which then calls FolderView.getAllItems(). This last function reads the
already added app icons inside the given folder, and return their app ids.

So far, so good.

When the GSettings backing a folder changes, FolderIcon emits 'apps-changed'
to notify AppDisplay that the folder changed.

Cool.

When AppDisplay receives this signal, it first recreates its own icons, then
updates the folders, and finally hides the icons that are inside folders.

This series of events is unfortunate. Future patches will need the folder
to be updated *before* AppDisplay updates its own icons.

Update folder icons before chaining up to BaseAppView._redisplay().

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:30:12 -03:00
4c2c1297be appDisplay: Move child focus handling to IconGrid
The icon grid is always paginated, so the app grid code doesn't need
to behave differently in the FolderView and AppDisplay.

Move the keyboard handling to IconGrid itself, and remove the now dead
code from AppDisplay.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:30:12 -03:00
c5dbdad5fc iconGrid: Adapt grid layout according to available size
The new icon grid layout operates based on rows and columns, and
doesn't try to dynamically adapt it to fit to the container. In
this case, it is better to have a pre-defined set of well-known,
well-tested rows and columns, and switch between them based on
the aspect ratio of the screen.

Introduce a set of modes to the icon grid, and select the mode
that is closest to the aspect ratio.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:30:12 -03:00
4e05bcd3b6 iconGrid: Use IconGridLayout
Replace the current grid code with IconGridLayout.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:30:12 -03:00
3555550d5e iconGrid: Introduce IconGridLayout
IconGridLayout is a new layout manager that aims to replace the
current paginated layout algorithm implemented by the icon grid.

There are a few outstanding aspects of this new layout manager
that are worth highlighting. IconGridLayout implements all the
mechanisms necessary for a paginated icon grid, but doesn't
implement any policies around it. The reason behind this decision
is that this layout manager will be used by other places (e.g.
the login dialog) that demand different policies to how the
grid should look like.

Another important aspect of this grid is that it does not queue
any relayouts when changing its properties. If a relayout is
required, the actor should manually queue it. This is necessary
to avoid layout loops.

Add the IconGridLayout class. Next commits will do the surgery
to IconGrid and any related code to use this new layout manager.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
2020-06-18 10:30:12 -03:00
8e05fa2728 st: Don't leak st_describe_actor strings
Hopefully this code doesn't get hit much. And it does seem to be the
only user of the function.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1319
2020-06-18 14:10:59 +08:00
d7c3050e2d Update Romanian translation 2020-06-17 15:47:59 +00:00
89ba8562c3 dnd: Set drag actor position immediately after reparenting
For drag actors which get reparented to the uiGroup, we currently wait
until the next input event to set the fixed position of the actor, until
that they will just be allocated their old fixed position, which is 0,
0.

So avoid drag actors flickering at the top left for one frame and
position them correctly right after reparenting.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1310
2020-06-17 10:47:50 +02:00
82da73baff dnd: Fix size of actors which don't get allocated their preferred size
Properly adjust for drag actors which were allocated using a custom
vfunc_allocate() and might not have gotten allocated their preferred
size. When DND reparents the actor to the uiGroup, the drag actor will
get allocated its preferred size, so we also need to take the difference
between the old allocation size and the preferred size into account
before reparenting to the uiGroup.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1310
2020-06-17 10:47:47 +02:00
b2eeda9b46 dnd: Don't override fixed position if actor had no fixed position before
Properly handle drag actors which are not allocated using a fixed
position and disable the fixed position we were using to move the actor
around before we reparent it again to its original parent.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1310
2020-06-17 10:46:46 +02:00
0db41a3773 st/scroll-bar: Fix horizontal bar in RTL locales
As the view now scrolls from right-to-left in RTL locales, the
scroll bar handle should reflect that.

Likewise the event handling needs adjusting as well: Scrolling
left should increase the adjustment value, and clicking the
trough to the left of the handle as well.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1318
2020-06-17 01:08:03 +02:00
8d7f7e61dd st/scroll-view: Adjust scroll events in RTL locales
In RTL locales, scrolling left should increase the adjustment value.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1318
2020-06-17 01:07:28 +02:00
3f4b253dac st/viewport: Fix horizontal translation in RTL locales
In RTL locales, the lowest value should correspond to the right-most
position and vice-versa.

That this went unnoticed for so long shows how we have avoided horizontal
scrolling so far :-)

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1318
2020-06-16 23:57:51 +02:00
e4cbe5126a workspace: Split WindowPreview into a separate file
The workspace.js file is quite large and is a bit confusing when it
comes to the term "window" in there, because it can either refer to a
WindowPreview of a complete window or to an individual window like an
attached dialog.

So try to avoid that confusion and split the new WindowPreview class and
its WindowPreviewLayout layout manager out into a new windowPreview.js
file.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 14:13:02 +02:00
8357739ef8 workspace: Stop exporting window actor in the WindowPreview
Having a public property exporting the MetaWindow is enough to get the
window actor, too, so remove the public realWindow property and while at
it, rename that property to _windowActor, too.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 14:10:01 +02:00
6bef9334b7 workspace: Initialize WindowPreview using a MetaWindow
MetaWindow is Mutters representation of a window and provides all the
APIs about it, MetaWindowActor is just the ClutterActor that's drawing
that window. So use a MetaWindow to create a WindowPreview instead of
the window actor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 14:10:01 +02:00
8c49f45ac8 workspace: Set overviewHint on MetaWindow
We want to stop using the MetaWindowActor for things which are actually
related to the MetaWindow, one more thing where we can change that is
the overviewHint, which is currently added to the MetaWindowActor.

So move that hint to the MetaWindow and stop calling
get_compositor_private() in a few more places.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 14:10:01 +02:00
46600740fe workspace: Stop using WindowPreview.realWindow in the overview
We can simply get the MetaWindowActor by calling
MetaWindow.get_compositor_private(), so stop accessing the realWindow
property of WindowPreview. For this we also have to make _isMyWindow()
and _isOverviewWindow() take a MetaWindow as an argument instead of a
MetaWindowActor.

Since the WorkspacesThumbnails are also drop targets for WindowPreviews
and their WindowClones also have the public metaWindow property, switch
to using the metaWindow property there, too.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 14:10:01 +02:00
c281e868a0 workspace: Only pass MetaWindow to WindowPreviewLayout
Since the WindowPreview class rarely needs to handle the actual actor
painting the window preview, refactor the WindowPreviewLayout a bit to
only pass a MetaWindow to its addWindow() and removeWindow() functions.

Also make the getWindows() function return an array of MetaWindows,
which makes the getMetaWindow() function obsolete, so remove that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 14:09:54 +02:00
039431a73f workspace: Stop using clone terminology in WindowPreviewLayout
We're going to remove ClutterClones, so call the parameters to
addWindow() and removeWindow() "actor" instead of "clone". Also make the
destroyIds less confusing and rename the actual actor destroy id to
"destroyId", and rename the window actors destroy id to
"windowActorDestroyId".

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 14:04:10 +02:00
d4f8ea1c53 workspace: Make some functions in WindowPreview private
Now that the WindowPreview also shows the overlays itself, we can make
some functions private.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 13:55:17 +02:00
96f5e2b33e workspace: Call _activate() directly when clicking the window preview
We can remove the simply callback function in favour of an anonymous
function here.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 13:55:17 +02:00
93a542d52c workspace: Set WindowPreview offscreen redirect inside constructor
This can also be moved to constructor, so do it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 13:55:17 +02:00
f4fcba74ff workspace: Remove slot property of WindowPreview
Since the slot property was only accessed by the old WindowOverlays to
get the position and size of the preview, we can safely stop setting it
and remove that property now.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 13:55:17 +02:00
cadbf7cd8b workspace: Rename WindowClone to WindowPreview
Since ClutterClones are going to be removed, let's switch the
terminology here to something that's more understandable and rename the
WindowClone class and its layout manager to
WindowPreview/WindowPreviewLayout.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
2020-06-16 13:55:17 +02:00
dd8e1aef51 st-widget: Use clutter_input_device_get_actor() to get pointer actor
Use clutter_input_device_get_actor() since it replaces
clutter_input_device_get_pointer_actor().

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1285
2020-06-16 09:33:08 +00:00
15dc37a139 Update Kazakh translation 2020-06-15 13:38:33 +00:00
c23ad83c59 windowManager: Warn when removing old animationInfo
Now that we properly notify mutter about when a size-change animation
has ended, it should never happen that a new size-change animation is
started without the last one being cancelled (ie. 'kill-window-effects'
being emitted).

This means there should also never be an old animationInfo attached to a
window actor, so warn in case we still find one when starting the
animation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
2020-06-15 13:12:03 +00:00
4a6f550acb windowManager: Use new mutter API to freeze window actors ourself
We're currently using the hack of telling mutter that our effect is
completed (even though it isn't) in order to unfreeze updates of the
window actor.

This causes a bug with detecting the wl_outputs a window is
visible on, because the MetaWindowActor emits its "effects-completed"
signal too early, making Mutter update the wl_outputs while we're doing
the animation.

Now since meta_wayland_actor_surface_is_on_logical_monitor() uses the
transformed position and size of the MetaSurfaceActor and is being
called right after we setup the animation (but before it actually
starts, that happens at the next paint cycle) it will use a "very wrong"
rectangle: The transformation has been set to move the actor back to its
old position, and while we did already unfreeze updates and called
clutter_actor_set_position() in meta_window_actor_sync_actor_geometry(),
the actual allocation is not updated yet; this makes
clutter_actor_get_transformed_position() return a position including in
the new transformation, but not including the new allocation, and the
rectangle ends up being moved to the next monitor or completely out of
the stage.

To fix this issue properly, we need to decouple unfreezing actor updates
from emitting the "effects-completed" signal, which is now possible with
the new meta_window_actor_freeze() and meta_window_actor_thaw() APIs. So
use those new methods to freeze and thaw actor updates ourselves and
make sure to call shellwm.completed_size_change() only after the
animation has finished.

Mutter MR: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1250

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/513

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
2020-06-15 13:12:03 +00:00
8078d78c30 windowManager: Also clear animationInfo when size-changed wasn't emitted
It might be that we receive a "kill-window-effects" signal between the
emission of the "size-change" and the "size-changed" signal.

In this case we already have the animationInfo attached to the window
actor, so we should also remove it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
2020-06-15 13:12:03 +00:00
d7185d71c6 windowManager: Clean up starting of size-change animations a bit
We can do without having two calls to shellwm.completed_size_change() in
there, so use an early return for all cases.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
2020-06-15 13:12:03 +00:00
522ecba180 workspace: Center overlay close button on border using guide actor
This makes use of the invisible actor introduced in the previous commit
to center the close button on the border.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1313
2020-06-14 21:58:47 +00:00
9b22f6183f workspace: Use invisible guide actor to center overlay title on border
Using CSS to center the title actor on the border is a bit ugly, because
it requires the CSS to match the calculations used in chromeHeights().
Also it is not possible to use CSS margins for cases where the position
of the actor is determined at run time, such as for the close button.

Instead use an invisible actor that spans between the horizontal and
vertical center lines of the border as guide when aligning the title
actor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1313
2020-06-14 21:58:47 +00:00
b2c35e4fb0 workspace: Unbreak reposition animation
Commit 1ea22a5281 broke the window reposition animation when it
based the ::size-changed signal on the layout manager's bounding box
instead of the MetaWindow::size-changed signal.

That's happening because of the combination of:

  1. we adjust to window size changes immediately without animations
  2. closing a window triggers a change to a 0x0 bounding box which
     is not treated as a size change

Fix this by addressing the 2nd factor, and don't treat a change to
a 0x0 bounding box as size change.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2901
2020-06-14 21:20:36 +00:00
af543daf1c workspacesView: Only animate on show() when geometries are already set
Animating the window clones of the overview requires the fullGeometry
and the actualGeometry to be set, which they won't be when showing the
overview for the first time. So don't even try to animate the window
clones in that case because the geometries will still be null and
accessing them in workspace.js will throw errors.

The workspace views will still get the correct layout as soon as the
allocations happen because syncing the geometries will trigger updating
the window positions. Since animations are disabled for position changes
when syncing the geometry though, we won't get an animation and the
clones will jump into place. That's not a regression though since before
this change we also didn't animate in that case because the geometries
used were simply wrong (the actualGeometry was 0-sized as explained in
the last commit).

If we wanted to fix the initial animation of the overview, we'd have to
always enable animations of the window clones when syncing geometries,
but that would break the animation of the workspace when hovering the
workspaceThumbnail slider, because right now those animations are "glued
together" using the actualGeometry, so they would get out of sync.

The reason there are no errors happening in workspace.js with the
existing code is that due to a bug in Clutter the fullGeometry of
WorkspacesDisplay gets set very early while mapping the WorkspacesViews
(because the overviews ControlsManager gets an allocation during the
resource scale calculation of a ClutterClone, see
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1181), so it
won't be set to null anymore when calling
WorkspacesView.animateToOverview().

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1119
2020-06-14 14:44:10 +00:00
baeb4079ee workspacesView: Avoid setting invalid geometries on views
The fullGeometry and the actualGeometry of the WorkspacesDisplay are set
from the allocation of the overviews ControlsManager and the
WorkspacesDisplay, that means they're only valid after those actors got
their allocations during Clutters allocation cycle.

Since WorkspacesDisplay._updateWorkspacesViews() is already called while
showing/mapping the WorkspacesDisplay, that allocation cycle didn't
happen yet and we end up either setting the geometries of the views to
null (in case of the fullGeometry) or to something wrong (a 0-sized
allocation in case of the actualGeometry).

So avoid setting invalid geometries on the views by initializing both
the fullGeometry and the actualGeometry to null, and then only updating
the geometries of the views after they're set to a correct value.

Note that this means we won't correctly animate the overview the first
time we open it since the animation depends on the geometries being set,
but is being started from show(), which means no allocations have
happened yet. In practice this introduces no regression though since
before this change we simply used incorrect geometries (see the 0-sized
allocation mentioned above) on the initial opening and the animation
didn't work either.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1119
2020-06-14 14:44:10 +00:00
f91f9801b4 Update Turkish translation 2020-06-14 07:52:41 +00:00
c5634335b0 workspace: Remove WindowOverlay in favour of new overlays of WindowClone
Start using the new overlays we introduced in the last commit and remove
the WindowOverlay class and the objects for keeping track of them in the
Workspace.

The new layout which doesn't use the -shell-close-overlap CSS property
anymore sligthly changes the position of the close button to be a bit
further away from the actual window.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
2020-06-11 20:50:08 +02:00
2b4317349f workspace: Set maxChromeWidth to window clone width
So far we allowed the titles of window overlays to expand their width to
be larger than the actual WindowClone, they could expand to the full
size of the Workspace.

Since we're now going to implement those titles as part of the
WindowClone itself, having this feature is no longer possible as easily
as it was before. That's because the clones are stacked according to the
stacking of the actual windows, and since the overlay-elements are
attached to those clones, they will also be shown underneath other
clones.

So stop allowing the titles to expand and limit their size to the width
of the clone, which makes sure titles never get shown above or
underneath other clones.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
2020-06-11 20:50:08 +02:00
96bfd1f8be workspace: Adjust for close button side in chromeWidth
When the close button is shown on the left side of the WindowClone, we
also need to return its width in chromeWidth() on the left side instead
of the right side, so do that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
2020-06-11 20:50:08 +02:00
33ab53068e workspace: Add window overlay to WindowClone
Add the window overlays we're currently showing using the WindowOverlay
class to the WindowClone class and implement them using
ClutterConstraints instead of the old fixed position/size layout, which
had to be used because the workspaces were scaled, and the title and app
icon were kept unscaled using a separate layer.

Specifically, this is done by adding the ClutterClones to a static
container owned by the WindowClone and adding the elements of the
overlay as children to the WindowClone itself. That way the
overlay-elements can use the container as a source for their constraints
and we avoid having to make sure the overlays remain visible above the
ClutterClones.

We're not using the new overlays yet, they're hidden by default and
showOverlay() isn't called anywhere yet.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
2020-06-11 20:50:06 +02:00
40123ae6da workspace: Close windows using new layout manager API
Now that we have a new API to get all the windows and metaWindows from
our layout manager, implement the deleteAll() method of the window clone
using that API instead of looping through the children of the actor and
using the source of the ClutterClone.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
2020-06-11 20:49:31 +02:00
df149524d4 workspace: Add API to get windows and metaWindow to WindowCloneLayout
This will allow us to remove the remaining parts of the WindowClone
looping through children in favour of simply getting an array with the
windows or metaWindows and looping through that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
2020-06-11 20:49:31 +02:00
f0ee9cdcf8 util: Remove unused class CloseButton
This looks like it was used to create the close buttons in the overview
at some point, we're no longer using it nowadays though, so remove it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
2020-06-11 20:49:31 +02:00
a3257e8df5 Update Japanese translation 2020-06-11 10:27:58 +00:00
d2cf13eff4 unlockDialog: Set Switch User Button via _updateUserSwitchVisibility
This commit will set the button invisible when the user's can_switch
is false (e.g. when the session is remote) or user-switch-enabled is
disabled.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2687
2020-06-10 23:02:55 +08:00
8cd352b72b Update Japanese translation 2020-06-10 12:34:12 +00:00
c210052dc6 Update Japanese translation 2020-06-10 12:18:32 +00:00
0561af66e7 overview: Adapt to MetaBackgroundContent
The properties are now defined in MetaBackgroundContent.
Animate the ClutterContent properties.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1309
2020-06-09 20:10:52 +00:00
1e9b170d87 background: Adapt to MetaBackgroundContent
The properties are now part of MetaBackgroundContent, so set
the properties there instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1309
2020-06-09 20:10:52 +00:00
be02f76aa7 iconGrid: Trivial comment cleanup
There's no PaginatedIconGrid anymore

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:30 -03:00
687928e7b7 appDisplay: Don't fade icons when a folder dialog is open
The folder dialog itself now has a background, there's no
need to fade the icons anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:30 -03:00
ffdf3feb04 appDisplay: Fade the dialog background
As a last step towards the better app grid, add a semi-transparent
black background to the folder dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:30 -03:00
a60b8b3b50 appDisplay: Set minRows to 3 in folder dialog grid
It gives the folder dialog a better layout overall. This is
going to be replaced in the future by the new icon grid code,
but it's a good improvement to have until there.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:30 -03:00
3d6add68c7 appDisplay: Hide folder icon when dialog is open
In such a way that gives the illusion of the icon becoming
the dialog itself.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:30 -03:00
85e055ffe3 appDisplay: Don't change search entry's reactive state
The folder dialog eats all events now, there's no need to
disable the search entry anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:29 -03:00
1691e422e7 appDisplay: Remove unused variable
As the title says.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:29 -03:00
f442c9510e appDisplay: Fix misnamed variable
This should have been renamed to "displayingDialog" by
commit 7781f973f2.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:29 -03:00
0de98eb772 appDisplay: Don't connect to 'space-closed'
This signal doesn't exist anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:14:29 -03:00
30172b5625 appDisplay: Popdown folder dialog on DnD
So that we're still able to drag icons out of folders, and to the
Dash. Wait 600ms (MENU_POPUP_TIMEOUT) before popping it down.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:13:30 -03:00
8ae99a6898 appDisplay: Remove event blocker
It is unused now.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
5cfe5bf8c8 appDisplay: Move click action to dialog
Now that the folder dialog covers the whole primary
monitor, it eats all input events, and doesn't allow
the event blocker to detect clicks.

Move the click action to the folder dialog itself, and
popdown the dialog if a click is triggered on the dialog
(but not on any children).

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
c790c01a3b appDisplay: Move adaptToSize call to FolderView
There is absolutely no need to handle this in the dialog
itself.

Move the call to adaptToSize into FolderView.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
d4a947b475 appDisplay: Zoom dialog child in and out
Instead of zooming the dialog itself, zoom its only
child, which is the "actual" user-visible dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
60d7999b6a appDisplay: Make AppFolderDialog subclass St.Bin
It'll simplify things a bit.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
c040d08b97 appDisplay: Make folder dialog cover the whole screen
Future commits will improve input handling of the folder
dialog, and they'll require the dialog to cover the whole
primary monitor.

Add another internal, center-aligned container to the
folder dialog, and make it cover the whole available area.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
3a53b25873 appDisplay: Constrain dialog to primary display
Much like the overview controls themselves are tied to the
primary display, constrain the folder dialog to the primary
display as well.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
d8e6f654a3 appDisplay: Add folder dialog to overview group
Right now, the app folder dialog isn't really a dialog,
since it is actually added to the AppDisplay. Furthermore,
having it added in AppDisplay may mess up with its sizing
calculations, since AppDisplay has a ClutterBinLayout and
the folder dialog has a fairly large minimum size.

Add the folder dialog to the overview group. Next commits
will adjust various actors to be able to better handle it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301
2020-06-09 16:01:08 -03:00
fdfcacf1db st/entry: Fix leak when copying or cutting text using shortcuts
clutter_text_get_selection() creates a copy of the selected text which
gets passed to st_clipboard_set_text() which creates its own copy. The
copy returned by clutter_text_get_selection() however never got free'd.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1306
2020-06-08 15:21:17 +00:00
d3efbcce9b Updated Spanish translation 2020-06-08 16:10:16 +02:00
ac34dbe353 Update Catalan translation 2020-06-06 14:56:58 +02:00
e0f3e13456 Update Ukrainian translation 2020-06-06 12:54:13 +00:00
fdd9def922 dateMenu: Add "Events" section
Events have a clear and obvious connection to the calendar, and similar
to the Clocks and Weather sections there's a strong link to a particular
application.

Adding them as another section to the right-hand side of the calendar
therefore presents a viable alternative to the old events section.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
2020-06-06 01:04:09 +02:00
771050f4d7 messageList: Remove setDate() method
Since the events section has been removed and visibility no longer
depends on the date, it's not used by anything anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
2020-06-06 01:04:09 +02:00
8451df977c calendar: Simplify placeholder
Without the events section in the message list, the placeholder can only
reflect whether or not there are notifications.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
2020-06-06 01:04:09 +02:00
ff55cf017e calendar: Don't restrict section visibility by date
The idea behind hiding the notifications and media section on days
other than today was that they represent present activity together
with today's events, in contrast to past and future events from
other days.

After events were moved out of the message list, that behavior is
no longer useful: We just guarantee that the left-hand side of the
calendar will always be empty when browsing the calendar.

Adjust to that by removing the limitation by date.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
2020-06-06 01:04:09 +02:00
d36a180852 calendar: Remove events section from message list
While treating notifications as a type of present event was a neat
concept, there are some issues with it that we never managed to
address (not least the inability to "open" an event).

So remove the current events section from the message list; we'll
bring back events in a different form later.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1282
2020-06-06 01:04:09 +02:00
12c7f693d0 calendar-server: Notify HasCalendar changes when updating views
The HasCalendar property reflects whether there are any views, and views
change either when clients appear/disappear or when the time range changes.

However we currently only emit the PropertiesChanged signal for the former,
fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1300
2020-06-05 22:56:16 +00:00
e0a8cb565e calendar-server: Move method
We'll need to call it from app_update_views(), so move it up to make
it available to that function without a prior declaration.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1300
2020-06-05 22:56:16 +00:00
46547ae027 shell-mime-sniffer: Ignore invalid file content type
The shell mime sniffer goes through all the files in a directory,
however in case a file content type is not recognized, the GIO function
g_file_info_get_content_type() may return NULL, causing a crash when
looking up into the content type tables, as they are supposed to contain
strings only and they use `g_str_hash` has func, which doesn't support
NULL values.

So, in case we get an invalid content type, let's just ignore it,
without adding it to the cache as we do in the nautilus code that was
inspiring the sniffer.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2643
2020-06-05 16:27:29 +02:00
68745328df Update Chinese (China) translation 2020-06-05 09:02:40 +00:00
4582d7a183 workspace: Remove no longer valid comment
This comment is no longer correct, we're not inserting any actors here
to adjust for the window border, but we're modifying the allocation of
the children to adjust for that border.

Since that happens in the layout manager anyway, remove the comment
here.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
2020-06-04 17:40:09 +00:00
cc5ed2fbf5 workspace: Use generic _addWindow function to add new clones
Now that we handle all ClutterClones belonging to the WindowClone pretty
much the same, we can add a generic _addWindow function to WindowClone
which creates the ClutterClone and adds it to the layout manager.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
2020-06-04 17:40:09 +00:00
a2545d186a workspace: Implement windowCenter using bounding box
This isn't quite the same as the allocation, but it's what the workspace
actually wants to use given that we use the bounding box of the
WindowClone for all the layout calculation.

So instead of calculating the windowCenter in the WindowClone, make use
of the bounding-box property of the layout manager and return the center
point of that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
2020-06-04 17:40:09 +00:00
1ea22a5281 workspace: Use bounding-box property from layout manager
Make use of the new bounding-box property we introduced for the
WindowClones layout manager in the last commit.

With this we can remove all the bounding box calculation code from the
WindowClone class and simply use the "notify::bounding-box" signal to
notify changes to our size. To make sure users of the WindowClone don't
break, we now have to convert the layout managers ClutterActorBox in our
getter function to a JS object.

Since we now also don't have to connect to the "destroy" signal of the
attached dialogs anymore, we can remove _disconnectSignals() and only
listen to "destroy" of the toplevel window.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
2020-06-04 17:40:09 +00:00
090057d2df workspace: Track windows in WindowClone layout manager
Move the tracking of the bounding box and all the layout related things
out of the WindowClone class and into the layout manager. This allows
the layout manager to keep track of its windows itself and simply notify
the new bounding-box property in case that box changes.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1297
2020-06-04 17:40:08 +00:00
b3aab7f401 Updated Spanish translation 2020-06-04 09:15:53 +02:00
8154728d09 environment: Add Math.clamp
The good old clamp function, now part of the Math family.
Clamp is happy after so many years of loneliness.

This is a strict implementation of the draft ECMAScript
proposal.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1295
2020-06-03 12:55:53 -03:00
5569090d1c viewSelector: Make sure it's invisible when overview is hidden
Instead of overriding the hide() method, use the vfunc to
reset, and hide the workspaces display too.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1295
2020-06-03 12:55:45 -03:00
fc3bc7678d viewSelector: Rename show to animateToOverview
The same reasoning as the previous commits.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1295
2020-06-03 12:55:45 -03:00
8914a46669 workspacesView: Override vfunc_hide
Override the hide vfunc instead of the plain hide() method.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1295
2020-06-03 12:55:42 -03:00
e7ec373aee workspacesView: Rename show to animateToOverview
WorkspacesDisplay is a ClutterActor subclass, and overriding
the show and hide methods require chaining up, otherwise the
actor isn't actually shown or hidden.

To avoid clashing with the pre-existing show method, rename
to animateToOverview.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1295
2020-06-03 12:54:05 -03:00
fe131f926d workspace: Increase window clone fade duration to 200 ms
The current value of 100 ms is barely noticable and looks very abrupt,
use 200 ms instead which make it feel like an actual transition.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1296
2020-06-02 23:43:52 +00:00
137 changed files with 12570 additions and 11058 deletions

35
NEWS
View File

@ -1,3 +1,38 @@
3.37.3
======
* Refactor and clean up window picker
[Jonas D., Florian; !1297, !1298, !1305, !1345, !1353]
* Move calendar events out of notifications list [Florian; !1282]
* Refine app folder dialogs [Georges; !1301]
* Hide switch-user button on lock screen if unsupported [Chingkai; #2687]
* Refactor and clean up app picker pagination [Georges; !1271]
* Add API to retrieve specified mimetypes from clipboards [Carlos; !1321]
* Support prepending workspace with horizontal layouts [Florian; #2916]
* Update microphone icon on input volume changes [fludixx; #2902]
* Cache labels on GPU [Daniel; !1329]
* Fix regressions in redesigned modal dialogs [Florian, Jonas D.; #2491, !1336]
* Use GIcon for all application icons [Florian; !1342]
* Support pre-authenticated logins in vmware environments [yun341; #1983]
* Better support sandboxed apps with multiple .desktop files [Florian; #219]
* Fix on-screen keyboard size in portrait orientation [Florian; #2349]
* Plugged leaks [Sebastian, Daniel, Florian; !1306, !1319, !1341]
* Misc. bug fixes and cleanups [Jonas D., Georges, Marco, Florian, Sebastian,
MOZGIII, Daniel, Mariana, Jonas Å.; !1296, !1295, #2643, !1300, !1309,
!1119, #2901, !1313, !1251, !1285, !1307, !1318, !1310, !1320, !1327, !1315,
!1289, !1331, !1332, !1333, !1334, !1340, !1287, !1308, !1346, !1299, !1343,
!1351, !1352, !1322]
Contributors:
Marco Trevisan (Treviño), Chingkai, Jonas Dreßler, Carlos Garnacho,
Sebastian Keller, MOZGIII, Florian Müllner, Georges Basile Stavracas Neto,
Mariana Picolo, Daniel van Vugt, fludixx, yun341, Jonas Ådahl
Translators:
Daniel Mustieles [es], Boyuan Yang [zh_CN], Yuri Chornoivan [uk],
Jordi Mas [ca], sicklylife [ja], Emin Tufan Çetin [tr],
Baurzhan Muftakhidinov [kk], Florentina Mușat [ro], Aurimas Černius [lt],
Rūdolfs Mazurs [lv]
3.37.2
======
* Add support for "PrefersNonDefaultGPU" desktop key [Bastien; !1226]

View File

@ -0,0 +1,191 @@
<!DOCTYPE node PUBLIC
'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
<node>
<!--
org.gnome.Mutter.ScreenCast:
@short_description: Screen cast interface
This API is private and not intended to be used outside of the integrated
system that uses libmutter. No compatibility between versions are
promised.
-->
<interface name="org.gnome.Mutter.ScreenCast">
<!--
CreateSession:
@properties: Properties
@session_path: Path to the new session object
* "remote-desktop-session-id" (s): The ID of a remote desktop session.
Remote desktop driven screen casts
are started and stopped by the remote
desktop session.
* "disable-animations" (b): Set to "true" if the screen cast application
would prefer animations to be globally
disabled, while the session is running. Default
is "false". Available since version 3.
-->
<method name="CreateSession">
<arg name="properties" type="a{sv}" direction="in" />
<arg name="session_path" type="o" direction="out" />
</method>
<!--
Version:
@short_description: API version
-->
<property name="Version" type="i" access="read" />
</interface>
<!--
org.gnome.Mutter.ScreenCast.Session:
@short_description: Screen cast session
-->
<interface name="org.gnome.Mutter.ScreenCast.Session">
<!--
Start:
Start the screen cast session
-->
<method name="Start" />
<!--
Stop:
Stop the screen cast session
-->
<method name="Stop" />
<!--
Closed:
The session has closed.
-->
<signal name="Closed" />
<!--
RecordMonitor:
@connector: Connector of the monitor to record
@properties: Properties
@stream_path: Path to the new stream object
Record a single monitor.
Available @properties include:
* "cursor-mode" (u): Cursor mode. Default: 'hidden' (see below)
Available since API version 2.
* "is-recording" (b): Whether this is a screen recording. May be
be used for choosing panel icon.
Default: false. Available since API version 4.
Available cursor mode values:
0: hidden - cursor is not included in the stream
1: embedded - cursor is included in the framebuffer
2: metadata - cursor is included as metadata in the PipeWire stream
-->
<method name="RecordMonitor">
<arg name="connector" type="s" direction="in" />
<arg name="properties" type="a{sv}" direction="in" />
<arg name="stream_path" type="o" direction="out" />
</method>
<!--
RecordWindow:
@properties: Properties used determining what window to select
@stream_path: Path to the new stream object
Supported since API version 2.
Record a single window. The cursor will not be included.
Available @properties include:
* "window-id" (t): Id of the window to record.
* "cursor-mode" (u): Cursor mode. Default: 'hidden' (see RecordMonitor).
* "is-recording" (b): Whether this is a screen recording. May be
be used for choosing panel icon.
Default: false. Available since API version 4.
-->
<method name="RecordWindow">
<arg name="properties" type="a{sv}" direction="in" />
<arg name="stream_path" type="o" direction="out" />
</method>
<!--
RecordArea:
@x: X position of the recorded area
@y: Y position of the recorded area
@width: width of the recorded area
@height: height of the recorded area
@properties: Properties
@stream_path: Path to the new stream object
Record an area of the stage. The coordinates are in stage coordinates.
The size of the stream does not necessarily match the size of the
recorded area, and will depend on DPI scale of the affected monitors.
Available @properties include:
* "cursor-mode" (u): Cursor mode. Default: 'hidden' (see below)
Available since API version 2.
* "is-recording" (b): Whether this is a screen recording. May be
be used for choosing panel icon.
Default: false. Available since API version 4.
Available cursor mode values:
0: hidden - cursor is not included in the stream
1: embedded - cursor is included in the framebuffer
2: metadata - cursor is included as metadata in the PipeWire stream
-->
<method name="RecordArea">
<arg name="x" type="i" direction="in" />
<arg name="y" type="i" direction="in" />
<arg name="width" type="i" direction="in" />
<arg name="height" type="i" direction="in" />
<arg name="properties" type="a{sv}" direction="in" />
<arg name="stream_path" type="o" direction="out" />
</method>
</interface>
<!--
org.gnome.Mutter.ScreenCast.Stream:
@short_description: Screen cast stream
-->
<interface name="org.gnome.Mutter.ScreenCast.Stream">
<!--
PipeWireStreamAdded:
@short_description: Pipewire stream added
A signal emitted when PipeWire stream for the screen cast stream has
been created. The @node_id corresponds to the PipeWire stream node.
-->
<signal name="PipeWireStreamAdded">
<annotation name="org.gtk.GDBus.C.Name" value="pipewire-stream-added"/>
<arg name="node_id" type="u" direction="out" />
</signal>
<!--
Parameters:
@short_description: Optional stream parameters
Available parameters include:
* "position" (ii): Position of the source of the stream in the
compositor coordinate space.
* "size" (ii): Size of the source of the stream in the compositor
coordinate space.
-->
<property name="Parameters" type="a{sv}" access="read" />
</interface>
</node>

View File

@ -70,6 +70,14 @@
-->
<property name="AnimationsEnabled" type="b" access="read"/>
<!--
ScreenSize:
@short_description: The size of the screen
Since: 3
-->
<property name="ScreenSize" type="(ii)" access="read"/>
<property name="version" type="u" access="read"/>
</interface>
</node>

View File

@ -28,6 +28,7 @@
<file preprocess="xml-stripblanks">org.freedesktop.UPower.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Magnifier.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Magnifier.ZoomRegion.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Mutter.ScreenCast.xml</file>
<file preprocess="xml-stripblanks">org.gnome.ScreenSaver.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SessionManager.EndSessionDialog.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SessionManager.Inhibitor.xml</file>

View File

@ -6,25 +6,25 @@
<file>checkbox-off-focused.svg</file>
<file>checkbox-off.svg</file>
<file>checkbox.svg</file>
<file alias="icons/color-pick.svg">color-pick.svg</file>
<file alias="icons/scalable/actions/color-pick.svg">color-pick.svg</file>
<file>dash-placeholder.svg</file>
<file>gnome-shell.css</file>
<file>gnome-shell-high-contrast.css</file>
<file alias="icons/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file>
<file alias="icons/scalable/status/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file>
<file>no-events.svg</file>
<file>no-notifications.svg</file>
<file>pad-osd.css</file>
<file alias="icons/eye-open-negative-filled-symbolic.svg">eye-open-negative-filled-symbolic.svg</file>
<file alias="icons/eye-not-looking-symbolic.svg">eye-not-looking-symbolic.svg</file>
<file alias="icons/pointer-double-click-symbolic.svg">pointer-double-click-symbolic.svg</file>
<file alias="icons/pointer-drag-symbolic.svg">pointer-drag-symbolic.svg</file>
<file alias="icons/pointer-primary-click-symbolic.svg">pointer-primary-click-symbolic.svg</file>
<file alias="icons/pointer-secondary-click-symbolic.svg">pointer-secondary-click-symbolic.svg</file>
<file alias="icons/keyboard-caps-lock-filled-symbolic.svg">keyboard-caps-lock-filled-symbolic.svg</file>
<file alias="icons/keyboard-enter-symbolic.svg">keyboard-enter-symbolic.svg</file>
<file alias="icons/keyboard-hide-symbolic.svg">keyboard-hide-symbolic.svg</file>
<file alias="icons/keyboard-layout-filled-symbolic.svg">keyboard-layout-filled-symbolic.svg</file>
<file alias="icons/keyboard-shift-filled-symbolic.svg">keyboard-shift-filled-symbolic.svg</file>
<file alias="icons/scalable/status/eye-open-negative-filled-symbolic.svg">eye-open-negative-filled-symbolic.svg</file>
<file alias="icons/scalable/status/eye-not-looking-symbolic.svg">eye-not-looking-symbolic.svg</file>
<file alias="icons/scalable/actions/pointer-double-click-symbolic.svg">pointer-double-click-symbolic.svg</file>
<file alias="icons/scalable/actions/pointer-drag-symbolic.svg">pointer-drag-symbolic.svg</file>
<file alias="icons/scalable/actions/pointer-primary-click-symbolic.svg">pointer-primary-click-symbolic.svg</file>
<file alias="icons/scalable/actions/pointer-secondary-click-symbolic.svg">pointer-secondary-click-symbolic.svg</file>
<file alias="icons/scalable/status/keyboard-caps-lock-filled-symbolic.svg">keyboard-caps-lock-filled-symbolic.svg</file>
<file alias="icons/scalable/status/keyboard-enter-symbolic.svg">keyboard-enter-symbolic.svg</file>
<file alias="icons/scalable/status/keyboard-hide-symbolic.svg">keyboard-hide-symbolic.svg</file>
<file alias="icons/scalable/status/keyboard-layout-filled-symbolic.svg">keyboard-layout-filled-symbolic.svg</file>
<file alias="icons/scalable/status/keyboard-shift-filled-symbolic.svg">keyboard-shift-filled-symbolic.svg</file>
<file>process-working.svg</file>
<file>toggle-off.svg</file>
<file>toggle-off-dark.svg</file>

View File

@ -1,10 +0,0 @@
[Unit]
Description=GNOME Shell on X11
DefaultDependencies=no
Requisite=gnome-session-initialized.target
PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target
Requires=gnome-shell-x11.service
After=gnome-shell-x11.service

View File

@ -101,22 +101,21 @@ if have_systemd
unitconf.set('bindir', bindir)
configure_file(
input: 'gnome-shell-x11.service.in',
output: 'gnome-shell-x11.service',
input: 'org.gnome.Shell@x11.service.in',
output: 'org.gnome.Shell@x11.service',
configuration: unitconf,
install_dir: systemduserunitdir
)
configure_file(
input: 'gnome-shell-wayland.service.in',
output: 'gnome-shell-wayland.service',
input: 'org.gnome.Shell@wayland.service.in',
output: 'org.gnome.Shell@wayland.service',
configuration: unitconf,
install_dir: systemduserunitdir
)
units = files('gnome-shell-x11.target',
'gnome-shell-wayland.target',
'gnome-shell-disable-extensions.service')
units = files('org.gnome.Shell.target',
'org.gnome.Shell-disable-extensions.service')
install_data(units, install_dir: systemduserunitdir)
endif

View File

@ -6,5 +6,5 @@ Requisite=gnome-session-initialized.target
PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target
Requires=gnome-shell-wayland.service
After=gnome-shell-wayland.service
Wants=org.gnome.Shell@wayland.service
Wants=org.gnome.Shell@x11.service

View File

@ -1,7 +1,7 @@
[Unit]
Description=GNOME Shell on Wayland
# On wayland, force a session shutdown
OnFailure=gnome-shell-disable-extensions.service gnome-session-shutdown.target
OnFailure=org.gnome.Shell-disable-extensions.service gnome-session-shutdown.target
OnFailureJobMode=replace-irreversibly
CollectMode=inactive-or-failed
RefuseManualStart=on
@ -13,18 +13,21 @@ Requisite=gnome-session-initialized.target
PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target
# The units already conflict because they use the same BusName
#Conflicts=gnome-shell-x11.service
[Service]
Slice=session.slice
Type=notify
# NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I
# with systemd >= 245. Also, the current solution is kind of painful
# as systemd had a bug where it retries the condition.
# Only start if the template instance matches the session type.
ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2'
ExecStart=@bindir@/gnome-shell
# Exit code 1 means we are probably *not* dealing with an extension failure
SuccessExitStatus=1
# unset some environment variables that were set by the shell and won't work now that the shell is gone
ExecStopPost=-systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY
# Exit code 1 means we are probably *not* dealing with an extension failure
SuccessExitStatus=1
# On wayland we cannot restart
Restart=no
# Kill any stubborn child processes after this long

View File

@ -1,7 +1,7 @@
[Unit]
Description=GNOME Shell on X11
# On X11, try to show the GNOME Session Failed screen
OnFailure=gnome-shell-disable-extensions.service gnome-session-failed.target
OnFailure=org.gnome.Shell-disable-extensions.service gnome-session-failed.target
OnFailureJobMode=replace
CollectMode=inactive-or-failed
RefuseManualStart=on
@ -13,18 +13,24 @@ Requisite=gnome-session-initialized.target
PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target
# The units already conflict because they use the same BusName
#Conflicts=gnome-shell-wayland.service
# Limit startup frequency more than the default
StartLimitIntervalSec=15s
StartLimitBurst=3
[Service]
Slice=session.slice
Type=notify
# NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I
# with systemd >= 245. Also, the current solution is kind of painful
# as systemd had a bug where it retries the condition.
# Only start if the template instance matches the session type.
ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2'
ExecStart=@bindir@/gnome-shell
# Exit code 1 means we are probably *not* dealing with an extension failure
SuccessExitStatus=1
# On X11 we do not need to unset any variables
# On X11 we want to restart on-success (Alt+F2 + r) and on-failure.
Restart=always
# Do not wait before restarting the shell

View File

@ -109,6 +109,17 @@
the shell.
</description>
</key>
<key name="app-picker-layout" type="aa{sv}">
<default>[]</default>
<summary>Layout of the app picker</summary>
<description>
Layout of the app picker. Each entry in the array is a page. Pages are
stored in the order they appear in GNOME Shell. Each page contains an
“application id” → 'data' pair. Currently, the following values are
stored as 'data':
• “position”: the position of the application icon in the page
</description>
</key>
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
</schema>

View File

@ -1,17 +1,13 @@
/* App Grid */
$app_icon_size: 96px;
$app_icon_padding: 24px;
// app icons
.icon-grid {
-shell-grid-horizontal-item-size: $app_icon_size + $app_icon_padding * 2;
-shell-grid-vertical-item-size: $app_icon_size + $app_icon_padding * 2;
spacing: $base_spacing * 6;
.overview-icon {
icon-size: $app_icon_size;
}
row-spacing: $base_spacing * 6;
column-spacing: $base_spacing * 6;
max-row-spacing: $base_spacing * 12;
max-column-spacing: $base_spacing * 12;
}
/* App Icons */
@ -42,8 +38,8 @@ $app_grid_fg_color: #fff;
.app-folder-dialog {
border-radius: $modal_radius * 1.5;
border: 1px solid $osd_outer_borders_color;
spacing: 12px;
background-color: transparentize(darken($osd_bg_color,10%), 0.05);
padding: 12px;
& .folder-name-container {
padding: 24px 36px 0;
@ -52,7 +48,7 @@ $app_grid_fg_color: #fff;
& .folder-name-label,
& .folder-name-entry {
font-size: 18pt;
font-weight: bold;
font-weight: 800;
}
& .folder-name-entry { width: 300px }
@ -71,11 +67,24 @@ $app_grid_fg_color: #fff;
& > StIcon { icon-size: 16px }
}
}
& .icon-grid {
row-spacing: $base_spacing * 2;
column-spacing: $base_spacing * 5;
}
& .page-indicators {
margin-bottom: 18px;
.page-indicator {
padding: 15px 12px;
}
}
}
.app-folder-dialog-container {
padding: 12px;
width: 800px;
height: 600px;
width: 620px;
height: 620px;
}
.app-folder-icon {

View File

@ -177,6 +177,32 @@
}
}
/* Events */
.events-button {
@include notification_bubble;
padding: $base_padding * 2;
.events-box {
spacing: $base_spacing;
}
.events-list {
spacing: 2 * $base_spacing;
}
.events-title {
color: desaturate(darken($fg_color,40%), 10%);
font-weight: bold;
margin-bottom: $base_margin;
}
.event-time {
color: darken($fg_color,20%);
font-feature-settings: "tnum";
@include fontsize($base_font_size - 1);
}
}
/* World clocks */
.world-clocks-button {
@include notification_bubble;

View File

@ -1,19 +1,20 @@
/* Window Picker */
$window_picker_spacing: $base_spacing * 2; // 16px
$window_picker_padding: $base_padding * 2; // 16px
$window_picker_spacing: $base_spacing; // 6px
$window_picker_padding: $base_padding * 2; // 12px
$window_thumbnail_border_color:transparentize($selected_fg_color, 0.65);
$window_close_button_size: 24px;
$window_close_button_padding: 3px;
$window_clone_border_size: 6px;
// Window picker
.window-picker {
// Space between window thumbnails
-horizontal-spacing: $window_picker_spacing;
-vertical-spacing: $window_picker_spacing;
spacing: $window_picker_spacing;
// Padding for container around window thumbnails
padding: $window_picker_padding;
@ -22,7 +23,7 @@ $window_close_button_padding: 3px;
// Borders on window thumbnails
.window-clone-border {
border-width: 6px;
border-width: $window_clone_border_size;
border-style: solid;
border-color: $window_thumbnail_border_color;
border-radius: $base_border_radius + 2;
@ -54,8 +55,6 @@ $window_close_button_padding: 3px;
width: $window_close_button_size;
box-shadow: -1px 1px 5px 0px rgba(0,0,0,0.5);
-shell-close-overlap: $window_close_button_size * 0.5;
&:hover {
background-color: lighten($selected_bg_color, 5%);
}

View File

@ -3,13 +3,8 @@ private_headers = [
'gactionobservable.h',
'gactionobserver.h',
'shell-network-agent.h',
'shell-recorder-src.h'
]
if not enable_recorder
private_headers += 'shell-recorder.h'
endif
exclude_directories = [
'calendar-server',
'hotplug-sniffer',

View File

@ -25,6 +25,8 @@ var ServiceImplementation = class {
// subclasses may override this to disable automatic shutdown
this._autoShutdown = true;
this._queueShutdownCheck();
}
// subclasses may override this to own additional names

View File

@ -1,2 +1,6 @@
.expander-frame > * { border-top-width: 0; }
.expander-toolbar { border: 0 solid @borders; border-top-width: 1px; }
.expander-toolbar {
border: 0 solid @borders;
border-top-width: 1px;
padding: 3px;
}

View File

@ -128,7 +128,7 @@ var ExtensionsService = class extends ServiceImplementation {
externalWindow = Shew.ExternalWindow.new_from_handle(parentWindow);
if (externalWindow)
externalWindow.set_parent_of(window.window);
externalWindow.set_parent_of(window.get_surface());
if (options.modal)
window.modal = options.modal.get_boolean();
@ -156,7 +156,6 @@ var ExtensionPrefsDialog = GObject.registerClass({
GTypeName: 'ExtensionPrefsDialog',
Template: 'resource:///org/gnome/Shell/Extensions/ui/extension-prefs-dialog.ui',
InternalChildren: [
'headerBar',
'stack',
'expander',
'expanderArrow',
@ -165,24 +164,24 @@ var ExtensionPrefsDialog = GObject.registerClass({
],
}, class ExtensionPrefsDialog extends Gtk.Window {
_init(extension) {
super._init();
super._init({
title: extension.metadata.name,
});
this._uuid = extension.uuid;
this._url = extension.metadata.url || '';
this._headerBar.title = extension.metadata.name;
this._actionGroup = new Gio.SimpleActionGroup();
this.insert_action_group('win', this._actionGroup);
this._initActions();
this._addCustomStylesheet();
this._gesture = new Gtk.GestureMultiPress({
widget: this._expander,
this._gesture = new Gtk.GestureClick({
button: 0,
exclusive: true,
});
this._expander.add_controller(this._gesture);
this._gesture.connect('released', (gesture, nPress) => {
if (nPress === 1)
@ -205,7 +204,7 @@ var ExtensionPrefsDialog = GObject.registerClass({
prefsModule.init(extension.metadata);
const widget = prefsModule.buildPrefsWidget();
this._stack.add(widget);
this._stack.add_named(widget, 'prefs');
this._stack.visible_child = widget;
} catch (e) {
this._setError(e);
@ -267,7 +266,7 @@ var ExtensionPrefsDialog = GObject.registerClass({
} catch (e) {
logError(e, 'Failed to add application style');
}
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),
Gtk.StyleContext.add_provider_for_display(Gdk.Display.get_default(),
provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
}

View File

@ -1,7 +1,7 @@
/* exported main */
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.Gtk = '3.0';
imports.gi.versions.Gdk = '4.0';
imports.gi.versions.Gtk = '4.0';
const { Gtk } = imports.gi;
const pkg = imports.package;
@ -10,7 +10,7 @@ const { DBusService } = imports.dbusService;
const { ExtensionsService } = imports.extensionsService;
function main() {
Gtk.init(null);
Gtk.init();
pkg.initFormat();
const service = new DBusService(

View File

@ -1,38 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="ExtensionPrefsDialog" parent="GtkWindow">
<property name="default_width">600</property>
<property name="default_height">400</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerBar">
<property name="visible">True</property>
<property name="show_close_button">True</property>
<object class="GtkHeaderBar">
<property name="show-title-buttons">True</property>
</object>
</child>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="hscrollbar_policy">never</property>
<property name="propagate_natural_height">True</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin">100</property>
<property name="margin_bottom">60</property>
<property name="margin-start">100</property>
<property name="margin-end">100</property>
<property name="margin-top">100</property>
<property name="margin-bottom">60</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Somethings gone wrong</property>
<attributes>
<attribute name="scale" value="1.44"/> <!-- x-large -->
@ -44,44 +38,33 @@
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Were very sorry, but theres been a problem: the settings for this extension cant be displayed. We recommend that you report the issue to the extension authors.</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin_top">12</property>
<property name="margin-top">12</property>
<child>
<object class="GtkFrame" id="expander">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
<object class="GtkBox">
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="margin">12</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="expanderArrow">
<property name="visible">True</property>
<property name="icon_name">pan-end-symbolic</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Technical Details</property>
</object>
</child>
<object class="GtkImage" id="expanderArrow">
<property name="icon_name">pan-end-symbolic</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Technical Details</property>
</object>
</child>
</object>
@ -90,22 +73,16 @@
</child>
<child>
<object class="GtkRevealer" id="revealer">
<property name="visible">True</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="shadow_type">in</property>
<style>
<class name="expander-frame"/>
</style>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTextView" id="errorView">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="monospace">True</property>
<property name="editable">False</property>
<property name="wrap_mode">word</property>
@ -116,63 +93,34 @@
</object>
</child>
<child>
<object class="GtkToolbar">
<property name="visible">True</property>
<object class="GtkBox">
<style>
<class name="expander-toolbar"/>
</style>
<child>
<object class="GtkToolItem">
<property name="visible">True</property>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">win.copy-error</property>
<style>
<class name="flat"/>
<class name="image-button"/>
</style>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">edit-copy-symbolic</property>
</object>
</child>
</object>
</child>
<object class="GtkButton">
<property name="receives_default">True</property>
<property name="action_name">win.copy-error</property>
<property name="has-frame">False</property>
<property name="icon-name">edit-copy-symbolic</property>
</object>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
<property name="draw">False</property>
<object class="GtkLabel">
<property name="hexpand">True</property>
</object>
<packing>
<property name="expand">True</property>
</packing>
</child>
<child>
<object class="GtkToolItem">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="homeButton">
<property name="visible"
bind-source="homeButton"
bind-property="sensitive"
bind-flags="sync-create"/>
<property name="label" translatable="yes">Homepage</property>
<property name="tooltip_text" translatable="yes">Visit extension homepage</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="action_name">win.show-url</property>
<style>
<class name="flat"/>
</style>
</object>
</child>
<object class="GtkButton" id="homeButton">
<property name="visible"
bind-source="homeButton"
bind-property="sensitive"
bind-flags="sync-create"/>
<property name="label" translatable="yes">Homepage</property>
<property name="tooltip_text" translatable="yes">Visit extension homepage</property>
<property name="receives_default">True</property>
<property name="has-frame">False</property>
<property name="action_name">win.show-url</property>
</object>
</child>
</object>

View File

@ -8,6 +8,12 @@ dbus_services = {
'org.gnome.Shell.Notifications': 'notifications',
}
if enable_recorder
dbus_services += {
'org.gnome.Shell.Screencast': 'screencast',
}
endif
config_dir = '@0@/..'.format(meson.current_build_dir())
foreach service, dir : dbus_services

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/Shell/Screencast/js">
<file>main.js</file>
<file>screencastService.js</file>
<file>dbusService.js</file>
<file>misc/config.js</file>
<file>misc/fileUtils.js</file>
</gresource>
</gresources>

View File

@ -0,0 +1,11 @@
/* exported main */
const { DBusService } = imports.dbusService;
const { ScreencastService } = imports.screencastService;
function main() {
const service = new DBusService(
'org.gnome.Shell.Screencast',
new ScreencastService());
service.run();
}

View File

@ -0,0 +1,458 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported ScreencastService */
const { Gio, GLib, Gst } = imports.gi;
const { loadInterfaceXML, loadSubInterfaceXML } = imports.misc.fileUtils;
const { ServiceImplementation } = imports.dbusService;
const ScreencastIface = loadInterfaceXML('org.gnome.Shell.Screencast');
const IntrospectIface = loadInterfaceXML('org.gnome.Shell.Introspect');
const IntrospectProxy = Gio.DBusProxy.makeProxyWrapper(IntrospectIface);
const ScreenCastIface = loadSubInterfaceXML(
'org.gnome.Mutter.ScreenCast', 'org.gnome.Mutter.ScreenCast');
const ScreenCastSessionIface = loadSubInterfaceXML(
'org.gnome.Mutter.ScreenCast.Session', 'org.gnome.Mutter.ScreenCast');
const ScreenCastStreamIface = loadSubInterfaceXML(
'org.gnome.Mutter.ScreenCast.Stream', 'org.gnome.Mutter.ScreenCast');
const ScreenCastProxy = Gio.DBusProxy.makeProxyWrapper(ScreenCastIface);
const ScreenCastSessionProxy = Gio.DBusProxy.makeProxyWrapper(ScreenCastSessionIface);
const ScreenCastStreamProxy = Gio.DBusProxy.makeProxyWrapper(ScreenCastStreamIface);
const DEFAULT_PIPELINE = 'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux';
const DEFAULT_FRAMERATE = 30;
const DEFAULT_DRAW_CURSOR = true;
const PipelineState = {
INIT: 0,
PLAYING: 1,
FLUSHING: 2,
STOPPED: 3,
};
const SessionState = {
INIT: 0,
ACTIVE: 1,
STOPPED: 2,
};
var Recorder = class {
constructor(sessionPath, x, y, width, height, filePath, options,
invocation,
onErrorCallback) {
this._startInvocation = invocation;
this._dbusConnection = invocation.get_connection();
this._onErrorCallback = onErrorCallback;
this._stopInvocation = null;
this._pipelineIsPlaying = false;
this._sessionIsActive = false;
this._x = x;
this._y = y;
this._width = width;
this._height = height;
this._filePath = filePath;
this._pipelineString = DEFAULT_PIPELINE;
this._framerate = DEFAULT_FRAMERATE;
this._drawCursor = DEFAULT_DRAW_CURSOR;
this._applyOptions(options);
this._watchSender(invocation.get_sender());
this._initSession(sessionPath);
}
_applyOptions(options) {
for (const option in options)
options[option] = options[option].deep_unpack();
if (options['pipeline'] !== undefined)
this._pipelineString = options['pipeline'];
if (options['framerate'] !== undefined)
this._framerate = options['framerate'];
if ('draw-cursor' in options)
this._drawCursor = options['draw-cursor'];
}
_watchSender(sender) {
this._nameWatchId = this._dbusConnection.watch_name(
sender,
Gio.BusNameWatcherFlags.NONE,
null,
this._senderVanished.bind(this));
}
_unwatchSender() {
if (this._nameWatchId !== 0) {
this._dbusConnection.unwatch_name(this._nameWatchId);
this._nameWatchId = 0;
}
}
_senderVanished() {
this._unwatchSender();
this.stopRecording(null);
}
_notifyStopped() {
this._unwatchSender();
if (this._onStartedCallback)
this._onStartedCallback(this, false);
else if (this._onStoppedCallback)
this._onStoppedCallback(this);
else
this._onErrorCallback(this);
}
_onSessionClosed() {
switch (this._pipelineState) {
case PipelineState.STOPPED:
break;
default:
this._pipeline.set_state(Gst.State.NULL);
log(`Unexpected pipeline state: ${this._pipelineState}`);
break;
}
this._notifyStopped();
}
_initSession(sessionPath) {
this._sessionProxy = new ScreenCastSessionProxy(Gio.DBus.session,
'org.gnome.Mutter.ScreenCast',
sessionPath);
this._sessionProxy.connectSignal('Closed', this._onSessionClosed.bind(this));
}
_startPipeline(nodeId) {
this._ensurePipeline(nodeId);
const bus = this._pipeline.get_bus();
bus.add_watch(bus, this._onBusMessage.bind(this));
this._pipeline.set_state(Gst.State.PLAYING);
this._pipelineState = PipelineState.PLAYING;
this._onStartedCallback(this, true);
this._onStartedCallback = null;
}
startRecording(onStartedCallback) {
this._onStartedCallback = onStartedCallback;
const [streamPath] = this._sessionProxy.RecordAreaSync(
this._x, this._y,
this._width, this._height,
{
'is-recording': GLib.Variant.new('b', true),
'cursor-mode': GLib.Variant.new('u', this._drawCursor ? 1 : 0),
});
this._streamProxy = new ScreenCastStreamProxy(Gio.DBus.session,
'org.gnome.ScreenCast.Stream',
streamPath);
this._streamProxy.connectSignal('PipeWireStreamAdded',
(proxy, sender, params) => {
const [nodeId] = params;
this._startPipeline(nodeId);
});
this._sessionProxy.StartSync();
this._sessionState = SessionState.ACTIVE;
}
stopRecording(onStoppedCallback) {
this._pipelineState = PipelineState.FLUSHING;
this._onStoppedCallback = onStoppedCallback;
this._pipeline.send_event(Gst.Event.new_eos());
}
_stopSession() {
this._sessionProxy.StopSync();
this._sessionState = SessionState.STOPPED;
}
_onBusMessage(bus, message, _) {
switch (message.type) {
case Gst.MessageType.EOS:
this._pipeline.set_state(Gst.State.NULL);
switch (this._pipelineState) {
case PipelineState.FLUSHING:
this._pipelineState = PipelineState.STOPPED;
break;
default:
break;
}
switch (this._sessionState) {
case SessionState.ACTIVE:
this._stopSession();
break;
case SessionState.STOPPED:
this._notifyStopped();
break;
default:
break;
}
break;
default:
break;
}
return true;
}
_substituteThreadCount(pipelineDescr) {
const numProcessors = GLib.get_num_processors();
const numThreads = Math.min(Math.max(1, numProcessors), 64);
return pipelineDescr.replace(/%T/, numThreads);
}
_ensurePipeline(nodeId) {
const framerate = this._framerate;
let fullPipeline = `
pipewiresrc path=${nodeId}
do-timestamp=true
keepalive-time=1000
resend-last=true !
video/x-raw,max-framerate=${framerate}/1 !
videoconvert !
${this._pipelineString} !
filesink location=${this._filePath}`;
fullPipeline = this._substituteThreadCount(fullPipeline);
this._pipeline = Gst.parse_launch_full(fullPipeline,
null,
Gst.ParseFlags.FATAL_ERRORS);
}
};
var ScreencastService = class extends ServiceImplementation {
constructor() {
super(ScreencastIface, '/org/gnome/Shell/Screencast');
Gst.init(null);
this._recorders = new Map();
this._senders = new Map();
this._lockdownSettings = new Gio.Settings({
schema_id: 'org.gnome.desktop.lockdown',
});
this._proxy = new ScreenCastProxy(Gio.DBus.session,
'org.gnome.Mutter.ScreenCast',
'/org/gnome/Mutter/ScreenCast');
this._introspectProxy = new IntrospectProxy(Gio.DBus.session,
'org.gnome.Shell.Introspect',
'/org/gnome/Shell/Introspect');
}
_removeRecorder(sender) {
this._recorders.delete(sender);
if (this._recorders.size === 0)
this.release();
}
_addRecorder(sender, recorder) {
this._recorders.set(sender, recorder);
if (this._recorders.size === 1)
this.hold();
}
_getAbsolutePath(filename) {
if (GLib.path_is_absolute(filename))
return filename;
let videoDir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_VIDEOS);
if (!GLib.file_test(videoDir, GLib.FileTest.EXISTS))
videoDir = GLib.get_home_dir();
return GLib.build_filenamev([videoDir, filename]);
}
_generateFilePath(template) {
let filename = '';
let escape = false;
[...template].forEach(c => {
if (escape) {
switch (c) {
case '%':
filename += '%';
break;
case 'd': {
const datetime = GLib.DateTime.new_now_local();
const datestr = datetime.format('%0x');
const datestrEscaped = datestr.replace(/\//g, '-');
filename += datestrEscaped;
break;
}
case 't': {
const datetime = GLib.DateTime.new_now_local();
const datestr = datetime.format('%0X');
const datestrEscaped = datestr.replace(/\//g, ':');
filename += datestrEscaped;
break;
}
default:
log(`Warning: Unknown escape ${c}`);
}
escape = false;
} else if (c === '%') {
escape = true;
} else {
filename += c;
}
});
if (escape)
filename += '%';
return this._getAbsolutePath(filename);
}
ScreencastAsync(params, invocation) {
let returnValue = [false, ''];
if (this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
const sender = invocation.get_sender();
if (this._recorders.get(sender)) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
const [sessionPath] = this._proxy.CreateSessionSync({});
const [fileTemplate, options] = params;
const [screenWidth, screenHeight] = this._introspectProxy.ScreenSize;
const filePath = this._generateFilePath(fileTemplate);
let recorder;
try {
recorder = new Recorder(
sessionPath,
0, 0,
screenWidth, screenHeight,
fileTemplate,
options,
invocation,
_recorder => this._removeRecorder(sender));
} catch (error) {
log(`Failed to create recorder: ${error.message}`);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
this._addRecorder(sender, recorder);
try {
recorder.startRecording(
(_, result) => {
if (result) {
returnValue = [true, filePath];
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
} else {
this._removeRecorder(sender);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
});
} catch (error) {
log(`Failed to start recorder: ${error.message}`);
this._removeRecorder(sender);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
}
ScreencastAreaAsync(params, invocation) {
let returnValue = [false, ''];
if (this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
const sender = invocation.get_sender();
if (this._recorders.get(sender)) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
const [sessionPath] = this._proxy.CreateSessionSync({});
const [x, y, width, height, fileTemplate, options] = params;
const filePath = this._generateFilePath(fileTemplate);
let recorder;
try {
recorder = new Recorder(
sessionPath,
x, y,
width, height,
filePath,
options,
invocation,
_recorder => this._removeRecorder(sender));
} catch (error) {
log(`Failed to create recorder: ${error.message}`);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
this._addRecorder(sender, recorder);
try {
recorder.startRecording(
(_, result) => {
if (result) {
returnValue = [true, filePath];
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
} else {
this._removeRecorder(sender);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
});
} catch (error) {
log(`Failed to start recorder: ${error.message}`);
this._removeRecorder(sender);
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
}
StopScreencastAsync(params, invocation) {
const sender = invocation.get_sender();
const recorder = this._recorders.get(sender);
if (!recorder) {
invocation.return_value(GLib.Variant.new('(b)', [false]));
return;
}
recorder.stopRecording(() => {
this._removeRecorder(sender);
invocation.return_value(GLib.Variant.new('(b)', [true]));
});
}
};

View File

@ -71,7 +71,7 @@ var AuthPrompt = GObject.registerClass({
this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
this._userVerifier.connect('reset', this._onReset.bind(this));
this._userVerifier.connect('smartcard-status-changed', this._onSmartcardStatusChanged.bind(this));
this._userVerifier.connect('ovirt-user-authenticated', this._onOVirtUserAuthenticated.bind(this));
this._userVerifier.connect('credential-manager-authenticated', this._onCredentialManagerAuthenticated.bind(this));
this.smartcardDetected = this._userVerifier.smartcardDetected;
this.connect('destroy', this._onDestroy.bind(this));
@ -242,7 +242,7 @@ var AuthPrompt = GObject.registerClass({
this.emit('prompted');
}
_onOVirtUserAuthenticated() {
_onCredentialManagerAuthenticated() {
if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED)
this.reset();
}

View File

@ -0,0 +1,24 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported CredentialManager */
class CredentialManager {
constructor(service) {
this._token = null;
this._service = service;
this._authenticatedSignalId = null;
}
get token() {
return this._token;
}
set token(t) {
this._token = t;
if (this._token)
this.emit('user-authenticated', this._token);
}
get service() {
return this._service;
}
}

View File

@ -810,8 +810,8 @@ var LoginDialog = GObject.registerClass({
return;
this._logoBin.destroy_all_children();
const [valid, resourceScale] = this._logoBin.get_resource_scale();
if (this._logoFile && valid) {
const resourceScale = this._logoBin.get_resource_scale();
if (this._logoFile) {
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
-1, -1,
@ -953,16 +953,15 @@ var LoginDialog = GObject.registerClass({
if (this.opacity == 255 && this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
return;
if (this._authPrompt.verificationStatus !== AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
this._authPrompt.reset();
this._bindOpacity();
this.ease({
opacity: 255,
duration: _FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
this._authPrompt.reset();
this._unbindOpacity();
},
onComplete: () => this._unbindOpacity(),
});
}

View File

@ -3,6 +3,9 @@
const Gio = imports.gi.Gio;
const Signals = imports.signals;
const Credential = imports.gdm.credentialManager;
var SERVICE_NAME = 'gdm-ovirtcred';
const OVirtCredentialsIface = `
<node>
@ -28,30 +31,14 @@ function OVirtCredentials() {
return self;
}
var OVirtCredentialsManager = class {
var OVirtCredentialsManager = class OVirtCredentialsManager extends Credential.CredentialManager {
constructor() {
this._token = null;
super(SERVICE_NAME);
this._credentials = new OVirtCredentials();
this._credentials.connectSignal('UserAuthenticated',
this._onUserAuthenticated.bind(this));
}
_onUserAuthenticated(proxy, sender, [token]) {
this._token = token;
this.emit('user-authenticated', token);
}
hasToken() {
return this._token != null;
}
getToken() {
return this._token;
}
resetToken() {
this._token = null;
(proxy, sender, [token]) => {
this.token = token;
});
}
};
Signals.addSignalMethods(OVirtCredentialsManager.prototype);

View File

@ -8,6 +8,7 @@ const Signals = imports.signals;
const Batch = imports.gdm.batch;
const Fprint = imports.gdm.fingerprint;
const OVirt = imports.gdm.oVirt;
const Vmware = imports.gdm.vmware;
const Main = imports.ui.main;
const Params = imports.misc.params;
const SmartcardManager = imports.misc.smartcardManager;
@ -24,7 +25,6 @@ Gio._promisify(Gdm.UserVerifierProxy.prototype,
var PASSWORD_SERVICE_NAME = 'gdm-password';
var FINGERPRINT_SERVICE_NAME = 'gdm-fingerprint';
var SMARTCARD_SERVICE_NAME = 'gdm-smartcard';
var OVIRT_SERVICE_NAME = 'gdm-ovirtcred';
var FADE_ANIMATION_TIME = 160;
var CLONE_FADE_ANIMATION_TIME = 250;
@ -160,13 +160,20 @@ var ShellUserVerifier = class {
this._failCounter = 0;
this._oVirtCredentialsManager = OVirt.getOVirtCredentialsManager();
this._credentialManagers = {};
this._credentialManagers[OVirt.SERVICE_NAME] = OVirt.getOVirtCredentialsManager();
this._credentialManagers[Vmware.SERVICE_NAME] = Vmware.getVmwareCredentialsManager();
if (this._oVirtCredentialsManager.hasToken())
this._oVirtUserAuthenticated(this._oVirtCredentialsManager.getToken());
for (let service in this._credentialManagers) {
if (this._credentialManagers[service].token) {
this._onCredentialManagerAuthenticated(this._credentialManagers[service],
this._credentialManagers[service].token);
}
this._oVirtUserAuthenticatedId = this._oVirtCredentialsManager.connect('user-authenticated',
this._oVirtUserAuthenticated.bind(this));
this._credentialManagers[service]._authenticatedSignalId =
this._credentialManagers[service].connect('user-authenticated',
this._onCredentialManagerAuthenticated.bind(this));
}
}
begin(userName, hold) {
@ -222,8 +229,11 @@ var ShellUserVerifier = class {
this._smartcardManager.disconnect(this._smartcardRemovedId);
this._smartcardManager = null;
this._oVirtCredentialsManager.disconnect(this._oVirtUserAuthenticatedId);
this._oVirtCredentialsManager = null;
for (let service in this._credentialManagers) {
let credentialManager = this._credentialManagers[service];
credentialManager.disconnect(credentialManager._authenticatedSignalId);
credentialManager = null;
}
}
answerQuery(serviceName, answer) {
@ -311,9 +321,9 @@ var ShellUserVerifier = class {
});
}
_oVirtUserAuthenticated(_token) {
this._preemptingService = OVIRT_SERVICE_NAME;
this.emit('ovirt-user-authenticated');
_onCredentialManagerAuthenticated(credentialManager, _token) {
this._preemptingService = credentialManager.service;
this.emit('credential-manager-authenticated');
}
_checkForSmartcard() {
@ -490,9 +500,12 @@ var ShellUserVerifier = class {
if (!this.serviceIsForeground(serviceName))
return;
if (serviceName == OVIRT_SERVICE_NAME) {
// The only question asked by this service is "Token?"
this.answerQuery(serviceName, this._oVirtCredentialsManager.getToken());
let token = null;
if (this._credentialManagers[serviceName])
token = this._credentialManagers[serviceName].token;
if (token) {
this.answerQuery(serviceName, token);
return;
}
@ -560,8 +573,10 @@ var ShellUserVerifier = class {
// If the login failed with the preauthenticated oVirt credentials
// then discard the credentials and revert to default authentication
// mechanism.
if (this.serviceIsForeground(OVIRT_SERVICE_NAME)) {
this._oVirtCredentialsManager.resetToken();
let foregroundService = Object.keys(this._credentialManagers).find(service =>
this.serviceIsForeground(service));
if (foregroundService) {
this._credentialManagers[foregroundService].token = null;
this._preemptingService = null;
this._verificationFailed(false);
return;

54
js/gdm/vmware.js Normal file
View File

@ -0,0 +1,54 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported getVmwareCredentialsManager */
const Gio = imports.gi.Gio;
const Signals = imports.signals;
const Credential = imports.gdm.credentialManager;
const dbusPath = '/org/vmware/viewagent/Credentials';
const dbusInterface = 'org.vmware.viewagent.Credentials';
var SERVICE_NAME = 'gdm-vmwcred';
const VmwareCredentialsIface = '<node> \
<interface name="' + dbusInterface + '"> \
<signal name="UserAuthenticated"> \
<arg type="s" name="token"/> \
</signal> \
</interface> \
</node>';
const VmwareCredentialsInfo = Gio.DBusInterfaceInfo.new_for_xml(VmwareCredentialsIface);
let _vmwareCredentialsManager = null;
function VmwareCredentials() {
var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
g_interface_name: VmwareCredentialsInfo.name,
g_interface_info: VmwareCredentialsInfo,
g_name: dbusInterface,
g_object_path: dbusPath,
g_flags: Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES });
self.init(null);
return self;
}
var VmwareCredentialsManager = class VmwareCredentialsManager extends Credential.CredentialManager {
constructor() {
super(SERVICE_NAME);
this._credentials = new VmwareCredentials();
this._credentials.connectSignal('UserAuthenticated',
(proxy, sender, [token]) => {
this.token = token;
});
}
};
Signals.addSignalMethods(VmwareCredentialsManager.prototype);
function getVmwareCredentialsManager() {
if (!_vmwareCredentialsManager)
_vmwareCredentialsManager = new VmwareCredentialsManager();
return _vmwareCredentialsManager;
}

View File

@ -6,6 +6,8 @@
<file>gdm/fingerprint.js</file>
<file>gdm/loginDialog.js</file>
<file>gdm/oVirt.js</file>
<file>gdm/credentialManager.js</file>
<file>gdm/vmware.js</file>
<file>gdm/realmd.js</file>
<file>gdm/util.js</file>
@ -90,7 +92,6 @@
<file>ui/ripples.js</file>
<file>ui/runDialog.js</file>
<file>ui/screenShield.js</file>
<file>ui/screencast.js</file>
<file>ui/screenshot.js</file>
<file>ui/scripting.js</file>
<file>ui/search.js</file>
@ -108,6 +109,7 @@
<file>ui/windowAttentionHandler.js</file>
<file>ui/windowMenu.js</file>
<file>ui/windowManager.js</file>
<file>ui/windowPreview.js</file>
<file>ui/workspace.js</file>
<file>ui/workspaceSwitcherPopup.js</file>
<file>ui/workspaceThumbnail.js</file>
@ -134,7 +136,6 @@
<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>
</gresource>

View File

@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported collectFromDatadirs, recursivelyDeleteDir,
recursivelyMoveDir, loadInterfaceXML */
recursivelyMoveDir, loadInterfaceXML, loadSubInterfaceXML */
const { Gio, GLib } = imports.gi;
const Config = imports.misc.config;
@ -67,14 +67,19 @@ function recursivelyMoveDir(srcDir, destDir) {
}
let _ifaceResource = null;
function ensureIfaceResource() {
if (_ifaceResource)
return;
// don't use global.datadir so the method is usable from tests/tools
let dir = GLib.getenv('GNOME_SHELL_DATADIR') || Config.PKGDATADIR;
let path = `${dir}/gnome-shell-dbus-interfaces.gresource`;
_ifaceResource = Gio.Resource.load(path);
_ifaceResource._register();
}
function loadInterfaceXML(iface) {
if (!_ifaceResource) {
// don't use global.datadir so the method is usable from tests/tools
let dir = GLib.getenv('GNOME_SHELL_DATADIR') || Config.PKGDATADIR;
let path = `${dir}/gnome-shell-dbus-interfaces.gresource`;
_ifaceResource = Gio.Resource.load(path);
_ifaceResource._register();
}
ensureIfaceResource();
let uri = `resource:///org/gnome/shell/dbus-interfaces/${iface}.xml`;
let f = Gio.File.new_for_uri(uri);
@ -88,3 +93,25 @@ function loadInterfaceXML(iface) {
return null;
}
function loadSubInterfaceXML(iface, ifaceFile) {
let xml = loadInterfaceXML(ifaceFile);
if (!xml)
return null;
let ifaceStartTag = `<interface name="${iface}">`;
let ifaceStopTag = '</interface>';
let ifaceStartIndex = xml.indexOf(ifaceStartTag);
let ifaceEndIndex = xml.indexOf(ifaceStopTag, ifaceStartIndex + 1) + ifaceStopTag.length;
let xmlHeader = '<!DOCTYPE node PUBLIC\n' +
'\'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\'\n' +
'\'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\'>\n' +
'<node>\n';
let xmlFooter = '</node>';
return (
xmlHeader +
xml.substr(ifaceStartIndex, ifaceEndIndex - ifaceStartIndex) +
xmlFooter);
}

View File

@ -5,7 +5,7 @@ const INTROSPECT_SCHEMA = 'org.gnome.shell';
const INTROSPECT_KEY = 'introspect';
const APP_WHITELIST = ['org.freedesktop.impl.portal.desktop.gtk'];
const INTROSPECT_DBUS_API_VERSION = 2;
const INTROSPECT_DBUS_API_VERSION = 3;
const { loadInterfaceXML } = imports.misc.fileUtils;
@ -59,6 +59,11 @@ var IntrospectService = class {
this._settings.connect('notify::enable-animations',
this._syncAnimationsEnabled.bind(this));
this._syncAnimationsEnabled();
const monitorManager = Meta.MonitorManager.get();
monitorManager.connect('monitors-changed',
this._syncScreenSize.bind(this));
this._syncScreenSize();
}
_isStandaloneApp(app) {
@ -209,10 +214,28 @@ var IntrospectService = class {
}
}
_syncScreenSize() {
const oldScreenWidth = this._screenWidth;
const oldScreenHeight = this._screenHeight;
this._screenWidth = global.screen_width;
this._screenHeight = global.screen_height;
if (oldScreenWidth !== this._screenWidth ||
oldScreenHeight !== this._screenHeight) {
const variant = new GLib.Variant('(ii)',
[this._screenWidth, this._screenHeight]);
this._dbusImpl.emit_property_changed('ScreenSize', variant);
}
}
get AnimationsEnabled() {
return this._animationsEnabled;
}
get ScreenSize() {
return [this._screenWidth, this._screenHeight];
}
get version() {
return INTROSPECT_DBUS_API_VERSION;
}

View File

@ -1,9 +1,9 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported findUrls, spawn, spawnCommandLine, spawnApp, trySpawnCommandLine,
formatTime, formatTimeSpan, createTimeLabel, insertSorted,
makeCloseButton, ensureActorVisibleInScrollView, wiggle */
ensureActorVisibleInScrollView, wiggle */
const { Clutter, Gio, GLib, GObject, Shell, St, GnomeDesktop } = imports.gi;
const { Clutter, Gio, GLib, Shell, St, GnomeDesktop } = imports.gi;
const Gettext = imports.gettext;
const Main = imports.ui.main;
@ -363,51 +363,6 @@ function insertSorted(array, val, cmp) {
return pos;
}
var CloseButton = GObject.registerClass(
class CloseButton extends St.Button {
_init(boxpointer) {
super._init({
style_class: 'notification-close',
x_expand: true,
y_expand: true,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.START,
});
this._boxPointer = boxpointer;
if (boxpointer)
this._boxPointer.connect('arrow-side-changed', this._sync.bind(this));
}
_computeBoxPointerOffset() {
if (!this._boxPointer || !this._boxPointer.get_stage())
return 0;
let side = this._boxPointer.arrowSide;
if (side == St.Side.TOP)
return this._boxPointer.getArrowHeight();
else
return 0;
}
_sync() {
let themeNode = this.get_theme_node();
let offY = this._computeBoxPointerOffset();
this.translation_x = themeNode.get_length('-shell-close-overlap-x');
this.translation_y = themeNode.get_length('-shell-close-overlap-y') + offY;
}
vfunc_style_changed() {
this._sync();
super.vfunc_style_changed();
}
});
function makeCloseButton(boxpointer) {
return new CloseButton(boxpointer);
}
function ensureActorVisibleInScrollView(scrollView, actor) {
let adjustment = scrollView.vscroll.adjustment;
let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values();

View File

@ -852,6 +852,9 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
if (index === -1)
return;
this._arrows[index].destroy();
this._arrows.splice(index, 1);
this.icons.splice(index, 1);
this.removeItem(index);
}

View File

@ -60,7 +60,7 @@ class Animation extends St.Bin {
}
_loadFile(file, width, height) {
let [validResourceScale, resourceScale] = this.get_resource_scale();
const resourceScale = this.get_resource_scale();
let wasPlaying = this._isPlaying;
if (this._isPlaying)
@ -69,12 +69,6 @@ class Animation extends St.Bin {
this._isLoaded = false;
this.destroy_all_children();
if (!validResourceScale) {
if (wasPlaying)
this.play();
return;
}
let textureCache = St.TextureCache.get_default();
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._animations = textureCache.load_sliced_image(file, width, height,

File diff suppressed because it is too large Load Diff

View File

@ -347,6 +347,8 @@ var Background = GObject.registerClass({
this.set_color(color);
else
this.set_gradient(shadingType, color, secondColor);
this._setLoaded();
}
_watchFile(file) {
@ -512,8 +514,8 @@ var SystemBackground = GObject.registerClass({
super._init({
meta_display: global.display,
monitor: 0,
background: _systemBackground,
});
this.content.background = _systemBackground;
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this.emit('loaded');
@ -712,13 +714,18 @@ var BackgroundManager = class BackgroundManager {
}
let newBackgroundActor = this._createBackgroundActor();
newBackgroundActor.vignette_sharpness = this.backgroundActor.vignette_sharpness;
newBackgroundActor.brightness = this.backgroundActor.brightness;
const oldContent = this.backgroundActor.content;
const newContent = newBackgroundActor.content;
newContent.vignette_sharpness = oldContent.vignette_sharpness;
newContent.brightness = oldContent.brightness;
newBackgroundActor.visible = this.backgroundActor.visible;
this._newBackgroundActor = newBackgroundActor;
let background = newBackgroundActor.background;
const { background } = newBackgroundActor.content;
if (background.isLoaded) {
this._swapBackgroundActor();
@ -738,6 +745,8 @@ var BackgroundManager = class BackgroundManager {
let backgroundActor = new Meta.BackgroundActor({
meta_display: global.display,
monitor: this._monitorIndex,
});
backgroundActor.content.set({
background,
vignette: this._vignette,
vignette_sharpness: 0.5,
@ -758,10 +767,27 @@ var BackgroundManager = class BackgroundManager {
this._updateBackgroundActor();
});
let loadedSignalId;
if (background.isLoaded) {
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this.emit('loaded');
return GLib.SOURCE_REMOVE;
});
} else {
loadedSignalId = background.connect('loaded', () => {
background.disconnect(loadedSignalId);
loadedSignalId = null;
this.emit('loaded');
});
}
backgroundActor.connect('destroy', () => {
if (changeSignalId)
background.disconnect(changeSignalId);
if (loadedSignalId)
background.disconnect(loadedSignalId);
if (backgroundActor.loadedSignalId)
background.disconnect(backgroundActor.loadedSignalId);
});

View File

@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported BoxPointer */
const { Clutter, GObject, Shell, St } = imports.gi;
const { Clutter, GObject, St } = imports.gi;
const Main = imports.ui.main;
@ -453,15 +453,16 @@ var BoxPointer = GObject.registerClass({
let alignment = this._arrowAlignment;
let monitorIndex = Main.layoutManager.findIndexForActor(sourceActor);
this._sourceAllocation = Shell.util_get_transformed_allocation(sourceActor);
this._sourceExtents = sourceActor.get_transformed_extents();
this._workArea = Main.layoutManager.getWorkAreaForMonitor(monitorIndex);
// Position correctly relative to the sourceActor
let sourceNode = sourceActor.get_theme_node();
let sourceContentBox = sourceNode.get_content_box(sourceActor.get_allocation_box());
let sourceAllocation = this._sourceAllocation;
let sourceCenterX = sourceAllocation.x1 + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment;
let sourceCenterY = sourceAllocation.y1 + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment;
let sourceTopLeft = this._sourceExtents.get_top_left();
let sourceBottomRight = this._sourceExtents.get_bottom_right();
let sourceCenterX = sourceTopLeft.x + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment;
let sourceCenterY = sourceTopLeft.y + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment;
let [, , natWidth, natHeight] = this.get_preferred_size();
// We also want to keep it onscreen, and separated from the
@ -481,16 +482,16 @@ var BoxPointer = GObject.registerClass({
switch (this._arrowSide) {
case St.Side.TOP:
resY = sourceAllocation.y2 + gap;
resY = sourceBottomRight.y + gap;
break;
case St.Side.BOTTOM:
resY = sourceAllocation.y1 - natHeight - gap;
resY = sourceTopLeft.y - natHeight - gap;
break;
case St.Side.LEFT:
resX = sourceAllocation.x2 + gap;
resX = sourceBottomRight.x + gap;
break;
case St.Side.RIGHT:
resX = sourceAllocation.x1 - natWidth - gap;
resX = sourceTopLeft.x - natWidth - gap;
break;
}
@ -586,29 +587,30 @@ var BoxPointer = GObject.registerClass({
}
_calculateArrowSide(arrowSide) {
let sourceAllocation = this._sourceAllocation;
let sourceTopLeft = this._sourceExtents.get_top_left();
let sourceBottomRight = this._sourceExtents.get_bottom_right();
let [, , boxWidth, boxHeight] = this.get_preferred_size();
let workarea = this._workArea;
switch (arrowSide) {
case St.Side.TOP:
if (sourceAllocation.y2 + boxHeight > workarea.y + workarea.height &&
boxHeight < sourceAllocation.y1 - workarea.y)
if (sourceBottomRight.y + boxHeight > workarea.y + workarea.height &&
boxHeight < sourceTopLeft.y - workarea.y)
return St.Side.BOTTOM;
break;
case St.Side.BOTTOM:
if (sourceAllocation.y1 - boxHeight < workarea.y &&
boxHeight < workarea.y + workarea.height - sourceAllocation.y2)
if (sourceTopLeft.y - boxHeight < workarea.y &&
boxHeight < workarea.y + workarea.height - sourceBottomRight.y)
return St.Side.TOP;
break;
case St.Side.LEFT:
if (sourceAllocation.x2 + boxWidth > workarea.x + workarea.width &&
boxWidth < sourceAllocation.x1 - workarea.x)
if (sourceBottomRight.x + boxWidth > workarea.x + workarea.width &&
boxWidth < sourceTopLeft.x - workarea.x)
return St.Side.RIGHT;
break;
case St.Side.RIGHT:
if (sourceAllocation.x1 - boxWidth < workarea.x &&
boxWidth < workarea.x + workarea.width - sourceAllocation.x2)
if (sourceTopLeft.x - boxWidth < workarea.x &&
boxWidth < workarea.x + workarea.width - sourceBottomRight.x)
return St.Side.LEFT;
break;
}

View File

@ -14,7 +14,6 @@ const { loadInterfaceXML } = imports.misc.fileUtils;
var MSECS_IN_DAY = 24 * 60 * 60 * 1000;
var SHOW_WEEKDATE_KEY = 'show-weekdate';
var ELLIPSIS_CHAR = '\u2026';
var MESSAGE_ICON_SIZE = -1; // pick up from CSS
@ -32,10 +31,6 @@ function sameDay(dateA, dateB) {
return sameMonth(dateA, dateB) && (dateA.getDate() == dateB.getDate());
}
function isToday(date) {
return sameDay(new Date(), date);
}
function _isWorkDay(date) {
/* Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday). */
let days = C_('calendar-no-work', "06");
@ -723,67 +718,6 @@ var Calendar = GObject.registerClass({
}
});
var EventMessage = GObject.registerClass(
class EventMessage extends MessageList.Message {
_init(event, date) {
super._init('', '');
this._date = date;
this.update(event);
this._icon = new St.Icon({ icon_name: 'x-office-calendar-symbolic' });
this.setIcon(this._icon);
}
vfunc_style_changed() {
let iconVisible = this.get_parent().has_style_pseudo_class('first-child');
this._icon.opacity = iconVisible ? 255 : 0;
super.vfunc_style_changed();
}
update(event) {
this._event = event;
this.setTitle(this._formatEventTime());
this.setBody(event.summary);
}
_formatEventTime() {
let periodBegin = _getBeginningOfDay(this._date);
let periodEnd = _getEndOfDay(this._date);
let allDay = this._event.allDay || (this._event.date <= periodBegin &&
this._event.end >= periodEnd);
let title;
if (allDay) {
/* Translators: Shown in calendar event list for all day events
* Keep it short, best if you can use less then 10 characters
*/
title = C_("event list time", "All Day");
} else {
let date = this._event.date >= periodBegin
? this._event.date
: this._event.end;
title = Util.formatTime(date, { timeOnly: true });
}
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
if (this._event.date < periodBegin && !this._event.allDay) {
if (rtl)
title = '%s%s'.format(title, ELLIPSIS_CHAR);
else
title = '%s%s'.format(ELLIPSIS_CHAR, title);
}
if (this._event.end > periodEnd && !this._event.allDay) {
if (rtl)
title = '%s%s'.format(ELLIPSIS_CHAR, title);
else
title = '%s%s'.format(title, ELLIPSIS_CHAR);
}
return title;
}
});
var NotificationMessage = GObject.registerClass(
class NotificationMessage extends MessageList.Message {
_init(notification) {
@ -849,149 +783,6 @@ class NotificationMessage extends MessageList.Message {
}
});
var EventsSection = GObject.registerClass(
class EventsSection extends MessageList.MessageListSection {
_init() {
super._init();
this._desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
this._desktopSettings.connect('changed', this._reloadEvents.bind(this));
this._eventSource = new EmptyEventSource();
this._messageById = new Map();
this._title = new St.Button({ style_class: 'events-section-title',
label: '',
can_focus: true });
this._title.child.x_align = Clutter.ActorAlign.START;
this.insert_child_below(this._title, null);
this._title.connect('clicked', this._onTitleClicked.bind(this));
this._title.connect('key-focus-in', this._onKeyFocusIn.bind(this));
this._appSys = Shell.AppSystem.get_default();
this._appSys.connect('installed-changed',
this._appInstalledChanged.bind(this));
this._appInstalledChanged();
}
setEventSource(eventSource) {
if (!(eventSource instanceof EventSourceBase))
throw new Error('Event source is not valid type');
this._eventSource = eventSource;
this._eventSource.connect('changed', this._reloadEvents.bind(this));
}
get allowed() {
return Main.sessionMode.showCalendarEvents;
}
_updateTitle() {
this._title.visible = !isToday(this._date);
if (!this._title.visible)
return;
let dayFormat;
let now = new Date();
if (sameYear(this._date, now)) {
/* Translators: Shown on calendar heading when selected day occurs on current year */
dayFormat = Shell.util_translate_time_string(NC_("calendar heading", "%A, %B %-d"));
} else {
/* Translators: Shown on calendar heading when selected day occurs on different year */
dayFormat = Shell.util_translate_time_string(NC_("calendar heading", "%A, %B %-d, %Y"));
}
this._title.label = this._date.toLocaleFormat(dayFormat);
}
_reloadEvents() {
if (this._eventSource.isLoading || this._reloading)
return;
this._reloading = true;
let periodBegin = _getBeginningOfDay(this._date);
let periodEnd = _getEndOfDay(this._date);
let events = this._eventSource.getEvents(periodBegin, periodEnd);
let ids = events.map(e => e.id);
this._messageById.forEach((message, id) => {
if (ids.includes(id))
return;
this._messageById.delete(id);
this.removeMessage(message);
});
for (let i = 0; i < events.length; i++) {
let event = events[i];
let message = this._messageById.get(event.id);
if (!message) {
message = new EventMessage(event, this._date);
this._messageById.set(event.id, message);
this.addMessage(message, false);
} else {
message.update(event);
this.moveMessage(message, i, false);
}
}
this._reloading = false;
this._sync();
}
_appInstalledChanged() {
this._calendarApp = undefined;
this._title.reactive = this._getCalendarApp() != null;
}
_getCalendarApp() {
if (this._calendarApp !== undefined)
return this._calendarApp;
let apps = Gio.AppInfo.get_recommended_for_type('text/calendar');
if (apps && (apps.length > 0)) {
let app = Gio.AppInfo.get_default_for_type('text/calendar', false);
let defaultInRecommended = apps.some(a => a.equal(app));
this._calendarApp = defaultInRecommended ? app : apps[0];
} else {
this._calendarApp = null;
}
return this._calendarApp;
}
_onTitleClicked() {
Main.overview.hide();
Main.panel.closeCalendar();
let appInfo = this._getCalendarApp();
if (appInfo.get_id() === 'org.gnome.Evolution.desktop') {
let app = this._appSys.lookup_app('evolution-calendar.desktop');
if (app)
appInfo = app.app_info;
}
appInfo.launch([], global.create_app_launch_context(0, -1));
}
setDate(date) {
super.setDate(date);
this._updateTitle();
this._reloadEvents();
}
_shouldShow() {
return !this.empty || !isToday(this._date);
}
_sync() {
if (this._reloading)
return;
super._sync();
}
});
var TimeLabel = GObject.registerClass(
class NotificationTimeLabel extends St.Label {
_init(datetime) {
@ -1088,10 +879,6 @@ class NotificationSection extends MessageList.MessageListSection {
});
super.vfunc_map();
}
_shouldShow() {
return !this.empty && isToday(this._date);
}
});
var Placeholder = GObject.registerClass(
@ -1100,41 +887,13 @@ class Placeholder extends St.BoxLayout {
super._init({ style_class: 'message-list-placeholder', vertical: true });
this._date = new Date();
let todayFile = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/no-notifications.svg');
let otherFile = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/no-events.svg');
this._todayIcon = new Gio.FileIcon({ file: todayFile });
this._otherIcon = new Gio.FileIcon({ file: otherFile });
this._icon = new St.Icon();
const file = Gio.File.new_for_uri(
'resource:///org/gnome/shell/theme/no-notifications.svg');
this._icon = new St.Icon({ gicon: new Gio.FileIcon({ file }) });
this.add_actor(this._icon);
this._label = new St.Label();
this._label = new St.Label({ text: _('No Notifications') });
this.add_actor(this._label);
this._sync();
}
setDate(date) {
if (sameDay(this._date, date))
return;
this._date = date;
this._sync();
}
_sync() {
let today = isToday(this._date);
if (today && this._icon.gicon == this._todayIcon)
return;
if (!today && this._icon.gicon == this._otherIcon)
return;
if (today) {
this._icon.gicon = this._todayIcon;
this._label.text = _("No Notifications");
} else {
this._icon.gicon = this._otherIcon;
this._label.text = _("No Events");
}
}
});
@ -1235,9 +994,6 @@ class CalendarMessageList extends St.Widget {
this._notificationSection = new NotificationSection();
this._addSection(this._notificationSection);
this._eventsSection = new EventsSection();
this._addSection(this._eventsSection);
Main.sessionMode.connect('updated', this._sync.bind(this));
}
@ -1273,13 +1029,4 @@ class CalendarMessageList extends St.Widget {
let canClear = sections.some(s => s.canClear && s.visible);
this._clearButton.reactive = canClear;
}
setEventSource(eventSource) {
this._eventsSection.setEventSource(eventSource);
}
setDate(date) {
this._sectionList.get_children().forEach(s => s.setDate(date));
this._placeholder.setDate(date);
}
});

View File

@ -13,7 +13,11 @@ const System = imports.system;
const { loadInterfaceXML } = imports.misc.fileUtils;
const NC_ = (context, str) => '%s\u0004%s'.format(context, str);
const T_ = Shell.util_translate_time_string;
const MAX_FORECASTS = 5;
const ELLIPSIS_CHAR = '\u2026';
const ClocksIntegrationIface = loadInterfaceXML('org.gnome.Shell.ClocksIntegration');
const ClocksProxy = Gio.DBusProxy.makeProxyWrapper(ClocksIntegrationIface);
@ -84,6 +88,188 @@ class TodayButton extends St.Button {
}
});
var EventsSection = GObject.registerClass(
class EventsSection extends St.Button {
_init() {
super._init({
style_class: 'events-button',
can_focus: true,
x_expand: true,
child: new St.BoxLayout({
style_class: 'events-box',
vertical: true,
x_expand: true,
}),
});
this._startDate = null;
this._endDate = null;
this._eventSource = null;
this._calendarApp = null;
this._title = new St.Label({
style_class: 'events-title',
});
this.child.add_child(this._title);
this._eventsList = new St.BoxLayout({
style_class: 'events-list',
vertical: true,
x_expand: true,
});
this.child.add_child(this._eventsList);
this._appSys = Shell.AppSystem.get_default();
this._appSys.connect('installed-changed',
this._appInstalledChanged.bind(this));
this._appInstalledChanged();
}
setDate(date) {
const day = [date.getFullYear(), date.getMonth(), date.getDate()];
this._startDate = new Date(...day);
this._endDate = new Date(...day, 23, 59, 59, 999);
this._updateTitle();
this._reloadEvents();
}
setEventSource(eventSource) {
if (!(eventSource instanceof Calendar.EventSourceBase))
throw new Error('Event source is not valid type');
this._eventSource = eventSource;
this._eventSource.connect('changed', this._reloadEvents.bind(this));
this._eventSource.connect('notify::has-calendars',
this._sync.bind(this));
this._sync();
}
_updateTitle() {
/* Translators: Shown on calendar heading when selected day occurs on current year */
const sameYearFormat = T_(NC_('calendar heading', '%B %-d'));
/* Translators: Shown on calendar heading when selected day occurs on different year */
const otherYearFormat = T_(NC_('calendar heading', '%B %-d %Y'));
const timeSpanDay = GLib.TIME_SPAN_DAY / 1000;
const now = new Date();
if (this._startDate <= now && now <= this._endDate)
this._title.text = _('Today');
else if (this._endDate < now && now - this._endDate < timeSpanDay)
this._title.text = _('Yesterday');
else if (this._startDate > now && this._startDate - now < timeSpanDay)
this._title.text = _('Tomorrow');
else if (this._startDate.getFullYear() === now.getFullYear())
this._title.text = this._startDate.toLocaleFormat(sameYearFormat);
else
this._title.text = this._startDate.toLocaleFormat(otherYearFormat);
}
_formatEventTime(event) {
const allDay = event.allDay ||
(event.date <= this._startDate && event.end >= this._endDate);
let title;
if (allDay) {
/* Translators: Shown in calendar event list for all day events
* Keep it short, best if you can use less then 10 characters
*/
title = C_('event list time', 'All Day');
} else {
let date = event.date >= this._startDate ? event.date : event.end;
title = Util.formatTime(date, { timeOnly: true });
}
const rtl = Clutter.get_default_text_direction() === Clutter.TextDirection.RTL;
if (event.date < this._startDate && !event.allDay) {
if (rtl)
title = '%s%s'.format(title, ELLIPSIS_CHAR);
else
title = '%s%s'.format(ELLIPSIS_CHAR, title);
}
if (event.end > this._endDate && !event.allDay) {
if (rtl)
title = '%s%s'.format(ELLIPSIS_CHAR, title);
else
title = '%s%s'.format(title, ELLIPSIS_CHAR);
}
return title;
}
_reloadEvents() {
if (this._eventSource.isLoading || this._reloading)
return;
this._reloading = true;
[...this._eventsList].forEach(c => c.destroy());
const events =
this._eventSource.getEvents(this._startDate, this._endDate);
for (let event of events) {
const box = new St.BoxLayout({
style_class: 'event-box',
vertical: true,
});
box.add(new St.Label({
text: event.summary,
style_class: 'event-summary',
}));
box.add(new St.Label({
text: this._formatEventTime(event),
style_class: 'event-time',
}));
this._eventsList.add_child(box);
}
if (this._eventsList.get_n_children() === 0) {
const placeholder = new St.Label({
text: _('No Events'),
style_class: 'event-placeholder',
});
this._eventsList.add_child(placeholder);
}
this._reloading = false;
this._sync();
}
vfunc_clicked() {
Main.overview.hide();
Main.panel.closeCalendar();
let appInfo = this._calendarApp;
if (appInfo.get_id() === 'org.gnome.Evolution.desktop') {
const app = this._appSys.lookup_app('evolution-calendar.desktop');
if (app)
appInfo = app.app_info;
}
appInfo.launch([], global.create_app_launch_context(0, -1));
}
_appInstalledChanged() {
const apps = Gio.AppInfo.get_recommended_for_type('text/calendar');
if (apps && (apps.length > 0)) {
const app = Gio.AppInfo.get_default_for_type('text/calendar', false);
const defaultInRecommended = apps.some(a => a.equal(app));
this._calendarApp = defaultInRecommended ? app : apps[0];
} else {
this._calendarApp = null;
}
return this._sync();
}
_sync() {
this.visible = this._eventSource && this._eventSource.hasCalendars;
this.reactive = this._calendarApp !== null;
}
});
var WorldClocksSection = GObject.registerClass(
class WorldClocksSection extends St.Button {
_init() {
@ -598,6 +784,7 @@ class DateMenuButton extends PanelMenu.Button {
this._clockDisplay = new St.Label({ style_class: 'clock' });
this._clockDisplay.clutter_text.y_align = Clutter.ActorAlign.CENTER;
this._clockDisplay.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._indicator = new MessagesIndicator();
@ -632,7 +819,7 @@ class DateMenuButton extends PanelMenu.Button {
this._calendar.connect('selected-date-changed', (_calendar, datetime) => {
let date = _gDateTimeToDate(datetime);
layout.frozen = !_isToday(date);
this._messageList.setDate(date);
this._eventsItem.setDate(date);
});
this.menu.connect('open-state-changed', (menu, isOpen) => {
@ -641,7 +828,7 @@ class DateMenuButton extends PanelMenu.Button {
let now = new Date();
this._calendar.setDate(now);
this._date.setDate(now);
this._messageList.setDate(now);
this._eventsItem.setDate(now);
}
});
@ -672,6 +859,9 @@ class DateMenuButton extends PanelMenu.Button {
style_class: 'datemenu-displays-box' });
this._displaysSection.add_actor(displaysBox);
this._eventsItem = new EventsSection();
displaysBox.add_child(this._eventsItem);
this._clocksItem = new WorldClocksSection();
displaysBox.add_child(this._clocksItem);
@ -697,7 +887,7 @@ class DateMenuButton extends PanelMenu.Button {
this._eventSource.destroy();
this._calendar.setEventSource(eventSource);
this._messageList.setEventSource(eventSource);
this._eventsItem.setEventSource(eventSource);
this._eventSource = eventSource;
}

View File

@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported Dialog, MessageDialogContent, ListSection, ListSectionItem */
const { Clutter, GObject, Meta, Pango, St } = imports.gi;
const { Clutter, GLib, GObject, Meta, Pango, St } = imports.gi;
function _setLabel(label, value) {
label.set({
@ -221,13 +221,16 @@ var MessageDialogContent = GObject.registerClass({
this._updateTitleStyleLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this._updateTitleStyleLater = 0;
this._title.add_style_class_name('leightweight');
return false;
return GLib.SOURCE_REMOVE;
});
}
}
set title(title) {
if (this._title.text === title)
return;
_setLabel(this._title, title);
this._title.remove_style_class_name('leightweight');
@ -237,6 +240,9 @@ var MessageDialogContent = GObject.registerClass({
}
set description(description) {
if (this._description.text === description)
return;
_setLabel(this._description, description);
this.notify('description');
}

View File

@ -375,19 +375,29 @@ var _Draggable = class _Draggable {
this._dragActorSource = undefined;
this._dragOrigParent = this.actor.get_parent();
this._dragOrigX = this._dragActor.x;
this._dragOrigY = this._dragActor.y;
this._dragActorHadFixedPos = this._dragActor.fixed_position_set;
this._dragOrigX = this._dragActor.allocation.x1;
this._dragOrigY = this._dragActor.allocation.y1;
this._dragOrigWidth = this._dragActor.allocation.get_width();
this._dragOrigHeight = this._dragActor.allocation.get_height();
this._dragOrigScale = this._dragActor.scale_x;
// When the actor gets reparented to the uiGroup, it will be
// allocated its preferred size, so use that size instead of the
// current allocation size.
const [, newAllocatedWidth] = this._dragActor.get_preferred_width(-1);
const [, newAllocatedHeight] = this._dragActor.get_preferred_height(-1);
const transformedExtents = this._dragActor.get_transformed_extents();
// Set the actor's scale such that it will keep the same
// transformed size when it's reparented to the uiGroup
let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
this._dragActor.set_scale(scaledWidth / this.actor.width,
scaledHeight / this.actor.height);
this._dragActor.set_scale(
transformedExtents.get_width() / newAllocatedWidth,
transformedExtents.get_height() / newAllocatedHeight);
let [actorStageX, actorStageY] = this.actor.get_transformed_position();
this._dragOffsetX = actorStageX - this._dragStartX;
this._dragOffsetY = actorStageY - this._dragStartY;
this._dragOffsetX = transformedExtents.origin.x - this._dragStartX;
this._dragOffsetY = transformedExtents.origin.y - this._dragStartY;
this._dragOrigParent.remove_actor(this._dragActor);
Main.uiGroup.add_child(this._dragActor);
@ -417,6 +427,10 @@ var _Draggable = class _Draggable {
this._dragOffsetX -= transX;
this._dragOffsetY -= transY;
this._dragActor.set_position(
this._dragX + this._dragOffsetX,
this._dragY + this._dragOffsetY);
if (this._dragActorMaxSize != undefined) {
let [scaledWidth, scaledHeight] = this._dragActor.get_transformed_size();
let currentSize = Math.max(scaledWidth, scaledHeight);
@ -635,9 +649,15 @@ var _Draggable = class _Draggable {
if (parentWidth != 0)
parentScale = parentScaledWidth / parentWidth;
// Also adjust for the difference in the original actor width
// and the width it is now (children of uiGroup always get
// allocated their preferred size)
const childScaleX =
this._dragOrigWidth / this._dragActor.allocation.get_width();
x = parentX + parentScale * this._dragOrigX;
y = parentY + parentScale * this._dragOrigY;
scale = this._dragOrigScale * parentScale;
scale = this._dragOrigScale * parentScale * childScaleX;
} else {
// Snap back actor to its original stage position
x = this._snapBackX;
@ -718,7 +738,10 @@ var _Draggable = class _Draggable {
Main.uiGroup.remove_child(this._dragActor);
this._dragOrigParent.add_actor(this._dragActor);
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
dragActor.set_position(this._dragOrigX, this._dragOrigY);
if (this._dragActorHadFixedPos)
dragActor.set_position(this._dragOrigX, this._dragOrigY);
else
dragActor.fixed_position_set = false;
} else {
dragActor.destroy();
}

View File

@ -362,6 +362,10 @@ function init() {
const Format = imports.format;
String.prototype.format = Format.format;
Math.clamp = function (x, lower, upper) {
return Math.min(Math.max(x, lower), upper);
};
}
// adjustAnimationTime:

View File

@ -139,7 +139,9 @@ function checkForUpdates() {
return;
if (extension.hasUpdate)
return;
metadatas[uuid] = extension.metadata;
metadatas[uuid] = {
version: extension.metadata.version,
};
});
if (Object.keys(metadatas).length === 0)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* exported InhibitShortcutsDialog */
const { Clutter, Gio, GLib, GObject, Gtk, Meta, Shell, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, Gtk, Meta, Pango, Shell, St } = imports.gi;
const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog;
@ -90,6 +90,8 @@ var InhibitShortcutsDialog = GObject.registerClass({
text: _('You can restore shortcuts by pressing %s.').format(restoreAccel),
style_class: 'message-dialog-description',
});
restoreLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
restoreLabel.clutter_text.line_wrap = true;
content.add_child(restoreLabel);
}

View File

@ -42,7 +42,7 @@ const defaultKeysPost = [
[[{ width: 1.5, keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic' }],
[{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic' }],
[{ label: '=/<', width: 3, level: 3, right: true }],
[{ action: 'emoji', icon: 'face-smile-symbolic' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
[{ action: 'emoji', icon: 'face-smile-symbolic' }, { action: 'languageMenu', extraClassName: 'layout-key', icon: 'keyboard-layout-filled-symbolic' }, { action: 'hide', extraClassName: 'hide-key', icon: 'go-down-symbolic' }]],
[[{ width: 1.5, keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic' }],
[{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic' }],
[{ label: '?123', width: 3, level: 2, right: true }],
@ -61,6 +61,24 @@ class AspectContainer extends St.Widget {
this.queue_relayout();
}
vfunc_get_preferred_width(forHeight) {
let [min, nat] = super.vfunc_get_preferred_width(forHeight);
if (forHeight > 0)
nat = forHeight * this._ratio;
return [min, nat];
}
vfunc_get_preferred_height(forWidth) {
let [min, nat] = super.vfunc_get_preferred_height(forWidth);
if (forWidth > 0)
nat = forWidth / this._ratio;
return [min, nat];
}
vfunc_allocate(box) {
if (box.get_width() > 0 && box.get_height() > 0) {
let sizeRatio = box.get_width() / box.get_height();
@ -1608,7 +1626,9 @@ class Keyboard extends St.BoxLayout {
* we allow the OSK being smaller than 1/3rd of the monitor height
* there.
*/
this.height = Math.min(maxHeight, this.get_preferred_height(monitor.width));
const forWidth = this.get_theme_node().adjust_for_width(monitor.width);
const [, natHeight] = this.get_preferred_height(forWidth);
this.height = Math.min(maxHeight, natHeight);
}
}

View File

@ -6,7 +6,6 @@ const Signals = imports.signals;
const Background = imports.ui.background;
const BackgroundMenu = imports.ui.backgroundMenu;
const LoginManager = imports.misc.loginManager;
const DND = imports.ui.dnd;
const Main = imports.ui.main;
@ -295,18 +294,6 @@ var LayoutManager = GObject.registerClass({
monitorManager.connect('monitors-changed',
this._monitorsChanged.bind(this));
this._monitorsChanged();
// NVIDIA drivers don't preserve FBO contents across
// suspend/resume, see
// https://bugzilla.gnome.org/show_bug.cgi?id=739178
if (Shell.util_need_background_refresh()) {
LoginManager.getLoginManager().connect('prepare-for-sleep',
(lm, suspending) => {
if (suspending)
return;
Meta.Background.refresh_all();
});
}
}
// This is called by Main after everything else is constructed
@ -470,6 +457,15 @@ var LayoutManager = GObject.registerClass({
}
}
_waitLoaded(bgManager) {
return new Promise(resolve => {
const id = bgManager.connect('loaded', () => {
bgManager.disconnect(id);
resolve();
});
});
}
_updateBackgrounds() {
for (let i = 0; i < this._bgManagers.length; i++)
this._bgManagers[i].destroy();
@ -477,7 +473,7 @@ var LayoutManager = GObject.registerClass({
this._bgManagers = [];
if (Main.sessionMode.isGreeter)
return;
return Promise.resolve();
for (let i = 0; i < this.monitors.length; i++) {
let bgManager = this._createBackgroundManager(i);
@ -486,6 +482,8 @@ var LayoutManager = GObject.registerClass({
if (i != this.primaryIndex && this._startingUp)
bgManager.backgroundActor.hide();
}
return Promise.all(this._bgManagers.map(this._waitLoaded));
}
_updateKeyboardBox() {
@ -644,7 +642,7 @@ var LayoutManager = GObject.registerClass({
// When starting a normal user session, we want to grow it out of the middle
// of the screen.
_prepareStartupAnimation() {
async _prepareStartupAnimation() {
// During the initial transition, add a simple actor to block all events,
// so they don't get delivered to X11 windows that have been transformed.
this._coverPane = new Clutter.Actor({ opacity: 0,
@ -661,8 +659,6 @@ var LayoutManager = GObject.registerClass({
} else if (Main.sessionMode.isGreeter) {
this.panelBox.translation_y = -this.panelBox.height;
} else {
this._updateBackgrounds();
// We need to force an update of the regions now before we scale
// the UI group to get the correct allocation for the struts.
this._updateRegions();
@ -678,6 +674,8 @@ var LayoutManager = GObject.registerClass({
this.uiGroup.scale_x = this.uiGroup.scale_y = 0.75;
this.uiGroup.opacity = 0;
global.window_group.set_clip(monitor.x, monitor.y, monitor.width, monitor.height);
await this._updateBackgrounds();
}
this.emit('startup-prepared');
@ -1204,7 +1202,8 @@ class HotCorner extends Clutter.Actor {
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
this._corner.set_position(this.width - this._corner.width, 0);
this.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
this.set_pivot_point(1.0, 0.0);
this.translation_x = -this.width;
} else {
this._corner.set_position(0, 0);
}
@ -1229,8 +1228,9 @@ class HotCorner extends Clutter.Actor {
return;
if (Main.overview.shouldToggleByCornerOrButton()) {
this._ripples.playAnimation(this._x, this._y);
Main.overview.toggle();
if (Main.overview.animationInProgress)
this._ripples.playAnimation(this._x, this._y);
}
}

View File

@ -489,7 +489,10 @@ var Magnifier = class Magnifier {
_updateMouseSprite() {
this._updateSpriteTexture();
let [xHot, yHot] = this._cursorTracker.get_hot();
this._mouseSprite.set_anchor_point(xHot, yHot);
this._mouseSprite.set({
translation_x: -xHot,
translation_y: -yHot,
});
}
_updateSpriteTexture() {

View File

@ -3,10 +3,10 @@
ctrlAltTabManager, padOsdService, osdWindowManager,
osdMonitorLabeler, shellMountOpDBusService, shellDBusService,
shellAccessDialogDBusService, shellAudioSelectionDBusService,
screenSaverDBus, screencastService, uiGroup, magnifier,
xdndHandler, keyboard, kbdA11yDialog, introspectService,
start, pushModal, popModal, activateWindow, createLookingGlass,
initializeDeferredWork, getThemeStylesheet, setThemeStylesheet */
screenSaverDBus, uiGroup, magnifier, xdndHandler, keyboard,
kbdA11yDialog, introspectService, start, pushModal, popModal,
activateWindow, createLookingGlass, initializeDeferredWork,
getThemeStylesheet, setThemeStylesheet */
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
@ -34,7 +34,6 @@ const LoginManager = imports.misc.loginManager;
const LookingGlass = imports.ui.lookingGlass;
const NotificationDaemon = imports.ui.notificationDaemon;
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
const Screencast = imports.ui.screencast;
const ScreenShield = imports.ui.screenShield;
const Scripting = imports.ui.scripting;
const SessionMode = imports.ui.sessionMode;
@ -74,7 +73,6 @@ var shellAudioSelectionDBusService = null;
var shellDBusService = null;
var shellMountOpDBusService = null;
var screenSaverDBus = null;
var screencastService = null;
var modalCount = 0;
var actionMode = Shell.ActionMode.NONE;
var modalActorFocusStack = [];
@ -200,7 +198,6 @@ function _initializeUI() {
uiGroup = layoutManager.uiGroup;
padOsdService = new PadOsd.PadOsdService();
screencastService = new Screencast.ScreencastService();
xdndHandler = new XdndHandler.XdndHandler();
ctrlAltTabManager = new CtrlAltTab.CtrlAltTabManager();
osdWindowManager = new OsdWindow.OsdWindowManager();

View File

@ -4,7 +4,6 @@ const { Atk, Clutter, Gio, GLib,
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const Calendar = imports.ui.calendar;
const Util = imports.misc.util;
var MESSAGE_ANIMATION_TIME = 100;
@ -572,7 +571,6 @@ var MessageListSection = GObject.registerClass({
Main.sessionMode.disconnect(id);
});
this._date = new Date();
this._empty = true;
this._canClear = false;
this._sync();
@ -598,13 +596,6 @@ var MessageListSection = GObject.registerClass({
return true;
}
setDate(date) {
if (Calendar.sameDay(date, this._date))
return;
this._date = date;
this._sync();
}
addMessage(message, animate) {
this.addMessageAtIndex(message, -1, animate);
}

View File

@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported NotificationPolicy, NotificationGenericPolicy,
NotificationApplicationPolicy, Source, SourceActor, SourceActorWithLabel,
NotificationApplicationPolicy, Source, SourceActor,
SystemNotificationSource, MessageTray */
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
@ -655,77 +655,6 @@ class SourceActor extends St.Widget {
}
});
var SourceActorWithLabel = GObject.registerClass(
class SourceActorWithLabel extends SourceActor {
_init(source, size) {
super._init(source, size);
this._counterLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER,
x_expand: true,
y_align: Clutter.ActorAlign.CENTER,
y_expand: true });
this._counterBin = new St.Bin({ style_class: 'summary-source-counter',
child: this._counterLabel,
layout_manager: new Clutter.BinLayout() });
this._counterBin.hide();
this._counterBin.connect('style-changed', () => {
let themeNode = this._counterBin.get_theme_node();
this._counterBin.translation_x = themeNode.get_length('-shell-counter-overlap-x');
this._counterBin.translation_y = themeNode.get_length('-shell-counter-overlap-y');
});
this.add_actor(this._counterBin);
this._countUpdatedId = this._source.connect('notify::count', this._updateCount.bind(this));
this._updateCount();
this.connect('destroy', () => {
this._source.disconnect(this._countUpdatedId);
});
}
vfunc_allocate(box) {
super.vfunc_allocate(box);
let childBox = new Clutter.ActorBox();
let [, , naturalWidth, naturalHeight] = this._counterBin.get_preferred_size();
let direction = this.get_text_direction();
if (direction == Clutter.TextDirection.LTR) {
// allocate on the right in LTR
childBox.x1 = box.x2 - naturalWidth;
childBox.x2 = box.x2;
} else {
// allocate on the left in RTL
childBox.x1 = 0;
childBox.x2 = naturalWidth;
}
childBox.y1 = box.y2 - naturalHeight;
childBox.y2 = box.y2;
this._counterBin.allocate(childBox);
}
_updateCount() {
if (this._actorDestroyed)
return;
this._counterBin.visible = this._source.countVisible;
let text;
if (this._source.count < 100)
text = this._source.count.toString();
else
text = String.fromCharCode(0x22EF); // midline horizontal ellipsis
this._counterLabel.set_text(text);
}
});
var Source = GObject.registerClass({
Properties: {
'count': GObject.ParamSpec.int(

View File

@ -2,7 +2,6 @@
const { Gio, GObject, Shell, St } = imports.gi;
const Signals = imports.signals;
const Calendar = imports.ui.calendar;
const Main = imports.ui.main;
const MessageList = imports.ui.messageList;
@ -252,10 +251,6 @@ class MediaSection extends MessageList.MessageListSection {
this._onProxyReady.bind(this));
}
_shouldShow() {
return !this.empty && Calendar.isToday(this._date);
}
get allowed() {
return !Main.sessionMode.isGreeter;
}

View File

@ -4,6 +4,10 @@
const { Clutter, GLib, GObject, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
// Time for initial animation going into Overview mode;
// this is defined here to make it available in imports.
var ANIMATION_TIME = 250;
const Background = imports.ui.background;
const DND = imports.ui.dnd;
const LayoutManager = imports.ui.layout;
@ -14,9 +18,6 @@ const OverviewControls = imports.ui.overviewControls;
const Params = imports.misc.params;
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
// Time for initial animation going into Overview mode
var ANIMATION_TIME = 250;
// Must be less than ANIMATION_TIME, since we switch to
// or from the overview completely after ANIMATION_TIME,
// and don't want the shading animation to get cut off
@ -244,11 +245,11 @@ var Overview = class {
_unshadeBackgrounds() {
let backgrounds = this._backgroundGroup.get_children();
for (let i = 0; i < backgrounds.length; i++) {
backgrounds[i].ease_property('brightness', 1.0, {
backgrounds[i].ease_property('@content.brightness', 1.0, {
duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
backgrounds[i].ease_property('vignette-sharpness', 0.0, {
backgrounds[i].ease_property('@content.vignette-sharpness', 0.0, {
duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
@ -258,14 +259,16 @@ var Overview = class {
_shadeBackgrounds() {
let backgrounds = this._backgroundGroup.get_children();
for (let i = 0; i < backgrounds.length; i++) {
backgrounds[i].ease_property('brightness', Lightbox.VIGNETTE_BRIGHTNESS, {
duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
backgrounds[i].ease_property('vignette-sharpness', Lightbox.VIGNETTE_SHARPNESS, {
duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
backgrounds[i].ease_property('@content.brightness',
Lightbox.VIGNETTE_BRIGHTNESS, {
duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
backgrounds[i].ease_property('@content.vignette-sharpness',
Lightbox.VIGNETTE_SHARPNESS, {
duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
@ -437,19 +440,19 @@ var Overview = class {
this.emit('windows-restacked', stackIndices);
}
beginItemDrag(_source) {
this.emit('item-drag-begin');
beginItemDrag(source) {
this.emit('item-drag-begin', source);
this._inItemDrag = true;
}
cancelledItemDrag(_source) {
this.emit('item-drag-cancelled');
cancelledItemDrag(source) {
this.emit('item-drag-cancelled', source);
}
endItemDrag(_source) {
endItemDrag(source) {
if (!this._inItemDrag)
return;
this.emit('item-drag-end');
this.emit('item-drag-end', source);
this._inItemDrag = false;
}
@ -575,7 +578,7 @@ var Overview = class {
this._activationTime = GLib.get_monotonic_time() / GLib.USEC_PER_SEC;
Meta.disable_unredirect_for_display(global.display);
this.viewSelector.show();
this.viewSelector.animateToOverview();
this._overview.opacity = 0;
this._overview.ease({

View File

@ -8,8 +8,9 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
const ViewSelector = imports.ui.viewSelector;
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
const Overview = imports.ui.overview;
var SIDE_CONTROLS_ANIMATION_TIME = 160;
var SIDE_CONTROLS_ANIMATION_TIME = Overview.ANIMATION_TIME;
function getRtlSlideDirection(direction, actor) {
let rtl = actor.text_direction == Clutter.TextDirection.RTL;
@ -422,6 +423,7 @@ class ControlsManager extends St.Widget {
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
this._workspaceAdjustment = new St.Adjustment({
actor: this,
value: activeWorkspaceIndex,
lower: 0,
page_increment: 1,
@ -453,8 +455,6 @@ class ControlsManager extends St.Widget {
this._group.add_child(this.viewSelector);
this._group.add_actor(this._thumbnailsSlider);
layout.connect('allocation-changed', this._updateWorkspacesGeometry.bind(this));
Main.overview.connect('showing', this._updateSpacerVisibility.bind(this));
this.connect('destroy', this._onDestroy.bind(this));
@ -477,26 +477,6 @@ class ControlsManager extends St.Widget {
this._workspaceAdjustment.value = activeIndex;
}
_updateWorkspacesGeometry() {
let [x, y] = this.get_transformed_position();
let [width, height] = this.get_transformed_size();
let geometry = { x, y, width, height };
let spacing = this.get_theme_node().get_length('spacing');
let dashWidth = this._dashSlider.getVisibleWidth() + spacing;
let thumbnailsWidth = this._thumbnailsSlider.getNonExpandedWidth() + spacing;
geometry.width -= dashWidth;
geometry.width -= thumbnailsWidth;
if (this.get_text_direction() == Clutter.TextDirection.LTR)
geometry.x += dashWidth;
else
geometry.x += thumbnailsWidth;
this.viewSelector.setWorkspacesFullGeometry(geometry);
}
_setVisibility() {
// Ignore the case when we're leaving the overview, since
// actors will be made visible again when entering the overview

View File

@ -120,6 +120,10 @@ var PageIndicators = GObject.registerClass({
for (let i = 0; i < children.length; i++)
this._updateIndicator(children[i], i);
}
get nPages() {
return this._nPages;
}
});
var AnimatedPageIndicators = GObject.registerClass(

View File

@ -675,7 +675,7 @@ class PanelCorner extends St.DrawingArea {
let borderWidth = node.get_length('-panel-corner-border-width');
this.set_size(cornerRadius, borderWidth + cornerRadius);
this.set_anchor_point(0, borderWidth);
this.translation_y = -borderWidth;
}
});
@ -736,13 +736,11 @@ class AggregateMenu extends PanelMenu.Button {
this._volume = new imports.ui.status.volume.Indicator();
this._brightness = new imports.ui.status.brightness.Indicator();
this._system = new imports.ui.status.system.Indicator();
this._screencast = new imports.ui.status.screencast.Indicator();
this._location = new imports.ui.status.location.Indicator();
this._nightLight = new imports.ui.status.nightLight.Indicator();
this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
this._indicators.add_child(this._thunderbolt);
this._indicators.add_child(this._screencast);
this._indicators.add_child(this._location);
this._indicators.add_child(this._nightLight);
if (this._network)

View File

@ -183,10 +183,9 @@ var Button = GObject.registerClass({
}
_onDestroy() {
super._onDestroy();
if (this.menu)
this.menu.destroy();
super._onDestroy();
}
});

View File

@ -881,9 +881,10 @@ var PopupMenu = class extends PopupMenuBase {
let state = event.get_state();
// if user has a modifier down (except capslock)
// if user has a modifier down (except capslock and numlock)
// then don't handle the key press here
state &= ~Clutter.ModifierType.LOCK_MASK;
state &= ~Clutter.ModifierType.MOD2_MASK;
state &= Clutter.ModifierType.MODIFIER_MASK;
if (state)
@ -1324,7 +1325,7 @@ var PopupMenuManager = class {
removeMenu(menu) {
if (menu == this.activeMenu)
this._closeMenu(false, menu);
this._grabHelper.ungrab({ actor: menu.actor });
let position = this._findMenu(menu);
if (position == -1) // not a menu we manage

View File

@ -1,146 +0,0 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Gio, GLib, Shell } = imports.gi;
const Signals = imports.signals;
const Main = imports.ui.main;
const { loadInterfaceXML } = imports.misc.fileUtils;
const ScreencastIface = loadInterfaceXML('org.gnome.Shell.Screencast');
var ScreencastService = class {
constructor() {
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(ScreencastIface, this);
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell/Screencast');
Gio.DBus.session.own_name('org.gnome.Shell.Screencast', Gio.BusNameOwnerFlags.REPLACE, null, null);
this._recorders = new Map();
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
}
get isRecording() {
return this._recorders.size > 0;
}
_ensureRecorderForSender(sender) {
let recorder = this._recorders.get(sender);
if (!recorder) {
recorder = new Shell.Recorder({ stage: global.stage,
display: global.display });
recorder._watchNameId =
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
this._onNameVanished.bind(this));
this._recorders.set(sender, recorder);
this.emit('updated');
}
return recorder;
}
_sessionUpdated() {
if (Main.sessionMode.allowScreencast)
return;
for (let sender of this._recorders.keys())
this._stopRecordingForSender(sender);
}
_onNameVanished(connection, name) {
this._stopRecordingForSender(name);
}
_stopRecordingForSender(sender) {
let recorder = this._recorders.get(sender);
if (!recorder)
return false;
Gio.bus_unwatch_name(recorder._watchNameId);
recorder.close();
this._recorders.delete(sender);
this.emit('updated');
return true;
}
_applyOptionalParameters(recorder, options) {
for (let option in options)
options[option] = options[option].deep_unpack();
if (options['pipeline'])
recorder.set_pipeline(options['pipeline']);
if (options['framerate'])
recorder.set_framerate(options['framerate']);
if ('draw-cursor' in options)
recorder.set_draw_cursor(options['draw-cursor']);
}
ScreencastAsync(params, invocation) {
let returnValue = [false, ''];
if (!Main.sessionMode.allowScreencast ||
this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
let sender = invocation.get_sender();
let recorder = this._ensureRecorderForSender(sender);
if (!recorder.is_recording()) {
let [fileTemplate, options] = params;
recorder.set_file_template(fileTemplate);
this._applyOptionalParameters(recorder, options);
let [success, fileName] = recorder.record();
returnValue = [success, fileName ? fileName : ''];
if (!success)
this._stopRecordingForSender(sender);
}
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
ScreencastAreaAsync(params, invocation) {
let returnValue = [false, ''];
if (!Main.sessionMode.allowScreencast ||
this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
return;
}
let sender = invocation.get_sender();
let recorder = this._ensureRecorderForSender(sender);
if (!recorder.is_recording()) {
let [x, y, width, height, fileTemplate, options] = params;
if (x < 0 || y < 0 ||
width <= 0 || height <= 0 ||
x + width > global.screen_width ||
y + height > global.screen_height) {
invocation.return_error_literal(Gio.IOErrorEnum,
Gio.IOErrorEnum.CANCELLED,
"Invalid params");
return;
}
recorder.set_file_template(fileTemplate);
recorder.set_area(x, y, width, height);
this._applyOptionalParameters(recorder, options);
let [success, fileName] = recorder.record();
returnValue = [success, fileName ? fileName : ''];
if (!success)
this._stopRecordingForSender(sender);
}
invocation.return_value(GLib.Variant.new('(bs)', returnValue));
}
StopScreencastAsync(params, invocation) {
let success = this._stopRecordingForSender(invocation.get_sender());
invocation.return_value(GLib.Variant.new('(b)', [success]));
}
};
Signals.addSignalMethods(ScreencastService.prototype);

View File

@ -225,10 +225,6 @@ class Indicator extends PanelMenu.SystemIndicator {
}
});
function clamp(value, min, max) {
return Math.max(min, Math.min(max, value));
}
var AppAuthorizer = class {
constructor(desktopId, reqAccuracyLevel, permStoreProxy, maxAccuracyLevel) {
this.desktopId = desktopId;
@ -313,9 +309,8 @@ var AppAuthorizer = class {
_completeAuth() {
if (this._accuracyLevel != GeoclueAccuracyLevel.NONE) {
this._accuracyLevel = clamp(this._accuracyLevel,
0,
this._maxAccuracyLevel);
this._accuracyLevel = Math.clamp(this._accuracyLevel,
0, this._maxAccuracyLevel);
}
this._saveToPermissionStore();

View File

@ -24,7 +24,8 @@ class RemoteAccessApplet extends PanelMenu.SystemIndicator {
return;
this._handles = new Set();
this._indicator = null;
this._sharedIndicator = null;
this._recordingIndicator = null;
this._menuSection = null;
controller.connect('new-handle', (o, handle) => {
@ -33,32 +34,49 @@ class RemoteAccessApplet extends PanelMenu.SystemIndicator {
}
_ensureControls() {
if (this._indicator)
if (this._sharedIndicator && this._recordingIndicator)
return;
this._indicator = this._addIndicator();
this._indicator.icon_name = 'screen-shared-symbolic';
this._indicator.add_style_class_name('remote-access-indicator');
this._item =
this._sharedIndicator = this._addIndicator();
this._sharedIndicator.icon_name = 'screen-shared-symbolic';
this._sharedIndicator.add_style_class_name('remote-access-indicator');
this._sharedItem =
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);
this._sharedItem.menu.addAction(_("Turn off"),
() => {
for (let handle of this._handles) {
if (!handle.is_recording)
handle.stop();
}
});
this._sharedItem.icon.icon_name = 'screen-shared-symbolic';
this.menu.addMenuItem(this._sharedItem);
this._recordingIndicator = this._addIndicator();
this._recordingIndicator.icon_name = 'media-record-symbolic';
this._recordingIndicator.add_style_class_name('screencast-indicator');
}
_isScreenShared() {
return [...this._handles].some(handle => !handle.is_recording);
}
_isRecording() {
return [...this._handles].some(handle => handle.is_recording);
}
_sync() {
if (this._handles.size == 0) {
this._indicator.visible = false;
this._item.visible = false;
if (this._isScreenShared()) {
this._sharedIndicator.visible = true;
this._sharedItem.visible = true;
} else {
this._indicator.visible = true;
this._item.visible = true;
this._sharedIndicator.visible = false;
this._sharedItem.visible = false;
}
this._recordingIndicator.visible = this._isRecording();
}
_onStopped(handle) {
@ -70,9 +88,7 @@ class RemoteAccessApplet extends PanelMenu.SystemIndicator {
this._handles.add(handle);
handle.connect('stopped', this._onStopped.bind(this));
if (this._handles.size == 1) {
this._ensureControls();
this._sync();
}
this._ensureControls();
this._sync();
}
});

View File

@ -1,25 +0,0 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported Indicator */
const GObject = imports.gi.GObject;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
var Indicator = GObject.registerClass(
class Indicator extends PanelMenu.SystemIndicator {
_init() {
super._init();
this._indicator = this._addIndicator();
this._indicator.icon_name = 'media-record-symbolic';
this._indicator.add_style_class_name('screencast-indicator');
this._sync();
Main.screencastService.connect('updated', this._sync.bind(this));
}
_sync() {
this._indicator.visible = Main.screencastService.isRecording;
}
});

View File

@ -62,6 +62,7 @@ var StreamSlider = class {
this._stream = null;
this._volumeCancellable = null;
this._icons = [];
}
get stream() {
@ -182,24 +183,15 @@ var StreamSlider = class {
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;
} else {
n = Math.ceil(3 * volume / this._control.get_vol_max_norm());
if (n < 1)
n = 1;
else if (n > 3)
n = 4;
n = Math.clamp(n, 1, this._icons.length - 1);
}
return icons[n];
return this._icons[n];
}
getLevel() {
@ -223,6 +215,13 @@ var OutputStreamSlider = class extends StreamSlider {
constructor(control) {
super(control);
this._slider.accessible_name = _("Volume");
this._icons = [
'audio-volume-muted-symbolic',
'audio-volume-low-symbolic',
'audio-volume-medium-symbolic',
'audio-volume-high-symbolic',
'audio-volume-overamplified-symbolic',
];
}
_connectStream(stream) {
@ -274,6 +273,12 @@ var InputStreamSlider = class extends StreamSlider {
this._control.connect('stream-added', this._maybeShowInput.bind(this));
this._control.connect('stream-removed', this._maybeShowInput.bind(this));
this._icon.icon_name = 'audio-input-microphone-symbolic';
this._icons = [
'microphone-sensitivity-muted-symbolic',
'microphone-sensitivity-low-symbolic',
'microphone-sensitivity-medium-symbolic',
'microphone-sensitivity-high-symbolic',
];
}
_connectStream(stream) {
@ -319,7 +324,7 @@ var VolumeMenu = class extends PopupMenu.PopupMenuSection {
this._output = new OutputStreamSlider(this._control);
this._output.connect('stream-updated', () => {
this.emit('icon-changed');
this.emit('output-icon-changed');
});
this.addMenuItem(this._output.item);
@ -327,6 +332,9 @@ var VolumeMenu = class extends PopupMenu.PopupMenuSection {
this._input.item.connect('notify::visible', () => {
this.emit('input-visible-changed');
});
this._input.connect('stream-updated', () => {
this.emit('input-icon-changed');
});
this.addMenuItem(this._input.item);
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
@ -343,7 +351,7 @@ var VolumeMenu = class extends PopupMenu.PopupMenuSection {
this._readInput();
this._readOutput();
} else {
this.emit('icon-changed');
this.emit('output-icon-changed');
}
}
@ -355,10 +363,14 @@ var VolumeMenu = class extends PopupMenu.PopupMenuSection {
this._input.stream = this._control.get_default_source();
}
getIcon() {
getOutputIcon() {
return this._output.getIcon();
}
getInputIcon() {
return this._input.getIcon();
}
getLevel() {
return this._output.getLevel();
}
@ -382,21 +394,24 @@ class Indicator extends PanelMenu.SystemIndicator {
this._control = getMixerControl();
this._volumeMenu = new VolumeMenu(this._control);
this._volumeMenu.connect('icon-changed', () => {
let icon = this._volumeMenu.getIcon();
this._volumeMenu.connect('output-icon-changed', () => {
let icon = this._volumeMenu.getOutputIcon();
if (icon != null)
this._primaryIndicator.icon_name = icon;
this._primaryIndicator.visible = icon !== null;
});
this._inputIndicator.set({
icon_name: 'audio-input-microphone-symbolic',
visible: this._volumeMenu.getInputVisible(),
});
this._inputIndicator.visible = this._volumeMenu.getInputVisible();
this._volumeMenu.connect('input-visible-changed', () => {
this._inputIndicator.visible = this._volumeMenu.getInputVisible();
});
this._volumeMenu.connect('input-icon-changed', () => {
let icon = this._volumeMenu.getInputIcon();
if (icon !== null)
this._inputIndicator.icon_name = icon;
});
this.menu.addMenuItem(this._volumeMenu);
}
@ -406,7 +421,7 @@ class Indicator extends PanelMenu.SystemIndicator {
if (result == Clutter.EVENT_PROPAGATE || this.menu.actor.mapped)
return result;
let gicon = new Gio.ThemedIcon({ name: this._volumeMenu.getIcon() });
let gicon = new Gio.ThemedIcon({ name: this._volumeMenu.getOutputIcon() });
let level = this._volumeMenu.getLevel();
let maxLevel = this._volumeMenu.getMaxLevel();
Main.osdWindowManager.show(-1, gicon, null, level, maxLevel);

View File

@ -28,10 +28,6 @@ const State = {
SCROLLING: 1,
};
function clamp(value, min, max) {
return Math.max(min, Math.min(max, value));
}
const TouchpadSwipeGesture = GObject.registerClass({
Properties: {
'enabled': GObject.ParamSpec.boolean(
@ -558,8 +554,8 @@ var SwipeTracker = GObject.registerClass({
let firstPoint = this._snapPoints[0];
let lastPoint = this._snapPoints[this._snapPoints.length - 1];
this._progress = clamp(this._progress, firstPoint, lastPoint);
this._progress = clamp(this._progress,
this._progress = Math.clamp(this._progress, firstPoint, lastPoint);
this._progress = Math.clamp(this._progress,
this._initialProgress - 1, this._initialProgress + 1);
this.emit('update', this._progress);
@ -606,7 +602,7 @@ var SwipeTracker = GObject.registerClass({
let duration = Math.abs((this._progress - endProgress) / velocity * DURATION_MULTIPLIER);
if (duration > 0) {
duration = clamp(duration,
duration = Math.clamp(duration,
MIN_ANIMATION_DURATION, MAX_ANIMATION_DURATION);
}

View File

@ -485,6 +485,7 @@ var UnlockDialog = GObject.registerClass({
this._gdmClient = new Gdm.Client();
this._adjustment = new St.Adjustment({
actor: this,
lower: 0,
upper: 2,
page_size: 1,
@ -524,6 +525,10 @@ var UnlockDialog = GObject.registerClass({
this._bgManagers = [];
const themeContext = St.ThemeContext.get_for_stage(global.stage);
this._scaleChangedId = themeContext.connect('notify::scale-factor',
() => this._updateBackgroundEffects());
this._updateBackgrounds();
this._monitorsChangedId =
Main.layoutManager.connect('monitors-changed', this._updateBackgrounds.bind(this));
@ -566,9 +571,15 @@ var UnlockDialog = GObject.registerClass({
this._otherUserButton.set_pivot_point(0.5, 0.5);
this._otherUserButton.connect('clicked', this._otherUserClicked.bind(this));
let screenSaverSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.screensaver' });
screenSaverSettings.bind('user-switch-enabled',
this._otherUserButton, 'visible', Gio.SettingsBindFlags.GET);
this._screenSaverSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.screensaver' });
this._userSwitchEnabledId = this._screenSaverSettings.connect('changed::user-switch-enabled',
this._updateUserSwitchVisibility.bind(this));
this._userLoadedId = this._user.connect('notify::is-loaded',
this._updateUserSwitchVisibility.bind(this));
this._updateUserSwitchVisibility();
// Main Box
let mainBox = new St.Widget();
@ -618,6 +629,7 @@ var UnlockDialog = GObject.registerClass({
y: monitor.y,
width: monitor.width,
height: monitor.height,
effect: new Shell.BlurEffect({ name: 'blur' }),
});
let bgManager = new Background.BackgroundManager({
@ -629,19 +641,17 @@ var UnlockDialog = GObject.registerClass({
this._bgManagers.push(bgManager);
this._backgroundGroup.add_child(widget);
}
_updateBackgroundEffects() {
const themeContext = St.ThemeContext.get_for_stage(global.stage);
let effect = new Shell.BlurEffect({
brightness: BLUR_BRIGHTNESS,
sigma: BLUR_SIGMA * themeContext.scale_factor,
});
this._scaleChangedId = themeContext.connect('notify::scale-factor', () => {
effect.sigma = BLUR_SIGMA * themeContext.scale_factor;
});
widget.add_effect(effect);
for (const widget of this._backgroundGroup) {
widget.get_effect('blur').set({
brightness: BLUR_BRIGHTNESS,
sigma: BLUR_SIGMA * themeContext.scale_factor,
});
}
}
_updateBackgrounds() {
@ -653,6 +663,7 @@ var UnlockDialog = GObject.registerClass({
for (let i = 0; i < Main.layoutManager.monitors.length; i++)
this._createBackground(i);
this._updateBackgroundEffects();
}
_ensureAuthPrompt() {
@ -828,6 +839,21 @@ var UnlockDialog = GObject.registerClass({
this._gdmClient = null;
delete this._gdmClient;
}
if (this._userLoadedId) {
this._user.disconnect(this._userLoadedId);
this._userLoadedId = 0;
}
if (this._userSwitchEnabledId) {
this._screenSaverSettings.disconnect(this._userSwitchEnabledId);
this._userSwitchEnabledId = 0;
}
}
_updateUserSwitchVisibility() {
this._otherUserButton.visible = this._userManager.can_switch() &&
this._screenSaverSettings.get_boolean('user-switch-enabled');
}
cancel() {

View File

@ -132,6 +132,7 @@ var ViewSelector = GObject.registerClass({
super._init({
name: 'viewSelector',
x_expand: true,
visible: false,
});
this._showAppsButton = showAppsButton;
@ -271,9 +272,10 @@ var ViewSelector = GObject.registerClass({
Main.overview.show();
}
show() {
animateToOverview() {
this.show();
this.reset();
this._workspacesDisplay.show(this._showAppsButton.checked);
this._workspacesDisplay.animateToOverview(this._showAppsButton.checked);
this._activePage = null;
if (this._showAppsButton.checked)
this._showPage(this._appsPage);
@ -297,13 +299,11 @@ var ViewSelector = GObject.registerClass({
Main.overview.fadeInDesktop();
}
setWorkspacesFullGeometry(geom) {
this._workspacesDisplay.setWorkspacesFullGeometry(geom);
}
hide() {
vfunc_hide() {
this.reset();
this._workspacesDisplay.hide();
super.vfunc_hide();
}
_addPage(actor, name, a11yIcon, params) {

View File

@ -42,6 +42,11 @@ const GsdWacomProxy = Gio.DBusProxy.makeProxyWrapper(GsdWacomIface);
const WINDOW_DIMMER_EFFECT_NAME = "gnome-shell-window-dimmer";
Gio._promisify(Shell,
'util_start_systemd_unit', 'util_start_systemd_unit_finish');
Gio._promisify(Shell,
'util_stop_systemd_unit', 'util_stop_systemd_unit_finish');
var DisplayChangeDialog = GObject.registerClass(
class DisplayChangeDialog extends ModalDialog.ModalDialog {
_init(wm) {
@ -901,46 +906,23 @@ var WindowManager = class {
global.display.connect('init-xserver', (display, task) => {
IBusManager.getIBusManager().restartDaemon(['--xim']);
try {
if (!Shell.util_start_systemd_unit('gsd-xsettings.target', 'fail'))
log('Not starting gsd-xsettings; waiting for gnome-session to do so');
/* Timeout waiting for start job completion after 5 seconds */
let cancellable = new Gio.Cancellable();
GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 5, () => {
cancellable.cancel();
return GLib.SOURCE_REMOVE;
});
/* Leave this watchdog timeout so don't block indefinitely here */
let timeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 5, () => {
Gio.DBus.session.unwatch_name(watchId);
log('Warning: Failed to start gsd-xsettings');
task.return_boolean(true);
timeoutId = 0;
return GLib.SOURCE_REMOVE;
});
/* When gsd-xsettings daemon is started, we are good to resume */
let watchId = Gio.DBus.session.watch_name(
'org.gnome.SettingsDaemon.XSettings',
Gio.BusNameWatcherFlags.NONE,
() => {
Gio.DBus.session.unwatch_name(watchId);
if (timeoutId > 0) {
task.return_boolean(true);
GLib.source_remove(timeoutId);
}
},
null);
} catch (e) {
log('Error starting gsd-xsettings: %s'.format(e.message));
task.return_boolean(true);
}
this._startX11Services(task, cancellable);
return true;
});
global.display.connect('x11-display-closing', () => {
if (!Meta.is_wayland_compositor())
return;
try {
Shell.util_stop_systemd_unit('gsd-xsettings.target', 'fail');
} catch (e) {
log('Error stopping gsd-xsettings: %s'.format(e.message));
}
this._stopX11Services(null);
IBusManager.getIBusManager().restartDaemon();
});
@ -1008,6 +990,36 @@ var WindowManager = class {
global.stage.add_action(topDragAction);
}
async _startX11Services(task, cancellable) {
try {
await Shell.util_start_systemd_unit(
'gnome-session-x11-services-ready.target', 'fail', cancellable);
} catch (e) {
// Ignore NOT_SUPPORTED error, which indicates we are not systemd
// managed and gnome-session will have taken care of everything
// already.
// Note that we do log cancellation from here.
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_SUPPORTED))
log('Error starting X11 services: %s'.format(e.message));
} finally {
task.return_boolean(true);
}
}
async _stopX11Services(cancellable) {
try {
await Shell.util_stop_systemd_unit(
'gnome-session-x11-services.target', 'fail', cancellable);
} catch (e) {
// Ignore NOT_SUPPORTED error, which indicates we are not systemd
// managed and gnome-session will have taken care of everything
// already.
// Note that we do log cancellation from here.
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_SUPPORTED))
log('Error stopping X11 services: %s'.format(e.message));
}
}
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
this._currentPadOsd = new PadOsd.PadOsd(device, settings, imagePath, editionMode, monitorIndex);
this._currentPadOsd.connect('closed', () => (this._currentPadOsd = null));
@ -1278,13 +1290,13 @@ var WindowManager = class {
}
_sizeChangeWindow(shellwm, actor, whichChange, oldFrameRect, _oldBufferRect) {
let types = [Meta.WindowType.NORMAL];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_size_change(actor);
return;
}
const types = [Meta.WindowType.NORMAL];
const shouldAnimate =
this._shouldAnimateActor(actor, types) &&
oldFrameRect.width > 0 &&
oldFrameRect.height > 0;
if (oldFrameRect.width > 0 && oldFrameRect.height > 0)
if (shouldAnimate)
this._prepareAnimationInfo(shellwm, actor, oldFrameRect, whichChange);
else
shellwm.completed_size_change(actor);
@ -1299,17 +1311,24 @@ var WindowManager = class {
actorClone.set_position(oldFrameRect.x, oldFrameRect.y);
actorClone.set_size(oldFrameRect.width, oldFrameRect.height);
if (this._clearAnimationInfo(actor))
actor.freeze();
if (this._clearAnimationInfo(actor)) {
log('Old animationInfo removed from actor %s'.format(actor));
this._shellwm.completed_size_change(actor);
}
let destroyId = actor.connect('destroy', () => {
this._clearAnimationInfo(actor);
});
this._resizePending.add(actor);
actor.__animationInfo = { clone: actorClone,
oldRect: oldFrameRect,
destroyId };
actor.__animationInfo = {
clone: actorClone,
oldRect: oldFrameRect,
frozen: true,
destroyId,
};
}
_sizeChangedWindow(shellwm, actor) {
@ -1362,13 +1381,17 @@ var WindowManager = class {
// Now unfreeze actor updates, to get it to the new size.
// It's important that we don't wait until the animation is completed to
// do this, otherwise our scale will be applied to the old texture size.
shellwm.completed_size_change(actor);
actor.thaw();
actor.__animationInfo.frozen = false;
}
_clearAnimationInfo(actor) {
if (actor.__animationInfo) {
actor.__animationInfo.clone.destroy();
actor.disconnect(actor.__animationInfo.destroyId);
if (actor.__animationInfo.frozen)
actor.thaw();
delete actor.__animationInfo;
return true;
}
@ -1383,10 +1406,13 @@ var WindowManager = class {
actor.translation_x = 0;
actor.translation_y = 0;
this._clearAnimationInfo(actor);
this._shellwm.completed_size_change(actor);
}
if (this._resizePending.delete(actor))
if (this._resizePending.delete(actor)) {
this._clearAnimationInfo(actor);
this._shellwm.completed_size_change(actor);
}
}
_hasAttachedDialogs(window, ignoreWindow) {
@ -1786,8 +1812,7 @@ var WindowManager = class {
w.window.get_parent().remove_child(w.window);
w.parent.add_child(w.window);
if (w.window.get_meta_window().get_workspace() !=
global.workspace_manager.get_active_workspace())
if (!w.window.get_meta_window().get_workspace().active)
w.window.hide();
}
switchData.container.destroy();
@ -1971,7 +1996,7 @@ var WindowManager = class {
duration,
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
onComplete: () => {
if (newWs !== activeWorkspace)
if (!newWs.active)
this.actionMoveWorkspace(newWs);
this._finishWorkspaceSwitch(switchData);
},
@ -2101,8 +2126,16 @@ var WindowManager = class {
newWs = workspaceManager.get_workspace_by_index(workspaceManager.n_workspaces - 1);
} else if (isNaN(target)) {
// Prepend a new workspace dynamically
if (workspaceManager.get_active_workspace_index() == 0 &&
action == 'move' && target == 'up' && this._isWorkspacePrepended == false) {
let prependTarget;
if (vertical)
prependTarget = 'up';
else if (rtl)
prependTarget = 'right';
else
prependTarget = 'left';
if (workspaceManager.get_active_workspace_index() === 0 &&
action === 'move' && target === prependTarget &&
this._isWorkspacePrepended === false) {
this.insertWorkspace(0);
this._isWorkspacePrepended = true;
}
@ -2163,10 +2196,7 @@ var WindowManager = class {
if (!Main.sessionMode.hasWorkspaces)
return;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
if (activeWorkspace != workspace)
if (!workspace.active)
workspace.activate(global.get_current_time());
}
@ -2174,10 +2204,7 @@ var WindowManager = class {
if (!Main.sessionMode.hasWorkspaces)
return;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
if (activeWorkspace != workspace) {
if (!workspace.active) {
// This won't have any effect for "always sticky" windows
// (like desktop windows or docks)

771
js/ui/windowPreview.js Normal file
View File

@ -0,0 +1,771 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported WindowPreview */
const { Atk, Clutter, GLib, GObject,
Graphene, Meta, Pango, Shell, St } = imports.gi;
const DND = imports.ui.dnd;
var WINDOW_DND_SIZE = 256;
var WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT = 750;
var WINDOW_OVERLAY_FADE_TIME = 200;
var DRAGGING_WINDOW_OPACITY = 100;
var WindowPreviewLayout = GObject.registerClass({
Properties: {
'bounding-box': GObject.ParamSpec.boxed(
'bounding-box', 'Bounding box', 'Bounding box',
GObject.ParamFlags.READABLE,
Clutter.ActorBox.$gtype),
},
}, class WindowPreviewLayout extends Clutter.LayoutManager {
_init() {
super._init();
this._container = null;
this._boundingBox = new Clutter.ActorBox();
this._windows = new Map();
}
_layoutChanged() {
let frameRect;
for (const windowInfo of this._windows.values()) {
const frame = windowInfo.metaWindow.get_frame_rect();
frameRect = frameRect ? frameRect.union(frame) : frame;
}
if (!frameRect)
frameRect = new Meta.Rectangle();
const oldBox = this._boundingBox.copy();
this._boundingBox.set_origin(frameRect.x, frameRect.y);
this._boundingBox.set_size(frameRect.width, frameRect.height);
if (!this._boundingBox.equal(oldBox))
this.notify('bounding-box');
// Always call layout_changed(), a size or position change of an
// attached dialog might not affect the boundingBox
this.layout_changed();
}
vfunc_set_container(container) {
this._container = container;
}
vfunc_get_preferred_height(_container, _forWidth) {
return [0, this._boundingBox.get_height()];
}
vfunc_get_preferred_width(_container, _forHeight) {
return [0, this._boundingBox.get_width()];
}
vfunc_allocate(container, box) {
// If the scale isn't 1, we weren't allocated our preferred size
// and have to scale the children allocations accordingly.
const scaleX = this._boundingBox.get_width() > 0
? box.get_width() / this._boundingBox.get_width()
: 1;
const scaleY = this._boundingBox.get_height() > 0
? box.get_height() / this._boundingBox.get_height()
: 1;
const childBox = new Clutter.ActorBox();
for (const child of container) {
if (!child.visible)
continue;
const windowInfo = this._windows.get(child);
if (windowInfo) {
const bufferRect = windowInfo.metaWindow.get_buffer_rect();
childBox.set_origin(
bufferRect.x - this._boundingBox.x1,
bufferRect.y - this._boundingBox.y1);
const [, , natWidth, natHeight] = child.get_preferred_size();
childBox.set_size(natWidth, natHeight);
childBox.x1 *= scaleX;
childBox.x2 *= scaleX;
childBox.y1 *= scaleY;
childBox.y2 *= scaleY;
child.allocate(childBox);
} else {
child.allocate_preferred_size(0, 0);
}
}
}
/**
* addWindow:
* @param {Meta.Window} window: the MetaWindow instance
*
* Creates a ClutterActor drawing the texture of @window and adds it
* to the container. If @window is already part of the preview, this
* function will do nothing.
*
* @returns {Clutter.Actor} The newly created actor drawing @window
*/
addWindow(window) {
const index = [...this._windows.values()].findIndex(info =>
info.metaWindow === window);
if (index !== -1)
return null;
const windowActor = window.get_compositor_private();
const actor = new Clutter.Clone({ source: windowActor });
this._windows.set(actor, {
metaWindow: window,
windowActor,
sizeChangedId: window.connect('size-changed', () =>
this._layoutChanged()),
positionChangedId: window.connect('position-changed', () =>
this._layoutChanged()),
windowActorDestroyId: windowActor.connect('destroy', () =>
actor.destroy()),
destroyId: actor.connect('destroy', () =>
this.removeWindow(window)),
});
this._container.add_child(actor);
this._layoutChanged();
return actor;
}
/**
* removeWindow:
* @param {Meta.Window} window: the window to remove from the preview
*
* Removes a MetaWindow @window from the preview which has been added
* previously using addWindow(). If @window is not part of preview,
* this function will do nothing.
*/
removeWindow(window) {
const entry = [...this._windows].find(
([, i]) => i.metaWindow === window);
if (!entry)
return;
const [actor, windowInfo] = entry;
windowInfo.metaWindow.disconnect(windowInfo.sizeChangedId);
windowInfo.metaWindow.disconnect(windowInfo.positionChangedId);
windowInfo.windowActor.disconnect(windowInfo.windowActorDestroyId);
actor.disconnect(windowInfo.destroyId);
this._windows.delete(actor);
this._container.remove_child(actor);
this._layoutChanged();
}
/**
* getWindows:
*
* Gets an array of all MetaWindows that were added to the layout
* using addWindow(), ordered by the insertion order.
*
* @returns {Array} An array including all windows
*/
getWindows() {
return [...this._windows.values()].map(i => i.metaWindow);
}
// eslint-disable-next-line camelcase
get bounding_box() {
return this._boundingBox;
}
});
var WindowPreview = GObject.registerClass({
Properties: {
'overlay-enabled': GObject.ParamSpec.boolean(
'overlay-enabled', 'overlay-enabled', 'overlay-enabled',
GObject.ParamFlags.READWRITE,
true),
},
Signals: {
'drag-begin': {},
'drag-cancelled': {},
'drag-end': {},
'selected': { param_types: [GObject.TYPE_UINT] },
'show-chrome': {},
'size-changed': {},
},
}, class WindowPreview extends St.Widget {
_init(metaWindow, workspace) {
this.metaWindow = metaWindow;
this.metaWindow._delegate = this;
this._windowActor = metaWindow.get_compositor_private();
this._workspace = workspace;
super._init({
reactive: true,
can_focus: true,
accessible_role: Atk.Role.PUSH_BUTTON,
offscreen_redirect: Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY,
});
this._windowContainer = new Clutter.Actor();
// gjs currently can't handle setting an actors layout manager during
// the initialization of the actor if that layout manager keeps track
// of its container, so set the layout manager after creating the
// container
this._windowContainer.layout_manager = new WindowPreviewLayout();
this.add_child(this._windowContainer);
this._addWindow(metaWindow);
this._delegate = this;
this._stackAbove = null;
this._windowContainer.layout_manager.connect(
'notify::bounding-box', layout => {
// A bounding box of 0x0 means all windows were removed
if (layout.bounding_box.get_area() > 0)
this.emit('size-changed');
});
this._windowDestroyId =
this._windowActor.connect('destroy', () => this.destroy());
this._updateAttachedDialogs();
let clickAction = new Clutter.ClickAction();
clickAction.connect('clicked', () => this._activate());
clickAction.connect('long-press', this._onLongPress.bind(this));
this.add_action(clickAction);
this.connect('destroy', this._onDestroy.bind(this));
this._draggable = DND.makeDraggable(this,
{ restoreOnSuccess: true,
manualMode: true,
dragActorMaxSize: WINDOW_DND_SIZE,
dragActorOpacity: DRAGGING_WINDOW_OPACITY });
this._draggable.connect('drag-begin', this._onDragBegin.bind(this));
this._draggable.connect('drag-cancelled', this._onDragCancelled.bind(this));
this._draggable.connect('drag-end', this._onDragEnd.bind(this));
this.inDrag = false;
this._selected = false;
this._overlayEnabled = true;
this._closeRequested = false;
this._idleHideOverlayId = 0;
this._border = new St.Widget({
visible: false,
style_class: 'window-clone-border',
});
this._borderConstraint = new Clutter.BindConstraint({
source: this._windowContainer,
coordinate: Clutter.BindCoordinate.SIZE,
});
this._border.add_constraint(this._borderConstraint);
this._border.add_constraint(new Clutter.AlignConstraint({
source: this._windowContainer,
align_axis: Clutter.AlignAxis.BOTH,
factor: 0.5,
}));
this._borderCenter = new Clutter.Actor();
this._border.bind_property('visible', this._borderCenter, 'visible',
GObject.BindingFlags.SYNC_CREATE);
this._borderCenterConstraint = new Clutter.BindConstraint({
source: this._windowContainer,
coordinate: Clutter.BindCoordinate.SIZE,
});
this._borderCenter.add_constraint(this._borderCenterConstraint);
this._borderCenter.add_constraint(new Clutter.AlignConstraint({
source: this._windowContainer,
align_axis: Clutter.AlignAxis.BOTH,
factor: 0.5,
}));
this._border.connect('style-changed',
this._onBorderStyleChanged.bind(this));
this._title = new St.Label({
visible: false,
style_class: 'window-caption',
text: this._getCaption(),
reactive: true,
});
this._title.add_constraint(new Clutter.BindConstraint({
source: this._borderCenter,
coordinate: Clutter.BindCoordinate.POSITION,
}));
this._title.add_constraint(new Clutter.AlignConstraint({
source: this._borderCenter,
align_axis: Clutter.AlignAxis.X_AXIS,
factor: 0.5,
}));
this._title.add_constraint(new Clutter.AlignConstraint({
source: this._borderCenter,
align_axis: Clutter.AlignAxis.Y_AXIS,
pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
factor: 1,
}));
this._title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
this.label_actor = this._title;
this._updateCaptionId = this.metaWindow.connect('notify::title', () => {
this._title.text = this._getCaption();
});
const layout = Meta.prefs_get_button_layout();
this._closeButtonSide =
layout.left_buttons.includes(Meta.ButtonFunction.CLOSE)
? St.Side.LEFT : St.Side.RIGHT;
this._closeButton = new St.Button({
visible: false,
style_class: 'window-close',
child: new St.Icon({ icon_name: 'window-close-symbolic' }),
});
this._closeButton.add_constraint(new Clutter.BindConstraint({
source: this._borderCenter,
coordinate: Clutter.BindCoordinate.POSITION,
}));
this._closeButton.add_constraint(new Clutter.AlignConstraint({
source: this._borderCenter,
align_axis: Clutter.AlignAxis.X_AXIS,
pivot_point: new Graphene.Point({ x: 0.5, y: -1 }),
factor: this._closeButtonSide === St.Side.LEFT ? 0 : 1,
}));
this._closeButton.add_constraint(new Clutter.AlignConstraint({
source: this._borderCenter,
align_axis: Clutter.AlignAxis.Y_AXIS,
pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
factor: 0,
}));
this._closeButton.connect('clicked', () => this._deleteAll());
this.add_child(this._borderCenter);
this.add_child(this._border);
this.add_child(this._title);
this.add_child(this._closeButton);
this.connect('notify::realized', () => {
if (!this.realized)
return;
this._border.ensure_style();
this._title.ensure_style();
});
}
vfunc_get_preferred_width(forHeight) {
const themeNode = this.get_theme_node();
// Only include window previews in size request, not chrome
const [minWidth, natWidth] =
this._windowContainer.get_preferred_width(
themeNode.adjust_for_height(forHeight));
return themeNode.adjust_preferred_width(minWidth, natWidth);
}
vfunc_get_preferred_height(forWidth) {
const themeNode = this.get_theme_node();
const [minHeight, natHeight] =
this._windowContainer.get_preferred_height(
themeNode.adjust_for_width(forWidth));
return themeNode.adjust_preferred_height(minHeight, natHeight);
}
vfunc_allocate(box) {
this.set_allocation(box);
for (const child of this)
child.allocate_available_size(0, 0, box.get_width(), box.get_height());
}
_onBorderStyleChanged() {
let borderNode = this._border.get_theme_node();
this._borderSize = borderNode.get_border_width(St.Side.TOP);
// Increase the size of the border actor so the border outlines
// the bounding box
this._borderConstraint.offset = this._borderSize * 2;
this._borderCenterConstraint.offset = this._borderSize;
}
_windowCanClose() {
return this.metaWindow.can_close() &&
!this._hasAttachedDialogs();
}
_getCaption() {
if (this.metaWindow.title)
return this.metaWindow.title;
let tracker = Shell.WindowTracker.get_default();
let app = tracker.get_window_app(this.metaWindow);
return app.get_name();
}
chromeHeights() {
const [, closeButtonHeight] = this._closeButton.get_preferred_height(-1);
const [, titleHeight] = this._title.get_preferred_height(-1);
const topOversize = (this._borderSize / 2) + (closeButtonHeight / 2);
const bottomOversize = Math.max(
this._borderSize,
(titleHeight / 2) + (this._borderSize / 2));
return [topOversize, bottomOversize];
}
chromeWidths() {
const [, closeButtonWidth] = this._closeButton.get_preferred_width(-1);
const leftOversize = this._closeButtonSide === St.Side.LEFT
? (this._borderSize / 2) + (closeButtonWidth / 2)
: this._borderSize;
const rightOversize = this._closeButtonSide === St.Side.LEFT
? this._borderSize
: (this._borderSize / 2) + (closeButtonWidth / 2);
return [leftOversize, rightOversize];
}
showOverlay(animate) {
if (!this._overlayEnabled)
return;
const ongoingTransition = this._border.get_transition('opacity');
// Don't do anything if we're fully visible already
if (this._border.visible && !ongoingTransition)
return;
// If we're supposed to animate and an animation in our direction
// is already happening, let that one continue
if (animate &&
ongoingTransition &&
ongoingTransition.get_interval().peek_final_value() === 255)
return;
const toShow = this._windowCanClose()
? [this._border, this._title, this._closeButton]
: [this._border, this._title];
toShow.forEach(a => {
a.opacity = 0;
a.show();
a.ease({
opacity: 255,
duration: animate ? WINDOW_OVERLAY_FADE_TIME : 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
});
this.emit('show-chrome');
}
hideOverlay(animate) {
const ongoingTransition = this._border.get_transition('opacity');
// Don't do anything if we're fully hidden already
if (!this._border.visible && !ongoingTransition)
return;
// If we're supposed to animate and an animation in our direction
// is already happening, let that one continue
if (animate &&
ongoingTransition &&
ongoingTransition.get_interval().peek_final_value() === 0)
return;
[this._border, this._title, this._closeButton].forEach(a => {
a.opacity = 255;
a.ease({
opacity: 0,
duration: animate ? WINDOW_OVERLAY_FADE_TIME : 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => a.hide(),
});
});
}
_addWindow(metaWindow) {
const clone = this._windowContainer.layout_manager.addWindow(metaWindow);
// We expect this to be used for all interaction rather than
// the ClutterClone; as the former is reactive and the latter
// is not, this just works for most cases. However, for DND all
// actors are picked, so DND operations would operate on the clone.
// To avoid this, we hide it from pick.
Shell.util_set_hidden_from_pick(clone, true);
}
vfunc_has_overlaps() {
return this._hasAttachedDialogs();
}
_deleteAll() {
const windows = this._windowContainer.layout_manager.getWindows();
// Delete all windows, starting from the bottom-most (most-modal) one
for (const window of windows.reverse())
window.delete(global.get_current_time());
this._closeRequested = true;
}
addDialog(win) {
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._addWindow(win);
// 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();
}
_hasAttachedDialogs() {
return this._windowContainer.layout_manager.getWindows().length > 1;
}
_updateAttachedDialogs() {
let iter = win => {
let actor = win.get_compositor_private();
if (!actor)
return false;
if (!win.is_attached_dialog())
return false;
this._addWindow(win);
win.foreach_transient(iter);
return true;
};
this.metaWindow.foreach_transient(iter);
}
get boundingBox() {
const box = this._windowContainer.layout_manager.bounding_box;
return {
x: box.x1,
y: box.y1,
width: box.get_width(),
height: box.get_height(),
};
}
get windowCenter() {
const box = this._windowContainer.layout_manager.bounding_box;
return new Graphene.Point({
x: box.get_x() + box.get_width() / 2,
y: box.get_y() + box.get_height() / 2,
});
}
// eslint-disable-next-line camelcase
get overlay_enabled() {
return this._overlayEnabled;
}
// eslint-disable-next-line camelcase
set overlay_enabled(enabled) {
if (this._overlayEnabled === enabled)
return;
this._overlayEnabled = enabled;
this.notify('overlay-enabled');
if (!enabled)
this.hideOverlay(false);
else if (this['has-pointer'] || global.stage.key_focus === this)
this.showOverlay(true);
}
// Find the actor just below us, respecting reparenting done by DND code
_getActualStackAbove() {
if (this._stackAbove == null)
return null;
if (this.inDrag) {
if (this._stackAbove._delegate)
return this._stackAbove._delegate._getActualStackAbove();
else
return null;
} else {
return this._stackAbove;
}
}
setStackAbove(actor) {
this._stackAbove = actor;
if (this.inDrag)
// We'll fix up the stack after the drag
return;
let parent = this.get_parent();
let actualAbove = this._getActualStackAbove();
if (actualAbove == null)
parent.set_child_below_sibling(this, null);
else
parent.set_child_above_sibling(this, actualAbove);
}
_onDestroy() {
this._windowActor.disconnect(this._windowDestroyId);
this.metaWindow._delegate = null;
this._delegate = null;
this.metaWindow.disconnect(this._updateCaptionId);
if (this._longPressLater) {
Meta.later_remove(this._longPressLater);
delete this._longPressLater;
}
if (this._idleHideOverlayId > 0) {
GLib.source_remove(this._idleHideOverlayId);
this._idleHideOverlayId = 0;
}
if (this.inDrag) {
this.emit('drag-end');
this.inDrag = false;
}
}
_activate() {
this._selected = true;
this.emit('selected', global.get_current_time());
}
vfunc_enter_event(crossingEvent) {
this.showOverlay(true);
return super.vfunc_enter_event(crossingEvent);
}
vfunc_leave_event(crossingEvent) {
if (this._idleHideOverlayId > 0)
GLib.source_remove(this._idleHideOverlayId);
this._idleHideOverlayId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, () => {
if (this._closeButton['has-pointer'] ||
this._title['has-pointer'])
return GLib.SOURCE_CONTINUE;
if (!this['has-pointer'])
this.hideOverlay(true);
this._idleHideOverlayId = 0;
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlayId');
return super.vfunc_leave_event(crossingEvent);
}
vfunc_key_focus_in() {
super.vfunc_key_focus_in();
this.showOverlay(true);
}
vfunc_key_focus_out() {
super.vfunc_key_focus_out();
this.hideOverlay(true);
}
vfunc_key_press_event(keyEvent) {
let symbol = keyEvent.keyval;
let isEnter = symbol == Clutter.KEY_Return || symbol == Clutter.KEY_KP_Enter;
if (isEnter) {
this._activate();
return true;
}
return super.vfunc_key_press_event(keyEvent);
}
_onLongPress(action, actor, state) {
// Take advantage of the Clutter policy to consider
// a long-press canceled when the pointer movement
// exceeds dnd-drag-threshold to manually start the drag
if (state == Clutter.LongPressState.CANCEL) {
let event = Clutter.get_current_event();
this._dragTouchSequence = event.get_event_sequence();
if (this._longPressLater)
return true;
// A click cancels a long-press before any click handler is
// run - make sure to not start a drag in that case
this._longPressLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
delete this._longPressLater;
if (this._selected)
return;
let [x, y] = action.get_coords();
action.release();
this._draggable.startDrag(x, y, global.get_current_time(), this._dragTouchSequence, event.get_device());
});
} else {
this.showOverlay(true);
}
return true;
}
_onDragBegin(_draggable, _time) {
this.inDrag = true;
this.hideOverlay(false);
this.emit('drag-begin');
}
handleDragOver(source, actor, x, y, time) {
return this._workspace.handleDragOver(source, actor, x, y, time);
}
acceptDrop(source, actor, x, y, time) {
return this._workspace.acceptDrop(source, actor, x, y, time);
}
_onDragCancelled(_draggable, _time) {
this.emit('drag-cancelled');
}
_onDragEnd(_draggable, _time, _snapback) {
this.inDrag = false;
// We may not have a parent if DnD completed successfully, in
// which case our clone will shortly be destroyed and replaced
// with a new one on the target workspace.
let parent = this.get_parent();
if (parent !== null) {
if (this._stackAbove == null)
parent.set_child_below_sibling(this, null);
else
parent.set_child_above_sibling(this, this._stackAbove);
}
if (this['has-pointer'])
this.showOverlay(true);
this.emit('drag-end');
}
});

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,10 @@ var DISPLAY_TIMEOUT = 600;
var WorkspaceSwitcherPopupList = GObject.registerClass(
class WorkspaceSwitcherPopupList extends St.Widget {
_init() {
super._init({ style_class: 'workspace-switcher' });
super._init({
style_class: 'workspace-switcher',
offscreen_redirect: Clutter.OffscreenRedirect.ALWAYS,
});
this._itemSpacing = 0;
this._childHeight = 0;

View File

@ -549,9 +549,7 @@ var WorkspaceThumbnail = GObject.registerClass({
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.active)
Main.overview.hide();
else
this.metaWorkspace.activate(time);
@ -567,7 +565,8 @@ var WorkspaceThumbnail = GObject.registerClass({
if (this.state > ThumbnailState.NORMAL)
return DND.DragMotionResult.CONTINUE;
if (source.realWindow && !this._isMyWindow(source.realWindow))
if (source.metaWindow &&
!this._isMyWindow(source.metaWindow.get_compositor_private()))
return DND.DragMotionResult.MOVE_DROP;
if (source.app && source.app.can_open_new_window())
return DND.DragMotionResult.COPY_DROP;
@ -581,8 +580,8 @@ var WorkspaceThumbnail = GObject.registerClass({
if (this.state > ThumbnailState.NORMAL)
return false;
if (source.realWindow) {
let win = source.realWindow;
if (source.metaWindow) {
let win = source.metaWindow.get_compositor_private();
if (this._isMyWindow(win))
return false;
@ -795,7 +794,7 @@ var ThumbnailsBox = GObject.registerClass({
// Draggable target interface
handleDragOver(source, actor, x, y, time) {
if (!source.realWindow &&
if (!source.metaWindow &&
(!source.app || !source.app.can_open_new_window()) &&
(source.app || !source.shellWorkspaceLaunch) &&
source != Main.xdndHandler)
@ -846,7 +845,7 @@ var ThumbnailsBox = GObject.registerClass({
if (this._dropWorkspace != -1)
return this._thumbnails[this._dropWorkspace].handleDragOverInternal(source, actor, time);
else if (this._dropPlaceholderPos != -1)
return source.realWindow ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.COPY_DROP;
return source.metaWindow ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.COPY_DROP;
else
return DND.DragMotionResult.CONTINUE;
}
@ -855,12 +854,12 @@ var ThumbnailsBox = GObject.registerClass({
if (this._dropWorkspace != -1) {
return this._thumbnails[this._dropWorkspace].acceptDropInternal(source, actor, time);
} else if (this._dropPlaceholderPos != -1) {
if (!source.realWindow &&
if (!source.metaWindow &&
(!source.app || !source.app.can_open_new_window()) &&
(source.app || !source.shellWorkspaceLaunch))
return false;
let isWindow = !!source.realWindow;
let isWindow = !!source.metaWindow;
let newWorkspaceIndex;
[newWorkspaceIndex, this._dropPlaceholderPos] = [this._dropPlaceholderPos, -1];

View File

@ -7,6 +7,7 @@ const Main = imports.ui.main;
const SwipeTracker = imports.ui.swipeTracker;
const Workspace = imports.ui.workspace;
var { ANIMATION_TIME } = imports.ui.overview;
var WORKSPACE_SWITCH_TIME = 250;
var SCROLL_TIMEOUT_TIME = 150;
@ -21,18 +22,18 @@ var WorkspacesViewBase = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT,
}, class WorkspacesViewBase extends St.Widget {
_init(monitorIndex) {
super._init({ style_class: 'workspaces-view', reactive: true });
const { x, y, width, height } =
Main.layoutManager.getWorkAreaForMonitor(monitorIndex);
super._init({
style_class: 'workspaces-view',
x, y, width, height,
});
this.connect('destroy', this._onDestroy.bind(this));
global.focus_manager.add_group(this);
// The actor itself isn't a drop target, so we don't want to pick on its area
this.set_size(0, 0);
this._monitorIndex = monitorIndex;
this._fullGeometry = null;
this._actualGeometry = null;
this._inDrag = false;
this._windowDragBeginId = Main.overview.connect('window-drag-begin', this._dragBegin.bind(this));
this._windowDragEndId = Main.overview.connect('window-drag-end', this._dragEnd.bind(this));
@ -51,24 +52,19 @@ var WorkspacesViewBase = GObject.registerClass({
}
}
_dragBegin(overview, window) {
_dragBegin() {
this._inDrag = true;
this._setReservedSlot(window);
}
_dragEnd() {
this._inDrag = false;
this._setReservedSlot(null);
}
setFullGeometry(geom) {
this._fullGeometry = geom;
this._syncFullGeometry();
}
vfunc_allocate(box) {
this.set_allocation(box);
setActualGeometry(geom) {
this._actualGeometry = geom;
this._syncActualGeometry();
for (const child of this)
child.allocate_available_size(0, 0, box.get_width(), box.get_height());
}
});
@ -83,9 +79,8 @@ class WorkspacesView extends WorkspacesViewBase {
this._gestureActive = false; // touch(pad) gestures
this._scrollAdjustment = scrollAdjustment;
this._onScrollId =
this._scrollAdjustment.connect('notify::value',
this._onScroll.bind(this));
this._onScrollId = this._scrollAdjustment.connect('notify::value',
this._updateScrollPosition.bind(this));
this._workspaces = [];
this._updateWorkspaces();
@ -97,34 +92,42 @@ class WorkspacesView extends WorkspacesViewBase {
this._workspaces.sort((a, b) => {
return a.metaWorkspace.index() - b.metaWorkspace.index();
});
this._updateWorkspaceActors(false);
this._workspaces.forEach(
(ws, i) => this.set_child_at_index(ws, i));
});
this._overviewShownId =
Main.overview.connect('shown', () => {
this.set_clip(this._fullGeometry.x, this._fullGeometry.y,
this._fullGeometry.width, this._fullGeometry.height);
});
this._overviewShownId = Main.overview.connect('shown', () => {
this.clip_to_allocation = true;
});
this._switchWorkspaceNotifyId =
global.window_manager.connect('switch-workspace',
this._activeWorkspaceChanged.bind(this));
}
_setReservedSlot(window) {
for (let i = 0; i < this._workspaces.length; i++)
this._workspaces[i].setReservedSlot(window);
}
vfunc_allocate(box) {
this.set_allocation(box);
_syncFullGeometry() {
for (let i = 0; i < this._workspaces.length; i++)
this._workspaces[i].setFullGeometry(this._fullGeometry);
}
if (this.get_n_children() === 0)
return;
_syncActualGeometry() {
for (let i = 0; i < this._workspaces.length; i++)
this._workspaces[i].setActualGeometry(this._actualGeometry);
const { workspaceManager } = global;
const { nWorkspaces } = workspaceManager;
const vertical = workspaceManager.layout_rows === -1;
const rtl = this.text_direction === Clutter.TextDirection.RTL;
this._workspaces.forEach((child, index) => {
if (rtl && !vertical)
index = nWorkspaces - index - 1;
const x = vertical ? 0 : index * this.width;
const y = vertical ? index * this.height : 0;
child.allocate_available_size(x, y, box.get_width(), box.get_height());
});
this._updateScrollPosition();
}
getActiveWorkspace() {
@ -140,11 +143,11 @@ class WorkspacesView extends WorkspacesViewBase {
else
this._workspaces[w].fadeToOverview();
}
this._updateWorkspaceActors(false);
this._updateScrollPosition();
}
animateFromOverview(animationType) {
this.remove_clip();
this.clip_to_allocation = false;
for (let w = 0; w < this._workspaces.length; w++) {
if (animationType == AnimationType.ZOOM)
@ -159,49 +162,22 @@ class WorkspacesView extends WorkspacesViewBase {
this._workspaces[i].syncStacking(stackIndices);
}
// Update workspace actors parameters
// @showAnimation: iff %true, transition between states
_updateWorkspaceActors(showAnimation) {
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
_scrollToActive() {
const { workspaceManager } = global;
const active = workspaceManager.get_active_workspace_index();
this._animating = showAnimation;
this._animating = true;
this._updateVisibility();
for (let w = 0; w < this._workspaces.length; w++) {
let workspace = this._workspaces[w];
workspace.remove_all_transitions();
let params = {};
if (workspaceManager.layout_rows == -1)
params.y = (w - active) * this._fullGeometry.height;
else if (this.text_direction == Clutter.TextDirection.RTL)
params.x = (active - w) * this._fullGeometry.width;
else
params.x = (w - active) * this._fullGeometry.width;
if (showAnimation) {
let easeParams = Object.assign(params, {
duration: WORKSPACE_SWITCH_TIME,
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
});
// we have to call _updateVisibility() once before the
// animation and once afterwards - it does not really
// matter which tween we use, so we pick the first one ...
if (w == 0) {
this._updateVisibility();
easeParams.onComplete = () => {
this._animating = false;
this._updateVisibility();
};
}
workspace.ease(easeParams);
} else {
workspace.set(params);
if (w == 0)
this._updateVisibility();
}
}
this._scrollAdjustment.remove_transition('value');
this._scrollAdjustment.ease(active, {
duration: WORKSPACE_SWITCH_TIME,
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
onComplete: () => {
this._animating = false;
this._updateVisibility();
},
});
}
_updateVisibility() {
@ -242,19 +218,14 @@ class WorkspacesView extends WorkspacesViewBase {
}
}
if (this._fullGeometry) {
this._updateWorkspaceActors(false);
this._syncFullGeometry();
}
if (this._actualGeometry)
this._syncActualGeometry();
this._updateScrollPosition();
}
_activeWorkspaceChanged(_wm, _from, _to, _direction) {
if (this._scrolling)
return;
this._updateWorkspaceActors(true);
this._scrollToActive();
}
_onDestroy() {
@ -270,27 +241,33 @@ class WorkspacesView extends WorkspacesViewBase {
startTouchGesture() {
this._gestureActive = true;
this._updateVisibility();
}
endTouchGesture() {
this._gestureActive = false;
// Make sure title captions etc are shown as necessary
this._updateWorkspaceActors(true);
this._scrollToActive();
this._updateVisibility();
}
// sync the workspaces' positions to the value of the scroll adjustment
// and change the active workspace if appropriate
_onScroll(adj) {
if (adj.get_transition('value') !== null && !this._gestureActive)
_updateScrollPosition() {
if (!this.has_allocation())
return;
const adj = this._scrollAdjustment;
const allowSwitch =
adj.get_transition('value') === null && !this._gestureActive;
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
let current = Math.round(adj.value);
if (active != current && !this._gestureActive) {
if (allowSwitch && active !== current) {
if (!this._workspaces[current]) {
// The current workspace was destroyed. This could happen
// when you are on the last empty workspace, and consolidate
@ -307,36 +284,16 @@ class WorkspacesView extends WorkspacesViewBase {
if (adj.upper == 1)
return;
let last = this._workspaces.length - 1;
const vertical = workspaceManager.layout_rows === -1;
const rtl = this.text_direction === Clutter.TextDirection.RTL;
const progress = vertical || !rtl
? adj.value : adj.upper - adj.value;
if (workspaceManager.layout_rows == -1) {
let firstWorkspaceY = this._workspaces[0].y;
let lastWorkspaceY = this._workspaces[last].y;
let workspacesHeight = lastWorkspaceY - firstWorkspaceY;
let currentY = firstWorkspaceY;
let newY = -Math.round(adj.value / (adj.upper - 1) * workspacesHeight);
let dy = newY - currentY;
for (let i = 0; i < this._workspaces.length; i++) {
this._workspaces[i].visible = Math.abs(i - adj.value) <= 1;
this._workspaces[i].y += dy;
}
} else {
let firstWorkspaceX = this._workspaces[0].x;
let lastWorkspaceX = this._workspaces[last].x;
let workspacesWidth = lastWorkspaceX - firstWorkspaceX;
let currentX = firstWorkspaceX;
let newX = -Math.round(adj.value / (adj.upper - 1) * workspacesWidth);
let dx = newX - currentX;
for (let i = 0; i < this._workspaces.length; i++) {
this._workspaces[i].visible = Math.abs(i - adj.value) <= 1;
this._workspaces[i].x += dx;
}
for (const ws of this._workspaces) {
if (vertical)
ws.translation_y = -progress * this.height;
else
ws.translation_x = -progress * this.width;
}
}
});
@ -349,18 +306,6 @@ class ExtraWorkspaceView extends WorkspacesViewBase {
this.add_actor(this._workspace);
}
_setReservedSlot(window) {
this._workspace.setReservedSlot(window);
}
_syncFullGeometry() {
this._workspace.setFullGeometry(this._fullGeometry);
}
_syncActualGeometry() {
this._workspace.setActualGeometry(this._actualGeometry);
}
getActiveWorkspace() {
return this._workspace;
}
@ -393,7 +338,10 @@ class ExtraWorkspaceView extends WorkspacesViewBase {
var WorkspacesDisplay = GObject.registerClass(
class WorkspacesDisplay extends St.Widget {
_init(scrollAdjustment) {
super._init({ clip_to_allocation: true });
super._init({
visible: false,
clip_to_allocation: true,
});
this.connect('notify::allocation', this._updateWorkspacesActualGeometry.bind(this));
let workspaceManager = global.workspace_manager;
@ -435,6 +383,10 @@ class WorkspacesDisplay extends St.Widget {
this._windowDragEndId =
Main.overview.connect('window-drag-begin',
this._windowDragEnd.bind(this));
this._overviewShownId = Main.overview.connect('shown', () => {
this._inWindowFade = false;
this._syncWorkspacesActualGeometry();
});
this._primaryIndex = Main.layoutManager.primaryIndex;
this._workspacesViews = [];
@ -449,9 +401,11 @@ class WorkspacesDisplay extends St.Widget {
this._scrollEventId = 0;
this._keyPressEventId = 0;
this._scrollTimeoutId = 0;
this._syncActualGeometryLater = 0;
this._fullGeometry = null;
this._actualGeometry = null;
this._inWindowDrag = false;
this._inWindowFade = false;
this._gestureActive = false; // touch(pad) gestures
this._canScroll = true; // limiting scrolling speed
@ -472,6 +426,11 @@ class WorkspacesDisplay extends St.Widget {
this._parentSetLater = 0;
}
if (this._syncActualGeometryLater) {
Meta.later_remove(this._syncActualGeometryLater);
this._syncActualGeometryLater = 0;
}
if (this._scrollTimeoutId !== 0) {
GLib.source_remove(this._scrollTimeoutId);
this._scrollTimeoutId = 0;
@ -481,6 +440,7 @@ class WorkspacesDisplay extends St.Widget {
global.workspace_manager.disconnect(this._reorderWorkspacesdId);
Main.overview.disconnect(this._windowDragBeginId);
Main.overview.disconnect(this._windowDragEndId);
Main.overview.disconnect(this._overviewShownId);
}
_windowDragBegin() {
@ -504,25 +464,11 @@ class WorkspacesDisplay extends St.Widget {
workspaceManager.get_active_workspace_index();
}
_activeWorkspaceChanged(_wm, _from, _to, _direction) {
_activeWorkspaceChanged(_wm, _from, to, _direction) {
if (this._gestureActive)
return;
this._scrollToActive();
}
_scrollToActive() {
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
this._updateScrollAdjustment(active);
}
_updateScrollAdjustment(index) {
if (this._gestureActive)
return;
this._scrollAdjustment.ease(index, {
this._scrollAdjustment.ease(to, {
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
duration: WORKSPACE_SWITCH_TIME,
});
@ -560,11 +506,8 @@ class WorkspacesDisplay extends St.Widget {
for (let i = 0; i < this._workspacesViews.length; i++)
this._workspacesViews[i].startTouchGesture();
let monitors = Main.layoutManager.monitors;
let geometry = monitor === this._primaryIndex
? this._fullGeometry : monitors[monitor];
let distance = global.workspace_manager.layout_rows === -1
? geometry.height : geometry.width;
? this.height : this.width;
let progress = adjustment.value / adjustment.page_size;
let points = Array.from(
@ -584,14 +527,13 @@ class WorkspacesDisplay extends St.Widget {
this._clickAction.release();
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let newWs = workspaceManager.get_workspace_by_index(endProgress);
this._scrollAdjustment.ease(endProgress, {
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
duration,
onComplete: () => {
if (newWs !== activeWorkspace)
if (!newWs.active)
newWs.activate(global.get_current_time());
this._endTouchGesture();
},
@ -608,8 +550,10 @@ class WorkspacesDisplay extends St.Widget {
return this._getPrimaryView().navigate_focus(from, direction, false);
}
show(fadeOnPrimary) {
animateToOverview(fadeOnPrimary) {
this.show();
this._updateWorkspacesViews();
for (let i = 0; i < this._workspacesViews.length; i++) {
let animationType;
if (fadeOnPrimary && i == this._primaryIndex)
@ -619,6 +563,11 @@ class WorkspacesDisplay extends St.Widget {
this._workspacesViews[i].animateToOverview(animationType);
}
this._inWindowFade = fadeOnPrimary;
if (this._actualGeometry && !fadeOnPrimary)
this._syncWorkspacesActualGeometry();
this._restackedNotifyId =
Main.overview.connect('windows-restacked',
this._onRestacked.bind(this));
@ -638,9 +587,20 @@ class WorkspacesDisplay extends St.Widget {
animationType = AnimationType.ZOOM;
this._workspacesViews[i].animateFromOverview(animationType);
}
this._inWindowFade = fadeOnPrimary;
const { primaryIndex } = Main.layoutManager;
const { x, y, width, height } =
Main.layoutManager.getWorkAreaForMonitor(primaryIndex);
this._getPrimaryView().ease({
x, y, width, height,
duration: fadeOnPrimary ? 0 : ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
hide() {
vfunc_hide() {
if (this._restackedNotifyId > 0) {
Main.overview.disconnect(this._restackedNotifyId);
this._restackedNotifyId = 0;
@ -656,6 +616,8 @@ class WorkspacesDisplay extends St.Widget {
for (let i = 0; i < this._workspacesViews.length; i++)
this._workspacesViews[i].destroy();
this._workspacesViews = [];
super.vfunc_hide();
}
_workspacesOnlyOnPrimaryChanged() {
@ -665,6 +627,7 @@ class WorkspacesDisplay extends St.Widget {
return;
this._updateWorkspacesViews();
this._syncWorkspacesActualGeometry();
}
_updateWorkspacesViews() {
@ -681,17 +644,9 @@ class WorkspacesDisplay extends St.Widget {
else
view = new WorkspacesView(i, this._scrollAdjustment);
// HACK: Avoid spurious allocation changes while updating views
view.hide();
this._workspacesViews.push(view);
Main.layoutManager.overviewGroup.add_actor(view);
}
this._workspacesViews.forEach(v => v.show());
this._updateWorkspacesFullGeometry();
this._updateWorkspacesActualGeometry();
}
_getMonitorIndexForEvent(event) {
@ -738,40 +693,35 @@ class WorkspacesDisplay extends St.Widget {
});
}
// This geometry should always be the fullest geometry
// the workspaces switcher can ever be allocated, as if
// the sliding controls were never slid in at all.
setWorkspacesFullGeometry(geom) {
this._fullGeometry = geom;
this._updateWorkspacesFullGeometry();
}
_updateWorkspacesFullGeometry() {
if (!this._workspacesViews.length)
return;
let monitors = Main.layoutManager.monitors;
for (let i = 0; i < monitors.length; i++) {
let geometry = i == this._primaryIndex ? this._fullGeometry : monitors[i];
this._workspacesViews[i].setFullGeometry(geometry);
}
}
_updateWorkspacesActualGeometry() {
if (!this._workspacesViews.length)
const [x, y] = this.get_transformed_position();
const width = this.allocation.get_width();
const height = this.allocation.get_height();
this._actualGeometry = { x, y, width, height };
if (this._syncActualGeometryLater > 0)
return;
let [x, y] = this.get_transformed_position();
let allocation = this.allocation;
let width = allocation.x2 - allocation.x1;
let height = allocation.y2 - allocation.y1;
let primaryGeometry = { x, y, width, height };
this._syncActualGeometryLater =
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this._syncWorkspacesActualGeometry();
let monitors = Main.layoutManager.monitors;
for (let i = 0; i < monitors.length; i++) {
let geometry = i == this._primaryIndex ? primaryGeometry : monitors[i];
this._workspacesViews[i].setActualGeometry(geometry);
}
this._syncActualGeometryLater = 0;
return GLib.SOURCE_REMOVE;
});
}
_syncWorkspacesActualGeometry() {
const primaryView = this._getPrimaryView();
if (!primaryView || this._inWindowFade)
return;
primaryView.ease({
...this._actualGeometry,
duration: Main.overview.animationInProgress ? ANIMATION_TIME : 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
_onRestacked(overview, stackIndices) {

View File

@ -1,5 +1,5 @@
project('gnome-shell', 'c',
version: '3.37.2',
version: '3.37.3',
meson_version: '>= 0.53.0',
license: 'GPLv2+'
)
@ -25,7 +25,7 @@ gio_req = '>= 2.56.0'
gi_req = '>= 1.49.1'
gjs_req = '>= 1.65.1'
gtk_req = '>= 3.15.0'
mutter_req = '>= 3.37.2'
mutter_req = '>= 3.37.3'
polkit_req = '>= 0.100'
schemas_req = '>= 3.33.1'
startup_req = '>= 0.11'
@ -96,9 +96,10 @@ gnome_desktop_dep = dependency('gnome-desktop-3.0', version: gnome_desktop_req)
bt_dep = dependency('gnome-bluetooth-1.0', version: bt_req, required: false)
gst_dep = dependency('gstreamer-1.0', version: gst_req, required: false)
gst_base_dep = dependency('gstreamer-base-1.0', required: false)
pipewire_dep = dependency('libpipewire-0.3', required: false)
recorder_deps = []
enable_recorder = gst_dep.found() and gst_base_dep.found()
enable_recorder = gst_dep.found() and gst_base_dep.found() and pipewire_dep.found()
if enable_recorder
recorder_deps += [gst_dep, gst_base_dep, gtk_dep, x11_dep]
endif

534
po/ca.po

File diff suppressed because it is too large Load Diff

742
po/de.po

File diff suppressed because it is too large Load Diff

1118
po/el.po

File diff suppressed because it is too large Load Diff

417
po/es.po

File diff suppressed because it is too large Load Diff

483
po/fur.po

File diff suppressed because it is too large Load Diff

290
po/ja.po
View File

@ -1,5 +1,5 @@
# Japanese translation of gnome-shell package.
# Copyright (C) 2009-2020 the gnome-shell copyright holder.
# Copyright (C) 2010-2017, 2019-2020 the gnome-shell copyright holder.
# This file is distributed under the same license as the gnome-shell package.
# Nishio Futoshi <fut_nis@d3.dion.ne.jp>, 2010.
# Kiyotaka NISHIBORI <ml.nishibori.kiyotaka@gmail.com>, 2011.
@ -16,8 +16,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: 2020-05-04 14:38+0000\n"
"PO-Revision-Date: 2020-05-13 23:00+0900\n"
"POT-Creation-Date: 2020-06-10 17:32+0000\n"
"PO-Revision-Date: 2020-06-11 19:00+0900\n"
"Last-Translator: sicklylife <translation@sicklylife.jp>\n"
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
"Language: ja\n"
@ -421,7 +421,7 @@ msgstr "拡張機能のホームページを開く"
#: js/ui/components/networkAgent.js:110 js/ui/components/polkitAgent.js:139
#: js/ui/endSessionDialog.js:369 js/ui/extensionDownloader.js:181
#: js/ui/shellMountOperation.js:376 js/ui/shellMountOperation.js:386
#: js/ui/status/network.js:916 subprojects/extensions-app/js/main.js:148
#: js/ui/status/network.js:916 subprojects/extensions-app/js/main.js:149
msgid "Cancel"
msgstr "キャンセル"
@ -577,7 +577,7 @@ msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d 時間前"
#: js/misc/util.js:191
#: js/misc/util.js:191 js/ui/dateMenu.js:162
msgid "Yesterday"
msgstr "昨日"
@ -692,56 +692,44 @@ msgstr ""
#. No support for non-modal system dialogs, so ignore the option
#. let modal = options['modal'] || true;
#: js/ui/accessDialog.js:39 js/ui/status/location.js:374
#: js/ui/accessDialog.js:39 js/ui/status/location.js:369
msgid "Deny Access"
msgstr "拒否"
#: js/ui/accessDialog.js:40 js/ui/status/location.js:377
#: js/ui/accessDialog.js:40 js/ui/status/location.js:372
msgid "Grant Access"
msgstr "許可"
#: js/ui/appDisplay.js:943
#: js/ui/appDisplay.js:902
msgid "Unnamed Folder"
msgstr "名前なしのフォルダー"
#: js/ui/appDisplay.js:966
msgid "Frequently used applications will appear here"
msgstr "よく使用するアプリケーションがここに表示されます"
#: js/ui/appDisplay.js:1101
msgid "Frequent"
msgstr "常用"
#: js/ui/appDisplay.js:1108
msgid "All"
msgstr "すべて"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2485 js/ui/panel.js:75
#: js/ui/appDisplay.js:2241 js/ui/panel.js:75
msgid "Open Windows"
msgstr "開いているウィンドウ"
#: js/ui/appDisplay.js:2504 js/ui/panel.js:82
#: js/ui/appDisplay.js:2260 js/ui/panel.js:82
msgid "New Window"
msgstr "新しいウィンドウで開く"
#: js/ui/appDisplay.js:2520
#: js/ui/appDisplay.js:2276
msgid "Launch using Integrated Graphics Card"
msgstr "統合グラフィックカードを使用して起動"
#: js/ui/appDisplay.js:2521
#: js/ui/appDisplay.js:2277
msgid "Launch using Discrete Graphics Card"
msgstr "ディスクリートグラフィックカードを使用して起動"
#: js/ui/appDisplay.js:2549 js/ui/dash.js:239
#: js/ui/appDisplay.js:2305 js/ui/dash.js:239
msgid "Remove from Favorites"
msgstr "お気に入りから削除"
#: js/ui/appDisplay.js:2555
#: js/ui/appDisplay.js:2311
msgid "Add to Favorites"
msgstr "お気に入りに追加"
#: js/ui/appDisplay.js:2565 js/ui/panel.js:93
#: js/ui/appDisplay.js:2321 js/ui/panel.js:93
msgid "Show Details"
msgstr "詳細を表示"
@ -771,7 +759,7 @@ msgstr "ヘッドフォン"
msgid "Headset"
msgstr "ヘッドセット"
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:270
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:273
msgid "Microphone"
msgstr "マイク"
@ -788,7 +776,7 @@ msgid "Settings"
msgstr "設定"
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday).
#: js/ui/calendar.js:41
#: js/ui/calendar.js:36
msgctxt "calendar-no-work"
msgid "06"
msgstr "06"
@ -798,43 +786,43 @@ msgstr "06"
#. * NOTE: These grid abbreviations are always shown together
#. * and in order, e.g. "S M T W T F S".
#.
#: js/ui/calendar.js:70
#: js/ui/calendar.js:65
msgctxt "grid sunday"
msgid "S"
msgstr "日"
#. Translators: Calendar grid abbreviation for Monday
#: js/ui/calendar.js:72
#: js/ui/calendar.js:67
msgctxt "grid monday"
msgid "M"
msgstr "月"
#. Translators: Calendar grid abbreviation for Tuesday
#: js/ui/calendar.js:74
#: js/ui/calendar.js:69
msgctxt "grid tuesday"
msgid "T"
msgstr "火"
#. Translators: Calendar grid abbreviation for Wednesday
#: js/ui/calendar.js:76
#: js/ui/calendar.js:71
msgctxt "grid wednesday"
msgid "W"
msgstr "水"
#. Translators: Calendar grid abbreviation for Thursday
#: js/ui/calendar.js:78
#: js/ui/calendar.js:73
msgctxt "grid thursday"
msgid "T"
msgstr "木"
#. Translators: Calendar grid abbreviation for Friday
#: js/ui/calendar.js:80
#: js/ui/calendar.js:75
msgctxt "grid friday"
msgid "F"
msgstr "金"
#. Translators: Calendar grid abbreviation for Saturday
#: js/ui/calendar.js:82
#: js/ui/calendar.js:77
msgctxt "grid saturday"
msgid "S"
msgstr "土"
@ -847,7 +835,7 @@ msgstr "土"
#. * "%OB" is the new format specifier introduced in glibc 2.27,
#. * in most cases you should not change it.
#.
#: js/ui/calendar.js:397
#: js/ui/calendar.js:392
msgid "%OB"
msgstr "%B"
@ -860,61 +848,37 @@ msgstr "%B"
#. * in most cases you should not use the old "%B" here unless you
#. * absolutely know what you are doing.
#.
#: js/ui/calendar.js:407
#: js/ui/calendar.js:402
msgid "%OB %Y"
msgstr "%Y年%B"
#: js/ui/calendar.js:466
#: js/ui/calendar.js:461
msgid "Previous month"
msgstr "先月"
#: js/ui/calendar.js:481
#: js/ui/calendar.js:476
msgid "Next month"
msgstr "来月"
#: js/ui/calendar.js:631
#: js/ui/calendar.js:626
#, no-javascript-format
msgctxt "date day number format"
msgid "%d"
msgstr "%d"
#: js/ui/calendar.js:687
#: js/ui/calendar.js:682
msgid "Week %V"
msgstr "第 %V 週"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/calendar.js:762
msgctxt "event list time"
msgid "All Day"
msgstr "終日"
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/calendar.js:900
msgctxt "calendar heading"
msgid "%A, %B %-d"
msgstr "%B%-e日 (%a)"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/calendar.js:903
msgctxt "calendar heading"
msgid "%A, %B %-d, %Y"
msgstr "%Y年%B%-e日 (%a)"
#: js/ui/calendar.js:1133
#: js/ui/calendar.js:895
msgid "No Notifications"
msgstr "通知なし"
#: js/ui/calendar.js:1136
msgid "No Events"
msgstr "イベントなし"
#: js/ui/calendar.js:1190
#: js/ui/calendar.js:949
msgid "Do Not Disturb"
msgstr "通知ポップアップを表示しない"
#: js/ui/calendar.js:1209
#: js/ui/calendar.js:968
msgid "Clear"
msgstr "消去"
@ -1066,7 +1030,7 @@ msgstr "申し訳ありません、認証できませんでした。再試行し
msgid "%s is now known as %s"
msgstr "%s は %s になりました"
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:177
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:178
msgid "Windows"
msgstr "ウィンドウ"
@ -1085,7 +1049,7 @@ msgstr "ダッシュボード"
#. * "Tue 9:29 AM"). The string itself should become a full date, e.g.,
#. * "February 17 2015".
#.
#: js/ui/dateMenu.js:75
#: js/ui/dateMenu.js:79
msgid "%B %-d %Y"
msgstr "%Y年%-m月%-e日"
@ -1093,35 +1057,67 @@ msgstr "%Y年%-m月%-e日"
#. * below the time in the shell; it should combine the weekday and the
#. * date, e.g. "Tuesday February 17 2015".
#.
#: js/ui/dateMenu.js:82
#: js/ui/dateMenu.js:86
msgid "%A %B %e %Y"
msgstr "%Y年%-m月%-e日 (%a)"
#: js/ui/dateMenu.js:161
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/dateMenu.js:151
msgctxt "calendar heading"
msgid "%B %-d"
msgstr "%-m月%-e日"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/dateMenu.js:154
msgctxt "calendar heading"
msgid "%B %-d %Y"
msgstr "%Y年%-m月%-e日"
#: js/ui/dateMenu.js:160
msgid "Today"
msgstr "今日"
#: js/ui/dateMenu.js:164
msgid "Tomorrow"
msgstr "明日"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/dateMenu.js:180
msgctxt "event list time"
msgid "All Day"
msgstr "終日"
#: js/ui/dateMenu.js:231
msgid "No Events"
msgstr "イベントなし"
#: js/ui/dateMenu.js:348
msgid "Add world clocks…"
msgstr "世界時計を追加…"
#: js/ui/dateMenu.js:162
#: js/ui/dateMenu.js:349
msgid "World Clocks"
msgstr "世界時計"
#: js/ui/dateMenu.js:424
#: js/ui/dateMenu.js:629
msgid "Loading…"
msgstr "読み込み中…"
#: js/ui/dateMenu.js:434
#: js/ui/dateMenu.js:639
msgid "Go online for weather information"
msgstr "気象情報取得のためにネットワークに接続してください"
#: js/ui/dateMenu.js:436
#: js/ui/dateMenu.js:641
msgid "Weather information is currently unavailable"
msgstr "気象情報を取得できません"
#: js/ui/dateMenu.js:446
#: js/ui/dateMenu.js:651
msgid "Weather"
msgstr "天気"
#: js/ui/dateMenu.js:448
#: js/ui/dateMenu.js:653
msgid "Select weather location…"
msgstr "天気の場所を選択…"
@ -1279,11 +1275,11 @@ msgstr "拡張機能をインストール"
msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "extensions.gnome.org から“%s”をダウンロードしてインストールしますか?"
#: js/ui/extensionSystem.js:251
#: js/ui/extensionSystem.js:252
msgid "Extension Updates Available"
msgstr "拡張機能のアップデートが利用可能です"
#: js/ui/extensionSystem.js:252
#: js/ui/extensionSystem.js:253
msgid "Extension updates are ready to be installed."
msgstr "拡張機能のアップデートをインストールする準備ができました。"
@ -1410,6 +1406,7 @@ msgid "Disabled"
msgstr "無効"
#: js/ui/lookingGlass.js:743
#: subprojects/extensions-app/data/ui/extension-row.ui:188
msgid "Error"
msgstr "エラー"
@ -1453,11 +1450,11 @@ msgstr "画面ロックには GNOME ディスプレイマネージャーが必
msgid "System Information"
msgstr "システム情報"
#: js/ui/mpris.js:199
#: js/ui/mpris.js:203
msgid "Unknown artist"
msgstr "不明なアーティスト"
#: js/ui/mpris.js:209
#: js/ui/mpris.js:213
msgid "Unknown title"
msgstr "不明なタイトル"
@ -1503,23 +1500,23 @@ msgstr "キーストロークを割り当て"
msgid "Done"
msgstr "完了"
#: js/ui/padOsd.js:745
#: js/ui/padOsd.js:732
msgid "Edit…"
msgstr "編集…"
#: js/ui/padOsd.js:787 js/ui/padOsd.js:910
#: js/ui/padOsd.js:774 js/ui/padOsd.js:891
msgid "None"
msgstr "なし"
#: js/ui/padOsd.js:863
#: js/ui/padOsd.js:845
msgid "Press a button to configure"
msgstr "ボタンを押して設定してください"
#: js/ui/padOsd.js:864
#: js/ui/padOsd.js:846
msgid "Press Esc to exit"
msgstr "Esc を押すと終了します"
#: js/ui/padOsd.js:867
#: js/ui/padOsd.js:849
msgid "Press any key to exit"
msgstr "キーを押すと終了します"
@ -1529,16 +1526,16 @@ msgstr "終了"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview".
#: js/ui/panel.js:432
#: js/ui/panel.js:435
msgid "Activities"
msgstr "アクティビティ"
#: js/ui/panel.js:711
#: js/ui/panel.js:714
msgctxt "System menu in the top bar"
msgid "System"
msgstr "システム"
#: js/ui/panel.js:824
#: js/ui/panel.js:827
msgid "Top Bar"
msgstr "トップバー"
@ -1577,15 +1574,15 @@ msgstr "ロックできません"
msgid "Lock was blocked by an application"
msgstr "アプリケーションによってロックがブロックされました"
#: js/ui/search.js:702
#: js/ui/search.js:823
msgid "Searching…"
msgstr "検索中…"
#: js/ui/search.js:704
#: js/ui/search.js:825
msgid "No results."
msgstr "一致するものがありません。"
#: js/ui/search.js:830
#: js/ui/search.js:951
#, javascript-format
msgid "%d more"
msgid_plural "%d more"
@ -1782,17 +1779,17 @@ msgstr "位置情報サービス無効"
msgid "Enable"
msgstr "有効"
#: js/ui/status/location.js:355
#: js/ui/status/location.js:350
msgid "Allow location access"
msgstr "位置情報へのアクセスの許可"
#. Translators: %s is an application name
#: js/ui/status/location.js:357
#: js/ui/status/location.js:352
#, javascript-format
msgid "The app %s wants to access your location"
msgstr "アプリ %s が位置情報へのアクセスを要求しています"
#: js/ui/status/location.js:367
#: js/ui/status/location.js:362
msgid "Location access can be changed at any time from the privacy settings."
msgstr ""
"位置情報のアクセス許可設定は、プライバシー設定からいつでも変更できます。"
@ -2123,11 +2120,11 @@ msgstr "Thunderbolt 認証エラー"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "Thunderbolt デバイスを認証できませんでした: %s"
#: js/ui/status/volume.js:151
#: js/ui/status/volume.js:154
msgid "Volume changed"
msgstr "音量変更しました"
#: js/ui/status/volume.js:222
#: js/ui/status/volume.js:225
msgid "Volume"
msgstr "音量"
@ -2181,11 +2178,11 @@ msgstr "ロック解除"
msgid "Log in as another user"
msgstr "別のユーザーでログイン"
#: js/ui/viewSelector.js:181
#: js/ui/viewSelector.js:182
msgid "Applications"
msgstr "アプリケーション"
#: js/ui/viewSelector.js:185
#: js/ui/viewSelector.js:186
msgid "Search"
msgstr "検索"
@ -2335,19 +2332,19 @@ msgstr "認証ダイアログはユーザーに拒否されました"
#: subprojects/extensions-app/data/metainfo/org.gnome.Extensions.metainfo.xml.in:5
#: subprojects/extensions-app/data/org.gnome.Extensions.desktop.in.in:4
#: subprojects/extensions-app/js/main.js:182
#: subprojects/extensions-app/js/main.js:183
#: subprojects/extensions-app/data/ui/extensions-window.ui:61
msgid "Extensions"
msgstr "拡張機能"
#: subprojects/extensions-app/data/metainfo/org.gnome.Extensions.metainfo.xml.in:6
#: subprojects/extensions-app/js/main.js:183
#: subprojects/extensions-app/js/main.js:184
msgid "Manage your GNOME Extensions"
msgstr "GNOME 拡張機能を管理します"
#: subprojects/extensions-app/data/metainfo/org.gnome.Extensions.metainfo.xml.in:17
msgid "The GNOME Project"
msgstr ""
msgstr "The GNOME Project"
#: subprojects/extensions-app/data/metainfo/org.gnome.Extensions.metainfo.xml.in:36
msgid ""
@ -2359,23 +2356,23 @@ msgstr ""
msgid "Configure GNOME Shell Extensions"
msgstr "GNOME Shell 拡張機能の設定を行います"
#: subprojects/extensions-app/js/main.js:144
#: subprojects/extensions-app/js/main.js:145
#, javascript-format
msgid "Remove “%s”?"
msgstr "“%s”を削除しますか?"
#: subprojects/extensions-app/js/main.js:145
#: subprojects/extensions-app/js/main.js:146
msgid ""
"If you remove the extension, you need to return to download it if you want "
"to enable it again"
msgstr ""
"拡張機能を削除した場合、再度有効にするにはダウンロードし直す必要があります"
#: subprojects/extensions-app/js/main.js:149
#: subprojects/extensions-app/js/main.js:150
msgid "Remove"
msgstr "削除"
#: subprojects/extensions-app/js/main.js:181
#: subprojects/extensions-app/js/main.js:182
msgid "translator-credits"
msgstr ""
"Hideki Yamane <henrich@debian.org>\n"
@ -2389,32 +2386,40 @@ msgstr ""
"Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>\n"
"Yoji TOYODA <bsyamato@sea.plala.or.jp>"
#: subprojects/extensions-app/js/main.js:313
#: subprojects/extensions-app/js/main.js:314
#, javascript-format
msgid "%d extension will be updated on next login."
msgid_plural "%d extensions will be updated on next login."
msgstr[0] "%d 個の拡張機能を次回ログイン時に更新します。"
#: subprojects/extensions-app/data/ui/extension-row.ui:100
#: subprojects/extensions-tool/src/command-create.c:301
#: subprojects/extensions-app/js/main.js:461
msgid "The extension is incompatible with the current GNOME version"
msgstr "現在の GNOME のバージョンと互換性のない拡張機能です"
#: subprojects/extensions-app/js/main.js:464
msgid "The extension had an error"
msgstr "拡張機能にエラーがありました"
#: subprojects/extensions-app/data/ui/extension-row.ui:109
#: subprojects/extensions-tool/src/command-create.c:325
#: subprojects/extensions-tool/src/main.c:241
msgid "Description"
msgstr "説明"
#: subprojects/extensions-app/data/ui/extension-row.ui:123
#: subprojects/extensions-app/data/ui/extension-row.ui:132
#: subprojects/extensions-tool/src/main.c:253
msgid "Version"
msgstr "バージョン"
#: subprojects/extensions-app/data/ui/extension-row.ui:151
#: subprojects/extensions-app/data/ui/extension-row.ui:160
msgid "Author"
msgstr "作者"
#: subprojects/extensions-app/data/ui/extension-row.ui:175
#: subprojects/extensions-app/data/ui/extension-row.ui:216
msgid "Website"
msgstr "ウェブサイト"
#: subprojects/extensions-app/data/ui/extension-row.ui:192
#: subprojects/extensions-app/data/ui/extension-row.ui:233
msgid "Remove…"
msgstr "削除…"
@ -2470,94 +2475,94 @@ msgstr ""
#: subprojects/extensions-app/data/ui/extensions-window.ui:273
msgid "Extension Updates Ready"
msgstr "拡張機能更新できます"
msgstr "拡張機能更新準備完了"
#: subprojects/extensions-app/data/ui/extensions-window.ui:289
msgid "Log Out…"
msgstr "ログアウト…"
#. Translators: a file path to an extension directory
#: subprojects/extensions-tool/src/command-create.c:202
#: subprojects/extensions-tool/src/command-create.c:226
#, c-format
msgid "The new extension was successfully created in %s.\n"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:275
#: subprojects/extensions-tool/src/command-create.c:299
#, c-format
msgid ""
"Name should be a very short (ideally descriptive) string.\n"
"Examples are: %s"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:281
#: subprojects/extensions-tool/src/command-create.c:305
#: subprojects/extensions-tool/src/main.c:238
msgid "Name"
msgstr "名前"
#: subprojects/extensions-tool/src/command-create.c:295
#: subprojects/extensions-tool/src/command-create.c:319
#, c-format
msgid ""
"Description is a single-sentence explanation of what your extension does.\n"
"Examples are: %s"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:315
#: subprojects/extensions-tool/src/command-create.c:339
msgid ""
"UUID is a globally-unique identifier for your extension.\n"
"This should be in the format of an email address (clicktofocus@janedoe."
"example.com)\n"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:342
#: subprojects/extensions-tool/src/command-create.c:366
msgid "Choose one of the available templates:\n"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:356
#: subprojects/extensions-tool/src/command-create.c:380
msgid "Template"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:411
#: subprojects/extensions-tool/src/command-create.c:435
msgid "The unique identifier of the new extension"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:414
#: subprojects/extensions-tool/src/command-create.c:438
msgid "NAME"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:415
#: subprojects/extensions-tool/src/command-create.c:439
msgid "The user-visible name of the new extension"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:417
#: subprojects/extensions-tool/src/command-create.c:441
msgid "DESCRIPTION"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:419
#: subprojects/extensions-tool/src/command-create.c:443
msgid "A short description of what the extension does"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:422
#: subprojects/extensions-tool/src/command-create.c:446
msgid "TEMPLATE"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:423
#: subprojects/extensions-tool/src/command-create.c:447
msgid "The template to use for the new extension"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:429
#: subprojects/extensions-tool/src/command-create.c:453
msgid "Enter extension information interactively"
msgstr ""
#: subprojects/extensions-tool/src/command-create.c:437
#: subprojects/extensions-tool/src/command-create.c:461
msgid "Create a new extension"
msgstr "新しい拡張機能を作成します"
#: subprojects/extensions-tool/src/command-create.c:455
#: subprojects/extensions-tool/src/command-create.c:479
#: subprojects/extensions-tool/src/command-list.c:172
msgid "Unknown arguments"
msgstr "不明な引数です"
#: subprojects/extensions-tool/src/command-create.c:480
#: subprojects/extensions-tool/src/command-create.c:504
msgid "UUID, name and description are required"
msgstr ""
@ -2877,6 +2882,23 @@ msgstr[0] "入力数: %u"
msgid "System Sounds"
msgstr "システムのサウンド"
#~ msgid "Frequently used applications will appear here"
#~ msgstr "よく使用するアプリケーションがここに表示されます"
#~ msgid "Frequent"
#~ msgstr "常用"
#~ msgid "All"
#~ msgstr "すべて"
#~ msgctxt "calendar heading"
#~ msgid "%A, %B %-d"
#~ msgstr "%B%-e日 (%a)"
#~ msgctxt "calendar heading"
#~ msgid "%A, %B %-d, %Y"
#~ msgstr "%Y年%B%-e日 (%a)"
#~ msgid "Copy Error"
#~ msgstr "エラーをコピー"

2029
po/kk.po

File diff suppressed because it is too large Load Diff

872
po/lt.po

File diff suppressed because it is too large Load Diff

941
po/lv.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

378
po/ro.po
View File

@ -10,9 +10,10 @@ 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: 2020-05-21 23:22+0000\n"
"PO-Revision-Date: 2020-05-22 15:07+0300\n"
"Last-Translator: Florentina Mușat <emryslokadottir [at] gmail [dot] com>\n"
"POT-Creation-Date: 2020-07-21 05:44+0000\n"
"PO-Revision-Date: 2020-07-21 09:07+0200\n"
"Last-Translator: Florentina Mușat <florentina [dot] musat [dot] 28 [at] "
"gmail [dot] com>\n"
"Language-Team: Gnome Romanian Translation Team <gnomero-list@lists."
"sourceforge.net>\n"
"Language: ro\n"
@ -223,95 +224,112 @@ msgid ""
msgstr ""
"Activează un API D-Bus care permite introspecția stării aplicației shell."
#: data/org.gnome.shell.gschema.xml.in:119
#: data/org.gnome.shell.gschema.xml.in:114
msgid "Layout of the app picker"
msgstr "Aspectul selectorului de aplicații"
#: data/org.gnome.shell.gschema.xml.in:115
msgid ""
"Layout of the app picker. Each entry in the array is a page. Pages are "
"stored in the order they appear in GNOME Shell. Each page contains an "
"“application id” → 'data' pair. Currently, the following values are stored "
"as 'data': • “position”: the position of the application icon in the page"
msgstr ""
"Aspectul selectorului de aplicații. Fiecare intrare din matrice este o "
"pagină. Paginile sunt stocate în ordinea în care apar în GNOME Shell. "
"Fiecare pagină conține o pereche de „id aplicație” → „date”. Momentan, "
"următoarele valori sunt stocate ca „data”: • „poziție”: poziția iconiței "
"aplicației în pagină."
#: data/org.gnome.shell.gschema.xml.in:130
msgid "Keybinding to open the application menu"
msgstr "Combinație de taste pentru deschiderea meniului aplicației"
#: data/org.gnome.shell.gschema.xml.in:120
#: data/org.gnome.shell.gschema.xml.in:131
msgid "Keybinding to open the application menu."
msgstr "Combinație de taste pentru deschiderea meniului aplicației."
#: data/org.gnome.shell.gschema.xml.in:126
#: data/org.gnome.shell.gschema.xml.in:137
msgid "Keybinding to open the “Show Applications” view"
msgstr ""
"Combinație de taste pentru deschiderea modului de afișare „Arată aplicațiile”"
#: data/org.gnome.shell.gschema.xml.in:127
#: data/org.gnome.shell.gschema.xml.in:138
msgid ""
"Keybinding to open the “Show Applications” view of the Activities Overview."
msgstr ""
"Combinație de taste pentru deschiderea modului de afișare „Arată "
"aplicațiile” a prezentării generale a activităților."
#: data/org.gnome.shell.gschema.xml.in:134
#: data/org.gnome.shell.gschema.xml.in:145
msgid "Keybinding to open the overview"
msgstr "Combinație de taste pentru deschiderea prezentării generale"
#: data/org.gnome.shell.gschema.xml.in:135
#: data/org.gnome.shell.gschema.xml.in:146
msgid "Keybinding to open the Activities Overview."
msgstr ""
"Combinație de taste pentru deschiderea prezentării generale a activităților."
#: data/org.gnome.shell.gschema.xml.in:141
#: data/org.gnome.shell.gschema.xml.in:152
msgid "Keybinding to toggle the visibility of the notification list"
msgstr ""
"Combinație de taste pentru comutarea vizibilității listei de notificare"
#: data/org.gnome.shell.gschema.xml.in:142
#: data/org.gnome.shell.gschema.xml.in:153
msgid "Keybinding to toggle the visibility of the notification list."
msgstr ""
"Combinație de taste pentru comutarea vizibilității listei de notificare."
#: data/org.gnome.shell.gschema.xml.in:148
#: data/org.gnome.shell.gschema.xml.in:159
msgid "Keybinding to focus the active notification"
msgstr "Combinație de taste pentru focalizarea notificării active"
#: data/org.gnome.shell.gschema.xml.in:149
#: data/org.gnome.shell.gschema.xml.in:160
msgid "Keybinding to focus the active notification."
msgstr "Combinație de taste pentru focalizarea notificării active."
#: data/org.gnome.shell.gschema.xml.in:155
#: data/org.gnome.shell.gschema.xml.in:166
msgid "Switch to application 1"
msgstr "Comută la aplicația 1"
#: data/org.gnome.shell.gschema.xml.in:159
#: data/org.gnome.shell.gschema.xml.in:170
msgid "Switch to application 2"
msgstr "Comută la aplicația 2"
#: data/org.gnome.shell.gschema.xml.in:163
#: data/org.gnome.shell.gschema.xml.in:174
msgid "Switch to application 3"
msgstr "Comută la aplicația 3"
#: data/org.gnome.shell.gschema.xml.in:167
#: data/org.gnome.shell.gschema.xml.in:178
msgid "Switch to application 4"
msgstr "Comută la aplicația 4"
#: data/org.gnome.shell.gschema.xml.in:171
#: data/org.gnome.shell.gschema.xml.in:182
msgid "Switch to application 5"
msgstr "Comută la aplicația 5"
#: data/org.gnome.shell.gschema.xml.in:175
#: data/org.gnome.shell.gschema.xml.in:186
msgid "Switch to application 6"
msgstr "Comută la aplicația 6"
#: data/org.gnome.shell.gschema.xml.in:179
#: data/org.gnome.shell.gschema.xml.in:190
msgid "Switch to application 7"
msgstr "Comută la aplicația 7"
#: data/org.gnome.shell.gschema.xml.in:183
#: data/org.gnome.shell.gschema.xml.in:194
msgid "Switch to application 8"
msgstr "Comută la aplicația 8"
#: data/org.gnome.shell.gschema.xml.in:187
#: data/org.gnome.shell.gschema.xml.in:198
msgid "Switch to application 9"
msgstr "Comută la aplicația 9"
#: data/org.gnome.shell.gschema.xml.in:196
#: data/org.gnome.shell.gschema.xml.in:223
#: data/org.gnome.shell.gschema.xml.in:207
#: data/org.gnome.shell.gschema.xml.in:234
msgid "Limit switcher to current workspace."
msgstr "Limitează comutatorul la spațiul de lucru curent."
#: data/org.gnome.shell.gschema.xml.in:197
#: data/org.gnome.shell.gschema.xml.in:208
msgid ""
"If true, only applications that have windows on the current workspace are "
"shown in the switcher. Otherwise, all applications are included."
@ -319,11 +337,11 @@ msgstr ""
"Dacă este activat, doar aplicațiile care au ferestre în spațiul de lucru "
"curent sunt arătate în comutator. Altfel, toate aplicațiile sunt incluse."
#: data/org.gnome.shell.gschema.xml.in:214
#: data/org.gnome.shell.gschema.xml.in:225
msgid "The application icon mode."
msgstr "Miniatură și pictograma aplicației."
#: data/org.gnome.shell.gschema.xml.in:215
#: data/org.gnome.shell.gschema.xml.in:226
msgid ""
"Configures how the windows are shown in the switcher. Valid possibilities "
"are “thumbnail-only” (shows a thumbnail of the window), “app-icon-"
@ -333,7 +351,7 @@ msgstr ""
"Posibilități valide sunt „mod miniatură” (arată o miniatură a ferestrei) "
"„mod iconiță” (arată doar iconița aplicației) sau „ambele”."
#: data/org.gnome.shell.gschema.xml.in:224
#: data/org.gnome.shell.gschema.xml.in:235
msgid ""
"If true, only windows from the current workspace are shown in the switcher. "
"Otherwise, all windows are included."
@ -341,59 +359,59 @@ msgstr ""
"Dacă este activat, doar ferestrele din spațiul de lucru curent sunt arătate "
"în comutator. Altfel, toate ferestrele sunt incluse."
#: data/org.gnome.shell.gschema.xml.in:234
#: data/org.gnome.shell.gschema.xml.in:245
msgid "Locations"
msgstr "Locații"
#: data/org.gnome.shell.gschema.xml.in:235
#: data/org.gnome.shell.gschema.xml.in:246
msgid "The locations to show in world clocks"
msgstr "Locațiile de arătat în ceasuri globale"
#: data/org.gnome.shell.gschema.xml.in:245
#: data/org.gnome.shell.gschema.xml.in:256
msgid "Automatic location"
msgstr "Locație automată"
#: data/org.gnome.shell.gschema.xml.in:246
#: data/org.gnome.shell.gschema.xml.in:257
msgid "Whether to fetch the current location or not"
msgstr "Dacă să se obțină locația curentă"
#: data/org.gnome.shell.gschema.xml.in:253
#: data/org.gnome.shell.gschema.xml.in:264
msgid "Location"
msgstr "Locație"
#: data/org.gnome.shell.gschema.xml.in:254
#: data/org.gnome.shell.gschema.xml.in:265
msgid "The location for which to show a forecast"
msgstr "Locația pentru care să se arate o prognoză"
#: data/org.gnome.shell.gschema.xml.in:266
#: data/org.gnome.shell.gschema.xml.in:277
msgid "Attach modal dialog to the parent window"
msgstr "Atașează dialogul modal la fereastra părinte"
#: data/org.gnome.shell.gschema.xml.in:267
#: data/org.gnome.shell.gschema.xml.in:276
#: data/org.gnome.shell.gschema.xml.in:284
#: data/org.gnome.shell.gschema.xml.in:292
#: data/org.gnome.shell.gschema.xml.in:300
#: data/org.gnome.shell.gschema.xml.in:278
#: data/org.gnome.shell.gschema.xml.in:287
#: data/org.gnome.shell.gschema.xml.in:295
#: data/org.gnome.shell.gschema.xml.in:303
#: data/org.gnome.shell.gschema.xml.in:311
msgid ""
"This key overrides the key in org.gnome.mutter when running GNOME Shell."
msgstr ""
"Această cheie suprascrie cheia corespondentă din org.gnome.mutter când "
"Vizualizatorul activităților GNOME rulează."
#: data/org.gnome.shell.gschema.xml.in:275
#: data/org.gnome.shell.gschema.xml.in:286
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr ""
"Activează mozaic lateral la plasarea ferestrelor pe marginile ecranului"
#: data/org.gnome.shell.gschema.xml.in:283
#: data/org.gnome.shell.gschema.xml.in:294
msgid "Workspaces are managed dynamically"
msgstr "Spațiile de lucru sunt gestionate în mod dinamic"
#: data/org.gnome.shell.gschema.xml.in:291
#: data/org.gnome.shell.gschema.xml.in:302
msgid "Workspaces only on primary monitor"
msgstr "Spații de lucru doar pe monitorul principal"
#: data/org.gnome.shell.gschema.xml.in:299
#: data/org.gnome.shell.gschema.xml.in:310
msgid "Delay focus changes in mouse mode until the pointer stops moving"
msgstr ""
"Întârzie schimbările de focalizare în maus până când cursorul încetează să "
@ -432,7 +450,7 @@ msgstr "Vizitează pagina principală a extensiei"
#: js/gdm/authPrompt.js:135 js/ui/audioDeviceSelection.js:57
#: js/ui/components/networkAgent.js:110 js/ui/components/polkitAgent.js:139
#: js/ui/endSessionDialog.js:369 js/ui/extensionDownloader.js:181
#: js/ui/endSessionDialog.js:369 js/ui/extensionDownloader.js:183
#: js/ui/shellMountOperation.js:376 js/ui/shellMountOperation.js:386
#: js/ui/status/network.js:916 subprojects/extensions-app/js/main.js:149
msgid "Cancel"
@ -474,7 +492,7 @@ msgstr "Nume de utilizator"
msgid "Login Window"
msgstr "Fereastră de autentificare"
#: js/gdm/util.js:345
#: js/gdm/util.js:355
msgid "Authentication error"
msgstr "Eroare de autentificare"
@ -483,7 +501,7 @@ msgstr "Eroare de autentificare"
#. 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:471
#: js/gdm/util.js:481
msgid "(or swipe finger)"
msgstr "(sau treceți degetul peste)"
@ -594,7 +612,7 @@ msgstr[0] "%d oră în urmă"
msgstr[1] "%d ore în urmă"
msgstr[2] "%d de ore în urmă"
#: js/misc/util.js:191
#: js/misc/util.js:191 js/ui/dateMenu.js:162
msgid "Yesterday"
msgstr "Ieri"
@ -718,56 +736,44 @@ msgstr ""
#. No support for non-modal system dialogs, so ignore the option
#. let modal = options['modal'] || true;
#: js/ui/accessDialog.js:39 js/ui/status/location.js:374
#: js/ui/accessDialog.js:39 js/ui/status/location.js:369
msgid "Deny Access"
msgstr "Refuză accesul"
#: js/ui/accessDialog.js:40 js/ui/status/location.js:377
#: js/ui/accessDialog.js:40 js/ui/status/location.js:372
msgid "Grant Access"
msgstr "Permite accesul"
#: js/ui/appDisplay.js:944
#: js/ui/appDisplay.js:1297
msgid "Unnamed Folder"
msgstr "Dosar nedenumit"
#: js/ui/appDisplay.js:967
msgid "Frequently used applications will appear here"
msgstr "Aplicațiile utilizate frecvent vor fi afișate aici"
#: js/ui/appDisplay.js:1102
msgid "Frequent"
msgstr "Frecvente"
#: js/ui/appDisplay.js:1109
msgid "All"
msgstr "Toate"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2486 js/ui/panel.js:75
#: js/ui/appDisplay.js:2767 js/ui/panel.js:75
msgid "Open Windows"
msgstr "Ferestre deschise"
#: js/ui/appDisplay.js:2505 js/ui/panel.js:82
#: js/ui/appDisplay.js:2786 js/ui/panel.js:82
msgid "New Window"
msgstr "Fereastră nouă"
#: js/ui/appDisplay.js:2521
#: js/ui/appDisplay.js:2802
msgid "Launch using Integrated Graphics Card"
msgstr "Lansează folosind placa grafică integrată"
#: js/ui/appDisplay.js:2522
#: js/ui/appDisplay.js:2803
msgid "Launch using Discrete Graphics Card"
msgstr "Lansează folosind placa grafică discretă"
#: js/ui/appDisplay.js:2550 js/ui/dash.js:239
#: js/ui/appDisplay.js:2831 js/ui/dash.js:239
msgid "Remove from Favorites"
msgstr "Elimină din favorite"
#: js/ui/appDisplay.js:2556
#: js/ui/appDisplay.js:2837
msgid "Add to Favorites"
msgstr "Adaugă la Favorite"
#: js/ui/appDisplay.js:2566 js/ui/panel.js:93
#: js/ui/appDisplay.js:2847 js/ui/panel.js:93
msgid "Show Details"
msgstr "Arată detaliile"
@ -797,7 +803,7 @@ msgstr "Căști auriculare"
msgid "Headset"
msgstr "Căști cu microfon"
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:273
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:272
msgid "Microphone"
msgstr "Microfon"
@ -814,7 +820,7 @@ msgid "Settings"
msgstr "Configurări"
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday).
#: js/ui/calendar.js:41
#: js/ui/calendar.js:36
msgctxt "calendar-no-work"
msgid "06"
msgstr "06"
@ -824,43 +830,43 @@ msgstr "06"
#. * NOTE: These grid abbreviations are always shown together
#. * and in order, e.g. "S M T W T F S".
#.
#: js/ui/calendar.js:70
#: js/ui/calendar.js:65
msgctxt "grid sunday"
msgid "S"
msgstr "D"
#. Translators: Calendar grid abbreviation for Monday
#: js/ui/calendar.js:72
#: js/ui/calendar.js:67
msgctxt "grid monday"
msgid "M"
msgstr "L"
#. Translators: Calendar grid abbreviation for Tuesday
#: js/ui/calendar.js:74
#: js/ui/calendar.js:69
msgctxt "grid tuesday"
msgid "T"
msgstr "M"
#. Translators: Calendar grid abbreviation for Wednesday
#: js/ui/calendar.js:76
#: js/ui/calendar.js:71
msgctxt "grid wednesday"
msgid "W"
msgstr "M"
#. Translators: Calendar grid abbreviation for Thursday
#: js/ui/calendar.js:78
#: js/ui/calendar.js:73
msgctxt "grid thursday"
msgid "T"
msgstr "J"
#. Translators: Calendar grid abbreviation for Friday
#: js/ui/calendar.js:80
#: js/ui/calendar.js:75
msgctxt "grid friday"
msgid "F"
msgstr "V"
#. Translators: Calendar grid abbreviation for Saturday
#: js/ui/calendar.js:82
#: js/ui/calendar.js:77
msgctxt "grid saturday"
msgid "S"
msgstr "S"
@ -871,7 +877,7 @@ msgstr "S"
#. * "%OB" is the new format specifier introduced in glibc 2.27,
#. * in most cases you should not change it.
#.
#: js/ui/calendar.js:397
#: js/ui/calendar.js:392
msgid "%OB"
msgstr "%OB"
@ -884,61 +890,37 @@ msgstr "%OB"
#. * in most cases you should not use the old "%B" here unless you
#. * absolutely know what you are doing.
#.
#: js/ui/calendar.js:407
#: js/ui/calendar.js:402
msgid "%OB %Y"
msgstr "%OB %Y"
#: js/ui/calendar.js:466
#: js/ui/calendar.js:461
msgid "Previous month"
msgstr "Luna precedentă"
#: js/ui/calendar.js:481
#: js/ui/calendar.js:476
msgid "Next month"
msgstr "Luna viitoare"
#: js/ui/calendar.js:631
#: js/ui/calendar.js:626
#, no-javascript-format
msgctxt "date day number format"
msgid "%d"
msgstr "%d"
#: js/ui/calendar.js:687
#: js/ui/calendar.js:682
msgid "Week %V"
msgstr "Săptămâna %V"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/calendar.js:762
msgctxt "event list time"
msgid "All Day"
msgstr "Toată ziua"
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/calendar.js:900
msgctxt "calendar heading"
msgid "%A, %B %-d"
msgstr "%A, %B %-d"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/calendar.js:903
msgctxt "calendar heading"
msgid "%A, %B %-d, %Y"
msgstr "%A, %B %-d, %Y"
#: js/ui/calendar.js:1133
#: js/ui/calendar.js:895
msgid "No Notifications"
msgstr "Nu există notificări"
#: js/ui/calendar.js:1136
msgid "No Events"
msgstr "Nu există evenimente"
#: js/ui/calendar.js:1190
#: js/ui/calendar.js:949
msgid "Do Not Disturb"
msgstr "Nu deranja"
#: js/ui/calendar.js:1209
#: js/ui/calendar.js:968
msgid "Clear"
msgstr "Curăță"
@ -1093,7 +1075,7 @@ msgstr "Nu a funcționat. Încercați din nou."
msgid "%s is now known as %s"
msgstr "%s este acum cunoscut ca %s"
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:177
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:178
msgid "Windows"
msgstr "Ferestre"
@ -1112,7 +1094,7 @@ msgstr "Dash"
#. * "Tue 9:29 AM"). The string itself should become a full date, e.g.,
#. * "February 17 2015".
#.
#: js/ui/dateMenu.js:75
#: js/ui/dateMenu.js:79
msgid "%B %-d %Y"
msgstr "%B %-d %Y"
@ -1120,35 +1102,67 @@ msgstr "%B %-d %Y"
#. * below the time in the shell; it should combine the weekday and the
#. * date, e.g. "Tuesday February 17 2015".
#.
#: js/ui/dateMenu.js:82
#: js/ui/dateMenu.js:86
msgid "%A %B %e %Y"
msgstr "%A %B %e %Y"
#: js/ui/dateMenu.js:162
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/dateMenu.js:151
msgctxt "calendar heading"
msgid "%B %-d"
msgstr "%B %-d"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/dateMenu.js:154
msgctxt "calendar heading"
msgid "%B %-d %Y"
msgstr "%B %-d %Y"
#: js/ui/dateMenu.js:160
msgid "Today"
msgstr "Astăzi"
#: js/ui/dateMenu.js:164
msgid "Tomorrow"
msgstr "Mâine"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/dateMenu.js:180
msgctxt "event list time"
msgid "All Day"
msgstr "Toată ziua"
#: js/ui/dateMenu.js:231
msgid "No Events"
msgstr "Nu există evenimente"
#: js/ui/dateMenu.js:348
msgid "Add world clocks…"
msgstr "Adaugă un fus orar…"
#: js/ui/dateMenu.js:163
#: js/ui/dateMenu.js:349
msgid "World Clocks"
msgstr "Fusuri orare"
#: js/ui/dateMenu.js:443
#: js/ui/dateMenu.js:629
msgid "Loading…"
msgstr "Se încarcă…"
#: js/ui/dateMenu.js:453
#: js/ui/dateMenu.js:639
msgid "Go online for weather information"
msgstr "Conectați-vă la internet pentru informații despre vreme"
#: js/ui/dateMenu.js:455
#: js/ui/dateMenu.js:641
msgid "Weather information is currently unavailable"
msgstr "Informațiile despre vreme nu sunt disponibile momentan"
#: js/ui/dateMenu.js:465
#: js/ui/dateMenu.js:651
msgid "Weather"
msgstr "Vreme"
#: js/ui/dateMenu.js:467
#: js/ui/dateMenu.js:653
msgid "Select weather location…"
msgstr "Selectează locația vremii…"
@ -1303,15 +1317,15 @@ msgstr "%s (la distanță)"
msgid "%s (console)"
msgstr "%s (consolă)"
#: js/ui/extensionDownloader.js:185
#: js/ui/extensionDownloader.js:187
msgid "Install"
msgstr "Instalează"
#: js/ui/extensionDownloader.js:191
#: js/ui/extensionDownloader.js:193
msgid "Install Extension"
msgstr "Instalează extensia"
#: js/ui/extensionDownloader.js:192
#: js/ui/extensionDownloader.js:194
#, javascript-format
msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "Descărcați și instalați „%s” de la extensions.gnome.org?"
@ -1344,11 +1358,11 @@ msgstr "O aplicație vrea să inhibe scurtăturile"
msgid "You can restore shortcuts by pressing %s."
msgstr "Puteți restaura scurtăturile apăsând %s."
#: js/ui/inhibitShortcutsDialog.js:98
#: js/ui/inhibitShortcutsDialog.js:100
msgid "Deny"
msgstr "Refuză"
#: js/ui/inhibitShortcutsDialog.js:105
#: js/ui/inhibitShortcutsDialog.js:107
msgid "Allow"
msgstr "Permite"
@ -1417,7 +1431,7 @@ msgstr "Oprește"
msgid "Leave Off"
msgstr "Lasă oprit"
#: js/ui/keyboard.js:207
#: js/ui/keyboard.js:225
msgid "Region & Language Settings"
msgstr "Configurări de regiune și limbă"
@ -1491,25 +1505,25 @@ msgstr "Blocarea ecranului este dezactivată"
msgid "Screen Locking requires the GNOME display manager."
msgstr "Blocarea ecranului necesită administratorul de afișaj GNOME."
#: js/ui/messageTray.js:1547
#: js/ui/messageTray.js:1476
msgid "System Information"
msgstr "Informații despre sistem"
#: js/ui/mpris.js:204
#: js/ui/mpris.js:203
msgid "Unknown artist"
msgstr "Artist necunoscut"
#: js/ui/mpris.js:214
#: js/ui/mpris.js:213
msgid "Unknown title"
msgstr "Titlu necunoscut"
#: js/ui/overview.js:73
#: js/ui/overview.js:74
msgid "Undo"
msgstr "Anulează"
#. Translators: This is the main view to select
#. activities. See also note for "Activities" string.
#: js/ui/overview.js:86
#: js/ui/overview.js:87
msgid "Overview"
msgstr "Prezentare generală"
@ -1517,7 +1531,7 @@ msgstr "Prezentare generală"
#. in the search entry when no search is
#. active; it should not exceed ~30
#. characters.
#: js/ui/overview.js:107
#: js/ui/overview.js:108
msgid "Type to search"
msgstr "Tastați pentru a căuta"
@ -1545,23 +1559,23 @@ msgstr "Alochează tasta apăsată"
msgid "Done"
msgstr "Gata"
#: js/ui/padOsd.js:745
#: js/ui/padOsd.js:732
msgid "Edit…"
msgstr "Editează…"
#: js/ui/padOsd.js:787 js/ui/padOsd.js:910
#: js/ui/padOsd.js:774 js/ui/padOsd.js:891
msgid "None"
msgstr "Nespecificat"
#: js/ui/padOsd.js:863
#: js/ui/padOsd.js:845
msgid "Press a button to configure"
msgstr "Apăsați un buton de configurat"
#: js/ui/padOsd.js:864
#: js/ui/padOsd.js:846
msgid "Press Esc to exit"
msgstr "Apăsați Esc pentru a ieși"
#: js/ui/padOsd.js:867
#: js/ui/padOsd.js:849
msgid "Press any key to exit"
msgstr "Apăsați orice tastă pentru a ieși"
@ -1826,17 +1840,17 @@ msgstr "Locația dezactivată"
msgid "Enable"
msgstr "Activează"
#: js/ui/status/location.js:355
#: js/ui/status/location.js:350
msgid "Allow location access"
msgstr "Permite accesul la locație"
#. Translators: %s is an application name
#: js/ui/status/location.js:357
#: js/ui/status/location.js:352
#, javascript-format
msgid "The app %s wants to access your location"
msgstr "Aplicația %s dorește să vă acceseze locația"
#: js/ui/status/location.js:367
#: js/ui/status/location.js:362
msgid "Location access can be changed at any time from the privacy settings."
msgstr ""
"Accesul la locație poate fi schimbat oricând din configurările de "
@ -2175,11 +2189,11 @@ msgstr "Eroare de autorizare Thunderbolt"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "Nu s-a putut autoriza dispozitivul Thunderbolt: %s"
#: js/ui/status/volume.js:154
#: js/ui/status/volume.js:155
msgid "Volume changed"
msgstr "Volumul a fost schimbat"
#: js/ui/status/volume.js:225
#: js/ui/status/volume.js:217
msgid "Volume"
msgstr "Volum"
@ -2225,19 +2239,19 @@ msgstr "Glisați în sus pentru a debloca"
msgid "Click or press a key to unlock"
msgstr "Apăsați clic sau o tastă pentru a debloca"
#: js/ui/unlockDialog.js:550
#: js/ui/unlockDialog.js:555
msgid "Unlock Window"
msgstr "Deblochează fereastră"
#: js/ui/unlockDialog.js:559
#: js/ui/unlockDialog.js:564
msgid "Log in as another user"
msgstr "Intră în sesiune ca utilizator diferit"
#: js/ui/viewSelector.js:181
#: js/ui/viewSelector.js:182
msgid "Applications"
msgstr "Aplicații"
#: js/ui/viewSelector.js:185
#: js/ui/viewSelector.js:186
msgid "Search"
msgstr "Caută"
@ -2365,12 +2379,12 @@ msgstr "Utilizează un mod specific, de exemplu „gdm” pentru ecranul de loga
msgid "List possible modes"
msgstr "Enumeră câmpurile care pot fi afișate"
#: src/shell-app.c:286
#: src/shell-app.c:268
msgctxt "program"
msgid "Unknown"
msgstr "Necunoscut"
#: src/shell-app.c:537
#: src/shell-app.c:519
#, c-format
msgid "Failed to launch “%s”"
msgstr "Nu s-a putut lansa „%s”"
@ -2434,7 +2448,8 @@ msgstr "Elimină"
#: subprojects/extensions-app/js/main.js:182
msgid "translator-credits"
msgstr "Florentina Mușat <emryslokadottir [at] gmail [dot] com>, 2020"
msgstr ""
"Florentina Mușat <florentina [dot] musat [dot] 28 [at] gmail [dot] com>, 2020"
#: subprojects/extensions-app/js/main.js:314
#, javascript-format
@ -2453,7 +2468,7 @@ msgid "The extension had an error"
msgstr "Extensia a avut o eroare"
#: subprojects/extensions-app/data/ui/extension-row.ui:109
#: subprojects/extensions-tool/src/command-create.c:301
#: subprojects/extensions-tool/src/command-create.c:325
#: subprojects/extensions-tool/src/main.c:241
msgid "Description"
msgstr "Descriere"
@ -2534,12 +2549,12 @@ msgid "Log Out…"
msgstr "Deautentificare…"
#. Translators: a file path to an extension directory
#: subprojects/extensions-tool/src/command-create.c:202
#: subprojects/extensions-tool/src/command-create.c:226
#, c-format
msgid "The new extension was successfully created in %s.\n"
msgstr "Extensia nouă a fost creată cu succes la %s.\n"
#: subprojects/extensions-tool/src/command-create.c:275
#: subprojects/extensions-tool/src/command-create.c:299
#, c-format
msgid ""
"Name should be a very short (ideally descriptive) string.\n"
@ -2548,12 +2563,12 @@ msgstr ""
"Numele ar trebui să fie un șir foarte scurt (ideal descriptiv).\n"
"Exemple: %s"
#: subprojects/extensions-tool/src/command-create.c:281
#: subprojects/extensions-tool/src/command-create.c:305
#: subprojects/extensions-tool/src/main.c:238
msgid "Name"
msgstr "Nume"
#: subprojects/extensions-tool/src/command-create.c:295
#: subprojects/extensions-tool/src/command-create.c:319
#, c-format
msgid ""
"Description is a single-sentence explanation of what your extension does.\n"
@ -2563,7 +2578,7 @@ msgstr ""
"extensia.\n"
"Exemple: %s"
#: subprojects/extensions-tool/src/command-create.c:315
#: subprojects/extensions-tool/src/command-create.c:339
msgid ""
"UUID is a globally-unique identifier for your extension.\n"
"This should be in the format of an email address (clicktofocus@janedoe."
@ -2573,56 +2588,56 @@ msgstr ""
"Aceasta ar trebui să fie în formatul unei adrese de email "
"(clicktofocus@janedoe.example.com)\n"
#: subprojects/extensions-tool/src/command-create.c:342
#: subprojects/extensions-tool/src/command-create.c:366
msgid "Choose one of the available templates:\n"
msgstr "Alege unul din șabloanele existente:\n"
#: subprojects/extensions-tool/src/command-create.c:356
#: subprojects/extensions-tool/src/command-create.c:380
msgid "Template"
msgstr "Șablon"
#: subprojects/extensions-tool/src/command-create.c:411
#: subprojects/extensions-tool/src/command-create.c:435
msgid "The unique identifier of the new extension"
msgstr "Identificatorul unic al noii extensii"
#: subprojects/extensions-tool/src/command-create.c:414
#: subprojects/extensions-tool/src/command-create.c:438
msgid "NAME"
msgstr "NUME"
#: subprojects/extensions-tool/src/command-create.c:415
#: subprojects/extensions-tool/src/command-create.c:439
msgid "The user-visible name of the new extension"
msgstr "Numele vizibil de utilizator pentru noua extensie"
#: subprojects/extensions-tool/src/command-create.c:417
#: subprojects/extensions-tool/src/command-create.c:441
msgid "DESCRIPTION"
msgstr "DESCRIERE"
#: subprojects/extensions-tool/src/command-create.c:419
#: subprojects/extensions-tool/src/command-create.c:443
msgid "A short description of what the extension does"
msgstr "O scurtă descriere despre ce face extensia"
#: subprojects/extensions-tool/src/command-create.c:422
#: subprojects/extensions-tool/src/command-create.c:446
msgid "TEMPLATE"
msgstr "ȘABLON"
#: subprojects/extensions-tool/src/command-create.c:423
#: subprojects/extensions-tool/src/command-create.c:447
msgid "The template to use for the new extension"
msgstr "Șablonul de utilizat pentru extensia nouă"
#: subprojects/extensions-tool/src/command-create.c:429
#: subprojects/extensions-tool/src/command-create.c:453
msgid "Enter extension information interactively"
msgstr "Introdu informațiile extensiei interactiv"
#: subprojects/extensions-tool/src/command-create.c:437
#: subprojects/extensions-tool/src/command-create.c:461
msgid "Create a new extension"
msgstr "Creează o nouă extensie"
#: subprojects/extensions-tool/src/command-create.c:455
#: subprojects/extensions-tool/src/command-create.c:479
#: subprojects/extensions-tool/src/command-list.c:172
msgid "Unknown arguments"
msgstr "Argumente necunoscute"
#: subprojects/extensions-tool/src/command-create.c:480
#: subprojects/extensions-tool/src/command-create.c:504
msgid "UUID, name and description are required"
msgstr "UUID-ul, numele și descrierea sunt necesare"
@ -2946,6 +2961,23 @@ msgstr[2] "%u de intrări"
msgid "System Sounds"
msgstr "Sunete de sistem"
#~ msgid "Frequently used applications will appear here"
#~ msgstr "Aplicațiile utilizate frecvent vor fi afișate aici"
#~ msgid "Frequent"
#~ msgstr "Frecvente"
#~ msgid "All"
#~ msgstr "Toate"
#~ msgctxt "calendar heading"
#~ msgid "%A, %B %-d"
#~ msgstr "%A, %B %-d"
#~ msgctxt "calendar heading"
#~ msgid "%A, %B %-d, %Y"
#~ msgstr "%A, %B %-d, %Y"
#~ msgid "Copy Error"
#~ msgstr "Eroare la copiere"
@ -3115,12 +3147,6 @@ msgstr "Sunete de sistem"
#~ msgid "Nothing Scheduled"
#~ msgstr "Nimic programat"
#~ msgid "Today"
#~ msgstr "Astăzi"
#~ msgid "Tomorrow"
#~ msgstr "Mâine"
#~ msgid "This week"
#~ msgstr "Săptămâna aceasta"

403
po/tr.po
View File

@ -17,8 +17,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: 2020-05-15 18:43+0000\n"
"PO-Revision-Date: 2020-05-16 12:12+0300\n"
"POT-Creation-Date: 2020-07-29 07:55+0000\n"
"PO-Revision-Date: 2020-07-30 00:49+0300\n"
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
"Language-Team: Türkçe <gnome-turk@gnome.org>\n"
"Language: tr\n"
@ -225,91 +225,107 @@ msgstr ""
"Kabuğun uygulama durumunu gözden geçirmeyi sağlayan D-Bus APIʼsını "
"etkinleştirir."
#: data/org.gnome.shell.gschema.xml.in:119
#: data/org.gnome.shell.gschema.xml.in:114
msgid "Layout of the app picker"
msgstr "Uygulama seçicinin düzeni"
#: data/org.gnome.shell.gschema.xml.in:115
msgid ""
"Layout of the app picker. Each entry in the array is a page. Pages are "
"stored in the order they appear in GNOME Shell. Each page contains an "
"“application id” → 'data' pair. Currently, the following values are stored "
"as 'data': • “position”: the position of the application icon in the page"
msgstr ""
"Uygulama seçicinin düzeni. Dizideki her girdi bir sayfadır. Sayfalar "
"GNOME Kabuğunda göründüğü sırayla depolanır. Her sayfa bir “application id” "
"→ 'data' çifti içerir. Şimdilik şu değerler 'data' olarak depolanır: "
"• “position”: sayfadaki uygulama simgesinin konumu"
#: data/org.gnome.shell.gschema.xml.in:130
msgid "Keybinding to open the application menu"
msgstr "Uygulama menüsünü açmak için klavye kısayolu"
#: data/org.gnome.shell.gschema.xml.in:120
#: data/org.gnome.shell.gschema.xml.in:131
msgid "Keybinding to open the application menu."
msgstr "Uygulama menüsünü açmak için klavye kısayolu."
#: data/org.gnome.shell.gschema.xml.in:126
#: data/org.gnome.shell.gschema.xml.in:137
msgid "Keybinding to open the “Show Applications” view"
msgstr "“Uygulamaları Göster” görünümünü açmak için klavye kısayolu"
#: data/org.gnome.shell.gschema.xml.in:127
#: data/org.gnome.shell.gschema.xml.in:138
msgid ""
"Keybinding to open the “Show Applications” view of the Activities Overview."
msgstr ""
"Etkinlikler Genel Görünümünün “Uygulamaları Göster” görünümünü açmak için "
"klavye kısayolu."
#: data/org.gnome.shell.gschema.xml.in:134
#: data/org.gnome.shell.gschema.xml.in:145
msgid "Keybinding to open the overview"
msgstr "Genel görünümü açmak için klavye kısayolu"
#: data/org.gnome.shell.gschema.xml.in:135
#: data/org.gnome.shell.gschema.xml.in:146
msgid "Keybinding to open the Activities Overview."
msgstr "Etkinlikler Genel Görünümünü açmak için klavye kısayolu."
#: data/org.gnome.shell.gschema.xml.in:141
#: data/org.gnome.shell.gschema.xml.in:152
msgid "Keybinding to toggle the visibility of the notification list"
msgstr "Bildirim listesinin görünürlüğünü değiştirmek için klavye kısayolu"
#: data/org.gnome.shell.gschema.xml.in:142
#: data/org.gnome.shell.gschema.xml.in:153
msgid "Keybinding to toggle the visibility of the notification list."
msgstr "Bildirim listesinin görünürlüğünü değiştirmek için klavye kısayolu."
#: data/org.gnome.shell.gschema.xml.in:148
#: data/org.gnome.shell.gschema.xml.in:159
msgid "Keybinding to focus the active notification"
msgstr "Etkin bildirime odaklanmak için klavye kısayolu"
#: data/org.gnome.shell.gschema.xml.in:149
#: data/org.gnome.shell.gschema.xml.in:160
msgid "Keybinding to focus the active notification."
msgstr "Etkin bildirime odaklanmak için klavye kısayolu."
#: data/org.gnome.shell.gschema.xml.in:155
#: data/org.gnome.shell.gschema.xml.in:166
msgid "Switch to application 1"
msgstr "Uygulama 1ʼe geç"
#: data/org.gnome.shell.gschema.xml.in:159
#: data/org.gnome.shell.gschema.xml.in:170
msgid "Switch to application 2"
msgstr "Uygulama 2ʼye geç"
#: data/org.gnome.shell.gschema.xml.in:163
#: data/org.gnome.shell.gschema.xml.in:174
msgid "Switch to application 3"
msgstr "Uygulama 3ʼe geç"
#: data/org.gnome.shell.gschema.xml.in:167
#: data/org.gnome.shell.gschema.xml.in:178
msgid "Switch to application 4"
msgstr "Uygulama 4ʼe geç"
#: data/org.gnome.shell.gschema.xml.in:171
#: data/org.gnome.shell.gschema.xml.in:182
msgid "Switch to application 5"
msgstr "Uygulama 5ʼe geç"
#: data/org.gnome.shell.gschema.xml.in:175
#: data/org.gnome.shell.gschema.xml.in:186
msgid "Switch to application 6"
msgstr "Uygulama 6ʼya geç"
#: data/org.gnome.shell.gschema.xml.in:179
#: data/org.gnome.shell.gschema.xml.in:190
msgid "Switch to application 7"
msgstr "Uygulama 7ʼye geç"
#: data/org.gnome.shell.gschema.xml.in:183
#: data/org.gnome.shell.gschema.xml.in:194
msgid "Switch to application 8"
msgstr "Uygulama 8ʼe geç"
#: data/org.gnome.shell.gschema.xml.in:187
#: data/org.gnome.shell.gschema.xml.in:198
msgid "Switch to application 9"
msgstr "Uygulama 9ʼa geç"
#: data/org.gnome.shell.gschema.xml.in:196
#: data/org.gnome.shell.gschema.xml.in:223
#: data/org.gnome.shell.gschema.xml.in:207
#: data/org.gnome.shell.gschema.xml.in:234
msgid "Limit switcher to current workspace."
msgstr "Geçiş menüsünü geçerli çalışma alanıyla sınırla."
#: data/org.gnome.shell.gschema.xml.in:197
#: data/org.gnome.shell.gschema.xml.in:208
msgid ""
"If true, only applications that have windows on the current workspace are "
"shown in the switcher. Otherwise, all applications are included."
@ -318,11 +334,11 @@ msgstr ""
"uygulamalar geçiş menüsünde gösterilir. Aksi halde, tüm uygulamalar "
"görünecektir."
#: data/org.gnome.shell.gschema.xml.in:214
#: data/org.gnome.shell.gschema.xml.in:225
msgid "The application icon mode."
msgstr "Uygulama simge kipi."
#: data/org.gnome.shell.gschema.xml.in:215
#: data/org.gnome.shell.gschema.xml.in:226
msgid ""
"Configures how the windows are shown in the switcher. Valid possibilities "
"are “thumbnail-only” (shows a thumbnail of the window), “app-icon-"
@ -333,7 +349,7 @@ msgstr ""
"only” (yalnızca uygulama simgesini gösterir) ya da “both” (her ikisi) "
"değerleridir."
#: data/org.gnome.shell.gschema.xml.in:224
#: data/org.gnome.shell.gschema.xml.in:235
msgid ""
"If true, only windows from the current workspace are shown in the switcher. "
"Otherwise, all windows are included."
@ -341,59 +357,59 @@ msgstr ""
"Eğer bu seçenek etkinse, yalnızca geçerli çalışma alanındaki pencereler "
"geçiş menüsünde gösterilir. Aksi halde, tüm pencereler görünecektir."
#: data/org.gnome.shell.gschema.xml.in:234
#: data/org.gnome.shell.gschema.xml.in:245
msgid "Locations"
msgstr "Konumlar"
#: data/org.gnome.shell.gschema.xml.in:235
#: data/org.gnome.shell.gschema.xml.in:246
msgid "The locations to show in world clocks"
msgstr "Dünya saatlerinde gösterilecek konumlar"
#: data/org.gnome.shell.gschema.xml.in:245
#: data/org.gnome.shell.gschema.xml.in:256
msgid "Automatic location"
msgstr "Kendiliğinden konumlama"
#: data/org.gnome.shell.gschema.xml.in:246
#: data/org.gnome.shell.gschema.xml.in:257
msgid "Whether to fetch the current location or not"
msgstr "Geçerli konumun getirilip getirilmeyeceğini belirler"
#: data/org.gnome.shell.gschema.xml.in:253
#: data/org.gnome.shell.gschema.xml.in:264
msgid "Location"
msgstr "Konum"
#: data/org.gnome.shell.gschema.xml.in:254
#: data/org.gnome.shell.gschema.xml.in:265
msgid "The location for which to show a forecast"
msgstr "Hava durumunun gösterileceği konum"
#: data/org.gnome.shell.gschema.xml.in:266
#: data/org.gnome.shell.gschema.xml.in:277
msgid "Attach modal dialog to the parent window"
msgstr "Yardımcı iletişim penceresini üst pencereye iliştir"
#: data/org.gnome.shell.gschema.xml.in:267
#: data/org.gnome.shell.gschema.xml.in:276
#: data/org.gnome.shell.gschema.xml.in:284
#: data/org.gnome.shell.gschema.xml.in:292
#: data/org.gnome.shell.gschema.xml.in:300
#: data/org.gnome.shell.gschema.xml.in:278
#: data/org.gnome.shell.gschema.xml.in:287
#: data/org.gnome.shell.gschema.xml.in:295
#: data/org.gnome.shell.gschema.xml.in:303
#: data/org.gnome.shell.gschema.xml.in:311
msgid ""
"This key overrides the key in org.gnome.mutter when running GNOME Shell."
msgstr ""
"Bu anahtar, GNOME Shell çalışırken org.gnome.mutter içindeki anahtarı "
"geçersiz kılar."
#: data/org.gnome.shell.gschema.xml.in:275
#: data/org.gnome.shell.gschema.xml.in:286
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr ""
"Pencereler ekran kenarlarında bırakıldığında kenar döşemeyi etkinleştir"
#: data/org.gnome.shell.gschema.xml.in:283
#: data/org.gnome.shell.gschema.xml.in:294
msgid "Workspaces are managed dynamically"
msgstr "Çalışma alanları dinamik olarak yönetilir"
#: data/org.gnome.shell.gschema.xml.in:291
#: data/org.gnome.shell.gschema.xml.in:302
msgid "Workspaces only on primary monitor"
msgstr "Çalışma alanları yalnızca birincil ekranda"
#: data/org.gnome.shell.gschema.xml.in:299
#: data/org.gnome.shell.gschema.xml.in:310
msgid "Delay focus changes in mouse mode until the pointer stops moving"
msgstr ""
"Fare kipinde odak değişikliklerini işaretçi hareketi durana kadar beklet"
@ -430,7 +446,7 @@ msgstr "Uzantı ana sayfasını ziyaret et"
#: js/gdm/authPrompt.js:135 js/ui/audioDeviceSelection.js:57
#: js/ui/components/networkAgent.js:110 js/ui/components/polkitAgent.js:139
#: js/ui/endSessionDialog.js:369 js/ui/extensionDownloader.js:181
#: js/ui/endSessionDialog.js:369 js/ui/extensionDownloader.js:183
#: js/ui/shellMountOperation.js:376 js/ui/shellMountOperation.js:386
#: js/ui/status/network.js:916 subprojects/extensions-app/js/main.js:149
msgid "Cancel"
@ -468,11 +484,11 @@ msgstr "(örneğin, kullanıcı veya %s)"
msgid "Username"
msgstr "Kullanıcı Adı"
#: js/gdm/loginDialog.js:1254
#: js/gdm/loginDialog.js:1253
msgid "Login Window"
msgstr "Oturum Açma Penceresi"
#: js/gdm/util.js:345
#: js/gdm/util.js:355
msgid "Authentication error"
msgstr "Kimlik doğrulama hatası"
@ -481,7 +497,7 @@ msgstr "Kimlik doğrulama hatası"
#. 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:471
#: js/gdm/util.js:481
msgid "(or swipe finger)"
msgstr "(ya da parmak izi okut)"
@ -586,7 +602,7 @@ msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d saat önce"
#: js/misc/util.js:191
#: js/misc/util.js:191 js/ui/dateMenu.js:162
msgid "Yesterday"
msgstr "Dün"
@ -702,56 +718,44 @@ msgstr ""
#. No support for non-modal system dialogs, so ignore the option
#. let modal = options['modal'] || true;
#: js/ui/accessDialog.js:39 js/ui/status/location.js:374
#: js/ui/accessDialog.js:39 js/ui/status/location.js:369
msgid "Deny Access"
msgstr "Erişimi Reddet"
#: js/ui/accessDialog.js:40 js/ui/status/location.js:377
#: js/ui/accessDialog.js:40 js/ui/status/location.js:372
msgid "Grant Access"
msgstr "Erişime İzin Ver"
#: js/ui/appDisplay.js:944
#: js/ui/appDisplay.js:1297
msgid "Unnamed Folder"
msgstr "Adsız Klasör"
#: js/ui/appDisplay.js:967
msgid "Frequently used applications will appear here"
msgstr "Sık kullanılan uygulamalar burada yer alacak"
#: js/ui/appDisplay.js:1102
msgid "Frequent"
msgstr "Sık Sık"
#: js/ui/appDisplay.js:1109
msgid "All"
msgstr "Tümü"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2486 js/ui/panel.js:75
#: js/ui/appDisplay.js:2767 js/ui/panel.js:75
msgid "Open Windows"
msgstr "Açık Pencereler"
#: js/ui/appDisplay.js:2505 js/ui/panel.js:82
#: js/ui/appDisplay.js:2786 js/ui/panel.js:82
msgid "New Window"
msgstr "Yeni Pencere"
#: js/ui/appDisplay.js:2521
#: js/ui/appDisplay.js:2802
msgid "Launch using Integrated Graphics Card"
msgstr "Tümleşik Ekran Kartıyla Başlat"
#: js/ui/appDisplay.js:2522
#: js/ui/appDisplay.js:2803
msgid "Launch using Discrete Graphics Card"
msgstr "Ayrık Ekran Kartıyla Başlat"
#: js/ui/appDisplay.js:2550 js/ui/dash.js:239
#: js/ui/appDisplay.js:2831 js/ui/dash.js:239
msgid "Remove from Favorites"
msgstr "Sık Kullanılanlardan Çıkar"
#: js/ui/appDisplay.js:2556
#: js/ui/appDisplay.js:2837
msgid "Add to Favorites"
msgstr "Sık Kullanılanlara Ekle"
#: js/ui/appDisplay.js:2566 js/ui/panel.js:93
#: js/ui/appDisplay.js:2847 js/ui/panel.js:93
msgid "Show Details"
msgstr "Ayrıntıları Göster"
@ -781,7 +785,7 @@ msgstr "Kulaklıklar"
msgid "Headset"
msgstr "Kulaklıklı Mikrofon"
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:270
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:272
msgid "Microphone"
msgstr "Mikrofon"
@ -798,7 +802,7 @@ msgid "Settings"
msgstr "Ayarlar"
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday).
#: js/ui/calendar.js:41
#: js/ui/calendar.js:36
msgctxt "calendar-no-work"
msgid "06"
msgstr "06"
@ -808,43 +812,43 @@ msgstr "06"
#. * NOTE: These grid abbreviations are always shown together
#. * and in order, e.g. "S M T W T F S".
#.
#: js/ui/calendar.js:70
#: js/ui/calendar.js:65
msgctxt "grid sunday"
msgid "S"
msgstr "P"
#. Translators: Calendar grid abbreviation for Monday
#: js/ui/calendar.js:72
#: js/ui/calendar.js:67
msgctxt "grid monday"
msgid "M"
msgstr "P"
#. Translators: Calendar grid abbreviation for Tuesday
#: js/ui/calendar.js:74
#: js/ui/calendar.js:69
msgctxt "grid tuesday"
msgid "T"
msgstr "S"
#. Translators: Calendar grid abbreviation for Wednesday
#: js/ui/calendar.js:76
#: js/ui/calendar.js:71
msgctxt "grid wednesday"
msgid "W"
msgstr "Ç"
#. Translators: Calendar grid abbreviation for Thursday
#: js/ui/calendar.js:78
#: js/ui/calendar.js:73
msgctxt "grid thursday"
msgid "T"
msgstr "P"
#. Translators: Calendar grid abbreviation for Friday
#: js/ui/calendar.js:80
#: js/ui/calendar.js:75
msgctxt "grid friday"
msgid "F"
msgstr "C"
#. Translators: Calendar grid abbreviation for Saturday
#: js/ui/calendar.js:82
#: js/ui/calendar.js:77
msgctxt "grid saturday"
msgid "S"
msgstr "C"
@ -855,7 +859,7 @@ msgstr "C"
#. * "%OB" is the new format specifier introduced in glibc 2.27,
#. * in most cases you should not change it.
#.
#: js/ui/calendar.js:397
#: js/ui/calendar.js:392
msgid "%OB"
msgstr "%OB"
@ -868,61 +872,37 @@ msgstr "%OB"
#. * in most cases you should not use the old "%B" here unless you
#. * absolutely know what you are doing.
#.
#: js/ui/calendar.js:407
#: js/ui/calendar.js:402
msgid "%OB %Y"
msgstr "%OB %Y"
#: js/ui/calendar.js:466
#: js/ui/calendar.js:461
msgid "Previous month"
msgstr "Önceki ay"
#: js/ui/calendar.js:481
#: js/ui/calendar.js:476
msgid "Next month"
msgstr "Gelecek ay"
#: js/ui/calendar.js:631
#: js/ui/calendar.js:626
#, no-javascript-format
msgctxt "date day number format"
msgid "%d"
msgstr "%d"
#: js/ui/calendar.js:687
#: js/ui/calendar.js:682
msgid "Week %V"
msgstr "%V. Hafta"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/calendar.js:762
msgctxt "event list time"
msgid "All Day"
msgstr "Tüm Gün"
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/calendar.js:900
msgctxt "calendar heading"
msgid "%A, %B %-d"
msgstr "%A, %-d %B"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/calendar.js:903
msgctxt "calendar heading"
msgid "%A, %B %-d, %Y"
msgstr "%A, %-d %B, %Y"
#: js/ui/calendar.js:1133
#: js/ui/calendar.js:895
msgid "No Notifications"
msgstr "Bildirim Yok"
#: js/ui/calendar.js:1136
msgid "No Events"
msgstr "Olay Yok"
#: js/ui/calendar.js:1190
#: js/ui/calendar.js:949
msgid "Do Not Disturb"
msgstr "Rahatsız Etme"
#: js/ui/calendar.js:1209
#: js/ui/calendar.js:968
msgid "Clear"
msgstr "Temizle"
@ -1076,7 +1056,7 @@ msgstr "Üzgünüm ama işe yaramadı. Lütfen yeniden deneyin."
msgid "%s is now known as %s"
msgstr "%s, şimdi %s olarak biliniyor"
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:177
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:178
msgid "Windows"
msgstr "Pencereler"
@ -1095,7 +1075,7 @@ msgstr "Konsol"
#. * "Tue 9:29 AM"). The string itself should become a full date, e.g.,
#. * "February 17 2015".
#.
#: js/ui/dateMenu.js:75
#: js/ui/dateMenu.js:79
msgid "%B %-d %Y"
msgstr "%-d %B %Y"
@ -1103,35 +1083,67 @@ msgstr "%-d %B %Y"
#. * below the time in the shell; it should combine the weekday and the
#. * date, e.g. "Tuesday February 17 2015".
#.
#: js/ui/dateMenu.js:82
#: js/ui/dateMenu.js:86
msgid "%A %B %e %Y"
msgstr "%e %B %Y %A"
#: js/ui/dateMenu.js:161
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/dateMenu.js:151
msgctxt "calendar heading"
msgid "%B %-d"
msgstr "%-d %B"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/dateMenu.js:154
msgctxt "calendar heading"
msgid "%B %-d %Y"
msgstr "%-d %B %Y"
#: js/ui/dateMenu.js:160
msgid "Today"
msgstr "Bugün"
#: js/ui/dateMenu.js:164
msgid "Tomorrow"
msgstr "Yarın"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/dateMenu.js:180
msgctxt "event list time"
msgid "All Day"
msgstr "Tüm Gün"
#: js/ui/dateMenu.js:231
msgid "No Events"
msgstr "Olay Yok"
#: js/ui/dateMenu.js:348
msgid "Add world clocks…"
msgstr "Dünya saatlerini ekle…"
#: js/ui/dateMenu.js:162
#: js/ui/dateMenu.js:349
msgid "World Clocks"
msgstr "Dünya Saatleri"
#: js/ui/dateMenu.js:424
#: js/ui/dateMenu.js:629
msgid "Loading…"
msgstr "Yükleniyor…"
#: js/ui/dateMenu.js:434
#: js/ui/dateMenu.js:639
msgid "Go online for weather information"
msgstr "Hava durumu bilgisi için çevrim içi olun"
#: js/ui/dateMenu.js:436
#: js/ui/dateMenu.js:641
msgid "Weather information is currently unavailable"
msgstr "Hava durumu bilgisi şu anda kullanılabilir değil"
#: js/ui/dateMenu.js:446
#: js/ui/dateMenu.js:651
msgid "Weather"
msgstr "Hava Durumu"
#: js/ui/dateMenu.js:448
#: js/ui/dateMenu.js:653
msgid "Select weather location…"
msgstr "Hava durumu konumu seç…"
@ -1277,24 +1289,24 @@ msgstr "%s (uzak)"
msgid "%s (console)"
msgstr "%s (uçbirim)"
#: js/ui/extensionDownloader.js:185
#: js/ui/extensionDownloader.js:187
msgid "Install"
msgstr "Kur"
#: js/ui/extensionDownloader.js:191
#: js/ui/extensionDownloader.js:193
msgid "Install Extension"
msgstr "Uzantı Yükle"
#: js/ui/extensionDownloader.js:192
#: js/ui/extensionDownloader.js:194
#, javascript-format
msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "extensions.gnome.org üstünden “%s” uzantısı indirilip kurulsun mu?"
#: js/ui/extensionSystem.js:251
#: js/ui/extensionSystem.js:252
msgid "Extension Updates Available"
msgstr "Uzantı Güncellemeleri Var"
#: js/ui/extensionSystem.js:252
#: js/ui/extensionSystem.js:253
msgid "Extension updates are ready to be installed."
msgstr "Uzantı güncellemeleri kuruluma hazır."
@ -1318,11 +1330,11 @@ msgstr "Bir uygulama, kısayolları baskılamak istiyor"
msgid "You can restore shortcuts by pressing %s."
msgstr "%s kısayoluyla, kısayolları geri yükleyebilirsiniz."
#: js/ui/inhibitShortcutsDialog.js:98
#: js/ui/inhibitShortcutsDialog.js:100
msgid "Deny"
msgstr "Reddet"
#: js/ui/inhibitShortcutsDialog.js:105
#: js/ui/inhibitShortcutsDialog.js:107
msgid "Allow"
msgstr "İzin ver"
@ -1388,7 +1400,7 @@ msgstr "Kapat"
msgid "Leave Off"
msgstr "Kapalı Bırak"
#: js/ui/keyboard.js:207
#: js/ui/keyboard.js:225
msgid "Region & Language Settings"
msgstr "Bölge ve Dil Ayarları"
@ -1421,6 +1433,7 @@ msgid "Disabled"
msgstr "Devre dışı"
#: js/ui/lookingGlass.js:743
#: subprojects/extensions-app/data/ui/extension-row.ui:188
msgid "Error"
msgstr "Hata"
@ -1460,25 +1473,25 @@ msgstr "Ekran Kilidi devre dışı"
msgid "Screen Locking requires the GNOME display manager."
msgstr "Ekran Kilitleme, GNOME ekran yöneticisi gerektirir."
#: js/ui/messageTray.js:1547
#: js/ui/messageTray.js:1476
msgid "System Information"
msgstr "Sistem Bilgisi"
#: js/ui/mpris.js:204
#: js/ui/mpris.js:203
msgid "Unknown artist"
msgstr "Bilinmeyen sanatçı"
#: js/ui/mpris.js:214
#: js/ui/mpris.js:213
msgid "Unknown title"
msgstr "Bilinmeyen başlık"
#: js/ui/overview.js:73
#: js/ui/overview.js:74
msgid "Undo"
msgstr "Geri Al"
#. Translators: This is the main view to select
#. activities. See also note for "Activities" string.
#: js/ui/overview.js:86
#: js/ui/overview.js:87
msgid "Overview"
msgstr "Genel Görünüm"
@ -1486,7 +1499,7 @@ msgstr "Genel Görünüm"
#. in the search entry when no search is
#. active; it should not exceed ~30
#. characters.
#: js/ui/overview.js:107
#: js/ui/overview.js:108
msgid "Type to search"
msgstr "Aramak için yaz"
@ -1514,23 +1527,23 @@ msgstr "Tuş vuruşu ata"
msgid "Done"
msgstr "Bitti"
#: js/ui/padOsd.js:745
#: js/ui/padOsd.js:732
msgid "Edit…"
msgstr "Düzenle…"
#: js/ui/padOsd.js:787 js/ui/padOsd.js:910
#: js/ui/padOsd.js:774 js/ui/padOsd.js:891
msgid "None"
msgstr "Yok"
#: js/ui/padOsd.js:863
#: js/ui/padOsd.js:845
msgid "Press a button to configure"
msgstr "Yapılandırmak için düğmeye bas"
#: js/ui/padOsd.js:864
#: js/ui/padOsd.js:846
msgid "Press Esc to exit"
msgstr "Çıkmak için Escye bas"
#: js/ui/padOsd.js:867
#: js/ui/padOsd.js:849
msgid "Press any key to exit"
msgstr "Çıkmak için herhangi bir tuşa bas"
@ -1588,15 +1601,15 @@ msgstr "Kilitlenemedi"
msgid "Lock was blocked by an application"
msgstr "Kilitleme bir uygulama tarafından engellendi"
#: js/ui/search.js:702
#: js/ui/search.js:823
msgid "Searching…"
msgstr "Aranıyor…"
#: js/ui/search.js:704
#: js/ui/search.js:825
msgid "No results."
msgstr "Sonuç yok."
#: js/ui/search.js:830
#: js/ui/search.js:951
#, javascript-format
msgid "%d more"
msgid_plural "%d more"
@ -1793,17 +1806,17 @@ msgstr "Konum Devre Dışı"
msgid "Enable"
msgstr "Etkinleştir"
#: js/ui/status/location.js:355
#: js/ui/status/location.js:350
msgid "Allow location access"
msgstr "Konum erişimine izin ver"
#. Translators: %s is an application name
#: js/ui/status/location.js:357
#: js/ui/status/location.js:352
#, javascript-format
msgid "The app %s wants to access your location"
msgstr "%s uygulaması konumunuza erişmek istiyor"
#: js/ui/status/location.js:367
#: js/ui/status/location.js:362
msgid "Location access can be changed at any time from the privacy settings."
msgstr "Konum erişimi, gizlilik ayarlarından her zaman değiştirilebilir."
@ -2134,11 +2147,11 @@ msgstr "Thunderbolt yetkilendirme hatası"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "Thunderbolt aygıtı yetkilendirilemedi: %s"
#: js/ui/status/volume.js:151
#: js/ui/status/volume.js:155
msgid "Volume changed"
msgstr "Bölüm değişti"
#: js/ui/status/volume.js:222
#: js/ui/status/volume.js:217
msgid "Volume"
msgstr "Bölüm"
@ -2184,19 +2197,19 @@ msgstr "Kilidi açmak için yukarı kaydır"
msgid "Click or press a key to unlock"
msgstr "Kilidi açmak için tıklayın veya tuşa basın"
#: js/ui/unlockDialog.js:550
#: js/ui/unlockDialog.js:555
msgid "Unlock Window"
msgstr "Kilit Açma Penceresi"
#: js/ui/unlockDialog.js:559
#: js/ui/unlockDialog.js:564
msgid "Log in as another user"
msgstr "Başka kullanıcı olarak oturum aç"
#: js/ui/viewSelector.js:181
#: js/ui/viewSelector.js:182
msgid "Applications"
msgstr "Uygulamalar"
#: js/ui/viewSelector.js:185
#: js/ui/viewSelector.js:186
msgid "Search"
msgstr "Ara"
@ -2322,12 +2335,12 @@ msgstr "Oturum açma ekranı için -“gdm” gibi- özel kip kullan"
msgid "List possible modes"
msgstr "Olası kipleri listele"
#: src/shell-app.c:286
#: src/shell-app.c:268
msgctxt "program"
msgid "Unknown"
msgstr "Bilinmeyen"
#: src/shell-app.c:537
#: src/shell-app.c:519
#, c-format
msgid "Failed to launch “%s”"
msgstr "“%s” başlatılamadı"
@ -2402,26 +2415,34 @@ msgid "%d extension will be updated on next login."
msgid_plural "%d extensions will be updated on next login."
msgstr[0] "%d uzantı sonraki girişte güncellenecek."
#: subprojects/extensions-app/data/ui/extension-row.ui:100
#: subprojects/extensions-tool/src/command-create.c:301
#: subprojects/extensions-app/js/main.js:461
msgid "The extension is incompatible with the current GNOME version"
msgstr "Uzantı, geçerli GNOME sürümüyle uyumsuz"
#: subprojects/extensions-app/js/main.js:464
msgid "The extension had an error"
msgstr "Uzantıda hata oluştu"
#: subprojects/extensions-app/data/ui/extension-row.ui:109
#: subprojects/extensions-tool/src/command-create.c:325
#: subprojects/extensions-tool/src/main.c:241
msgid "Description"
msgstr "Açıklama"
#: subprojects/extensions-app/data/ui/extension-row.ui:123
#: subprojects/extensions-app/data/ui/extension-row.ui:132
#: subprojects/extensions-tool/src/main.c:253
msgid "Version"
msgstr "Sürüm"
#: subprojects/extensions-app/data/ui/extension-row.ui:151
#: subprojects/extensions-app/data/ui/extension-row.ui:160
msgid "Author"
msgstr "Yazar"
#: subprojects/extensions-app/data/ui/extension-row.ui:175
#: subprojects/extensions-app/data/ui/extension-row.ui:216
msgid "Website"
msgstr "Web Sitesi"
#: subprojects/extensions-app/data/ui/extension-row.ui:192
#: subprojects/extensions-app/data/ui/extension-row.ui:233
msgid "Remove…"
msgstr "Kaldır…"
@ -2483,12 +2504,12 @@ msgid "Log Out…"
msgstr "Oturumu Kapat…"
#. Translators: a file path to an extension directory
#: subprojects/extensions-tool/src/command-create.c:202
#: subprojects/extensions-tool/src/command-create.c:226
#, c-format
msgid "The new extension was successfully created in %s.\n"
msgstr "Yeni uzantı %s içinde oluşturuldu.\n"
#: subprojects/extensions-tool/src/command-create.c:275
#: subprojects/extensions-tool/src/command-create.c:299
#, c-format
msgid ""
"Name should be a very short (ideally descriptive) string.\n"
@ -2497,12 +2518,12 @@ msgstr ""
"Ad çok kısa (ideal olarak açıklayıcı) dizge olmalıdır.\n"
"Örnekler: %s"
#: subprojects/extensions-tool/src/command-create.c:281
#: subprojects/extensions-tool/src/command-create.c:305
#: subprojects/extensions-tool/src/main.c:238
msgid "Name"
msgstr "Ad"
#: subprojects/extensions-tool/src/command-create.c:295
#: subprojects/extensions-tool/src/command-create.c:319
#, c-format
msgid ""
"Description is a single-sentence explanation of what your extension does.\n"
@ -2511,7 +2532,7 @@ msgstr ""
"Açıklama, uzantınızın ne yaptığı anlatan tek tümcelik tanımlamadır.\n"
"Örnekler: %s"
#: subprojects/extensions-tool/src/command-create.c:315
#: subprojects/extensions-tool/src/command-create.c:339
msgid ""
"UUID is a globally-unique identifier for your extension.\n"
"This should be in the format of an email address (clicktofocus@janedoe."
@ -2520,56 +2541,56 @@ msgstr ""
"UUID, uzantınız için genel ve benzersiz tanımlayıcıdır.\n"
"E-posta biçiminde olmalıdır (clicktofocus@janedoe.example.com)\n"
#: subprojects/extensions-tool/src/command-create.c:342
#: subprojects/extensions-tool/src/command-create.c:366
msgid "Choose one of the available templates:\n"
msgstr "Uygun şablonlardan birini seçin:\n"
#: subprojects/extensions-tool/src/command-create.c:356
#: subprojects/extensions-tool/src/command-create.c:380
msgid "Template"
msgstr "Şablon"
#: subprojects/extensions-tool/src/command-create.c:411
#: subprojects/extensions-tool/src/command-create.c:435
msgid "The unique identifier of the new extension"
msgstr "Yeni uzantının eşsiz tanımlayıcısı"
#: subprojects/extensions-tool/src/command-create.c:414
#: subprojects/extensions-tool/src/command-create.c:438
msgid "NAME"
msgstr "AD"
#: subprojects/extensions-tool/src/command-create.c:415
#: subprojects/extensions-tool/src/command-create.c:439
msgid "The user-visible name of the new extension"
msgstr "Yeni uzantının kullanıcı tarafından görülebilir adı"
#: subprojects/extensions-tool/src/command-create.c:417
#: subprojects/extensions-tool/src/command-create.c:441
msgid "DESCRIPTION"
msgstr "AÇIKLAMA"
#: subprojects/extensions-tool/src/command-create.c:419
#: subprojects/extensions-tool/src/command-create.c:443
msgid "A short description of what the extension does"
msgstr "Uzantının ne yaptığına dair kısa açıklama"
#: subprojects/extensions-tool/src/command-create.c:422
#: subprojects/extensions-tool/src/command-create.c:446
msgid "TEMPLATE"
msgstr "ŞABLON"
#: subprojects/extensions-tool/src/command-create.c:423
#: subprojects/extensions-tool/src/command-create.c:447
msgid "The template to use for the new extension"
msgstr "Yeni uzantı için kullanılacak şablon"
#: subprojects/extensions-tool/src/command-create.c:429
#: subprojects/extensions-tool/src/command-create.c:453
msgid "Enter extension information interactively"
msgstr "Uzantı bilgisini etkileşimli olarak gir"
#: subprojects/extensions-tool/src/command-create.c:437
#: subprojects/extensions-tool/src/command-create.c:461
msgid "Create a new extension"
msgstr "Yeni uzantı oluştur"
#: subprojects/extensions-tool/src/command-create.c:455
#: subprojects/extensions-tool/src/command-create.c:479
#: subprojects/extensions-tool/src/command-list.c:172
msgid "Unknown arguments"
msgstr "Bilinmeyen argüman"
#: subprojects/extensions-tool/src/command-create.c:480
#: subprojects/extensions-tool/src/command-create.c:504
msgid "UUID, name and description are required"
msgstr "UUID, ad ve açıklama gereklidir"
@ -2889,7 +2910,23 @@ msgstr[0] "%u Girdi"
msgid "System Sounds"
msgstr "Sistem Sesleri"
#, javascript-format
#~ msgid "Frequently used applications will appear here"
#~ msgstr "Sık kullanılan uygulamalar burada yer alacak"
#~ msgid "Frequent"
#~ msgstr "Sık Sık"
#~ msgid "All"
#~ msgstr "Tümü"
#~ msgctxt "calendar heading"
#~ msgid "%A, %B %-d"
#~ msgstr "%A, %-d %B"
#~ msgctxt "calendar heading"
#~ msgid "%A, %B %-d, %Y"
#~ msgstr "%A, %-d %B, %Y"
#~ msgid "%d Connected"
#~ msgid_plural "%d Connected"
#~ msgstr[0] "%d Aygıt Bağlandı"
@ -3217,12 +3254,6 @@ msgstr "Sistem Sesleri"
#~ msgid "Nothing Scheduled"
#~ msgstr "Planınız Boş"
#~ msgid "Today"
#~ msgstr "Bugün"
#~ msgid "Tomorrow"
#~ msgstr "Yarın"
#~ msgid "This week"
#~ msgstr "Bu hafta"

366
po/uk.po
View File

@ -10,8 +10,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: 2020-05-21 23:22+0000\n"
"PO-Revision-Date: 2020-05-22 08:44+0300\n"
"POT-Creation-Date: 2020-07-20 16:18+0000\n"
"PO-Revision-Date: 2020-07-21 08:42+0300\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
"Language: uk\n"
@ -216,89 +216,106 @@ msgid ""
"shell."
msgstr "Вмикає D-Bus API для самоаналізу стану оболонки."
#: data/org.gnome.shell.gschema.xml.in:119
#: data/org.gnome.shell.gschema.xml.in:114
msgid "Layout of the app picker"
msgstr "Компонування засобу вибору програм"
#: data/org.gnome.shell.gschema.xml.in:115
msgid ""
"Layout of the app picker. Each entry in the array is a page. Pages are "
"stored in the order they appear in GNOME Shell. Each page contains an "
"“application id” → 'data' pair. Currently, the following values are stored "
"as 'data': • “position”: the position of the application icon in the page"
msgstr ""
"Компонування засобу вибору програм. Кожен запис у цьому масиві є сторінкою."
" Сторінки зберігаються у порядку, у якому їх буде показано у GNOME Shell."
" Кожна сторінка містить пану записів “ідентифікатор програми” → 'дані'. У"
" поточній версії як 'дані' може бути збережено такі значення: • “позиція”:"
" позиція піктограми програми на сторінці"
#: data/org.gnome.shell.gschema.xml.in:130
msgid "Keybinding to open the application menu"
msgstr "Комбінація клавіш, щоб відкрити меню програм"
#: data/org.gnome.shell.gschema.xml.in:120
#: data/org.gnome.shell.gschema.xml.in:131
msgid "Keybinding to open the application menu."
msgstr "Комбінація клавіш, щоб відкрити меню програм."
#: data/org.gnome.shell.gschema.xml.in:126
#: data/org.gnome.shell.gschema.xml.in:137
msgid "Keybinding to open the “Show Applications” view"
msgstr "Комбінація клавіш, щоб «Показати програми»"
#: data/org.gnome.shell.gschema.xml.in:127
#: data/org.gnome.shell.gschema.xml.in:138
msgid ""
"Keybinding to open the “Show Applications” view of the Activities Overview."
msgstr "Комбінація клавіш, щоб «Показати програми» в огляді діяльності."
#: data/org.gnome.shell.gschema.xml.in:134
#: data/org.gnome.shell.gschema.xml.in:145
msgid "Keybinding to open the overview"
msgstr "Комбінація клавіш, щоб відкрити огляд"
#: data/org.gnome.shell.gschema.xml.in:135
#: data/org.gnome.shell.gschema.xml.in:146
msgid "Keybinding to open the Activities Overview."
msgstr "Комбінація клавіш, щоб відкрити огляд діяльності."
#: data/org.gnome.shell.gschema.xml.in:141
#: data/org.gnome.shell.gschema.xml.in:152
msgid "Keybinding to toggle the visibility of the notification list"
msgstr "Комбінація клавіш, щоб змінювати видимість переліку сповіщень"
#: data/org.gnome.shell.gschema.xml.in:142
#: data/org.gnome.shell.gschema.xml.in:153
msgid "Keybinding to toggle the visibility of the notification list."
msgstr "Комбінація клавіш, щоб змінювати видимість переліку сповіщень."
#: data/org.gnome.shell.gschema.xml.in:148
#: data/org.gnome.shell.gschema.xml.in:159
msgid "Keybinding to focus the active notification"
msgstr "Комбінація клавіш, щоб перейти до активних сповіщень"
#: data/org.gnome.shell.gschema.xml.in:149
#: data/org.gnome.shell.gschema.xml.in:160
msgid "Keybinding to focus the active notification."
msgstr "Комбінація клавіш, щоб перейти до активних сповіщень."
#: data/org.gnome.shell.gschema.xml.in:155
#: data/org.gnome.shell.gschema.xml.in:166
msgid "Switch to application 1"
msgstr "Перемкнутися на програму 1"
#: data/org.gnome.shell.gschema.xml.in:159
#: data/org.gnome.shell.gschema.xml.in:170
msgid "Switch to application 2"
msgstr "Перемкнутися на програму 2"
#: data/org.gnome.shell.gschema.xml.in:163
#: data/org.gnome.shell.gschema.xml.in:174
msgid "Switch to application 3"
msgstr "Перемкнутися на програму 3"
#: data/org.gnome.shell.gschema.xml.in:167
#: data/org.gnome.shell.gschema.xml.in:178
msgid "Switch to application 4"
msgstr "Перемкнутися на програму 4"
#: data/org.gnome.shell.gschema.xml.in:171
#: data/org.gnome.shell.gschema.xml.in:182
msgid "Switch to application 5"
msgstr "Перемкнутися на програму 5"
#: data/org.gnome.shell.gschema.xml.in:175
#: data/org.gnome.shell.gschema.xml.in:186
msgid "Switch to application 6"
msgstr "Перемкнутися на програму 6"
#: data/org.gnome.shell.gschema.xml.in:179
#: data/org.gnome.shell.gschema.xml.in:190
msgid "Switch to application 7"
msgstr "Перемкнутися на програму 7"
#: data/org.gnome.shell.gschema.xml.in:183
#: data/org.gnome.shell.gschema.xml.in:194
msgid "Switch to application 8"
msgstr "Перемкнутися на програму 8"
#: data/org.gnome.shell.gschema.xml.in:187
#: data/org.gnome.shell.gschema.xml.in:198
msgid "Switch to application 9"
msgstr "Перемкнутися на програму 9"
#: data/org.gnome.shell.gschema.xml.in:196
#: data/org.gnome.shell.gschema.xml.in:223
#: data/org.gnome.shell.gschema.xml.in:207
#: data/org.gnome.shell.gschema.xml.in:234
msgid "Limit switcher to current workspace."
msgstr "Обмежити перемикач на поточний робочий простір."
#: data/org.gnome.shell.gschema.xml.in:197
#: data/org.gnome.shell.gschema.xml.in:208
msgid ""
"If true, only applications that have windows on the current workspace are "
"shown in the switcher. Otherwise, all applications are included."
@ -306,11 +323,11 @@ msgstr ""
"Якщо це вказано, то тільки програми з поточного робочого простору будуть "
"показані в перемикачі. Інакше — програми з усіх просторів."
#: data/org.gnome.shell.gschema.xml.in:214
#: data/org.gnome.shell.gschema.xml.in:225
msgid "The application icon mode."
msgstr "Режим піктограм для програм."
#: data/org.gnome.shell.gschema.xml.in:215
#: data/org.gnome.shell.gschema.xml.in:226
msgid ""
"Configures how the windows are shown in the switcher. Valid possibilities "
"are “thumbnail-only” (shows a thumbnail of the window), “app-icon-"
@ -320,7 +337,7 @@ msgstr ""
"«thumbnail-only» (показує мініатюру вікна), «app-icon-only» (показує тільки "
"піктограми програм) або «both» (обидва)."
#: data/org.gnome.shell.gschema.xml.in:224
#: data/org.gnome.shell.gschema.xml.in:235
msgid ""
"If true, only windows from the current workspace are shown in the switcher. "
"Otherwise, all windows are included."
@ -328,57 +345,57 @@ msgstr ""
"Якщо це вказано, то тільки вікна з поточного робочого простору будуть "
"показані в перемикачі. Інакше — вікна з усіх просторів."
#: data/org.gnome.shell.gschema.xml.in:234
#: data/org.gnome.shell.gschema.xml.in:245
msgid "Locations"
msgstr "Місцевості"
#: data/org.gnome.shell.gschema.xml.in:235
#: data/org.gnome.shell.gschema.xml.in:246
msgid "The locations to show in world clocks"
msgstr "Місцевість для світового годинника"
#: data/org.gnome.shell.gschema.xml.in:245
#: data/org.gnome.shell.gschema.xml.in:256
msgid "Automatic location"
msgstr "Автоматичне визначення місцевості"
#: data/org.gnome.shell.gschema.xml.in:246
#: data/org.gnome.shell.gschema.xml.in:257
msgid "Whether to fetch the current location or not"
msgstr "Чи одержувати поточну локацію"
#: data/org.gnome.shell.gschema.xml.in:253
#: data/org.gnome.shell.gschema.xml.in:264
msgid "Location"
msgstr "Місцевість"
#: data/org.gnome.shell.gschema.xml.in:254
#: data/org.gnome.shell.gschema.xml.in:265
msgid "The location for which to show a forecast"
msgstr "Місцевість для прогнозу погоди"
#: data/org.gnome.shell.gschema.xml.in:266
#: data/org.gnome.shell.gschema.xml.in:277
msgid "Attach modal dialog to the parent window"
msgstr "Приєднати модальне вікно до батьківського вікна"
#: data/org.gnome.shell.gschema.xml.in:267
#: data/org.gnome.shell.gschema.xml.in:276
#: data/org.gnome.shell.gschema.xml.in:284
#: data/org.gnome.shell.gschema.xml.in:292
#: data/org.gnome.shell.gschema.xml.in:300
#: data/org.gnome.shell.gschema.xml.in:278
#: data/org.gnome.shell.gschema.xml.in:287
#: data/org.gnome.shell.gschema.xml.in:295
#: data/org.gnome.shell.gschema.xml.in:303
#: data/org.gnome.shell.gschema.xml.in:311
msgid ""
"This key overrides the key in org.gnome.mutter when running GNOME Shell."
msgstr ""
"Цей ключ перевизначає ключ у org.gnome.mutter, коли запущено GNOME Shell."
#: data/org.gnome.shell.gschema.xml.in:275
#: data/org.gnome.shell.gschema.xml.in:286
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr "Увімкнути розбиття країв, коли кладуться вікна на краї екрана"
#: data/org.gnome.shell.gschema.xml.in:283
#: data/org.gnome.shell.gschema.xml.in:294
msgid "Workspaces are managed dynamically"
msgstr "Робочі простори організовуються динамічно"
#: data/org.gnome.shell.gschema.xml.in:291
#: data/org.gnome.shell.gschema.xml.in:302
msgid "Workspaces only on primary monitor"
msgstr "Робочий простір лише на основному моніторі"
#: data/org.gnome.shell.gschema.xml.in:299
#: data/org.gnome.shell.gschema.xml.in:310
msgid "Delay focus changes in mouse mode until the pointer stops moving"
msgstr "Затримувати зміни фокусу миші, поки вказівник не перестане рухатись"
@ -414,7 +431,7 @@ msgstr "Відвідати сторінку розширення"
#: js/gdm/authPrompt.js:135 js/ui/audioDeviceSelection.js:57
#: js/ui/components/networkAgent.js:110 js/ui/components/polkitAgent.js:139
#: js/ui/endSessionDialog.js:369 js/ui/extensionDownloader.js:181
#: js/ui/endSessionDialog.js:369 js/ui/extensionDownloader.js:183
#: js/ui/shellMountOperation.js:376 js/ui/shellMountOperation.js:386
#: js/ui/status/network.js:916 subprojects/extensions-app/js/main.js:149
msgid "Cancel"
@ -456,7 +473,7 @@ msgstr "Користувач"
msgid "Login Window"
msgstr "Вікно входу"
#: js/gdm/util.js:345
#: js/gdm/util.js:355
msgid "Authentication error"
msgstr "Помилка розпізнавання"
@ -465,7 +482,7 @@ msgstr "Помилка розпізнавання"
#. 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:471
#: js/gdm/util.js:481
msgid "(or swipe finger)"
msgstr "(або проведіть пальцем)"
@ -578,7 +595,7 @@ msgstr[1] "%d години тому"
msgstr[2] "%d годин тому"
msgstr[3] "%d година тому"
#: js/misc/util.js:191
#: js/misc/util.js:191 js/ui/dateMenu.js:162
msgid "Yesterday"
msgstr "Учора"
@ -705,56 +722,44 @@ msgstr ""
#. No support for non-modal system dialogs, so ignore the option
#. let modal = options['modal'] || true;
#: js/ui/accessDialog.js:39 js/ui/status/location.js:374
#: js/ui/accessDialog.js:39 js/ui/status/location.js:369
msgid "Deny Access"
msgstr "Заборонити доступ"
#: js/ui/accessDialog.js:40 js/ui/status/location.js:377
#: js/ui/accessDialog.js:40 js/ui/status/location.js:372
msgid "Grant Access"
msgstr "Надати доступ"
#: js/ui/appDisplay.js:944
#: js/ui/appDisplay.js:1297
msgid "Unnamed Folder"
msgstr "Неназвана тека"
#: js/ui/appDisplay.js:967
msgid "Frequently used applications will appear here"
msgstr "Часто використовувані програми будуть з'являтись тут"
#: js/ui/appDisplay.js:1102
msgid "Frequent"
msgstr "Частовживане"
#: js/ui/appDisplay.js:1109
msgid "All"
msgstr "Усе"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2486 js/ui/panel.js:75
#: js/ui/appDisplay.js:2767 js/ui/panel.js:75
msgid "Open Windows"
msgstr "Відкрити вікна"
#: js/ui/appDisplay.js:2505 js/ui/panel.js:82
#: js/ui/appDisplay.js:2786 js/ui/panel.js:82
msgid "New Window"
msgstr "Нове вікно"
#: js/ui/appDisplay.js:2521
#: js/ui/appDisplay.js:2802
msgid "Launch using Integrated Graphics Card"
msgstr "Запустити через інтегровану графічну плату"
#: js/ui/appDisplay.js:2522
#: js/ui/appDisplay.js:2803
msgid "Launch using Discrete Graphics Card"
msgstr "Запустити через дискретну графічну плату"
#: js/ui/appDisplay.js:2550 js/ui/dash.js:239
#: js/ui/appDisplay.js:2831 js/ui/dash.js:239
msgid "Remove from Favorites"
msgstr "Вилучити з улюбленого"
#: js/ui/appDisplay.js:2556
#: js/ui/appDisplay.js:2837
msgid "Add to Favorites"
msgstr "Додати до улюбленого"
#: js/ui/appDisplay.js:2566 js/ui/panel.js:93
#: js/ui/appDisplay.js:2847 js/ui/panel.js:93
msgid "Show Details"
msgstr "Показати подробиці"
@ -784,7 +789,7 @@ msgstr "Навушники"
msgid "Headset"
msgstr "Гарнітура"
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:273
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:272
msgid "Microphone"
msgstr "Мікрофон"
@ -801,7 +806,7 @@ msgid "Settings"
msgstr "Параметри"
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday).
#: js/ui/calendar.js:41
#: js/ui/calendar.js:36
msgctxt "calendar-no-work"
msgid "06"
msgstr "06"
@ -811,43 +816,43 @@ msgstr "06"
#. * NOTE: These grid abbreviations are always shown together
#. * and in order, e.g. "S M T W T F S".
#.
#: js/ui/calendar.js:70
#: js/ui/calendar.js:65
msgctxt "grid sunday"
msgid "S"
msgstr "Н"
#. Translators: Calendar grid abbreviation for Monday
#: js/ui/calendar.js:72
#: js/ui/calendar.js:67
msgctxt "grid monday"
msgid "M"
msgstr "П"
#. Translators: Calendar grid abbreviation for Tuesday
#: js/ui/calendar.js:74
#: js/ui/calendar.js:69
msgctxt "grid tuesday"
msgid "T"
msgstr "В"
#. Translators: Calendar grid abbreviation for Wednesday
#: js/ui/calendar.js:76
#: js/ui/calendar.js:71
msgctxt "grid wednesday"
msgid "W"
msgstr "С"
#. Translators: Calendar grid abbreviation for Thursday
#: js/ui/calendar.js:78
#: js/ui/calendar.js:73
msgctxt "grid thursday"
msgid "T"
msgstr "Ч"
#. Translators: Calendar grid abbreviation for Friday
#: js/ui/calendar.js:80
#: js/ui/calendar.js:75
msgctxt "grid friday"
msgid "F"
msgstr "П"
#. Translators: Calendar grid abbreviation for Saturday
#: js/ui/calendar.js:82
#: js/ui/calendar.js:77
msgctxt "grid saturday"
msgid "S"
msgstr "С"
@ -858,7 +863,7 @@ msgstr "С"
#. * "%OB" is the new format specifier introduced in glibc 2.27,
#. * in most cases you should not change it.
#.
#: js/ui/calendar.js:397
#: js/ui/calendar.js:392
msgid "%OB"
msgstr "%OB"
@ -871,61 +876,37 @@ msgstr "%OB"
#. * in most cases you should not use the old "%B" here unless you
#. * absolutely know what you are doing.
#.
#: js/ui/calendar.js:407
#: js/ui/calendar.js:402
msgid "%OB %Y"
msgstr "%OB %Y"
#: js/ui/calendar.js:466
#: js/ui/calendar.js:461
msgid "Previous month"
msgstr "Попередній місяць"
#: js/ui/calendar.js:481
#: js/ui/calendar.js:476
msgid "Next month"
msgstr "Наступний місяць"
#: js/ui/calendar.js:631
#: js/ui/calendar.js:626
#, no-javascript-format
msgctxt "date day number format"
msgid "%d"
msgstr "%d"
#: js/ui/calendar.js:687
#: js/ui/calendar.js:682
msgid "Week %V"
msgstr "Тиждень %V"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/calendar.js:762
msgctxt "event list time"
msgid "All Day"
msgstr "Увесь день"
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/calendar.js:900
msgctxt "calendar heading"
msgid "%A, %B %-d"
msgstr "%A, %-d %B"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/calendar.js:903
msgctxt "calendar heading"
msgid "%A, %B %-d, %Y"
msgstr "%A, %-d %B, %Y"
#: js/ui/calendar.js:1133
#: js/ui/calendar.js:895
msgid "No Notifications"
msgstr "Немає сповіщень"
#: js/ui/calendar.js:1136
msgid "No Events"
msgstr "Немає подій"
#: js/ui/calendar.js:1190
#: js/ui/calendar.js:949
msgid "Do Not Disturb"
msgstr "Не турбувати"
#: js/ui/calendar.js:1209
#: js/ui/calendar.js:968
msgid "Clear"
msgstr "Очистити"
@ -1076,7 +1057,7 @@ msgstr "Вибачте, це не спрацювало. Спробуйте ще.
msgid "%s is now known as %s"
msgstr "%s тепер відомий як %s"
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:177
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:178
msgid "Windows"
msgstr "Вікна"
@ -1095,7 +1076,7 @@ msgstr "Риска"
#. * "Tue 9:29 AM"). The string itself should become a full date, e.g.,
#. * "February 17 2015".
#.
#: js/ui/dateMenu.js:75
#: js/ui/dateMenu.js:79
msgid "%B %-d %Y"
msgstr "%-d %B %Y"
@ -1103,35 +1084,67 @@ msgstr "%-d %B %Y"
#. * below the time in the shell; it should combine the weekday and the
#. * date, e.g. "Tuesday February 17 2015".
#.
#: js/ui/dateMenu.js:82
#: js/ui/dateMenu.js:86
msgid "%A %B %e %Y"
msgstr "%A %-d %B %Y"
#: js/ui/dateMenu.js:162
#. Translators: Shown on calendar heading when selected day occurs on current year
#: js/ui/dateMenu.js:151
msgctxt "calendar heading"
msgid "%B %-d"
msgstr "%-d %B"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: js/ui/dateMenu.js:154
msgctxt "calendar heading"
msgid "%B %-d %Y"
msgstr "%-d %B %Y"
#: js/ui/dateMenu.js:160
msgid "Today"
msgstr "Сьогодні"
#: js/ui/dateMenu.js:164
msgid "Tomorrow"
msgstr "Завтра"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#.
#: js/ui/dateMenu.js:180
msgctxt "event list time"
msgid "All Day"
msgstr "Увесь день"
#: js/ui/dateMenu.js:231
msgid "No Events"
msgstr "Немає подій"
#: js/ui/dateMenu.js:348
msgid "Add world clocks…"
msgstr "Додати світові годинники…"
#: js/ui/dateMenu.js:163
#: js/ui/dateMenu.js:349
msgid "World Clocks"
msgstr "Світові годинники"
#: js/ui/dateMenu.js:443
#: js/ui/dateMenu.js:629
msgid "Loading…"
msgstr "Завантаження…"
#: js/ui/dateMenu.js:453
#: js/ui/dateMenu.js:639
msgid "Go online for weather information"
msgstr "Увійти в мережу за прогнозом погоди"
#: js/ui/dateMenu.js:455
#: js/ui/dateMenu.js:641
msgid "Weather information is currently unavailable"
msgstr "Наразі інформації про погоду недоступна"
#: js/ui/dateMenu.js:465
#: js/ui/dateMenu.js:651
msgid "Weather"
msgstr "Погода"
#: js/ui/dateMenu.js:467
#: js/ui/dateMenu.js:653
msgid "Select weather location…"
msgstr "Виберіть місцевість для погоди…"
@ -1295,15 +1308,15 @@ msgstr "%s (віддалено)"
msgid "%s (console)"
msgstr "%s (консоль)"
#: js/ui/extensionDownloader.js:185
#: js/ui/extensionDownloader.js:187
msgid "Install"
msgstr "Встановити"
#: js/ui/extensionDownloader.js:191
#: js/ui/extensionDownloader.js:193
msgid "Install Extension"
msgstr "Встановити розширення"
#: js/ui/extensionDownloader.js:192
#: js/ui/extensionDownloader.js:194
#, javascript-format
msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "Звантажити і встановити «%s» з extensions.gnome.org?"
@ -1336,11 +1349,11 @@ msgstr "Програма бажає успадкувати скорочення"
msgid "You can restore shortcuts by pressing %s."
msgstr "Можна відновити скорочення, натиснувши %s."
#: js/ui/inhibitShortcutsDialog.js:98
#: js/ui/inhibitShortcutsDialog.js:100
msgid "Deny"
msgstr "Заборонити"
#: js/ui/inhibitShortcutsDialog.js:105
#: js/ui/inhibitShortcutsDialog.js:107
msgid "Allow"
msgstr "Дозволити"
@ -1406,7 +1419,7 @@ msgstr "Вимкнути"
msgid "Leave Off"
msgstr "Покинути"
#: js/ui/keyboard.js:207
#: js/ui/keyboard.js:225
msgid "Region & Language Settings"
msgstr "Параметри регіону та мови"
@ -1479,25 +1492,25 @@ msgstr "Блокування екрана вимкнено"
msgid "Screen Locking requires the GNOME display manager."
msgstr "Блокування екрана потребує керування входом GNOME."
#: js/ui/messageTray.js:1547
#: js/ui/messageTray.js:1476
msgid "System Information"
msgstr "Інформація про систему"
#: js/ui/mpris.js:204
#: js/ui/mpris.js:203
msgid "Unknown artist"
msgstr "Невідомий виконавець"
#: js/ui/mpris.js:214
#: js/ui/mpris.js:213
msgid "Unknown title"
msgstr "Невідома назва"
#: js/ui/overview.js:73
#: js/ui/overview.js:74
msgid "Undo"
msgstr "Повернути"
#. Translators: This is the main view to select
#. activities. See also note for "Activities" string.
#: js/ui/overview.js:86
#: js/ui/overview.js:87
msgid "Overview"
msgstr "Огляд"
@ -1505,7 +1518,7 @@ msgstr "Огляд"
#. in the search entry when no search is
#. active; it should not exceed ~30
#. characters.
#: js/ui/overview.js:107
#: js/ui/overview.js:108
msgid "Type to search"
msgstr "Введіть текст для пошуку"
@ -1533,23 +1546,23 @@ msgstr "Призначити клавішу"
msgid "Done"
msgstr "Зроблено"
#: js/ui/padOsd.js:745
#: js/ui/padOsd.js:732
msgid "Edit…"
msgstr "Редагувати…"
#: js/ui/padOsd.js:787 js/ui/padOsd.js:910
#: js/ui/padOsd.js:774 js/ui/padOsd.js:891
msgid "None"
msgstr "Немає"
#: js/ui/padOsd.js:863
#: js/ui/padOsd.js:845
msgid "Press a button to configure"
msgstr "Натисніть кнопку, щоб налаштувати"
#: js/ui/padOsd.js:864
#: js/ui/padOsd.js:846
msgid "Press Esc to exit"
msgstr "Натисніть клавішу «Esc», щоб вийти"
#: js/ui/padOsd.js:867
#: js/ui/padOsd.js:849
msgid "Press any key to exit"
msgstr "Натисніть будь-яку клавішу, щоб вийти"
@ -1813,17 +1826,17 @@ msgstr "Місцевість вимкнено"
msgid "Enable"
msgstr "Увімкнути"
#: js/ui/status/location.js:355
#: js/ui/status/location.js:350
msgid "Allow location access"
msgstr "Дозволити доступ до даних перебування"
#. Translators: %s is an application name
#: js/ui/status/location.js:357
#: js/ui/status/location.js:352
#, javascript-format
msgid "The app %s wants to access your location"
msgstr "Програмі %s потрібен доступ до даних щодо місця вашого перебування"
#: js/ui/status/location.js:367
#: js/ui/status/location.js:362
msgid "Location access can be changed at any time from the privacy settings."
msgstr ""
"Доступ до місця перебування можна змінити в будь-яку мить у параметрах "
@ -2164,11 +2177,11 @@ msgstr "Помилка завірення Thunderbolt"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "Неможливо завірити пристрій Thunderbolt: %s"
#: js/ui/status/volume.js:154
#: js/ui/status/volume.js:155
msgid "Volume changed"
msgstr "Гучність змінено"
#: js/ui/status/volume.js:225
#: js/ui/status/volume.js:217
msgid "Volume"
msgstr "Гучність"
@ -2214,19 +2227,19 @@ msgstr "Проведіть вгору для розблокування"
msgid "Click or press a key to unlock"
msgstr "Клацніть або натисніть клавішу для розблокування"
#: js/ui/unlockDialog.js:550
#: js/ui/unlockDialog.js:555
msgid "Unlock Window"
msgstr "Розблокувати вікно"
#: js/ui/unlockDialog.js:559
#: js/ui/unlockDialog.js:564
msgid "Log in as another user"
msgstr "Увійти як інший користувач"
#: js/ui/viewSelector.js:181
#: js/ui/viewSelector.js:182
msgid "Applications"
msgstr "Програми"
#: js/ui/viewSelector.js:185
#: js/ui/viewSelector.js:186
msgid "Search"
msgstr "Пошук"
@ -2355,12 +2368,12 @@ msgstr "Використовувати вказаний режим, прикла
msgid "List possible modes"
msgstr "Перелік можливих режимів"
#: src/shell-app.c:286
#: src/shell-app.c:268
msgctxt "program"
msgid "Unknown"
msgstr "Невідомо"
#: src/shell-app.c:537
#: src/shell-app.c:519
#, c-format
msgid "Failed to launch “%s”"
msgstr "Не вдалося запустити «%s»"
@ -2443,12 +2456,11 @@ msgid "The extension is incompatible with the current GNOME version"
msgstr "Розширення є несумісним із поточною версією GNOME"
#: subprojects/extensions-app/js/main.js:464
#| msgid "Show extension info"
msgid "The extension had an error"
msgstr "У розширенні сталася помилка"
#: subprojects/extensions-app/data/ui/extension-row.ui:109
#: subprojects/extensions-tool/src/command-create.c:301
#: subprojects/extensions-tool/src/command-create.c:325
#: subprojects/extensions-tool/src/main.c:241
msgid "Description"
msgstr "Опис"
@ -2529,12 +2541,12 @@ msgid "Log Out…"
msgstr "Вийти…"
#. Translators: a file path to an extension directory
#: subprojects/extensions-tool/src/command-create.c:202
#: subprojects/extensions-tool/src/command-create.c:226
#, c-format
msgid "The new extension was successfully created in %s.\n"
msgstr "Нове розширення успішно створено в %s.\n"
#: subprojects/extensions-tool/src/command-create.c:275
#: subprojects/extensions-tool/src/command-create.c:299
#, c-format
msgid ""
"Name should be a very short (ideally descriptive) string.\n"
@ -2543,12 +2555,12 @@ msgstr ""
"Назва повинна бути дуже короткою (бажано максимально описовою).\n"
"Наприклад: %s"
#: subprojects/extensions-tool/src/command-create.c:281
#: subprojects/extensions-tool/src/command-create.c:305
#: subprojects/extensions-tool/src/main.c:238
msgid "Name"
msgstr "Назва"
#: subprojects/extensions-tool/src/command-create.c:295
#: subprojects/extensions-tool/src/command-create.c:319
#, c-format
msgid ""
"Description is a single-sentence explanation of what your extension does.\n"
@ -2557,7 +2569,7 @@ msgstr ""
"Опис — пояснення одним реченням того, що розширення робить.\n"
"Наприклад: %s"
#: subprojects/extensions-tool/src/command-create.c:315
#: subprojects/extensions-tool/src/command-create.c:339
msgid ""
"UUID is a globally-unique identifier for your extension.\n"
"This should be in the format of an email address (clicktofocus@janedoe."
@ -2567,56 +2579,56 @@ msgstr ""
"Він зберігається у форматі електронної адреси (clicktofocus@janedoe.example."
"com)\n"
#: subprojects/extensions-tool/src/command-create.c:342
#: subprojects/extensions-tool/src/command-create.c:366
msgid "Choose one of the available templates:\n"
msgstr "Виберіть один із доступних шаблонів:\n"
#: subprojects/extensions-tool/src/command-create.c:356
#: subprojects/extensions-tool/src/command-create.c:380
msgid "Template"
msgstr "Шаблон"
#: subprojects/extensions-tool/src/command-create.c:411
#: subprojects/extensions-tool/src/command-create.c:435
msgid "The unique identifier of the new extension"
msgstr "Унікальний код розширення"
#: subprojects/extensions-tool/src/command-create.c:414
#: subprojects/extensions-tool/src/command-create.c:438
msgid "NAME"
msgstr "НАЗВА"
#: subprojects/extensions-tool/src/command-create.c:415
#: subprojects/extensions-tool/src/command-create.c:439
msgid "The user-visible name of the new extension"
msgstr "Загальна назва розширення"
#: subprojects/extensions-tool/src/command-create.c:417
#: subprojects/extensions-tool/src/command-create.c:441
msgid "DESCRIPTION"
msgstr "ОПИС"
#: subprojects/extensions-tool/src/command-create.c:419
#: subprojects/extensions-tool/src/command-create.c:443
msgid "A short description of what the extension does"
msgstr "Короткий опис того, що розширення робить"
#: subprojects/extensions-tool/src/command-create.c:422
#: subprojects/extensions-tool/src/command-create.c:446
msgid "TEMPLATE"
msgstr "ШАБЛОН"
#: subprojects/extensions-tool/src/command-create.c:423
#: subprojects/extensions-tool/src/command-create.c:447
msgid "The template to use for the new extension"
msgstr "Шаблон, яким слід скористатися для нового розширення"
#: subprojects/extensions-tool/src/command-create.c:429
#: subprojects/extensions-tool/src/command-create.c:453
msgid "Enter extension information interactively"
msgstr "Ввести інформацію про розширення покроково"
#: subprojects/extensions-tool/src/command-create.c:437
#: subprojects/extensions-tool/src/command-create.c:461
msgid "Create a new extension"
msgstr "Створити розширення"
#: subprojects/extensions-tool/src/command-create.c:455
#: subprojects/extensions-tool/src/command-create.c:479
#: subprojects/extensions-tool/src/command-list.c:172
msgid "Unknown arguments"
msgstr "Невідомі параметри"
#: subprojects/extensions-tool/src/command-create.c:480
#: subprojects/extensions-tool/src/command-create.c:504
msgid "UUID, name and description are required"
msgstr "UUID, назва і опис — обов'язкові"
@ -2941,19 +2953,3 @@ msgstr[3] "%u вхід"
#: subprojects/gvc/gvc-mixer-control.c:2766
msgid "System Sounds"
msgstr "Системні звуки"
#~ msgid "Copy Error"
#~ msgstr "Скопіювати помилку"
#~ msgid "%d Connected"
#~ msgid_plural "%d Connected"
#~ msgstr[0] "%d під'єднано"
#~ msgstr[1] "%d під'єднано"
#~ msgstr[2] "%d під'єднано"
#~ msgstr[3] "%d під'єднано"
#~ msgid "Off"
#~ msgstr "Вимкнено"
#~ msgid "On"
#~ msgstr "Увімкнено"

File diff suppressed because it is too large Load Diff

View File

@ -346,8 +346,6 @@ struct _App
GSList *notify_appointments; /* CalendarAppointment *, for EventsAdded */
GSList *notify_ids; /* gchar *, for EventsRemoved */
guint events_added_timeout_id;
guint events_removed_timeout_id;
GSList *live_views;
};
@ -370,24 +368,19 @@ app_update_timezone (App *app)
}
}
static gboolean
on_app_schedule_events_added_cb (gpointer user_data)
static void
app_notify_events_added (App *app)
{
App *app = user_data;
GVariantBuilder builder, extras_builder;
GSList *events, *link;
if (g_source_is_destroyed (g_main_current_source ()))
return FALSE;
events = g_slist_reverse (app->notify_appointments);
app->notify_appointments = NULL;
app->events_added_timeout_id = 0;
print_debug ("Emitting EventsAddedOrUpdated with %d events", g_slist_length (events));
if (!events)
return FALSE;
return;
/* The a{sv} is used as an escape hatch in case we want to provide more
* information in the future without breaking ABI
@ -428,41 +421,21 @@ on_app_schedule_events_added_cb (gpointer user_data)
g_variant_builder_clear (&builder);
g_slist_free_full (events, calendar_appointment_free);
return FALSE;
}
static void
app_schedule_events_added (App *app)
app_notify_events_removed (App *app)
{
print_debug ("Scheduling EventsAddedOrUpdated");
if (app->events_added_timeout_id == 0)
{
app->events_added_timeout_id = g_timeout_add_seconds (2,
on_app_schedule_events_added_cb,
app);
g_source_set_name_by_id (app->events_added_timeout_id, "[gnome-shell] on_app_schedule_events_added_cb");
}
}
static gboolean
on_app_schedule_events_removed_cb (gpointer user_data)
{
App *app = user_data;
GVariantBuilder builder;
GSList *ids, *link;
if (g_source_is_destroyed (g_main_current_source ()))
return FALSE;
ids = app->notify_ids;
app->notify_ids = NULL;
app->events_removed_timeout_id = 0;
print_debug ("Emitting EventsRemoved with %d ids", g_slist_length (ids));
if (!ids)
return FALSE;
return;
g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
for (link = ids; link; link = g_slist_next (link))
@ -483,20 +456,7 @@ on_app_schedule_events_removed_cb (gpointer user_data)
g_slist_free_full (ids, g_free);
return FALSE;
}
static void
app_schedule_events_removed (App *app)
{
print_debug ("Scheduling EventsRemoved");
if (app->events_removed_timeout_id == 0)
{
app->events_removed_timeout_id = g_timeout_add_seconds (2,
on_app_schedule_events_removed_cb,
app);
g_source_set_name_by_id (app->events_removed_timeout_id, "[gnome-shell] on_app_schedule_events_removed_cb");
}
return;
}
static void
@ -546,7 +506,7 @@ app_process_added_modified_objects (App *app,
g_clear_object (&cal_client);
if (app->notify_appointments)
app_schedule_events_added (app);
app_notify_events_added (app);
}
static void
@ -610,7 +570,7 @@ on_objects_removed (ECalClientView *view,
g_clear_object (&client);
if (app->notify_ids)
app_schedule_events_removed (app);
app_notify_events_removed (app);
}
static gboolean
@ -695,10 +655,35 @@ app_stop_view (App *app,
g_signal_handlers_disconnect_by_func (view, on_objects_removed, app);
}
static void
app_notify_has_calendars (App *app)
{
GVariantBuilder dict_builder;
g_variant_builder_init (&dict_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&dict_builder, "{sv}", "HasCalendars",
g_variant_new_boolean (app_has_calendars (app)));
g_dbus_connection_emit_signal (app->connection,
NULL,
"/org/gnome/Shell/CalendarServer",
"org.freedesktop.DBus.Properties",
"PropertiesChanged",
g_variant_new ("(sa{sv}as)",
"org.gnome.Shell.CalendarServer",
&dict_builder,
NULL),
NULL);
g_variant_builder_clear (&dict_builder);
}
static void
app_update_views (App *app)
{
GSList *link, *clients;
gboolean had_views, has_views;
had_views = app->live_views != NULL;
for (link = app->live_views; link; link = g_slist_next (link))
{
@ -723,31 +708,14 @@ app_update_views (App *app)
app->live_views = g_slist_prepend (app->live_views, view);
}
has_views = app->live_views != NULL;
if (has_views != had_views)
app_notify_has_calendars (app);
g_slist_free_full (clients, g_object_unref);
}
static void
app_notify_has_calendars (App *app)
{
GVariantBuilder dict_builder;
g_variant_builder_init (&dict_builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&dict_builder, "{sv}", "HasCalendars",
g_variant_new_boolean (app_has_calendars (app)));
g_dbus_connection_emit_signal (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL),
NULL,
"/org/gnome/Shell/CalendarServer",
"org.freedesktop.DBus.Properties",
"PropertiesChanged",
g_variant_new ("(sa{sv}as)",
"org.gnome.Shell.CalendarServer",
&dict_builder,
NULL),
NULL);
g_variant_builder_clear (&dict_builder);
}
static void
on_client_appeared_cb (CalendarSources *sources,
ECalClient *client,
@ -866,9 +834,6 @@ app_free (App *app)
{
GSList *ll;
g_clear_handle_id (&app->events_added_timeout_id, g_source_remove);
g_clear_handle_id (&app->events_removed_timeout_id, g_source_remove);
for (ll = app->live_views; ll != NULL; ll = g_slist_next (ll))
{
ECalClientView *view = E_CAL_CLIENT_VIEW (ll->data);

View File

@ -253,7 +253,9 @@ deep_count_one (DeepCountState *state,
else
{
content_type = g_file_info_get_content_type (info);
add_content_type_to_cache (state, content_type);
if (content_type)
add_content_type_to_cache (state, content_type);
}
}

View File

@ -163,15 +163,6 @@ libshell_private_sources = [
'shell-app-cache.c',
]
if enable_recorder
libshell_sources += ['shell-recorder.c']
libshell_public_headers += ['shell-recorder.h']
libshell_private_sources += ['shell-recorder-src.c']
libshell_private_headers += ['shell-recorder-src.h']
endif
libshell_enums = gnome.mkenums_simple('shell-enum-types',
sources: libshell_public_headers
)

View File

@ -78,6 +78,7 @@ struct _ShellApp
* want (e.g. it will be of TYPE_NORMAL from
* the way shell-window-tracker.c works).
*/
GIcon *fallback_icon;
ShellAppRunningState *running_state;
@ -180,66 +181,47 @@ window_backed_app_get_window (ShellApp *app)
return NULL;
}
static ClutterActor *
window_backed_app_get_icon (ShellApp *app,
int size)
/**
* shell_app_get_icon:
*
* Look up the icon for this application
*
* Return value: (transfer none): A #GIcon
*/
GIcon *
shell_app_get_icon (ShellApp *app)
{
MetaWindow *window = NULL;
StWidget *widget;
int scale, scaled_size;
ShellGlobal *global;
StThemeContext *context;
global = shell_global_get ();
context = st_theme_context_get_for_stage (shell_global_get_stage (global));
g_object_get (context, "scale-factor", &scale, NULL);
g_return_val_if_fail (SHELL_IS_APP (app), NULL);
scaled_size = size * scale;
if (app->info)
return g_app_info_get_icon (G_APP_INFO (app->info));
if (app->fallback_icon)
return app->fallback_icon;
/* During a state transition from running to not-running for
* window-backend apps, it's possible we get a request for the icon.
* Avoid asserting here and just return an empty image.
* Avoid asserting here and just return a fallback icon
*/
if (app->running_state != NULL)
window = window_backed_app_get_window (app);
if (window == NULL)
if (window &&
meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_X11)
{
ClutterActor *actor;
actor = clutter_actor_new ();
g_object_set (actor,
"opacity", 0,
"width", (float) scaled_size,
"height", (float) scaled_size,
NULL);
return actor;
}
if (meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_X11)
{
StWidget *texture_actor;
texture_actor =
app->fallback_icon =
st_texture_cache_bind_cairo_surface_property (st_texture_cache_get_default (),
G_OBJECT (window),
"icon",
scaled_size);
widget = g_object_new (ST_TYPE_BIN,
"child", texture_actor,
NULL);
"icon");
}
else
{
widget = g_object_new (ST_TYPE_ICON,
"icon-size", size,
"icon-name", "application-x-executable",
NULL);
app->fallback_icon = g_themed_icon_new ("application-x-executable");
}
st_widget_add_style_class_name (widget, "fallback-app-icon");
return CLUTTER_ACTOR (widget);
return app->fallback_icon;
}
/**
@ -257,16 +239,16 @@ shell_app_create_icon_texture (ShellApp *app,
GIcon *icon;
ClutterActor *ret;
if (app->info == NULL)
return window_backed_app_get_icon (app, size);
ret = st_icon_new ();
st_icon_set_icon_size (ST_ICON (ret), size);
st_icon_set_fallback_icon_name (ST_ICON (ret), "application-x-executable");
icon = g_app_info_get_icon (G_APP_INFO (app->info));
icon = shell_app_get_icon (app);
st_icon_set_gicon (ST_ICON (ret), icon);
if (shell_app_is_window_backed (app))
st_widget_add_style_class_name (ST_WIDGET (ret), "fallback-app-icon");
return ret;
}
@ -1576,6 +1558,7 @@ shell_app_dispose (GObject *object)
ShellApp *app = SHELL_APP (object);
g_clear_object (&app->info);
g_clear_object (&app->fallback_icon);
while (app->running_state)
_shell_app_remove_window (app, app->running_state->windows->data);

View File

@ -29,6 +29,7 @@ const char *shell_app_get_id (ShellApp *app);
GDesktopAppInfo *shell_app_get_app_info (ShellApp *app);
ClutterActor *shell_app_create_icon_texture (ShellApp *app, int size);
GIcon *shell_app_get_icon (ShellApp *app);
const char *shell_app_get_name (ShellApp *app);
const char *shell_app_get_description (ShellApp *app);
gboolean shell_app_is_window_backed (ShellApp *app);

View File

@ -899,8 +899,9 @@ load_gl_symbol (const char *name,
}
static void
global_stage_after_paint (ClutterStage *stage,
ShellGlobal *global)
global_stage_after_paint (ClutterStage *stage,
ClutterStageView *stage_view,
ShellGlobal *global)
{
/* At this point, we've finished all layout and painting, but haven't
* actually flushed or swapped */

View File

@ -1,425 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#include "config.h"
#define GST_USE_UNSTABLE_API
#include <gst/base/gstpushsrc.h>
#include "shell-recorder-src.h"
struct _ShellRecorderSrc
{
GstPushSrc parent;
GMutex mutex;
GstCaps *caps;
GMutex queue_lock;
GCond queue_cond;
GQueue *queue;
gboolean eos;
gboolean flushing;
guint memory_used;
guint memory_used_update_idle;
};
struct _ShellRecorderSrcClass
{
GstPushSrcClass parent_class;
};
enum {
PROP_0,
PROP_CAPS,
PROP_MEMORY_USED
};
#define shell_recorder_src_parent_class parent_class
G_DEFINE_TYPE(ShellRecorderSrc, shell_recorder_src, GST_TYPE_PUSH_SRC);
static void
shell_recorder_src_init (ShellRecorderSrc *src)
{
gst_base_src_set_format (GST_BASE_SRC (src), GST_FORMAT_TIME);
gst_base_src_set_live (GST_BASE_SRC (src), TRUE);
src->queue = g_queue_new ();
g_mutex_init (&src->mutex);
g_mutex_init (&src->queue_lock);
g_cond_init (&src->queue_cond);
}
static gboolean
shell_recorder_src_memory_used_update_idle (gpointer data)
{
ShellRecorderSrc *src = data;
g_mutex_lock (&src->mutex);
src->memory_used_update_idle = 0;
g_mutex_unlock (&src->mutex);
g_object_notify (G_OBJECT (src), "memory-used");
return FALSE;
}
/* The memory_used property is used to monitor buffer usage,
* so we marshal notification back to the main loop thread.
*/
static void
shell_recorder_src_update_memory_used (ShellRecorderSrc *src,
int delta)
{
g_mutex_lock (&src->mutex);
src->memory_used += delta;
if (src->memory_used_update_idle == 0)
{
src->memory_used_update_idle = g_idle_add (shell_recorder_src_memory_used_update_idle, src);
g_source_set_name_by_id (src->memory_used_update_idle, "[gnome-shell] shell_recorder_src_memory_used_update_idle");
}
g_mutex_unlock (&src->mutex);
}
/* _negotiate() is called when we have to decide on a format. We
* use the configured format */
static gboolean
shell_recorder_src_negotiate (GstBaseSrc * base_src)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (base_src);
gboolean result;
result = gst_base_src_set_caps (base_src, src->caps);
return result;
}
static gboolean
shell_recorder_src_unlock (GstBaseSrc * base_src)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (base_src);
g_mutex_lock (&src->queue_lock);
src->flushing = TRUE;
g_cond_signal (&src->queue_cond);
g_mutex_unlock (&src->queue_lock);
return TRUE;
}
static gboolean
shell_recorder_src_unlock_stop (GstBaseSrc * base_src)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (base_src);
g_mutex_lock (&src->queue_lock);
src->flushing = FALSE;
g_cond_signal (&src->queue_cond);
g_mutex_unlock (&src->queue_lock);
return TRUE;
}
static gboolean
shell_recorder_src_start (GstBaseSrc * base_src)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (base_src);
g_mutex_lock (&src->queue_lock);
src->flushing = FALSE;
src->eos = FALSE;
g_cond_signal (&src->queue_cond);
g_mutex_unlock (&src->queue_lock);
return TRUE;
}
static gboolean
shell_recorder_src_stop (GstBaseSrc * base_src)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (base_src);
g_mutex_lock (&src->queue_lock);
src->flushing = TRUE;
src->eos = FALSE;
g_queue_foreach (src->queue, (GFunc) gst_buffer_unref, NULL);
g_queue_clear (src->queue);
g_cond_signal (&src->queue_cond);
g_mutex_unlock (&src->queue_lock);
return TRUE;
}
static gboolean
shell_recorder_src_send_event (GstElement * element, GstEvent * event)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (element);
gboolean res;
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
{
shell_recorder_src_close (src);
gst_event_unref (event);
res = TRUE;
}
else
{
res = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, send_event, (element,
event), FALSE);
}
return res;
}
/* The create() virtual function is responsible for returning the next buffer.
* We just pop buffers off of the queue and block if necessary.
*/
static GstFlowReturn
shell_recorder_src_create (GstPushSrc *push_src,
GstBuffer **buffer_out)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (push_src);
GstBuffer *buffer;
g_mutex_lock (&src->queue_lock);
while (TRUE) {
/* int the flushing state we just return FLUSHING */
if (src->flushing) {
g_mutex_unlock (&src->queue_lock);
return GST_FLOW_FLUSHING;
}
buffer = g_queue_pop_head (src->queue);
/* we have a buffer, exit the loop to handle it */
if (buffer != NULL)
break;
/* no buffer, check EOS */
if (src->eos) {
g_mutex_unlock (&src->queue_lock);
return GST_FLOW_EOS;
}
/* wait for something to happen and try again */
g_cond_wait (&src->queue_cond, &src->queue_lock);
}
g_mutex_unlock (&src->queue_lock);
shell_recorder_src_update_memory_used (src,
- (int)(gst_buffer_get_size(buffer) / 1024));
*buffer_out = buffer;
return GST_FLOW_OK;
}
static void
shell_recorder_src_set_caps (ShellRecorderSrc *src,
const GstCaps *caps)
{
if (caps == src->caps)
return;
if (src->caps != NULL)
{
gst_caps_unref (src->caps);
src->caps = NULL;
}
if (caps)
{
/* The capabilities will be negotated with the downstream element
* and set on the pad when the first buffer is pushed.
*/
src->caps = gst_caps_copy (caps);
}
else
src->caps = NULL;
}
static void
shell_recorder_src_finalize (GObject *object)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (object);
g_clear_handle_id (&src->memory_used_update_idle, g_source_remove);
shell_recorder_src_set_caps (src, NULL);
g_queue_free_full (src->queue, (GDestroyNotify) gst_buffer_unref);
g_mutex_clear (&src->mutex);
g_mutex_clear (&src->queue_lock);
g_cond_clear (&src->queue_cond);
G_OBJECT_CLASS (shell_recorder_src_parent_class)->finalize (object);
}
static void
shell_recorder_src_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (object);
switch (prop_id)
{
case PROP_CAPS:
shell_recorder_src_set_caps (src, gst_value_get_caps (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
shell_recorder_src_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
ShellRecorderSrc *src = SHELL_RECORDER_SRC (object);
switch (prop_id)
{
case PROP_CAPS:
gst_value_set_caps (value, src->caps);
break;
case PROP_MEMORY_USED:
g_mutex_lock (&src->mutex);
g_value_set_uint (value, src->memory_used);
g_mutex_unlock (&src->mutex);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
shell_recorder_src_class_init (ShellRecorderSrcClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GstBaseSrcClass *base_src_class = GST_BASE_SRC_CLASS (klass);
GstPushSrcClass *push_src_class = GST_PUSH_SRC_CLASS (klass);
static GstStaticPadTemplate src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
object_class->finalize = shell_recorder_src_finalize;
object_class->set_property = shell_recorder_src_set_property;
object_class->get_property = shell_recorder_src_get_property;
g_object_class_install_property (object_class,
PROP_CAPS,
g_param_spec_boxed ("caps",
"Caps",
"Fixed GstCaps for the source",
GST_TYPE_CAPS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_MEMORY_USED,
g_param_spec_uint ("memory-used",
"Memory Used",
"Memory currently used by the queue (in kB)",
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_template));
gst_element_class_set_details_simple (element_class,
"ShellRecorderSrc",
"Generic/Src",
"Feed screen capture data to a pipeline",
"Owen Taylor <otaylor@redhat.com>");
element_class->send_event = shell_recorder_src_send_event;
base_src_class->negotiate = shell_recorder_src_negotiate;
base_src_class->unlock = shell_recorder_src_unlock;
base_src_class->unlock_stop = shell_recorder_src_unlock_stop;
base_src_class->start = shell_recorder_src_start;
base_src_class->stop = shell_recorder_src_stop;
push_src_class->create = shell_recorder_src_create;
}
/**
* shell_recorder_src_add_buffer:
*
* Adds a buffer to the internal queue to be pushed out at the next opportunity.
* There is no flow control, so arbitrary amounts of memory may be used by
* the buffers on the queue. The buffer contents must match the #GstCaps
* set in the :caps property.
*/
void
shell_recorder_src_add_buffer (ShellRecorderSrc *src,
GstBuffer *buffer)
{
g_return_if_fail (SHELL_IS_RECORDER_SRC (src));
g_return_if_fail (src->caps != NULL);
shell_recorder_src_update_memory_used (src,
(int)(gst_buffer_get_size(buffer) / 1024));
g_mutex_lock (&src->queue_lock);
g_queue_push_tail (src->queue, gst_buffer_ref (buffer));
g_cond_signal (&src->queue_cond);
g_mutex_unlock (&src->queue_lock);
}
/**
* shell_recorder_src_close:
*
* Indicates the end of the input stream. Once all previously added buffers have
* been pushed out an end-of-stream message will be sent.
*/
void
shell_recorder_src_close (ShellRecorderSrc *src)
{
/* We can't send a message to the source immediately or buffers that haven't
* been pushed yet will be discarded. Instead mark ourselves EOS, which will
* make us send an event once everything has been pushed.
*/
g_mutex_lock (&src->queue_lock);
src->eos = TRUE;
g_cond_signal (&src->queue_cond);
g_mutex_unlock (&src->queue_lock);
}
static gboolean
plugin_init (GstPlugin *plugin)
{
gst_element_register(plugin, "shellrecordersrc", GST_RANK_NONE,
SHELL_TYPE_RECORDER_SRC);
return TRUE;
}
/**
* shell_recorder_src_register:
*
* Registers a plugin holding our single element to use privately in
* this application. Can safely be called multiple times.
*/
void
shell_recorder_src_register (void)
{
static gboolean registered = FALSE;
if (registered)
return;
gst_plugin_register_static (GST_VERSION_MAJOR, GST_VERSION_MINOR,
"shellrecorder",
"Plugin for ShellRecorder",
plugin_init,
"0.1",
"LGPL",
"gnome-shell", "gnome-shell", "http://live.gnome.org/GnomeShell");
registered = TRUE;
}

View File

@ -1,40 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __SHELL_RECORDER_SRC_H__
#define __SHELL_RECORDER_SRC_H__
#include <gst/gst.h>
G_BEGIN_DECLS
/**
* ShellRecorderSrc:
*
* shellrecordersrc a custom source element is pretty much like a very
* simple version of the stander GStreamer 'appsrc' element, without
* any of the provisions for seeking, generating data on demand,
* etc. In both cases, the application supplies the buffers and the
* element pushes them into the pipeline. The main reason for not using
* appsrc is that it wasn't a supported element until gstreamer 0.10.22,
* and as of 2009-03, many systems still have 0.10.21.
*/
typedef struct _ShellRecorderSrc ShellRecorderSrc;
typedef struct _ShellRecorderSrcClass ShellRecorderSrcClass;
#define SHELL_TYPE_RECORDER_SRC (shell_recorder_src_get_type ())
#define SHELL_RECORDER_SRC(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_RECORDER_SRC, ShellRecorderSrc))
#define SHELL_RECORDER_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_RECORDER_SRC, ShellRecorderSrcClass))
#define SHELL_IS_RECORDER_SRC(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_RECORDER_SRC))
#define SHELL_IS_RECORDER_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_RECORDER_SRC))
#define SHELL_RECORDER_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_RECORDER_SRC, ShellRecorderSrcClass))
GType shell_recorder_src_get_type (void) G_GNUC_CONST;
void shell_recorder_src_register (void);
void shell_recorder_src_add_buffer (ShellRecorderSrc *src,
GstBuffer *buffer);
void shell_recorder_src_close (ShellRecorderSrc *src);
G_END_DECLS
#endif /* __SHELL_RECORDER_SRC_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __SHELL_RECORDER_H__
#define __SHELL_RECORDER_H__
#include <clutter/clutter.h>
G_BEGIN_DECLS
/**
* SECTION:shell-recorder
* @short_description: Record from a #ClutterStage
*
* The #ShellRecorder object is used to make recordings ("screencasts")
* of a #ClutterStage. Recording is done via #GStreamer. The default is
* to encode as a Theora movie and write it to a file in the current
* directory named after the date, but the encoding and output can
* be configured.
*/
#define SHELL_TYPE_RECORDER (shell_recorder_get_type ())
G_DECLARE_FINAL_TYPE (ShellRecorder, shell_recorder, SHELL, RECORDER, GObject)
ShellRecorder *shell_recorder_new (ClutterStage *stage);
void shell_recorder_set_framerate (ShellRecorder *recorder,
int framerate);
void shell_recorder_set_file_template (ShellRecorder *recorder,
const char *file_template);
void shell_recorder_set_pipeline (ShellRecorder *recorder,
const char *pipeline);
void shell_recorder_set_draw_cursor (ShellRecorder *recorder,
gboolean draw_cursor);
void shell_recorder_set_area (ShellRecorder *recorder,
int x,
int y,
int width,
int height);
gboolean shell_recorder_record (ShellRecorder *recorder,
char **filename_used);
void shell_recorder_close (ShellRecorder *recorder);
void shell_recorder_pause (ShellRecorder *recorder);
gboolean shell_recorder_is_recording (ShellRecorder *recorder);
G_END_DECLS
#endif /* __SHELL_RECORDER_H__ */

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