Compare commits

...

189 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
87de09a83e dnd: Finish animation before destroying actor
Otherwise JavaScript aborts the execution of the function
and the drag is never released. That's because _dragComplete
tries to unhide this._dragActor from picking, and that cannot
be done after calling this._dragActor.destroy(), which is
the case now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/744
2019-09-26 10:32:07 -03:00
Georges Basile Stavracas Neto
b65b4e3cae dnd: Don't mix callback argument and object field usage
This will be important for the next commit, since _dragComplete()
changes the value of this._dragActor and we need to keep a valid
reference to it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/744
2019-09-26 10:32:07 -03:00
Georges Basile Stavracas Neto
5880758709 dnd: Don't try to destroy undefined drag actor
Draggable._dragComplete() sets this._dragActor to undefined. Right
after calling Draggable._dragComplete() in _cancelDrag(), though,
it tries to destroy this._dragActor, which is undefined.

Fix that by storing the current drag actor before calling into
_dragComplete(), and using it after.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/744
2019-09-26 10:32:07 -03:00
Dušan Kazik
a05cb76e0d Update Slovak translation 2019-09-26 06:43:01 +00:00
Florian Müllner
60cab56f86 shell-util: Handle NULL from meta_window_get_image()
Until commit 506b75fc7f we got away with not handling a NULL return
value, as cairo_surface_destroy() deals with a NULL surface; the same
isn't true for get_width/get_height, so guard to code in question to
prevent a crash.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1678
2019-09-25 14:34:27 +00:00
Nathan Follens
70a5c3875c Update Dutch translation 2019-09-25 11:11:56 +00:00
Benjamin Berg
0fdbde9101 main: Remove NOTIFY_SOCKET from environment
It is only used exactly once to notify systemd about the service
startup. So unset it as soon as possible as it can leak into
subprocesses we spawn otherwise.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/741
2019-09-23 11:09:39 +02:00
Jonas Dreßler
2156577333 slider: Unset signal IDs when ending the slider drag
Unset the signal IDs we connected to when starting the drag. Otherwise
we get error messages if a touch drag is ended after a mouse drag
happened because the signal IDs are still set but no signals are
connected.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/740
2019-09-22 22:20:41 +00:00
Ryuta Fujii
f3e09b2b2f Update Japanese translation 2019-09-22 11:29:14 +00:00
Ryuta Fujii
6180f59c13 Update Japanese translation 2019-09-22 11:27:23 +00:00
Robert Mader
506b75fc7f shell-util: Do not scale the clip in get_content_for_window_actor()
This is now handled in Mutter. Also, respect the result size instead
of assuming it to be equal to the clip size, as the clip takes actor
coordinates while the result takes buffer coordinates.

This can be fixed in a future API iteration.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/728
2019-09-20 17:27:34 +00:00
Fran Dieguez
a0d0a17d68 Update Galician translation 2019-09-20 17:19:17 +00:00
Florian Müllner
92e5713e29 screenShield: Stop using deprecated actor property
Both LoginDialog and UnlockDialog are now actor subclasses, so stop
using the deprecated actor delegate that will trigger a warning.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736
2019-09-20 16:58:00 +00:00
Florian Müllner
856c32db91 unlockDialog: Use inheritance instead of composition
The screen shield creates the unlock dialog based on the session mode.

However since commit 0c0d76f7d6 turned LoginDialog into an actor
subclass (while UnlockDialog kept using the delegate pattern), it is
no longer possible to handle both objects the same way without warnings.

Allow this again by turning UnlockDialog into an actor subclass as well.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736
2019-09-20 16:58:00 +00:00
Florian Müllner
7b45ffa511 loginDialog: Stop using deprecated actor property
Commit 0c0d76f7d6 made the class an actor subclass, so the actor
property is just a deprecated synonym of the object itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736
2019-09-20 16:58:00 +00:00
Florian Müllner
b6754d7db7 environment: Try harder to find a transition
When easing, we need the transition of one of the involved properties
to connect our callbacks. Currently we simply get the transition for
the first property, however as Clutter optimizes the case where a
property doesn't actually change, that transition may be NULL even
though we still animate other properties.

So instead of only looking at the transition of the first property,
try to find a transition for any of the involved properties.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1572
2019-09-20 16:40:46 +00:00
Marco Trevisan (Treviño)
2a9977a5b3 layout: Don't use the actors pick workaround on update regions
As per introduction of geometric picking in mutter [1], the workaround we
had consisting in picking all the actors to ensure that all the stage
projections were computed to get valid actors stage-transformed coordinates
and sizes is not working anymore as there is more caching involved.

However since this can be now handled properly in mutter [2], initializing a
valid projection matrix since the beginning, we can get rid of the
workaround.

[1] https://gitlab.gnome.org/GNOME/mutter/commit/14c706e51
[2] https://gitlab.gnome.org/GNOME/mutter/merge_requests/803

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/734
2019-09-20 16:05:32 +00:00
Marco Trevisan (Treviño)
dab60d5580 renameFolderMenu: Use a custom menu item inheriting from PopupBaseMenuItem
The RenameFolderMenu uses the internal box as a menu item, while PopupMenu
expects to have PopupBaseMenuItem based children with a delegate set.

Instead of using a custom menu with a customized box acting as menu
item,just add a RenameFolderMenuItem that inherits from the parent,
adjusting the features as we need them. In fact, the rename folder menu item
doesn't need any label, padding or default styling so we can reuse
PopupMenuBaseItem after we use our styling properties and we set the
Ornament to HIDDEN.

To get the proper style in place, define rename-folder-popup and
rename-folder-popup-item to override the default popup-menu-item rule
padding instead of using margins.

Pass the menu item as menu's focusActor as this will key-focus it on pop-up,
by overriding the key_focus_in() vfunc we can then delegate the focus
handling to the entry's clutter-text.

Also override the map() vfunc in order to update the entry's content before
mapping the entry.

Finally, use the item's activate method in order to tell the parent menu
we're done with it and that the menu can be closed.

As consequence we can also remove the menu's popup() method, and just use
the default open().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
2019-09-20 15:53:42 +00:00
Marco Trevisan (Treviño)
8e3aac8ed7 renameFolderMenu: Move to non-legacy coding style
Use proper indentation on multi-line methods calls and use single quotes on
button label.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
2019-09-20 15:53:42 +00:00
Marco Trevisan (Treviño)
147cb53140 renameFolderMenu: Set the entry as menu focus actor
When the rename folder menu is opened the text entry is expected to be
focused and selected for a quick editing.
While this is required it doesn't actually happens since PopupMenu by
default gives the key focus to the source actor, that is then free to pass
the key focus to the menu if there's an user interaction.

In this case however, we want the text entry to be focused once we prompt
the menu, so just use the PopupMenu's focusActor property to ensure it will
handle it for us.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1604
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
2019-09-20 15:53:42 +00:00
Marco Trevisan (Treviño)
54f369404a popupMenu: Add focusActor property to define the default focus actor
The PopupMenuManager is supposed to grab and focus the menu actors, with
normal menus we always need to grab the actual menu but set the key focus to
the source actor so that it will be able to move the focus to the menu
child, if requested.

However there are menus such as the RenameFolderMenu that requires the
key-focus once prompted, so provide a focusActor property (defaulting to the
sourceActor) that can be set in order to define the actor to give the
keyboard focus to, when the menu is popped-up.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1604
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
2019-09-20 15:53:42 +00:00
Marco Trevisan (Treviño)
af1aabff75 popupBaseMenuItem: Add support for Hidden Ornament
The menu item ornament is used to put dots or checks in menus or otherwise
to define a padding for a label.
However in some cases we want to create a menu item with no left (in ltr)
padding.

In order to do that, define a HIDDEN Ornament mode that completely hides the
ornament actor.

The naming here might be confusing as this should probably be called NONE,
while the default mode is the invisible one, but it's too late to change it
now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
2019-09-20 15:53:42 +00:00
Marco Trevisan (Treviño)
d6ba6dc554 renameFolderMenu: Don't save the source
The source actor is already tracked by the PopupMenu internally as
sourceActor, while nothing in RenameFolderMenu uses the source, so we can
drop this.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
2019-09-20 15:53:42 +00:00
Marco Trevisan (Treviño)
42188b7698 folderIcon: Remove duplicated addMenu call
The RenameFolderMenu is added already to its menu manager, so no need to
repeat the operation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/720
2019-09-20 15:53:42 +00:00
Jonas Dreßler
48adb2ef4b workspace: Fix an incorrect signal check
While commit 3094f863 was intended to cancel the ongoing idle hide
timeout before we start a new one, a mistake slipped in there while
rebasing: Obviously we should check if the signal id is NOT 0 here.

This didn't prevent timeouts being started while old ones are still
running and did override `this._idleHideOverlayId`, which caused the old
timeouts to run indefinitely after an overlay actor was destroyed
because we fail early (and don't return TRUE) in `_idleHideOverlay()`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/735
2019-09-20 11:50:24 +02:00
Jonas Dreßler
f8e648b7e3 appDisplay: Animate DnD app icons at the position they were dropped
Indicate whether dropping an app icon was successful or not by using the
newly added `animateLaunchAtPos()` API of AppIcon which starts a zoom
out animation of the icon at the position the drop happened.

To get the position of the drag actor, we have to forward the arguments
passed to `acceptDrop()` and `handleDragOver()` to the internal drag
handlers of the WorkspaceThumbnails. We can use this position directly
without transforming it to stage coordinates because the actor is a
child of `Main.uiGroup` and the animation actor will also be a child of
this container.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
2019-09-18 17:14:16 +00:00
Jonas Dreßler
daa5452af2 appDisplay: Add API to animate launch at given position
Add a `animateLaunchAtPos()` method to the AppIcon class to animate the
launch of an app at a given position. This allows for a visual
indication of whether dropping an app icon using DnD was successful at
the position the drop happened in a later commit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
2019-09-18 17:14:16 +00:00
Jonas Dreßler
259874d731 workspace: Return results of forwarded acceptDrop
Return the results of calls to acceptDrop that we forwarded to the
Workspace object.

This fixes a bug where app icons that were dragged and released above a
window clone would get animated back to their original position
(indicating that nothing happened) even though they opened correctly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
2019-09-18 17:14:16 +00:00
Jonas Dreßler
23344701de overview: Only accept AppIcon drops if the app can open a new window
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
2019-09-18 17:14:16 +00:00
Jonas Dreßler
00e95de114 shell-app: Never allow opening new windows while an app is starting
We allow opening new windows as a fallback in case the app doesn't give
us explicit information about it, but we don't want to allow opening new
windows if we're unable to ask for this information (we can only use the
APIs to get this information while the app is RUNNING).

So always return FALSE in case the app is STARTING, always return TRUE
in case the app is STOPPED (starting an app always opens a new window)
and go through the usual checks in case the app is RUNNING (and
eventually fall back to FALSE).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
2019-09-18 17:14:16 +00:00
Jonas Dreßler
942758bb30 workspace: Use AppIcon.app to check action-support by the drag source
`AppIcon.shellWorkspaceLaunch()` can easily be replaced by checking for
`AppIcon.app` and calling `AppIcon.app.open_new_window()` directly.

For compatibility and to prevent breaking extensions implementing the
function, keep supporting the `shellWorkspaceLaunch` API in AppIcon
while logging a deprecation warning. Also keep supporting the API on
drag sources (without deprecating it) to allow extensions to define
custom actions on their drag sources.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/121
2019-09-18 17:14:16 +00:00
Jonas Ådahl
e0947b01bd introspect: Check whitelist also for GetRunningWindows()
Otherwise the xdg-desktop-portal-gtk screen cast widget won't work.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/732
2019-09-18 16:17:25 +00:00
Daniel García Moreno
cf00231aa8 st: Fix box-shadow drawing with prerendered_texture
The use of box-shadow on a StWidget that has a background-gradient was
not been rendered correctly, the shadow borders was calculated inside
the st_theme_node_prerender_shadow function and in the case that we've a
prerendered_texture the max_borders was not calculated and are 0.

This patch creates a new static function to compute shadow maximum
borders copying the code from st_theme_node_prerender_shadow, and call
this new method in the case that we've a prerendered_texture.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1186
2019-09-18 16:09:36 +00:00
Jonas Dreßler
5c3f4f5f8b workspace: Remove unused properties of WindowClone
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683
2019-09-18 15:56:26 +00:00
Jonas Dreßler
5f10047b58 viewSelector: Only reset search entry if it has key focus
If the search entry does not have any text typed in and a button press
happens outside of the search entry, we set key focus to NULL to make
the search entry appear unfocused.

This is quite intrusive and can easily cause unwanted focus changes, so
change the captured-event handler to only call `reset()` if the search
entry actually is focused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683
2019-09-18 15:56:26 +00:00
Jonas Dreßler
3094f86334 workspace: Reset idle hide timeout for overlays on reentry
Instead of returning and waiting until the old timeout is finished,
start a new idle hide timeout for the overlay when the pointer enters a
window clone. This makes sure the timeout for hiding the overlay after
the pointer left the clone mostly stays the same (except when leaving
the clone via the title or the close button).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683
2019-09-18 15:56:26 +00:00
Jonas Dreßler
8ffea9d5c5 workspace: Make title of overlay reactive
Also make the title of the overlay reactive so we can keep the overlay
visible if the mouse is hovering over the title.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683
2019-09-18 15:56:26 +00:00
Jonas Dreßler
4f3c8b8d69 workspace: Continue overlay idle hide timeout when pointing at close button
While it makes sense to remove the timeout in every other case, restart it
if the pointer is hovering over the close button to make sure the overlay
will be hidden afterwards.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683
2019-09-18 15:56:26 +00:00
Kjartan Maraas
edf6bd6909 Update Norwegian Bokmål translation 2019-09-18 13:34:34 +00:00
Charles Monzat
3e58af10ca Update French translation 2019-09-17 18:47:13 +00:00
Alexandre Franke
9e55d262f9 Update French translation 2019-09-17 11:44:09 +00:00
Florian Müllner
252e694979 util: Handle trailing LTR/RTL markers in URLs
Some electron apps apparently spread those generously over their
notification text, so may sure to not include them accidentally
in URLs.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1614
2019-09-16 20:41:47 +00:00
Florian Müllner
efed695eca cleanup: Don't add linebreak before operators
When breaking overly long conditions into multiple lines, the operator
should end the previous line instead of starting the new one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
b446667df6 cleanup: Disambiguate assignments in arrow functions
As arrow functions have an implicit return value, an assignment of
this.foo = bar could have been intended as a this.foo === bar
comparison. To catch those errors, we will disallow these kinds
of assignments unless they are marked explicitly by an extra pair
of parentheses.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
133a1e7bef cleanup: Remove trailing spaces
We generally avoid these (not least because Linus hates them enough
to make git complain loudly), but some sneaked in over time ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
5b3935fa43 cleanup: Fix up "special" comments
Our coding style asks for a space after the comment start, which
some of our ASCII-artsy comments violate. Adjust them to fit the
rule, or remove them altogether.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
471165ca9b cleanup: Use consistent brace style of blocks
Our coding style has always been to either put braces around all
blocks, or avoid them for all. Fix the couple of places that slipped
through.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
111f87a1b2 cleanup: Avoid pointless "renames" in destructuring
ES5 allows to rename variables in object destructuring, however this
only makes sense when we want to use a different name than the object
property.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
93525539c2 cleanup: Avoid unnecessary parentheses in arrow functions
Parentheses are only needed if there are zero or multiple arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
a77377efe7 cleanup: Avoid useless return statements
Return statements are only useful if they return a value or break
the regular function flow (i.e. early returns). Remove all returns
that do neither.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
81ab2865f7 cleanup: Don't use Array/Object constructors
The corresponding literals are more concise and cleaner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
e585f7d97b scripting: Disable an eslint warning
Calling await in a loop means the asynchronous operations are
run sequentially instead of in-parallel. Usually that's not
what's wanted, so eslint has a rule to warn about this.

However here we use async/await to handle control back to the
mainloop between steps, so running operations sequentially is
actually intended.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
1a32e3e74a volume: Clarify some code
We have more idiomatic ways to check whether any element fullfills
some condition than breaking out of a loop.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
8d6820c4df magnifier: Do not modify function argument
The intention of the code is clearly to operate on a copy, but that's
not how the Object constructor works. While it doesn't matter in
practice that we modify the passed-in object parameter, it's still
a good idea to fix the code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
2546445884 magnifier: Simplify some code
We don't need nested if blocks to set or unset the crosshairs'
clip size.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
2019-09-15 16:02:45 +02:00
Florian Müllner
e44b7df078 lint: Drop extra ignored nodes in legacy config
They didn't just allow for the style patterns they were added to,
but allowed for some messed up indentation to slip through. Now
that we adapted the code to not use the old style, it's time to
drop the exceptions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725
2019-09-15 13:30:19 +00:00
Florian Müllner
3a9eaa39ea cleanup: Switch some method calls to new indentation style
The legacy indent rule currently ignores arrow functions in parameters
to allow callbacks to not align with the other arguments:

    this._someFunctionWithFairlyLongishName(arg1, arg2, arg3,
        () => {
            this._someOtherFunctionWithLongName(arg1);
        });

But as ignoring entire nodes means we can end up with arbitrary
indentation, we should drop the exception. While this would make
the above "illegal" under the legacy config, it conforms with the
non-legacy style, so everything should be fine ...

... except that eslint starts to complain about some function args
that should be fine under the legacy config. Maybe it's thrown off
by the function-arg-in-arrow-function-in-function-arg structure, but
rather than figuring it out, let's just move those to the new style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725
2019-09-15 13:30:19 +00:00
Florian Müllner
af87bd8c87 cleanup: Use consistent style for ternary operator
We are currently inconsistent whether to put the operators in front
of the corresponding line or at the end of the preceding one. The
most dominant style for now is to put condition and first branch on
the same line, and then align the second branch:

  let foo = condition ? fooValue
                      : notFooValue;

Unfortunately that's a style that eslint doesn't support, so to account
for it, our legacy configuration currently plainly ignores all indentation
in conditionals.

In order to drop that exception and not let messed up indentation slip
through, change all ternary operators to the non-legacy style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725
2019-09-15 13:30:19 +00:00
Florian Müllner
4bfb4a0e3d cleanup: Fix wrong indentation
Some more places where the indentation doesn't comply with either
the old or new style. They slipped through because the legacy eslint
configuration accounts for some patterns by plainly ignoring certain
nodes. We'll address that later, first fix up the indentation errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/725
2019-09-15 13:30:19 +00:00
Martin Zurowietz
d1a6601e60 theme: Equalize dimensions of ws switcher popup boxes
The indicator for the active workspace is currently two pixels
smaller because it doesn't account for the border used for
inactive workspaces.

Fix that to make sure all indicators have the same size.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1243
2019-09-15 01:23:56 +02:00
Harshula Jayasuriya
817aec5466 overview: Fix fading out desktop icons
A typo in commit 0846238f69 broke the animation.

Signed-off-by: Harshula Jayasuriya <harshula@hj.id.au>

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1616
2019-09-14 14:05:12 +02:00
Марко Костић
314a89a837 Update Serbian translation 2019-09-13 19:43:24 +00:00
Jonas Ådahl
57ed68541a environment: Disable fullscreen unredirect during all transitions
When there is a transition, it's likely that we are animating some part
of the desktop, and in such situations we don't want to unredirect
fullscreen windows.

This fixes unwanted unredirection when e.g. hiding a modal dialog by
re-enabling the unredirection after the animation has finished, instead
of when it starts.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/721
2019-09-13 16:10:17 +00:00
Georges Basile Stavracas Neto
413c677fcf iconGrid: Only animate visible icons
Mutter recently added an optimization to only allocate
visible children [1]. That broke ClutterClones, but it
was subsequently fixed [2].

However, that exposed a third problem, this time with
FrequentView: visible but transparent icons, that are
not allocated by the icon grid, were cloned and animated
during the spring animation.

Only animate visible icons with opacity greater than 0.

[1] https://gitlab.gnome.org/GNOME/mutter/commit/0eab73dc
[2] https://gitlab.gnome.org/GNOME/mutter/commit/08a3cbfc

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/696
2019-09-13 15:33:45 +00:00
Milo Casagrande
3d86e6e791 Update Italian translation 2019-09-13 12:55:53 +00:00
Daniel Mustieles
3fbd61cbf0 Updated Spanish translation 2019-09-13 08:27:06 +02:00
Georges Basile Stavracas Neto
43b4f2c7d5 lookingGlass: Only update window list when visible
Updating the window list in the Looking Glass is a costly
operation: it destroys a whole lot of actors, and recreates
them. This triggers CSS changes, repaints, and allocations.

It is specially bad when paired with Wayland's big number
of window creations and deletions when showing Builder's
and Epiphany's popup window.

Only update the window list in the Looking Glass when it is
visible.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/556

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/719
2019-09-13 00:49:38 +00:00
Anders Jonsson
7eb4088f45 Update Swedish translation 2019-09-12 22:16:22 +00:00
Florian Müllner
f00201fa6c ci: Disable MR handling for now
We aren't quite ready to enforce non-legacy style for now, mostly due
to the xgettext bug that prevents us from using template strings in
some places, and vast amounts of legacy indentation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716
2019-09-12 23:18:27 +02:00
Florian Müllner
1aca2ba6bb ci: Disallow legacy style in merge requests
In order to transition from the current legacy style to the modern
gjs one, use the MR line-filtering we used to do on common errors
to ensure new code complies with the new style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716
2019-09-12 23:18:27 +02:00
Florian Müllner
e9131465dd ci: Fail on any common lint errors
Now that we fixed all pre-existing errors that are common between
regular and legacy configuration, we can stop filtering the result
by the lines modified by the merge request.

This will allow us to catch errors in merge requests that slipped
through until now, for example when leaving a newly-unused import
behind.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716
2019-09-12 23:18:27 +02:00
Florian Müllner
0ee7f02f8e cleanup: Don't assume hasOwnProperty() method on objects
Since ES5, it is possible to create objects with no prototype at all:

    let foo = Object.create(null);

Those object won't have any builtin properties like hasOwnProperty(),
which is why eslint added a corresponding rule to its default rule set.

While this isn't an issue that affects our code, there's no harm in fol-
lowing the recommendation and call the method through Object.prototype.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716
2019-09-12 23:18:27 +02:00
Florian Müllner
451f4e3636 cleanup: "Only" use two indentation styles for object literals
We currently use no less than three different ways of indenting
object literals:

    let obj1 = {
        foo: 42,
        bar: 23,
    };

    let obj2 = { foo: 42,
                 bar: 23 };

    let obj3 = { foo: 42,
                 bar: 23
               };

The first is the one we want to use everywhere eventually, while the
second is the most commonly used "legacy" style.

It is the third one that is most problematic, as it throws off eslint
fairly badly: It violates both the rule to have consistent line breaks
in braces as well as the indentation style of both regular and legacy
configurations.

Fortunately the third style was mostly used for tween parameters, so
is quite rare after the Tweener purge. Get rid of the remaining ones
to cut down on pre-existing eslint errors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/716
2019-09-12 23:18:24 +02:00
Florian Müllner
2fc4987c73 cleanup: Stop using Mainloop module
It is deprecated in favor of the regular GLib functions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/718
2019-09-12 19:09:24 +02:00
GB_2
4525ad346d windowMenu: Animate menu
Most menus have an animation, so add one to the window menu for
consistency and better looks (like !712).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/717
2019-09-12 16:01:46 +00:00
Danial Behzadi
e4b8a4b432 Update Persian translation 2019-09-12 12:27:27 +00:00
Enrico Nicoletto
62e594af6d Update Brazilian Portuguese translation 2019-09-12 11:35:40 +00:00
Florian Müllner
ce92270626 extensionSystem: Add missing return value
_callExtensionInit() should return whether the extension was initialized
successfully or not, but the early return added in commit 2a9e065cfb
doesn't.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/715
2019-09-12 12:45:05 +02:00
Jonas Dreßler
bdcf3037ca extensionSystem: Always disable multiple extensions in reverse order
Since disabling an extension will lead to disabling and re-enabling all
following extensions in the list, always disable multiple extensions by
looping through the list in reverse order.

This lowers the execution time of the event handlers quite a bit if many
extensions are installed.

Thanks to Philippe Troin for identifying the problem and proposing the
initial patch to change the extension order when reloading.

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
9698ff491a extensionSystem: Only add to extensionOrder array if enabling worked
Only push uuids of newly enabled extensions to the `_extensionOrder`
array if enabling them was successful.

Otherwise, since `_callExtensionDisable()` doesn't remove uuids that
weren't successfully enabled from the array, those extensions get added
to the array multiple times when they're disabled and enabled.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
2a9e065cfb extensionSystem: Always enforce disallowing extensions using sessionMode
It's currently possible to circumvent the `sessionMode.allowExtensions`
property: For already enabled extensions one can call reloadExtension
via DBus, for new extensions it's possible by adding the extension to
the enabled-extensions gsettings key and setting the
disable-extension-version-validation key (which triggers a reload of
`this._enabledExtensions`) and then calling reloadExtension via DBus.

So to enforce `allowExtensions` while still allowing to update
extensions and keeping the extensionSystem synced with various gsettings
keys, replace the checks for `this._enabled` with simple checks for
`Main.sessionMode.allowExtensions` inside `_callExtensionInit()` and
`_callExtensionEnable()`.

The remaining checks for `this._enabled` are only small optimizations to
prevent running code on irrelevant sessionMode updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
4c93ef39fa extensionSystem: Handle added or removed sessionMode extensions
Right now we're only handling added sessionMode extensions correctly on
sessionMode updates, also handle the other case and disable removed
sessionMode extensions on sessionMode updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
22107c183b extensionSystem: Rename initted to initialized
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
c06eb5d0a7 extensionSystem: Log an extension error if loading the stylesheet failed
Instead of only logging a message that loading the extension stylesheet
failed and silently returning we should use `logExtensionError` for that
instead. This also sets the extension state to ERROR and makes sure we
don't try to enable it again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
e76877c4b8 extensionSystem: Check if extension exists before accessing property
If the extension doesn't exist in the `this._extensions` Map, we'd try
to access `extension.dir` on undefined/null. So set the `dir` variable
after checking if `extension` is defined.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
2a32fb2e72 extensionSystem: Fix a wrong error message
The extension object is added to the `this._extensions` Map inside
`createExtensionObject`, not inside `loadExtension`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
de86920e0e extensionSystem: Remove unncessary return statements
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Jonas Dreßler
8754736fda extensionUtils: Check version variable for undefined first
Avoid a warning message when trying to access requiredArray[2] by
checking if its undefined first.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
2019-09-12 10:24:49 +00:00
Iain Lane
d2ead59d74 data: Lower TimeoutStartSec in systemd units
If there's a stubborn process in our cgroup, we shouldn't hang around
waiting for the default (30 seconds) before the session closes. We've
logged out, SIGTERMed and the thing is refusing to go away, let's not
make people hang around for ages.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/699
2019-09-12 08:16:10 +00:00
Emin Tufan Çetin
2f4fcc59a1 Update Turkish translation 2019-09-12 04:26:07 +00:00
Florian Müllner
ba6dbb228d workspace: Minor clarification
Code and comment were based on the old get_input_rect() and get_outer_rect()
method names that were changed to the more appropriate get_buffer_rect() and
get_frame_rect() a long time ago.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/713
2019-09-11 23:32:16 +00:00
Florian Müllner
60e386048b backgroundMenu: Animate menu opening
The animation was removed in commit 6a00a504d4 for consistency with
other menus. However commit a9b12d5d73 then *added* animations to
those just four minutes later.

So add back the original animations for consistency, both with menu
closing and with other menus.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1595
2019-09-11 23:25:21 +00:00
Christian Kirbach
c2904fa14d Update German translation 2019-09-11 21:14:44 +00:00
Florian Müllner
dfdb139d9c workspaceThumbnails: Replace loops with Array.find()
This is much more idiomatic and concise than iterating over
thumbnails until we find the one we are looking for.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
ce63d21dcc overview: Minor cleanup
Safe one indentation level by combining conditions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
1da9937453 workspace: Use operator shorthand
Shorthands like a += b are well-established, so prefer them over the
less concise a = a + b.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
9f11fbad16 jsParse: Disambiguate regex
Make it clear that /= is part of a regex and not an operator shorthand.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
f54e7804c5 workspace: Don't initialize variables to undefined
The declaration itself already does this implicitly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
7db5f8b28e calendar: Use template strings over concatenation
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
743ce23fbc util: Separate statements with linebreak
Our eslint rules will soon forbid more than one statement per line.
We already follow that rule except for one lone offender; fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
a3267be192 network: Don't omit parens when constructing
While it is legal to omit parentheses when invoking a constructor
with no arguments, we generally avoid that in our coding style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
4ad2523877 messageTray: Add missing linebreak
Methods should be separated by an empty lines, even when short.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
4bfee3a8ca ibusManager: Wrap line before dot
When chaining function calls, our coding style asks for the dot to
start the new line, not end the preceding one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
fc964f975a kbdA11yDialog: Avoid unnecessary ternary operators
A condition is already boolean, there's no point in explicitly
turning it into true/false.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
52f85c9465 system: Properly separate statements
Whoops, that's some typo that sneaked into commit 9c3b3320f8 ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
691610f23c lookingGlass: Fix misleading typeof use
typeof is an operator, not a function. Putting unneeded parentheses
around the expression obfuscates that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Florian Müllner
b6a2b2b8a5 cleanup: Remove left-over imports
Unfortunately this slipped through our CI tests, as the script
filters errors by lines that are modified by the corresponding
merge request.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
2019-09-11 20:59:31 +00:00
Daniel Șerbănescu
1ad8a2fcf6 Update Romanian translation 2019-09-11 20:13:21 +00:00
Balázs Úr
7ce08845f1 Update Hungarian translation 2019-09-11 20:11:51 +00:00
Aurimas Černius
d469250130 Updated Lithuanian translation 2019-09-11 22:37:29 +03:00
Jordi Mas
7fd5c47e06 Update Catalan translation 2019-09-11 21:21:08 +02:00
Kukuh Syafaat
8704b1004e Update Indonesian translation 2019-09-11 18:31:47 +00:00
Piotr Drąg
65a9fb8c01 Update Polish translation 2019-09-11 19:22:04 +02:00
Florian Müllner
25a7a8006a gnome-extensions: Translate help command
The quotes and COMMAND string aren't part of the syntax, so they
should be translated.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1538
2019-09-11 17:09:30 +00:00
Marek Černocký
6fe1d3248a Updated Czech translation 2019-09-11 18:01:13 +02:00
Jonas Dreßler
13f97532bf overviewControls: Remove slide transitions before setting value manually
Remove transitions of the `slide-x` property of the layout manager
before we set the property to a fixed value, otherwise the transitions
might still be running and change the value after we set it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/707
2019-09-11 11:39:44 +00:00
Anders Jonsson
1acee3d702 Update Swedish translation 2019-09-10 23:53:06 +00:00
Marco Trevisan (Treviño)
1d17404471 selectArea: Ignore motion events once we got a result
When selecting an area for screenshot we monitor the events while we've valid
coordinates in order to redraw the rubber band.
However, we don't stop ignore the motion events after button release and so
while animating. This might cause an unwanted effect if moving the mouse away
during fade out that is way more visible slowing-down the animations.

To fix this ignore any motion event once we've set the results.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/711
2019-09-10 22:08:25 +02:00
Florian Müllner
48b860b69f ci: Turn on -Werror
Now that all compiler warnings are fixed, let's try to keep it that
way by making warnings fatal during CI.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709
2019-09-10 17:51:02 +00:00
Florian Müllner
a030c54661 shell: Replace another GTimeVal
This slipped through in commit 9b7f228f8e.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709
2019-09-10 17:51:02 +00:00
Florian Müllner
dcf7bae6c7 calendar-server: Temporarily ignore all deprecations in eds includes
Evolution draws in libsoup, which exposes deprecated types in its
API. While its headers have been fixed to guard the affected symbols,
those fixes aren't in our CI images yet.

