Commit Graph

14431 Commits

Author SHA1 Message Date
Florian Müllner
dfcc5ffb1e screenShield: Wake up on deactivate()
Usually the screen is woken up before the shield is deactivated, but
it is also possible to unlock the session programmatically via the
org.gnome.ScreenSaver D-Bus API.

The intention is very likely not to unlock a turned off screen in
that case. Nor does it seem like a good idea to change the lock
state without any indication.

Waking up the screen is more likely to meet expectations and is
more reasonable too, so do that.

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


(cherry picked from commit fbe2e30f38)
2020-04-03 15:09:24 +00:00
Florian Müllner
8b80a4cf4d screenShield: Switch lightboxes off before unlock transition
There is no point in animating a transition with fullscreen black
rectangles stacked on top, so switch them off before rather than
after the transition.

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


(cherry picked from commit fb6ead2881)
2020-04-03 15:08:58 +00:00
Andre Moreira Magalhaes
01e894c028 st/icon: Only load default fallback icon if an icon was set and failed to load
Commit c89d6a633 introduced a default fallback icon that would be displayed in
case the main gicon or the fallback gicon wasn't set or failed to load.

This broke the use case where a StIcon is created but no main icon or
fallback icon are set on purpose, for example the appindicator extension
which always creates a StIcon to represent icons in menu items but the
actual icons are only set if the application provides one, leaving the
menu showing the default fallback ("image-missing") icon for all menu
entries that don't actually have an icon provided by the application.

Fix that by only using the default fallback icon if the provided one
failed to load.

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

(cherry picked from commit 7ff7fb5d3b)
2020-04-03 17:00:30 +02:00
Florian Müllner
856adfd1f1 extensionUtils: Add openPrefs() convenience method
Opening their own preferences is a reasonable desire for extensions,
so make up for breaking it by adding a convenience method for that
action.

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

(cherry picked from commit 8030d9ad32)
2020-04-03 17:00:07 +02:00
Florian Müllner
efee3aa749 extensionSystem: Add method for opening extension prefs
Extension that want to expose their own preferences (for example as menu
items) do that by passing their UUID to gnome-shell-extension-prefs.

But since 3.36.1 the app is optional and no longer accepts arguments on
the command line. To adjust, extensions now need to make a D-Bus call
the extensions portal, just like the app and gnome-shell.

We will add a convenience method for that purpose, so it makes
sense to share the existing code. As it's extension-related, the
extension manager looks like the right place ...

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

