sharing: Fix warning when disabling sharing

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.
11 jobs for sharing-toggle-on-off-warning in 4 minutes and 3 seconds (queued for 4 seconds)
latest
Status Job ID Name Coverage
  Build
passed #205584
build

00:01:39

 
  Test
passed #205586
asan

00:02:23

passed #205585
test

00:01:54

 
  Manual
manual #205591
allowed to fail manual
armv8
manual #205587
allowed to fail manual
flatpak
manual #205590
allowed to fail manual
msan
manual #205592
allowed to fail manual
ppc64le
manual #205588
allowed to fail manual
tsan
manual #205589
allowed to fail manual
ubsan
 
  Review
manual #205593
allowed to fail manual
review
manual #205594
allowed to fail manual
stop_review