[gnome-software] Only mark the transaction as background if not user-initiated
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Only mark the transaction as background if not user-initiated
- Date: Mon, 28 Sep 2015 11:35:36 +0000 (UTC)
commit c9ed4042e6053fb5dabcc15b4d9885f511883c40
Author: Richard Hughes <richard hughsie com>
Date: Mon Sep 28 09:38:13 2015 +0100
Only mark the transaction as background if not user-initiated
src/plugins/gs-plugin-packagekit-refresh.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index 76060e4..ba90a9d 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -52,7 +52,6 @@ gs_plugin_initialize (GsPlugin *plugin)
/* create private area */
plugin->priv = GS_PLUGIN_GET_PRIVATE (GsPluginPrivate);
plugin->priv->task = pk_task_new ();
- pk_client_set_background (PK_CLIENT (plugin->priv->task), FALSE);
pk_client_set_interactive (PK_CLIENT (plugin->priv->task), FALSE);
}
@@ -117,6 +116,9 @@ gs_plugin_refresh (GsPlugin *plugin,
if ((flags & GS_PLUGIN_REFRESH_FLAGS_UPDATES) == 0)
return TRUE;
+ /* cache age of 0 is user-initiated */
+ pk_client_set_background (PK_CLIENT (plugin->priv->task), cache_age > 0);
+
/* update UI as this might take some time */
gs_plugin_status_update (plugin, NULL, GS_PLUGIN_STATUS_WAITING);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]