(cherry picked from commit 45bc850715)
2020-04-03 16:58:15 +02:00
Florian Müllner
15e72da648 workspace: Fix chaining up
Gah, accidentally dropped the 'vfunc' prefix :-(

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1172
2020-04-03 15:47:01 +02:00
Florian Müllner
3f8bd1db25 extensions-app: Do not expand headerbar switch
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2563
2020-04-03 15:47:01 +02:00
Florian Müllner
3a863ee341 js: Account for promisified call() method
A promisified method expects the callback parameter to be either
a function (in which case the original method is called normally)
or omitted altogether (in which case a Promise is returned).

The call to open application details in Software does neither and
passes null instead, which will result in a warning (because no
function argument means a promise will be used, but not omitting
the parameter means we end up with too many arguments).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2551
2020-04-03 02:03:18 +00:00
Florian Müllner
654a7af929 environment: Move g_dbus_connection_call() promisification
Commit 83c6b2ab promisified the method in endSessionDialog, which means
that after the module is imported, every caller will get the promisifed
version. That can be a bit surprising in completely unrelated modules,
so commit 764527c8 (on master) moved the promisification of more common
methods into environment, as that's initialized early and expected to be
shared between anything else.

Do the same for the call() method on the stable branch.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2551
2020-04-03 02:03:18 +00:00
Andre Moreira Magalhaes
8dd9cbac7f app-cache: Fix cache for folder translations
The app-cache code currently stores the folder translations in a hash
that can be accessed via shell_util_get_translated_folder_name().
This hash uses the filename (inc. extension) for the "desktop-directory"
as key which causes an issue when trying to find the translation
on AppDisplay._findBestFolderName() which gets categories (folder names)
from the app info which doesn't contain the ".directory" extension.

Fix that by storing the filename without extension as the hash key for
the cached folder translations.

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


(cherry picked from commit 343b3351f1)
2020-04-03 00:40:34 +00:00
Jonas Ådahl
331db650dd appDisplay: Don't clear signal handler id before emitting
Otherwise we won't clear the 'view-loaded' handler after it was emitted.

Also move field initialization to the correct place, i.e. the init
function of the base class.

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


(cherry picked from commit a9df4e7516)
2020-04-02 21:10:30 +00:00
Марко Костић
428d38179d Update Serbian translation 2020-04-02 19:43:03 +00:00
Ibai Oihanguren Sala
fe9708ebd8 Update Basque translation 2020-04-02 16:15:32 +00:00
Jiri Grönroos
8398769321 Update Finnish translation 2020-04-02 09:44:36 +00:00
Marco Trevisan (Treviño)
768c08ba9d main: Don't override DesktopAppInfo desktop if already GNOME
During the shell initialization we call the (deprecated) function to
override the Desktop environment in Gio DesktopAppInfo to make sure that
applications are correctly shown (as per commit b2fbf5a2), however this
might break the cases in which $XDG_CURRENT_DESKTOP is already set and
contains GNOME (given that is now a list).

In Ubuntu this is in fact set to: ubuntu:GNOME.
Now, if an application contains NotShowIn=ubuntu, the key will be ignored by
the shell, and the application is still listed everywhere.

So, override the DesktopAppInfo desktop environment only in the case that
the current desktop is not already GNOME.

At the current date I think we could just safely get rid of this override at
all, but there could be still cases where it still might be useful, like when
running as nested in some other environment, so keeping it.

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


(cherry picked from commit a0def23940)
2020-04-01 03:58:56 +00:00
Danial Behzadi
69426cbfda Update Persian translation 2020-04-01 01:42:46 +00:00
Jonas Ådahl
9f968e7378 appDisplay: Clear animateLater callbacks when unmapping
In some situations we could end up not with lingering 'view-loaded'
handler. This could result in delayed spring animate-in being initiated,
e.g. after a minute after the activities overview was already closed.

Fix this by removing any lingering signal or later handlers when
unmapping.

Fixes: 5c33fe4a0a

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


(cherry picked from commit f49b58cf97)
2020-03-31 17:12:35 +00:00
Cheng-Chia Tseng
1ab5e6973a Update Chinese (Taiwan) translation 2020-03-31 16:07:19 +00:00
Fabio Tomat
1dea3341ec Update Friulian translation 2020-03-31 11:14:15 +00:00
Florian Müllner
8fda054dc5 Bump version to 3.36.1
Update NEWS.
2020-03-31 00:27:47 +02:00
Florian Müllner
e989684602 extensions-app/metainfo: Point screenshots to stable branch 2020-03-30 21:32:17 +02:00
Jonas Ådahl
5c33fe4a0a appDisplay: Don't start animation from the 'paint' signal
Starting the animation from the actor 'paint' signal has various
unwanted consequences, such as sometimes trigger a
clutter_actor_queue_relayout() during the paint phase. One unwanted
consequence was that an offscreen actor effect was disabled during
painting, meaning the effect would begin being active, but later during
the post-paint processing being disabled. The caused said effect to push
an offscreen framebuffer to the paint context, but then just destroy it
instead of popping it. When this happened, we'd end up trying to operate
on a framebuffer that may had been finalized, or not, depending on the
garbage collector. Sometimes, for some users, this caused a segmentation
fault when trying to pop a matrix from the framebuffer matrix stack.

Deal with this more properly, by using the 'view-loaded' signal to wait
with animation until the view is loaded, as well as using MetaLater to
schedule the start of the animation.

For when a view was signalled to be ready, we're in a state where we can
start animation before the next frame as the layout is ready, but when
not, we have to add back the "hack" where we must wait for one frame for
the target icon positions to be up to date. Do this by adding a
MetaLater IDLE callback that starts the animation *after* the next
frame. This also needs the old 'opacity = 0' work around to not show an
incorrect first frame.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1154
2020-03-30 16:24:31 +00:00
Florian Müllner
4f427f4e0d js: Do not set entries' ClutterText:editable property
The property influences the text's (and thus entry's) minimum width[0],
which is generally not what we want. And as we now prevent text from
being entered in non-reactive entries by other means, we can simply
drop it.

