9669 Commits

Author SHA1 Message Date
Julian Sparber
274d8be7b9 messageList: Use single actor to display message body
Using two actor to display collapsed and expanded body creates a small
flicker when switching between the actors, since we can resize the actor
we can just use one actor and resize it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
9bf280bbd2 messageTray: Drop 'update()' from MessageTray.Notification
Since MessageTray.Notification now uses GObject properties we use
`Object.set()` to update multiple properties and the `update()` method
isn't needed anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
3ef86b279a messageTray: Always play sound when a notification is updated
We had a policy (see [1]) to replay sound for updated notification only
when the sound changed. But this behavior never worked because of a bug
in the code. Since nobody noticed in years, let's remove it and always
allow the sound to be played.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=642831#c37

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
cc60ce7f94 notification: Stop using 'update()' from MessageTray.Notification
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
b746ab05b3 notification: Use full potential of MessageTray.Notification properties
Since MessageTray.Notification now uses GObject properties we can use
property bindings and specific notify signals.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
f0e863f529 messageList: Use GObject properties for Message
This will allow us to use property bindings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
ffaec5615a messageList: Directly take an GioIcon as image for a message
There is pretty much no value gained by allowing to use any actor to display
an image, so just don't allow it since it simplifies the code and CSS.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
cb1b54b954 notification: Remove old setter methods of MessageTray.Notification
We now have nice GObject properties for the properties that can be set
with in different ways, since we already changing the API so much let's
drop the old setter methods.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
1d1d9806f3 notification: Stop using old setter methods of MessageTray.Notification
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
9ac4c7da53 messageTray: Automatically update Notification's datetime on property changes
Setting the `datetime` property whenever a notification is updated is
tedious and error-prone. Therefore, whenever properties, other then
`acknowledged` and `datetime`, of a notification change update the
`datetime` property to the current time.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
d54219c098 messageTray: Only take params in Notification constructor
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
251a5e9d20 messageTray: Use GObject properties for Notification
This will allow us to use property bindings, and it's much clear which
properties a `Notification` has.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
34f05b075b messageTray: Let the tray decide whether to show a banner
Always use the same code path to add new messages to a source, and
let the `MessageTray` decide whether it shows a banner.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
940b658071 messageTray: Drop NotificationBanner
We want to have the same widget used to display the notification in the
calendar popover as in the messageTray, so let's actually use the same
widget.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
83ea818a0a messageTray: Drop createBanner()
This removes the `createBanner()` method on `Notification` and `Source`.
Since we want to use the same widget for the calendar and the banner,
let's not allow to create custom widgets just for the banner.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
d44adf3b78 notifications: Add buttons to Calendar.NotificationMessage via actions
Since we also want to show the buttons in the calendar move the
code to add buttons/actions from `MessageTray.NotificationBanner` to
`Calendar.NotificationMessage`.

As nothing uses custom buttons that aren't backed by actions anymore,
remove that bit of the public API.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7099
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
7ff5f4ea51 messageTray: Add action-added/action-removed signals to Notification
Add signals so that the message actor can update the it's action when
they change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
6d6ac1372a components/autorunManager: Use notification actions API
Stop using custom buttons for notification actions. The only reason to
use custom buttons was so that we could add icons next to the button
label, if we really need the icons next to the label we can add icons to
the notification API.
By using the actions API we can ensure that buttons always look the
same without additional work.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
050e4e9a6e messageTray: Use new notification-removed signal to cleanup notifications
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
ec5bbfe319 messageTray: Add notification-removed signal to Source
This allows us to drop the `destroy` signal handler for each
notification in MessageTray.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
b1d2a5bac8 FdoNotificationDaemon: Actually associate a Source with an app
Actually link a notification source with an app instead of just to
its app name and PID, which in many cases don't really identify an
app. E.g. for portal applications the PID points to the
xdg-desktop-portal.

