[evolution-exchange/gnome-2-32] Bug #629603 - Allow calendar refresh on demand
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-exchange/gnome-2-32] Bug #629603 - Allow calendar refresh on demand
- Date: Wed, 29 Sep 2010 10:15:31 +0000 (UTC)
commit 71fbefc146ec8f66ccc05c2a7ed8d88b858722cd
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 29 12:15:09 2010 +0200
Bug #629603 - Allow calendar refresh on demand
addressbook/e-book-backend-exchange.c | 6 ++++++
calendar/e-cal-backend-exchange-calendar.c | 15 +++++++++++++++
calendar/e-cal-backend-exchange-tasks.c | 15 +++++++++++++++
calendar/e-cal-backend-exchange.c | 3 ++-
4 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/e-book-backend-exchange.c b/addressbook/e-book-backend-exchange.c
index 8128708..b336669 100644
--- a/addressbook/e-book-backend-exchange.c
+++ b/addressbook/e-book-backend-exchange.c
@@ -813,6 +813,12 @@ e_book_backend_exchange_connect (EBookBackendExchange *be, GError **perror)
e_folder_exchange_subscribe (bepriv->folder,
E2K_CONTEXT_OBJECT_CHANGED, 30,
subscription_notify, be);
+ e_folder_exchange_subscribe (bepriv->folder,
+ E2K_CONTEXT_OBJECT_ADDED, 30,
+ subscription_notify, be);
+ e_folder_exchange_subscribe (bepriv->folder,
+ E2K_CONTEXT_OBJECT_REMOVED, 30,
+ subscription_notify, be);
bepriv->connected = TRUE;
e_book_backend_set_is_loaded (E_BOOK_BACKEND (be), TRUE);
diff --git a/calendar/e-cal-backend-exchange-calendar.c b/calendar/e-cal-backend-exchange-calendar.c
index f3d2ae5..7149042 100644
--- a/calendar/e-cal-backend-exchange-calendar.c
+++ b/calendar/e-cal-backend-exchange-calendar.c
@@ -593,6 +593,12 @@ open_calendar (ECalBackendSync *backend, EDataCal *cal,
e_folder_exchange_subscribe (E_CAL_BACKEND_EXCHANGE (backend)->folder,
E2K_CONTEXT_OBJECT_CHANGED, 30,
notify_changes, backend);
+ e_folder_exchange_subscribe (E_CAL_BACKEND_EXCHANGE (backend)->folder,
+ E2K_CONTEXT_OBJECT_ADDED, 30,
+ notify_changes, backend);
+ e_folder_exchange_subscribe (E_CAL_BACKEND_EXCHANGE (backend)->folder,
+ E2K_CONTEXT_OBJECT_REMOVED, 30,
+ notify_changes, backend);
thread = g_thread_create ((GThreadFunc) get_changed_events, E_CAL_BACKEND_EXCHANGE (backend), FALSE, &error);
if (!thread) {
@@ -602,6 +608,14 @@ open_calendar (ECalBackendSync *backend, EDataCal *cal,
}
}
+static void
+refresh_calendar (ECalBackendSync *backend, EDataCal *cal, GError **perror)
+{
+ g_return_if_fail (E_IS_CAL_BACKEND_EXCHANGE (backend));
+
+ get_changed_events (E_CAL_BACKEND_EXCHANGE (backend));
+}
+
struct _cb_data {
ECalBackendSync *be;
icalcomponent *vcal_comp;
@@ -2430,6 +2444,7 @@ class_init (ECalBackendExchangeCalendarClass *klass)
parent_class = g_type_class_peek_parent (klass);
sync_class->open_sync = open_calendar;
+ sync_class->refresh_sync = refresh_calendar;
sync_class->create_object_sync = create_object;
sync_class->modify_object_sync = modify_object;
sync_class->remove_object_sync = remove_object;
diff --git a/calendar/e-cal-backend-exchange-tasks.c b/calendar/e-cal-backend-exchange-tasks.c
index 2192edc..41072db 100644
--- a/calendar/e-cal-backend-exchange-tasks.c
+++ b/calendar/e-cal-backend-exchange-tasks.c
@@ -1013,6 +1013,12 @@ open_task (ECalBackendSync *backend, EDataCal *cal,
e_folder_exchange_subscribe (E_CAL_BACKEND_EXCHANGE (backend)->folder,
E2K_CONTEXT_OBJECT_CHANGED, 30,
notify_changes, backend);
+ e_folder_exchange_subscribe (E_CAL_BACKEND_EXCHANGE (backend)->folder,
+ E2K_CONTEXT_OBJECT_ADDED, 30,
+ notify_changes, backend);
+ e_folder_exchange_subscribe (E_CAL_BACKEND_EXCHANGE (backend)->folder,
+ E2K_CONTEXT_OBJECT_REMOVED, 30,
+ notify_changes, backend);
thread = g_thread_create ((GThreadFunc) get_changed_tasks, E_CAL_BACKEND_EXCHANGE (backend), FALSE, &error);
if (!thread) {
@@ -1021,6 +1027,14 @@ open_task (ECalBackendSync *backend, EDataCal *cal,
}
}
+static void
+refresh_task (ECalBackendSync *backend, EDataCal *cal, GError **perror)
+{
+ g_return_if_fail (E_IS_CAL_BACKEND_EXCHANGE (backend));
+
+ get_changed_tasks (E_CAL_BACKEND_EXCHANGE (backend));
+}
+
struct _cb_data {
ECalBackendSync *be;
icalcomponent *vcal_comp;
@@ -1496,6 +1510,7 @@ class_init (ECalBackendExchangeTasksClass *klass)
parent_class = g_type_class_peek_parent (klass);
sync_class->open_sync = open_task;
+ sync_class->refresh_sync = refresh_task;
sync_class->create_object_sync = create_task_object;
sync_class->modify_object_sync = modify_task_object;
sync_class->remove_object_sync = remove_task_object;
diff --git a/calendar/e-cal-backend-exchange.c b/calendar/e-cal-backend-exchange.c
index 23fd1ab..e36ead5 100644
--- a/calendar/e-cal-backend-exchange.c
+++ b/calendar/e-cal-backend-exchange.c
@@ -155,7 +155,8 @@ get_static_capabilities (ECalBackendSync *backend, EDataCal *cal, gchar **capabi
CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT ","
CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
CAL_STATIC_CAPABILITY_NO_THISANDPRIOR ","
- CAL_STATIC_CAPABILITY_REMOVE_ALARMS);
+ CAL_STATIC_CAPABILITY_REMOVE_ALARMS ","
+ CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]