[gnome-software] Never schedule more than one updates reload
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Never schedule more than one updates reload
- Date: Tue, 2 Sep 2014 10:56:44 +0000 (UTC)
commit 773b911e38c74b1ef7c54b3850e37e1a0625e69a
Author: Richard Hughes <richard hughsie com>
Date: Tue Sep 2 11:56:31 2014 +0100
Never schedule more than one updates reload
src/gs-shell-updates.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index 34b0d89..1560bd7 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -61,6 +61,7 @@ struct GsShellUpdatesPrivate
GSettings *settings;
GSettings *desktop_settings;
gboolean cache_valid;
+ gboolean in_progress;
GsShell *shell;
PkControl *control;
GsPluginStatus last_status;
@@ -492,6 +493,7 @@ gs_shell_updates_get_updates_cb (GsPluginLoader *plugin_loader,
}
gs_plugin_list_free (list);
+ priv->in_progress = FALSE;
}
/**
@@ -503,8 +505,10 @@ gs_shell_updates_load (GsShellUpdates *shell_updates)
GsShellUpdatesPrivate *priv = shell_updates->priv;
guint64 refine_flags;
+ if (priv->in_progress)
+ return;
+ priv->in_progress = TRUE;
gs_container_remove_all (GTK_CONTAINER (priv->list_box_updates));
-
refine_flags = GS_PLUGIN_REFINE_FLAGS_DEFAULT |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_DETAILS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]