[evolution-ews] Add refresh interval options to non-mail sources
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Add refresh interval options to non-mail sources
- Date: Tue, 14 May 2019 13:39:17 +0000 (UTC)
commit e4e8d4cc3ee2bc8d6f30cc8f69442294524fe619
Author: Milan Crha <mcrha redhat com>
Date: Tue May 14 15:39:44 2019 +0200
Add refresh interval options to non-mail sources
This adds the "Refresh every X minutes/hours/days" option to address
book, calendar, memo list and task list sources, thus users can
influence easily when the backend will invoke the refresh.
src/configuration/e-book-config-ews.c | 16 ++++++++++++++--
src/configuration/e-cal-config-ews.c | 11 +++++++++++
2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/src/configuration/e-book-config-ews.c b/src/configuration/e-book-config-ews.c
index edfe192e..5056c454 100644
--- a/src/configuration/e-book-config-ews.c
+++ b/src/configuration/e-book-config-ews.c
@@ -68,8 +68,8 @@ book_config_ews_allow_creation (ESourceConfigBackend *backend)
}
static void
-book_config_ews_insert_widgets (ESourceConfigBackend *backend,
- ESource *scratch_source)
+book_config_ews_maybe_insert_gal_options (ESourceConfigBackend *backend,
+ ESource *scratch_source)
{
CamelEwsSettings *ews_settings;
ESource *source;
@@ -125,6 +125,18 @@ book_config_ews_insert_widgets (ESourceConfigBackend *backend,
}
}
+static void
+book_config_ews_insert_widgets (ESourceConfigBackend *backend,
+ ESource *scratch_source)
+{
+ if (!scratch_source)
+ return;
+
+ book_config_ews_maybe_insert_gal_options (backend, scratch_source);
+
+ e_source_config_add_refresh_interval (e_source_config_backend_get_config (backend), scratch_source);
+}
+
static void
e_book_config_ews_class_init (EBookConfigEwsClass *class)
{
diff --git a/src/configuration/e-cal-config-ews.c b/src/configuration/e-cal-config-ews.c
index e1868d58..f17253b9 100644
--- a/src/configuration/e-cal-config-ews.c
+++ b/src/configuration/e-cal-config-ews.c
@@ -51,6 +51,16 @@ cal_config_ews_allow_creation (ESourceConfigBackend *backend)
return allow_creation;
}
+static void
+cal_config_ews_insert_widgets (ESourceConfigBackend *backend,
+ ESource *scratch_source)
+{
+ if (!scratch_source)
+ return;
+
+ e_source_config_add_refresh_interval (e_source_config_backend_get_config (backend), scratch_source);
+}
+
static void
e_cal_config_ews_class_init (ECalConfigEwsClass *class)
{
@@ -63,6 +73,7 @@ e_cal_config_ews_class_init (ECalConfigEwsClass *class)
backend_class = E_SOURCE_CONFIG_BACKEND_CLASS (class);
backend_class->backend_name = "ews";
backend_class->allow_creation = cal_config_ews_allow_creation;
+ backend_class->insert_widgets = cal_config_ews_insert_widgets;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]