[evolution-data-server] Bug 785393 - [ESourceRefresh] Let zero Refresh interval mean 'No periodic update'
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 785393 - [ESourceRefresh] Let zero Refresh interval mean 'No periodic update'
- Date: Wed, 26 Jul 2017 13:45:15 +0000 (UTC)
commit 5c7055b658c449fbdb9a31c44f15c7f6191db6b1
Author: Milan Crha <mcrha redhat com>
Date: Wed Jul 26 15:44:31 2017 +0200
Bug 785393 - [ESourceRefresh] Let zero Refresh interval mean 'No periodic update'
src/libedataserver/e-source-refresh.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/src/libedataserver/e-source-refresh.c b/src/libedataserver/e-source-refresh.c
index 7fb596b..253ee03 100644
--- a/src/libedataserver/e-source-refresh.c
+++ b/src/libedataserver/e-source-refresh.c
@@ -126,17 +126,18 @@ timeout_node_attach (TimeoutNode *node)
if (node->source != NULL)
return;
- interval_minutes =
- e_source_refresh_get_interval_minutes (node->extension);
- node->source = g_timeout_source_new_seconds (interval_minutes * 60);
+ interval_minutes = e_source_refresh_get_interval_minutes (node->extension);
+ if (interval_minutes > 0) {
+ node->source = g_timeout_source_new_seconds (interval_minutes * 60);
- g_source_set_callback (
- node->source,
- timeout_node_invoke,
- node,
- (GDestroyNotify) NULL);
+ g_source_set_callback (
+ node->source,
+ timeout_node_invoke,
+ node,
+ (GDestroyNotify) NULL);
- g_source_attach (node->source, node->context);
+ g_source_attach (node->source, node->context);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]