On the Verify Encryption dialog we were adding a GtkWindowControls
widget with a button child. This is a misunderstanding of the behavior
of GtkWindowControls, which adds its own buttons to the window.
Let's remove our custom close-button and its callback, since the
previous commit disabled this codepath for hiding the dialog.
getlogin() can fail for several reasons as detailed in the man page, and
the current behaviour is a segmentation fault when it fails with NULL,
such as due to an unset loginuid.
* Check return value for error and act accordingly.
* Change to getpwuid(getuid())->pw_name, which is less likely to error.
Instead of using a plain "flat" button positioned at the window corner,
let's use GtkWindowControls to wrap the close button and get the
default window control styling and alignment.
Fixes#1737
Turning off the service doesn't mean we need to disable the RDP backend,
the setting can stay enabled in case one wants to manage it directly via
systemd.
If no password or username was set (not even an empty one), initialize
them to something, specifically the username of the user of the session,
and a auto generated password.
This copies TLS certificate generation implementation from
https://gitlab.gnome.org/chergert/bonsai. No changes were made other
than ones required for making it build as part of gnome-control-center's
sharing panel. It's currently not suitable to depend on libbonsai, as it
will likely see big changes before seeing a release.
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.
panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
AdwActionRow handles many of the properties we use
CcListRow for. We can re-use it instead of re-creating it.
CcListRow is now an AdwActionRow with three suffixes.
The `activatable-widget` is set when the switch is visible.
Since our `icon-name` property was only used for the arrow
icon, it has been replaced with a `show-arrow` property.
The `bold` property has been removed - it was only used in
one place, and it's not a pattern used in other apps.
I decided to go this route because replacing all the
instances of CcListRow with AdwActionRow directly would
end up being more code.
vino does not work in Wayland sessions and gnome-settings-daemon
removed vino support in [1] which will effectively not start
'vino-server' any more.
The replacement for vino is gnome-remote-desktop since it works in both
Wayland and X11 sessions.
The gnome-remote-desktop sharing panel however is currently only shown
for Wayland sessions, which makes it harder to use it for X11 sessions
since the user has to login into the Wayland sessions just to be able
to enable gnome-remote-desktop.
Therefore, also remove vino from g-c-c and replace it with
gnome-remote-desktop for X11 sessions, too.
[1] https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/135
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/212
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/937
The Screen Sharing dialog used to have a switch, which was changed to a
checkbox in 8b68961431
However, unlike switches, checkboxes are expected to have clicable labels
Let's set the label properly, instead of doing it the switch way.
Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/565
If we are going through mutter's RemoteDesktop interface, we don't
seemingly remember the password set. Add support for reading it
from secrets and change the entry password on dialog construction,
to bring it on par with our vino handling.
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
When adding a Shared Folder row to the listbox, we were not settings
it to visible. Causing it to be hidden until the next time the panel
gets populated.
Fixes#580