Use the app when ever possible but keep using the app name and PID
as a fallback.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
d63013f075 messageTray: Rename bannerBodyMarkup to useBodyMarkup in Notification object
I think the new name better reflects the effect of the property.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
00c292733d messageTray: Rename bannerBodyText to body in Notification object
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
e4c44fd1ed messageTray: Add object holding sound for a notification
A notification can have two ways to specify a sound, via a name of a
sound in the sound theme and/or a file. Therefore introduce an object
that can hold both properties and creates an abstraction over the
different source. This reduces the number of properties for a
notification, which will make it simpler to port it to GObject
properties.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
f8567bb1a7 messageList: Drop methods to customize the body of a message
Since only the telepathy client needed a special actor as expanded body
we can now drop the methods for it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Julian Sparber
c5ec3e45e4 components: Drop telepathy client
The telepathy client component has been unmaintained for a long time.
Now that we rework the notifications massively it's time to drop the
support for it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
2024-03-03 01:33:16 +00:00
Florian Müllner
e1c454bd21 userWidget: Stop expand flags from propagating
Since commit 9c2da01a9, the avatar's child is expanded to account
for the new St.Bin behavior. However as expand flags are propagated
up, this now results in avatar actor getting unintentionally expanded
in places like the end-session dialog.

Stop this by explicitly setting the avatar actor to not expand.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3221>
2024-03-01 23:58:36 +01:00
Jonas Dreßler
723c0a6e61 status/network: Sync active connections again on connection-added
NetworkManagers NmClient has a bug for wireguard connections where the
notify::active-connections and connection-added are emitted in the wrong order:
When a wireguard connection gets activated, notify::active-connections is
emitted first, then connection-added happens.

We currently expect these signals to emitted in the correct order, so our VPN
toggle is not actually updated when a wireguard connection is established.

Until this bug is fixed in NetworkManager, work it around by calling
_syncActiveConnections() manually after we see ::connection-added.

NM issue: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1483

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6656
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3219>
2024-03-01 17:32:07 +01:00
Florian Müllner
1e882ba8dc dbusServices/extensions: Override destroy() method
Some extensions try to destroy the provided dialog, so they can
instead show the preferences in an alternative way.

Unfortunately that is undetectable from the Extensions service,
which still thinks the dialog is open, and will therefore block
other prefs dialogs.

