[gnome-packagekit] If the use has set get-updates policy to never, then ignore updates-changed events. Fixes rh#509104
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-packagekit] If the use has set get-updates policy to never, then ignore updates-changed events. Fixes rh#509104
- Date: Wed, 1 Jul 2009 12:57:49 +0000 (UTC)
commit cba7459514e19fc1ab9b1333f6dd2c402329d793
Author: Richard Hughes <richard hughsie com>
Date: Wed Jul 1 13:55:49 2009 +0100
If the use has set get-updates policy to never, then ignore updates-changed events. Fixes rh#509104
src/gpk-check-update.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index c2d386b..7a4b61e 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -1014,7 +1014,7 @@ out:
static gboolean
gpk_check_update_query_updates_idle_cb (GpkCheckUpdate *cupdate)
{
- egg_warning ("idle cb");
+ egg_debug ("idle cb");
gpk_check_update_query_updates (cupdate, TRUE);
return FALSE;
}
@@ -1025,10 +1025,19 @@ gpk_check_update_query_updates_idle_cb (GpkCheckUpdate *cupdate)
static void
gpk_check_update_updates_changed_cb (PkControl *control, GpkCheckUpdate *cupdate)
{
+ guint thresh;
+
g_return_if_fail (GPK_IS_CHECK_UPDATE (cupdate));
+ /* if we don't want to auto check for updates, don't do this either */
+ thresh = gconf_client_get_int (cupdate->priv->gconf_client, GPK_CONF_FREQUENCY_GET_UPDATES, NULL);
+ if (thresh == 0) {
+ egg_debug ("not when policy is to never get updates");
+ return;
+ }
+
/* now try to get newest update list */
- egg_warning ("updates changed");
+ egg_debug ("updates changed, so getting new update list");
g_idle_add ((GSourceFunc) gpk_check_update_query_updates_idle_cb, cupdate);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]