[gnome-control-center] sharing/systemd-service: Treat 'static' state as enabled



commit 58a3229cfcd051a3aea066f0f85e6a0a7352e68c
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Mar 3 16:56:12 2022 +0100

    sharing/systemd-service: Treat 'static' state as enabled
    
    Quoting the documentation:
    
    > static indicates that the unit is statically enabled, i.e. always
    > enabled and doesn't need to be enabled explicitly

 panels/sharing/cc-systemd-service.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/panels/sharing/cc-systemd-service.c b/panels/sharing/cc-systemd-service.c
index 0b720074e..d2b634676 100644
--- a/panels/sharing/cc-systemd-service.c
+++ b/panels/sharing/cc-systemd-service.c
@@ -112,10 +112,11 @@ cc_is_service_active (const char  *service,
   g_variant_get_child (unit_state_prop, 0, "v", &unit_state_variant);
   unit_state = g_variant_get_string (unit_state_variant, NULL);
 
-  if (g_strcmp0 (unit_state, "enabled") != 0)
+  if (g_strcmp0 (unit_state, "enabled") == 0 ||
+      g_strcmp0 (unit_state, "static") == 0)
+    return TRUE;
+  else
     return FALSE;
-
-  return TRUE;
 }
 
 gboolean


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