Commit graph

18297 commits

Author SHA1 Message Date
Florian Müllner
addee680a5 dbusService: Don't double-wrap remote errors
Returning a GLib.Error from a method invocation will encode the
error when sent over the wire. In case the error itself is already
an encoded remote error, just passing it on will result in double
wrapping.

Avoid that by stripping any remote error information before
returning it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
(cherry picked from commit a5d33026f0)
2024-02-09 14:05:49 +01:00
Florian Müllner
56660cf878 ci: Do not create pipelines for branches with open MRs
Pipelines for non-protected branches are set to 'manual', and
thus cheap. However they may still get picked by `@marge-bot`,
meaning that the bot waits for the completion of a pipeline that
never starts.

Avoid that by not creating pipelines for branches with open
merge requests.

Credit to Jordan, who came up with this for gst.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3153>
(cherry picked from commit d3e96a36ce)
2024-02-09 14:05:22 +01:00
Suryashankar Das
e0cf6b3176 overview: Hide search results while leaving overview
There is currently no proper transition from search results
to the session: Only the top bar fades, but the rest of the
screen just changes abruptly at the end of the transition.

Fix this by hiding search results before leaving the overview,
so the regular transition can take place.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3152>
(cherry picked from commit 3cb1fb7428)
2024-02-09 14:04:52 +01:00
Florian Müllner
c8ac35235a unlockDialog: Only show switch-user button for multiple users
We don't offer "Switch user" on single-user systems when unlocked,
so it is a bit weird to include it while locked.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2475>
(cherry picked from commit 756f212d66)
2024-02-09 14:04:38 +01:00
Jonas Dreßler
7585ae6962 main: Only restore key focus on pop when modal actor is still focused
If something grabs the key focus while a modal is pushed, keeping
key-focus on that actor seems like the smarter thing to do than setting
it back to the last focus after the modal gets popped again. So check if
the key focus actor that we set when pushing the modal got changed when
popping that modal, and if it got changed, simply don't touch key focus.

This fixes a bug with the close dialog, where key focus isn't correctly
set to the dialog after alt-tabbing to a window showing a close dialog.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/786>
(cherry picked from commit 4d544d7b56)
2024-02-09 14:04:26 +01:00
Jonas Dreßler
5ab26d669d closeDialog: Actually set key focus to button when grabbing key focus
When setting the key focus to `this._dialog`, the default button is not
automatically focused and no button has key focus.

Use the `initialKeyFocus` property of the dialog instead, and set focus
to the default button if the dialog is not already focused.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/786>
(cherry picked from commit de834fe307)
2024-02-09 14:04:18 +01:00
Florian Müllner
e87681dbd9 boxpointer: Clamp alignments to expected range
The values are expected to be between 0 (start) and 1 (end),
enforce that with appropriate clamp() calls.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3150>
(cherry picked from commit d0b2351036)
2024-02-09 14:04:01 +01:00
Florian Müllner
05df19b048 boxpointer: Swap arrow alignment on RTL
The current code uses the arrow alignment to align the menu between
the top/left (0) and bottom/right(1), regardless of the text direction.

Instead of adjusting code everywhere, reinterpret the parameter
to refer to start/end instead, and swap the alignment with an
RTL text direction.

Credit to Sebastian Keller for spotting the cause of the issue.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3150>
(cherry picked from commit 4e70315fbb)
2024-02-09 14:03:53 +01:00
Florian Müllner
d21e3485c9 windowManager: Keep dim effect in overview
Removing the effect dates back to the time when we didn't show
attached dialogs in the overview. Since we do show attached
dialogs as such nowadays, it makes sense to keep the effect.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3151>
(cherry picked from commit 7b4054564e)
2024-02-09 14:03:05 +01:00
Florian Müllner
628ad639a4 iconGrid: Don't recreate StIcons on icon theme changes
Now that StIcon updates its texture automatically on icon theme
changes, we only have to recreate icon actors that aren't StIcons.

