Commit 9168f6055e marked the parameter as nullable, which is in
conflict with the precondition check. But given that NULL is
valid for the underlying ClutterText (and GtkLabel accepts it
as well), there's no strong argument for disallowing NULL, so
remove the precondition check.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2465>
Due to !2056 the monitor config is 2 instead of 4 on the desktop.
However, the constant `Meta.MonitorSwitchConfigType.UNKNOWN` is fixed to
4, and may cause the initial selection to be out of index thus fail to
display the switcher. This replaces the above constant to the actual
length of the switcher items.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2451>
If a device has multiple connections set up, then at most one of
those can be active at a time, which is why they are presented
as radio items.
In contrast, VPN connections are not mutually exclusive, each can
be turned on or off independently. Setting :radio-mode on them
currently means that VPN connections can be activated, but never
disabled.
So instead of abusing the :radio-mode property to give VPN items
the UI we want, use regular items that reflect the desired behavior
and explicitly set up the UI the way we want.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2426>
The object the SignalTracker belongs to is stored in a map managed by
the SignalManager which keeps a reference to that object. This map is
never destroyed nor is any entry ever removed. This leads to all objects
that ever had SignalTrackers used on them being kept alive even after
all references outside of the SignalTracker are long gone. This then
also extends to other objects which are leaked indirectly through
reference chains from these objects.
And if some of those objects are GObjects, this will prevent them from
being finalized, leaking further resources. A StWidget for example will
not release its shadow textures.
Fix this by using a WeakMap in SignalManager.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5807
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5796
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2450>
We got a shiny new screenshot UI last cycle, but only relatively
obscure ways of launching it: Keyboard shortcut or overview search.
The new quick settings provides us with a natural place to expose
the functionality more prominently, and at the same time reduce
the emptiness of the top row, in particular on systems without a
battery and when locked.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
We will expose the screenshot UI from quick settings, including
on the lock screen. It would be odd to restrict keyboard shortcuts
more than the more accessible UI, so relax the modes for the
screenshot-ui and screen-screenshot shortcuts.
We still disable all screenshot shortcuts on the login screen, as
users don't have an obvious way to retrieve the screenshot files.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
We currently don't take the session mode's `hasWindows` property
into account when deciding whether window screenshots should be
allowed. Right now that doesn't matter in practice, because all
the ways to bring up the screenshot UI are blocked in those modes
anyway. This is about to change though, so take the property into
account to prevent an information leak.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
It is currently not possible to bring up the screenshot UI while
locked, but that is about to change.
We still don't want screencasts in that case, because they are
much easier to abuse for filling up someone else's disk.
That restriction is enforced by inhibiting remote access in the
backend, so trying to create a screencast session will fail anyway.
Still, not offering an action that is unavailable is better than
having it fail silently, so do exactly that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
When we aren't showing the power toggle (read: on systems without
a battery), all items in the top are located on one side. Address
this by "moving" the spacer between "Settings" and "Screen Lock"
in that case to balance items a bit better.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
The quick settings code was first developed in an extension, which
meant it made sense to maintain compatibility with GNOME 42 and not
use the new :icon-name convenience property.
There is no good for sticking with that for GNOME 43 as well.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
Since we put the actual slider into a bin to get a proper focus
indication, the slider isn't focused anymore and its accessible object
is therefore invisible to the screen reader.
Fix this by passing the slider's accessible object to the actor
that takes the focus.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2431>
NetworkManager can check if a network interface has "internet access" by
invoking a HTTP request.
The URI used for connectivity checking in NetworkManager can be configured
manually in NetworkManager.conf:
[connectivity]
uri=http://portal-check.exmaple.com/nm-check.txt
Portal Helper provides an argument to pass the URI that should be opened.
If this argument is empty it uses http://nmcheck.gnome.org as a fallback.
Pass the URI configured in NetworkManager to Portal Helper instead of
an empty string.
Fixes#1313
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2228>
This prevents _sync() being called after actor destruction (since actor
destruction became more reliable in mutter@3d94c7cc2) and so eliminates
this shutdown error:
```
(gnome-shell:35197): Gjs-CRITICAL **: 16:31:02.769: Object .Gjs_ui_calendar_Placeholder (0x559ed6e547e0), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
== Stack trace for context 0x559ed6022310 ==
#0 559ed783c5a8 i resource:///org/gnome/shell/ui/calendar.js:1012 (31955be5fc90 @ 148)
#1 7ffef8f38230 b self-hosted:1178 (32af8f6b0c40 @ 454)
#2 559ed783c518 i resource:///org/gnome/shell/ui/popupMenu.js:806 (31955be18ce0 @ 52)
#3 559ed783c488 i resource:///org/gnome/shell/ui/popupMenu.js:954 (31955be190b0 @ 168)
#4 559ed783c3f8 i resource:///org/gnome/shell/ui/panelMenu.js:189 (31955be88150 @ 41)
#5 7ffef8f3de60 b self-hosted:1178 (32af8f6b0c40 @ 423)
```
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2429>