19401 Commits

Author SHA1 Message Date
Daniel van Vugt
c9cd4fbcd0 animation: Add (integer) geometry scaling support to Spinner
Until now it only supported (float) fractional scaling.

Since the SpinnerContent requires a Clutter size in logical pixels,
we need to specify that at map time when the scaling factor is known.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8126
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3634>
2025-02-11 12:00:08 +08:00
Florian Müllner
4f5cd433b2 screenshot: Fix notification
St.ImageContent.set_bytes() now has an additional Cogl.Context
parameter.

Fixes: 44b84e458a ("st/image-content: Take a CoglContext on set_bytes/set_data functions")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8190
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3631>
2025-02-09 09:49:02 +00:00
Jordi Mas i Hernandez
3726161bfd Update Catalan translation 2025-02-08 10:48:44 +00:00
Florian Müllner
2a41ce6407 ci: Pull in defaults/workflow from template
The template was added recently, so the same rules don't have
to be replicated by every project.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3630>
2025-02-07 01:57:22 +01:00
Florian Müllner
201bbe48af ci: Includes templates from project
Now that the freedesktop templates are mirrored on GNOME infrastructure,
we don't have to include them via HTTPS anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3630>
2025-02-07 01:57:22 +01:00
Florian Müllner
914df43d1e ci: Consistently use dashes in job/stage names
We currently have a mix of dashes and underscores, with the former
being predominantly used by newer jobs, so settle on that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3630>
2025-02-07 01:57:22 +01:00
Marco Trevisan (Treviño)
71da3048a1 status/powerProfiles: Use newer DBus API
Since some time the power-profiles-daemon project has been moved under
the upower umbrella and renamed its API to follow that.

While the legacy name is still supported, there are plans to not support
it anymore in future [2]. So let's update gnome-shell code to use the
current main name instead.

[1] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/148
[2] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/166

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3629>
2025-02-07 01:03:27 +01:00
Cheng-Chia Tseng
5e2e6042a5 Update Chinese (Taiwan) translation
(cherry picked from commit f5b88791f9a031e6e82171c5afab8a6da3e52bba)
2025-02-06 08:39:13 +00:00
Florian Müllner
9ecc278e29
Bump version to 48.beta
Update NEWS.
2025-02-05 00:36:41 +01:00
Florian Müllner
a73a4f8455 loginDialog: Support loading banner message from file
Support the new `banner-message-path` and `banner-message-source`
settings, which allows loading the banner message from a path
instead of GSettings. This is mainly useful for `/etc/motd` and
similar mechanisms, to show the same message for both graphical
and non-graphical logins.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3558>
2025-02-04 13:10:10 +01:00
Florian Müllner
5f92c12c72 loginDialog: Update banner asynchronously
We will soon allow reading the banner text from a file. Prepare
for that by making the method asynchronous.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3558>
2025-02-04 13:10:10 +01:00
Florian Müllner
f328eee88c loginDialog: Split out getBannerText() helper
The new methods will make it easier to add alternative sources
for the banner text.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3558>
2025-02-04 13:10:09 +01:00
Florian Müllner
52256a3b4a ci: Bump mutter image
Bump the image to pull in additions to the org.gnome.login-manager
schema.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3558>
2025-02-04 13:10:06 +01:00
Florian Müllner
45ff3f9e1e dbusService: Handle shell restarts better
Our D-Bus services don't make sense outside a GNOME session, so
they shut down automatically when gnome-shell is not on the bus.

However this does not only apply when activating a service from
a non-GNOME session, but also when restarting gnome-shell on Xorg.

This is particularly problematic for services that shut down
automatically, as they lose all tracking state, even when
re-activated.

Address this by queuing a shutdown check instead of shutting down
immediately, so that the service can pick up the new shell name
provided it appears before the timeout (i.e. two seconds).

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7843
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3463>
2025-02-04 12:22:59 +01:00
Florian Müllner
43dfb49722 dbusService: Watch shell name from implementation
The service implementation already has to resolve the shell's
unique name to exclude it from sender tracking.

It can just as well take care of watching the shell D-Bus name,
which simplifies the code and will allow for more flexibility
when handling the shell disappearing from the bus.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3463>
2025-02-04 12:22:59 +01:00
Florian Müllner
04fd4b2503 ci: Bump mutter image
Mutter now requires a newer libei, pull it in.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3627>
2025-02-04 12:13:18 +01:00
Julian Sparber
03e5d4bdd8 messageList: Drop unused Message._onDestroy()
This method isn't used and users (e.g extensions) of `Message` can connect
to the destroy signal if they need it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Julian Sparber
88f551d0a8 messageList: Reduce flexibility of section visibility
Section visibility has become less complex when moving events
out of the message list. We no longer need different behavior
in different sections, so we can instead control the visibility
of the entire list in a single place.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Julian Sparber
0c6f896d4b mpris: Move widgets to messageList.js
Widgets for other type of messages (notifications) are already in
`messageList.js` therefore move widgets for mpris also there.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Julian Sparber
c102d8c5ba mpris: Split widgets from data objects
Separate widgets from data objects so that in a future commit the
widgets can be moved to messageList.js

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Julian Sparber
45d7b9673a messageList: Fix warning when user activates a message while removing
The `Notification` object is destroyed before the `Message` widget so
during the removal animation the user still could click on the `Message`
and activate the notification. This ensures we don't warn about it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Julian Sparber
bf76553287 messageList: Use default signal handler for closing notifications
And change the `close` signal on `Message` to run the default handler
last, which allows other signal handers to stop the signal emission
chain.

