18366 Commits

Author SHA1 Message Date
Florian Müllner
fec523f83f extensions-app: Use new 'enabled' property
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>
2024-01-03 20:05:05 +00:00
Florian Müllner
f9e81284f8 extensionSystem: Allow changing extensions in ERROR state
While an extension's actual state can no longer change once it is
in ERROR state, its requested state can. In fact, disabling an
erroneous extension is highly recommended, so that it doesn't cause
problems again on the next login.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
2024-01-03 20:05:05 +00:00
Florian Müllner
02b19e3b5c extensionSystem: Add 'enabled' property
Unlike `state` which represents the actual state, the new property
reflects the desired state, i.e. whether an extension should be
enabled according to the settings.

The Extension app will soon use it to improve its handling of the
case where the two mismatch (e.g. extension errors).

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
2024-01-03 20:05:05 +00:00
Florian Müllner
e6624f8ba1 extensionSytem: Rename ENABLED/DISABLED states
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>
2024-01-03 20:05:05 +00:00
Sam Hewitt
32d4bc43ea data: Update symbolic assets for pagination buttons
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3085>
2024-01-02 16:28:44 -03:30
Jonian Guveli
6615d69985 appMenu: Move setApp to null before destroy
Calling `setApp` after the menu has been destroyed results in error.
Moving the method before `super.destroy()` fixes the issue.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2998>
2023-12-31 20:30:11 +02:00
Florian Müllner
1dda339395 animation: Use appropriate spinner asset in light variant
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>
2023-12-27 10:10:35 +00:00
Florian Müllner
74445249db animation: Save file and dimensions in properties
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>
2023-12-27 10:10:35 +00:00
Leleat
d429ab5e08 windowManager: Add shortcuts to open new window of nth pinned app
Add new shortcuts to open a new instance of an app by pressing
Super + Ctrl + Number. This is analogous to ctrl-activating
(LMB/Enter) an app icon.

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4129

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1829>
2023-12-24 10:56:09 +00:00
Florian Müllner
d3a18be0f2 data: Update descriptions of switch-to-app-n shortcuts
The user-visibility terminology switched from "favorite" to
"pin"/"unpin" a while ago, so update the description accordingly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1829>
2023-12-24 10:56:09 +00:00
Sabri Ünal
8e0308d097 extensions-app: Restore developer_name
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>
2023-12-24 00:40:32 +03:00
Sabri Ünal
a8fbb57cdd extension-app: Improve appdata for AppStream 1.0
- 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>
2023-12-21 19:26:57 +00:00
Florian Müllner
dc655b9ed0 main: Override global logError() function
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>
2023-12-21 19:17:32 +00:00
Georges Basile Stavracas Neto
ee150f2949 screenshot: Add and implement new D-Bus method
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>
2023-12-21 17:59:17 +00:00
Georges Basile Stavracas Neto
c80f3af79b screenshot: Add signals to ScreenshotUI
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>
2023-12-21 17:59:17 +00:00
Georges Basile Stavracas Neto
75dafd8d9c screenshot: Add SCREENSHOT_ONLY UI mode
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>
2023-12-21 17:59:17 +00:00
Georges Basile Stavracas Neto
52a7ee7590 screenshot: Make captureScreenshot() return the GFile
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>
2023-12-21 17:59:17 +00:00
Florian Müllner
f43a05bee6 extensions-app: Update metainfo
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>
2023-12-21 15:24:23 +00:00
Florian Müllner
1667b36abd extensions-app: Overhaul search
Instead of awkwardly filtering two different lists, use a separate
search page that filters a single list, similar to what libadwaita
does for preference windows.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
7907b9754b extensions-app: Use ListModel to track extensions
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>
2023-12-21 15:24:23 +00:00
Florian Müllner
2c592059bc extensions-app: Use property bindings in row
Now that extensions are represented as GObjects, we can update
the UI via property bindings instead of manually handling the
logic in the code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
1f7ca2bf38 extensions-app: Bind actions' enabled properties
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>
2023-12-21 15:24:23 +00:00
Florian Müllner
198c7bbd9c extensions-app: Turn Extension into a GObject
This makes the Extension class usable as item-type in models,
and allows us to use property bindings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
f7ded3e509 extensions-app: Split out ExtensionManager
The extension handling is currently intertwined with the UI.

