[gnome-software/wip/hughsie/fwupd: 20/21] Invalidate the updates list when the firmware versions change
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/fwupd: 20/21] Invalidate the updates list when the firmware versions change
- Date: Wed, 11 Mar 2015 19:50:43 +0000 (UTC)
commit 0366349d87f97771892ca2d78ae40484a3c9b384
Author: Richard Hughes <richard hughsie com>
Date: Wed Mar 11 19:48:36 2015 +0000
Invalidate the updates list when the firmware versions change
src/plugins/gs-plugin-fwupd.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-fwupd.c b/src/plugins/gs-plugin-fwupd.c
index ccf81e9..7bcde5b 100644
--- a/src/plugins/gs-plugin-fwupd.c
+++ b/src/plugins/gs-plugin-fwupd.c
@@ -111,6 +111,20 @@ gs_plugin_destroy (GsPlugin *plugin)
}
/**
+ * gs_plugin_fwupd_changed_cb:
+ */
+static void
+gs_plugin_fwupd_changed_cb (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+ GVariant *parameters,
+ GsPlugin *plugin)
+{
+ if (g_strcmp0 (signal_name, "Changed") == 0)
+ gs_plugin_updates_changed (plugin);
+}
+
+/**
* gs_plugin_startup:
*/
static gboolean
@@ -131,6 +145,8 @@ gs_plugin_startup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
error);
if (plugin->priv->proxy == NULL)
return FALSE;
+ g_signal_connect (plugin->priv->proxy, "g-signal",
+ G_CALLBACK (gs_plugin_fwupd_changed_cb), plugin);
/* create the cache location */
plugin->priv->cachedir = g_build_filename (g_get_user_cache_dir (),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]