The switch for enabling/disabling extensions currently bases its
state on the extension's ACTIVE state.
This is problematic in the enabled-but-inactive case, because
activating the switch tries to change the state from off to on,
which leads to enabling an already enabled extension (an obvious
no-op).
The new `enabled` property allows us to do better, and use delayed
state changes where the switch position represents the `enabled`
state, and the trough color whether the extension is ACTIVE.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
The ENABLED state means that an extension's `enable()` method
was called successfully.
This usually matches whether an extension *should* be enabled
according to the enabled-extensions/disabled-extensions settings,
but not necessarily: If an extension had an error or does not
support the currently active mode, its actual state is different.
We currently only expose the actual state to external tooling,
but whether an extension should be enabled is relevant as well,
for example to disable a lock-screen only extension from the
regular session.
For that purpose we will expose a separate `enabled` property.
To avoid confusion with the existing states, change the exposed
names to (IN)ACTIVE.
This does not affect the D-Bus API, as the numeric values of
the states remain unchanged.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
Ideally we would replace the sliced-image based animation with a
themed `process-working-symbolic` icon and rotate it, so the spinner
simply picks up the current foreground color.
Unfortunately the `repeat-count` property does not work for rotations,
so to fix the broken spinner in the light variant
in the meantime, include assets for both variants and swap them
out at runtime.
Not everything in the light variant is actually light (overview,
OSDs, ...), so use a simple heuristic on the text color to decide
which asset to use.
Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6783
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3080>
The properties passed to the constructor are currently used
directly in anonymous functions. Store them in properties
instead, so they become accessible outside the constructor,
including for changing them.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3080>
The newly added developer name syntax appears not implemented
across related platforms: GNOME Software, Flathub, etc.
There is no harm in using both deprecated and newly introduced
tags together, and neither appstream-glib nor appstreamcli
fails to validate this usage.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3079>
- Use the `<developer><name>` tag instead of the deprecated `<developer_name>`
- Implement appstreamcli for extra appdata validation
- Fix a release description
- Update the donation URL
- Add the translation tag
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3071>
logError() prints an exception with an optional prefix, and is
used fairly commonly through-out the code base.
The problem is that by being defined in gjs, it uses "Gjs" as the
GLib log domain, not our own as expected.
Address this by adding a small override that implements the function
with console.error().
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3072>
The new InteractiveScreenshot() D-Bus method is implemented using
the signals introduced by the previous commit, and is fundamentally
very simple: take the screenshot, and return the GFile URI.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>
These signals will let the yet to be introduced D-Bus method to
be notified of when either a screenshot has been taken, or if
the screenshot UI has been closed without taking a screenshot.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>
Add a screenshot-exclusive mode that makes the screencast button
unreactive, and therefore disables screencasting. It doesn't change
the visibility of the button though, as that's done by the codepath
that checks if screencasting is supported.
This will be used by the D-Bus callback to take interactive
screenshots.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>
Make the captureScreenshot() auxiliary function return the GFile at
which the texture was saved. This file will be used to return the
screenshot URI to the new D-Bus method to take interactive
screenshots.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>
After the last rounds of redesign, it's time to update
the appdata accordingly:
- update screenshots
- add screenshot captions
- point homepage to apps.gnome.org
- mark as mobile adaptive
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
Manually adding and removing rows to dynamic lists is rather
old-fashioned, GTK 4 strongly encourages the use of models.
Modernize the code by exposing extensions as ListModel, and
bind it to the two lists with appropriate filters.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
Most properties that determine the availability of an action are
not expected to change, but now that extensions are represented
as a GObject, we can just generically set up bindings for all
actions instead of explicitly tracking the properties that we
expect to change.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
Now that we can use console.debug() to log messages that aren't
shown by default, we can be a lot more verbose without spamming
the system log.
Use that to all extension state changes, which can be useful for
debugging.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3058>
Both icons are not immediately obvious, and the context provided
by the tooltip can be hard to discover.
Address this by making the icons interactive, and provide further
information in a popover.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
We use our own lists so we can do filtering, but that means we
lose the built-in relation with the group's title.
Set the relation ourselves, so the two lists are described correctly
in screen readers.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
When an extension is disabled, we "rebase" all extensions that
were enabled afterwards, in case they override the same method.
This can be fairly expensive, in particular when disabling many
extensions at once, for instance when locking the screen.
Help with that by sorting extensions by the number of session-modes,
as extensions that support multiple modes are less likely to be
disabled on session mode changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2851>
Since commit c290a38730eb2a, St.Bin respects the child's
expand properties instead of basing expansion on the
alignment.
Commit b02800f8 updated a number of callers to prepare for the
change, but the "Flags" tab in looking glass was missed.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3060>
Since commit ed3b8d093e16, the actor's single-child policy is
enforced even when using the generic add/remove_child() methods.
This makes it possible to follow GTK/AdwBin's lead and replace
out custom child allocation with a BinLayout, without changing
the actor's semantics in a fundamental way.
However this does change slightly how the child is allocated, as
it now only expands according to its expand properties, not when
the alignment is set to FILL.
Even after the preparations in the previous commit, some fallout
is still likely, but it will be easy to address, and the cleanup
is significant enough to justify it.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>
Right now, St.Bin ignores the child's expand properties, and
instead expands the child if its alignment is set to FILL.
This will change when we replace the custom allocation code
with a layout manager, so to prepare for that, set the expand
property where needed to keep the expected behavior.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>