Commit Graph

14483 Commits

Author SHA1 Message Date
Amr Ibrahim
1974724cb1 systemActions: Use 'system-log-out-symbolic' for logout
Changing the icon to 'system-log-out-symbolic' has no visual
change in a default GNOME setup since both 'system-log-out-symbolic'
and 'application-exit-symbolic' are the same in adwaita-icon-theme
(at the time of writing), however, other icon themes differentiate
between the two icons so pointing to the appropriate icon name
is the right thing to do.

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

(cherry picked from commit 7d60f418e7)
2020-05-07 19:43:05 +00:00
Daniel Mustieles
d159bbfd79 Updated Spanish translation 2020-05-07 16:48:09 +02:00
Florian Müllner
881d330bc0 panel: Center app icon
Giving the icon extra space may distort it, so center it vertically.

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


(cherry picked from commit a9d73b1017)
2020-05-07 13:10:26 +00:00
Bruce Cowan
6a9ce0f18c Update British English translation 2020-05-07 10:48:02 +00:00
Nathan Follens
473a666cc0 Update Dutch translation 2020-05-06 11:13:18 +00:00
Florian Müllner
4872d5969c messageTray: Add missing property getter
gjs has gotten less forgiving about missing getters/setters, and
commit 6aa1b817 missed the missing getter in the base policy class.

Most notifications use a policy subclass that already provides a
getter, but at least Main.notify() and friends don't; unbreak them
by fixing the base class.

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


(cherry picked from commit 5e254666b0)
2020-05-04 14:34:24 +00:00
Philip Chimento
048796d145 messageTray: Make NotificationPolicy properties read-only
These properties are never written; in the base class they are always
their default values, and in the subclasses the getters are overridden.

