[gnome-control-center/wip/hadess/parental-controls-fixes: 3/3] user-accounts: Add debug when launching malcontent-control




commit 14d29b8e45504b475ffb07a6a5617ba064892802
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Aug 26 17:20:56 2021 +0200

    user-accounts: Add debug when launching malcontent-control

 panels/user-accounts/cc-user-panel.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index 249daa578..aa273fca2 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -1214,7 +1214,11 @@ spawn_malcontent_control (CcUserPanel *self)
 #endif  /* HAVE_MALCONTENT_0_10 */
                         NULL
                 };
-                g_spawn_async (NULL, (char **)argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
+                g_autoptr(GError) error = NULL;
+                if (!g_spawn_async (NULL, (char **)argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, 
&error))
+                        g_debug ("Couldn't launch malcontent-control: %s", error->message);
+        } else {
+                g_debug ("Not launching malcontent because selected user is an admin");
         }
 }
 #endif


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