[gnome-software] overview: Only mark the cache valid when all load tasks have completed
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] overview: Only mark the cache valid when all load tasks have completed
- Date: Mon, 15 Sep 2014 22:11:49 +0000 (UTC)
commit efa189adff82c20b237f0e8bdc0395a0154ceb89
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Sep 15 19:12:20 2014 +0200
overview: Only mark the cache valid when all load tasks have completed
src/gs-shell-overview.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-shell-overview.c b/src/gs-shell-overview.c
index 547ac6f..e0923ee 100644
--- a/src/gs-shell-overview.c
+++ b/src/gs-shell-overview.c
@@ -132,8 +132,10 @@ out:
gs_plugin_list_free (list);
priv->loading_popular = FALSE;
priv->refresh_count--;
- if (priv->refresh_count == 0)
+ if (priv->refresh_count == 0) {
+ priv->cache_valid = TRUE;
g_signal_emit (shell, signals[SIGNAL_REFRESHED], 0);
+ }
}
static void
@@ -185,8 +187,10 @@ out:
gs_plugin_list_free (list);
priv->loading_popular_rotating = FALSE;
priv->refresh_count--;
- if (priv->refresh_count == 0)
+ if (priv->refresh_count == 0) {
+ priv->cache_valid = TRUE;
g_signal_emit (shell, signals[SIGNAL_REFRESHED], 0);
+ }
}
static void
@@ -236,8 +240,10 @@ out:
gs_plugin_list_free (list);
priv->loading_featured = FALSE;
priv->refresh_count--;
- if (priv->refresh_count == 0)
+ if (priv->refresh_count == 0) {
+ priv->cache_valid = TRUE;
g_signal_emit (shell, signals[SIGNAL_REFRESHED], 0);
+ }
}
static void
@@ -295,11 +301,12 @@ out:
}
gtk_widget_set_visible (priv->category_heading, has_category);
- priv->cache_valid = TRUE;
priv->loading_categories = FALSE;
priv->refresh_count--;
- if (priv->refresh_count == 0)
+ if (priv->refresh_count == 0) {
+ priv->cache_valid = TRUE;
g_signal_emit (shell, signals[SIGNAL_REFRESHED], 0);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]