[gnome-todo] eds/task-list: Integrate with ESourceRefresh
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] eds/task-list: Integrate with ESourceRefresh
- Date: Wed, 18 Sep 2019 18:47:03 +0000 (UTC)
commit 929590ed7241453d6c3fbb33270a35141dc09688
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Sep 18 15:40:32 2019 -0300
eds/task-list: Integrate with ESourceRefresh
This is the EDS-friendly way to set a refresh timeout.
plugins/eds/gtd-task-list-eds.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/plugins/eds/gtd-task-list-eds.c b/plugins/eds/gtd-task-list-eds.c
index 748bbdb..f6fc036 100644
--- a/plugins/eds/gtd-task-list-eds.c
+++ b/plugins/eds/gtd-task-list-eds.c
@@ -892,6 +892,7 @@ gtd_task_list_eds_set_source (GtdTaskListEds *self,
ESource *source)
{
ESourceSelectable *selectable;
+ ESourceRefresh *refresh;
GdkRGBA color;
g_return_if_fail (GTD_IS_TASK_LIST_EDS (self));
@@ -953,6 +954,13 @@ gtd_task_list_eds_set_source (GtdTaskListEds *self,
G_CALLBACK (on_source_removable_changed_cb),
self);
+ /* Refresh timeout */
+ refresh = e_source_get_extension (source, E_SOURCE_EXTENSION_REFRESH);
+ e_source_refresh_set_enabled (refresh, TRUE);
+ e_source_refresh_set_interval_minutes (refresh, 5);
+
+ e_source_write (source, NULL, NULL, NULL);
+
g_object_notify (G_OBJECT (self), "source");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]