9543 Commits

Author SHA1 Message Date
Julian Sparber
daa8ea5ab2 messageTray: Support setting notification icon by name
Since we now display the source icon and an image for the notification,
it's quite common to set an icon from a name. Therefore add a
convenience property to do so.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3156>
2024-02-06 17:25:01 +00:00
Sam Hewitt
4c5cb191d8 style: Fix bg color weirdness on background apps close button
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3140>
2024-02-06 17:14:40 +00:00
Sam Hewitt
da6950562a dateMenu: Add class to menu so border-radius can be set in stylesheet
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3165>
2024-02-05 22:57:01 +00:00
Florian Müllner
ad27153bee dbusErrors: Don't generate enums
Generating the enums from a list of names means that developers
have to deduce the names of enum members themselves. That's more
important than a bit more convenience when adding a new enum, so
instead spell out the exported enums, and use the enums directly
when registering a domain.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3160>
2024-02-01 23:58:49 +00:00
Keyu Tao
5d1a0cc525 windowManager: Add "opacity: 0" to minimize ease animation
Extensions like dash-to-dock use set_icon_geometry() to window.
This changes the dest and scale of ease animation of minimize and
makes it looks very strange. By setting dest opacity to 0 the animation
could be more natural.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2968>
2024-02-01 13:17:02 +00:00
Florian Müllner
d54e17d3d5 screenshot: Split out disabling cast button
Screencasts can be disabled for various reasons:

 1. the service is not available (missing plugin etc.)
 2. screencasts are not allowed by the session mode
    (lock screen etc.)
 3. the UI is invoked in screenshot-only mode (portal)

Currently each of those conditions is handled in a different
code path, which means that later conditions can re-enable
the button.

There's also an inconsistency whether disabling the button
is done via visibility or reactivity, which still allows
toggling the hidden button via shortcuts (although a hidden
button means that screencasts aren't supported at all, so
nothing will be recorded in that case).

Address this by updating the button from a dedicated function.