Until we get a fixed version, just disable all deprecation warnings
during the include in order to not trip over "foreign" bugs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709
2019-09-10 17:51:02 +00:00
Florian Müllner
d0ace108e5 calendar-server: Disable deprecated e-d-s API
We aren't using any deprecated evolution-data-server API, so we can
turn it off; this avoids compiler warnings for glib deprecations
used by those functions, which makes it harder to spot warnings for
our own code base.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709
2019-09-10 17:51:02 +00:00
Florian Müllner
32d5744014 build: Exclude private headers from GIR
They contain API that is explicitly not meant to be used externally
and - as it uses the "wrong" namespace due to the _ prefix - doesn't
end up in the introspection data anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709
2019-09-10 17:51:02 +00:00
Florian Müllner
d16094774b build: Remove st-private.h from "public" headers
It is currently listed both as public and private header, which is
clearly bonkers. As the name implies, the latter is correct ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709
2019-09-10 17:51:02 +00:00
Piotr Drąg
ac664ba321 Update Polish translation 2019-09-10 17:58:11 +02:00
Florian Müllner
0888a9bffd environment: Skip property animations while hidden
For implicit animations, Clutter will skip any transitions while
an actor is unmapped, and just set the property directly. Do the
same in our ease_property() convencience method.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/708
2019-09-10 14:41:26 +00:00
Daniel Mustieles
5e82d72424 Updated Spanish translation 2019-09-10 15:56:03 +02:00
Jiri Grönroos
2513835e89 Update Finnish translation 2019-09-10 11:11:21 +00:00
Kukuh Syafaat
98b70ef00f Update Indonesian translation 2019-09-10 07:12:48 +00:00
Daniel Șerbănescu
ae11381b88 Update Romanian translation 2019-09-10 06:48:29 +00:00
Milo Casagrande
e9596f2775 Update Italian translation 2019-09-10 06:47:05 +00:00
Balázs Úr
8adbc8010a Update Hungarian translation 2019-09-10 04:40:55 +00:00
Fran Dieguez
76fb559964 Update Galician translation 2019-09-09 22:45:51 +00:00
Rafael Fontenelle
1bc1b4d9d8 Update Brazilian Portuguese translation 2019-09-09 22:44:55 +00:00
Georges Basile Stavracas Neto
dfc0ef56f6 appDisplay: Allow editing folder names
Add a new popover with a regular entry + button to rename
folders. The layout is similar to other GNOME applications.

The popup is implemented as a PopupMenu subclass, leaving
the grab management to PopupMenuManager.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/675
2019-09-09 22:15:49 +02:00
Jonas Dreßler
1e68e78d8e extensionPrefs: Block notify::active signal handler while updating state
We disable and enable extensions inside the `notify::active` signal
handler, but we shouldn't do that in case the change didn't come from
the user but because something else changed the state of the extension.

This causes an issue when the extensionPrefs window is open and the
session gets locked: The extensions are temporarily disabled by the
shell, extensionPrefs updates its switches on the state change and adds
those extensions to the `disabled-extensions` gsettings key inside the
signal handler. Now when the session is unlocked again, the extensions
won't be enabled again since they're forced-disabled.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/705
2019-09-09 19:50:31 +00:00
Jonas Dreßler
17fa5a2db4 extensionPrefs: Connect to ExtensionStateChanged after building UI
Since we manipulate parts of the UI (like the switch) in this signal
handler, let's only connect it after setting up the UI.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/705
2019-09-09 19:50:31 +00:00
Jonas Dreßler
004a5e1042 iconGrid: Queue a relayout after child opacity changes
We're using a vfunc override for `get_paint_volume` to exclude children
with an opacity of 0 from the paint volume and thus decrease the size of
the area we need to paint.

Now if the paint volume is requested during the spring animation (the
real icons are hidden using an opacity of 0 and clones are used for the
animation), `get_paint_volume` returns a paint volume with a height of
0. After that, the spring animation finishes and the icon-opacities are
set to 255 in `_resetAnimationActors`, and since we cache paint volumes
and there's no reason for Clutter to assume it got invalid, the icons
end up not being painted.

Fix this by queuing a relayout of the grid when the opacity of a child
is changed from or to 0, which manually invalidates the paint volume.

The reason why this is not an issue with the paginated icon grid
(all-apps view) is probably because StScrollView invalidates the paint
volume a lot more often than regular containers.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1502
2019-09-09 19:39:28 +00:00
Jonas Dreßler
4915a9e8e4 iconGrid: Delete private child property when removing child
Delete a private property we set when the child got added to make sure
the reference is deleted after the child got removed from the grid.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/704
2019-09-09 19:39:28 +00:00
Marco Trevisan (Treviño)
8a7e44ccf0 extensionSystem: Use logError to record extension errors with stack trace
Extensions might emit JS errors explicitly or implicitly, however GNOME
Shell doesn't present any stack trace for those making them quite hard
to debug.

Make this easier by logging errors with logError() whichs includes the
stack dump.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:19 +00:00
Marco Trevisan (Treviño)
a497afe695 system: Track buttonGroup visibility using a group of actors
Cleanup the visibility check on actions by using an array of actors to
track, so that we don't repeat the same variables multiple times.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:19 +00:00
Marco Trevisan (Treviño)
15c252c11d popupMenu: Remove extra parameter on boolean ParamSpec initialization
PopupBaseMenuItem properties were initialized using wrong param spec
signature, fix this by removing the extra parameter.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
27da3ed1fe calendar: Use binding for clearButton visibility
When the calendar PlaceHolder is visible, the ClearButton shouldn't
be. Instead of setting the visibility explicitly, we can use a property
binding.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
8656102182 workspacesDisplay: Disconnect MetaLater and parent signals on destroy
When the WorkspacesDisplay actor is destroyed we should remove the
ongoing later and parent widget connections to avoid accessing an
invalid object on callback.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
24d3744cb9 workspace: Don't use clones' delegate to check children
The WindowClones are now themselves actors, so we can just check for
their type instead of checking for the delegate.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
031913b9df workspace: Use Workspace prefix for WindowClone class
We have both Workspace's WindowClone and workspaceThumbnail's WindowClone,
so better to be clear about them using a class prefix.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
e53443daf9 workspace: Remove Long-press later with the actor
Ensure that the long-press later is removed with the actor, otherwise
it will try to use invalidated data.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
06317f4f6a status/keyboard: Make Input source types var
These are used by keyboard so they need to be readable outside the
status.keyboard module.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
c69e195441 search: Remove updateSearch later on destruction
When the GridSearchBase actor is destroyed we should remove the
ongoing later that might try to access to invalid resources.

To do this, add an _onDestroy() callback function to SearchResultsBase
and override it in GridSearchBase.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
a53b48de4c locatePointer: Bind ripples creation to settings
Don't create ripples if locate pointer is not enabled, and bind
creation to the relative desktop interface settings key.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
eca98aee42 ripples: Add destroy() method and remove them when unneeded
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
ea5aaa8ab2 realmd: Set login format to null on start and update if invalid
We were checking an undefined property but that would lead to a a warning.
Instead we can consider the login format unset until is null, and in case
update it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
72566eda43 messageTray: Remove unused source object parameter
This is has been added in commit b150869b5 but is never used

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
7a4f9a5ff3 keyboard: Treat menu items as actors
This is a leftover of GNOME/gnome-shell!499, since menu items are all
actors now, we can just avoid using the actor property when adding an
action item.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
ba23fd9989 lookingGlass: Throw a clearer error on referencing invalid result index
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
c101196f5b lightbox: Use common ease parameters and avoid similar codepaths
Easing calls on show/hide functions have some parameters in common whether the
radial effect is enabled or not.

So instead of doing repeated calls with similar parameters, initialize common
values in params objects.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
1687a5451e altTab: use AltTab prefix on AppIcon class
There's an AppIcon class on appDisplay, so it won't be easy to discern
the one we're going to add in altTab.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Marco Trevisan (Treviño)
ea4d5f89eb animation: Stop the animation before removing all the children
If the resource scale or the scale factor changes while the animation
is playing, we need to stop the animation and start it again once the
texture is loaded, as the idle might try to access an invalidated
animation child otherwise.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
2019-09-09 19:28:18 +00:00
Florian Müllner
9e388ebcfd Bump version to 3.34.0
Update NEWS.
2019-09-09 19:21:11 +00:00
Carlos Garnacho
8d9cae45f9 st-clipboard: Add trailing 0 to pasted text
We translate the raw stream content far too directly into a char*,
it notably forgets that the stream does not have nul-ended data,
this means we are potentially adding garbage after the pasted content.

Tentatively fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1570
2019-09-09 19:04:31 +00:00
Claude Paroz
406d0900a7 Update French translation 2019-09-08 15:44:41 +00:00
Balázs Meskó
cf611d2be8 Update Hungarian translation 2019-09-07 18:25:17 +00:00
Dušan Kazik
7875fc831b Update Slovak translation 2019-09-07 14:20:05 +00:00
Sabri Ünal
44bca36385 Update Turkish translation 2019-09-07 07:16:54 +00:00
Carmen Bianca BAKKER
e2c3198627 Update Esperanto translation 2019-09-06 23:22:30 +00:00
Efstathios Iosifidis
8b549f3d5b Update Greek translation 2019-09-06 21:05:07 +00:00
Ryuta Fujii
a0e3c342a6 Update Japanese translation 2019-09-06 13:58:48 +00:00
Ryuta Fujii
a80331dbcf Update Japanese translation 2019-09-06 13:52:41 +00:00
Milo Casagrande
0068dab001 Update Italian translation 2019-09-06 08:41:20 +00:00
Tom Tryfonidis
7d42990462 Update Greek translation 2019-09-05 16:30:45 +00:00
Iain Lane
e6dec7a9dd volume: Ignore slider changes we initiated ourselves
Commit 21e14bd46f fixed this for the
brightness slider, but we have the same problem for volume too. When the
volume is muted - for example in Settings or via a media key, we update
the slider to '0' to indicate this visually. But we also actually invoke
the slider's callback to *set* the volume to zero. That means that the
previous level is overwritten so it can't be restored when unmuting.

The fix is the same - when we update the slider internally ourselves,
don't call the signal handler.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1557
2019-09-05 11:30:33 +01:00
Carlos Garnacho
8adfc5b106 windowManager: Handle starting/stopping of X11 services
We now do 2 things along Xwayland startup/shutdown:
- Start or stop the gnome-session-x11-services target, that will
  pull all X11 related services that the session might depend on.
- As we start ibus-daemon manually, trigger a restart in order to
  toggle the XIM daemon on and off along with Xwayland presence.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/680
2019-09-05 07:42:46 +00:00
Carlos Garnacho
8be95b5785 ibusManager: Add call to restart the ibus daemon
We may need to restart it with different arguments, so make it
possible to do that. Also, avoid to just restart it on _clear(),
this is now most likely through our --replace call than it is
through ibus-daemon eg. dying, avoids some noise in logs as
there is already an ongoing ibus-daemon.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/680
2019-09-05 07:42:46 +00:00
Carlos Garnacho
9194de8460 shell: Add helpers to start/stop systemd units
These just send the respective DBus message to the systemd user service.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/680
2019-09-05 07:42:46 +00:00
Florian Müllner
6dccbc5a90 Bump version to 3.33.92
Update NEWS.
2019-09-04 20:54:34 +02:00
Rafael Fontenelle
efba1e83c7 Update Brazilian Portuguese translation 2019-09-03 19:36:12 +00:00
Goran Vidović
d1442765a6 Update Croatian translation 2019-09-03 15:48:10 +00:00
Kukuh Syafaat
72e5caf6e1 Update Indonesian translation 2019-09-03 12:19:11 +00:00
Florian Müllner
3768b6b701 keyboard: Fix EmojiSelection:delta range
The setter clamps the values to the range (-width, width), so we
must not limit the property to positive values.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/698
2019-09-03 03:20:17 +02:00
Will Thompson
e5cde4700f notificationDaemon: Catch exceptions while loading notifications
An Endless OS system was found in the wild with a malformed
.local/share/gnome-shell/notifications which causes _loadNotifications()
to raise an exception. This exception was not previously handled and
bubbles all the way out to gnome_shell_plugin_start(), whereupon the
shell exit(1)s. The user could no longer log into their computer.

Handle exceptions from _loadNotifications(), log them, and attempt to
continue. Ensure that this._isLoading is set to 'false' even on error,
so that future calls to _saveNotifications() can overwrite the (corrupt)
state file.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1552
2019-09-03 01:00:50 +00:00
Will Thompson
a207f67f73 global: Don't trust persistent/runtime state data
An Endless OS system was found in the wild with a malformed
.local/share/gnome-shell/notifications. When deserialized in Python,
after passing trusted=True to g_variant_new_from_bytes(), the first
element of the first struct in the array looks like this:

    In [41]: _38.get_child_value(0).get_child_value(0)
    Out[41]: GLib.Variant('s', '\Uffffffff\Uffffffff\Uffffffff\Uffffffff\Uffffffff')

When deserialised in GJS, we get:

    gjs> v.get_child_value(0).get_child_value(0)
    [object variant of type "s"]
    gjs> v.get_child_value(0).get_child_value(0).get_string()
    typein:43:1 malformed UTF-8 character sequence at offset 0
      @typein:43:1
      @<stdin>:1:34

While g_variant_new_from_bytes() doesn't have much to say about its
'trusted' parameter, g_variant_new_from_data() does:

> If data is trusted to be serialised data in normal form then trusted
> should be TRUE. This applies to serialised data created within this
> process or read from a trusted location on the disk (such as a file
> installed in /usr/lib alongside your application). You should set
> trusted to FALSE if data is read from the network, a file in the
> user's home directory, etc.

Persistent state is read from the user's home directory, so it should
not be trusted. With trusted=False, the string value above comes out as
"".

I don't have an explanation for how this file ended up being malformed.
I also don't have an explanation for when this started crashing: my
guess is that recent GJS became stricter about validating UTF-8 but I
could be wrong!

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1552
2019-09-03 01:00:50 +00:00
Jonas Ådahl
b73aace476 shell: Get cairo surface via window actor
Instead of going via the MetaShapedTexture to get the cairo surface, get
it from the window actor. The window actor can then handle this in a way
that makes it include potential subsurfaces.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/692
2019-09-02 16:53:55 +00:00
Marek Černocký
346d37ecbb Updated Czech translation 2019-09-02 08:53:00 +02:00
Daniel Rusek
7bb29817f7 Update Czech translation 2019-09-01 21:21:10 +00:00
Aurimas Černius
92b92a2e0a Updated Lithuanian translation 2019-09-01 22:32:34 +03:00
Jordi Mas
8e79f9f2dc Update Catalan translation 2019-09-01 16:37:08 +02:00
Jonas Dreßler
05b345cc92 endSessionDialog: Initialize Polkit permission asynchronously
The updatesPermission is currently initialized synchronously, which
blocks the Mainloop for quite some time and therefore slows down startup
of the shell, let's do it asynchronously instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/689
2019-09-01 12:45:49 +02:00
Changwoo Ryu
89f9925208 Update Korean translation 2019-09-01 09:00:28 +00:00
A S Alam
fcc1d7beff Update Punjabi translation 2019-08-31 13:45:30 +00:00
134 changed files with 16591 additions and 8863 deletions

View File

@@ -54,7 +54,7 @@ build:
- meson mutter mutter/build --prefix=/usr -Dtests=false
- ninja -C mutter/build install
script:
- meson . build -Dbuiltype=debugoptimized -Dman=false
- meson . build -Dbuiltype=debugoptimized -Dman=false --werror
- ninja -C build
- ninja -C build install
<<: *only_default

View File

