Defining default apps as serialized GVariants isn't very human-friendly,
which likely contributes to the fact that the lists are in parts horribly
outdated (Books! Cheese! Screenshot! gedit!).
Instead, generate the lists at build time from simple text files, which
should be much easier to update.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3632>
This implements wellbeing screen time limits in gnome-shell. It depends
on a few changes in other modules:
- New settings schemas in gsettings-desktop-schemas
- 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 `TimeLimitsManager`, which is a state
machine which uses the user’s session state from logind to track how long
the user has been in an active session, in aggregate, during the day. If
this total exceeds their limit for the day, the state machine changes
state.
The user’s session activity history (basically, when they logged in and
out for the past 14 weeks) is kept in a state file in their home
directory. This is used by gnome-shell to count usage across reboots in
a single day, and in the future it will also be used to provide usage
history in gnome-control-center, so the user can visualise their
historic computer usage at a high level, for the past several weeks.
The `TimeLimitsDispatcher` is based on top of this, and controls showing
notifications and screen fades to make the user aware of whether they’ve
used the computer for too long today, as per their preferences.
Unit tests are included to check that `TimeLimitsManager` works, in
particular with its loading and storing of the history file. The unit
tests provide mock implementations of basic GLib clock functions, the
logind D-Bus proxy 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/3397>
ibus has been mandatory since commit 083d11a032, but it was always
only used at runtime (or during tests). We don't require other
runtime dependencies (like libgdm) at build time either, so stop
checking for ibus.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3587>
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>
The name is a bit cleaner, and has been the preferred option(!)
since meson 1.1.
Mutter recently updated the name, so follow suite.
The meson version bump shouldn't be an issue, given that several
hard dependencies like mutter and glib already require higher
versions.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3515>
For non-debug and non-plain cases - i.e. mainly release builds - in
order to mirror Mutter.
One advantage of doing this is that it allows us to use non-trivial
asserts more generously, such as calling `g_list_length()`.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3099>
It's as human-readable as asciidoc and produces the same results,
but the tooling is more widely supported. Also both GLib and GTK
switched to it for their man pages, so rst2man is already a
dependency of the platform.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3454>
The original asciidoc project is still stuck on python2, so on
distros that didn't switch to a fork (like Fedora), it pulls
in over 100M of legacy dependencies.
However we are about to move our man pages to reStructuredText
which doesn't have that issue, and which is already used for
GLib's and GTK's man pages.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3454>
The portal login window uses WebKit, which is a security-sensitive
component that not all vendors want to support.
Support that case with a build option, and update the captive
portal handler to use the user's default browser if the portal-helper
is disabled.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3408>
`g_desktop_app_info_launch_uris_as_manager_with_fds()` was added
in GIO 2.57.2. We now depend on at least 2.79.2, so we no longer
need a fallback path for the case the function isn't available.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3361>
Jasmine[0] is a popular testing framework for javascript, which
gjs itself has used in a heavily customized form for its own
unit tests for years.
It's far superior to the very rudimentary `jsUnit` module that
is still included with gjs, and the jasmine-gjs project provides
a general-purpose wrapper for gjs apps.
Set up the necessary build infrastructure to run unit tests
through jasmine. That allows for existing unit tests to be
ported one-by-one.
[0] https://jasmine.github.io/index.html
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
gsettings overrides can be in affect when XDG_CURRENT_DESKTOP is set. We
need predictable default values for predictable tests in mutter and thus
mutter will start asserting that GSETTINGS_BACKEND='memory' and
XDG_CURRENT_DESKTOP=''.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3329>
Now that xdg-desktop-portal-gnome implements the Access portal
interface, GNOME Shell doesn't have to be the portal backend for
that anymore.
The D-Bus implementation is still preserved, because internally,
xdg-desktop-portal-gnome may still proxy the Access call to GNOME
Shell when the parent window is not available. That's a private
exchange between xdg-desktop-portal-gnome and GNOME Shell though,
and doesn't require GNOME Shell to be a full portal backend.
See https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/140
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3106>
To mirror Mutter.
This is useful for local installations with e.g. the `release`
buildtype.
Further more, Fedora has been doing the same system wide and it
apparently was helpful in various ways.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2982>
Pipewire allows us to easily track whether any cameras are in used by
checking the state of camera nodes. Add a simple camera monitor to the
shell, allowing us to show e.g. a status indicator.
Naturally the monitor is limited to apps using Pipewire for camera
access and thus subject to the same chicken-egg problem like the camera
portal - it could confuse users that apps may use the camera without
being noticed by the monitor. The hope and assumption here is that a
better shell integration might speed up adoption of the new camera APIs
Pipewire 0.3.49 is required for refcounted `pw_init()`/`pw_deinit()`.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2840>