[gnome-software] Watch the AppStream store for changes
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Watch the AppStream store for changes
- Date: Tue, 28 Jul 2015 12:16:53 +0000 (UTC)
commit 419631d6fe6180ef67f93f9156d874a5b8d7a3af
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 28 11:30:41 2015 +0100
Watch the AppStream store for changes
This ensures we always pick up changes when other programs write files.
configure.ac | 2 +-
src/plugins/gs-plugin-appstream.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e2c5b8f..51f9194 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.16 gio-unix-2.0)
PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib2 >= 1.0.0)
-PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.3.5)
+PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.4.2)
PKG_CHECK_MODULES(SQLITE, sqlite3)
PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42)
PKG_CHECK_MODULES(GSETTINGS_DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.11.5)
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 0f9f2a5..d124da4 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -91,6 +91,9 @@ gs_plugin_initialize (GsPlugin *plugin)
plugin->priv = GS_PLUGIN_GET_PRIVATE (GsPluginPrivate);
g_mutex_init (&plugin->priv->store_mutex);
plugin->priv->store = as_store_new ();
+ as_store_set_watch_flags (plugin->priv->store,
+ AS_STORE_WATCH_FLAG_ADDED |
+ AS_STORE_WATCH_FLAG_REMOVED);
g_signal_connect (plugin->priv->store, "changed",
G_CALLBACK (gs_plugin_appstream_store_changed_cb),
plugin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]