[gnome-calendar] window: simplify refresh sources timeout code
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: simplify refresh sources timeout code
- Date: Sat, 3 Jan 2015 20:48:47 +0000 (UTC)
commit 3cde8ad4f486a6d8acc90776380e0a9c4f2ae6e2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jan 3 18:41:19 2015 -0200
window: simplify refresh sources timeout code
src/gcal-window.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 6ccb886..ee9a28c 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -818,19 +818,15 @@ static gboolean
refresh_sources (GcalWindow *window)
{
GcalWindowPrivate *priv;
- static gint current_timeout = 0;
+ static gint current_timeout = FAST_REFRESH_TIMEOUT;
priv = gcal_window_get_instance_private (window);
- /* update current_timeout the first time it's called */
- if (current_timeout == 0)
- current_timeout = priv->refresh_timeout;
-
/* refresh sources */
gcal_manager_refresh (priv->manager);
/* check window state */
- if (current_timeout != 0 && current_timeout != priv->refresh_timeout)
+ if (current_timeout != priv->refresh_timeout)
{
current_timeout = priv->refresh_timeout;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]