[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 242/331] Add a separate flag for refreshing just the UI
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 242/331] Add a separate flag for refreshing just the UI
- Date: Wed, 4 May 2016 14:18:52 +0000 (UTC)
commit afec556fb3f0bc25f1356256402bfbc2fc7b1c26
Author: William Hua <william hua canonical com>
Date: Fri Apr 15 09:29:02 2016 -0400
Add a separate flag for refreshing just the UI
src/gs-application.c | 4 ++--
src/plugins/gs-plugin-appstream.c | 8 +++++---
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index cad567f..ce13352 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -252,7 +252,7 @@ refreshed_cb (GObject *source_object,
if (gs_plugin_loader_refresh_finish (loader, res, NULL)) {
gs_plugin_loader_refresh_async (loader,
0,
- GS_PLUGIN_REFRESH_FLAGS_UPDATES,
+ GS_PLUGIN_REFRESH_FLAGS_UPDATES | GS_PLUGIN_REFRESH_FLAGS_UI,
NULL,
NULL,
NULL);
@@ -268,7 +268,7 @@ start_refresh (GsApplication *app)
gs_plugin_loader_refresh_async (gs_application_get_plugin_loader (app),
0,
- GS_PLUGIN_REFRESH_FLAGS_UPDATES,
+ GS_PLUGIN_REFRESH_FLAGS_UPDATES | GS_PLUGIN_REFRESH_FLAGS_UI,
NULL,
refreshed_cb,
app);
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 8d3dfe5..ffc9241 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -76,9 +76,11 @@ gs_plugin_refresh (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- plugin->priv->done_init = FALSE;
- gs_plugin_appstream_startup (plugin, NULL);
- gs_plugin_updates_changed (plugin);
+ if (flags & GS_PLUGIN_REFRESH_FLAGS_UI) {
+ plugin->priv->done_init = FALSE;
+ gs_plugin_appstream_startup (plugin, NULL);
+ gs_plugin_updates_changed (plugin);
+ }
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]