The fallback for creating models is to try the next one in case the current
one can not be created, until we fall all the way back to the US layout.
Obviously we shouldn't fall back in case creating the model actually worked,
so break out of the loop and then use the new model.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3230>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Since we now just store the current group, we do not need to track
closely source changes vs selection changes in the available sources.
We just re-generate the current OSK keymap for all, so coalesce both
signals into a more generic "group-changed".
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
And fix it so it is effective again. This is a small piece of
smarts the code needs to earn, so that keys with the "emoji"
action are hidden, and their width assigned to the next key.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
And drop some more guesswork in the code, since some layouts have
less than 4 levels. This also allows for having OSK maps with more
than 4 levels. Let us hope that the sanity of our future kin will
remain below that threshold.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>