Almost all switches represent boolean settings, which means we can
use bindings instead of fiddling with signal handlers.
As menu items have a `:sensitive` property, this also deals with
handling keys' writability.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3576>
Updating the accessible state is an internal business of the
class, so making it private is more appropriate.
Besides, it was never called from outside the class since it
was added in 2012, so it's unlikely we'll ever have a use case
for it.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3576>
Both popover menus and dialogs can be dismissed with the Escape key,
however the former triggers on key press, while the latter triggers
on key release. As a result, the same key press+release can dismiss
both the command entry's context menu and the run dialog itself.
Fix this by only triggering a key shortcut when a matching key press
was recorded before, which matches how Dialog handles button shortcuts.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8132
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3585>
Last cycle, libadwaita added a new Spinner widget whose visuals
we should adapt. It loops extremely slowly though (a framerate
of 60fps would require 3180(!) frames), which means our current
asset-based implementation isn't well-suited for the job.
Instead, reimplement the underlying GdkPaintable as ClutterContent.
This does not only ensure consistency with libadwaita, but also
gives us more flexibility by picking up style information from
the widget the content is attached to.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3565>
The magnitude of the noise in the final output scales with:
1.0 - cogl_color_out.a
A fixed value for the magnitude relative to cogl_color_out.a might be
too small for large cogl_color_out.a or too large for small
cogl_color_out.a (or possibly even both).
Compensate for this to achieve constant magnitude in the final output.
The coefficients were determined experimentally as a compromise between
preventing colour banding with dark background content and tolerable
noise with bright background content.
This helps for the issue described in
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7795 .
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3572>
ClutterImage as is, is very basic and doesn't really serve any purposes
other than being inherited by StImageContent. As we cannot easily push
ImageContent to Mutter by merging it with ClutterImage because it will
bring more GdkPixbuf usages and also because Clutter doesn't really deal
with theming bits.
Instead, merge it with StImageContent and let GNOME Shell take over from
here.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3547>
The new command will take an extension directory set up
with `meson-build --sysext` inside a toolbox, and turn
it into a merged system extension on the host.
Namely it will
1. copy the extension directory from the container to the host
2. set up the extension-release file expected by systemd-sysext
3. compile gsettings schemas if necessary (using the merged
schemas directory)
4. install the extension to either runtime or system
5. merge the extension
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3498>
While the toolbox image itself has all necessary dependencies to
build and run the shell, we still need them in the destdir when
building a system extension.
Achieve this by running .gitlab-ci/install-common-dependencies.sh
if it exists, which is the script that is used both for gnome-os
system extensions and mutter's CI image.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3498>
When specified, the project is installed to a separate destdir
inside the container instead of the container's root filesystem.
This can be used to install several projects into a common extension
directory:
```
$ (cd mutter; meson-build.sh --sysext) &&
(cd gnome-shell; meson-build.sh --sysext)
```
We will later add a separate command to extract the directory
from the container and turn it into a system extension suitable
for use with systemd-sysext.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3498>
Out development toolbox contains an `update-mutter` command to
make it easier to keep mutter up-to-date for people who only
want to deal with gnome-shell.
To allow them to make use of the new sysext tooling, change the
command to install both to the toolbox root and the sysext
directory.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3498>
When building a system extension for GNOME OS, any extra
dependencies are needed both in the container (for building)
and the extension's destdir (for running).
Because of that, the --destdir flag that was added in commit
8aeb6dc86 does not only install to the specified directory
as expected, but also runs a second install step without
destdir (i.e. to the system).
However that behavior is not a good fit when we extend our
existing toolbox tooling to build system extensions for
Fedora instead of GNOME OS.
To account for that, make the --destdir option cumulative
and install the project to all provided destdirs (or /
if omitted).
This gives us the flexibility to install to the system, a
different destdir, or both:
```
$ ./install-meson-project.sh # install to system
$ ./install-meson-project.sh --destdir /new/dest # install to destdir
$ ./install-meson-project.sh --destdir /new/dest --destdir / # both
```
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3498>
Commit 730fcf34e9 was meant to strip the .desktop suffix from the
desktop directory file, but failed to actually do so: The replace()
method is called on the string parameter before it is passed to
the meson command which substitutes `@BASENAME@`, so it doesn't
have any effect at all.
Really fix the issue by providing the full output name.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3567>
GitLab is currently timing out a lot, and the number of consecutive `git
clone` operations which the `build-sysext` job does is basically
guaranteed to fail at some point. I’ve tried one CI run 30 times in a
row without success.
Temporarily allow this job to fail until GitLab is fixed.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3251>
This implements health break reminder support in gnome-shell. It depends
on a
few bits and bobs from other modules:
- New settings schemas in gsettings-desktop-schemas (released in
47.beta, which Mutter already depends on)
- A settings UI in gnome-control-center
- User documentation in gnome-user-docs
It implements the design from
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/wellbeing/wellbeing.png.
The core of the implementation is `BreakManager`, which is a state
machine which uses the Mutter `IdleMonitor` to track whether the user
is, or should be, in a screen time break.
The `BreakDispatcher` is based on top of this, and controls showing
notifications, countdown timers, screen fades, the lock shield, etc. to
make the user aware of upcoming or due breaks, as per their notification
preferences.
Unit tests are included to check that `BreakManager` works. These
provide mock implementations of basic GLib clock functions, the
`IdleMonitor` and `Gio.Settings` in order to test the state machine in
faster-than-real-time.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
See: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/130
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3251>
Internally in gnome-shell it may be useful to modify the actions
available on a notification while it’s still visible, but without
clearing them all and re-creating them.
Allow that by returning the action object when adding it, and adding a
`removeAction()` method which takes that object and removes it.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3251>