Fixes: 671df28a50 ("screenshot: Only handle mode-switch shortcut when
supported")

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7358
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3155>
2024-02-01 12:17:43 +00:00
Julian Sparber
8fed0b83d0 notification: Show symbolic icons in a circle and smaller
Huge symbolic icons look bad therefore we special case them, this
obviously can only work for icons that use the system icons.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3066>
2024-02-01 10:31:24 +01:00
Florian Müllner
f233aebe3a extensionDownloader: Use registered D-Bus error
Instead of returning ad-hoc errors, register a custom error domain
and return appropriate GLib.Errors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00
Florian Müllner
f38e3f4b5d notificationDaemon: Use registered D-Bus error
Instead of returning ad-hoc errors, register a custom error domain
and return appropriate GLib.Errors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00
Florian Müllner
8f03eec3a3 endSessionDialog: Use registered D-Bus error
Instead of returning ad-hoc errors, register a custom error domain
and return appropriate GLib.Errors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00
Florian Müllner
9e96e8495b dbusServices: Always import dbus errors
This makes sure custom errors are registered correctly, even when
the service doesn't do anything other than passing them on.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00
Florian Müllner
ca0ee2ae90 dbusErrors: Add utility module for handling remote errors
We sometimes return custom D-Bus errors. Right now those errors
are ad-hoc, which means receivers don't have a proper way of
checking whether a thrown GLib.Error corresponds to a particular
remote error.

In order to change that, we should define proper error enums and
domains, and register them with GDBus, so that there is an automatic
mapping between D-Bus errors and GLib.Errors.

The new module doesn't export any domains or enums yet, but provides
internal tooling to make these exports more convenient.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
2024-01-31 20:58:31 +01:00
Florian Müllner
a5d33026f0 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>
2024-01-31 19:03:12 +01:00
Julian Sparber
c5cd195506 mpris: Use player Identity if the player app isn't known
For players that don't match to an app, we can still do better than
the generic fallback if the client provides a valid `Identity` value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
8fdea10e33 notifications: Add header like in the new designs
See:
9e2bed6f37/notifications-calendar/notifications-grouping.png

This also increases the size of the icon to 48px.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6743
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
ff76584937 notifications: Introduce MessageList.Source object
This object contains only the `title` and `icon` of a
`MessageTray.Source` which allows using it for sources
that aren't notification sources like mpris.

The old `MessageTray.Source` isn't renamed to something
less generic to not break API. Once we have a good reason
we should rename it to something more specific.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
932ccac1c2 messageTray: Allow settings gobject properties of Source on creation
This also makes the `icon` property of `Source` writable so that it can
be set during creation instead of overriding the getter of the icon
property.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
c63d67c9af FdoNotifications: Only set the title of a Source once
Even though the comment in the code says that sources are reused even
thought the app title has changed this is actually not the case. Therefore
when ever the app title of a notification changes a new `Source` is
created. Therefore there is no point in setting the app title again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
00a375ce9b messageTray: Expose Source icon as GObject property
As the notification redesign affects the API anyway, we can just
as well use the opportunity to modernize the code.

Turning the icon into a GObject property means we no longer need
a custom signal for change notifications, and the icon becomes
usable in bindings.

Since setting an `GThemedIcon` is common this also adds a convenience
property to set the icon name directly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
1b49cc643c messageTray: Remove unused properties from Source
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
b78cc1c62a FdoNotifications: Don't use a fallback for no icon
There is no need to have an icon for every notification, don't add a
fallback.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
eb9118674d notifications: Never use source icon for notifications
With the new design we will show the source icon in the header of a
notification.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
f3cd0aa082 FdoNotification: Highlight difference between icon/image and app-icon
This just renames the `icon` variable to `appIcon` to make clear that
this icon is considered to be the app icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
89c602cb62 messageList: Remove secondary actor API from Message
The secondary actor isn't used for anything anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
15056527aa calender: Use datetime property to set timestamp for notifications
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
f8fce24d5c messageList: Add property to display the timestamp of a message
This also adds the needed actor to display the timestamp.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
e89dea80d6 messageTray: Remove the secondary icon from Notification
This was only used by the telepathy client, but after dropping the
presense indicator this isn't used anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Julian Sparber
5f7e8d292d telepathyClient: Stop displaying presence in notification
The presence indicator in notification uses API only needed for the
telepathyClient, since it's a complete fringe feature nowadays it's not
worth maintaining specific API for it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
2024-01-30 17:05:23 +00:00
Evan Welsh
739725e521 magnifier: Fix isTrackingMouse()
Commit 8aed51180f changed the way mouse tracking is implemented,
but missed updating that function.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2037>
2024-01-30 15:55:29 +01:00
Evan Welsh
c3a764693d magnifier: Removed unused get*Color() methods
They use API from Clutter.Rectangle which hasn't been used in the
magnifier since commit c815979f, and has since been removed from
Clutter altogether.

Since the methods are unused, remove them instead of fixing them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2037>
2024-01-30 15:55:29 +01:00
Suryashankar Das
3cb1fb7428 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>
2024-01-30 03:59:45 +01:00
Andy Holmes
9a528ca7bb cleanup: Remove unused argument from createResultObject()
The `SearchResultsView` is passed through to the `createResultObject()`
method of search providers, but doesn't seem to be used at all anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2901>
2024-01-30 01:49:06 +00:00
Florian Müllner
756f212d66 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>
2024-01-30 01:21:12 +00:00
Jonas Dreßler
4d544d7b56 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>
2024-01-29 23:14:24 +00:00
Jonas Dreßler
de834fe307 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>
2024-01-29 23:14:24 +00:00
Sam Hewitt
d373e10a44 switchMonitor: New assets for switcher items
- include new assets in the symbolic source
- update existing screenshot assets with new display design

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6013
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3128>
2024-01-29 22:47:10 +00:00
Florian Müllner
d0b2351036 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>
2024-01-29 22:40:12 +00:00
Florian Müllner
4e70315fbb 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>
2024-01-29 22:40:12 +00:00
Carlos Garnacho
e889bff1c6 lookingGlass: Do not escape markup in button subclass constructor
Buttons no longer take Pango markup by default, there's no longer
need to escape text here.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3149>
2024-01-29 22:15:53 +00:00
Carlos Garnacho
569f88537a endSessionDialog: Drop markup from button labels
This is no longer necessary with button labels being non-markup
by default.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3149>
2024-01-29 22:15:53 +00:00
Carlos Garnacho
1940573bef keyboard: Avoid markup escaping when setting button labels
These are no longer interpreted as Pango markup.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3149>
2024-01-29 22:15:53 +00:00
Florian Müllner
7b4054564e 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>
2024-01-29 21:28:56 +01:00
Florian Müllner
8a1f44f10a 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>
2024-01-26 23:36:25 +00:00
Sam Hewitt
e97175d2bf calendar: Stylesheet clean up & fixes
- added style class for when there are no world clocks present
- restructured the scss to match the widget structure
- cleaned up padding and font color styles
- improved high contrast support

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7324
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3120>
2024-01-26 16:01:37 -03:30
Florian Müllner
79b0c9c726 util: Handle .rc in version comparisons
We somehow missed that the new version scheme include '.rc' when
adding the comparison function, whoops.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3130>
2024-01-26 13:20:07 +00:00
Sam Hewitt
b14623c664 dash: Resolve padding and alignment issues with dash items
- revert a change to y-expand on dash items
- clean up the manual padding on dash items in stylesheet
- fix an issue with the running dot being misaligned

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7322
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3119>
2024-01-24 17:51:16 +00:00
Florian Müllner
731bd212c1 panel: Actually switch to connectObject()
Fixes: 29ba8ab03c ("panel: Use connectObject() for overview signals")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3129>
2024-01-19 19:29:33 +01:00
Florian Müllner
29ba8ab03c panel: Use connectObject() for overview signals
We expect top bar and activities button to be around for the
entire duration of the session, but some extra caution doesn't
hurt.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3126>
2024-01-19 17:56:25 +00:00
Florian Müllner
10f7344336 panel: Remove unnecessary code
Since commit a4660293748, the activities button uses the standard
`:checked` pseudo class in the overview instead of the custom
`:overview`.

As a side effect, the generic handling of the `CHECKED` Atk state
in StWidget now covers the case, and we no longer need to manage
the state explicitly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3126>
2024-01-19 17:56:25 +00:00
Leorize
dad06fa423 keyboard: Add keyboard model configuration support
Enables the use of a new `xkb-model` dconf key to let user configure
their desired keyboard model.

Also included is additional glue for respecting X11Model set at the
system level (ie. via `localectl`).

For simplicity, this assumes the use of one global keyboard model.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2583>
2024-01-19 14:18:38 +00:00