Try to steer extensions away from that anti-pattern (or at the
very least switch to `close()` which doesn't break) by overriding
the window's destroy() method and show an extension error instead.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3209>
2024-03-01 15:00:46 +00:00
Jonas Dreßler
db490dbaf7 screencastService: Add gstreamer pipeline for h264 encoding
Add pipelinea for h264 software encoding using openh264. This is the least
problematic (from a patent perspective) software encoder for h264, Fedora
ships it in a pre-installed repo and it can be enabled very easily. Most
people should have it enabled already to allow for decoding of h264 content.
Unlike vp8enc, this encoder is optimized for realtime and is really fast, it
outperforms the vp8 encoder by an order of magnitude and should allow for
smooth recordings even on older hardware.

The reason why mp4 was chosen as a container format over mkv is that mp4
can be played inside firefox and chromium, whereas mkv can't be played.
It's ensured that the mp4 file is still playable in case the recording
got cancelled by using the "first-moov-then-finalise" fragment-mode on
mp4mux.

Even though h264 is problematic from a patent perspective and often can't
be shipped by default, it still the best supported and most popular codec
out there. The software encoders and decoders are really fast, it's used
everywhere on the web, and it can be hardware decoded on almost any device
out there.

See also: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2080

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3211>
2024-03-01 12:08:54 +00:00
Jonas Dreßler
9a0e422a6b screencastService: Allow for file extensions depending on encoder used
Depending on the encoder we want to use a different container format and
therefore a different file extension. Right now this file extension is
forced to be webm, so shuffle things around a bit to make that more
dynamic.

Note that this also introduces removing for the old file created by the
recorder, otherwise it would create an empty "mp4" file every time it
falls back from "mp4" to "webm".

To be nice to external (ie. not gnome-shell) consumers of the
screencastService, let's not break the API completely, and detect the
".webm" suffix a little longer to not end up with weird file.webm.webm
filenames.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3211>
2024-03-01 12:08:54 +00:00
Joan Torres
578878e759 loginDialog: Close conflicting session dialog after 60 secs
When the stop conflicting session dialog is opened, use a timeout of 60
seconds to close it.
This is an attempt to keep security in the situation where the user leaves,
the system is left unsupervised and the dialog is opened; allowing anyone
to stop the old session and start a new session.

When the dialog is closed by the timeout, a notification apperars informing
about that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3134>
2024-02-29 20:42:52 +00:00
Joan Torres
df84854d90 loginDialog: On login, allow logout a conflicting session
When opening a session, find if there's already a session opened for the
same user with the help of Loginmanager.
When it's found, display the conflicting session dialog.

The logout dialog allows shutting down the conflicting session using the
greeter dbus method "StopConflictingSession".

If the dialog is already opened and the conflicting session has been
closed on its side, the new session will start.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3134>
2024-02-29 20:42:52 +00:00
Joan Torres
d8fc37adc3 loginDialog: Add ConflictingSessionDialog
This dialog will be used by the next commit when a session is being opened but
there's already a conflicting session opened.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3134>
2024-02-29 20:42:52 +00:00
Joan Torres
3517749537 loginManager: Add session-removed signal and getSession method
These changes will be used by the next commit when displaying a
conflicting session dialog.

session-removed signal will be used to close the conflicting session dialog
if it's not needed anymore.

getSession method will be used when a session is opened, to check if
there's already a conflicting opened session.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3134>
2024-02-29 20:42:52 +00:00
Carlos Garnacho
8164877997 keyboard: Add "url" keyboard for URL typing
This is basically an english keyboard, with some helper
keys to help typing URLs.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
391b0d4ef3 keyboard: Add "email" OSK variant for EMAIL purpose hint
Not too fancy at the moment, just an "us" keymap, with the emoji
key replaced by '@'. Can be improved in the future.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
7db0e01b24 keyboard: Forward/handle content hints
Forward these from the IM, and handle the ones involving
the OSK state: lowercase/uppercase/auto_capitalization/titlecase.
The latter two involve peeking at the surrounding text, to figure
out if it makes sense to toggle keyboard level.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
64d300b525 inputMethod: Honor the "private" IBusInputHint
This enum value was added in IBus 1.5.26, forward our own
"sensitive data" enum that way to the IMs.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
ff063acd1f ibusManager: Avoid changes to ibus-typing-booster configuration
The ibus-typing-booster IM module is already meant to do the "right"
thing when the IBus.Capabilite.OSK hint is passed to the IM. We do
already honor that hint (commit 23bfd08b3c9), and ibus-typing-booster
has been doing this for a reasonably long time (first release seems
to be 2.19.9 dated 2 years ago, current is 2.24.12).

Drop this mangling of foreign settings, and let ibus-typing-booster
figure out the optimal configuration given the presence of an OSK.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
741355e2cd keyboard: Refactor 'commit' action handling
Move the complex parts of this mechanism from the Keyboard object
to the KeyboardController object, replaced by code that is easier to
follow.

Also, keyval guessing is deferred to a later point in the commit
procedure so so it does not happen for a single character only,
this way we can send multi-character input through the IM, which
is necessary for some OSK layouts.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7190
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
f0b18c9ccc keyboard: Separate keyval action notification
Add a distinct signal for keys defining a keyval to have it handled
via event emulation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
4d71d9f46d keyboard: Support OSK layout modes explicitly
We only support "latched" which stays toggled on for a single
character unless long-pressed. Support "default" mode explicitly
to switch back to the default level, leaving "locked" implicitly
supported as the way to stay in the same level.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
81670e1543 keyboard: Close keyboard immediately on Clutter.InputPanelState.OFF
This is already covered by a timeout to handle focus transitions between
windows at the Clutter.InputMethod implementation, we can react immediately
and avoid chaining up timeouts.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
d917661ce8 keyboard: Close keyboard immediately on user interaction
When the user presses the hide button, the rest timeout feels
like lag in that case. Avoid it in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
542263601b keyboard: Make emoji "hide keyboard" key icon consistent
It was stuck with an older icon, we've gained a specific icon
for this action since.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
9a340c6d66 keyboard: Simplify KeyContainer
We no longer have any guesswork during layout creation,
we can attach key actors directly to the grid without a second
step.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:22 +01:00
Carlos Garnacho
6e80f858c8 keyboard: Move backspace key handling to KeyboardController
Move the more action-y code to the controller, and let the Keyboard
object command it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:42:20 +01:00
Carlos Garnacho
f3c26ae17f keyboard: Minor refactor
This small function is just called from a single place,
drop it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:34:21 +01:00
Carlos Garnacho
834be93666 keyboard: Drop dead code
This getGroups() method was not called anywhere for
a long time, the last user was dropped at commit
8fdf47ea5b ("keyboard: Do not create widgetry for
all keyboard groups at once").

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:34:21 +01:00