This change shouldn't have much effect on existing code but will be
needed for by-source notification grouping.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Julian Sparber
6fa76cd8f4 messageList: Use notification-removed signal in MessageListSection
Since we have now the `notification-removed` signal on
`MessageTray.Source` we can use it instead of connecting to the
`destroy()` signal for each single notification in the
`MessageListSection`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Julian Sparber
64aadeece3 messages: Move message widgets from calendar.js to messageList.js
The widgets `NotificationMessage` and `NotificationSection` in `calendar.js`
aren't used only by the calendar.

Move the two widget to messageList.js since once we add by-source grouping for
messages (which will happen in a future commit) we need a much tighter
coupling between them and the rest of the MessageList. In future the
`NotificationSection` will need to be removed to make expanding of
groups work.

This also removes a circular import of files: `calender.js` imports
`messageTray.js` and it imports `calender.js`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3429>
2025-02-02 17:40:14 +00:00
Philipp Kiemle
e77b716793 Update German translation 2025-01-31 20:19:56 +00:00
Florian Müllner
829d2fd469 st/theme: Reuse stylesheets if possible
The following happens when processing an `@import()` rule:

 1. `_st_theme_resolve_url()` to resolve file
 2. `insert_stylesheet()` to track file/sheet
   a. take ownership of file/sheet (ref)
   b. use file as key in `stylesheets_by_file` hash table
   c. use file as value in `files_by_stylesheet` hash table
 3. release reference to file

This leads to a refcount error when importing a file that
was already parsed before:

 1. file start with refcount 1
 2. `insert_stylesheet()`
   a. increases refcount to 2
   b. inserting into `stylesheets_by_file` *decreases* the
      passed-in key if the key already exists
   c. `files_by_stylesheet` now tracks a file with recount 1
 3. releases the last reference to file

The file object tracked in `files_by_stylesheet` is now invalid,
and accessing it results in a crash.

Avoid this issue by reusing existing stylesheets, so we don't insert
a stylesheet that's already tracked.

As a side-effect, this also saves us from re-parsing the same file
unnecessarily.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7306
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3619>
2025-01-30 16:43:57 +00:00
Florian Müllner
e5b81e19f5 quickSettings: Hide separator when menu button is hidden
Since commit eeddf49371, the menu button in toggles is separated
by an actual widget rather than just CSS borders.

However the menu button can be hidden, in which case the menu toggle
acts as a regular quick toggle. The separator shouldn't be visible
either in that case, so hide it.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8159
Fixes: eeddf49371 ("style: Improve the styles for the separation in quick setting buttons")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3621>
2025-01-30 13:09:05 +01:00
Philip Withnall
e9eb7e3de6 tests: Add tests for disabling history/limits for screen time
Test that disabling the history and/or screen time limits work. This
adds unit tests for the previous few commits.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3306
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3610>
2025-01-28 16:19:21 +00:00
Philip Withnall
98758c86d8 timeLimitsManager: Delete the history file if history is disabled
I forgot to include this in the first implementation, but it was always
meant to be here: when screen time data collection is disabled, the
history file should be deleted — it’s not being added to, and is just a
privacy risk.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3306
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3610>
2025-01-28 16:19:21 +00:00
Philip Withnall
11d8b9337d timeLimitsManager: Fully handle daily-limit-enabled setting
Separate out how it’s handled from the `history-enabled` setting,
allowing screen time usage data to be recorded with or without limits
being enforced.

This follows on from the previous commit.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3306
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3610>
2025-01-28 16:19:21 +00:00
Philip Withnall
73565e582c timeLimitsManager: Simple split of enabled setting in two
As described and motivated in
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3306, it
turns out that we want to be able to save screen time usage data while
not enabling limits based on that usage.

Bump the shell’s dependency on gsettings-desktop-schemas to get the
split setting, and roughly adapt the existing `timeLimitsManager` code
to use the new setting names. The code currently treats the two settings
as equivalent / expects them both to be set the same. The following
commits will refine that behaviour.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/3306
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3610>
2025-01-28 16:19:21 +00:00
Florian Müllner
17ce108a35 js: Switch more boxes to new orientation property
There are two instances where we set the deprecated `vertical`
property with a `{vertical}` shorthand that escaped previous
greps; move those to the new `orientation` property too.

