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.
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 should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
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
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
The warning is:
(gnome-control-center:29760): Gtk-CRITICAL **: 11:45:48.076: gtk_widget_is_visible: assertion 'GTK_IS_WIDGET (widget)' failed
This is due to the code trying to disable switches that only exist if support
for that feature is available.
Since the switches for media, personal file, and screen sharing are in the header bar of the
respective dialogs, they are not visible when we click on the master switch. This caused the
check in OFF_IF_VISIBLE to always fail.
Fix it by checking if the corresponding button in the main list box is visible, instead.
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/240
The entry was not bound. Due to this we could run into a segfault trying
to query the hostname_entry. This would only happen if avahi is not
running.
Fixes#178
Enable support for manipulating GNOME Remote Desktop settings. Settings
are done via the org.gnome.desktop.remote-desktop.vnc schema.
Configuring the VNC password is done via libsecret, thus libsecret is
added as a dependency.
The way it works is independent of the service so there's no reason
not to show it. We should also hide the remote-control-box widget
hierarchy since those can't be used here.
https://bugzilla.gnome.org/show_bug.cgi?id=786565
This allows enabling screen sharing support under Wayland, as long as
the org.gnome.Mutter.RemoteDesktop D-Bus name is exported by mutter /
gnome-shell. That name will currently only be exported if the
corresponding experimental features has been added to mutter.
So far nothing is configurable, as gnome-remote-desktop is yet to be
configureable.
https://bugzilla.gnome.org/show_bug.cgi?id=786565