(This probably only applies to the folder icon in the app grid
where the sub-icons do use St.Icon, but making that assumption
feels dodgy with an API as generic as `createIcon()`)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3141>
(cherry picked from commit 8a1f44f10a)
2024-02-09 14:01:56 +01:00
Florian Müllner
0d3a745587 st/icon: Automatically update on icon theme changes
St.Icon is very commonly used for displaying themed icons, yet so
far updating the icon on icon theme changes is left to the caller.

Unsurprisingly, very few actually do that, with the result that
for most icons, icon theme changes only take effect after a delay
(say, a color change on hover) or not at all.

This is also inconsistent with GTK, where Gtk.Image will automatically
pick up icon theme changes.

Address this by tracking whether the current icon corresponds to
a themed icon, and update it automatically on theme changes if
it does.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3141>
(cherry picked from commit 671c242958)
2024-02-09 14:01:48 +01:00
Barnabás Pőcze
4dcd098456 status/backlight: Do only one dbus call per local change
The values of the two control widgets are syncronized, meaning
that both emit signals when the local value changes, regardless
which one is visible and is actually used by the user.

This is not ideal because it leads to two dbus calls
per local change. To alleviate this, only consider
changes from the widget that is visible.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3086>
(cherry picked from commit c227d0b38e)
2024-02-09 13:49:35 +01:00
Barnabás Pőcze
72cdb37a79 status/backlight: Fix keyboard backlight infinite loop
The logic could enter an infinite loop because it tried to
propagate local changes to g-s-d that were caused by signals sent
by g-s-d. For example:

  1. slider is set to 50
  2. Set(50) dbus call is sent
  3. slider is set to 51
  4. Set(51) dbus call is sent
  5. PropertiesChanged arrives due to Set(50)
  6. this._sliderItem.value is set to 50
  7. notify::value is emitted from this._sliderItem
  8. Set(50) dbus call is sent
  9. PropertiesChanged arrives due to Set(51)
 10. this._sliderItem.value is set to 51
 11. notify::value is emitted from this._sliderItem
 12. Set(51) dbus call is sent

To alleviate this issue, block signal handlers when the local state is
changed due to a remote event.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7111

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3086>
(cherry picked from commit be944ff2dc)
2024-02-09 13:49:27 +01:00
Florian Müllner
12dd2085d9 closeDialog: Close existing dialogs on shutdown
Otherwise mutter will request to hide the dialog when the meta
context is destroyed, but at the JS context has already shut down,
resulting in a crash.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3117>
(cherry picked from commit 17b7162121)
2024-02-09 13:49:12 +01:00
Florian Müllner
6ba13612e2 notificationDaemon: Stop special-casing Empathy
Our telepathy component has been optional for years, and it is
disabled by default on major distros, so we cannot assume that
it handles any particular notifications.

Plus Empathy itself is mostly dead, so it's unlikely to be used
much anymore anyway.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3110>
(cherry picked from commit 3f4f74689e)
2024-02-09 13:48:15 +01:00
Florian Müllner
250653eb6d st/settings: Don't notify "icon-theme" on "high-contrast" changes
Since commit e831a924, the two are no longer linked.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3105>
(cherry picked from commit 64b7249405)
2024-02-09 13:47:37 +01:00
Florian Müllner
89c7a94585 mountOperation: Close when drive gets disconnected
If the volume that corresponds to the mount operation has an
associated drive, we should withdraw any pending dialogs or
notifications when the drive gets physically disconnected,
as they've become obsolete.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3089>
(cherry picked from commit 723ccb70ee)
2024-02-09 13:47:19 +01:00
Daniel Rusek
5787c09085 Update Czech translation 2024-01-22 00:52:20 +00:00
Daniel Rusek
ee5cd2a1ca Update Czech translation 2024-01-21 23:44:26 +00:00
Daniel Rusek
c96916ac0f Update Czech translation 2024-01-21 23:26:19 +00:00
Balázs Meskó
b369040992 Update Hungarian translation 2024-01-11 19:22:15 +00:00
Brage Fuglseth
1cdcc33896 Update Norwegian Bokmål translation 2024-01-07 20:57:28 +00:00
Brage Fuglseth
7d5ab93793 Update Norwegian Bokmål translation 2024-01-07 20:37:24 +00:00
Florian Müllner
c76b18a042 Bump version to 45.3
Update NEWS.
2024-01-06 23:19:48 +01:00
Philip Chimento
1286d62150 extensionSystem: Improve error formatting
This exposes the formatted error with stack trace and proper location of
SyntaxErrors over the bus, instead of just the message.