Splitting it out provides a clearer separation, and will allow
us to switch to a model-based UI later.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
3d070fdc6b extensions-app: Move classes to their own files
Using a single source file is getting unwieldy, so start
splitting it up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
ee5b428232 extensions-app: Stop simulating Shell.global
ExtensionUtils no longer relies on the global object, so we don't
have to simulate it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Florian Müllner
fa587b4b9e extensions-app: Use console for logging
This allows us to use different log levels, and an appropriate
log domain.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>
2023-12-21 15:24:23 +00:00
Julian Sparber
b66dee80f6 panel: Ensure signal is disconnected when the panel is destroyed
This fixes a warning when terminating GNOME Shell

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3064>
2023-12-21 15:17:28 +00:00
Florian Müllner
070e712508 extensionSystem: Add debug logging
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>
2023-12-21 15:12:14 +00:00
Florian Müllner
f7c739ae4e extensions-app: Stop setting description tooltip
We no longer ellipsize the description label, so the tooltip
no longer has a purpose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
628e41890f extensions-app: Use details popover
Showing all the extension info and possible actions in every
row is fairly noisy, and doesn't match the usual list patterns.

Streamline the UI by moving the actions and most of the info into
a details popover, so the rows themselves get closer to the
standard pattern.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
82d3e55b68 extension-app: Remove tooltips from row suffixes
The updates/error icons are now interactive, and have more information
in the corresponding popover than could be covered
by a tooltip.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
e252887731 extensions-app: Use less concise error strings
Now that the error information is displayed in a separate popover,
we can afford to be more verbose.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
ed3394a953 extensions-app: Make error/update icon interactive
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>
2023-12-21 15:06:11 +00:00
Florian Müllner
b2040b20c7 extensions-app: Set labelled-by relation for lists
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>
2023-12-21 15:06:11 +00:00
Florian Müllner
a6d991b8f2 extensions-app: Update group headers
Change titles to the clearer "User/System Extensions" and drop the
description.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
e064c2a785 extensions-app: Make kill switch more compact
Instead of using a subtitle, move the stability warning into an
information popover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
592ad186c6 extension-app: Use mnemonics in confirmation dialog
Mnemonics (aka "access keys") should be used whenever possible:

https://developer.gnome.org/hig/guidelines/keyboard.html#access-keys

They are currently missing from the confirmation dialog, add them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
05c4db4372 extensions-app: Add shortcuts window
There aren't many shortcuts and all of them are standard, but
documenting them is still good practice, and our main menu is
a tad bit less empty.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
fdb7700535 extensions-app: Remove Help menu item
The app has been around for quite a while now, but there still
isn't any user documentation. Time to remove a menu item that
doesn't do anything.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>
2023-12-21 15:06:11 +00:00
Florian Müllner
3351cd2f07 panelMenu: Remove SystemIndicator class
It was used by components in the aggregate menu. That menu no
longer exists, and the class has been superseded by the class of
the same name in quick settings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3068>
2023-12-21 13:35:50 +00:00
Sam Hewitt
b4c15d5a7b style: Fix missing light theme color definitions
- Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7267

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3062>
2023-12-19 12:37:54 +00:00
Carlos Garnacho
71164a544f shell: Drop X11-specific code to handle stage focus
This code is being adopted by Mutter, so remove this handling
from ShellGlobal.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2950>
2023-12-18 16:23:04 +00:00
Florian Müllner
9c2da01a95 userWidget: Expand child
More fallout from commit c290a38730eb2 …

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7264

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3061>
2023-12-16 23:57:48 +01:00
Sundeep Mediratta
3b4e3af6fa extensionSystem: Sort extensions before loading
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>
2023-12-16 17:33:47 +00:00
Florian Müllner
38d9026bc7 lookingGlass: Set expand of DebugFlags children
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>
2023-12-15 20:58:38 +01:00
Florian Müllner
c290a38730 st/bin: Delegate child allocation to layout manager
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>
2023-12-15 14:45:38 +00:00
Florian Müllner
b02800f8b5 js: Explicitly set expand of St.Bin children
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>
2023-12-15 14:45:37 +00:00
Florian Müllner
ef2e96bb32 st/box-layout: Set layout manager type
Now that ClutterActor itself provides API to use a particular
layout manager type, we can use that instead of our own mechanism.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>
2023-12-15 14:45:37 +00:00
Florian Müllner
e746b038ef st/texture-cache: Drop bind_surface_property() method
It was only used for the fallback icon of X11 windows.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3056>
2023-12-15 14:10:53 +00:00