[gnome-control-center] sharing: Fix Remote Desktop on switch handling



commit 414d4537cd321729d641b69dd595585d71ce32e2
Author: Jeremy Bicha <jeremy bicha canonical com>
Date:   Wed Apr 20 13:24:42 2022 -0400

    sharing: Fix Remote Desktop on switch handling
    
    Previously, we were only checking if the gnome-remote-desktop
    user service was running but that service is always running
    as of
    https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/commit/7f4ef31fd38
    
    We need to check the gsettings key too.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1775

 panels/sharing/cc-sharing-panel.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index d126a2236..4c6d8b18f 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -1014,6 +1014,13 @@ remote_desktop_credentials_changed (CcSharingPanel *self)
 static gboolean
 is_remote_desktop_enabled (CcSharingPanel *self)
 {
+  g_autoptr(GSettings) rdp_settings = NULL;
+
+  rdp_settings = g_settings_new (GNOME_REMOTE_DESKTOP_RDP_SCHEMA_ID);
+
+  if (!g_settings_get_boolean (rdp_settings, "enable"))
+    return FALSE;
+
   return cc_is_service_active (REMOTE_DESKTOP_SERVICE, G_BUS_TYPE_SESSION);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]