<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit 71befc5ff7)
2024-01-06 22:44:07 +01:00
Philip Chimento
40618b3ee7 init: Improve error message formatting
Instead of manually formatting the error message and stack, use the same
formatting mechanism as we do when displaying errors to the user that
occur while opening extension preferences. This should correctly
indicate where syntax errors from imported modules occur.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit 1692004b6b)
2024-01-06 22:44:07 +01:00
Philip Chimento
070b170f9c scripting: Use logError to format error stack
Instead of manually formatting the error stack, use logError() to
display the error. logError() displays the stack already.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit e3ea12b8d5)
2024-01-06 22:44:07 +01:00
Philip Chimento
2eb54e33c5 dbusServices/extensions: Improve error message formatting
See https://gitlab.gnome.org/GNOME/gjs/-/issues/584 for a user report.

This uses the new formatter added in the previous commit to format
errors in the extension preferences loader.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit e4691d2717)
2024-01-06 22:44:07 +01:00
Philip Chimento
7c0675e2fa main: Improve error formatting in logError()
We override GJS's default logError(). This adds the improved formatting
of error stack traces that gjs-console would otherwise do as part of
logError().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit e6f35c5e88)
2024-01-06 22:44:07 +01:00
Philip Chimento
8421846cff js: Add utility to improve error message formatting
Previously, when we formatted SyntaxErrors with toString(), they
wouldn't display the file/line/column where the syntax error occurred.
This adds a utility function that performs a more comprehensive
formatting that displays location information for SyntaxErrors, as well
as the .cause property of the error if it is present. This formatting is
equivalent to what we do in gjs-console when logging an error.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit a1a320d3d1)
2024-01-06 22:44:07 +01:00
Philip Chimento
4b0065a058 js: Alphabetize JS resources
These look like they are supposed to be alphabetized, but are not quite.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit 5fe6e5c865)
2024-01-06 22:44:07 +01:00
Jonian Guveli
afe12ba9c4 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>
(cherry picked from commit 6615d69985)
2024-01-06 22:42:45 +01:00
Florian Müllner
b7089e9ed9 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>
(cherry picked from commit 1dda339395)
2024-01-06 22:42:35 +01:00
Florian Müllner
e7969b0ea2 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>
(cherry picked from commit 74445249db)
2024-01-06 22:42:27 +01:00
Florian Müllner
7ef77b5e24 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>
(cherry picked from commit dc655b9ed0)
2024-01-06 22:42:00 +01:00
Julian Sparber
5349fc187c 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>
(cherry picked from commit b66dee80f6)
2024-01-06 22:41:20 +01:00
Scott Buchanan
1c3089515f screenshot: Allow any enter key activate capture
We currently only consider enter/return on the main keyboard
area, but not on the numpad.

Fix that.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2777>
(cherry picked from commit 95daa577cf)
2024-01-06 22:40:21 +01:00
Florian Müllner
f913c700ed dbusService: Exempt org.gnome.Shell from sender tracking
If an interface has any signals, we don't want to auto-shutdown
while a caller is still connected to a signal.

Unfortunately we can't tell whether there are any signal connections,
so we track all callers instead, and keep the service alive while
any of them is still on the bus.

For services that we call from gnome-shell itself - like screencasts
or extensions - this has the unintended side effect of effectively
disabling auto-shutdown.

Address this by exempting the org.gnome.Shell name from sender
tracking.