This will be necessary because GJS is adding checks to make sure that
readable properties always have a getter, writable properties always
have a setter, and that the variations of camelCase/snake_case are
handled correctly. It's supposedly backwards compatible, but that
assumes that code is not doing things like forgetting a setter on a
writable property. (If the missing setter had ever been called, it might
have led to a crash, which is why we've made this change.)

This is the minimally invasive patch which should work with both older
and newer versions of GJS. If you decide to require GJS 1.65.2, then
you'll also be able to remove the getters from NotificationPolicy as
well.

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


(cherry picked from commit 6aa1b817c9)
2020-05-04 14:33:50 +00:00
Daniel Mustieles
dfc016894e Updated Spanish translation 2020-05-04 09:57:25 +02:00
Piotr Drąg
7b19a6f9b6 Update Polish translation
Fixes https://gitlab.gnome.org/Teams/Translation/pl/-/issues/6
2020-05-02 21:44:46 +02:00
Dušan Kazik
e4199c71cc Update Slovak translation 2020-05-02 14:07:10 +00:00
Michael Catanzaro
abb401eaa8 appFavorites: Add eog to rename list
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1233


(cherry picked from commit 31cd8f738c)
2020-05-01 22:42:55 +00:00
Jonas Dreßler
118676bffb st/theme: Unref CRStylesheet after removing old theme nodes
Since we now remove all theme nodes on a stylesheet change (ie.
StTheme's "custom-stylesheets-changed" signal) instead of only
invalidating them, those nodes may not be accessed anymore as soon as
"custom-stylesheets-changed" is emitted.

It turned out though that when comparing them to the newly generated
nodes in `st_widget_recompute_style()` using the
`st_theme_node_paint/geometry_equal()` functions, the properties of the
old nodes will still be accessed, causing a crash since the
CRDeclarations are already freed.

To fix that, keep the reference to the CRStylesheet, which owns the
CRDeclarations used by the theme nodes, around a bit longer, so it's
still possible to access the CRDeclarations inside the
"custom-stylesheets-changed" signal handler. This allows us to compare
the old theme nodes to the new ones since the CSS properties of both are
still valid.

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


(cherry picked from commit e06109c23c)
2020-05-01 14:32:38 +00:00
Cheng-Chia Tseng
dff855942e Update Chinese (Taiwan) translation 2020-04-30 17:31:56 +00:00
Florian Müllner
1d3c1b1ee3 Add small gnome-shell-extension-prefs script
Commit d76162c1c0 removed the ability to pass an extension UUID to
the Extensions app, when we moved the dialog to a portal and made
gnome-shell use it instead of spawning the extensions app.

However that missed that many extensions called out to the app to
open their own prefs.

While extensions are encouraged to switch to the new openPrefs()
convenience method added in commit 8030d9ad32, restore the old
behavior with a small script under the old gnome-shell-extension-prefs
name that either calls out to the portal or launches the app.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1220
2020-04-30 00:57:27 +02:00
Florian Müllner
7b75e9f5ed extensions-app: Rename executable
We kept the old binary name when overhauling the tool for the Extensions
app to avoid unnecessary churn for packagers/distributors.

However we now have a reason to "free" the old name, so rename the binary
to match the (sub)project name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1220
2020-04-30 00:57:27 +02:00
Fabio Tomat
4336952822 Update Friulian translation 2020-04-29 22:25:52 +00:00
Florian Müllner
2a2634439c Bump version to 3.36.2
Update NEWS.
2020-04-29 22:39:21 +02:00
Jonas Dreßler
0d2d8cf623 Revert "endSessionDialog: apply updates by default"
Turns out it's not that clear in which cases we want to apply updates
and in which ones we shouldn't. For example one case is when the device
is running on battery, where we currently display a warning, but still
install updates by default.

So let's revert that again for now and hopefully work out a proper
concept for updates in the future.

This reverts commit ddb85c03c3.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1228
2020-04-29 19:51:05 +00:00
Jonas Dreßler
d64b1e6efb main: Unset the right prevFocus actor after the focus stack got shifted
When a modal that's not on top of the modalActorFocusStack gets popped,
we shift the focus stack as described in popModal() to ensure the chain
remains correct. That however destroys the association of a modal actor
and its prevFocus actor on the focus stack, because the prevFocus actors
are now moved to different entries of the stack.

Now when a prevFocus actor gets destroyed, we don't handle that case
correctly and search for the modal actor that was associated with the
prevFocus actor before the stack was shifted, which means we end up
unsetting the wrong prevFocus actor.

So fix that and search the stack for the prevFocus actor which is being
destroyed instead to unset the correct entry.

Thanks to Florian Müllner for figuring out the actual issue and
proposing this fix.

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


(cherry picked from commit d3880c0bff)
2020-04-29 17:36:06 +00:00
Jonas Ådahl
bbf3a09e2a shell Always draw the cursor ourself when capturing stage
Mutter changed to never draw the cursor with the used API, as it can't
be done in a predictable manner, so always draw it ourself.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1224
2020-04-29 12:38:01 +00:00
Jonas Dreßler
e57a4e0937 st/theme-context: Also remove theme nodes on stylesheet changes
StThemeNodes are built around the assumption that they're "immutable",
that means they are created once with certain parameters (that resolve
to certain css properties) and then replaced with new ones in case those
parameters changed.

Changes to the internal information stored by theme nodes (i.e. the css
properties, font names or the cached scale-factor) are not all handled
the same though: For changes to the font or the scale-factor we remove
all theme nodes from the cache and let the widgets which are on stage
generate new theme nodes. For changes to the css properties/the
stylesheet, we invalidate the properties of all theme nodes but keep
them in the cache using `_st_theme_node_reset_for_stylesheet_change()`.

So be a bit more consistent and handle changes to the css-properties/the
stylesheet stored by StThemeNodes the same way as changes to the font or
scale-factor.

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


(cherry picked from commit 4dfa39457e)
2020-04-28 20:11:15 +00:00
Florian Müllner
443d615edf st/entry: Allow hint actor to shrink
We currently always ignore the minimum width of the hint actor and
request/allocate the preferred width. This can be problematic with
labels with long text, where we should rather ellipsize the text
than allow the entry to grow indefinively.

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


(cherry picked from commit 7d7a15f978)
2020-04-28 20:05:23 +00:00
Jakub Steiner
006d0e8521 theme: tone down weekend with events
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2588


(cherry picked from commit e8f5a842b1)
2020-04-28 20:04:18 +00:00
Will Thompson
1a5a01622a systemActions: include ASCII alternatives in search index
With this change, "eteindre" matches "éteindre" (the French translation
for "power off"), consistent with search for applications where "e"
matches "é".

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


(cherry picked from commit 3199620a83)
2020-04-28 20:03:44 +00:00
Carlos Garnacho
38e31b9f0d st: Ensure to reset all widget theme nodes
Theme node invalidation stops at unmapped widgets, and widgets
that forget to chain up to the default ::style-changed implementation.
This may leave stale nodes that were invalidated on
StThemeContext::changed, but are still set on widgets, and maybe
used for CSS property lookups.

Make sure that theme node invalidation happens always by moving
propagation outside the vfunc, and ensure the theme nodes are reset
across the full actor tree. Emission of ::style-changed, and obtaining
a new theme node may be delayed till when the actor is mapped.

The theme node is also cleared after unparenting an actor to avoid
stale references.

This ensures that all widgets get their theme node cleared after
stylesheet changes, instead of maybe being left with a theme node
that's been cleared of all its properties.

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

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

(cherry picked from commit 325ff73c5b)
2020-04-28 22:00:32 +02:00
Jonas Dreßler
fb7e70d562 authPrompt: Grab key focus when making entry sensitive
We currently let the entry of the autoPrompt grab the key focus inside
setQuestion(), which is called from _onAskQuestion(), which is the
callback of the "ask-question" signal.

It seems that the "ask-question" signal isn't emitted again right after
the password-check failed, but a few seconds after that. Since we get
the "verification-failed" signal earlier than "ask-question" (right
after we know the check failed) and we also get a hint whether the entry
should be usable again with the canRetry argument, we can also grab key
focus to in the same step.

So do that by grabbing key focus when making the entry sensitive.

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


(cherry picked from commit 8d139bbd95)
2020-04-28 16:45:27 +00:00
Jonas Dreßler
63a6c0d6f9 unlockDialog: Call AuthPrompt.addCharacter() directly
The additional function UnlockDialog.addCharacter() is only used at one
place, so we can simply remove it and call AuthPrompt.addCharacter()
directly. The AuthPrompt is shown right before that anyway.

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


(cherry picked from commit fb1bb291eb)
2020-04-28 16:45:08 +00:00
Daniel Rusek
05c1a6dce6 Update Czech translation 2020-04-28 16:37:25 +00:00
Jonas Dreßler
4097f7943f altTab: Set allocation before allocating children
Just as with the last commit, we should not break the assumption made by
Clutter that parents have their allocation set before their children get
allocated, so fix that here, too.

In this case we have to fix it by chaining up to the parent vfunc
override and updating the allocation once more before allocating the
`this._label` child.

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


(cherry picked from commit 49d6db34b7)
2020-04-28 16:24:25 +00:00
Jonas Dreßler
802c2fe532 boxpointer: Call set_allocation before allocating child
It's important to update the allocation of the parent before allocating
its children, it's an assumption we make in a lot of places.

This broke resource scale calculation for boxpointers and their
children when multiple monitors with different scales are used and the
primary monitor is not positioned at x=0, y=0.

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


(cherry picked from commit 63a0e521fd)
2020-04-28 16:24:05 +00:00
Florian Müllner
9497ddd68a overviewControls: Remove transitions before updating adjustment value
The workspace switcher blocks state updates while the indicator is
animating. Since commit 9c1940ef9d the indicator is considered to
be animating when the workspace adjustment's value doesn't equal the
active workspace.

There is one case though where this breaks badly: When a workspace
is inserted before the active one, the adjustment's upper and value
properties are changed without transitions. But if that change happens
while there's an ongoing transition to the previously active workspace,
the value gets out of sync with the active workspace and we end up
blocking state updates indefinitely.

Fix this by removing any transitions before setting the adjustment
value.

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

(cherry picked from commit 2e80995f19)
2020-04-28 10:14:16 +02:00
Florian Müllner
890f5b591f keyboard: Add missing setter
We override the :visible property for the keyboard actor, but don't
provide a corresponding setter. The property is therefore read-only
on the javascript level, and any attempt to set it will fail.

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


(cherry picked from commit 3ba4304da9)
2020-04-27 22:04:16 +00:00
Petr Kovář
5b0d013229 Update Czech translation 2020-04-22 12:51:51 +00:00
Rafael Fontenelle
60ee6ab4b7 Update Brazilian Portuguese translation 2020-04-22 12:32:56 +00:00
Florian Müllner
18a5c74362 authPrompt: Fix spinner alignment
We want the spinner to be centered with regard to the entry, but
constraining the height breaks that:

 1. clutter_actor_allocate() is called with the available size
 2. clutter_actor_update_constraints() then adjusts that according
    to the constraints
 3. clutter_actor_adjust_allocation() applies the margin/expand/align
    properties.

The issue there is that 2. reduces the allocation to the desired size,
so there is no more extra space to distribute in 3.

We can fix this by either constraining everything (and rely on the
cancel button's alignment) or limit the constraint to the width. The
latter seems more appropriate, given that the constraint is only used
to center the entry horizontally.

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


(cherry picked from commit b191e9ef91)
2020-04-17 22:59:00 +00:00
Florian Müllner
4895032054 windowManager: Fix ngettext() call
We don't pass the number that allows gettext to decide on the
correct string, whoops.

Spotted by Alexandre Franke.

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


(cherry picked from commit 5ec5978d4a)
2020-04-17 22:36:04 +00:00
Marco Trevisan (Treviño)
6b24ab572c polkitAgent: Reset the session request timeout when removing it
When handing the resetDialog request we're leaving a source ID alive,
leading this error:

(gnome-shell:22464): GLib-CRITICAL **: 17:46:11.065: Source ID 12934 was not
found when attempting to remove it:

== Stack trace for context 0x55c9246916c0 ==
#0 55c9249151b8 i   js/ui/components/polkitAgent.js:391 (11f71fd544c0 @ 100)
#1 7ffc55140aa0 b   self-hosted:1009 (3062ba49af88 @ 423)
#2 55c924915120 i   js/ui/modalDialog.js:167 (1c9e50ae9880 @ 62)
#3 55c924915098 i   js/ui/modalDialog.js:186 (1c9e50ae9970 @ 12)
#4 55c924915008 i   js/ui/environment.js:75 (1c9e50a8d5b0 @ 98)
#5 55c924914f78 i   js/ui/environment.js:149 (1c9e50a8d9e8 @ 14)

So, reset the source handle to avoid trying to remove it.

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


(cherry picked from commit f4d90bc127)
2020-04-17 16:59:38 +00:00
Florian Müllner
35a3320851 appDisplay: Look up directory- instead of category translations
Translations are provided by .directory files, so trying to look
up a category name without the suffix will always fail.

Commit 343b3351f1 tried to fix this previously by changing the
saved keys, but that broke existing translatable folders.

Appending the .directory suffix for the lookup instead fixes the
issue without regressing non-custom folders.

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


(cherry picked from commit 3fac0632a8)
2020-04-13 15:05:18 +00:00
Florian Müllner
156e05fe90 Revert "app-cache: Fix cache for folder translations"
Existing folders as created by gnome-software (including the
default ones) all have the .directory suffix, so dropping
the suffix from the keys broke those folders.

This reverts commit 343b3351f1.

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


(cherry picked from commit c2b518929d)
2020-04-13 15:04:31 +00:00
Jiri Grönroos
cc0fac895c Update Finnish translation 2020-04-13 15:03:18 +00:00
Georges Basile Stavracas Neto
a6783692c5 animation: Set size through CSS
Pretty much the same case of the previous commit: we want this size
to be scale-dependant, and using the width and height properties of
ClutterActor doesn't automatically update.

Use CSS to set the width and height.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176
2020-04-06 14:37:35 -03:00
Georges Basile Stavracas Neto
1c27b68bcc appDisplay: Set the folder icon geometry through CSS
The CSS engine is scale-aware, whereas simply setting the
width and height properties directly isn't.

Use CSS to set the folder icon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176
2020-04-06 14:37:35 -03:00
Georges Basile Stavracas Neto
717c05a288 st/theme-node: Use the node's scale factor
Each node stores the scale factor in place when it was created.
Creating nodes with the same style, but with different scale
factors, yields different nodes.

Use the node's scale factor instead of retrieving the context's
one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176
2020-04-06 14:37:35 -03:00
Georges Basile Stavracas Neto
e68604b1aa st/theme-node: Consider scale factor when comparing
The CSS engine of St is scale-aware, which means every length
and size it produces is multiplied by the current scale factor.

However, the individual nodes aren't aware of the scale factor
when they compare to each other.

Store and compare the scale factors in the nodes themselves.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176
2020-04-06 14:37:35 -03:00
Georges Basile Stavracas Neto
0368ad29e9 st/theme-context: Add a getter for the scale-factor property
Will be used by the next commit to avoid going through the GObject
machinery when retrieving the scale factor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1176
2020-04-06 14:37:35 -03:00
Jonas Dreßler
b982ce394e shell-app: Use container widget for fallback X11 app icons
Just like StIcon does, we should use a container widget for the fallback
app icon that we get using the cairo surface property. It's needed
because the widget returned by shell_app_create_icon_texture() can be
resized freely, while we want the aspect ratio of the actual texture to
remain the same.

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


(cherry picked from commit 85846d88f0)
2020-04-06 15:00:05 +00:00
Jonas Dreßler
025647f585 st/theme-context: Also invalidate root node on stylesheet changes
Since commit 6a42d77261 we invalidate the
cached properties for each theme node on stylesheet changes by iterating
over the hashtable of the theme context instead of listening to the
signal in each individual theme node.

That commit forgot one particular node though that's not stored in the
hashtable, but using the `priv->root_node` property instead: The theme
node that belongs to the stage.

So make sure we also invalidate the cached properties of the stage theme
node on stylesheet changes. This fixes various crashes that happened
with extensions providing custom stylesheets (emitting the
"custom-stylesheets-changed" signal on every extension enable/disable),
trying to access an already freed CSS property of the stage.

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


(cherry picked from commit bc973b80d7)
2020-04-06 14:59:45 +00:00
Florian Müllner
7125b726ad data: Add extension-portal desktop file
Now that the extension preference dialog is opened by a separate
D-Bus service rather than the Extensions app, it can be opened
without a parent window that provides name and icon.

Fix this by adding back a hidden .desktop file.

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


(cherry picked from commit 6b7c85b079)
2020-04-05 13:48:39 +00:00
Florian Müllner
aebfab7207 extensions-app: Add category in .desktop file
Predefined categories aren't a great way for organizing installed
applications, but they have their use in "stores" like Software
or flathub.

Not listing any category means we fall through the cracks, so
pick the (hopefully) least inappropriate one ...

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


(cherry picked from commit 360f5b1642)
2020-04-05 12:46:11 +00:00
Jonas Dreßler
698bd5b3a9 st/icon: Use a static GIcon for the missing-image icon
Don't create a new GIcon for the "missing-image" texture but simply
create it once statically instead and always use that.

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


(cherry picked from commit 1ca39e8586)
2020-04-04 19:40:10 +00:00