[gnome-control-center/gnome-3-36] applications: Fix only connected snap interfaces showing



commit ef0b5d4e8f381340b25844cf4edf7d4917d40ed3
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Apr 16 15:36:48 2020 +1200

    applications: Fix only connected snap interfaces showing
    
    Not enough information was being queried from snapd.

 panels/applications/cc-applications-panel.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c
index 450c2c9d9..59964b1ed 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -634,8 +634,8 @@ add_snap_permissions (CcApplicationsPanel *self,
 
   client = snapd_client_new ();
   if (!snapd_client_get_connections2_sync (client,
-                                           SNAPD_GET_CONNECTIONS_FLAGS_NONE,
-                                           snap_name, NULL,
+                                           SNAPD_GET_CONNECTIONS_FLAGS_SELECT_ALL,
+                                           NULL, NULL,
                                            NULL, NULL,
                                            &plugs, &slots,
                                            NULL, &error))
@@ -657,6 +657,10 @@ add_snap_permissions (CcApplicationsPanel *self,
                                                   "x11",
                                                   NULL };
 
+      /* Skip if not relating to this snap */
+      if (g_strcmp0 (snapd_plug_get_snap (plug), snap_name) != 0)
+        continue;
+
       /* Ignore interfaces that are too low level to make sense to show or disable */
       if (g_strv_contains (hidden_interfaces, snapd_plug_get_interface (plug)))
         continue;


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