Fixes: b75b4abaf0 ("js: Set BoxLayout orientation")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3618>
2025-01-28 13:01:47 +00:00
Carlos Garnacho
e6e0ccdf27 ibusCandidatePopup: Fix live orientation changes based on IBus info
This is rare, and was missed in the replacements towards the new
'orientation' property.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8177
Fixes: b75b4abaf ("js: Set BoxLayout orientation")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3618>
2025-01-28 13:01:47 +00:00
Florian Müllner
9beacca329 st/texture-cache: Remove load_sliced_image()
It was only used by the `Animation`/`AnimatedIcon` classes, which
have now been removed since `Spinner` is now an independent
implementation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3612>
2025-01-28 12:50:00 +00:00
Florian Müllner
f24a624335 animation: Remove now unused classes
Since `Spinner` is no longer a subclass of `Animation`/`AnimatedIcon`,
the latter are now unused. Apparently that's not only true for
gnome-shell itself, but also extensions, so there's little reason
for keeping the former base classes around.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3612>
2025-01-28 12:50:00 +00:00
Florian Müllner
b1b4592bc4 build: Update jasmine-gjs wrap
The new version fixes repeated warnings with newer GIO versions
(using Gio.Unix... instead of GioUnix...) which clutter the
output when tests are run verbosely.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
f4c46647e6 run-test: Filter out SYSTEM_EXIT errors
Calling `System.exit()` isn't an error, and there isn't much
value in logging a "Exit with code 0" message.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
546f3d65f7 run-test: Always use returned status code if possible
gjs_context_eval_module_file() is a convenience method for

 - register the module (load and parse)
 - evaluate the module (run)

The first can fail, but has no notion of status code; the
second will always set a valid code if provided (either as
returned by the module, or set by gjs itself).

Doing those two steps separately allows us to explicitly
handle failures to register the module, so that we can then
return the original status code from evaluating the module.

That means that if evaluating the module "fails" with a
`GJS_ERROR_SYSTEM_EXIT` error (because it was terminated
with `System.exit()`), we now return the correct status
code instead of `EXIT_FAILURE`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
d192fc984f run-test: Split out module evaluation
The gjs API is slightly odd, in that explicit calls to `System.exit()`
are treated as errors, regardless of the passed status code.

Before addressing this, split out the module evaluation code into
a separate function to separate it from the main logic.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
f42c2d7371 run-test: Switch to new argv API
It's a bit nicer to use than manually defining the legacy ARGV
array.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
699c7c1b2c run-test: Check argc before using argv
We skip the filename argument when defining ARGV before actually
checking that it was provided.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
e7691bd3df run-tests: Add missing newlines in error messages
Unlike the various g_message() macros, the g_print() functions do
not add an implicit newline at the end of the message.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
68fe35d1a2 run-test: Use g_autoptr/autofree
While we don't really care about freeing memory before leaving
main, it doesn't hurt and is good practice anyway.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Florian Müllner
696bd09d18 run-test: Fix coding style errors
The original code was likely copied from gjs' console code at the
time, which means that its coding style sneaked in.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3599>
2025-01-28 12:38:30 +00:00
Carlos Garnacho
fecd5cdd6c shellDBus: Actually emit AcceleratorDeactivated signal
Add the missing plumbing to have this signal emitted via D-Bus.

Fixes: e53f69f9d ("shellDBus: Add AcceleratorDeactivated D-Bus signal")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3617>
2025-01-28 11:56:56 +00:00
Florian Müllner
8043714478 timeLimitsManager: Fix grayscale transition
The code currently gets the `DesaturateEffect.factor` property[0]
backwards: 1.0 means fully desaturated, not full color.

The result is that we are currently "transitioning" from 1.0 to 1.0,
that is the screen is abruptly turned to grayscale with no transition.

[0] https://mutter.gnome.org/clutter/property.DesaturateEffect.factor.html

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8160
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3606>
2025-01-27 18:58:17 +01:00
Carlos Garnacho
8f53096cfa shellDBus: Allow GNOME portal to access Shell D-Bus API
This will be necessary for a global shortcuts implementation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3598>
2025-01-27 14:09:00 +00:00
Carlos Garnacho
e53f69f9d3 shellDBus: Add AcceleratorDeactivated D-Bus signal
Add this signal to complement AcceleratorActivated, meant to happen
on the release action of shortcuts, e.g. on push-to-talk.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3598>
2025-01-27 14:09:00 +00:00
Florian Müllner
e2de46e9ac st/scroll-bar: Remove vertical property
Unlike `StBoxLayout` which is ubiquious, `StScrollBar` is hightly unlikely
to be used outside of `StScrollView`. It therefore seems unnecessary to
deprecate the `vertical` property before removing it, so do just that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3614>
2025-01-27 13:55:39 +01:00
Florian Müllner
8b8699d1d5 st/scroll-view: Set scrollbar orientation
Use the new `orientation` property instead of `vertical`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3614>
2025-01-27 13:55:39 +01:00