@@ -66,6 +66,10 @@ create_common() {
rm $OUTPUT_FINAL.tmp
}
# Disable MR handling for now. We aren't ready to enforce
# non-legacy style just yet ...
unset CI_MERGE_REQUEST_TARGET_BRANCH_NAME
if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
git fetch $CI_MERGE_REQUEST_PROJECT_URL.git $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
branch_point=$(git merge-base HEAD FETCH_HEAD)
@@ -86,12 +90,16 @@ run_eslint LEGACY
echo Done.
create_common
if ! is_empty $OUTPUT_FINAL; then
cat $OUTPUT_FINAL
exit 1
fi
# Just show the report and succeed when not testing a MR
if [ -z "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
cat $OUTPUT_FINAL
exit 0
fi
copy_matched_lines $OUTPUT_FINAL $LINE_CHANGES $OUTPUT_MR
copy_matched_lines $OUTPUT_REGULAR $LINE_CHANGES $OUTPUT_MR
cat $OUTPUT_MR
is_empty $OUTPUT_MR

34
NEWS
View File

@@ -1,3 +1,37 @@
3.34.0
======
* Handle startup/shutdown of misc X11 services [Carlos; !680]
* Fix sound volume mute/unmute [Iain; #1557]
* Correctly terminate pasted text [Carlos; #1570]
Contributors:
Carlos Garnacho, Iain Lane
Translators:
Tom Tryfonidis [el], Milo Casagrande [it], Ryuta Fujii [ja],
Efstathios Iosifidis [el], Carmen Bianca BAKKER [eo], Sabri Ünal [tr],
Dušan Kazik [sk], Balázs Meskó [hu], Claude Paroz [fr]
3.33.92
=======
* Animate pointer a11y pie timer [Jonas D.; !688]
* Fix restarting shell in systemd user session [Benjamin; !690]
* Misc. bug fixes and cleanups [Florian, Jonas D., Jonas Å., Will;
!691, !689, !692, #1552, !698]
Contributors:
Jonas Ådahl, Benjamin Berg, Piotr Drąg, Jonas Dreßler, Florian Müllner,
Will Thompson
Translators:
Daniel Șerbănescu [ro], Danial Behzadi [fa], Daniel Mustieles [es],
Jiri Grönroos [fi], Asier Sarasua Garmendia [eu], Piotr Drąg [pl],
Rūdolfs Mazurs [lv], Anders Jonsson [sv], Fran Dieguez [gl], Jordi Mas [ca],
Matej Urbančič [sl], Zander Brown [en_GB], Ryuta Fujii [ja], Tim Sabsch [de],
Fabio Tomat [fur], Pawan Chitrakar [ne], A S Alam [pa], Changwoo Ryu [ko],
Aurimas Černius [lt], Daniel Rusek [cs], Marek Černocký [cs],
Kukuh Syafaat [id], Goran Vidović [hr], Rafael Fontenelle [pt_BR]
3.33.91
=======
* Fix regression when adjusting brightness [Florian; #1500]

View File

@@ -23,3 +23,5 @@ ExecStart=@bindir@/gnome-shell
SuccessExitStatus=1
# On wayland we cannot restart
Restart=no
# Kill any stubborn child processes after this long
TimeoutStopSec=5

View File

@@ -29,3 +29,5 @@ SuccessExitStatus=1
Restart=always
# Do not wait before restarting the shell
RestartSec=0ms
# Kill any stubborn child processes after this long
TimeoutStopSec=5

View File

@@ -610,6 +610,13 @@ StScrollBar {
border-bottom-style: solid;
}
// Rename popup
.rename-folder-popup {
.rename-folder-popup-item {
spacing: 6px;
&:ltr, &:rtl { padding: 0, 12px; }
}
}
// Background menu
.background-menu { -boxpointer-gap: 4px; -arrow-rise: 0px; }
@@ -742,7 +749,7 @@ StScrollBar {
.ws-switcher-active-up, .ws-switcher-active-down,
.ws-switcher-active-left, .ws-switcher-active-right {
height: 50px;
height: 52px;
background-color: $selected_bg_color;
color: $selected_fg_color;
background-size: 32px;

View File

@@ -285,8 +285,9 @@ var Application = GObject.registerClass({
log(`Failed to connect to shell proxy: ${e}`);
this._mainStack.add_named(new NoShellPlaceholder(), 'noshell');
this._mainStack.visible_child_name = 'noshell';
} else
} else {
throw e;
}
return;
}
@@ -567,6 +568,10 @@ class ExtensionRow extends Gtk.ListBoxRow {
this._extension = extension;
this._prefsModule = null;
this.connect('destroy', this._onDestroy.bind(this));
this._buildUI();
this._extensionStateChangedId = this._app.shellProxy.connectSignal(
'ExtensionStateChanged', (p, sender, [uuid, newState]) => {
if (this.uuid !== uuid)
@@ -574,13 +579,13 @@ class ExtensionRow extends Gtk.ListBoxRow {
this._extension = ExtensionUtils.deserializeExtension(newState);
let state = (this._extension.state == ExtensionState.ENABLED);
GObject.signal_handler_block(this._switch, this._notifyActiveId);
this._switch.state = state;
GObject.signal_handler_unblock(this._switch, this._notifyActiveId);
this._switch.sensitive = this._canToggle();
});
this.connect('destroy', this._onDestroy.bind(this));
this._buildUI();
}
get uuid() {
@@ -646,7 +651,7 @@ class ExtensionRow extends Gtk.ListBoxRow {
sensitive: this._canToggle(),
state: this._extension.state === ExtensionState.ENABLED
});
this._switch.connect('notify::active', () => {
this._notifyActiveId = this._switch.connect('notify::active', () => {
if (this._switch.active)
this._app.shellProxy.EnableExtensionRemote(this.uuid);
else

View File

@@ -202,7 +202,6 @@ var ConsecutiveBatch = class extends Batch {
hold.disconnect(signalId);
this.nextTask();
});
return;
} else {
// This task finished, process the next one
this.nextTask();

View File

@@ -921,7 +921,7 @@ var LoginDialog = GObject.registerClass({
return;
this._bindOpacity();
this.actor.ease({
this.ease({
opacity: 255,
duration: _FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
@@ -944,7 +944,7 @@ var LoginDialog = GObject.registerClass({
_startSession(serviceName) {
this._bindOpacity();
this.actor.ease({
this.ease({
opacity: 0,
duration: _FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,

View File

@@ -21,6 +21,7 @@ var Manager = class {
'/org/freedesktop/realmd',
this._reloadRealms.bind(this));
this._realms = {};
this._loginFormat = null;
this._signalId = this._aggregateProvider.connect('g-properties-changed',
(proxy, properties) => {
@@ -86,7 +87,7 @@ var Manager = class {
}
get loginFormat() {
if (this._loginFormat !== undefined)
if (this._loginFormat)
return this._loginFormat;
this._updateLoginFormat();

View File

@@ -165,8 +165,8 @@ function versionCheck(required, current) {
let requiredArray = required[i].split('.');
if (requiredArray[0] == major &&
requiredArray[1] == minor &&
(requiredArray[2] == point ||
(requiredArray[2] == undefined && parseInt(minor) % 2 == 0)))
((requiredArray[2] === undefined && parseInt(minor) % 2 == 0) ||
requiredArray[2] == point))
return true;
}
return false;

View File

@@ -28,7 +28,7 @@ var HistoryManager = class {
this._entry = params.entry;
if (this._entry) {
this._entry.connect('key-press-event',
this._entry.connect('key-press-event',
this._onEntryKeyPress.bind(this));
}
}

View File

@@ -2,7 +2,6 @@
/* exported getIBusManager */
const { Gio, GLib, IBus } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const IBusCandidatePopup = imports.ui.ibusCandidatePopup;
@@ -19,9 +18,9 @@ function _checkIBusVersion(requiredMajor, requiredMinor, requiredMicro) {
IBus.MICRO_VERSION >= requiredMicro))
return;
throw "Found IBus version %d.%d.%d but required is %d.%d.%d".
format(IBus.MAJOR_VERSION, IBus.MINOR_VERSION, IBus.MINOR_VERSION,
requiredMajor, requiredMinor, requiredMicro);
throw "Found IBus version %d.%d.%d but required is %d.%d.%d"
.format(IBus.MAJOR_VERSION, IBus.MINOR_VERSION, IBus.MINOR_VERSION,
requiredMajor, requiredMinor, requiredMicro);
}
function getIBusManager() {
@@ -59,15 +58,19 @@ var IBusManager = class {
this._spawn();
}
_spawn() {
_spawn(extraArgs = []) {
try {
Gio.Subprocess.new(['ibus-daemon', '--xim', '--panel', 'disable'],
Gio.SubprocessFlags.NONE);
let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
} catch (e) {
log(`Failed to launch ibus-daemon: ${e.message}`);
}
}
restartDaemon(extraArgs = []) {
this._spawn(['-r', ...extraArgs]);
}
_clear() {
if (this._panelService)
this._panelService.destroy();
@@ -80,8 +83,6 @@ var IBusManager = class {
this._currentEngineName = null;
this.emit('ready', false);
this._spawn();
}
_onConnected() {
@@ -214,21 +215,23 @@ var IBusManager = class {
return;
if (this._preloadEnginesId != 0) {
Mainloop.source_remove(this._preloadEnginesId);
GLib.source_remove(this._preloadEnginesId);
this._preloadEnginesId = 0;
}
this._preloadEnginesId =
Mainloop.timeout_add_seconds(this._PRELOAD_ENGINES_DELAY_TIME,
() => {
this._ibus.preload_engines_async(
ids,
-1,
null,
null);
this._preloadEnginesId = 0;
return GLib.SOURCE_REMOVE;
});
GLib.timeout_add_seconds(
GLib.PRIORITY_DEFAULT,
this._PRELOAD_ENGINES_DELAY_TIME,
() => {
this._ibus.preload_engines_async(
ids,
-1,
null,
null);
this._preloadEnginesId = 0;
return GLib.SOURCE_REMOVE;
});
}
};
Signals.addSignalMethods(IBusManager.prototype);

View File

@@ -127,7 +127,8 @@ var IntrospectService = class {
let apps = this._appSystem.get_running();
let windowsList = {};
if (!this._isIntrospectEnabled()) {
if (!this._isIntrospectEnabled() &&
!this._isSenderWhitelisted(invocation.get_sender())) {
invocation.return_error_literal(Gio.DBusError,
Gio.DBusError.ACCESS_DENIED,
'App introspection not allowed');

View File

@@ -172,7 +172,7 @@ function getPropertyNamesFromExpression(expr, commandHeader = '') {
// Make sure propsUnique contains one key for every
// property so we end up with a unique list of properties
allProps.map(p => propsUnique[p] = null);
allProps.map(p => (propsUnique[p] = null));
}
return Object.keys(propsUnique).sort();
}
@@ -217,7 +217,7 @@ function isUnsafeExpression(str) {
prunedStr = prunedStr.replace(/[=!]==/g, ''); //replace === and !== with nothing
prunedStr = prunedStr.replace(/[=<>!]=/g, ''); //replace ==, <=, >=, != with nothing
if (prunedStr.match(/=/)) {
if (prunedStr.match(/[=]/)) {
return true;
} else if (prunedStr.match(/;/)) {
// If we contain a semicolon not inside of a quote/regex, assume we're unsafe as well

View File

@@ -84,9 +84,9 @@ function _findProviderForSid(sid) {
}
//------------------------------------------------------------------------------
// Support for the old ModemManager interface (MM < 0.7)
//------------------------------------------------------------------------------
// ----------------------------------------------------- //
// Support for the old ModemManager interface (MM < 0.7) //
// ----------------------------------------------------- //
// The following are not the complete interfaces, just the methods we need
@@ -182,9 +182,9 @@ var ModemCdma = class {
Signals.addSignalMethods(ModemCdma.prototype);
//------------------------------------------------------------------------------
// Support for the new ModemManager1 interface (MM >= 0.7)
//------------------------------------------------------------------------------
// ------------------------------------------------------- //
// Support for the new ModemManager1 interface (MM >= 0.7) //
// ------------------------------------------------------- //
const BroadbandModemInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem');
const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface);

View File

@@ -244,8 +244,9 @@ const SystemActions = GObject.registerClass({
_updateOrientationLockIcon() {
let locked = this._orientationSettings.get_boolean('orientation-lock');
let iconName = locked ? 'rotation-locked-symbolic'
: 'rotation-allowed-symbolic';
let iconName = locked
? 'rotation-locked-symbolic'
: 'rotation-allowed-symbolic';
this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName = iconName;
this.notify('orientation-lock-icon');
@@ -268,7 +269,7 @@ const SystemActions = GObject.registerClass({
getMatchingActions(terms) {
// terms is a list of strings
terms = terms.map((term) => term.toLowerCase());
terms = terms.map(term => term.toLowerCase());
let results = [];

View File

@@ -5,7 +5,6 @@
const { Clutter, Gio, GLib, GObject, Shell, St } = imports.gi;
const Gettext = imports.gettext;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
const Params = imports.misc.params;
@@ -15,7 +14,7 @@ var SCROLL_TIME = 100;
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
const _balancedParens = '\\([^\\s()<>]+\\)';
const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]';
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\u2018\u2019]';
const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u200E\u200F\u201C\u201D\u2018\u2019\u202A\u202C]';
const _urlRegexp = new RegExp(
`(^|${_leadingJunk})` +
@@ -314,7 +313,8 @@ function lowerBound(array, val, cmp) {
if (array.length == 0)
return 0;
min = 0; max = array.length;
min = 0;
max = array.length;
while (min < (max - 1)) {
mid = Math.floor((min + max) / 2);
v = cmp(array[mid], val);

View File

@@ -57,7 +57,7 @@ function waitAndDraw(milliseconds) {
cb();
});
return callback => cb = callback;
return callback => (cb = callback);
}
function waitSignal(object, signal) {
@@ -69,7 +69,7 @@ function waitSignal(object, signal) {
cb();
});
return callback => cb = callback;
return callback => (cb = callback);
}
function extractBootTimestamp() {
@@ -137,9 +137,9 @@ function *run() {
Main.overview.hide();
yield Scripting.waitLeisure();
////////////////////////////////////////
// Tests of redraw speed
////////////////////////////////////////
// --------------------- //
// Tests of redraw speed //
// --------------------- //
global.frame_timestamps = true;
global.frame_finish_timestamp = true;
@@ -186,8 +186,6 @@ function *run() {
yield Scripting.sleep(1000);
////////////////////////////////////////
let appSys = Shell.AppSystem.get_default();
let app = appSys.lookup_app('org.gnome.gedit.desktop');

View File

@@ -147,7 +147,7 @@ var AccessDialogDBus = class {
subtitle, body, options);
dialog.open();
dialog.connect('closed', () => this._accessDialog = null);
dialog.connect('closed', () => (this._accessDialog = null));
this._accessDialog = dialog;
}

View File

@@ -3,7 +3,6 @@
WindowCyclerPopup */
const { Atk, Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
const SwitcherPopup = imports.ui.switcherPopup;
@@ -292,7 +291,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
if (this._thumbnails)
this._destroyThumbnails();
if (this._thumbnailTimeoutId != 0)
Mainloop.source_remove(this._thumbnailTimeoutId);
GLib.source_remove(this._thumbnailTimeoutId);
}
/**
@@ -327,7 +326,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
}
if (this._thumbnailTimeoutId != 0) {
Mainloop.source_remove(this._thumbnailTimeoutId);
GLib.source_remove(this._thumbnailTimeoutId);
this._thumbnailTimeoutId = 0;
}
@@ -344,7 +343,8 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
this._thumbnails.highlight(window, forceAppFocus);
} else if (this._items[this._selectedIndex].cachedWindows.length > 1 &&
!forceAppFocus) {
this._thumbnailTimeoutId = Mainloop.timeout_add (
this._thumbnailTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
THUMBNAIL_POPUP_TIME,
this._timeoutPopupThumbnails.bind(this));
GLib.Source.set_name_by_id(this._thumbnailTimeoutId, '[gnome-shell] this._timeoutPopupThumbnails');
@@ -437,8 +437,8 @@ class CyclerHighlight {
if (this._clone.source)
this._clone.source.sync_visibility();
let windowActor = this._window ? this._window.get_compositor_private()
: null;
let windowActor = this._window
? this._window.get_compositor_private() : null;
if (windowActor)
windowActor.hide();
@@ -648,8 +648,9 @@ class WindowCyclerPopup extends CyclerPopup {
}
});
var AppIcon = GObject.registerClass(
class AppIcon extends St.BoxLayout {
var AppIcon = GObject.registerClass({
GTypeName: 'AltTab_AppIcon'
}, class AppIcon extends St.BoxLayout {
_init(app) {
super._init({ style_class: 'alt-tab-app',
vertical: true });
@@ -711,7 +712,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
_onDestroy() {
if (this._mouseTimeOutId != 0)
Mainloop.source_remove(this._mouseTimeOutId);
GLib.source_remove(this._mouseTimeOutId);
this.icons.forEach(icon => {
icon.app.disconnect(icon._stateChangedId);
@@ -790,14 +791,16 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
// activation when the thumbnail list is open
_onItemEnter(index) {
if (this._mouseTimeOutId != 0)
Mainloop.source_remove(this._mouseTimeOutId);
GLib.source_remove(this._mouseTimeOutId);
if (this._altTabPopup.thumbnailsVisible) {
this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT,
() => {
this._enterItem(index);
this._mouseTimeOutId = 0;
return GLib.SOURCE_REMOVE;
});
this._mouseTimeOutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
APP_ICON_HOVER_TIMEOUT,
() => {
this._enterItem(index);
this._mouseTimeOutId = 0;
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._mouseTimeOutId, '[gnome-shell] this._enterItem');
} else {
this._itemEntered(index);
@@ -874,9 +877,9 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
_init(windows) {
super._init(false);
this._labels = new Array();
this._thumbnailBins = new Array();
this._clones = new Array();
this._labels = [];
this._thumbnailBins = [];
this._clones = [];
this._windows = windows;
for (let i = 0; i < windows.length; i++) {
@@ -937,7 +940,7 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
}
// Make sure we only do this once
this._thumbnailBins = new Array();
this._thumbnailBins = [];
}
_removeThumbnail(source, clone) {
@@ -1011,9 +1014,9 @@ class WindowIcon extends St.BoxLayout {
}
_createAppIcon(app, size) {
let appIcon = app ? app.create_icon_texture(size)
: new St.Icon({ icon_name: 'icon-missing',
icon_size: size });
let appIcon = app
? app.create_icon_texture(size)
: new St.Icon({ icon_name: 'icon-missing', icon_size: size });
appIcon.x_expand = appIcon.y_expand = true;
appIcon.x_align = appIcon.y_align = Clutter.ActorAlign.END;
@@ -1040,7 +1043,7 @@ class WindowList extends SwitcherPopup.SwitcherList {
this.addItem(icon, icon.label);
this.icons.push(icon);
icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
icon._unmanagedSignalId = icon.window.connect('unmanaged', window => {
this._removeWindow(window);
});
}

View File

@@ -2,7 +2,6 @@
/* exported Animation, AnimatedIcon, Spinner */
const { Clutter, GLib, Gio, St } = imports.gi;
const Mainloop = imports.mainloop;
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
var SPINNER_ANIMATION_TIME = 300;
@@ -45,7 +44,7 @@ var Animation = class {
stop() {
if (this._timeoutId > 0) {
Mainloop.source_remove(this._timeoutId);
GLib.source_remove(this._timeoutId);
this._timeoutId = 0;
}
@@ -54,12 +53,19 @@ var Animation = class {
_loadFile(file, width, height) {
let [validResourceScale, resourceScale] = this.actor.get_resource_scale();
let wasPlaying = this._isPlaying;
if (this._isPlaying)
this.stop();
this._isLoaded = false;
this.actor.destroy_all_children();
if (!validResourceScale)
if (!validResourceScale) {
if (wasPlaying)
this.play();
return;
}
let textureCache = St.TextureCache.get_default();
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
@@ -67,6 +73,9 @@ var Animation = class {
scaleFactor, resourceScale,
this._animationsLoaded.bind(this));
this.actor.set_child(this._animations);
if (wasPlaying)
this.play();
}
_showFrame(frame) {

View File

@@ -3,7 +3,6 @@
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
const Mainloop = imports.mainloop;
const AppFavorites = imports.ui.appFavorites;
const BoxPointer = imports.ui.boxpointer;
@@ -506,7 +505,7 @@ var AllView = class AllView extends BaseAppView {
opacity: 0,
duration: VIEWS_SWITCH_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this.opacity = 255
onComplete: () => (this.opacity = 255)
});
if (animationDirection == IconGrid.AnimationDirection.OUT)
@@ -753,7 +752,6 @@ var AllView = class AllView extends BaseAppView {
let maxY = this._adjustment.upper - this._adjustment.page_size;
if (dragEvent.y >= gridBottom && currentY < maxY) {
this.goToPage(this._grid.currentPage + 1);
return;
}
}
@@ -1108,8 +1106,9 @@ var AppDisplay = class AppDisplay {
else
this._views[i].control.remove_style_pseudo_class('checked');
let animationDirection = i == activeIndex ? IconGrid.AnimationDirection.IN :
IconGrid.AnimationDirection.OUT;
let animationDirection = i == activeIndex
? IconGrid.AnimationDirection.IN
: IconGrid.AnimationDirection.OUT;
this._views[i].view.animateSwitch(animationDirection);
}
}
@@ -1159,11 +1158,10 @@ var AppSearchProvider = class AppSearchProvider {
if (id.endsWith('.desktop')) {
let app = this._appSys.lookup_app(id);
metas.push({ 'id': app.get_id(),
'name': app.get_name(),
'createIcon'(size) {
return app.create_icon_texture(size);
}
metas.push({
id: app.get_id(),
name: app.get_name(),
createIcon: size => app.create_icon_texture(size),
});
} else {
let name = this._systemActions.getName(id);
@@ -1438,6 +1436,13 @@ var FolderIcon = class FolderIcon {
this._itemDragEndId = Main.overview.connect(
'item-drag-end', this._onDragEnd.bind(this));
this._popupTimeoutId = 0;
this.actor.connect('leave-event', this._onLeaveEvent.bind(this));
this.actor.connect('button-press-event', this._onButtonPress.bind(this));
this.actor.connect('touch-event', this._onTouchEvent.bind(this));
this.actor.connect('popup-menu', this._popupRenamePopup.bind(this));
this.actor.connect('clicked', this.open.bind(this));
this.actor.connect('destroy', this.onDestroy.bind(this));
this.actor.connect('notify::mapped', () => {
@@ -1462,9 +1467,12 @@ var FolderIcon = class FolderIcon {
if (this._popup)
this._popup.actor.destroy();
this._removeMenuTimeout();
}
open() {
this._removeMenuTimeout();
this._ensurePopup();
this.view.actor.vscroll.adjustment.value = 0;
this._openSpaceForPopup();
@@ -1627,6 +1635,74 @@ var FolderIcon = class FolderIcon {
this._popupInvalidated = false;
}
_removeMenuTimeout() {
if (this._popupTimeoutId > 0) {
GLib.source_remove(this._popupTimeoutId);
this._popupTimeoutId = 0;
}
}
_setPopupTimeout() {
this._removeMenuTimeout();
this._popupTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, MENU_POPUP_TIMEOUT, () => {
this._popupTimeoutId = 0;
this._popupRenamePopup();
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._popupTimeoutId,
'[gnome-shell] this._popupRenamePopup');
}
_onLeaveEvent(_actor, _event) {
this.actor.fake_release();
this._removeMenuTimeout();
}
_onButtonPress(_actor, event) {
let button = event.get_button();
if (button == 1) {
this._setPopupTimeout();
} else if (button == 3) {
this._popupRenamePopup();
return Clutter.EVENT_STOP;
}
return Clutter.EVENT_PROPAGATE;
}
_onTouchEvent(actor, event) {
if (event.type() == Clutter.EventType.TOUCH_BEGIN)
this._setPopupTimeout();
return Clutter.EVENT_PROPAGATE;
}
_popupRenamePopup() {
this._removeMenuTimeout();
this.actor.fake_release();
if (!this._menu) {
this._menuManager = new PopupMenu.PopupMenuManager(this.actor);
this._menu = new RenameFolderMenu(this, this._folder);
this._menuManager.addMenu(this._menu);
this._menu.connect('open-state-changed', (menu, isPoppedUp) => {
if (!isPoppedUp)
this.actor.sync_hover();
});
let id = Main.overview.connect('hiding', () => {
this._menu.close();
});
this.actor.connect('destroy', () => {
Main.overview.disconnect(id);
});
}
this.actor.set_hover(true);
this._menu.open();
this._menuManager.ignoreRelease();
}
adaptToSize(width, height) {
this._parentAvailableWidth = width;
this._parentAvailableHeight = height;
@@ -1637,6 +1713,106 @@ var FolderIcon = class FolderIcon {
};
Signals.addSignalMethods(FolderIcon.prototype);
var RenameFolderMenuItem = GObject.registerClass(
class RenameFolderMenuItem extends PopupMenu.PopupBaseMenuItem {
_init(folder) {
super._init({
style_class: 'rename-folder-popup-item',
reactive: false,
});
this.setOrnament(PopupMenu.Ornament.HIDDEN);
this._folder = folder;
// Entry
this._entry = new St.Entry({
x_expand: true,
width: 200,
});
this.add_child(this._entry);
this._entry.clutter_text.connect(
'notify::text', this._validate.bind(this));
this._entry.clutter_text.connect(
'activate', this._updateFolderName.bind(this));
// Rename button
this._button = new St.Button({
style_class: 'button',
reactive: true,
button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO,
can_focus: true,
label: _('Rename'),
});
this.add_child(this._button);
this._button.connect('clicked', this._updateFolderName.bind(this));
}
vfunc_map() {
this._entry.text = _getFolderName(this._folder);
this._entry.clutter_text.set_selection(0, -1);
super.vfunc_map();
}
vfunc_key_focus_in() {
super.vfunc_key_focus_in();
this._entry.clutter_text.grab_key_focus();
}
_isValidFolderName() {
let folderName = _getFolderName(this._folder);
let newFolderName = this._entry.text.trim();
return newFolderName.length > 0 && newFolderName != folderName;
}
_validate() {
let isValid = this._isValidFolderName();
this._button.reactive = isValid;
}
_updateFolderName() {
if (!this._isValidFolderName())
return;
let newFolderName = this._entry.text.trim();
this._folder.set_string('name', newFolderName);
this._folder.set_boolean('translate', false);
this.activate(Clutter.get_current_event());
}
});
var RenameFolderMenu = class RenameFolderMenu extends PopupMenu.PopupMenu {
constructor(source, folder) {
super(source.actor, 0.5, St.Side.BOTTOM);
this.actor.add_style_class_name('rename-folder-popup');
// We want to keep the item hovered while the menu is up
this.blockSourceEvents = true;
let menuItem = new RenameFolderMenuItem(folder);
this.addMenuItem(menuItem);
// Focus the text entry on menu pop-up
this.focusActor = menuItem;
// Chain our visibility and lifecycle to that of the source
this._sourceMappedId = source.actor.connect('notify::mapped', () => {
if (!source.actor.mapped)
this.close();
});
source.actor.connect('destroy', () => {
source.actor.disconnect(this._sourceMappedId);
this.destroy();
});
Main.uiGroup.add_actor(this.actor);
}
};
Signals.addSignalMethods(RenameFolderMenu.prototype);
var AppFolderPopup = class AppFolderPopup {
constructor(source, side) {
this._source = source;
@@ -1722,15 +1898,17 @@ var AppFolderPopup = class AppFolderPopup {
direction = St.DirectionType.TAB_FORWARD;
break;
case Clutter.Right:
direction = isLtr ? St.DirectionType.TAB_FORWARD :
St.DirectionType.TAB_BACKWARD;
direction = isLtr
? St.DirectionType.TAB_FORWARD
: St.DirectionType.TAB_BACKWARD;
break;
case Clutter.Up:
direction = St.DirectionType.TAB_BACKWARD;
break;
case Clutter.Left:
direction = isLtr ? St.DirectionType.TAB_BACKWARD :
St.DirectionType.TAB_FORWARD;
direction = isLtr
? St.DirectionType.TAB_BACKWARD
: St.DirectionType.TAB_FORWARD;
break;
default:
return Clutter.EVENT_PROPAGATE;
@@ -1912,7 +2090,7 @@ var AppIcon = class AppIcon {
_removeMenuTimeout() {
if (this._menuTimeoutId > 0) {
Mainloop.source_remove(this._menuTimeoutId);
GLib.source_remove(this._menuTimeoutId);
this._menuTimeoutId = 0;
}
}
@@ -1926,7 +2104,7 @@ var AppIcon = class AppIcon {
_setPopupTimeout() {
this._removeMenuTimeout();
this._menuTimeoutId = Mainloop.timeout_add(MENU_POPUP_TIMEOUT, () => {
this._menuTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, MENU_POPUP_TIMEOUT, () => {
this._menuTimeoutId = 0;
this.popupMenu();
return GLib.SOURCE_REMOVE;
@@ -2044,6 +2222,10 @@ var AppIcon = class AppIcon {
this.icon.animateZoomOut();
}
animateLaunchAtPos(x, y) {
this.icon.animateZoomOutAtPos(x, y);
}
scaleIn() {
this.actor.scale_x = 0;
this.actor.scale_y = 0;
@@ -2058,6 +2240,9 @@ var AppIcon = class AppIcon {
}
shellWorkspaceLaunch(params) {
let { stack } = new Error();
log(`shellWorkspaceLaunch is deprecated, use app.open_new_window() instead\n${stack}`);
params = Params.parse(params, { workspace: -1,
timestamp: 0 });
@@ -2234,8 +2419,8 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
);
windows.forEach(window => {
let title = window.title ? window.title
: this._source.app.get_name();
let title = window.title
? window.title : this._source.app.get_name();
let item = this._appendMenuItem(title);
item.connect('activate', () => {
this.emit('activate-window', window);

View File

@@ -147,12 +147,11 @@ class AppFavorites {
let app = Shell.AppSystem.get_default().lookup_app(appId);
Main.overview.setMessage(_("%s has been added to your favorites.").format(app.get_name()),
{ forFeedback: true,
undoCallback: () => {
this._removeFavorite(appId);
}
});
let msg = _("%s has been added to your favorites.").format(app.get_name());
Main.overview.setMessage(msg, {
forFeedback: true,
undoCallback: () => this._removeFavorite(appId),
});
}
addFavorite(appId) {
@@ -181,12 +180,11 @@ class AppFavorites {
if (!this._removeFavorite(appId))
return;
Main.overview.setMessage(_("%s has been removed from your favorites.").format(app.get_name()),
{ forFeedback: true,
undoCallback: () => {
this._addFavorite(appId, pos);
}
});
let msg = _("%s has been removed from your favorites.").format(app.get_name());
Main.overview.setMessage(msg, {
forFeedback: true,
undoCallback: () => this._addFavorite(appId, pos),
});
}
}
Signals.addSignalMethods(AppFavorites.prototype);

View File

@@ -161,7 +161,7 @@ var AudioDeviceSelectionDBus = class AudioDeviceSelectionDBus {
let [deviceNames] = params;
let devices = 0;
deviceNames.forEach(n => devices |= AudioDevice[n.toUpperCase()]);
deviceNames.forEach(n => (devices |= AudioDevice[n.toUpperCase()]));
let dialog;
try {

View File

@@ -441,20 +441,21 @@ var Background = class Background {
}
_loadAnimation(file) {
this._cache.getAnimation({ file: file,
settingsSchema: this._settings.schema_id,
onLoaded: animation => {
this._animation = animation;
this._cache.getAnimation({
file: file,
settingsSchema: this._settings.schema_id,
onLoaded: animation => {
this._animation = animation;
if (!this._animation || this._cancellable.is_cancelled()) {
this._setLoaded();
return;
}
if (!this._animation || this._cancellable.is_cancelled()) {
this._setLoaded();
return;
}
this._updateAnimation();
this._watchFile(file);
}
});
this._updateAnimation();
this._watchFile(file);
}
});
}
_loadImage(file) {
@@ -748,13 +749,14 @@ var BackgroundManager = class BackgroundManager {
_createBackgroundActor() {
let background = this._backgroundSource.getBackground(this._monitorIndex);
let backgroundActor = new Meta.BackgroundActor({ meta_display: global.display,
monitor: this._monitorIndex,
background: background.background,
vignette: this._vignette,
vignette_sharpness: 0.5,
brightness: 0.5,
});
let backgroundActor = new Meta.BackgroundActor({
meta_display: global.display,
monitor: this._monitorIndex,
background: background.background,
vignette: this._vignette,
vignette_sharpness: 0.5,
brightness: 0.5,
});
this._container.add_child(backgroundActor);

View File

@@ -31,7 +31,7 @@ function addBackgroundMenu(actor, layoutManager) {
function openMenu(x, y) {
Main.layoutManager.setDummyCursorGeometry(x, y, 0, 0);
actor._backgroundMenu.open(BoxPointer.PopupAnimation.NONE);
actor._backgroundMenu.open(BoxPointer.PopupAnimation.FULL);
}
let clickAction = new Clutter.ClickAction();

View File

@@ -172,8 +172,8 @@ var BoxPointer = GObject.registerClass({
let borderWidth = themeNode.get_length('-arrow-border-width');
minSize += borderWidth * 2;
natSize += borderWidth * 2;
if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM))
|| (isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM)) ||
(isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
let rise = themeNode.get_length('-arrow-rise');
minSize += rise;
natSize += rise;

View File

@@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported Calendar, CalendarMessageList */
const { Clutter, Gio, GLib, Shell, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, Shell, St } = imports.gi;
const Signals = imports.signals;
const Main = imports.ui.main;
@@ -581,8 +581,9 @@ var Calendar = class Calendar {
if (row == 2)
styleClass = `calendar-day-top ${styleClass}`;
let leftMost = rtl ? iter.getDay() == (this._weekStart + 6) % 7
: iter.getDay() == this._weekStart;
let leftMost = rtl
? iter.getDay() == (this._weekStart + 6) % 7
: iter.getDay() == this._weekStart;
if (leftMost)
styleClass = `calendar-day-left ${styleClass}`;
@@ -680,23 +681,24 @@ var EventMessage = class EventMessage extends MessageList.Message {
*/
title = C_("event list time", "All Day");
} else {
let date = this._event.date >= periodBegin ? this._event.date
: this._event.end;
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 = title + ELLIPSIS_CHAR;
title = `${title}${ELLIPSIS_CHAR}`;
else
title = ELLIPSIS_CHAR + title;
title = `${ELLIPSIS_CHAR}${title}`;
}
if (this._event.end > periodEnd && !this._event.allDay) {
if (rtl)
title = ELLIPSIS_CHAR + title;
title = `${ELLIPSIS_CHAR}${title}`;
else
title = title + ELLIPSIS_CHAR;
title = `${title}${ELLIPSIS_CHAR}`;
}
return title;
}
@@ -1071,10 +1073,14 @@ var CalendarMessageList = class CalendarMessageList {
this._clearButton.set_x_align(Clutter.ActorAlign.END);
this._clearButton.connect('clicked', () => {
let sections = [...this._sections.keys()];
sections.forEach((s) => s.clear());
sections.forEach(s => s.clear());
});
box.add_actor(this._clearButton);
this._placeholder.actor.bind_property('visible',
this._clearButton, 'visible',
GObject.BindingFlags.INVERT_BOOLEAN);
this._sectionList = new St.BoxLayout({ style_class: 'message-list-sections',
vertical: true,
y_expand: true,
@@ -1145,7 +1151,6 @@ var CalendarMessageList = class CalendarMessageList {
let empty = sections.every(s => s.empty || !s.actor.visible);
this._placeholder.actor.visible = empty;
this._clearButton.visible = !empty;
let canClear = sections.some(s => s.canClear && s.actor.visible);
this._clearButton.reactive = canClear;

View File

@@ -2,7 +2,6 @@
/* exported Component */
const { Gio, GLib } = imports.gi;
const Mainloop = imports.mainloop;
const Params = imports.misc.params;
const GnomeSession = imports.misc.gnomeSession;
@@ -39,7 +38,7 @@ var AutomountManager = class {
this._driveDisconnectedId = this._volumeMonitor.connect('drive-disconnected', this._onDriveDisconnected.bind(this));
this._driveEjectButtonId = this._volumeMonitor.connect('drive-eject-button', this._onDriveEjectButton.bind(this));
this._mountAllId = Mainloop.idle_add(this._startupMountAll.bind(this));
this._mountAllId = GLib.idle_add(GLib.PRIORITY_DEFAULT, this._startupMountAll.bind(this));
GLib.Source.set_name_by_id(this._mountAllId, '[gnome-shell] this._startupMountAll');
}
@@ -51,7 +50,7 @@ var AutomountManager = class {
this._volumeMonitor.disconnect(this._driveEjectButtonId);
if (this._mountAllId > 0) {
Mainloop.source_remove(this._mountAllId);
GLib.source_remove(this._mountAllId);
this._mountAllId = 0;
}
}
@@ -157,7 +156,7 @@ var AutomountManager = class {
!volume.should_automount() ||
!volume.can_mount()) {
// allow the autorun to run anyway; this can happen if the
// mount gets added programmatically later, even if
// mount gets added programmatically later, even if
// should_automount() or can_mount() are false, like for
// blank optical media.
this._allowAutorun(volume);
@@ -220,17 +219,17 @@ var AutomountManager = class {
_onVolumeRemoved(monitor, volume) {
if (volume._allowAutorunExpireId && volume._allowAutorunExpireId > 0) {
Mainloop.source_remove(volume._allowAutorunExpireId);
GLib.source_remove(volume._allowAutorunExpireId);
delete volume._allowAutorunExpireId;
}
this._volumeQueue =
this._volumeQueue =
this._volumeQueue.filter(element => (element != volume));
}
_reaskPassword(volume) {
let prevOperation = this._activeOperations.get(volume);
let existingDialog = prevOperation ? prevOperation.borrowDialog() : null;
let operation =
let operation =
new ShellMountOperation.ShellMountOperation(volume,
{ existingDialog: existingDialog });
this._mountVolume(volume, operation);
@@ -249,7 +248,7 @@ var AutomountManager = class {
}
_allowAutorunExpire(volume) {
let id = Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, () => {
let id = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, AUTORUN_EXPIRE_TIMEOUT_SECS, () => {
volume.allowAutorun = false;
delete volume._allowAutorunExpireId;
return GLib.SOURCE_REMOVE;

View File

@@ -63,7 +63,7 @@ function startAppForMount(app, mount) {
files.push(root);
try {
retval = app.launch(files,
retval = app.launch(files,
global.create_app_launch_context(0, -1));
} catch (e) {
log(`Unable to launch the application ${app.get_name()}: ${e}`);
@@ -72,8 +72,6 @@ function startAppForMount(app, mount) {
return retval;
}
/******************************************/
const HotplugSnifferIface = loadInterfaceXML('org.gnome.Shell.HotplugSniffer');
const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
function HotplugSniffer() {
@@ -117,9 +115,9 @@ var ContentTypeDiscoverer = class {
let hotplugSniffer = new HotplugSniffer();
hotplugSniffer.SniffURIRemote(root.get_uri(),
([contentTypes]) => {
this._emitCallback(mount, contentTypes);
});
([contentTypes]) => {
this._emitCallback(mount, contentTypes);
});
}
}
@@ -215,11 +213,11 @@ var AutorunDispatcher = class {
}
_addSource(mount, apps) {
// if we already have a source showing for this
// if we already have a source showing for this
// mount, return
if (this._getSourceForMount(mount))
return;
// add a new source
this._sources.push(new AutorunSource(this._manager, mount, apps));
}
@@ -264,7 +262,7 @@ var AutorunDispatcher = class {
removeMount(mount) {
let source = this._getSourceForMount(mount);
// if we aren't tracking this mount, don't do anything
if (!source)
return;
@@ -325,10 +323,10 @@ var AutorunNotification = class extends MessageTray.Notification {
style_class: 'hotplug-notification-item-icon' });
box.add(icon);
let label = new St.Bin({ y_align: St.Align.MIDDLE,
child: new St.Label
({ text: _("Open with %s").format(app.get_name()) })
});
let label = new St.Bin({
y_align: St.Align.MIDDLE,
child: new St.Label({ text: _("Open with %s").format(app.get_name()) }),
});
box.add(label);
let button = new St.Button({ child: box,

View File

@@ -232,8 +232,9 @@ var KeyringPrompter = class {
constructor() {
this._prompter = new Gcr.SystemPrompter();
this._prompter.connect('new-prompt', () => {
let dialog = this._enabled ? new KeyringDialog()
: new KeyringDummyDialog();
let dialog = this._enabled
? new KeyringDialog()
: new KeyringDummyDialog();
this._currentPrompt = dialog.prompt;
return this._currentPrompt;
});

View File

@@ -112,16 +112,17 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
expand: true });
}
this._okButton = { label: _("Connect"),
action: this._onOk.bind(this),
default: true
};
this._okButton = {
label: _("Connect"),
action: this._onOk.bind(this),
default: true,
};
this.setButtons([{ label: _("Cancel"),
action: this.cancel.bind(this),
key: Clutter.KEY_Escape,
},
this._okButton]);
this.setButtons([{
label: _("Cancel"),
action: this.cancel.bind(this),
key: Clutter.KEY_Escape,
}, this._okButton]);
this._updateOkButton();
}
@@ -163,9 +164,9 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
if (value.length == 64) {
// must be composed of hexadecimal digits only
for (let i = 0; i < 64; i++) {
if (!((value[i] >= 'a' && value[i] <= 'f')
|| (value[i] >= 'A' && value[i] <= 'F')
|| (value[i] >= '0' && value[i] <= '9')))
if (!((value[i] >= 'a' && value[i] <= 'f') ||
(value[i] >= 'A' && value[i] <= 'F') ||
(value[i] >= '0' && value[i] <= '9')))
return false;
}
return true;
@@ -179,15 +180,15 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
if (secret.wep_key_type == NM.WepKeyType.KEY) {
if (value.length == 10 || value.length == 26) {
for (let i = 0; i < value.length; i++) {
if (!((value[i] >= 'a' && value[i] <= 'f')
|| (value[i] >= 'A' && value[i] <= 'F')
|| (value[i] >= '0' && value[i] <= '9')))
if (!((value[i] >= 'a' && value[i] <= 'f') ||
(value[i] >= 'A' && value[i] <= 'F') ||
(value[i] >= '0' && value[i] <= '9')))
return false;
}
} else if (value.length == 5 || value.length == 13) {
for (let i = 0; i < value.length; i++) {
if (!((value[i] >= 'a' && value[i] <= 'z')
|| (value[i] >= 'A' && value[i] <= 'Z')))
if (!((value[i] >= 'a' && value[i] <= 'z') ||
(value[i] >= 'A' && value[i] <= 'Z')))
return false;
}
} else {
@@ -551,11 +552,12 @@ var VPNRequestHandler = class {
let shouldAsk = keyfile.get_boolean(groups[i], 'ShouldAsk');
if (shouldAsk) {
contentOverride.secrets.push({ label: keyfile.get_string(groups[i], 'Label'),
key: groups[i],
value: value,
password: keyfile.get_boolean(groups[i], 'IsSecret')
});
contentOverride.secrets.push({
label: keyfile.get_string(groups[i], 'Label'),
key: groups[i],
value: value,
password: keyfile.get_boolean(groups[i], 'IsSecret'),
});
} else {
if (!value.length) // Ignore empty secrets
continue;
@@ -609,10 +611,11 @@ Signals.addSignalMethods(VPNRequestHandler.prototype);
var NetworkAgent = class {
constructor() {
this._native = new Shell.NetworkAgent({ identifier: 'org.gnome.Shell.NetworkAgent',
capabilities: NM.SecretAgentCapabilities.VPN_HINTS,
auto_register: false
});
this._native = new Shell.NetworkAgent({
identifier: 'org.gnome.Shell.NetworkAgent',
capabilities: NM.SecretAgentCapabilities.VPN_HINTS,
auto_register: false,
});
this._dialogs = { };
this._vpnRequests = { };
@@ -621,7 +624,7 @@ var NetworkAgent = class {
this._pluginDir = Gio.file_new_for_path(Config.VPNDIR);
try {
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
monitor.connect('changed', () => this._vpnCacheBuilt = false);
monitor.connect('changed', () => (this._vpnCacheBuilt = false));
} catch (e) {
log(`Failed to create monitor for VPN plugin dir: ${e.message}`);
}

View File

@@ -3,7 +3,6 @@
const { Clutter, Gio, GLib, GObject, St } = imports.gi;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
var Tpl = null;
var Tp = null;
@@ -546,8 +545,8 @@ var ChatSource = class extends MessageTray.Source {
// Wait a bit before notifying for the received message, a handler
// could ack it in the meantime.
if (this._notifyTimeoutId != 0)
Mainloop.source_remove(this._notifyTimeoutId);
this._notifyTimeoutId = Mainloop.timeout_add(500,
GLib.source_remove(this._notifyTimeoutId);
this._notifyTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500,
this._notifyTimeout.bind(this));
GLib.Source.set_name_by_id(this._notifyTimeoutId, '[gnome-shell] this._notifyTimeout');
}
@@ -584,7 +583,7 @@ var ChatSource = class extends MessageTray.Source {
let msg = Tp.ClientMessage.new_text(type, text);
this._channel.send_message_async(msg, 0, (src, result) => {
this._channel.send_message_finish(result);
this._channel.send_message_finish(result);
});
}
@@ -641,7 +640,7 @@ var ChatNotification = class extends MessageTray.Notification {
destroy(reason) {
if (this._timestampTimeoutId)
Mainloop.source_remove(this._timestampTimeoutId);
GLib.source_remove(this._timestampTimeoutId);
this._timestampTimeoutId = 0;
super.destroy(reason);
}
@@ -654,7 +653,7 @@ var ChatNotification = class extends MessageTray.Notification {
* sender: the name of the sender,
* timestamp: the time the message was sent
* direction: a #NotificationDirection
*
*
* @noTimestamp: Whether to add a timestamp. If %true, no timestamp
* will be added, regardless of the difference since the
* last timestamp
@@ -674,8 +673,8 @@ var ChatNotification = class extends MessageTray.Notification {
{ datetime: GLib.DateTime.new_from_unix_local (message.timestamp),
bannerMarkup: true });
let group = (message.direction == NotificationDirection.RECEIVED ?
'received' : 'sent');
let group = (message.direction == NotificationDirection.RECEIVED
? 'received' : 'sent');
this._append({ body: messageBody,
group: group,
@@ -697,8 +696,8 @@ var ChatNotification = class extends MessageTray.Notification {
// SCROLLBACK_RECENT_LENGTH previous messages. Otherwise
// we'll keep SCROLLBACK_IDLE_LENGTH messages.
let maxLength = (lastMessageTime < currentTime - SCROLLBACK_RECENT_TIME) ?
SCROLLBACK_IDLE_LENGTH : SCROLLBACK_RECENT_LENGTH;
let maxLength = (lastMessageTime < currentTime - SCROLLBACK_RECENT_TIME)
? SCROLLBACK_IDLE_LENGTH : SCROLLBACK_RECENT_LENGTH;
let filteredHistory = this.messages.filter(item => item.realMessage);
if (filteredHistory.length > maxLength) {
@@ -729,7 +728,7 @@ var ChatNotification = class extends MessageTray.Notification {
// Reset the old message timeout
if (this._timestampTimeoutId)
Mainloop.source_remove(this._timestampTimeoutId);
GLib.source_remove(this._timestampTimeoutId);
this._timestampTimeoutId = 0;
let message = { realMessage: props.group != 'meta',
@@ -747,7 +746,8 @@ var ChatNotification = class extends MessageTray.Notification {
} else {
// Schedule a new timestamp in SCROLLBACK_IMMEDIATE_TIME
// from the timestamp of the message.
this._timestampTimeoutId = Mainloop.timeout_add_seconds(
this._timestampTimeoutId = GLib.timeout_add_seconds(
GLib.PRIORITY_DEFAULT,
SCROLLBACK_IMMEDIATE_TIME - (currentTime - timestamp),
this.appendTimestamp.bind(this));
GLib.Source.set_name_by_id(this._timestampTimeoutId, '[gnome-shell] this.appendTimestamp');
@@ -952,14 +952,15 @@ var ChatNotificationBanner = class extends MessageTray.NotificationBanner {
// Remove composing timeout.
if (this._composingTimeoutId > 0) {
Mainloop.source_remove(this._composingTimeoutId);
GLib.source_remove(this._composingTimeoutId);
this._composingTimeoutId = 0;
}
if (text != '') {
this.notification.source.setChatState(Tp.ChannelChatState.COMPOSING);
this._composingTimeoutId = Mainloop.timeout_add_seconds(
this._composingTimeoutId = GLib.timeout_add_seconds(
GLib.PRIORITY_DEFAULT,
COMPOSING_STOP_TIMEOUT,
this._composingStopTimeout.bind(this));
GLib.Source.set_name_by_id(this._composingTimeoutId, '[gnome-shell] this._composingStopTimeout');

View File

@@ -2,7 +2,6 @@
/* exported Dash */
const { Clutter, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const AppDisplay = imports.ui.appDisplay;
@@ -500,7 +499,7 @@ var Dash = class Dash {
// that the notify::hover handler does everything we need to.
if (opened) {
if (this._showLabelTimeoutId > 0) {
Mainloop.source_remove(this._showLabelTimeoutId);
GLib.source_remove(this._showLabelTimeoutId);
this._showLabelTimeoutId = 0;
}
@@ -514,7 +513,7 @@ var Dash = class Dash {
if (shouldShow) {
if (this._showLabelTimeoutId == 0) {
let timeout = this._labelShowing ? 0 : DASH_ITEM_HOVER_TIMEOUT;
this._showLabelTimeoutId = Mainloop.timeout_add(timeout,
this._showLabelTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, timeout,
() => {
this._labelShowing = true;
item.showLabel();
@@ -523,17 +522,17 @@ var Dash = class Dash {
});
GLib.Source.set_name_by_id(this._showLabelTimeoutId, '[gnome-shell] item.showLabel');
if (this._resetHoverTimeoutId > 0) {
Mainloop.source_remove(this._resetHoverTimeoutId);
GLib.source_remove(this._resetHoverTimeoutId);
this._resetHoverTimeoutId = 0;
}
}
} else {
if (this._showLabelTimeoutId > 0)
Mainloop.source_remove(this._showLabelTimeoutId);
GLib.source_remove(this._showLabelTimeoutId);
this._showLabelTimeoutId = 0;
item.hideLabel();
if (this._labelShowing) {
this._resetHoverTimeoutId = Mainloop.timeout_add(DASH_ITEM_HOVER_TIMEOUT,
this._resetHoverTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, DASH_ITEM_HOVER_TIMEOUT,
() => {
this._labelShowing = false;
this._resetHoverTimeoutId = 0;
@@ -704,8 +703,8 @@ var Dash = class Dash {
}
// App moved
let nextApp = newApps.length > newIndex + 1 ? newApps[newIndex + 1]
: null;
let nextApp = newApps.length > newIndex + 1
? newApps[newIndex + 1] : null;
let insertHere = nextApp && nextApp == oldApp;
let alreadyRemoved = removedActors.reduce((result, actor) => {
let removedApp = actor.child._delegate.app;

View File

@@ -30,11 +30,13 @@ var TodayButton = class TodayButton {
// Having the ability to go to the current date if the user is already
// on the current date can be confusing. So don't make the button reactive
// until the selected date changes.
this.actor = new St.Button({ style_class: 'datemenu-today-button',
x_expand: true, x_align: St.Align.START,
can_focus: true,
reactive: false
});
this.actor = new St.Button({
style_class: 'datemenu-today-button',
x_align: St.Align.START,
x_expand: true,
can_focus: true,
reactive: false,
});
this.actor.connect('clicked', () => {
this._calendar.setDate(new Date(), false);
});
@@ -146,8 +148,9 @@ var WorldClocksSection = class WorldClocksSection {
});
let layout = this._grid.layout_manager;
let title = (this._locations.length == 0) ? _("Add world clocks…")
: _("World Clocks");
let title = (this._locations.length == 0)
? _("Add world clocks")
: _("World Clocks");
let header = new St.Label({ style_class: 'world-clocks-header',
x_align: Clutter.ActorAlign.START,
text: title });
@@ -410,7 +413,7 @@ var MessagesIndicator = class MessagesIndicator {
_updateCount() {
let count = 0;
this._sources.forEach(source => count += source.unseenCount);
this._sources.forEach(source => (count += source.unseenCount));
count -= Main.messageTray.queueCount;
this.actor.visible = (count > 0);

View File

@@ -642,12 +642,13 @@ var _Draggable = class _Draggable {
this._dragState = DragState.CANCELLED;
if (this._actorDestroyed || wasCancelled) {
let dragActor = this._dragActor;
global.display.set_cursor(Meta.Cursor.DEFAULT);
if (!this._buttonDown)
this._dragComplete();
this.emit('drag-end', eventTime, false);
if (!this._dragOrigParent && this._dragActor)
this._dragActor.destroy();
if (!this._dragOrigParent && dragActor)
dragActor.destroy();
return;
}
@@ -702,17 +703,17 @@ var _Draggable = class _Draggable {
}
_onAnimationComplete(dragActor, eventTime) {
this.emit('drag-end', eventTime, false);
this._finishAnimation();
if (this._dragOrigParent) {
Main.uiGroup.remove_child(this._dragActor);
this._dragOrigParent.add_actor(this._dragActor);
Main.uiGroup.remove_child(dragActor);
this._dragOrigParent.add_actor(dragActor);
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
dragActor.set_position(this._dragOrigX, this._dragOrigY);
} else {
dragActor.destroy();
}
this.emit('drag-end', eventTime, false);
this._finishAnimation();
}
_dragComplete() {

View File

@@ -17,8 +17,6 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
const Mainloop = imports.mainloop;
const { AccountsService, Clutter, Gio,
GLib, GObject, Pango, Polkit, Shell, St } = imports.gi;
@@ -352,12 +350,15 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
}
// It only makes sense to check for this permission if PackageKit is available.
try {
this._updatesPermission = Polkit.Permission.new_sync(
'org.freedesktop.packagekit.trigger-offline-update', null, null);
} catch (e) {
log('No permission to trigger offline updates: %s'.format(e.toString()));
}
Polkit.Permission.new(
'org.freedesktop.packagekit.trigger-offline-update', null, null,
(source, res) => {
try {
this._updatesPermission = Polkit.Permission.new_finish(res);
} catch (e) {
log(`No permission to trigger offline updates: ${e}`);
}
});
}
_onDestroy() {
@@ -448,14 +449,16 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
for (let i = 0; i < dialogContent.confirmButtons.length; i++) {
let signal = dialogContent.confirmButtons[i].signal;
let label = dialogContent.confirmButtons[i].label;
buttons.push({ action: () => {
this.close(true);
let signalId = this.connect('closed', () => {
this.disconnect(signalId);
this._confirm(signal);
});
},
label: label });
buttons.push({
action: () => {
this.close(true);
let signalId = this.connect('closed', () => {
this.disconnect(signalId);
this._confirm(signal);
});
},
label: label,
});
}
this.setButtons(buttons);
@@ -562,7 +565,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
let startTime = GLib.get_monotonic_time();
this._secondsLeft = this._totalSecondsToStayOpen;
this._timerId = Mainloop.timeout_add_seconds(1, () => {
this._timerId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => {
let currentTime = GLib.get_monotonic_time();
let secondsElapsed = ((currentTime - startTime) / 1000000);
@@ -584,7 +587,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
_stopTimer() {
if (this._timerId > 0) {
Mainloop.source_remove(this._timerId);
GLib.source_remove(this._timerId);
this._timerId = 0;
}

View File

@@ -10,7 +10,7 @@ imports.gi.versions.Gtk = '3.0';
imports.gi.versions.TelepathyGLib = '0.12';
imports.gi.versions.TelepathyLogger = '0.2';
const { Clutter, GLib, Shell, St } = imports.gi;
const { Clutter, GLib, Meta, Shell, St } = imports.gi;
const Gettext = imports.gettext;
// We can't import shell JS modules yet, because they may have
@@ -58,17 +58,16 @@ function _patchLayoutClass(layoutClass, styleProps) {
};
}
function _makeEaseCallback(params) {
function _makeEaseCallback(params, cleanup) {
let onComplete = params.onComplete;
delete params.onComplete;
let onStopped = params.onStopped;
delete params.onStopped;
if (!onComplete && !onStopped)
return null;
return isFinished => {
cleanup();
if (onStopped)
onStopped(isFinished);
if (onComplete && isFinished)
@@ -110,7 +109,10 @@ function _easeActor(actor, params) {
actor.set_easing_mode(params.mode);
delete params.mode;
let callback = _makeEaseCallback(params);
Meta.disable_unredirect_for_display(global.display);
let cleanup = () => Meta.enable_unredirect_for_display(global.display);
let callback = _makeEaseCallback(params, cleanup);
// cancel overwritten transitions
let animatedProps = Object.keys(params).map(p => p.replace('_', '-', 'g'));
@@ -119,14 +121,13 @@ function _easeActor(actor, params) {
actor.set(params);
actor.restore_easing_state();
if (callback) {
let transition = actor.get_transition(animatedProps[0]);
let transition = animatedProps.map(p => actor.get_transition(p))
.find(t => t !== null);
if (transition)
transition.connect('stopped', (t, finished) => callback(finished));
else
callback(true);
}
if (transition)
transition.connect('stopped', (t, finished) => callback(finished));
else
callback(true);
}
function _easeActorProperty(actor, propName, target, params) {
@@ -139,7 +140,15 @@ function _easeActorProperty(actor, propName, target, params) {
params.duration = adjustAnimationTime(params.duration);
let duration = Math.floor(params.duration || 0);
let callback = _makeEaseCallback(params);
// Copy Clutter's behavior for implicit animations, see
// should_skip_implicit_transition()
if (actor instanceof Clutter.Actor && !actor.mapped)
duration = 0;
Meta.disable_unredirect_for_display(global.display);
let cleanup = () => Meta.enable_unredirect_for_display(global.display);
let callback = _makeEaseCallback(params, cleanup);
// cancel overwritten transition
actor.remove_transition(propName);
@@ -148,8 +157,7 @@ function _easeActorProperty(actor, propName, target, params) {
let [obj, prop] = _getPropertyTarget(actor, propName);
obj[prop] = target;
if (callback)
callback(true);
callback(true);
return;
}
@@ -164,8 +172,7 @@ function _easeActorProperty(actor, propName, target, params) {
transition.set_to(target);
if (callback)
transition.connect('stopped', (t, finished) => callback(finished));
transition.connect('stopped', (t, finished) => callback(finished));
}
function _loggingFunc(...args) {

View File

@@ -186,14 +186,15 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog {
this._info = info;
this._invocation = invocation;
this.setButtons([{ label: _("Cancel"),
action: this._onCancelButtonPressed.bind(this),
key: Clutter.Escape
},
{ label: _("Install"),
action: this._onInstallButtonPressed.bind(this),
default: true
}]);
this.setButtons([{
label: _("Cancel"),
action: this._onCancelButtonPressed.bind(this),
key: Clutter.Escape,
}, {
label: _("Install"),
action: this._onInstallButtonPressed.bind(this),
default: true,
}]);
let content = new Dialog.MessageDialogContent({
title: _("Download and install “%s” from extensions.gnome.org?").format(info.name),

View File

@@ -17,7 +17,7 @@ const EXTENSION_DISABLE_VERSION_CHECK_KEY = 'disable-extension-version-validatio
var ExtensionManager = class {
constructor() {
this._initted = false;
this._initialized = false;
this._enabled = false;
this._extensions = new Map();
@@ -98,6 +98,9 @@ var ExtensionManager = class {
}
_callExtensionEnable(uuid) {
if (!Main.sessionMode.allowExtensions)
return;
let extension = this.lookup(uuid);
if (!extension)
return;
@@ -108,8 +111,6 @@ var ExtensionManager = class {
if (extension.state != ExtensionState.DISABLED)
return;
this._extensionOrder.push(uuid);
let stylesheetNames = [`${global.session_mode}.css`, 'stylesheet.css'];
let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
for (let i = 0; i < stylesheetNames.length; i++) {
@@ -121,7 +122,7 @@ var ExtensionManager = class {
} catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND))
continue; // not an error
log(`Failed to load stylesheet for extension ${uuid}: ${e.message}`);
this.logExtensionError(uuid, e);
return;
}
}
@@ -129,15 +130,14 @@ var ExtensionManager = class {
try {
extension.stateObj.enable();
extension.state = ExtensionState.ENABLED;
this._extensionOrder.push(uuid);
this.emit('extension-state-changed', extension);
return;
} catch (e) {
if (extension.stylesheet) {
theme.unload_stylesheet(extension.stylesheet);
delete extension.stylesheet;
}
this.logExtensionError(uuid, e);
return;
}
}
@@ -194,7 +194,7 @@ var ExtensionManager = class {
extension.errors = [];
extension.errors.push(message);
log('Extension "%s" had error: %s'.format(uuid, message));
logError(error, `Extension ${uuid}`);
this.emit('extension-state-changed', extension);
}
@@ -286,7 +286,7 @@ var ExtensionManager = class {
reloadExtension(oldExtension) {
// Grab the things we'll need to pass to createExtensionObject
// to reload it.
let { uuid: uuid, dir: dir, type: type } = oldExtension;
let { uuid, dir, type } = oldExtension;
// Then unload the old extension.
this.unloadExtension(oldExtension);
@@ -304,12 +304,14 @@ var ExtensionManager = class {
}
_callExtensionInit(uuid) {
if (!Main.sessionMode.allowExtensions)
return false;
let extension = this.lookup(uuid);
let dir = extension.dir;
if (!extension)
throw new Error("Extension was not properly created. Call loadExtension first");
throw new Error("Extension was not properly created. Call createExtensionObject first");
let dir = extension.dir;
let extensionJs = dir.get_child('extension.js');
if (!extensionJs.query_exists(null)) {
this.logExtensionError(uuid, new Error('Missing extension.js'));
@@ -388,9 +390,6 @@ var ExtensionManager = class {
_onEnabledExtensionsChanged() {
let newEnabledExtensions = this._getEnabledExtensions();
if (!this._enabled)
return;
// Find and enable all the newly enabled extensions: UUIDs found in the
// new setting, but not in the old one.
newEnabledExtensions.filter(
@@ -401,9 +400,9 @@ var ExtensionManager = class {
// Find and disable all the newly disabled extensions: UUIDs found in the
// old setting, but not in the new one.
this._enabledExtensions.filter(
item => !newEnabledExtensions.includes(item)
).forEach(uuid => {
this._extensionOrder.filter(
uuid => !newEnabledExtensions.includes(uuid)
).reverse().forEach(uuid => {
this._callExtensionDisable(uuid);
});
@@ -418,22 +417,19 @@ var ExtensionManager = class {
}
_onVersionValidationChanged() {
// we want to reload all extensions, but only enable
// extensions when allowed by the sessionMode, so
// temporarily disable them all
this._enabledExtensions = [];
// Disabling extensions modifies the order array, so use a copy
let extensionOrder = this._extensionOrder.slice();
// The loop modifies the extensions map, so iterate over a copy
let extensions = [...this._extensions.values()];
for (let extension of extensions)
this.reloadExtension(extension);
this._enabledExtensions = this._getEnabledExtensions();
// Disable enabled extensions in the reverse order first to avoid
// the "rebasing" done in _callExtensionDisable...
extensionOrder.slice().reverse().forEach(uuid => {
this._callExtensionDisable(uuid);
});
if (Main.sessionMode.allowExtensions) {
this._enabledExtensions.forEach(uuid => {
this._callExtensionEnable(uuid);
});
}
// ...and then reload and enable extensions in the correct order again.
[...this._extensions.values()].sort((a, b) => {
return extensionOrder.indexOf(a.uuid) - extensionOrder.indexOf(b.uuid);
}).forEach(extension => this.reloadExtension(extension));
}
_loadExtensions() {
@@ -482,9 +478,9 @@ var ExtensionManager = class {
if (this._enabled)
return;
if (!this._initted) {
if (!this._initialized) {
this._loadExtensions();
this._initted = true;
this._initialized = true;
} else {
this._enabledExtensions.forEach(uuid => {
this._callExtensionEnable(uuid);
@@ -497,7 +493,7 @@ var ExtensionManager = class {
if (!this._enabled)
return;
if (this._initted) {
if (this._initialized) {
this._extensionOrder.slice().reverse().forEach(uuid => {
this._callExtensionDisable(uuid);
});
@@ -512,8 +508,8 @@ var ExtensionManager = class {
// property; it might make sense to make enabledExtensions independent
// from allowExtensions in the future
if (Main.sessionMode.allowExtensions) {
if (this._initted)
this._enabledExtensions = this._getEnabledExtensions();
// Take care of added or removed sessionMode extensions
this._onEnabledExtensionsChanged();
this._enableAllExtensions();
} else {
this._disableAllExtensions();

View File

@@ -142,6 +142,10 @@ class BaseIcon extends St.Bin {
zoomOutActor(this.child);
}
animateZoomOutAtPos(x, y) {
zoomOutActorAtPos(this.child, x, y);
}
update() {
this._createIconTexture(this.iconSize);
}
@@ -152,10 +156,15 @@ function clamp(value, min, max) {
}
function zoomOutActor(actor) {
let [x, y] = actor.get_transformed_position();
zoomOutActorAtPos(actor, x, y);
}
function zoomOutActorAtPos(actor, x, y) {
let actorClone = new Clutter.Clone({ source: actor,
reactive: false });
let [width, height] = actor.get_transformed_size();
let [x, y] = actor.get_transformed_position();
actorClone.set_size(width, height);
actorClone.set_position(x, y);
actorClone.opacity = 255;
@@ -247,10 +256,23 @@ var IconGrid = GObject.registerClass({
_childAdded(grid, child) {
child._iconGridKeyFocusInId = child.connect('key-focus-in', this._keyFocusIn.bind(this));
child._paintVisible = child.opacity > 0;
child._opacityChangedId = child.connect('notify::opacity', () => {
let paintVisible = child._paintVisible;
child._paintVisible = child.opacity > 0;
if (paintVisible !== child._paintVisible)
this.queue_relayout();
});
}
_childRemoved(grid, child) {
child.disconnect(child._iconGridKeyFocusInId);
delete child._iconGridKeyFocusInId;
child.disconnect(child._opacityChangedId);
delete child._opacityChangedId;
delete child._paintVisible;
}
vfunc_get_preferred_width(_forHeight) {
@@ -260,9 +282,9 @@ var IconGrid = GObject.registerClass({
return [0, 0];
let nChildren = this.get_n_children();
let nColumns = this._colLimit ? Math.min(this._colLimit,
nChildren)
: nChildren;
let nColumns = this._colLimit
? Math.min(this._colLimit, nChildren)
: nChildren;
let totalSpacing = Math.max(0, nColumns - 1) * this._getSpacing();
// Kind of a lie, but not really an issue right now. If
// we wanted to support some sort of hidden/overflow that would
@@ -414,7 +436,7 @@ var IconGrid = GObject.registerClass({
* set of items to be animated.
*/
_getChildrenToAnimate() {
return this._getVisibleChildren();
return this._getVisibleChildren().filter(child => child.opacity > 0);
}
_resetAnimationActors() {
@@ -774,8 +796,9 @@ var IconGrid = GObject.registerClass({
let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth;
let neededHeight = this.usedHeightForNRows(this._minRows) - availHeight;
let neededSpacePerItem = (neededWidth > neededHeight) ? Math.ceil(neededWidth / this._minColumns)
: Math.ceil(neededHeight / this._minRows);
let neededSpacePerItem = (neededWidth > neededHeight)
? Math.ceil(neededWidth / this._minColumns)
: Math.ceil(neededHeight / this._minRows);
this._fixedHItemSize = Math.max(this._hItemSize - neededSpacePerItem, MIN_ICON_SIZE);
this._fixedVItemSize = Math.max(this._vItemSize - neededSpacePerItem, MIN_ICON_SIZE);
@@ -871,7 +894,7 @@ var PaginatedIconGrid = GObject.registerClass({
// Overridden from IconGrid
_getChildrenToAnimate() {
let children = this._getVisibleChildren();
let children = super._getChildrenToAnimate();
let firstIndex = this._childrenPerPage * this.currentPage;
let lastIndex = firstIndex + this._childrenPerPage;
@@ -950,8 +973,7 @@ var PaginatedIconGrid = GObject.registerClass({
let childrenPerRow = this._childrenPerPage / this._rowsPerPage;
let sourceRow = Math.floor((index - pageOffset) / childrenPerRow);
let nRowsAbove = (side == St.Side.TOP) ? sourceRow + 1
: sourceRow;
let nRowsAbove = (side == St.Side.TOP) ? sourceRow + 1 : sourceRow;
let nRowsBelow = this._rowsPerPage - nRowsAbove;
let nRowsUp, nRowsDown;

View File

@@ -76,8 +76,9 @@ var InhibitShortcutsDialog = GObject.registerClass({
let name = this._app ? this._app.get_name() : this._window.title;
/* Translators: %s is an application name like "Settings" */
let title = name ? _("%s wants to inhibit shortcuts").format(name)
: _("Application wants to inhibit shortcuts");
let title = name
? _("%s wants to inhibit shortcuts").format(name)
: _("Application wants to inhibit shortcuts");
let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' });
let contentParams = { icon, title };

View File

@@ -27,24 +27,24 @@ class KbdA11yDialog extends GObject.Object {
if (whatChanged & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) {
key = KEY_SLOW_KEYS_ENABLED;
enabled = (newFlags & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) ? true : false;
title = enabled ?
_("Slow Keys Turned On") :
_("Slow Keys Turned Off");
enabled = (newFlags & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) > 0;
title = enabled
? _("Slow Keys Turned On")
: _("Slow Keys Turned Off");
body = _("You just held down the Shift key for 8 seconds. This is the shortcut " +
"for the Slow Keys feature, which affects the way your keyboard works.");
} else if (whatChanged & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) {
key = KEY_STICKY_KEYS_ENABLED;
enabled = (newFlags & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) ? true : false;
title = enabled ?
_("Sticky Keys Turned On") :
_("Sticky Keys Turned Off");
body = enabled ?
_("You just pressed the Shift key 5 times in a row. This is the shortcut " +
"for the Sticky Keys feature, which affects the way your keyboard works.") :
_("You just pressed two keys at once, or pressed the Shift key 5 times in a row. " +
"This turns off the Sticky Keys feature, which affects the way your keyboard works.");
enabled = (newFlags & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) > 0;
title = enabled
? _("Sticky Keys Turned On")
: _("Sticky Keys Turned Off");
body = enabled
? _("You just pressed the Shift key 5 times in a row. This is the shortcut " +
"for the Sticky Keys feature, which affects the way your keyboard works.")
: _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. " +
"This turns off the Sticky Keys feature, which affects the way your keyboard works.");
} else {
return;
}

View File

@@ -104,9 +104,10 @@ class KeyContainer extends St.Widget {
this._currentRow++;
this._currentCol = 0;
let row = new Object();
row.keys = [];
row.width = 0;
let row = {
keys: [],
width: 0,
};
this._rows.push(row);
}
@@ -193,12 +194,12 @@ var LanguageSelectionPopup = class extends PopupMenu.PopupMenu {
item = this.addAction(is.displayName, () => {
inputSourceManager.activateInputSource(is, true);
});
item.actor.can_focus = false;
item.can_focus = false;
}
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
item = this.addSettingsAction(_("Region & Language Settings"), 'gnome-region-panel.desktop');
item.actor.can_focus = false;
item.can_focus = false;
this._capturedEventId = 0;
@@ -574,7 +575,7 @@ var EmojiPager = GObject.registerClass({
'delta': GObject.ParamSpec.int(
'delta', 'delta', 'delta',
GObject.ParamFlags.READWRITE,
0, GLib.MAXINT32, 0)
GLib.MININT32, GLib.MAXINT32, 0)
},
Signals: {
'emoji': { param_types: [GObject.TYPE_STRING] },
@@ -1080,7 +1081,7 @@ var Keyboard = class Keyboard {
this.hide();
});
Meta.get_backend().connect('last-device-changed',
Meta.get_backend().connect('last-device-changed',
(backend, deviceId) => {
let manager = Clutter.DeviceManager.get_default();
let device = manager.get_device(deviceId);

View File

@@ -238,11 +238,12 @@ var LayoutManager = GObject.registerClass({
reactive: true });
this.addChrome(this.overviewGroup);
this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup',
visible: false,
clip_to_allocation: true,
layout_manager: new Clutter.BinLayout(),
});
this.screenShieldGroup = new St.Widget({
name: 'screenShieldGroup',
visible: false,
clip_to_allocation: true,
layout_manager: new Clutter.BinLayout(),
});
this.addChrome(this.screenShieldGroup);
this.panelBox = new St.BoxLayout({ name: 'panelBox',
@@ -770,8 +771,7 @@ var LayoutManager = GObject.registerClass({
this.keyboardBox.ease({
anchor_y: 0,
opacity: 0,
duration: immediate ? 0
: KEYBOARD_ANIMATION_TIME,
duration: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_QUAD,
onComplete: () => {
this._hideKeyboardComplete();
@@ -855,12 +855,13 @@ var LayoutManager = GObject.registerClass({
index = this._findActor(ancestor);
}
let ancestorData = ancestor ? this._trackedActors[index]
: defaultParams;
let ancestorData = ancestor
? this._trackedActors[index]
: defaultParams;
// We can't use Params.parse here because we want to drop
// the extra values like ancestorData.actor
for (let prop in defaultParams) {
if (!params.hasOwnProperty(prop))
if (!Object.prototype.hasOwnProperty.call(params, prop))
params[prop] = ancestorData[prop];
}
@@ -1014,11 +1015,6 @@ var LayoutManager = GObject.registerClass({
if (Main.modalCount > 0)
return GLib.SOURCE_REMOVE;
// Bug workaround - get_transformed_position()/get_transformed_size() don't work after
// a change in stage size until the first pick or paint.
// https://bugzilla.gnome.org/show_bug.cgi?id=761565
global.stage.get_actor_at_pos(Clutter.PickMode.ALL, 0, 0);
let rects = [], struts = [], i;
let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
let wantsInputRegion = !isPopupMenuVisible;
@@ -1074,16 +1070,17 @@ var LayoutManager = GObject.registerClass({
side = Meta.Side.RIGHT;
else
continue;
} else if (x1 <= monitor.x)
} else if (x1 <= monitor.x) {
side = Meta.Side.LEFT;
else if (y1 <= monitor.y)
} else if (y1 <= monitor.y) {
side = Meta.Side.TOP;
else if (x2 >= monitor.x + monitor.width)
} else if (x2 >= monitor.x + monitor.width) {
side = Meta.Side.RIGHT;
else if (y2 >= monitor.y + monitor.height)
} else if (y2 >= monitor.y + monitor.height) {
side = Meta.Side.BOTTOM;
else
} else {
continue;
}
let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 });
let strut = new Meta.Strut({ rect: strutRect, side: side });
@@ -1224,6 +1221,8 @@ var HotCorner = class HotCorner {
if (this.actor)
this.actor.destroy();
this._ripples.destroy();
}
_toggleOverview() {

View File

@@ -108,12 +108,13 @@ var RadialShaderEffect = GObject.registerClass({
*/
var Lightbox = class Lightbox {
constructor(container, params) {
params = Params.parse(params, { inhibitEvents: false,
width: null,
height: null,
fadeFactor: DEFAULT_FADE_FACTOR,
radialEffect: false,
});
params = Params.parse(params, {
inhibitEvents: false,
width: null,
height: null,
fadeFactor: DEFAULT_FADE_FACTOR,
radialEffect: false,
});
this._container = container;
this._children = container.get_children();
@@ -172,10 +173,13 @@ var Lightbox = class Lightbox {
}
show(fadeInTime) {
fadeInTime = fadeInTime || 0;
this.actor.remove_all_transitions();
let easeProps = {
duration: fadeInTime || 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
};
let onComplete = () => {
this.shown = true;
this.emit('shown');
@@ -183,55 +187,38 @@ var Lightbox = class Lightbox {
if (this._radialEffect) {
this.actor.ease_property(
'@effects.radial.brightness', VIGNETTE_BRIGHTNESS, {
duration: fadeInTime,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
});
'@effects.radial.brightness', VIGNETTE_BRIGHTNESS, easeProps);
this.actor.ease_property(
'@effects.radial.sharpness', VIGNETTE_SHARPNESS, {
duration: fadeInTime,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete
});
'@effects.radial.sharpness', VIGNETTE_SHARPNESS,
Object.assign({ onComplete }, easeProps));
} else {
this.actor.ease({
this.actor.ease(Object.assign(easeProps, {
opacity: 255 * this._fadeFactor,
duration: fadeInTime,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete
});
}));
}
this.actor.show();
}
hide(fadeOutTime) {
fadeOutTime = fadeOutTime || 0;
this.shown = false;
this.actor.remove_all_transitions();
let easeProps = {
duration: fadeOutTime || 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
};
let onComplete = () => this.actor.hide();
if (this._radialEffect) {
this.actor.ease_property(
'@effects.radial.brightness', 1.0, {
duration: fadeOutTime,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
});
'@effects.radial.brightness', 1.0, easeProps);
this.actor.ease_property(
'@effects.radial.sharpness', 0.0, {
duration: fadeOutTime,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete
});
'@effects.radial.sharpness', 0.0, Object.assign({ onComplete }, easeProps));
} else {
this.actor.ease({
opacity: 0,
duration: fadeOutTime,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete
});
this.actor.ease(Object.assign(easeProps, { opacity: 0, onComplete }));
}
}

View File

@@ -11,12 +11,26 @@ const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface";
var LocatePointer = class {
constructor() {
this._settings = new Gio.Settings({ schema_id: LOCATE_POINTER_SCHEMA });
this._ripples = new Ripples.Ripples(0.5, 0.5, 'ripple-pointer-location');
this._ripples.addTo(Main.uiGroup);
this._settings.connect(`changed::${LOCATE_POINTER_KEY}`, () => this._syncEnabled());
this._syncEnabled();
}
_syncEnabled() {
let enabled = this._settings.get_boolean(LOCATE_POINTER_KEY);
if (enabled == !!this._ripples)
return;
if (enabled) {
this._ripples = new Ripples.Ripples(0.5, 0.5, 'ripple-pointer-location');
this._ripples.addTo(Main.uiGroup);
} else {
this._ripples.destroy();
this._ripples = null;
}
}
show() {
if (!this._settings.get_boolean(LOCATE_POINTER_KEY))
if (!this._ripples)
return;
let [x, y] = global.get_pointer();

View File

@@ -3,7 +3,6 @@
const { Clutter, Cogl, Gio, GLib,
GObject, Meta, Pango, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const System = imports.system;
@@ -20,7 +19,6 @@ const CHEVRON = '>>> ';
/* Imports...feel free to add here as needed */
var commandHeader = 'const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi; ' +
'const Main = imports.ui.main; ' +
'const Mainloop = imports.mainloop; ' +
/* Utility functions...we should probably be able to use these
* in the shell core code too. */
'const stage = global.stage; ' +
@@ -240,7 +238,7 @@ var Notebook = class Notebook {
Signals.addSignalMethods(Notebook.prototype);
function objectToString(o) {
if (typeof(o) == typeof(objectToString)) {
if (typeof o == typeof objectToString) {
// special case this since the default is way, way too verbose
return '<js function>';
} else {
@@ -306,6 +304,9 @@ var WindowList = class WindowList {
}
_updateWindowList() {
if (!this._lookingGlass.isOpen)
return;
this.actor.destroy_all_children();
let windows = global.get_window_actors();
let tracker = Shell.WindowTracker.get_default();
@@ -337,6 +338,10 @@ var WindowList = class WindowList {
}
}
}
update() {
this._updateWindowList();
}
};
Signals.addSignalMethods(WindowList.prototype);
@@ -369,7 +374,7 @@ var ObjInspector = class ObjInspector {
let hbox = new St.BoxLayout({ style_class: 'lg-obj-inspector-title' });
this._container.add_actor(hbox);
let label = new St.Label({ text: 'Inspecting: %s: %s'.format(typeof(obj),
let label = new St.Label({ text: 'Inspecting: %s: %s'.format(typeof obj,
objectToString(obj)) });
label.single_line_mode = true;
hbox.add(label, { expand: true, y_fill: false });
@@ -387,7 +392,7 @@ var ObjInspector = class ObjInspector {
button.add_actor(new St.Icon({ icon_name: 'window-close-symbolic' }));
button.connect('clicked', this.close.bind(this));
hbox.add(button);
if (typeof(obj) == typeof({})) {
if (typeof obj == typeof {}) {
let properties = [];
for (let propName in obj) {
properties.push(propName);
@@ -821,7 +826,7 @@ var LookingGlass = class LookingGlass {
gcIcon.connect('button-press-event', () => {
gcIcon.icon_name = 'user-trash';
System.gc();
this._timeoutId = Mainloop.timeout_add(500, () => {
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => {
gcIcon.icon_name = 'user-trash-full';
this._timeoutId = 0;
return GLib.SOURCE_REMOVE;
@@ -876,7 +881,7 @@ var LookingGlass = class LookingGlass {
return true;
});
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
entry: this._entry.clutter_text });
this._autoComplete = new AutoComplete(this._entry);
@@ -1010,7 +1015,11 @@ var LookingGlass = class LookingGlass {
}
getResult(idx) {
return this._results[idx - this._offset].o;
try {
return this._results[idx - this._offset].o;
} catch (e) {
throw new Error(`Unknown result at index ${idx}`);
}
}
toggle() {
@@ -1097,6 +1106,8 @@ var LookingGlass = class LookingGlass {
duration,
mode: Clutter.AnimationMode.EASE_OUT_QUAD
});
this._windowList.update();
}
close() {
@@ -1122,5 +1133,9 @@ var LookingGlass = class LookingGlass {
onComplete: () => this.actor.hide()
});
}
get isOpen() {
return this._open;
}
};
Signals.addSignalMethods(LookingGlass.prototype);

View File

@@ -2,7 +2,6 @@
const { Atspi, Clutter, GDesktopEnums,
Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const Background = imports.ui.background;
@@ -265,7 +264,7 @@ var Magnifier = class Magnifier {
zoomRegion.setViewPort(viewPort);
// We ignore the redundant width/height on the ROI
let fixedROI = new Object(roi);
let fixedROI = Object.create(roi);
fixedROI.width = viewPort.width / xMagFactor;
fixedROI.height = viewPort.height / yMagFactor;
zoomRegion.setROI(fixedROI);
@@ -452,15 +451,11 @@ var Magnifier = class Magnifier {
* @clip: Flag to indicate whether to clip the crosshairs.
*/
setCrosshairsClip(clip) {
if (clip) {
if (this._crossHairs)
this._crossHairs.setClip(CROSSHAIRS_CLIP_SIZE);
} else {
// Setting no clipping on crosshairs means a zero sized clip
// rectangle.
if (this._crossHairs)
this._crossHairs.setClip([0, 0]);
}
if (!this._crossHairs)
return;
// Setting no clipping on crosshairs means a zero sized clip rectangle.
this._crossHairs.setClip(clip ? CROSSHAIRS_CLIP_SIZE : [0, 0]);
}
/**
@@ -1144,7 +1139,7 @@ var ZoomRegion = class ZoomRegion {
_clearScrollContentsTimer() {
if (this._scrollContentsTimerId != 0) {
Mainloop.source_remove(this._scrollContentsTimerId);
GLib.source_remove(this._scrollContentsTimerId);
this._scrollContentsTimerId = 0;
}
}
@@ -1156,7 +1151,7 @@ var ZoomRegion = class ZoomRegion {
}
this._clearScrollContentsTimer();
this._scrollContentsTimerId = Mainloop.timeout_add(POINTER_REST_TIME, () => {
this._scrollContentsTimerId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, POINTER_REST_TIME, () => {
this._scrollContentsToDelayed(x, y);
return GLib.SOURCE_REMOVE;
});

View File

@@ -9,7 +9,6 @@
initializeDeferredWork, getThemeStylesheet, setThemeStylesheet */
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const AccessDialog = imports.ui.accessDialog;
const AudioDeviceSelection = imports.ui.audioDeviceSelection;
@@ -620,7 +619,7 @@ function _runDeferredWork(workId) {
_deferredWorkQueue.splice(index, 1);
_deferredWorkData[workId].callback();
if (_deferredWorkQueue.length == 0 && _deferredTimeoutId > 0) {
Mainloop.source_remove(_deferredTimeoutId);
GLib.source_remove(_deferredTimeoutId);
_deferredTimeoutId = 0;
}
}
@@ -706,9 +705,8 @@ function queueDeferredWork(workId) {
_deferredWorkQueue.push(workId);
if (data.actor.mapped) {
_queueBeforeRedraw(workId);
return;
} else if (_deferredTimeoutId == 0) {
_deferredTimeoutId = Mainloop.timeout_add_seconds(DEFERRED_TIMEOUT_SECONDS, () => {
_deferredTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, DEFERRED_TIMEOUT_SECONDS, () => {
_runAllDeferredWork();
_deferredTimeoutId = 0;
return GLib.SOURCE_REMOVE;

View File

@@ -4,7 +4,6 @@
SystemNotificationSource, MessageTray */
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const Calendar = imports.ui.calendar;
@@ -137,13 +136,14 @@ var FocusGrabber = class FocusGrabber {
// A notification without a policy object will inherit the default one.
var NotificationPolicy = class NotificationPolicy {
constructor(params) {
params = Params.parse(params, { enable: true,
enableSound: true,
showBanners: true,
forceExpanded: false,
showInLockScreen: true,
detailsInLockScreen: false
});
params = Params.parse(params, {
enable: true,
enableSound: true,
showBanners: true,
forceExpanded: false,
showInLockScreen: true,
detailsInLockScreen: false,
});
Object.getOwnPropertyNames(params).forEach(key => {
let desc = Object.getOwnPropertyDescriptor(params, key);
Object.defineProperty(this, `_${key}`, desc);
@@ -153,6 +153,7 @@ var NotificationPolicy = class NotificationPolicy {
// Do nothing for the default policy. These methods are only useful for the
// GSettings policy.
store() { }
destroy() { }
get enable() {
@@ -334,7 +335,7 @@ class NotificationApplicationPolicy extends NotificationPolicy {
// event sound is played when the notification is shown (if the policy for
// @source allows playing sounds).
//
// [1] https://developer.gnome.org/notification-spec/#markup
// [1] https://developer.gnome.org/notification-spec/#markup
var Notification = class Notification {
constructor(source, title, banner, params) {
this.source = source;
@@ -734,8 +735,9 @@ var Source = class Source {
}
get narrowestPrivacyScope() {
return this.notifications.every(n => n.privacyScope == PrivacyScope.SYSTEM) ? PrivacyScope.SYSTEM
: PrivacyScope.USER;
return this.notifications.every(n => n.privacyScope == PrivacyScope.SYSTEM)
? PrivacyScope.SYSTEM
: PrivacyScope.USER;
}
setTitle(newTitle) {
@@ -1004,7 +1006,6 @@ var MessageTray = class MessageTray {
_addSource(source) {
let obj = {
source: source,
notifyId: 0,
destroyId: 0,
};
@@ -1091,7 +1092,7 @@ var MessageTray = class MessageTray {
_resetNotificationLeftTimeout() {
this._useLongerNotificationLeftTimeout = false;
if (this._notificationLeftTimeoutId) {
Mainloop.source_remove(this._notificationLeftTimeoutId);
GLib.source_remove(this._notificationLeftTimeoutId);
this._notificationLeftTimeoutId = 0;
this._notificationLeftMouseX = -1;
this._notificationLeftMouseY = -1;
@@ -1137,7 +1138,7 @@ var MessageTray = class MessageTray {
// We wait for a longer period if the notification popped up where the mouse pointer was already positioned.
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
let timeout = this._useLongerNotificationLeftTimeout ? LONGER_HIDE_TIMEOUT : HIDE_TIMEOUT;
this._notificationLeftTimeoutId = Mainloop.timeout_add(timeout, this._onNotificationLeftTimeout.bind(this));
this._notificationLeftTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, timeout, this._onNotificationLeftTimeout.bind(this));
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
}
}
@@ -1166,8 +1167,10 @@ var MessageTray = class MessageTray {
x < this._notificationLeftMouseX + MOUSE_LEFT_ACTOR_THRESHOLD &&
x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
this._notificationLeftMouseX = -1;
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT,
this._onNotificationLeftTimeout.bind(this));
this._notificationLeftTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
LONGER_HIDE_TIMEOUT,
this._onNotificationLeftTimeout.bind(this));
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
} else {
this._notificationLeftTimeoutId = 0;
@@ -1345,13 +1348,13 @@ var MessageTray = class MessageTray {
_updateNotificationTimeout(timeout) {
if (this._notificationTimeoutId) {
Mainloop.source_remove(this._notificationTimeoutId);
GLib.source_remove(this._notificationTimeoutId);
this._notificationTimeoutId = 0;
}
if (timeout > 0) {
this._notificationTimeoutId =
Mainloop.timeout_add(timeout,
this._notificationTimeout.bind(this));
GLib.timeout_add(GLib.PRIORITY_DEFAULT, timeout,
this._notificationTimeout.bind(this));
GLib.Source.set_name_by_id(this._notificationTimeoutId, '[gnome-shell] this._notificationTimeout');
}
}

View File

@@ -253,7 +253,7 @@ var ModalDialog = GObject.registerClass({
opacity: 0,
duration: FADE_OUT_DIALOG_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this.state = State.FADED_OUT
onComplete: () => (this.state = State.FADED_OUT)
});
}
});

View File

@@ -71,8 +71,9 @@ var MediaMessage = class MediaMessage extends MessageList.Message {
}
let isPlaying = this._player.status == 'Playing';
let iconName = isPlaying ? 'media-playback-pause-symbolic'
: 'media-playback-start-symbolic';
let iconName = isPlaying
? 'media-playback-pause-symbolic'
: 'media-playback-start-symbolic';
this._playPauseButton.child.icon_name = iconName;
this._updateNavButton(this._prevButton, this._player.canGoPrevious);

View File

@@ -2,7 +2,6 @@
/* exported NotificationDaemon */
const { GdkPixbuf, Gio, GLib, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Config = imports.misc.config;
const Main = imports.ui.main;
@@ -171,7 +170,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
// Ignore replacesId since we already sent back a
// NotificationClosed for that id.
id = this._nextNotificationId++;
let idleId = Mainloop.idle_add(() => {
let idleId = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this._emitNotificationClosed(id, NotificationClosedReason.DISMISSED);
return GLib.SOURCE_REMOVE;
});
@@ -347,8 +346,9 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
notification.setTransient(!!hints['transient']);
let privacyScope = (hints['x-gnome-privacy-scope'] || 'user');
notification.setPrivacyScope(privacyScope == 'system' ? MessageTray.PrivacyScope.SYSTEM
: MessageTray.PrivacyScope.USER);
notification.setPrivacyScope(privacyScope == 'system'
? MessageTray.PrivacyScope.SYSTEM
: MessageTray.PrivacyScope.USER);
let sourceGIcon = source.useNotificationIcon ? gicon : null;
source.processNotification(notification, sourceGIcon);
@@ -541,22 +541,23 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
super(source);
this._serialized = GLib.Variant.new('a{sv}', notification);
let { "title": title,
"body": body,
"icon": gicon,
"urgent": urgent,
"priority": priority,
"buttons": buttons,
let { title,
body,
icon: gicon,
urgent,
priority,
buttons,
"default-action": defaultAction,
"default-action-target": defaultActionTarget,
"timestamp": time } = notification;
timestamp: time } = notification;
if (priority) {
let urgency = PRIORITY_URGENCY_MAP[priority.unpack()];
this.setUrgency(urgency != undefined ? urgency : MessageTray.Urgency.NORMAL);
} else if (urgent) {
this.setUrgency(urgent.unpack() ? MessageTray.Urgency.CRITICAL
: MessageTray.Urgency.NORMAL);
this.setUrgency(urgent.unpack()
? MessageTray.Urgency.CRITICAL
: MessageTray.Urgency.NORMAL);
} else {
this.setUrgency(MessageTray.Urgency.NORMAL);
}
@@ -589,8 +590,8 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
}
_onButtonClicked(button) {
let { 'action': action, 'target': actionTarget } = button;
this._activateAction(action.unpack(), actionTarget);
let { action, target } = button;
this._activateAction(action.unpack(), target);
}
activate() {
@@ -617,7 +618,7 @@ function getPlatformData() {
function InvalidAppError() {}
var GtkNotificationDaemonAppSource =
var GtkNotificationDaemonAppSource =
class GtkNotificationDaemonAppSource extends MessageTray.Source {
constructor(appId) {
let objectPath = objectPathFromAppId(appId);
@@ -750,29 +751,33 @@ var GtkNotificationDaemon = class GtkNotificationDaemon {
_loadNotifications() {
this._isLoading = true;
let value = global.get_persistent_state('a(sa(sv))', 'notifications');
if (value) {
let sources = value.deep_unpack();
sources.forEach(([appId, notifications]) => {
if (notifications.length == 0)
return;
let source;
try {
source = this._ensureAppSource(appId);
} catch (e) {
if (e instanceof InvalidAppError)
try {
let value = global.get_persistent_state('a(sa(sv))', 'notifications');
if (value) {
let sources = value.deep_unpack();
sources.forEach(([appId, notifications]) => {
if (notifications.length == 0)
return;
throw e;
}
notifications.forEach(([notificationId, notification]) => {
source.addNotification(notificationId, notification.deep_unpack(), false);
let source;
try {
source = this._ensureAppSource(appId);
} catch (e) {
if (e instanceof InvalidAppError)
return;
throw e;
}
notifications.forEach(([notificationId, notification]) => {
source.addNotification(notificationId, notification.deep_unpack(), false);
});
});
});
}
} catch (e) {
logError(e, 'Failed to load saved notifications');
} finally {
this._isLoading = false;
}
this._isLoading = false;
}
_saveNotifications() {

View File

@@ -2,7 +2,6 @@
/* exported OsdWindowManager */
const { Clutter, GLib, GObject, Meta, St } = imports.gi;
const Mainloop = imports.mainloop;
const BarLevel = imports.ui.barLevel;
const Layout = imports.ui.layout;
@@ -143,9 +142,9 @@ var OsdWindow = class {
}
if (this._hideTimeoutId)
Mainloop.source_remove(this._hideTimeoutId);
this._hideTimeoutId = Mainloop.timeout_add(HIDE_TIMEOUT,
this._hide.bind(this));
GLib.source_remove(this._hideTimeoutId);
this._hideTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT, HIDE_TIMEOUT, this._hide.bind(this));
GLib.Source.set_name_by_id(this._hideTimeoutId, '[gnome-shell] this._hide');
}
@@ -153,7 +152,7 @@ var OsdWindow = class {
if (!this._hideTimeoutId)
return;
Mainloop.source_remove(this._hideTimeoutId);
GLib.source_remove(this._hideTimeoutId);
this._hide();
}

View File

@@ -2,7 +2,6 @@
/* exported Overview */
const { Clutter, GLib, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const Background = imports.ui.background;
@@ -43,9 +42,10 @@ var ShellInfo = class {
}
setMessage(text, options) {
options = Params.parse(options, { undoCallback: null,
forFeedback: false
});
options = Params.parse(options, {
undoCallback: null,
forFeedback: false,
});
let undoCallback = options.undoCallback;
let forFeedback = options.forFeedback;
@@ -300,7 +300,7 @@ var Overview = class {
_resetWindowSwitchTimeout() {
if (this._windowSwitchTimeoutId != 0) {
Mainloop.source_remove(this._windowSwitchTimeoutId);
GLib.source_remove(this._windowSwitchTimeoutId);
this._windowSwitchTimeoutId = 0;
}
}
@@ -323,7 +323,9 @@ var Overview = class {
if (targetIsWindow) {
this._lastHoveredWindow = dragEvent.targetActor._delegate.metaWindow;
this._windowSwitchTimeoutId = Mainloop.timeout_add(DND_WINDOW_SWITCH_TIMEOUT,
this._windowSwitchTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
DND_WINDOW_SWITCH_TIMEOUT,
() => {
this._windowSwitchTimeoutId = 0;
Main.activateWindow(dragEvent.targetActor._delegate.metaWindow,
@@ -450,7 +452,7 @@ var Overview = class {
this._desktopFade.show();
this._desktopFade.ease({
opacity: 0,
mode: Clutter.Animates.EASE_OUT_QUAD,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: ANIMATION_TIME
});
}
@@ -481,15 +483,13 @@ var Overview = class {
if (this._shown) {
let shouldBeModal = !this._inXdndDrag;
if (shouldBeModal) {
if (!this._modal) {
if (Main.pushModal(this._overview,
{ actionMode: Shell.ActionMode.OVERVIEW })) {
this._modal = true;
} else {
this.hide();
return false;
}
if (shouldBeModal && !this._modal) {
let actionMode = Shell.ActionMode.OVERVIEW;
if (Main.pushModal(this._overview, { actionMode })) {
this._modal = true;
} else {
this.hide();
return false;
}
}
} else {

View File

@@ -14,8 +14,8 @@ var SIDE_CONTROLS_ANIMATION_TIME = 160;
function getRtlSlideDirection(direction, actor) {
let rtl = (actor.text_direction == Clutter.TextDirection.RTL);
if (rtl)
direction = (direction == SlideDirection.LEFT) ?
SlideDirection.RIGHT : SlideDirection.LEFT;
direction = (direction == SlideDirection.LEFT)
? SlideDirection.RIGHT : SlideDirection.LEFT;
return direction;
}
@@ -67,8 +67,9 @@ var SlideLayout = GObject.registerClass({
// flags only determine what to do if the allocated box is bigger
// than the actor's box.
let realDirection = getRtlSlideDirection(this._direction, child);
let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth)
: (availWidth - natWidth * this._slideX);
let alignX = (realDirection == SlideDirection.LEFT)
? availWidth - natWidth
: availWidth - natWidth * this._slideX;
let actorBox = new Clutter.ActorBox();
actorBox.x1 = box.x1 + alignX + this._translationX;
@@ -248,6 +249,7 @@ var SlidingControl = class {
// selector; this means we can now safely set the full slide for
// the next page, since slideIn or slideOut might have been called,
// changing the visiblity
this.actor.remove_transition('@layout.slide-x');
this.layout.slide_x = this._getSlide();
this._updateTranslation();
}

View File

@@ -126,12 +126,14 @@ class AnimatedPageIndicators extends PageIndicators {
offset = children[0].width;
let isAnimationIn = animationDirection == AnimationDirection.IN;
let delay = isAnimationIn ? INDICATORS_ANIMATION_DELAY :
INDICATORS_ANIMATION_DELAY_OUT;
let delay = isAnimationIn
? INDICATORS_ANIMATION_DELAY
: INDICATORS_ANIMATION_DELAY_OUT;
let baseTime = isAnimationIn ? INDICATORS_BASE_TIME : INDICATORS_BASE_TIME_OUT;
let totalAnimationTime = baseTime + delay * this._nPages;
let maxTime = isAnimationIn ? INDICATORS_ANIMATION_MAX_TIME :
INDICATORS_ANIMATION_MAX_TIME_OUT;
let maxTime = isAnimationIn
? INDICATORS_ANIMATION_MAX_TIME
: INDICATORS_ANIMATION_MAX_TIME_OUT;
if (totalAnimationTime > maxTime)
delay -= (totalAnimationTime - maxTime) / this._nPages;

View File

@@ -3,7 +3,6 @@
const { Atk, Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Cairo = imports.cairo;
const Mainloop = imports.mainloop;
const Animation = imports.ui.animation;
const Config = imports.misc.config;
@@ -451,8 +450,8 @@ class ActivitiesButton extends PanelMenu.Button {
return DND.DragMotionResult.CONTINUE;
if (this._xdndTimeOut != 0)
Mainloop.source_remove(this._xdndTimeOut);
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT, () => {
GLib.source_remove(this._xdndTimeOut);
this._xdndTimeOut = GLib.timeout_add(GLib.PRIORITY_DEFAULT, BUTTON_DND_ACTIVATION_TIMEOUT, () => {
this._xdndToggleOverview();
});
GLib.Source.set_name_by_id(this._xdndTimeOut, '[gnome-shell] this._xdndToggleOverview');
@@ -496,7 +495,7 @@ class ActivitiesButton extends PanelMenu.Button {
if (pickedActor == this && Main.overview.shouldToggleByCornerOrButton())
Main.overview.toggle();
Mainloop.source_remove(this._xdndTimeOut);
GLib.source_remove(this._xdndTimeOut);
this._xdndTimeOut = 0;
return GLib.SOURCE_REMOVE;
}

View File

@@ -1,5 +1,5 @@
/* exported PointerA11yTimeout */
const { Clutter, GLib, GObject, Meta, St } = imports.gi;
const { Clutter, GObject, Meta, St } = imports.gi;
const Main = imports.ui.main;
const Cairo = imports.cairo;

View File

@@ -2,7 +2,6 @@
/* exported getPointerWatcher */
const { GLib, Meta } = imports.gi;
const Mainloop = imports.mainloop;
// We stop polling if the user is idle for more than this amount of time
var IDLE_TIME = 1000;
@@ -87,7 +86,7 @@ var PointerWatcher = class {
_updateTimeout() {
if (this._timeoutId) {
Mainloop.source_remove(this._timeoutId);
GLib.source_remove(this._timeoutId);
this._timeoutId = 0;
}
@@ -98,8 +97,8 @@ var PointerWatcher = class {
for (let i = 1; i < this._watches.length; i++)
minInterval = Math.min(this._watches[i].interval, minInterval);
this._timeoutId = Mainloop.timeout_add(minInterval,
this._onTimeout.bind(this));
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, minInterval,
this._onTimeout.bind(this));
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
}

View File

@@ -15,6 +15,7 @@ var Ornament = {
NONE: 0,
DOT: 1,
CHECK: 2,
HIDDEN: 3,
};
function isPopupMenuItemVisible(child) {
@@ -57,11 +58,9 @@ var PopupBaseMenuItem = GObject.registerClass({
Properties: {
'active': GObject.ParamSpec.boolean('active', 'active', 'active',
GObject.ParamFlags.READWRITE,
GObject.TYPE_BOOLEAN,
false),
'sensitive': GObject.ParamSpec.boolean('sensitive', 'sensitive', 'sensitive',
GObject.ParamFlags.READWRITE,
GObject.TYPE_BOOLEAN,
true),
},
Signals: {
@@ -69,12 +68,13 @@ var PopupBaseMenuItem = GObject.registerClass({
}
}, class PopupBaseMenuItem extends St.BoxLayout {
_init(params) {
params = Params.parse (params, { reactive: true,
activate: true,
hover: true,
style_class: null,
can_focus: true
});
params = Params.parse (params, {
reactive: true,
activate: true,
hover: true,
style_class: null,
can_focus: true,
});
super._init({ style_class: 'popup-menu-item',
reactive: params.reactive,
track_hover: params.reactive,
@@ -249,10 +249,12 @@ var PopupBaseMenuItem = GObject.registerClass({
} else if (ornament == Ornament.CHECK) {
this._ornamentLabel.text = '\u2713';
this.add_accessible_state(Atk.StateType.CHECKED);
} else if (ornament == Ornament.NONE) {
} else if (ornament == Ornament.NONE || ornament == Ornament.HIDDEN) {
this._ornamentLabel.text = '';
this.remove_accessible_state(Atk.StateType.CHECKED);
}
this._ornamentLabel.visible = ornament != Ornament.HIDDEN;
}
});
@@ -333,9 +335,10 @@ var PopupSwitchMenuItem = GObject.registerClass({
this._statusBin = new St.Bin({ x_align: St.Align.END });
this.add(this._statusBin, { expand: true, x_align: St.Align.END });
this._statusLabel = new St.Label({ text: '',
style_class: 'popup-status-menu-item'
});
this._statusLabel = new St.Label({
text: '',
style_class: 'popup-status-menu-item',
});
this._statusBin.child = this._switch;
}
@@ -425,6 +428,7 @@ var PopupMenuBase = class {
throw new TypeError(`Cannot instantiate abstract class ${this.constructor.name}`);
this.sourceActor = sourceActor;
this.focusActor = sourceActor;
this._parent = null;
if (styleClass !== undefined) {
@@ -549,7 +553,7 @@ var PopupMenuBase = class {
}
_connectItemSignals(menuItem) {
menuItem._activeChangeId = menuItem.connect('notify::active', (menuItem) => {
menuItem._activeChangeId = menuItem.connect('notify::active', menuItem => {
let active = menuItem.active;
if (active && this._activeMenuItem != menuItem) {
if (this._activeMenuItem)
@@ -613,8 +617,8 @@ var PopupMenuBase = class {
while (childBeforeIndex >= 0 && !isPopupMenuItemVisible(children[childBeforeIndex]))
childBeforeIndex--;
if (childBeforeIndex < 0
|| children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
if (childBeforeIndex < 0 ||
children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
menuItem.actor.hide();
return;
}
@@ -624,8 +628,8 @@ var PopupMenuBase = class {
while (childAfterIndex < children.length && !isPopupMenuItemVisible(children[childAfterIndex]))
childAfterIndex++;
if (childAfterIndex >= children.length
|| children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
if (childAfterIndex >= children.length ||
children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
menuItem.actor.hide();
return;
}
@@ -718,10 +722,11 @@ var PopupMenuBase = class {
this.disconnect(openStateChangeId);
menuItem.disconnect(destroyId);
});
} else if (menuItem instanceof PopupBaseMenuItem)
} else if (menuItem instanceof PopupBaseMenuItem) {
this._connectItemSignals(menuItem);
else
} else {
throw TypeError("Invalid argument to PopupMenuBase.addMenuItem()");
}
menuItem._setParent(this);
@@ -1296,18 +1301,20 @@ var PopupMenuManager = class {
if (open) {
if (this.activeMenu)
this.activeMenu.close(BoxPointer.PopupAnimation.FADE);
this._grabHelper.grab({ actor: menu.actor, focus: menu.sourceActor,
onUngrab: isUser => {
this._closeMenu(isUser, menu);
} });
this._grabHelper.grab({
actor: menu.actor,
focus: menu.focusActor,
onUngrab: isUser => this._closeMenu(isUser, menu),
});
} else {
this._grabHelper.ungrab({ actor: menu.actor });
}
}
_changeMenu(newMenu) {
newMenu.open(this.activeMenu ? BoxPointer.PopupAnimation.FADE
: BoxPointer.PopupAnimation.FULL);
newMenu.open(this.activeMenu
? BoxPointer.PopupAnimation.FADE
: BoxPointer.PopupAnimation.FULL);
}
_onMenuSourceEnter(menu) {

View File

@@ -34,6 +34,12 @@ var Ripples = class Ripples {
this._ripple3.set_pivot_point(px, py);
}
destroy() {
this._ripple1.destroy();
this._ripple2.destroy();
this._ripple3.destroy();
}
_animRipple(ripple, delay, duration, startScale, startOpacity, finalScale) {
// We draw a ripple by using a source image and animating it scaling
// outwards and fading away. We want the ripples to move linearly
@@ -61,7 +67,7 @@ var Ripples = class Ripples {
delay,
duration,
mode: Clutter.AnimationMode.LINEAR,
onComplete: () => ripple.visible = false
onComplete: () => (ripple.visible = false)
});
}

View File

@@ -94,15 +94,17 @@ class RunDialog extends ModalDialog.ModalDialog {
this._errorBox.hide();
this.setButtons([{ action: this.close.bind(this),
label: _("Close"),
key: Clutter.Escape }]);
this.setButtons([{
action: this.close.bind(this),
label: _("Close"),
key: Clutter.Escape,
}]);
this._pathCompleter = new Gio.FilenameCompleter();
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
entry: this._entryText });
this._entryText.connect('activate', (o) => {
this._entryText.connect('activate', o => {
this.popModal();
this._run(o.get_text(),
Clutter.get_current_event().get_state() & Clutter.ModifierType.CONTROL_MASK);

View File

@@ -3,7 +3,6 @@
const { AccountsService, Clutter, Cogl, Gio, GLib,
GnomeDesktop, GObject, Meta, Shell, St } = imports.gi;
const Cairo = imports.cairo;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const Background = imports.ui.background;
@@ -174,8 +173,9 @@ var NotificationsBox = class {
let body = '';
if (n.bannerBodyText) {
body = n.bannerBodyMarkup ? n.bannerBodyText
: GLib.markup_escape_text(n.bannerBodyText, -1);
body = n.bannerBodyMarkup
? n.bannerBodyText
: GLib.markup_escape_text(n.bannerBodyText, -1);
}
let label = new St.Label({ style_class: 'screen-shield-notification-count-text' });
@@ -430,13 +430,14 @@ var ScreenShield = class {
this.actor = Main.layoutManager.screenShieldGroup;
this._lockScreenState = MessageTray.State.HIDDEN;
this._lockScreenGroup = new St.Widget({ x_expand: true,
y_expand: true,
reactive: true,
can_focus: true,
name: 'lockScreenGroup',
visible: false,
});
this._lockScreenGroup = new St.Widget({
x_expand: true,
y_expand: true,
reactive: true,
can_focus: true,
name: 'lockScreenGroup',
visible: false,
});
this._lockScreenGroup.connect('key-press-event',
this._onLockScreenKeyPress.bind(this));
this._lockScreenGroup.connect('scroll-event',
@@ -833,12 +834,14 @@ var ScreenShield = class {
let lockTimeout = Math.max(
STANDARD_FADE_TIME,
this._settings.get_uint(LOCK_DELAY_KEY) * 1000);
this._lockTimeoutId = Mainloop.timeout_add(lockTimeout,
() => {
this._lockTimeoutId = 0;
this.lock(false);
return GLib.SOURCE_REMOVE;
});
this._lockTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
lockTimeout,
() => {
this._lockTimeoutId = 0;
this.lock(false);
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._lockTimeoutId, '[gnome-shell] this.lock');
}
@@ -913,8 +916,8 @@ var ScreenShield = class {
this._lockScreenGroup.hide();
if (this._dialog) {
this._dialog.actor.grab_key_focus();
this._dialog.actor.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
this._dialog.grab_key_focus();
this._dialog.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
}
}
@@ -1028,7 +1031,7 @@ var ScreenShield = class {
this._arrowActiveWatchId = 0;
if (!this._arrowAnimationId) {
this._arrowAnimationId = Mainloop.timeout_add(6000, this._animateArrows.bind(this));
this._arrowAnimationId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 6000, this._animateArrows.bind(this));
GLib.Source.set_name_by_id(this._arrowAnimationId, '[gnome-shell] this._animateArrows');
this._animateArrows();
}
@@ -1040,7 +1043,7 @@ var ScreenShield = class {
_pauseArrowAnimation() {
if (this._arrowAnimationId) {
Mainloop.source_remove(this._arrowAnimationId);
GLib.source_remove(this._arrowAnimationId);
this._arrowAnimationId = 0;
}
@@ -1050,7 +1053,7 @@ var ScreenShield = class {
_stopArrowAnimation() {
if (this._arrowAnimationId) {
Mainloop.source_remove(this._arrowAnimationId);
GLib.source_remove(this._arrowAnimationId);
this._arrowAnimationId = 0;
}
if (this._arrowActiveWatchId) {
@@ -1097,7 +1100,7 @@ var ScreenShield = class {
if (params.fadeToBlack && params.animateFade) {
// Take a beat
let id = Mainloop.timeout_add(MANUAL_FADE_TIME, () => {
let id = GLib.timeout_add(GLib.PRIORITY_DEFAULT, MANUAL_FADE_TIME, () => {
this._activateFade(this._shortLightbox, MANUAL_FADE_TIME);
return GLib.SOURCE_REMOVE;
});
@@ -1240,7 +1243,7 @@ var ScreenShield = class {
}
if (this._lockTimeoutId != 0) {
Mainloop.source_remove(this._lockTimeoutId);
GLib.source_remove(this._lockTimeoutId);
this._lockTimeoutId = 0;
}

View File

@@ -116,8 +116,8 @@ var ScreenshotService = class {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_area_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
flash, invocation);
this._onScreenshotComplete(
result, area, filenameUsed, flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
@@ -134,8 +134,8 @@ var ScreenshotService = class {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_window_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
flash, invocation);
this._onScreenshotComplete(
result, area, filenameUsed, flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
@@ -152,8 +152,8 @@ var ScreenshotService = class {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
flash, invocation);
this._onScreenshotComplete(
result, area, filenameUsed, flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
@@ -271,7 +271,7 @@ var SelectArea = class {
}
_onMotionEvent(actor, event) {
if (this._startX == -1 || this._startY == -1)
if (this._startX == -1 || this._startY == -1 || this._result)
return Clutter.EVENT_PROPAGATE;
[this._lastX, this._lastY] = event.get_coords();

View File

@@ -4,7 +4,6 @@
collectStatistics, runPerfScript */
const { Gio, GLib, Meta, Shell } = imports.gi;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
const Params = imports.misc.params;
@@ -41,7 +40,7 @@ const { loadInterfaceXML } = imports.misc.fileUtils;
*/
function sleep(milliseconds) {
return new Promise(resolve => {
let id = Mainloop.timeout_add(milliseconds, () => {
let id = GLib.timeout_add(GLib.PRIORITY_DEFAULT, milliseconds, () => {
resolve();
return GLib.SOURCE_REMOVE;
});
@@ -318,7 +317,7 @@ async function runPerfScript(scriptModule, outputFile) {
for (let step of scriptModule.run()) {
try {
await step;
await step; // eslint-disable-line no-await-in-loop
} catch (err) {
log(`Script failed: ${err}\n${err.stack}`);
Meta.exit(Meta.ExitCode.ERROR);

View File

@@ -158,10 +158,15 @@ var SearchResultsBase = class {
this._clipboard = St.Clipboard.get_default();
this._cancellable = new Gio.Cancellable();
this.actor.connect('destroy', this._onDestroy.bind(this));
}
destroy() {
this.actor.destroy();
}
_onDestroy() {
this._terms = [];
}
@@ -341,14 +346,30 @@ var GridSearchResults = class extends SearchResultsBase {
this._resultDisplayBin.set_child(this._bin);
}
_onDestroy() {
if (this._updateSearchLater) {
Meta.later_remove(this._updateSearchLater);
delete this._updateSearchLater;
}
super._onDestroy();
}
updateSearch(...args) {
if (this._notifyAllocationId)
this.actor.disconnect(this._notifyAllocationId);
if (this._updateSearchLater) {
Meta.later_remove(this._updateSearchLater);
delete this._updateSearchLater;
}
// Make sure the maximum number of results calculated by
// _getMaxDisplayedResults() is updated after width changes.
this._notifyAllocationId = this.actor.connect('notify::allocation', () => {
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
if (this._updateSearchLater)
return;
this._updateSearchLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
delete this._updateSearchLater;
super.updateSearch(...args);
return GLib.SOURCE_REMOVE;
});
@@ -689,8 +710,9 @@ var SearchResults = class {
navigateFocus(direction) {
let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL;
if (direction == St.DirectionType.TAB_BACKWARD ||
direction == (rtl ? St.DirectionType.RIGHT
: St.DirectionType.LEFT) ||
direction == (rtl
? St.DirectionType.RIGHT
: St.DirectionType.LEFT) ||
direction == St.DirectionType.UP) {
this.actor.navigate_focus(null, direction, false);
return;

View File

@@ -2,7 +2,6 @@
/* exported SessionMode, listModes */
const GLib = imports.gi.GLib;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const FileUtils = imports.misc.fileUtils;
@@ -93,11 +92,11 @@ const _modes = {
isLocked: false,
isPrimary: true,
unlockDialog: imports.ui.unlockDialog.UnlockDialog,
components: Config.HAVE_NETWORKMANAGER ?
['networkAgent', 'polkitAgent', 'telepathyClient',
'keyring', 'autorunManager', 'automountManager'] :
['polkitAgent', 'telepathyClient',
'keyring', 'autorunManager', 'automountManager'],
components: Config.HAVE_NETWORKMANAGER
? ['networkAgent', 'polkitAgent', 'telepathyClient',
'keyring', 'autorunManager', 'automountManager']
: ['polkitAgent', 'telepathyClient',
'keyring', 'autorunManager', 'automountManager'],
panel: {
left: ['activities', 'appMenu'],
@@ -112,7 +111,7 @@ function _loadMode(file, info) {
let suffix = name.indexOf('.json');
let modeName = suffix == -1 ? name : name.slice(name, suffix);
if (_modes.hasOwnProperty(modeName))
if (Object.prototype.hasOwnProperty.call(_modes, modeName))
return;
let fileContent, success_, newMode;
@@ -141,15 +140,16 @@ function _loadModes() {
function listModes() {
_loadModes();
let id = Mainloop.idle_add(() => {
let loop = new GLib.MainLoop(null, false);
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
let names = Object.getOwnPropertyNames(_modes);
for (let i = 0; i < names.length; i++)
if (_modes[names[i]].isPrimary)
print(names[i]);
Mainloop.quit('listModes');
loop.quit();
});
GLib.Source.set_name_by_id(id, '[gnome-shell] listModes');
Mainloop.run('listModes');
loop.run();
}
var SessionMode = class {

View File

@@ -26,9 +26,10 @@ function _setButtonsForChoices(dialog, choices) {
for (let idx = 0; idx < choices.length; idx++) {
let button = idx;
buttons.unshift({ label: choices[idx],
action: () => dialog.emit('response', button)
});
buttons.unshift({
label: choices[idx],
action: () => dialog.emit('response', button),
});
}
dialog.setButtons(buttons);
@@ -201,7 +202,7 @@ var ShellMountOperation = class {
_onShowUnmountProgress(op, message, timeLeft, bytesLeft) {
if (!this._notifier)
this._notifier = new ShellUnmountNotifier();
if (bytesLeft == 0)
this._notifier.done(message);
else
@@ -387,24 +388,26 @@ var ShellMountPasswordDialog = GObject.registerClass({
this._rememberChoice = null;
}
this._defaultButtons = [{ label: _("Cancel"),
action: this._onCancelButton.bind(this),
key: Clutter.Escape
},
{ label: _("Unlock"),
action: this._onUnlockButton.bind(this),
default: true
}];
this._defaultButtons = [{
label: _("Cancel"),
action: this._onCancelButton.bind(this),
key: Clutter.Escape,
}, {
label: _("Unlock"),
action: this._onUnlockButton.bind(this),
default: true,
}];
this._usesKeyfilesButtons = [{ label: _("Cancel"),
action: this._onCancelButton.bind(this),
key: Clutter.Escape
},
{ /* Translators: %s is the Disks application */
label: _("Open %s").format(disksApp.get_name()),
action: this._onOpenDisksButton.bind(this),
default: true
}];
this._usesKeyfilesButtons = [{
label: _("Cancel"),
action: this._onCancelButton.bind(this),
key: Clutter.Escape,
}, {
/* Translators: %s is the Disks application */
label: _("Open %s").format(disksApp.get_name()),
action: this._onOpenDisksButton.bind(this),
default: true,
}];
this.setButtons(this._defaultButtons);
}

View File

@@ -100,10 +100,15 @@ var Slider = GObject.registerClass({
_endDragging() {
if (this._dragging) {
if (this._releaseId)
if (this._releaseId) {
this.disconnect(this._releaseId);
if (this._motionId)
this._releaseId = 0;
}
if (this._motionId) {
this.disconnect(this._motionId);
this._motionId = 0;
}
if (this._grabbedSequence != null)
this._grabbedDevice.sequence_ungrab(this._grabbedSequence);

View File

@@ -2,7 +2,6 @@
/* exported ATIndicator */
const { Gio, GLib, GObject, St } = imports.gi;
const Mainloop = imports.mainloop;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
@@ -96,7 +95,7 @@ class ATIndicator extends PanelMenu.Button {
if (this._syncMenuVisibilityIdle)
return;
this._syncMenuVisibilityIdle = Mainloop.idle_add(this._syncMenuVisibility.bind(this));
this._syncMenuVisibilityIdle = GLib.idle_add(GLib.PRIORITY_DEFAULT, this._syncMenuVisibility.bind(this));
GLib.Source.set_name_by_id(this._syncMenuVisibilityIdle, '[gnome-shell] this._syncMenuVisibility');
}
@@ -180,8 +179,8 @@ class ATIndicator extends PanelMenu.Button {
settings.is_writable(KEY_TEXT_SCALING_FACTOR),
enabled => {
if (enabled)
settings.set_double(KEY_TEXT_SCALING_FACTOR,
DPI_FACTOR_LARGE);
settings.set_double(
KEY_TEXT_SCALING_FACTOR, DPI_FACTOR_LARGE);
else
settings.reset(KEY_TEXT_SCALING_FACTOR);
});

View File

@@ -13,8 +13,8 @@ const PanelMenu = imports.ui.panelMenu;
const SwitcherPopup = imports.ui.switcherPopup;
const Util = imports.misc.util;
const INPUT_SOURCE_TYPE_XKB = 'xkb';
const INPUT_SOURCE_TYPE_IBUS = 'ibus';
var INPUT_SOURCE_TYPE_XKB = 'xkb';
var INPUT_SOURCE_TYPE_IBUS = 'ibus';
var LayoutMenuItem = GObject.registerClass(
class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
@@ -976,8 +976,8 @@ class InputSourceIndicator extends PanelMenu.Button {
item.prop = prop;
radioGroup.push(item);
item.radioGroup = radioGroup;
item.setOrnament(prop.get_state() == IBus.PropState.CHECKED ?
PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
item.setOrnament(prop.get_state() == IBus.PropState.CHECKED
? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
item.connect('activate', () => {
if (item.prop.get_state() == IBus.PropState.CHECKED)
return;

View File

@@ -168,8 +168,9 @@ var Indicator = class extends PanelMenu.SystemIndicator {
_updateMenuLabels() {
if (this._settings.get_boolean(ENABLED)) {
this._item.label.text = this._indicator.visible ? _("Location In Use")
: _("Location Enabled");
this._item.label.text = this._indicator.visible
? _("Location In Use")
: _("Location Enabled");
this._onOffAction.label.text = _("Disable");
} else {
this._item.label.text = _("Location Disabled");

View File

@@ -1,7 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported NMApplet */
const { Clutter, Gio, GLib, GObject, NM, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const Animation = imports.ui.animation;
@@ -719,7 +718,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
this._updateSensitivity();
this._syncView();
this._scanTimeoutId = Mainloop.timeout_add_seconds(15, this._onScanTimeout.bind(this));
this._scanTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 15, this._onScanTimeout.bind(this));
GLib.Source.set_name_by_id(this._scanTimeoutId, '[gnome-shell] this._onScanTimeout');
this._onScanTimeout();
@@ -757,7 +756,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
}
if (this._scanTimeoutId) {
Mainloop.source_remove(this._scanTimeoutId);
GLib.source_remove(this._scanTimeoutId);
this._scanTimeoutId = 0;
}
}
@@ -874,7 +873,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
this._airplaneHeadline = new St.Label({ style_class: 'nm-dialog-airplane-headline headline' });
this._airplaneText = new St.Label({ style_class: 'nm-dialog-airplane-text' });
let airplaneSubStack = new St.Widget({ layout_manager: new Clutter.BinLayout });
let airplaneSubStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this._airplaneButton = new St.Button({ style_class: 'modal-dialog-button button' });
this._airplaneButton.connect('clicked', () => {
if (this._rfkill.airplaneMode)
@@ -910,8 +909,8 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
this._client.activate_connection_async(connection, this._device, null, null, null);
} else {
let accessPoints = network.accessPoints;
if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
|| (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT) ||
(accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
// 802.1x-enabled APs require further configuration, so they're
// handled in gnome-control-center
Util.spawn(['gnome-control-center', 'wifi', 'connect-8021x-wifi',
@@ -1074,13 +1073,14 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
this._resortItems();
} else {
network = { ssid: accessPoint.get_ssid(),
mode: accessPoint.mode,
security: this._getApSecurityType(accessPoint),
connections: [],
item: null,
accessPoints: [accessPoint]
};
network = {
ssid: accessPoint.get_ssid(),
mode: accessPoint.mode,
security: this._getApSecurityType(accessPoint),
connections: [],
item: null,
accessPoints: [accessPoint],
};
network.ssidText = ssidToLabel(network.ssid);
this._checkConnections(network, accessPoint);
@@ -1676,7 +1676,7 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
'network-transmit-receive');
this._source.policy = new MessageTray.NotificationApplicationPolicy('gnome-network-panel');
this._source.connect('destroy', () => this._source = null);
this._source.connect('destroy', () => (this._source = null));
Main.messageTray.add(this._source);
}
}
@@ -1976,7 +1976,6 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
// or we get to full connectivity through other means
} else if (result == PortalHelperResult.COMPLETED) {
this._closeConnectivityCheck(path);
return;
} else if (result == PortalHelperResult.RECHECK) {
this._client.check_connectivity_async(null, (client, result) => {
try {

View File

@@ -58,10 +58,12 @@ var Indicator = class extends PanelMenu.SystemIndicator {
let visible = this._proxy.NightLightActive;
let disabled = this._proxy.DisabledUntilTomorrow;
this._item.label.text = disabled ? _("Night Light Disabled")
: _("Night Light On");
this._disableItem.label.text = disabled ? _("Resume")
: _("Disable Until Tomorrow");
this._item.label.text = disabled
? _("Night Light Disabled")
: _("Night Light On");
this._disableItem.label.text = disabled
? _("Resume")
: _("Disable Until Tomorrow");
this._item.visible = this._indicator.visible = visible;
}
};

View File

@@ -33,7 +33,7 @@ var AltSwitcher = class {
this.actor = new St.Bin();
this.actor.connect('destroy', this._onDestroy.bind(this));
this.actor.connect('notify::mapped', () => this._flipped = false);
this.actor.connect('notify::mapped', () => (this._flipped = false));
}
_sync() {
@@ -137,15 +137,6 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._sessionUpdated();
}
_updateActionsVisibility() {
let visible = (this._settingsAction.visible ||
this._orientationLockAction.visible ||
this._lockScreenAction.visible ||
this._altSwitcher.actor.visible);
this.buttonGroup.visible = visible;
}
_sessionUpdated() {
this._settingsAction.visible = Main.sessionMode.allowSettings;
}
@@ -253,7 +244,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._orientationLockAction = this._createActionButton('', _("Orientation Lock"));
this._orientationLockAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE),
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activateLockOrientation();
});
item.add(this._orientationLockAction, { expand: true, x_fill: false });
@@ -302,15 +293,18 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this.menu.addMenuItem(item);
let visibilityGroup = [
this._settingsAction,
this._orientationLockAction,
this._lockScreenAction,
this._altSwitcher.actor,
];
this._settingsAction.connect('notify::visible',
() => this._updateActionsVisibility());
this._orientationLockAction.connect('notify::visible',
() => this._updateActionsVisibility());
this._lockScreenAction.connect('notify::visible',
() => this._updateActionsVisibility());
this._altSwitcher.actor.connect('notify::visible',
() => this._updateActionsVisibility());
for (let actor of visibilityGroup) {
actor.connect('notify::visible', () => {
this.buttonGroup.visible = visibilityGroup.some(a => a.visible);
});
}
}
_onSettingsClicked() {

View File

@@ -156,12 +156,12 @@ var AuthRobot = class {
/* check if authorization is enabled in the daemon. if not
* we won't even bother authorizing, because we will only
* get an error back. The exact contents of AuthMode might
* get an error back. The exact contents of AuthMode might
* change in the future, but must contain AuthMode.ENABLED
* if it is enabled. */
if (!cli.authMode.split('|').includes(AuthMode.ENABLED))
return;
/* check if we should enroll the device */
let res = [false];
this.emit('enroll-device', dev, res);
@@ -260,7 +260,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
if (!this._source) {
this._source = new MessageTray.Source(_("Thunderbolt"),
'thunderbolt-symbolic');
this._source.connect('destroy', () => this._source = null);
this._source.connect('destroy', () => (this._source = null));
Main.messageTray.add(this._source);
}

View File

@@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported Indicator */
const { Clutter, Gio, Gvc, St } = imports.gi;
const { Clutter, Gio, GObject, Gvc, St } = imports.gi;
const Signals = imports.signals;
const Main = imports.ui.main;
@@ -36,7 +36,8 @@ var StreamSlider = class {
this._soundSettings.connect(`changed::${ALLOW_AMPLIFIED_VOLUME_KEY}`, this._amplifySettingsChanged.bind(this));
this._amplifySettingsChanged();
this._slider.connect('notify::value', this._sliderChanged.bind(this));
this._sliderChangedId = this._slider.connect('notify::value',
this._sliderChanged.bind(this));
this._slider.connect('drag-end', this._notifyVolumeChange.bind(this));
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
@@ -129,10 +130,16 @@ var StreamSlider = class {
this._volumeCancellable);
}
_changeSlider(value) {
GObject.signal_handler_block(this._slider, this._sliderChangedId);
this._slider.value = value;
GObject.signal_handler_unblock(this._slider, this._sliderChangedId);
}
_updateVolume() {
let muted = this._stream.is_muted;
this._slider.value = muted
? 0 : (this._stream.volume / this._control.get_vol_max_norm());
this._changeSlider(muted
? 0 : (this._stream.volume / this._control.get_vol_max_norm()));
this.emit('stream-updated');
}
@@ -221,9 +228,9 @@ var OutputStreamSlider = class extends StreamSlider {
}
_updateSliderIcon() {
this._icon.icon_name = (this._hasHeadphones ?
'audio-headphones-symbolic' :
'audio-speakers-symbolic');
this._icon.icon_name = (this._hasHeadphones
? 'audio-headphones-symbolic'
: 'audio-speakers-symbolic');
}
_portChanged() {
@@ -252,18 +259,17 @@ var InputStreamSlider = class extends StreamSlider {
_maybeShowInput() {
// only show input widgets if any application is recording audio
let showInput = false;
let recordingApps = this._control.get_source_outputs();
if (this._stream && recordingApps) {
for (let i = 0; i < recordingApps.length; i++) {
let outputStream = recordingApps[i];
let id = outputStream.get_application_id();
// but skip gnome-volume-control and pavucontrol
// (that appear as recording because they show the input level)
if (!id || (id != 'org.gnome.VolumeControl' && id != 'org.PulseAudio.pavucontrol')) {
showInput = true;
break;
}
}
if (this._stream) {
// skip gnome-volume-control and pavucontrol which appear
// as recording because they show the input level
let skippedApps = [
'org.gnome.VolumeControl',
'org.PulseAudio.pavucontrol'
];
showInput = this._control.get_source_outputs().some(output => {
return !skippedApps.includes(output.get_application_id());
});
}
this._showInput = showInput;

View File

@@ -2,7 +2,6 @@
/* exported SwitcherPopup, SwitcherList */
const { Clutter, GLib, GObject, Meta, St } = imports.gi;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
@@ -142,13 +141,15 @@ var SwitcherPopup = GObject.registerClass({
// We delay showing the popup so that fast Alt+Tab users aren't
// disturbed by the popup briefly flashing.
this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT,
() => {
Main.osdWindowManager.hideAll();
this.opacity = 255;
this._initialDelayTimeoutId = 0;
return GLib.SOURCE_REMOVE;
});
this._initialDelayTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
POPUP_DELAY_TIMEOUT,
() => {
Main.osdWindowManager.hideAll();
this.opacity = 255;
this._initialDelayTimeoutId = 0;
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(this._initialDelayTimeoutId, '[gnome-shell] Main.osdWindow.cancel');
return true;
}
@@ -249,9 +250,9 @@ var SwitcherPopup = GObject.registerClass({
this.mouseActive = false;
if (this._motionTimeoutId != 0)
Mainloop.source_remove(this._motionTimeoutId);
GLib.source_remove(this._motionTimeoutId);
this._motionTimeoutId = Mainloop.timeout_add(DISABLE_HOVER_TIMEOUT, this._mouseTimedOut.bind(this));
this._motionTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, DISABLE_HOVER_TIMEOUT, this._mouseTimedOut.bind(this));
GLib.Source.set_name_by_id(this._motionTimeoutId, '[gnome-shell] this._mouseTimedOut');
}
@@ -263,14 +264,16 @@ var SwitcherPopup = GObject.registerClass({
_resetNoModsTimeout() {
if (this._noModsTimeoutId != 0)
Mainloop.source_remove(this._noModsTimeoutId);
GLib.source_remove(this._noModsTimeoutId);
this._noModsTimeoutId = Mainloop.timeout_add(NO_MODS_TIMEOUT,
() => {
this._finish(global.get_current_time());
this._noModsTimeoutId = 0;
return GLib.SOURCE_REMOVE;
});
this._noModsTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
NO_MODS_TIMEOUT,
() => {
this._finish(global.get_current_time());
this._noModsTimeoutId = 0;
return GLib.SOURCE_REMOVE;
});
}
_popModal() {
@@ -302,11 +305,11 @@ var SwitcherPopup = GObject.registerClass({
this._popModal();
if (this._motionTimeoutId != 0)
Mainloop.source_remove(this._motionTimeoutId);
GLib.source_remove(this._motionTimeoutId);
if (this._initialDelayTimeoutId != 0)
Mainloop.source_remove(this._initialDelayTimeoutId);
GLib.source_remove(this._initialDelayTimeoutId);
if (this._noModsTimeoutId != 0)
Mainloop.source_remove(this._noModsTimeoutId);
GLib.source_remove(this._noModsTimeoutId);
}
_select(num) {

View File

@@ -2,8 +2,7 @@
/* exported UnlockDialog */
const { AccountsService, Atk, Clutter,
Gdm, Gio, GLib, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
Gdm, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
@@ -13,15 +12,19 @@ const AuthPrompt = imports.gdm.authPrompt;
// The timeout before going back automatically to the lock screen (in seconds)
const IDLE_TIMEOUT = 2 * 60;
var UnlockDialog = class {
constructor(parentActor) {
this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
style_class: 'login-dialog',
layout_manager: new Clutter.BoxLayout(),
visible: false });
var UnlockDialog = GObject.registerClass({
Signals: { 'failed': {} },
}, class UnlockDialog extends St.Widget {
_init(parentActor) {
super._init({
accessible_role: Atk.Role.WINDOW,
style_class: 'login-dialog',
layout_manager: new Clutter.BoxLayout(),
visible: false,
});
this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
parentActor.add_child(this.actor);
this.add_constraint(new Layout.MonitorConstraint({ primary: true }));
parentActor.add_child(this);
this._userManager = AccountsService.UserManager.get_default();
this._userName = GLib.get_user_name();
@@ -32,7 +35,7 @@ var UnlockDialog = class {
y_align: Clutter.ActorAlign.CENTER,
x_expand: true,
y_expand: true });
this.actor.add_child(this._promptBox);
this.add_child(this._promptBox);
this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
this._authPrompt.connect('failed', this._fail.bind(this));
@@ -64,10 +67,12 @@ var UnlockDialog = class {
this._authPrompt.reset();
this._updateSensitivity(true);
Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic');
Main.ctrlAltTabManager.addGroup(this, _("Unlock Window"), 'dialog-password-symbolic');
this._idleMonitor = Meta.IdleMonitor.get_core();
this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, this._escape.bind(this));
this.connect('destroy', this._onDestroy.bind(this));
}
_updateSensitivity(sensitive) {
@@ -106,9 +111,8 @@ var UnlockDialog = class {
this._authPrompt.cancel();
}
destroy() {
_onDestroy() {
this.popModal();
this.actor.destroy();
if (this._idleWatchId) {
this._idleMonitor.remove_watch(this._idleWatchId);
@@ -131,13 +135,16 @@ var UnlockDialog = class {
}
open(timestamp) {
this.actor.show();
this.show();
if (this._isModal)
return true;
if (!Main.pushModal(this.actor, { timestamp: timestamp,
actionMode: Shell.ActionMode.UNLOCK_SCREEN }))
let modalParams = {
timestamp,
actionMode: Shell.ActionMode.UNLOCK_SCREEN,
};
if (!Main.pushModal(this, modalParams))
return false;
this._isModal = true;
@@ -147,9 +154,8 @@ var UnlockDialog = class {
popModal(timestamp) {
if (this._isModal) {
Main.popModal(this.actor, timestamp);
Main.popModal(this, timestamp);
this._isModal = false;
}
}
};
Signals.addSignalMethods(UnlockDialog.prototype);
});

View File

@@ -309,12 +309,10 @@ var ViewSelector = class {
if (params.a11yFocus)
Main.ctrlAltTabManager.addGroup(params.a11yFocus, name, a11yIcon);
else
Main.ctrlAltTabManager.addGroup(actor, name, a11yIcon,
{ proxy: this.actor,
focusCallback: () => {
this._a11yFocusPage(page);
}
});
Main.ctrlAltTabManager.addGroup(actor, name, a11yIcon, {
proxy: this.actor,
focusCallback: () => this._a11yFocusPage(page),
});
page.hide();
this.actor.add_actor(page);
return page;
@@ -391,8 +389,8 @@ var ViewSelector = class {
}
_onShowAppsButtonToggled() {
this._showPage(this._showAppsButton.checked ?
this._appsPage : this._workspacesPage);
this._showPage(this._showAppsButton.checked
? this._appsPage : this._workspacesPage);
}
_onStageKeyPress(actor, event) {
@@ -426,8 +424,9 @@ var ViewSelector = class {
}
_searchCancelled() {
this._showPage(this._showAppsButton.checked ? this._appsPage
: this._workspacesPage);
this._showPage(this._showAppsButton.checked
? this._appsPage
: this._workspacesPage);
// Leave the entry focused when it doesn't have any text;
// when replacing a selected search term, Clutter emits
@@ -578,6 +577,7 @@ var ViewSelector = class {
if (event.type() == Clutter.EventType.BUTTON_PRESS) {
let source = event.get_source();
if (source != this._text &&
this._text.has_key_focus() &&
this._text.text == '' &&
!this._text.has_preedit () &&
!Main.layoutManager.keyboardBox.contains(source)) {

View File

@@ -2,7 +2,6 @@
/* exported WindowManager */
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const AltTab = imports.ui.altTab;
@@ -17,6 +16,7 @@ const PadOsd = imports.ui.padOsd;
const EdgeDragAction = imports.ui.edgeDragAction;
const CloseDialog = imports.ui.closeDialog;
const SwitchMonitor = imports.ui.switchMonitor;
const IBusManager = imports.misc.ibusManager;
const { loadInterfaceXML } = imports.misc.fileUtils;
@@ -70,13 +70,13 @@ class DisplayChangeDialog extends ModalDialog.ModalDialog {
action: this._onSuccess.bind(this),
default: true });
this._timeoutId = Mainloop.timeout_add(ONE_SECOND, this._tick.bind(this));
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, ONE_SECOND, this._tick.bind(this));
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._tick');
}
close(timestamp) {
if (this._timeoutId > 0) {
Mainloop.source_remove(this._timeoutId);
GLib.source_remove(this._timeoutId);
this._timeoutId = 0;
}
@@ -280,9 +280,9 @@ var WorkspaceTracker = class {
keepWorkspaceAlive(workspace, duration) {
if (workspace._keepAliveId)
Mainloop.source_remove(workspace._keepAliveId);
GLib.source_remove(workspace._keepAliveId);
workspace._keepAliveId = Mainloop.timeout_add(duration, () => {
workspace._keepAliveId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, duration, () => {
workspace._keepAliveId = 0;
this._queueCheckWorkspaces();
return GLib.SOURCE_REMOVE;
@@ -293,7 +293,7 @@ var WorkspaceTracker = class {
_windowRemoved(workspace, window) {
workspace._lastRemovedWindow = window;
this._queueCheckWorkspaces();
let id = Mainloop.timeout_add(LAST_WINDOW_GRACE_TIME, () => {
let id = GLib.timeout_add(GLib.PRIORITY_DEFAULT, LAST_WINDOW_GRACE_TIME, () => {
if (workspace._lastRemovedWindow == window) {
workspace._lastRemovedWindow = null;
this._queueCheckWorkspaces();
@@ -630,9 +630,9 @@ var AppSwitchAction = GObject.registerClass({
let nPoints = this.get_n_current_points();
let event = this.get_last_event (nPoints - 1);
if (nPoints == 3)
if (nPoints == 3) {
this._longPressStartTime = event.get_time();
else if (nPoints == 4) {
} else if (nPoints == 4) {
// Check whether the 4th finger press happens after a 3-finger long press,
// this only needs to be checked on the first 4th finger press
if (this._longPressStartTime != null &&
@@ -713,7 +713,7 @@ var WindowManager = class {
this._isWorkspacePrepended = false;
this._switchData = null;
this._shellwm.connect('kill-switch-workspace', (shellwm) => {
this._shellwm.connect('kill-switch-workspace', shellwm => {
if (this._switchData) {
if (this._switchData.inProgress)
this._switchWorkspaceDone(shellwm);
@@ -1022,7 +1022,6 @@ var WindowManager = class {
(proxy, error) => {
if (error) {
log(error.message);
return;
}
});
@@ -1041,6 +1040,15 @@ var WindowManager = class {
}
});
global.display.connect('x11-display-opened', () => {
IBusManager.getIBusManager().restartDaemon(['--xim']);
Shell.util_start_systemd_unit('gnome-session-x11-services.target', 'fail');
});
global.display.connect('x11-display-closing', () => {
Shell.util_stop_systemd_unit('gnome-session-x11-services.target', 'fail');
IBusManager.getIBusManager().restartDaemon();
});
Main.overview.connect('showing', () => {
for (let i = 0; i < this._dimmedWindows.length; i++)
this._undimWindow(this._dimmedWindows[i]);
@@ -1106,7 +1114,7 @@ var WindowManager = class {
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
this._currentPadOsd = new PadOsd.PadOsd(device, settings, imagePath, editionMode, monitorIndex);
this._currentPadOsd.connect('closed', () => this._currentPadOsd = null);
this._currentPadOsd.connect('closed', () => (this._currentPadOsd = null));
return this._currentPadOsd.actor;
}
@@ -1673,7 +1681,6 @@ var WindowManager = class {
break;
default:
shellwm.completed_map(actor);
return;
}
}
@@ -1754,7 +1761,6 @@ var WindowManager = class {
break;
default:
shellwm.completed_destroy(actor);
return;
}
}

View File

@@ -178,7 +178,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
}
let waitId = 0;
let id = global.display.connect('grab-op-end', (display) => {
let id = global.display.connect('grab-op-end', display => {
display.disconnect(id);
GLib.source_remove(waitId);
@@ -224,7 +224,7 @@ var WindowMenuManager = class {
this._sourceActor.set_position(rect.x, rect.y);
this._sourceActor.show();
menu.open(BoxPointer.PopupAnimation.NONE);
menu.open(BoxPointer.PopupAnimation.FADE);
menu.actor.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
menu.connect('open-state-changed', (menu_, isOpen) => {
if (isOpen)

View File

@@ -2,7 +2,6 @@
/* exported Workspace */
const { Atk, Clutter, GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const DND = imports.ui.dnd;
@@ -57,17 +56,16 @@ class WindowCloneLayout extends Clutter.LayoutManager {
// has an extra set of "padding" around it that we need to trim
// down.
// The outer rect (from which we compute the bounding box)
// paradoxically is the smaller rectangle, containing the positions
// of the visible frame. The input rect contains everything,
// including the invisible border padding.
let inputRect = window.get_buffer_rect();
// The bounding box is based on the (visible) frame rect, while
// the buffer rect contains everything, including the invisible
// border padding.
let bufferRect = window.get_buffer_rect();
let box = new Clutter.ActorBox();
box.set_origin(inputRect.x - this._boundingBox.x,
inputRect.y - this._boundingBox.y);
box.set_size(inputRect.width, inputRect.height);
box.set_origin(bufferRect.x - this._boundingBox.x,
bufferRect.y - this._boundingBox.y);
box.set_size(bufferRect.width, bufferRect.height);
return box;
}
@@ -83,8 +81,8 @@ class WindowCloneLayout extends Clutter.LayoutManager {
vfunc_allocate(container, box, flags) {
container.get_children().forEach(child => {
let realWindow;
if (child == container._delegate._windowClone)
realWindow = container._delegate.realWindow;
if (child == container._windowClone)
realWindow = container.realWindow;
else
realWindow = child.source;
@@ -104,7 +102,7 @@ var WindowClone = GObject.registerClass({
'show-chrome': {},
'size-changed': {}
},
}, class WindowClone extends St.Widget {
}, class WorkspaceWindowClone extends St.Widget {
_init(realWindow, workspace) {
this.realWindow = realWindow;
this.metaWindow = realWindow.meta_window;
@@ -354,6 +352,11 @@ var WindowClone = GObject.registerClass({
this.metaWindow._delegate = null;
this._delegate = null;
if (this._longPressLater) {
Meta.later_remove(this._longPressLater);
delete this._longPressLater;
}
if (this.inDrag) {
this.emit('drag-end');
this.inDrag = false;
@@ -388,9 +391,13 @@ var WindowClone = GObject.registerClass({
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
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this._longPressLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
delete this._longPressLater;
if (this._selected)
return;
let [x, y] = action.get_coords();
@@ -405,8 +412,6 @@ var WindowClone = GObject.registerClass({
_onDragBegin(_draggable, _time) {
this._dragSlot = this._slot;
[this.dragOrigX, this.dragOrigY] = this.get_position();
this.dragOrigScale = this.scale_x;
this.inDrag = true;
this.emit('drag-begin');
}
@@ -416,7 +421,7 @@ var WindowClone = GObject.registerClass({
}
acceptDrop(source, actor, x, y, time) {
this._workspace.acceptDrop(source, actor, x, y, time);
return this._workspace.acceptDrop(source, actor, x, y, time);
}
_onDragCancelled(_draggable, _time) {
@@ -461,7 +466,8 @@ var WindowOverlay = class {
this.border = new St.Bin({ style_class: 'window-clone-border' });
this.title = new St.Label({ style_class: 'window-caption',
text: this._getCaption() });
text: this._getCaption(),
reactive: true });
this.title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
windowClone.label_actor = this.title;
@@ -486,7 +492,6 @@ var WindowOverlay = class {
this.closeButton.hide();
// Don't block drop targets
Shell.util_set_hidden_from_pick(this.title, true);
Shell.util_set_hidden_from_pick(this.border, true);
parentActor.add_actor(this.border);
@@ -628,7 +633,7 @@ var WindowOverlay = class {
_onDestroy() {
if (this._idleHideOverlayId > 0) {
Mainloop.source_remove(this._idleHideOverlayId);
GLib.source_remove(this._idleHideOverlayId);
this._idleHideOverlayId = 0;
}
this._windowClone.metaWindow.disconnect(this._updateCaptionId);
@@ -679,25 +684,28 @@ var WindowOverlay = class {
}
_onHideChrome() {
if (this._idleHideOverlayId == 0) {
this._idleHideOverlayId = Mainloop.timeout_add(WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this));
GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
}
if (this._idleHideOverlayId > 0)
GLib.source_remove(this._idleHideOverlayId);
this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this));
GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
}
_idleHideOverlay() {
this._idleHideOverlayId = 0;
if (this.closeButton['has-pointer'] ||
this.title['has-pointer'])
return GLib.SOURCE_CONTINUE;
if (!this._windowClone['has-pointer'] &&
!this.closeButton['has-pointer'])
if (!this._windowClone['has-pointer'])
this._animateInvisible();
this._idleHideOverlayId = 0;
return GLib.SOURCE_REMOVE;
}
hideOverlay() {
if (this._idleHideOverlayId > 0) {
Mainloop.source_remove(this._idleHideOverlayId);
GLib.source_remove(this._idleHideOverlayId);
this._idleHideOverlayId = 0;
}
this.closeButton.hide();
@@ -896,7 +904,7 @@ var LayoutStrategy = class {
computeWindowSlots(layout, area) {
this._computeRowSizes(layout);
let { rows: rows, scale: scale } = layout;
let { rows, scale } = layout;
let slots = [];
@@ -939,7 +947,7 @@ var LayoutStrategy = class {
y += row.height * row.additionalScale + this._rowSpacing;
}
compensation = compensation / 2;
compensation /= 2;
for (let i = 0; i < rows.length; i++) {
let row = rows[i];
@@ -971,7 +979,7 @@ var LayoutStrategy = class {
var UnalignedLayoutStrategy = class extends LayoutStrategy {
_computeRowSizes(layout) {
let { rows: rows, scale: scale } = layout;
let { rows, scale } = layout;
for (let i = 0; i < rows.length; i++) {
let row = rows[i];
row.width = row.fullWidth * scale + (row.windows.length - 1) * this._columnSpacing;
@@ -1090,10 +1098,8 @@ const WorkspaceActor = GObject.registerClass(
class WorkspaceActor extends St.Widget {
vfunc_get_focus_chain() {
return this.get_children().filter(c => c.visible).sort((a, b) => {
let cloneA = (a._delegate && a._delegate instanceof WindowClone) ? a._delegate : null;
let cloneB = (b._delegate && b._delegate instanceof WindowClone) ? b._delegate : null;
if (cloneA && cloneB)
return cloneA.slotId - cloneB.slotId;
if (a instanceof WindowClone && b instanceof WindowClone)
return a.slotId - b.slotId;
return 0;
});
@@ -1263,7 +1269,7 @@ var Workspace = class {
_realRecalculateWindowPositions(flags) {
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
GLib.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
@@ -1473,7 +1479,7 @@ var Workspace = class {
// remove old handler
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
GLib.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
@@ -1483,7 +1489,7 @@ var Workspace = class {
this._cursorY = y;
this._currentLayout = null;
this._repositionWindowsId = Mainloop.timeout_add(WINDOW_REPOSITIONING_DELAY,
this._repositionWindowsId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_REPOSITIONING_DELAY,
this._delayedWindowRepositioning.bind(this));
GLib.Source.set_name_by_id(this._repositionWindowsId, '[gnome-shell] this._delayedWindowRepositioning');
}
@@ -1497,7 +1503,7 @@ var Workspace = class {
if (!win) {
// Newly-created windows are added to a workspace before
// the compositor finds out about them...
let id = Mainloop.idle_add(() => {
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
if (this.actor &&
metaWin.get_compositor_private() &&
metaWin.get_workspace() == this.metaWorkspace)
@@ -1643,7 +1649,7 @@ var Workspace = class {
this._windows[i].remove_all_transitions();
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
GLib.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
@@ -1728,7 +1734,7 @@ var Workspace = class {
this._windows[i].remove_all_transitions();
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
GLib.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
this._overviewHiddenId = Main.overview.connect('hidden', this._doneLeavingOverview.bind(this));
@@ -1789,7 +1795,7 @@ var Workspace = class {
global.display.disconnect(this._windowLeftMonitorId);
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
GLib.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
@@ -1978,7 +1984,7 @@ var Workspace = class {
}
_onCloneSelected(clone, time) {
let wsIndex = undefined;
let wsIndex;
if (this.metaWorkspace)
wsIndex = this.metaWorkspace.index();
Main.activateWindow(clone.metaWindow, time, wsIndex);
@@ -1988,13 +1994,20 @@ var Workspace = class {
handleDragOver(source, _actor, _x, _y, _time) {
if (source.realWindow && !this._isMyWindow(source.realWindow))
return DND.DragMotionResult.MOVE_DROP;
if (source.shellWorkspaceLaunch)
if (source.app && source.app.can_open_new_window())
return DND.DragMotionResult.COPY_DROP;
if (!source.app && source.shellWorkspaceLaunch)
return DND.DragMotionResult.COPY_DROP;
return DND.DragMotionResult.CONTINUE;
}
acceptDrop(source, actor, x, y, time) {
let workspaceManager = global.workspace_manager;
let workspaceIndex = this.metaWorkspace
? this.metaWorkspace.index()
: workspaceManager.get_active_workspace_index();
if (source.realWindow) {
let win = source.realWindow;
if (this._isMyWindow(win))
@@ -2016,12 +2029,18 @@ var Workspace = class {
if (metaWindow.get_monitor() != this.monitorIndex)
metaWindow.move_to_monitor(this.monitorIndex);
let workspaceManager = global.workspace_manager;
let index = this.metaWorkspace ? this.metaWorkspace.index() : workspaceManager.get_active_workspace_index();
metaWindow.change_workspace_by_index(index, false);
metaWindow.change_workspace_by_index(workspaceIndex, false);
return true;
} else if (source.shellWorkspaceLaunch) {
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
} else if (source.app && source.app.can_open_new_window()) {
if (source.animateLaunchAtPos)
source.animateLaunchAtPos(actor.x, actor.y);
source.app.open_new_window(workspaceIndex);
return true;
} else if (!source.app && source.shellWorkspaceLaunch) {
// While unused in our own drag sources, shellWorkspaceLaunch allows
// extensions to define custom actions for their drag sources.
source.shellWorkspaceLaunch({ workspace: workspaceIndex,
timestamp: time });
return true;
}

View File

@@ -2,7 +2,6 @@
/* exported WorkspaceSwitcherPopup */
const { Clutter, GLib, GObject, Meta, St } = imports.gi;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
@@ -195,14 +194,14 @@ class WorkspaceSwitcherPopup extends St.Widget {
this._redisplay();
if (this._timeoutId != 0)
Mainloop.source_remove(this._timeoutId);
this._timeoutId = Mainloop.timeout_add(DISPLAY_TIMEOUT, this._onTimeout.bind(this));
GLib.source_remove(this._timeoutId);
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, DISPLAY_TIMEOUT, this._onTimeout.bind(this));
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._onTimeout');
this._show();
}
_onTimeout() {
Mainloop.source_remove(this._timeoutId);
GLib.source_remove(this._timeoutId);
this._timeoutId = 0;
this._container.ease({
opacity: 0.0,
@@ -215,7 +214,7 @@ class WorkspaceSwitcherPopup extends St.Widget {
_onDestroy() {
if (this._timeoutId)
Mainloop.source_remove(this._timeoutId);
GLib.source_remove(this._timeoutId);
this._timeoutId = 0;
let workspaceManager = global.workspace_manager;

View File

@@ -2,7 +2,6 @@
/* exported WorkspaceThumbnail, ThumbnailsBox */
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const Background = imports.ui.background;
@@ -389,7 +388,7 @@ var WorkspaceThumbnail = GObject.registerClass({
if (!win) {
// Newly-created windows are added to a workspace before
// the compositor finds out about them...
let id = Mainloop.idle_add(() => {
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
if (!this._removed &&
metaWin.get_compositor_private() &&
metaWin.get_workspace() == this.metaWorkspace)
@@ -562,7 +561,7 @@ var WorkspaceThumbnail = GObject.registerClass({
}
// Draggable target interface used only by ThumbnailsBox
handleDragOverInternal(source, time) {
handleDragOverInternal(source, actor, time) {
if (source == Main.xdndHandler) {
this.metaWorkspace.activate(time);
return DND.DragMotionResult.CONTINUE;
@@ -573,13 +572,15 @@ var WorkspaceThumbnail = GObject.registerClass({
if (source.realWindow && !this._isMyWindow(source.realWindow))
return DND.DragMotionResult.MOVE_DROP;
if (source.shellWorkspaceLaunch)
if (source.app && source.app.can_open_new_window())
return DND.DragMotionResult.COPY_DROP;
if (!source.app && source.shellWorkspaceLaunch)
return DND.DragMotionResult.COPY_DROP;
return DND.DragMotionResult.CONTINUE;
}
acceptDropInternal(source, time) {
acceptDropInternal(source, actor, time) {
if (this.state > ThumbnailState.NORMAL)
return false;
@@ -598,8 +599,16 @@ var WorkspaceThumbnail = GObject.registerClass({
metaWindow.change_workspace_by_index(this.metaWorkspace.index(), false);
return true;
} else if (source.shellWorkspaceLaunch) {
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace ? this.metaWorkspace.index() : -1,
} else if (source.app && source.app.can_open_new_window()) {
if (source.animateLaunchAtPos)
source.animateLaunchAtPos(actor.x, actor.y);
source.app.open_new_window(this.metaWorkspace.index());
return true;
} else if (!source.app && source.shellWorkspaceLaunch) {
// While unused in our own drag sources, shellWorkspaceLaunch allows
// extensions to define custom actions for their drag sources.
source.shellWorkspaceLaunch({ workspace: this.metaWorkspace.index(),
timestamp: time });
return true;
}
@@ -711,14 +720,12 @@ var ThumbnailsBox = GObject.registerClass({
_activateThumbnailAtPoint(stageX, stageY, time) {
let [r_, x_, y] = this.transform_stage_point(stageX, stageY);
for (let i = 0; i < this._thumbnails.length; i++) {
let thumbnail = this._thumbnails[i];
let [, h] = thumbnail.get_transformed_size();
if (y >= thumbnail.y && y <= thumbnail.y + h) {
thumbnail.activate(time);
break;
}
}
let thumbnail = this._thumbnails.find(t => {
let [, h] = t.get_transformed_size();
return y >= t.y && y <= t.y + h;
});
if (thumbnail)
thumbnail.activate(time);
}
_onButtonRelease(actor, event) {
@@ -782,7 +789,10 @@ var ThumbnailsBox = GObject.registerClass({
// Draggable target interface
handleDragOver(source, actor, x, y, time) {
if (!source.realWindow && !source.shellWorkspaceLaunch && source != Main.xdndHandler)
if (!source.realWindow &&
(!source.app || !source.app.can_open_new_window()) &&
(source.app || !source.shellWorkspaceLaunch) &&
source != Main.xdndHandler)
return DND.DragMotionResult.CONTINUE;
let canCreateWorkspaces = Meta.prefs_get_dynamic_workspaces();
@@ -828,7 +838,7 @@ var ThumbnailsBox = GObject.registerClass({
}
if (this._dropWorkspace != -1)
return this._thumbnails[this._dropWorkspace].handleDragOverInternal(source, time);
return this._thumbnails[this._dropWorkspace].handleDragOverInternal(source, actor, time);
else if (this._dropPlaceholderPos != -1)
return source.realWindow ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.COPY_DROP;
else
@@ -837,9 +847,11 @@ var ThumbnailsBox = GObject.registerClass({
acceptDrop(source, actor, x, y, time) {
if (this._dropWorkspace != -1) {
return this._thumbnails[this._dropWorkspace].acceptDropInternal(source, time);
return this._thumbnails[this._dropWorkspace].acceptDropInternal(source, actor, time);
} else if (this._dropPlaceholderPos != -1) {
if (!source.realWindow && !source.shellWorkspaceLaunch)
if (!source.realWindow &&
(!source.app || !source.app.can_open_new_window()) &&
(source.app || !source.shellWorkspaceLaunch))
return false;
let isWindow = !!source.realWindow;
@@ -856,9 +868,19 @@ var ThumbnailsBox = GObject.registerClass({
if (source.metaWindow.get_monitor() != thumbMonitor)
source.metaWindow.move_to_monitor(thumbMonitor);
source.metaWindow.change_workspace_by_index(newWorkspaceIndex, true);
} else if (source.shellWorkspaceLaunch) {
} else if (source.app && source.app.can_open_new_window()) {
if (source.animateLaunchAtPos)
source.animateLaunchAtPos(actor.x, actor.y);
source.app.open_new_window(newWorkspaceIndex);
} else if (!source.app && source.shellWorkspaceLaunch) {
// While unused in our own drag sources, shellWorkspaceLaunch allows
// extensions to define custom actions for their drag sources.
source.shellWorkspaceLaunch({ workspace: newWorkspaceIndex,
timestamp: time });
}
if (source.app || (!source.app && source.shellWorkspaceLaunch)) {
// This new workspace will be automatically removed if the application fails
// to open its first window within some time, as tracked by Shell.WindowTracker.
// Here, we only add a very brief timeout to avoid the _immediate_ removal of the
@@ -1340,15 +1362,9 @@ var ThumbnailsBox = GObject.registerClass({
}
_activeWorkspaceChanged(_wm, _from, _to, _direction) {
let thumbnail;
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
for (let i = 0; i < this._thumbnails.length; i++) {
if (this._thumbnails[i].metaWorkspace == activeWorkspace) {
thumbnail = this._thumbnails[i];
break;
}
}
let thumbnail = this._thumbnails.find(t => t.metaWorkspace == activeWorkspace);
this._animatingIndicator = true;
let indicatorThemeNode = this._indicator.get_theme_node();

View File

@@ -247,7 +247,7 @@ var WorkspacesView = class extends WorkspacesViewBase {
this.scrollAdjustment.ease(index, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: WORKSPACE_SWITCH_TIME,
onComplete: () => this._animatingScroll = false
onComplete: () => (this._animatingScroll = false)
});
}
@@ -524,6 +524,22 @@ var WorkspacesDisplay = class {
this._keyPressEventId = 0;
this._fullGeometry = null;
this.actor.connect('destroy', this._onDestroy.bind(this));
}
_onDestroy() {
if (this._notifyOpacityId) {
let parent = this.actor.get_parent();
if (parent)
parent.disconnect(this._notifyOpacityId);
this._notifyOpacityId = 0;
}
if (this._parentSetLater) {
Meta.later_remove(this._parentSetLater);
this._parentSetLater = 0;
}
}
_onPan(action) {
@@ -717,7 +733,11 @@ var WorkspacesDisplay = class {
oldParent.disconnect(this._notifyOpacityId);
this._notifyOpacityId = 0;
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
if (this._parentSetLater)
return;
this._parentSetLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this._parentSetLater = 0;
let newParent = this.actor.get_parent();
if (!newParent)
return;

View File

@@ -5,8 +5,6 @@
4,
{
"ignoredNodes": [
"ConditionalExpression",
"CallExpression > ArrowFunctionExpression",
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
],
"CallExpression": { "arguments": "first" },

View File

@@ -1,5 +1,5 @@
project('gnome-shell', 'c',
version: '3.33.91',
version: '3.34.0',
meson_version: '>= 0.47.0',
license: 'GPLv2+'
)
@@ -26,7 +26,7 @@ gio_req = '>= 2.56.0'
gi_req = '>= 1.49.1'
gjs_req = '>= 1.57.3'
gtk_req = '>= 3.15.0'
mutter_req = '>= 3.33.91'
mutter_req = '>= 3.34.0'
polkit_req = '>= 0.100'
schemas_req = '>= 3.33.1'
startup_req = '>= 0.11'

118
po/ca.po
View File

@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: HEAD\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2019-08-21 23:18+0000\n"
"POT-Creation-Date: 2019-09-11 17:13+0000\n"
"PO-Revision-Date: 2019-08-25 21:53+0200\n"
"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
@@ -200,9 +200,9 @@ msgid ""
msgstr ""
"El GNOME Shell us demanarà la contrasenya quan es munti un dispositiu "
"encriptat o un sistema de fitxers remot. Si es pot desar la contrasenya per "
"utilitzar-lo en el futur, es mostrarà la casella de verificació «Recorda la "
"utilitzar-lo en el futur, es mostrarà la casella de selecció «Recorda la "
"contrasenya». Aquesta clau estableix el valor per defecte d'aquesta casella "
"de verificació."
"de selecció."
#: data/org.gnome.shell.gschema.xml.in:96
msgid ""
@@ -470,7 +470,7 @@ msgstr ""
#: js/gdm/authPrompt.js:139 js/ui/audioDeviceSelection.js:53
#: js/ui/components/networkAgent.js:120 js/ui/components/polkitAgent.js:138
#: js/ui/endSessionDialog.js:445 js/ui/extensionDownloader.js:189
#: js/ui/endSessionDialog.js:448 js/ui/extensionDownloader.js:189
#: js/ui/shellMountOperation.js:390 js/ui/shellMountOperation.js:399
#: js/ui/status/network.js:899
msgid "Cancel"
@@ -774,28 +774,32 @@ msgstr "Freqüent"
msgid "All"
msgstr "Totes"
#: js/ui/appDisplay.js:1751
msgid "Rename"
msgstr "Canvia el nom"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2233 js/ui/panel.js:77
#: js/ui/appDisplay.js:2397 js/ui/panel.js:77
msgid "Open Windows"
msgstr "Obre finestres"
#: js/ui/appDisplay.js:2252 js/ui/panel.js:84
#: js/ui/appDisplay.js:2416 js/ui/panel.js:84
msgid "New Window"
msgstr "Finestra nova"
#: js/ui/appDisplay.js:2264
#: js/ui/appDisplay.js:2428
msgid "Launch using Dedicated Graphics Card"
msgstr "Inicia usant una targeta gràfica dedicada"
#: js/ui/appDisplay.js:2293 js/ui/dash.js:240
#: js/ui/appDisplay.js:2457 js/ui/dash.js:240
msgid "Remove from Favorites"
msgstr "Suprimeix dels preferits"
#: js/ui/appDisplay.js:2299
#: js/ui/appDisplay.js:2463
msgid "Add to Favorites"
msgstr "Afegeix als preferits"
#: js/ui/appDisplay.js:2309 js/ui/panel.js:95
#: js/ui/appDisplay.js:2473 js/ui/panel.js:95
msgid "Show Details"
msgstr "Mostra els detalls"
@@ -825,7 +829,7 @@ msgstr "Auriculars"
msgid "Headset"
msgstr "Auriculars amb micròfon"
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:241
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:248
msgid "Microphone"
msgstr "Micròfon"
@@ -1328,13 +1332,13 @@ msgid "Other users are logged in."
msgstr "Altres usuaris tenen la sessió oberta."
#. Translators: Remote here refers to a remote session, like a ssh login
#: js/ui/endSessionDialog.js:647
#: js/ui/endSessionDialog.js:650
#, javascript-format
msgid "%s (remote)"
msgstr "%s (remot)"
#. Translators: Console here refers to a tty like a VT console
#: js/ui/endSessionDialog.js:650
#: js/ui/endSessionDialog.js:653
#, javascript-format
msgid "%s (console)"
msgstr "%s (consola)"
@@ -1412,9 +1416,9 @@ msgid ""
"row. This turns off the Sticky Keys feature, which affects the way your "
"keyboard works."
msgstr ""
"Heu premut dos tecles juntes, o la tecla de majúscules 5 cops seguides. Això "
"desactiva la funcionalitat de les tecles enganxoses, que afecta la manera en "
"què funciona el teclat."
"Heu premut dues tecles juntes, o la tecla de majúscules 5 cops seguides. "
"Això desactiva la funcionalitat de les tecles enganxoses, que afecta la "
"manera en què funciona el teclat."
#: js/ui/kbdA11yDialog.js:58
msgid "Leave On"
@@ -1489,7 +1493,7 @@ msgstr "Mostra el codi font"
msgid "Web Page"
msgstr "Pàgina web"
#: js/ui/messageTray.js:1462
#: js/ui/messageTray.js:1461
msgid "System Information"
msgstr "Informació de l'ordinador"
@@ -1618,7 +1622,7 @@ msgid_plural "%d new notifications"
msgstr[0] "%d notificació nova"
msgstr[1] "%d notificacions noves"
#: js/ui/screenShield.js:444 js/ui/status/system.js:269
#: js/ui/screenShield.js:444 js/ui/status/system.js:260
msgid "Lock"
msgstr "Bloqueja"
@@ -1641,15 +1645,15 @@ msgstr "No es pot blocar"
msgid "Lock was blocked by an application"
msgstr "Una aplicació està bloquejant el bloqueig"
#: js/ui/search.js:647
#: js/ui/search.js:668
msgid "Searching…"
msgstr "S'està cercant…"
#: js/ui/search.js:649
#: js/ui/search.js:670
msgid "No results."
msgstr "No s'ha trobat cap resultat."
#: js/ui/search.js:773
#: js/ui/search.js:794
#, javascript-format
msgid "%d more"
msgid_plural "%d more"
@@ -2134,27 +2138,27 @@ msgstr "Desactiva"
msgid "Airplane Mode On"
msgstr "El mode d'avió és actiu"
#: js/ui/status/system.js:201
#: js/ui/status/system.js:192
msgid "Switch User"
msgstr "Canvia d'usuari"
#: js/ui/status/system.js:213
#: js/ui/status/system.js:204
msgid "Log Out"
msgstr "Surt"
#: js/ui/status/system.js:225
#: js/ui/status/system.js:216
msgid "Account Settings"
msgstr "Paràmetres del compte"
#: js/ui/status/system.js:254
#: js/ui/status/system.js:245
msgid "Orientation Lock"
msgstr "Bloqueja l'orientació"
#: js/ui/status/system.js:280
#: js/ui/status/system.js:271
msgid "Suspend"
msgstr "Atura temporalment"
#: js/ui/status/system.js:290
#: js/ui/status/system.js:281
msgid "Power Off"
msgstr "Apaga"
@@ -2194,11 +2198,11 @@ msgstr "S'ha produït un error d'autorització a Thunderbolt"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "No s'ha pogut autoritzar el dispositiu Thunderbolt: %s"
#: js/ui/status/volume.js:128
#: js/ui/status/volume.js:129
msgid "Volume changed"
msgstr "S'ha canviat el volum"
#: js/ui/status/volume.js:193
#: js/ui/status/volume.js:200
msgid "Volume"
msgstr "Volum"
@@ -2251,22 +2255,22 @@ msgstr "Cerca"
msgid "“%s” is ready"
msgstr "«%s» ja està a punt"
#: js/ui/windowManager.js:54
#: js/ui/windowManager.js:55
msgid "Do you want to keep these display settings?"
msgstr "Voleu mantenir aquesta configuració de la pantalla?"
#. Translators: this and the following message should be limited in length,
#. to avoid ellipsizing the labels.
#.
#: js/ui/windowManager.js:66
#: js/ui/windowManager.js:67
msgid "Revert Settings"
msgstr "Descarta els canvis"
#: js/ui/windowManager.js:69
#: js/ui/windowManager.js:70
msgid "Keep Changes"
msgstr "Mantén els canvis"
#: js/ui/windowManager.js:87
#: js/ui/windowManager.js:88
#, javascript-format
msgid "Settings changes will revert in %d second"
msgid_plural "Settings changes will revert in %d seconds"
@@ -2275,7 +2279,7 @@ msgstr[1] "Es descartaran els canvis d'aquí %d segons"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:683
#: js/ui/windowManager.js:684
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@@ -2367,7 +2371,7 @@ msgid ""
"Description is a single-sentence explanation of what your extension does.\n"
"Examples are: %s"
msgstr ""
"La descripció és una explicació d'una frase del què fa l'extensió.\n"
"La descripció és una explicació d'una frase de què fa l'extensió.\n"
"Per exemple: %s"
#: src/extensions-tool/command-create.c:206 src/extensions-tool/main.c:172
@@ -2587,7 +2591,7 @@ msgstr "Comarca"
msgid "“version” takes no arguments"
msgstr "«version» no té arguments"
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:239
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:243
msgid "Usage:"
msgstr "Ús:"
@@ -2595,80 +2599,80 @@ msgstr "Ús:"
msgid "Print version information and exit."
msgstr "Mostra la informació de la versió i surt."
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:241 src/extensions-tool/main.c:244
msgid "COMMAND"
msgstr "ORDRE"
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:244
msgid "[ARGS…]"
msgstr "[ARGS…]"
#: src/extensions-tool/main.c:242
#: src/extensions-tool/main.c:246
msgid "Commands:"
msgstr "Ordres:"
#: src/extensions-tool/main.c:243
#: src/extensions-tool/main.c:247
msgid "Print help"
msgstr "Mostra l'ajuda"
#: src/extensions-tool/main.c:244 src/main.c:460
#: src/extensions-tool/main.c:248 src/main.c:468
msgid "Print version"
msgstr "Mostra la versió"
#: src/extensions-tool/main.c:245
#: src/extensions-tool/main.c:249
msgid "Enable extension"
msgstr "Habilita l'extensió"
#: src/extensions-tool/main.c:246
#: src/extensions-tool/main.c:250
msgid "Disable extension"
msgstr "Inhabilita l'extensió"
#: src/extensions-tool/main.c:247
#: src/extensions-tool/main.c:251
msgid "Reset extension"
msgstr "Reinicia l'extensió"
#: src/extensions-tool/main.c:248
#: src/extensions-tool/main.c:252
msgid "Uninstall extension"
msgstr "Desinstal·la l'extensió"
#: src/extensions-tool/main.c:249
#: src/extensions-tool/main.c:253
msgid "List extensions"
msgstr "Llista les extensions"
#: src/extensions-tool/main.c:250 src/extensions-tool/main.c:251
#: src/extensions-tool/main.c:254 src/extensions-tool/main.c:255
msgid "Show extension info"
msgstr "Mostra la informació de l'extensió"
#: src/extensions-tool/main.c:252
#: src/extensions-tool/main.c:256
msgid "Open extension preferences"
msgstr "Obre les preferències de l'extensió"
#: src/extensions-tool/main.c:253
#: src/extensions-tool/main.c:257
msgid "Create extension"
msgstr "Crea extensió"
#: src/extensions-tool/main.c:254
#: src/extensions-tool/main.c:258
msgid "Package extension"
msgstr "Paquet d'extensió"
#: src/extensions-tool/main.c:255
#: src/extensions-tool/main.c:259
msgid "Install extension bundle"
msgstr "Instal·la un paquet d'extensió"
#: src/extensions-tool/main.c:257
#: src/extensions-tool/main.c:261
#, c-format
msgid "Use %s to get detailed help.\n"
msgstr "Feu servir %s per obtenir ajuda detallada.\n"
msgid "Use %s to get detailed help.\n"
msgstr "Feu servir «%s» per obtenir ajuda detallada.\n"
#: src/main.c:466
#: src/main.c:474
msgid "Mode used by GDM for login screen"
msgstr "El mode que utilitzarà el GDM per a la pantalla d'entrada"
#: src/main.c:472
#: src/main.c:480
msgid "Use a specific mode, e.g. “gdm” for login screen"
msgstr "Utilitza un mode específic, p. ex. «gdm» per la pantalla d'entrada"
#: src/main.c:478
#: src/main.c:486
msgid "List possible modes"
msgstr "Llista els modes possibles"

1325
po/cs.po

File diff suppressed because it is too large Load Diff

108
po/de.po
View File

@@ -22,9 +22,9 @@ 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: 2019-08-21 23:18+0000\n"
"PO-Revision-Date: 2019-08-23 21:09+0200\n"
"Last-Translator: Tim Sabsch <tim@sabsch.com>\n"
"POT-Creation-Date: 2019-09-11 17:13+0000\n"
"PO-Revision-Date: 2019-09-11 23:14+0200\n"
"Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n"
"Language-Team: Deutsch <gnome-de@gnome.org>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
@@ -475,7 +475,7 @@ msgstr ""
#: js/gdm/authPrompt.js:139 js/ui/audioDeviceSelection.js:53
#: js/ui/components/networkAgent.js:120 js/ui/components/polkitAgent.js:138
#: js/ui/endSessionDialog.js:445 js/ui/extensionDownloader.js:189
#: js/ui/endSessionDialog.js:448 js/ui/extensionDownloader.js:189
#: js/ui/shellMountOperation.js:390 js/ui/shellMountOperation.js:399
#: js/ui/status/network.js:899
msgid "Cancel"
@@ -779,29 +779,33 @@ msgstr "Häufig"
msgid "All"
msgstr "Alle"
#: js/ui/appDisplay.js:1751
msgid "Rename"
msgstr "Umbenennen"
# Fensterüberschrift
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2233 js/ui/panel.js:77
#: js/ui/appDisplay.js:2397 js/ui/panel.js:77
msgid "Open Windows"
msgstr "Offene Fenster"
#: js/ui/appDisplay.js:2252 js/ui/panel.js:84
#: js/ui/appDisplay.js:2416 js/ui/panel.js:84
msgid "New Window"
msgstr "Neues Fenster"
#: js/ui/appDisplay.js:2264
#: js/ui/appDisplay.js:2428
msgid "Launch using Dedicated Graphics Card"
msgstr "Mit dedizierter Grafikkarte starten"
#: js/ui/appDisplay.js:2293 js/ui/dash.js:240
#: js/ui/appDisplay.js:2457 js/ui/dash.js:240
msgid "Remove from Favorites"
msgstr "Aus Favoriten entfernen"
#: js/ui/appDisplay.js:2299
#: js/ui/appDisplay.js:2463
msgid "Add to Favorites"
msgstr "Zu Favoriten hinzufügen"
#: js/ui/appDisplay.js:2309 js/ui/panel.js:95
#: js/ui/appDisplay.js:2473 js/ui/panel.js:95
msgid "Show Details"
msgstr "Details anzeigen"
@@ -831,7 +835,7 @@ msgstr "Kopfhörer"
msgid "Headset"
msgstr "Headset"
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:241
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:248
msgid "Microphone"
msgstr "Mikrofon"
@@ -1336,13 +1340,13 @@ msgid "Other users are logged in."
msgstr "Andere Benutzer sind angemeldet."
#. Translators: Remote here refers to a remote session, like a ssh login
#: js/ui/endSessionDialog.js:647
#: js/ui/endSessionDialog.js:650
#, javascript-format
msgid "%s (remote)"
msgstr "%s (Entfernt)"
#. Translators: Console here refers to a tty like a VT console
#: js/ui/endSessionDialog.js:650
#: js/ui/endSessionDialog.js:653
#, javascript-format
msgid "%s (console)"
msgstr "%s (Konsole)"
@@ -1497,7 +1501,7 @@ msgstr "Quelle zeigen"
msgid "Web Page"
msgstr "Webseite"
#: js/ui/messageTray.js:1462
#: js/ui/messageTray.js:1461
msgid "System Information"
msgstr "Systeminformationen"
@@ -1629,7 +1633,7 @@ msgid_plural "%d new notifications"
msgstr[0] "%d neue Benachrichtigung"
msgstr[1] "%d neue Benachrichtigungen"
#: js/ui/screenShield.js:444 js/ui/status/system.js:269
#: js/ui/screenShield.js:444 js/ui/status/system.js:260
msgid "Lock"
msgstr "Sperren"
@@ -1652,15 +1656,15 @@ msgstr "Sperrung fehlgeschlagen"
msgid "Lock was blocked by an application"
msgstr "Sperrung wurde von einer Anwendung blockiert"
#: js/ui/search.js:647
#: js/ui/search.js:668
msgid "Searching…"
msgstr "Suche läuft …"
#: js/ui/search.js:649
#: js/ui/search.js:670
msgid "No results."
msgstr "Keine Ergebnisse."
#: js/ui/search.js:773
#: js/ui/search.js:794
#, javascript-format
msgid "%d more"
msgid_plural "%d more"
@@ -2153,27 +2157,27 @@ msgstr "Ausschalten"
msgid "Airplane Mode On"
msgstr "Flugmodus ist eingeschaltet"
#: js/ui/status/system.js:201
#: js/ui/status/system.js:192
msgid "Switch User"
msgstr "Benutzer wechseln"
#: js/ui/status/system.js:213
#: js/ui/status/system.js:204
msgid "Log Out"
msgstr "Abmelden"
#: js/ui/status/system.js:225
#: js/ui/status/system.js:216
msgid "Account Settings"
msgstr "Kontoeinstellungen"
#: js/ui/status/system.js:254
#: js/ui/status/system.js:245
msgid "Orientation Lock"
msgstr "Hoch-/Querformats-Fixierung"
#: js/ui/status/system.js:280
#: js/ui/status/system.js:271
msgid "Suspend"
msgstr "Bereitschaft"
#: js/ui/status/system.js:290
#: js/ui/status/system.js:281
msgid "Power Off"
msgstr "Ausschalten"
@@ -2213,11 +2217,11 @@ msgstr "Thunderbolt-Legitimierungsfehler"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "Das Thunderbolt-Gerät %s konnte nicht legitimiert werden"
#: js/ui/status/volume.js:128
#: js/ui/status/volume.js:129
msgid "Volume changed"
msgstr "Lautstärke geändert"
#: js/ui/status/volume.js:193
#: js/ui/status/volume.js:200
msgid "Volume"
msgstr "Lautstärke"
@@ -2270,22 +2274,22 @@ msgstr "Suchen"
msgid "“%s” is ready"
msgstr "»%s« ist bereit"
#: js/ui/windowManager.js:54
#: js/ui/windowManager.js:55
msgid "Do you want to keep these display settings?"
msgstr "Wollen Sie diese Anzeigeeinstellungen beibehalten?"
#. Translators: this and the following message should be limited in length,
#. to avoid ellipsizing the labels.
#.
#: js/ui/windowManager.js:66
#: js/ui/windowManager.js:67
msgid "Revert Settings"
msgstr "Zurücksetzen"
#: js/ui/windowManager.js:69
#: js/ui/windowManager.js:70
msgid "Keep Changes"
msgstr "Beibehalten"
#: js/ui/windowManager.js:87
#: js/ui/windowManager.js:88
#, javascript-format
msgid "Settings changes will revert in %d second"
msgid_plural "Settings changes will revert in %d seconds"
@@ -2295,7 +2299,7 @@ msgstr[1] ""
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:683
#: js/ui/windowManager.js:684
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@@ -2609,7 +2613,7 @@ msgstr "Status"
msgid "“version” takes no arguments"
msgstr "»version« akzeptiert keine Argumente"
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:239
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:243
msgid "Usage:"
msgstr "Aufruf:"
@@ -2617,82 +2621,82 @@ msgstr "Aufruf:"
msgid "Print version information and exit."
msgstr "Versionsinformationen ausgeben und beenden."
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:241 src/extensions-tool/main.c:244
msgid "COMMAND"
msgstr "BEFEHL"
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:244
msgid "[ARGS…]"
msgstr "[ARGUMENTE …]"
#: src/extensions-tool/main.c:242
#: src/extensions-tool/main.c:246
msgid "Commands:"
msgstr "Befehle:"
#: src/extensions-tool/main.c:243
#: src/extensions-tool/main.c:247
msgid "Print help"
msgstr "Hilfe ausgeben"
#: src/extensions-tool/main.c:244 src/main.c:460
#: src/extensions-tool/main.c:248 src/main.c:468
msgid "Print version"
msgstr "Version ausgeben"
#: src/extensions-tool/main.c:245
#: src/extensions-tool/main.c:249
msgid "Enable extension"
msgstr "Erweiterung aktivieren"
#: src/extensions-tool/main.c:246
#: src/extensions-tool/main.c:250
msgid "Disable extension"
msgstr "Erweiterung deaktivieren"
#: src/extensions-tool/main.c:247
#: src/extensions-tool/main.c:251
msgid "Reset extension"
msgstr "Erweiterung zurücksetzen"
#: src/extensions-tool/main.c:248
#: src/extensions-tool/main.c:252
msgid "Uninstall extension"
msgstr "Erweiterung deinstallieren"
#: src/extensions-tool/main.c:249
#: src/extensions-tool/main.c:253
msgid "List extensions"
msgstr "Erweiterungen auflisten"
#: src/extensions-tool/main.c:250 src/extensions-tool/main.c:251
#: src/extensions-tool/main.c:254 src/extensions-tool/main.c:255
msgid "Show extension info"
msgstr "Erweiterungsinformationen anzeigen"
#: src/extensions-tool/main.c:252
#: src/extensions-tool/main.c:256
msgid "Open extension preferences"
msgstr "Erweiterungseinstellungen öffnen"
#: src/extensions-tool/main.c:253
#: src/extensions-tool/main.c:257
msgid "Create extension"
msgstr "Erweiterung erstellen"
#: src/extensions-tool/main.c:254
#: src/extensions-tool/main.c:258
msgid "Package extension"
msgstr "Paket-Erweiterung"
#: src/extensions-tool/main.c:255
#: src/extensions-tool/main.c:259
msgid "Install extension bundle"
msgstr "Erweiterungspaket installieren"
#: src/extensions-tool/main.c:257
#: src/extensions-tool/main.c:261
#, c-format
msgid "Use %s to get detailed help.\n"
msgid "Use %s to get detailed help.\n"
msgstr "Verwenden Sie »%s«, um detaillierte Hilfe zu erhalten.\n"
#: src/main.c:466
#: src/main.c:474
msgid "Mode used by GDM for login screen"
msgstr "Der durch GDM im Anmeldefenster verwendete Modus"
#: src/main.c:472
#: src/main.c:480
msgid "Use a specific mode, e.g. “gdm” for login screen"
msgstr ""
"Verwenden Sie einen spezifischen Modus wie z.B. »gdm« für den "
"Anmeldebildschirm"
#: src/main.c:478
#: src/main.c:486
msgid "List possible modes"
msgstr "Die möglichen Modi auflisten"

1781
po/el.po

File diff suppressed because it is too large Load Diff

1294
po/eo.po

File diff suppressed because it is too large Load Diff

113
po/es.po
View File

@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell.master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2019-08-22 13:06+0000\n"
"PO-Revision-Date: 2019-08-26 12:25+0200\n"
"POT-Creation-Date: 2019-09-11 17:13+0000\n"
"PO-Revision-Date: 2019-09-13 08:26+0200\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: Spanish - Spain <gnome-es-list@gnome.org>\n"
"Language: es_ES\n"
@@ -465,7 +465,7 @@ msgstr ""
#: js/gdm/authPrompt.js:139 js/ui/audioDeviceSelection.js:53
#: js/ui/components/networkAgent.js:120 js/ui/components/polkitAgent.js:138
#: js/ui/endSessionDialog.js:445 js/ui/extensionDownloader.js:189
#: js/ui/endSessionDialog.js:448 js/ui/extensionDownloader.js:189
#: js/ui/shellMountOperation.js:390 js/ui/shellMountOperation.js:399
#: js/ui/status/network.js:899
msgid "Cancel"
@@ -768,28 +768,32 @@ msgstr "Frecuentes"
msgid "All"
msgstr "Todas"
#: js/ui/appDisplay.js:1751
msgid "Rename"
msgstr "Renombrar"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2233 js/ui/panel.js:77
#: js/ui/appDisplay.js:2397 js/ui/panel.js:77
msgid "Open Windows"
msgstr "Ventanas abiertas"
#: js/ui/appDisplay.js:2252 js/ui/panel.js:84
#: js/ui/appDisplay.js:2416 js/ui/panel.js:84
msgid "New Window"
msgstr "Ventana nueva"
#: js/ui/appDisplay.js:2264
#: js/ui/appDisplay.js:2428
msgid "Launch using Dedicated Graphics Card"
msgstr "Lanzar usando la tarjeta gráfica dedicada"
#: js/ui/appDisplay.js:2293 js/ui/dash.js:240
#: js/ui/appDisplay.js:2457 js/ui/dash.js:240
msgid "Remove from Favorites"
msgstr "Quitar de los favoritos"
#: js/ui/appDisplay.js:2299
#: js/ui/appDisplay.js:2463
msgid "Add to Favorites"
msgstr "Añadir a los favoritos"
#: js/ui/appDisplay.js:2309 js/ui/panel.js:95
#: js/ui/appDisplay.js:2473 js/ui/panel.js:95
msgid "Show Details"
msgstr "Mostrar detalles"
@@ -819,7 +823,7 @@ msgstr "Auriculares"
msgid "Headset"
msgstr "Manos libres"
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:241
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:248
msgid "Microphone"
msgstr "Micrófono"
@@ -1319,13 +1323,13 @@ msgid "Other users are logged in."
msgstr "Hay otros usuarios con la sesión iniciada."
#. Translators: Remote here refers to a remote session, like a ssh login
#: js/ui/endSessionDialog.js:647
#: js/ui/endSessionDialog.js:650
#, javascript-format
msgid "%s (remote)"
msgstr "%s (remoto)"
#. Translators: Console here refers to a tty like a VT console
#: js/ui/endSessionDialog.js:650
#: js/ui/endSessionDialog.js:653
#, javascript-format
msgid "%s (console)"
msgstr "%s (consola)"
@@ -1480,7 +1484,7 @@ msgstr "Ver fuente"
msgid "Web Page"
msgstr "Página web"
#: js/ui/messageTray.js:1462
#: js/ui/messageTray.js:1461
msgid "System Information"
msgstr "Información del sistema"
@@ -1609,7 +1613,7 @@ msgid_plural "%d new notifications"
msgstr[0] "%d notificación nueva"
msgstr[1] "%d notificaciones nuevas"
#: js/ui/screenShield.js:444 js/ui/status/system.js:269
#: js/ui/screenShield.js:444 js/ui/status/system.js:260
msgid "Lock"
msgstr "Bloquear"
@@ -1632,15 +1636,15 @@ msgstr "No se pudo bloquear"
msgid "Lock was blocked by an application"
msgstr "Una aplicación impidió el bloqueo"
#: js/ui/search.js:647
#: js/ui/search.js:668
msgid "Searching…"
msgstr "Buscando…"
#: js/ui/search.js:649
#: js/ui/search.js:670
msgid "No results."
msgstr "No se encontraron resultados."
#: js/ui/search.js:773
#: js/ui/search.js:794
#, javascript-format
msgid "%d more"
msgid_plural "%d more"
@@ -2125,27 +2129,27 @@ msgstr "Apagar"
msgid "Airplane Mode On"
msgstr "Modo avión activado"
#: js/ui/status/system.js:201
#: js/ui/status/system.js:192
msgid "Switch User"
msgstr "Cambiar de usuario"
#: js/ui/status/system.js:213
#: js/ui/status/system.js:204
msgid "Log Out"
msgstr "Cerrar la sesión"
#: js/ui/status/system.js:225
#: js/ui/status/system.js:216
msgid "Account Settings"
msgstr "Configuración de la cuenta"
#: js/ui/status/system.js:254
#: js/ui/status/system.js:245
msgid "Orientation Lock"
msgstr "Bloqueo de orientación"
#: js/ui/status/system.js:280
#: js/ui/status/system.js:271
msgid "Suspend"
msgstr "Suspender"
#: js/ui/status/system.js:290
#: js/ui/status/system.js:281
msgid "Power Off"
msgstr "Apagar"
@@ -2184,11 +2188,11 @@ msgstr "Error de autorización de Thunderbolt"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "No se pudo autorizar el dispositivo Thunderbolt: %s"
#: js/ui/status/volume.js:128
#: js/ui/status/volume.js:129
msgid "Volume changed"
msgstr "Volumen modificado"
#: js/ui/status/volume.js:193
#: js/ui/status/volume.js:200
msgid "Volume"
msgstr "Volumen"
@@ -2241,22 +2245,22 @@ msgstr "Buscar"
msgid "“%s” is ready"
msgstr "«%s» está preparado"
#: js/ui/windowManager.js:54
#: js/ui/windowManager.js:55
msgid "Do you want to keep these display settings?"
msgstr "¿Quiere mantener esta configuración de la pantalla?"
#. Translators: this and the following message should be limited in length,
#. to avoid ellipsizing the labels.
#.
#: js/ui/windowManager.js:66
#: js/ui/windowManager.js:67
msgid "Revert Settings"
msgstr "Revertir configuración"
#: js/ui/windowManager.js:69
#: js/ui/windowManager.js:70
msgid "Keep Changes"
msgstr "Mantener cambios"
#: js/ui/windowManager.js:87
#: js/ui/windowManager.js:88
#, javascript-format
msgid "Settings changes will revert in %d second"
msgid_plural "Settings changes will revert in %d seconds"
@@ -2265,7 +2269,7 @@ msgstr[1] "La configuración se revertirá en %d segundos"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:683
#: js/ui/windowManager.js:684
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@@ -2450,12 +2454,10 @@ msgid "EXTENSION_BUNDLE"
msgstr "EXTENSION_BUNDLE"
#: src/extensions-tool/command-install.c:184
#| msgid "UUIDs of extensions to enable"
msgid "Install an extension bundle"
msgstr "Instalar un conjunto de extensiones"
#: src/extensions-tool/command-install.c:201
#| msgid "No extensions installed"
msgid "No extension bundle specified"
msgstr "No se ha especificado un conjunto de extensiones"
@@ -2580,7 +2582,7 @@ msgstr "Estado"
msgid "“version” takes no arguments"
msgstr "«version» no lleva argumentos"
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:239
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:243
msgid "Usage:"
msgstr "Uso:"
@@ -2588,84 +2590,83 @@ msgstr "Uso:"
msgid "Print version information and exit."
msgstr "Mostrar información de la versión y salir."
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:241 src/extensions-tool/main.c:244
msgid "COMMAND"
msgstr "COMANDO"
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:244
msgid "[ARGS…]"
msgstr "[ARGS…]"
#: src/extensions-tool/main.c:242
#: src/extensions-tool/main.c:246
msgid "Commands:"
msgstr "Comandos:"
#: src/extensions-tool/main.c:243
#: src/extensions-tool/main.c:247
msgid "Print help"
msgstr "Mostrar ayuda"
#: src/extensions-tool/main.c:244 src/main.c:460
#: src/extensions-tool/main.c:248 src/main.c:468
msgid "Print version"
msgstr "Imprimir versión"
#: src/extensions-tool/main.c:245
#: src/extensions-tool/main.c:249
msgid "Enable extension"
msgstr "Activar extensión"
#: src/extensions-tool/main.c:246
#: src/extensions-tool/main.c:250
msgid "Disable extension"
msgstr "Desactivar extensión"
#: src/extensions-tool/main.c:247
#: src/extensions-tool/main.c:251
msgid "Reset extension"
msgstr "Restablecer extensión"
#: src/extensions-tool/main.c:248
#: src/extensions-tool/main.c:252
msgid "Uninstall extension"
msgstr "Desinstalar extensión"
#: src/extensions-tool/main.c:249
#: src/extensions-tool/main.c:253
msgid "List extensions"
msgstr "Listar extensiones"
#: src/extensions-tool/main.c:250 src/extensions-tool/main.c:251
#: src/extensions-tool/main.c:254 src/extensions-tool/main.c:255
msgid "Show extension info"
msgstr "Mostrar información de la extensión"
#: src/extensions-tool/main.c:252
#: src/extensions-tool/main.c:256
msgid "Open extension preferences"
msgstr "Abrir las preferencias de la extensión"
#: src/extensions-tool/main.c:253
#: src/extensions-tool/main.c:257
msgid "Create extension"
msgstr "Crear extensión"
#: src/extensions-tool/main.c:254
#| msgid "Extension"
#: src/extensions-tool/main.c:258
msgid "Package extension"
msgstr "Extensión del paquete"
#: src/extensions-tool/main.c:255
#| msgid "UUIDs of extensions to enable"
#: src/extensions-tool/main.c:259
msgid "Install extension bundle"
msgstr "Instalar conjunto de extensiones"
#: src/extensions-tool/main.c:257
#: src/extensions-tool/main.c:261
#, c-format
msgid "Use %s to get detailed help.\n"
msgstr "Use %s para obtener ayuda detallada.\n"
#| msgid "Use %s to get detailed help.\n"
msgid "Use %s” to get detailed help.\n"
msgstr "Use «%s» para obtener ayuda detallada.\n"
#: src/main.c:466
#: src/main.c:474
msgid "Mode used by GDM for login screen"
msgstr "Modo usado por GDM para la pantalla de inicio"
#: src/main.c:472
#: src/main.c:480
msgid "Use a specific mode, e.g. “gdm” for login screen"
msgstr ""
"Usar un modo específico, por ejemplo, «gdm» para la pantalla de inicio de "
"sesión"
#: src/main.c:478
#: src/main.c:486
msgid "List possible modes"
msgstr "Listar los modos posibles"

106
po/fa.po
View File

@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2019-08-21 23:18+0000\n"
"PO-Revision-Date: 2019-08-22 16:40+0430\n"
"POT-Creation-Date: 2019-09-11 17:13+0000\n"
"PO-Revision-Date: 2019-09-12 12:26+0000\n"
"Last-Translator: Danial Behzadi <dani.behzi@ubuntu.com>\n"
"Language-Team: Persian <>\n"
"Language: fa\n"
@@ -430,7 +430,7 @@ msgstr ""
#: js/gdm/authPrompt.js:139 js/ui/audioDeviceSelection.js:53
#: js/ui/components/networkAgent.js:120 js/ui/components/polkitAgent.js:138
#: js/ui/endSessionDialog.js:445 js/ui/extensionDownloader.js:189
#: js/ui/endSessionDialog.js:448 js/ui/extensionDownloader.js:189
#: js/ui/shellMountOperation.js:390 js/ui/shellMountOperation.js:399
#: js/ui/status/network.js:899
msgid "Cancel"
@@ -733,28 +733,32 @@ msgstr "پُراستفاده"
msgid "All"
msgstr "همه"
#: js/ui/appDisplay.js:1751
msgid "Rename"
msgstr "تغییر نام"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2233 js/ui/panel.js:77
#: js/ui/appDisplay.js:2397 js/ui/panel.js:77
msgid "Open Windows"
msgstr "گشودن پنجره‌‌ها"
#: js/ui/appDisplay.js:2252 js/ui/panel.js:84
#: js/ui/appDisplay.js:2416 js/ui/panel.js:84
msgid "New Window"
msgstr "پنجرهٔ جدید"
#: js/ui/appDisplay.js:2264
#: js/ui/appDisplay.js:2428
msgid "Launch using Dedicated Graphics Card"
msgstr "اجرا با کارت گرافیک اختصاصی"
#: js/ui/appDisplay.js:2293 js/ui/dash.js:240
#: js/ui/appDisplay.js:2457 js/ui/dash.js:240
msgid "Remove from Favorites"
msgstr "حذف از مورد پسندها"
#: js/ui/appDisplay.js:2299
#: js/ui/appDisplay.js:2463
msgid "Add to Favorites"
msgstr "اضافه کردن به مورد پسندها"
#: js/ui/appDisplay.js:2309 js/ui/panel.js:95
#: js/ui/appDisplay.js:2473 js/ui/panel.js:95
msgid "Show Details"
msgstr "نمایش جزئیات"
@@ -784,7 +788,7 @@ msgstr "هدفون‌ها"
msgid "Headset"
msgstr "هدست"
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:241
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:248
msgid "Microphone"
msgstr "میکروفون"
@@ -1277,13 +1281,13 @@ msgid "Other users are logged in."
msgstr "کاربران دیگر وارد سامانه هستند."
#. Translators: Remote here refers to a remote session, like a ssh login
#: js/ui/endSessionDialog.js:647
#: js/ui/endSessionDialog.js:650
#, javascript-format
msgid "%s (remote)"
msgstr "%s (دوردست)"
#. Translators: Console here refers to a tty like a VT console
#: js/ui/endSessionDialog.js:650
#: js/ui/endSessionDialog.js:653
#, javascript-format
msgid "%s (console)"
msgstr "%s (پایانه)"
@@ -1434,7 +1438,7 @@ msgstr "نمایش منبع"
msgid "Web Page"
msgstr "صفحهٔ وب"
#: js/ui/messageTray.js:1462
#: js/ui/messageTray.js:1461
msgid "System Information"
msgstr "اطلاعات سامانه"
@@ -1563,7 +1567,7 @@ msgid_plural "%d new notifications"
msgstr[0] "%Id آگاهی جدید"
msgstr[1] "%Id آگاهی جدید"
#: js/ui/screenShield.js:444 js/ui/status/system.js:269
#: js/ui/screenShield.js:444 js/ui/status/system.js:260
msgid "Lock"
msgstr "قفل کردن"
@@ -1586,15 +1590,15 @@ msgstr "نمی‌توان قفل کرد"
msgid "Lock was blocked by an application"
msgstr "قفل توسط یک برنامه مسدود شده بود"
#: js/ui/search.js:647
#: js/ui/search.js:668
msgid "Searching…"
msgstr "درحال حستجو…"
#: js/ui/search.js:649
#: js/ui/search.js:670
msgid "No results."
msgstr "بدون نتیجه."
#: js/ui/search.js:773
#: js/ui/search.js:794
#, javascript-format
msgid "%d more"
msgid_plural "%d more"
@@ -2076,27 +2080,27 @@ msgstr "خاموش کردن"
msgid "Airplane Mode On"
msgstr "حالت هواپیمایی روشن است"
#: js/ui/status/system.js:201
#: js/ui/status/system.js:192
msgid "Switch User"
msgstr "تعویض کاربر"
#: js/ui/status/system.js:213
#: js/ui/status/system.js:204
msgid "Log Out"
msgstr "خروج"
#: js/ui/status/system.js:225
#: js/ui/status/system.js:216
msgid "Account Settings"
msgstr "تنظیمات حساب"
#: js/ui/status/system.js:254
#: js/ui/status/system.js:245
msgid "Orientation Lock"
msgstr "قفل جهت"
#: js/ui/status/system.js:280
#: js/ui/status/system.js:271
msgid "Suspend"
msgstr "تعلیق"
#: js/ui/status/system.js:290
#: js/ui/status/system.js:281
msgid "Power Off"
msgstr "خاموش کردن"
@@ -2133,11 +2137,11 @@ msgstr "خطای تأیید هویت تاندربولت"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "نمی‌توان افزارهٔ تاندربولت را تأیید هویت کرد: %s"
#: js/ui/status/volume.js:128
#: js/ui/status/volume.js:129
msgid "Volume changed"
msgstr "بلندی صدا تغییر کرد"
#: js/ui/status/volume.js:193
#: js/ui/status/volume.js:200
msgid "Volume"
msgstr "بلندی صدا"
@@ -2190,22 +2194,22 @@ msgstr "جستجو"
msgid "“%s” is ready"
msgstr "«%s» آماده است"
#: js/ui/windowManager.js:54
#: js/ui/windowManager.js:55
msgid "Do you want to keep these display settings?"
msgstr "آیا می‌خواهید تنظیمات تصویر را نگاه دارید؟"
#. Translators: this and the following message should be limited in length,
#. to avoid ellipsizing the labels.
#.
#: js/ui/windowManager.js:66
#: js/ui/windowManager.js:67
msgid "Revert Settings"
msgstr "بازنشانی تنظیمات"
#: js/ui/windowManager.js:69
#: js/ui/windowManager.js:70
msgid "Keep Changes"
msgstr "ذخیره تغییرات"
#: js/ui/windowManager.js:87
#: js/ui/windowManager.js:88
#, javascript-format
msgid "Settings changes will revert in %d second"
msgid_plural "Settings changes will revert in %d seconds"
@@ -2214,7 +2218,7 @@ msgstr[1] "تغییرات تنظیمات در %Id ثانیه بازنشانی م
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:683
#: js/ui/windowManager.js:684
#, javascript-format
msgid "%d × %d"
msgstr "%Id × %Id"
@@ -2518,7 +2522,7 @@ msgstr "وضعیت"
msgid "“version” takes no arguments"
msgstr "«نگارش» آرگومانی نمی‌گیرد"
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:239
#: src/extensions-tool/main.c:223 src/extensions-tool/main.c:243
msgid "Usage:"
msgstr "استفاده:"
@@ -2526,80 +2530,80 @@ msgstr "استفاده:"
msgid "Print version information and exit."
msgstr "چاپ اطّلاعات نگارش و خروج."
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:241 src/extensions-tool/main.c:244
msgid "COMMAND"
msgstr "COMMAND"
#: src/extensions-tool/main.c:240
#: src/extensions-tool/main.c:244
msgid "[ARGS…]"
msgstr "[ARGS…]"
#: src/extensions-tool/main.c:242
#: src/extensions-tool/main.c:246
msgid "Commands:"
msgstr "دستورات:"
#: src/extensions-tool/main.c:243
#: src/extensions-tool/main.c:247
msgid "Print help"
msgstr "چاپ راهنما"
#: src/extensions-tool/main.c:244 src/main.c:460
#: src/extensions-tool/main.c:248 src/main.c:468
msgid "Print version"
msgstr "چاپ نسخه"
#: src/extensions-tool/main.c:245
#: src/extensions-tool/main.c:249
msgid "Enable extension"
msgstr "فعّال کردن افزونه"
#: src/extensions-tool/main.c:246
#: src/extensions-tool/main.c:250
msgid "Disable extension"
msgstr "غیرفعّال کردن افزونه"
#: src/extensions-tool/main.c:247
#: src/extensions-tool/main.c:251
msgid "Reset extension"
msgstr "بازنشانی افزونه"
#: src/extensions-tool/main.c:248
#: src/extensions-tool/main.c:252
msgid "Uninstall extension"
msgstr "حذف نصب افزونه"
#: src/extensions-tool/main.c:249
#: src/extensions-tool/main.c:253
msgid "List extensions"
msgstr "فهرست افزونه‌ها"
#: src/extensions-tool/main.c:250 src/extensions-tool/main.c:251
#: src/extensions-tool/main.c:254 src/extensions-tool/main.c:255
msgid "Show extension info"
msgstr "نمایش اطّلاعات افزونه"
#: src/extensions-tool/main.c:252
#: src/extensions-tool/main.c:256
msgid "Open extension preferences"
msgstr "گشودن ترجیحات افزونه"
#: src/extensions-tool/main.c:253
#: src/extensions-tool/main.c:257
msgid "Create extension"
msgstr "ایجاد افزونه"
#: src/extensions-tool/main.c:254
#: src/extensions-tool/main.c:258
msgid "Package extension"
msgstr "بسته‌بندی افزونه"
#: src/extensions-tool/main.c:255
#: src/extensions-tool/main.c:259
msgid "Install extension bundle"
msgstr "نصب دستهٔ افزونه"
#: src/extensions-tool/main.c:257
#: src/extensions-tool/main.c:261
#, c-format
msgid "Use %s to get detailed help.\n"
msgid "Use %s to get detailed help.\n"
msgstr "برای گرفتن راهنمای با جزییات از %s استفاده کنید.\n"
#: src/main.c:466
#: src/main.c:474
msgid "Mode used by GDM for login screen"
msgstr "حالت استفاده شده توسط GDM برای صفحه ورود به سامانه"
#: src/main.c:472
#: src/main.c:480
msgid "Use a specific mode, e.g. “gdm” for login screen"
msgstr "استفاده از یک حالت مشخص، مثلاً gdm برای صفحهٔ ورود"
#: src/main.c:478
#: src/main.c:486
msgid "List possible modes"
msgstr "فهرست کردن حالت‌های ممکن"

View File

@@ -25,8 +25,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: 2019-08-21 23:18+0000\n"
"PO-Revision-Date: 2019-08-22 19:36+0300\n"
"POT-Creation-Date: 2019-09-09 20:24+0000\n"
"PO-Revision-Date: 2019-09-10 14:10+0300\n"
"Last-Translator: Jiri Grönroos <jiri.gronroos+l10n@iki.fi>\n"
"Language-Team: suomi <lokalisointi-lista@googlegroups.com>\n"
"Language: fi\n"
@@ -34,7 +34,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.6\n"
"X-Generator: Poedit 2.2.3\n"
"X-DamnedLies-Scope: partial\n"
"X-Project-Style: gnome\n"
"X-POT-Import-Date: 2012-03-05 15:06:10+0000\n"
@@ -486,7 +486,7 @@ msgstr ""
#: js/gdm/authPrompt.js:139 js/ui/audioDeviceSelection.js:53
#: js/ui/components/networkAgent.js:120 js/ui/components/polkitAgent.js:138
#: js/ui/endSessionDialog.js:445 js/ui/extensionDownloader.js:189
#: js/ui/endSessionDialog.js:448 js/ui/extensionDownloader.js:189
#: js/ui/shellMountOperation.js:390 js/ui/shellMountOperation.js:399
#: js/ui/status/network.js:899
msgid "Cancel"
@@ -789,28 +789,32 @@ msgstr "Käytetyimmät"
msgid "All"
msgstr "Kaikki"
#: js/ui/appDisplay.js:1751
msgid "Rename"
msgstr "Nimeä uudelleen"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:2233 js/ui/panel.js:77
#: js/ui/appDisplay.js:2397 js/ui/panel.js:77
msgid "Open Windows"
msgstr "Avoimet ikkunat"
#: js/ui/appDisplay.js:2252 js/ui/panel.js:84
#: js/ui/appDisplay.js:2416 js/ui/panel.js:84
msgid "New Window"
msgstr "Uusi ikkuna"
#: js/ui/appDisplay.js:2264
#: js/ui/appDisplay.js:2428
msgid "Launch using Dedicated Graphics Card"
msgstr "Käynnistä erillisnäytönohjainta käyttäen"
#: js/ui/appDisplay.js:2293 js/ui/dash.js:240
#: js/ui/appDisplay.js:2457 js/ui/dash.js:240
msgid "Remove from Favorites"
msgstr "Poista suosikeista"
#: js/ui/appDisplay.js:2299
#: js/ui/appDisplay.js:2463
msgid "Add to Favorites"
msgstr "Lisää suosikkeihin"
#: js/ui/appDisplay.js:2309 js/ui/panel.js:95
#: js/ui/appDisplay.js:2473 js/ui/panel.js:95
msgid "Show Details"
msgstr "Näytä tiedot"
@@ -840,7 +844,7 @@ msgstr "Kuulokkeet"
msgid "Headset"
msgstr "Headset-kuulokkeet"
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:241
#: js/ui/audioDeviceSelection.js:64 js/ui/status/volume.js:248
msgid "Microphone"
msgstr "Mikrofoni"
@@ -1341,13 +1345,13 @@ msgid "Other users are logged in."
msgstr "Muita käyttäjiä on kirjautuneena."
#. Translators: Remote here refers to a remote session, like a ssh login
#: js/ui/endSessionDialog.js:647
#: js/ui/endSessionDialog.js:650
#, javascript-format
msgid "%s (remote)"
msgstr "%s (etä)"
#. Translators: Console here refers to a tty like a VT console
#: js/ui/endSessionDialog.js:650
#: js/ui/endSessionDialog.js:653
#, javascript-format
msgid "%s (console)"
msgstr "%s (konsoli)"
@@ -1502,7 +1506,7 @@ msgstr "Näytä lähde"
msgid "Web Page"
msgstr "Verkkosivusto"
#: js/ui/messageTray.js:1462
#: js/ui/messageTray.js:1461
msgid "System Information"
msgstr "Järjestelmän tiedot"
@@ -1633,7 +1637,7 @@ msgid_plural "%d new notifications"
msgstr[0] "%d uusi ilmoitus"
msgstr[1] "%d uutta ilmoitusta"
#: js/ui/screenShield.js:444 js/ui/status/system.js:269
#: js/ui/screenShield.js:444 js/ui/status/system.js:260
msgid "Lock"
msgstr "Lukitse"
@@ -1656,15 +1660,15 @@ msgstr "Lukitus epäonnistui"
msgid "Lock was blocked by an application"
msgstr "Lukitus estettiin sovelluksen toimesta"
#: js/ui/search.js:647
#: js/ui/search.js:668
msgid "Searching…"
msgstr "Etsitään…"
#: js/ui/search.js:649
#: js/ui/search.js:670
msgid "No results."
msgstr "Ei tuloksia."
#: js/ui/search.js:773
#: js/ui/search.js:794
#, javascript-format
msgid "%d more"
msgid_plural "%d more"
@@ -2147,27 +2151,27 @@ msgstr "Sammuta"
msgid "Airplane Mode On"
msgstr "Lentokonetila on päällä"
#: js/ui/status/system.js:201
#: js/ui/status/system.js:192
msgid "Switch User"
msgstr "Vaihda käyttäjää"
#: js/ui/status/system.js:213
#: js/ui/status/system.js:204
msgid "Log Out"
msgstr "Kirjaudu ulos"
#: js/ui/status/system.js:225
#: js/ui/status/system.js:216
msgid "Account Settings"
msgstr "Tilin asetukset"
#: js/ui/status/system.js:254
#: js/ui/status/system.js:245
msgid "Orientation Lock"
msgstr "Kiertolukitus"
#: js/ui/status/system.js:280
#: js/ui/status/system.js:271
msgid "Suspend"
msgstr "Valmiustila"
#: js/ui/status/system.js:290
#: js/ui/status/system.js:281
msgid "Power Off"
msgstr "Sammuta"
@@ -2205,11 +2209,11 @@ msgstr "Thunderbolt-valtuutusvirhe"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "Thunderbolt-laitetta ei voitu valtuuttaa: %s"
#: js/ui/status/volume.js:128
#: js/ui/status/volume.js:129
msgid "Volume changed"
msgstr "Äänenvoimakkuutta muutettu"
#: js/ui/status/volume.js:193
#: js/ui/status/volume.js:200
msgid "Volume"
msgstr "Äänenvoimakkuus"
@@ -2262,22 +2266,22 @@ msgstr "Haku"
msgid "“%s” is ready"
msgstr "“%s” on valmis"
#: js/ui/windowManager.js:54
#: js/ui/windowManager.js:55
msgid "Do you want to keep these display settings?"
msgstr "Haluatko säilyttää nämä näyttöasetukset?"
#. Translators: this and the following message should be limited in length,
#. to avoid ellipsizing the labels.
#.
#: js/ui/windowManager.js:66
#: js/ui/windowManager.js:67
msgid "Revert Settings"
msgstr "Palauta asetukset"
#: js/ui/windowManager.js:69
#: js/ui/windowManager.js:70
msgid "Keep Changes"
msgstr "Säilytä muutokset"
#: js/ui/windowManager.js:87
#: js/ui/windowManager.js:88
#, javascript-format
msgid "Settings changes will revert in %d second"
msgid_plural "Settings changes will revert in %d seconds"
@@ -2286,7 +2290,7 @@ msgstr[1] "Asetusmuutokset palautetaan %d sekunnissa"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:683
#: js/ui/windowManager.js:684
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@@ -2623,7 +2627,7 @@ msgstr "Komennot:"
msgid "Print help"
msgstr "Tulosta ohje"
#: src/extensions-tool/main.c:244 src/main.c:460
#: src/extensions-tool/main.c:244 src/main.c:468
msgid "Print version"
msgstr "Tulosta versio"
@@ -2674,15 +2678,15 @@ msgstr "Asenna laajennuspaketti"
msgid "Use %s to get detailed help.\n"
msgstr "Suorita %s nähdäksesi yksityiskohtaisia ohjeita.\n"
#: src/main.c:466
#: src/main.c:474
msgid "Mode used by GDM for login screen"
msgstr "GDM:n kirjautumisruudussa käyttämä tila"
#: src/main.c:472
#: src/main.c:480
msgid "Use a specific mode, e.g. “gdm” for login screen"
msgstr "Käytä tiettyä tilaa (esim. “gdm”) kirjautumisnäkymää varten"
#: src/main.c:478
#: src/main.c:486
msgid "List possible modes"
msgstr "Listaa mahdolliset tilat"

1326
po/fr.po

File diff suppressed because it is too large Load Diff

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