[gnome-software] Set a cache age when using PackageKit
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Set a cache age when using PackageKit
- Date: Wed, 2 Oct 2013 08:55:01 +0000 (UTC)
commit 31c0590f184f84bab9e8564e2c67f4de707402c4
Author: Richard Hughes <richard hughsie com>
Date: Wed Oct 2 09:50:33 2013 +0100
Set a cache age when using PackageKit
In this case, set a cache age of 'we don't care'.
src/plugins/gs-plugin-packagekit-refine.c | 6 +++---
src/plugins/gs-plugin-packagekit-updates.c | 6 +++---
src/plugins/gs-plugin-packagekit.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index b35b705..0a846e5 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -51,9 +51,9 @@ gs_plugin_initialize (GsPlugin *plugin)
/* create private area */
plugin->priv = GS_PLUGIN_GET_PRIVATE (GsPluginPrivate);
plugin->priv->client = pk_client_new ();
- g_object_set (plugin->priv->client,
- "background", FALSE,
- NULL);
+ pk_client_set_background (plugin->priv->client, FALSE);
+ pk_client_set_interactive (plugin->priv->client, FALSE);
+ pk_client_set_cache_age (plugin->priv->client, G_MAXUINT);
}
/**
diff --git a/src/plugins/gs-plugin-packagekit-updates.c b/src/plugins/gs-plugin-packagekit-updates.c
index 71e062c..e15187a 100644
--- a/src/plugins/gs-plugin-packagekit-updates.c
+++ b/src/plugins/gs-plugin-packagekit-updates.c
@@ -51,9 +51,9 @@ gs_plugin_initialize (GsPlugin *plugin)
/* create private area */
plugin->priv = GS_PLUGIN_GET_PRIVATE (GsPluginPrivate);
plugin->priv->task = pk_task_new ();
- g_object_set (plugin->priv->task,
- "background", FALSE,
- NULL);
+ pk_client_set_background (PK_CLIENT (plugin->priv->task), FALSE);
+ pk_client_set_interactive (PK_CLIENT (plugin->priv->task), FALSE);
+ pk_client_set_cache_age (PK_CLIENT (plugin->priv->task), G_MAXUINT);
}
/**
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index 88c8344..e7b4a86 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -51,9 +51,9 @@ gs_plugin_initialize (GsPlugin *plugin)
/* create private area */
plugin->priv = GS_PLUGIN_GET_PRIVATE (GsPluginPrivate);
plugin->priv->task = pk_task_new ();
- g_object_set (plugin->priv->task,
- "background", FALSE,
- NULL);
+ pk_client_set_background (PK_CLIENT (plugin->priv->task), FALSE);
+ pk_client_set_interactive (PK_CLIENT (plugin->priv->task), FALSE);
+ pk_client_set_cache_age (PK_CLIENT (plugin->priv->task), G_MAXUINT);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]