From 77ac09aa04c26a88b3c75466ab3c8432b3682b0c Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 27 Mar 2018 18:02:44 -0300 Subject: [PATCH] notification: Cache D-Bus proxy --- panels/notifications/cc-notifications-panel.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c index 1265b5b6f..0b1b834ca 100644 --- a/panels/notifications/cc-notifications-panel.c +++ b/panels/notifications/cc-notifications-panel.c @@ -25,6 +25,7 @@ #include #include +#include "shell/cc-object-storage.h" #include "shell/list-box-helper.h" #include "cc-notifications-panel.h" #include "cc-notifications-resources.h" @@ -150,7 +151,7 @@ on_perm_store_ready (GObject *source_object, GDBusProxy *proxy; GError *error = NULL; - proxy = g_dbus_proxy_new_for_bus_finish (res, &error); + proxy = cc_object_storage_create_dbus_proxy_finish (res, &error); if (proxy == NULL) { if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) @@ -241,15 +242,14 @@ cc_notifications_panel_init (CcNotificationsPanel *panel) gtk_widget_show (w); - g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, - G_DBUS_PROXY_FLAGS_NONE, - NULL, - "org.freedesktop.impl.portal.PermissionStore", - "/org/freedesktop/impl/portal/PermissionStore", - "org.freedesktop.impl.portal.PermissionStore", - panel->apps_load_cancellable, - on_perm_store_ready, - panel); + cc_object_storage_create_dbus_proxy (G_BUS_TYPE_SESSION, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.impl.portal.PermissionStore", + "/org/freedesktop/impl/portal/PermissionStore", + "org.freedesktop.impl.portal.PermissionStore", + panel->apps_load_cancellable, + on_perm_store_ready, + panel); } static const char *