[gnome-control-center] applications: Fix only connected snap interfaces showing
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] applications: Fix only connected snap interfaces showing
- Date: Thu, 16 Apr 2020 03:53:21 +0000 (UTC)
commit f246d40e9558eb1bbb18bddb4d4f6e21d3f6644f
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 b1a01568e..bc947e34a 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -635,8 +635,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))
@@ -658,6 +658,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]