[0] https://gitlab.gnome.org/GNOME/mutter/-/blob/master/clutter/clutter/clutter-text.c#L2940

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423
2020-03-29 22:12:57 +02:00
Florian Müllner
6d3c740b37 st/entry: Unset key focus when made unreactive
It seems reasonable that an entry shouldn't allow entering text when not
reactive. The same could be achieved by changing the text's :editable
property, however that will disable scrolling if the text doesn't fit,
which may result in an unwanted size change.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423
2020-03-29 22:12:57 +02:00
Florian Müllner
34c4627db9 st/entry: Bind ClutterText reactivity to entry
The text is part of the entry, so it is surprising that it can
still be edited when the entry itself isn't reactive. Address
this by setting up a binding instead of expecting all consumers
to handle the case themselves.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423
2020-03-29 22:12:57 +02:00
Florian Müllner
b08b125df6 st/entry: Remove unused macro
https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423
2020-03-29 22:12:57 +02:00
Aurimas Černius
50301bcfd4 Updated Lithuanian translation 2020-03-29 22:28:04 +03:00
Florian Müllner
c2cacc63ee extensions-app: Point homepage in metainfo to subproject
This is where the app code is located now, so it makes for a less
surprising landing page than the toplevel gnome-shell directory.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1150
2020-03-29 17:49:08 +00:00
Florian Müllner
c226081a23 extensions-app: Update README
Add the icon and use the app name instead of the subproject name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1150
2020-03-29 17:49:08 +00:00
Luke Yelavich
16f4e4dc4c checkbox: Improve accessibility of check boxes for Orca users
Set the label actor, so Orca presents the label text when the check box
has focus. Also change the role to ATK_ROLE_CHECKBOX.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2517
2020-03-29 12:56:33 +00:00
Yosef Or Boczko
308b58175f Update Hebrew translation 2020-03-29 07:45:59 +00:00
Luke Yelavich
454e3fd39a calendar: Improve the accessibility of the "Do Not Disturb" switch
Set the do not disturb label as the label actor for the do not disturb switch,
so that Orca speaks the do not disturb label when the user moves
keyboard focus to the do not disturb switch.

Also enable toggle mode for the "Do Not Disturb" button and bind it's checked
state to the state property of the switch. This makes sure that Orca presents
thecorrect state of the do not disturb switch to the user.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2508
2020-03-29 11:07:32 +11:00
Yosef Or Boczko
e4d72fb2b0 Update Hebrew translation 2020-03-28 23:10:11 +00:00
Florian Müllner
f3fcc4adb7 shellDBus: Return error from ReloadExtension
The method has been deprecated because it generally doesn't (and
can't) work. Clarify that by returning an error instead of
apparently doing nothing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2510
2020-03-28 22:14:44 +00:00
Jonas Dreßler
867587ef4c keyboard: Hide keyboardBox after destroying the keyboard
It seems there is a weird race condition between Clutter trying to
destroy the keyboard actor and Clutter trying to hide the keyboardBox
container actor: If the keyboardBox is hidden before destroying the
keyboard actor, Clutter doesn't repaint anything and the keyboard
remains visible until something else draws over it.

To fix this issue until we find the underlying Clutter bug, simply
destroy the keyboard actor before hiding the keyboardBox. The order in
which we call these doesn't matter anyway since hideKeyboard(true) hides
the keyboard immediately without an animation.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142
2020-03-28 20:45:32 +00:00
Jonas Dreßler
b68fb35783 layout: Use translation_y of 0 to hide keyboard
Since we show the keyboard using a translation_y of -keyboardHeight, the
keyboard will be moved down far enough to be out of sight by setting
translation_y to 0.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142
2020-03-28 20:45:32 +00:00
Jonas Dreßler
8dfed7e762 keyboard: Don't include keyboard devices when updating lastDevice
We're dealing with attached keyboards now using the touch_mode property
of ClutterSeat: If a device has a keyboard attached, the touch-mode is
FALSE and we won't automatically show the OSK on touches, also the
touch-mode gets set to FALSE when an external keyboard is being plugged
in, so that also hides the OSK automatically.

With that, we can now ignore keyboard devices when updating the last
used device and no longer have to special-case our own virtual devices.

Because there was no special-case for the virtual device we use on
Wayland now, this fixes a bug where the keyboard disappeared after
touching keys like Enter or Backspace.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142
2020-03-28 20:45:32 +00:00
Florian Müllner
97fe4f761a volume: Cancel before checking state
Since commit 2894085c45 we omit sound feedback on volume changes
if something is already outputting sound. Unfortunately that
"something" may be our own feedback (from a previous volume
change).

