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 9 minutes and 1 second (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #354625
build

00:07:46

 
  Test
passed #354627
asan

00:01:12

passed #354626
test

00:01:14

 
  Manual
manual #354632
allowed to fail manual
armv8
manual #354628
allowed to fail manual
flatpak
manual #354631
allowed to fail manual
msan
manual #354633
allowed to fail manual
ppc64le
manual #354629
allowed to fail manual
tsan
manual #354630
allowed to fail manual
ubsan
 
  Review
manual #354634
allowed to fail manual
review
manual #354635
allowed to fail manual
stop_review