Services that we expect to keep running for the lifetime of the
shell already disable auto-shutdown, so the only downside is a
small startup delay to resolve the well-known shell name.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3052>
(cherry picked from commit ebe1a4d303)
2024-01-06 22:40:01 +01:00
Florian Müllner
197769ec07 windowPreview: Don't hide overlay while hovering icon
We should treat the icon like we do the caption or close button,
and still consider the preview hovered when the pointer is over
the icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3049>
(cherry picked from commit 39d2988865)
2024-01-06 22:39:48 +01:00
Julian Sparber
594b213d21 st/scroll-view: Allow removing edge fade
Remove the fade effect when the css property `-st-vfade-offset` is removed
from a widget. The effect isn't added when the property never existed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3047>
(cherry picked from commit 33c074c738)
2024-01-06 22:39:37 +01:00
Sebastian Keller
ee94786527 st/widget: Don't allow adding/removing "" style class
strstr() in find_class_name() will always consider "" a match so the
loop was not stopping at the end of the class_list. None of the matches
within the class_list would satisfy the return conditions, unless the
class_list was either an empty string as well or has a trailing space.
So this ends up with a match outside of the allocated string that
happens to satisfy these conditions by chance which then leads to the
class string containing some of this unrelated memory. Or it might lead
to a segfault.

This adds checks to the public API that uses find_class_name() to
prevent extensions from accidentally triggering a crash this way or
having some otherwise unexpected results.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7152
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3006>
(cherry picked from commit dc931e82cd)
2024-01-06 22:39:26 +01:00
Florian Müllner
95e7d43c12 st/bin: Fix height request
The request currently mixes up y-align and x-align.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3043>
(cherry picked from commit c8dae24645)
2024-01-06 22:39:14 +01:00
Daniel van Vugt
0d2bd94b3f style: Don't clip scrolling folder icons until they touch the border
In the absence of a fade-out it doesn't make sense to clip them sooner
than that.

So now we make the left and right padding equal to the border
("box-shadow") width and leave the top/bottom padding unchanged.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3031>
(cherry picked from commit 98654e5446)
2024-01-06 22:38:46 +01:00
Brage Fuglseth
2b72a3fd81 Update Norwegian Bokmål translation 2023-12-26 23:29:53 +00:00
Brage Fuglseth
076dc6fa6b Update Norwegian Bokmål translation 2023-12-20 20:21:03 +00:00
Florian Müllner
9c4a5897ab extensions-app: Update screenshot URLs
There will be some UI changes this cycle, so make sure stable
releases still use correct screenshots by pointing to the
stable branch.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3065>
2023-12-19 12:57:19 +01:00
Florian Müllner
8bb752adf4 Bump version to 45.2
Update NEWS.
2023-12-01 20:43:51 +01:00
Florian Müllner
7bdcfdd98a extension-tool: Show "version-name" field if set
Now that both the website and the Extension app support the custom
"version-name" field, we should expose it in the CLI tool as well.

As a more developer-oriented tool, keep showing the automatic
version along-side the new field when both are set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3034>
(cherry picked from commit ca47e7f8e3)
2023-11-30 23:23:58 +01:00
Aryan Kaushik
9111ac79a5 extensions-app: Support "version-name" metadata field
The extensions site recently added support for a custom
"version-name" string in metadata:
gitlab.gnome.org/Infrastructure/extensions-web/-/merge_requests/154

This allows developers to control the version that is exposed to
users. As the version according to the developer is almost always
more relevant than the automatic version assigned by the website,
use it instead of the "version" field if set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2995>
(cherry picked from commit 6db55eaea6)
2023-11-30 18:46:38 +01:00
Peter Hutterer
09ab8fdcba padOsd: Fix rings and strips event handling
JS ERROR: TypeError: event.get_pad_event_details is not a function
    vfunc_captured_event@resource:///org/gnome/shell/ui/padOsd.js:824:53
    @resource:///org/gnome/shell/ui/init.js:21:20

These were renamed in mutter@97213041e8e7

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7210

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3029>
(cherry picked from commit e367a2713b)
2023-11-30 18:46:14 +01:00