In that case we do not want to omit the new feedback, so instead
cancel the previous one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1147
2020-03-28 19:03:12 +01:00
Jonas Dreßler
ba8210ea98 keyboard: Run dispose manually on virtual input device when destroying
We want to make sure any buttons that are still pressed on the virtual
input device used by the OSK are released immediately when destroying
the OSK. Do this by calling run_dispose() on the destroy() function of
the KeyboardController, which makes sure we don't have to wait for the
garbage collection to dispose the object and a still pressed key remains
being pressed until the GC kicks in.

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

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1141
2020-03-28 17:31:04 +00:00
Carlos Garnacho
656168543f st: Honor alpha range specified by pango_attr_foreground_alpha_new()
This is documented as a value between 1 and 65536. However we were passing
a 0 value for 100% transparent colors, which is interpreted as "system
inherited" in pango_renderer_get_alpha() docs.

Ensure we respect this range by specifying the minimum allowed alpha (1)
if the color is fully transparent. If someone notices this 1/65535th change
I'll ask him how many pleiades can he count.

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

(yes, again).
2020-03-28 16:58:30 +00:00
Carlos Garnacho
8378c9c9e0 inputMethod: Protect for running with older mutter versions
The offset argument is changing from uint to int. Which means we
might would pass a negative offset and trigger an "out of bounds"
error. Make it work more or less alright with older mutters, by
clamping the offset to 0.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1146
2020-03-28 16:38:10 +00:00
Florian Müllner
de16fe8dff dateMenu: Only use nearest city when appropriate
Since commit 784c0b7e4 we use the name of the nearest city rather
than the weather station, as the latter tend to have unwieldy
and weird names.

However the nearest city may not be that near after all, in which
case the result is again surprising.

Address this by not using the nearest city name unconditionally, but
only if it appears in the station name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2468
2020-03-28 16:24:03 +00:00
Jwtiyar Nariman
793f053309 Add Kurdish Sorani translation
(cherry picked from commit aba60dcac8)
2020-03-28 15:40:30 +00:00
Georges Basile Stavracas Neto
bea34da289 unlockDialog: Only cancel AuthPrompt if it exists
AuthPrompt is created on demand, and this._authPrompt is
expected to be null except on very strictly controlled
occasions. The idle monitor callback isn't one of them.

Check if AuthPrompt exists before cancelling it.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2371
2020-03-27 23:40:08 +00:00
Florian Müllner
aafec16f49 ci: Build Extensions flatpak bundle
GNOME apps use (or are encouraged to use) flatpak in their CI setup[0],
so do that for the Extensions app as well and get:

 - test building the flatpak
 - produce a bundle for download and testing
 - publish the build in gnome-nightly

[0] https://gitlab.gnome.org/GNOME/Initiatives/wikis/DevOps-with-Flatpak

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1133
2020-03-27 23:33:30 +00:00
Florian Müllner
73df61f36d extensions-app: Add flatpak manifest
We finally have everything in place for distributing the Extensions app
as flatpak without jumping through too many hoops. Add a manifest that
can produce a nightly build like other GNOME modules, and can serve as
a template for a stable manifest on flathub.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1133
2020-03-27 23:33:30 +00:00
Florian Müllner
39e6375aff extensions-app: Move Extensions app to new subproject
The Extensions app code is now independent enough from the rest of the code
base to move it to its own subprojects, like we did for the extensions-tool.

This allows for stand-alone builds of the app, which we are about to use
for distributing it as flatpak.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1133
2020-03-27 23:33:30 +00:00
Florian Müllner
ed21a4e5c1 extensionPrefs: Fake Config module
We include config.js because it is a dependency of ExtensionUtils,
but it's not actually used in the code paths we exercise.

As we want to allow stand-alone builds of the app, it is much easier to
fake the module than to either include a generated file from elsewhere
in the tree or generate it ourselves.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1133
2020-03-27 23:33:30 +00:00
Carlos Garnacho
73472ba6a7 st: Forward CSS foreground alpha as a PangoAttribute to text
Let the PangoRenderer handle this.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2504
2020-03-27 22:47:48 +00:00
Jonas Dreßler
702417ce83 appDisplay: Only use dragMonitor for one icon at a time
Instead of adding a dragMonitor for every icon in the grid as soon as
one icon is getting dragged, only add a dragMonitor for the icon that is
currently being dragged over (ie. the current drag-target). With a large
number of icons in the iconGrid, this should significantly reduce lags
while dragging.

We can do this by detecting the DnD-entering of an icon or folder using
the `handleDragOver()` callback of drag-targets, adding the dragMonitor
because we know an icon is hovering above the drag-target and then
detecting the DnD-leaving of the drag-target by using the `dragMotion()`
handler, where we remove the dragMonitor again as soon as the
targetActor is no longer our actor (ie. the drag-target).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/849
2020-03-27 22:38:41 +00:00